@app-studio/web 0.8.90 → 0.8.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CookieConsent/CookieConsent/CookieConsent.props.d.ts +57 -0
- package/dist/components/CookieConsent/CookieConsent/CookieConsent.state.d.ts +13 -0
- package/dist/components/CookieConsent/CookieConsent/CookieConsent.style.d.ts +68 -0
- package/dist/components/CookieConsent/CookieConsent/CookieConsent.type.d.ts +13 -0
- package/dist/components/CookieConsent/CookieConsent/CookieConsent.view.d.ts +8 -0
- package/dist/components/CookieConsent/CookieConsent.d.ts +3 -0
- package/dist/components/CookieConsent/examples/custom.d.ts +5 -0
- package/dist/components/CookieConsent/examples/default.d.ts +5 -0
- package/dist/components/CookieConsent/examples/index.d.ts +4 -0
- package/dist/components/CookieConsent/examples/positions.d.ts +5 -0
- package/dist/components/CookieConsent/examples/variants.d.ts +5 -0
- package/dist/components/Icon/Icon.d.ts +4 -1
- package/dist/components/Title/Title/Title.props.d.ts +88 -0
- package/dist/components/Title/Title/Title.state.d.ts +10 -0
- package/dist/components/Title/Title/Title.style.d.ts +25 -0
- package/dist/components/Title/Title/Title.type.d.ts +17 -0
- package/dist/components/Title/Title/Title.view.d.ts +4 -0
- package/dist/components/Title/Title/TypewriterEffect.d.ts +17 -0
- package/dist/components/Title/Title/useInView.d.ts +9 -0
- package/dist/components/Title/Title.d.ts +3 -0
- package/dist/components/Title/examples/alternating.d.ts +5 -0
- package/dist/components/Title/examples/animated.d.ts +5 -0
- package/dist/components/Title/examples/custom.d.ts +5 -0
- package/dist/components/Title/examples/default.d.ts +5 -0
- package/dist/components/Title/examples/directAnimation.d.ts +5 -0
- package/dist/components/Title/examples/gradient.d.ts +5 -0
- package/dist/components/Title/examples/hero.d.ts +5 -0
- package/dist/components/Title/examples/highlight.d.ts +5 -0
- package/dist/components/Title/examples/highlightStyles.d.ts +5 -0
- package/dist/components/Title/examples/highlighted.d.ts +5 -0
- package/dist/components/Title/examples/index.d.ts +12 -0
- package/dist/components/Title/examples/responsive.d.ts +5 -0
- package/dist/components/Title/examples/typewriterHighlight.d.ts +5 -0
- package/dist/components/Title/index.d.ts +1 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/pages/cookieConsent.page.d.ts +6 -0
- package/dist/pages/title.page.d.ts +6 -0
- package/dist/web.cjs.development.js +842 -133
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +839 -135
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +843 -135
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/package.json +2 -2
package/dist/web.esm.js
CHANGED
|
@@ -5,7 +5,7 @@ import 'core-js/modules/es.array.iterator.js';
|
|
|
5
5
|
import 'core-js/modules/es.string.includes.js';
|
|
6
6
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
7
7
|
import 'core-js/modules/es.regexp.to-string.js';
|
|
8
|
-
import { View, Horizontal, Vertical, Element, Center, useTheme, Image, Typography, Input, Form,
|
|
8
|
+
import { View, Horizontal, Vertical, Element, Text as Text$1, Center, useTheme, Image, Typography, Input, Form, useInView } from 'app-studio';
|
|
9
9
|
import 'core-js/modules/es.symbol.description.js';
|
|
10
10
|
import 'core-js/modules/es.parse-float.js';
|
|
11
11
|
import 'core-js/modules/es.string.trim-end.js';
|
|
@@ -24,6 +24,7 @@ import 'core-js/modules/web.url.js';
|
|
|
24
24
|
import 'core-js/modules/web.url.to-json.js';
|
|
25
25
|
import 'core-js/modules/web.url-search-params.js';
|
|
26
26
|
import { create } from 'zustand';
|
|
27
|
+
import 'core-js/modules/es.string.replace.js';
|
|
27
28
|
import 'core-js/modules/es.string.ends-with.js';
|
|
28
29
|
import 'core-js/modules/es.string.match.js';
|
|
29
30
|
import 'core-js/modules/es.string.search.js';
|
|
@@ -586,7 +587,7 @@ var TruncateText = _ref2 => {
|
|
|
586
587
|
n.style.lineHeight = lineHeight;
|
|
587
588
|
}
|
|
588
589
|
}, [text, maxLines]);
|
|
589
|
-
return /*#__PURE__*/React.createElement(
|
|
590
|
+
return /*#__PURE__*/React.createElement(Text$1, Object.assign({
|
|
590
591
|
ref: containerRef,
|
|
591
592
|
overflow: "hidden" // Crucial for final display state
|
|
592
593
|
}, views == null ? void 0 : views.truncateText, rest, {
|
|
@@ -651,7 +652,7 @@ var Text = TextComponent;
|
|
|
651
652
|
|
|
652
653
|
var _excluded$3 = ["widthHeight", "color", "transform", "orientation", "children"],
|
|
653
654
|
_excluded2$2 = ["widthHeight", "color", "filled", "strokeWidth"],
|
|
654
|
-
_excluded3$1 = ["widthHeight", "color", "
|
|
655
|
+
_excluded3$1 = ["widthHeight", "color", "strokeWidth", "filled"],
|
|
655
656
|
_excluded4$1 = ["widthHeight", "color", "filled", "strokeWidth"],
|
|
656
657
|
_excluded5 = ["widthHeight", "color", "filled", "strokeWidth"],
|
|
657
658
|
_excluded6 = ["widthHeight", "color", "filled", "strokeWidth"],
|
|
@@ -725,7 +726,9 @@ var _excluded$3 = ["widthHeight", "color", "transform", "orientation", "children
|
|
|
725
726
|
_excluded74 = ["widthHeight", "color", "strokeWidth", "filled"],
|
|
726
727
|
_excluded75 = ["widthHeight", "color", "strokeWidth", "filled"],
|
|
727
728
|
_excluded76 = ["widthHeight", "color", "strokeWidth", "filled"],
|
|
728
|
-
_excluded77 = ["widthHeight", "color", "strokeWidth", "filled"]
|
|
729
|
+
_excluded77 = ["widthHeight", "color", "strokeWidth", "filled"],
|
|
730
|
+
_excluded78 = ["widthHeight", "color", "strokeWidth", "filled"],
|
|
731
|
+
_excluded79 = ["widthHeight", "color", "strokeWidth", "filled"];
|
|
729
732
|
// Default wrapper component for consistent sizing and styling
|
|
730
733
|
var IconWrapper = _ref => {
|
|
731
734
|
var {
|
|
@@ -780,8 +783,8 @@ var HelpIcon = _ref3 => {
|
|
|
780
783
|
var {
|
|
781
784
|
widthHeight = 24,
|
|
782
785
|
color = 'currentColor',
|
|
783
|
-
|
|
784
|
-
|
|
786
|
+
strokeWidth = 1,
|
|
787
|
+
filled = false
|
|
785
788
|
} = _ref3,
|
|
786
789
|
props = _objectWithoutPropertiesLoose(_ref3, _excluded3$1);
|
|
787
790
|
return /*#__PURE__*/React.createElement(IconWrapper, Object.assign({
|
|
@@ -789,10 +792,19 @@ var HelpIcon = _ref3 => {
|
|
|
789
792
|
color: color
|
|
790
793
|
}, props), /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
791
794
|
viewBox: "0 0 24 24",
|
|
792
|
-
"aria-hidden": "
|
|
795
|
+
"aria-hidden": "false",
|
|
793
796
|
focusable: "false"
|
|
794
|
-
}, getSvgProps(filled, color, strokeWidth)), /*#__PURE__*/React.createElement("
|
|
795
|
-
|
|
797
|
+
}, getSvgProps(filled, color, strokeWidth)), /*#__PURE__*/React.createElement("circle", {
|
|
798
|
+
cx: "12",
|
|
799
|
+
cy: "12",
|
|
800
|
+
r: "10"
|
|
801
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
802
|
+
d: "M9.09 9a3 3 0 1 1 5.91 1c0 2-3 3-3 3"
|
|
803
|
+
}), /*#__PURE__*/React.createElement("line", {
|
|
804
|
+
x1: "12",
|
|
805
|
+
y1: "17",
|
|
806
|
+
x2: "12",
|
|
807
|
+
y2: "17"
|
|
796
808
|
})));
|
|
797
809
|
};
|
|
798
810
|
// Example Icon Component: ChevronIcon
|
|
@@ -1772,31 +1784,13 @@ var PanelIcon = _ref40 => {
|
|
|
1772
1784
|
"aria-hidden": "false",
|
|
1773
1785
|
focusable: "false"
|
|
1774
1786
|
}, getSvgProps(filled, color, strokeWidth)), /*#__PURE__*/React.createElement("rect", {
|
|
1775
|
-
x: "3",
|
|
1776
|
-
y: "3",
|
|
1777
1787
|
width: "18",
|
|
1778
1788
|
height: "18",
|
|
1789
|
+
x: "3",
|
|
1790
|
+
y: "3",
|
|
1779
1791
|
rx: "2"
|
|
1780
|
-
}), /*#__PURE__*/React.createElement("
|
|
1781
|
-
|
|
1782
|
-
y1: "3",
|
|
1783
|
-
x2: "9",
|
|
1784
|
-
y2: "21"
|
|
1785
|
-
}), /*#__PURE__*/React.createElement("line", {
|
|
1786
|
-
x1: "12",
|
|
1787
|
-
y1: "7",
|
|
1788
|
-
x2: "17",
|
|
1789
|
-
y2: "7"
|
|
1790
|
-
}), /*#__PURE__*/React.createElement("line", {
|
|
1791
|
-
x1: "12",
|
|
1792
|
-
y1: "11",
|
|
1793
|
-
x2: "17",
|
|
1794
|
-
y2: "11"
|
|
1795
|
-
}), /*#__PURE__*/React.createElement("line", {
|
|
1796
|
-
x1: "12",
|
|
1797
|
-
y1: "15",
|
|
1798
|
-
x2: "17",
|
|
1799
|
-
y2: "15"
|
|
1792
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
1793
|
+
d: "M9 3v18"
|
|
1800
1794
|
})));
|
|
1801
1795
|
};
|
|
1802
1796
|
var FilterIcon = _ref41 => {
|
|
@@ -2749,6 +2743,59 @@ var ChartIcon = _ref77 => {
|
|
|
2749
2743
|
y2: "17"
|
|
2750
2744
|
})));
|
|
2751
2745
|
};
|
|
2746
|
+
var GiftIcon = _ref78 => {
|
|
2747
|
+
var {
|
|
2748
|
+
widthHeight = 24,
|
|
2749
|
+
color = 'currentColor',
|
|
2750
|
+
strokeWidth = 1,
|
|
2751
|
+
filled = false
|
|
2752
|
+
} = _ref78,
|
|
2753
|
+
props = _objectWithoutPropertiesLoose(_ref78, _excluded78);
|
|
2754
|
+
return /*#__PURE__*/React.createElement(IconWrapper, Object.assign({
|
|
2755
|
+
widthHeight: widthHeight,
|
|
2756
|
+
color: color
|
|
2757
|
+
}, props), /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
2758
|
+
viewBox: "0 0 24 24",
|
|
2759
|
+
"aria-hidden": "false",
|
|
2760
|
+
focusable: "false"
|
|
2761
|
+
}, getSvgProps(filled, color, strokeWidth)), /*#__PURE__*/React.createElement("rect", {
|
|
2762
|
+
x: "3",
|
|
2763
|
+
y: "8",
|
|
2764
|
+
width: "18",
|
|
2765
|
+
height: "4",
|
|
2766
|
+
rx: "1"
|
|
2767
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
2768
|
+
d: "M12 8V21"
|
|
2769
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
2770
|
+
d: "M3 12v6a3 3 0 0 0 3 3h3V12"
|
|
2771
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
2772
|
+
d: "M18 21h-3v-9h6v6a3 3 0 0 1-3 3z"
|
|
2773
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
2774
|
+
d: "M12 8c-.5-2.5-4-3-5-1.5S9 10 12 8z"
|
|
2775
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
2776
|
+
d: "M12 8c.5-2.5 4-3 5-1.5S15 10 12 8z"
|
|
2777
|
+
})));
|
|
2778
|
+
};
|
|
2779
|
+
var ShieldIcon = _ref79 => {
|
|
2780
|
+
var {
|
|
2781
|
+
widthHeight = 24,
|
|
2782
|
+
color = 'currentColor',
|
|
2783
|
+
strokeWidth = 1,
|
|
2784
|
+
filled = true
|
|
2785
|
+
} = _ref79,
|
|
2786
|
+
props = _objectWithoutPropertiesLoose(_ref79, _excluded79);
|
|
2787
|
+
return /*#__PURE__*/React.createElement(IconWrapper, Object.assign({
|
|
2788
|
+
widthHeight: widthHeight,
|
|
2789
|
+
color: color
|
|
2790
|
+
}, props), /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
2791
|
+
viewBox: "0 0 24 24",
|
|
2792
|
+
"aria-hidden": "false",
|
|
2793
|
+
focusable: "false"
|
|
2794
|
+
}, getSvgProps(filled, color, strokeWidth)), /*#__PURE__*/React.createElement("path", {
|
|
2795
|
+
d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"
|
|
2796
|
+
})));
|
|
2797
|
+
};
|
|
2798
|
+
var CheckIcon = TickIcon;
|
|
2752
2799
|
|
|
2753
2800
|
var Icon = {
|
|
2754
2801
|
__proto__: null,
|
|
@@ -2828,7 +2875,10 @@ var Icon = {
|
|
|
2828
2875
|
ShapeIcon: ShapeIcon,
|
|
2829
2876
|
RotateIcon: RotateIcon,
|
|
2830
2877
|
DocumentIcon: DocumentIcon,
|
|
2831
|
-
ChartIcon: ChartIcon
|
|
2878
|
+
ChartIcon: ChartIcon,
|
|
2879
|
+
GiftIcon: GiftIcon,
|
|
2880
|
+
ShieldIcon: ShieldIcon,
|
|
2881
|
+
CheckIcon: CheckIcon
|
|
2832
2882
|
};
|
|
2833
2883
|
|
|
2834
2884
|
/**
|
|
@@ -5574,6 +5624,273 @@ var ChartComponent = props => {
|
|
|
5574
5624
|
};
|
|
5575
5625
|
var Chart = ChartComponent;
|
|
5576
5626
|
|
|
5627
|
+
/**
|
|
5628
|
+
* Custom hook to manage cookie consent state
|
|
5629
|
+
* @param cookieExpiration Number of days until the cookie expires
|
|
5630
|
+
* @returns State and functions for managing cookie consent
|
|
5631
|
+
*/
|
|
5632
|
+
var useCookieConsentState = function useCookieConsentState(cookieExpiration) {
|
|
5633
|
+
if (cookieExpiration === void 0) {
|
|
5634
|
+
cookieExpiration = 365;
|
|
5635
|
+
}
|
|
5636
|
+
// State for hover effects
|
|
5637
|
+
var [isHovered, setIsHovered] = useState(false);
|
|
5638
|
+
// State for tracking if consent has been given
|
|
5639
|
+
var [hasConsent, setHasConsent] = useState(null);
|
|
5640
|
+
// Cookie name for storing consent
|
|
5641
|
+
var COOKIE_CONSENT_KEY = 'app-studio-cookie-consent';
|
|
5642
|
+
// Check for existing consent when component mounts
|
|
5643
|
+
useEffect(() => {
|
|
5644
|
+
var storedConsent = localStorage.getItem(COOKIE_CONSENT_KEY);
|
|
5645
|
+
if (storedConsent !== null) {
|
|
5646
|
+
setHasConsent(storedConsent === 'true');
|
|
5647
|
+
} else {
|
|
5648
|
+
setHasConsent(false);
|
|
5649
|
+
}
|
|
5650
|
+
}, []);
|
|
5651
|
+
/**
|
|
5652
|
+
* Save consent to localStorage with expiration
|
|
5653
|
+
*/
|
|
5654
|
+
var saveConsent = consent => {
|
|
5655
|
+
localStorage.setItem(COOKIE_CONSENT_KEY, String(consent));
|
|
5656
|
+
// Set expiration date
|
|
5657
|
+
var expirationDate = new Date();
|
|
5658
|
+
expirationDate.setDate(expirationDate.getDate() + cookieExpiration);
|
|
5659
|
+
localStorage.setItem(COOKIE_CONSENT_KEY + "-expires", expirationDate.toISOString());
|
|
5660
|
+
setHasConsent(consent);
|
|
5661
|
+
};
|
|
5662
|
+
/**
|
|
5663
|
+
* Accept cookies
|
|
5664
|
+
*/
|
|
5665
|
+
var acceptCookies = () => {
|
|
5666
|
+
saveConsent(true);
|
|
5667
|
+
};
|
|
5668
|
+
/**
|
|
5669
|
+
* Reset cookie consent (for testing)
|
|
5670
|
+
*/
|
|
5671
|
+
var resetConsent = () => {
|
|
5672
|
+
localStorage.removeItem(COOKIE_CONSENT_KEY);
|
|
5673
|
+
localStorage.removeItem(COOKIE_CONSENT_KEY + "-expires");
|
|
5674
|
+
setHasConsent(false);
|
|
5675
|
+
};
|
|
5676
|
+
return {
|
|
5677
|
+
isHovered,
|
|
5678
|
+
setIsHovered,
|
|
5679
|
+
hasConsent,
|
|
5680
|
+
acceptCookies,
|
|
5681
|
+
resetConsent
|
|
5682
|
+
};
|
|
5683
|
+
};
|
|
5684
|
+
|
|
5685
|
+
/**
|
|
5686
|
+
* Get theme-based styles for the CookieConsent component
|
|
5687
|
+
*/
|
|
5688
|
+
var getThemes$1 = themeMode => {
|
|
5689
|
+
var isDark = themeMode === 'dark';
|
|
5690
|
+
return {
|
|
5691
|
+
default: {
|
|
5692
|
+
container: {
|
|
5693
|
+
backgroundColor: isDark ? '#1f2937' : '#ffffff',
|
|
5694
|
+
borderColor: isDark ? '#374151' : '#e5e7eb',
|
|
5695
|
+
boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)'
|
|
5696
|
+
},
|
|
5697
|
+
content: {
|
|
5698
|
+
color: isDark ? '#e5e7eb' : '#1f2937'
|
|
5699
|
+
},
|
|
5700
|
+
acceptButton: {
|
|
5701
|
+
backgroundColor: '#3b82f6',
|
|
5702
|
+
color: '#ffffff',
|
|
5703
|
+
hoverBackgroundColor: '#2563eb'
|
|
5704
|
+
},
|
|
5705
|
+
customizeButton: {
|
|
5706
|
+
backgroundColor: 'transparent',
|
|
5707
|
+
color: isDark ? '#e5e7eb' : '#4b5563',
|
|
5708
|
+
borderColor: isDark ? '#4b5563' : '#d1d5db',
|
|
5709
|
+
hoverBackgroundColor: isDark ? '#374151' : '#f3f4f6'
|
|
5710
|
+
}
|
|
5711
|
+
},
|
|
5712
|
+
info: {
|
|
5713
|
+
container: {
|
|
5714
|
+
backgroundColor: isDark ? '#1e3a8a' : '#eff6ff',
|
|
5715
|
+
borderColor: isDark ? '#1e40af' : '#bfdbfe',
|
|
5716
|
+
boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)'
|
|
5717
|
+
},
|
|
5718
|
+
content: {
|
|
5719
|
+
color: isDark ? '#bfdbfe' : '#1e40af'
|
|
5720
|
+
},
|
|
5721
|
+
acceptButton: {
|
|
5722
|
+
backgroundColor: '#3b82f6',
|
|
5723
|
+
color: '#ffffff',
|
|
5724
|
+
hoverBackgroundColor: '#2563eb'
|
|
5725
|
+
},
|
|
5726
|
+
customizeButton: {
|
|
5727
|
+
backgroundColor: 'transparent',
|
|
5728
|
+
color: isDark ? '#bfdbfe' : '#1e40af',
|
|
5729
|
+
borderColor: isDark ? '#3b82f6' : '#93c5fd',
|
|
5730
|
+
hoverBackgroundColor: isDark ? '#1e40af' : '#dbeafe'
|
|
5731
|
+
}
|
|
5732
|
+
},
|
|
5733
|
+
primary: {
|
|
5734
|
+
container: {
|
|
5735
|
+
backgroundColor: isDark ? '#0c4a6e' : '#f0f9ff',
|
|
5736
|
+
borderColor: isDark ? '#0369a1' : '#bae6fd',
|
|
5737
|
+
boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)'
|
|
5738
|
+
},
|
|
5739
|
+
content: {
|
|
5740
|
+
color: isDark ? '#bae6fd' : '#0369a1'
|
|
5741
|
+
},
|
|
5742
|
+
acceptButton: {
|
|
5743
|
+
backgroundColor: '#0ea5e9',
|
|
5744
|
+
color: '#ffffff',
|
|
5745
|
+
hoverBackgroundColor: '#0284c7'
|
|
5746
|
+
},
|
|
5747
|
+
customizeButton: {
|
|
5748
|
+
backgroundColor: 'transparent',
|
|
5749
|
+
color: isDark ? '#bae6fd' : '#0369a1',
|
|
5750
|
+
borderColor: isDark ? '#0ea5e9' : '#7dd3fc',
|
|
5751
|
+
hoverBackgroundColor: isDark ? '#0369a1' : '#e0f2fe'
|
|
5752
|
+
}
|
|
5753
|
+
}
|
|
5754
|
+
};
|
|
5755
|
+
};
|
|
5756
|
+
|
|
5757
|
+
var _excluded$e = ["title", "description", "acceptButtonText", "customizeButtonText", "position", "variant", "onAccept", "onCustomize", "views", "showCustomizeButton", "cookieExpiration", "themeMode"];
|
|
5758
|
+
/**
|
|
5759
|
+
* CookieConsent View Component
|
|
5760
|
+
*
|
|
5761
|
+
* Renders a cookie consent banner with customizable styling, position, and content.
|
|
5762
|
+
*/
|
|
5763
|
+
var CookieConsentView = _ref => {
|
|
5764
|
+
var {
|
|
5765
|
+
title = 'Nous utilisons des cookies',
|
|
5766
|
+
description = 'Ce site utilise des cookies pour améliorer votre expérience. En continuant à naviguer sur ce site, vous acceptez notre utilisation des cookies conformément à notre politique de confidentialité.',
|
|
5767
|
+
acceptButtonText = 'Accepter',
|
|
5768
|
+
customizeButtonText = 'Personnaliser',
|
|
5769
|
+
position = 'bottom',
|
|
5770
|
+
variant = 'default',
|
|
5771
|
+
onAccept,
|
|
5772
|
+
onCustomize,
|
|
5773
|
+
views,
|
|
5774
|
+
showCustomizeButton = true,
|
|
5775
|
+
cookieExpiration = 365,
|
|
5776
|
+
themeMode: propThemeMode
|
|
5777
|
+
} = _ref,
|
|
5778
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
5779
|
+
// Get theme context
|
|
5780
|
+
var {
|
|
5781
|
+
themeMode: contextThemeMode
|
|
5782
|
+
} = useTheme();
|
|
5783
|
+
// Use provided theme mode or fall back to context
|
|
5784
|
+
var themeMode = propThemeMode || contextThemeMode || 'light';
|
|
5785
|
+
// Get state and functions from custom hook
|
|
5786
|
+
var {
|
|
5787
|
+
hasConsent,
|
|
5788
|
+
acceptCookies
|
|
5789
|
+
} = useCookieConsentState(cookieExpiration);
|
|
5790
|
+
// Get theme-based styles
|
|
5791
|
+
var themes = getThemes$1(themeMode);
|
|
5792
|
+
var themeStyles = themes[variant];
|
|
5793
|
+
// If user has already given consent, don't show the banner
|
|
5794
|
+
if (hasConsent) {
|
|
5795
|
+
return null;
|
|
5796
|
+
}
|
|
5797
|
+
// Handle accept button click
|
|
5798
|
+
var handleAccept = () => {
|
|
5799
|
+
acceptCookies();
|
|
5800
|
+
if (onAccept) {
|
|
5801
|
+
onAccept();
|
|
5802
|
+
}
|
|
5803
|
+
};
|
|
5804
|
+
// Handle customize button click
|
|
5805
|
+
var handleCustomize = () => {
|
|
5806
|
+
if (onCustomize) {
|
|
5807
|
+
onCustomize();
|
|
5808
|
+
}
|
|
5809
|
+
};
|
|
5810
|
+
return /*#__PURE__*/React.createElement(View, Object.assign({
|
|
5811
|
+
position: "fixed",
|
|
5812
|
+
left: 16,
|
|
5813
|
+
right: 16,
|
|
5814
|
+
zIndex: 1000,
|
|
5815
|
+
padding: 16,
|
|
5816
|
+
borderWidth: "1px",
|
|
5817
|
+
borderStyle: "solid",
|
|
5818
|
+
borderRadius: 8,
|
|
5819
|
+
maxWidth: "800px",
|
|
5820
|
+
marginX: "auto"
|
|
5821
|
+
}, position === 'bottom' ? {
|
|
5822
|
+
bottom: 16
|
|
5823
|
+
} : {
|
|
5824
|
+
top: 16
|
|
5825
|
+
}, themeStyles.container, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement(Vertical, {
|
|
5826
|
+
gap: 12,
|
|
5827
|
+
maxWidth: 1200,
|
|
5828
|
+
marginX: "auto"
|
|
5829
|
+
}, title && (/*#__PURE__*/React.createElement(Text$1, Object.assign({
|
|
5830
|
+
fontWeight: "bold",
|
|
5831
|
+
fontSize: 18,
|
|
5832
|
+
color: "color.black"
|
|
5833
|
+
}, views == null ? void 0 : views.title), title)), description && (/*#__PURE__*/React.createElement(Text$1, Object.assign({
|
|
5834
|
+
fontSize: 14,
|
|
5835
|
+
color: "color.black"
|
|
5836
|
+
}, views == null ? void 0 : views.description), typeof description === 'string' ? description : description)), /*#__PURE__*/React.createElement(Horizontal, Object.assign({
|
|
5837
|
+
gap: 12,
|
|
5838
|
+
justifyContent: "flex-end",
|
|
5839
|
+
marginTop: 8
|
|
5840
|
+
}, views == null ? void 0 : views.buttonGroup), showCustomizeButton && (/*#__PURE__*/React.createElement(Button, Object.assign({
|
|
5841
|
+
variant: "outline",
|
|
5842
|
+
onClick: handleCustomize,
|
|
5843
|
+
size: "sm"
|
|
5844
|
+
}, views == null ? void 0 : views.customizeButton), customizeButtonText)), /*#__PURE__*/React.createElement(Button, Object.assign({
|
|
5845
|
+
variant: "primary",
|
|
5846
|
+
onClick: handleAccept,
|
|
5847
|
+
size: "sm"
|
|
5848
|
+
}, views == null ? void 0 : views.acceptButton), acceptButtonText))));
|
|
5849
|
+
};
|
|
5850
|
+
|
|
5851
|
+
/**
|
|
5852
|
+
* CookieConsent Component
|
|
5853
|
+
*
|
|
5854
|
+
* A component for displaying a cookie consent banner with customizable styling and content.
|
|
5855
|
+
*
|
|
5856
|
+
* Features:
|
|
5857
|
+
* - Customizable title and description
|
|
5858
|
+
* - Configurable button text
|
|
5859
|
+
* - Multiple visual variants
|
|
5860
|
+
* - Position control (top or bottom)
|
|
5861
|
+
* - Theme mode support (light or dark)
|
|
5862
|
+
* - Custom styling via views prop
|
|
5863
|
+
*
|
|
5864
|
+
* @example
|
|
5865
|
+
* // Basic usage
|
|
5866
|
+
* <CookieConsent />
|
|
5867
|
+
*
|
|
5868
|
+
* @example
|
|
5869
|
+
* // With custom text
|
|
5870
|
+
* <CookieConsent
|
|
5871
|
+
* title="Avis de confidentialité"
|
|
5872
|
+
* description="Nous utilisons des cookies pour améliorer votre expérience."
|
|
5873
|
+
* acceptButtonText="J'accepte"
|
|
5874
|
+
* />
|
|
5875
|
+
*
|
|
5876
|
+
* @example
|
|
5877
|
+
* // With custom styling and callbacks
|
|
5878
|
+
* <CookieConsent
|
|
5879
|
+
* variant="primary"
|
|
5880
|
+
* position="top"
|
|
5881
|
+
* onAccept={() => console.log('Cookies accepted')}
|
|
5882
|
+
* onCustomize={() => openPreferencesModal()}
|
|
5883
|
+
* views={{
|
|
5884
|
+
* container: { backgroundColor: 'color.blue.50' },
|
|
5885
|
+
* title: { color: 'color.blue.800' }
|
|
5886
|
+
* }}
|
|
5887
|
+
* />
|
|
5888
|
+
*/
|
|
5889
|
+
var CookieConsentComponent = props => {
|
|
5890
|
+
return /*#__PURE__*/React.createElement(CookieConsentView, Object.assign({}, props));
|
|
5891
|
+
};
|
|
5892
|
+
var CookieConsent = CookieConsentComponent;
|
|
5893
|
+
|
|
5577
5894
|
var useContextMenuState = props => {
|
|
5578
5895
|
var {
|
|
5579
5896
|
size,
|
|
@@ -5751,7 +6068,7 @@ var calculateMenuPosition = function calculateMenuPosition(x, y, menuWidth, menu
|
|
|
5751
6068
|
};
|
|
5752
6069
|
};
|
|
5753
6070
|
|
|
5754
|
-
var _excluded$
|
|
6071
|
+
var _excluded$f = ["children", "disableNativeContextMenu", "asChild", "isDisabled", "views"],
|
|
5755
6072
|
_excluded2$6 = ["items", "children", "position", "side", "align", "views", "style"],
|
|
5756
6073
|
_excluded3$5 = ["item", "children", "onSelect", "isDisabled", "views"],
|
|
5757
6074
|
_excluded4$5 = ["views"],
|
|
@@ -5807,7 +6124,7 @@ var ContextMenuTrigger = _ref2 => {
|
|
|
5807
6124
|
isDisabled = false,
|
|
5808
6125
|
views
|
|
5809
6126
|
} = _ref2,
|
|
5810
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
6127
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$f);
|
|
5811
6128
|
var {
|
|
5812
6129
|
triggerRef,
|
|
5813
6130
|
contentId,
|
|
@@ -6090,7 +6407,7 @@ var ContextMenuView = _ref7 => {
|
|
|
6090
6407
|
}));
|
|
6091
6408
|
};
|
|
6092
6409
|
|
|
6093
|
-
var _excluded$
|
|
6410
|
+
var _excluded$g = ["children", "items", "size", "variant", "disableNativeContextMenu", "onOpenChange", "views"];
|
|
6094
6411
|
/**
|
|
6095
6412
|
* ContextMenu component for displaying a custom context menu on right-click.
|
|
6096
6413
|
* Supports both data-driven approach (with items prop) and compound component pattern.
|
|
@@ -6105,7 +6422,7 @@ var ContextMenuComponent = _ref => {
|
|
|
6105
6422
|
onOpenChange,
|
|
6106
6423
|
views
|
|
6107
6424
|
} = _ref,
|
|
6108
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6425
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
6109
6426
|
var state = useContextMenuState({
|
|
6110
6427
|
size,
|
|
6111
6428
|
variant,
|
|
@@ -6157,7 +6474,7 @@ ContextMenu.Item = ContextMenuItem;
|
|
|
6157
6474
|
ContextMenu.Divider = ContextMenuDivider;
|
|
6158
6475
|
ContextMenu.Separator = ContextMenuSeparator; // Add the Separator component
|
|
6159
6476
|
|
|
6160
|
-
var _excluded$
|
|
6477
|
+
var _excluded$h = ["src", "color", "views", "themeMode"],
|
|
6161
6478
|
_excluded2$7 = ["path"];
|
|
6162
6479
|
var FileSVG = _ref => {
|
|
6163
6480
|
var {
|
|
@@ -6165,7 +6482,7 @@ var FileSVG = _ref => {
|
|
|
6165
6482
|
color,
|
|
6166
6483
|
views
|
|
6167
6484
|
} = _ref,
|
|
6168
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6485
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
6169
6486
|
var {
|
|
6170
6487
|
getColor,
|
|
6171
6488
|
themeMode
|
|
@@ -6239,7 +6556,7 @@ var useItemState = () => {
|
|
|
6239
6556
|
};
|
|
6240
6557
|
};
|
|
6241
6558
|
|
|
6242
|
-
var _excluded$
|
|
6559
|
+
var _excluded$i = ["children", "views"];
|
|
6243
6560
|
var HelperText = _ref => {
|
|
6244
6561
|
var {
|
|
6245
6562
|
children,
|
|
@@ -6247,7 +6564,7 @@ var HelperText = _ref => {
|
|
|
6247
6564
|
helperText: {}
|
|
6248
6565
|
}
|
|
6249
6566
|
} = _ref,
|
|
6250
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6567
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
6251
6568
|
return /*#__PURE__*/React.createElement(Text
|
|
6252
6569
|
// Typography properties
|
|
6253
6570
|
, Object.assign({
|
|
@@ -6273,7 +6590,7 @@ var HelperText = _ref => {
|
|
|
6273
6590
|
}, views['helperText'], props), children);
|
|
6274
6591
|
};
|
|
6275
6592
|
|
|
6276
|
-
var _excluded$
|
|
6593
|
+
var _excluded$j = ["children", "helperText", "error", "views"];
|
|
6277
6594
|
var FieldContainer = _ref => {
|
|
6278
6595
|
var {
|
|
6279
6596
|
children,
|
|
@@ -6281,7 +6598,7 @@ var FieldContainer = _ref => {
|
|
|
6281
6598
|
error = false,
|
|
6282
6599
|
views
|
|
6283
6600
|
} = _ref,
|
|
6284
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6601
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
6285
6602
|
return /*#__PURE__*/React.createElement(Vertical
|
|
6286
6603
|
// Layout properties
|
|
6287
6604
|
, Object.assign({
|
|
@@ -6397,7 +6714,7 @@ var PaddingWithoutLabel = {
|
|
|
6397
6714
|
paddingRight: '16px'
|
|
6398
6715
|
};
|
|
6399
6716
|
|
|
6400
|
-
var _excluded$
|
|
6717
|
+
var _excluded$k = ["label", "shadow", "children", "value", "size", "shape", "variant", "error", "showLabel", "isFocused", "isHovered", "isDisabled", "isReadOnly", "views"];
|
|
6401
6718
|
var FieldContent = _ref => {
|
|
6402
6719
|
var {
|
|
6403
6720
|
shadow,
|
|
@@ -6415,7 +6732,7 @@ var FieldContent = _ref => {
|
|
|
6415
6732
|
pickerBox: {}
|
|
6416
6733
|
}
|
|
6417
6734
|
} = _ref,
|
|
6418
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6735
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$k);
|
|
6419
6736
|
// Determine if the field is in an interactive state
|
|
6420
6737
|
var isInteractive = (isHovered || isFocused) && !isDisabled;
|
|
6421
6738
|
// Set the appropriate color based on state
|
|
@@ -6444,12 +6761,12 @@ var FieldContent = _ref => {
|
|
|
6444
6761
|
}, showLabel ? PadddingWithLabel : PaddingWithoutLabel, shadow, Shapes[shape], InputVariants[variant], views['box'], props), children);
|
|
6445
6762
|
};
|
|
6446
6763
|
|
|
6447
|
-
var _excluded$
|
|
6764
|
+
var _excluded$l = ["children"];
|
|
6448
6765
|
var FieldIcons = _ref => {
|
|
6449
6766
|
var {
|
|
6450
6767
|
children
|
|
6451
6768
|
} = _ref,
|
|
6452
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6769
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
|
|
6453
6770
|
return /*#__PURE__*/React.createElement(Center, Object.assign({
|
|
6454
6771
|
gap: 10,
|
|
6455
6772
|
right: 16,
|
|
@@ -6501,7 +6818,7 @@ var HeadingSizes$1 = {
|
|
|
6501
6818
|
}
|
|
6502
6819
|
};
|
|
6503
6820
|
|
|
6504
|
-
var _excluded$
|
|
6821
|
+
var _excluded$m = ["children", "heading", "isItalic", "isUnderlined", "isStriked", "weight", "size", "dropDown"];
|
|
6505
6822
|
var LabelView = _ref => {
|
|
6506
6823
|
var {
|
|
6507
6824
|
children,
|
|
@@ -6517,7 +6834,7 @@ var LabelView = _ref => {
|
|
|
6517
6834
|
size = 'sm'
|
|
6518
6835
|
// The fontSize prop for the Element is determined by the 'size' prop passed to LabelView.
|
|
6519
6836
|
} = _ref,
|
|
6520
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6837
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
|
|
6521
6838
|
// The fontStyle prop toggles between 'italic' and 'normal' based on the 'isItalic' boolean prop.
|
|
6522
6839
|
var headingStyles = heading ? HeadingSizes$1[heading] : {};
|
|
6523
6840
|
// fontWeight is derived from the Typography module, ensuring consistent font weighting across the app.
|
|
@@ -6549,7 +6866,7 @@ React.createElement(LabelView, Object.assign({}, props))
|
|
|
6549
6866
|
var Label = LabelComponent;
|
|
6550
6867
|
// Export the 'LabelComponent' as 'Label' to be reused throughout the project.
|
|
6551
6868
|
|
|
6552
|
-
var _excluded$
|
|
6869
|
+
var _excluded$n = ["children", "size", "error", "color", "views", "helperText"];
|
|
6553
6870
|
var FieldLabel = _ref => {
|
|
6554
6871
|
var {
|
|
6555
6872
|
children,
|
|
@@ -6560,7 +6877,7 @@ var FieldLabel = _ref => {
|
|
|
6560
6877
|
label: {}
|
|
6561
6878
|
}
|
|
6562
6879
|
} = _ref,
|
|
6563
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6880
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$n);
|
|
6564
6881
|
return /*#__PURE__*/React.createElement(Label
|
|
6565
6882
|
// Position properties
|
|
6566
6883
|
, Object.assign({
|
|
@@ -6581,12 +6898,12 @@ var FieldLabel = _ref => {
|
|
|
6581
6898
|
}, views['label'], props), children);
|
|
6582
6899
|
};
|
|
6583
6900
|
|
|
6584
|
-
var _excluded$
|
|
6901
|
+
var _excluded$o = ["children"];
|
|
6585
6902
|
var FieldWrapper = _ref => {
|
|
6586
6903
|
var {
|
|
6587
6904
|
children
|
|
6588
6905
|
} = _ref,
|
|
6589
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6906
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
|
|
6590
6907
|
return /*#__PURE__*/React.createElement(Vertical
|
|
6591
6908
|
// Layout properties
|
|
6592
6909
|
, Object.assign({
|
|
@@ -6619,7 +6936,7 @@ var IconSizes$2 = {
|
|
|
6619
6936
|
xl: 28
|
|
6620
6937
|
};
|
|
6621
6938
|
|
|
6622
|
-
var _excluded$
|
|
6939
|
+
var _excluded$p = ["isHovered", "setIsHovered", "option", "size", "callback", "style"],
|
|
6623
6940
|
_excluded2$8 = ["id", "name", "value", "onChange", "isMulti", "isDisabled", "isReadOnly", "options"],
|
|
6624
6941
|
_excluded3$6 = ["option", "size", "removeOption"],
|
|
6625
6942
|
_excluded4$6 = ["id", "name", "label", "value", "placeholder", "helperText", "hide", "error", "isMulti", "isFocused", "isHovered", "isDisabled", "isReadOnly", "options", "shadow", "size", "shape", "variant", "views", "onChange", "setHide", "setValue", "setIsHovered", "setIsFocused", "setHighlightedIndex", "highlightedIndex"];
|
|
@@ -6637,7 +6954,7 @@ var Item = _ref => {
|
|
|
6637
6954
|
callback = () => {},
|
|
6638
6955
|
style
|
|
6639
6956
|
} = _ref,
|
|
6640
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6957
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
|
|
6641
6958
|
// Handles the click event on an option by invoking the callback with the selected option's value
|
|
6642
6959
|
var handleOptionClick = option => callback(option);
|
|
6643
6960
|
// Toggles the hover state on the item
|
|
@@ -7130,7 +7447,7 @@ var ColorSchemes = {
|
|
|
7130
7447
|
}
|
|
7131
7448
|
};
|
|
7132
7449
|
|
|
7133
|
-
var _excluded$
|
|
7450
|
+
var _excluded$q = ["id", "name", "label", "inActiveChild", "isChecked", "activeChild", "labelPosition", "shadow", "size", "value", "isHovered", "isDisabled", "isReadOnly", "on", "setOn", "onChange", "setValue", "setIsHovered", "helperText", "views"];
|
|
7134
7451
|
var SwitchContent = props => /*#__PURE__*/React.createElement(Input, Object.assign({
|
|
7135
7452
|
type: "checkbox"
|
|
7136
7453
|
}, props));
|
|
@@ -7159,7 +7476,7 @@ var SwitchView = _ref => {
|
|
|
7159
7476
|
label: {}
|
|
7160
7477
|
}
|
|
7161
7478
|
} = _ref,
|
|
7162
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7479
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
|
|
7163
7480
|
var handleToggle = event => {
|
|
7164
7481
|
if (!isReadOnly) {
|
|
7165
7482
|
setValue(!value);
|
|
@@ -7283,7 +7600,7 @@ var useTextAreaState = _ref => {
|
|
|
7283
7600
|
// Export of the useTextAreaState hook for external usage.
|
|
7284
7601
|
};
|
|
7285
7602
|
|
|
7286
|
-
var _excluded$
|
|
7603
|
+
var _excluded$r = ["id", "name", "hint", "error", "value", "label", "shadow", "helperText", "placeholder", "size", "shape", "variant", "isHovered", "isFocused", "isEditable", "isReadOnly", "isDisabled", "isAutoFocus", "isMultiline", "maxRows", "maxCols", "onBlur", "onChange", "onFocus", "setHint", "setValue", "setIsFocused", "setIsHovered", "views"];
|
|
7287
7604
|
var TextAreaView = _ref => {
|
|
7288
7605
|
var {
|
|
7289
7606
|
id,
|
|
@@ -7318,7 +7635,7 @@ var TextAreaView = _ref => {
|
|
|
7318
7635
|
helperText: {}
|
|
7319
7636
|
}
|
|
7320
7637
|
} = _ref,
|
|
7321
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7638
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$r);
|
|
7322
7639
|
var showLabel = !!(isFocused && label);
|
|
7323
7640
|
/**
|
|
7324
7641
|
* Styles for the textarea field
|
|
@@ -7457,7 +7774,7 @@ var useTextFieldState = _ref => {
|
|
|
7457
7774
|
};
|
|
7458
7775
|
};
|
|
7459
7776
|
|
|
7460
|
-
var _excluded$
|
|
7777
|
+
var _excluded$s = ["id", "name", "label", "hint", "value", "onChange", "left", "right", "helperText", "placeholder", "onChangeText", "shadow", "views", "size", "shape", "variant", "error", "isFocused", "isHovered", "isDisabled", "isReadOnly", "isClearable", "isAutoFocus", "setHint", "setIsFocused", "setIsHovered", "setValue", "onClick", "onFocus", "onBlur", "themeMode"];
|
|
7461
7778
|
/**
|
|
7462
7779
|
* Input component for text fields
|
|
7463
7780
|
*/
|
|
@@ -7503,7 +7820,7 @@ var TextFieldView = _ref => {
|
|
|
7503
7820
|
onBlur = () => {},
|
|
7504
7821
|
themeMode: elementMode
|
|
7505
7822
|
} = _ref,
|
|
7506
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7823
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$s);
|
|
7507
7824
|
var {
|
|
7508
7825
|
getColor,
|
|
7509
7826
|
themeMode
|
|
@@ -7759,7 +8076,7 @@ var StateStyles = {
|
|
|
7759
8076
|
}
|
|
7760
8077
|
};
|
|
7761
8078
|
|
|
7762
|
-
var _excluded$
|
|
8079
|
+
var _excluded$t = ["id", "icon", "name", "label", "isChecked", "onChange", "onValueChange", "shadow", "labelPosition", "size", "error", "isSelected", "isHovered", "isDisabled", "isReadOnly", "isIndeterminate", "defaultIsSelected", "setIsSelected", "setIsHovered", "views", "infoText", "helperText"];
|
|
7763
8080
|
var CheckboxView = _ref => {
|
|
7764
8081
|
var {
|
|
7765
8082
|
id,
|
|
@@ -7786,7 +8103,7 @@ var CheckboxView = _ref => {
|
|
|
7786
8103
|
},
|
|
7787
8104
|
infoText
|
|
7788
8105
|
} = _ref,
|
|
7789
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8106
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
|
|
7790
8107
|
var handleHover = () => setIsHovered(!isHovered);
|
|
7791
8108
|
var handleChange = () => {
|
|
7792
8109
|
if (!isReadOnly && !isDisabled) {
|
|
@@ -9372,11 +9689,11 @@ var IconSizes$4 = {
|
|
|
9372
9689
|
xl: 16
|
|
9373
9690
|
};
|
|
9374
9691
|
|
|
9375
|
-
var _excluded$
|
|
9692
|
+
var _excluded$u = ["size"],
|
|
9376
9693
|
_excluded2$9 = ["size"],
|
|
9377
9694
|
_excluded3$7 = ["id", "name", "label", "value", "placeholder", "helperText", "hide", "error", "isHovered", "isFocused", "isAutoFocus", "isDisabled", "isReadOnly", "shadow", "newOptions", "size", "variant", "shape", "onChange", "onBlur", "setHide", "setNewOptions", "setIsHovered", "setIsFocused", "setValue", "views", "themeMode"];
|
|
9378
9695
|
var CountryList = _ref => {
|
|
9379
|
-
var props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9696
|
+
var props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
9380
9697
|
return /*#__PURE__*/React.createElement(Element, Object.assign({
|
|
9381
9698
|
as: "ul"
|
|
9382
9699
|
}, props));
|
|
@@ -9617,7 +9934,7 @@ var useDatePickerState = () => {
|
|
|
9617
9934
|
};
|
|
9618
9935
|
};
|
|
9619
9936
|
|
|
9620
|
-
var _excluded$
|
|
9937
|
+
var _excluded$v = ["id", "icon", "name", "label", "date", "children", "helperText", "shadow", "size", "variant", "shape", "views", "error", "isHovered", "isFocused", "isDisabled", "isReadOnly", "setDate", "setIsFocused", "setIsHovered", "onChange", "onChangeText"];
|
|
9621
9938
|
var DatePickerContent = props => /*#__PURE__*/React.createElement(Input, Object.assign({
|
|
9622
9939
|
type: "date"
|
|
9623
9940
|
}, props));
|
|
@@ -9650,7 +9967,7 @@ var DatePickerView = _ref => {
|
|
|
9650
9967
|
onChange,
|
|
9651
9968
|
onChangeText
|
|
9652
9969
|
} = _ref,
|
|
9653
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9970
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
|
|
9654
9971
|
var showLabel = !!(isFocused && label);
|
|
9655
9972
|
var handleHover = () => setIsHovered(!isHovered);
|
|
9656
9973
|
var handleFocus = () => setIsFocused(true);
|
|
@@ -9737,7 +10054,7 @@ var usePasswordState = props => {
|
|
|
9737
10054
|
}, props, textFieldStates);
|
|
9738
10055
|
};
|
|
9739
10056
|
|
|
9740
|
-
var _excluded$
|
|
10057
|
+
var _excluded$w = ["visibleIcon", "hiddenIcon"],
|
|
9741
10058
|
_excluded2$a = ["isVisible", "setIsVisible"];
|
|
9742
10059
|
var PasswordComponent = _ref => {
|
|
9743
10060
|
var {
|
|
@@ -9748,7 +10065,7 @@ var PasswordComponent = _ref => {
|
|
|
9748
10065
|
widthHeight: 14
|
|
9749
10066
|
})
|
|
9750
10067
|
} = _ref,
|
|
9751
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10068
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
|
|
9752
10069
|
var _usePasswordState = usePasswordState(props),
|
|
9753
10070
|
{
|
|
9754
10071
|
isVisible,
|
|
@@ -9802,7 +10119,7 @@ var useComboBoxState = (items, placeholder, searchPlaceholder) => {
|
|
|
9802
10119
|
};
|
|
9803
10120
|
};
|
|
9804
10121
|
|
|
9805
|
-
var _excluded$
|
|
10122
|
+
var _excluded$x = ["placeholder", "items", "showTick", "onSelect", "searchEnabled", "left", "right", "label", "filteredItems", "setSelectedItem", "selectedItem", "highlightedIndex", "setHighlightedIndex", "searchQuery", "setSearchQuery", "setFilteredItems", "views", "isDropdownVisible", "setIsDropdownVisible"];
|
|
9806
10123
|
// Defines the functional component 'ComboBoxView' with destructured props.
|
|
9807
10124
|
var ComboBoxView = _ref => {
|
|
9808
10125
|
var {
|
|
@@ -9827,7 +10144,7 @@ var ComboBoxView = _ref => {
|
|
|
9827
10144
|
setIsDropdownVisible
|
|
9828
10145
|
// Collects all further props not destructured explicitly.
|
|
9829
10146
|
} = _ref,
|
|
9830
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10147
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
9831
10148
|
// Sets up an effect to handle clicking outside the dropdown to close it.
|
|
9832
10149
|
useEffect(() => {
|
|
9833
10150
|
var handleClickOutside = event => {
|
|
@@ -9939,7 +10256,7 @@ var ComboBoxView = _ref => {
|
|
|
9939
10256
|
}))))))))))));
|
|
9940
10257
|
};
|
|
9941
10258
|
|
|
9942
|
-
var _excluded$
|
|
10259
|
+
var _excluded$y = ["id", "name", "items", "placeholder", "searchPlaceholder"];
|
|
9943
10260
|
// Defines the ComboBoxComponent functional component with ComboBoxProps
|
|
9944
10261
|
var ComboBoxComponent = _ref => {
|
|
9945
10262
|
var {
|
|
@@ -9955,7 +10272,7 @@ var ComboBoxComponent = _ref => {
|
|
|
9955
10272
|
searchPlaceholder
|
|
9956
10273
|
// Destructures the rest of the props not explicitly defined
|
|
9957
10274
|
} = _ref,
|
|
9958
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10275
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
9959
10276
|
// Initializes ComboBox state using custom hook with items and placeholders
|
|
9960
10277
|
var state = useComboBoxState(items, placeholder, searchPlaceholder);
|
|
9961
10278
|
return (
|
|
@@ -10277,7 +10594,7 @@ var useOTPInputState = _ref => {
|
|
|
10277
10594
|
};
|
|
10278
10595
|
};
|
|
10279
10596
|
|
|
10280
|
-
var _excluded$
|
|
10597
|
+
var _excluded$z = ["id", "name", "label", "value", "length", "onChange", "onChangeText", "onComplete", "helperText", "placeholder", "shadow", "views", "size", "shape", "variant", "gap", "type", "error", "isFocused", "isHovered", "isDisabled", "isReadOnly", "isAutoFocus", "setValue", "setIsFocused", "setIsHovered", "inputRef", "containerRef", "mirrorSelectionStart", "mirrorSelectionEnd", "setMirrorSelectionStart", "setMirrorSelectionEnd", "handlePaste", "handleChange", "handleFocus", "handleBlur", "handleKeyDown", "handleKeyPress", "secureTextEntry", "isFirstColumn", "stepValues", "setInputRef", "onBlur", "onClick", "onFocus"];
|
|
10281
10598
|
// Create a context for OTP input slots
|
|
10282
10599
|
var OTPInputContext = /*#__PURE__*/createContext({
|
|
10283
10600
|
slots: [],
|
|
@@ -10331,7 +10648,7 @@ var OTPInputView = _ref => {
|
|
|
10331
10648
|
onFocus = () => {}
|
|
10332
10649
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10333
10650
|
} = _ref,
|
|
10334
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10651
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
10335
10652
|
useTheme(); // Initialize theme context
|
|
10336
10653
|
var showLabel = !!label;
|
|
10337
10654
|
// Create context value for slots
|
|
@@ -10563,7 +10880,7 @@ var OTPInputComponent = props => {
|
|
|
10563
10880
|
};
|
|
10564
10881
|
var OTPInput = OTPInputComponent;
|
|
10565
10882
|
|
|
10566
|
-
var _excluded$
|
|
10883
|
+
var _excluded$A = ["children", "autoFocus", "initFocus", "onChange"];
|
|
10567
10884
|
var FocusContext = /*#__PURE__*/createContext({
|
|
10568
10885
|
active: false,
|
|
10569
10886
|
focusNextInput: () => {},
|
|
@@ -10579,7 +10896,7 @@ var FormikForm = _ref => {
|
|
|
10579
10896
|
initFocus,
|
|
10580
10897
|
onChange = () => {}
|
|
10581
10898
|
} = _ref,
|
|
10582
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10899
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
|
|
10583
10900
|
var formik = useFormikContext();
|
|
10584
10901
|
useEffect(() => {
|
|
10585
10902
|
onChange(formik.values);
|
|
@@ -10627,7 +10944,7 @@ var FormikForm = _ref => {
|
|
|
10627
10944
|
}, /*#__PURE__*/React.createElement(Form, Object.assign({}, props), children));
|
|
10628
10945
|
};
|
|
10629
10946
|
|
|
10630
|
-
var _excluded$
|
|
10947
|
+
var _excluded$B = ["name", "type"];
|
|
10631
10948
|
var getInputTypeProps = type => {
|
|
10632
10949
|
switch (type) {
|
|
10633
10950
|
case 'email':
|
|
@@ -10666,7 +10983,7 @@ var useFormikInput = _ref => {
|
|
|
10666
10983
|
name,
|
|
10667
10984
|
type
|
|
10668
10985
|
} = _ref,
|
|
10669
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10986
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
10670
10987
|
var focus = useFormFocus();
|
|
10671
10988
|
var {
|
|
10672
10989
|
touched,
|
|
@@ -10710,13 +11027,13 @@ var useFormikInput = _ref => {
|
|
|
10710
11027
|
} : {});
|
|
10711
11028
|
};
|
|
10712
11029
|
|
|
10713
|
-
var _excluded$
|
|
11030
|
+
var _excluded$C = ["value"];
|
|
10714
11031
|
var CheckboxComponent$1 = props => {
|
|
10715
11032
|
var _useFormikInput = useFormikInput(props),
|
|
10716
11033
|
{
|
|
10717
11034
|
value
|
|
10718
11035
|
} = _useFormikInput,
|
|
10719
|
-
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$
|
|
11036
|
+
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$C);
|
|
10720
11037
|
formProps.isChecked = value;
|
|
10721
11038
|
var checkboxStates = useCheckboxState(props);
|
|
10722
11039
|
return /*#__PURE__*/React.createElement(CheckboxView, Object.assign({}, checkboxStates, formProps));
|
|
@@ -10774,11 +11091,11 @@ var TextAreaComponent$1 = props => {
|
|
|
10774
11091
|
*/
|
|
10775
11092
|
var FormikTextArea = TextAreaComponent$1;
|
|
10776
11093
|
|
|
10777
|
-
var _excluded$
|
|
11094
|
+
var _excluded$D = ["value"];
|
|
10778
11095
|
var TextFieldComponent$1 = props => {
|
|
10779
11096
|
var formProps = useFormikInput(props);
|
|
10780
11097
|
var _useTextFieldState = useTextFieldState(props),
|
|
10781
|
-
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$
|
|
11098
|
+
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$D);
|
|
10782
11099
|
return /*#__PURE__*/React.createElement(TextFieldView, Object.assign({}, textFieldStates, formProps));
|
|
10783
11100
|
};
|
|
10784
11101
|
/**
|
|
@@ -10786,7 +11103,7 @@ var TextFieldComponent$1 = props => {
|
|
|
10786
11103
|
*/
|
|
10787
11104
|
var FormikTextField = TextFieldComponent$1;
|
|
10788
11105
|
|
|
10789
|
-
var _excluded$
|
|
11106
|
+
var _excluded$E = ["visibleIcon", "hiddenIcon"],
|
|
10790
11107
|
_excluded2$b = ["isVisible", "setIsVisible"];
|
|
10791
11108
|
var PasswordComponent$1 = _ref => {
|
|
10792
11109
|
var {
|
|
@@ -10797,7 +11114,7 @@ var PasswordComponent$1 = _ref => {
|
|
|
10797
11114
|
widthHeight: 14
|
|
10798
11115
|
})
|
|
10799
11116
|
} = _ref,
|
|
10800
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
11117
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$E);
|
|
10801
11118
|
var formProps = useFormikInput(props);
|
|
10802
11119
|
var _usePasswordState = usePasswordState(formProps),
|
|
10803
11120
|
{
|
|
@@ -10822,14 +11139,14 @@ var PasswordComponent$1 = _ref => {
|
|
|
10822
11139
|
*/
|
|
10823
11140
|
var FormikPassword = PasswordComponent$1;
|
|
10824
11141
|
|
|
10825
|
-
var _excluded$
|
|
11142
|
+
var _excluded$F = ["items", "placeholder", "searchPlaceholder"];
|
|
10826
11143
|
var ComboBoxComponent$1 = _ref => {
|
|
10827
11144
|
var {
|
|
10828
11145
|
items,
|
|
10829
11146
|
placeholder,
|
|
10830
11147
|
searchPlaceholder
|
|
10831
11148
|
} = _ref,
|
|
10832
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
11149
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$F);
|
|
10833
11150
|
var formProps = useFormikInput(props);
|
|
10834
11151
|
var ComboBoxStates = useComboBoxState(items, placeholder, searchPlaceholder);
|
|
10835
11152
|
// Ensure the onChange function from formProps is being called when an item is selected
|
|
@@ -11110,7 +11427,7 @@ var OrientationStyles = {
|
|
|
11110
11427
|
}
|
|
11111
11428
|
};
|
|
11112
11429
|
|
|
11113
|
-
var _excluded$
|
|
11430
|
+
var _excluded$G = ["min", "max", "step", "currentValue", "stepValues", "shape", "size", "variant", "orientation", "isDisabled", "showValue", "showTooltip", "backgroundColor", "label", "helperText", "themeMode", "shadow", "isDragging", "isHovered", "setIsHovered", "trackRef", "thumbRef", "handleThumbMouseDown", "handleTrackMouseDown", "handleKeyDown", "thumbPositionPercent", "ariaLabel", "views"];
|
|
11114
11431
|
var SliderView = _ref => {
|
|
11115
11432
|
var _views$tooltip, _views$tooltip2;
|
|
11116
11433
|
var {
|
|
@@ -11153,7 +11470,7 @@ var SliderView = _ref => {
|
|
|
11153
11470
|
tooltip: {}
|
|
11154
11471
|
}
|
|
11155
11472
|
} = _ref,
|
|
11156
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
11473
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
11157
11474
|
var {
|
|
11158
11475
|
getColor,
|
|
11159
11476
|
themeMode
|
|
@@ -12031,7 +12348,7 @@ var UploadView = _ref => {
|
|
|
12031
12348
|
}, views == null ? void 0 : views.view)));
|
|
12032
12349
|
};
|
|
12033
12350
|
|
|
12034
|
-
var _excluded$
|
|
12351
|
+
var _excluded$H = ["accept", "icon", "text", "maxSize", "onFileSelect", "validateFile", "isLoading", "progress", "fileType"];
|
|
12035
12352
|
var Uploader = _ref => {
|
|
12036
12353
|
var {
|
|
12037
12354
|
accept = '*/*',
|
|
@@ -12044,7 +12361,7 @@ var Uploader = _ref => {
|
|
|
12044
12361
|
progress = 0,
|
|
12045
12362
|
fileType
|
|
12046
12363
|
} = _ref,
|
|
12047
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12364
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
12048
12365
|
var {
|
|
12049
12366
|
previewUrl,
|
|
12050
12367
|
thumbnailUrl,
|
|
@@ -12235,7 +12552,7 @@ var ModalTypography = {
|
|
|
12235
12552
|
}
|
|
12236
12553
|
};
|
|
12237
12554
|
|
|
12238
|
-
var _excluded$
|
|
12555
|
+
var _excluded$I = ["children", "blur", "isOpen", "isClosePrevented", "onClose", "position", "views"],
|
|
12239
12556
|
_excluded2$c = ["children", "shadow", "isFullScreen", "shape", "views", "isOpen"],
|
|
12240
12557
|
_excluded3$8 = ["children", "buttonColor", "iconSize", "buttonPosition", "views"],
|
|
12241
12558
|
_excluded4$7 = ["children", "views"],
|
|
@@ -12250,7 +12567,7 @@ var ModalOverlay = _ref => {
|
|
|
12250
12567
|
position = 'center',
|
|
12251
12568
|
views
|
|
12252
12569
|
} = _ref,
|
|
12253
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12570
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
12254
12571
|
var handleClick = () => {
|
|
12255
12572
|
if (!isClosePrevented) onClose();
|
|
12256
12573
|
};
|
|
@@ -12546,7 +12863,7 @@ var NavigationMenuItemStates = {
|
|
|
12546
12863
|
}
|
|
12547
12864
|
};
|
|
12548
12865
|
|
|
12549
|
-
var _excluded$
|
|
12866
|
+
var _excluded$J = ["href", "children", "views"];
|
|
12550
12867
|
// Create context for the NavigationMenu
|
|
12551
12868
|
var NavigationMenuContext = /*#__PURE__*/createContext({
|
|
12552
12869
|
activeItemId: null,
|
|
@@ -12781,7 +13098,7 @@ var NavigationMenuLink = _ref6 => {
|
|
|
12781
13098
|
children,
|
|
12782
13099
|
views
|
|
12783
13100
|
} = _ref6,
|
|
12784
|
-
props = _objectWithoutPropertiesLoose(_ref6, _excluded$
|
|
13101
|
+
props = _objectWithoutPropertiesLoose(_ref6, _excluded$J);
|
|
12785
13102
|
var {
|
|
12786
13103
|
itemValue,
|
|
12787
13104
|
isDisabled
|
|
@@ -12848,7 +13165,7 @@ var NavigationMenuView = _ref7 => {
|
|
|
12848
13165
|
})))));
|
|
12849
13166
|
};
|
|
12850
13167
|
|
|
12851
|
-
var _excluded$
|
|
13168
|
+
var _excluded$K = ["items", "children", "orientation", "size", "variant", "defaultActiveItemId", "defaultExpandedItemIds", "onItemActivate", "views"];
|
|
12852
13169
|
/**
|
|
12853
13170
|
* NavigationMenu component for creating navigation menus with optional nested items.
|
|
12854
13171
|
* Supports both data-driven approach (with items prop) and compound component pattern.
|
|
@@ -12865,7 +13182,7 @@ var NavigationMenuComponent = _ref => {
|
|
|
12865
13182
|
onItemActivate,
|
|
12866
13183
|
views
|
|
12867
13184
|
} = _ref,
|
|
12868
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13185
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$K);
|
|
12869
13186
|
var {
|
|
12870
13187
|
activeItemId,
|
|
12871
13188
|
setActiveItemId,
|
|
@@ -13320,6 +13637,393 @@ var TabsComponent = _ref => {
|
|
|
13320
13637
|
// Export the component wrapped in React.memo for performance optimization
|
|
13321
13638
|
var Tabs = /*#__PURE__*/React.memo(TabsComponent);
|
|
13322
13639
|
|
|
13640
|
+
/**
|
|
13641
|
+
* Custom hook for managing Title component state
|
|
13642
|
+
*/
|
|
13643
|
+
var useTitleState = props => {
|
|
13644
|
+
var {
|
|
13645
|
+
children,
|
|
13646
|
+
// Original children
|
|
13647
|
+
_isInView = false,
|
|
13648
|
+
alternateHighlightText = [],
|
|
13649
|
+
alternateAnimation = false,
|
|
13650
|
+
// Default to false as per prop definition
|
|
13651
|
+
alternateDuration = 3000,
|
|
13652
|
+
highlightText: initialHighlightText,
|
|
13653
|
+
// Renamed to avoid confusion with the dynamic target
|
|
13654
|
+
highlightTypewriter = false,
|
|
13655
|
+
highlightTypewriterDuration = 1500
|
|
13656
|
+
} = props;
|
|
13657
|
+
// State for the final text to be displayed (could be original children or alternating text)
|
|
13658
|
+
var [finalDisplayedText, setFinalDisplayedText] = useState(children);
|
|
13659
|
+
// State for the text that should be actively highlighted (could be initialHighlightText or a word from alternateHighlightText)
|
|
13660
|
+
var [activeHighlightTarget, setActiveHighlightTarget] = useState(initialHighlightText);
|
|
13661
|
+
// We don't need state for typewriter text anymore as we're using the TypewriterEffect component
|
|
13662
|
+
// Handle alternating highlight text animation
|
|
13663
|
+
useEffect(() => {
|
|
13664
|
+
// If not using alternating animation or conditions not met, reset to initial/non-alternating state
|
|
13665
|
+
if (!alternateAnimation || alternateHighlightText.length === 0 || !_isInView || typeof children !== 'string' ||
|
|
13666
|
+
// Base text must be a string for replacement
|
|
13667
|
+
typeof initialHighlightText !== 'string' // Placeholder must be a string
|
|
13668
|
+
) {
|
|
13669
|
+
setFinalDisplayedText(children);
|
|
13670
|
+
setActiveHighlightTarget(initialHighlightText);
|
|
13671
|
+
return () => {};
|
|
13672
|
+
}
|
|
13673
|
+
// Proceed with alternating animation
|
|
13674
|
+
var baseText = children;
|
|
13675
|
+
var placeholder = initialHighlightText;
|
|
13676
|
+
var currentIndex = 0;
|
|
13677
|
+
// Function to update the state for alternating text
|
|
13678
|
+
var updateAlternatingState = index => {
|
|
13679
|
+
var currentWordToHighlight = alternateHighlightText[index];
|
|
13680
|
+
// Replace the placeholder in the baseText with the current alternating word
|
|
13681
|
+
var regex = new RegExp(placeholder, 'gi');
|
|
13682
|
+
var newContent = baseText.replace(regex, currentWordToHighlight);
|
|
13683
|
+
setFinalDisplayedText(newContent);
|
|
13684
|
+
setActiveHighlightTarget(currentWordToHighlight); // Set the current word as the highlight target
|
|
13685
|
+
};
|
|
13686
|
+
// Set initial alternating state
|
|
13687
|
+
updateAlternatingState(currentIndex);
|
|
13688
|
+
// Create interval to cycle through the alternateHighlightText array
|
|
13689
|
+
var interval = setInterval(() => {
|
|
13690
|
+
currentIndex = (currentIndex + 1) % alternateHighlightText.length;
|
|
13691
|
+
updateAlternatingState(currentIndex);
|
|
13692
|
+
}, alternateDuration);
|
|
13693
|
+
return () => clearInterval(interval);
|
|
13694
|
+
}, [alternateAnimation, alternateHighlightText, alternateDuration, initialHighlightText, children, _isInView]);
|
|
13695
|
+
// We don't need a separate effect for typewriter animation anymore
|
|
13696
|
+
// as we're using the TypewriterEffect component directly in the view
|
|
13697
|
+
return {
|
|
13698
|
+
finalDisplayedText,
|
|
13699
|
+
activeHighlightTarget,
|
|
13700
|
+
highlightTypewriter
|
|
13701
|
+
};
|
|
13702
|
+
};
|
|
13703
|
+
|
|
13704
|
+
/**
|
|
13705
|
+
* Font sizes for different title sizes
|
|
13706
|
+
*/
|
|
13707
|
+
var TitleSizes = {
|
|
13708
|
+
xs: 16,
|
|
13709
|
+
sm: 20,
|
|
13710
|
+
md: 24,
|
|
13711
|
+
lg: 32,
|
|
13712
|
+
xl: 40,
|
|
13713
|
+
'2xl': 48,
|
|
13714
|
+
'3xl': 56,
|
|
13715
|
+
'4xl': 64,
|
|
13716
|
+
'5xl': 72,
|
|
13717
|
+
'6xl': 80
|
|
13718
|
+
};
|
|
13719
|
+
/**
|
|
13720
|
+
* Line heights for different title sizes
|
|
13721
|
+
*/
|
|
13722
|
+
var LineHeights$1 = {
|
|
13723
|
+
xs: 24,
|
|
13724
|
+
sm: 28,
|
|
13725
|
+
md: 32,
|
|
13726
|
+
lg: 40,
|
|
13727
|
+
xl: 48,
|
|
13728
|
+
'2xl': 56,
|
|
13729
|
+
'3xl': 64,
|
|
13730
|
+
'4xl': 72,
|
|
13731
|
+
'5xl': 80,
|
|
13732
|
+
'6xl': 88
|
|
13733
|
+
};
|
|
13734
|
+
/**
|
|
13735
|
+
* Default styles for different highlight types
|
|
13736
|
+
*/
|
|
13737
|
+
var HighlightStyles = {
|
|
13738
|
+
underline: color => ({
|
|
13739
|
+
textDecoration: 'underline',
|
|
13740
|
+
textDecorationColor: color,
|
|
13741
|
+
textDecorationThickness: '4px',
|
|
13742
|
+
textUnderlineOffset: '4px'
|
|
13743
|
+
}),
|
|
13744
|
+
background: color => ({
|
|
13745
|
+
backgroundColor: color,
|
|
13746
|
+
color: 'color.white',
|
|
13747
|
+
padding: '0 8px',
|
|
13748
|
+
borderRadius: '4px'
|
|
13749
|
+
}),
|
|
13750
|
+
gradient: (color, secondaryColor) => ({
|
|
13751
|
+
background: "linear-gradient(135deg, " + color + ", " + (secondaryColor || color) + ")",
|
|
13752
|
+
backgroundClip: 'text',
|
|
13753
|
+
webkitBackgroundClip: 'text',
|
|
13754
|
+
color: 'transparent',
|
|
13755
|
+
webkitTextFillColor: 'transparent',
|
|
13756
|
+
display: 'inline-block',
|
|
13757
|
+
textShadow: 'none'
|
|
13758
|
+
}),
|
|
13759
|
+
outline: color => ({
|
|
13760
|
+
webkitTextStroke: "1px " + color,
|
|
13761
|
+
webkitTextFillColor: 'transparent',
|
|
13762
|
+
color: 'transparent',
|
|
13763
|
+
textShadow: 'none'
|
|
13764
|
+
}),
|
|
13765
|
+
glow: color => ({
|
|
13766
|
+
color: color,
|
|
13767
|
+
textShadow: "0 0 10px " + color + "80, 0 0 20px " + color + "40, 0 0 30px " + color + "20"
|
|
13768
|
+
})
|
|
13769
|
+
};
|
|
13770
|
+
|
|
13771
|
+
var _excluded$L = ["text", "typingSpeed", "pauseTime", "onComplete", "showCursor", "cursorColor", "textStyle", "as"];
|
|
13772
|
+
/**
|
|
13773
|
+
* A component that creates a typewriter effect for text
|
|
13774
|
+
*/
|
|
13775
|
+
var TypewriterEffect = _ref => {
|
|
13776
|
+
var {
|
|
13777
|
+
text,
|
|
13778
|
+
typingSpeed = 50,
|
|
13779
|
+
pauseTime = 500,
|
|
13780
|
+
onComplete,
|
|
13781
|
+
showCursor = true,
|
|
13782
|
+
cursorColor = 'currentColor',
|
|
13783
|
+
textStyle
|
|
13784
|
+
} = _ref,
|
|
13785
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$L);
|
|
13786
|
+
// Convert text to array if it's a string
|
|
13787
|
+
var textArray = Array.isArray(text) ? text : [text];
|
|
13788
|
+
// State for the currently displayed text
|
|
13789
|
+
var [displayedText, setDisplayedText] = useState(textArray.map(() => ''));
|
|
13790
|
+
// State to track if typing is complete
|
|
13791
|
+
var [isComplete, setIsComplete] = useState(false);
|
|
13792
|
+
// State to track which text item we're currently typing
|
|
13793
|
+
var [currentTextIndex, setCurrentTextIndex] = useState(0);
|
|
13794
|
+
// State to track the character position within the current text
|
|
13795
|
+
var [charIndex, setCharIndex] = useState(0);
|
|
13796
|
+
useEffect(() => {
|
|
13797
|
+
// Reset state when text changes
|
|
13798
|
+
setDisplayedText(textArray.map(() => ''));
|
|
13799
|
+
setIsComplete(false);
|
|
13800
|
+
setCurrentTextIndex(0);
|
|
13801
|
+
setCharIndex(0);
|
|
13802
|
+
}, [text]);
|
|
13803
|
+
useEffect(() => {
|
|
13804
|
+
// If all text is typed, call onComplete and return
|
|
13805
|
+
if (isComplete) {
|
|
13806
|
+
if (onComplete) onComplete();
|
|
13807
|
+
return;
|
|
13808
|
+
}
|
|
13809
|
+
// Get the current text we're typing
|
|
13810
|
+
var currentText = textArray[currentTextIndex];
|
|
13811
|
+
// If we've typed all characters in the current text
|
|
13812
|
+
if (charIndex >= currentText.length) {
|
|
13813
|
+
// If we've typed all texts, we're done
|
|
13814
|
+
if (currentTextIndex >= textArray.length - 1) {
|
|
13815
|
+
setIsComplete(true);
|
|
13816
|
+
return;
|
|
13817
|
+
}
|
|
13818
|
+
// Otherwise, move to the next text after a pause
|
|
13819
|
+
var _timeout = setTimeout(() => {
|
|
13820
|
+
setCurrentTextIndex(prev => prev + 1);
|
|
13821
|
+
setCharIndex(0);
|
|
13822
|
+
}, pauseTime);
|
|
13823
|
+
return () => clearTimeout(_timeout);
|
|
13824
|
+
}
|
|
13825
|
+
// Type the next character
|
|
13826
|
+
var timeout = setTimeout(() => {
|
|
13827
|
+
setDisplayedText(prev => {
|
|
13828
|
+
var newText = [...prev];
|
|
13829
|
+
newText[currentTextIndex] = currentText.substring(0, charIndex + 1);
|
|
13830
|
+
return newText;
|
|
13831
|
+
});
|
|
13832
|
+
setCharIndex(prev => prev + 1);
|
|
13833
|
+
}, typingSpeed);
|
|
13834
|
+
return () => clearTimeout(timeout);
|
|
13835
|
+
}, [textArray, currentTextIndex, charIndex, isComplete, onComplete, pauseTime, typingSpeed]);
|
|
13836
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, displayedText.map((text, index) => (/*#__PURE__*/React.createElement(React.Fragment, {
|
|
13837
|
+
key: index
|
|
13838
|
+
}, text, showCursor && index === currentTextIndex && !isComplete && (/*#__PURE__*/React.createElement(Text$1, {
|
|
13839
|
+
as: "span",
|
|
13840
|
+
display: "inline-block",
|
|
13841
|
+
width: "0.1em",
|
|
13842
|
+
height: "1em",
|
|
13843
|
+
backgroundColor: cursorColor,
|
|
13844
|
+
style: Object.assign({
|
|
13845
|
+
animation: 'blink 1s step-end infinite',
|
|
13846
|
+
verticalAlign: 'text-bottom',
|
|
13847
|
+
marginLeft: '1px'
|
|
13848
|
+
}, textStyle)
|
|
13849
|
+
}))))));
|
|
13850
|
+
};
|
|
13851
|
+
|
|
13852
|
+
var _excluded$M = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "centered", "views", "highlightAnimate", "animate", "highlightTypewriter", "highlightTypewriterDuration"];
|
|
13853
|
+
function escapeRegExp(string) {
|
|
13854
|
+
return string.replace(/[.*+?^${}()|[\\]\\/g, '\\$&');
|
|
13855
|
+
}
|
|
13856
|
+
var TitleView = _ref => {
|
|
13857
|
+
var {
|
|
13858
|
+
children,
|
|
13859
|
+
highlightText,
|
|
13860
|
+
highlightStyle = 'background',
|
|
13861
|
+
highlightColor = 'theme.primary',
|
|
13862
|
+
highlightSecondaryColor,
|
|
13863
|
+
size = 'xl',
|
|
13864
|
+
centered = false,
|
|
13865
|
+
views,
|
|
13866
|
+
highlightAnimate,
|
|
13867
|
+
animate,
|
|
13868
|
+
highlightTypewriter: propHighlightTypewriter = false,
|
|
13869
|
+
highlightTypewriterDuration = 3000
|
|
13870
|
+
} = _ref,
|
|
13871
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$M);
|
|
13872
|
+
var {
|
|
13873
|
+
ref,
|
|
13874
|
+
inView
|
|
13875
|
+
} = useInView();
|
|
13876
|
+
var {
|
|
13877
|
+
getColor,
|
|
13878
|
+
themeMode: ctxMode
|
|
13879
|
+
} = useTheme();
|
|
13880
|
+
var themeMode = props.themeMode || ctxMode;
|
|
13881
|
+
// Resolve colors, handling both theme colors and direct hex values
|
|
13882
|
+
var resolveColorValue = colorValue => {
|
|
13883
|
+
// If it's already a hex color, return it directly
|
|
13884
|
+
if (colorValue.startsWith('#')) {
|
|
13885
|
+
return colorValue;
|
|
13886
|
+
}
|
|
13887
|
+
// Otherwise, use the theme's getColor function
|
|
13888
|
+
return getColor(colorValue, {
|
|
13889
|
+
themeMode
|
|
13890
|
+
});
|
|
13891
|
+
};
|
|
13892
|
+
var resolvedColor = resolveColorValue(highlightColor);
|
|
13893
|
+
var resolvedSecondary = highlightSecondaryColor ? resolveColorValue(highlightSecondaryColor) : undefined;
|
|
13894
|
+
var {
|
|
13895
|
+
finalDisplayedText,
|
|
13896
|
+
activeHighlightTarget,
|
|
13897
|
+
highlightTypewriter
|
|
13898
|
+
} = useTitleState(Object.assign({
|
|
13899
|
+
children,
|
|
13900
|
+
highlightText,
|
|
13901
|
+
_isInView: inView,
|
|
13902
|
+
highlightTypewriter: propHighlightTypewriter,
|
|
13903
|
+
highlightTypewriterDuration
|
|
13904
|
+
}, props));
|
|
13905
|
+
var fontSize = TitleSizes[size];
|
|
13906
|
+
var lineHeight = LineHeights$1[size];
|
|
13907
|
+
// Get the text to display
|
|
13908
|
+
var text = typeof finalDisplayedText === 'string' ? finalDisplayedText : typeof children === 'string' ? children : '';
|
|
13909
|
+
if (typeof text === 'string' && activeHighlightTarget) {
|
|
13910
|
+
var pattern = new RegExp("(" + escapeRegExp(Array.isArray(activeHighlightTarget) ? activeHighlightTarget.join('|') : activeHighlightTarget) + ")", 'gi');
|
|
13911
|
+
var parts = [];
|
|
13912
|
+
var lastIndex = 0;
|
|
13913
|
+
var match;
|
|
13914
|
+
while (match = pattern.exec(text)) {
|
|
13915
|
+
if (match.index > lastIndex) {
|
|
13916
|
+
parts.push(text.substring(lastIndex, match.index));
|
|
13917
|
+
}
|
|
13918
|
+
parts.push({
|
|
13919
|
+
highlight: true,
|
|
13920
|
+
text: match[0]
|
|
13921
|
+
});
|
|
13922
|
+
lastIndex = match.index + match[0].length;
|
|
13923
|
+
}
|
|
13924
|
+
if (lastIndex < text.length) {
|
|
13925
|
+
parts.push(text.substring(lastIndex));
|
|
13926
|
+
}
|
|
13927
|
+
return /*#__PURE__*/React.createElement(Element, Object.assign({
|
|
13928
|
+
ref: ref,
|
|
13929
|
+
as: "h1",
|
|
13930
|
+
fontSize: fontSize,
|
|
13931
|
+
lineHeight: lineHeight + "px",
|
|
13932
|
+
fontWeight: "bold",
|
|
13933
|
+
textAlign: centered ? 'center' : 'left',
|
|
13934
|
+
animate: inView ? animate : undefined
|
|
13935
|
+
}, views == null ? void 0 : views.container, props), parts.map((part, idx) => typeof part === 'string' ? part : (/*#__PURE__*/React.createElement(Text$1, Object.assign({
|
|
13936
|
+
key: part.text + "-" + idx,
|
|
13937
|
+
as: "span",
|
|
13938
|
+
display: "inline",
|
|
13939
|
+
animate: inView ? highlightAnimate : undefined
|
|
13940
|
+
}, HighlightStyles[highlightStyle](resolvedColor, resolvedSecondary), views == null ? void 0 : views.highlight), highlightTypewriter ? (/*#__PURE__*/React.createElement(TypewriterEffect, {
|
|
13941
|
+
text: part.text,
|
|
13942
|
+
typingSpeed: Math.max(30, highlightTypewriterDuration / (part.text.length * 10)),
|
|
13943
|
+
showCursor: true,
|
|
13944
|
+
cursorColor: "currentColor"
|
|
13945
|
+
})) : part.text))));
|
|
13946
|
+
}
|
|
13947
|
+
// If highlightStyle is provided but no highlightText, apply the style to the entire title
|
|
13948
|
+
if (highlightStyle && !activeHighlightTarget) {
|
|
13949
|
+
return /*#__PURE__*/React.createElement(Element, Object.assign({
|
|
13950
|
+
ref: ref,
|
|
13951
|
+
as: "h1",
|
|
13952
|
+
fontSize: fontSize,
|
|
13953
|
+
lineHeight: lineHeight + "px",
|
|
13954
|
+
fontWeight: "bold",
|
|
13955
|
+
textAlign: centered ? 'center' : 'left',
|
|
13956
|
+
animate: inView ? animate : undefined
|
|
13957
|
+
}, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement(Text$1, Object.assign({
|
|
13958
|
+
as: "span",
|
|
13959
|
+
display: "inline",
|
|
13960
|
+
animate: inView ? highlightAnimate : undefined
|
|
13961
|
+
}, HighlightStyles[highlightStyle](resolvedColor, resolvedSecondary), views == null ? void 0 : views.highlight), highlightTypewriter ? (/*#__PURE__*/React.createElement(TypewriterEffect, {
|
|
13962
|
+
text: text,
|
|
13963
|
+
typingSpeed: Math.max(30, highlightTypewriterDuration / (text.length * 10)),
|
|
13964
|
+
showCursor: true,
|
|
13965
|
+
cursorColor: "currentColor"
|
|
13966
|
+
})) : text));
|
|
13967
|
+
}
|
|
13968
|
+
// Default case - no highlighting
|
|
13969
|
+
return /*#__PURE__*/React.createElement(Element, Object.assign({
|
|
13970
|
+
ref: ref,
|
|
13971
|
+
as: "h1",
|
|
13972
|
+
fontSize: fontSize,
|
|
13973
|
+
lineHeight: lineHeight + "px",
|
|
13974
|
+
fontWeight: "bold",
|
|
13975
|
+
textAlign: centered ? 'center' : 'left',
|
|
13976
|
+
animate: inView ? animate : undefined
|
|
13977
|
+
}, views == null ? void 0 : views.container, props), text);
|
|
13978
|
+
};
|
|
13979
|
+
|
|
13980
|
+
/**
|
|
13981
|
+
* Title Component
|
|
13982
|
+
*
|
|
13983
|
+
* A component for rendering animated and highlighted titles in hero sections.
|
|
13984
|
+
*
|
|
13985
|
+
* Features:
|
|
13986
|
+
* - Text highlighting with various styles (background, underline, gradient, outline, glow)
|
|
13987
|
+
* - Multiple animation options (fade, slide, typewriter, reveal)
|
|
13988
|
+
* - Responsive sizing
|
|
13989
|
+
* - Customizable styling
|
|
13990
|
+
*
|
|
13991
|
+
* @example
|
|
13992
|
+
* // Basic usage
|
|
13993
|
+
* <Title>Welcome to Our Platform</Title>
|
|
13994
|
+
*
|
|
13995
|
+
* @example
|
|
13996
|
+
* // With highlighting
|
|
13997
|
+
* <Title highlightText="Platform" highlightStyle="background" highlightColor="theme.primary">
|
|
13998
|
+
* Welcome to Our Platform
|
|
13999
|
+
* </Title>
|
|
14000
|
+
*
|
|
14001
|
+
* @example
|
|
14002
|
+
* // With animation
|
|
14003
|
+
* <Title
|
|
14004
|
+
* animation="fadeIn"
|
|
14005
|
+
* animationDuration="1.5s"
|
|
14006
|
+
* size="2xl"
|
|
14007
|
+
* >
|
|
14008
|
+
* Animated Title
|
|
14009
|
+
* </Title>
|
|
14010
|
+
*
|
|
14011
|
+
* @example
|
|
14012
|
+
* // With multiple highlights
|
|
14013
|
+
* <Title
|
|
14014
|
+
* highlightText={["Amazing", "Features"]}
|
|
14015
|
+
* highlightStyle="gradient"
|
|
14016
|
+
* highlightColor="theme.primary"
|
|
14017
|
+
* highlightSecondaryColor="theme.secondary"
|
|
14018
|
+
* >
|
|
14019
|
+
* Discover our Amazing Product with Great Features
|
|
14020
|
+
* </Title>
|
|
14021
|
+
*/
|
|
14022
|
+
var TitleComponent = props => {
|
|
14023
|
+
return /*#__PURE__*/React.createElement(TitleView, Object.assign({}, props));
|
|
14024
|
+
};
|
|
14025
|
+
var Title = TitleComponent;
|
|
14026
|
+
|
|
13323
14027
|
// Declares the useToggleState function which takes defaultToggled parameter to initialize the toggle state.
|
|
13324
14028
|
var useToggleState = defaultToggled => {
|
|
13325
14029
|
// Creates a stateful value isHovered for tracking hover state and a function setIsHovered to update that state, initially false.
|
|
@@ -13335,7 +14039,7 @@ var useToggleState = defaultToggled => {
|
|
|
13335
14039
|
};
|
|
13336
14040
|
};
|
|
13337
14041
|
|
|
13338
|
-
var _excluded$
|
|
14042
|
+
var _excluded$N = ["children", "shape", "variant", "isHovered", "setIsHovered", "isDisabled", "isToggle", "setIsToggled", "onToggle", "views"];
|
|
13339
14043
|
var ToggleView = _ref => {
|
|
13340
14044
|
var {
|
|
13341
14045
|
children,
|
|
@@ -13349,7 +14053,7 @@ var ToggleView = _ref => {
|
|
|
13349
14053
|
onToggle,
|
|
13350
14054
|
views
|
|
13351
14055
|
} = _ref,
|
|
13352
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
14056
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$N);
|
|
13353
14057
|
var toggleColor = !isDisabled ? 'color.trueGray.400' : 'theme.disabled';
|
|
13354
14058
|
var isActive = !!(isToggle || isHovered);
|
|
13355
14059
|
var toggleVariants = {
|
|
@@ -13392,7 +14096,7 @@ var ToggleView = _ref => {
|
|
|
13392
14096
|
}, toggleVariants[variant], props, views == null ? void 0 : views.container), children);
|
|
13393
14097
|
};
|
|
13394
14098
|
|
|
13395
|
-
var _excluded$
|
|
14099
|
+
var _excluded$O = ["children", "shape", "variant", "isDisabled", "isToggled", "onToggle"];
|
|
13396
14100
|
// Destructuring properties from ToggleProps to be used within the ToggleComponent.
|
|
13397
14101
|
var ToggleComponent = _ref => {
|
|
13398
14102
|
var {
|
|
@@ -13404,7 +14108,7 @@ var ToggleComponent = _ref => {
|
|
|
13404
14108
|
isToggled = false,
|
|
13405
14109
|
onToggle
|
|
13406
14110
|
} = _ref,
|
|
13407
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
14111
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$O);
|
|
13408
14112
|
// Initializing toggle state and set state functions using the custom hook useToggleState.
|
|
13409
14113
|
var {
|
|
13410
14114
|
isHovered,
|
|
@@ -13795,7 +14499,7 @@ var getDropdownPosition = function getDropdownPosition(side, align) {
|
|
|
13795
14499
|
return positions[side];
|
|
13796
14500
|
};
|
|
13797
14501
|
|
|
13798
|
-
var _excluded$
|
|
14502
|
+
var _excluded$P = ["children", "views"],
|
|
13799
14503
|
_excluded2$d = ["items", "side", "align", "views"],
|
|
13800
14504
|
_excluded3$9 = ["item", "views"],
|
|
13801
14505
|
_excluded4$8 = ["views"],
|
|
@@ -13833,7 +14537,7 @@ var DropdownMenuTrigger = _ref2 => {
|
|
|
13833
14537
|
children,
|
|
13834
14538
|
views
|
|
13835
14539
|
} = _ref2,
|
|
13836
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
14540
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$P);
|
|
13837
14541
|
var {
|
|
13838
14542
|
isOpen,
|
|
13839
14543
|
setIsOpen
|
|
@@ -13993,7 +14697,7 @@ var DropdownMenuView = _ref6 => {
|
|
|
13993
14697
|
}));
|
|
13994
14698
|
};
|
|
13995
14699
|
|
|
13996
|
-
var _excluded$
|
|
14700
|
+
var _excluded$Q = ["trigger", "items", "size", "variant", "side", "align", "defaultOpen", "views"];
|
|
13997
14701
|
/**
|
|
13998
14702
|
* DropdownMenu component for displaying a menu when clicking on a trigger element.
|
|
13999
14703
|
*/
|
|
@@ -14008,7 +14712,7 @@ var DropdownMenuComponent = _ref => {
|
|
|
14008
14712
|
defaultOpen = false,
|
|
14009
14713
|
views
|
|
14010
14714
|
} = _ref,
|
|
14011
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
14715
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$Q);
|
|
14012
14716
|
var {
|
|
14013
14717
|
isOpen,
|
|
14014
14718
|
setIsOpen,
|
|
@@ -14206,7 +14910,7 @@ var useRect = ref => {
|
|
|
14206
14910
|
return rect;
|
|
14207
14911
|
};
|
|
14208
14912
|
|
|
14209
|
-
var _excluded$
|
|
14913
|
+
var _excluded$R = ["children", "views", "asChild"],
|
|
14210
14914
|
_excluded2$e = ["children", "views", "side", "align", "sideOffset", "style", "backgroundColor", "borderRadius", "boxShadow", "padding", "minWidth", "maxWidth"];
|
|
14211
14915
|
// Create context for the HoverCard
|
|
14212
14916
|
var HoverCardContext = /*#__PURE__*/createContext({
|
|
@@ -14245,7 +14949,7 @@ var HoverCardTrigger = _ref2 => {
|
|
|
14245
14949
|
views,
|
|
14246
14950
|
asChild = false
|
|
14247
14951
|
} = _ref2,
|
|
14248
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
14952
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$R);
|
|
14249
14953
|
var {
|
|
14250
14954
|
openCard,
|
|
14251
14955
|
closeCard,
|
|
@@ -14332,7 +15036,7 @@ var HoverCardContent = _ref3 => {
|
|
|
14332
15036
|
}, views == null ? void 0 : views.container, props), children);
|
|
14333
15037
|
};
|
|
14334
15038
|
|
|
14335
|
-
var _excluded$
|
|
15039
|
+
var _excluded$S = ["children", "views", "openDelay", "closeDelay"];
|
|
14336
15040
|
/**
|
|
14337
15041
|
* HoverCard component displays floating content when hovering over a trigger element.
|
|
14338
15042
|
* Supports configurable open and close delays for a smoother user experience.
|
|
@@ -14344,7 +15048,7 @@ var HoverCardComponent = _ref => {
|
|
|
14344
15048
|
openDelay,
|
|
14345
15049
|
closeDelay
|
|
14346
15050
|
} = _ref,
|
|
14347
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15051
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$S);
|
|
14348
15052
|
var hoverCardState = useHoverCardState({
|
|
14349
15053
|
openDelay,
|
|
14350
15054
|
closeDelay
|
|
@@ -14474,7 +15178,7 @@ var getMenubarContentPosition = orientation => {
|
|
|
14474
15178
|
};
|
|
14475
15179
|
};
|
|
14476
15180
|
|
|
14477
|
-
var _excluded$
|
|
15181
|
+
var _excluded$T = ["children", "orientation", "size", "variant", "views"];
|
|
14478
15182
|
// Create context for the Menubar
|
|
14479
15183
|
var MenubarContext = /*#__PURE__*/createContext({
|
|
14480
15184
|
activeMenuId: null,
|
|
@@ -14508,7 +15212,7 @@ var MenubarRoot = _ref2 => {
|
|
|
14508
15212
|
variant = 'default',
|
|
14509
15213
|
views
|
|
14510
15214
|
} = _ref2,
|
|
14511
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
15215
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$T);
|
|
14512
15216
|
var Container = orientation === 'horizontal' ? Horizontal : Vertical;
|
|
14513
15217
|
return /*#__PURE__*/React.createElement(Container, Object.assign({
|
|
14514
15218
|
role: "menubar",
|
|
@@ -14694,7 +15398,7 @@ var MenubarView = _ref8 => {
|
|
|
14694
15398
|
})))))));
|
|
14695
15399
|
};
|
|
14696
15400
|
|
|
14697
|
-
var _excluded$
|
|
15401
|
+
var _excluded$U = ["items", "orientation", "size", "variant", "defaultActiveMenuId", "defaultOpenMenuId", "views"];
|
|
14698
15402
|
/**
|
|
14699
15403
|
* Menubar component for creating horizontal or vertical menu bars with dropdown menus.
|
|
14700
15404
|
*/
|
|
@@ -14708,7 +15412,7 @@ var MenubarComponent = _ref => {
|
|
|
14708
15412
|
defaultOpenMenuId = null,
|
|
14709
15413
|
views
|
|
14710
15414
|
} = _ref,
|
|
14711
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15415
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$U);
|
|
14712
15416
|
var {
|
|
14713
15417
|
activeMenuId,
|
|
14714
15418
|
setActiveMenuId,
|
|
@@ -14864,7 +15568,7 @@ var DisabledButtonStyles = {
|
|
|
14864
15568
|
}
|
|
14865
15569
|
};
|
|
14866
15570
|
|
|
14867
|
-
var _excluded$
|
|
15571
|
+
var _excluded$V = ["currentPage", "totalPages", "onPageChange", "pageSize", "pageSizeOptions", "onPageSizeChange", "showPageSizeSelector", "showPageInfo", "maxPageButtons", "showFirstLastButtons", "size", "variant", "shape", "visiblePageNumbers", "views"];
|
|
14868
15572
|
var PaginationView = _ref => {
|
|
14869
15573
|
var {
|
|
14870
15574
|
currentPage,
|
|
@@ -14895,7 +15599,7 @@ var PaginationView = _ref => {
|
|
|
14895
15599
|
visiblePageNumbers,
|
|
14896
15600
|
views
|
|
14897
15601
|
} = _ref,
|
|
14898
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15602
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$V);
|
|
14899
15603
|
var handlePageChange = page => {
|
|
14900
15604
|
if (page < 1 || page > totalPages || page === currentPage) {
|
|
14901
15605
|
return;
|
|
@@ -15014,7 +15718,7 @@ var PaginationView = _ref => {
|
|
|
15014
15718
|
}, option.label))))));
|
|
15015
15719
|
};
|
|
15016
15720
|
|
|
15017
|
-
var _excluded$
|
|
15721
|
+
var _excluded$W = ["currentPage", "totalPages", "onPageChange", "pageSize", "pageSizeOptions", "onPageSizeChange", "showPageSizeSelector", "showPageInfo", "maxPageButtons", "showFirstLastButtons", "size", "variant", "shape", "views"];
|
|
15018
15722
|
/**
|
|
15019
15723
|
* Pagination component for navigating through pages of content.
|
|
15020
15724
|
*/
|
|
@@ -15035,7 +15739,7 @@ var PaginationComponent = _ref => {
|
|
|
15035
15739
|
shape = 'rounded',
|
|
15036
15740
|
views
|
|
15037
15741
|
} = _ref,
|
|
15038
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15742
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$W);
|
|
15039
15743
|
var {
|
|
15040
15744
|
visiblePageNumbers
|
|
15041
15745
|
} = usePaginationState(currentPage, totalPages, maxPageButtons);
|
|
@@ -15105,7 +15809,7 @@ var DefaultSeparatorStyles = {
|
|
|
15105
15809
|
}
|
|
15106
15810
|
};
|
|
15107
15811
|
|
|
15108
|
-
var _excluded$
|
|
15812
|
+
var _excluded$X = ["orientation", "variant", "thickness", "color", "spacing", "label", "decorative", "views", "themeMode"];
|
|
15109
15813
|
var SeparatorView = _ref => {
|
|
15110
15814
|
var {
|
|
15111
15815
|
orientation = 'horizontal',
|
|
@@ -15117,7 +15821,7 @@ var SeparatorView = _ref => {
|
|
|
15117
15821
|
decorative = false,
|
|
15118
15822
|
views
|
|
15119
15823
|
} = _ref,
|
|
15120
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15824
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$X);
|
|
15121
15825
|
// Access theme if needed for future enhancements
|
|
15122
15826
|
var {
|
|
15123
15827
|
themeMode
|
|
@@ -15355,7 +16059,7 @@ var SidebarTransitions = {
|
|
|
15355
16059
|
bounce: 'width 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55), transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55)'
|
|
15356
16060
|
};
|
|
15357
16061
|
|
|
15358
|
-
var _excluded$
|
|
16062
|
+
var _excluded$Y = ["children", "showToggleButton", "views"],
|
|
15359
16063
|
_excluded2$f = ["children", "views"],
|
|
15360
16064
|
_excluded3$a = ["children", "views"],
|
|
15361
16065
|
_excluded4$9 = ["children", "position", "size", "variant", "fixed", "hasBackdrop", "expandedWidth", "collapsedWidth", "breakpointBehavior", "elevation", "transitionPreset", "ariaLabel", "isExpanded", "isMobile", "collapse", "views", "themeMode"];
|
|
@@ -15388,7 +16092,7 @@ var SidebarHeader = _ref2 => {
|
|
|
15388
16092
|
showToggleButton = true,
|
|
15389
16093
|
views
|
|
15390
16094
|
} = _ref2,
|
|
15391
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
16095
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$Y);
|
|
15392
16096
|
var {
|
|
15393
16097
|
isExpanded,
|
|
15394
16098
|
toggleExpanded,
|
|
@@ -15543,7 +16247,7 @@ var SidebarView = _ref5 => {
|
|
|
15543
16247
|
}))));
|
|
15544
16248
|
};
|
|
15545
16249
|
|
|
15546
|
-
var _excluded$
|
|
16250
|
+
var _excluded$Z = ["children", "position", "size", "variant", "defaultExpanded", "expanded", "onExpandedChange", "fixed", "hasBackdrop", "showToggleButton", "expandedWidth", "collapsedWidth", "breakpoint", "breakpointBehavior", "views"];
|
|
15547
16251
|
/**
|
|
15548
16252
|
* Sidebar component for creating collapsible, themeable and customizable sidebars.
|
|
15549
16253
|
*/
|
|
@@ -15565,7 +16269,7 @@ var SidebarComponent = _ref => {
|
|
|
15565
16269
|
breakpointBehavior = 'overlay',
|
|
15566
16270
|
views
|
|
15567
16271
|
} = _ref,
|
|
15568
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16272
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$Z);
|
|
15569
16273
|
var {
|
|
15570
16274
|
isExpanded,
|
|
15571
16275
|
toggleExpanded,
|
|
@@ -16030,7 +16734,7 @@ var HandleIconStyles = {
|
|
|
16030
16734
|
}
|
|
16031
16735
|
};
|
|
16032
16736
|
|
|
16033
|
-
var _excluded$
|
|
16737
|
+
var _excluded$_ = ["children", "id", "defaultSize", "minSize", "maxSize", "collapsible", "defaultCollapsed", "onCollapseChange", "views"],
|
|
16034
16738
|
_excluded2$g = ["id", "position", "disabled", "withVisualIndicator", "withCollapseButton", "collapseTarget", "views"],
|
|
16035
16739
|
_excluded3$b = ["children", "orientation", "size", "variant", "defaultSizes", "minSize", "maxSize", "collapsible", "containerRef", "autoSaveId", "views"];
|
|
16036
16740
|
// Create context for the Resizable component
|
|
@@ -16075,7 +16779,7 @@ var ResizablePanel = _ref2 => {
|
|
|
16075
16779
|
onCollapseChange,
|
|
16076
16780
|
views
|
|
16077
16781
|
} = _ref2,
|
|
16078
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
16782
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$_);
|
|
16079
16783
|
var {
|
|
16080
16784
|
orientation,
|
|
16081
16785
|
registerPanel,
|
|
@@ -16290,7 +16994,7 @@ var ResizableView = _ref4 => {
|
|
|
16290
16994
|
}, ResizableOrientations[orientation], views == null ? void 0 : views.container, props), children);
|
|
16291
16995
|
};
|
|
16292
16996
|
|
|
16293
|
-
var _excluded
|
|
16997
|
+
var _excluded$$ = ["children", "orientation", "size", "variant", "defaultSizes", "onSizesChange", "minSize", "maxSize", "collapsible", "autoSaveId", "storage", "keyboardResizeBy", "views"];
|
|
16294
16998
|
/**
|
|
16295
16999
|
* Resizable component for creating resizable panel groups and layouts.
|
|
16296
17000
|
*/
|
|
@@ -16310,7 +17014,7 @@ var ResizableComponent = _ref => {
|
|
|
16310
17014
|
keyboardResizeBy = 10,
|
|
16311
17015
|
views
|
|
16312
17016
|
} = _ref,
|
|
16313
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded
|
|
17017
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$$);
|
|
16314
17018
|
var {
|
|
16315
17019
|
isResizing,
|
|
16316
17020
|
setIsResizing,
|
|
@@ -17078,7 +17782,7 @@ var CommandFooterStyles = {
|
|
|
17078
17782
|
color: 'color.gray.500'
|
|
17079
17783
|
};
|
|
17080
17784
|
|
|
17081
|
-
var _excluded$
|
|
17785
|
+
var _excluded$10 = ["value", "onValueChange", "placeholder", "views"],
|
|
17082
17786
|
_excluded2$h = ["children", "views"],
|
|
17083
17787
|
_excluded3$c = ["heading", "children", "views"],
|
|
17084
17788
|
_excluded4$a = ["item", "selected", "onSelect", "views"],
|
|
@@ -17110,7 +17814,7 @@ var CommandInput = _ref2 => {
|
|
|
17110
17814
|
placeholder = 'Type a command or search...',
|
|
17111
17815
|
views
|
|
17112
17816
|
} = _ref2,
|
|
17113
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
17817
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$10);
|
|
17114
17818
|
var inputRef = useRef(null);
|
|
17115
17819
|
// Focus input when component mounts
|
|
17116
17820
|
React.useEffect(() => {
|
|
@@ -17293,7 +17997,7 @@ var CommandView = _ref7 => {
|
|
|
17293
17997
|
})))), footer && (/*#__PURE__*/React.createElement(View, Object.assign({}, CommandFooterStyles, views == null ? void 0 : views.footer), footer)))));
|
|
17294
17998
|
};
|
|
17295
17999
|
|
|
17296
|
-
var _excluded$
|
|
18000
|
+
var _excluded$11 = ["open", "onOpenChange", "groups", "commands", "placeholder", "size", "variant", "filter", "emptyState", "footer", "views"];
|
|
17297
18001
|
/**
|
|
17298
18002
|
* Command component for displaying a command palette with search functionality.
|
|
17299
18003
|
*/
|
|
@@ -17311,7 +18015,7 @@ var CommandComponent = _ref => {
|
|
|
17311
18015
|
footer,
|
|
17312
18016
|
views
|
|
17313
18017
|
} = _ref,
|
|
17314
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
18018
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$11);
|
|
17315
18019
|
var {
|
|
17316
18020
|
search,
|
|
17317
18021
|
setSearch,
|
|
@@ -17598,7 +18302,7 @@ var getArrowStyles = position => {
|
|
|
17598
18302
|
}
|
|
17599
18303
|
};
|
|
17600
18304
|
|
|
17601
|
-
var _excluded
|
|
18305
|
+
var _excluded$12 = ["children", "views", "asChild"],
|
|
17602
18306
|
_excluded2$i = ["children", "views"],
|
|
17603
18307
|
_excluded3$d = ["content", "children", "position", "align", "size", "variant", "showArrow", "views", "themeMode"];
|
|
17604
18308
|
// Create context for the Tooltip
|
|
@@ -17634,7 +18338,7 @@ var TooltipTrigger = _ref2 => {
|
|
|
17634
18338
|
views,
|
|
17635
18339
|
asChild = false
|
|
17636
18340
|
} = _ref2,
|
|
17637
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded
|
|
18341
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$12);
|
|
17638
18342
|
var {
|
|
17639
18343
|
openTooltip,
|
|
17640
18344
|
closeTooltip,
|
|
@@ -17727,7 +18431,7 @@ var TooltipView = _ref4 => {
|
|
|
17727
18431
|
}, TooltipSizes[size], TooltipVariants[variant], positionStyles, views == null ? void 0 : views.content), typeof content === 'string' ? (/*#__PURE__*/React.createElement(Text$1, Object.assign({}, views == null ? void 0 : views.text), content)) : content, showArrow && /*#__PURE__*/React.createElement(View, Object.assign({}, arrowStyles, views == null ? void 0 : views.arrow)))));
|
|
17728
18432
|
};
|
|
17729
18433
|
|
|
17730
|
-
var _excluded$
|
|
18434
|
+
var _excluded$13 = ["content", "children", "position", "align", "size", "variant", "openDelay", "closeDelay", "showArrow", "defaultOpen", "isDisabled", "views"];
|
|
17731
18435
|
/**
|
|
17732
18436
|
* Tooltip component for displaying additional information when hovering over an element.
|
|
17733
18437
|
* Supports configurable positions, delays, and styling.
|
|
@@ -17747,7 +18451,7 @@ var TooltipComponent = _ref => {
|
|
|
17747
18451
|
isDisabled = false,
|
|
17748
18452
|
views
|
|
17749
18453
|
} = _ref,
|
|
17750
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
18454
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$13);
|
|
17751
18455
|
var tooltipState = useTooltipState({
|
|
17752
18456
|
defaultOpen,
|
|
17753
18457
|
openDelay,
|
|
@@ -17771,5 +18475,5 @@ var Tooltip = TooltipComponent;
|
|
|
17771
18475
|
Tooltip.Trigger = TooltipTrigger;
|
|
17772
18476
|
Tooltip.Content = TooltipContent;
|
|
17773
18477
|
|
|
17774
|
-
export { Accordion, Alert, ArrowIcon, AspectRatio, Avatar, Badge, BatteryIcon, BluetoothIcon, BoldArrowIcon, BookmarkIcon, Button, CalendarIcon, CameraIcon, Card, Carousel, Chart, ChartIcon, Checkbox, ChevronIcon, ClockIcon, CloseEyeIcon, CloseIcon, CloudIcon, ComboBox, Command, ContextMenu, CopyIcon, CountryPicker, CropIcon, DatePicker, DeleteIcon, Divider, DocumentIcon, DownloadIcon, DragAndDrop, DragAndDropComponent, DragHandleIcon, DropdownMenu, DustBinIcon, EditIcon, ErrorIcon, ExternalLinkIcon, FacebookIcon, FileIcon, FileImage, FileSVG, FilterIcon, FormikCheckbox, FormikComboBox, FormikCountryPicker, FormikDatePicker, FormikForm, FormikOTPInput, FormikPassword, FormikSelect, FormikSlider, FormikSwitch, FormikTextArea, FormikTextField, HeartIcon, HelpIcon, HomeIcon, HoverCard, Icon, ImageIcon, InfoIcon, InstagramIcon, LikeIcon, Link, LinkedinIcon, Loader, LocationIcon, LockIcon, MagicWandIcon, MenuIcon, Menubar, MessageLayout, MessageView, MicrophoneIcon, MinusIcon, Modal, MoonIcon, NavigationMenu, NotificationIcon, OTPInput, OpenEyeIcon, Pagination, PanelIcon, Password, PauseIcon, PlayIcon, PlusIcon, PrintIcon, ProfileIcon, RefreshIcon, Resizable, RotateIcon, SaveIcon, SearchIcon, Select, Separator, SettingsIcon, ShapeIcon, ShareIcon, Sidebar, Slider, SliderIcon, SliderVerticalIcon, SpinnerIcon, StarIcon, SuccessIcon, Switch, Table, Tabs, Text, TextArea, TextField, TextIcon, ThreadsIcon, TickIcon, Toast, Toggle, ToggleGroup, Tooltip, TwitchIcon, TwitterIcon, UnLikeIcon, UnlockIcon, UploadIcon, Uploader, UserIcon, VideoIcon, WarningIcon, WifiIcon, XIcon, YoutubeIcon, ZoomInIcon, ZoomOutIcon, hideMessage, hideModal, showMessage, showModal, useMessageStore, useModalStore, useToast$1 as useToast };
|
|
18478
|
+
export { Accordion, Alert, ArrowIcon, AspectRatio, Avatar, Badge, BatteryIcon, BluetoothIcon, BoldArrowIcon, BookmarkIcon, Button, CalendarIcon, CameraIcon, Card, Carousel, Chart, ChartIcon, CheckIcon, Checkbox, ChevronIcon, ClockIcon, CloseEyeIcon, CloseIcon, CloudIcon, ComboBox, Command, ContextMenu, CookieConsent, CopyIcon, CountryPicker, CropIcon, DatePicker, DeleteIcon, Divider, DocumentIcon, DownloadIcon, DragAndDrop, DragAndDropComponent, DragHandleIcon, DropdownMenu, DustBinIcon, EditIcon, ErrorIcon, ExternalLinkIcon, FacebookIcon, FileIcon, FileImage, FileSVG, FilterIcon, FormikCheckbox, FormikComboBox, FormikCountryPicker, FormikDatePicker, FormikForm, FormikOTPInput, FormikPassword, FormikSelect, FormikSlider, FormikSwitch, FormikTextArea, FormikTextField, GiftIcon, HeartIcon, HelpIcon, HomeIcon, HoverCard, Icon, ImageIcon, InfoIcon, InstagramIcon, LikeIcon, Link, LinkedinIcon, Loader, LocationIcon, LockIcon, MagicWandIcon, MenuIcon, Menubar, MessageLayout, MessageView, MicrophoneIcon, MinusIcon, Modal, MoonIcon, NavigationMenu, NotificationIcon, OTPInput, OpenEyeIcon, Pagination, PanelIcon, Password, PauseIcon, PlayIcon, PlusIcon, PrintIcon, ProfileIcon, RefreshIcon, Resizable, RotateIcon, SaveIcon, SearchIcon, Select, Separator, SettingsIcon, ShapeIcon, ShareIcon, ShieldIcon, Sidebar, Slider, SliderIcon, SliderVerticalIcon, SpinnerIcon, StarIcon, SuccessIcon, Switch, Table, Tabs, Text, TextArea, TextField, TextIcon, ThreadsIcon, TickIcon, Title, Toast, Toggle, ToggleGroup, Tooltip, TwitchIcon, TwitterIcon, UnLikeIcon, UnlockIcon, UploadIcon, Uploader, UserIcon, VideoIcon, WarningIcon, WifiIcon, XIcon, YoutubeIcon, ZoomInIcon, ZoomOutIcon, hideMessage, hideModal, showMessage, showModal, useMessageStore, useModalStore, useToast$1 as useToast };
|
|
17775
18479
|
//# sourceMappingURL=web.esm.js.map
|