@parrot-co/parrot-ui 0.1.3 → 0.1.5
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 +72 -5
- package/dist/main.js.map +1 -1
- package/dist/module.js +71 -7
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +14 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -54,6 +54,9 @@ $parcel$export(module.exports, "Modal", () => $1278141024f0bc4d$export$2b77a92f1
|
|
|
54
54
|
$parcel$export(module.exports, "useModal", () => $1278141024f0bc4d$export$33ffd74ebf07f060);
|
|
55
55
|
$parcel$export(module.exports, "Space", () => $eae337549f49a5a2$export$eef1e68107c58ef2);
|
|
56
56
|
$parcel$export(module.exports, "TagInput", () => $0cdc620c9e9fb79f$export$39299b56cfd4e361);
|
|
57
|
+
$parcel$export(module.exports, "Popover", () => $0f347092d3465402$export$5b6b19405a83ff9d);
|
|
58
|
+
$parcel$export(module.exports, "PopoverContent", () => $0f347092d3465402$export$d7e1f420b25549ff);
|
|
59
|
+
$parcel$export(module.exports, "PopoverTrigger", () => $0f347092d3465402$export$7dacb05d26466c3);
|
|
57
60
|
$parcel$export(module.exports, "TagGroup", () => $d26053f02b9f370b$export$67ea30858aaf75e3);
|
|
58
61
|
$parcel$export(module.exports, "TagGroupItem", () => $d26053f02b9f370b$export$a79147a60006308c);
|
|
59
62
|
$parcel$export(module.exports, "ThemeProvider", () => $f2fd0cbe11b7f0dd$export$d8964aec282183a3);
|
|
@@ -1058,7 +1061,7 @@ $f88e10ca2ba68239$export$48513f6b9f8ce62d.displayName = "checkbox";
|
|
|
1058
1061
|
|
|
1059
1062
|
|
|
1060
1063
|
|
|
1061
|
-
function $
|
|
1064
|
+
function $9a1eb1c261c8b852$export$91527519cfe8e396({ state: state, children: children, popoverRef: popoverRef, ...props }) {
|
|
1062
1065
|
const internalPopoverRef = $8zHUo$react.useRef(null);
|
|
1063
1066
|
const theme = (0, $f2fd0cbe11b7f0dd$export$93d4e7f90805808f)();
|
|
1064
1067
|
const { popoverProps: popoverProps, underlayProps: underlayProps } = (0, $8zHUo$reactaria.usePopover)({
|
|
@@ -1129,7 +1132,7 @@ function $724eace27ebf345b$export$e7eb525bc415b4b4({ asChild: asChild, children:
|
|
|
1129
1132
|
function $724eace27ebf345b$export$d9b273488cd8ce6f({ placement: placement = "bottom start", offset: offset = 8, ...props }) {
|
|
1130
1133
|
const ctx = $8zHUo$react.useContext($724eace27ebf345b$var$DropdownContext);
|
|
1131
1134
|
if (!ctx?.triggerState.isOpen) return null;
|
|
1132
|
-
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $
|
|
1135
|
+
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $9a1eb1c261c8b852$export$91527519cfe8e396), {
|
|
1133
1136
|
placement: placement,
|
|
1134
1137
|
offset: offset,
|
|
1135
1138
|
state: ctx?.triggerState,
|
|
@@ -1604,7 +1607,7 @@ const $d67a8dc6cbdaa7ed$export$acd2d351457d1d82 = ({ label: label, error: error,
|
|
|
1604
1607
|
error && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
|
|
1605
1608
|
children: error
|
|
1606
1609
|
}),
|
|
1607
|
-
state.isOpen && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $
|
|
1610
|
+
state.isOpen && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $9a1eb1c261c8b852$export$91527519cfe8e396), {
|
|
1608
1611
|
popoverRef: popoverRef,
|
|
1609
1612
|
offset: 8,
|
|
1610
1613
|
state: state,
|
|
@@ -1933,7 +1936,7 @@ function $e37831ebf64d8e7d$export$ef9b1a59e592288f({ label: label, selectionMode
|
|
|
1933
1936
|
})
|
|
1934
1937
|
]
|
|
1935
1938
|
}),
|
|
1936
|
-
triggerState.isOpen && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $
|
|
1939
|
+
triggerState.isOpen && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $9a1eb1c261c8b852$export$91527519cfe8e396), {
|
|
1937
1940
|
placement: "bottom start",
|
|
1938
1941
|
offset: 4,
|
|
1939
1942
|
shouldUpdatePosition: true,
|
|
@@ -2307,7 +2310,7 @@ const $e0a58c83d4c36e4e$export$7edc06cf1783b30f = /*#__PURE__*/ $8zHUo$react.for
|
|
|
2307
2310
|
})
|
|
2308
2311
|
]
|
|
2309
2312
|
}),
|
|
2310
|
-
state.isOpen && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $
|
|
2313
|
+
state.isOpen && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $9a1eb1c261c8b852$export$91527519cfe8e396), {
|
|
2311
2314
|
offset: 8,
|
|
2312
2315
|
state: state,
|
|
2313
2316
|
triggerRef: pickerRef,
|
|
@@ -3264,6 +3267,70 @@ function $0cdc620c9e9fb79f$export$39299b56cfd4e361({ appearance: appearance = "o
|
|
|
3264
3267
|
|
|
3265
3268
|
|
|
3266
3269
|
|
|
3270
|
+
const $0f347092d3465402$var$PopoverContext = /*#__PURE__*/ $8zHUo$react.createContext(null);
|
|
3271
|
+
function $0f347092d3465402$export$5b6b19405a83ff9d({ children: children, useNativeClickHandler: useNativeClickHandler, ...props }) {
|
|
3272
|
+
const triggerRef = $8zHUo$react.useRef(null);
|
|
3273
|
+
const state = (0, $8zHUo$reactstately.useOverlayTriggerState)(props);
|
|
3274
|
+
const { triggerProps: triggerProps, overlayProps: overlayProps } = (0, $8zHUo$reactaria.useOverlayTrigger)({
|
|
3275
|
+
type: "dialog"
|
|
3276
|
+
}, state, triggerRef);
|
|
3277
|
+
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)($0f347092d3465402$var$PopoverContext.Provider, {
|
|
3278
|
+
value: {
|
|
3279
|
+
triggerProps: triggerProps,
|
|
3280
|
+
triggerRef: triggerRef,
|
|
3281
|
+
overlayProps: overlayProps,
|
|
3282
|
+
overlayState: state,
|
|
3283
|
+
props: {
|
|
3284
|
+
useNativeClickHandler: useNativeClickHandler
|
|
3285
|
+
}
|
|
3286
|
+
},
|
|
3287
|
+
children: children
|
|
3288
|
+
});
|
|
3289
|
+
}
|
|
3290
|
+
function $0f347092d3465402$export$7dacb05d26466c3({ children: children }) {
|
|
3291
|
+
const ctx = $8zHUo$react.useContext($0f347092d3465402$var$PopoverContext);
|
|
3292
|
+
if (!ctx) throw "PopoverTrigger must be used within a Popover component";
|
|
3293
|
+
const useClickEvents = ctx.props?.useNativeClickHandler;
|
|
3294
|
+
const clickProps = (0, $8zHUo$reactaria.usePress)(ctx.triggerProps);
|
|
3295
|
+
const triggerProps = useClickEvents ? clickProps.pressProps : ctx.triggerProps;
|
|
3296
|
+
return /*#__PURE__*/ $8zHUo$react.cloneElement(children, {
|
|
3297
|
+
ref: ctx.triggerRef,
|
|
3298
|
+
["data-is-pressed"]: clickProps.isPressed,
|
|
3299
|
+
...triggerProps
|
|
3300
|
+
});
|
|
3301
|
+
}
|
|
3302
|
+
function $0f347092d3465402$export$d7e1f420b25549ff({ children: children, offset: offset = 12, placement: placement, style: style, width: width = 160, className: className, ...props }) {
|
|
3303
|
+
const ctx = $8zHUo$react.useContext($0f347092d3465402$var$PopoverContext);
|
|
3304
|
+
if (!ctx) throw "PopoverContent must be used withing a Popover component";
|
|
3305
|
+
if (!ctx.overlayState?.isOpen) return null;
|
|
3306
|
+
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $9a1eb1c261c8b852$export$91527519cfe8e396), {
|
|
3307
|
+
offset: offset,
|
|
3308
|
+
placement: placement,
|
|
3309
|
+
state: ctx.overlayState,
|
|
3310
|
+
triggerRef: ctx.triggerRef,
|
|
3311
|
+
...props,
|
|
3312
|
+
children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
|
|
3313
|
+
...ctx.overlayProps,
|
|
3314
|
+
"data-radius": "md",
|
|
3315
|
+
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(className, "p-popover-content"),
|
|
3316
|
+
style: {
|
|
3317
|
+
width: width,
|
|
3318
|
+
...style
|
|
3319
|
+
},
|
|
3320
|
+
children: children
|
|
3321
|
+
})
|
|
3322
|
+
});
|
|
3323
|
+
}
|
|
3324
|
+
|
|
3325
|
+
|
|
3326
|
+
|
|
3327
|
+
|
|
3328
|
+
|
|
3329
|
+
|
|
3330
|
+
|
|
3331
|
+
|
|
3332
|
+
|
|
3333
|
+
|
|
3267
3334
|
|
|
3268
3335
|
|
|
3269
3336
|
|