fictoan-react 1.10.0 → 1.10.3
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/{hooks/UseClickOutside.js → UseClickOutside-CJ5IQE6n.js} +1 -1
- package/dist/components/Accordion/Accordion.js +0 -1
- package/dist/components/Badge/Badge.js +0 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +0 -1
- package/dist/components/Button/Button.js +0 -1
- package/dist/components/Callout/Callout.js +0 -1
- package/dist/components/Card/Card.js +0 -1
- package/dist/components/CodeBlock/CodeBlock.js +0 -1
- package/dist/components/Divider/Divider.js +0 -1
- package/dist/components/Drawer/Drawer.js +1 -2
- package/dist/components/Element/Element.js +3 -1
- package/dist/components/Form/Checkbox/Checkbox.js +0 -1
- package/dist/components/Form/Checkbox/Switch.js +0 -1
- package/dist/components/Form/Form/Form.js +0 -1
- package/dist/components/Form/FormItem/FormItem.js +0 -1
- package/dist/components/Form/FormItemGroup/FormItemGroup.js +0 -1
- package/dist/components/Form/InputField/InputField.js +0 -1
- package/dist/components/Form/ListBox/ListBox.js +1 -2
- package/dist/components/Form/PinInputField/PinInputField.js +0 -1
- package/dist/components/Form/RadioButton/RadioButton.js +0 -1
- package/dist/components/Form/RadioButton/RadioTabGroup.js +0 -1
- package/dist/components/Form/Range/Range.js +0 -1
- package/dist/components/Form/Select/Select.js +0 -1
- package/dist/components/Form/TextArea/TextArea.js +0 -1
- package/dist/components/Meter/Meter.js +0 -1
- package/dist/components/Modal/Modal.js +0 -1
- package/dist/components/Notification/NotificationItem/NotificationItem.js +0 -1
- package/dist/components/Notification/NotificationsWrapper/NotificationsWrapper.js +0 -1
- package/dist/components/OptionCard/OptionCard.js +2 -2
- package/dist/components/Pagination/Pagination.js +0 -1
- package/dist/components/Portion/Portion.js +0 -1
- package/dist/components/ProgressBar/ProgressBar.js +0 -1
- package/dist/components/Row/Row.js +0 -1
- package/dist/components/Sidebar/ContentWrapper/ContentWrapper.js +0 -1
- package/dist/components/Sidebar/SidebarFooter/SidebarFooter.js +0 -1
- package/dist/components/Sidebar/SidebarHeader/SidebarHeader.js +0 -1
- package/dist/components/Sidebar/SidebarItem/SidebarItem.js +0 -1
- package/dist/components/Sidebar/SidebarWrapper/SidebarWrapper.js +1 -2
- package/dist/components/Skeleton/Skeleton.js +0 -1
- package/dist/components/Spinner/Spinner.js +0 -1
- package/dist/components/Table/Table.js +0 -1
- package/dist/components/Tabs/Tabs.js +0 -1
- package/dist/components/Toast/ToastItem/ToastItem.js +0 -1
- package/dist/components/Toast/ToastsWrapper/ToastsWrapper.js +0 -1
- package/dist/components/Tooltip/Tooltip.js +0 -8
- package/dist/index.css +1 -1
- package/dist/index.js +0 -9
- package/package.json +1 -1
- package/dist/types/Accordion.d.ts +0 -99
- package/dist/types/Badge.d.ts +0 -100
- package/dist/types/BaseInputComponent.d.ts +0 -138
- package/dist/types/Breadcrumbs.d.ts +0 -103
- package/dist/types/Button.d.ts +0 -103
- package/dist/types/Callout.d.ts +0 -99
- package/dist/types/Card.d.ts +0 -96
- package/dist/types/Checkbox.d.ts +0 -112
- package/dist/types/CodeBlock.d.ts +0 -103
- package/dist/types/ContentWrapper.d.ts +0 -96
- package/dist/types/Divider.d.ts +0 -98
- package/dist/types/Drawer.d.ts +0 -103
- package/dist/types/Element.d.ts +0 -95
- package/dist/types/FileUpload.d.ts +0 -147
- package/dist/types/Form.d.ts +0 -161
- package/dist/types/FormGenerator.d.ts +0 -150
- package/dist/types/FormItem.d.ts +0 -92
- package/dist/types/FormItemGroup.d.ts +0 -98
- package/dist/types/Heading.d.ts +0 -109
- package/dist/types/InputField.d.ts +0 -130
- package/dist/types/InputLabel.d.ts +0 -98
- package/dist/types/ListBox.d.ts +0 -117
- package/dist/types/Meter.d.ts +0 -114
- package/dist/types/Modal.d.ts +0 -107
- package/dist/types/NotificationItem.d.ts +0 -102
- package/dist/types/NotificationsWrapper.d.ts +0 -99
- package/dist/types/OptionCard.d.ts +0 -121
- package/dist/types/Pagination.d.ts +0 -118
- package/dist/types/PinInputField.d.ts +0 -107
- package/dist/types/Portion.d.ts +0 -103
- package/dist/types/ProgressBar.d.ts +0 -106
- package/dist/types/RadioButton.d.ts +0 -112
- package/dist/types/RadioGroup.d.ts +0 -122
- package/dist/types/RadioTabGroup.d.ts +0 -128
- package/dist/types/Range.d.ts +0 -108
- package/dist/types/Row.d.ts +0 -102
- package/dist/types/Select.d.ts +0 -102
- package/dist/types/SidebarFooter.d.ts +0 -96
- package/dist/types/SidebarHeader.d.ts +0 -96
- package/dist/types/SidebarItem.d.ts +0 -109
- package/dist/types/SidebarWrapper.d.ts +0 -98
- package/dist/types/Skeleton.d.ts +0 -115
- package/dist/types/Spinner.d.ts +0 -97
- package/dist/types/Switch.d.ts +0 -116
- package/dist/types/Table.d.ts +0 -103
- package/dist/types/Tabs.d.ts +0 -107
- package/dist/types/Tags.d.ts +0 -111
- package/dist/types/Text.d.ts +0 -101
- package/dist/types/TextArea.d.ts +0 -110
- package/dist/types/ThemeProvider.d.ts +0 -106
- package/dist/types/ToastItem.d.ts +0 -98
- package/dist/types/ToastsWrapper.d.ts +0 -96
- package/dist/types/Tooltip.d.ts +0 -98
- package/dist/types/components/Accordion/Accordion.d.ts +0 -12
- package/dist/types/components/Accordion/index.d.ts +0 -2
- package/dist/types/components/Badge/Badge.d.ts +0 -14
- package/dist/types/components/Badge/index.d.ts +0 -2
- package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +0 -16
- package/dist/types/components/Breadcrumbs/index.d.ts +0 -2
- package/dist/types/components/Button/Button.d.ts +0 -15
- package/dist/types/components/Button/index.d.ts +0 -2
- package/dist/types/components/Callout/Callout.d.ts +0 -12
- package/dist/types/components/Callout/index.d.ts +0 -2
- package/dist/types/components/Card/Card.d.ts +0 -10
- package/dist/types/components/Card/index.d.ts +0 -2
- package/dist/types/components/CodeBlock/CodeBlock.d.ts +0 -17
- package/dist/types/components/CodeBlock/index.d.ts +0 -2
- package/dist/types/components/Divider/Divider.d.ts +0 -12
- package/dist/types/components/Divider/index.d.ts +0 -2
- package/dist/types/components/Drawer/Drawer.d.ts +0 -17
- package/dist/types/components/Drawer/index.d.ts +0 -2
- package/dist/types/components/Element/Element.d.ts +0 -7
- package/dist/types/components/Element/Tags.d.ts +0 -14
- package/dist/types/components/Element/constants.d.ts +0 -77
- package/dist/types/components/Element/index.d.ts +0 -4
- package/dist/types/components/Form/BaseInputComponent/BaseInputComponent.d.ts +0 -8
- package/dist/types/components/Form/BaseInputComponent/constants.d.ts +0 -42
- package/dist/types/components/Form/Checkbox/Checkbox.d.ts +0 -7
- package/dist/types/components/Form/Checkbox/Switch.d.ts +0 -10
- package/dist/types/components/Form/Form/Form.d.ts +0 -14
- package/dist/types/components/Form/Form/FormGenerator.d.ts +0 -21
- package/dist/types/components/Form/FormItem/FormItem.d.ts +0 -7
- package/dist/types/components/Form/FormItemGroup/FormItemGroup.d.ts +0 -12
- package/dist/types/components/Form/InputField/FileUpload.d.ts +0 -15
- package/dist/types/components/Form/InputField/InputField.d.ts +0 -9
- package/dist/types/components/Form/InputLabel/InputLabel.d.ts +0 -12
- package/dist/types/components/Form/ListBox/ListBox.d.ts +0 -4
- package/dist/types/components/Form/ListBox/constants.d.ts +0 -33
- package/dist/types/components/Form/ListBox/listBoxUtils.d.ts +0 -7
- package/dist/types/components/Form/PinInputField/PinInputField.d.ts +0 -22
- package/dist/types/components/Form/PinInputField/index.d.ts +0 -2
- package/dist/types/components/Form/RadioButton/RadioButton.d.ts +0 -5
- package/dist/types/components/Form/RadioButton/RadioGroup.d.ts +0 -4
- package/dist/types/components/Form/RadioButton/RadioTabGroup.d.ts +0 -5
- package/dist/types/components/Form/RadioButton/constants.d.ts +0 -19
- package/dist/types/components/Form/Range/Range.d.ts +0 -14
- package/dist/types/components/Form/Range/index.d.ts +0 -2
- package/dist/types/components/Form/Select/Select.d.ts +0 -4
- package/dist/types/components/Form/Select/constants.d.ts +0 -22
- package/dist/types/components/Form/TextArea/TextArea.d.ts +0 -9
- package/dist/types/components/Form/index.d.ts +0 -20
- package/dist/types/components/Meter/Meter.d.ts +0 -26
- package/dist/types/components/Meter/index.d.ts +0 -2
- package/dist/types/components/Modal/Modal.d.ts +0 -18
- package/dist/types/components/Modal/index.d.ts +0 -2
- package/dist/types/components/Notification/NotificationItem/NotificationItem.d.ts +0 -16
- package/dist/types/components/Notification/NotificationsWrapper/NotificationsWrapper.d.ts +0 -13
- package/dist/types/components/Notification/index.d.ts +0 -3
- package/dist/types/components/OptionCard/OptionCard.d.ts +0 -24
- package/dist/types/components/OptionCard/index.d.ts +0 -3
- package/dist/types/components/Pagination/Pagination.d.ts +0 -4
- package/dist/types/components/Pagination/constants.d.ts +0 -34
- package/dist/types/components/Pagination/index.d.ts +0 -3
- package/dist/types/components/Pagination/usePagination.d.ts +0 -16
- package/dist/types/components/Portion/Portion.d.ts +0 -16
- package/dist/types/components/Portion/index.d.ts +0 -2
- package/dist/types/components/Portion/types.d.ts +0 -2
- package/dist/types/components/ProgressBar/ProgressBar.d.ts +0 -18
- package/dist/types/components/ProgressBar/index.d.ts +0 -2
- package/dist/types/components/Row/Row.d.ts +0 -17
- package/dist/types/components/Row/index.d.ts +0 -2
- package/dist/types/components/Sidebar/ContentWrapper/ContentWrapper.d.ts +0 -11
- package/dist/types/components/Sidebar/SidebarFooter/SidebarFooter.d.ts +0 -10
- package/dist/types/components/Sidebar/SidebarHeader/SidebarHeader.d.ts +0 -10
- package/dist/types/components/Sidebar/SidebarItem/SidebarItem.d.ts +0 -22
- package/dist/types/components/Sidebar/SidebarWrapper/SidebarWrapper.d.ts +0 -12
- package/dist/types/components/Sidebar/index.d.ts +0 -6
- package/dist/types/components/Skeleton/Skeleton.d.ts +0 -26
- package/dist/types/components/Skeleton/index.d.ts +0 -2
- package/dist/types/components/Spinner/Spinner.d.ts +0 -11
- package/dist/types/components/Spinner/index.d.ts +0 -2
- package/dist/types/components/Table/Table.d.ts +0 -17
- package/dist/types/components/Table/index.d.ts +0 -2
- package/dist/types/components/Tabs/Tabs.d.ts +0 -21
- package/dist/types/components/Tabs/index.d.ts +0 -2
- package/dist/types/components/ThemeProvider/ThemeProvider.d.ts +0 -12
- package/dist/types/components/ThemeProvider/index.d.ts +0 -2
- package/dist/types/components/ThemeProvider/types.d.ts +0 -8
- package/dist/types/components/Toast/ToastItem/ToastItem.d.ts +0 -12
- package/dist/types/components/Toast/ToastsWrapper/ToastsWrapper.d.ts +0 -10
- package/dist/types/components/Toast/index.d.ts +0 -3
- package/dist/types/components/Tooltip/Tooltip.d.ts +0 -12
- package/dist/types/components/Tooltip/index.d.ts +0 -2
- package/dist/types/components/Typography/Heading.d.ts +0 -19
- package/dist/types/components/Typography/Text.d.ts +0 -14
- package/dist/types/components/Typography/index.d.ts +0 -3
- package/dist/types/components/index.d.ts +0 -30
- package/dist/types/constants.d.ts +0 -96
- package/dist/types/index.d.ts +0 -99
- package/dist/types/listBoxUtils.d.ts +0 -18
- package/dist/types/types.d.ts +0 -3
- package/dist/types/usePagination.d.ts +0 -18
- package/dist/utils/classNames.js +0 -8
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { Element } from "../Element/Element.js";
|
|
5
5
|
import { Text } from "../Typography/Text.js";
|
|
6
|
-
/* empty css */
|
|
7
6
|
const Accordion = React.forwardRef(
|
|
8
7
|
({ summary, children, open = false, ...props }, ref) => {
|
|
9
8
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -4,7 +4,6 @@ import React from "react";
|
|
|
4
4
|
import { Element } from "../Element/Element.js";
|
|
5
5
|
import "../Element/Tags.js";
|
|
6
6
|
import { Text } from "../Typography/Text.js";
|
|
7
|
-
/* empty css */
|
|
8
7
|
const BreadcrumbItem = React.forwardRef(
|
|
9
8
|
({ children, current, ...props }, ref) => {
|
|
10
9
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -4,7 +4,6 @@ import React, { useState, useRef, useEffect, useCallback } from "react";
|
|
|
4
4
|
import { Element } from "../Element/Element.js";
|
|
5
5
|
import { Button } from "../Button/Button.js";
|
|
6
6
|
import { Badge } from "../Badge/Badge.js";
|
|
7
|
-
/* empty css */
|
|
8
7
|
const CodeBlock = React.forwardRef(({
|
|
9
8
|
children,
|
|
10
9
|
source,
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
import React, { useState, useRef, useEffect } from "react";
|
|
4
4
|
import { Element } from "../Element/Element.js";
|
|
5
5
|
import { Div } from "../Element/Tags.js";
|
|
6
|
-
|
|
7
|
-
import { useClickOutside } from "../../hooks/UseClickOutside.js";
|
|
6
|
+
import { u as useClickOutside } from "../../UseClickOutside-CJ5IQE6n.js";
|
|
8
7
|
const Drawer = React.forwardRef(
|
|
9
8
|
({
|
|
10
9
|
children,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
3
|
import React from "react";
|
|
4
|
-
|
|
4
|
+
const createClassName = (classNames) => {
|
|
5
|
+
return classNames.filter((item) => !!item).join(" ");
|
|
6
|
+
};
|
|
5
7
|
const Element = React.forwardRef(
|
|
6
8
|
({
|
|
7
9
|
as: Component = "div",
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { Element } from "../../Element/Element.js";
|
|
5
5
|
import { BaseInputComponent } from "../BaseInputComponent/BaseInputComponent.js";
|
|
6
|
-
/* empty css */
|
|
7
6
|
const Checkbox = React.forwardRef(({ ...props }, ref) => {
|
|
8
7
|
return /* @__PURE__ */ React.createElement(Element, { as: "div", "data-checkbox": true, ref }, /* @__PURE__ */ React.createElement(BaseInputComponent, { as: "input", type: "checkbox", ...props }));
|
|
9
8
|
});
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { Element } from "../../Element/Element.js";
|
|
5
5
|
import { BaseInputComponent } from "../BaseInputComponent/BaseInputComponent.js";
|
|
6
|
-
/* empty css */
|
|
7
6
|
const Switch = React.forwardRef(
|
|
8
7
|
({ size = "medium", ...props }, ref) => {
|
|
9
8
|
return /* @__PURE__ */ React.createElement(Element, { as: "div", "data-switch": true, ref, className: `size-${size}` }, /* @__PURE__ */ React.createElement(BaseInputComponent, { as: "input", type: "checkbox", ...props }));
|
|
@@ -4,7 +4,6 @@ import React from "react";
|
|
|
4
4
|
import { Element } from "../../Element/Element.js";
|
|
5
5
|
import { Callout } from "../../Callout/Callout.js";
|
|
6
6
|
import { generateFormThroughConfig } from "./FormGenerator.js";
|
|
7
|
-
/* empty css */
|
|
8
7
|
const Form = React.forwardRef(
|
|
9
8
|
({ spacing = "small", fields, onFieldsChange, children, errorText, ...props }, ref) => {
|
|
10
9
|
let classNames = [];
|
|
@@ -6,8 +6,7 @@ import { InputField } from "../InputField/InputField.js";
|
|
|
6
6
|
import { Badge } from "../../Badge/Badge.js";
|
|
7
7
|
import { Text } from "../../Typography/Text.js";
|
|
8
8
|
import { BaseInputComponent } from "../BaseInputComponent/BaseInputComponent.js";
|
|
9
|
-
|
|
10
|
-
import { useClickOutside } from "../../../hooks/UseClickOutside.js";
|
|
9
|
+
import { u as useClickOutside } from "../../../UseClickOutside-CJ5IQE6n.js";
|
|
11
10
|
import { searchOptions } from "./listBoxUtils.js";
|
|
12
11
|
const ListBox = React.forwardRef(
|
|
13
12
|
({
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import React, { useRef, useState, useCallback, useEffect, createRef, useImperativeHandle } from "react";
|
|
4
4
|
import { InputField } from "../InputField/InputField.js";
|
|
5
5
|
import { Div } from "../../Element/Tags.js";
|
|
6
|
-
/* empty css */
|
|
7
6
|
function validate(value, type) {
|
|
8
7
|
const NUMERIC_REGEX = /^[0-9]+$/;
|
|
9
8
|
const ALPHA_NUMERIC_REGEX = /^[a-zA-Z0-9]+$/i;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { Div } from "../../Element/Tags.js";
|
|
5
5
|
import { BaseInputComponent } from "../BaseInputComponent/BaseInputComponent.js";
|
|
6
|
-
/* empty css */
|
|
7
6
|
const RadioTabGroupOptions = ({ options, defaultValue, value, required, ...props }) => {
|
|
8
7
|
return /* @__PURE__ */ React.createElement(Div, { "data-radio-tab-group": true, name: props.name, required }, options.map((option) => /* @__PURE__ */ React.createElement(React.Fragment, { key: option.id }, /* @__PURE__ */ React.createElement(
|
|
9
8
|
"input",
|
|
@@ -6,7 +6,6 @@ import { Div } from "../../Element/Tags.js";
|
|
|
6
6
|
import { BaseInputComponent } from "../BaseInputComponent/BaseInputComponent.js";
|
|
7
7
|
import { InputLabel } from "../InputLabel/InputLabel.js";
|
|
8
8
|
import { Text } from "../../Typography/Text.js";
|
|
9
|
-
/* empty css */
|
|
10
9
|
const Range = React.forwardRef(({ label, value, suffix, ...props }, ref) => {
|
|
11
10
|
return /* @__PURE__ */ React.createElement(Element, { "data-range": true, ref }, label && /* @__PURE__ */ React.createElement(Div, { "data-range-meta": true }, /* @__PURE__ */ React.createElement(InputLabel, { className: "range-label", label, htmlFor: props.id }), /* @__PURE__ */ React.createElement(Text, { className: "range-value" }, value, suffix && suffix)), /* @__PURE__ */ React.createElement(
|
|
12
11
|
BaseInputComponent,
|
|
@@ -4,7 +4,6 @@ import React from "react";
|
|
|
4
4
|
import { Element } from "../../Element/Element.js";
|
|
5
5
|
import { BaseInputComponent } from "../BaseInputComponent/BaseInputComponent.js";
|
|
6
6
|
import { Div } from "../../Element/Tags.js";
|
|
7
|
-
/* empty css */
|
|
8
7
|
const SelectWithOptions = ({ options, className, ...props }) => {
|
|
9
8
|
const renderOption = (option) => /* @__PURE__ */ React.createElement(Element, { as: "option", key: option.value, value: option.value, disabled: option.disabled }, option.label);
|
|
10
9
|
const renderOptGroup = (group) => /* @__PURE__ */ React.createElement(Element, { as: "optgroup", key: group.label, label: group.label }, group.options.map(renderOption));
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
"use client;";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { BaseInputComponent } from "../BaseInputComponent/BaseInputComponent.js";
|
|
5
|
-
/* empty css */
|
|
6
5
|
const TextArea = React.forwardRef((props, ref) => {
|
|
7
6
|
return /* @__PURE__ */ React.createElement(BaseInputComponent, { as: "textarea", "data-textarea": true, ref, placeholder: " ", ...props });
|
|
8
7
|
});
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"use client;";
|
|
3
3
|
import React, { createContext, useState, useCallback, useContext } from "react";
|
|
4
4
|
import { Element } from "../Element/Element.js";
|
|
5
|
+
import { Div } from "../Element/Tags.js";
|
|
5
6
|
import { Card } from "../Card/Card.js";
|
|
6
|
-
/* empty css */
|
|
7
7
|
const OptionCardsContext = createContext({
|
|
8
8
|
isSelected: () => false,
|
|
9
9
|
toggleSelection: () => {
|
|
@@ -44,7 +44,7 @@ const OptionCardsGroup = ({
|
|
|
44
44
|
const isSelected = useCallback((id) => {
|
|
45
45
|
return selectedIds.has(id);
|
|
46
46
|
}, [selectedIds]);
|
|
47
|
-
return /* @__PURE__ */ React.createElement(OptionCardsContext.Provider, { value: { isSelected, toggleSelection, showTickIcon, tickPosition } }, /* @__PURE__ */ React.createElement(
|
|
47
|
+
return /* @__PURE__ */ React.createElement(OptionCardsContext.Provider, { value: { isSelected, toggleSelection, showTickIcon, tickPosition } }, /* @__PURE__ */ React.createElement(Div, { "data-option-cards-group": true, className: `tick-${tickPosition}` }, children));
|
|
48
48
|
};
|
|
49
49
|
const useOptionCard = (id) => {
|
|
50
50
|
const context = useContext(OptionCardsContext);
|
|
@@ -7,7 +7,6 @@ import { Text } from "../Typography/Text.js";
|
|
|
7
7
|
import { Spinner } from "../Spinner/Spinner.js";
|
|
8
8
|
import { Button } from "../Button/Button.js";
|
|
9
9
|
import { usePagination } from "./usePagination.js";
|
|
10
|
-
/* empty css */
|
|
11
10
|
const defaultRenderItem = ({
|
|
12
11
|
type,
|
|
13
12
|
page,
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { Element } from "../../Element/Element.js";
|
|
5
5
|
import { Div } from "../../Element/Tags.js";
|
|
6
|
-
/* empty css */
|
|
7
6
|
const SidebarItem = React.forwardRef(
|
|
8
7
|
({ hasAlert, hasEmptyIcon, hasNoIcon, children, ...props }, ref) => {
|
|
9
8
|
let classNames = [];
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
"use client;";
|
|
3
3
|
import React, { useRef, useImperativeHandle } from "react";
|
|
4
4
|
import { Element } from "../../Element/Element.js";
|
|
5
|
-
|
|
6
|
-
import { useClickOutside } from "../../../hooks/UseClickOutside.js";
|
|
5
|
+
import { u as useClickOutside } from "../../../UseClickOutside-CJ5IQE6n.js";
|
|
7
6
|
const SidebarWrapper = React.forwardRef(
|
|
8
7
|
({
|
|
9
8
|
collapsed,
|
|
@@ -5,7 +5,6 @@ import { Element } from "../Element/Element.js";
|
|
|
5
5
|
import { Div } from "../Element/Tags.js";
|
|
6
6
|
import { Divider } from "../Divider/Divider.js";
|
|
7
7
|
import { Text } from "../Typography/Text.js";
|
|
8
|
-
/* empty css */
|
|
9
8
|
const Tabs = React.forwardRef(
|
|
10
9
|
({ tabs, additionalNavContentWrapper, defaultActiveTab, align = "left", ...props }, ref) => {
|
|
11
10
|
const index = tabs.findIndex((tab) => tab.key === defaultActiveTab);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
"use client;";
|
|
3
3
|
import React, { useState, useEffect } from "react";
|
|
4
4
|
import { Element } from "../../Element/Element.js";
|
|
5
|
-
/* empty css */
|
|
6
5
|
const ToastItem = React.forwardRef(
|
|
7
6
|
({ showWhen, children, secondsToShowFor, closeWhen, ...props }, ref) => {
|
|
8
7
|
let classNames = [];
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
"use client;";
|
|
3
3
|
import React, { useState, useRef, useEffect } from "react";
|
|
4
4
|
import { Element } from "../Element/Element.js";
|
|
5
|
-
/* empty css */
|
|
6
5
|
const TOOLTIP_OFFSET = 8;
|
|
7
6
|
const SCREEN_PADDING = 16;
|
|
8
7
|
const calculatePosition = (tooltipElement, targetElement, position) => {
|
|
9
|
-
console.log("Calculating position...");
|
|
10
8
|
const tooltipRect = tooltipElement.getBoundingClientRect();
|
|
11
9
|
const targetRect = targetElement.getBoundingClientRect();
|
|
12
10
|
const viewportHeight = window.innerHeight;
|
|
@@ -55,7 +53,6 @@ const calculatePosition = (tooltipElement, targetElement, position) => {
|
|
|
55
53
|
} else if (top + tooltipRect.height > viewportHeight - SCREEN_PADDING) {
|
|
56
54
|
top = viewportHeight - tooltipRect.height - SCREEN_PADDING;
|
|
57
55
|
}
|
|
58
|
-
console.log("Calculated position:", { top, left });
|
|
59
56
|
return { top, left };
|
|
60
57
|
};
|
|
61
58
|
const Tooltip = React.forwardRef(
|
|
@@ -72,17 +69,14 @@ const Tooltip = React.forwardRef(
|
|
|
72
69
|
const tooltipRef = useRef(null);
|
|
73
70
|
const effectiveRef = ref || tooltipRef;
|
|
74
71
|
const updatePosition = () => {
|
|
75
|
-
console.log("updatePosition called", { isVisible });
|
|
76
72
|
if (!isVisible || !effectiveRef.current) return;
|
|
77
73
|
const targetElement = document.getElementById(isTooltipFor);
|
|
78
74
|
if (!targetElement) return;
|
|
79
75
|
const { top, left } = calculatePosition(effectiveRef.current, targetElement, position);
|
|
80
|
-
console.log("Setting new position:", { top, left });
|
|
81
76
|
setTooltipPosition({ top, left });
|
|
82
77
|
};
|
|
83
78
|
useEffect(() => {
|
|
84
79
|
if (isVisible) {
|
|
85
|
-
console.log("Visibility changed, updating position");
|
|
86
80
|
updatePosition();
|
|
87
81
|
}
|
|
88
82
|
}, [isVisible, position]);
|
|
@@ -93,11 +87,9 @@ const Tooltip = React.forwardRef(
|
|
|
93
87
|
return;
|
|
94
88
|
}
|
|
95
89
|
const showTooltip = () => {
|
|
96
|
-
console.log("Showing tooltip");
|
|
97
90
|
setIsVisible(true);
|
|
98
91
|
};
|
|
99
92
|
const hideTooltip = () => {
|
|
100
|
-
console.log("Hiding tooltip");
|
|
101
93
|
setIsVisible(false);
|
|
102
94
|
};
|
|
103
95
|
if (showOn === "hover") {
|