@parrot-co/parrot-ui 0.0.70 → 0.0.72
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/main.js +243 -116
- package/dist/main.js.map +1 -1
- package/dist/module.js +245 -119
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +2577 -184
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/module.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {createStitches as $kF5Av$createStitches} from "@stitches/react";
|
|
2
2
|
import {gray as $kF5Av$gray, mauve as $kF5Av$mauve, slate as $kF5Av$slate, sage as $kF5Av$sage, olive as $kF5Av$olive, sand as $kF5Av$sand, tomato as $kF5Av$tomato, red as $kF5Av$red, crimson as $kF5Av$crimson, pink as $kF5Av$pink, plum as $kF5Av$plum, purple as $kF5Av$purple, violet as $kF5Av$violet, indigo as $kF5Av$indigo, blue as $kF5Av$blue, sky as $kF5Av$sky, mint as $kF5Av$mint, cyan as $kF5Av$cyan, teal as $kF5Av$teal, green as $kF5Av$green, grass as $kF5Av$grass, lime as $kF5Av$lime, yellow as $kF5Av$yellow, amber as $kF5Av$amber, orange as $kF5Av$orange, brown as $kF5Av$brown, bronze as $kF5Av$bronze, gold as $kF5Av$gold, grayA as $kF5Av$grayA, mauveA as $kF5Av$mauveA, slateA as $kF5Av$slateA, sageA as $kF5Av$sageA, oliveA as $kF5Av$oliveA, sandA as $kF5Av$sandA, tomatoA as $kF5Av$tomatoA, redA as $kF5Av$redA, crimsonA as $kF5Av$crimsonA, pinkA as $kF5Av$pinkA, plumA as $kF5Av$plumA, purpleA as $kF5Av$purpleA, violetA as $kF5Av$violetA, indigoA as $kF5Av$indigoA, blueA as $kF5Av$blueA, skyA as $kF5Av$skyA, mintA as $kF5Av$mintA, cyanA as $kF5Av$cyanA, tealA as $kF5Av$tealA, greenA as $kF5Av$greenA, grassA as $kF5Av$grassA, limeA as $kF5Av$limeA, yellowA as $kF5Av$yellowA, amberA as $kF5Av$amberA, orangeA as $kF5Av$orangeA, brownA as $kF5Av$brownA, bronzeA as $kF5Av$bronzeA, goldA as $kF5Av$goldA, whiteA as $kF5Av$whiteA, blackA as $kF5Av$blackA} from "@radix-ui/colors";
|
|
3
3
|
import {jsxs as $kF5Av$jsxs, jsx as $kF5Av$jsx, Fragment as $kF5Av$Fragment} from "react/jsx-runtime";
|
|
4
|
-
import $kF5Av$react, {
|
|
5
|
-
import {useTextField as $kF5Av$useTextField, useLocale as $kF5Av$useLocale, useNumberField as $kF5Av$useNumberField,
|
|
4
|
+
import $kF5Av$react, {createContext as $kF5Av$createContext, Children as $kF5Av$Children, useMemo as $kF5Av$useMemo, isValidElement as $kF5Av$isValidElement, useContext as $kF5Av$useContext, forwardRef as $kF5Av$forwardRef, useRef as $kF5Av$useRef, useState as $kF5Av$useState, useEffect as $kF5Av$useEffect, cloneElement as $kF5Av$cloneElement} from "react";
|
|
5
|
+
import {useTextField as $kF5Av$useTextField, useLocale as $kF5Av$useLocale, useNumberField as $kF5Av$useNumberField, useToggleButton as $kF5Av$useToggleButton, useCheckbox as $kF5Av$useCheckbox, useCheckboxGroupItem as $kF5Av$useCheckboxGroupItem, useFocusRing as $kF5Av$useFocusRing, VisuallyHidden as $kF5Av$VisuallyHidden, useCheckboxGroup as $kF5Av$useCheckboxGroup, useRadio as $kF5Av$useRadio, useRadioGroup as $kF5Av$useRadioGroup, useSelect as $kF5Av$useSelect, useButton as $kF5Av$useButton, HiddenSelect as $kF5Av$HiddenSelect, mergeProps as $kF5Av$mergeProps, useListBox as $kF5Av$useListBox, useOption as $kF5Av$useOption, useListBoxSection as $kF5Av$useListBoxSection, useSeparator as $kF5Av$useSeparator, usePopover as $kF5Av$usePopover, Overlay as $kF5Av$Overlay, useDatePicker as $kF5Av$useDatePicker, useDateField as $kF5Av$useDateField, useDateSegment as $kF5Av$useDateSegment, useCalendar as $kF5Av$useCalendar, useCalendarGrid as $kF5Av$useCalendarGrid, useCalendarCell as $kF5Av$useCalendarCell, useDrop as $kF5Av$useDrop, useProgressBar as $kF5Av$useProgressBar, useTabList as $kF5Av$useTabList, useTab as $kF5Av$useTab, useTabPanel as $kF5Av$useTabPanel, useHover as $kF5Av$useHover, usePress as $kF5Av$usePress, useSwitch as $kF5Av$useSwitch, useMenuTrigger as $kF5Av$useMenuTrigger, useMenu as $kF5Av$useMenu, useMenuSection as $kF5Av$useMenuSection, useMenuItem as $kF5Av$useMenuItem, useTable as $kF5Av$useTable, useTableRowGroup as $kF5Av$useTableRowGroup, useTableHeaderRow as $kF5Av$useTableHeaderRow, useTableColumnHeader as $kF5Av$useTableColumnHeader, useTableRow as $kF5Av$useTableRow, useTableCell as $kF5Av$useTableCell, useTableSelectionCheckbox as $kF5Av$useTableSelectionCheckbox, useTableSelectAllCheckbox as $kF5Av$useTableSelectAllCheckbox, useModalOverlay as $kF5Av$useModalOverlay, useDialog as $kF5Av$useDialog} from "react-aria";
|
|
6
6
|
import {HiChevronUp as $kF5Av$HiChevronUp, HiChevronDown as $kF5Av$HiChevronDown, HiSelector as $kF5Av$HiSelector, HiOutlineCalendar as $kF5Av$HiOutlineCalendar, HiChevronLeft as $kF5Av$HiChevronLeft, HiChevronRight as $kF5Av$HiChevronRight, HiOutlineDocumentAdd as $kF5Av$HiOutlineDocumentAdd, HiOutlineCheckCircle as $kF5Av$HiOutlineCheckCircle, HiOutlineTrash as $kF5Av$HiOutlineTrash, HiOutlineExclamationCircle as $kF5Av$HiOutlineExclamationCircle, HiOutlineRefresh as $kF5Av$HiOutlineRefresh, HiOutlinePaperClip as $kF5Av$HiOutlinePaperClip, HiCheck as $kF5Av$HiCheck, HiOutlineGlobe as $kF5Av$HiOutlineGlobe, HiOutlineCurrencyDollar as $kF5Av$HiOutlineCurrencyDollar, HiOutlineGlobeAlt as $kF5Av$HiOutlineGlobeAlt, HiOutlineArchive as $kF5Av$HiOutlineArchive, HiOutlineAnnotation as $kF5Av$HiOutlineAnnotation, HiOutlineFire as $kF5Av$HiOutlineFire, HiOutlineBadgeCheck as $kF5Av$HiOutlineBadgeCheck, HiOutlineSparkles as $kF5Av$HiOutlineSparkles, HiOutlineSpeakerphone as $kF5Av$HiOutlineSpeakerphone, HiOutlineCreditCard as $kF5Av$HiOutlineCreditCard, HiOutlineHeart as $kF5Av$HiOutlineHeart, HiOutlineLocationMarker as $kF5Av$HiOutlineLocationMarker, HiOutlineCursorClick as $kF5Av$HiOutlineCursorClick, HiOutlineLightningBolt as $kF5Av$HiOutlineLightningBolt, HiOutlineDocumentDownload as $kF5Av$HiOutlineDocumentDownload, HiOutlineTag as $kF5Av$HiOutlineTag, HiOutlineAtSymbol as $kF5Av$HiOutlineAtSymbol, HiOutlineUserCircle as $kF5Av$HiOutlineUserCircle, HiOutlineTerminal as $kF5Av$HiOutlineTerminal, HiOutlineMoon as $kF5Av$HiOutlineMoon, HiSortAscending as $kF5Av$HiSortAscending, HiSortDescending as $kF5Av$HiSortDescending} from "react-icons/hi";
|
|
7
7
|
import {useNumberFieldState as $kF5Av$useNumberFieldState, useToggleState as $kF5Av$useToggleState, useCheckboxGroupState as $kF5Av$useCheckboxGroupState, useRadioGroupState as $kF5Av$useRadioGroupState, useSelectState as $kF5Av$useSelectState, Item as $kF5Av$Item, useListState as $kF5Av$useListState, useDatePickerState as $kF5Av$useDatePickerState, useDateFieldState as $kF5Av$useDateFieldState, useCalendarState as $kF5Av$useCalendarState, useTabListState as $kF5Av$useTabListState, useMenuTriggerState as $kF5Av$useMenuTriggerState, useTreeState as $kF5Av$useTreeState, useTableState as $kF5Av$useTableState, TableHeader as $kF5Av$TableHeader, TableBody as $kF5Av$TableBody, Column as $kF5Av$Column, Row as $kF5Av$Row, Cell as $kF5Av$Cell, useOverlayTriggerState as $kF5Av$useOverlayTriggerState} from "react-stately";
|
|
8
8
|
import {createCalendar as $kF5Av$createCalendar, endOfMonth as $kF5Av$endOfMonth, getWeeksInMonth as $kF5Av$getWeeksInMonth, isSameMonth as $kF5Av$isSameMonth, CalendarDate as $kF5Av$CalendarDate} from "@internationalized/date";
|
|
@@ -1110,7 +1110,7 @@ function $22d93d8ad1e2d08d$export$ccdcc3b9d72a654(color, variant) {
|
|
|
1110
1110
|
background: "transparent",
|
|
1111
1111
|
color: `$${color}11`,
|
|
1112
1112
|
fill: `$${color}11`,
|
|
1113
|
-
border: `
|
|
1113
|
+
border: `1px solid $${color}5`,
|
|
1114
1114
|
"&:focus": {
|
|
1115
1115
|
boxShadow: $22d93d8ad1e2d08d$export$71074ab0ed740397(color)
|
|
1116
1116
|
}
|
|
@@ -1494,8 +1494,8 @@ const $f8db34c11dd03189$var$Socket = (0, $9ade691eb9e41cfb$export$3817b7a54a07ce
|
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
1496
|
});
|
|
1497
|
-
|
|
1498
|
-
return /*#__PURE__*/ (0, $kF5Av$jsxs)((0, $
|
|
1497
|
+
function $f8db34c11dd03189$var$Sockets({ append: append , prepend: prepend , children: children }) {
|
|
1498
|
+
return /*#__PURE__*/ (0, $kF5Av$jsxs)((0, $kF5Av$Fragment), {
|
|
1499
1499
|
children: [
|
|
1500
1500
|
prepend && /*#__PURE__*/ (0, $kF5Av$jsx)($f8db34c11dd03189$var$Socket, {
|
|
1501
1501
|
side: "left",
|
|
@@ -1510,15 +1510,82 @@ const $f8db34c11dd03189$var$Sockets = /*#__PURE__*/ (0, $kF5Av$react).forwardRef
|
|
|
1510
1510
|
})
|
|
1511
1511
|
]
|
|
1512
1512
|
});
|
|
1513
|
-
}
|
|
1514
|
-
$f8db34c11dd03189$var$Sockets.displayName = "Sockets";
|
|
1513
|
+
}
|
|
1515
1514
|
var $f8db34c11dd03189$export$2e2bcd8739ae039 = $f8db34c11dd03189$var$Sockets;
|
|
1516
1515
|
|
|
1517
1516
|
|
|
1518
1517
|
|
|
1519
1518
|
|
|
1520
1519
|
|
|
1521
|
-
|
|
1520
|
+
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
|
|
1524
|
+
const $aca95339810194aa$export$30d85e96e785900a = (0, $9ade691eb9e41cfb$export$3817b7a54a07cec7)((0, $391d62e0590dec97$export$2e2bcd8739ae039), {
|
|
1525
|
+
variants: {
|
|
1526
|
+
compact: {
|
|
1527
|
+
true: {
|
|
1528
|
+
".space-item:not(.space-item-first, .space-item-last)": {
|
|
1529
|
+
borderRadius: 0
|
|
1530
|
+
},
|
|
1531
|
+
".space-item:not(.space-item-end)": {
|
|
1532
|
+
marginInlineEnd: -1
|
|
1533
|
+
},
|
|
1534
|
+
".space-item-first": {
|
|
1535
|
+
borderStartEndRadius: 0,
|
|
1536
|
+
borderEndEndRadius: 0
|
|
1537
|
+
},
|
|
1538
|
+
".space-item-last": {
|
|
1539
|
+
borderStartStartRadius: 0,
|
|
1540
|
+
borderEndStartRadius: 0
|
|
1541
|
+
},
|
|
1542
|
+
".compact-item-wrapper-adjust": {
|
|
1543
|
+
marginInlineEnd: -1
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
});
|
|
1549
|
+
const $aca95339810194aa$var$SpaceContext = /*#__PURE__*/ $kF5Av$createContext({
|
|
1550
|
+
classNames: {},
|
|
1551
|
+
compactItemWrapperAdjust: ""
|
|
1552
|
+
});
|
|
1553
|
+
function $aca95339810194aa$export$eef1e68107c58ef2({ children: children , compact: compact , gap: gap , ...props }) {
|
|
1554
|
+
const childrenCount = $kF5Av$Children.count(children);
|
|
1555
|
+
const nodes = $kF5Av$useMemo(()=>{
|
|
1556
|
+
return $kF5Av$Children.map(children, (child, index)=>{
|
|
1557
|
+
const isFirstChild = index == 0;
|
|
1558
|
+
const isLastChild = index == childrenCount - 1;
|
|
1559
|
+
if (!/*#__PURE__*/ $kF5Av$isValidElement(child)) return null;
|
|
1560
|
+
return /*#__PURE__*/ (0, $kF5Av$jsx)($aca95339810194aa$var$SpaceContext.Provider, {
|
|
1561
|
+
value: {
|
|
1562
|
+
classNames: {
|
|
1563
|
+
"space-item-first": isFirstChild,
|
|
1564
|
+
"space-item-last": isLastChild,
|
|
1565
|
+
"space-item": true
|
|
1566
|
+
},
|
|
1567
|
+
compactItemWrapperAdjust: isLastChild ? "" : "compact-item-wrapper-adjust"
|
|
1568
|
+
},
|
|
1569
|
+
children: child
|
|
1570
|
+
});
|
|
1571
|
+
});
|
|
1572
|
+
}, []);
|
|
1573
|
+
const realGap = compact ? undefined : gap;
|
|
1574
|
+
return /*#__PURE__*/ (0, $kF5Av$jsx)($aca95339810194aa$export$30d85e96e785900a, {
|
|
1575
|
+
gap: realGap,
|
|
1576
|
+
...props,
|
|
1577
|
+
compact: compact,
|
|
1578
|
+
children: nodes
|
|
1579
|
+
});
|
|
1580
|
+
}
|
|
1581
|
+
function $aca95339810194aa$export$450c36e0b0e62ccd() {
|
|
1582
|
+
return $kF5Av$useContext($aca95339810194aa$var$SpaceContext);
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
|
|
1586
|
+
|
|
1587
|
+
const $61dde3060428563f$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, $kF5Av$react).forwardRef(({ label: label , error: error , appearance: appearance , size: size , shape: shape , append: append , prepend: prepend , description: description , css: css , isDisabled: isDisabled , validationStatus: validationStatus , className: className , ...props }, ref)=>{
|
|
1588
|
+
const space = (0, $aca95339810194aa$export$450c36e0b0e62ccd)();
|
|
1522
1589
|
const inputRef = (0, $kF5Av$react).useRef(null);
|
|
1523
1590
|
const { labelProps: labelProps , inputProps: inputProps , errorMessageProps: errorMessageProps , descriptionProps: descriptionProps } = (0, $kF5Av$useTextField)({
|
|
1524
1591
|
...props,
|
|
@@ -1540,7 +1607,15 @@ const $61dde3060428563f$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, $kF5Av$react
|
|
|
1540
1607
|
function captureFocus() {
|
|
1541
1608
|
inputRef.current?.focus();
|
|
1542
1609
|
}
|
|
1610
|
+
const commonProps = {
|
|
1611
|
+
className: (0, $625847aeb8796968$export$a274e22fb40f762e)({
|
|
1612
|
+
"input-wrapper": true,
|
|
1613
|
+
[className ?? ""]: !!className,
|
|
1614
|
+
...space.classNames
|
|
1615
|
+
})
|
|
1616
|
+
};
|
|
1543
1617
|
return /*#__PURE__*/ (0, $kF5Av$jsxs)((0, $391d62e0590dec97$export$2e2bcd8739ae039), {
|
|
1618
|
+
className: space.compactItemWrapperAdjust,
|
|
1544
1619
|
css: css,
|
|
1545
1620
|
stack: true,
|
|
1546
1621
|
ref: ref,
|
|
@@ -1552,10 +1627,12 @@ const $61dde3060428563f$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, $kF5Av$react
|
|
|
1552
1627
|
children: label
|
|
1553
1628
|
}),
|
|
1554
1629
|
!hasAddOns && /*#__PURE__*/ (0, $kF5Av$jsx)((0, $9158bbabd058e6d9$export$a195049fd73b3fe2), {
|
|
1630
|
+
...commonProps,
|
|
1555
1631
|
...variantProps,
|
|
1556
1632
|
...inputProps
|
|
1557
1633
|
}),
|
|
1558
1634
|
hasAddOns && /*#__PURE__*/ (0, $kF5Av$jsx)((0, $9158bbabd058e6d9$export$479bffa770f4fc8b), {
|
|
1635
|
+
...commonProps,
|
|
1559
1636
|
onClick: captureFocus,
|
|
1560
1637
|
hasPrependComponent: !!prepend,
|
|
1561
1638
|
...variantProps,
|
|
@@ -1616,6 +1693,12 @@ const $6be0cf1a8e0dd120$export$303ef672e091d99 = (0, $9ade691eb9e41cfb$export$db
|
|
|
1616
1693
|
pointerEvents: "none"
|
|
1617
1694
|
},
|
|
1618
1695
|
variants: {
|
|
1696
|
+
isIconButton: {
|
|
1697
|
+
true: {
|
|
1698
|
+
width: "$$button-base-height",
|
|
1699
|
+
px: 0
|
|
1700
|
+
}
|
|
1701
|
+
},
|
|
1619
1702
|
appearance: {
|
|
1620
1703
|
unstyled: {
|
|
1621
1704
|
background: "none",
|
|
@@ -1636,6 +1719,9 @@ const $6be0cf1a8e0dd120$export$303ef672e091d99 = (0, $9ade691eb9e41cfb$export$db
|
|
|
1636
1719
|
sharp: {},
|
|
1637
1720
|
round: {
|
|
1638
1721
|
borderRadius: "calc($$button-base-height / 4)"
|
|
1722
|
+
},
|
|
1723
|
+
circle: {
|
|
1724
|
+
borderRadius: "50%"
|
|
1639
1725
|
}
|
|
1640
1726
|
},
|
|
1641
1727
|
size: {
|
|
@@ -1748,33 +1834,138 @@ $8eafe9f534066907$export$3b0d6d7590275603.displayName = "Loader";
|
|
|
1748
1834
|
|
|
1749
1835
|
|
|
1750
1836
|
|
|
1751
|
-
|
|
1837
|
+
|
|
1838
|
+
|
|
1839
|
+
|
|
1840
|
+
|
|
1841
|
+
|
|
1842
|
+
function $5c7d398903852591$export$30a06c8d3562193f(object, keys) {
|
|
1843
|
+
return Object.keys(object).reduce((obj, key)=>{
|
|
1844
|
+
if (keys.includes(key)) return {
|
|
1845
|
+
...obj
|
|
1846
|
+
};
|
|
1847
|
+
return {
|
|
1848
|
+
...obj,
|
|
1849
|
+
[key]: object[key]
|
|
1850
|
+
};
|
|
1851
|
+
}, {});
|
|
1852
|
+
}
|
|
1853
|
+
function $5c7d398903852591$export$357523c63a2253b9(object, keys) {
|
|
1854
|
+
// TODO handle invalid objects properly
|
|
1855
|
+
if (!object) return {};
|
|
1856
|
+
return Object.keys(object).reduce((obj, key)=>{
|
|
1857
|
+
if (keys.includes(key)) return {
|
|
1858
|
+
...obj,
|
|
1859
|
+
[key]: object[key]
|
|
1860
|
+
};
|
|
1861
|
+
return {
|
|
1862
|
+
...obj
|
|
1863
|
+
};
|
|
1864
|
+
}, {});
|
|
1865
|
+
}
|
|
1866
|
+
function $5c7d398903852591$export$65980d18b75784e2(object, keys) {
|
|
1867
|
+
const picked = $5c7d398903852591$export$357523c63a2253b9(object, keys);
|
|
1868
|
+
const omitted = $5c7d398903852591$export$30a06c8d3562193f(object, keys);
|
|
1869
|
+
return [
|
|
1870
|
+
picked,
|
|
1871
|
+
omitted
|
|
1872
|
+
];
|
|
1873
|
+
}
|
|
1874
|
+
function $5c7d398903852591$export$d2dae087199d2383(object) {
|
|
1875
|
+
return Object.keys(object).reduce((obj, key)=>{
|
|
1876
|
+
if (object[key] == null) return {
|
|
1877
|
+
...obj
|
|
1878
|
+
};
|
|
1879
|
+
return {
|
|
1880
|
+
...obj,
|
|
1881
|
+
[key]: object[key]
|
|
1882
|
+
};
|
|
1883
|
+
}, {});
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
|
|
1887
|
+
const $d0e2bb45064e4ad9$var$ButtonGroupContext = /*#__PURE__*/ $kF5Av$createContext({});
|
|
1888
|
+
function $d0e2bb45064e4ad9$export$69b1032f2ecdf404({ color: color , variant: variant , size: size , compact: compact , shape: shape , gap: gap , children: children , idleColor: idleColor , activeColor: activeColor , idleVariant: idleVariant , activeVariant: activeVariant , isToggle: isToggle }) {
|
|
1889
|
+
const cleanProps = (0, $5c7d398903852591$export$d2dae087199d2383)({
|
|
1890
|
+
color: color,
|
|
1891
|
+
variant: variant,
|
|
1892
|
+
size: size,
|
|
1893
|
+
shape: shape,
|
|
1894
|
+
idleColor: idleColor,
|
|
1895
|
+
activeColor: activeColor,
|
|
1896
|
+
idleVariant: idleVariant,
|
|
1897
|
+
activeVariant: activeVariant,
|
|
1898
|
+
isToggle: isToggle
|
|
1899
|
+
});
|
|
1900
|
+
return /*#__PURE__*/ (0, $kF5Av$jsx)($d0e2bb45064e4ad9$var$ButtonGroupContext.Provider, {
|
|
1901
|
+
value: cleanProps,
|
|
1902
|
+
children: /*#__PURE__*/ (0, $kF5Av$jsx)((0, $aca95339810194aa$export$eef1e68107c58ef2), {
|
|
1903
|
+
gap: gap,
|
|
1904
|
+
compact: compact,
|
|
1905
|
+
children: children
|
|
1906
|
+
})
|
|
1907
|
+
});
|
|
1908
|
+
}
|
|
1909
|
+
function $d0e2bb45064e4ad9$export$749e21be8b14b968() {
|
|
1910
|
+
return $kF5Av$useContext($d0e2bb45064e4ad9$var$ButtonGroupContext);
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
|
|
1914
|
+
|
|
1915
|
+
|
|
1916
|
+
const $59636f06ede7befa$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $kF5Av$react).forwardRef((props, ref)=>{
|
|
1917
|
+
const space = (0, $aca95339810194aa$export$450c36e0b0e62ccd)();
|
|
1918
|
+
const buttonGroupProps = (0, $d0e2bb45064e4ad9$export$749e21be8b14b968)();
|
|
1919
|
+
const { color: color , variant: variant , append: append , prepend: prepend , size: size = "sm" , children: children , as: as = "button" , css: css , className: className , appearance: appearance , isLoading: isLoading , shape: shape , isToggle: isToggle , activeColor: activeColor = "violet" , activeVariant: activeVariant = "solid" , idleColor: idleColor = "gray" , idleVariant: idleVariant = "outline" , isIconButton: isIconButton , ...otherProps } = {
|
|
1920
|
+
...buttonGroupProps,
|
|
1921
|
+
...props
|
|
1922
|
+
};
|
|
1923
|
+
const state = (0, $kF5Av$useToggleState)({
|
|
1924
|
+
children: children,
|
|
1925
|
+
...otherProps
|
|
1926
|
+
});
|
|
1752
1927
|
const buttonRef = (0, $kF5Av$react).useRef(null);
|
|
1753
|
-
const { buttonProps: buttonProps } = (0, $kF5Av$
|
|
1754
|
-
...
|
|
1928
|
+
const { buttonProps: buttonProps } = (0, $kF5Av$useToggleButton)({
|
|
1929
|
+
...otherProps,
|
|
1755
1930
|
elementType: as,
|
|
1756
1931
|
children: children
|
|
1757
|
-
}, buttonRef);
|
|
1932
|
+
}, state, buttonRef);
|
|
1758
1933
|
const commonProps = {
|
|
1759
|
-
className: (0, $625847aeb8796968$export$a274e22fb40f762e)(
|
|
1760
|
-
className,
|
|
1761
|
-
|
|
1762
|
-
|
|
1934
|
+
className: (0, $625847aeb8796968$export$a274e22fb40f762e)({
|
|
1935
|
+
[className ?? ""]: !!className,
|
|
1936
|
+
button: true,
|
|
1937
|
+
...space.classNames
|
|
1938
|
+
}),
|
|
1763
1939
|
css: css,
|
|
1764
1940
|
as: as,
|
|
1765
1941
|
ref: (0, $625847aeb8796968$export$c9058316764c140e)(ref, buttonRef)
|
|
1766
1942
|
};
|
|
1943
|
+
function getColor() {
|
|
1944
|
+
if (!state.isSelected && isToggle) return {
|
|
1945
|
+
color: idleColor,
|
|
1946
|
+
variant: idleVariant
|
|
1947
|
+
};
|
|
1948
|
+
if (state.isSelected && isToggle) return {
|
|
1949
|
+
color: activeColor,
|
|
1950
|
+
variant: activeVariant
|
|
1951
|
+
};
|
|
1952
|
+
return {
|
|
1953
|
+
variant: variant,
|
|
1954
|
+
color: color
|
|
1955
|
+
};
|
|
1956
|
+
}
|
|
1767
1957
|
if (appearance === "unstyled") return /*#__PURE__*/ (0, $kF5Av$jsx)((0, $6be0cf1a8e0dd120$export$3167f6ecaaaa3457), {
|
|
1768
1958
|
...commonProps,
|
|
1769
1959
|
...buttonProps,
|
|
1770
1960
|
children: children
|
|
1771
1961
|
});
|
|
1772
1962
|
return /*#__PURE__*/ (0, $kF5Av$jsx)((0, $6be0cf1a8e0dd120$export$2d5d2ba3c7c8c40b), {
|
|
1963
|
+
isIconButton: isIconButton,
|
|
1773
1964
|
shape: shape,
|
|
1774
1965
|
"data-loading": isLoading,
|
|
1775
1966
|
"aria-busy": isLoading,
|
|
1776
|
-
color: color,
|
|
1777
|
-
variant: variant,
|
|
1967
|
+
color: getColor().color,
|
|
1968
|
+
variant: getColor().variant,
|
|
1778
1969
|
size: size,
|
|
1779
1970
|
...commonProps,
|
|
1780
1971
|
...buttonProps,
|
|
@@ -1801,75 +1992,17 @@ const $59636f06ede7befa$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $kF5Av$react
|
|
|
1801
1992
|
});
|
|
1802
1993
|
});
|
|
1803
1994
|
$59636f06ede7befa$export$353f5b6fc5456de1.displayName = "Button";
|
|
1995
|
+
$59636f06ede7befa$export$353f5b6fc5456de1.Group = (0, $d0e2bb45064e4ad9$export$69b1032f2ecdf404);
|
|
1804
1996
|
|
|
1805
1997
|
|
|
1806
1998
|
|
|
1807
1999
|
|
|
1808
2000
|
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
display: "inline-flex",
|
|
1814
|
-
alignItems: "center",
|
|
1815
|
-
justifyContent: "center",
|
|
1816
|
-
overflow: "hidden",
|
|
1817
|
-
fontFamily: "$sans",
|
|
1818
|
-
boxSizing: "border-box",
|
|
1819
|
-
outline: "none",
|
|
1820
|
-
border: "none",
|
|
1821
|
-
padding: 0,
|
|
1822
|
-
flexShrink: 0,
|
|
1823
|
-
defaultVariants: {
|
|
1824
|
-
size: "md",
|
|
1825
|
-
shape: "circle"
|
|
1826
|
-
},
|
|
1827
|
-
variants: {
|
|
1828
|
-
shape: {
|
|
1829
|
-
circle: {
|
|
1830
|
-
borderRadius: "50% !important"
|
|
1831
|
-
},
|
|
1832
|
-
square: {}
|
|
1833
|
-
},
|
|
1834
|
-
size: {
|
|
1835
|
-
xs: {
|
|
1836
|
-
size: 24,
|
|
1837
|
-
borderRadius: 6
|
|
1838
|
-
},
|
|
1839
|
-
sm: {
|
|
1840
|
-
size: 32,
|
|
1841
|
-
borderRadius: 6
|
|
1842
|
-
},
|
|
1843
|
-
md: {
|
|
1844
|
-
size: 40,
|
|
1845
|
-
borderRadius: 6
|
|
1846
|
-
},
|
|
1847
|
-
lg: {
|
|
1848
|
-
size: 48,
|
|
1849
|
-
borderRadius: 8
|
|
1850
|
-
},
|
|
1851
|
-
xl: {
|
|
1852
|
-
size: 56,
|
|
1853
|
-
borderRadius: 8
|
|
1854
|
-
}
|
|
1855
|
-
}
|
|
1856
|
-
}
|
|
1857
|
-
});
|
|
1858
|
-
const $39ebe5a116c39d6c$export$c25acd513dcc8062 = /*#__PURE__*/ $kF5Av$forwardRef(({ color: color = "violet" , variant: variant = "solid" , as: as = "button" , css: css , size: size , shape: shape , ...props }, ref)=>{
|
|
1859
|
-
const buttonRef = $kF5Av$useRef(null);
|
|
1860
|
-
const { buttonProps: buttonProps } = (0, $kF5Av$useButton)({
|
|
2001
|
+
const $39ebe5a116c39d6c$export$c25acd513dcc8062 = /*#__PURE__*/ $kF5Av$forwardRef((props, ref)=>{
|
|
2002
|
+
return /*#__PURE__*/ (0, $kF5Av$jsx)((0, $59636f06ede7befa$export$353f5b6fc5456de1), {
|
|
2003
|
+
isIconButton: true,
|
|
2004
|
+
ref: ref,
|
|
1861
2005
|
...props,
|
|
1862
|
-
elementType: as
|
|
1863
|
-
}, buttonRef);
|
|
1864
|
-
return /*#__PURE__*/ (0, $kF5Av$jsx)($39ebe5a116c39d6c$var$StyledButton, {
|
|
1865
|
-
as: as,
|
|
1866
|
-
shape: shape,
|
|
1867
|
-
size: size,
|
|
1868
|
-
variant: variant,
|
|
1869
|
-
color: color,
|
|
1870
|
-
ref: (0, $625847aeb8796968$export$c9058316764c140e)(buttonRef, ref),
|
|
1871
|
-
css: css,
|
|
1872
|
-
...buttonProps,
|
|
1873
2006
|
children: props.children
|
|
1874
2007
|
});
|
|
1875
2008
|
});
|
|
@@ -1883,6 +2016,8 @@ $39ebe5a116c39d6c$export$c25acd513dcc8062.displayName = "IconButton";
|
|
|
1883
2016
|
|
|
1884
2017
|
|
|
1885
2018
|
|
|
2019
|
+
|
|
2020
|
+
|
|
1886
2021
|
const $a625eab1563a2126$var$Wrapper = (0, $9ade691eb9e41cfb$export$3817b7a54a07cec7)("div", {
|
|
1887
2022
|
position: "relative",
|
|
1888
2023
|
width: "100%"
|
|
@@ -1933,7 +2068,8 @@ const $a625eab1563a2126$var$Steppers = (0, $9ade691eb9e41cfb$export$3817b7a54a07
|
|
|
1933
2068
|
}
|
|
1934
2069
|
});
|
|
1935
2070
|
const $a625eab1563a2126$export$6bf0cd3a219bbade = /*#__PURE__*/ (0, $kF5Av$react).forwardRef((props, ref)=>{
|
|
1936
|
-
const { error: error , label: label , description: description , appearance: appearance , size: size , append: append , hideSteppers: hideSteppers } = props;
|
|
2071
|
+
const { error: error , label: label , description: description , appearance: appearance , size: size , append: append , hideSteppers: hideSteppers , css: css } = props;
|
|
2072
|
+
const space = (0, $aca95339810194aa$export$450c36e0b0e62ccd)();
|
|
1937
2073
|
const { locale: locale } = (0, $kF5Av$useLocale)();
|
|
1938
2074
|
const state = (0, $kF5Av$useNumberFieldState)({
|
|
1939
2075
|
...props,
|
|
@@ -1943,6 +2079,8 @@ const $a625eab1563a2126$export$6bf0cd3a219bbade = /*#__PURE__*/ (0, $kF5Av$react
|
|
|
1943
2079
|
const { labelProps: labelProps , groupProps: groupProps , inputProps: inputProps , incrementButtonProps: incrementButtonProps , decrementButtonProps: decrementButtonProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $kF5Av$useNumberField)(props, state, inputRef);
|
|
1944
2080
|
//TODO clean up append and prepend component placement and positioning
|
|
1945
2081
|
return /*#__PURE__*/ (0, $kF5Av$jsxs)((0, $391d62e0590dec97$export$2e2bcd8739ae039), {
|
|
2082
|
+
css: css,
|
|
2083
|
+
className: space.compactItemWrapperAdjust,
|
|
1946
2084
|
stack: true,
|
|
1947
2085
|
gap: 1,
|
|
1948
2086
|
children: [
|
|
@@ -1955,6 +2093,10 @@ const $a625eab1563a2126$export$6bf0cd3a219bbade = /*#__PURE__*/ (0, $kF5Av$react
|
|
|
1955
2093
|
ref: ref,
|
|
1956
2094
|
children: [
|
|
1957
2095
|
/*#__PURE__*/ (0, $kF5Av$jsx)((0, $9158bbabd058e6d9$export$a195049fd73b3fe2), {
|
|
2096
|
+
className: (0, $625847aeb8796968$export$a274e22fb40f762e)({
|
|
2097
|
+
"number-input": true,
|
|
2098
|
+
...space.classNames
|
|
2099
|
+
}),
|
|
1958
2100
|
hasError: !!error,
|
|
1959
2101
|
appearance: appearance,
|
|
1960
2102
|
size: size,
|
|
@@ -2800,7 +2942,10 @@ $c4793c1ed42b26da$export$5b6b19405a83ff9d.displayName = "Popover";
|
|
|
2800
2942
|
|
|
2801
2943
|
|
|
2802
2944
|
|
|
2945
|
+
|
|
2946
|
+
|
|
2803
2947
|
const $604e914a624d5a0f$export$cd0225d99c675387 = /*#__PURE__*/ (0, $kF5Av$react).forwardRef((props, ref)=>{
|
|
2948
|
+
const space = (0, $aca95339810194aa$export$450c36e0b0e62ccd)();
|
|
2804
2949
|
const { renderValue: renderValue , renderOption: renderOption , placeholder: placeholder = "Select an option" , appearance: appearance , size: size , css: css , labelKey: labelKey , label: label } = props;
|
|
2805
2950
|
const state = (0, $kF5Av$useSelectState)(props);
|
|
2806
2951
|
const selectRef = (0, $kF5Av$react).useRef(null);
|
|
@@ -2809,6 +2954,7 @@ const $604e914a624d5a0f$export$cd0225d99c675387 = /*#__PURE__*/ (0, $kF5Av$react
|
|
|
2809
2954
|
const { focusProps: focusProps , isFocused: isFocused } = (0, $kF5Av$useFocusRing)();
|
|
2810
2955
|
const hasSelection = state.selectedItem != null;
|
|
2811
2956
|
return /*#__PURE__*/ (0, $kF5Av$jsxs)((0, $391d62e0590dec97$export$2e2bcd8739ae039), {
|
|
2957
|
+
className: space.compactItemWrapperAdjust,
|
|
2812
2958
|
stretchX: true,
|
|
2813
2959
|
css: css,
|
|
2814
2960
|
position: "relative",
|
|
@@ -2828,6 +2974,10 @@ const $604e914a624d5a0f$export$cd0225d99c675387 = /*#__PURE__*/ (0, $kF5Av$react
|
|
|
2828
2974
|
name: props.name
|
|
2829
2975
|
}),
|
|
2830
2976
|
/*#__PURE__*/ (0, $kF5Av$jsxs)((0, $8f062ce7b62fd0a2$export$3ac1e88a1c0b9f1), {
|
|
2977
|
+
className: (0, $625847aeb8796968$export$a274e22fb40f762e)({
|
|
2978
|
+
"select-trigger": true,
|
|
2979
|
+
...space.classNames
|
|
2980
|
+
}),
|
|
2831
2981
|
type: "button",
|
|
2832
2982
|
"data-focused": isFocused,
|
|
2833
2983
|
appearance: appearance,
|
|
@@ -3035,39 +3185,6 @@ $bb9dfe97a38c22dd$export$d9781c7894a82487.displayName = "DateField";
|
|
|
3035
3185
|
|
|
3036
3186
|
|
|
3037
3187
|
|
|
3038
|
-
function $5c7d398903852591$export$30a06c8d3562193f(object, keys) {
|
|
3039
|
-
return Object.keys(object).reduce((obj, key)=>{
|
|
3040
|
-
if (keys.includes(key)) return {
|
|
3041
|
-
...obj
|
|
3042
|
-
};
|
|
3043
|
-
return {
|
|
3044
|
-
...obj,
|
|
3045
|
-
[key]: object[key]
|
|
3046
|
-
};
|
|
3047
|
-
}, {});
|
|
3048
|
-
}
|
|
3049
|
-
function $5c7d398903852591$export$357523c63a2253b9(object, keys) {
|
|
3050
|
-
// TODO handle invalid objects properly
|
|
3051
|
-
if (!object) return {};
|
|
3052
|
-
return Object.keys(object).reduce((obj, key)=>{
|
|
3053
|
-
if (keys.includes(key)) return {
|
|
3054
|
-
...obj,
|
|
3055
|
-
[key]: object[key]
|
|
3056
|
-
};
|
|
3057
|
-
return {
|
|
3058
|
-
...obj
|
|
3059
|
-
};
|
|
3060
|
-
}, {});
|
|
3061
|
-
}
|
|
3062
|
-
function $5c7d398903852591$export$65980d18b75784e2(object, keys) {
|
|
3063
|
-
const picked = $5c7d398903852591$export$357523c63a2253b9(object, keys);
|
|
3064
|
-
const omitted = $5c7d398903852591$export$30a06c8d3562193f(object, keys);
|
|
3065
|
-
return [
|
|
3066
|
-
picked,
|
|
3067
|
-
omitted
|
|
3068
|
-
];
|
|
3069
|
-
}
|
|
3070
|
-
|
|
3071
3188
|
|
|
3072
3189
|
function $80dfb6e58ec8ad02$export$d02631cccf789723(start = 0, end, step = 1) {
|
|
3073
3190
|
const result = [];
|
|
@@ -3112,7 +3229,7 @@ const $dcb2850cb2ddaca2$export$e1aef45b828286de = /*#__PURE__*/ $kF5Av$forwardRe
|
|
|
3112
3229
|
className: "header",
|
|
3113
3230
|
children: [
|
|
3114
3231
|
/*#__PURE__*/ (0, $kF5Av$jsx)((0, $39ebe5a116c39d6c$export$c25acd513dcc8062), {
|
|
3115
|
-
shape: "
|
|
3232
|
+
shape: "sharp",
|
|
3116
3233
|
size: "xs",
|
|
3117
3234
|
color: "white",
|
|
3118
3235
|
...prevButtonProps,
|
|
@@ -3128,7 +3245,7 @@ const $dcb2850cb2ddaca2$export$e1aef45b828286de = /*#__PURE__*/ $kF5Av$forwardRe
|
|
|
3128
3245
|
children: title
|
|
3129
3246
|
}),
|
|
3130
3247
|
/*#__PURE__*/ (0, $kF5Av$jsx)((0, $39ebe5a116c39d6c$export$c25acd513dcc8062), {
|
|
3131
|
-
shape: "
|
|
3248
|
+
shape: "sharp",
|
|
3132
3249
|
size: "xs",
|
|
3133
3250
|
color: "white",
|
|
3134
3251
|
...nextButtonProps,
|
|
@@ -3230,9 +3347,12 @@ function $774063d921c2c189$export$85930906f541ddb8(date) {
|
|
|
3230
3347
|
}
|
|
3231
3348
|
|
|
3232
3349
|
|
|
3350
|
+
|
|
3351
|
+
|
|
3233
3352
|
const $8370e4d32f002899$export$5109c6dd95d8fb00 = /*#__PURE__*/ $kF5Av$forwardRef(({ appearance: appearance = "filled" , size: size = "md" , css: css , numberOfMonths: numberOfMonths , value: value , onChange: onChange , defaultValue: defaultValue , dropdownIcon: dropdownIcon = /*#__PURE__*/ (0, $kF5Av$jsx)((0, $kF5Av$HiOutlineCalendar), {
|
|
3234
3353
|
size: 16
|
|
3235
3354
|
}) , ...props }, ref)=>{
|
|
3355
|
+
const space = (0, $aca95339810194aa$export$450c36e0b0e62ccd)();
|
|
3236
3356
|
function _onChange(date) {
|
|
3237
3357
|
onChange?.(new Date(date.year, date.month, date.day), date);
|
|
3238
3358
|
}
|
|
@@ -3256,6 +3376,8 @@ const $8370e4d32f002899$export$5109c6dd95d8fb00 = /*#__PURE__*/ $kF5Av$forwardRe
|
|
|
3256
3376
|
const pickerRef = $kF5Av$useRef(null);
|
|
3257
3377
|
const { groupProps: groupProps , calendarProps: calendarProps , fieldProps: fieldProps , buttonProps: buttonProps , errorMessageProps: errorMessageProps , labelProps: labelProps } = (0, $kF5Av$useDatePicker)(newPropsWithProxies, state, pickerRef);
|
|
3258
3378
|
return /*#__PURE__*/ (0, $kF5Av$jsxs)((0, $391d62e0590dec97$export$2e2bcd8739ae039), {
|
|
3379
|
+
className: space.compactItemWrapperAdjust,
|
|
3380
|
+
css: css,
|
|
3259
3381
|
stretchX: true,
|
|
3260
3382
|
stack: true,
|
|
3261
3383
|
gap: 1,
|
|
@@ -3267,12 +3389,15 @@ const $8370e4d32f002899$export$5109c6dd95d8fb00 = /*#__PURE__*/ $kF5Av$forwardRe
|
|
|
3267
3389
|
/*#__PURE__*/ (0, $kF5Av$jsxs)((0, $391d62e0590dec97$export$2e2bcd8739ae039), {
|
|
3268
3390
|
ref: ref,
|
|
3269
3391
|
gap: 10,
|
|
3270
|
-
css: css,
|
|
3271
3392
|
stretchX: true,
|
|
3272
3393
|
inline: true,
|
|
3273
3394
|
stack: true,
|
|
3274
3395
|
children: [
|
|
3275
3396
|
/*#__PURE__*/ (0, $kF5Av$jsxs)((0, $83078af43f67af46$export$79e84280796e5e38), {
|
|
3397
|
+
className: (0, $625847aeb8796968$export$a274e22fb40f762e)({
|
|
3398
|
+
"date-picker-trigger": true,
|
|
3399
|
+
...space.classNames
|
|
3400
|
+
}),
|
|
3276
3401
|
ref: pickerRef,
|
|
3277
3402
|
justify: "between",
|
|
3278
3403
|
align: "center",
|
|
@@ -5104,5 +5229,6 @@ $9da3b07c262d31a5$export$2b77a92f1a5ad772.useModal = $9da3b07c262d31a5$export$33
|
|
|
5104
5229
|
|
|
5105
5230
|
|
|
5106
5231
|
|
|
5107
|
-
|
|
5232
|
+
|
|
5233
|
+
export {$d22d8a7881f7b33f$export$2e2bcd8739ae039 as Box, $07781ffe9a5ae30b$export$ef2184bd89960b14 as Grid, $07781ffe9a5ae30b$export$9eb849b9b922d396 as GridItem, $f09084fde7cc0470$export$2e2bcd8739ae039 as Column, $391d62e0590dec97$export$2e2bcd8739ae039 as Flex, $61dde3060428563f$export$f5b8910cec6cf069 as Input, $4fdef5d0844b7575$export$2e2bcd8739ae039 as Text, $7f7599719bb2a749$export$379139ebc1c2b235 as Textarea, $59636f06ede7befa$export$353f5b6fc5456de1 as Button, $39ebe5a116c39d6c$export$c25acd513dcc8062 as IconButton, $b5830f3daeb33bb2$export$48513f6b9f8ce62d as Checkbox, $5711a5825d7012d3$export$4aa08d5625cb8ead as CheckboxGroup, $b5c60232b181c4bd$export$d7b12c4107be0d61 as Radio, $b5c60232b181c4bd$export$a98f0dcb43a68a25 as RadioGroup, $f7762930a14621d8$export$f8afaea2e9656b91 as RadioCard, $604e914a624d5a0f$export$a26e8b900a29a570 as Select, $8370e4d32f002899$export$5109c6dd95d8fb00 as DatePicker, $2b3b1dc9b2ed8672$export$e2255cf6045e8d47 as Avatar, $c0386802302e82e5$export$1a5cb5295a7d2749 as FileUploader, $4724a2c0da358be5$export$1ff3c3f08ae963c0 as Separator, $12105c91de6d0b91$export$b25a304ec7d746bb as Progress, $8eafe9f534066907$export$3b0d6d7590275603 as Loader, $d20773ec72923119$export$be92b6f5f03c0fe9 as Root, $d20773ec72923119$export$6d08773d2e66f8f2 as Item, $827cce002ec16c4b$export$3288d34c523a1192 as Tag, $4fd64b5726f94f78$export$b5d5cf8927ab7262 as Switch, $fd0a1cc8c4288e44$export$dbada5ace43900dd as ColorTray, $d2eff3f3a30a8f9a$export$50e381fea3a45244 as IconTray, $ea604f064e7efbe1$export$ea98c603db73aee7 as Sticker, $b13859906e03ed0f$export$e44a253a59704894 as DropdownMenu, $40e1dcf58e198ee9$export$1aaa3deaa90ea306 as Tabs, $2c3cbfa2e31957ff$export$54ec01a60f47d33d as Table, $cdf79c1aee6c465f$export$e6a97ba2cae5bb94 as Timeline, $9da3b07c262d31a5$export$2b77a92f1a5ad772 as Modal, $aca95339810194aa$export$eef1e68107c58ef2 as Space, $9ade691eb9e41cfb$export$3817b7a54a07cec7 as parrot, $9ade691eb9e41cfb$export$bca14c5b3b88a9c9 as ParrotTheme, $9ade691eb9e41cfb$export$e506a1d27d1eaa20 as ParrotThemeConfig};
|
|
5108
5234
|
//# sourceMappingURL=module.js.map
|