fermmap-shared 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/main.cjs +21 -12
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +23 -14
- package/dist/module.mjs.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
This package contains a collection of accessible,
|
|
7
|
+
This package contains a collection of accessible, themeed React components designed for the FermMap application. All components are built on top of React Aria Components for accessibility and use React Spectrum S2 style-macros for consistent, type-safe atomic styling.
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
package/dist/main.cjs
CHANGED
|
@@ -1179,6 +1179,9 @@ function $25d82f0a3d474ebc$export$3f3caade1c12f8c9() {
|
|
|
1179
1179
|
if (context === undefined) throw new Error('useI18n must be used within an I18nProvider');
|
|
1180
1180
|
return context;
|
|
1181
1181
|
}
|
|
1182
|
+
function $25d82f0a3d474ebc$export$5aebe9a147f4d146() {
|
|
1183
|
+
return (0, $fs04y$reactintl.useIntl)();
|
|
1184
|
+
}
|
|
1182
1185
|
|
|
1183
1186
|
|
|
1184
1187
|
const $5a568b5eb65bfe76$var$closeButtonStyles = function anonymous(props) {
|
|
@@ -1207,7 +1210,7 @@ const $5a568b5eb65bfe76$var$closeButtonStyles = function anonymous(props) {
|
|
|
1207
1210
|
return rules;
|
|
1208
1211
|
};
|
|
1209
1212
|
const $5a568b5eb65bfe76$export$de65de8213222d10 = ({ onClose: onClose, ...props })=>{
|
|
1210
|
-
const intl = (0, $25d82f0a3d474ebc$
|
|
1213
|
+
const intl = (0, $25d82f0a3d474ebc$export$5aebe9a147f4d146)();
|
|
1211
1214
|
return (0, $fs04y$reactjsxruntime.jsx)((0, $fs04y$reactariacomponents.Button), {
|
|
1212
1215
|
...props,
|
|
1213
1216
|
onPress: onClose,
|
|
@@ -1590,7 +1593,7 @@ const $75461c19e6a33bc7$var$selectionIndicatorStyles = function anonymous(props)
|
|
|
1590
1593
|
return rules;
|
|
1591
1594
|
};
|
|
1592
1595
|
function $75461c19e6a33bc7$export$221f31a87e5a826c({ value: value, onChange: onChange, options: options, ariaLabel: ariaLabel }) {
|
|
1593
|
-
const intl = (0, $25d82f0a3d474ebc$
|
|
1596
|
+
const intl = (0, $25d82f0a3d474ebc$export$5aebe9a147f4d146)();
|
|
1594
1597
|
return (0, $fs04y$reactjsxruntime.jsx)((0, $fs04y$reactariacomponents.ToggleButtonGroup), {
|
|
1595
1598
|
selectionMode: "single",
|
|
1596
1599
|
selectedKeys: new Set([
|
|
@@ -2051,7 +2054,7 @@ const $7272752e0b828205$var$selectionIndicatorStyles = function anonymous(props)
|
|
|
2051
2054
|
return rules;
|
|
2052
2055
|
};
|
|
2053
2056
|
function $7272752e0b828205$export$668709c620d0b8e2({ value: value }) {
|
|
2054
|
-
const intl = (0, $25d82f0a3d474ebc$
|
|
2057
|
+
const intl = (0, $25d82f0a3d474ebc$export$5aebe9a147f4d146)();
|
|
2055
2058
|
const router = (0, $fs04y$nextnavigation.useRouter)();
|
|
2056
2059
|
const handleSelectionChange = (newValue)=>{
|
|
2057
2060
|
if (newValue === 'map') router.push('/');
|
|
@@ -2527,6 +2530,7 @@ function $fad215bb6064e329$export$f5c9f3c2c4054eec({ label: label, error: error,
|
|
|
2527
2530
|
const textareaRef = (0, $fs04y$react.useRef)(null);
|
|
2528
2531
|
// Auto-grow on value change
|
|
2529
2532
|
(0, $fs04y$react.useEffect)(()=>{
|
|
2533
|
+
if (typeof window === 'undefined') return;
|
|
2530
2534
|
const textarea = textareaRef.current;
|
|
2531
2535
|
if (!textarea) return;
|
|
2532
2536
|
// Reset height to recalculate
|
|
@@ -2568,7 +2572,7 @@ var $885bdde2b07b7632$exports = {};
|
|
|
2568
2572
|
$parcel$export($885bdde2b07b7632$exports, "ThemeProvider", () => $3a1d0d18027ba81c$export$d8964aec282183a3);
|
|
2569
2573
|
$parcel$export($885bdde2b07b7632$exports, "useTheme", () => $3a1d0d18027ba81c$export$93d4e7f90805808f);
|
|
2570
2574
|
$parcel$export($885bdde2b07b7632$exports, "I18nProvider", () => $25d82f0a3d474ebc$export$a54013f0d02a8f82);
|
|
2571
|
-
$parcel$export($885bdde2b07b7632$exports, "useIntl", () => $25d82f0a3d474ebc$
|
|
2575
|
+
$parcel$export($885bdde2b07b7632$exports, "useIntl", () => $25d82f0a3d474ebc$export$5aebe9a147f4d146);
|
|
2572
2576
|
$parcel$export($885bdde2b07b7632$exports, "FilterProvider", () => $8f5795e91d23efab$export$66b627500eff8faa);
|
|
2573
2577
|
$parcel$export($885bdde2b07b7632$exports, "useFilters", () => $8f5795e91d23efab$export$973ca22476b0e05f);
|
|
2574
2578
|
$parcel$export($885bdde2b07b7632$exports, "AxeDevTools", () => $ac6c22366fad60ff$export$dad69b6e16969c68);
|
|
@@ -2580,14 +2584,19 @@ const $3a1d0d18027ba81c$var$THEME_STORAGE_KEY = 'fermmap-theme';
|
|
|
2580
2584
|
// Get initial theme synchronously to prevent flicker
|
|
2581
2585
|
function $3a1d0d18027ba81c$var$getInitialTheme() {
|
|
2582
2586
|
if (typeof window === 'undefined') return 'light';
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2587
|
+
try {
|
|
2588
|
+
// First check if blocking script already set the attribute
|
|
2589
|
+
const htmlAttribute = document.documentElement.getAttribute('data-color-scheme');
|
|
2590
|
+
if (htmlAttribute && (htmlAttribute === 'light' || htmlAttribute === 'dark')) return htmlAttribute;
|
|
2591
|
+
// Fallback to localStorage
|
|
2592
|
+
const stored = localStorage.getItem($3a1d0d18027ba81c$var$THEME_STORAGE_KEY);
|
|
2593
|
+
if (stored && (stored === 'light' || stored === 'dark')) return stored;
|
|
2594
|
+
// Final fallback to system preference
|
|
2595
|
+
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
2596
|
+
} catch {
|
|
2597
|
+
// Fallback if any browser API fails
|
|
2598
|
+
return 'light';
|
|
2599
|
+
}
|
|
2591
2600
|
}
|
|
2592
2601
|
function $3a1d0d18027ba81c$export$d8964aec282183a3({ children: children }) {
|
|
2593
2602
|
// Initialize with a function to avoid SSR issues
|