@app-studio/web 0.8.90 → 0.8.91
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 +89 -0
- package/dist/components/Title/Title/Title.state.d.ts +124 -0
- package/dist/components/Title/Title/Title.style.d.ts +25 -0
- package/dist/components/Title/Title/Title.type.d.ts +25 -0
- package/dist/components/Title/Title/Title.view.d.ts +9 -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/animationTest.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/gradientTest.d.ts +5 -0
- package/dist/components/Title/examples/hero.d.ts +5 -0
- package/dist/components/Title/examples/highlightTest.d.ts +5 -0
- package/dist/components/Title/examples/highlighted.d.ts +5 -0
- package/dist/components/Title/examples/index.d.ts +10 -0
- package/dist/components/Title/examples/responsive.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 +956 -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 +953 -135
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +957 -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
|
@@ -31,6 +31,7 @@ require('core-js/modules/web.url.js');
|
|
|
31
31
|
require('core-js/modules/web.url.to-json.js');
|
|
32
32
|
require('core-js/modules/web.url-search-params.js');
|
|
33
33
|
var zustand = require('zustand');
|
|
34
|
+
require('core-js/modules/es.string.replace.js');
|
|
34
35
|
require('core-js/modules/es.string.ends-with.js');
|
|
35
36
|
require('core-js/modules/es.string.match.js');
|
|
36
37
|
require('core-js/modules/es.string.search.js');
|
|
@@ -593,7 +594,7 @@ var TruncateText = _ref2 => {
|
|
|
593
594
|
n.style.lineHeight = lineHeight;
|
|
594
595
|
}
|
|
595
596
|
}, [text, maxLines]);
|
|
596
|
-
return /*#__PURE__*/React__default.createElement(appStudio.
|
|
597
|
+
return /*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
597
598
|
ref: containerRef,
|
|
598
599
|
overflow: "hidden" // Crucial for final display state
|
|
599
600
|
}, views == null ? void 0 : views.truncateText, rest, {
|
|
@@ -658,7 +659,7 @@ var Text = TextComponent;
|
|
|
658
659
|
|
|
659
660
|
var _excluded$3 = ["widthHeight", "color", "transform", "orientation", "children"],
|
|
660
661
|
_excluded2$2 = ["widthHeight", "color", "filled", "strokeWidth"],
|
|
661
|
-
_excluded3$1 = ["widthHeight", "color", "
|
|
662
|
+
_excluded3$1 = ["widthHeight", "color", "strokeWidth", "filled"],
|
|
662
663
|
_excluded4$1 = ["widthHeight", "color", "filled", "strokeWidth"],
|
|
663
664
|
_excluded5 = ["widthHeight", "color", "filled", "strokeWidth"],
|
|
664
665
|
_excluded6 = ["widthHeight", "color", "filled", "strokeWidth"],
|
|
@@ -732,7 +733,9 @@ var _excluded$3 = ["widthHeight", "color", "transform", "orientation", "children
|
|
|
732
733
|
_excluded74 = ["widthHeight", "color", "strokeWidth", "filled"],
|
|
733
734
|
_excluded75 = ["widthHeight", "color", "strokeWidth", "filled"],
|
|
734
735
|
_excluded76 = ["widthHeight", "color", "strokeWidth", "filled"],
|
|
735
|
-
_excluded77 = ["widthHeight", "color", "strokeWidth", "filled"]
|
|
736
|
+
_excluded77 = ["widthHeight", "color", "strokeWidth", "filled"],
|
|
737
|
+
_excluded78 = ["widthHeight", "color", "strokeWidth", "filled"],
|
|
738
|
+
_excluded79 = ["widthHeight", "color", "strokeWidth", "filled"];
|
|
736
739
|
// Default wrapper component for consistent sizing and styling
|
|
737
740
|
var IconWrapper = _ref => {
|
|
738
741
|
var {
|
|
@@ -787,8 +790,8 @@ var HelpIcon = _ref3 => {
|
|
|
787
790
|
var {
|
|
788
791
|
widthHeight = 24,
|
|
789
792
|
color = 'currentColor',
|
|
790
|
-
|
|
791
|
-
|
|
793
|
+
strokeWidth = 1,
|
|
794
|
+
filled = false
|
|
792
795
|
} = _ref3,
|
|
793
796
|
props = _objectWithoutPropertiesLoose(_ref3, _excluded3$1);
|
|
794
797
|
return /*#__PURE__*/React__default.createElement(IconWrapper, Object.assign({
|
|
@@ -796,10 +799,19 @@ var HelpIcon = _ref3 => {
|
|
|
796
799
|
color: color
|
|
797
800
|
}, props), /*#__PURE__*/React__default.createElement("svg", Object.assign({
|
|
798
801
|
viewBox: "0 0 24 24",
|
|
799
|
-
"aria-hidden": "
|
|
802
|
+
"aria-hidden": "false",
|
|
800
803
|
focusable: "false"
|
|
801
|
-
}, getSvgProps(filled, color, strokeWidth)), /*#__PURE__*/React__default.createElement("
|
|
802
|
-
|
|
804
|
+
}, getSvgProps(filled, color, strokeWidth)), /*#__PURE__*/React__default.createElement("circle", {
|
|
805
|
+
cx: "12",
|
|
806
|
+
cy: "12",
|
|
807
|
+
r: "10"
|
|
808
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
809
|
+
d: "M9.09 9a3 3 0 1 1 5.91 1c0 2-3 3-3 3"
|
|
810
|
+
}), /*#__PURE__*/React__default.createElement("line", {
|
|
811
|
+
x1: "12",
|
|
812
|
+
y1: "17",
|
|
813
|
+
x2: "12",
|
|
814
|
+
y2: "17"
|
|
803
815
|
})));
|
|
804
816
|
};
|
|
805
817
|
// Example Icon Component: ChevronIcon
|
|
@@ -1779,31 +1791,13 @@ var PanelIcon = _ref40 => {
|
|
|
1779
1791
|
"aria-hidden": "false",
|
|
1780
1792
|
focusable: "false"
|
|
1781
1793
|
}, getSvgProps(filled, color, strokeWidth)), /*#__PURE__*/React__default.createElement("rect", {
|
|
1782
|
-
x: "3",
|
|
1783
|
-
y: "3",
|
|
1784
1794
|
width: "18",
|
|
1785
1795
|
height: "18",
|
|
1796
|
+
x: "3",
|
|
1797
|
+
y: "3",
|
|
1786
1798
|
rx: "2"
|
|
1787
|
-
}), /*#__PURE__*/React__default.createElement("
|
|
1788
|
-
|
|
1789
|
-
y1: "3",
|
|
1790
|
-
x2: "9",
|
|
1791
|
-
y2: "21"
|
|
1792
|
-
}), /*#__PURE__*/React__default.createElement("line", {
|
|
1793
|
-
x1: "12",
|
|
1794
|
-
y1: "7",
|
|
1795
|
-
x2: "17",
|
|
1796
|
-
y2: "7"
|
|
1797
|
-
}), /*#__PURE__*/React__default.createElement("line", {
|
|
1798
|
-
x1: "12",
|
|
1799
|
-
y1: "11",
|
|
1800
|
-
x2: "17",
|
|
1801
|
-
y2: "11"
|
|
1802
|
-
}), /*#__PURE__*/React__default.createElement("line", {
|
|
1803
|
-
x1: "12",
|
|
1804
|
-
y1: "15",
|
|
1805
|
-
x2: "17",
|
|
1806
|
-
y2: "15"
|
|
1799
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
1800
|
+
d: "M9 3v18"
|
|
1807
1801
|
})));
|
|
1808
1802
|
};
|
|
1809
1803
|
var FilterIcon = _ref41 => {
|
|
@@ -2756,6 +2750,59 @@ var ChartIcon = _ref77 => {
|
|
|
2756
2750
|
y2: "17"
|
|
2757
2751
|
})));
|
|
2758
2752
|
};
|
|
2753
|
+
var GiftIcon = _ref78 => {
|
|
2754
|
+
var {
|
|
2755
|
+
widthHeight = 24,
|
|
2756
|
+
color = 'currentColor',
|
|
2757
|
+
strokeWidth = 1,
|
|
2758
|
+
filled = false
|
|
2759
|
+
} = _ref78,
|
|
2760
|
+
props = _objectWithoutPropertiesLoose(_ref78, _excluded78);
|
|
2761
|
+
return /*#__PURE__*/React__default.createElement(IconWrapper, Object.assign({
|
|
2762
|
+
widthHeight: widthHeight,
|
|
2763
|
+
color: color
|
|
2764
|
+
}, props), /*#__PURE__*/React__default.createElement("svg", Object.assign({
|
|
2765
|
+
viewBox: "0 0 24 24",
|
|
2766
|
+
"aria-hidden": "false",
|
|
2767
|
+
focusable: "false"
|
|
2768
|
+
}, getSvgProps(filled, color, strokeWidth)), /*#__PURE__*/React__default.createElement("rect", {
|
|
2769
|
+
x: "3",
|
|
2770
|
+
y: "8",
|
|
2771
|
+
width: "18",
|
|
2772
|
+
height: "4",
|
|
2773
|
+
rx: "1"
|
|
2774
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
2775
|
+
d: "M12 8V21"
|
|
2776
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
2777
|
+
d: "M3 12v6a3 3 0 0 0 3 3h3V12"
|
|
2778
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
2779
|
+
d: "M18 21h-3v-9h6v6a3 3 0 0 1-3 3z"
|
|
2780
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
2781
|
+
d: "M12 8c-.5-2.5-4-3-5-1.5S9 10 12 8z"
|
|
2782
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
2783
|
+
d: "M12 8c.5-2.5 4-3 5-1.5S15 10 12 8z"
|
|
2784
|
+
})));
|
|
2785
|
+
};
|
|
2786
|
+
var ShieldIcon = _ref79 => {
|
|
2787
|
+
var {
|
|
2788
|
+
widthHeight = 24,
|
|
2789
|
+
color = 'currentColor',
|
|
2790
|
+
strokeWidth = 1,
|
|
2791
|
+
filled = true
|
|
2792
|
+
} = _ref79,
|
|
2793
|
+
props = _objectWithoutPropertiesLoose(_ref79, _excluded79);
|
|
2794
|
+
return /*#__PURE__*/React__default.createElement(IconWrapper, Object.assign({
|
|
2795
|
+
widthHeight: widthHeight,
|
|
2796
|
+
color: color
|
|
2797
|
+
}, props), /*#__PURE__*/React__default.createElement("svg", Object.assign({
|
|
2798
|
+
viewBox: "0 0 24 24",
|
|
2799
|
+
"aria-hidden": "false",
|
|
2800
|
+
focusable: "false"
|
|
2801
|
+
}, getSvgProps(filled, color, strokeWidth)), /*#__PURE__*/React__default.createElement("path", {
|
|
2802
|
+
d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"
|
|
2803
|
+
})));
|
|
2804
|
+
};
|
|
2805
|
+
var CheckIcon = TickIcon;
|
|
2759
2806
|
|
|
2760
2807
|
var Icon = {
|
|
2761
2808
|
__proto__: null,
|
|
@@ -2835,7 +2882,10 @@ var Icon = {
|
|
|
2835
2882
|
ShapeIcon: ShapeIcon,
|
|
2836
2883
|
RotateIcon: RotateIcon,
|
|
2837
2884
|
DocumentIcon: DocumentIcon,
|
|
2838
|
-
ChartIcon: ChartIcon
|
|
2885
|
+
ChartIcon: ChartIcon,
|
|
2886
|
+
GiftIcon: GiftIcon,
|
|
2887
|
+
ShieldIcon: ShieldIcon,
|
|
2888
|
+
CheckIcon: CheckIcon
|
|
2839
2889
|
};
|
|
2840
2890
|
|
|
2841
2891
|
/**
|
|
@@ -5581,6 +5631,273 @@ var ChartComponent = props => {
|
|
|
5581
5631
|
};
|
|
5582
5632
|
var Chart = ChartComponent;
|
|
5583
5633
|
|
|
5634
|
+
/**
|
|
5635
|
+
* Custom hook to manage cookie consent state
|
|
5636
|
+
* @param cookieExpiration Number of days until the cookie expires
|
|
5637
|
+
* @returns State and functions for managing cookie consent
|
|
5638
|
+
*/
|
|
5639
|
+
var useCookieConsentState = function useCookieConsentState(cookieExpiration) {
|
|
5640
|
+
if (cookieExpiration === void 0) {
|
|
5641
|
+
cookieExpiration = 365;
|
|
5642
|
+
}
|
|
5643
|
+
// State for hover effects
|
|
5644
|
+
var [isHovered, setIsHovered] = React.useState(false);
|
|
5645
|
+
// State for tracking if consent has been given
|
|
5646
|
+
var [hasConsent, setHasConsent] = React.useState(null);
|
|
5647
|
+
// Cookie name for storing consent
|
|
5648
|
+
var COOKIE_CONSENT_KEY = 'app-studio-cookie-consent';
|
|
5649
|
+
// Check for existing consent when component mounts
|
|
5650
|
+
React.useEffect(() => {
|
|
5651
|
+
var storedConsent = localStorage.getItem(COOKIE_CONSENT_KEY);
|
|
5652
|
+
if (storedConsent !== null) {
|
|
5653
|
+
setHasConsent(storedConsent === 'true');
|
|
5654
|
+
} else {
|
|
5655
|
+
setHasConsent(false);
|
|
5656
|
+
}
|
|
5657
|
+
}, []);
|
|
5658
|
+
/**
|
|
5659
|
+
* Save consent to localStorage with expiration
|
|
5660
|
+
*/
|
|
5661
|
+
var saveConsent = consent => {
|
|
5662
|
+
localStorage.setItem(COOKIE_CONSENT_KEY, String(consent));
|
|
5663
|
+
// Set expiration date
|
|
5664
|
+
var expirationDate = new Date();
|
|
5665
|
+
expirationDate.setDate(expirationDate.getDate() + cookieExpiration);
|
|
5666
|
+
localStorage.setItem(COOKIE_CONSENT_KEY + "-expires", expirationDate.toISOString());
|
|
5667
|
+
setHasConsent(consent);
|
|
5668
|
+
};
|
|
5669
|
+
/**
|
|
5670
|
+
* Accept cookies
|
|
5671
|
+
*/
|
|
5672
|
+
var acceptCookies = () => {
|
|
5673
|
+
saveConsent(true);
|
|
5674
|
+
};
|
|
5675
|
+
/**
|
|
5676
|
+
* Reset cookie consent (for testing)
|
|
5677
|
+
*/
|
|
5678
|
+
var resetConsent = () => {
|
|
5679
|
+
localStorage.removeItem(COOKIE_CONSENT_KEY);
|
|
5680
|
+
localStorage.removeItem(COOKIE_CONSENT_KEY + "-expires");
|
|
5681
|
+
setHasConsent(false);
|
|
5682
|
+
};
|
|
5683
|
+
return {
|
|
5684
|
+
isHovered,
|
|
5685
|
+
setIsHovered,
|
|
5686
|
+
hasConsent,
|
|
5687
|
+
acceptCookies,
|
|
5688
|
+
resetConsent
|
|
5689
|
+
};
|
|
5690
|
+
};
|
|
5691
|
+
|
|
5692
|
+
/**
|
|
5693
|
+
* Get theme-based styles for the CookieConsent component
|
|
5694
|
+
*/
|
|
5695
|
+
var getThemes$1 = themeMode => {
|
|
5696
|
+
var isDark = themeMode === 'dark';
|
|
5697
|
+
return {
|
|
5698
|
+
default: {
|
|
5699
|
+
container: {
|
|
5700
|
+
backgroundColor: isDark ? '#1f2937' : '#ffffff',
|
|
5701
|
+
borderColor: isDark ? '#374151' : '#e5e7eb',
|
|
5702
|
+
boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)'
|
|
5703
|
+
},
|
|
5704
|
+
content: {
|
|
5705
|
+
color: isDark ? '#e5e7eb' : '#1f2937'
|
|
5706
|
+
},
|
|
5707
|
+
acceptButton: {
|
|
5708
|
+
backgroundColor: '#3b82f6',
|
|
5709
|
+
color: '#ffffff',
|
|
5710
|
+
hoverBackgroundColor: '#2563eb'
|
|
5711
|
+
},
|
|
5712
|
+
customizeButton: {
|
|
5713
|
+
backgroundColor: 'transparent',
|
|
5714
|
+
color: isDark ? '#e5e7eb' : '#4b5563',
|
|
5715
|
+
borderColor: isDark ? '#4b5563' : '#d1d5db',
|
|
5716
|
+
hoverBackgroundColor: isDark ? '#374151' : '#f3f4f6'
|
|
5717
|
+
}
|
|
5718
|
+
},
|
|
5719
|
+
info: {
|
|
5720
|
+
container: {
|
|
5721
|
+
backgroundColor: isDark ? '#1e3a8a' : '#eff6ff',
|
|
5722
|
+
borderColor: isDark ? '#1e40af' : '#bfdbfe',
|
|
5723
|
+
boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)'
|
|
5724
|
+
},
|
|
5725
|
+
content: {
|
|
5726
|
+
color: isDark ? '#bfdbfe' : '#1e40af'
|
|
5727
|
+
},
|
|
5728
|
+
acceptButton: {
|
|
5729
|
+
backgroundColor: '#3b82f6',
|
|
5730
|
+
color: '#ffffff',
|
|
5731
|
+
hoverBackgroundColor: '#2563eb'
|
|
5732
|
+
},
|
|
5733
|
+
customizeButton: {
|
|
5734
|
+
backgroundColor: 'transparent',
|
|
5735
|
+
color: isDark ? '#bfdbfe' : '#1e40af',
|
|
5736
|
+
borderColor: isDark ? '#3b82f6' : '#93c5fd',
|
|
5737
|
+
hoverBackgroundColor: isDark ? '#1e40af' : '#dbeafe'
|
|
5738
|
+
}
|
|
5739
|
+
},
|
|
5740
|
+
primary: {
|
|
5741
|
+
container: {
|
|
5742
|
+
backgroundColor: isDark ? '#0c4a6e' : '#f0f9ff',
|
|
5743
|
+
borderColor: isDark ? '#0369a1' : '#bae6fd',
|
|
5744
|
+
boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)'
|
|
5745
|
+
},
|
|
5746
|
+
content: {
|
|
5747
|
+
color: isDark ? '#bae6fd' : '#0369a1'
|
|
5748
|
+
},
|
|
5749
|
+
acceptButton: {
|
|
5750
|
+
backgroundColor: '#0ea5e9',
|
|
5751
|
+
color: '#ffffff',
|
|
5752
|
+
hoverBackgroundColor: '#0284c7'
|
|
5753
|
+
},
|
|
5754
|
+
customizeButton: {
|
|
5755
|
+
backgroundColor: 'transparent',
|
|
5756
|
+
color: isDark ? '#bae6fd' : '#0369a1',
|
|
5757
|
+
borderColor: isDark ? '#0ea5e9' : '#7dd3fc',
|
|
5758
|
+
hoverBackgroundColor: isDark ? '#0369a1' : '#e0f2fe'
|
|
5759
|
+
}
|
|
5760
|
+
}
|
|
5761
|
+
};
|
|
5762
|
+
};
|
|
5763
|
+
|
|
5764
|
+
var _excluded$e = ["title", "description", "acceptButtonText", "customizeButtonText", "position", "variant", "onAccept", "onCustomize", "views", "showCustomizeButton", "cookieExpiration", "themeMode"];
|
|
5765
|
+
/**
|
|
5766
|
+
* CookieConsent View Component
|
|
5767
|
+
*
|
|
5768
|
+
* Renders a cookie consent banner with customizable styling, position, and content.
|
|
5769
|
+
*/
|
|
5770
|
+
var CookieConsentView = _ref => {
|
|
5771
|
+
var {
|
|
5772
|
+
title = 'Nous utilisons des cookies',
|
|
5773
|
+
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é.',
|
|
5774
|
+
acceptButtonText = 'Accepter',
|
|
5775
|
+
customizeButtonText = 'Personnaliser',
|
|
5776
|
+
position = 'bottom',
|
|
5777
|
+
variant = 'default',
|
|
5778
|
+
onAccept,
|
|
5779
|
+
onCustomize,
|
|
5780
|
+
views,
|
|
5781
|
+
showCustomizeButton = true,
|
|
5782
|
+
cookieExpiration = 365,
|
|
5783
|
+
themeMode: propThemeMode
|
|
5784
|
+
} = _ref,
|
|
5785
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
5786
|
+
// Get theme context
|
|
5787
|
+
var {
|
|
5788
|
+
themeMode: contextThemeMode
|
|
5789
|
+
} = appStudio.useTheme();
|
|
5790
|
+
// Use provided theme mode or fall back to context
|
|
5791
|
+
var themeMode = propThemeMode || contextThemeMode || 'light';
|
|
5792
|
+
// Get state and functions from custom hook
|
|
5793
|
+
var {
|
|
5794
|
+
hasConsent,
|
|
5795
|
+
acceptCookies
|
|
5796
|
+
} = useCookieConsentState(cookieExpiration);
|
|
5797
|
+
// Get theme-based styles
|
|
5798
|
+
var themes = getThemes$1(themeMode);
|
|
5799
|
+
var themeStyles = themes[variant];
|
|
5800
|
+
// If user has already given consent, don't show the banner
|
|
5801
|
+
if (hasConsent) {
|
|
5802
|
+
return null;
|
|
5803
|
+
}
|
|
5804
|
+
// Handle accept button click
|
|
5805
|
+
var handleAccept = () => {
|
|
5806
|
+
acceptCookies();
|
|
5807
|
+
if (onAccept) {
|
|
5808
|
+
onAccept();
|
|
5809
|
+
}
|
|
5810
|
+
};
|
|
5811
|
+
// Handle customize button click
|
|
5812
|
+
var handleCustomize = () => {
|
|
5813
|
+
if (onCustomize) {
|
|
5814
|
+
onCustomize();
|
|
5815
|
+
}
|
|
5816
|
+
};
|
|
5817
|
+
return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
5818
|
+
position: "fixed",
|
|
5819
|
+
left: 16,
|
|
5820
|
+
right: 16,
|
|
5821
|
+
zIndex: 1000,
|
|
5822
|
+
padding: 16,
|
|
5823
|
+
borderWidth: "1px",
|
|
5824
|
+
borderStyle: "solid",
|
|
5825
|
+
borderRadius: 8,
|
|
5826
|
+
maxWidth: "800px",
|
|
5827
|
+
marginX: "auto"
|
|
5828
|
+
}, position === 'bottom' ? {
|
|
5829
|
+
bottom: 16
|
|
5830
|
+
} : {
|
|
5831
|
+
top: 16
|
|
5832
|
+
}, themeStyles.container, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement(appStudio.Vertical, {
|
|
5833
|
+
gap: 12,
|
|
5834
|
+
maxWidth: 1200,
|
|
5835
|
+
marginX: "auto"
|
|
5836
|
+
}, title && (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
5837
|
+
fontWeight: "bold",
|
|
5838
|
+
fontSize: 18,
|
|
5839
|
+
color: "color.black"
|
|
5840
|
+
}, views == null ? void 0 : views.title), title)), description && (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
5841
|
+
fontSize: 14,
|
|
5842
|
+
color: "color.black"
|
|
5843
|
+
}, views == null ? void 0 : views.description), typeof description === 'string' ? description : description)), /*#__PURE__*/React__default.createElement(appStudio.Horizontal, Object.assign({
|
|
5844
|
+
gap: 12,
|
|
5845
|
+
justifyContent: "flex-end",
|
|
5846
|
+
marginTop: 8
|
|
5847
|
+
}, views == null ? void 0 : views.buttonGroup), showCustomizeButton && (/*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
5848
|
+
variant: "outline",
|
|
5849
|
+
onClick: handleCustomize,
|
|
5850
|
+
size: "sm"
|
|
5851
|
+
}, views == null ? void 0 : views.customizeButton), customizeButtonText)), /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
5852
|
+
variant: "primary",
|
|
5853
|
+
onClick: handleAccept,
|
|
5854
|
+
size: "sm"
|
|
5855
|
+
}, views == null ? void 0 : views.acceptButton), acceptButtonText))));
|
|
5856
|
+
};
|
|
5857
|
+
|
|
5858
|
+
/**
|
|
5859
|
+
* CookieConsent Component
|
|
5860
|
+
*
|
|
5861
|
+
* A component for displaying a cookie consent banner with customizable styling and content.
|
|
5862
|
+
*
|
|
5863
|
+
* Features:
|
|
5864
|
+
* - Customizable title and description
|
|
5865
|
+
* - Configurable button text
|
|
5866
|
+
* - Multiple visual variants
|
|
5867
|
+
* - Position control (top or bottom)
|
|
5868
|
+
* - Theme mode support (light or dark)
|
|
5869
|
+
* - Custom styling via views prop
|
|
5870
|
+
*
|
|
5871
|
+
* @example
|
|
5872
|
+
* // Basic usage
|
|
5873
|
+
* <CookieConsent />
|
|
5874
|
+
*
|
|
5875
|
+
* @example
|
|
5876
|
+
* // With custom text
|
|
5877
|
+
* <CookieConsent
|
|
5878
|
+
* title="Avis de confidentialité"
|
|
5879
|
+
* description="Nous utilisons des cookies pour améliorer votre expérience."
|
|
5880
|
+
* acceptButtonText="J'accepte"
|
|
5881
|
+
* />
|
|
5882
|
+
*
|
|
5883
|
+
* @example
|
|
5884
|
+
* // With custom styling and callbacks
|
|
5885
|
+
* <CookieConsent
|
|
5886
|
+
* variant="primary"
|
|
5887
|
+
* position="top"
|
|
5888
|
+
* onAccept={() => console.log('Cookies accepted')}
|
|
5889
|
+
* onCustomize={() => openPreferencesModal()}
|
|
5890
|
+
* views={{
|
|
5891
|
+
* container: { backgroundColor: 'color.blue.50' },
|
|
5892
|
+
* title: { color: 'color.blue.800' }
|
|
5893
|
+
* }}
|
|
5894
|
+
* />
|
|
5895
|
+
*/
|
|
5896
|
+
var CookieConsentComponent = props => {
|
|
5897
|
+
return /*#__PURE__*/React__default.createElement(CookieConsentView, Object.assign({}, props));
|
|
5898
|
+
};
|
|
5899
|
+
var CookieConsent = CookieConsentComponent;
|
|
5900
|
+
|
|
5584
5901
|
var useContextMenuState = props => {
|
|
5585
5902
|
var {
|
|
5586
5903
|
size,
|
|
@@ -5758,7 +6075,7 @@ var calculateMenuPosition = function calculateMenuPosition(x, y, menuWidth, menu
|
|
|
5758
6075
|
};
|
|
5759
6076
|
};
|
|
5760
6077
|
|
|
5761
|
-
var _excluded$
|
|
6078
|
+
var _excluded$f = ["children", "disableNativeContextMenu", "asChild", "isDisabled", "views"],
|
|
5762
6079
|
_excluded2$6 = ["items", "children", "position", "side", "align", "views", "style"],
|
|
5763
6080
|
_excluded3$5 = ["item", "children", "onSelect", "isDisabled", "views"],
|
|
5764
6081
|
_excluded4$5 = ["views"],
|
|
@@ -5814,7 +6131,7 @@ var ContextMenuTrigger = _ref2 => {
|
|
|
5814
6131
|
isDisabled = false,
|
|
5815
6132
|
views
|
|
5816
6133
|
} = _ref2,
|
|
5817
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
6134
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$f);
|
|
5818
6135
|
var {
|
|
5819
6136
|
triggerRef,
|
|
5820
6137
|
contentId,
|
|
@@ -6097,7 +6414,7 @@ var ContextMenuView = _ref7 => {
|
|
|
6097
6414
|
}));
|
|
6098
6415
|
};
|
|
6099
6416
|
|
|
6100
|
-
var _excluded$
|
|
6417
|
+
var _excluded$g = ["children", "items", "size", "variant", "disableNativeContextMenu", "onOpenChange", "views"];
|
|
6101
6418
|
/**
|
|
6102
6419
|
* ContextMenu component for displaying a custom context menu on right-click.
|
|
6103
6420
|
* Supports both data-driven approach (with items prop) and compound component pattern.
|
|
@@ -6112,7 +6429,7 @@ var ContextMenuComponent = _ref => {
|
|
|
6112
6429
|
onOpenChange,
|
|
6113
6430
|
views
|
|
6114
6431
|
} = _ref,
|
|
6115
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6432
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
6116
6433
|
var state = useContextMenuState({
|
|
6117
6434
|
size,
|
|
6118
6435
|
variant,
|
|
@@ -6164,7 +6481,7 @@ ContextMenu.Item = ContextMenuItem;
|
|
|
6164
6481
|
ContextMenu.Divider = ContextMenuDivider;
|
|
6165
6482
|
ContextMenu.Separator = ContextMenuSeparator; // Add the Separator component
|
|
6166
6483
|
|
|
6167
|
-
var _excluded$
|
|
6484
|
+
var _excluded$h = ["src", "color", "views", "themeMode"],
|
|
6168
6485
|
_excluded2$7 = ["path"];
|
|
6169
6486
|
var FileSVG = _ref => {
|
|
6170
6487
|
var {
|
|
@@ -6172,7 +6489,7 @@ var FileSVG = _ref => {
|
|
|
6172
6489
|
color,
|
|
6173
6490
|
views
|
|
6174
6491
|
} = _ref,
|
|
6175
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6492
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
6176
6493
|
var {
|
|
6177
6494
|
getColor,
|
|
6178
6495
|
themeMode
|
|
@@ -6246,7 +6563,7 @@ var useItemState = () => {
|
|
|
6246
6563
|
};
|
|
6247
6564
|
};
|
|
6248
6565
|
|
|
6249
|
-
var _excluded$
|
|
6566
|
+
var _excluded$i = ["children", "views"];
|
|
6250
6567
|
var HelperText = _ref => {
|
|
6251
6568
|
var {
|
|
6252
6569
|
children,
|
|
@@ -6254,7 +6571,7 @@ var HelperText = _ref => {
|
|
|
6254
6571
|
helperText: {}
|
|
6255
6572
|
}
|
|
6256
6573
|
} = _ref,
|
|
6257
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6574
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
6258
6575
|
return /*#__PURE__*/React__default.createElement(Text
|
|
6259
6576
|
// Typography properties
|
|
6260
6577
|
, Object.assign({
|
|
@@ -6280,7 +6597,7 @@ var HelperText = _ref => {
|
|
|
6280
6597
|
}, views['helperText'], props), children);
|
|
6281
6598
|
};
|
|
6282
6599
|
|
|
6283
|
-
var _excluded$
|
|
6600
|
+
var _excluded$j = ["children", "helperText", "error", "views"];
|
|
6284
6601
|
var FieldContainer = _ref => {
|
|
6285
6602
|
var {
|
|
6286
6603
|
children,
|
|
@@ -6288,7 +6605,7 @@ var FieldContainer = _ref => {
|
|
|
6288
6605
|
error = false,
|
|
6289
6606
|
views
|
|
6290
6607
|
} = _ref,
|
|
6291
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6608
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
6292
6609
|
return /*#__PURE__*/React__default.createElement(appStudio.Vertical
|
|
6293
6610
|
// Layout properties
|
|
6294
6611
|
, Object.assign({
|
|
@@ -6404,7 +6721,7 @@ var PaddingWithoutLabel = {
|
|
|
6404
6721
|
paddingRight: '16px'
|
|
6405
6722
|
};
|
|
6406
6723
|
|
|
6407
|
-
var _excluded$
|
|
6724
|
+
var _excluded$k = ["label", "shadow", "children", "value", "size", "shape", "variant", "error", "showLabel", "isFocused", "isHovered", "isDisabled", "isReadOnly", "views"];
|
|
6408
6725
|
var FieldContent = _ref => {
|
|
6409
6726
|
var {
|
|
6410
6727
|
shadow,
|
|
@@ -6422,7 +6739,7 @@ var FieldContent = _ref => {
|
|
|
6422
6739
|
pickerBox: {}
|
|
6423
6740
|
}
|
|
6424
6741
|
} = _ref,
|
|
6425
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6742
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$k);
|
|
6426
6743
|
// Determine if the field is in an interactive state
|
|
6427
6744
|
var isInteractive = (isHovered || isFocused) && !isDisabled;
|
|
6428
6745
|
// Set the appropriate color based on state
|
|
@@ -6451,12 +6768,12 @@ var FieldContent = _ref => {
|
|
|
6451
6768
|
}, showLabel ? PadddingWithLabel : PaddingWithoutLabel, shadow, Shapes[shape], InputVariants[variant], views['box'], props), children);
|
|
6452
6769
|
};
|
|
6453
6770
|
|
|
6454
|
-
var _excluded$
|
|
6771
|
+
var _excluded$l = ["children"];
|
|
6455
6772
|
var FieldIcons = _ref => {
|
|
6456
6773
|
var {
|
|
6457
6774
|
children
|
|
6458
6775
|
} = _ref,
|
|
6459
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6776
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
|
|
6460
6777
|
return /*#__PURE__*/React__default.createElement(appStudio.Center, Object.assign({
|
|
6461
6778
|
gap: 10,
|
|
6462
6779
|
right: 16,
|
|
@@ -6508,7 +6825,7 @@ var HeadingSizes$1 = {
|
|
|
6508
6825
|
}
|
|
6509
6826
|
};
|
|
6510
6827
|
|
|
6511
|
-
var _excluded$
|
|
6828
|
+
var _excluded$m = ["children", "heading", "isItalic", "isUnderlined", "isStriked", "weight", "size", "dropDown"];
|
|
6512
6829
|
var LabelView = _ref => {
|
|
6513
6830
|
var {
|
|
6514
6831
|
children,
|
|
@@ -6524,7 +6841,7 @@ var LabelView = _ref => {
|
|
|
6524
6841
|
size = 'sm'
|
|
6525
6842
|
// The fontSize prop for the Element is determined by the 'size' prop passed to LabelView.
|
|
6526
6843
|
} = _ref,
|
|
6527
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6844
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
|
|
6528
6845
|
// The fontStyle prop toggles between 'italic' and 'normal' based on the 'isItalic' boolean prop.
|
|
6529
6846
|
var headingStyles = heading ? HeadingSizes$1[heading] : {};
|
|
6530
6847
|
// fontWeight is derived from the Typography module, ensuring consistent font weighting across the app.
|
|
@@ -6556,7 +6873,7 @@ React__default.createElement(LabelView, Object.assign({}, props))
|
|
|
6556
6873
|
var Label = LabelComponent;
|
|
6557
6874
|
// Export the 'LabelComponent' as 'Label' to be reused throughout the project.
|
|
6558
6875
|
|
|
6559
|
-
var _excluded$
|
|
6876
|
+
var _excluded$n = ["children", "size", "error", "color", "views", "helperText"];
|
|
6560
6877
|
var FieldLabel = _ref => {
|
|
6561
6878
|
var {
|
|
6562
6879
|
children,
|
|
@@ -6567,7 +6884,7 @@ var FieldLabel = _ref => {
|
|
|
6567
6884
|
label: {}
|
|
6568
6885
|
}
|
|
6569
6886
|
} = _ref,
|
|
6570
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6887
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$n);
|
|
6571
6888
|
return /*#__PURE__*/React__default.createElement(Label
|
|
6572
6889
|
// Position properties
|
|
6573
6890
|
, Object.assign({
|
|
@@ -6588,12 +6905,12 @@ var FieldLabel = _ref => {
|
|
|
6588
6905
|
}, views['label'], props), children);
|
|
6589
6906
|
};
|
|
6590
6907
|
|
|
6591
|
-
var _excluded$
|
|
6908
|
+
var _excluded$o = ["children"];
|
|
6592
6909
|
var FieldWrapper = _ref => {
|
|
6593
6910
|
var {
|
|
6594
6911
|
children
|
|
6595
6912
|
} = _ref,
|
|
6596
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6913
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
|
|
6597
6914
|
return /*#__PURE__*/React__default.createElement(appStudio.Vertical
|
|
6598
6915
|
// Layout properties
|
|
6599
6916
|
, Object.assign({
|
|
@@ -6626,7 +6943,7 @@ var IconSizes$2 = {
|
|
|
6626
6943
|
xl: 28
|
|
6627
6944
|
};
|
|
6628
6945
|
|
|
6629
|
-
var _excluded$
|
|
6946
|
+
var _excluded$p = ["isHovered", "setIsHovered", "option", "size", "callback", "style"],
|
|
6630
6947
|
_excluded2$8 = ["id", "name", "value", "onChange", "isMulti", "isDisabled", "isReadOnly", "options"],
|
|
6631
6948
|
_excluded3$6 = ["option", "size", "removeOption"],
|
|
6632
6949
|
_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"];
|
|
@@ -6644,7 +6961,7 @@ var Item = _ref => {
|
|
|
6644
6961
|
callback = () => {},
|
|
6645
6962
|
style
|
|
6646
6963
|
} = _ref,
|
|
6647
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6964
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
|
|
6648
6965
|
// Handles the click event on an option by invoking the callback with the selected option's value
|
|
6649
6966
|
var handleOptionClick = option => callback(option);
|
|
6650
6967
|
// Toggles the hover state on the item
|
|
@@ -7137,7 +7454,7 @@ var ColorSchemes = {
|
|
|
7137
7454
|
}
|
|
7138
7455
|
};
|
|
7139
7456
|
|
|
7140
|
-
var _excluded$
|
|
7457
|
+
var _excluded$q = ["id", "name", "label", "inActiveChild", "isChecked", "activeChild", "labelPosition", "shadow", "size", "value", "isHovered", "isDisabled", "isReadOnly", "on", "setOn", "onChange", "setValue", "setIsHovered", "helperText", "views"];
|
|
7141
7458
|
var SwitchContent = props => /*#__PURE__*/React__default.createElement(appStudio.Input, Object.assign({
|
|
7142
7459
|
type: "checkbox"
|
|
7143
7460
|
}, props));
|
|
@@ -7166,7 +7483,7 @@ var SwitchView = _ref => {
|
|
|
7166
7483
|
label: {}
|
|
7167
7484
|
}
|
|
7168
7485
|
} = _ref,
|
|
7169
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7486
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
|
|
7170
7487
|
var handleToggle = event => {
|
|
7171
7488
|
if (!isReadOnly) {
|
|
7172
7489
|
setValue(!value);
|
|
@@ -7290,7 +7607,7 @@ var useTextAreaState = _ref => {
|
|
|
7290
7607
|
// Export of the useTextAreaState hook for external usage.
|
|
7291
7608
|
};
|
|
7292
7609
|
|
|
7293
|
-
var _excluded$
|
|
7610
|
+
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"];
|
|
7294
7611
|
var TextAreaView = _ref => {
|
|
7295
7612
|
var {
|
|
7296
7613
|
id,
|
|
@@ -7325,7 +7642,7 @@ var TextAreaView = _ref => {
|
|
|
7325
7642
|
helperText: {}
|
|
7326
7643
|
}
|
|
7327
7644
|
} = _ref,
|
|
7328
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7645
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$r);
|
|
7329
7646
|
var showLabel = !!(isFocused && label);
|
|
7330
7647
|
/**
|
|
7331
7648
|
* Styles for the textarea field
|
|
@@ -7464,7 +7781,7 @@ var useTextFieldState = _ref => {
|
|
|
7464
7781
|
};
|
|
7465
7782
|
};
|
|
7466
7783
|
|
|
7467
|
-
var _excluded$
|
|
7784
|
+
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"];
|
|
7468
7785
|
/**
|
|
7469
7786
|
* Input component for text fields
|
|
7470
7787
|
*/
|
|
@@ -7510,7 +7827,7 @@ var TextFieldView = _ref => {
|
|
|
7510
7827
|
onBlur = () => {},
|
|
7511
7828
|
themeMode: elementMode
|
|
7512
7829
|
} = _ref,
|
|
7513
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7830
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$s);
|
|
7514
7831
|
var {
|
|
7515
7832
|
getColor,
|
|
7516
7833
|
themeMode
|
|
@@ -7766,7 +8083,7 @@ var StateStyles = {
|
|
|
7766
8083
|
}
|
|
7767
8084
|
};
|
|
7768
8085
|
|
|
7769
|
-
var _excluded$
|
|
8086
|
+
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"];
|
|
7770
8087
|
var CheckboxView = _ref => {
|
|
7771
8088
|
var {
|
|
7772
8089
|
id,
|
|
@@ -7793,7 +8110,7 @@ var CheckboxView = _ref => {
|
|
|
7793
8110
|
},
|
|
7794
8111
|
infoText
|
|
7795
8112
|
} = _ref,
|
|
7796
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8113
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
|
|
7797
8114
|
var handleHover = () => setIsHovered(!isHovered);
|
|
7798
8115
|
var handleChange = () => {
|
|
7799
8116
|
if (!isReadOnly && !isDisabled) {
|
|
@@ -9379,11 +9696,11 @@ var IconSizes$4 = {
|
|
|
9379
9696
|
xl: 16
|
|
9380
9697
|
};
|
|
9381
9698
|
|
|
9382
|
-
var _excluded$
|
|
9699
|
+
var _excluded$u = ["size"],
|
|
9383
9700
|
_excluded2$9 = ["size"],
|
|
9384
9701
|
_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"];
|
|
9385
9702
|
var CountryList = _ref => {
|
|
9386
|
-
var props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9703
|
+
var props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
9387
9704
|
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
|
|
9388
9705
|
as: "ul"
|
|
9389
9706
|
}, props));
|
|
@@ -9624,7 +9941,7 @@ var useDatePickerState = () => {
|
|
|
9624
9941
|
};
|
|
9625
9942
|
};
|
|
9626
9943
|
|
|
9627
|
-
var _excluded$
|
|
9944
|
+
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"];
|
|
9628
9945
|
var DatePickerContent = props => /*#__PURE__*/React__default.createElement(appStudio.Input, Object.assign({
|
|
9629
9946
|
type: "date"
|
|
9630
9947
|
}, props));
|
|
@@ -9657,7 +9974,7 @@ var DatePickerView = _ref => {
|
|
|
9657
9974
|
onChange,
|
|
9658
9975
|
onChangeText
|
|
9659
9976
|
} = _ref,
|
|
9660
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9977
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
|
|
9661
9978
|
var showLabel = !!(isFocused && label);
|
|
9662
9979
|
var handleHover = () => setIsHovered(!isHovered);
|
|
9663
9980
|
var handleFocus = () => setIsFocused(true);
|
|
@@ -9744,7 +10061,7 @@ var usePasswordState = props => {
|
|
|
9744
10061
|
}, props, textFieldStates);
|
|
9745
10062
|
};
|
|
9746
10063
|
|
|
9747
|
-
var _excluded$
|
|
10064
|
+
var _excluded$w = ["visibleIcon", "hiddenIcon"],
|
|
9748
10065
|
_excluded2$a = ["isVisible", "setIsVisible"];
|
|
9749
10066
|
var PasswordComponent = _ref => {
|
|
9750
10067
|
var {
|
|
@@ -9755,7 +10072,7 @@ var PasswordComponent = _ref => {
|
|
|
9755
10072
|
widthHeight: 14
|
|
9756
10073
|
})
|
|
9757
10074
|
} = _ref,
|
|
9758
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10075
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
|
|
9759
10076
|
var _usePasswordState = usePasswordState(props),
|
|
9760
10077
|
{
|
|
9761
10078
|
isVisible,
|
|
@@ -9809,7 +10126,7 @@ var useComboBoxState = (items, placeholder, searchPlaceholder) => {
|
|
|
9809
10126
|
};
|
|
9810
10127
|
};
|
|
9811
10128
|
|
|
9812
|
-
var _excluded$
|
|
10129
|
+
var _excluded$x = ["placeholder", "items", "showTick", "onSelect", "searchEnabled", "left", "right", "label", "filteredItems", "setSelectedItem", "selectedItem", "highlightedIndex", "setHighlightedIndex", "searchQuery", "setSearchQuery", "setFilteredItems", "views", "isDropdownVisible", "setIsDropdownVisible"];
|
|
9813
10130
|
// Defines the functional component 'ComboBoxView' with destructured props.
|
|
9814
10131
|
var ComboBoxView = _ref => {
|
|
9815
10132
|
var {
|
|
@@ -9834,7 +10151,7 @@ var ComboBoxView = _ref => {
|
|
|
9834
10151
|
setIsDropdownVisible
|
|
9835
10152
|
// Collects all further props not destructured explicitly.
|
|
9836
10153
|
} = _ref,
|
|
9837
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10154
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
9838
10155
|
// Sets up an effect to handle clicking outside the dropdown to close it.
|
|
9839
10156
|
React.useEffect(() => {
|
|
9840
10157
|
var handleClickOutside = event => {
|
|
@@ -9946,7 +10263,7 @@ var ComboBoxView = _ref => {
|
|
|
9946
10263
|
}))))))))))));
|
|
9947
10264
|
};
|
|
9948
10265
|
|
|
9949
|
-
var _excluded$
|
|
10266
|
+
var _excluded$y = ["id", "name", "items", "placeholder", "searchPlaceholder"];
|
|
9950
10267
|
// Defines the ComboBoxComponent functional component with ComboBoxProps
|
|
9951
10268
|
var ComboBoxComponent = _ref => {
|
|
9952
10269
|
var {
|
|
@@ -9962,7 +10279,7 @@ var ComboBoxComponent = _ref => {
|
|
|
9962
10279
|
searchPlaceholder
|
|
9963
10280
|
// Destructures the rest of the props not explicitly defined
|
|
9964
10281
|
} = _ref,
|
|
9965
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10282
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
9966
10283
|
// Initializes ComboBox state using custom hook with items and placeholders
|
|
9967
10284
|
var state = useComboBoxState(items, placeholder, searchPlaceholder);
|
|
9968
10285
|
return (
|
|
@@ -10284,7 +10601,7 @@ var useOTPInputState = _ref => {
|
|
|
10284
10601
|
};
|
|
10285
10602
|
};
|
|
10286
10603
|
|
|
10287
|
-
var _excluded$
|
|
10604
|
+
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"];
|
|
10288
10605
|
// Create a context for OTP input slots
|
|
10289
10606
|
var OTPInputContext = /*#__PURE__*/React.createContext({
|
|
10290
10607
|
slots: [],
|
|
@@ -10338,7 +10655,7 @@ var OTPInputView = _ref => {
|
|
|
10338
10655
|
onFocus = () => {}
|
|
10339
10656
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10340
10657
|
} = _ref,
|
|
10341
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10658
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
10342
10659
|
appStudio.useTheme(); // Initialize theme context
|
|
10343
10660
|
var showLabel = !!label;
|
|
10344
10661
|
// Create context value for slots
|
|
@@ -10570,7 +10887,7 @@ var OTPInputComponent = props => {
|
|
|
10570
10887
|
};
|
|
10571
10888
|
var OTPInput = OTPInputComponent;
|
|
10572
10889
|
|
|
10573
|
-
var _excluded$
|
|
10890
|
+
var _excluded$A = ["children", "autoFocus", "initFocus", "onChange"];
|
|
10574
10891
|
var FocusContext = /*#__PURE__*/React.createContext({
|
|
10575
10892
|
active: false,
|
|
10576
10893
|
focusNextInput: () => {},
|
|
@@ -10586,7 +10903,7 @@ var FormikForm = _ref => {
|
|
|
10586
10903
|
initFocus,
|
|
10587
10904
|
onChange = () => {}
|
|
10588
10905
|
} = _ref,
|
|
10589
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10906
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
|
|
10590
10907
|
var formik$1 = formik.useFormikContext();
|
|
10591
10908
|
React.useEffect(() => {
|
|
10592
10909
|
onChange(formik$1.values);
|
|
@@ -10634,7 +10951,7 @@ var FormikForm = _ref => {
|
|
|
10634
10951
|
}, /*#__PURE__*/React__default.createElement(appStudio.Form, Object.assign({}, props), children));
|
|
10635
10952
|
};
|
|
10636
10953
|
|
|
10637
|
-
var _excluded$
|
|
10954
|
+
var _excluded$B = ["name", "type"];
|
|
10638
10955
|
var getInputTypeProps = type => {
|
|
10639
10956
|
switch (type) {
|
|
10640
10957
|
case 'email':
|
|
@@ -10673,7 +10990,7 @@ var useFormikInput = _ref => {
|
|
|
10673
10990
|
name,
|
|
10674
10991
|
type
|
|
10675
10992
|
} = _ref,
|
|
10676
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10993
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
10677
10994
|
var focus = useFormFocus();
|
|
10678
10995
|
var {
|
|
10679
10996
|
touched,
|
|
@@ -10717,13 +11034,13 @@ var useFormikInput = _ref => {
|
|
|
10717
11034
|
} : {});
|
|
10718
11035
|
};
|
|
10719
11036
|
|
|
10720
|
-
var _excluded$
|
|
11037
|
+
var _excluded$C = ["value"];
|
|
10721
11038
|
var CheckboxComponent$1 = props => {
|
|
10722
11039
|
var _useFormikInput = useFormikInput(props),
|
|
10723
11040
|
{
|
|
10724
11041
|
value
|
|
10725
11042
|
} = _useFormikInput,
|
|
10726
|
-
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$
|
|
11043
|
+
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$C);
|
|
10727
11044
|
formProps.isChecked = value;
|
|
10728
11045
|
var checkboxStates = useCheckboxState(props);
|
|
10729
11046
|
return /*#__PURE__*/React__default.createElement(CheckboxView, Object.assign({}, checkboxStates, formProps));
|
|
@@ -10781,11 +11098,11 @@ var TextAreaComponent$1 = props => {
|
|
|
10781
11098
|
*/
|
|
10782
11099
|
var FormikTextArea = TextAreaComponent$1;
|
|
10783
11100
|
|
|
10784
|
-
var _excluded$
|
|
11101
|
+
var _excluded$D = ["value"];
|
|
10785
11102
|
var TextFieldComponent$1 = props => {
|
|
10786
11103
|
var formProps = useFormikInput(props);
|
|
10787
11104
|
var _useTextFieldState = useTextFieldState(props),
|
|
10788
|
-
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$
|
|
11105
|
+
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$D);
|
|
10789
11106
|
return /*#__PURE__*/React__default.createElement(TextFieldView, Object.assign({}, textFieldStates, formProps));
|
|
10790
11107
|
};
|
|
10791
11108
|
/**
|
|
@@ -10793,7 +11110,7 @@ var TextFieldComponent$1 = props => {
|
|
|
10793
11110
|
*/
|
|
10794
11111
|
var FormikTextField = TextFieldComponent$1;
|
|
10795
11112
|
|
|
10796
|
-
var _excluded$
|
|
11113
|
+
var _excluded$E = ["visibleIcon", "hiddenIcon"],
|
|
10797
11114
|
_excluded2$b = ["isVisible", "setIsVisible"];
|
|
10798
11115
|
var PasswordComponent$1 = _ref => {
|
|
10799
11116
|
var {
|
|
@@ -10804,7 +11121,7 @@ var PasswordComponent$1 = _ref => {
|
|
|
10804
11121
|
widthHeight: 14
|
|
10805
11122
|
})
|
|
10806
11123
|
} = _ref,
|
|
10807
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
11124
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$E);
|
|
10808
11125
|
var formProps = useFormikInput(props);
|
|
10809
11126
|
var _usePasswordState = usePasswordState(formProps),
|
|
10810
11127
|
{
|
|
@@ -10829,14 +11146,14 @@ var PasswordComponent$1 = _ref => {
|
|
|
10829
11146
|
*/
|
|
10830
11147
|
var FormikPassword = PasswordComponent$1;
|
|
10831
11148
|
|
|
10832
|
-
var _excluded$
|
|
11149
|
+
var _excluded$F = ["items", "placeholder", "searchPlaceholder"];
|
|
10833
11150
|
var ComboBoxComponent$1 = _ref => {
|
|
10834
11151
|
var {
|
|
10835
11152
|
items,
|
|
10836
11153
|
placeholder,
|
|
10837
11154
|
searchPlaceholder
|
|
10838
11155
|
} = _ref,
|
|
10839
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
11156
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$F);
|
|
10840
11157
|
var formProps = useFormikInput(props);
|
|
10841
11158
|
var ComboBoxStates = useComboBoxState(items, placeholder, searchPlaceholder);
|
|
10842
11159
|
// Ensure the onChange function from formProps is being called when an item is selected
|
|
@@ -11117,7 +11434,7 @@ var OrientationStyles = {
|
|
|
11117
11434
|
}
|
|
11118
11435
|
};
|
|
11119
11436
|
|
|
11120
|
-
var _excluded$
|
|
11437
|
+
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"];
|
|
11121
11438
|
var SliderView = _ref => {
|
|
11122
11439
|
var _views$tooltip, _views$tooltip2;
|
|
11123
11440
|
var {
|
|
@@ -11160,7 +11477,7 @@ var SliderView = _ref => {
|
|
|
11160
11477
|
tooltip: {}
|
|
11161
11478
|
}
|
|
11162
11479
|
} = _ref,
|
|
11163
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
11480
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
11164
11481
|
var {
|
|
11165
11482
|
getColor,
|
|
11166
11483
|
themeMode
|
|
@@ -12038,7 +12355,7 @@ var UploadView = _ref => {
|
|
|
12038
12355
|
}, views == null ? void 0 : views.view)));
|
|
12039
12356
|
};
|
|
12040
12357
|
|
|
12041
|
-
var _excluded$
|
|
12358
|
+
var _excluded$H = ["accept", "icon", "text", "maxSize", "onFileSelect", "validateFile", "isLoading", "progress", "fileType"];
|
|
12042
12359
|
var Uploader = _ref => {
|
|
12043
12360
|
var {
|
|
12044
12361
|
accept = '*/*',
|
|
@@ -12051,7 +12368,7 @@ var Uploader = _ref => {
|
|
|
12051
12368
|
progress = 0,
|
|
12052
12369
|
fileType
|
|
12053
12370
|
} = _ref,
|
|
12054
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12371
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
12055
12372
|
var {
|
|
12056
12373
|
previewUrl,
|
|
12057
12374
|
thumbnailUrl,
|
|
@@ -12242,7 +12559,7 @@ var ModalTypography = {
|
|
|
12242
12559
|
}
|
|
12243
12560
|
};
|
|
12244
12561
|
|
|
12245
|
-
var _excluded$
|
|
12562
|
+
var _excluded$I = ["children", "blur", "isOpen", "isClosePrevented", "onClose", "position", "views"],
|
|
12246
12563
|
_excluded2$c = ["children", "shadow", "isFullScreen", "shape", "views", "isOpen"],
|
|
12247
12564
|
_excluded3$8 = ["children", "buttonColor", "iconSize", "buttonPosition", "views"],
|
|
12248
12565
|
_excluded4$7 = ["children", "views"],
|
|
@@ -12257,7 +12574,7 @@ var ModalOverlay = _ref => {
|
|
|
12257
12574
|
position = 'center',
|
|
12258
12575
|
views
|
|
12259
12576
|
} = _ref,
|
|
12260
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12577
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
12261
12578
|
var handleClick = () => {
|
|
12262
12579
|
if (!isClosePrevented) onClose();
|
|
12263
12580
|
};
|
|
@@ -12553,7 +12870,7 @@ var NavigationMenuItemStates = {
|
|
|
12553
12870
|
}
|
|
12554
12871
|
};
|
|
12555
12872
|
|
|
12556
|
-
var _excluded$
|
|
12873
|
+
var _excluded$J = ["href", "children", "views"];
|
|
12557
12874
|
// Create context for the NavigationMenu
|
|
12558
12875
|
var NavigationMenuContext = /*#__PURE__*/React.createContext({
|
|
12559
12876
|
activeItemId: null,
|
|
@@ -12788,7 +13105,7 @@ var NavigationMenuLink = _ref6 => {
|
|
|
12788
13105
|
children,
|
|
12789
13106
|
views
|
|
12790
13107
|
} = _ref6,
|
|
12791
|
-
props = _objectWithoutPropertiesLoose(_ref6, _excluded$
|
|
13108
|
+
props = _objectWithoutPropertiesLoose(_ref6, _excluded$J);
|
|
12792
13109
|
var {
|
|
12793
13110
|
itemValue,
|
|
12794
13111
|
isDisabled
|
|
@@ -12855,7 +13172,7 @@ var NavigationMenuView = _ref7 => {
|
|
|
12855
13172
|
})))));
|
|
12856
13173
|
};
|
|
12857
13174
|
|
|
12858
|
-
var _excluded$
|
|
13175
|
+
var _excluded$K = ["items", "children", "orientation", "size", "variant", "defaultActiveItemId", "defaultExpandedItemIds", "onItemActivate", "views"];
|
|
12859
13176
|
/**
|
|
12860
13177
|
* NavigationMenu component for creating navigation menus with optional nested items.
|
|
12861
13178
|
* Supports both data-driven approach (with items prop) and compound component pattern.
|
|
@@ -12872,7 +13189,7 @@ var NavigationMenuComponent = _ref => {
|
|
|
12872
13189
|
onItemActivate,
|
|
12873
13190
|
views
|
|
12874
13191
|
} = _ref,
|
|
12875
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13192
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$K);
|
|
12876
13193
|
var {
|
|
12877
13194
|
activeItemId,
|
|
12878
13195
|
setActiveItemId,
|
|
@@ -13327,6 +13644,507 @@ var TabsComponent = _ref => {
|
|
|
13327
13644
|
// Export the component wrapped in React.memo for performance optimization
|
|
13328
13645
|
var Tabs = /*#__PURE__*/React__default.memo(TabsComponent);
|
|
13329
13646
|
|
|
13647
|
+
/**
|
|
13648
|
+
* Custom hook for managing Title component state and animations
|
|
13649
|
+
*/
|
|
13650
|
+
var useTitleState = props => {
|
|
13651
|
+
var {
|
|
13652
|
+
animation = 'none',
|
|
13653
|
+
animationDirection = 'left',
|
|
13654
|
+
animationDuration = '1s',
|
|
13655
|
+
animationDelay = '0s',
|
|
13656
|
+
children,
|
|
13657
|
+
_isInView = false,
|
|
13658
|
+
alternateHighlightText = [],
|
|
13659
|
+
alternateAnimation = false,
|
|
13660
|
+
alternateDuration = 3000,
|
|
13661
|
+
highlightText
|
|
13662
|
+
} = props;
|
|
13663
|
+
// State for typewriter animation
|
|
13664
|
+
var [displayText, setDisplayText] = React.useState('');
|
|
13665
|
+
// State for alternating highlight text
|
|
13666
|
+
var [currentHighlightText, setCurrentHighlightText] = React.useState(highlightText);
|
|
13667
|
+
// State for the alternating text content
|
|
13668
|
+
var [alternatingContent, setAlternatingContent] = React.useState(children);
|
|
13669
|
+
// Handle alternating highlight text animation
|
|
13670
|
+
React.useEffect(() => {
|
|
13671
|
+
// Initialize with the provided highlightText
|
|
13672
|
+
setCurrentHighlightText(highlightText);
|
|
13673
|
+
// If not using alternating animation or no alternateHighlightText provided, return early
|
|
13674
|
+
if (!alternateAnimation || alternateHighlightText.length === 0 || !_isInView) {
|
|
13675
|
+
return () => {};
|
|
13676
|
+
}
|
|
13677
|
+
// Only proceed if children is a string
|
|
13678
|
+
if (typeof children !== 'string') {
|
|
13679
|
+
return () => {};
|
|
13680
|
+
}
|
|
13681
|
+
// Set initial content with the first alternating text
|
|
13682
|
+
var baseText = children;
|
|
13683
|
+
var currentIndex = 0;
|
|
13684
|
+
// Function to update the content with the current alternating text
|
|
13685
|
+
var updateContent = index => {
|
|
13686
|
+
if (highlightText && typeof highlightText === 'string') {
|
|
13687
|
+
// Replace the highlightText with the current alternating text
|
|
13688
|
+
var regex = new RegExp(highlightText, 'gi');
|
|
13689
|
+
var newContent = baseText.replace(regex, alternateHighlightText[index]);
|
|
13690
|
+
setAlternatingContent(newContent);
|
|
13691
|
+
}
|
|
13692
|
+
};
|
|
13693
|
+
// Set initial content
|
|
13694
|
+
updateContent(currentIndex);
|
|
13695
|
+
// Create interval to cycle through the alternateHighlightText array
|
|
13696
|
+
var interval = setInterval(() => {
|
|
13697
|
+
currentIndex = (currentIndex + 1) % alternateHighlightText.length;
|
|
13698
|
+
updateContent(currentIndex);
|
|
13699
|
+
}, alternateDuration);
|
|
13700
|
+
return () => clearInterval(interval);
|
|
13701
|
+
}, [alternateAnimation, alternateHighlightText, alternateDuration, highlightText, children, _isInView]);
|
|
13702
|
+
// Handle typewriter animation
|
|
13703
|
+
React.useEffect(() => {
|
|
13704
|
+
// Only start the typewriter animation when the component is in view
|
|
13705
|
+
if (animation === 'typewriter' && typeof children === 'string' && _isInView) {
|
|
13706
|
+
var text = children;
|
|
13707
|
+
var currentIndex = 0;
|
|
13708
|
+
setDisplayText('');
|
|
13709
|
+
var interval = setInterval(() => {
|
|
13710
|
+
if (currentIndex <= text.length) {
|
|
13711
|
+
setDisplayText(text.substring(0, currentIndex));
|
|
13712
|
+
currentIndex++;
|
|
13713
|
+
} else {
|
|
13714
|
+
clearInterval(interval);
|
|
13715
|
+
}
|
|
13716
|
+
}, 100);
|
|
13717
|
+
return () => clearInterval(interval);
|
|
13718
|
+
}
|
|
13719
|
+
// Reset the text if not in view
|
|
13720
|
+
if (animation === 'typewriter' && !_isInView) {
|
|
13721
|
+
setDisplayText('');
|
|
13722
|
+
}
|
|
13723
|
+
return () => {};
|
|
13724
|
+
}, [animation, children, _isInView]);
|
|
13725
|
+
// Get animation configuration based on animation type
|
|
13726
|
+
var getAnimation = () => {
|
|
13727
|
+
// For typewriter animation, we handle it separately with useState and useEffect
|
|
13728
|
+
if (animation === 'typewriter') {
|
|
13729
|
+
return undefined;
|
|
13730
|
+
}
|
|
13731
|
+
switch (animation) {
|
|
13732
|
+
case 'fadeIn':
|
|
13733
|
+
return {
|
|
13734
|
+
from: {
|
|
13735
|
+
opacity: 0
|
|
13736
|
+
},
|
|
13737
|
+
to: {
|
|
13738
|
+
opacity: 1
|
|
13739
|
+
},
|
|
13740
|
+
duration: animationDuration,
|
|
13741
|
+
delay: animationDelay,
|
|
13742
|
+
// iterationCount: 'infinite',
|
|
13743
|
+
direction: 'alternate'
|
|
13744
|
+
};
|
|
13745
|
+
case 'slideIn':
|
|
13746
|
+
switch (animationDirection) {
|
|
13747
|
+
case 'left':
|
|
13748
|
+
return {
|
|
13749
|
+
from: {
|
|
13750
|
+
transform: 'translateX(-100%)'
|
|
13751
|
+
},
|
|
13752
|
+
to: {
|
|
13753
|
+
transform: 'translateX(0)'
|
|
13754
|
+
},
|
|
13755
|
+
duration: animationDuration,
|
|
13756
|
+
delay: animationDelay,
|
|
13757
|
+
// iterationCount: 'infinite',
|
|
13758
|
+
direction: 'alternate'
|
|
13759
|
+
};
|
|
13760
|
+
case 'right':
|
|
13761
|
+
return {
|
|
13762
|
+
from: {
|
|
13763
|
+
transform: 'translateX(100%)'
|
|
13764
|
+
},
|
|
13765
|
+
to: {
|
|
13766
|
+
transform: 'translateX(0)'
|
|
13767
|
+
},
|
|
13768
|
+
duration: animationDuration,
|
|
13769
|
+
delay: animationDelay,
|
|
13770
|
+
// iterationCount: 'infinite',
|
|
13771
|
+
direction: 'alternate'
|
|
13772
|
+
};
|
|
13773
|
+
case 'top':
|
|
13774
|
+
return {
|
|
13775
|
+
from: {
|
|
13776
|
+
transform: 'translateY(-100%)'
|
|
13777
|
+
},
|
|
13778
|
+
to: {
|
|
13779
|
+
transform: 'translateY(0)'
|
|
13780
|
+
},
|
|
13781
|
+
duration: animationDuration,
|
|
13782
|
+
delay: animationDelay,
|
|
13783
|
+
// iterationCount: 'infinite',
|
|
13784
|
+
direction: 'alternate'
|
|
13785
|
+
};
|
|
13786
|
+
case 'bottom':
|
|
13787
|
+
return {
|
|
13788
|
+
from: {
|
|
13789
|
+
transform: 'translateY(100%)'
|
|
13790
|
+
},
|
|
13791
|
+
to: {
|
|
13792
|
+
transform: 'translateY(0)'
|
|
13793
|
+
},
|
|
13794
|
+
duration: animationDuration,
|
|
13795
|
+
delay: animationDelay,
|
|
13796
|
+
// iterationCount: 'infinite',
|
|
13797
|
+
direction: 'alternate'
|
|
13798
|
+
};
|
|
13799
|
+
default:
|
|
13800
|
+
return {
|
|
13801
|
+
from: {
|
|
13802
|
+
transform: 'translateX(-100%)'
|
|
13803
|
+
},
|
|
13804
|
+
to: {
|
|
13805
|
+
transform: 'translateX(0)'
|
|
13806
|
+
},
|
|
13807
|
+
duration: animationDuration,
|
|
13808
|
+
delay: animationDelay,
|
|
13809
|
+
// iterationCount: 'infinite',
|
|
13810
|
+
direction: 'alternate'
|
|
13811
|
+
};
|
|
13812
|
+
}
|
|
13813
|
+
case 'bounce':
|
|
13814
|
+
return {
|
|
13815
|
+
from: {
|
|
13816
|
+
transform: 'translateY(0)'
|
|
13817
|
+
},
|
|
13818
|
+
'20%': {
|
|
13819
|
+
transform: 'translateY(-30px)'
|
|
13820
|
+
},
|
|
13821
|
+
'40%': {
|
|
13822
|
+
transform: 'translateY(0)'
|
|
13823
|
+
},
|
|
13824
|
+
'60%': {
|
|
13825
|
+
transform: 'translateY(-15px)'
|
|
13826
|
+
},
|
|
13827
|
+
'80%': {
|
|
13828
|
+
transform: 'translateY(0)'
|
|
13829
|
+
},
|
|
13830
|
+
to: {
|
|
13831
|
+
transform: 'translateY(0)'
|
|
13832
|
+
},
|
|
13833
|
+
duration: animationDuration,
|
|
13834
|
+
delay: animationDelay,
|
|
13835
|
+
iterationCount: '1'
|
|
13836
|
+
};
|
|
13837
|
+
case 'highlight':
|
|
13838
|
+
return {
|
|
13839
|
+
from: {
|
|
13840
|
+
backgroundSize: '0 100%'
|
|
13841
|
+
},
|
|
13842
|
+
to: {
|
|
13843
|
+
backgroundSize: '100% 100%'
|
|
13844
|
+
},
|
|
13845
|
+
duration: animationDuration,
|
|
13846
|
+
delay: animationDelay
|
|
13847
|
+
};
|
|
13848
|
+
case 'reveal':
|
|
13849
|
+
return {
|
|
13850
|
+
from: {
|
|
13851
|
+
clipPath: 'polygon(0 0, 0 0, 0 100%, 0% 100%)'
|
|
13852
|
+
},
|
|
13853
|
+
to: {
|
|
13854
|
+
clipPath: 'polygon(0 0, 100% 0, 100% 100%, 0 100%)'
|
|
13855
|
+
},
|
|
13856
|
+
duration: animationDuration,
|
|
13857
|
+
delay: animationDelay
|
|
13858
|
+
};
|
|
13859
|
+
case 'none':
|
|
13860
|
+
default:
|
|
13861
|
+
return undefined;
|
|
13862
|
+
}
|
|
13863
|
+
};
|
|
13864
|
+
return {
|
|
13865
|
+
displayText,
|
|
13866
|
+
getAnimation,
|
|
13867
|
+
currentHighlightText,
|
|
13868
|
+
alternatingContent
|
|
13869
|
+
};
|
|
13870
|
+
};
|
|
13871
|
+
|
|
13872
|
+
/**
|
|
13873
|
+
* Font sizes for different title sizes
|
|
13874
|
+
*/
|
|
13875
|
+
var TitleSizes = {
|
|
13876
|
+
xs: 16,
|
|
13877
|
+
sm: 20,
|
|
13878
|
+
md: 24,
|
|
13879
|
+
lg: 32,
|
|
13880
|
+
xl: 40,
|
|
13881
|
+
'2xl': 48,
|
|
13882
|
+
'3xl': 56,
|
|
13883
|
+
'4xl': 64,
|
|
13884
|
+
'5xl': 72,
|
|
13885
|
+
'6xl': 80
|
|
13886
|
+
};
|
|
13887
|
+
/**
|
|
13888
|
+
* Line heights for different title sizes
|
|
13889
|
+
*/
|
|
13890
|
+
var LineHeights$1 = {
|
|
13891
|
+
xs: 24,
|
|
13892
|
+
sm: 28,
|
|
13893
|
+
md: 32,
|
|
13894
|
+
lg: 64,
|
|
13895
|
+
xl: 88
|
|
13896
|
+
};
|
|
13897
|
+
/**
|
|
13898
|
+
* Default styles for different highlight types
|
|
13899
|
+
*/
|
|
13900
|
+
var HighlightStyles = {
|
|
13901
|
+
underline: color => ({
|
|
13902
|
+
textDecoration: 'underline',
|
|
13903
|
+
textDecorationColor: color,
|
|
13904
|
+
textDecorationThickness: '4px',
|
|
13905
|
+
textUnderlineOffset: '4px'
|
|
13906
|
+
}),
|
|
13907
|
+
background: color => ({
|
|
13908
|
+
backgroundColor: color,
|
|
13909
|
+
color: 'color.white',
|
|
13910
|
+
padding: '0 8px',
|
|
13911
|
+
borderRadius: '4px'
|
|
13912
|
+
}),
|
|
13913
|
+
gradient: (color, secondaryColor) => ({
|
|
13914
|
+
background: "linear-gradient(135deg, " + color + ", " + (secondaryColor || color) + ")",
|
|
13915
|
+
webkitBackgroundClip: 'text',
|
|
13916
|
+
webkitTextFillColor: 'transparent',
|
|
13917
|
+
backgroundClip: 'text',
|
|
13918
|
+
color: 'transparent',
|
|
13919
|
+
display: 'inline-block'
|
|
13920
|
+
}),
|
|
13921
|
+
outline: color => ({
|
|
13922
|
+
webkitTextStroke: "1px " + color,
|
|
13923
|
+
webkitTextFillColor: 'transparent',
|
|
13924
|
+
color: 'transparent',
|
|
13925
|
+
textShadow: 'none'
|
|
13926
|
+
}),
|
|
13927
|
+
glow: color => ({
|
|
13928
|
+
color: color,
|
|
13929
|
+
textShadow: "0 0 10px " + color + "80, 0 0 20px " + color + "40, 0 0 30px " + color + "20"
|
|
13930
|
+
})
|
|
13931
|
+
};
|
|
13932
|
+
|
|
13933
|
+
var _excluded$L = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "animation", "size", "centered", "views"];
|
|
13934
|
+
/**
|
|
13935
|
+
* Title View Component
|
|
13936
|
+
*
|
|
13937
|
+
* Renders a title with optional highlighting and animations for hero sections.
|
|
13938
|
+
*/
|
|
13939
|
+
var TitleView = _ref => {
|
|
13940
|
+
var {
|
|
13941
|
+
children,
|
|
13942
|
+
highlightText,
|
|
13943
|
+
highlightStyle = 'background',
|
|
13944
|
+
highlightColor = 'theme.primary',
|
|
13945
|
+
highlightSecondaryColor,
|
|
13946
|
+
animation = 'none',
|
|
13947
|
+
size = 'xl',
|
|
13948
|
+
centered = false,
|
|
13949
|
+
views
|
|
13950
|
+
} = _ref,
|
|
13951
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$L);
|
|
13952
|
+
// Use the inView hook to detect when the component is visible
|
|
13953
|
+
var {
|
|
13954
|
+
ref,
|
|
13955
|
+
inView
|
|
13956
|
+
} = appStudio.useInView();
|
|
13957
|
+
// Get theme utilities
|
|
13958
|
+
var {
|
|
13959
|
+
getColor,
|
|
13960
|
+
themeMode: contextThemeMode
|
|
13961
|
+
} = appStudio.useTheme();
|
|
13962
|
+
var themeMode = props.themeMode || contextThemeMode;
|
|
13963
|
+
// Resolve theme colors
|
|
13964
|
+
var resolvedHighlightColor = getColor(highlightColor, {
|
|
13965
|
+
themeMode
|
|
13966
|
+
});
|
|
13967
|
+
var resolvedSecondaryColor = highlightSecondaryColor ? getColor(highlightSecondaryColor, {
|
|
13968
|
+
themeMode
|
|
13969
|
+
}) : undefined;
|
|
13970
|
+
// Get state and animation functions from custom hook
|
|
13971
|
+
var {
|
|
13972
|
+
displayText,
|
|
13973
|
+
getAnimation,
|
|
13974
|
+
currentHighlightText,
|
|
13975
|
+
alternatingContent
|
|
13976
|
+
} = useTitleState(Object.assign({
|
|
13977
|
+
children,
|
|
13978
|
+
highlightText,
|
|
13979
|
+
highlightStyle,
|
|
13980
|
+
highlightColor: resolvedHighlightColor,
|
|
13981
|
+
animation,
|
|
13982
|
+
_isInView: inView
|
|
13983
|
+
}, props));
|
|
13984
|
+
// Get animation configuration only when the component is in view
|
|
13985
|
+
// For typewriter animation, we don't need an animation config as it's handled by useState/useEffect
|
|
13986
|
+
var animationConfig = inView && animation !== 'typewriter' ? getAnimation() : undefined;
|
|
13987
|
+
// Get highlight styles
|
|
13988
|
+
var highlightStyleProps = HighlightStyles[highlightStyle](resolvedHighlightColor, resolvedSecondaryColor);
|
|
13989
|
+
// Get font size and line height based on size prop
|
|
13990
|
+
var fontSize = TitleSizes[size];
|
|
13991
|
+
var lineHeight = LineHeights$1[size];
|
|
13992
|
+
// For typewriter animation, use the displayText state
|
|
13993
|
+
// For alternating animation, use the alternatingContent state
|
|
13994
|
+
var content = animation === 'typewriter' ? displayText : props.alternateAnimation && typeof alternatingContent === 'string' ? alternatingContent : children;
|
|
13995
|
+
// If the content is a simple string and we have highlight text
|
|
13996
|
+
if (typeof children === 'string' && currentHighlightText) {
|
|
13997
|
+
var text = children;
|
|
13998
|
+
// For a single highlight text
|
|
13999
|
+
if (typeof currentHighlightText === 'string') {
|
|
14000
|
+
// Create a regex pattern to match the highlight text
|
|
14001
|
+
// Use a more flexible approach that can match within words
|
|
14002
|
+
var pattern = new RegExp("(" + currentHighlightText + ")", 'gi');
|
|
14003
|
+
// Check if the pattern matches anything in the text
|
|
14004
|
+
if (pattern.test(text)) {
|
|
14005
|
+
// Reset the regex pattern's lastIndex property
|
|
14006
|
+
pattern.lastIndex = 0;
|
|
14007
|
+
// Split the text by the pattern and keep the matches
|
|
14008
|
+
var parts = [];
|
|
14009
|
+
var lastIndex = 0;
|
|
14010
|
+
var match;
|
|
14011
|
+
while ((match = pattern.exec(text)) !== null) {
|
|
14012
|
+
// Add the text before the match
|
|
14013
|
+
if (match.index > lastIndex) {
|
|
14014
|
+
parts.push(text.substring(lastIndex, match.index));
|
|
14015
|
+
}
|
|
14016
|
+
// Add the match as a special part to be highlighted
|
|
14017
|
+
parts.push({
|
|
14018
|
+
highlight: true,
|
|
14019
|
+
text: match[0]
|
|
14020
|
+
});
|
|
14021
|
+
lastIndex = match.index + match[0].length;
|
|
14022
|
+
}
|
|
14023
|
+
// Add any remaining text after the last match
|
|
14024
|
+
if (lastIndex < text.length) {
|
|
14025
|
+
parts.push(text.substring(lastIndex));
|
|
14026
|
+
}
|
|
14027
|
+
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
|
|
14028
|
+
ref: ref,
|
|
14029
|
+
as: "h1",
|
|
14030
|
+
fontSize: fontSize,
|
|
14031
|
+
lineHeight: lineHeight + "px",
|
|
14032
|
+
fontWeight: "bold",
|
|
14033
|
+
textAlign: centered ? 'center' : 'left',
|
|
14034
|
+
animate: animationConfig
|
|
14035
|
+
}, props, views == null ? void 0 : views.container), parts.map((part, index) => (/*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
14036
|
+
key: index
|
|
14037
|
+
}, typeof part === 'string' ? part : (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
14038
|
+
as: "span",
|
|
14039
|
+
display: "inline"
|
|
14040
|
+
}, highlightStyleProps, views == null ? void 0 : views.highlight), part.text))))));
|
|
14041
|
+
}
|
|
14042
|
+
}
|
|
14043
|
+
// For multiple highlight texts
|
|
14044
|
+
if (Array.isArray(currentHighlightText)) {
|
|
14045
|
+
// Create a regex pattern to match any of the highlight texts
|
|
14046
|
+
// Use a more flexible approach that can match within words
|
|
14047
|
+
var _pattern = new RegExp("(" + currentHighlightText.join('|') + ")", 'gi');
|
|
14048
|
+
// Check if the pattern matches anything in the text
|
|
14049
|
+
if (_pattern.test(text)) {
|
|
14050
|
+
// Reset the regex pattern's lastIndex property
|
|
14051
|
+
_pattern.lastIndex = 0;
|
|
14052
|
+
// Split the text by the pattern and keep the matches
|
|
14053
|
+
var _parts = [];
|
|
14054
|
+
var _lastIndex = 0;
|
|
14055
|
+
var _match;
|
|
14056
|
+
while ((_match = _pattern.exec(text)) !== null) {
|
|
14057
|
+
// Add the text before the match
|
|
14058
|
+
if (_match.index > _lastIndex) {
|
|
14059
|
+
_parts.push(text.substring(_lastIndex, _match.index));
|
|
14060
|
+
}
|
|
14061
|
+
// Add the match as a special part to be highlighted
|
|
14062
|
+
_parts.push({
|
|
14063
|
+
highlight: true,
|
|
14064
|
+
text: _match[0]
|
|
14065
|
+
});
|
|
14066
|
+
_lastIndex = _match.index + _match[0].length;
|
|
14067
|
+
}
|
|
14068
|
+
// Add any remaining text after the last match
|
|
14069
|
+
if (_lastIndex < text.length) {
|
|
14070
|
+
_parts.push(text.substring(_lastIndex));
|
|
14071
|
+
}
|
|
14072
|
+
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
|
|
14073
|
+
ref: ref,
|
|
14074
|
+
as: "h1",
|
|
14075
|
+
fontSize: fontSize,
|
|
14076
|
+
lineHeight: lineHeight + "px",
|
|
14077
|
+
fontWeight: "bold",
|
|
14078
|
+
textAlign: centered ? 'center' : 'left',
|
|
14079
|
+
animate: animationConfig
|
|
14080
|
+
}, props, views == null ? void 0 : views.container), _parts.map((part, index) => (/*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
14081
|
+
key: index
|
|
14082
|
+
}, typeof part === 'string' ? part : (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
14083
|
+
as: "span",
|
|
14084
|
+
display: "inline"
|
|
14085
|
+
}, highlightStyleProps, views == null ? void 0 : views.highlight), part.text))))));
|
|
14086
|
+
}
|
|
14087
|
+
}
|
|
14088
|
+
}
|
|
14089
|
+
// Default rendering for non-string children or no highlighting
|
|
14090
|
+
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
|
|
14091
|
+
ref: ref,
|
|
14092
|
+
as: "h1",
|
|
14093
|
+
fontSize: fontSize,
|
|
14094
|
+
lineHeight: lineHeight + "px",
|
|
14095
|
+
fontWeight: "bold",
|
|
14096
|
+
textAlign: centered ? 'center' : 'left',
|
|
14097
|
+
animate: animationConfig
|
|
14098
|
+
}, props, views == null ? void 0 : views.container), content);
|
|
14099
|
+
};
|
|
14100
|
+
|
|
14101
|
+
/**
|
|
14102
|
+
* Title Component
|
|
14103
|
+
*
|
|
14104
|
+
* A component for rendering animated and highlighted titles in hero sections.
|
|
14105
|
+
*
|
|
14106
|
+
* Features:
|
|
14107
|
+
* - Text highlighting with various styles (background, underline, gradient, outline, glow)
|
|
14108
|
+
* - Multiple animation options (fade, slide, typewriter, reveal)
|
|
14109
|
+
* - Responsive sizing
|
|
14110
|
+
* - Customizable styling
|
|
14111
|
+
*
|
|
14112
|
+
* @example
|
|
14113
|
+
* // Basic usage
|
|
14114
|
+
* <Title>Welcome to Our Platform</Title>
|
|
14115
|
+
*
|
|
14116
|
+
* @example
|
|
14117
|
+
* // With highlighting
|
|
14118
|
+
* <Title highlightText="Platform" highlightStyle="background" highlightColor="theme.primary">
|
|
14119
|
+
* Welcome to Our Platform
|
|
14120
|
+
* </Title>
|
|
14121
|
+
*
|
|
14122
|
+
* @example
|
|
14123
|
+
* // With animation
|
|
14124
|
+
* <Title
|
|
14125
|
+
* animation="fadeIn"
|
|
14126
|
+
* animationDuration="1.5s"
|
|
14127
|
+
* size="2xl"
|
|
14128
|
+
* >
|
|
14129
|
+
* Animated Title
|
|
14130
|
+
* </Title>
|
|
14131
|
+
*
|
|
14132
|
+
* @example
|
|
14133
|
+
* // With multiple highlights
|
|
14134
|
+
* <Title
|
|
14135
|
+
* highlightText={["Amazing", "Features"]}
|
|
14136
|
+
* highlightStyle="gradient"
|
|
14137
|
+
* highlightColor="theme.primary"
|
|
14138
|
+
* highlightSecondaryColor="theme.secondary"
|
|
14139
|
+
* >
|
|
14140
|
+
* Discover our Amazing Product with Great Features
|
|
14141
|
+
* </Title>
|
|
14142
|
+
*/
|
|
14143
|
+
var TitleComponent = props => {
|
|
14144
|
+
return /*#__PURE__*/React__default.createElement(TitleView, Object.assign({}, props));
|
|
14145
|
+
};
|
|
14146
|
+
var Title = TitleComponent;
|
|
14147
|
+
|
|
13330
14148
|
// Declares the useToggleState function which takes defaultToggled parameter to initialize the toggle state.
|
|
13331
14149
|
var useToggleState = defaultToggled => {
|
|
13332
14150
|
// Creates a stateful value isHovered for tracking hover state and a function setIsHovered to update that state, initially false.
|
|
@@ -13342,7 +14160,7 @@ var useToggleState = defaultToggled => {
|
|
|
13342
14160
|
};
|
|
13343
14161
|
};
|
|
13344
14162
|
|
|
13345
|
-
var _excluded$
|
|
14163
|
+
var _excluded$M = ["children", "shape", "variant", "isHovered", "setIsHovered", "isDisabled", "isToggle", "setIsToggled", "onToggle", "views"];
|
|
13346
14164
|
var ToggleView = _ref => {
|
|
13347
14165
|
var {
|
|
13348
14166
|
children,
|
|
@@ -13356,7 +14174,7 @@ var ToggleView = _ref => {
|
|
|
13356
14174
|
onToggle,
|
|
13357
14175
|
views
|
|
13358
14176
|
} = _ref,
|
|
13359
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
14177
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$M);
|
|
13360
14178
|
var toggleColor = !isDisabled ? 'color.trueGray.400' : 'theme.disabled';
|
|
13361
14179
|
var isActive = !!(isToggle || isHovered);
|
|
13362
14180
|
var toggleVariants = {
|
|
@@ -13399,7 +14217,7 @@ var ToggleView = _ref => {
|
|
|
13399
14217
|
}, toggleVariants[variant], props, views == null ? void 0 : views.container), children);
|
|
13400
14218
|
};
|
|
13401
14219
|
|
|
13402
|
-
var _excluded$
|
|
14220
|
+
var _excluded$N = ["children", "shape", "variant", "isDisabled", "isToggled", "onToggle"];
|
|
13403
14221
|
// Destructuring properties from ToggleProps to be used within the ToggleComponent.
|
|
13404
14222
|
var ToggleComponent = _ref => {
|
|
13405
14223
|
var {
|
|
@@ -13411,7 +14229,7 @@ var ToggleComponent = _ref => {
|
|
|
13411
14229
|
isToggled = false,
|
|
13412
14230
|
onToggle
|
|
13413
14231
|
} = _ref,
|
|
13414
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
14232
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$N);
|
|
13415
14233
|
// Initializing toggle state and set state functions using the custom hook useToggleState.
|
|
13416
14234
|
var {
|
|
13417
14235
|
isHovered,
|
|
@@ -13802,7 +14620,7 @@ var getDropdownPosition = function getDropdownPosition(side, align) {
|
|
|
13802
14620
|
return positions[side];
|
|
13803
14621
|
};
|
|
13804
14622
|
|
|
13805
|
-
var _excluded$
|
|
14623
|
+
var _excluded$O = ["children", "views"],
|
|
13806
14624
|
_excluded2$d = ["items", "side", "align", "views"],
|
|
13807
14625
|
_excluded3$9 = ["item", "views"],
|
|
13808
14626
|
_excluded4$8 = ["views"],
|
|
@@ -13840,7 +14658,7 @@ var DropdownMenuTrigger = _ref2 => {
|
|
|
13840
14658
|
children,
|
|
13841
14659
|
views
|
|
13842
14660
|
} = _ref2,
|
|
13843
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
14661
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$O);
|
|
13844
14662
|
var {
|
|
13845
14663
|
isOpen,
|
|
13846
14664
|
setIsOpen
|
|
@@ -14000,7 +14818,7 @@ var DropdownMenuView = _ref6 => {
|
|
|
14000
14818
|
}));
|
|
14001
14819
|
};
|
|
14002
14820
|
|
|
14003
|
-
var _excluded$
|
|
14821
|
+
var _excluded$P = ["trigger", "items", "size", "variant", "side", "align", "defaultOpen", "views"];
|
|
14004
14822
|
/**
|
|
14005
14823
|
* DropdownMenu component for displaying a menu when clicking on a trigger element.
|
|
14006
14824
|
*/
|
|
@@ -14015,7 +14833,7 @@ var DropdownMenuComponent = _ref => {
|
|
|
14015
14833
|
defaultOpen = false,
|
|
14016
14834
|
views
|
|
14017
14835
|
} = _ref,
|
|
14018
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
14836
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$P);
|
|
14019
14837
|
var {
|
|
14020
14838
|
isOpen,
|
|
14021
14839
|
setIsOpen,
|
|
@@ -14213,7 +15031,7 @@ var useRect = ref => {
|
|
|
14213
15031
|
return rect;
|
|
14214
15032
|
};
|
|
14215
15033
|
|
|
14216
|
-
var _excluded$
|
|
15034
|
+
var _excluded$Q = ["children", "views", "asChild"],
|
|
14217
15035
|
_excluded2$e = ["children", "views", "side", "align", "sideOffset", "style", "backgroundColor", "borderRadius", "boxShadow", "padding", "minWidth", "maxWidth"];
|
|
14218
15036
|
// Create context for the HoverCard
|
|
14219
15037
|
var HoverCardContext = /*#__PURE__*/React.createContext({
|
|
@@ -14252,7 +15070,7 @@ var HoverCardTrigger = _ref2 => {
|
|
|
14252
15070
|
views,
|
|
14253
15071
|
asChild = false
|
|
14254
15072
|
} = _ref2,
|
|
14255
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
15073
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$Q);
|
|
14256
15074
|
var {
|
|
14257
15075
|
openCard,
|
|
14258
15076
|
closeCard,
|
|
@@ -14339,7 +15157,7 @@ var HoverCardContent = _ref3 => {
|
|
|
14339
15157
|
}, views == null ? void 0 : views.container, props), children);
|
|
14340
15158
|
};
|
|
14341
15159
|
|
|
14342
|
-
var _excluded$
|
|
15160
|
+
var _excluded$R = ["children", "views", "openDelay", "closeDelay"];
|
|
14343
15161
|
/**
|
|
14344
15162
|
* HoverCard component displays floating content when hovering over a trigger element.
|
|
14345
15163
|
* Supports configurable open and close delays for a smoother user experience.
|
|
@@ -14351,7 +15169,7 @@ var HoverCardComponent = _ref => {
|
|
|
14351
15169
|
openDelay,
|
|
14352
15170
|
closeDelay
|
|
14353
15171
|
} = _ref,
|
|
14354
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15172
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$R);
|
|
14355
15173
|
var hoverCardState = useHoverCardState({
|
|
14356
15174
|
openDelay,
|
|
14357
15175
|
closeDelay
|
|
@@ -14481,7 +15299,7 @@ var getMenubarContentPosition = orientation => {
|
|
|
14481
15299
|
};
|
|
14482
15300
|
};
|
|
14483
15301
|
|
|
14484
|
-
var _excluded$
|
|
15302
|
+
var _excluded$S = ["children", "orientation", "size", "variant", "views"];
|
|
14485
15303
|
// Create context for the Menubar
|
|
14486
15304
|
var MenubarContext = /*#__PURE__*/React.createContext({
|
|
14487
15305
|
activeMenuId: null,
|
|
@@ -14515,7 +15333,7 @@ var MenubarRoot = _ref2 => {
|
|
|
14515
15333
|
variant = 'default',
|
|
14516
15334
|
views
|
|
14517
15335
|
} = _ref2,
|
|
14518
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
15336
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$S);
|
|
14519
15337
|
var Container = orientation === 'horizontal' ? appStudio.Horizontal : appStudio.Vertical;
|
|
14520
15338
|
return /*#__PURE__*/React__default.createElement(Container, Object.assign({
|
|
14521
15339
|
role: "menubar",
|
|
@@ -14701,7 +15519,7 @@ var MenubarView = _ref8 => {
|
|
|
14701
15519
|
})))))));
|
|
14702
15520
|
};
|
|
14703
15521
|
|
|
14704
|
-
var _excluded$
|
|
15522
|
+
var _excluded$T = ["items", "orientation", "size", "variant", "defaultActiveMenuId", "defaultOpenMenuId", "views"];
|
|
14705
15523
|
/**
|
|
14706
15524
|
* Menubar component for creating horizontal or vertical menu bars with dropdown menus.
|
|
14707
15525
|
*/
|
|
@@ -14715,7 +15533,7 @@ var MenubarComponent = _ref => {
|
|
|
14715
15533
|
defaultOpenMenuId = null,
|
|
14716
15534
|
views
|
|
14717
15535
|
} = _ref,
|
|
14718
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15536
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$T);
|
|
14719
15537
|
var {
|
|
14720
15538
|
activeMenuId,
|
|
14721
15539
|
setActiveMenuId,
|
|
@@ -14871,7 +15689,7 @@ var DisabledButtonStyles = {
|
|
|
14871
15689
|
}
|
|
14872
15690
|
};
|
|
14873
15691
|
|
|
14874
|
-
var _excluded$
|
|
15692
|
+
var _excluded$U = ["currentPage", "totalPages", "onPageChange", "pageSize", "pageSizeOptions", "onPageSizeChange", "showPageSizeSelector", "showPageInfo", "maxPageButtons", "showFirstLastButtons", "size", "variant", "shape", "visiblePageNumbers", "views"];
|
|
14875
15693
|
var PaginationView = _ref => {
|
|
14876
15694
|
var {
|
|
14877
15695
|
currentPage,
|
|
@@ -14902,7 +15720,7 @@ var PaginationView = _ref => {
|
|
|
14902
15720
|
visiblePageNumbers,
|
|
14903
15721
|
views
|
|
14904
15722
|
} = _ref,
|
|
14905
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15723
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$U);
|
|
14906
15724
|
var handlePageChange = page => {
|
|
14907
15725
|
if (page < 1 || page > totalPages || page === currentPage) {
|
|
14908
15726
|
return;
|
|
@@ -15021,7 +15839,7 @@ var PaginationView = _ref => {
|
|
|
15021
15839
|
}, option.label))))));
|
|
15022
15840
|
};
|
|
15023
15841
|
|
|
15024
|
-
var _excluded$
|
|
15842
|
+
var _excluded$V = ["currentPage", "totalPages", "onPageChange", "pageSize", "pageSizeOptions", "onPageSizeChange", "showPageSizeSelector", "showPageInfo", "maxPageButtons", "showFirstLastButtons", "size", "variant", "shape", "views"];
|
|
15025
15843
|
/**
|
|
15026
15844
|
* Pagination component for navigating through pages of content.
|
|
15027
15845
|
*/
|
|
@@ -15042,7 +15860,7 @@ var PaginationComponent = _ref => {
|
|
|
15042
15860
|
shape = 'rounded',
|
|
15043
15861
|
views
|
|
15044
15862
|
} = _ref,
|
|
15045
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15863
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$V);
|
|
15046
15864
|
var {
|
|
15047
15865
|
visiblePageNumbers
|
|
15048
15866
|
} = usePaginationState(currentPage, totalPages, maxPageButtons);
|
|
@@ -15112,7 +15930,7 @@ var DefaultSeparatorStyles = {
|
|
|
15112
15930
|
}
|
|
15113
15931
|
};
|
|
15114
15932
|
|
|
15115
|
-
var _excluded$
|
|
15933
|
+
var _excluded$W = ["orientation", "variant", "thickness", "color", "spacing", "label", "decorative", "views", "themeMode"];
|
|
15116
15934
|
var SeparatorView = _ref => {
|
|
15117
15935
|
var {
|
|
15118
15936
|
orientation = 'horizontal',
|
|
@@ -15124,7 +15942,7 @@ var SeparatorView = _ref => {
|
|
|
15124
15942
|
decorative = false,
|
|
15125
15943
|
views
|
|
15126
15944
|
} = _ref,
|
|
15127
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15945
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$W);
|
|
15128
15946
|
// Access theme if needed for future enhancements
|
|
15129
15947
|
var {
|
|
15130
15948
|
themeMode
|
|
@@ -15362,7 +16180,7 @@ var SidebarTransitions = {
|
|
|
15362
16180
|
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)'
|
|
15363
16181
|
};
|
|
15364
16182
|
|
|
15365
|
-
var _excluded$
|
|
16183
|
+
var _excluded$X = ["children", "showToggleButton", "views"],
|
|
15366
16184
|
_excluded2$f = ["children", "views"],
|
|
15367
16185
|
_excluded3$a = ["children", "views"],
|
|
15368
16186
|
_excluded4$9 = ["children", "position", "size", "variant", "fixed", "hasBackdrop", "expandedWidth", "collapsedWidth", "breakpointBehavior", "elevation", "transitionPreset", "ariaLabel", "isExpanded", "isMobile", "collapse", "views", "themeMode"];
|
|
@@ -15395,7 +16213,7 @@ var SidebarHeader = _ref2 => {
|
|
|
15395
16213
|
showToggleButton = true,
|
|
15396
16214
|
views
|
|
15397
16215
|
} = _ref2,
|
|
15398
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
16216
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$X);
|
|
15399
16217
|
var {
|
|
15400
16218
|
isExpanded,
|
|
15401
16219
|
toggleExpanded,
|
|
@@ -15550,7 +16368,7 @@ var SidebarView = _ref5 => {
|
|
|
15550
16368
|
}))));
|
|
15551
16369
|
};
|
|
15552
16370
|
|
|
15553
|
-
var _excluded$
|
|
16371
|
+
var _excluded$Y = ["children", "position", "size", "variant", "defaultExpanded", "expanded", "onExpandedChange", "fixed", "hasBackdrop", "showToggleButton", "expandedWidth", "collapsedWidth", "breakpoint", "breakpointBehavior", "views"];
|
|
15554
16372
|
/**
|
|
15555
16373
|
* Sidebar component for creating collapsible, themeable and customizable sidebars.
|
|
15556
16374
|
*/
|
|
@@ -15572,7 +16390,7 @@ var SidebarComponent = _ref => {
|
|
|
15572
16390
|
breakpointBehavior = 'overlay',
|
|
15573
16391
|
views
|
|
15574
16392
|
} = _ref,
|
|
15575
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16393
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$Y);
|
|
15576
16394
|
var {
|
|
15577
16395
|
isExpanded,
|
|
15578
16396
|
toggleExpanded,
|
|
@@ -16037,7 +16855,7 @@ var HandleIconStyles = {
|
|
|
16037
16855
|
}
|
|
16038
16856
|
};
|
|
16039
16857
|
|
|
16040
|
-
var _excluded$
|
|
16858
|
+
var _excluded$Z = ["children", "id", "defaultSize", "minSize", "maxSize", "collapsible", "defaultCollapsed", "onCollapseChange", "views"],
|
|
16041
16859
|
_excluded2$g = ["id", "position", "disabled", "withVisualIndicator", "withCollapseButton", "collapseTarget", "views"],
|
|
16042
16860
|
_excluded3$b = ["children", "orientation", "size", "variant", "defaultSizes", "minSize", "maxSize", "collapsible", "containerRef", "autoSaveId", "views"];
|
|
16043
16861
|
// Create context for the Resizable component
|
|
@@ -16082,7 +16900,7 @@ var ResizablePanel = _ref2 => {
|
|
|
16082
16900
|
onCollapseChange,
|
|
16083
16901
|
views
|
|
16084
16902
|
} = _ref2,
|
|
16085
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
16903
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$Z);
|
|
16086
16904
|
var {
|
|
16087
16905
|
orientation,
|
|
16088
16906
|
registerPanel,
|
|
@@ -16297,7 +17115,7 @@ var ResizableView = _ref4 => {
|
|
|
16297
17115
|
}, ResizableOrientations[orientation], views == null ? void 0 : views.container, props), children);
|
|
16298
17116
|
};
|
|
16299
17117
|
|
|
16300
|
-
var _excluded$
|
|
17118
|
+
var _excluded$_ = ["children", "orientation", "size", "variant", "defaultSizes", "onSizesChange", "minSize", "maxSize", "collapsible", "autoSaveId", "storage", "keyboardResizeBy", "views"];
|
|
16301
17119
|
/**
|
|
16302
17120
|
* Resizable component for creating resizable panel groups and layouts.
|
|
16303
17121
|
*/
|
|
@@ -16317,7 +17135,7 @@ var ResizableComponent = _ref => {
|
|
|
16317
17135
|
keyboardResizeBy = 10,
|
|
16318
17136
|
views
|
|
16319
17137
|
} = _ref,
|
|
16320
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
17138
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$_);
|
|
16321
17139
|
var {
|
|
16322
17140
|
isResizing,
|
|
16323
17141
|
setIsResizing,
|
|
@@ -17085,7 +17903,7 @@ var CommandFooterStyles = {
|
|
|
17085
17903
|
color: 'color.gray.500'
|
|
17086
17904
|
};
|
|
17087
17905
|
|
|
17088
|
-
var _excluded
|
|
17906
|
+
var _excluded$$ = ["value", "onValueChange", "placeholder", "views"],
|
|
17089
17907
|
_excluded2$h = ["children", "views"],
|
|
17090
17908
|
_excluded3$c = ["heading", "children", "views"],
|
|
17091
17909
|
_excluded4$a = ["item", "selected", "onSelect", "views"],
|
|
@@ -17117,7 +17935,7 @@ var CommandInput = _ref2 => {
|
|
|
17117
17935
|
placeholder = 'Type a command or search...',
|
|
17118
17936
|
views
|
|
17119
17937
|
} = _ref2,
|
|
17120
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded
|
|
17938
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$$);
|
|
17121
17939
|
var inputRef = React.useRef(null);
|
|
17122
17940
|
// Focus input when component mounts
|
|
17123
17941
|
React__default.useEffect(() => {
|
|
@@ -17300,7 +18118,7 @@ var CommandView = _ref7 => {
|
|
|
17300
18118
|
})))), footer && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, CommandFooterStyles, views == null ? void 0 : views.footer), footer)))));
|
|
17301
18119
|
};
|
|
17302
18120
|
|
|
17303
|
-
var _excluded$
|
|
18121
|
+
var _excluded$10 = ["open", "onOpenChange", "groups", "commands", "placeholder", "size", "variant", "filter", "emptyState", "footer", "views"];
|
|
17304
18122
|
/**
|
|
17305
18123
|
* Command component for displaying a command palette with search functionality.
|
|
17306
18124
|
*/
|
|
@@ -17318,7 +18136,7 @@ var CommandComponent = _ref => {
|
|
|
17318
18136
|
footer,
|
|
17319
18137
|
views
|
|
17320
18138
|
} = _ref,
|
|
17321
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
18139
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$10);
|
|
17322
18140
|
var {
|
|
17323
18141
|
search,
|
|
17324
18142
|
setSearch,
|
|
@@ -17605,7 +18423,7 @@ var getArrowStyles = position => {
|
|
|
17605
18423
|
}
|
|
17606
18424
|
};
|
|
17607
18425
|
|
|
17608
|
-
var _excluded
|
|
18426
|
+
var _excluded$11 = ["children", "views", "asChild"],
|
|
17609
18427
|
_excluded2$i = ["children", "views"],
|
|
17610
18428
|
_excluded3$d = ["content", "children", "position", "align", "size", "variant", "showArrow", "views", "themeMode"];
|
|
17611
18429
|
// Create context for the Tooltip
|
|
@@ -17641,7 +18459,7 @@ var TooltipTrigger = _ref2 => {
|
|
|
17641
18459
|
views,
|
|
17642
18460
|
asChild = false
|
|
17643
18461
|
} = _ref2,
|
|
17644
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded
|
|
18462
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$11);
|
|
17645
18463
|
var {
|
|
17646
18464
|
openTooltip,
|
|
17647
18465
|
closeTooltip,
|
|
@@ -17734,7 +18552,7 @@ var TooltipView = _ref4 => {
|
|
|
17734
18552
|
}, TooltipSizes[size], TooltipVariants[variant], positionStyles, views == null ? void 0 : views.content), typeof content === 'string' ? (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({}, views == null ? void 0 : views.text), content)) : content, showArrow && /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, arrowStyles, views == null ? void 0 : views.arrow)))));
|
|
17735
18553
|
};
|
|
17736
18554
|
|
|
17737
|
-
var _excluded$
|
|
18555
|
+
var _excluded$12 = ["content", "children", "position", "align", "size", "variant", "openDelay", "closeDelay", "showArrow", "defaultOpen", "isDisabled", "views"];
|
|
17738
18556
|
/**
|
|
17739
18557
|
* Tooltip component for displaying additional information when hovering over an element.
|
|
17740
18558
|
* Supports configurable positions, delays, and styling.
|
|
@@ -17754,7 +18572,7 @@ var TooltipComponent = _ref => {
|
|
|
17754
18572
|
isDisabled = false,
|
|
17755
18573
|
views
|
|
17756
18574
|
} = _ref,
|
|
17757
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
18575
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$12);
|
|
17758
18576
|
var tooltipState = useTooltipState({
|
|
17759
18577
|
defaultOpen,
|
|
17760
18578
|
openDelay,
|
|
@@ -17795,6 +18613,7 @@ exports.Card = Card;
|
|
|
17795
18613
|
exports.Carousel = Carousel;
|
|
17796
18614
|
exports.Chart = Chart;
|
|
17797
18615
|
exports.ChartIcon = ChartIcon;
|
|
18616
|
+
exports.CheckIcon = CheckIcon;
|
|
17798
18617
|
exports.Checkbox = Checkbox;
|
|
17799
18618
|
exports.ChevronIcon = ChevronIcon;
|
|
17800
18619
|
exports.ClockIcon = ClockIcon;
|
|
@@ -17804,6 +18623,7 @@ exports.CloudIcon = CloudIcon;
|
|
|
17804
18623
|
exports.ComboBox = ComboBox;
|
|
17805
18624
|
exports.Command = Command;
|
|
17806
18625
|
exports.ContextMenu = ContextMenu;
|
|
18626
|
+
exports.CookieConsent = CookieConsent;
|
|
17807
18627
|
exports.CopyIcon = CopyIcon;
|
|
17808
18628
|
exports.CountryPicker = CountryPicker;
|
|
17809
18629
|
exports.CropIcon = CropIcon;
|
|
@@ -17837,6 +18657,7 @@ exports.FormikSlider = FormikSlider;
|
|
|
17837
18657
|
exports.FormikSwitch = FormikSwitch;
|
|
17838
18658
|
exports.FormikTextArea = FormikTextArea;
|
|
17839
18659
|
exports.FormikTextField = FormikTextField;
|
|
18660
|
+
exports.GiftIcon = GiftIcon;
|
|
17840
18661
|
exports.HeartIcon = HeartIcon;
|
|
17841
18662
|
exports.HelpIcon = HelpIcon;
|
|
17842
18663
|
exports.HomeIcon = HomeIcon;
|
|
@@ -17882,6 +18703,7 @@ exports.Separator = Separator;
|
|
|
17882
18703
|
exports.SettingsIcon = SettingsIcon;
|
|
17883
18704
|
exports.ShapeIcon = ShapeIcon;
|
|
17884
18705
|
exports.ShareIcon = ShareIcon;
|
|
18706
|
+
exports.ShieldIcon = ShieldIcon;
|
|
17885
18707
|
exports.Sidebar = Sidebar;
|
|
17886
18708
|
exports.Slider = Slider;
|
|
17887
18709
|
exports.SliderIcon = SliderIcon;
|
|
@@ -17898,6 +18720,7 @@ exports.TextField = TextField;
|
|
|
17898
18720
|
exports.TextIcon = TextIcon;
|
|
17899
18721
|
exports.ThreadsIcon = ThreadsIcon;
|
|
17900
18722
|
exports.TickIcon = TickIcon;
|
|
18723
|
+
exports.Title = Title;
|
|
17901
18724
|
exports.Toast = Toast;
|
|
17902
18725
|
exports.Toggle = Toggle;
|
|
17903
18726
|
exports.ToggleGroup = ToggleGroup;
|