@intlayer/design-system 7.0.5 → 7.0.7
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/esm/components/Popover/dynamic.mjs +130 -0
- package/dist/esm/components/Popover/dynamic.mjs.map +1 -0
- package/dist/esm/components/Popover/static.mjs +194 -0
- package/dist/esm/components/Popover/static.mjs.map +1 -0
- package/dist/types/components/Breadcrumb/breadcrumb.content.d.ts +3 -3
- package/dist/types/components/Breadcrumb/breadcrumb.content.d.ts.map +1 -1
- package/dist/types/components/Breadcrumb/index.d.ts +2 -2
- package/dist/types/components/Browser/Browser.content.d.ts +11 -11
- package/dist/types/components/Button/Button.d.ts +4 -4
- package/dist/types/components/Button/Button.d.ts.map +1 -1
- package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts +5 -5
- package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts.map +1 -1
- package/dist/types/components/Command/index.d.ts +17 -17
- package/dist/types/components/Command/index.d.ts.map +1 -1
- package/dist/types/components/Container/index.d.ts +9 -9
- package/dist/types/components/Container/index.d.ts.map +1 -1
- package/dist/types/components/CopyButton/CopyButton.content.d.ts +3 -3
- package/dist/types/components/CopyButton/CopyButton.content.d.ts.map +1 -1
- package/dist/types/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts +25 -25
- package/dist/types/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts +9 -9
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +33 -33
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +25 -25
- package/dist/types/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +25 -25
- package/dist/types/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +33 -33
- package/dist/types/components/DictionaryFieldEditor/StructureView/structureView.content.d.ts +9 -9
- package/dist/types/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts +7 -7
- package/dist/types/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts +2 -2
- package/dist/types/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts +31 -31
- package/dist/types/components/ExpandCollapse/expandCollapse.content.d.ts +3 -3
- package/dist/types/components/Form/FormBase.d.ts +2 -2
- package/dist/types/components/Form/FormField.d.ts +2 -2
- package/dist/types/components/Form/FormItem.d.ts +2 -2
- package/dist/types/components/Form/FormItem.d.ts.map +1 -1
- package/dist/types/components/Form/elements/MultiselectElement.d.ts +2 -2
- package/dist/types/components/Form/elements/SelectElement.d.ts +2 -2
- package/dist/types/components/Form/elements/SwitchSelectorElement.d.ts +2 -2
- package/dist/types/components/IDE/CodeContext.d.ts +2 -2
- package/dist/types/components/IDE/FileTree.d.ts.map +1 -1
- package/dist/types/components/IDE/code.content.d.ts +5 -5
- package/dist/types/components/IDE/code.content.d.ts.map +1 -1
- package/dist/types/components/IDE/copyCode.content.d.ts +5 -5
- package/dist/types/components/IDE/copyCode.content.d.ts.map +1 -1
- package/dist/types/components/Input/Checkbox.d.ts +3 -3
- package/dist/types/components/Input/Checkbox.d.ts.map +1 -1
- package/dist/types/components/Input/Input.d.ts +1 -1
- package/dist/types/components/Input/Input.d.ts.map +1 -1
- package/dist/types/components/Input/SearchInput.d.ts +2 -2
- package/dist/types/components/Link/Link.d.ts +3 -3
- package/dist/types/components/Loader/index.content.d.ts +3 -3
- package/dist/types/components/Loader/index.content.d.ts.map +1 -1
- package/dist/types/components/Loader/spinner.d.ts +2 -2
- package/dist/types/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts +17 -17
- package/dist/types/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts.map +1 -1
- package/dist/types/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +13 -13
- package/dist/types/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts.map +1 -1
- package/dist/types/components/MaxWidthSmoother/index.d.ts +2 -2
- package/dist/types/components/Navbar/Burger.d.ts.map +1 -1
- package/dist/types/components/Navbar/DesktopNavbar.d.ts +2 -2
- package/dist/types/components/Navbar/DesktopNavbar.d.ts.map +1 -1
- package/dist/types/components/Navbar/MobileNavbar.d.ts +2 -2
- package/dist/types/components/Navbar/MobileNavbar.d.ts.map +1 -1
- package/dist/types/components/Navbar/index.d.ts +2 -2
- package/dist/types/components/Navbar/index.d.ts.map +1 -1
- package/dist/types/components/Pagination/Pagination.d.ts +5 -5
- package/dist/types/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/types/components/Pagination/pagination.content.d.ts +11 -11
- package/dist/types/components/Popover/dynamic.d.ts +7 -0
- package/dist/types/components/Popover/dynamic.d.ts.map +1 -0
- package/dist/types/components/Popover/static.d.ts +222 -0
- package/dist/types/components/Popover/static.d.ts.map +1 -0
- package/dist/types/components/RightDrawer/useRightDrawerStore.d.ts +2 -2
- package/dist/types/components/Select/Select.d.ts +3 -3
- package/dist/types/components/Select/Select.d.ts.map +1 -1
- package/dist/types/components/SocialNetworks/index.d.ts +2 -2
- package/dist/types/components/SocialNetworks/index.d.ts.map +1 -1
- package/dist/types/components/SwitchSelector/index.d.ts +5 -5
- package/dist/types/components/SwitchSelector/index.d.ts.map +1 -1
- package/dist/types/components/Tab/Tab.d.ts +6 -6
- package/dist/types/components/Tab/Tab.d.ts.map +1 -1
- package/dist/types/components/Tab/TabContext.d.ts +2 -2
- package/dist/types/components/Tab/TabContext.d.ts.map +1 -1
- package/dist/types/components/TabSelector/TabSelector.d.ts +5 -5
- package/dist/types/components/TabSelector/TabSelector.d.ts.map +1 -1
- package/dist/types/components/Table/table.content.d.ts +3 -3
- package/dist/types/components/Table/table.content.d.ts.map +1 -1
- package/dist/types/components/Tag/index.d.ts +5 -5
- package/dist/types/components/Tag/index.d.ts.map +1 -1
- package/dist/types/components/Toaster/Toast.d.ts +2 -2
- package/dist/types/components/Toaster/Toast.d.ts.map +1 -1
- package/dist/types/components/Toaster/Toaster.d.ts +2 -2
- package/dist/types/components/Toaster/Toaster.d.ts.map +1 -1
- package/dist/types/hooks/useScrollBlockage/useScrollBlockageStore.d.ts +2 -2
- package/package.json +22 -22
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { Detail, PopoverStatic, PopoverXAlign, PopoverYAlign } from "./static.mjs";
|
|
5
|
+
import { useEffect, useRef, useState } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/Popover/dynamic.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Popover Component (Client-side)
|
|
11
|
+
*
|
|
12
|
+
* Client-side wrapper around the static Popover component.
|
|
13
|
+
* Reuses the server-side compatible implementation.
|
|
14
|
+
*
|
|
15
|
+
* @param props - Popover component props
|
|
16
|
+
* @returns Trigger container with popover functionality
|
|
17
|
+
*/
|
|
18
|
+
const PopoverComponent = (props) => {
|
|
19
|
+
return /* @__PURE__ */ jsx(PopoverStatic, { ...props });
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Popover Detail Component (Client-side)
|
|
23
|
+
*
|
|
24
|
+
* Client-side wrapper around the static Detail component that adds automatic
|
|
25
|
+
* positioning logic based on viewport constraints.
|
|
26
|
+
*
|
|
27
|
+
* Features:
|
|
28
|
+
* - Reuses server-side compatible static Detail component
|
|
29
|
+
* - Adds automatic positioning adjustment based on viewport
|
|
30
|
+
* - Calculates optimal X/Y alignment to prevent overflow
|
|
31
|
+
* - Dynamically adjusts max-width based on available space
|
|
32
|
+
* - Listens to window resize and scroll events
|
|
33
|
+
*
|
|
34
|
+
* @param props - Popover Detail component props
|
|
35
|
+
* @returns Positioned popover content with animations and accessibility
|
|
36
|
+
*/
|
|
37
|
+
const Detail$1 = ({ xAlign = PopoverXAlign.START, yAlign = PopoverYAlign.BELOW,...props }) => {
|
|
38
|
+
const popoverRef = useRef(null);
|
|
39
|
+
const [computedXAlign, setComputedXAlign] = useState(xAlign);
|
|
40
|
+
const [computedYAlign, setComputedYAlign] = useState(yAlign);
|
|
41
|
+
const [maxWidth, setMaxWidth] = useState(void 0);
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
const adjustPosition = () => {
|
|
44
|
+
if (!popoverRef.current) return;
|
|
45
|
+
const popoverElement = popoverRef.current;
|
|
46
|
+
const triggerElement$1 = document.getElementById(`unrollable-panel-button-${props.identifier}`);
|
|
47
|
+
if (!triggerElement$1) return;
|
|
48
|
+
const triggerRect = triggerElement$1.getBoundingClientRect();
|
|
49
|
+
const viewportWidth = window.innerWidth;
|
|
50
|
+
const viewportHeight = window.innerHeight;
|
|
51
|
+
const gap = 16;
|
|
52
|
+
const padding = 16;
|
|
53
|
+
const maxWidthFromLeft = viewportWidth - triggerRect.left - padding;
|
|
54
|
+
const maxWidthFromRight = triggerRect.right - padding;
|
|
55
|
+
setMaxWidth(Math.max(maxWidthFromLeft, maxWidthFromRight));
|
|
56
|
+
const wasInvisible = popoverElement.classList.contains("invisible");
|
|
57
|
+
if (wasInvisible) {
|
|
58
|
+
popoverElement.style.visibility = "hidden";
|
|
59
|
+
popoverElement.classList.remove("invisible");
|
|
60
|
+
}
|
|
61
|
+
requestAnimationFrame(() => {
|
|
62
|
+
const popoverRect = popoverElement.getBoundingClientRect();
|
|
63
|
+
if (wasInvisible) {
|
|
64
|
+
popoverElement.style.visibility = "";
|
|
65
|
+
popoverElement.classList.add("invisible");
|
|
66
|
+
}
|
|
67
|
+
let newYAlign = yAlign;
|
|
68
|
+
const spaceBelow = viewportHeight - triggerRect.bottom - gap;
|
|
69
|
+
const spaceAbove = triggerRect.top - gap;
|
|
70
|
+
if (yAlign === PopoverYAlign.BELOW && spaceBelow < popoverRect.height) {
|
|
71
|
+
if (spaceAbove >= popoverRect.height) newYAlign = PopoverYAlign.ABOVE;
|
|
72
|
+
} else if (yAlign === PopoverYAlign.ABOVE && spaceAbove < popoverRect.height) {
|
|
73
|
+
if (spaceBelow >= popoverRect.height) newYAlign = PopoverYAlign.BELOW;
|
|
74
|
+
}
|
|
75
|
+
let newXAlign = xAlign;
|
|
76
|
+
const spaceRight = viewportWidth - triggerRect.left - padding;
|
|
77
|
+
const spaceLeft = triggerRect.right - padding;
|
|
78
|
+
if (xAlign === PopoverXAlign.START && spaceRight < popoverRect.width) {
|
|
79
|
+
if (spaceLeft >= popoverRect.width) newXAlign = PopoverXAlign.END;
|
|
80
|
+
} else if (xAlign === PopoverXAlign.END && spaceLeft < popoverRect.width) {
|
|
81
|
+
if (spaceRight >= popoverRect.width) newXAlign = PopoverXAlign.START;
|
|
82
|
+
}
|
|
83
|
+
setComputedYAlign(newYAlign);
|
|
84
|
+
setComputedXAlign(newXAlign);
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
const timeoutId = setTimeout(adjustPosition, 0);
|
|
88
|
+
const triggerElement = document.getElementById(`unrollable-panel-button-${props.identifier}`);
|
|
89
|
+
if (triggerElement) {
|
|
90
|
+
triggerElement.addEventListener("mouseenter", adjustPosition);
|
|
91
|
+
triggerElement.addEventListener("focusin", adjustPosition);
|
|
92
|
+
}
|
|
93
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
94
|
+
adjustPosition();
|
|
95
|
+
});
|
|
96
|
+
if (popoverRef.current) resizeObserver.observe(popoverRef.current);
|
|
97
|
+
window.addEventListener("resize", adjustPosition);
|
|
98
|
+
window.addEventListener("scroll", adjustPosition, true);
|
|
99
|
+
return () => {
|
|
100
|
+
clearTimeout(timeoutId);
|
|
101
|
+
if (triggerElement) {
|
|
102
|
+
triggerElement.removeEventListener("mouseenter", adjustPosition);
|
|
103
|
+
triggerElement.removeEventListener("focusin", adjustPosition);
|
|
104
|
+
}
|
|
105
|
+
resizeObserver.disconnect();
|
|
106
|
+
window.removeEventListener("resize", adjustPosition);
|
|
107
|
+
window.removeEventListener("scroll", adjustPosition, true);
|
|
108
|
+
};
|
|
109
|
+
}, [
|
|
110
|
+
props.identifier,
|
|
111
|
+
xAlign,
|
|
112
|
+
yAlign
|
|
113
|
+
]);
|
|
114
|
+
return /* @__PURE__ */ jsx(Detail, {
|
|
115
|
+
...props,
|
|
116
|
+
xAlign: computedXAlign,
|
|
117
|
+
yAlign: computedYAlign,
|
|
118
|
+
ref: popoverRef,
|
|
119
|
+
style: {
|
|
120
|
+
...props.style,
|
|
121
|
+
maxWidth: maxWidth ? `${maxWidth}px` : void 0
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
const Popover = PopoverComponent;
|
|
126
|
+
Popover.Detail = Detail$1;
|
|
127
|
+
|
|
128
|
+
//#endregion
|
|
129
|
+
export { Popover };
|
|
130
|
+
//# sourceMappingURL=dynamic.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic.mjs","names":["PopoverComponent: FC<PopoverProps>","Detail: FC<DetailProps>","triggerElement","StaticDetail","Popover: PopoverType","Detail"],"sources":["../../../../src/components/Popover/dynamic.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { useEffect, useRef, useState } from 'react';\nimport {\n type DetailProps,\n type PopoverProps,\n PopoverStatic,\n type PopoverType,\n PopoverXAlign,\n PopoverYAlign,\n Detail as StaticDetail,\n} from './static';\n\n/**\n * Popover Component (Client-side)\n *\n * Client-side wrapper around the static Popover component.\n * Reuses the server-side compatible implementation.\n *\n * @param props - Popover component props\n * @returns Trigger container with popover functionality\n */\nconst PopoverComponent: FC<PopoverProps> = (props) => {\n return <PopoverStatic {...props} />;\n};\n\n/**\n * Popover Detail Component (Client-side)\n *\n * Client-side wrapper around the static Detail component that adds automatic\n * positioning logic based on viewport constraints.\n *\n * Features:\n * - Reuses server-side compatible static Detail component\n * - Adds automatic positioning adjustment based on viewport\n * - Calculates optimal X/Y alignment to prevent overflow\n * - Dynamically adjusts max-width based on available space\n * - Listens to window resize and scroll events\n *\n * @param props - Popover Detail component props\n * @returns Positioned popover content with animations and accessibility\n */\nconst Detail: FC<DetailProps> = ({\n xAlign = PopoverXAlign.START,\n yAlign = PopoverYAlign.BELOW,\n ...props\n}) => {\n const popoverRef = useRef<HTMLDivElement>(null);\n const [computedXAlign, setComputedXAlign] = useState(xAlign);\n const [computedYAlign, setComputedYAlign] = useState(yAlign);\n const [maxWidth, setMaxWidth] = useState<number | undefined>(undefined);\n\n useEffect(() => {\n const adjustPosition = () => {\n if (!popoverRef.current) return;\n\n const popoverElement = popoverRef.current;\n const triggerElement = document.getElementById(\n `unrollable-panel-button-${props.identifier}`\n );\n\n if (!triggerElement) return;\n\n const triggerRect = triggerElement.getBoundingClientRect();\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n const gap = 16; // 1rem gap\n const padding = 16; // Additional padding from viewport edges\n\n // Calculate maximum width based on viewport and trigger position\n const maxWidthFromLeft = viewportWidth - triggerRect.left - padding;\n const maxWidthFromRight = triggerRect.right - padding;\n\n // Use the larger space to ensure popover can fit\n const absoluteMaxWidth = Math.max(maxWidthFromLeft, maxWidthFromRight);\n\n setMaxWidth(absoluteMaxWidth);\n\n // Force a layout calculation by temporarily making visible if needed\n const wasInvisible = popoverElement.classList.contains('invisible');\n if (wasInvisible) {\n popoverElement.style.visibility = 'hidden';\n popoverElement.classList.remove('invisible');\n }\n\n // Small delay to ensure max-width is applied and content reflows\n requestAnimationFrame(() => {\n const popoverRect = popoverElement.getBoundingClientRect();\n\n // Restore invisible state if it was invisible\n if (wasInvisible) {\n popoverElement.style.visibility = '';\n popoverElement.classList.add('invisible');\n }\n\n // Determine optimal Y alignment\n let newYAlign = yAlign;\n const spaceBelow = viewportHeight - triggerRect.bottom - gap;\n const spaceAbove = triggerRect.top - gap;\n\n if (yAlign === PopoverYAlign.BELOW && spaceBelow < popoverRect.height) {\n // Not enough space below, try above\n if (spaceAbove >= popoverRect.height) {\n newYAlign = PopoverYAlign.ABOVE;\n }\n } else if (\n yAlign === PopoverYAlign.ABOVE &&\n spaceAbove < popoverRect.height\n ) {\n // Not enough space above, try below\n if (spaceBelow >= popoverRect.height) {\n newYAlign = PopoverYAlign.BELOW;\n }\n }\n\n // Determine optimal X alignment\n let newXAlign = xAlign;\n const spaceRight = viewportWidth - triggerRect.left - padding;\n const spaceLeft = triggerRect.right - padding;\n\n if (xAlign === PopoverXAlign.START && spaceRight < popoverRect.width) {\n // Not enough space on the right, try left\n if (spaceLeft >= popoverRect.width) {\n newXAlign = PopoverXAlign.END;\n }\n } else if (\n xAlign === PopoverXAlign.END &&\n spaceLeft < popoverRect.width\n ) {\n // Not enough space on the left, try right\n if (spaceRight >= popoverRect.width) {\n newXAlign = PopoverXAlign.START;\n }\n }\n\n setComputedYAlign(newYAlign);\n setComputedXAlign(newXAlign);\n });\n };\n\n // Adjust position with a slight delay to ensure DOM is ready\n const timeoutId = setTimeout(adjustPosition, 0);\n\n // Listen to mouse enter on the trigger to recalculate\n const triggerElement = document.getElementById(\n `unrollable-panel-button-${props.identifier}`\n );\n\n if (triggerElement) {\n triggerElement.addEventListener('mouseenter', adjustPosition);\n triggerElement.addEventListener('focusin', adjustPosition);\n }\n\n // Use ResizeObserver to detect popover content size changes\n const resizeObserver = new ResizeObserver(() => {\n adjustPosition();\n });\n\n if (popoverRef.current) {\n resizeObserver.observe(popoverRef.current);\n }\n\n window.addEventListener('resize', adjustPosition);\n window.addEventListener('scroll', adjustPosition, true);\n\n return () => {\n clearTimeout(timeoutId);\n if (triggerElement) {\n triggerElement.removeEventListener('mouseenter', adjustPosition);\n triggerElement.removeEventListener('focusin', adjustPosition);\n }\n resizeObserver.disconnect();\n window.removeEventListener('resize', adjustPosition);\n window.removeEventListener('scroll', adjustPosition, true);\n };\n }, [props.identifier, xAlign, yAlign]);\n\n // Use the static Detail component with computed alignment values\n return (\n <StaticDetail\n {...props}\n xAlign={computedXAlign}\n yAlign={computedYAlign}\n ref={popoverRef}\n style={{\n ...props.style,\n maxWidth: maxWidth ? `${maxWidth}px` : undefined,\n }}\n />\n );\n};\n\n// Create Popover with Detail attached\nexport const Popover: PopoverType = PopoverComponent as PopoverType;\n\nPopover.Detail = Detail;\n"],"mappings":"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"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.mjs";
|
|
2
|
+
import { Container } from "../Container/index.mjs";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/Popover/static.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Horizontal alignment options for popover positioning
|
|
9
|
+
*/
|
|
10
|
+
let PopoverXAlign = /* @__PURE__ */ function(PopoverXAlign$1) {
|
|
11
|
+
/** Align popover to start (left) of trigger */
|
|
12
|
+
PopoverXAlign$1["START"] = "start";
|
|
13
|
+
/** Align popover to end (right) of trigger */
|
|
14
|
+
PopoverXAlign$1["END"] = "end";
|
|
15
|
+
return PopoverXAlign$1;
|
|
16
|
+
}({});
|
|
17
|
+
/**
|
|
18
|
+
* Vertical alignment options for popover positioning
|
|
19
|
+
*/
|
|
20
|
+
let PopoverYAlign = /* @__PURE__ */ function(PopoverYAlign$1) {
|
|
21
|
+
/** Position popover below the trigger */
|
|
22
|
+
PopoverYAlign$1["BELOW"] = "bellow";
|
|
23
|
+
/** Position popover above the trigger */
|
|
24
|
+
PopoverYAlign$1["ABOVE"] = "above";
|
|
25
|
+
return PopoverYAlign$1;
|
|
26
|
+
}({});
|
|
27
|
+
/**
|
|
28
|
+
* Popover Component
|
|
29
|
+
*
|
|
30
|
+
* A versatile popover container that displays contextual content when triggered by hover
|
|
31
|
+
* or focus interactions. Built with accessibility in mind and supports multiple positioning
|
|
32
|
+
* options with smooth animations.
|
|
33
|
+
*
|
|
34
|
+
* Features:
|
|
35
|
+
* - Hover and focus-based triggering
|
|
36
|
+
* - Multiple positioning options (above/below, start/end)
|
|
37
|
+
* - Accessibility compliant with ARIA attributes
|
|
38
|
+
* - Smooth animations with configurable delays
|
|
39
|
+
* - Optional directional arrows
|
|
40
|
+
* - Automatic z-index management
|
|
41
|
+
* - Responsive design support
|
|
42
|
+
*
|
|
43
|
+
* Architecture:
|
|
44
|
+
* - Main Popover acts as trigger container
|
|
45
|
+
* - Popover.Detail renders the actual popover content
|
|
46
|
+
* - Uses CSS groups for coordinated hover/focus states
|
|
47
|
+
* - Unique identifier system prevents conflicts
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* Basic hover popover:
|
|
51
|
+
* ```jsx
|
|
52
|
+
* <Popover identifier="help-tooltip">
|
|
53
|
+
* <button>Need Help?</button>
|
|
54
|
+
*
|
|
55
|
+
* <Popover.Detail identifier="help-tooltip">
|
|
56
|
+
* <div>This is helpful information!</div>
|
|
57
|
+
* </Popover.Detail>
|
|
58
|
+
* </Popover>
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* Focus-triggered popover:
|
|
63
|
+
* ```jsx
|
|
64
|
+
* <Popover identifier="focus-menu">
|
|
65
|
+
* <input placeholder="Focus me" />
|
|
66
|
+
*
|
|
67
|
+
* <Popover.Detail
|
|
68
|
+
* identifier="focus-menu"
|
|
69
|
+
* isFocusable
|
|
70
|
+
* isOverable={false}
|
|
71
|
+
* >
|
|
72
|
+
* <div>Focus-only menu content</div>
|
|
73
|
+
* </Popover.Detail>
|
|
74
|
+
* </Popover>
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* Positioned popover with custom alignment:
|
|
79
|
+
* ```jsx
|
|
80
|
+
* <Popover identifier="positioned">
|
|
81
|
+
* <span>Hover me</span>
|
|
82
|
+
*
|
|
83
|
+
* <Popover.Detail
|
|
84
|
+
* identifier="positioned"
|
|
85
|
+
* xAlign={PopoverXAlign.END}
|
|
86
|
+
* yAlign={PopoverYAlign.ABOVE}
|
|
87
|
+
* displayArrow={false}
|
|
88
|
+
* >
|
|
89
|
+
* <div>Above and right-aligned</div>
|
|
90
|
+
* </Popover.Detail>
|
|
91
|
+
* </Popover>
|
|
92
|
+
* ```
|
|
93
|
+
*
|
|
94
|
+
* Accessibility Features:
|
|
95
|
+
* - Proper ARIA labeling and relationships
|
|
96
|
+
* - Keyboard navigation support
|
|
97
|
+
* - Screen reader compatibility
|
|
98
|
+
* - Focus management
|
|
99
|
+
*
|
|
100
|
+
* Performance Considerations:
|
|
101
|
+
* - CSS-only animations for smooth transitions
|
|
102
|
+
* - Efficient group-based state management
|
|
103
|
+
* - Minimal DOM updates during interactions
|
|
104
|
+
*
|
|
105
|
+
* @param props - Popover component props
|
|
106
|
+
* @returns Trigger container with popover functionality
|
|
107
|
+
*/
|
|
108
|
+
const PopoverStatic = ({ children, className, identifier,...props }) => /* @__PURE__ */ jsx("div", {
|
|
109
|
+
className: cn("group/popover relative flex cursor-pointer", className),
|
|
110
|
+
id: `unrollable-panel-button-${identifier}`,
|
|
111
|
+
"aria-haspopup": true,
|
|
112
|
+
...props,
|
|
113
|
+
children
|
|
114
|
+
});
|
|
115
|
+
/**
|
|
116
|
+
* Popover Detail Component
|
|
117
|
+
*
|
|
118
|
+
* The actual popover content container with advanced positioning, animation, and
|
|
119
|
+
* accessibility features. Automatically manages visibility based on trigger interactions.
|
|
120
|
+
*
|
|
121
|
+
* Features:
|
|
122
|
+
* - Precise positioning with alignment options
|
|
123
|
+
* - Smooth fade and slide animations
|
|
124
|
+
* - Configurable directional arrows
|
|
125
|
+
* - Hover and focus interaction support
|
|
126
|
+
* - Accessibility-compliant ARIA attributes
|
|
127
|
+
* - High z-index for overlay behavior
|
|
128
|
+
* - Automatic visibility management
|
|
129
|
+
*
|
|
130
|
+
* Positioning System:
|
|
131
|
+
* - X-axis: START (left-aligned) or END (right-aligned)
|
|
132
|
+
* - Y-axis: BELOW (underneath) or ABOVE (on top)
|
|
133
|
+
* - Automatic spacing with 1rem gap from trigger
|
|
134
|
+
* - Responsive minimum width matching trigger
|
|
135
|
+
*
|
|
136
|
+
* Arrow Indicators:
|
|
137
|
+
* - CSS-generated triangular arrows
|
|
138
|
+
* - Positioned based on alignment settings
|
|
139
|
+
* - Points toward trigger for visual connection
|
|
140
|
+
* - Can be disabled for clean, minimal appearance
|
|
141
|
+
*
|
|
142
|
+
* Animation Behavior:
|
|
143
|
+
* - Starts invisible with opacity: 0
|
|
144
|
+
* - Smooth 400ms transitions with easing
|
|
145
|
+
* - 800ms delay for hover states (prevents flicker)
|
|
146
|
+
* - Immediate hiding when trigger loses focus/hover
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* Rich content popover:
|
|
150
|
+
* ```jsx
|
|
151
|
+
* <Popover.Detail identifier="rich-content">
|
|
152
|
+
* <div className="p-4">
|
|
153
|
+
* <h3>Popover Title</h3>
|
|
154
|
+
* <p>Detailed information with multiple paragraphs.</p>
|
|
155
|
+
* <button>Action Button</button>
|
|
156
|
+
* </div>
|
|
157
|
+
* </Popover.Detail>
|
|
158
|
+
* ```
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* Menu-style popover:
|
|
162
|
+
* ```jsx
|
|
163
|
+
* <Popover.Detail
|
|
164
|
+
* identifier="context-menu"
|
|
165
|
+
* displayArrow={false}
|
|
166
|
+
* xAlign={PopoverXAlign.END}
|
|
167
|
+
* >
|
|
168
|
+
* <ul className="py-2">
|
|
169
|
+
* <li><button className="w-full px-4 py-2">Edit</button></li>
|
|
170
|
+
* <li><button className="w-full px-4 py-2">Delete</button></li>
|
|
171
|
+
* </ul>
|
|
172
|
+
* </Popover.Detail>
|
|
173
|
+
* ```
|
|
174
|
+
*
|
|
175
|
+
* @param props - Popover Detail component props
|
|
176
|
+
* @returns Positioned popover content with animations and accessibility
|
|
177
|
+
*/
|
|
178
|
+
const Detail = forwardRef(({ children, isHidden = void 0, isOverable = true, isFocusable = false, xAlign = PopoverXAlign.START, yAlign = PopoverYAlign.BELOW, identifier, className, displayArrow = true,...props }, ref) => /* @__PURE__ */ jsx(Container, {
|
|
179
|
+
ref,
|
|
180
|
+
transparency: "sm",
|
|
181
|
+
role: "group",
|
|
182
|
+
"aria-hidden": isHidden,
|
|
183
|
+
"aria-labelledby": `unrollable-panel-button-${identifier}`,
|
|
184
|
+
id: `unrollable-panel-${identifier}`,
|
|
185
|
+
className: cn("absolute z-[1000] min-w-full rounded-md ring-1 ring-neutral", xAlign === "start" && "left-0", xAlign === "end" && "right-0", yAlign === "bellow" && "top-[calc(100%+1rem)]", yAlign === "above" && "bottom-[calc(100%+1rem)]", displayArrow && "before:absolute before:z-[999] before:h-0 before:w-0 before:content-[\"\"]", displayArrow && xAlign === "start" && "before:left-2", displayArrow && xAlign === "end" && "before:right-2", displayArrow && yAlign === "bellow" && "before:-top-[10px] before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral before:border-l-[10px] before:border-l-transparent", displayArrow && yAlign === "above" && "before:-bottom-[10px] before:border-t-[10px] before:border-t-neutral before:border-r-[10px] before:border-r-transparent before:border-l-[10px] before:border-l-transparent", "overflow-x-visible opacity-0 transition-all duration-400 ease-in-out", isHidden !== false ? "invisible" : "visible opacity-100 delay-800", isOverable && "group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800", isFocusable && "group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800", className),
|
|
186
|
+
...props,
|
|
187
|
+
children
|
|
188
|
+
}));
|
|
189
|
+
Detail.displayName = "Popover.Detail";
|
|
190
|
+
PopoverStatic.Detail = Detail;
|
|
191
|
+
|
|
192
|
+
//#endregion
|
|
193
|
+
export { Detail, PopoverStatic, PopoverXAlign, PopoverYAlign };
|
|
194
|
+
//# sourceMappingURL=static.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static.mjs","names":["PopoverStatic: PopoverType"],"sources":["../../../../src/components/Popover/static.tsx"],"sourcesContent":["import type { DetailedHTMLProps, FC, HTMLAttributes } from 'react';\nimport { forwardRef } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Container } from '../Container';\n\n/**\n * Props for the main Popover component\n * Extends HTMLDivElement attributes for full DOM compatibility\n */\nexport type PopoverProps = DetailedHTMLProps<\n HTMLAttributes<HTMLDivElement>,\n HTMLDivElement\n> & {\n /** Unique identifier linking the trigger to its popover content for accessibility */\n identifier: string;\n};\n\n/**\n * Composite type for the Popover component with Detail subcomponent\n * Allows for Popover.Detail usage pattern\n */\nexport type PopoverType = FC<PopoverProps> & {\n Detail: FC<DetailProps>;\n};\n\n/**\n * Horizontal alignment options for popover positioning\n */\nexport enum PopoverXAlign {\n /** Align popover to start (left) of trigger */\n START = 'start',\n /** Align popover to end (right) of trigger */\n END = 'end',\n}\n\n/**\n * Vertical alignment options for popover positioning\n */\nexport enum PopoverYAlign {\n /** Position popover below the trigger */\n BELOW = 'bellow',\n /** Position popover above the trigger */\n ABOVE = 'above',\n}\n\n/**\n * Popover Component\n *\n * A versatile popover container that displays contextual content when triggered by hover\n * or focus interactions. Built with accessibility in mind and supports multiple positioning\n * options with smooth animations.\n *\n * Features:\n * - Hover and focus-based triggering\n * - Multiple positioning options (above/below, start/end)\n * - Accessibility compliant with ARIA attributes\n * - Smooth animations with configurable delays\n * - Optional directional arrows\n * - Automatic z-index management\n * - Responsive design support\n *\n * Architecture:\n * - Main Popover acts as trigger container\n * - Popover.Detail renders the actual popover content\n * - Uses CSS groups for coordinated hover/focus states\n * - Unique identifier system prevents conflicts\n *\n * @example\n * Basic hover popover:\n * ```jsx\n * <Popover identifier=\"help-tooltip\">\n * <button>Need Help?</button>\n *\n * <Popover.Detail identifier=\"help-tooltip\">\n * <div>This is helpful information!</div>\n * </Popover.Detail>\n * </Popover>\n * ```\n *\n * @example\n * Focus-triggered popover:\n * ```jsx\n * <Popover identifier=\"focus-menu\">\n * <input placeholder=\"Focus me\" />\n *\n * <Popover.Detail\n * identifier=\"focus-menu\"\n * isFocusable\n * isOverable={false}\n * >\n * <div>Focus-only menu content</div>\n * </Popover.Detail>\n * </Popover>\n * ```\n *\n * @example\n * Positioned popover with custom alignment:\n * ```jsx\n * <Popover identifier=\"positioned\">\n * <span>Hover me</span>\n *\n * <Popover.Detail\n * identifier=\"positioned\"\n * xAlign={PopoverXAlign.END}\n * yAlign={PopoverYAlign.ABOVE}\n * displayArrow={false}\n * >\n * <div>Above and right-aligned</div>\n * </Popover.Detail>\n * </Popover>\n * ```\n *\n * Accessibility Features:\n * - Proper ARIA labeling and relationships\n * - Keyboard navigation support\n * - Screen reader compatibility\n * - Focus management\n *\n * Performance Considerations:\n * - CSS-only animations for smooth transitions\n * - Efficient group-based state management\n * - Minimal DOM updates during interactions\n *\n * @param props - Popover component props\n * @returns Trigger container with popover functionality\n */\nexport const PopoverStatic: PopoverType = ({\n children,\n className,\n identifier,\n ...props\n}) => (\n <div\n className={cn('group/popover relative flex cursor-pointer', className)}\n id={`unrollable-panel-button-${identifier}`}\n aria-haspopup\n {...props}\n >\n {children}\n </div>\n);\n\n/**\n * Props for the Popover.Detail component\n * Extends HTMLDivElement attributes for styling flexibility\n */\nexport type DetailProps = HTMLAttributes<HTMLDivElement> & {\n /** Whether the popover responds to focus events on the trigger */\n isFocusable?: boolean;\n /** Controls visibility state - undefined allows automatic hover/focus control */\n isHidden?: boolean;\n /** Whether the popover responds to hover events on the trigger */\n isOverable?: boolean;\n /** Unique identifier matching the trigger's identifier for accessibility */\n identifier: string;\n /** Horizontal positioning relative to trigger */\n xAlign?: PopoverXAlign | `${PopoverXAlign}`;\n /** Vertical positioning relative to trigger */\n yAlign?: PopoverYAlign | `${PopoverYAlign}`;\n /** Whether to display the directional arrow indicator */\n displayArrow?: boolean;\n};\n\n/**\n * Popover Detail Component\n *\n * The actual popover content container with advanced positioning, animation, and\n * accessibility features. Automatically manages visibility based on trigger interactions.\n *\n * Features:\n * - Precise positioning with alignment options\n * - Smooth fade and slide animations\n * - Configurable directional arrows\n * - Hover and focus interaction support\n * - Accessibility-compliant ARIA attributes\n * - High z-index for overlay behavior\n * - Automatic visibility management\n *\n * Positioning System:\n * - X-axis: START (left-aligned) or END (right-aligned)\n * - Y-axis: BELOW (underneath) or ABOVE (on top)\n * - Automatic spacing with 1rem gap from trigger\n * - Responsive minimum width matching trigger\n *\n * Arrow Indicators:\n * - CSS-generated triangular arrows\n * - Positioned based on alignment settings\n * - Points toward trigger for visual connection\n * - Can be disabled for clean, minimal appearance\n *\n * Animation Behavior:\n * - Starts invisible with opacity: 0\n * - Smooth 400ms transitions with easing\n * - 800ms delay for hover states (prevents flicker)\n * - Immediate hiding when trigger loses focus/hover\n *\n * @example\n * Rich content popover:\n * ```jsx\n * <Popover.Detail identifier=\"rich-content\">\n * <div className=\"p-4\">\n * <h3>Popover Title</h3>\n * <p>Detailed information with multiple paragraphs.</p>\n * <button>Action Button</button>\n * </div>\n * </Popover.Detail>\n * ```\n *\n * @example\n * Menu-style popover:\n * ```jsx\n * <Popover.Detail\n * identifier=\"context-menu\"\n * displayArrow={false}\n * xAlign={PopoverXAlign.END}\n * >\n * <ul className=\"py-2\">\n * <li><button className=\"w-full px-4 py-2\">Edit</button></li>\n * <li><button className=\"w-full px-4 py-2\">Delete</button></li>\n * </ul>\n * </Popover.Detail>\n * ```\n *\n * @param props - Popover Detail component props\n * @returns Positioned popover content with animations and accessibility\n */\nconst Detail = forwardRef<HTMLDivElement, DetailProps>(\n (\n {\n children,\n isHidden = undefined,\n isOverable = true,\n isFocusable = false,\n xAlign = PopoverXAlign.START,\n yAlign = PopoverYAlign.BELOW,\n identifier,\n className,\n displayArrow = true,\n ...props\n },\n ref\n ) => (\n <Container\n ref={ref}\n transparency=\"sm\"\n role=\"group\"\n aria-hidden={isHidden}\n aria-labelledby={`unrollable-panel-button-${identifier}`}\n id={`unrollable-panel-${identifier}`}\n className={cn(\n 'absolute z-[1000] min-w-full rounded-md ring-1 ring-neutral',\n\n /* Positioning */\n xAlign === 'start' && 'left-0',\n xAlign === 'end' && 'right-0',\n yAlign === 'bellow' && 'top-[calc(100%+1rem)]',\n yAlign === 'above' && 'bottom-[calc(100%+1rem)]',\n\n /* Arrow indicator */\n displayArrow &&\n 'before:absolute before:z-[999] before:h-0 before:w-0 before:content-[\"\"]',\n\n /* Horizontal positioning */\n displayArrow && xAlign === 'start' && 'before:left-2',\n displayArrow && xAlign === 'end' && 'before:right-2',\n\n /* Arrow pointing up (when popover is below trigger) */\n displayArrow &&\n yAlign === 'bellow' &&\n 'before:-top-[10px] before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral before:border-l-[10px] before:border-l-transparent',\n\n /* Arrow pointing down (when popover is above trigger) */\n displayArrow &&\n yAlign === 'above' &&\n 'before:-bottom-[10px] before:border-t-[10px] before:border-t-neutral before:border-r-[10px] before:border-r-transparent before:border-l-[10px] before:border-l-transparent',\n\n /* Visibility management */\n 'overflow-x-visible opacity-0 transition-all duration-400 ease-in-out',\n isHidden !== false ? 'invisible' : 'visible opacity-100 delay-800',\n isOverable &&\n 'group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800',\n isFocusable &&\n 'group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800',\n className\n )}\n {...props}\n >\n {children}\n </Container>\n )\n);\n\nDetail.displayName = 'Popover.Detail';\n\nPopoverStatic.Detail = Detail;\n\n// Export Detail for use in dynamic version\nexport { Detail };\n"],"mappings":";;;;;;;;;AA4BA,IAAY,0DAAL;;AAEL;;AAEA;;;;;;AAMF,IAAY,0DAAL;;AAEL;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFF,MAAaA,iBAA8B,EACzC,UACA,WACA,WACA,GAAG,YAEH,oBAAC;CACC,WAAW,GAAG,8CAA8C,UAAU;CACtE,IAAI,2BAA2B;CAC/B;CACA,GAAI;CAEH;EACG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFR,MAAM,SAAS,YAEX,EACE,UACA,WAAW,QACX,aAAa,MACb,cAAc,OACd,SAAS,cAAc,OACvB,SAAS,cAAc,OACvB,YACA,WACA,eAAe,KACf,GAAG,SAEL,QAEA,oBAAC;CACM;CACL,cAAa;CACb,MAAK;CACL,eAAa;CACb,mBAAiB,2BAA2B;CAC5C,IAAI,oBAAoB;CACxB,WAAW,GACT,+DAGA,WAAW,WAAW,UACtB,WAAW,SAAS,WACpB,WAAW,YAAY,yBACvB,WAAW,WAAW,4BAGtB,gBACE,8EAGF,gBAAgB,WAAW,WAAW,iBACtC,gBAAgB,WAAW,SAAS,kBAGpC,gBACE,WAAW,YACX,2KAGF,gBACE,WAAW,WACX,8KAGF,wEACA,aAAa,QAAQ,cAAc,iCACnC,cACE,6FACF,eACE,kHACF,UACD;CACD,GAAI;CAEH;EACS,CAEf;AAED,OAAO,cAAc;AAErB,cAAc,SAAS"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types5 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/components/Breadcrumb/breadcrumb.content.d.ts
|
|
4
4
|
declare const breadCrumbContent: {
|
|
5
5
|
key: string;
|
|
6
6
|
content: {
|
|
7
|
-
linkLabel:
|
|
7
|
+
linkLabel: _intlayer_types5.TypedNodeModel<_intlayer_types5.NodeType.Translation, {
|
|
8
8
|
en: string;
|
|
9
9
|
fr: string;
|
|
10
10
|
es: string;
|
|
@@ -23,7 +23,7 @@ declare const breadCrumbContent: {
|
|
|
23
23
|
id: string;
|
|
24
24
|
vi: string;
|
|
25
25
|
}, {
|
|
26
|
-
nodeType:
|
|
26
|
+
nodeType: _intlayer_types5.NodeType.Translation | "translation";
|
|
27
27
|
} & {
|
|
28
28
|
translation: {
|
|
29
29
|
en: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.content.d.ts","names":[],"sources":["../../../../src/components/Breadcrumb/breadcrumb.content.ts"],"sourcesContent":[],"mappings":";;;cAEa;;;IAAA,SAAA,
|
|
1
|
+
{"version":3,"file":"breadcrumb.content.d.ts","names":[],"sources":["../../../../src/components/Breadcrumb/breadcrumb.content.ts"],"sourcesContent":[],"mappings":";;;cAEa;;;IAAA,SAAA,iCA2BS,wCAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LinkColor } from "../Link/Link.js";
|
|
2
2
|
import { FC, HTMLAttributes, ReactNode } from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
5
|
import { LocalesValues } from "@intlayer/types";
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ import { LocalesValues } from "@intlayer/types";
|
|
|
11
11
|
declare const breadcrumbVariants: (props?: {
|
|
12
12
|
size?: "small" | "medium" | "large";
|
|
13
13
|
spacing?: "compact" | "normal" | "loose";
|
|
14
|
-
} &
|
|
14
|
+
} & class_variance_authority_types0.ClassProp) => string;
|
|
15
15
|
/**
|
|
16
16
|
* Detailed breadcrumb link configuration with optional href or onClick
|
|
17
17
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types353 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/components/Browser/Browser.content.d.ts
|
|
4
4
|
declare const browserContent: {
|
|
5
5
|
key: string;
|
|
6
6
|
content: {
|
|
7
|
-
ariaLabel:
|
|
7
|
+
ariaLabel: _intlayer_types353.TypedNodeModel<_intlayer_types353.NodeType.Translation, {
|
|
8
8
|
en: string;
|
|
9
9
|
'en-GB': string;
|
|
10
10
|
fr: string;
|
|
@@ -22,7 +22,7 @@ declare const browserContent: {
|
|
|
22
22
|
pl: string;
|
|
23
23
|
id: string;
|
|
24
24
|
}, {
|
|
25
|
-
nodeType:
|
|
25
|
+
nodeType: _intlayer_types353.NodeType.Translation | "translation";
|
|
26
26
|
} & {
|
|
27
27
|
translation: {
|
|
28
28
|
en: string;
|
|
@@ -43,7 +43,7 @@ declare const browserContent: {
|
|
|
43
43
|
id: string;
|
|
44
44
|
};
|
|
45
45
|
}>;
|
|
46
|
-
urlLabel:
|
|
46
|
+
urlLabel: _intlayer_types353.TypedNodeModel<_intlayer_types353.NodeType.Translation, {
|
|
47
47
|
en: string;
|
|
48
48
|
'en-GB': string;
|
|
49
49
|
fr: string;
|
|
@@ -61,7 +61,7 @@ declare const browserContent: {
|
|
|
61
61
|
pl: string;
|
|
62
62
|
id: string;
|
|
63
63
|
}, {
|
|
64
|
-
nodeType:
|
|
64
|
+
nodeType: _intlayer_types353.NodeType.Translation | "translation";
|
|
65
65
|
} & {
|
|
66
66
|
translation: {
|
|
67
67
|
en: string;
|
|
@@ -83,7 +83,7 @@ declare const browserContent: {
|
|
|
83
83
|
};
|
|
84
84
|
}>;
|
|
85
85
|
urlPlaceholder: string;
|
|
86
|
-
errorMessage:
|
|
86
|
+
errorMessage: _intlayer_types353.TypedNodeModel<_intlayer_types353.NodeType.Translation, {
|
|
87
87
|
en: string;
|
|
88
88
|
'en-GB': string;
|
|
89
89
|
fr: string;
|
|
@@ -101,7 +101,7 @@ declare const browserContent: {
|
|
|
101
101
|
pl: string;
|
|
102
102
|
id: string;
|
|
103
103
|
}, {
|
|
104
|
-
nodeType:
|
|
104
|
+
nodeType: _intlayer_types353.NodeType.Translation | "translation";
|
|
105
105
|
} & {
|
|
106
106
|
translation: {
|
|
107
107
|
en: string;
|
|
@@ -122,7 +122,7 @@ declare const browserContent: {
|
|
|
122
122
|
id: string;
|
|
123
123
|
};
|
|
124
124
|
}>;
|
|
125
|
-
reloadButtonTitle:
|
|
125
|
+
reloadButtonTitle: _intlayer_types353.TypedNodeModel<_intlayer_types353.NodeType.Translation, {
|
|
126
126
|
en: string;
|
|
127
127
|
'en-GB': string;
|
|
128
128
|
fr: string;
|
|
@@ -140,7 +140,7 @@ declare const browserContent: {
|
|
|
140
140
|
pl: string;
|
|
141
141
|
id: string;
|
|
142
142
|
}, {
|
|
143
|
-
nodeType:
|
|
143
|
+
nodeType: _intlayer_types353.NodeType.Translation | "translation";
|
|
144
144
|
} & {
|
|
145
145
|
translation: {
|
|
146
146
|
en: string;
|
|
@@ -161,7 +161,7 @@ declare const browserContent: {
|
|
|
161
161
|
id: string;
|
|
162
162
|
};
|
|
163
163
|
}>;
|
|
164
|
-
iframeTitle:
|
|
164
|
+
iframeTitle: _intlayer_types353.TypedNodeModel<_intlayer_types353.NodeType.Translation, {
|
|
165
165
|
en: string;
|
|
166
166
|
'en-GB': string;
|
|
167
167
|
fr: string;
|
|
@@ -179,7 +179,7 @@ declare const browserContent: {
|
|
|
179
179
|
pl: string;
|
|
180
180
|
id: string;
|
|
181
181
|
}, {
|
|
182
|
-
nodeType:
|
|
182
|
+
nodeType: _intlayer_types353.NodeType.Translation | "translation";
|
|
183
183
|
} & {
|
|
184
184
|
translation: {
|
|
185
185
|
en: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, DetailedHTMLProps, FC } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as class_variance_authority_types12 from "class-variance-authority/types";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
import { LucideIcon } from "lucide-react";
|
|
5
5
|
|
|
@@ -65,13 +65,13 @@ declare enum ButtonTextAlign {
|
|
|
65
65
|
*/
|
|
66
66
|
declare const buttonVariants: (props?: {
|
|
67
67
|
size?: "md" | "sm" | "lg" | "xl" | "icon-sm" | "icon-md" | "icon-lg" | "icon-xl";
|
|
68
|
-
color?: "
|
|
69
|
-
variant?: "
|
|
68
|
+
color?: "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "text" | "text-inverse" | "error" | "success" | "custom";
|
|
69
|
+
variant?: "default" | "invisible-link" | "hoverable" | "none" | "input" | "link" | "outline";
|
|
70
70
|
textAlign?: "left" | "right" | "center";
|
|
71
71
|
isFullWidth?: boolean;
|
|
72
72
|
hasIconLeft?: boolean;
|
|
73
73
|
hasIconRight?: boolean;
|
|
74
|
-
} &
|
|
74
|
+
} & class_variance_authority_types12.ClassProp) => string;
|
|
75
75
|
/**
|
|
76
76
|
* Enhanced Button component props with comprehensive type safety and accessibility features
|
|
77
77
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","names":[],"sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAQY,aAAA,UAAA;EAcA,EAAA,GAAA,IAAA;EA8BA,EAAA,GAAA,IAAA;EAaA,EAAA,GAAA,IAAA;EAiBA,EAAA,GAAA,IAAA;EASN,OAAA,GAAA,SAyFL;EAKW,OAAA,GAAA,SAAW;EACA,OAAA,GAAA,SAAA;EAArB,OAAA,GAAA,SAAA;;;;;AAaS,aAjLC,kBAAA;EAiLI,IAAA,GAAA,MAAA;EAKA,KAAA,GAAA,OAAA;;;AA8FhB;;aAtPY,aAAA;;;;;;;;;;;;aAaA,WAAA;;;;;;;;;;;;;;;;aAiBA,eAAA;;;;;;;;cASN;;;;;;;;IAyFL
|
|
1
|
+
{"version":3,"file":"Button.d.ts","names":[],"sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAQY,aAAA,UAAA;EAcA,EAAA,GAAA,IAAA;EA8BA,EAAA,GAAA,IAAA;EAaA,EAAA,GAAA,IAAA;EAiBA,EAAA,GAAA,IAAA;EASN,OAAA,GAAA,SAyFL;EAKW,OAAA,GAAA,SAAW;EACA,OAAA,GAAA,SAAA;EAArB,OAAA,GAAA,SAAA;;;;;AAaS,aAjLC,kBAAA;EAiLI,IAAA,GAAA,MAAA;EAKA,KAAA,GAAA,OAAA;;;AA8FhB;;aAtPY,aAAA;;;;;;;;;;;;aAaA,WAAA;;;;;;;;;;;;;;;;aAiBA,eAAA;;;;;;;;cASN;;;;;;;;IAyFL,gCAAA,CAAA;;;;KAKW,WAAA,GAAc,kBACxB,qBAAqB,oBACrB,qBAEA,oBAAoB;;;;;;;;;SAUX,KAAK;;;;cAKA,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8FR,QAAQ,GAAG"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { FC, HTMLAttributes, ReactNode } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as class_variance_authority_types11 from "class-variance-authority/types";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
|
|
5
5
|
//#region src/components/CollapsibleTable/CollapsibleTable.d.ts
|
|
6
6
|
declare const collapsibleTableVariants: (props?: {
|
|
7
|
-
size?: "
|
|
8
|
-
variant?: "
|
|
9
|
-
spacing?: "
|
|
10
|
-
} &
|
|
7
|
+
size?: "sm" | "md" | "lg" | "xl" | "full";
|
|
8
|
+
variant?: "dark" | "default" | "ghost" | "outlined";
|
|
9
|
+
spacing?: "sm" | "md" | "lg" | "none" | "auto";
|
|
10
|
+
} & class_variance_authority_types11.ClassProp) => string;
|
|
11
11
|
interface CollapsibleTableProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, VariantProps<typeof collapsibleTableVariants> {
|
|
12
12
|
/** Table title displayed in the header */
|
|
13
13
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsibleTable.d.ts","names":[],"sources":["../../../../src/components/CollapsibleTable/CollapsibleTable.tsx"],"sourcesContent":[],"mappings":";;;;;cASM,gCA8EJ;;;EA9EI,OAAA,CAAA,EAAA,
|
|
1
|
+
{"version":3,"file":"CollapsibleTable.d.ts","names":[],"sources":["../../../../src/components/CollapsibleTable/CollapsibleTable.tsx"],"sourcesContent":[],"mappings":";;;;;cASM,gCA8EJ;;;EA9EI,OAAA,CAAA,EAAA,IAAA,GAAA,IAAA,GAAA,IA+BL,GAAA,MAAA,GAAA,MAAA;AA8CD,CAAA,GA9CC,gCAAA,CAAA,SA+CC,EAAA,GAAA,MAAA;AAA4B,UADb,qBAAA,SACP,IAAoB,CAAf,cAAe,CAAA,cAAA,CAAA,EAAA,OAAA,CAAA,EAC1B,YAD0B,CAAA,OACN,wBADM,CAAA,CAAA;EAAf;EACS,KAAA,EAAA,MAAA;EAIhB;EAsBO,IAAA,EAtBP,MAsBO,CAAA,MAAA,EAAA,OAAA,CAAA,EAAA;EAUW;EAA4B,SAAA,CAAA,EAAA,MAAA;EAFlC;EAnCV,eAAA,CAAA,EAAA,MAAA;EACN;EAAY,gBAAA,CAAA,EAAA,MAAA;EAoIH;;;;;;;;;;;;;;;eA1GE;;;;;;;;oBAQK,qCAEM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgGzC,kBAAkB,GAAG"}
|