@x15ventures/x15-ui-library 3.16.0 → 3.17.0
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/cjs/autoGenerated/libraryThemes.js +12 -12
- package/dist/cjs/autoGenerated/libraryThemes.js.map +1 -1
- package/dist/cjs/autoGenerated/libraryThemes.json +12 -12
- package/dist/cjs/components/design/dialog/Dialog.js +3 -1
- package/dist/cjs/components/design/dialog/Dialog.js.map +1 -1
- package/dist/cjs/components/design/dialog/dialog.css +5 -0
- package/dist/cjs/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.js +88 -0
- package/dist/cjs/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.js.map +1 -0
- package/dist/cjs/components/design/progressIndicators/circularProgressIndicator/circularProgressIndicator.css +301 -0
- package/dist/cjs/components/design/skeleton/skeleton.css +17 -12
- package/dist/cjs/components/design/tooltip/Tooltip.js +42 -5
- package/dist/cjs/components/design/tooltip/Tooltip.js.map +1 -1
- package/dist/cjs/components/design/tooltip/index.js +6 -0
- package/dist/cjs/components/design/tooltip/index.js.map +1 -1
- package/dist/cjs/components/design/tooltip/tooltip.css +18 -7
- package/dist/cjs/components/index.js +7 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/hooks/InteractiveHostFocus.js +62 -0
- package/dist/cjs/hooks/InteractiveHostFocus.js.map +1 -0
- package/dist/cjs/hooks/index.js +7 -0
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/cjs/index.js +22 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/styles/index.css +7 -3
- package/dist/cjs/styles/variables/cssVars/_darkModeVariables.css +2 -0
- package/dist/cjs/styles/variables/cssVars/_designVariables.css +5 -3
- package/dist/cjs/widgets/index.js +14 -0
- package/dist/cjs/widgets/index.js.map +1 -0
- package/dist/cjs/widgets/processLauncher/ProcessLauncher.js +278 -0
- package/dist/cjs/widgets/processLauncher/ProcessLauncher.js.map +1 -0
- package/dist/cjs/widgets/processLauncher/index.js +13 -0
- package/dist/cjs/widgets/processLauncher/index.js.map +1 -0
- package/dist/cjs/widgets/processLauncher/processLauncher.interfaces.js +6 -0
- package/dist/cjs/widgets/processLauncher/processLauncher.interfaces.js.map +1 -0
- package/dist/components/design/dialog/Dialog.d.ts.map +1 -1
- package/dist/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.d.ts +17 -0
- package/dist/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.d.ts.map +1 -0
- package/dist/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.test.d.ts +5 -0
- package/dist/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.test.d.ts.map +1 -0
- package/dist/components/design/tooltip/Tooltip.d.ts +13 -0
- package/dist/components/design/tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/design/tooltip/Tooltip.test.d.ts +1 -1
- package/dist/components/design/tooltip/Tooltip.test.d.ts.map +1 -1
- package/dist/components/design/tooltip/index.d.ts +1 -1
- package/dist/components/design/tooltip/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/esm/autoGenerated/libraryThemes.js +12 -12
- package/dist/esm/autoGenerated/libraryThemes.js.map +1 -1
- package/dist/esm/autoGenerated/libraryThemes.json +12 -12
- package/dist/esm/components/design/dialog/Dialog.js +3 -1
- package/dist/esm/components/design/dialog/Dialog.js.map +1 -1
- package/dist/esm/components/design/dialog/dialog.css +5 -0
- package/dist/esm/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.js +81 -0
- package/dist/esm/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.js.map +1 -0
- package/dist/esm/components/design/progressIndicators/circularProgressIndicator/circularProgressIndicator.css +301 -0
- package/dist/esm/components/design/skeleton/skeleton.css +17 -12
- package/dist/esm/components/design/tooltip/Tooltip.js +40 -4
- package/dist/esm/components/design/tooltip/Tooltip.js.map +1 -1
- package/dist/esm/components/design/tooltip/index.js +1 -1
- package/dist/esm/components/design/tooltip/index.js.map +1 -1
- package/dist/esm/components/design/tooltip/tooltip.css +18 -7
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/hooks/InteractiveHostFocus.js +56 -0
- package/dist/esm/hooks/InteractiveHostFocus.js.map +1 -0
- package/dist/esm/hooks/index.js +1 -0
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/esm/index.js +3 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/esm/styles/index.css +7 -3
- package/dist/esm/styles/variables/cssVars/_darkModeVariables.css +2 -0
- package/dist/esm/styles/variables/cssVars/_designVariables.css +5 -3
- package/dist/esm/widgets/index.js +4 -0
- package/dist/esm/widgets/index.js.map +1 -0
- package/dist/esm/widgets/processLauncher/ProcessLauncher.js +269 -0
- package/dist/esm/widgets/processLauncher/ProcessLauncher.js.map +1 -0
- package/dist/esm/widgets/processLauncher/index.js +2 -0
- package/dist/esm/widgets/processLauncher/index.js.map +1 -0
- package/dist/esm/widgets/processLauncher/processLauncher.interfaces.js +2 -0
- package/dist/esm/widgets/processLauncher/processLauncher.interfaces.js.map +1 -0
- package/dist/hooks/InteractiveHostFocus.d.ts +12 -0
- package/dist/hooks/InteractiveHostFocus.d.ts.map +1 -0
- package/dist/hooks/InteractiveHostFocus.test.d.ts +5 -0
- package/dist/hooks/InteractiveHostFocus.test.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/package.json +1 -1
- package/dist/widgets/index.d.ts +3 -0
- package/dist/widgets/index.d.ts.map +1 -0
- package/dist/widgets/processLauncher/ProcessLauncher.d.ts +21 -0
- package/dist/widgets/processLauncher/ProcessLauncher.d.ts.map +1 -0
- package/dist/widgets/processLauncher/ProcessLauncher.test.d.ts +5 -0
- package/dist/widgets/processLauncher/ProcessLauncher.test.d.ts.map +1 -0
- package/dist/widgets/processLauncher/index.d.ts +4 -0
- package/dist/widgets/processLauncher/index.d.ts.map +1 -0
- package/dist/widgets/processLauncher/processLauncher.interfaces.d.ts +45 -0
- package/dist/widgets/processLauncher/processLauncher.interfaces.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
.skeletonBar {
|
|
12
12
|
inline-size: 100%;
|
|
13
13
|
block-size: var(--skeletonHeight, var(--skeletonLineHeight, 1em));
|
|
14
|
-
background-color: var(--skeletonBg, #
|
|
14
|
+
background-color: var(--skeletonBg, #e5ebef);
|
|
15
15
|
border-radius: var(--skeletonBorderRadius, 3px);
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -53,34 +53,39 @@
|
|
|
53
53
|
position: absolute;
|
|
54
54
|
inset: 0;
|
|
55
55
|
transform: translateX(-100%);
|
|
56
|
-
background-image: linear-gradient(90deg, transparent
|
|
57
|
-
animation: skeletonWave var(--skeletonAnimationDuration,
|
|
56
|
+
background-image: linear-gradient(90deg, transparent 20%, var(--skeletonHighlight, #ffffff) 50%, transparent 80%);
|
|
57
|
+
animation: skeletonWave var(--skeletonAnimationDuration, 2s) ease-in-out infinite;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.skeleton_pulse .skeletonBar {
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
animation: skeletonPulse var(--skeletonAnimationDuration, 2s) ease-in-out infinite;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.skeleton_pulse.skeleton_opaque .skeletonBar {
|
|
65
|
+
animation-name: skeletonPulseOpaque;
|
|
63
66
|
}
|
|
64
67
|
|
|
65
68
|
@keyframes skeletonWave {
|
|
66
|
-
|
|
69
|
+
60%, 100% {
|
|
67
70
|
transform: translateX(100%);
|
|
68
71
|
}
|
|
69
72
|
}
|
|
70
73
|
@keyframes skeletonPulse {
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
50% {
|
|
75
|
+
background-color: var(--skeletonPulseBg, #ffffff);
|
|
73
76
|
}
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
}
|
|
78
|
+
@keyframes skeletonPulseOpaque {
|
|
79
|
+
50% {
|
|
80
|
+
background-color: var(--skeletonOpaquePulseBg, #f6f8fa);
|
|
76
81
|
}
|
|
77
82
|
}
|
|
78
83
|
@media (prefers-reduced-motion: reduce) {
|
|
79
84
|
.skeleton_wave .skeletonBar::after {
|
|
80
85
|
display: none;
|
|
81
86
|
}
|
|
82
|
-
.skeleton_pulse .skeletonBar
|
|
87
|
+
.skeleton_pulse .skeletonBar,
|
|
88
|
+
.skeleton_pulse.skeleton_opaque .skeletonBar {
|
|
83
89
|
animation: none;
|
|
84
|
-
opacity: 1;
|
|
85
90
|
}
|
|
86
91
|
}
|
|
@@ -5,10 +5,12 @@ import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
|
5
5
|
import { useOnClickOutside } from '../../../hooks/ClickOutside';
|
|
6
6
|
import { Icon } from '../icons/basicIcon/Icon';
|
|
7
7
|
import { useOnEdgeProximityDetect } from '../../../hooks/EdgeProximityDetect';
|
|
8
|
+
import { useOnInteractiveHostFocus } from '../../../hooks/InteractiveHostFocus';
|
|
8
9
|
import './tooltip.css';
|
|
9
10
|
|
|
10
11
|
// Define the props for Tooltip
|
|
11
12
|
|
|
13
|
+
export const getTooltipContentId = triggerId => `${triggerId}_content`;
|
|
12
14
|
export const Tooltip = props => {
|
|
13
15
|
const {
|
|
14
16
|
triggerId,
|
|
@@ -19,7 +21,8 @@ export const Tooltip = props => {
|
|
|
19
21
|
children,
|
|
20
22
|
label = 'Toggle tooltip open state',
|
|
21
23
|
showPointer = true,
|
|
22
|
-
hoverDelay
|
|
24
|
+
hoverDelay,
|
|
25
|
+
passiveTrigger = false
|
|
23
26
|
// visualIndicators will be handled below
|
|
24
27
|
} = props;
|
|
25
28
|
|
|
@@ -81,7 +84,13 @@ export const Tooltip = props => {
|
|
|
81
84
|
onMouseEnter: handleMouseEnter,
|
|
82
85
|
onMouseLeave: handleMouseLeave
|
|
83
86
|
} : {};
|
|
84
|
-
|
|
87
|
+
|
|
88
|
+
// Passive mode closes on host blur; focusin on the host would otherwise count as "outside".
|
|
89
|
+
useOnClickOutside(tooltipElement, () => {
|
|
90
|
+
if (!passiveTrigger) {
|
|
91
|
+
dismiss();
|
|
92
|
+
}
|
|
93
|
+
});
|
|
85
94
|
useOnEdgeProximityDetect({
|
|
86
95
|
triggerRef: triggerElement,
|
|
87
96
|
wrapperRef: tooltipElement,
|
|
@@ -97,12 +106,39 @@ export const Tooltip = props => {
|
|
|
97
106
|
}, [dismiss]);
|
|
98
107
|
useEffect(() => {
|
|
99
108
|
const wrapper = tooltipElement.current;
|
|
100
|
-
if (!wrapper) {
|
|
109
|
+
if (!wrapper || passiveTrigger) {
|
|
101
110
|
return undefined;
|
|
102
111
|
}
|
|
103
112
|
wrapper.addEventListener('keydown', handleSpecialKeyPresses);
|
|
104
113
|
return () => wrapper.removeEventListener('keydown', handleSpecialKeyPresses);
|
|
105
|
-
}, [handleSpecialKeyPresses]);
|
|
114
|
+
}, [handleSpecialKeyPresses, passiveTrigger]);
|
|
115
|
+
|
|
116
|
+
// Passive triggers can't take focus, so open/close follows focus of the interactive host instead.
|
|
117
|
+
const {
|
|
118
|
+
isDismissed
|
|
119
|
+
} = useOnInteractiveHostFocus({
|
|
120
|
+
wrapperRef: tooltipElement,
|
|
121
|
+
setIsOpen,
|
|
122
|
+
enabled: passiveTrigger
|
|
123
|
+
});
|
|
124
|
+
const triggerIcon = iconIsElement ? icon : /*#__PURE__*/React.createElement(Icon, {
|
|
125
|
+
icon: icon.toString()
|
|
126
|
+
});
|
|
127
|
+
if (passiveTrigger) {
|
|
128
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
129
|
+
ref: tooltipElement,
|
|
130
|
+
className: `tooltip passive ${isOpen ? 'isOpen' : ''} ${isDismissed ? 'isDismissed' : ''} ${customCssClass || ''}`
|
|
131
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
132
|
+
ref: triggerElement,
|
|
133
|
+
className: "icon_only",
|
|
134
|
+
"aria-hidden": "true"
|
|
135
|
+
}, triggerIcon), /*#__PURE__*/React.createElement("span", {
|
|
136
|
+
role: "tooltip",
|
|
137
|
+
ref: contentElement,
|
|
138
|
+
className: `content ${showPointer ? 'showPointer' : ''}`,
|
|
139
|
+
id: getTooltipContentId(triggerId)
|
|
140
|
+
}, children));
|
|
141
|
+
}
|
|
106
142
|
if (containsBlockElements) {
|
|
107
143
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
108
144
|
role: "tooltip",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","names":["_extends","React","useState","useRef","useEffect","useCallback","useOnClickOutside","Icon","useOnEdgeProximityDetect","Tooltip","props","triggerId","triggerStyle","icon","customCssClass","containsBlockElements","children","label","showPointer","hoverDelay","visualIndicators","underline","colouredText","undefined","isOpen","setIsOpen","isHovered","setIsHovered","tooltipElement","triggerElement","contentElement","hoverTimer","iconIsElement","isValidElement","hasHoverDelay","isVisible","clearHoverTimer","current","clearTimeout","handleMouseEnter","setTimeout","handleMouseLeave","dismiss","handleTriggerClick","hoverHandlers","onMouseEnter","onMouseLeave","triggerRef","wrapperRef","contentRef","requiresRecalc","handleSpecialKeyPresses","event","key","keyCode","wrapper","addEventListener","removeEventListener","createElement","role","ref","className","type","onClick","toString","id"],"sources":["../../../../../src/components/design/tooltip/Tooltip.tsx"],"sourcesContent":["'use client';\n\nimport React, { useState, useRef, useEffect, useCallback, ReactNode, ReactElement } from 'react';\nimport { useOnClickOutside } from '../../../hooks/ClickOutside';\nimport { Icon } from '../icons/basicIcon/Icon';\nimport { useOnEdgeProximityDetect } from '../../../hooks/EdgeProximityDetect';\nimport './tooltip.scss';\n\n// Define the props for Tooltip\nexport type TooltipProps =\n {\n triggerId?: string;\n icon?: ReactElement | string;\n customCssClass?: string;\n children: ReactNode;\n containsBlockElements?: boolean;\n triggerStyle?: 'icon';\n label?: string | ReactNode;\n showPointer?: boolean;\n hoverDelay?: number;\n }\n | {\n triggerId?: string;\n icon?: ReactElement | string;\n customCssClass?: string;\n children: ReactNode;\n containsBlockElements?: boolean;\n triggerStyle: 'text';\n label?: string | ReactNode;\n showPointer?: boolean;\n hoverDelay?: number;\n visualIndicators?: { underline?: boolean; colouredText?: boolean };\n };\n\nexport const Tooltip: React.FC<TooltipProps> = (props) => {\n const {\n triggerId,\n triggerStyle = 'icon',\n icon = 'info',\n customCssClass,\n containsBlockElements = false,\n children,\n label = 'Toggle tooltip open state',\n showPointer = true,\n hoverDelay,\n // visualIndicators will be handled below\n } = props as any;\n\n // Only use visualIndicators if triggerStyle is 'text'\n const visualIndicators =\n triggerStyle === 'text'\n ? (props as { visualIndicators?: { underline?: boolean; colouredText?: boolean } }).visualIndicators ?? { underline: true, colouredText: true }\n : undefined;\n const [isOpen, setIsOpen] = useState(false);\n const [isHovered, setIsHovered] = useState(false);\n const tooltipElement = useRef<HTMLDivElement | HTMLSpanElement>(null);\n const triggerElement = useRef<HTMLButtonElement>(null);\n const contentElement = useRef<HTMLDivElement | HTMLSpanElement>(null);\n const hoverTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const iconIsElement = React.isValidElement(icon);\n\n // Hover is handled in css by default. It is only taken over by js when a delay is requested.\n const hasHoverDelay = typeof hoverDelay === 'number' && hoverDelay > 0;\n const isVisible = isOpen || isHovered;\n\n const clearHoverTimer = useCallback(() => {\n if (hoverTimer.current) {\n clearTimeout(hoverTimer.current);\n hoverTimer.current = null;\n }\n }, []);\n\n const handleMouseEnter = useCallback(() => {\n clearHoverTimer();\n hoverTimer.current = setTimeout(() => setIsHovered(true), hoverDelay);\n }, [clearHoverTimer, hoverDelay]);\n\n const handleMouseLeave = useCallback(() => {\n clearHoverTimer();\n setIsHovered(false);\n }, [clearHoverTimer]);\n\n // Single dismissal path, so every close route clears both the click and hover state\n const dismiss = useCallback(() => {\n clearHoverTimer();\n setIsHovered(false);\n setIsOpen(false);\n }, [clearHoverTimer]);\n\n const handleTriggerClick = useCallback(() => {\n if (isVisible) {\n dismiss();\n return;\n }\n clearHoverTimer();\n setIsOpen(true);\n }, [isVisible, dismiss, clearHoverTimer]);\n\n // Releasing the delay detaches the mouse handlers, so reset any hover state they left behind\n useEffect(() => {\n if (!hasHoverDelay) {\n clearHoverTimer();\n setIsHovered(false);\n }\n }, [hasHoverDelay, clearHoverTimer]);\n\n useEffect(() => clearHoverTimer, [clearHoverTimer]);\n\n const hoverHandlers = hasHoverDelay\n ? { onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }\n : {};\n\n useOnClickOutside(tooltipElement, dismiss);\n\n useOnEdgeProximityDetect({\n triggerRef: triggerElement,\n wrapperRef: tooltipElement,\n contentRef: contentElement,\n requiresRecalc: isVisible,\n });\n\n // Handle special key presses\n const handleSpecialKeyPresses = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === 'Escape' || event.keyCode === 27) {\n dismiss();\n }\n },\n [dismiss],\n );\n\n useEffect(() => {\n const wrapper = tooltipElement.current;\n if (!wrapper) {\n return undefined;\n }\n wrapper.addEventListener('keydown', handleSpecialKeyPresses as EventListener);\n return () => wrapper.removeEventListener('keydown', handleSpecialKeyPresses as EventListener);\n }, [handleSpecialKeyPresses]);\n\n if (containsBlockElements) {\n return (\n <div\n role=\"tooltip\"\n ref={ tooltipElement as React.RefObject<HTMLDivElement> }\n className={ `tooltip tooltip_block ${ isVisible ? 'isOpen' : '' } ${ hasHoverDelay ? 'hoverDelayed' : '' } ${ triggerStyle === 'text' ? 'textDisplay' : '' } ${ customCssClass || '' }` }\n { ...hoverHandlers }\n >\n <button\n ref={ triggerElement }\n type=\"button\"\n onClick={ handleTriggerClick }\n className={ `button ${ triggerStyle === 'text' ? 'text_only' : 'icon_only' } ${ triggerStyle === 'text' && !visualIndicators?.underline ? 'underline_off' : '' } ${ triggerStyle === 'text' && !visualIndicators?.colouredText ? 'colouredText_off' : '' }` }\n { ...(triggerId ? { 'id': triggerId, 'aria-describedby': `${ triggerId }_content` } : {}) }\n { ...(triggerStyle === 'icon' ? { 'aria-label': typeof label === 'string' ? label : undefined } : {}) }\n >\n { triggerStyle === 'icon' && (iconIsElement ? icon : <Icon icon={ icon.toString() } />) }\n { triggerStyle === 'text' && <span className=\"labelText\">{ label }</span> }\n </button>\n <div\n ref={ contentElement as React.RefObject<HTMLDivElement> }\n className={ `content ${ showPointer ? 'showPointer' : '' }` }\n { ...(triggerId ? { id: `${ triggerId }_content` } : {}) }\n >\n { children }\n </div>\n </div>\n );\n }\n\n return (\n <span\n ref={ tooltipElement as React.RefObject<HTMLSpanElement> }\n className={ `tooltip ${ isVisible ? 'isOpen' : '' } ${ hasHoverDelay ? 'hoverDelayed' : '' } ${ triggerStyle === 'text' ? 'textDisplay' : '' } ${ customCssClass || '' }` }\n { ...hoverHandlers }\n >\n <button\n ref={ triggerElement }\n type=\"button\"\n onClick={ handleTriggerClick }\n className={ `button ${ triggerStyle === 'text' ? 'text_only' : 'icon_only' } ${ triggerStyle === 'text' && !visualIndicators?.underline ? 'underline_off' : '' } ${ triggerStyle === 'text' && !visualIndicators?.colouredText ? 'colouredText_off' : '' }` }\n { ...(triggerId ? { id: triggerId } : {}) }\n { ...(triggerStyle === 'icon' ? { 'aria-label': typeof label === 'string' ? label : undefined } : {}) }\n >\n { triggerStyle === 'icon' && (iconIsElement ? icon : <Icon icon={ icon.toString() } />) }\n { triggerStyle === 'text' && <span className=\"labelText\">{ label }</span> }\n </button>\n <span\n aria-hidden\n role=\"presentation\"\n ref={ contentElement as React.RefObject<HTMLSpanElement> }\n className={ `content ${ showPointer ? 'showPointer' : '' }` }\n { ...(triggerId ? { id: `${ triggerId }_content` } : {}) }\n >\n { children }\n </span>\n </span>\n );\n};\n\nexport default Tooltip;\n"],"mappings":"AAAA,YAAY;;AAAC,OAAAA,QAAA;AAEb,OAA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CACF,CAAC;AAEX,CAAC;AAED,eAAeP,OAAO","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Tooltip.js","names":["_extends","React","useState","useRef","useEffect","useCallback","useOnClickOutside","Icon","useOnEdgeProximityDetect","useOnInteractiveHostFocus","getTooltipContentId","triggerId","Tooltip","props","triggerStyle","icon","customCssClass","containsBlockElements","children","label","showPointer","hoverDelay","passiveTrigger","visualIndicators","underline","colouredText","undefined","isOpen","setIsOpen","isHovered","setIsHovered","tooltipElement","triggerElement","contentElement","hoverTimer","iconIsElement","isValidElement","hasHoverDelay","isVisible","clearHoverTimer","current","clearTimeout","handleMouseEnter","setTimeout","handleMouseLeave","dismiss","handleTriggerClick","hoverHandlers","onMouseEnter","onMouseLeave","triggerRef","wrapperRef","contentRef","requiresRecalc","handleSpecialKeyPresses","event","key","keyCode","wrapper","addEventListener","removeEventListener","isDismissed","enabled","triggerIcon","createElement","toString","ref","className","role","id","type","onClick"],"sources":["../../../../../src/components/design/tooltip/Tooltip.tsx"],"sourcesContent":["'use client';\n\nimport React, { useState, useRef, useEffect, useCallback, ReactNode, ReactElement } from 'react';\nimport { useOnClickOutside } from '../../../hooks/ClickOutside';\nimport { Icon } from '../icons/basicIcon/Icon';\nimport { useOnEdgeProximityDetect } from '../../../hooks/EdgeProximityDetect';\nimport { useOnInteractiveHostFocus } from '../../../hooks/InteractiveHostFocus';\nimport './tooltip.scss';\n\n// Define the props for Tooltip\nexport type TooltipProps =\n {\n triggerId?: string;\n icon?: ReactElement | string;\n customCssClass?: string;\n children: ReactNode;\n containsBlockElements?: boolean;\n triggerStyle?: 'icon';\n label?: string | ReactNode;\n showPointer?: boolean;\n hoverDelay?: number;\n passiveTrigger?: false;\n }\n | {\n /**\n * Renders a non-focusable trigger for use inside another interactive element (e.g. a button).\n */\n passiveTrigger: true;\n triggerId: string;\n icon?: ReactElement | string;\n customCssClass?: string;\n children: ReactNode;\n showPointer?: boolean;\n }\n | {\n triggerId?: string;\n icon?: ReactElement | string;\n customCssClass?: string;\n children: ReactNode;\n containsBlockElements?: boolean;\n triggerStyle: 'text';\n label?: string | ReactNode;\n showPointer?: boolean;\n hoverDelay?: number;\n visualIndicators?: { underline?: boolean; colouredText?: boolean };\n passiveTrigger?: false;\n };\n\nexport const getTooltipContentId = (triggerId: string) => `${ triggerId }_content`;\n\nexport const Tooltip: React.FC<TooltipProps> = (props) => {\n const {\n triggerId,\n triggerStyle = 'icon',\n icon = 'info',\n customCssClass,\n containsBlockElements = false,\n children,\n label = 'Toggle tooltip open state',\n showPointer = true,\n hoverDelay,\n passiveTrigger = false,\n // visualIndicators will be handled below\n } = props as any;\n\n // Only use visualIndicators if triggerStyle is 'text'\n const visualIndicators =\n triggerStyle === 'text'\n ? (props as { visualIndicators?: { underline?: boolean; colouredText?: boolean } }).visualIndicators ?? { underline: true, colouredText: true }\n : undefined;\n const [isOpen, setIsOpen] = useState(false);\n const [isHovered, setIsHovered] = useState(false);\n const tooltipElement = useRef<HTMLDivElement | HTMLSpanElement>(null);\n const triggerElement = useRef<HTMLButtonElement | HTMLSpanElement>(null);\n const contentElement = useRef<HTMLDivElement | HTMLSpanElement>(null);\n const hoverTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const iconIsElement = React.isValidElement(icon);\n\n // Hover is handled in css by default. It is only taken over by js when a delay is requested.\n const hasHoverDelay = typeof hoverDelay === 'number' && hoverDelay > 0;\n const isVisible = isOpen || isHovered;\n\n const clearHoverTimer = useCallback(() => {\n if (hoverTimer.current) {\n clearTimeout(hoverTimer.current);\n hoverTimer.current = null;\n }\n }, []);\n\n const handleMouseEnter = useCallback(() => {\n clearHoverTimer();\n hoverTimer.current = setTimeout(() => setIsHovered(true), hoverDelay);\n }, [clearHoverTimer, hoverDelay]);\n\n const handleMouseLeave = useCallback(() => {\n clearHoverTimer();\n setIsHovered(false);\n }, [clearHoverTimer]);\n\n // Single dismissal path, so every close route clears both the click and hover state\n const dismiss = useCallback(() => {\n clearHoverTimer();\n setIsHovered(false);\n setIsOpen(false);\n }, [clearHoverTimer]);\n\n const handleTriggerClick = useCallback(() => {\n if (isVisible) {\n dismiss();\n return;\n }\n clearHoverTimer();\n setIsOpen(true);\n }, [isVisible, dismiss, clearHoverTimer]);\n\n // Releasing the delay detaches the mouse handlers, so reset any hover state they left behind\n useEffect(() => {\n if (!hasHoverDelay) {\n clearHoverTimer();\n setIsHovered(false);\n }\n }, [hasHoverDelay, clearHoverTimer]);\n\n useEffect(() => clearHoverTimer, [clearHoverTimer]);\n\n const hoverHandlers = hasHoverDelay\n ? { onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }\n : {};\n\n // Passive mode closes on host blur; focusin on the host would otherwise count as \"outside\".\n useOnClickOutside(tooltipElement, () => {\n if (!passiveTrigger) {\n dismiss();\n }\n });\n\n useOnEdgeProximityDetect({\n triggerRef: triggerElement,\n wrapperRef: tooltipElement,\n contentRef: contentElement,\n requiresRecalc: isVisible,\n });\n\n // Handle special key presses\n const handleSpecialKeyPresses = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === 'Escape' || event.keyCode === 27) {\n dismiss();\n }\n },\n [dismiss],\n );\n\n useEffect(() => {\n const wrapper = tooltipElement.current;\n if (!wrapper || passiveTrigger) {\n return undefined;\n }\n wrapper.addEventListener('keydown', handleSpecialKeyPresses as EventListener);\n return () => wrapper.removeEventListener('keydown', handleSpecialKeyPresses as EventListener);\n }, [handleSpecialKeyPresses, passiveTrigger]);\n\n // Passive triggers can't take focus, so open/close follows focus of the interactive host instead.\n const { isDismissed } = useOnInteractiveHostFocus({\n wrapperRef: tooltipElement,\n setIsOpen,\n enabled: passiveTrigger,\n });\n\n const triggerIcon = iconIsElement ? icon : <Icon icon={ icon.toString() } />;\n\n if (passiveTrigger) {\n return (\n <span\n ref={ tooltipElement as React.RefObject<HTMLSpanElement> }\n className={ `tooltip passive ${ isOpen ? 'isOpen' : '' } ${ isDismissed ? 'isDismissed' : '' } ${ customCssClass || '' }` }\n >\n <span\n ref={ triggerElement as React.RefObject<HTMLSpanElement> }\n className=\"icon_only\"\n aria-hidden=\"true\"\n >\n { triggerIcon }\n </span>\n <span\n role=\"tooltip\"\n ref={ contentElement as React.RefObject<HTMLSpanElement> }\n className={ `content ${ showPointer ? 'showPointer' : '' }` }\n id={ getTooltipContentId(triggerId) }\n >\n { children }\n </span>\n </span>\n );\n }\n\n if (containsBlockElements) {\n return (\n <div\n role=\"tooltip\"\n ref={ tooltipElement as React.RefObject<HTMLDivElement> }\n className={ `tooltip tooltip_block ${ isVisible ? 'isOpen' : '' } ${ hasHoverDelay ? 'hoverDelayed' : '' } ${ triggerStyle === 'text' ? 'textDisplay' : '' } ${ customCssClass || '' }` }\n { ...hoverHandlers }\n >\n <button\n ref={ triggerElement as React.RefObject<HTMLButtonElement> }\n type=\"button\"\n onClick={ handleTriggerClick }\n className={ `button ${ triggerStyle === 'text' ? 'text_only' : 'icon_only' } ${ triggerStyle === 'text' && !visualIndicators?.underline ? 'underline_off' : '' } ${ triggerStyle === 'text' && !visualIndicators?.colouredText ? 'colouredText_off' : '' }` }\n { ...(triggerId ? { 'id': triggerId, 'aria-describedby': `${ triggerId }_content` } : {}) }\n { ...(triggerStyle === 'icon' ? { 'aria-label': typeof label === 'string' ? label : undefined } : {}) }\n >\n { triggerStyle === 'icon' && (iconIsElement ? icon : <Icon icon={ icon.toString() } />) }\n { triggerStyle === 'text' && <span className=\"labelText\">{ label }</span> }\n </button>\n <div\n ref={ contentElement as React.RefObject<HTMLDivElement> }\n className={ `content ${ showPointer ? 'showPointer' : '' }` }\n { ...(triggerId ? { id: `${ triggerId }_content` } : {}) }\n >\n { children }\n </div>\n </div>\n );\n }\n\n return (\n <span\n ref={ tooltipElement as React.RefObject<HTMLSpanElement> }\n className={ `tooltip ${ isVisible ? 'isOpen' : '' } ${ hasHoverDelay ? 'hoverDelayed' : '' } ${ triggerStyle === 'text' ? 'textDisplay' : '' } ${ customCssClass || '' }` }\n { ...hoverHandlers }\n >\n <button\n ref={ triggerElement as React.RefObject<HTMLButtonElement> }\n type=\"button\"\n onClick={ handleTriggerClick }\n className={ `button ${ triggerStyle === 'text' ? 'text_only' : 'icon_only' } ${ triggerStyle === 'text' && !visualIndicators?.underline ? 'underline_off' : '' } ${ triggerStyle === 'text' && !visualIndicators?.colouredText ? 'colouredText_off' : '' }` }\n { ...(triggerId ? { id: triggerId } : {}) }\n { ...(triggerStyle === 'icon' ? { 'aria-label': typeof label === 'string' ? label : undefined } : {}) }\n >\n { triggerStyle === 'icon' && (iconIsElement ? icon : <Icon icon={ icon.toString() } />) }\n { triggerStyle === 'text' && <span className=\"labelText\">{ label }</span> }\n </button>\n <span\n aria-hidden\n role=\"presentation\"\n ref={ contentElement as React.RefObject<HTMLSpanElement> }\n className={ `content ${ showPointer ? 'showPointer' : '' }` }\n { ...(triggerId ? { id: `${ triggerId }_content` } : {}) }\n >\n { children }\n </span>\n </span>\n );\n};\n\nexport default Tooltip;\n"],"mappings":"AAAA,YAAY;;AAAC,OAAAA,QAAA;AAEb,OAAOC,KAAK,IAAIC,QAAQ,EAAEC,MAAM,EAAEC,SAAS,EAAEC,WAAW,QAAiC,OAAO;AAChG,SAASC,iBAAiB,QAAQ,6BAA6B;AAC/D,SAASC,IAAI,QAAQ,yBAAyB;AAC9C,SAASC,wBAAwB,QAAQ,oCAAoC;AAC7E,SAASC,yBAAyB,QAAQ,qCAAqC;AAC/E,OAAO,gBAAgB;;AAEvB;;AAuCA,OAAO,MAAMC,mBAAmB,GAAIC,SAAiB,IAAK,GAAIA,SAAS,UAAW;AAElF,OAAO,MAAMC,OAA+B,GAAIC,KAAK,IAAK;EACxD,MAAM;IACJF,SAAS;IACTG,YAAY,GAAG,MAAM;IACrBC,IAAI,GAAG,MAAM;IACbC,cAAc;IACdC,qBAAqB,GAAG,KAAK;IAC7BC,QAAQ;IACRC,KAAK,GAAG,2BAA2B;IACnCC,WAAW,GAAG,IAAI;IAClBC,UAAU;IACVC,cAAc,GAAG;IACjB;EACF,CAAC,GAAGT,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,aAAa,GAAGpB,IAAI,gBAAGd,KAAA,CAAA+D,aAAA,CAACzD,IAAI;IAACQ,IAAI,EAAGA,IAAI,CAACkD,QAAQ,CAAC;EAAG,CAAE,CAAC,CAAC,EACrFnD,YAAY,KAAK,MAAM,iBAAIb,KAAA,CAAA+D,aAAA;IAAMG,SAAS,EAAC;EAAW,GAAGhD,KAAa,CAClE,CAAC,eACTlB,KAAA,CAAA+D,aAAA,SAAAhE,QAAA;IACE,mBAAW;IACXoE,IAAI,EAAC,cAAc;IACnBF,GAAG,EAAGjC,cAAoD;IAC1DkC,SAAS,EAAG,WAAY/C,WAAW,GAAG,aAAa,GAAG,EAAE;EAAK,GACvDT,SAAS,GAAG;IAAE0D,EAAE,EAAE,GAAI1D,SAAS;EAAY,CAAC,GAAG,CAAC,CAAC,GAErDO,QACE,CACF,CAAC;AAEX,CAAC;AAED,eAAeN,OAAO","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Tooltip","EllipsisTooltip"],"sources":["../../../../../src/components/design/tooltip/index.ts"],"sourcesContent":["export { Tooltip } from './Tooltip';\nexport type { TooltipProps } from './Tooltip';\n\nexport { EllipsisTooltip } from './ellipsisTooltip/EllipsisTooltip';\nexport type { EllipsisTooltipProps } from './ellipsisTooltip/EllipsisTooltip';\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,WAAW;
|
|
1
|
+
{"version":3,"file":"index.js","names":["Tooltip","getTooltipContentId","EllipsisTooltip"],"sources":["../../../../../src/components/design/tooltip/index.ts"],"sourcesContent":["export { Tooltip, getTooltipContentId } from './Tooltip';\nexport type { TooltipProps } from './Tooltip';\n\nexport { EllipsisTooltip } from './ellipsisTooltip/EllipsisTooltip';\nexport type { EllipsisTooltipProps } from './ellipsisTooltip/EllipsisTooltip';\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,mBAAmB,QAAQ,WAAW;AAGxD,SAASC,eAAe,QAAQ,mCAAmC","ignoreList":[]}
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
height: 1em;
|
|
7
7
|
margin: var(--tooltipMargin, 0 5px);
|
|
8
8
|
}
|
|
9
|
-
.tooltip > button.icon_only
|
|
9
|
+
.tooltip > button.icon_only,
|
|
10
|
+
.tooltip > span.icon_only {
|
|
10
11
|
background: none;
|
|
11
12
|
border: none;
|
|
12
13
|
border-radius: 100%;
|
|
@@ -20,12 +21,15 @@
|
|
|
20
21
|
left: 0;
|
|
21
22
|
top: -2px;
|
|
22
23
|
}
|
|
23
|
-
.tooltip > button.icon_only:hover
|
|
24
|
+
.tooltip > button.icon_only:hover,
|
|
25
|
+
.tooltip > span.icon_only:hover {
|
|
24
26
|
border: none;
|
|
25
27
|
background: none;
|
|
26
28
|
}
|
|
27
29
|
.tooltip > button.icon_only .icon,
|
|
28
|
-
.tooltip > button.icon_only svg[data-icon]
|
|
30
|
+
.tooltip > button.icon_only svg[data-icon],
|
|
31
|
+
.tooltip > span.icon_only .icon,
|
|
32
|
+
.tooltip > span.icon_only svg[data-icon] {
|
|
29
33
|
text-align: center;
|
|
30
34
|
height: var(--tooltipIconSize, 22px);
|
|
31
35
|
width: var(--tooltipIconSize, 22px);
|
|
@@ -34,26 +38,30 @@
|
|
|
34
38
|
align-items: center;
|
|
35
39
|
justify-content: center;
|
|
36
40
|
}
|
|
37
|
-
.tooltip > button.icon_only svg[data-icon]
|
|
41
|
+
.tooltip > button.icon_only svg[data-icon],
|
|
42
|
+
.tooltip > span.icon_only svg[data-icon] {
|
|
38
43
|
height: var(--tooltipSvgIconSize, 22px);
|
|
39
44
|
width: var(--tooltipSvgIconSize, 22px);
|
|
40
45
|
line-height: var(--tooltipSvgIconSize, 22px);
|
|
41
46
|
}
|
|
42
|
-
.tooltip > button.icon_only .icon
|
|
47
|
+
.tooltip > button.icon_only .icon,
|
|
48
|
+
.tooltip > span.icon_only .icon {
|
|
43
49
|
color: var(--tooltipIconFgColor, #222);
|
|
44
50
|
background: var(--tooltipIconBg, #c2d0d9);
|
|
45
51
|
border-radius: 100%;
|
|
46
52
|
border: var(--tooltipIconBorder, none);
|
|
47
53
|
line-height: normal;
|
|
48
54
|
}
|
|
49
|
-
.tooltip > button.icon_only .icon.icon-info:before
|
|
55
|
+
.tooltip > button.icon_only .icon.icon-info:before,
|
|
56
|
+
.tooltip > span.icon_only .icon.icon-info:before {
|
|
50
57
|
content: "i";
|
|
51
58
|
color: var(--tooltipIconFgColor, #222);
|
|
52
59
|
font-style: normal;
|
|
53
60
|
font-size: calc(var(--tooltipIconSize, 22px) - 4px);
|
|
54
61
|
font-weight: bold;
|
|
55
62
|
}
|
|
56
|
-
.tooltip > button.icon_only svg[data-icon]
|
|
63
|
+
.tooltip > button.icon_only svg[data-icon],
|
|
64
|
+
.tooltip > span.icon_only svg[data-icon] {
|
|
57
65
|
color: var(--tooltipIconBg, #c2d0d9);
|
|
58
66
|
}
|
|
59
67
|
.tooltip > button.text_only {
|
|
@@ -96,6 +104,9 @@
|
|
|
96
104
|
.tooltip:not(.hoverDelayed):hover .content, .tooltip.isOpen .content {
|
|
97
105
|
display: block;
|
|
98
106
|
}
|
|
107
|
+
.tooltip.isDismissed .content {
|
|
108
|
+
display: none;
|
|
109
|
+
}
|
|
99
110
|
.tooltip.measuring .content {
|
|
100
111
|
opacity: 1;
|
|
101
112
|
display: block;
|
|
@@ -19,6 +19,7 @@ export { Spinner } from './design/spinner/Spinner';
|
|
|
19
19
|
export { StatusIconButton } from './design/statusIndicators/statusIconButton/StatusIconButton';
|
|
20
20
|
export { StatusLight } from './design/statusIndicators/statusLight/StatusLight';
|
|
21
21
|
export { StatusLightsBar } from './design/statusIndicators/statusLightsBar/StatusLightsBar';
|
|
22
|
+
export { CircularProgressIndicator } from './design/progressIndicators/circularProgressIndicator/CircularProgressIndicator';
|
|
22
23
|
export { Tabs } from './design/tabs/Tabs';
|
|
23
24
|
export { Tooltip } from './design/tooltip/Tooltip';
|
|
24
25
|
export { EllipsisTooltip } from './design/tooltip/ellipsisTooltip/EllipsisTooltip';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Accordion","Chip","Pill","Badge","Dialog","HeaderBar","Icon","NotificationIcon","VentureLogo","CreditSavvyLogo","HomeInLogo","KitLogo","DoshiiLogo","TruyuLogo","SidePanel","Skeleton","Spinner","StatusIconButton","StatusLight","StatusLightsBar","Tabs","Tooltip","EllipsisTooltip","RevealMore","CopyText","Paginator","PageBanner","Banner","Alert","SimpleButton","Button","FormField","InputCheckbox","CheckboxInput","StyledRadioGroup","StyledRadioInput","StyledRadioLabel","HookFormWrapper","TextInput","EmailInput","FileInput","SearchInput","NumberInput","PhoneInput","UrlInput","PasswordInput","PasswordInputSignup","SelectDropdown","Combobox","Textarea","InputDate","DateInput","Card","ReportFooter","MainHeader","ThemeLoader","DevToolbar","ThemeSwitch","LoremIpsum","GlobalDashboard","Menu","PopupMenu","SearchPanelMenu","Link","TemplateForm","TemplateLoading","TemplateDashboard","TemplatePage","Select","Checkbox"],"sources":["../../../src/components/index.ts"],"sourcesContent":["'use client';\n\n// UI components\nexport { Accordion } from './design/accordion/Accordion';\nexport { Chip, Pill, Badge } from './design/chip/Chip';\nexport { Dialog } from './design/dialog/Dialog';\nexport { HeaderBar } from './design/headerBar/HeaderBar';\nexport { Icon } from './design/icons/basicIcon/Icon';\nexport { NotificationIcon } from './design/icons/notificationIcon/NotificationIcon';\nexport { VentureLogo } from './design/logos/VentureLogo';\n\nexport { CreditSavvyLogo } from './design/logos/ventures/credit-savvy-logo';\nexport { HomeInLogo } from './design/logos/ventures/home-in-logo';\nexport { KitLogo } from './design/logos/ventures/kit-logo';\nexport { DoshiiLogo } from './design/logos/ventures/doshii-logo';\nexport { TruyuLogo } from './design/logos/ventures/truyu-logo';\n\nexport { SidePanel } from './design/sidePanel/SidePanel';\nexport { Skeleton } from './design/skeleton/Skeleton';\nexport type { SkeletonProps } from './design/skeleton/Skeleton';\nexport { Spinner } from './design/spinner/Spinner';\nexport { StatusIconButton } from './design/statusIndicators/statusIconButton/StatusIconButton';\nexport { StatusLight } from './design/statusIndicators/statusLight/StatusLight';\nexport { StatusLightsBar } from './design/statusIndicators/statusLightsBar/StatusLightsBar';\nexport { Tabs } from './design/tabs/Tabs';\nexport { Tooltip } from './design/tooltip/Tooltip';\nexport { EllipsisTooltip } from './design/tooltip/ellipsisTooltip/EllipsisTooltip';\nexport { RevealMore } from './design/revealMore/RevealMore';\nexport { CopyText } from './design/copyText/CopyText';\nexport { Paginator } from './design/paginators/Paginator';\nexport { PageBanner, Banner, Alert } from './design/banners/pageBanner/PageBanner';\nexport type { PageBannerProps } from './design/banners/pageBanner/PageBanner';\n\n// Form components\nexport { SimpleButton, Button } from './form/buttons/SimpleButton';\nexport { FormField } from './form/formFields/formFieldWrapper/FormField';\nexport { InputCheckbox, CheckboxInput } from './form/formFields/subComponents/inputs/checkbox/InputCheckbox';\nexport { StyledRadioGroup } from './form/formFields/subComponents/inputs/radio/styled/StyledRadioGroup';\nexport { StyledRadioInput } from './form/formFields/subComponents/inputs/radio/styled/StyledRadioInput';\nexport { StyledRadioLabel } from './form/formFields/subComponents/inputs/radio/styled/StyledRadioLabel';\nexport { HookFormWrapper } from './form/hookFormWrapper/HookFormWrapper';\n\nexport {\n TextInput,\n EmailInput,\n FileInput,\n SearchInput,\n NumberInput,\n PhoneInput,\n UrlInput,\n PasswordInput,\n PasswordInputSignup,\n SelectDropdown,\n Combobox,\n Textarea\n} from './form/formFields/subComponents/InputVariants';\nexport type {\n FormComponentProps,\n DropdownSelectProps,\n PasswordInputProps\n} from './form/formFields/subComponents/InputVariants';\n\nexport {\n InputDate\n} from './form/formFields/subComponents/inputs/date/InputDate';\nexport { DateInput } from './form/formFields/subComponents/inputs/date/DateInput';\nexport type { StyledRadioGroupProps } from './form/formFields/subComponents/inputs/radio/radioInputsProps';\n\n// Layout\nexport { Card } from './design/card/Card';\nexport { ReportFooter } from './layout/footers/reports/ReportFooter';\nexport { MainHeader } from './layout/mainHeader/MainHeader';\n\nexport { ThemeLoader } from './design/themeLoader/ThemeLoader';\nexport type { ThemeStructure } from './design/themeLoader/ThemeLoader';\n\n// Testing\nexport { DevToolbar } from './testing/devToolbar/DevToolbar';\nexport { ThemeSwitch } from './testing/themeSwitch/ThemeSwitch';\nexport { LoremIpsum } from './testing/loremIpsum/LoremIpsum';\n\nexport { GlobalDashboard } from './layout/dashboard/layouts/globalDashboard/GlobalDashboard';\nexport { Menu } from './navigation/menu/Menu';\nexport { PopupMenu } from './navigation/popupMenu/PopupMenu';\nexport { SearchPanelMenu } from './navigation/searchPanelMenu/SearchPanelMenu';\nexport { Link } from './navigation/link/Link';\n\nexport type { MenuItemPropTypes, MenuButtonPropTypes, MenuItemIconStates } from './navigation/menu/Menu.interfaces';\n\n// Templates\nexport { TemplateForm } from './templates/templateForm/TemplateForm';\nexport type { TemplateFormProps } from './templates/templateForm/TemplateForm';\nexport { TemplateLoading } from './templates/templateLoading/TemplateLoading';\nexport type { TemplateLoadingProps } from './templates/templateLoading/TemplateLoading';\nexport { TemplateDashboard } from './templates/templateDashboard/TemplateDashboard';\nexport type { TemplateDashboardProps } from './templates/templateDashboard/TemplateDashboard';\nexport { TemplatePage } from './templates/templatePage/TemplatePage';\nexport type { TemplatePageProps } from './templates/templatePage/TemplatePage';\n\n// Aliases to match common libraries\nexport { SelectDropdown as Select } from './form/formFields/subComponents/InputVariants';\nexport { InputCheckbox as Checkbox } from './form/formFields/subComponents/inputs/checkbox/InputCheckbox';"],"mappings":"AAAA,YAAY;;AAEZ;AACA,SAASA,SAAS,QAAQ,8BAA8B;AACxD,SAASC,IAAI,EAAEC,IAAI,EAAEC,KAAK,QAAQ,oBAAoB;AACtD,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,SAAS,QAAQ,8BAA8B;AACxD,SAASC,IAAI,QAAQ,+BAA+B;AACpD,SAASC,gBAAgB,QAAQ,kDAAkD;AACnF,SAASC,WAAW,QAAQ,4BAA4B;AAExD,SAASC,eAAe,QAAQ,2CAA2C;AAC3E,SAASC,UAAU,QAAQ,sCAAsC;AACjE,SAASC,OAAO,QAAQ,kCAAkC;AAC1D,SAASC,UAAU,QAAQ,qCAAqC;AAChE,SAASC,SAAS,QAAQ,oCAAoC;AAE9D,SAASC,SAAS,QAAQ,8BAA8B;AACxD,SAASC,QAAQ,QAAQ,4BAA4B;AAErD,SAASC,OAAO,QAAQ,0BAA0B;
|
|
1
|
+
{"version":3,"file":"index.js","names":["Accordion","Chip","Pill","Badge","Dialog","HeaderBar","Icon","NotificationIcon","VentureLogo","CreditSavvyLogo","HomeInLogo","KitLogo","DoshiiLogo","TruyuLogo","SidePanel","Skeleton","Spinner","StatusIconButton","StatusLight","StatusLightsBar","CircularProgressIndicator","Tabs","Tooltip","EllipsisTooltip","RevealMore","CopyText","Paginator","PageBanner","Banner","Alert","SimpleButton","Button","FormField","InputCheckbox","CheckboxInput","StyledRadioGroup","StyledRadioInput","StyledRadioLabel","HookFormWrapper","TextInput","EmailInput","FileInput","SearchInput","NumberInput","PhoneInput","UrlInput","PasswordInput","PasswordInputSignup","SelectDropdown","Combobox","Textarea","InputDate","DateInput","Card","ReportFooter","MainHeader","ThemeLoader","DevToolbar","ThemeSwitch","LoremIpsum","GlobalDashboard","Menu","PopupMenu","SearchPanelMenu","Link","TemplateForm","TemplateLoading","TemplateDashboard","TemplatePage","Select","Checkbox"],"sources":["../../../src/components/index.ts"],"sourcesContent":["'use client';\n\n// UI components\nexport { Accordion } from './design/accordion/Accordion';\nexport { Chip, Pill, Badge } from './design/chip/Chip';\nexport { Dialog } from './design/dialog/Dialog';\nexport { HeaderBar } from './design/headerBar/HeaderBar';\nexport { Icon } from './design/icons/basicIcon/Icon';\nexport { NotificationIcon } from './design/icons/notificationIcon/NotificationIcon';\nexport { VentureLogo } from './design/logos/VentureLogo';\n\nexport { CreditSavvyLogo } from './design/logos/ventures/credit-savvy-logo';\nexport { HomeInLogo } from './design/logos/ventures/home-in-logo';\nexport { KitLogo } from './design/logos/ventures/kit-logo';\nexport { DoshiiLogo } from './design/logos/ventures/doshii-logo';\nexport { TruyuLogo } from './design/logos/ventures/truyu-logo';\n\nexport { SidePanel } from './design/sidePanel/SidePanel';\nexport { Skeleton } from './design/skeleton/Skeleton';\nexport type { SkeletonProps } from './design/skeleton/Skeleton';\nexport { Spinner } from './design/spinner/Spinner';\n\nexport { StatusIconButton } from './design/statusIndicators/statusIconButton/StatusIconButton';\nexport { StatusLight } from './design/statusIndicators/statusLight/StatusLight';\nexport { StatusLightsBar } from './design/statusIndicators/statusLightsBar/StatusLightsBar';\nexport { CircularProgressIndicator } from './design/progressIndicators/circularProgressIndicator/CircularProgressIndicator';\nexport type { CircularProgressIndicatorProps } from './design/progressIndicators/circularProgressIndicator/CircularProgressIndicator';\n\nexport { Tabs } from './design/tabs/Tabs';\nexport { Tooltip } from './design/tooltip/Tooltip';\nexport { EllipsisTooltip } from './design/tooltip/ellipsisTooltip/EllipsisTooltip';\nexport { RevealMore } from './design/revealMore/RevealMore';\nexport { CopyText } from './design/copyText/CopyText';\nexport { Paginator } from './design/paginators/Paginator';\nexport { PageBanner, Banner, Alert } from './design/banners/pageBanner/PageBanner';\nexport type { PageBannerProps } from './design/banners/pageBanner/PageBanner';\n\n// Form components\nexport { SimpleButton, Button } from './form/buttons/SimpleButton';\nexport { FormField } from './form/formFields/formFieldWrapper/FormField';\nexport { InputCheckbox, CheckboxInput } from './form/formFields/subComponents/inputs/checkbox/InputCheckbox';\nexport { StyledRadioGroup } from './form/formFields/subComponents/inputs/radio/styled/StyledRadioGroup';\nexport { StyledRadioInput } from './form/formFields/subComponents/inputs/radio/styled/StyledRadioInput';\nexport { StyledRadioLabel } from './form/formFields/subComponents/inputs/radio/styled/StyledRadioLabel';\nexport { HookFormWrapper } from './form/hookFormWrapper/HookFormWrapper';\n\nexport {\n TextInput,\n EmailInput,\n FileInput,\n SearchInput,\n NumberInput,\n PhoneInput,\n UrlInput,\n PasswordInput,\n PasswordInputSignup,\n SelectDropdown,\n Combobox,\n Textarea\n} from './form/formFields/subComponents/InputVariants';\nexport type {\n FormComponentProps,\n DropdownSelectProps,\n PasswordInputProps\n} from './form/formFields/subComponents/InputVariants';\n\nexport {\n InputDate\n} from './form/formFields/subComponents/inputs/date/InputDate';\nexport { DateInput } from './form/formFields/subComponents/inputs/date/DateInput';\nexport type { StyledRadioGroupProps } from './form/formFields/subComponents/inputs/radio/radioInputsProps';\n\n// Layout\nexport { Card } from './design/card/Card';\nexport { ReportFooter } from './layout/footers/reports/ReportFooter';\nexport { MainHeader } from './layout/mainHeader/MainHeader';\n\nexport { ThemeLoader } from './design/themeLoader/ThemeLoader';\nexport type { ThemeStructure } from './design/themeLoader/ThemeLoader';\n\n// Testing\nexport { DevToolbar } from './testing/devToolbar/DevToolbar';\nexport { ThemeSwitch } from './testing/themeSwitch/ThemeSwitch';\nexport { LoremIpsum } from './testing/loremIpsum/LoremIpsum';\n\nexport { GlobalDashboard } from './layout/dashboard/layouts/globalDashboard/GlobalDashboard';\nexport { Menu } from './navigation/menu/Menu';\nexport { PopupMenu } from './navigation/popupMenu/PopupMenu';\nexport { SearchPanelMenu } from './navigation/searchPanelMenu/SearchPanelMenu';\nexport { Link } from './navigation/link/Link';\n\nexport type { MenuItemPropTypes, MenuButtonPropTypes, MenuItemIconStates } from './navigation/menu/Menu.interfaces';\n\n// Templates\nexport { TemplateForm } from './templates/templateForm/TemplateForm';\nexport type { TemplateFormProps } from './templates/templateForm/TemplateForm';\nexport { TemplateLoading } from './templates/templateLoading/TemplateLoading';\nexport type { TemplateLoadingProps } from './templates/templateLoading/TemplateLoading';\nexport { TemplateDashboard } from './templates/templateDashboard/TemplateDashboard';\nexport type { TemplateDashboardProps } from './templates/templateDashboard/TemplateDashboard';\nexport { TemplatePage } from './templates/templatePage/TemplatePage';\nexport type { TemplatePageProps } from './templates/templatePage/TemplatePage';\n\n// Aliases to match common libraries\nexport { SelectDropdown as Select } from './form/formFields/subComponents/InputVariants';\nexport { InputCheckbox as Checkbox } from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gBAAgB,QAAQ,sEAAsE;AACvG,SAASC,eAAe,QAAQ,wCAAwC;AAExE,SACEC,SAAS,EACTC,UAAU,EACVC,SAAS,EACTC,WAAW,EACXC,WAAW,EACXC,UAAU,EACVC,QAAQ,EACRC,aAAa,EACbC,mBAAmB,EACnBC,cAAc,EACdC,QAAQ,EACRC,QAAQ,QACH,+CAA+C;AAOtD,SACEC,SAAS,QACJ,uDAAuD;AAC9D,SAASC,SAAS,QAAQ,uDAAuD;AAGjF;AACA,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SAASC,YAAY,QAAQ,uCAAuC;AACpE,SAASC,UAAU,QAAQ,gCAAgC;AAE3D,SAASC,WAAW,QAAQ,kCAAkC;AAG9D;AACA,SAASC,UAAU,QAAQ,iCAAiC;AAC5D,SAASC,WAAW,QAAQ,mCAAmC;AAC/D,SAASC,UAAU,QAAQ,iCAAiC;AAE5D,SAASC,eAAe,QAAQ,4DAA4D;AAC5F,SAASC,IAAI,QAAQ,wBAAwB;AAC7C,SAASC,SAAS,QAAQ,kCAAkC;AAC5D,SAASC,eAAe,QAAQ,8CAA8C;AAC9E,SAASC,IAAI,QAAQ,wBAAwB;AAI7C;AACA,SAASC,YAAY,QAAQ,uCAAuC;AAEpE,SAASC,eAAe,QAAQ,6CAA6C;AAE7E,SAASC,iBAAiB,QAAQ,iDAAiD;AAEnF,SAASC,YAAY,QAAQ,uCAAuC;AAGpE;AACA,SAASpB,cAAc,IAAIqB,MAAM,QAAQ,+CAA+C;AACxF,SAASpC,aAAa,IAAIqC,QAAQ,QAAQ,+DAA+D","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useEffect, useRef, useState } from 'react';
|
|
4
|
+
export const INTERACTIVE_HOST_SELECTOR = 'button, a[href], [tabindex], [role="button"]';
|
|
5
|
+
export const useOnInteractiveHostFocus = ({
|
|
6
|
+
wrapperRef,
|
|
7
|
+
setIsOpen,
|
|
8
|
+
enabled
|
|
9
|
+
}) => {
|
|
10
|
+
const [isDismissed, setIsDismissed] = useState(false);
|
|
11
|
+
const isHoveredRef = useRef(false);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
const wrapper = wrapperRef.current;
|
|
14
|
+
if (!enabled || !wrapper) {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
const host = wrapper.parentElement?.closest(INTERACTIVE_HOST_SELECTOR) ?? null;
|
|
18
|
+
const open = () => {
|
|
19
|
+
setIsDismissed(false);
|
|
20
|
+
setIsOpen(true);
|
|
21
|
+
};
|
|
22
|
+
const close = () => setIsOpen(false);
|
|
23
|
+
const handleMouseEnter = () => {
|
|
24
|
+
isHoveredRef.current = true;
|
|
25
|
+
};
|
|
26
|
+
const resetDismissed = () => {
|
|
27
|
+
isHoveredRef.current = false;
|
|
28
|
+
setIsDismissed(false);
|
|
29
|
+
};
|
|
30
|
+
// WCAG 1.4.13: hover/focus content must be dismissible without moving pointer or focus.
|
|
31
|
+
const dismissOnEscape = event => {
|
|
32
|
+
if (event.key !== 'Escape') return;
|
|
33
|
+
const hostIsActive = host?.contains(document.activeElement) ?? false;
|
|
34
|
+
if (!hostIsActive && !isHoveredRef.current) return;
|
|
35
|
+
setIsOpen(false);
|
|
36
|
+
setIsDismissed(true);
|
|
37
|
+
};
|
|
38
|
+
host?.addEventListener('focus', open);
|
|
39
|
+
host?.addEventListener('blur', close);
|
|
40
|
+
wrapper.addEventListener('mouseenter', handleMouseEnter);
|
|
41
|
+
wrapper.addEventListener('mouseleave', resetDismissed);
|
|
42
|
+
document.addEventListener('keydown', dismissOnEscape);
|
|
43
|
+
return () => {
|
|
44
|
+
host?.removeEventListener('focus', open);
|
|
45
|
+
host?.removeEventListener('blur', close);
|
|
46
|
+
wrapper.removeEventListener('mouseenter', handleMouseEnter);
|
|
47
|
+
wrapper.removeEventListener('mouseleave', resetDismissed);
|
|
48
|
+
document.removeEventListener('keydown', dismissOnEscape);
|
|
49
|
+
};
|
|
50
|
+
}, [enabled, wrapperRef, setIsOpen]);
|
|
51
|
+
return {
|
|
52
|
+
isDismissed
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export default useOnInteractiveHostFocus;
|
|
56
|
+
//# sourceMappingURL=InteractiveHostFocus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InteractiveHostFocus.js","names":["useEffect","useRef","useState","INTERACTIVE_HOST_SELECTOR","useOnInteractiveHostFocus","wrapperRef","setIsOpen","enabled","isDismissed","setIsDismissed","isHoveredRef","wrapper","current","undefined","host","parentElement","closest","open","close","handleMouseEnter","resetDismissed","dismissOnEscape","event","key","hostIsActive","contains","document","activeElement","addEventListener","removeEventListener"],"sources":["../../../src/hooks/InteractiveHostFocus.ts"],"sourcesContent":["'use client';\n\nimport React, { useEffect, useRef, useState } from 'react';\n\nexport const INTERACTIVE_HOST_SELECTOR = 'button, a[href], [tabindex], [role=\"button\"]';\n\ninterface UseOnInteractiveHostFocusProps {\n wrapperRef: React.RefObject<HTMLElement>;\n setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;\n enabled: boolean;\n}\n\nexport const useOnInteractiveHostFocus = (\n {\n wrapperRef,\n setIsOpen,\n enabled\n }\n :\n UseOnInteractiveHostFocusProps\n) => {\n const [isDismissed, setIsDismissed] = useState(false);\n const isHoveredRef = useRef(false);\n\n useEffect(() => {\n const wrapper = wrapperRef.current;\n if (!enabled || !wrapper) {\n return undefined;\n }\n const host = wrapper.parentElement?.closest<HTMLElement>(INTERACTIVE_HOST_SELECTOR) ?? null;\n\n const open = () => {\n setIsDismissed(false);\n setIsOpen(true);\n };\n const close = () => setIsOpen(false);\n const handleMouseEnter = () => {\n isHoveredRef.current = true;\n };\n const resetDismissed = () => {\n isHoveredRef.current = false;\n setIsDismissed(false);\n };\n // WCAG 1.4.13: hover/focus content must be dismissible without moving pointer or focus.\n const dismissOnEscape = (event: KeyboardEvent) => {\n if (event.key !== 'Escape') return;\n\n const hostIsActive = host?.contains(document.activeElement) ?? false;\n if (!hostIsActive && !isHoveredRef.current) return;\n\n setIsOpen(false);\n setIsDismissed(true);\n };\n\n host?.addEventListener('focus', open);\n host?.addEventListener('blur', close);\n wrapper.addEventListener('mouseenter', handleMouseEnter);\n wrapper.addEventListener('mouseleave', resetDismissed);\n document.addEventListener('keydown', dismissOnEscape);\n\n return () => {\n host?.removeEventListener('focus', open);\n host?.removeEventListener('blur', close);\n wrapper.removeEventListener('mouseenter', handleMouseEnter);\n wrapper.removeEventListener('mouseleave', resetDismissed);\n document.removeEventListener('keydown', dismissOnEscape);\n };\n }, [enabled, wrapperRef, setIsOpen]);\n\n return { isDismissed };\n};\n\nexport default useOnInteractiveHostFocus;\n"],"mappings":"AAAA,YAAY;;AAEZ,SAAgBA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAE1D,OAAO,MAAMC,yBAAyB,GAAG,8CAA8C;AAQvF,OAAO,MAAMC,yBAAyB,GAAGA,CACvC;EACEC,UAAU;EACVC,SAAS;EACTC;AAG2B,CAAC,KAC3B;EACH,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGP,QAAQ,CAAC,KAAK,CAAC;EACrD,MAAMQ,YAAY,GAAGT,MAAM,CAAC,KAAK,CAAC;EAElCD,SAAS,CAAC,MAAM;IACd,MAAMW,OAAO,GAAGN,UAAU,CAACO,OAAO;IAClC,IAAI,CAACL,OAAO,IAAI,CAACI,OAAO,EAAE;MACxB,OAAOE,SAAS;IAClB;IACA,MAAMC,IAAI,GAAGH,OAAO,CAACI,aAAa,EAAEC,OAAO,CAAcb,yBAAyB,CAAC,IAAI,IAAI;IAE3F,MAAMc,IAAI,GAAGA,CAAA,KAAM;MACjBR,cAAc,CAAC,KAAK,CAAC;MACrBH,SAAS,CAAC,IAAI,CAAC;IACjB,CAAC;IACD,MAAMY,KAAK,GAAGA,CAAA,KAAMZ,SAAS,CAAC,KAAK,CAAC;IACpC,MAAMa,gBAAgB,GA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;EAAY,CAAC;AACxB,CAAC;AAED,eAAeJ,yBAAyB","ignoreList":[]}
|
package/dist/esm/hooks/index.js
CHANGED
|
@@ -9,4 +9,5 @@ export { useDialogOverlay } from './DialogOverlay';
|
|
|
9
9
|
export { useEllipsisBookends } from './EllipsisBookends';
|
|
10
10
|
export { useFocusTrap } from './FocusTrap';
|
|
11
11
|
export { useInertAttribute } from './InertAttribute';
|
|
12
|
+
export { useOnInteractiveHostFocus } from './InteractiveHostFocus';
|
|
12
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["useOnClickOutside","usePopupKeys","useOnEdgeProximityDetect","useFirstCapital","useTabbableInputGroup","useDialogOverlay","useEllipsisBookends","useFocusTrap","useInertAttribute"],"sources":["../../../src/hooks/index.tsx"],"sourcesContent":["'use client';\n\nexport { useOnClickOutside } from './ClickOutside';\nexport { usePopupKeys } from './PopupKeys';\nexport { useOnEdgeProximityDetect } from './EdgeProximityDetect';\nexport { useFirstCapital } from './Strings';\nexport { useTabbableInputGroup } from './TabbableInputGroup';\nexport { useDialogOverlay } from './DialogOverlay';\nexport { useEllipsisBookends } from './EllipsisBookends';\nexport { useFocusTrap } from './FocusTrap';\nexport { useInertAttribute } from './InertAttribute';"],"mappings":"AAAA,YAAY;;AAEZ,SAASA,iBAAiB,QAAQ,gBAAgB;AAClD,SAASC,YAAY,QAAQ,aAAa;AAC1C,SAASC,wBAAwB,QAAQ,uBAAuB;AAChE,SAASC,eAAe,QAAQ,WAAW;AAC3C,SAASC,qBAAqB,QAAQ,sBAAsB;AAC5D,SAASC,gBAAgB,QAAQ,iBAAiB;AAClD,SAASC,mBAAmB,QAAQ,oBAAoB;AACxD,SAASC,YAAY,QAAQ,aAAa;AAC1C,SAASC,iBAAiB,QAAQ,kBAAkB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["useOnClickOutside","usePopupKeys","useOnEdgeProximityDetect","useFirstCapital","useTabbableInputGroup","useDialogOverlay","useEllipsisBookends","useFocusTrap","useInertAttribute","useOnInteractiveHostFocus"],"sources":["../../../src/hooks/index.tsx"],"sourcesContent":["'use client';\n\nexport { useOnClickOutside } from './ClickOutside';\nexport { usePopupKeys } from './PopupKeys';\nexport { useOnEdgeProximityDetect } from './EdgeProximityDetect';\nexport { useFirstCapital } from './Strings';\nexport { useTabbableInputGroup } from './TabbableInputGroup';\nexport { useDialogOverlay } from './DialogOverlay';\nexport { useEllipsisBookends } from './EllipsisBookends';\nexport { useFocusTrap } from './FocusTrap';\nexport { useInertAttribute } from './InertAttribute';\nexport { useOnInteractiveHostFocus } from './InteractiveHostFocus';"],"mappings":"AAAA,YAAY;;AAEZ,SAASA,iBAAiB,QAAQ,gBAAgB;AAClD,SAASC,YAAY,QAAQ,aAAa;AAC1C,SAASC,wBAAwB,QAAQ,uBAAuB;AAChE,SAASC,eAAe,QAAQ,WAAW;AAC3C,SAASC,qBAAqB,QAAQ,sBAAsB;AAC5D,SAASC,gBAAgB,QAAQ,iBAAiB;AAClD,SAASC,mBAAmB,QAAQ,oBAAoB;AACxD,SAASC,YAAY,QAAQ,aAAa;AAC1C,SAASC,iBAAiB,QAAQ,kBAAkB;AACpD,SAASC,yBAAyB,QAAQ,wBAAwB","ignoreList":[]}
|
package/dist/esm/index.js
CHANGED
|
@@ -2,9 +2,10 @@ import './styles/index.css';
|
|
|
2
2
|
import './icons/style.css';
|
|
3
3
|
|
|
4
4
|
// Components
|
|
5
|
-
export { Accordion, Chip, Pill, Badge, Dialog, HeaderBar, Icon, NotificationIcon, VentureLogo, CreditSavvyLogo, HomeInLogo, KitLogo, DoshiiLogo, TruyuLogo, SidePanel, Skeleton, Spinner, StatusIconButton, StatusLight, StatusLightsBar, Tabs, Tooltip, EllipsisTooltip, RevealMore, CopyText, Paginator, PageBanner, Banner, Alert, SimpleButton, Button, FormField, InputCheckbox, CheckboxInput, StyledRadioGroup, StyledRadioInput, StyledRadioLabel, HookFormWrapper, TextInput, EmailInput, FileInput, SearchInput, NumberInput, PhoneInput, UrlInput, PasswordInput, PasswordInputSignup, SelectDropdown, Select, Combobox, Textarea, InputDate, DateInput, Card, ReportFooter, MainHeader, ThemeLoader, DevToolbar, ThemeSwitch, LoremIpsum, GlobalDashboard, Menu, PopupMenu, SearchPanelMenu, Link, TemplateForm, TemplateLoading, TemplateDashboard, TemplatePage } from './components';
|
|
5
|
+
export { Accordion, Chip, Pill, Badge, Dialog, HeaderBar, Icon, NotificationIcon, VentureLogo, CreditSavvyLogo, HomeInLogo, KitLogo, DoshiiLogo, TruyuLogo, SidePanel, Skeleton, Spinner, StatusIconButton, StatusLight, StatusLightsBar, CircularProgressIndicator, Tabs, Tooltip, EllipsisTooltip, RevealMore, CopyText, Paginator, PageBanner, Banner, Alert, SimpleButton, Button, FormField, InputCheckbox, CheckboxInput, StyledRadioGroup, StyledRadioInput, StyledRadioLabel, HookFormWrapper, TextInput, EmailInput, FileInput, SearchInput, NumberInput, PhoneInput, UrlInput, PasswordInput, PasswordInputSignup, SelectDropdown, Select, Combobox, Textarea, InputDate, DateInput, Card, ReportFooter, MainHeader, ThemeLoader, DevToolbar, ThemeSwitch, LoremIpsum, GlobalDashboard, Menu, PopupMenu, SearchPanelMenu, Link, TemplateForm, TemplateLoading, TemplateDashboard, TemplatePage } from './components';
|
|
6
|
+
export { ProcessLauncher } from './widgets';
|
|
6
7
|
// Hooks
|
|
7
|
-
export { useOnClickOutside, usePopupKeys, useOnEdgeProximityDetect, useFirstCapital, useTabbableInputGroup, useDialogOverlay, useEllipsisBookends, useFocusTrap, useInertAttribute } from './hooks';
|
|
8
|
+
export { useOnClickOutside, usePopupKeys, useOnEdgeProximityDetect, useFirstCapital, useTabbableInputGroup, useDialogOverlay, useEllipsisBookends, useFocusTrap, useInertAttribute, useOnInteractiveHostFocus } from './hooks';
|
|
8
9
|
|
|
9
10
|
// Interfaces (types only - safe to keep export *)
|
|
10
11
|
export * from './interfaces';
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Accordion","Chip","Pill","Badge","Dialog","HeaderBar","Icon","NotificationIcon","VentureLogo","CreditSavvyLogo","HomeInLogo","KitLogo","DoshiiLogo","TruyuLogo","SidePanel","Skeleton","Spinner","StatusIconButton","StatusLight","StatusLightsBar","Tabs","Tooltip","EllipsisTooltip","RevealMore","CopyText","Paginator","PageBanner","Banner","Alert","SimpleButton","Button","FormField","InputCheckbox","CheckboxInput","StyledRadioGroup","StyledRadioInput","StyledRadioLabel","HookFormWrapper","TextInput","EmailInput","FileInput","SearchInput","NumberInput","PhoneInput","UrlInput","PasswordInput","PasswordInputSignup","SelectDropdown","Select","Combobox","Textarea","InputDate","DateInput","Card","ReportFooter","MainHeader","ThemeLoader","DevToolbar","ThemeSwitch","LoremIpsum","GlobalDashboard","Menu","PopupMenu","SearchPanelMenu","Link","TemplateForm","TemplateLoading","TemplateDashboard","TemplatePage","useOnClickOutside","usePopupKeys","useOnEdgeProximityDetect","useFirstCapital","useTabbableInputGroup","useDialogOverlay","useEllipsisBookends","useFocusTrap","useInertAttribute","getMinAge","getMaxAge","getMinAndMaxAges","validateBirthdate","isDateEntryComplete","getAgeInWeeks","getAgeInYears","binaryFindInArray","addAndSortArray","moveItemInArrayMutate","moveItemInArrayCopy","getRandomItemFromArray","getItemIndexWithinArray","getRoundedMedian","getMostOccurringBoolean","cssClassesArrayToString","transformPlacesData","extractNamePieces","dateToShortIsoString","isValidDate","dateToShortReadableDate","dateToShortReadableMonth","timeStampToShortReadableDate","dateToReadableTime","dateToShortReadableDateTime","getLastDateOfMonth","daysSince","USER_CURRENCY","intlCurrencyFormatter","intlNumberFormatter","formatNumberForLocale","formatAsCurrencyForLocale","getNumberAbbreviation","formatRoundedNumberWithAbbreviation","formatNumberWithAbbreviation","formatNumberForChartAxis","formatAsSimpleCurrencyForChartAxis","formatAsInternationalCurrencyForChartAxis","formatAsCurrencyWithAbbreviation","formatFileSize","getRandomNumberBelow","getRandomBetweenInclusive","getRandomBetweenExclusive","hashCode","roundToDecimal","formatNumberToMinDigits","formatDigitalTime","richTextParser","capitalize","capitalizeFirstLetter","lowerCaseFirstLetter","useAnInsteadOfA","splitCamelCase","pluralize","pluralizeIfNeeded","getInitialsOrAcronym","objectsAreTheSame","isAnObject","createCompareValueOverride","deepMergeObjects","overrideMergeObjects","makeInheritanceObject","updateNestedProperty","filterObject","getArrayOfObjectKeys","getArrayOfReadableObjectKeys","getBranchFromPath","deepRemoveProps","UserMock","MenuMock","xGraphTopMenuMock","xGraphMainMenuMock","DashboardMenuMock","UserMenuMock","CBA_ORG_STRUCTURE","CBA_LOGO","VENTURES","DEFAULT_PASSWORD_REGEX","DEFAULT_EMAIL_REGEX","DEFAULT_PHONE_REGEX","DEFAULT_NUMBER_REGEX","DEFAULT_URL_REGEX","DATA_CLASSIFICATIONS","BLACKLISTED_FILE_TYPES","DEFAULT_UPLOAD_FILE_TYPES","DEFAULT_UPLOAD_FILE_EXTENSIONS","LIBRARY_CDN_BASE_URL","LIBRARY_CDN_BASE_URL_PROD","LIBRARY_CDN_BUCKET_NAME","LIBRARY_CDN_BUCKET_FOLDER","LIBRARY_CDN_DEV_BASE_URL","LIBRARY_CDN_PROD_BASE_URL","LIBRARY_VERSION","UserContextProvider","AppContextProvider"],"sources":["../../src/index.ts"],"sourcesContent":["import './styles/index.scss';\nimport './icons/style.scss';\n\n// Components\nexport {\n Accordion,\n Chip,\n Pill,\n Badge,\n Dialog,\n HeaderBar,\n Icon,\n NotificationIcon,\n VentureLogo,\n CreditSavvyLogo,\n HomeInLogo,\n KitLogo,\n DoshiiLogo,\n TruyuLogo,\n SidePanel,\n Skeleton,\n Spinner,\n StatusIconButton,\n StatusLight,\n StatusLightsBar,\n Tabs,\n Tooltip,\n EllipsisTooltip,\n RevealMore,\n CopyText,\n Paginator,\n PageBanner,\n Banner,\n Alert,\n SimpleButton,\n Button,\n FormField,\n InputCheckbox,\n CheckboxInput,\n StyledRadioGroup,\n StyledRadioInput,\n StyledRadioLabel,\n HookFormWrapper,\n TextInput,\n EmailInput,\n FileInput,\n SearchInput,\n NumberInput,\n PhoneInput,\n UrlInput,\n PasswordInput,\n PasswordInputSignup,\n SelectDropdown,\n Select,\n Combobox,\n Textarea,\n InputDate,\n DateInput,\n Card,\n ReportFooter,\n MainHeader,\n ThemeLoader,\n DevToolbar,\n ThemeSwitch,\n LoremIpsum,\n GlobalDashboard,\n Menu,\n PopupMenu,\n SearchPanelMenu,\n Link,\n TemplateForm,\n TemplateLoading,\n TemplateDashboard,\n TemplatePage\n} from './components';\n\nexport type {\n PageBannerProps,\n FormComponentProps,\n DropdownSelectProps,\n PasswordInputProps,\n StyledRadioGroupProps,\n SkeletonProps,\n ThemeStructure,\n MenuItemPropTypes,\n MenuButtonPropTypes,\n MenuItemIconStates,\n TemplateFormProps,\n TemplateLoadingProps,\n TemplateDashboardProps,\n TemplatePageProps\n} from './components';\n\n// Hooks\nexport {\n useOnClickOutside,\n usePopupKeys,\n useOnEdgeProximityDetect,\n useFirstCapital,\n useTabbableInputGroup,\n useDialogOverlay,\n useEllipsisBookends,\n useFocusTrap,\n useInertAttribute\n} from './hooks';\n\n// Interfaces (types only - safe to keep export *)\nexport * from './interfaces';\n\n// Helpers\nexport {\n getMinAge,\n getMaxAge,\n getMinAndMaxAges,\n validateBirthdate,\n isDateEntryComplete,\n getAgeInWeeks,\n getAgeInYears\n} from './helpers/ageHelpers';\n\nexport {\n binaryFindInArray,\n addAndSortArray,\n moveItemInArrayMutate,\n moveItemInArrayCopy,\n getRandomItemFromArray,\n getItemIndexWithinArray,\n getRoundedMedian,\n getMostOccurringBoolean,\n cssClassesArrayToString\n} from './helpers/arrayHelpers';\n\nexport {\n transformPlacesData,\n extractNamePieces\n} from './helpers/dataHelpers';\nexport type { NamePieces } from './helpers/dataHelpers';\n\nexport {\n dateToShortIsoString,\n isValidDate,\n dateToShortReadableDate,\n dateToShortReadableMonth,\n timeStampToShortReadableDate,\n dateToReadableTime,\n dateToShortReadableDateTime,\n getLastDateOfMonth,\n daysSince\n} from './helpers/dateHelpers';\n\nexport {\n USER_CURRENCY,\n intlCurrencyFormatter,\n intlNumberFormatter,\n formatNumberForLocale,\n formatAsCurrencyForLocale,\n getNumberAbbreviation,\n formatRoundedNumberWithAbbreviation,\n formatNumberWithAbbreviation,\n formatNumberForChartAxis,\n formatAsSimpleCurrencyForChartAxis,\n formatAsInternationalCurrencyForChartAxis,\n formatAsCurrencyWithAbbreviation,\n formatFileSize\n} from './helpers/formatters';\n\nexport {\n getRandomNumberBelow,\n getRandomBetweenInclusive,\n getRandomBetweenExclusive,\n hashCode,\n roundToDecimal,\n formatNumberToMinDigits,\n formatDigitalTime\n} from './helpers/numberHelpers';\n\nexport {\n richTextParser,\n capitalize,\n capitalizeFirstLetter,\n lowerCaseFirstLetter,\n useAnInsteadOfA,\n splitCamelCase,\n pluralize,\n pluralizeIfNeeded,\n getInitialsOrAcronym\n} from './helpers/stringHelpers';\n\nexport {\n objectsAreTheSame,\n isAnObject,\n createCompareValueOverride,\n deepMergeObjects,\n overrideMergeObjects,\n makeInheritanceObject,\n updateNestedProperty,\n filterObject,\n getArrayOfObjectKeys,\n getArrayOfReadableObjectKeys,\n getBranchFromPath,\n deepRemoveProps\n} from './helpers/objectHelpers';\n\n// Mocks\nexport {\n UserMock,\n MenuMock,\n xGraphTopMenuMock,\n xGraphMainMenuMock,\n DashboardMenuMock,\n UserMenuMock\n} from './mocks';\n\n// Constants\nexport {\n CBA_ORG_STRUCTURE,\n CBA_LOGO,\n VENTURES,\n DEFAULT_PASSWORD_REGEX,\n DEFAULT_EMAIL_REGEX,\n DEFAULT_PHONE_REGEX,\n DEFAULT_NUMBER_REGEX,\n DEFAULT_URL_REGEX,\n DATA_CLASSIFICATIONS,\n BLACKLISTED_FILE_TYPES,\n DEFAULT_UPLOAD_FILE_TYPES,\n DEFAULT_UPLOAD_FILE_EXTENSIONS,\n LIBRARY_CDN_BASE_URL,\n LIBRARY_CDN_BASE_URL_PROD,\n LIBRARY_CDN_BUCKET_NAME,\n LIBRARY_CDN_BUCKET_FOLDER,\n LIBRARY_CDN_DEV_BASE_URL,\n LIBRARY_CDN_PROD_BASE_URL,\n LIBRARY_VERSION\n} from './constants';\n\nexport type {\n USER,\n GlobalUserRole,\n ScopedUserRole,\n UserAuthType,\n VentureSite,\n VentureSites,\n VentureDefinition,\n VentureDefinitions\n} from './constants';\n\n// Context Providers\nexport { UserContextProvider, AppContextProvider } from './contextProviders';\n"],"mappings":"AAAA,OAAO,qBAAqB;AAC5B,OAAO,oBAAoB;;AAE3B;AACA,SACEA,SAAS,EACTC,IAAI,EACJC,IAAI,EACJC,KAAK,EACLC,MAAM,EACNC,SAAS,EACTC,IAAI,EACJC,gBAAgB,EAChBC,WAAW,EACXC,eAAe,EACfC,UAAU,EACVC,OAAO,EACPC,UAAU,EACVC,SAAS,EACTC,SAAS,EACTC,QAAQ,EACRC,OAAO,EACPC,gBAAgB,EAChBC,WAAW,EACXC,eAAe,EACfC,IAAI,EACJC,OAAO,EACPC,eAAe,EACfC,UAAU,EACVC,QAAQ,EACRC,SAAS,EACTC,UAAU,EACVC,MAAM,EACNC,KAAK,EACLC,YAAY,EACZC,MAAM,EACNC,SAAS,EACTC,aAAa,EACbC,aAAa,EACbC,gBAAgB,EAChBC,gBAAgB,EAChBC,gBAAgB,EAChBC,eAAe,EACfC,SAAS,EACTC,UAAU,EACVC,SAAS,EACTC,WAAW,EACXC,WAAW,EACXC,UAAU,EACVC,QAAQ,EACRC,aAAa,EACbC,mBAAmB,EACnBC,cAAc,EACdC,MAAM,EACNC,QAAQ,EACRC,QAAQ,EACRC,SAAS,EACTC,SAAS,EACTC,IAAI,EACJC,YAAY,EACZC,UAAU,EACVC,WAAW,EACXC,UAAU,EACVC,WAAW,EACXC,UAAU,EACVC,eAAe,EACfC,IAAI,EACJC,SAAS,EACTC,eAAe,EACfC,IAAI,EACJC,YAAY,EACZC,eAAe,EACfC,iBAAiB,EACj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AAgB,EAChBC,oBAAoB,EACpBC,qBAAqB,EACrBC,oBAAoB,EACpBC,YAAY,EACZC,oBAAoB,EACpBC,4BAA4B,EAC5BC,iBAAiB,EACjBC,eAAe,QACV,yBAAyB;;AAEhC;AACA,SACEC,QAAQ,EACRC,QAAQ,EACRC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,YAAY,QACP,SAAS;;AAEhB;AACA,SACEC,iBAAiB,EACjBC,QAAQ,EACRC,QAAQ,EACRC,sBAAsB,EACtBC,mBAAmB,EACnBC,mBAAmB,EACnBC,oBAAoB,EACpBC,iBAAiB,EACjBC,oBAAoB,EACpBC,sBAAsB,EACtBC,yBAAyB,EACzBC,8BAA8B,EAC9BC,oBAAoB,EACpBC,yBAAyB,EACzBC,uBAAuB,EACvBC,yBAAyB,EACzBC,wBAAwB,EACxBC,yBAAyB,EACzBC,eAAe,QACV,aAAa;AAapB;AACA,SAASC,mBAAmB,EAAEC,kBAAkB,QAAQ,oBAAoB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["Accordion","Chip","Pill","Badge","Dialog","HeaderBar","Icon","NotificationIcon","VentureLogo","CreditSavvyLogo","HomeInLogo","KitLogo","DoshiiLogo","TruyuLogo","SidePanel","Skeleton","Spinner","StatusIconButton","StatusLight","StatusLightsBar","CircularProgressIndicator","Tabs","Tooltip","EllipsisTooltip","RevealMore","CopyText","Paginator","PageBanner","Banner","Alert","SimpleButton","Button","FormField","InputCheckbox","CheckboxInput","StyledRadioGroup","StyledRadioInput","StyledRadioLabel","HookFormWrapper","TextInput","EmailInput","FileInput","SearchInput","NumberInput","PhoneInput","UrlInput","PasswordInput","PasswordInputSignup","SelectDropdown","Select","Combobox","Textarea","InputDate","DateInput","Card","ReportFooter","MainHeader","ThemeLoader","DevToolbar","ThemeSwitch","LoremIpsum","GlobalDashboard","Menu","PopupMenu","SearchPanelMenu","Link","TemplateForm","TemplateLoading","TemplateDashboard","TemplatePage","ProcessLauncher","useOnClickOutside","usePopupKeys","useOnEdgeProximityDetect","useFirstCapital","useTabbableInputGroup","useDialogOverlay","useEllipsisBookends","useFocusTrap","useInertAttribute","useOnInteractiveHostFocus","getMinAge","getMaxAge","getMinAndMaxAges","validateBirthdate","isDateEntryComplete","getAgeInWeeks","getAgeInYears","binaryFindInArray","addAndSortArray","moveItemInArrayMutate","moveItemInArrayCopy","getRandomItemFromArray","getItemIndexWithinArray","getRoundedMedian","getMostOccurringBoolean","cssClassesArrayToString","transformPlacesData","extractNamePieces","dateToShortIsoString","isValidDate","dateToShortReadableDate","dateToShortReadableMonth","timeStampToShortReadableDate","dateToReadableTime","dateToShortReadableDateTime","getLastDateOfMonth","daysSince","USER_CURRENCY","intlCurrencyFormatter","intlNumberFormatter","formatNumberForLocale","formatAsCurrencyForLocale","getNumberAbbreviation","formatRoundedNumberWithAbbreviation","formatNumberWithAbbreviation","formatNumberForChartAxis","formatAsSimpleCurrencyForChartAxis","formatAsInternationalCurrencyForChartAxis","formatAsCurrencyWithAbbreviation","formatFileSize","getRandomNumberBelow","getRandomBetweenInclusive","getRandomBetweenExclusive","hashCode","roundToDecimal","formatNumberToMinDigits","formatDigitalTime","richTextParser","capitalize","capitalizeFirstLetter","lowerCaseFirstLetter","useAnInsteadOfA","splitCamelCase","pluralize","pluralizeIfNeeded","getInitialsOrAcronym","objectsAreTheSame","isAnObject","createCompareValueOverride","deepMergeObjects","overrideMergeObjects","makeInheritanceObject","updateNestedProperty","filterObject","getArrayOfObjectKeys","getArrayOfReadableObjectKeys","getBranchFromPath","deepRemoveProps","UserMock","MenuMock","xGraphTopMenuMock","xGraphMainMenuMock","DashboardMenuMock","UserMenuMock","CBA_ORG_STRUCTURE","CBA_LOGO","VENTURES","DEFAULT_PASSWORD_REGEX","DEFAULT_EMAIL_REGEX","DEFAULT_PHONE_REGEX","DEFAULT_NUMBER_REGEX","DEFAULT_URL_REGEX","DATA_CLASSIFICATIONS","BLACKLISTED_FILE_TYPES","DEFAULT_UPLOAD_FILE_TYPES","DEFAULT_UPLOAD_FILE_EXTENSIONS","LIBRARY_CDN_BASE_URL","LIBRARY_CDN_BASE_URL_PROD","LIBRARY_CDN_BUCKET_NAME","LIBRARY_CDN_BUCKET_FOLDER","LIBRARY_CDN_DEV_BASE_URL","LIBRARY_CDN_PROD_BASE_URL","LIBRARY_VERSION","UserContextProvider","AppContextProvider"],"sources":["../../src/index.ts"],"sourcesContent":["import './styles/index.scss';\nimport './icons/style.scss';\n\n// Components\nexport {\n Accordion,\n Chip,\n Pill,\n Badge,\n Dialog,\n HeaderBar,\n Icon,\n NotificationIcon,\n VentureLogo,\n CreditSavvyLogo,\n HomeInLogo,\n KitLogo,\n DoshiiLogo,\n TruyuLogo,\n SidePanel,\n Skeleton,\n Spinner,\n StatusIconButton,\n StatusLight,\n StatusLightsBar,\n CircularProgressIndicator,\n Tabs,\n Tooltip,\n EllipsisTooltip,\n RevealMore,\n CopyText,\n Paginator,\n PageBanner,\n Banner,\n Alert,\n SimpleButton,\n Button,\n FormField,\n InputCheckbox,\n CheckboxInput,\n StyledRadioGroup,\n StyledRadioInput,\n StyledRadioLabel,\n HookFormWrapper,\n TextInput,\n EmailInput,\n FileInput,\n SearchInput,\n NumberInput,\n PhoneInput,\n UrlInput,\n PasswordInput,\n PasswordInputSignup,\n SelectDropdown,\n Select,\n Combobox,\n Textarea,\n InputDate,\n DateInput,\n Card,\n ReportFooter,\n MainHeader,\n ThemeLoader,\n DevToolbar,\n ThemeSwitch,\n LoremIpsum,\n GlobalDashboard,\n Menu,\n PopupMenu,\n SearchPanelMenu,\n Link,\n TemplateForm,\n TemplateLoading,\n TemplateDashboard,\n TemplatePage\n} from './components';\n\nexport { ProcessLauncher } from './widgets';\n\nexport type {\n ProcessLauncherProps,\n ProcessDefinition,\n ProcessLaunchButtonProps,\n ProcessProgressIndicatorProps,\n ProcessStatus,\n ProcessProgressUpdateMode,\n ProcessPushableStatus,\n ProcessProgressUpdate,\n ProcessProgressSubscriptionHandlers,\n ProcessProgressUnsubscribe,\n ProcessProgressSubscription,\n ProcessLauncherFetchProgressProps,\n ProcessLauncherSubscribeProgressProps,\n ProcessLauncherProgressProps\n} from './widgets';\n\nexport type {\n PageBannerProps,\n FormComponentProps,\n DropdownSelectProps,\n PasswordInputProps,\n StyledRadioGroupProps,\n SkeletonProps,\n ThemeStructure,\n MenuItemPropTypes,\n MenuButtonPropTypes,\n MenuItemIconStates,\n TemplateFormProps,\n TemplateLoadingProps,\n TemplateDashboardProps,\n TemplatePageProps,\n CircularProgressIndicatorProps\n} from './components';\n\n// Hooks\nexport {\n useOnClickOutside,\n usePopupKeys,\n useOnEdgeProximityDetect,\n useFirstCapital,\n useTabbableInputGroup,\n useDialogOverlay,\n useEllipsisBookends,\n useFocusTrap,\n useInertAttribute,\n useOnInteractiveHostFocus\n} from './hooks';\n\n// Interfaces (types only - safe to keep export *)\nexport * from './interfaces';\n\n// Helpers\nexport {\n getMinAge,\n getMaxAge,\n getMinAndMaxAges,\n validateBirthdate,\n isDateEntryComplete,\n getAgeInWeeks,\n getAgeInYears\n} from './helpers/ageHelpers';\n\nexport {\n binaryFindInArray,\n addAndSortArray,\n moveItemInArrayMutate,\n moveItemInArrayCopy,\n getRandomItemFromArray,\n getItemIndexWithinArray,\n getRoundedMedian,\n getMostOccurringBoolean,\n cssClassesArrayToString\n} from './helpers/arrayHelpers';\n\nexport {\n transformPlacesData,\n extractNamePieces\n} from './helpers/dataHelpers';\nexport type { NamePieces } from './helpers/dataHelpers';\n\nexport {\n dateToShortIsoString,\n isValidDate,\n dateToShortReadableDate,\n dateToShortReadableMonth,\n timeStampToShortReadableDate,\n dateToReadableTime,\n dateToShortReadableDateTime,\n getLastDateOfMonth,\n daysSince\n} from './helpers/dateHelpers';\n\nexport {\n USER_CURRENCY,\n intlCurrencyFormatter,\n intlNumberFormatter,\n formatNumberForLocale,\n formatAsCurrencyForLocale,\n getNumberAbbreviation,\n formatRoundedNumberWithAbbreviation,\n formatNumberWithAbbreviation,\n formatNumberForChartAxis,\n formatAsSimpleCurrencyForChartAxis,\n formatAsInternationalCurrencyForChartAxis,\n formatAsCurrencyWithAbbreviation,\n formatFileSize\n} from './helpers/formatters';\n\nexport {\n getRandomNumberBelow,\n getRandomBetweenInclusive,\n getRandomBetweenExclusive,\n hashCode,\n roundToDecimal,\n formatNumberToMinDigits,\n formatDigitalTime\n} from './helpers/numberHelpers';\n\nexport {\n richTextParser,\n capitalize,\n capitalizeFirstLetter,\n lowerCaseFirstLetter,\n useAnInsteadOfA,\n splitCamelCase,\n pluralize,\n pluralizeIfNeeded,\n getInitialsOrAcronym\n} from './helpers/stringHelpers';\n\nexport {\n objectsAreTheSame,\n isAnObject,\n createCompareValueOverride,\n deepMergeObjects,\n overrideMergeObjects,\n makeInheritanceObject,\n updateNestedProperty,\n filterObject,\n getArrayOfObjectKeys,\n getArrayOfReadableObjectKeys,\n getBranchFromPath,\n deepRemoveProps\n} from './helpers/objectHelpers';\n\n// Mocks\nexport {\n UserMock,\n MenuMock,\n xGraphTopMenuMock,\n xGraphMainMenuMock,\n DashboardMenuMock,\n UserMenuMock\n} from './mocks';\n\n// Constants\nexport {\n CBA_ORG_STRUCTURE,\n CBA_LOGO,\n VENTURES,\n DEFAULT_PASSWORD_REGEX,\n DEFAULT_EMAIL_REGEX,\n DEFAULT_PHONE_REGEX,\n DEFAULT_NUMBER_REGEX,\n DEFAULT_URL_REGEX,\n DATA_CLASSIFICATIONS,\n BLACKLISTED_FILE_TYPES,\n DEFAULT_UPLOAD_FILE_TYPES,\n DEFAULT_UPLOAD_FILE_EXTENSIONS,\n LIBRARY_CDN_BASE_URL,\n LIBRARY_CDN_BASE_URL_PROD,\n LIBRARY_CDN_BUCKET_NAME,\n LIBRARY_CDN_BUCKET_FOLDER,\n LIBRARY_CDN_DEV_BASE_URL,\n LIBRARY_CDN_PROD_BASE_URL,\n LIBRARY_VERSION\n} from './constants';\n\nexport type {\n USER,\n GlobalUserRole,\n ScopedUserRole,\n UserAuthType,\n VentureSite,\n VentureSites,\n VentureDefinition,\n VentureDefinitions\n} from './constants';\n\n// Context Providers\nexport { UserContextProvider, AppContextProvider } from './contextProviders';\n"],"mappings":"AAAA,OAAO,qBAAqB;AAC5B,OAAO,oBAAoB;;AAE3B;AACA,SACEA,SAAS,EACTC,IAAI,EACJC,IAAI,EACJC,KAAK,EACLC,MAAM,EACNC,SAAS,EACTC,IAAI,EACJC,gBAAgB,EAChBC,WAAW,EACXC,eAAe,EACfC,UAAU,EACVC,OAAO,EACPC,UAAU,EACVC,SAAS,EACTC,SAAS,EACTC,QAAQ,EACRC,OAAO,EACPC,gBAAgB,EAChBC,WAAW,EACXC,eAAe,EACfC,yBAAyB,EACzBC,IAAI,EACJC,OAAO,EACPC,eAAe,EACfC,UAAU,EACVC,QAAQ,EACRC,SAAS,EACTC,UAAU,EACVC,MAAM,EACNC,KAAK,EACLC,YAAY,EACZC,MAAM,EACNC,SAAS,EACTC,aAAa,EACbC,aAAa,EACbC,gBAAgB,EAChBC,gBAAgB,EAChBC,gBAAgB,EAChBC,eAAe,EACfC,SAAS,EACTC,UAAU,EACVC,SAAS,EACTC,WAAW,EACXC,WAAW,EACXC,UAAU,EACVC,QAAQ,EACRC,aAAa,EACbC,mBAAmB,EACnBC,cAAc,EACdC,MAAM,EACNC,QAAQ,EACRC,QAAQ,EACRC,SAAS,EACTC,SAAS,EACTC,IAAI,EACJC,YAAY,EACZC,UAAU,EACVC,WAAW,EACXC,UAAU,EACVC,WAAW,EACXC,UAAU,EACVC,eAAe,EACfC,IAAI,EACJC,SAAS,EACTC,eAAe,EACfC,IAAI,EACJC,YAAY,EACZC,eAAe,EACfC,iBAAiB,EACjBC,YAAY,QACP,cAAc;AAErB,SAASC,eAAe,QAAQ,WAAW;AAqC3C;AACA,SACEC,iBAAiB,EACjBC,YAAY,EACZC,wBAAwB,EACxBC,eAAe,EACfC,qBAAqB,EACrBC,gBAAgB,EAChBC,mBAAmB,EACnBC,YAAY,EACZC,iBAAiB,EACjBC,yBA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,QAAQ,EACRC,QAAQ,EACRC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,YAAY,QACP,SAAS;;AAEhB;AACA,SACEC,iBAAiB,EACjBC,QAAQ,EACRC,QAAQ,EACRC,sBAAsB,EACtBC,mBAAmB,EACnBC,mBAAmB,EACnBC,oBAAoB,EACpBC,iBAAiB,EACjBC,oBAAoB,EACpBC,sBAAsB,EACtBC,yBAAyB,EACzBC,8BAA8B,EAC9BC,oBAAoB,EACpBC,yBAAyB,EACzBC,uBAAuB,EACvBC,yBAAyB,EACzBC,wBAAwB,EACxBC,yBAAyB,EACzBC,eAAe,QACV,aAAa;AAapB;AACA,SAASC,mBAAmB,EAAEC,kBAAkB,QAAQ,oBAAoB","ignoreList":[]}
|
package/dist/esm/package.json
CHANGED
|
@@ -254,9 +254,11 @@
|
|
|
254
254
|
--notificationIconFg: #fff;
|
|
255
255
|
--notificationIconBorder: 4px solid #c00;
|
|
256
256
|
--notificationIconBoxShadow: none;
|
|
257
|
-
--skeletonBg: #
|
|
257
|
+
--skeletonBg: #e5ebef;
|
|
258
258
|
--skeletonOpaqueBg: #d3dee4;
|
|
259
|
-
--skeletonHighlight: #
|
|
259
|
+
--skeletonHighlight: #ffffff;
|
|
260
|
+
--skeletonPulseBg: #ffffff;
|
|
261
|
+
--skeletonOpaquePulseBg: #f6f8fa;
|
|
260
262
|
--skeletonBorderRadius: 3px;
|
|
261
263
|
--skeletonRoundedBorderRadius: 8px;
|
|
262
264
|
--skeletonLineHeight: 1em;
|
|
@@ -264,7 +266,7 @@
|
|
|
264
266
|
--skeletonBlockHeight: 120px;
|
|
265
267
|
--skeletonCircleSize: 40px;
|
|
266
268
|
--skeletonLastLineWidth: 60%;
|
|
267
|
-
--skeletonAnimationDuration:
|
|
269
|
+
--skeletonAnimationDuration: 2s;
|
|
268
270
|
}
|
|
269
271
|
|
|
270
272
|
:root {
|
|
@@ -611,6 +613,8 @@
|
|
|
611
613
|
--skeletonBg: #1a1410;
|
|
612
614
|
--skeletonHighlight: #3d2f26;
|
|
613
615
|
--skeletonOpaqueBg: #2c211b;
|
|
616
|
+
--skeletonOpaquePulseBg: #4d3b30;
|
|
617
|
+
--skeletonPulseBg: #3d2f26;
|
|
614
618
|
--statusAlertColor: #000;
|
|
615
619
|
--statusDefCon3Bg: radial-gradient(circle at 60% 40%, #003, #000, #333); /* gradient stops inverted */
|
|
616
620
|
--statusDefCon3Color: #003;
|
|
@@ -236,6 +236,8 @@
|
|
|
236
236
|
--skeletonBg: #1a1410;
|
|
237
237
|
--skeletonHighlight: #3d2f26;
|
|
238
238
|
--skeletonOpaqueBg: #2c211b;
|
|
239
|
+
--skeletonOpaquePulseBg: #4d3b30;
|
|
240
|
+
--skeletonPulseBg: #3d2f26;
|
|
239
241
|
--statusAlertColor: #000;
|
|
240
242
|
--statusDefCon3Bg: radial-gradient(circle at 60% 40%, #003, #000, #333); /* gradient stops inverted */
|
|
241
243
|
--statusDefCon3Color: #003;
|
|
@@ -216,9 +216,11 @@
|
|
|
216
216
|
--notificationIconFg: #fff;
|
|
217
217
|
--notificationIconBorder: 4px solid #c00;
|
|
218
218
|
--notificationIconBoxShadow: none;
|
|
219
|
-
--skeletonBg: #
|
|
219
|
+
--skeletonBg: #e5ebef;
|
|
220
220
|
--skeletonOpaqueBg: #d3dee4;
|
|
221
|
-
--skeletonHighlight: #
|
|
221
|
+
--skeletonHighlight: #ffffff;
|
|
222
|
+
--skeletonPulseBg: #ffffff;
|
|
223
|
+
--skeletonOpaquePulseBg: #f6f8fa;
|
|
222
224
|
--skeletonBorderRadius: 3px;
|
|
223
225
|
--skeletonRoundedBorderRadius: 8px;
|
|
224
226
|
--skeletonLineHeight: 1em;
|
|
@@ -226,5 +228,5 @@
|
|
|
226
228
|
--skeletonBlockHeight: 120px;
|
|
227
229
|
--skeletonCircleSize: 40px;
|
|
228
230
|
--skeletonLastLineWidth: 60%;
|
|
229
|
-
--skeletonAnimationDuration:
|
|
231
|
+
--skeletonAnimationDuration: 2s;
|
|
230
232
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["ProcessLauncher"],"sources":["../../../src/widgets/index.ts"],"sourcesContent":["'use client';\n\nexport { ProcessLauncher } from './processLauncher';\n\nexport type {\n ProcessLauncherProps,\n ProcessDefinition,\n ProcessLaunchButtonProps,\n ProcessProgressIndicatorProps,\n ProcessStatus,\n ProcessProgressUpdateMode,\n ProcessPushableStatus,\n ProcessProgressUpdate,\n ProcessProgressSubscriptionHandlers,\n ProcessProgressUnsubscribe,\n ProcessProgressSubscription,\n ProcessLauncherFetchProgressProps,\n ProcessLauncherSubscribeProgressProps,\n ProcessLauncherProgressProps\n} from './processLauncher';\n"],"mappings":"AAAA,YAAY;;AAEZ,SAASA,eAAe,QAAQ,mBAAmB","ignoreList":[]}
|