@parrot-co/parrot-ui 0.0.71 → 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 +240 -112
- package/dist/main.js.map +1 -1
- package/dist/module.js +242 -115
- 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
|
}
|
|
@@ -1517,7 +1517,75 @@ var $f8db34c11dd03189$export$2e2bcd8739ae039 = $f8db34c11dd03189$var$Sockets;
|
|
|
1517
1517
|
|
|
1518
1518
|
|
|
1519
1519
|
|
|
1520
|
-
|
|
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)();
|
|
1521
1589
|
const inputRef = (0, $kF5Av$react).useRef(null);
|
|
1522
1590
|
const { labelProps: labelProps , inputProps: inputProps , errorMessageProps: errorMessageProps , descriptionProps: descriptionProps } = (0, $kF5Av$useTextField)({
|
|
1523
1591
|
...props,
|
|
@@ -1539,7 +1607,15 @@ const $61dde3060428563f$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, $kF5Av$react
|
|
|
1539
1607
|
function captureFocus() {
|
|
1540
1608
|
inputRef.current?.focus();
|
|
1541
1609
|
}
|
|
1610
|
+
const commonProps = {
|
|
1611
|
+
className: (0, $625847aeb8796968$export$a274e22fb40f762e)({
|
|
1612
|
+
"input-wrapper": true,
|
|
1613
|
+
[className ?? ""]: !!className,
|
|
1614
|
+
...space.classNames
|
|
1615
|
+
})
|
|
1616
|
+
};
|
|
1542
1617
|
return /*#__PURE__*/ (0, $kF5Av$jsxs)((0, $391d62e0590dec97$export$2e2bcd8739ae039), {
|
|
1618
|
+
className: space.compactItemWrapperAdjust,
|
|
1543
1619
|
css: css,
|
|
1544
1620
|
stack: true,
|
|
1545
1621
|
ref: ref,
|
|
@@ -1551,10 +1627,12 @@ const $61dde3060428563f$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, $kF5Av$react
|
|
|
1551
1627
|
children: label
|
|
1552
1628
|
}),
|
|
1553
1629
|
!hasAddOns && /*#__PURE__*/ (0, $kF5Av$jsx)((0, $9158bbabd058e6d9$export$a195049fd73b3fe2), {
|
|
1630
|
+
...commonProps,
|
|
1554
1631
|
...variantProps,
|
|
1555
1632
|
...inputProps
|
|
1556
1633
|
}),
|
|
1557
1634
|
hasAddOns && /*#__PURE__*/ (0, $kF5Av$jsx)((0, $9158bbabd058e6d9$export$479bffa770f4fc8b), {
|
|
1635
|
+
...commonProps,
|
|
1558
1636
|
onClick: captureFocus,
|
|
1559
1637
|
hasPrependComponent: !!prepend,
|
|
1560
1638
|
...variantProps,
|
|
@@ -1615,6 +1693,12 @@ const $6be0cf1a8e0dd120$export$303ef672e091d99 = (0, $9ade691eb9e41cfb$export$db
|
|
|
1615
1693
|
pointerEvents: "none"
|
|
1616
1694
|
},
|
|
1617
1695
|
variants: {
|
|
1696
|
+
isIconButton: {
|
|
1697
|
+
true: {
|
|
1698
|
+
width: "$$button-base-height",
|
|
1699
|
+
px: 0
|
|
1700
|
+
}
|
|
1701
|
+
},
|
|
1618
1702
|
appearance: {
|
|
1619
1703
|
unstyled: {
|
|
1620
1704
|
background: "none",
|
|
@@ -1635,6 +1719,9 @@ const $6be0cf1a8e0dd120$export$303ef672e091d99 = (0, $9ade691eb9e41cfb$export$db
|
|
|
1635
1719
|
sharp: {},
|
|
1636
1720
|
round: {
|
|
1637
1721
|
borderRadius: "calc($$button-base-height / 4)"
|
|
1722
|
+
},
|
|
1723
|
+
circle: {
|
|
1724
|
+
borderRadius: "50%"
|
|
1638
1725
|
}
|
|
1639
1726
|
},
|
|
1640
1727
|
size: {
|
|
@@ -1747,33 +1834,138 @@ $8eafe9f534066907$export$3b0d6d7590275603.displayName = "Loader";
|
|
|
1747
1834
|
|
|
1748
1835
|
|
|
1749
1836
|
|
|
1750
|
-
|
|
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
|
+
});
|
|
1751
1927
|
const buttonRef = (0, $kF5Av$react).useRef(null);
|
|
1752
|
-
const { buttonProps: buttonProps } = (0, $kF5Av$
|
|
1753
|
-
...
|
|
1928
|
+
const { buttonProps: buttonProps } = (0, $kF5Av$useToggleButton)({
|
|
1929
|
+
...otherProps,
|
|
1754
1930
|
elementType: as,
|
|
1755
1931
|
children: children
|
|
1756
|
-
}, buttonRef);
|
|
1932
|
+
}, state, buttonRef);
|
|
1757
1933
|
const commonProps = {
|
|
1758
|
-
className: (0, $625847aeb8796968$export$a274e22fb40f762e)(
|
|
1759
|
-
className,
|
|
1760
|
-
|
|
1761
|
-
|
|
1934
|
+
className: (0, $625847aeb8796968$export$a274e22fb40f762e)({
|
|
1935
|
+
[className ?? ""]: !!className,
|
|
1936
|
+
button: true,
|
|
1937
|
+
...space.classNames
|
|
1938
|
+
}),
|
|
1762
1939
|
css: css,
|
|
1763
1940
|
as: as,
|
|
1764
1941
|
ref: (0, $625847aeb8796968$export$c9058316764c140e)(ref, buttonRef)
|
|
1765
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
|
+
}
|
|
1766
1957
|
if (appearance === "unstyled") return /*#__PURE__*/ (0, $kF5Av$jsx)((0, $6be0cf1a8e0dd120$export$3167f6ecaaaa3457), {
|
|
1767
1958
|
...commonProps,
|
|
1768
1959
|
...buttonProps,
|
|
1769
1960
|
children: children
|
|
1770
1961
|
});
|
|
1771
1962
|
return /*#__PURE__*/ (0, $kF5Av$jsx)((0, $6be0cf1a8e0dd120$export$2d5d2ba3c7c8c40b), {
|
|
1963
|
+
isIconButton: isIconButton,
|
|
1772
1964
|
shape: shape,
|
|
1773
1965
|
"data-loading": isLoading,
|
|
1774
1966
|
"aria-busy": isLoading,
|
|
1775
|
-
color: color,
|
|
1776
|
-
variant: variant,
|
|
1967
|
+
color: getColor().color,
|
|
1968
|
+
variant: getColor().variant,
|
|
1777
1969
|
size: size,
|
|
1778
1970
|
...commonProps,
|
|
1779
1971
|
...buttonProps,
|
|
@@ -1800,75 +1992,17 @@ const $59636f06ede7befa$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $kF5Av$react
|
|
|
1800
1992
|
});
|
|
1801
1993
|
});
|
|
1802
1994
|
$59636f06ede7befa$export$353f5b6fc5456de1.displayName = "Button";
|
|
1995
|
+
$59636f06ede7befa$export$353f5b6fc5456de1.Group = (0, $d0e2bb45064e4ad9$export$69b1032f2ecdf404);
|
|
1803
1996
|
|
|
1804
1997
|
|
|
1805
1998
|
|
|
1806
1999
|
|
|
1807
2000
|
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
display: "inline-flex",
|
|
1813
|
-
alignItems: "center",
|
|
1814
|
-
justifyContent: "center",
|
|
1815
|
-
overflow: "hidden",
|
|
1816
|
-
fontFamily: "$sans",
|
|
1817
|
-
boxSizing: "border-box",
|
|
1818
|
-
outline: "none",
|
|
1819
|
-
border: "none",
|
|
1820
|
-
padding: 0,
|
|
1821
|
-
flexShrink: 0,
|
|
1822
|
-
defaultVariants: {
|
|
1823
|
-
size: "md",
|
|
1824
|
-
shape: "circle"
|
|
1825
|
-
},
|
|
1826
|
-
variants: {
|
|
1827
|
-
shape: {
|
|
1828
|
-
circle: {
|
|
1829
|
-
borderRadius: "50% !important"
|
|
1830
|
-
},
|
|
1831
|
-
square: {}
|
|
1832
|
-
},
|
|
1833
|
-
size: {
|
|
1834
|
-
xs: {
|
|
1835
|
-
size: 24,
|
|
1836
|
-
borderRadius: 6
|
|
1837
|
-
},
|
|
1838
|
-
sm: {
|
|
1839
|
-
size: 32,
|
|
1840
|
-
borderRadius: 6
|
|
1841
|
-
},
|
|
1842
|
-
md: {
|
|
1843
|
-
size: 40,
|
|
1844
|
-
borderRadius: 6
|
|
1845
|
-
},
|
|
1846
|
-
lg: {
|
|
1847
|
-
size: 48,
|
|
1848
|
-
borderRadius: 8
|
|
1849
|
-
},
|
|
1850
|
-
xl: {
|
|
1851
|
-
size: 56,
|
|
1852
|
-
borderRadius: 8
|
|
1853
|
-
}
|
|
1854
|
-
}
|
|
1855
|
-
}
|
|
1856
|
-
});
|
|
1857
|
-
const $39ebe5a116c39d6c$export$c25acd513dcc8062 = /*#__PURE__*/ $kF5Av$forwardRef(({ color: color = "violet" , variant: variant = "solid" , as: as = "button" , css: css , size: size , shape: shape , ...props }, ref)=>{
|
|
1858
|
-
const buttonRef = $kF5Av$useRef(null);
|
|
1859
|
-
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,
|
|
1860
2005
|
...props,
|
|
1861
|
-
elementType: as
|
|
1862
|
-
}, buttonRef);
|
|
1863
|
-
return /*#__PURE__*/ (0, $kF5Av$jsx)($39ebe5a116c39d6c$var$StyledButton, {
|
|
1864
|
-
as: as,
|
|
1865
|
-
shape: shape,
|
|
1866
|
-
size: size,
|
|
1867
|
-
variant: variant,
|
|
1868
|
-
color: color,
|
|
1869
|
-
ref: (0, $625847aeb8796968$export$c9058316764c140e)(buttonRef, ref),
|
|
1870
|
-
css: css,
|
|
1871
|
-
...buttonProps,
|
|
1872
2006
|
children: props.children
|
|
1873
2007
|
});
|
|
1874
2008
|
});
|
|
@@ -1882,6 +2016,8 @@ $39ebe5a116c39d6c$export$c25acd513dcc8062.displayName = "IconButton";
|
|
|
1882
2016
|
|
|
1883
2017
|
|
|
1884
2018
|
|
|
2019
|
+
|
|
2020
|
+
|
|
1885
2021
|
const $a625eab1563a2126$var$Wrapper = (0, $9ade691eb9e41cfb$export$3817b7a54a07cec7)("div", {
|
|
1886
2022
|
position: "relative",
|
|
1887
2023
|
width: "100%"
|
|
@@ -1932,7 +2068,8 @@ const $a625eab1563a2126$var$Steppers = (0, $9ade691eb9e41cfb$export$3817b7a54a07
|
|
|
1932
2068
|
}
|
|
1933
2069
|
});
|
|
1934
2070
|
const $a625eab1563a2126$export$6bf0cd3a219bbade = /*#__PURE__*/ (0, $kF5Av$react).forwardRef((props, ref)=>{
|
|
1935
|
-
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)();
|
|
1936
2073
|
const { locale: locale } = (0, $kF5Av$useLocale)();
|
|
1937
2074
|
const state = (0, $kF5Av$useNumberFieldState)({
|
|
1938
2075
|
...props,
|
|
@@ -1942,6 +2079,8 @@ const $a625eab1563a2126$export$6bf0cd3a219bbade = /*#__PURE__*/ (0, $kF5Av$react
|
|
|
1942
2079
|
const { labelProps: labelProps , groupProps: groupProps , inputProps: inputProps , incrementButtonProps: incrementButtonProps , decrementButtonProps: decrementButtonProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $kF5Av$useNumberField)(props, state, inputRef);
|
|
1943
2080
|
//TODO clean up append and prepend component placement and positioning
|
|
1944
2081
|
return /*#__PURE__*/ (0, $kF5Av$jsxs)((0, $391d62e0590dec97$export$2e2bcd8739ae039), {
|
|
2082
|
+
css: css,
|
|
2083
|
+
className: space.compactItemWrapperAdjust,
|
|
1945
2084
|
stack: true,
|
|
1946
2085
|
gap: 1,
|
|
1947
2086
|
children: [
|
|
@@ -1954,6 +2093,10 @@ const $a625eab1563a2126$export$6bf0cd3a219bbade = /*#__PURE__*/ (0, $kF5Av$react
|
|
|
1954
2093
|
ref: ref,
|
|
1955
2094
|
children: [
|
|
1956
2095
|
/*#__PURE__*/ (0, $kF5Av$jsx)((0, $9158bbabd058e6d9$export$a195049fd73b3fe2), {
|
|
2096
|
+
className: (0, $625847aeb8796968$export$a274e22fb40f762e)({
|
|
2097
|
+
"number-input": true,
|
|
2098
|
+
...space.classNames
|
|
2099
|
+
}),
|
|
1957
2100
|
hasError: !!error,
|
|
1958
2101
|
appearance: appearance,
|
|
1959
2102
|
size: size,
|
|
@@ -2799,7 +2942,10 @@ $c4793c1ed42b26da$export$5b6b19405a83ff9d.displayName = "Popover";
|
|
|
2799
2942
|
|
|
2800
2943
|
|
|
2801
2944
|
|
|
2945
|
+
|
|
2946
|
+
|
|
2802
2947
|
const $604e914a624d5a0f$export$cd0225d99c675387 = /*#__PURE__*/ (0, $kF5Av$react).forwardRef((props, ref)=>{
|
|
2948
|
+
const space = (0, $aca95339810194aa$export$450c36e0b0e62ccd)();
|
|
2803
2949
|
const { renderValue: renderValue , renderOption: renderOption , placeholder: placeholder = "Select an option" , appearance: appearance , size: size , css: css , labelKey: labelKey , label: label } = props;
|
|
2804
2950
|
const state = (0, $kF5Av$useSelectState)(props);
|
|
2805
2951
|
const selectRef = (0, $kF5Av$react).useRef(null);
|
|
@@ -2808,6 +2954,7 @@ const $604e914a624d5a0f$export$cd0225d99c675387 = /*#__PURE__*/ (0, $kF5Av$react
|
|
|
2808
2954
|
const { focusProps: focusProps , isFocused: isFocused } = (0, $kF5Av$useFocusRing)();
|
|
2809
2955
|
const hasSelection = state.selectedItem != null;
|
|
2810
2956
|
return /*#__PURE__*/ (0, $kF5Av$jsxs)((0, $391d62e0590dec97$export$2e2bcd8739ae039), {
|
|
2957
|
+
className: space.compactItemWrapperAdjust,
|
|
2811
2958
|
stretchX: true,
|
|
2812
2959
|
css: css,
|
|
2813
2960
|
position: "relative",
|
|
@@ -2827,6 +2974,10 @@ const $604e914a624d5a0f$export$cd0225d99c675387 = /*#__PURE__*/ (0, $kF5Av$react
|
|
|
2827
2974
|
name: props.name
|
|
2828
2975
|
}),
|
|
2829
2976
|
/*#__PURE__*/ (0, $kF5Av$jsxs)((0, $8f062ce7b62fd0a2$export$3ac1e88a1c0b9f1), {
|
|
2977
|
+
className: (0, $625847aeb8796968$export$a274e22fb40f762e)({
|
|
2978
|
+
"select-trigger": true,
|
|
2979
|
+
...space.classNames
|
|
2980
|
+
}),
|
|
2830
2981
|
type: "button",
|
|
2831
2982
|
"data-focused": isFocused,
|
|
2832
2983
|
appearance: appearance,
|
|
@@ -3034,39 +3185,6 @@ $bb9dfe97a38c22dd$export$d9781c7894a82487.displayName = "DateField";
|
|
|
3034
3185
|
|
|
3035
3186
|
|
|
3036
3187
|
|
|
3037
|
-
function $5c7d398903852591$export$30a06c8d3562193f(object, keys) {
|
|
3038
|
-
return Object.keys(object).reduce((obj, key)=>{
|
|
3039
|
-
if (keys.includes(key)) return {
|
|
3040
|
-
...obj
|
|
3041
|
-
};
|
|
3042
|
-
return {
|
|
3043
|
-
...obj,
|
|
3044
|
-
[key]: object[key]
|
|
3045
|
-
};
|
|
3046
|
-
}, {});
|
|
3047
|
-
}
|
|
3048
|
-
function $5c7d398903852591$export$357523c63a2253b9(object, keys) {
|
|
3049
|
-
// TODO handle invalid objects properly
|
|
3050
|
-
if (!object) return {};
|
|
3051
|
-
return Object.keys(object).reduce((obj, key)=>{
|
|
3052
|
-
if (keys.includes(key)) return {
|
|
3053
|
-
...obj,
|
|
3054
|
-
[key]: object[key]
|
|
3055
|
-
};
|
|
3056
|
-
return {
|
|
3057
|
-
...obj
|
|
3058
|
-
};
|
|
3059
|
-
}, {});
|
|
3060
|
-
}
|
|
3061
|
-
function $5c7d398903852591$export$65980d18b75784e2(object, keys) {
|
|
3062
|
-
const picked = $5c7d398903852591$export$357523c63a2253b9(object, keys);
|
|
3063
|
-
const omitted = $5c7d398903852591$export$30a06c8d3562193f(object, keys);
|
|
3064
|
-
return [
|
|
3065
|
-
picked,
|
|
3066
|
-
omitted
|
|
3067
|
-
];
|
|
3068
|
-
}
|
|
3069
|
-
|
|
3070
3188
|
|
|
3071
3189
|
function $80dfb6e58ec8ad02$export$d02631cccf789723(start = 0, end, step = 1) {
|
|
3072
3190
|
const result = [];
|
|
@@ -3111,7 +3229,7 @@ const $dcb2850cb2ddaca2$export$e1aef45b828286de = /*#__PURE__*/ $kF5Av$forwardRe
|
|
|
3111
3229
|
className: "header",
|
|
3112
3230
|
children: [
|
|
3113
3231
|
/*#__PURE__*/ (0, $kF5Av$jsx)((0, $39ebe5a116c39d6c$export$c25acd513dcc8062), {
|
|
3114
|
-
shape: "
|
|
3232
|
+
shape: "sharp",
|
|
3115
3233
|
size: "xs",
|
|
3116
3234
|
color: "white",
|
|
3117
3235
|
...prevButtonProps,
|
|
@@ -3127,7 +3245,7 @@ const $dcb2850cb2ddaca2$export$e1aef45b828286de = /*#__PURE__*/ $kF5Av$forwardRe
|
|
|
3127
3245
|
children: title
|
|
3128
3246
|
}),
|
|
3129
3247
|
/*#__PURE__*/ (0, $kF5Av$jsx)((0, $39ebe5a116c39d6c$export$c25acd513dcc8062), {
|
|
3130
|
-
shape: "
|
|
3248
|
+
shape: "sharp",
|
|
3131
3249
|
size: "xs",
|
|
3132
3250
|
color: "white",
|
|
3133
3251
|
...nextButtonProps,
|
|
@@ -3229,9 +3347,12 @@ function $774063d921c2c189$export$85930906f541ddb8(date) {
|
|
|
3229
3347
|
}
|
|
3230
3348
|
|
|
3231
3349
|
|
|
3350
|
+
|
|
3351
|
+
|
|
3232
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), {
|
|
3233
3353
|
size: 16
|
|
3234
3354
|
}) , ...props }, ref)=>{
|
|
3355
|
+
const space = (0, $aca95339810194aa$export$450c36e0b0e62ccd)();
|
|
3235
3356
|
function _onChange(date) {
|
|
3236
3357
|
onChange?.(new Date(date.year, date.month, date.day), date);
|
|
3237
3358
|
}
|
|
@@ -3255,6 +3376,8 @@ const $8370e4d32f002899$export$5109c6dd95d8fb00 = /*#__PURE__*/ $kF5Av$forwardRe
|
|
|
3255
3376
|
const pickerRef = $kF5Av$useRef(null);
|
|
3256
3377
|
const { groupProps: groupProps , calendarProps: calendarProps , fieldProps: fieldProps , buttonProps: buttonProps , errorMessageProps: errorMessageProps , labelProps: labelProps } = (0, $kF5Av$useDatePicker)(newPropsWithProxies, state, pickerRef);
|
|
3257
3378
|
return /*#__PURE__*/ (0, $kF5Av$jsxs)((0, $391d62e0590dec97$export$2e2bcd8739ae039), {
|
|
3379
|
+
className: space.compactItemWrapperAdjust,
|
|
3380
|
+
css: css,
|
|
3258
3381
|
stretchX: true,
|
|
3259
3382
|
stack: true,
|
|
3260
3383
|
gap: 1,
|
|
@@ -3266,12 +3389,15 @@ const $8370e4d32f002899$export$5109c6dd95d8fb00 = /*#__PURE__*/ $kF5Av$forwardRe
|
|
|
3266
3389
|
/*#__PURE__*/ (0, $kF5Av$jsxs)((0, $391d62e0590dec97$export$2e2bcd8739ae039), {
|
|
3267
3390
|
ref: ref,
|
|
3268
3391
|
gap: 10,
|
|
3269
|
-
css: css,
|
|
3270
3392
|
stretchX: true,
|
|
3271
3393
|
inline: true,
|
|
3272
3394
|
stack: true,
|
|
3273
3395
|
children: [
|
|
3274
3396
|
/*#__PURE__*/ (0, $kF5Av$jsxs)((0, $83078af43f67af46$export$79e84280796e5e38), {
|
|
3397
|
+
className: (0, $625847aeb8796968$export$a274e22fb40f762e)({
|
|
3398
|
+
"date-picker-trigger": true,
|
|
3399
|
+
...space.classNames
|
|
3400
|
+
}),
|
|
3275
3401
|
ref: pickerRef,
|
|
3276
3402
|
justify: "between",
|
|
3277
3403
|
align: "center",
|
|
@@ -5103,5 +5229,6 @@ $9da3b07c262d31a5$export$2b77a92f1a5ad772.useModal = $9da3b07c262d31a5$export$33
|
|
|
5103
5229
|
|
|
5104
5230
|
|
|
5105
5231
|
|
|
5106
|
-
|
|
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};
|
|
5107
5234
|
//# sourceMappingURL=module.js.map
|