@parrot-co/parrot-ui 0.1.21 → 0.1.23
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 +79 -81
- package/dist/main.js.map +1 -1
- package/dist/module.js +80 -83
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +10 -11
- package/dist/types.d.ts.map +1 -1
- package/package.json +16 -16
- package/styles.css +1 -1
package/dist/main.js
CHANGED
|
@@ -29,6 +29,7 @@ $parcel$export(module.exports, "IconButton", () => $3af04cd154cf4de1$export$c25a
|
|
|
29
29
|
$parcel$export(module.exports, "ButtonGroup", () => $7f70742e736041ff$export$69b1032f2ecdf404);
|
|
30
30
|
$parcel$export(module.exports, "Checkbox", () => $f88e10ca2ba68239$export$48513f6b9f8ce62d);
|
|
31
31
|
$parcel$export(module.exports, "CheckboxGroup", () => $0f8ef6f4acac1766$export$4aa08d5625cb8ead);
|
|
32
|
+
$parcel$export(module.exports, "CheckboxItem", () => $c31ad898a2916b00$export$16ce288f89fa631c);
|
|
32
33
|
$parcel$export(module.exports, "DropdownMenu", () => $3b903582a5253460$export$e44a253a59704894);
|
|
33
34
|
$parcel$export(module.exports, "ComboBox", () => $d67a8dc6cbdaa7ed$export$72b9695b8216309a);
|
|
34
35
|
$parcel$export(module.exports, "Radio", () => $e158c5cf7e190200$export$d7b12c4107be0d61);
|
|
@@ -494,9 +495,10 @@ $df66c26cdcece32b$export$faaf771f35016530.displayName = "GridItem";
|
|
|
494
495
|
|
|
495
496
|
|
|
496
497
|
const $c3a954a7c0cb5109$export$21ee1313e2afe36c = (props, ref)=>{
|
|
497
|
-
const { justify: justify, align: align, direction: direction, gap: gap = "sm", columnGap: columnGap, rowGap: rowGap, inline: inline, wrap: wrap, stack: stack, className: className, ...otherProps } = props;
|
|
498
|
+
const { justify: justify, align: align, direction: direction, gap: gap = "sm", columnGap: columnGap, rowGap: rowGap, inline: inline, wrap: wrap, stack: stack, className: className, as: as, ...otherProps } = props;
|
|
498
499
|
const flexDirection = stack ? "column" : direction ?? "row";
|
|
499
500
|
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $eb8f27c3596a0e6b$export$e71c4d32a2263218), {
|
|
501
|
+
as: as,
|
|
500
502
|
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(className, inline ? "display-inline-flex" : "display-flex", `flex-direction-${flexDirection}`, wrap && `flex-${wrap}`, justify && `flex-justify-${justify}`, align && `flex-align-${align}`, (0, $4af7da5c7dd0b9c2$export$2db1d02db18b2d82)("gap", gap), (0, $4af7da5c7dd0b9c2$export$2db1d02db18b2d82)("column-gap", columnGap), (0, $4af7da5c7dd0b9c2$export$2db1d02db18b2d82)("row-gap", rowGap)),
|
|
501
503
|
// TODO - Fix types here - seems to work just fine though
|
|
502
504
|
ref: ref,
|
|
@@ -655,6 +657,7 @@ function $f2fd0cbe11b7f0dd$export$d8964aec282183a3(props) {
|
|
|
655
657
|
value: themeProps,
|
|
656
658
|
children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
|
|
657
659
|
id: "parrot-theme-provider",
|
|
660
|
+
"data-gray-variant": themeProps.grayVariant,
|
|
658
661
|
"data-radius": themeProps.radius,
|
|
659
662
|
"data-color": themeProps.color,
|
|
660
663
|
"data-scaling": scaling,
|
|
@@ -700,6 +703,7 @@ function $ec2376a5dd0d13e6$export$a455218a85c89869({ label: label, description:
|
|
|
700
703
|
children: label
|
|
701
704
|
}),
|
|
702
705
|
!replaceDefaultControlWrapper && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
|
|
706
|
+
align: "center",
|
|
703
707
|
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(space.classNames, "p-input-control"),
|
|
704
708
|
"data-has-error": !!error,
|
|
705
709
|
"data-appearance": appearance,
|
|
@@ -813,14 +817,10 @@ $a28e128499dd0b02$export$3b0d6d7590275603.displayName = "Loader";
|
|
|
813
817
|
|
|
814
818
|
|
|
815
819
|
function $ff6fce0e059b3a1a$export$30a06c8d3562193f(object, keys) {
|
|
820
|
+
const keySet = new Set(keys);
|
|
816
821
|
return Object.keys(object).reduce((obj, key)=>{
|
|
817
|
-
if (
|
|
818
|
-
|
|
819
|
-
};
|
|
820
|
-
return {
|
|
821
|
-
...obj,
|
|
822
|
-
[key]: object[key]
|
|
823
|
-
};
|
|
822
|
+
if (!keySet.has(key)) obj[key] = object[key];
|
|
823
|
+
return obj;
|
|
824
824
|
}, {});
|
|
825
825
|
}
|
|
826
826
|
function $ff6fce0e059b3a1a$export$357523c63a2253b9(object, keys) {
|
|
@@ -1309,6 +1309,43 @@ $f88e10ca2ba68239$export$48513f6b9f8ce62d.displayName = "checkbox";
|
|
|
1309
1309
|
|
|
1310
1310
|
|
|
1311
1311
|
|
|
1312
|
+
function $c31ad898a2916b00$export$16ce288f89fa631c({ className: className, classNames: classNames, styles: styles, style: style, ...props }) {
|
|
1313
|
+
const ctx = (0, ($parcel$interopDefault($8zHUo$react))).useContext((0, $0f8ef6f4acac1766$export$f9c6924e160136d1));
|
|
1314
|
+
if (!ctx) throw new Error("CheckboxItem must be used within a CheckboxGroup");
|
|
1315
|
+
const ref = (0, ($parcel$interopDefault($8zHUo$react))).useRef(null);
|
|
1316
|
+
const { inputProps: inputProps } = (0, $8zHUo$reactaria.useCheckboxGroupItem)(props, ctx.state, ref);
|
|
1317
|
+
const isSelected = ctx.state.isSelected(props.value);
|
|
1318
|
+
const isDisabled = ctx.state.isDisabled || props.isDisabled;
|
|
1319
|
+
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("label", {
|
|
1320
|
+
style: {
|
|
1321
|
+
...style,
|
|
1322
|
+
...styles?.wrapper
|
|
1323
|
+
},
|
|
1324
|
+
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(className, "p-checkbox-item", classNames?.wrapper),
|
|
1325
|
+
"data-disabled": isDisabled,
|
|
1326
|
+
"data-checked": isSelected,
|
|
1327
|
+
children: [
|
|
1328
|
+
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $8zHUo$reactaria.VisuallyHidden), {
|
|
1329
|
+
children: [
|
|
1330
|
+
" ",
|
|
1331
|
+
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("input", {
|
|
1332
|
+
type: "checkbox",
|
|
1333
|
+
ref: ref,
|
|
1334
|
+
...inputProps
|
|
1335
|
+
})
|
|
1336
|
+
]
|
|
1337
|
+
}),
|
|
1338
|
+
props.children
|
|
1339
|
+
]
|
|
1340
|
+
});
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
|
|
1345
|
+
|
|
1346
|
+
|
|
1347
|
+
|
|
1348
|
+
|
|
1312
1349
|
|
|
1313
1350
|
|
|
1314
1351
|
|
|
@@ -1593,13 +1630,6 @@ const $3b903582a5253460$export$e44a253a59704894 = {
|
|
|
1593
1630
|
|
|
1594
1631
|
|
|
1595
1632
|
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
1633
|
|
|
1604
1634
|
|
|
1605
1635
|
|
|
@@ -1817,107 +1847,75 @@ function $dcfc4542aa84c062$var$ListSection({ state: state, section: section }) {
|
|
|
1817
1847
|
|
|
1818
1848
|
|
|
1819
1849
|
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
}), className: className, style: style, color: color = "gray", radius: radius, size: size = "md", appearance: appearance = "outline", listBoxColor: listBoxColor, append: append, prepend: prepend, isLoading: isLoading, ...props }, ref)=>{
|
|
1823
|
-
const theme = (0, $f2fd0cbe11b7f0dd$export$93d4e7f90805808f)();
|
|
1850
|
+
|
|
1851
|
+
function $d67a8dc6cbdaa7ed$export$72b9695b8216309a({ description: description, descriptionProps: descriptionProps, error: error, errorMessageProps: errorMessageProps, label: label, labelProps: labelProps, selectorIcon: selectorIcon, selectorSize: selectorSize = "sm", style: style, styles: styles, className: className, classNames: classNames, ...props }) {
|
|
1824
1852
|
const { contains: contains } = (0, $8zHUo$reactaria.useFilter)({
|
|
1825
1853
|
sensitivity: "base"
|
|
1826
1854
|
});
|
|
1855
|
+
const children = (0, $fc43ab93aaa777d9$export$4c687b6f1150e71b)(props);
|
|
1827
1856
|
const state = (0, $8zHUo$reactstately.useComboBoxState)({
|
|
1828
1857
|
...props,
|
|
1829
|
-
children:
|
|
1858
|
+
children: children,
|
|
1830
1859
|
defaultFilter: contains
|
|
1831
1860
|
});
|
|
1832
|
-
const inputRef = $8zHUo$react.useRef(null);
|
|
1833
1861
|
const buttonRef = $8zHUo$react.useRef(null);
|
|
1862
|
+
const inputRef = $8zHUo$react.useRef(null);
|
|
1834
1863
|
const listBoxRef = $8zHUo$react.useRef(null);
|
|
1835
1864
|
const popoverRef = $8zHUo$react.useRef(null);
|
|
1836
1865
|
const wrapperRef = $8zHUo$react.useRef(null);
|
|
1837
|
-
const { inputProps: inputProps, buttonProps: buttonProps, listBoxProps: listBoxProps } = (0, $8zHUo$reactaria.useComboBox)({
|
|
1838
|
-
inputRef: inputRef,
|
|
1866
|
+
const { inputProps: inputProps, buttonProps: buttonProps, listBoxProps: listBoxProps, labelProps: AriaLabelProps } = (0, $8zHUo$reactaria.useComboBox)({
|
|
1839
1867
|
buttonRef: buttonRef,
|
|
1868
|
+
inputRef: inputRef,
|
|
1840
1869
|
listBoxRef: listBoxRef,
|
|
1841
1870
|
popoverRef: popoverRef,
|
|
1842
1871
|
...props
|
|
1843
1872
|
}, state);
|
|
1844
|
-
|
|
1845
|
-
if (typeof dropdownArrow === "function") return dropdownArrow({
|
|
1846
|
-
color: "gray",
|
|
1847
|
-
size: "md"
|
|
1848
|
-
});
|
|
1849
|
-
return dropdownArrow;
|
|
1850
|
-
}
|
|
1851
|
-
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
|
|
1852
|
-
"data-color": color ?? theme?.color ?? "gray",
|
|
1853
|
-
"data-size": size,
|
|
1854
|
-
"data-radius": radius ?? theme?.radius ?? "lg",
|
|
1855
|
-
style: style,
|
|
1856
|
-
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-combo-box p-input-group", className),
|
|
1857
|
-
ref: ref,
|
|
1858
|
-
stack: true,
|
|
1859
|
-
gap: "3xs",
|
|
1860
|
-
stretchX: true,
|
|
1873
|
+
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $8zHUo$reactjsxruntime.Fragment), {
|
|
1861
1874
|
children: [
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1875
|
+
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $ec2376a5dd0d13e6$export$a455218a85c89869), {
|
|
1876
|
+
styles: styles,
|
|
1877
|
+
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(className, "p-combo-box-field"),
|
|
1878
|
+
classNames: classNames,
|
|
1879
|
+
style: style,
|
|
1880
|
+
wrapperRef: wrapperRef,
|
|
1881
|
+
label: label,
|
|
1882
|
+
labelProps: (0, $8zHUo$reactaria.mergeProps)(labelProps, AriaLabelProps),
|
|
1883
|
+
description: description,
|
|
1884
|
+
descriptionProps: descriptionProps,
|
|
1885
|
+
error: error,
|
|
1886
|
+
errorMessageProps: errorMessageProps,
|
|
1872
1887
|
children: [
|
|
1873
|
-
prepend,
|
|
1874
1888
|
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("input", {
|
|
1875
|
-
className: "p-
|
|
1876
|
-
onChange: (e)=>inputProps.onChange?.(e),
|
|
1889
|
+
className: "p-text-input-el",
|
|
1877
1890
|
ref: inputRef,
|
|
1878
|
-
"
|
|
1879
|
-
|
|
1880
|
-
...(0, $ff6fce0e059b3a1a$export$30a06c8d3562193f)(inputProps, [
|
|
1881
|
-
"size",
|
|
1882
|
-
"onChange"
|
|
1883
|
-
])
|
|
1884
|
-
}),
|
|
1885
|
-
append,
|
|
1886
|
-
isLoading && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $a28e128499dd0b02$export$3b0d6d7590275603), {
|
|
1887
|
-
size: "xs"
|
|
1891
|
+
type: "text",
|
|
1892
|
+
...inputProps
|
|
1888
1893
|
}),
|
|
1889
|
-
|
|
1890
|
-
...buttonProps,
|
|
1894
|
+
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $3af04cd154cf4de1$export$c25acd513dcc8062), {
|
|
1891
1895
|
variant: "ghost",
|
|
1892
1896
|
color: "gray",
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
children: resolvedDropdownArrow()
|
|
1897
|
+
size: selectorSize,
|
|
1898
|
+
...buttonProps,
|
|
1899
|
+
children: selectorIcon
|
|
1897
1900
|
})
|
|
1898
1901
|
]
|
|
1899
1902
|
}),
|
|
1900
|
-
error && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
|
|
1901
|
-
children: error
|
|
1902
|
-
}),
|
|
1903
1903
|
state.isOpen && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $9a1eb1c261c8b852$export$91527519cfe8e396), {
|
|
1904
|
-
|
|
1905
|
-
offset: 8,
|
|
1906
|
-
state: state,
|
|
1904
|
+
offset: 6,
|
|
1907
1905
|
triggerRef: wrapperRef,
|
|
1906
|
+
state: state,
|
|
1907
|
+
popoverRef: popoverRef,
|
|
1908
|
+
isNonModal: true,
|
|
1908
1909
|
children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $dcfc4542aa84c062$export$41f133550aa26f48), {
|
|
1909
|
-
color: listBoxColor ?? theme?.color ?? "gray",
|
|
1910
1910
|
width: wrapperRef.current?.getBoundingClientRect().width,
|
|
1911
|
+
...listBoxProps,
|
|
1911
1912
|
listBoxRef: listBoxRef,
|
|
1912
|
-
state: state
|
|
1913
|
-
...listBoxProps
|
|
1913
|
+
state: state
|
|
1914
1914
|
})
|
|
1915
1915
|
})
|
|
1916
1916
|
]
|
|
1917
1917
|
});
|
|
1918
|
-
}
|
|
1919
|
-
$d67a8dc6cbdaa7ed$export$acd2d351457d1d82.displayName = "ComboBox";
|
|
1920
|
-
const $d67a8dc6cbdaa7ed$export$72b9695b8216309a = /*#__PURE__*/ $8zHUo$react.forwardRef($d67a8dc6cbdaa7ed$export$acd2d351457d1d82);
|
|
1918
|
+
}
|
|
1921
1919
|
|
|
1922
1920
|
|
|
1923
1921
|
|