@raystack/apsara 0.11.7 → 0.11.8
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/accordion/accordion.d.ts +8 -0
- package/dist/accordion/accordion.d.ts.map +1 -0
- package/dist/accordion/index.d.ts +2 -0
- package/dist/accordion/index.d.ts.map +1 -0
- package/dist/container/container.d.ts +1 -1
- package/dist/flex/flex.d.ts +3 -3
- package/dist/grid/grid.d.ts +5 -5
- package/dist/index.cjs +1144 -694
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +214 -93
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1145 -696
- package/dist/index.js.map +1 -1
- package/dist/rselect/rselect.d.ts.map +1 -1
- package/dist/sidebar/sidebar.d.ts +6 -6
- package/dist/sidebar/sidebar.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { createContext, useMemo, createElement, useContext,
|
|
2
|
+
import React__default, { createContext, useMemo, createElement, useContext, useCallback, forwardRef, Children, isValidElement, cloneElement, Fragment, useRef, useEffect, useState, useLayoutEffect, useReducer, Component, memo as memo$1 } from 'react';
|
|
3
3
|
import * as $7SXl2$reactdom from 'react-dom';
|
|
4
4
|
import $7SXl2$reactdom__default, { flushSync, createPortal } from 'react-dom';
|
|
5
5
|
|
|
@@ -1473,29 +1473,6 @@ function _extends() {
|
|
|
1473
1473
|
return createScope1;
|
|
1474
1474
|
}
|
|
1475
1475
|
|
|
1476
|
-
/**
|
|
1477
|
-
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
|
|
1478
|
-
* prop or avoid re-executing effects when passed as a dependency
|
|
1479
|
-
*/ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(callback) {
|
|
1480
|
-
const callbackRef = useRef(callback);
|
|
1481
|
-
useEffect(()=>{
|
|
1482
|
-
callbackRef.current = callback;
|
|
1483
|
-
}); // https://github.com/facebook/react/issues/19240
|
|
1484
|
-
return useMemo(()=>(...args)=>{
|
|
1485
|
-
var _callbackRef$current;
|
|
1486
|
-
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
|
|
1487
|
-
}
|
|
1488
|
-
, []);
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
/**
|
|
1492
|
-
* On the server, React emits a warning when calling `useLayoutEffect`.
|
|
1493
|
-
* This is because neither `useLayoutEffect` nor `useEffect` run on the server.
|
|
1494
|
-
* We use this safe version which suppresses the warning by replacing it with a noop on the server.
|
|
1495
|
-
*
|
|
1496
|
-
* See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
|
|
1497
|
-
*/ const $9f79659886946c16$export$e5c5a5f917a5871c$1 = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? useLayoutEffect : ()=>{};
|
|
1498
|
-
|
|
1499
1476
|
/**
|
|
1500
1477
|
* Set a given ref to a given value
|
|
1501
1478
|
* This utility takes care of different types of refs: callback refs and RefObject(s)
|
|
@@ -1595,6 +1572,158 @@ function $5e63c961fc1ce211$var$mergeProps$1(slotProps, childProps) {
|
|
|
1595
1572
|
};
|
|
1596
1573
|
}
|
|
1597
1574
|
|
|
1575
|
+
// We have resorted to returning slots directly rather than exposing primitives that can then
|
|
1576
|
+
// be slotted like `<CollectionItem as={Slot}>…</CollectionItem>`.
|
|
1577
|
+
// This is because we encountered issues with generic types that cannot be statically analysed
|
|
1578
|
+
// due to creating them dynamically via createCollection.
|
|
1579
|
+
function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
1580
|
+
/* -----------------------------------------------------------------------------------------------
|
|
1581
|
+
* CollectionProvider
|
|
1582
|
+
* ---------------------------------------------------------------------------------------------*/ const PROVIDER_NAME = name + 'CollectionProvider';
|
|
1583
|
+
const [createCollectionContext, createCollectionScope] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$1(PROVIDER_NAME);
|
|
1584
|
+
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {
|
|
1585
|
+
collectionRef: {
|
|
1586
|
+
current: null
|
|
1587
|
+
},
|
|
1588
|
+
itemMap: new Map()
|
|
1589
|
+
});
|
|
1590
|
+
const CollectionProvider = (props)=>{
|
|
1591
|
+
const { scope: scope , children: children } = props;
|
|
1592
|
+
const ref = React__default.useRef(null);
|
|
1593
|
+
const itemMap = React__default.useRef(new Map()).current;
|
|
1594
|
+
return /*#__PURE__*/ React__default.createElement(CollectionProviderImpl, {
|
|
1595
|
+
scope: scope,
|
|
1596
|
+
itemMap: itemMap,
|
|
1597
|
+
collectionRef: ref
|
|
1598
|
+
}, children);
|
|
1599
|
+
};
|
|
1600
|
+
/* -----------------------------------------------------------------------------------------------
|
|
1601
|
+
* CollectionSlot
|
|
1602
|
+
* ---------------------------------------------------------------------------------------------*/ const COLLECTION_SLOT_NAME = name + 'CollectionSlot';
|
|
1603
|
+
const CollectionSlot = /*#__PURE__*/ React__default.forwardRef((props, forwardedRef)=>{
|
|
1604
|
+
const { scope: scope , children: children } = props;
|
|
1605
|
+
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
1606
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, context.collectionRef);
|
|
1607
|
+
return /*#__PURE__*/ React__default.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360$1, {
|
|
1608
|
+
ref: composedRefs
|
|
1609
|
+
}, children);
|
|
1610
|
+
});
|
|
1611
|
+
/* -----------------------------------------------------------------------------------------------
|
|
1612
|
+
* CollectionItem
|
|
1613
|
+
* ---------------------------------------------------------------------------------------------*/ const ITEM_SLOT_NAME = name + 'CollectionItemSlot';
|
|
1614
|
+
const ITEM_DATA_ATTR = 'data-radix-collection-item';
|
|
1615
|
+
const CollectionItemSlot = /*#__PURE__*/ React__default.forwardRef((props, forwardedRef)=>{
|
|
1616
|
+
const { scope: scope , children: children , ...itemData } = props;
|
|
1617
|
+
const ref = React__default.useRef(null);
|
|
1618
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, ref);
|
|
1619
|
+
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
1620
|
+
React__default.useEffect(()=>{
|
|
1621
|
+
context.itemMap.set(ref, {
|
|
1622
|
+
ref: ref,
|
|
1623
|
+
...itemData
|
|
1624
|
+
});
|
|
1625
|
+
return ()=>void context.itemMap.delete(ref)
|
|
1626
|
+
;
|
|
1627
|
+
});
|
|
1628
|
+
return /*#__PURE__*/ React__default.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360$1, {
|
|
1629
|
+
[ITEM_DATA_ATTR]: '',
|
|
1630
|
+
ref: composedRefs
|
|
1631
|
+
}, children);
|
|
1632
|
+
});
|
|
1633
|
+
/* -----------------------------------------------------------------------------------------------
|
|
1634
|
+
* useCollection
|
|
1635
|
+
* ---------------------------------------------------------------------------------------------*/ function useCollection(scope) {
|
|
1636
|
+
const context = useCollectionContext(name + 'CollectionConsumer', scope);
|
|
1637
|
+
const getItems = React__default.useCallback(()=>{
|
|
1638
|
+
const collectionNode = context.collectionRef.current;
|
|
1639
|
+
if (!collectionNode) return [];
|
|
1640
|
+
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
1641
|
+
const items = Array.from(context.itemMap.values());
|
|
1642
|
+
const orderedItems = items.sort((a, b)=>orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
|
|
1643
|
+
);
|
|
1644
|
+
return orderedItems;
|
|
1645
|
+
}, [
|
|
1646
|
+
context.collectionRef,
|
|
1647
|
+
context.itemMap
|
|
1648
|
+
]);
|
|
1649
|
+
return getItems;
|
|
1650
|
+
}
|
|
1651
|
+
return [
|
|
1652
|
+
{
|
|
1653
|
+
Provider: CollectionProvider,
|
|
1654
|
+
Slot: CollectionSlot,
|
|
1655
|
+
ItemSlot: CollectionItemSlot
|
|
1656
|
+
},
|
|
1657
|
+
useCollection,
|
|
1658
|
+
createCollectionScope
|
|
1659
|
+
];
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
function $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true } = {}) {
|
|
1663
|
+
return function handleEvent(event) {
|
|
1664
|
+
originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);
|
|
1665
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);
|
|
1666
|
+
};
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
/**
|
|
1670
|
+
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
|
|
1671
|
+
* prop or avoid re-executing effects when passed as a dependency
|
|
1672
|
+
*/ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(callback) {
|
|
1673
|
+
const callbackRef = useRef(callback);
|
|
1674
|
+
useEffect(()=>{
|
|
1675
|
+
callbackRef.current = callback;
|
|
1676
|
+
}); // https://github.com/facebook/react/issues/19240
|
|
1677
|
+
return useMemo(()=>(...args)=>{
|
|
1678
|
+
var _callbackRef$current;
|
|
1679
|
+
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
|
|
1680
|
+
}
|
|
1681
|
+
, []);
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
function $71cd76cc60e0454e$export$6f32135080cb4c3$1({ prop: prop , defaultProp: defaultProp , onChange: onChange = ()=>{} }) {
|
|
1685
|
+
const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState$1({
|
|
1686
|
+
defaultProp: defaultProp,
|
|
1687
|
+
onChange: onChange
|
|
1688
|
+
});
|
|
1689
|
+
const isControlled = prop !== undefined;
|
|
1690
|
+
const value1 = isControlled ? prop : uncontrolledProp;
|
|
1691
|
+
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(onChange);
|
|
1692
|
+
const setValue = useCallback((nextValue)=>{
|
|
1693
|
+
if (isControlled) {
|
|
1694
|
+
const setter = nextValue;
|
|
1695
|
+
const value = typeof nextValue === 'function' ? setter(prop) : nextValue;
|
|
1696
|
+
if (value !== prop) handleChange(value);
|
|
1697
|
+
} else setUncontrolledProp(nextValue);
|
|
1698
|
+
}, [
|
|
1699
|
+
isControlled,
|
|
1700
|
+
prop,
|
|
1701
|
+
setUncontrolledProp,
|
|
1702
|
+
handleChange
|
|
1703
|
+
]);
|
|
1704
|
+
return [
|
|
1705
|
+
value1,
|
|
1706
|
+
setValue
|
|
1707
|
+
];
|
|
1708
|
+
}
|
|
1709
|
+
function $71cd76cc60e0454e$var$useUncontrolledState$1({ defaultProp: defaultProp , onChange: onChange }) {
|
|
1710
|
+
const uncontrolledState = useState(defaultProp);
|
|
1711
|
+
const [value] = uncontrolledState;
|
|
1712
|
+
const prevValueRef = useRef(value);
|
|
1713
|
+
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(onChange);
|
|
1714
|
+
useEffect(()=>{
|
|
1715
|
+
if (prevValueRef.current !== value) {
|
|
1716
|
+
handleChange(value);
|
|
1717
|
+
prevValueRef.current = value;
|
|
1718
|
+
}
|
|
1719
|
+
}, [
|
|
1720
|
+
value,
|
|
1721
|
+
prevValueRef,
|
|
1722
|
+
handleChange
|
|
1723
|
+
]);
|
|
1724
|
+
return uncontrolledState;
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1598
1727
|
const $8927f6f2acc4f386$var$NODES$1 = [
|
|
1599
1728
|
'a',
|
|
1600
1729
|
'button',
|
|
@@ -1676,393 +1805,61 @@ const $8927f6f2acc4f386$var$NODES$1 = [
|
|
|
1676
1805
|
);
|
|
1677
1806
|
}
|
|
1678
1807
|
|
|
1808
|
+
/**
|
|
1809
|
+
* On the server, React emits a warning when calling `useLayoutEffect`.
|
|
1810
|
+
* This is because neither `useLayoutEffect` nor `useEffect` run on the server.
|
|
1811
|
+
* We use this safe version which suppresses the warning by replacing it with a noop on the server.
|
|
1812
|
+
*
|
|
1813
|
+
* See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
|
|
1814
|
+
*/ const $9f79659886946c16$export$e5c5a5f917a5871c$1 = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? useLayoutEffect : ()=>{};
|
|
1815
|
+
|
|
1816
|
+
function $fe963b355347cc68$export$3e6543de14f8614f$1(initialState, machine) {
|
|
1817
|
+
return useReducer((state, event)=>{
|
|
1818
|
+
const nextState = machine[state][event];
|
|
1819
|
+
return nextState !== null && nextState !== void 0 ? nextState : state;
|
|
1820
|
+
}, initialState);
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
|
|
1824
|
+
const $921a889cee6df7e8$export$99c2b779aa4e8b8b$1 = (props)=>{
|
|
1825
|
+
const { present: present , children: children } = props;
|
|
1826
|
+
const presence = $921a889cee6df7e8$var$usePresence$1(present);
|
|
1827
|
+
const child = typeof children === 'function' ? children({
|
|
1828
|
+
present: presence.isPresent
|
|
1829
|
+
}) : Children.only(children);
|
|
1830
|
+
const ref = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(presence.ref, child.ref);
|
|
1831
|
+
const forceMount = typeof children === 'function';
|
|
1832
|
+
return forceMount || presence.isPresent ? /*#__PURE__*/ cloneElement(child, {
|
|
1833
|
+
ref: ref
|
|
1834
|
+
}) : null;
|
|
1835
|
+
};
|
|
1836
|
+
$921a889cee6df7e8$export$99c2b779aa4e8b8b$1.displayName = 'Presence';
|
|
1679
1837
|
/* -------------------------------------------------------------------------------------------------
|
|
1680
|
-
*
|
|
1681
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
1682
|
-
const [
|
|
1683
|
-
const
|
|
1684
|
-
const
|
|
1685
|
-
const
|
|
1686
|
-
const
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
const { __scopeAvatar: __scopeAvatar , src: src , onLoadingStatusChange: onLoadingStatusChange = ()=>{} , ...imageProps } = props;
|
|
1700
|
-
const context = $cddcb0b647441e34$var$useAvatarContext($cddcb0b647441e34$var$IMAGE_NAME, __scopeAvatar);
|
|
1701
|
-
const imageLoadingStatus = $cddcb0b647441e34$var$useImageLoadingStatus(src);
|
|
1702
|
-
const handleLoadingStatusChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1((status)=>{
|
|
1703
|
-
onLoadingStatusChange(status);
|
|
1704
|
-
context.onImageLoadingStatusChange(status);
|
|
1838
|
+
* usePresence
|
|
1839
|
+
* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$usePresence$1(present) {
|
|
1840
|
+
const [node1, setNode] = useState();
|
|
1841
|
+
const stylesRef = useRef({});
|
|
1842
|
+
const prevPresentRef = useRef(present);
|
|
1843
|
+
const prevAnimationNameRef = useRef('none');
|
|
1844
|
+
const initialState = present ? 'mounted' : 'unmounted';
|
|
1845
|
+
const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f$1(initialState, {
|
|
1846
|
+
mounted: {
|
|
1847
|
+
UNMOUNT: 'unmounted',
|
|
1848
|
+
ANIMATION_OUT: 'unmountSuspended'
|
|
1849
|
+
},
|
|
1850
|
+
unmountSuspended: {
|
|
1851
|
+
MOUNT: 'mounted',
|
|
1852
|
+
ANIMATION_END: 'unmounted'
|
|
1853
|
+
},
|
|
1854
|
+
unmounted: {
|
|
1855
|
+
MOUNT: 'mounted'
|
|
1856
|
+
}
|
|
1705
1857
|
});
|
|
1706
|
-
|
|
1707
|
-
|
|
1858
|
+
useEffect(()=>{
|
|
1859
|
+
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName$1(stylesRef.current);
|
|
1860
|
+
prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';
|
|
1708
1861
|
}, [
|
|
1709
|
-
|
|
1710
|
-
handleLoadingStatusChange
|
|
1711
|
-
]);
|
|
1712
|
-
return imageLoadingStatus === 'loaded' ? /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.img, _extends({}, imageProps, {
|
|
1713
|
-
ref: forwardedRef,
|
|
1714
|
-
src: src
|
|
1715
|
-
})) : null;
|
|
1716
|
-
});
|
|
1717
|
-
/* -------------------------------------------------------------------------------------------------
|
|
1718
|
-
* AvatarFallback
|
|
1719
|
-
* -----------------------------------------------------------------------------------------------*/ const $cddcb0b647441e34$var$FALLBACK_NAME = 'AvatarFallback';
|
|
1720
|
-
const $cddcb0b647441e34$export$69fffb6a9571fbfe = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
1721
|
-
const { __scopeAvatar: __scopeAvatar , delayMs: delayMs , ...fallbackProps } = props;
|
|
1722
|
-
const context = $cddcb0b647441e34$var$useAvatarContext($cddcb0b647441e34$var$FALLBACK_NAME, __scopeAvatar);
|
|
1723
|
-
const [canRender, setCanRender] = useState(delayMs === undefined);
|
|
1724
|
-
useEffect(()=>{
|
|
1725
|
-
if (delayMs !== undefined) {
|
|
1726
|
-
const timerId = window.setTimeout(()=>setCanRender(true)
|
|
1727
|
-
, delayMs);
|
|
1728
|
-
return ()=>window.clearTimeout(timerId)
|
|
1729
|
-
;
|
|
1730
|
-
}
|
|
1731
|
-
}, [
|
|
1732
|
-
delayMs
|
|
1733
|
-
]);
|
|
1734
|
-
return canRender && context.imageLoadingStatus !== 'loaded' ? /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.span, _extends({}, fallbackProps, {
|
|
1735
|
-
ref: forwardedRef
|
|
1736
|
-
})) : null;
|
|
1737
|
-
});
|
|
1738
|
-
/* -----------------------------------------------------------------------------------------------*/ function $cddcb0b647441e34$var$useImageLoadingStatus(src) {
|
|
1739
|
-
const [loadingStatus, setLoadingStatus] = useState('idle');
|
|
1740
|
-
useEffect(()=>{
|
|
1741
|
-
if (!src) {
|
|
1742
|
-
setLoadingStatus('error');
|
|
1743
|
-
return;
|
|
1744
|
-
}
|
|
1745
|
-
let isMounted = true;
|
|
1746
|
-
const image = new window.Image();
|
|
1747
|
-
const updateStatus = (status)=>()=>{
|
|
1748
|
-
if (!isMounted) return;
|
|
1749
|
-
setLoadingStatus(status);
|
|
1750
|
-
}
|
|
1751
|
-
;
|
|
1752
|
-
setLoadingStatus('loading');
|
|
1753
|
-
image.onload = updateStatus('loaded');
|
|
1754
|
-
image.onerror = updateStatus('error');
|
|
1755
|
-
image.src = src;
|
|
1756
|
-
return ()=>{
|
|
1757
|
-
isMounted = false;
|
|
1758
|
-
};
|
|
1759
|
-
}, [
|
|
1760
|
-
src
|
|
1761
|
-
]);
|
|
1762
|
-
return loadingStatus;
|
|
1763
|
-
}
|
|
1764
|
-
const $cddcb0b647441e34$export$be92b6f5f03c0fe9 = $cddcb0b647441e34$export$e2255cf6045e8d47;
|
|
1765
|
-
const $cddcb0b647441e34$export$3e431a229df88919 = $cddcb0b647441e34$export$2cd8ae1985206fe8;
|
|
1766
|
-
const $cddcb0b647441e34$export$fb8d7f40caaeea67 = $cddcb0b647441e34$export$69fffb6a9571fbfe;
|
|
1767
|
-
|
|
1768
|
-
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
1769
|
-
|
|
1770
|
-
const falsyToString = (value)=>typeof value === "boolean" ? "".concat(value) : value === 0 ? "0" : value;
|
|
1771
|
-
const cx = clsx;
|
|
1772
|
-
const cva = (base, config)=>{
|
|
1773
|
-
return (props)=>{
|
|
1774
|
-
var ref;
|
|
1775
|
-
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
1776
|
-
const { variants , defaultVariants } = config;
|
|
1777
|
-
const getVariantClassNames = Object.keys(variants).map((variant)=>{
|
|
1778
|
-
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
1779
|
-
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
1780
|
-
if (variantProp === null) return null;
|
|
1781
|
-
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
1782
|
-
return variants[variant][variantKey];
|
|
1783
|
-
});
|
|
1784
|
-
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
|
|
1785
|
-
let [key, value] = param;
|
|
1786
|
-
if (value === undefined) {
|
|
1787
|
-
return acc;
|
|
1788
|
-
}
|
|
1789
|
-
acc[key] = value;
|
|
1790
|
-
return acc;
|
|
1791
|
-
}, {});
|
|
1792
|
-
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (ref = config.compoundVariants) === null || ref === void 0 ? void 0 : ref.reduce((acc, param1)=>{
|
|
1793
|
-
let { class: cvClass , className: cvClassName , ...compoundVariantOptions } = param1;
|
|
1794
|
-
return Object.entries(compoundVariantOptions).every((param)=>{
|
|
1795
|
-
let [key, value] = param;
|
|
1796
|
-
return Array.isArray(value) ? value.includes({
|
|
1797
|
-
...defaultVariants,
|
|
1798
|
-
...propsWithoutUndefined
|
|
1799
|
-
}[key]) : ({
|
|
1800
|
-
...defaultVariants,
|
|
1801
|
-
...propsWithoutUndefined
|
|
1802
|
-
})[key] === value;
|
|
1803
|
-
}) ? [
|
|
1804
|
-
...acc,
|
|
1805
|
-
cvClass,
|
|
1806
|
-
cvClassName
|
|
1807
|
-
] : acc;
|
|
1808
|
-
}, []);
|
|
1809
|
-
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
1810
|
-
};
|
|
1811
|
-
};
|
|
1812
|
-
|
|
1813
|
-
var styles$A = {"box":"box-module_box__ETj3v"};
|
|
1814
|
-
|
|
1815
|
-
const box = cva(styles$A.box);
|
|
1816
|
-
function Box({ children, className, ...props }) {
|
|
1817
|
-
return (jsxRuntimeExports.jsx("div", { className: box({ className }), ...props, children: children }));
|
|
1818
|
-
}
|
|
1819
|
-
|
|
1820
|
-
var styles$z = {"avatar":"avatar-module_avatar__jlJnk","avatar-square":"avatar-module_avatar-square__vypF7","avatar-circle":"avatar-module_avatar-circle__XP6E3","avatar-disabled":"avatar-module_avatar-disabled__rsBE6","imageWrapper":"avatar-module_imageWrapper__dhsku","image":"avatar-module_image__P6Pav","fallback":"avatar-module_fallback__NzNwU"};
|
|
1821
|
-
|
|
1822
|
-
const avatar = cva(styles$z.avatar, {
|
|
1823
|
-
variants: {
|
|
1824
|
-
shape: {
|
|
1825
|
-
square: styles$z["avatar-square"],
|
|
1826
|
-
circle: styles$z["avatar-circle"],
|
|
1827
|
-
},
|
|
1828
|
-
disabled: {
|
|
1829
|
-
true: styles$z["avatar-disabled"],
|
|
1830
|
-
},
|
|
1831
|
-
},
|
|
1832
|
-
defaultVariants: {
|
|
1833
|
-
shape: "circle",
|
|
1834
|
-
},
|
|
1835
|
-
});
|
|
1836
|
-
const image$1 = cva(styles$z.image);
|
|
1837
|
-
const AvatarRoot = forwardRef(({ className, alt, src, fallback, shape, style, imageProps, ...props }, ref) => (jsxRuntimeExports.jsx(Box, { className: styles$z.imageWrapper, style: style, children: jsxRuntimeExports.jsxs($cddcb0b647441e34$export$be92b6f5f03c0fe9, { ref: ref, className: avatar({ shape, className }), style: imageProps, ...props, children: [jsxRuntimeExports.jsx(AvatarImage, { alt: alt, src: src }), jsxRuntimeExports.jsx(AvatarFallback, { children: fallback })] }) })));
|
|
1838
|
-
AvatarRoot.displayName = $cddcb0b647441e34$export$be92b6f5f03c0fe9.displayName;
|
|
1839
|
-
const AvatarImage = forwardRef(({ className, sizes, ...props }, ref) => (jsxRuntimeExports.jsx($cddcb0b647441e34$export$3e431a229df88919, { ref: ref, className: image$1({ className }), ...props })));
|
|
1840
|
-
AvatarImage.displayName = $cddcb0b647441e34$export$3e431a229df88919.displayName;
|
|
1841
|
-
const fallback = cva(styles$z.fallback);
|
|
1842
|
-
const AvatarFallback = forwardRef(({ className, ...props }, ref) => (jsxRuntimeExports.jsx($cddcb0b647441e34$export$fb8d7f40caaeea67, { ref: ref, className: fallback({ className }), ...props })));
|
|
1843
|
-
AvatarFallback.displayName = $cddcb0b647441e34$export$fb8d7f40caaeea67.displayName;
|
|
1844
|
-
const Avatar = Object.assign(AvatarRoot, {
|
|
1845
|
-
Image: AvatarImage,
|
|
1846
|
-
Fallback: AvatarFallback,
|
|
1847
|
-
});
|
|
1848
|
-
|
|
1849
|
-
var styles$y = {"badge":"badge-module_badge__NAloH"};
|
|
1850
|
-
|
|
1851
|
-
const badge = cva(styles$y.badge, {
|
|
1852
|
-
variants: {
|
|
1853
|
-
color: {},
|
|
1854
|
-
},
|
|
1855
|
-
});
|
|
1856
|
-
const Badge = (props, ref) => {
|
|
1857
|
-
const { color, className, children } = props;
|
|
1858
|
-
return jsxRuntimeExports.jsx("span", { className: badge({ color, className }), children: children });
|
|
1859
|
-
};
|
|
1860
|
-
var badge$1 = React__default.forwardRef(Badge);
|
|
1861
|
-
|
|
1862
|
-
var styles$x = {"body":"body-module_body__0sfEI","body-small":"body-module_body-small__CjW1C","body-medium":"body-module_body-medium__XVmQw","body-large":"body-module_body-large__KqAga"};
|
|
1863
|
-
|
|
1864
|
-
const body$1 = cva(styles$x.body, {
|
|
1865
|
-
variants: {
|
|
1866
|
-
size: {
|
|
1867
|
-
small: styles$x["body-small"],
|
|
1868
|
-
medium: styles$x["body-medium"],
|
|
1869
|
-
large: styles$x["body-large"],
|
|
1870
|
-
},
|
|
1871
|
-
},
|
|
1872
|
-
defaultVariants: {
|
|
1873
|
-
size: "small",
|
|
1874
|
-
},
|
|
1875
|
-
});
|
|
1876
|
-
function Body({ children, className, size, ...props }) {
|
|
1877
|
-
return (jsxRuntimeExports.jsx("span", { className: body$1({ size, className }), ...props, children: children }));
|
|
1878
|
-
}
|
|
1879
|
-
|
|
1880
|
-
var styles$w = {"button":"button-module_button__9VQ21","button-small":"button-module_button-small__RR1mh","button-medium":"button-module_button-medium__79Bf1","button-large":"button-module_button-large__BQy6w","button-round":"button-module_button-round__Gd30S","button-primary":"button-module_button-primary__R0k9n","button-outline":"button-module_button-outline__MN25q","button-secondary":"button-module_button-secondary__zDkNV","button-ghost":"button-module_button-ghost__KcZUm","button-danger":"button-module_button-danger__dnB-7"};
|
|
1881
|
-
|
|
1882
|
-
const button = cva(styles$w.button, {
|
|
1883
|
-
variants: {
|
|
1884
|
-
variant: {
|
|
1885
|
-
primary: styles$w["button-primary"],
|
|
1886
|
-
outline: styles$w["button-outline"],
|
|
1887
|
-
secondary: styles$w["button-secondary"],
|
|
1888
|
-
ghost: styles$w["button-ghost"],
|
|
1889
|
-
danger: styles$w["button-danger"],
|
|
1890
|
-
},
|
|
1891
|
-
size: {
|
|
1892
|
-
small: styles$w["button-small"],
|
|
1893
|
-
medium: styles$w["button-medium"],
|
|
1894
|
-
large: styles$w["button-large"],
|
|
1895
|
-
},
|
|
1896
|
-
},
|
|
1897
|
-
});
|
|
1898
|
-
const Button = forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
1899
|
-
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360$1 : "button";
|
|
1900
|
-
return (jsxRuntimeExports.jsx(Comp, { className: button({ variant, size, className }), ref: ref, ...props }));
|
|
1901
|
-
});
|
|
1902
|
-
Button.displayName = "Button";
|
|
1903
|
-
|
|
1904
|
-
function $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true } = {}) {
|
|
1905
|
-
return function handleEvent(event) {
|
|
1906
|
-
originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);
|
|
1907
|
-
if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);
|
|
1908
|
-
};
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
function $71cd76cc60e0454e$export$6f32135080cb4c3$1({ prop: prop , defaultProp: defaultProp , onChange: onChange = ()=>{} }) {
|
|
1912
|
-
const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState$1({
|
|
1913
|
-
defaultProp: defaultProp,
|
|
1914
|
-
onChange: onChange
|
|
1915
|
-
});
|
|
1916
|
-
const isControlled = prop !== undefined;
|
|
1917
|
-
const value1 = isControlled ? prop : uncontrolledProp;
|
|
1918
|
-
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(onChange);
|
|
1919
|
-
const setValue = useCallback((nextValue)=>{
|
|
1920
|
-
if (isControlled) {
|
|
1921
|
-
const setter = nextValue;
|
|
1922
|
-
const value = typeof nextValue === 'function' ? setter(prop) : nextValue;
|
|
1923
|
-
if (value !== prop) handleChange(value);
|
|
1924
|
-
} else setUncontrolledProp(nextValue);
|
|
1925
|
-
}, [
|
|
1926
|
-
isControlled,
|
|
1927
|
-
prop,
|
|
1928
|
-
setUncontrolledProp,
|
|
1929
|
-
handleChange
|
|
1930
|
-
]);
|
|
1931
|
-
return [
|
|
1932
|
-
value1,
|
|
1933
|
-
setValue
|
|
1934
|
-
];
|
|
1935
|
-
}
|
|
1936
|
-
function $71cd76cc60e0454e$var$useUncontrolledState$1({ defaultProp: defaultProp , onChange: onChange }) {
|
|
1937
|
-
const uncontrolledState = useState(defaultProp);
|
|
1938
|
-
const [value] = uncontrolledState;
|
|
1939
|
-
const prevValueRef = useRef(value);
|
|
1940
|
-
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(onChange);
|
|
1941
|
-
useEffect(()=>{
|
|
1942
|
-
if (prevValueRef.current !== value) {
|
|
1943
|
-
handleChange(value);
|
|
1944
|
-
prevValueRef.current = value;
|
|
1945
|
-
}
|
|
1946
|
-
}, [
|
|
1947
|
-
value,
|
|
1948
|
-
prevValueRef,
|
|
1949
|
-
handleChange
|
|
1950
|
-
]);
|
|
1951
|
-
return uncontrolledState;
|
|
1952
|
-
}
|
|
1953
|
-
|
|
1954
|
-
function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
|
|
1955
|
-
const ref = useRef({
|
|
1956
|
-
value: value,
|
|
1957
|
-
previous: value
|
|
1958
|
-
}); // We compare values before making an update to ensure that
|
|
1959
|
-
// a change has been made. This ensures the previous value is
|
|
1960
|
-
// persisted correctly between renders.
|
|
1961
|
-
return useMemo(()=>{
|
|
1962
|
-
if (ref.current.value !== value) {
|
|
1963
|
-
ref.current.previous = ref.current.value;
|
|
1964
|
-
ref.current.value = value;
|
|
1965
|
-
}
|
|
1966
|
-
return ref.current.previous;
|
|
1967
|
-
}, [
|
|
1968
|
-
value
|
|
1969
|
-
]);
|
|
1970
|
-
}
|
|
1971
|
-
|
|
1972
|
-
function $db6c3485150b8e66$export$1ab7ae714698c4b8(element) {
|
|
1973
|
-
const [size, setSize] = useState(undefined);
|
|
1974
|
-
$9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
|
|
1975
|
-
if (element) {
|
|
1976
|
-
// provide size as early as possible
|
|
1977
|
-
setSize({
|
|
1978
|
-
width: element.offsetWidth,
|
|
1979
|
-
height: element.offsetHeight
|
|
1980
|
-
});
|
|
1981
|
-
const resizeObserver = new ResizeObserver((entries)=>{
|
|
1982
|
-
if (!Array.isArray(entries)) return;
|
|
1983
|
-
// Since we only observe the one element, we don't need to loop over the
|
|
1984
|
-
// array
|
|
1985
|
-
if (!entries.length) return;
|
|
1986
|
-
const entry = entries[0];
|
|
1987
|
-
let width;
|
|
1988
|
-
let height;
|
|
1989
|
-
if ('borderBoxSize' in entry) {
|
|
1990
|
-
const borderSizeEntry = entry['borderBoxSize']; // iron out differences between browsers
|
|
1991
|
-
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
1992
|
-
width = borderSize['inlineSize'];
|
|
1993
|
-
height = borderSize['blockSize'];
|
|
1994
|
-
} else {
|
|
1995
|
-
// for browsers that don't support `borderBoxSize`
|
|
1996
|
-
// we calculate it ourselves to get the correct border box.
|
|
1997
|
-
width = element.offsetWidth;
|
|
1998
|
-
height = element.offsetHeight;
|
|
1999
|
-
}
|
|
2000
|
-
setSize({
|
|
2001
|
-
width: width,
|
|
2002
|
-
height: height
|
|
2003
|
-
});
|
|
2004
|
-
});
|
|
2005
|
-
resizeObserver.observe(element, {
|
|
2006
|
-
box: 'border-box'
|
|
2007
|
-
});
|
|
2008
|
-
return ()=>resizeObserver.unobserve(element)
|
|
2009
|
-
;
|
|
2010
|
-
} else // We only want to reset to `undefined` when the element becomes `null`,
|
|
2011
|
-
// not if it changes to another element.
|
|
2012
|
-
setSize(undefined);
|
|
2013
|
-
}, [
|
|
2014
|
-
element
|
|
2015
|
-
]);
|
|
2016
|
-
return size;
|
|
2017
|
-
}
|
|
2018
|
-
|
|
2019
|
-
function $fe963b355347cc68$export$3e6543de14f8614f$1(initialState, machine) {
|
|
2020
|
-
return useReducer((state, event)=>{
|
|
2021
|
-
const nextState = machine[state][event];
|
|
2022
|
-
return nextState !== null && nextState !== void 0 ? nextState : state;
|
|
2023
|
-
}, initialState);
|
|
2024
|
-
}
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
const $921a889cee6df7e8$export$99c2b779aa4e8b8b$1 = (props)=>{
|
|
2028
|
-
const { present: present , children: children } = props;
|
|
2029
|
-
const presence = $921a889cee6df7e8$var$usePresence$1(present);
|
|
2030
|
-
const child = typeof children === 'function' ? children({
|
|
2031
|
-
present: presence.isPresent
|
|
2032
|
-
}) : Children.only(children);
|
|
2033
|
-
const ref = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(presence.ref, child.ref);
|
|
2034
|
-
const forceMount = typeof children === 'function';
|
|
2035
|
-
return forceMount || presence.isPresent ? /*#__PURE__*/ cloneElement(child, {
|
|
2036
|
-
ref: ref
|
|
2037
|
-
}) : null;
|
|
2038
|
-
};
|
|
2039
|
-
$921a889cee6df7e8$export$99c2b779aa4e8b8b$1.displayName = 'Presence';
|
|
2040
|
-
/* -------------------------------------------------------------------------------------------------
|
|
2041
|
-
* usePresence
|
|
2042
|
-
* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$usePresence$1(present) {
|
|
2043
|
-
const [node1, setNode] = useState();
|
|
2044
|
-
const stylesRef = useRef({});
|
|
2045
|
-
const prevPresentRef = useRef(present);
|
|
2046
|
-
const prevAnimationNameRef = useRef('none');
|
|
2047
|
-
const initialState = present ? 'mounted' : 'unmounted';
|
|
2048
|
-
const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f$1(initialState, {
|
|
2049
|
-
mounted: {
|
|
2050
|
-
UNMOUNT: 'unmounted',
|
|
2051
|
-
ANIMATION_OUT: 'unmountSuspended'
|
|
2052
|
-
},
|
|
2053
|
-
unmountSuspended: {
|
|
2054
|
-
MOUNT: 'mounted',
|
|
2055
|
-
ANIMATION_END: 'unmounted'
|
|
2056
|
-
},
|
|
2057
|
-
unmounted: {
|
|
2058
|
-
MOUNT: 'mounted'
|
|
2059
|
-
}
|
|
2060
|
-
});
|
|
2061
|
-
useEffect(()=>{
|
|
2062
|
-
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName$1(stylesRef.current);
|
|
2063
|
-
prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';
|
|
2064
|
-
}, [
|
|
2065
|
-
state
|
|
1862
|
+
state
|
|
2066
1863
|
]);
|
|
2067
1864
|
$9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
|
|
2068
1865
|
const styles = stylesRef.current;
|
|
@@ -2140,147 +1937,435 @@ $921a889cee6df7e8$export$99c2b779aa4e8b8b$1.displayName = 'Presence';
|
|
|
2140
1937
|
return (styles === null || styles === void 0 ? void 0 : styles.animationName) || 'none';
|
|
2141
1938
|
}
|
|
2142
1939
|
|
|
1940
|
+
const $1746a345f3d73bb7$var$useReactId$1 = React['useId'.toString()] || (()=>undefined
|
|
1941
|
+
);
|
|
1942
|
+
let $1746a345f3d73bb7$var$count$1 = 0;
|
|
1943
|
+
function $1746a345f3d73bb7$export$f680877a34711e37$1(deterministicId) {
|
|
1944
|
+
const [id, setId] = React.useState($1746a345f3d73bb7$var$useReactId$1()); // React versions older than 18 will have client-side ids only.
|
|
1945
|
+
$9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
|
|
1946
|
+
if (!deterministicId) setId((reactId)=>reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count$1++)
|
|
1947
|
+
);
|
|
1948
|
+
}, [
|
|
1949
|
+
deterministicId
|
|
1950
|
+
]);
|
|
1951
|
+
return deterministicId || (id ? `radix-${id}` : '');
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
/* -------------------------------------------------------------------------------------------------
|
|
1955
|
+
* Collapsible
|
|
1956
|
+
* -----------------------------------------------------------------------------------------------*/ const $409067139f391064$var$COLLAPSIBLE_NAME = 'Collapsible';
|
|
1957
|
+
const [$409067139f391064$var$createCollapsibleContext, $409067139f391064$export$952b32dcbe73087a] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$1($409067139f391064$var$COLLAPSIBLE_NAME);
|
|
1958
|
+
const [$409067139f391064$var$CollapsibleProvider, $409067139f391064$var$useCollapsibleContext] = $409067139f391064$var$createCollapsibleContext($409067139f391064$var$COLLAPSIBLE_NAME);
|
|
1959
|
+
const $409067139f391064$export$6eb0f7ddcda6131f = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
1960
|
+
const { __scopeCollapsible: __scopeCollapsible , open: openProp , defaultOpen: defaultOpen , disabled: disabled , onOpenChange: onOpenChange , ...collapsibleProps } = props;
|
|
1961
|
+
const [open = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3$1({
|
|
1962
|
+
prop: openProp,
|
|
1963
|
+
defaultProp: defaultOpen,
|
|
1964
|
+
onChange: onOpenChange
|
|
1965
|
+
});
|
|
1966
|
+
return /*#__PURE__*/ createElement($409067139f391064$var$CollapsibleProvider, {
|
|
1967
|
+
scope: __scopeCollapsible,
|
|
1968
|
+
disabled: disabled,
|
|
1969
|
+
contentId: $1746a345f3d73bb7$export$f680877a34711e37$1(),
|
|
1970
|
+
open: open,
|
|
1971
|
+
onOpenToggle: useCallback(()=>setOpen((prevOpen)=>!prevOpen
|
|
1972
|
+
)
|
|
1973
|
+
, [
|
|
1974
|
+
setOpen
|
|
1975
|
+
])
|
|
1976
|
+
}, /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({
|
|
1977
|
+
"data-state": $409067139f391064$var$getState(open),
|
|
1978
|
+
"data-disabled": disabled ? '' : undefined
|
|
1979
|
+
}, collapsibleProps, {
|
|
1980
|
+
ref: forwardedRef
|
|
1981
|
+
})));
|
|
1982
|
+
});
|
|
1983
|
+
/* -------------------------------------------------------------------------------------------------
|
|
1984
|
+
* CollapsibleTrigger
|
|
1985
|
+
* -----------------------------------------------------------------------------------------------*/ const $409067139f391064$var$TRIGGER_NAME = 'CollapsibleTrigger';
|
|
1986
|
+
const $409067139f391064$export$c135dce7b15bbbdc = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
1987
|
+
const { __scopeCollapsible: __scopeCollapsible , ...triggerProps } = props;
|
|
1988
|
+
const context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$TRIGGER_NAME, __scopeCollapsible);
|
|
1989
|
+
return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.button, _extends({
|
|
1990
|
+
type: "button",
|
|
1991
|
+
"aria-controls": context.contentId,
|
|
1992
|
+
"aria-expanded": context.open || false,
|
|
1993
|
+
"data-state": $409067139f391064$var$getState(context.open),
|
|
1994
|
+
"data-disabled": context.disabled ? '' : undefined,
|
|
1995
|
+
disabled: context.disabled
|
|
1996
|
+
}, triggerProps, {
|
|
1997
|
+
ref: forwardedRef,
|
|
1998
|
+
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onClick, context.onOpenToggle)
|
|
1999
|
+
}));
|
|
2000
|
+
});
|
|
2001
|
+
/* -------------------------------------------------------------------------------------------------
|
|
2002
|
+
* CollapsibleContent
|
|
2003
|
+
* -----------------------------------------------------------------------------------------------*/ const $409067139f391064$var$CONTENT_NAME = 'CollapsibleContent';
|
|
2004
|
+
const $409067139f391064$export$aadde00976f34151 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
2005
|
+
const { forceMount: forceMount , ...contentProps } = props;
|
|
2006
|
+
const context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$CONTENT_NAME, props.__scopeCollapsible);
|
|
2007
|
+
return /*#__PURE__*/ createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b$1, {
|
|
2008
|
+
present: forceMount || context.open
|
|
2009
|
+
}, ({ present: present })=>/*#__PURE__*/ createElement($409067139f391064$var$CollapsibleContentImpl, _extends({}, contentProps, {
|
|
2010
|
+
ref: forwardedRef,
|
|
2011
|
+
present: present
|
|
2012
|
+
}))
|
|
2013
|
+
);
|
|
2014
|
+
});
|
|
2015
|
+
/* -----------------------------------------------------------------------------------------------*/ const $409067139f391064$var$CollapsibleContentImpl = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
2016
|
+
const { __scopeCollapsible: __scopeCollapsible , present: present , children: children , ...contentProps } = props;
|
|
2017
|
+
const context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$CONTENT_NAME, __scopeCollapsible);
|
|
2018
|
+
const [isPresent, setIsPresent] = useState(present);
|
|
2019
|
+
const ref = useRef(null);
|
|
2020
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, ref);
|
|
2021
|
+
const heightRef = useRef(0);
|
|
2022
|
+
const height = heightRef.current;
|
|
2023
|
+
const widthRef = useRef(0);
|
|
2024
|
+
const width = widthRef.current; // when opening we want it to immediately open to retrieve dimensions
|
|
2025
|
+
// when closing we delay `present` to retrieve dimensions before closing
|
|
2026
|
+
const isOpen = context.open || isPresent;
|
|
2027
|
+
const isMountAnimationPreventedRef = useRef(isOpen);
|
|
2028
|
+
const originalStylesRef = useRef();
|
|
2029
|
+
useEffect(()=>{
|
|
2030
|
+
const rAF = requestAnimationFrame(()=>isMountAnimationPreventedRef.current = false
|
|
2031
|
+
);
|
|
2032
|
+
return ()=>cancelAnimationFrame(rAF)
|
|
2033
|
+
;
|
|
2034
|
+
}, []);
|
|
2035
|
+
$9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
|
|
2036
|
+
const node = ref.current;
|
|
2037
|
+
if (node) {
|
|
2038
|
+
originalStylesRef.current = originalStylesRef.current || {
|
|
2039
|
+
transitionDuration: node.style.transitionDuration,
|
|
2040
|
+
animationName: node.style.animationName
|
|
2041
|
+
}; // block any animations/transitions so the element renders at its full dimensions
|
|
2042
|
+
node.style.transitionDuration = '0s';
|
|
2043
|
+
node.style.animationName = 'none'; // get width and height from full dimensions
|
|
2044
|
+
const rect = node.getBoundingClientRect();
|
|
2045
|
+
heightRef.current = rect.height;
|
|
2046
|
+
widthRef.current = rect.width; // kick off any animations/transitions that were originally set up if it isn't the initial mount
|
|
2047
|
+
if (!isMountAnimationPreventedRef.current) {
|
|
2048
|
+
node.style.transitionDuration = originalStylesRef.current.transitionDuration;
|
|
2049
|
+
node.style.animationName = originalStylesRef.current.animationName;
|
|
2050
|
+
}
|
|
2051
|
+
setIsPresent(present);
|
|
2052
|
+
}
|
|
2053
|
+
/**
|
|
2054
|
+
* depends on `context.open` because it will change to `false`
|
|
2055
|
+
* when a close is triggered but `present` will be `false` on
|
|
2056
|
+
* animation end (so when close finishes). This allows us to
|
|
2057
|
+
* retrieve the dimensions *before* closing.
|
|
2058
|
+
*/ }, [
|
|
2059
|
+
context.open,
|
|
2060
|
+
present
|
|
2061
|
+
]);
|
|
2062
|
+
return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({
|
|
2063
|
+
"data-state": $409067139f391064$var$getState(context.open),
|
|
2064
|
+
"data-disabled": context.disabled ? '' : undefined,
|
|
2065
|
+
id: context.contentId,
|
|
2066
|
+
hidden: !isOpen
|
|
2067
|
+
}, contentProps, {
|
|
2068
|
+
ref: composedRefs,
|
|
2069
|
+
style: {
|
|
2070
|
+
[`--radix-collapsible-content-height`]: height ? `${height}px` : undefined,
|
|
2071
|
+
[`--radix-collapsible-content-width`]: width ? `${width}px` : undefined,
|
|
2072
|
+
...props.style
|
|
2073
|
+
}
|
|
2074
|
+
}), isOpen && children);
|
|
2075
|
+
});
|
|
2076
|
+
/* -----------------------------------------------------------------------------------------------*/ function $409067139f391064$var$getState(open) {
|
|
2077
|
+
return open ? 'open' : 'closed';
|
|
2078
|
+
}
|
|
2079
|
+
const $409067139f391064$export$be92b6f5f03c0fe9 = $409067139f391064$export$6eb0f7ddcda6131f;
|
|
2080
|
+
const $409067139f391064$export$41fb9f06171c75f4 = $409067139f391064$export$c135dce7b15bbbdc;
|
|
2081
|
+
const $409067139f391064$export$7c6e2c02157bb7d2 = $409067139f391064$export$aadde00976f34151;
|
|
2082
|
+
|
|
2083
|
+
const $f631663db3294ace$var$DirectionContext = /*#__PURE__*/ createContext(undefined);
|
|
2084
|
+
/* -----------------------------------------------------------------------------------------------*/ function $f631663db3294ace$export$b39126d51d94e6f3(localDir) {
|
|
2085
|
+
const globalDir = useContext($f631663db3294ace$var$DirectionContext);
|
|
2086
|
+
return localDir || globalDir || 'ltr';
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2143
2089
|
/* -------------------------------------------------------------------------------------------------
|
|
2144
|
-
*
|
|
2145
|
-
* -----------------------------------------------------------------------------------------------*/ const $
|
|
2146
|
-
const
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2090
|
+
* Accordion
|
|
2091
|
+
* -----------------------------------------------------------------------------------------------*/ const $1bf158f521e1b1b4$var$ACCORDION_NAME = 'Accordion';
|
|
2092
|
+
const $1bf158f521e1b1b4$var$ACCORDION_KEYS = [
|
|
2093
|
+
'Home',
|
|
2094
|
+
'End',
|
|
2095
|
+
'ArrowDown',
|
|
2096
|
+
'ArrowUp',
|
|
2097
|
+
'ArrowLeft',
|
|
2098
|
+
'ArrowRight'
|
|
2099
|
+
];
|
|
2100
|
+
const [$1bf158f521e1b1b4$var$Collection, $1bf158f521e1b1b4$var$useCollection, $1bf158f521e1b1b4$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($1bf158f521e1b1b4$var$ACCORDION_NAME);
|
|
2101
|
+
const [$1bf158f521e1b1b4$var$createAccordionContext, $1bf158f521e1b1b4$export$9748edc328a73be1] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$1($1bf158f521e1b1b4$var$ACCORDION_NAME, [
|
|
2102
|
+
$1bf158f521e1b1b4$var$createCollectionScope,
|
|
2103
|
+
$409067139f391064$export$952b32dcbe73087a
|
|
2104
|
+
]);
|
|
2105
|
+
const $1bf158f521e1b1b4$var$useCollapsibleScope = $409067139f391064$export$952b32dcbe73087a();
|
|
2106
|
+
const $1bf158f521e1b1b4$export$a766cd26d0d69044 = /*#__PURE__*/ React__default.forwardRef((props, forwardedRef)=>{
|
|
2107
|
+
const { type: type , ...accordionProps } = props;
|
|
2108
|
+
const singleProps = accordionProps;
|
|
2109
|
+
const multipleProps = accordionProps;
|
|
2110
|
+
return /*#__PURE__*/ React__default.createElement($1bf158f521e1b1b4$var$Collection.Provider, {
|
|
2111
|
+
scope: props.__scopeAccordion
|
|
2112
|
+
}, type === 'multiple' ? /*#__PURE__*/ React__default.createElement($1bf158f521e1b1b4$var$AccordionImplMultiple, _extends({}, multipleProps, {
|
|
2113
|
+
ref: forwardedRef
|
|
2114
|
+
})) : /*#__PURE__*/ React__default.createElement($1bf158f521e1b1b4$var$AccordionImplSingle, _extends({}, singleProps, {
|
|
2115
|
+
ref: forwardedRef
|
|
2116
|
+
})));
|
|
2117
|
+
});
|
|
2118
|
+
$1bf158f521e1b1b4$export$a766cd26d0d69044.propTypes = {
|
|
2119
|
+
type (props) {
|
|
2120
|
+
const value = props.value || props.defaultValue;
|
|
2121
|
+
if (props.type && ![
|
|
2122
|
+
'single',
|
|
2123
|
+
'multiple'
|
|
2124
|
+
].includes(props.type)) return new Error('Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`.');
|
|
2125
|
+
if (props.type === 'multiple' && typeof value === 'string') return new Error('Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`.');
|
|
2126
|
+
if (props.type === 'single' && Array.isArray(value)) return new Error('Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`.');
|
|
2127
|
+
return null;
|
|
2128
|
+
}
|
|
2129
|
+
};
|
|
2130
|
+
/* -----------------------------------------------------------------------------------------------*/ const [$1bf158f521e1b1b4$var$AccordionValueProvider, $1bf158f521e1b1b4$var$useAccordionValueContext] = $1bf158f521e1b1b4$var$createAccordionContext($1bf158f521e1b1b4$var$ACCORDION_NAME);
|
|
2131
|
+
const [$1bf158f521e1b1b4$var$AccordionCollapsibleProvider, $1bf158f521e1b1b4$var$useAccordionCollapsibleContext] = $1bf158f521e1b1b4$var$createAccordionContext($1bf158f521e1b1b4$var$ACCORDION_NAME, {
|
|
2132
|
+
collapsible: false
|
|
2133
|
+
});
|
|
2134
|
+
const $1bf158f521e1b1b4$var$AccordionImplSingle = /*#__PURE__*/ React__default.forwardRef((props, forwardedRef)=>{
|
|
2135
|
+
const { value: valueProp , defaultValue: defaultValue , onValueChange: onValueChange = ()=>{} , collapsible: collapsible = false , ...accordionSingleProps } = props;
|
|
2136
|
+
const [value, setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3$1({
|
|
2137
|
+
prop: valueProp,
|
|
2138
|
+
defaultProp: defaultValue,
|
|
2139
|
+
onChange: onValueChange
|
|
2159
2140
|
});
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2141
|
+
return /*#__PURE__*/ React__default.createElement($1bf158f521e1b1b4$var$AccordionValueProvider, {
|
|
2142
|
+
scope: props.__scopeAccordion,
|
|
2143
|
+
value: value ? [
|
|
2144
|
+
value
|
|
2145
|
+
] : [],
|
|
2146
|
+
onItemOpen: setValue,
|
|
2147
|
+
onItemClose: React__default.useCallback(()=>collapsible && setValue('')
|
|
2148
|
+
, [
|
|
2149
|
+
collapsible,
|
|
2150
|
+
setValue
|
|
2151
|
+
])
|
|
2152
|
+
}, /*#__PURE__*/ React__default.createElement($1bf158f521e1b1b4$var$AccordionCollapsibleProvider, {
|
|
2153
|
+
scope: props.__scopeAccordion,
|
|
2154
|
+
collapsible: collapsible
|
|
2155
|
+
}, /*#__PURE__*/ React__default.createElement($1bf158f521e1b1b4$var$AccordionImpl, _extends({}, accordionSingleProps, {
|
|
2156
|
+
ref: forwardedRef
|
|
2157
|
+
}))));
|
|
2158
|
+
});
|
|
2159
|
+
/* -----------------------------------------------------------------------------------------------*/ const $1bf158f521e1b1b4$var$AccordionImplMultiple = /*#__PURE__*/ React__default.forwardRef((props, forwardedRef)=>{
|
|
2160
|
+
const { value: valueProp , defaultValue: defaultValue , onValueChange: onValueChange = ()=>{} , ...accordionMultipleProps } = props;
|
|
2161
|
+
const [value1 = [], setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3$1({
|
|
2162
|
+
prop: valueProp,
|
|
2163
|
+
defaultProp: defaultValue,
|
|
2164
|
+
onChange: onValueChange
|
|
2165
|
+
});
|
|
2166
|
+
const handleItemOpen = React__default.useCallback((itemValue)=>setValue((prevValue = [])=>[
|
|
2167
|
+
...prevValue,
|
|
2168
|
+
itemValue
|
|
2169
|
+
]
|
|
2170
|
+
)
|
|
2171
|
+
, [
|
|
2172
|
+
setValue
|
|
2173
2173
|
]);
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2174
|
+
const handleItemClose = React__default.useCallback((itemValue)=>setValue((prevValue = [])=>prevValue.filter((value)=>value !== itemValue
|
|
2175
|
+
)
|
|
2176
|
+
)
|
|
2177
|
+
, [
|
|
2178
|
+
setValue
|
|
2179
|
+
]);
|
|
2180
|
+
return /*#__PURE__*/ React__default.createElement($1bf158f521e1b1b4$var$AccordionValueProvider, {
|
|
2181
|
+
scope: props.__scopeAccordion,
|
|
2182
|
+
value: value1,
|
|
2183
|
+
onItemOpen: handleItemOpen,
|
|
2184
|
+
onItemClose: handleItemClose
|
|
2185
|
+
}, /*#__PURE__*/ React__default.createElement($1bf158f521e1b1b4$var$AccordionCollapsibleProvider, {
|
|
2186
|
+
scope: props.__scopeAccordion,
|
|
2187
|
+
collapsible: true
|
|
2188
|
+
}, /*#__PURE__*/ React__default.createElement($1bf158f521e1b1b4$var$AccordionImpl, _extends({}, accordionMultipleProps, {
|
|
2189
|
+
ref: forwardedRef
|
|
2190
|
+
}))));
|
|
2191
|
+
});
|
|
2192
|
+
/* -----------------------------------------------------------------------------------------------*/ const [$1bf158f521e1b1b4$var$AccordionImplProvider, $1bf158f521e1b1b4$var$useAccordionContext] = $1bf158f521e1b1b4$var$createAccordionContext($1bf158f521e1b1b4$var$ACCORDION_NAME);
|
|
2193
|
+
const $1bf158f521e1b1b4$var$AccordionImpl = /*#__PURE__*/ React__default.forwardRef((props, forwardedRef)=>{
|
|
2194
|
+
const { __scopeAccordion: __scopeAccordion , disabled: disabled , dir: dir , orientation: orientation = 'vertical' , ...accordionProps } = props;
|
|
2195
|
+
const accordionRef = React__default.useRef(null);
|
|
2196
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(accordionRef, forwardedRef);
|
|
2197
|
+
const getItems = $1bf158f521e1b1b4$var$useCollection(__scopeAccordion);
|
|
2198
|
+
const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
|
|
2199
|
+
const isDirectionLTR = direction === 'ltr';
|
|
2200
|
+
const handleKeyDown = $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onKeyDown, (event)=>{
|
|
2201
|
+
var _triggerCollection$cl;
|
|
2202
|
+
if (!$1bf158f521e1b1b4$var$ACCORDION_KEYS.includes(event.key)) return;
|
|
2203
|
+
const target = event.target;
|
|
2204
|
+
const triggerCollection = getItems().filter((item)=>{
|
|
2205
|
+
var _item$ref$current;
|
|
2206
|
+
return !((_item$ref$current = item.ref.current) !== null && _item$ref$current !== void 0 && _item$ref$current.disabled);
|
|
2207
|
+
});
|
|
2208
|
+
const triggerIndex = triggerCollection.findIndex((item)=>item.ref.current === target
|
|
2209
|
+
);
|
|
2210
|
+
const triggerCount = triggerCollection.length;
|
|
2211
|
+
if (triggerIndex === -1) return; // Prevents page scroll while user is navigating
|
|
2212
|
+
event.preventDefault();
|
|
2213
|
+
let nextIndex = triggerIndex;
|
|
2214
|
+
const homeIndex = 0;
|
|
2215
|
+
const endIndex = triggerCount - 1;
|
|
2216
|
+
const moveNext = ()=>{
|
|
2217
|
+
nextIndex = triggerIndex + 1;
|
|
2218
|
+
if (nextIndex > endIndex) nextIndex = homeIndex;
|
|
2219
|
+
};
|
|
2220
|
+
const movePrev = ()=>{
|
|
2221
|
+
nextIndex = triggerIndex - 1;
|
|
2222
|
+
if (nextIndex < homeIndex) nextIndex = endIndex;
|
|
2223
|
+
};
|
|
2224
|
+
switch(event.key){
|
|
2225
|
+
case 'Home':
|
|
2226
|
+
nextIndex = homeIndex;
|
|
2227
|
+
break;
|
|
2228
|
+
case 'End':
|
|
2229
|
+
nextIndex = endIndex;
|
|
2230
|
+
break;
|
|
2231
|
+
case 'ArrowRight':
|
|
2232
|
+
if (orientation === 'horizontal') {
|
|
2233
|
+
if (isDirectionLTR) moveNext();
|
|
2234
|
+
else movePrev();
|
|
2235
|
+
}
|
|
2236
|
+
break;
|
|
2237
|
+
case 'ArrowDown':
|
|
2238
|
+
if (orientation === 'vertical') moveNext();
|
|
2239
|
+
break;
|
|
2240
|
+
case 'ArrowLeft':
|
|
2241
|
+
if (orientation === 'horizontal') {
|
|
2242
|
+
if (isDirectionLTR) movePrev();
|
|
2243
|
+
else moveNext();
|
|
2244
|
+
}
|
|
2245
|
+
break;
|
|
2246
|
+
case 'ArrowUp':
|
|
2247
|
+
if (orientation === 'vertical') movePrev();
|
|
2248
|
+
break;
|
|
2249
|
+
}
|
|
2250
|
+
const clampedIndex = nextIndex % triggerCount;
|
|
2251
|
+
(_triggerCollection$cl = triggerCollection[clampedIndex].ref.current) === null || _triggerCollection$cl === void 0 || _triggerCollection$cl.focus();
|
|
2252
|
+
});
|
|
2253
|
+
return /*#__PURE__*/ React__default.createElement($1bf158f521e1b1b4$var$AccordionImplProvider, {
|
|
2254
|
+
scope: __scopeAccordion,
|
|
2185
2255
|
disabled: disabled,
|
|
2186
|
-
|
|
2187
|
-
|
|
2256
|
+
direction: dir,
|
|
2257
|
+
orientation: orientation
|
|
2258
|
+
}, /*#__PURE__*/ React__default.createElement($1bf158f521e1b1b4$var$Collection.Slot, {
|
|
2259
|
+
scope: __scopeAccordion
|
|
2260
|
+
}, /*#__PURE__*/ React__default.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({}, accordionProps, {
|
|
2261
|
+
"data-orientation": orientation,
|
|
2188
2262
|
ref: composedRefs,
|
|
2189
|
-
onKeyDown:
|
|
2190
|
-
|
|
2191
|
-
if (event.key === 'Enter') event.preventDefault();
|
|
2192
|
-
}),
|
|
2193
|
-
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onClick, (event)=>{
|
|
2194
|
-
setChecked((prevChecked)=>$e698a72e93240346$var$isIndeterminate(prevChecked) ? true : !prevChecked
|
|
2195
|
-
);
|
|
2196
|
-
if (isFormControl) {
|
|
2197
|
-
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(); // if checkbox is in a form, stop propagation from the button so that we only propagate
|
|
2198
|
-
// one click event (from the input). We propagate changes from an input so that native
|
|
2199
|
-
// form validation works and form events reflect checkbox updates.
|
|
2200
|
-
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
|
|
2201
|
-
}
|
|
2202
|
-
})
|
|
2203
|
-
})), isFormControl && /*#__PURE__*/ createElement($e698a72e93240346$var$BubbleInput, {
|
|
2204
|
-
control: button,
|
|
2205
|
-
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
2206
|
-
name: name,
|
|
2207
|
-
value: value,
|
|
2208
|
-
checked: checked,
|
|
2209
|
-
required: required,
|
|
2210
|
-
disabled: disabled // We transform because the input is absolutely positioned but we have
|
|
2211
|
-
,
|
|
2212
|
-
style: {
|
|
2213
|
-
transform: 'translateX(-100%)'
|
|
2214
|
-
}
|
|
2215
|
-
}));
|
|
2263
|
+
onKeyDown: disabled ? undefined : handleKeyDown
|
|
2264
|
+
}))));
|
|
2216
2265
|
});
|
|
2217
2266
|
/* -------------------------------------------------------------------------------------------------
|
|
2218
|
-
*
|
|
2219
|
-
* -----------------------------------------------------------------------------------------------*/ const $
|
|
2220
|
-
const $
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2267
|
+
* AccordionItem
|
|
2268
|
+
* -----------------------------------------------------------------------------------------------*/ const $1bf158f521e1b1b4$var$ITEM_NAME = 'AccordionItem';
|
|
2269
|
+
const [$1bf158f521e1b1b4$var$AccordionItemProvider, $1bf158f521e1b1b4$var$useAccordionItemContext] = $1bf158f521e1b1b4$var$createAccordionContext($1bf158f521e1b1b4$var$ITEM_NAME);
|
|
2270
|
+
/**
|
|
2271
|
+
* `AccordionItem` contains all of the parts of a collapsible section inside of an `Accordion`.
|
|
2272
|
+
*/ const $1bf158f521e1b1b4$export$d99097c13d4dac9f = /*#__PURE__*/ React__default.forwardRef((props, forwardedRef)=>{
|
|
2273
|
+
const { __scopeAccordion: __scopeAccordion , value: value , ...accordionItemProps } = props;
|
|
2274
|
+
const accordionContext = $1bf158f521e1b1b4$var$useAccordionContext($1bf158f521e1b1b4$var$ITEM_NAME, __scopeAccordion);
|
|
2275
|
+
const valueContext = $1bf158f521e1b1b4$var$useAccordionValueContext($1bf158f521e1b1b4$var$ITEM_NAME, __scopeAccordion);
|
|
2276
|
+
const collapsibleScope = $1bf158f521e1b1b4$var$useCollapsibleScope(__scopeAccordion);
|
|
2277
|
+
const triggerId = $1746a345f3d73bb7$export$f680877a34711e37$1();
|
|
2278
|
+
const open1 = value && valueContext.value.includes(value) || false;
|
|
2279
|
+
const disabled = accordionContext.disabled || props.disabled;
|
|
2280
|
+
return /*#__PURE__*/ React__default.createElement($1bf158f521e1b1b4$var$AccordionItemProvider, {
|
|
2281
|
+
scope: __scopeAccordion,
|
|
2282
|
+
open: open1,
|
|
2283
|
+
disabled: disabled,
|
|
2284
|
+
triggerId: triggerId
|
|
2285
|
+
}, /*#__PURE__*/ React__default.createElement($409067139f391064$export$be92b6f5f03c0fe9, _extends({
|
|
2286
|
+
"data-orientation": accordionContext.orientation,
|
|
2287
|
+
"data-state": $1bf158f521e1b1b4$var$getState(open1)
|
|
2288
|
+
}, collapsibleScope, accordionItemProps, {
|
|
2229
2289
|
ref: forwardedRef,
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2290
|
+
disabled: disabled,
|
|
2291
|
+
open: open1,
|
|
2292
|
+
onOpenChange: (open)=>{
|
|
2293
|
+
if (open) valueContext.onItemOpen(value);
|
|
2294
|
+
else valueContext.onItemClose(value);
|
|
2233
2295
|
}
|
|
2234
2296
|
})));
|
|
2235
2297
|
});
|
|
2236
|
-
/*
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2298
|
+
/* -------------------------------------------------------------------------------------------------
|
|
2299
|
+
* AccordionHeader
|
|
2300
|
+
* -----------------------------------------------------------------------------------------------*/ const $1bf158f521e1b1b4$var$HEADER_NAME = 'AccordionHeader';
|
|
2301
|
+
/**
|
|
2302
|
+
* `AccordionHeader` contains the content for the parts of an `AccordionItem` that will be visible
|
|
2303
|
+
* whether or not its content is collapsed.
|
|
2304
|
+
*/ const $1bf158f521e1b1b4$export$5e3e5deaaf81ee41 = /*#__PURE__*/ React__default.forwardRef((props, forwardedRef)=>{
|
|
2305
|
+
const { __scopeAccordion: __scopeAccordion , ...headerProps } = props;
|
|
2306
|
+
const accordionContext = $1bf158f521e1b1b4$var$useAccordionContext($1bf158f521e1b1b4$var$ACCORDION_NAME, __scopeAccordion);
|
|
2307
|
+
const itemContext = $1bf158f521e1b1b4$var$useAccordionItemContext($1bf158f521e1b1b4$var$HEADER_NAME, __scopeAccordion);
|
|
2308
|
+
return /*#__PURE__*/ React__default.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.h3, _extends({
|
|
2309
|
+
"data-orientation": accordionContext.orientation,
|
|
2310
|
+
"data-state": $1bf158f521e1b1b4$var$getState(itemContext.open),
|
|
2311
|
+
"data-disabled": itemContext.disabled ? '' : undefined
|
|
2312
|
+
}, headerProps, {
|
|
2313
|
+
ref: forwardedRef
|
|
2314
|
+
}));
|
|
2315
|
+
});
|
|
2316
|
+
/* -------------------------------------------------------------------------------------------------
|
|
2317
|
+
* AccordionTrigger
|
|
2318
|
+
* -----------------------------------------------------------------------------------------------*/ const $1bf158f521e1b1b4$var$TRIGGER_NAME = 'AccordionTrigger';
|
|
2319
|
+
/**
|
|
2320
|
+
* `AccordionTrigger` is the trigger that toggles the collapsed state of an `AccordionItem`. It
|
|
2321
|
+
* should always be nested inside of an `AccordionHeader`.
|
|
2322
|
+
*/ const $1bf158f521e1b1b4$export$94e939b1f85bdd73 = /*#__PURE__*/ React__default.forwardRef((props, forwardedRef)=>{
|
|
2323
|
+
const { __scopeAccordion: __scopeAccordion , ...triggerProps } = props;
|
|
2324
|
+
const accordionContext = $1bf158f521e1b1b4$var$useAccordionContext($1bf158f521e1b1b4$var$ACCORDION_NAME, __scopeAccordion);
|
|
2325
|
+
const itemContext = $1bf158f521e1b1b4$var$useAccordionItemContext($1bf158f521e1b1b4$var$TRIGGER_NAME, __scopeAccordion);
|
|
2326
|
+
const collapsibleContext = $1bf158f521e1b1b4$var$useAccordionCollapsibleContext($1bf158f521e1b1b4$var$TRIGGER_NAME, __scopeAccordion);
|
|
2327
|
+
const collapsibleScope = $1bf158f521e1b1b4$var$useCollapsibleScope(__scopeAccordion);
|
|
2328
|
+
return /*#__PURE__*/ React__default.createElement($1bf158f521e1b1b4$var$Collection.ItemSlot, {
|
|
2329
|
+
scope: __scopeAccordion
|
|
2330
|
+
}, /*#__PURE__*/ React__default.createElement($409067139f391064$export$41fb9f06171c75f4, _extends({
|
|
2331
|
+
"aria-disabled": itemContext.open && !collapsibleContext.collapsible || undefined,
|
|
2332
|
+
"data-orientation": accordionContext.orientation,
|
|
2333
|
+
id: itemContext.triggerId
|
|
2334
|
+
}, collapsibleScope, triggerProps, {
|
|
2335
|
+
ref: forwardedRef
|
|
2336
|
+
})));
|
|
2337
|
+
});
|
|
2338
|
+
/* -------------------------------------------------------------------------------------------------
|
|
2339
|
+
* AccordionContent
|
|
2340
|
+
* -----------------------------------------------------------------------------------------------*/ const $1bf158f521e1b1b4$var$CONTENT_NAME = 'AccordionContent';
|
|
2341
|
+
/**
|
|
2342
|
+
* `AccordionContent` contains the collapsible content for an `AccordionItem`.
|
|
2343
|
+
*/ const $1bf158f521e1b1b4$export$985b9a77379b54a0 = /*#__PURE__*/ React__default.forwardRef((props, forwardedRef)=>{
|
|
2344
|
+
const { __scopeAccordion: __scopeAccordion , ...contentProps } = props;
|
|
2345
|
+
const accordionContext = $1bf158f521e1b1b4$var$useAccordionContext($1bf158f521e1b1b4$var$ACCORDION_NAME, __scopeAccordion);
|
|
2346
|
+
const itemContext = $1bf158f521e1b1b4$var$useAccordionItemContext($1bf158f521e1b1b4$var$CONTENT_NAME, __scopeAccordion);
|
|
2347
|
+
const collapsibleScope = $1bf158f521e1b1b4$var$useCollapsibleScope(__scopeAccordion);
|
|
2348
|
+
return /*#__PURE__*/ React__default.createElement($409067139f391064$export$7c6e2c02157bb7d2, _extends({
|
|
2349
|
+
role: "region",
|
|
2350
|
+
"aria-labelledby": itemContext.triggerId,
|
|
2351
|
+
"data-orientation": accordionContext.orientation
|
|
2352
|
+
}, collapsibleScope, contentProps, {
|
|
2353
|
+
ref: forwardedRef,
|
|
2266
2354
|
style: {
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
pointerEvents: 'none',
|
|
2271
|
-
opacity: 0,
|
|
2272
|
-
margin: 0
|
|
2355
|
+
['--radix-accordion-content-height']: 'var(--radix-collapsible-content-height)',
|
|
2356
|
+
['--radix-accordion-content-width']: 'var(--radix-collapsible-content-width)',
|
|
2357
|
+
...props.style
|
|
2273
2358
|
}
|
|
2274
2359
|
}));
|
|
2275
|
-
};
|
|
2276
|
-
function $
|
|
2277
|
-
return
|
|
2278
|
-
}
|
|
2279
|
-
function $e698a72e93240346$var$getState(checked) {
|
|
2280
|
-
return $e698a72e93240346$var$isIndeterminate(checked) ? 'indeterminate' : checked ? 'checked' : 'unchecked';
|
|
2360
|
+
});
|
|
2361
|
+
/* -----------------------------------------------------------------------------------------------*/ function $1bf158f521e1b1b4$var$getState(open) {
|
|
2362
|
+
return open ? 'open' : 'closed';
|
|
2281
2363
|
}
|
|
2282
|
-
const $
|
|
2283
|
-
const $
|
|
2364
|
+
const $1bf158f521e1b1b4$export$be92b6f5f03c0fe9 = $1bf158f521e1b1b4$export$a766cd26d0d69044;
|
|
2365
|
+
const $1bf158f521e1b1b4$export$6d08773d2e66f8f2 = $1bf158f521e1b1b4$export$d99097c13d4dac9f;
|
|
2366
|
+
const $1bf158f521e1b1b4$export$8b251419efc915eb = $1bf158f521e1b1b4$export$5e3e5deaaf81ee41;
|
|
2367
|
+
const $1bf158f521e1b1b4$export$41fb9f06171c75f4 = $1bf158f521e1b1b4$export$94e939b1f85bdd73;
|
|
2368
|
+
const $1bf158f521e1b1b4$export$7c6e2c02157bb7d2 = $1bf158f521e1b1b4$export$985b9a77379b54a0;
|
|
2284
2369
|
|
|
2285
2370
|
function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
2286
2371
|
if (source == null) return {};
|
|
@@ -2451,6 +2536,28 @@ var Cross2Icon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
2451
2536
|
}));
|
|
2452
2537
|
});
|
|
2453
2538
|
|
|
2539
|
+
var _excluded$1D = ["color"];
|
|
2540
|
+
var DiscIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
2541
|
+
var _ref$color = _ref.color,
|
|
2542
|
+
color = _ref$color === void 0 ? 'currentColor' : _ref$color,
|
|
2543
|
+
props = _objectWithoutPropertiesLoose$1(_ref, _excluded$1D);
|
|
2544
|
+
|
|
2545
|
+
return createElement("svg", Object.assign({
|
|
2546
|
+
width: "15",
|
|
2547
|
+
height: "15",
|
|
2548
|
+
viewBox: "0 0 15 15",
|
|
2549
|
+
fill: "none",
|
|
2550
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2551
|
+
}, props, {
|
|
2552
|
+
ref: forwardedRef
|
|
2553
|
+
}), createElement("path", {
|
|
2554
|
+
d: "M7.49991 0.877075C3.84222 0.877075 0.877075 3.84222 0.877075 7.49991C0.877075 11.1576 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1576 14.1227 7.49991C14.1227 3.84222 11.1576 0.877075 7.49991 0.877075ZM1.82708 7.49991C1.82708 4.36689 4.36689 1.82707 7.49991 1.82707C10.6329 1.82707 13.1727 4.36689 13.1727 7.49991C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49991ZM8.37287 7.50006C8.37287 7.98196 7.98221 8.37263 7.5003 8.37263C7.01839 8.37263 6.62773 7.98196 6.62773 7.50006C6.62773 7.01815 7.01839 6.62748 7.5003 6.62748C7.98221 6.62748 8.37287 7.01815 8.37287 7.50006ZM9.32287 7.50006C9.32287 8.50664 8.50688 9.32263 7.5003 9.32263C6.49372 9.32263 5.67773 8.50664 5.67773 7.50006C5.67773 6.49348 6.49372 5.67748 7.5003 5.67748C8.50688 5.67748 9.32287 6.49348 9.32287 7.50006Z",
|
|
2555
|
+
fill: color,
|
|
2556
|
+
fillRule: "evenodd",
|
|
2557
|
+
clipRule: "evenodd"
|
|
2558
|
+
}));
|
|
2559
|
+
});
|
|
2560
|
+
|
|
2454
2561
|
var _excluded$20 = ["color"];
|
|
2455
2562
|
var ExclamationTriangleIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
2456
2563
|
var _ref$color = _ref.color,
|
|
@@ -2605,40 +2712,85 @@ var SunIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
2605
2712
|
}));
|
|
2606
2713
|
});
|
|
2607
2714
|
|
|
2608
|
-
var
|
|
2715
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
2716
|
+
|
|
2717
|
+
const falsyToString = (value)=>typeof value === "boolean" ? "".concat(value) : value === 0 ? "0" : value;
|
|
2718
|
+
const cx = clsx;
|
|
2719
|
+
const cva = (base, config)=>{
|
|
2720
|
+
return (props)=>{
|
|
2721
|
+
var ref;
|
|
2722
|
+
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
2723
|
+
const { variants , defaultVariants } = config;
|
|
2724
|
+
const getVariantClassNames = Object.keys(variants).map((variant)=>{
|
|
2725
|
+
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
2726
|
+
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
2727
|
+
if (variantProp === null) return null;
|
|
2728
|
+
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
2729
|
+
return variants[variant][variantKey];
|
|
2730
|
+
});
|
|
2731
|
+
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
|
|
2732
|
+
let [key, value] = param;
|
|
2733
|
+
if (value === undefined) {
|
|
2734
|
+
return acc;
|
|
2735
|
+
}
|
|
2736
|
+
acc[key] = value;
|
|
2737
|
+
return acc;
|
|
2738
|
+
}, {});
|
|
2739
|
+
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (ref = config.compoundVariants) === null || ref === void 0 ? void 0 : ref.reduce((acc, param1)=>{
|
|
2740
|
+
let { class: cvClass , className: cvClassName , ...compoundVariantOptions } = param1;
|
|
2741
|
+
return Object.entries(compoundVariantOptions).every((param)=>{
|
|
2742
|
+
let [key, value] = param;
|
|
2743
|
+
return Array.isArray(value) ? value.includes({
|
|
2744
|
+
...defaultVariants,
|
|
2745
|
+
...propsWithoutUndefined
|
|
2746
|
+
}[key]) : ({
|
|
2747
|
+
...defaultVariants,
|
|
2748
|
+
...propsWithoutUndefined
|
|
2749
|
+
})[key] === value;
|
|
2750
|
+
}) ? [
|
|
2751
|
+
...acc,
|
|
2752
|
+
cvClass,
|
|
2753
|
+
cvClassName
|
|
2754
|
+
] : acc;
|
|
2755
|
+
}, []);
|
|
2756
|
+
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
2757
|
+
};
|
|
2758
|
+
};
|
|
2759
|
+
|
|
2760
|
+
var styles$B = {"flex":"flex-module_flex__tfvHj","direction-row":"flex-module_direction-row__ZZCCO","direction-column":"flex-module_direction-column__MZhja","direction-rowReverse":"flex-module_direction-rowReverse__cODeQ","direction-columnReverse":"flex-module_direction-columnReverse__uxwTT","align-start":"flex-module_align-start__d1cB2","align-center":"flex-module_align-center__zZ1E6","align-end":"flex-module_align-end__z2g3F","align-stretch":"flex-module_align-stretch__X-Zb0","align-baseline":"flex-module_align-baseline__UImQH","justify-start":"flex-module_justify-start__4eduw","justify-center":"flex-module_justify-center__BMDDv","justify-end":"flex-module_justify-end__pWfzn","justify-between":"flex-module_justify-between__9NSwF","wrap-noWrap":"flex-module_wrap-noWrap__Ly8Pu","wrap-wrap":"flex-module_wrap-wrap__5WZOm","wrap-wrapReverse":"flex-module_wrap-wrapReverse__6u3Es","gap-xs":"flex-module_gap-xs__3h3LG","gap-sm":"flex-module_gap-sm__UMdVH","gap-md":"flex-module_gap-md__sfd7f","gap-lg":"flex-module_gap-lg__LAcQC","gap-xl":"flex-module_gap-xl__3-8uA"};
|
|
2609
2761
|
|
|
2610
|
-
const flex = cva(styles$
|
|
2762
|
+
const flex = cva(styles$B.flex, {
|
|
2611
2763
|
variants: {
|
|
2612
2764
|
direction: {
|
|
2613
|
-
row: styles$
|
|
2614
|
-
column: styles$
|
|
2615
|
-
rowReverse: styles$
|
|
2616
|
-
columnReverse: styles$
|
|
2765
|
+
row: styles$B["direction-row"],
|
|
2766
|
+
column: styles$B["direction-column"],
|
|
2767
|
+
rowReverse: styles$B["direction-rowReverse"],
|
|
2768
|
+
columnReverse: styles$B["direction-columnReverse"],
|
|
2617
2769
|
},
|
|
2618
2770
|
align: {
|
|
2619
|
-
start: styles$
|
|
2620
|
-
center: styles$
|
|
2621
|
-
end: styles$
|
|
2622
|
-
stretch: styles$
|
|
2623
|
-
baseline: styles$
|
|
2771
|
+
start: styles$B["align-start"],
|
|
2772
|
+
center: styles$B["align-center"],
|
|
2773
|
+
end: styles$B["align-end"],
|
|
2774
|
+
stretch: styles$B["align-stretch"],
|
|
2775
|
+
baseline: styles$B["align-baseline"],
|
|
2624
2776
|
},
|
|
2625
2777
|
justify: {
|
|
2626
|
-
start: styles$
|
|
2627
|
-
center: styles$
|
|
2628
|
-
end: styles$
|
|
2629
|
-
between: styles$
|
|
2778
|
+
start: styles$B["justify-start"],
|
|
2779
|
+
center: styles$B["justify-center"],
|
|
2780
|
+
end: styles$B["justify-end"],
|
|
2781
|
+
between: styles$B["justify-between"],
|
|
2630
2782
|
},
|
|
2631
2783
|
wrap: {
|
|
2632
|
-
noWrap: styles$
|
|
2633
|
-
wrap: styles$
|
|
2634
|
-
wrapReverse: styles$
|
|
2784
|
+
noWrap: styles$B["wrap-noWrap"],
|
|
2785
|
+
wrap: styles$B["wrap-wrap"],
|
|
2786
|
+
wrapReverse: styles$B["wrap-wrapReverse"],
|
|
2635
2787
|
},
|
|
2636
2788
|
gap: {
|
|
2637
|
-
"extra-small": styles$
|
|
2638
|
-
small: styles$
|
|
2639
|
-
medium: styles$
|
|
2640
|
-
large: styles$
|
|
2641
|
-
"extra-large": styles$
|
|
2789
|
+
"extra-small": styles$B["gap-xs"],
|
|
2790
|
+
small: styles$B["gap-sm"],
|
|
2791
|
+
medium: styles$B["gap-md"],
|
|
2792
|
+
large: styles$B["gap-lg"],
|
|
2793
|
+
"extra-large": styles$B["gap-xl"],
|
|
2642
2794
|
},
|
|
2643
2795
|
},
|
|
2644
2796
|
defaultVariants: {
|
|
@@ -2648,9 +2800,411 @@ const flex = cva(styles$v.flex, {
|
|
|
2648
2800
|
wrap: "noWrap",
|
|
2649
2801
|
},
|
|
2650
2802
|
});
|
|
2651
|
-
const Flex = forwardRef(({ children, direction, align, justify, wrap, gap, className, ...props }, ref) => {
|
|
2652
|
-
return (jsxRuntimeExports.jsx("div", { className: flex({ direction, align, justify, wrap, gap, className }), ...props, ref: ref, children: children }));
|
|
2803
|
+
const Flex = forwardRef(({ children, direction, align, justify, wrap, gap, className, ...props }, ref) => {
|
|
2804
|
+
return (jsxRuntimeExports.jsx("div", { className: flex({ direction, align, justify, wrap, gap, className }), ...props, ref: ref, children: children }));
|
|
2805
|
+
});
|
|
2806
|
+
|
|
2807
|
+
var styles$A = {"item":"accordion-module_item__tXeD0","header":"accordion-module_header__3y6p-","trigger":"accordion-module_trigger__ROQgB","svg":"accordion-module_svg__xvNct","content":"accordion-module_content__fUryt","slideDown":"accordion-module_slideDown__pwlAE","slideUp":"accordion-module_slideUp__ucWNi"};
|
|
2808
|
+
|
|
2809
|
+
const AccordionRoot = React.forwardRef(({ className, ...props }, ref) => (jsxRuntimeExports.jsx($1bf158f521e1b1b4$export$be92b6f5f03c0fe9, { ref: ref, className: styles$A.accordion, ...props })));
|
|
2810
|
+
const AccordionItem = React.forwardRef(({ className, ...props }, ref) => (jsxRuntimeExports.jsxs(Flex, { gap: "medium", style: { width: "100%" }, children: [jsxRuntimeExports.jsx(DiscIcon, { width: 16, height: 16, style: { margin: "14px 0" } }), jsxRuntimeExports.jsx($1bf158f521e1b1b4$export$6d08773d2e66f8f2, { ref: ref, className: `${styles$A.item} ${className}`, ...props })] })));
|
|
2811
|
+
AccordionItem.displayName = "AccordionItem";
|
|
2812
|
+
const AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => (jsxRuntimeExports.jsx($1bf158f521e1b1b4$export$8b251419efc915eb, { className: styles$A.header, children: jsxRuntimeExports.jsxs($1bf158f521e1b1b4$export$41fb9f06171c75f4, { ref: ref, className: styles$A.trigger, ...props, children: [children, jsxRuntimeExports.jsx(ChevronDownIcon, { className: styles$A.svg })] }) })));
|
|
2813
|
+
AccordionTrigger.displayName = $1bf158f521e1b1b4$export$41fb9f06171c75f4.displayName;
|
|
2814
|
+
const AccordionContent = React.forwardRef(({ className = "", children, ...props }, ref) => (jsxRuntimeExports.jsx($1bf158f521e1b1b4$export$7c6e2c02157bb7d2, { ref: ref, className: styles$A.content, ...props, children: jsxRuntimeExports.jsx("div", { className: `${styles$A.className}`, children: children }) })));
|
|
2815
|
+
AccordionContent.displayName = $1bf158f521e1b1b4$export$7c6e2c02157bb7d2.displayName;
|
|
2816
|
+
const Accordion = Object.assign(AccordionRoot, {
|
|
2817
|
+
Content: AccordionContent,
|
|
2818
|
+
Item: AccordionItem,
|
|
2819
|
+
Trigger: AccordionTrigger,
|
|
2820
|
+
});
|
|
2821
|
+
|
|
2822
|
+
/* -------------------------------------------------------------------------------------------------
|
|
2823
|
+
* Avatar
|
|
2824
|
+
* -----------------------------------------------------------------------------------------------*/ const $cddcb0b647441e34$var$AVATAR_NAME = 'Avatar';
|
|
2825
|
+
const [$cddcb0b647441e34$var$createAvatarContext, $cddcb0b647441e34$export$90370d16b488820f] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$1($cddcb0b647441e34$var$AVATAR_NAME);
|
|
2826
|
+
const [$cddcb0b647441e34$var$AvatarProvider, $cddcb0b647441e34$var$useAvatarContext] = $cddcb0b647441e34$var$createAvatarContext($cddcb0b647441e34$var$AVATAR_NAME);
|
|
2827
|
+
const $cddcb0b647441e34$export$e2255cf6045e8d47 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
2828
|
+
const { __scopeAvatar: __scopeAvatar , ...avatarProps } = props;
|
|
2829
|
+
const [imageLoadingStatus, setImageLoadingStatus] = useState('idle');
|
|
2830
|
+
return /*#__PURE__*/ createElement($cddcb0b647441e34$var$AvatarProvider, {
|
|
2831
|
+
scope: __scopeAvatar,
|
|
2832
|
+
imageLoadingStatus: imageLoadingStatus,
|
|
2833
|
+
onImageLoadingStatusChange: setImageLoadingStatus
|
|
2834
|
+
}, /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.span, _extends({}, avatarProps, {
|
|
2835
|
+
ref: forwardedRef
|
|
2836
|
+
})));
|
|
2837
|
+
});
|
|
2838
|
+
/* -------------------------------------------------------------------------------------------------
|
|
2839
|
+
* AvatarImage
|
|
2840
|
+
* -----------------------------------------------------------------------------------------------*/ const $cddcb0b647441e34$var$IMAGE_NAME = 'AvatarImage';
|
|
2841
|
+
const $cddcb0b647441e34$export$2cd8ae1985206fe8 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
2842
|
+
const { __scopeAvatar: __scopeAvatar , src: src , onLoadingStatusChange: onLoadingStatusChange = ()=>{} , ...imageProps } = props;
|
|
2843
|
+
const context = $cddcb0b647441e34$var$useAvatarContext($cddcb0b647441e34$var$IMAGE_NAME, __scopeAvatar);
|
|
2844
|
+
const imageLoadingStatus = $cddcb0b647441e34$var$useImageLoadingStatus(src);
|
|
2845
|
+
const handleLoadingStatusChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1((status)=>{
|
|
2846
|
+
onLoadingStatusChange(status);
|
|
2847
|
+
context.onImageLoadingStatusChange(status);
|
|
2848
|
+
});
|
|
2849
|
+
$9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
|
|
2850
|
+
if (imageLoadingStatus !== 'idle') handleLoadingStatusChange(imageLoadingStatus);
|
|
2851
|
+
}, [
|
|
2852
|
+
imageLoadingStatus,
|
|
2853
|
+
handleLoadingStatusChange
|
|
2854
|
+
]);
|
|
2855
|
+
return imageLoadingStatus === 'loaded' ? /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.img, _extends({}, imageProps, {
|
|
2856
|
+
ref: forwardedRef,
|
|
2857
|
+
src: src
|
|
2858
|
+
})) : null;
|
|
2859
|
+
});
|
|
2860
|
+
/* -------------------------------------------------------------------------------------------------
|
|
2861
|
+
* AvatarFallback
|
|
2862
|
+
* -----------------------------------------------------------------------------------------------*/ const $cddcb0b647441e34$var$FALLBACK_NAME = 'AvatarFallback';
|
|
2863
|
+
const $cddcb0b647441e34$export$69fffb6a9571fbfe = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
2864
|
+
const { __scopeAvatar: __scopeAvatar , delayMs: delayMs , ...fallbackProps } = props;
|
|
2865
|
+
const context = $cddcb0b647441e34$var$useAvatarContext($cddcb0b647441e34$var$FALLBACK_NAME, __scopeAvatar);
|
|
2866
|
+
const [canRender, setCanRender] = useState(delayMs === undefined);
|
|
2867
|
+
useEffect(()=>{
|
|
2868
|
+
if (delayMs !== undefined) {
|
|
2869
|
+
const timerId = window.setTimeout(()=>setCanRender(true)
|
|
2870
|
+
, delayMs);
|
|
2871
|
+
return ()=>window.clearTimeout(timerId)
|
|
2872
|
+
;
|
|
2873
|
+
}
|
|
2874
|
+
}, [
|
|
2875
|
+
delayMs
|
|
2876
|
+
]);
|
|
2877
|
+
return canRender && context.imageLoadingStatus !== 'loaded' ? /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.span, _extends({}, fallbackProps, {
|
|
2878
|
+
ref: forwardedRef
|
|
2879
|
+
})) : null;
|
|
2880
|
+
});
|
|
2881
|
+
/* -----------------------------------------------------------------------------------------------*/ function $cddcb0b647441e34$var$useImageLoadingStatus(src) {
|
|
2882
|
+
const [loadingStatus, setLoadingStatus] = useState('idle');
|
|
2883
|
+
useEffect(()=>{
|
|
2884
|
+
if (!src) {
|
|
2885
|
+
setLoadingStatus('error');
|
|
2886
|
+
return;
|
|
2887
|
+
}
|
|
2888
|
+
let isMounted = true;
|
|
2889
|
+
const image = new window.Image();
|
|
2890
|
+
const updateStatus = (status)=>()=>{
|
|
2891
|
+
if (!isMounted) return;
|
|
2892
|
+
setLoadingStatus(status);
|
|
2893
|
+
}
|
|
2894
|
+
;
|
|
2895
|
+
setLoadingStatus('loading');
|
|
2896
|
+
image.onload = updateStatus('loaded');
|
|
2897
|
+
image.onerror = updateStatus('error');
|
|
2898
|
+
image.src = src;
|
|
2899
|
+
return ()=>{
|
|
2900
|
+
isMounted = false;
|
|
2901
|
+
};
|
|
2902
|
+
}, [
|
|
2903
|
+
src
|
|
2904
|
+
]);
|
|
2905
|
+
return loadingStatus;
|
|
2906
|
+
}
|
|
2907
|
+
const $cddcb0b647441e34$export$be92b6f5f03c0fe9 = $cddcb0b647441e34$export$e2255cf6045e8d47;
|
|
2908
|
+
const $cddcb0b647441e34$export$3e431a229df88919 = $cddcb0b647441e34$export$2cd8ae1985206fe8;
|
|
2909
|
+
const $cddcb0b647441e34$export$fb8d7f40caaeea67 = $cddcb0b647441e34$export$69fffb6a9571fbfe;
|
|
2910
|
+
|
|
2911
|
+
var styles$z = {"box":"box-module_box__ETj3v"};
|
|
2912
|
+
|
|
2913
|
+
const box = cva(styles$z.box);
|
|
2914
|
+
function Box({ children, className, ...props }) {
|
|
2915
|
+
return (jsxRuntimeExports.jsx("div", { className: box({ className }), ...props, children: children }));
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2918
|
+
var styles$y = {"avatar":"avatar-module_avatar__jlJnk","avatar-square":"avatar-module_avatar-square__vypF7","avatar-circle":"avatar-module_avatar-circle__XP6E3","avatar-disabled":"avatar-module_avatar-disabled__rsBE6","imageWrapper":"avatar-module_imageWrapper__dhsku","image":"avatar-module_image__P6Pav","fallback":"avatar-module_fallback__NzNwU"};
|
|
2919
|
+
|
|
2920
|
+
const avatar = cva(styles$y.avatar, {
|
|
2921
|
+
variants: {
|
|
2922
|
+
shape: {
|
|
2923
|
+
square: styles$y["avatar-square"],
|
|
2924
|
+
circle: styles$y["avatar-circle"],
|
|
2925
|
+
},
|
|
2926
|
+
disabled: {
|
|
2927
|
+
true: styles$y["avatar-disabled"],
|
|
2928
|
+
},
|
|
2929
|
+
},
|
|
2930
|
+
defaultVariants: {
|
|
2931
|
+
shape: "circle",
|
|
2932
|
+
},
|
|
2933
|
+
});
|
|
2934
|
+
const image$1 = cva(styles$y.image);
|
|
2935
|
+
const AvatarRoot = forwardRef(({ className, alt, src, fallback, shape, style, imageProps, ...props }, ref) => (jsxRuntimeExports.jsx(Box, { className: styles$y.imageWrapper, style: style, children: jsxRuntimeExports.jsxs($cddcb0b647441e34$export$be92b6f5f03c0fe9, { ref: ref, className: avatar({ shape, className }), style: imageProps, ...props, children: [jsxRuntimeExports.jsx(AvatarImage, { alt: alt, src: src }), jsxRuntimeExports.jsx(AvatarFallback, { children: fallback })] }) })));
|
|
2936
|
+
AvatarRoot.displayName = $cddcb0b647441e34$export$be92b6f5f03c0fe9.displayName;
|
|
2937
|
+
const AvatarImage = forwardRef(({ className, sizes, ...props }, ref) => (jsxRuntimeExports.jsx($cddcb0b647441e34$export$3e431a229df88919, { ref: ref, className: image$1({ className }), ...props })));
|
|
2938
|
+
AvatarImage.displayName = $cddcb0b647441e34$export$3e431a229df88919.displayName;
|
|
2939
|
+
const fallback = cva(styles$y.fallback);
|
|
2940
|
+
const AvatarFallback = forwardRef(({ className, ...props }, ref) => (jsxRuntimeExports.jsx($cddcb0b647441e34$export$fb8d7f40caaeea67, { ref: ref, className: fallback({ className }), ...props })));
|
|
2941
|
+
AvatarFallback.displayName = $cddcb0b647441e34$export$fb8d7f40caaeea67.displayName;
|
|
2942
|
+
const Avatar = Object.assign(AvatarRoot, {
|
|
2943
|
+
Image: AvatarImage,
|
|
2944
|
+
Fallback: AvatarFallback,
|
|
2945
|
+
});
|
|
2946
|
+
|
|
2947
|
+
var styles$x = {"badge":"badge-module_badge__NAloH"};
|
|
2948
|
+
|
|
2949
|
+
const badge = cva(styles$x.badge, {
|
|
2950
|
+
variants: {
|
|
2951
|
+
color: {},
|
|
2952
|
+
},
|
|
2953
|
+
});
|
|
2954
|
+
const Badge = (props, ref) => {
|
|
2955
|
+
const { color, className, children } = props;
|
|
2956
|
+
return jsxRuntimeExports.jsx("span", { className: badge({ color, className }), children: children });
|
|
2957
|
+
};
|
|
2958
|
+
var badge$1 = React__default.forwardRef(Badge);
|
|
2959
|
+
|
|
2960
|
+
var styles$w = {"body":"body-module_body__0sfEI","body-small":"body-module_body-small__CjW1C","body-medium":"body-module_body-medium__XVmQw","body-large":"body-module_body-large__KqAga"};
|
|
2961
|
+
|
|
2962
|
+
const body$1 = cva(styles$w.body, {
|
|
2963
|
+
variants: {
|
|
2964
|
+
size: {
|
|
2965
|
+
small: styles$w["body-small"],
|
|
2966
|
+
medium: styles$w["body-medium"],
|
|
2967
|
+
large: styles$w["body-large"],
|
|
2968
|
+
},
|
|
2969
|
+
},
|
|
2970
|
+
defaultVariants: {
|
|
2971
|
+
size: "small",
|
|
2972
|
+
},
|
|
2973
|
+
});
|
|
2974
|
+
function Body({ children, className, size, ...props }) {
|
|
2975
|
+
return (jsxRuntimeExports.jsx("span", { className: body$1({ size, className }), ...props, children: children }));
|
|
2976
|
+
}
|
|
2977
|
+
|
|
2978
|
+
var styles$v = {"button":"button-module_button__9VQ21","button-small":"button-module_button-small__RR1mh","button-medium":"button-module_button-medium__79Bf1","button-large":"button-module_button-large__BQy6w","button-round":"button-module_button-round__Gd30S","button-primary":"button-module_button-primary__R0k9n","button-outline":"button-module_button-outline__MN25q","button-secondary":"button-module_button-secondary__zDkNV","button-ghost":"button-module_button-ghost__KcZUm","button-danger":"button-module_button-danger__dnB-7"};
|
|
2979
|
+
|
|
2980
|
+
const button = cva(styles$v.button, {
|
|
2981
|
+
variants: {
|
|
2982
|
+
variant: {
|
|
2983
|
+
primary: styles$v["button-primary"],
|
|
2984
|
+
outline: styles$v["button-outline"],
|
|
2985
|
+
secondary: styles$v["button-secondary"],
|
|
2986
|
+
ghost: styles$v["button-ghost"],
|
|
2987
|
+
danger: styles$v["button-danger"],
|
|
2988
|
+
},
|
|
2989
|
+
size: {
|
|
2990
|
+
small: styles$v["button-small"],
|
|
2991
|
+
medium: styles$v["button-medium"],
|
|
2992
|
+
large: styles$v["button-large"],
|
|
2993
|
+
},
|
|
2994
|
+
},
|
|
2995
|
+
});
|
|
2996
|
+
const Button = forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
2997
|
+
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360$1 : "button";
|
|
2998
|
+
return (jsxRuntimeExports.jsx(Comp, { className: button({ variant, size, className }), ref: ref, ...props }));
|
|
2999
|
+
});
|
|
3000
|
+
Button.displayName = "Button";
|
|
3001
|
+
|
|
3002
|
+
function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
|
|
3003
|
+
const ref = useRef({
|
|
3004
|
+
value: value,
|
|
3005
|
+
previous: value
|
|
3006
|
+
}); // We compare values before making an update to ensure that
|
|
3007
|
+
// a change has been made. This ensures the previous value is
|
|
3008
|
+
// persisted correctly between renders.
|
|
3009
|
+
return useMemo(()=>{
|
|
3010
|
+
if (ref.current.value !== value) {
|
|
3011
|
+
ref.current.previous = ref.current.value;
|
|
3012
|
+
ref.current.value = value;
|
|
3013
|
+
}
|
|
3014
|
+
return ref.current.previous;
|
|
3015
|
+
}, [
|
|
3016
|
+
value
|
|
3017
|
+
]);
|
|
3018
|
+
}
|
|
3019
|
+
|
|
3020
|
+
function $db6c3485150b8e66$export$1ab7ae714698c4b8(element) {
|
|
3021
|
+
const [size, setSize] = useState(undefined);
|
|
3022
|
+
$9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
|
|
3023
|
+
if (element) {
|
|
3024
|
+
// provide size as early as possible
|
|
3025
|
+
setSize({
|
|
3026
|
+
width: element.offsetWidth,
|
|
3027
|
+
height: element.offsetHeight
|
|
3028
|
+
});
|
|
3029
|
+
const resizeObserver = new ResizeObserver((entries)=>{
|
|
3030
|
+
if (!Array.isArray(entries)) return;
|
|
3031
|
+
// Since we only observe the one element, we don't need to loop over the
|
|
3032
|
+
// array
|
|
3033
|
+
if (!entries.length) return;
|
|
3034
|
+
const entry = entries[0];
|
|
3035
|
+
let width;
|
|
3036
|
+
let height;
|
|
3037
|
+
if ('borderBoxSize' in entry) {
|
|
3038
|
+
const borderSizeEntry = entry['borderBoxSize']; // iron out differences between browsers
|
|
3039
|
+
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
3040
|
+
width = borderSize['inlineSize'];
|
|
3041
|
+
height = borderSize['blockSize'];
|
|
3042
|
+
} else {
|
|
3043
|
+
// for browsers that don't support `borderBoxSize`
|
|
3044
|
+
// we calculate it ourselves to get the correct border box.
|
|
3045
|
+
width = element.offsetWidth;
|
|
3046
|
+
height = element.offsetHeight;
|
|
3047
|
+
}
|
|
3048
|
+
setSize({
|
|
3049
|
+
width: width,
|
|
3050
|
+
height: height
|
|
3051
|
+
});
|
|
3052
|
+
});
|
|
3053
|
+
resizeObserver.observe(element, {
|
|
3054
|
+
box: 'border-box'
|
|
3055
|
+
});
|
|
3056
|
+
return ()=>resizeObserver.unobserve(element)
|
|
3057
|
+
;
|
|
3058
|
+
} else // We only want to reset to `undefined` when the element becomes `null`,
|
|
3059
|
+
// not if it changes to another element.
|
|
3060
|
+
setSize(undefined);
|
|
3061
|
+
}, [
|
|
3062
|
+
element
|
|
3063
|
+
]);
|
|
3064
|
+
return size;
|
|
3065
|
+
}
|
|
3066
|
+
|
|
3067
|
+
/* -------------------------------------------------------------------------------------------------
|
|
3068
|
+
* Checkbox
|
|
3069
|
+
* -----------------------------------------------------------------------------------------------*/ const $e698a72e93240346$var$CHECKBOX_NAME = 'Checkbox';
|
|
3070
|
+
const [$e698a72e93240346$var$createCheckboxContext, $e698a72e93240346$export$b566c4ff5488ea01] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$1($e698a72e93240346$var$CHECKBOX_NAME);
|
|
3071
|
+
const [$e698a72e93240346$var$CheckboxProvider, $e698a72e93240346$var$useCheckboxContext] = $e698a72e93240346$var$createCheckboxContext($e698a72e93240346$var$CHECKBOX_NAME);
|
|
3072
|
+
const $e698a72e93240346$export$48513f6b9f8ce62d = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
3073
|
+
const { __scopeCheckbox: __scopeCheckbox , name: name , checked: checkedProp , defaultChecked: defaultChecked , required: required , disabled: disabled , value: value = 'on' , onCheckedChange: onCheckedChange , ...checkboxProps } = props;
|
|
3074
|
+
const [button, setButton] = useState(null);
|
|
3075
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, (node)=>setButton(node)
|
|
3076
|
+
);
|
|
3077
|
+
const hasConsumerStoppedPropagationRef = useRef(false); // We set this to true by default so that events bubble to forms without JS (SSR)
|
|
3078
|
+
const isFormControl = button ? Boolean(button.closest('form')) : true;
|
|
3079
|
+
const [checked = false, setChecked] = $71cd76cc60e0454e$export$6f32135080cb4c3$1({
|
|
3080
|
+
prop: checkedProp,
|
|
3081
|
+
defaultProp: defaultChecked,
|
|
3082
|
+
onChange: onCheckedChange
|
|
3083
|
+
});
|
|
3084
|
+
const initialCheckedStateRef = useRef(checked);
|
|
3085
|
+
useEffect(()=>{
|
|
3086
|
+
const form = button === null || button === void 0 ? void 0 : button.form;
|
|
3087
|
+
if (form) {
|
|
3088
|
+
const reset = ()=>setChecked(initialCheckedStateRef.current)
|
|
3089
|
+
;
|
|
3090
|
+
form.addEventListener('reset', reset);
|
|
3091
|
+
return ()=>form.removeEventListener('reset', reset)
|
|
3092
|
+
;
|
|
3093
|
+
}
|
|
3094
|
+
}, [
|
|
3095
|
+
button,
|
|
3096
|
+
setChecked
|
|
3097
|
+
]);
|
|
3098
|
+
return /*#__PURE__*/ createElement($e698a72e93240346$var$CheckboxProvider, {
|
|
3099
|
+
scope: __scopeCheckbox,
|
|
3100
|
+
state: checked,
|
|
3101
|
+
disabled: disabled
|
|
3102
|
+
}, /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.button, _extends({
|
|
3103
|
+
type: "button",
|
|
3104
|
+
role: "checkbox",
|
|
3105
|
+
"aria-checked": $e698a72e93240346$var$isIndeterminate(checked) ? 'mixed' : checked,
|
|
3106
|
+
"aria-required": required,
|
|
3107
|
+
"data-state": $e698a72e93240346$var$getState(checked),
|
|
3108
|
+
"data-disabled": disabled ? '' : undefined,
|
|
3109
|
+
disabled: disabled,
|
|
3110
|
+
value: value
|
|
3111
|
+
}, checkboxProps, {
|
|
3112
|
+
ref: composedRefs,
|
|
3113
|
+
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onKeyDown, (event)=>{
|
|
3114
|
+
// According to WAI ARIA, Checkboxes don't activate on enter keypress
|
|
3115
|
+
if (event.key === 'Enter') event.preventDefault();
|
|
3116
|
+
}),
|
|
3117
|
+
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onClick, (event)=>{
|
|
3118
|
+
setChecked((prevChecked)=>$e698a72e93240346$var$isIndeterminate(prevChecked) ? true : !prevChecked
|
|
3119
|
+
);
|
|
3120
|
+
if (isFormControl) {
|
|
3121
|
+
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(); // if checkbox is in a form, stop propagation from the button so that we only propagate
|
|
3122
|
+
// one click event (from the input). We propagate changes from an input so that native
|
|
3123
|
+
// form validation works and form events reflect checkbox updates.
|
|
3124
|
+
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
|
|
3125
|
+
}
|
|
3126
|
+
})
|
|
3127
|
+
})), isFormControl && /*#__PURE__*/ createElement($e698a72e93240346$var$BubbleInput, {
|
|
3128
|
+
control: button,
|
|
3129
|
+
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
3130
|
+
name: name,
|
|
3131
|
+
value: value,
|
|
3132
|
+
checked: checked,
|
|
3133
|
+
required: required,
|
|
3134
|
+
disabled: disabled // We transform because the input is absolutely positioned but we have
|
|
3135
|
+
,
|
|
3136
|
+
style: {
|
|
3137
|
+
transform: 'translateX(-100%)'
|
|
3138
|
+
}
|
|
3139
|
+
}));
|
|
3140
|
+
});
|
|
3141
|
+
/* -------------------------------------------------------------------------------------------------
|
|
3142
|
+
* CheckboxIndicator
|
|
3143
|
+
* -----------------------------------------------------------------------------------------------*/ const $e698a72e93240346$var$INDICATOR_NAME = 'CheckboxIndicator';
|
|
3144
|
+
const $e698a72e93240346$export$59aad738f51d1c05 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
3145
|
+
const { __scopeCheckbox: __scopeCheckbox , forceMount: forceMount , ...indicatorProps } = props;
|
|
3146
|
+
const context = $e698a72e93240346$var$useCheckboxContext($e698a72e93240346$var$INDICATOR_NAME, __scopeCheckbox);
|
|
3147
|
+
return /*#__PURE__*/ createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b$1, {
|
|
3148
|
+
present: forceMount || $e698a72e93240346$var$isIndeterminate(context.state) || context.state === true
|
|
3149
|
+
}, /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.span, _extends({
|
|
3150
|
+
"data-state": $e698a72e93240346$var$getState(context.state),
|
|
3151
|
+
"data-disabled": context.disabled ? '' : undefined
|
|
3152
|
+
}, indicatorProps, {
|
|
3153
|
+
ref: forwardedRef,
|
|
3154
|
+
style: {
|
|
3155
|
+
pointerEvents: 'none',
|
|
3156
|
+
...props.style
|
|
3157
|
+
}
|
|
3158
|
+
})));
|
|
2653
3159
|
});
|
|
3160
|
+
/* ---------------------------------------------------------------------------------------------- */ const $e698a72e93240346$var$BubbleInput = (props)=>{
|
|
3161
|
+
const { control: control , checked: checked , bubbles: bubbles = true , ...inputProps } = props;
|
|
3162
|
+
const ref = useRef(null);
|
|
3163
|
+
const prevChecked = $010c2913dbd2fe3d$export$5cae361ad82dce8b(checked);
|
|
3164
|
+
const controlSize = $db6c3485150b8e66$export$1ab7ae714698c4b8(control); // Bubble checked change to parents (e.g form change event)
|
|
3165
|
+
useEffect(()=>{
|
|
3166
|
+
const input = ref.current;
|
|
3167
|
+
const inputProto = window.HTMLInputElement.prototype;
|
|
3168
|
+
const descriptor = Object.getOwnPropertyDescriptor(inputProto, 'checked');
|
|
3169
|
+
const setChecked = descriptor.set;
|
|
3170
|
+
if (prevChecked !== checked && setChecked) {
|
|
3171
|
+
const event = new Event('click', {
|
|
3172
|
+
bubbles: bubbles
|
|
3173
|
+
});
|
|
3174
|
+
input.indeterminate = $e698a72e93240346$var$isIndeterminate(checked);
|
|
3175
|
+
setChecked.call(input, $e698a72e93240346$var$isIndeterminate(checked) ? false : checked);
|
|
3176
|
+
input.dispatchEvent(event);
|
|
3177
|
+
}
|
|
3178
|
+
}, [
|
|
3179
|
+
prevChecked,
|
|
3180
|
+
checked,
|
|
3181
|
+
bubbles
|
|
3182
|
+
]);
|
|
3183
|
+
return /*#__PURE__*/ createElement("input", _extends({
|
|
3184
|
+
type: "checkbox",
|
|
3185
|
+
"aria-hidden": true,
|
|
3186
|
+
defaultChecked: $e698a72e93240346$var$isIndeterminate(checked) ? false : checked
|
|
3187
|
+
}, inputProps, {
|
|
3188
|
+
tabIndex: -1,
|
|
3189
|
+
ref: ref,
|
|
3190
|
+
style: {
|
|
3191
|
+
...props.style,
|
|
3192
|
+
...controlSize,
|
|
3193
|
+
position: 'absolute',
|
|
3194
|
+
pointerEvents: 'none',
|
|
3195
|
+
opacity: 0,
|
|
3196
|
+
margin: 0
|
|
3197
|
+
}
|
|
3198
|
+
}));
|
|
3199
|
+
};
|
|
3200
|
+
function $e698a72e93240346$var$isIndeterminate(checked) {
|
|
3201
|
+
return checked === 'indeterminate';
|
|
3202
|
+
}
|
|
3203
|
+
function $e698a72e93240346$var$getState(checked) {
|
|
3204
|
+
return $e698a72e93240346$var$isIndeterminate(checked) ? 'indeterminate' : checked ? 'checked' : 'unchecked';
|
|
3205
|
+
}
|
|
3206
|
+
const $e698a72e93240346$export$be92b6f5f03c0fe9 = $e698a72e93240346$export$48513f6b9f8ce62d;
|
|
3207
|
+
const $e698a72e93240346$export$adb584737d712b70 = $e698a72e93240346$export$59aad738f51d1c05;
|
|
2654
3208
|
|
|
2655
3209
|
var styles$u = {"label":"label-module_label__hM2lk","label-small":"label-module_label-small__se5gE","label-medium":"label-module_label-medium__Z4Tcb","label-large":"label-module_label-large__ba4Jb"};
|
|
2656
3210
|
|
|
@@ -2823,13 +3377,13 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
2823
3377
|
* See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
|
|
2824
3378
|
*/ const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? useLayoutEffect : ()=>{};
|
|
2825
3379
|
|
|
2826
|
-
const $1746a345f3d73bb7$var$useReactId
|
|
3380
|
+
const $1746a345f3d73bb7$var$useReactId = React['useId'.toString()] || (()=>undefined
|
|
2827
3381
|
);
|
|
2828
|
-
let $1746a345f3d73bb7$var$count
|
|
2829
|
-
function $1746a345f3d73bb7$export$f680877a34711e37
|
|
2830
|
-
const [id, setId] = React.useState($1746a345f3d73bb7$var$useReactId
|
|
3382
|
+
let $1746a345f3d73bb7$var$count = 0;
|
|
3383
|
+
function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
|
|
3384
|
+
const [id, setId] = React.useState($1746a345f3d73bb7$var$useReactId()); // React versions older than 18 will have client-side ids only.
|
|
2831
3385
|
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
2832
|
-
if (!deterministicId) setId((reactId)=>reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count
|
|
3386
|
+
if (!deterministicId) setId((reactId)=>reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count++)
|
|
2833
3387
|
);
|
|
2834
3388
|
}, [
|
|
2835
3389
|
deterministicId
|
|
@@ -4512,9 +5066,9 @@ const $5d3850c4d0b4e6c7$export$3ddf2d174ce01153$1 = (props)=>{
|
|
|
4512
5066
|
scope: __scopeDialog,
|
|
4513
5067
|
triggerRef: triggerRef,
|
|
4514
5068
|
contentRef: contentRef,
|
|
4515
|
-
contentId: $1746a345f3d73bb7$export$f680877a34711e37
|
|
4516
|
-
titleId: $1746a345f3d73bb7$export$f680877a34711e37
|
|
4517
|
-
descriptionId: $1746a345f3d73bb7$export$f680877a34711e37
|
|
5069
|
+
contentId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
5070
|
+
titleId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
5071
|
+
descriptionId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
4518
5072
|
open: open,
|
|
4519
5073
|
onOpenChange: setOpen,
|
|
4520
5074
|
onOpenToggle: useCallback(()=>setOpen((prevOpen)=>!prevOpen
|
|
@@ -4831,20 +5385,6 @@ var ue='[cmdk-list-sizer=""]',M='[cmdk-group=""]',N='[cmdk-group-items=""]',de='
|
|
|
4831
5385
|
|
|
4832
5386
|
var styles$s = {"command":"command-module_command__uWauu","inputWrapper":"command-module_inputWrapper__3p35Y","inputIcon":"command-module_inputIcon__A5omD","input":"command-module_input__l18cJ","list":"command-module_list__R5zPY","empty":"command-module_empty__had3w","group":"command-module_group__eVKQy","item":"command-module_item__J5y6v","separator":"command-module_separator__etEyE"};
|
|
4833
5387
|
|
|
4834
|
-
const $1746a345f3d73bb7$var$useReactId = React['useId'.toString()] || (()=>undefined
|
|
4835
|
-
);
|
|
4836
|
-
let $1746a345f3d73bb7$var$count = 0;
|
|
4837
|
-
function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
|
|
4838
|
-
const [id, setId] = React.useState($1746a345f3d73bb7$var$useReactId()); // React versions older than 18 will have client-side ids only.
|
|
4839
|
-
$9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
|
|
4840
|
-
if (!deterministicId) setId((reactId)=>reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count++)
|
|
4841
|
-
);
|
|
4842
|
-
}, [
|
|
4843
|
-
deterministicId
|
|
4844
|
-
]);
|
|
4845
|
-
return deterministicId || (id ? `radix-${id}` : '');
|
|
4846
|
-
}
|
|
4847
|
-
|
|
4848
5388
|
/**
|
|
4849
5389
|
* Listens for when the escape key is down
|
|
4850
5390
|
*/ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
@@ -5711,9 +6251,9 @@ const $5d3850c4d0b4e6c7$export$3ddf2d174ce01153 = (props)=>{
|
|
|
5711
6251
|
scope: __scopeDialog,
|
|
5712
6252
|
triggerRef: triggerRef,
|
|
5713
6253
|
contentRef: contentRef,
|
|
5714
|
-
contentId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
5715
|
-
titleId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
5716
|
-
descriptionId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
6254
|
+
contentId: $1746a345f3d73bb7$export$f680877a34711e37$1(),
|
|
6255
|
+
titleId: $1746a345f3d73bb7$export$f680877a34711e37$1(),
|
|
6256
|
+
descriptionId: $1746a345f3d73bb7$export$f680877a34711e37$1(),
|
|
5717
6257
|
open: open,
|
|
5718
6258
|
onOpenChange: setOpen,
|
|
5719
6259
|
onOpenToggle: useCallback(()=>setOpen((prevOpen)=>!prevOpen
|
|
@@ -6051,99 +6591,6 @@ function Display({ children, className, size, ...props }) {
|
|
|
6051
6591
|
return (jsxRuntimeExports.jsx("span", { className: display({ size, className }), ...props, children: children }));
|
|
6052
6592
|
}
|
|
6053
6593
|
|
|
6054
|
-
// We have resorted to returning slots directly rather than exposing primitives that can then
|
|
6055
|
-
// be slotted like `<CollectionItem as={Slot}>…</CollectionItem>`.
|
|
6056
|
-
// This is because we encountered issues with generic types that cannot be statically analysed
|
|
6057
|
-
// due to creating them dynamically via createCollection.
|
|
6058
|
-
function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
6059
|
-
/* -----------------------------------------------------------------------------------------------
|
|
6060
|
-
* CollectionProvider
|
|
6061
|
-
* ---------------------------------------------------------------------------------------------*/ const PROVIDER_NAME = name + 'CollectionProvider';
|
|
6062
|
-
const [createCollectionContext, createCollectionScope] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$1(PROVIDER_NAME);
|
|
6063
|
-
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {
|
|
6064
|
-
collectionRef: {
|
|
6065
|
-
current: null
|
|
6066
|
-
},
|
|
6067
|
-
itemMap: new Map()
|
|
6068
|
-
});
|
|
6069
|
-
const CollectionProvider = (props)=>{
|
|
6070
|
-
const { scope: scope , children: children } = props;
|
|
6071
|
-
const ref = React__default.useRef(null);
|
|
6072
|
-
const itemMap = React__default.useRef(new Map()).current;
|
|
6073
|
-
return /*#__PURE__*/ React__default.createElement(CollectionProviderImpl, {
|
|
6074
|
-
scope: scope,
|
|
6075
|
-
itemMap: itemMap,
|
|
6076
|
-
collectionRef: ref
|
|
6077
|
-
}, children);
|
|
6078
|
-
};
|
|
6079
|
-
/* -----------------------------------------------------------------------------------------------
|
|
6080
|
-
* CollectionSlot
|
|
6081
|
-
* ---------------------------------------------------------------------------------------------*/ const COLLECTION_SLOT_NAME = name + 'CollectionSlot';
|
|
6082
|
-
const CollectionSlot = /*#__PURE__*/ React__default.forwardRef((props, forwardedRef)=>{
|
|
6083
|
-
const { scope: scope , children: children } = props;
|
|
6084
|
-
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
6085
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, context.collectionRef);
|
|
6086
|
-
return /*#__PURE__*/ React__default.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360$1, {
|
|
6087
|
-
ref: composedRefs
|
|
6088
|
-
}, children);
|
|
6089
|
-
});
|
|
6090
|
-
/* -----------------------------------------------------------------------------------------------
|
|
6091
|
-
* CollectionItem
|
|
6092
|
-
* ---------------------------------------------------------------------------------------------*/ const ITEM_SLOT_NAME = name + 'CollectionItemSlot';
|
|
6093
|
-
const ITEM_DATA_ATTR = 'data-radix-collection-item';
|
|
6094
|
-
const CollectionItemSlot = /*#__PURE__*/ React__default.forwardRef((props, forwardedRef)=>{
|
|
6095
|
-
const { scope: scope , children: children , ...itemData } = props;
|
|
6096
|
-
const ref = React__default.useRef(null);
|
|
6097
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, ref);
|
|
6098
|
-
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
6099
|
-
React__default.useEffect(()=>{
|
|
6100
|
-
context.itemMap.set(ref, {
|
|
6101
|
-
ref: ref,
|
|
6102
|
-
...itemData
|
|
6103
|
-
});
|
|
6104
|
-
return ()=>void context.itemMap.delete(ref)
|
|
6105
|
-
;
|
|
6106
|
-
});
|
|
6107
|
-
return /*#__PURE__*/ React__default.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360$1, {
|
|
6108
|
-
[ITEM_DATA_ATTR]: '',
|
|
6109
|
-
ref: composedRefs
|
|
6110
|
-
}, children);
|
|
6111
|
-
});
|
|
6112
|
-
/* -----------------------------------------------------------------------------------------------
|
|
6113
|
-
* useCollection
|
|
6114
|
-
* ---------------------------------------------------------------------------------------------*/ function useCollection(scope) {
|
|
6115
|
-
const context = useCollectionContext(name + 'CollectionConsumer', scope);
|
|
6116
|
-
const getItems = React__default.useCallback(()=>{
|
|
6117
|
-
const collectionNode = context.collectionRef.current;
|
|
6118
|
-
if (!collectionNode) return [];
|
|
6119
|
-
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
6120
|
-
const items = Array.from(context.itemMap.values());
|
|
6121
|
-
const orderedItems = items.sort((a, b)=>orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
|
|
6122
|
-
);
|
|
6123
|
-
return orderedItems;
|
|
6124
|
-
}, [
|
|
6125
|
-
context.collectionRef,
|
|
6126
|
-
context.itemMap
|
|
6127
|
-
]);
|
|
6128
|
-
return getItems;
|
|
6129
|
-
}
|
|
6130
|
-
return [
|
|
6131
|
-
{
|
|
6132
|
-
Provider: CollectionProvider,
|
|
6133
|
-
Slot: CollectionSlot,
|
|
6134
|
-
ItemSlot: CollectionItemSlot
|
|
6135
|
-
},
|
|
6136
|
-
useCollection,
|
|
6137
|
-
createCollectionScope
|
|
6138
|
-
];
|
|
6139
|
-
}
|
|
6140
|
-
|
|
6141
|
-
const $f631663db3294ace$var$DirectionContext = /*#__PURE__*/ createContext(undefined);
|
|
6142
|
-
/* -----------------------------------------------------------------------------------------------*/ function $f631663db3294ace$export$b39126d51d94e6f3(localDir) {
|
|
6143
|
-
const globalDir = useContext($f631663db3294ace$var$DirectionContext);
|
|
6144
|
-
return localDir || globalDir || 'ltr';
|
|
6145
|
-
}
|
|
6146
|
-
|
|
6147
6594
|
function getAlignment(placement) {
|
|
6148
6595
|
return placement.split('-')[1];
|
|
6149
6596
|
}
|
|
@@ -8280,7 +8727,7 @@ const $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /*#__PURE__*/ forwardRef((prop
|
|
|
8280
8727
|
* -----------------------------------------------------------------------------------------------*/ const $d7bdfb9eb0fdf311$var$ITEM_NAME = 'RovingFocusGroupItem';
|
|
8281
8728
|
const $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
8282
8729
|
const { __scopeRovingFocusGroup: __scopeRovingFocusGroup , focusable: focusable = true , active: active = false , tabStopId: tabStopId , ...itemProps } = props;
|
|
8283
|
-
const autoId = $1746a345f3d73bb7$export$f680877a34711e37();
|
|
8730
|
+
const autoId = $1746a345f3d73bb7$export$f680877a34711e37$1();
|
|
8284
8731
|
const id = tabStopId || autoId;
|
|
8285
8732
|
const context = $d7bdfb9eb0fdf311$var$useRovingFocusContext($d7bdfb9eb0fdf311$var$ITEM_NAME, __scopeRovingFocusGroup);
|
|
8286
8733
|
const isCurrentTabStop = context.currentTabStopId === id;
|
|
@@ -8972,9 +9419,9 @@ const $d08ef79370b62062$export$e44a253a59704894 = (props)=>{
|
|
|
8972
9419
|
});
|
|
8973
9420
|
return /*#__PURE__*/ createElement($d08ef79370b62062$var$DropdownMenuProvider, {
|
|
8974
9421
|
scope: __scopeDropdownMenu,
|
|
8975
|
-
triggerId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
9422
|
+
triggerId: $1746a345f3d73bb7$export$f680877a34711e37$1(),
|
|
8976
9423
|
triggerRef: triggerRef,
|
|
8977
|
-
contentId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
9424
|
+
contentId: $1746a345f3d73bb7$export$f680877a34711e37$1(),
|
|
8978
9425
|
open: open,
|
|
8979
9426
|
onOpenChange: setOpen,
|
|
8980
9427
|
onOpenToggle: useCallback(()=>setOpen((prevOpen)=>!prevOpen
|
|
@@ -9330,7 +9777,7 @@ const $cb5cc270b50c6fcd$export$5b6b19405a83ff9d = (props)=>{
|
|
|
9330
9777
|
});
|
|
9331
9778
|
return /*#__PURE__*/ createElement($cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9$1, popperScope, /*#__PURE__*/ createElement($cb5cc270b50c6fcd$var$PopoverProvider, {
|
|
9332
9779
|
scope: __scopePopover,
|
|
9333
|
-
contentId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
9780
|
+
contentId: $1746a345f3d73bb7$export$f680877a34711e37$1(),
|
|
9334
9781
|
triggerRef: triggerRef,
|
|
9335
9782
|
open: open,
|
|
9336
9783
|
onOpenChange: setOpen,
|
|
@@ -16879,13 +17326,15 @@ var StateManagedSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
16879
17326
|
});
|
|
16880
17327
|
var StateManagedSelect$1 = StateManagedSelect;
|
|
16881
17328
|
|
|
16882
|
-
var styles$e = {"select":"rselect-module_select__gZKVx","
|
|
17329
|
+
var styles$e = {"select":"rselect-module_select__gZKVx","option":"rselect-module_option__UNSGQ","isSelected":"rselect-module_isSelected__Gq24Q","control":"rselect-module_control__zsqi5","placeholder":"rselect-module_placeholder__tRMzL","indicatorsContainer":"rselect-module_indicatorsContainer__mufOH"};
|
|
16883
17330
|
|
|
16884
17331
|
const select = cva(styles$e.select);
|
|
16885
17332
|
const classNames = {
|
|
16886
17333
|
control: () => cx(styles$e.control),
|
|
16887
17334
|
option: () => cx(styles$e.option),
|
|
16888
|
-
input: () => cx(styles$e.input
|
|
17335
|
+
input: () => cx(styles$e.input, {
|
|
17336
|
+
isSelected: () => cx(styles$e.isSelected),
|
|
17337
|
+
}),
|
|
16889
17338
|
placeholder: () => cx(styles$e.placeholder),
|
|
16890
17339
|
singleValue: () => cx(styles$e.singleValue),
|
|
16891
17340
|
indicatorsContainer: () => cx(styles$e.indicatorsContainer),
|
|
@@ -17742,7 +18191,7 @@ const $cc7e05a45900e73f$export$ef9b1a59e592288f = (props)=>{
|
|
|
17742
18191
|
onValueNodeChange: setValueNode,
|
|
17743
18192
|
valueNodeHasChildren: valueNodeHasChildren,
|
|
17744
18193
|
onValueNodeHasChildrenChange: setValueNodeHasChildren,
|
|
17745
|
-
contentId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
18194
|
+
contentId: $1746a345f3d73bb7$export$f680877a34711e37$1(),
|
|
17746
18195
|
value: value,
|
|
17747
18196
|
onValueChange: setValue,
|
|
17748
18197
|
open: open,
|
|
@@ -18406,7 +18855,7 @@ const $cc7e05a45900e73f$export$9ed6e7b40248d36d = /*#__PURE__*/ forwardRef((prop
|
|
|
18406
18855
|
const [$cc7e05a45900e73f$var$SelectGroupContextProvider, $cc7e05a45900e73f$var$useSelectGroupContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$GROUP_NAME);
|
|
18407
18856
|
const $cc7e05a45900e73f$export$ee25a334c55de1f4 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
18408
18857
|
const { __scopeSelect: __scopeSelect , ...groupProps } = props;
|
|
18409
|
-
const groupId = $1746a345f3d73bb7$export$f680877a34711e37();
|
|
18858
|
+
const groupId = $1746a345f3d73bb7$export$f680877a34711e37$1();
|
|
18410
18859
|
return /*#__PURE__*/ createElement($cc7e05a45900e73f$var$SelectGroupContextProvider, {
|
|
18411
18860
|
scope: __scopeSelect,
|
|
18412
18861
|
id: groupId
|
|
@@ -18444,7 +18893,7 @@ const $cc7e05a45900e73f$export$13ef48a934230896 = /*#__PURE__*/ forwardRef((prop
|
|
|
18444
18893
|
var _contentContext$itemR;
|
|
18445
18894
|
return (_contentContext$itemR = contentContext.itemRefCallback) === null || _contentContext$itemR === void 0 ? void 0 : _contentContext$itemR.call(contentContext, node, value, disabled);
|
|
18446
18895
|
});
|
|
18447
|
-
const textId = $1746a345f3d73bb7$export$f680877a34711e37();
|
|
18896
|
+
const textId = $1746a345f3d73bb7$export$f680877a34711e37$1();
|
|
18448
18897
|
const handleSelect = ()=>{
|
|
18449
18898
|
if (!disabled) {
|
|
18450
18899
|
context.onValueChange(value);
|
|
@@ -18930,16 +19379,16 @@ function Text({ children, className, size, ...props }) {
|
|
|
18930
19379
|
return (jsxRuntimeExports.jsx("span", { className: text$1({ size, className }), ...props, children: children }));
|
|
18931
19380
|
}
|
|
18932
19381
|
|
|
18933
|
-
var styles$8 = {"sidebar":"sidebar-module_sidebar__NXH3O","navigations":"sidebar-module_navigations__z5B4k","navigationgroup":"sidebar-module_navigationgroup__bBDHs","navigationgroupheading":"sidebar-module_navigationgroupheading__MkRud","navigationgroupcontent":"sidebar-module_navigationgroupcontent__q70dL","cell":"sidebar-module_cell__NHLSi","active":"sidebar-module_active__lfMUF","disabled":"sidebar-module_disabled__nYLU3","cellText":"sidebar-module_cellText__JV292","footer":"sidebar-module_footer__wLl-f"};
|
|
19382
|
+
var styles$8 = {"sidebar":"sidebar-module_sidebar__NXH3O","logo":"sidebar-module_logo__RaK-j","navigations":"sidebar-module_navigations__z5B4k","navigationgroup":"sidebar-module_navigationgroup__bBDHs","navigationgroupheading":"sidebar-module_navigationgroupheading__MkRud","navigationgroupcontent":"sidebar-module_navigationgroupcontent__q70dL","cell":"sidebar-module_cell__NHLSi","active":"sidebar-module_active__lfMUF","disabled":"sidebar-module_disabled__nYLU3","cellText":"sidebar-module_cellText__JV292","footer":"sidebar-module_footer__wLl-f"};
|
|
18934
19383
|
|
|
18935
|
-
const SidebarRoot = ({ children }) => {
|
|
18936
|
-
return (jsxRuntimeExports.jsx(Flex, { direction: "column", justify: "between", className: styles$8.sidebar, children: children }));
|
|
19384
|
+
const SidebarRoot = ({ children, ...props }) => {
|
|
19385
|
+
return (jsxRuntimeExports.jsx(Flex, { direction: "column", justify: "between", className: styles$8.sidebar, ...props, children: children }));
|
|
18937
19386
|
};
|
|
18938
|
-
const SidebarLogo = ({ name = "Apsara", logo, onClick }) => {
|
|
18939
|
-
return (jsxRuntimeExports.jsxs(Flex, { align: "center", direction: "row", gap: "small", onClick: onClick,
|
|
19387
|
+
const SidebarLogo = ({ name = "Apsara", logo, onClick, ...props }) => {
|
|
19388
|
+
return (jsxRuntimeExports.jsxs(Flex, { align: "center", direction: "row", gap: "small", onClick: onClick, ...props, children: [jsxRuntimeExports.jsx(Flex, { gap: "small", children: logo }), jsxRuntimeExports.jsx(Text, { size: 2, className: styles$8.logo, children: name })] }));
|
|
18940
19389
|
};
|
|
18941
19390
|
const SidebarNavigations = ({ children, ...props }) => {
|
|
18942
|
-
return (jsxRuntimeExports.jsx(Flex, { direction: "column",
|
|
19391
|
+
return (jsxRuntimeExports.jsx(Flex, { direction: "column", gap: "extra-small", ...props, children: children }));
|
|
18943
19392
|
};
|
|
18944
19393
|
const SidebarNavigationsGroup = ({ icon, name, children, ...props }) => {
|
|
18945
19394
|
return (jsxRuntimeExports.jsxs(Flex, { direction: "column", className: styles$8.navigationgroup, ...props, children: [jsxRuntimeExports.jsxs(Flex, { className: styles$8.navigationgroupheading, children: [icon && icon, jsxRuntimeExports.jsx(Text, { size: 2, style: { color: "var(--foreground-muted)" }, children: name })] }), jsxRuntimeExports.jsx(Flex, { direction: "column", className: styles$8.navigationgroupcontent, children: children })] }));
|
|
@@ -19607,7 +20056,7 @@ const $a093c7e1ec25a057$export$28c660c63b792dea = (props)=>{
|
|
|
19607
20056
|
const providerContext = $a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$TOOLTIP_NAME, props.__scopeTooltip);
|
|
19608
20057
|
const popperScope = $a093c7e1ec25a057$var$usePopperScope(__scopeTooltip);
|
|
19609
20058
|
const [trigger, setTrigger] = useState(null);
|
|
19610
|
-
const contentId = $1746a345f3d73bb7$export$f680877a34711e37();
|
|
20059
|
+
const contentId = $1746a345f3d73bb7$export$f680877a34711e37$1();
|
|
19611
20060
|
const openTimerRef = useRef(0);
|
|
19612
20061
|
const disableHoverableContent = disableHoverableContentProp !== null && disableHoverableContentProp !== void 0 ? disableHoverableContentProp : providerContext.disableHoverableContent;
|
|
19613
20062
|
const delayDuration = delayDurationProp !== null && delayDurationProp !== void 0 ? delayDurationProp : providerContext.delayDuration;
|
|
@@ -23576,7 +24025,7 @@ const TextField = forwardRef(({ leading, className, src, size, state, style, ...
|
|
|
23576
24025
|
});
|
|
23577
24026
|
TextField.displayName = "TextField";
|
|
23578
24027
|
|
|
23579
|
-
var styles$4 = {"wrapper":"datatable-module_wrapper__Sxg2d","datatable":"datatable-module_datatable__z-Th2","table":"datatable-module_table__x2IkY","head":"datatable-module_head__zCfCW","toolbar":"datatable-module_toolbar__lO-aI","chip":"datatable-module_chip__IiwTD"};
|
|
24028
|
+
var styles$4 = {"wrapper":"datatable-module_wrapper__Sxg2d","datatable":"datatable-module_datatable__z-Th2","table":"datatable-module_table__x2IkY","head":"datatable-module_head__zCfCW","toolbar":"datatable-module_toolbar__lO-aI","chip":"datatable-module_chip__IiwTD","chipWrapper":"datatable-module_chipWrapper__iz69x"};
|
|
23580
24029
|
|
|
23581
24030
|
const FilteredChip = ({ column }) => {
|
|
23582
24031
|
const { table, removeFilterColumn } = useTable();
|
|
@@ -23815,7 +24264,7 @@ const $69cb30bb0017df05$export$b2539bed5023c21c = /*#__PURE__*/ forwardRef((prop
|
|
|
23815
24264
|
});
|
|
23816
24265
|
return /*#__PURE__*/ createElement($69cb30bb0017df05$var$TabsProvider, {
|
|
23817
24266
|
scope: __scopeTabs,
|
|
23818
|
-
baseId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
24267
|
+
baseId: $1746a345f3d73bb7$export$f680877a34711e37$1(),
|
|
23819
24268
|
value: value,
|
|
23820
24269
|
onValueChange: setValue,
|
|
23821
24270
|
orientation: orientation,
|
|
@@ -24249,5 +24698,5 @@ function Title({ children, className, size, ...props }) {
|
|
|
24249
24698
|
return (jsxRuntimeExports.jsx("span", { className: title({ size, className }), ...props, children: children }));
|
|
24250
24699
|
}
|
|
24251
24700
|
|
|
24252
|
-
export { Avatar, badge$1 as Badge, Body, Box, Button, Checkbox, Command, Container, DataTable, Dialog, Display, DropdownMenu, EmptyState, ErrorState, Flex, Grid, Headline, Image, InputField, Label, Link, Popover, RSelect, Radio, ScrollArea, Select, Separator, Sheet, Sidebar, Switch, Table, Tabs, Text, TextField, Textarea, ThemeProvider, ThemeSwitcher, Title, Tooltip, useTable, useTheme };
|
|
24701
|
+
export { Accordion, Avatar, badge$1 as Badge, Body, Box, Button, Checkbox, Command, Container, DataTable, Dialog, Display, DropdownMenu, EmptyState, ErrorState, Flex, Grid, Headline, Image, InputField, Label, Link, Popover, RSelect, Radio, ScrollArea, Select, Separator, Sheet, Sidebar, Switch, Table, Tabs, Text, TextField, Textarea, ThemeProvider, ThemeSwitcher, Title, Tooltip, useTable, useTheme };
|
|
24253
24702
|
//# sourceMappingURL=index.js.map
|