@parrot-co/parrot-ui 0.1.2 → 0.1.4
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 +92 -20
- package/dist/main.js.map +1 -1
- package/dist/module.js +91 -22
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +18 -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);
|
|
@@ -498,6 +501,11 @@ const $d9ffc65197682590$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
498
501
|
})
|
|
499
502
|
]
|
|
500
503
|
}),
|
|
504
|
+
error && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
|
|
505
|
+
validationStatus: validationStatus,
|
|
506
|
+
...errorMessageProps,
|
|
507
|
+
children: error
|
|
508
|
+
}),
|
|
501
509
|
description && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
|
|
502
510
|
as: "div",
|
|
503
511
|
variant: "light",
|
|
@@ -506,11 +514,6 @@ const $d9ffc65197682590$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
506
514
|
lineHeight: "base",
|
|
507
515
|
...descriptionProps,
|
|
508
516
|
children: description
|
|
509
|
-
}),
|
|
510
|
-
error && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
|
|
511
|
-
validationStatus: validationStatus,
|
|
512
|
-
...errorMessageProps,
|
|
513
|
-
children: error
|
|
514
517
|
})
|
|
515
518
|
]
|
|
516
519
|
});
|
|
@@ -675,6 +678,7 @@ const $5a6f28f3fd58ff6e$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
675
678
|
const Comp = as;
|
|
676
679
|
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)(Comp, {
|
|
677
680
|
style: style,
|
|
681
|
+
"data-is-toggle": isToggle,
|
|
678
682
|
"data-pressed": isPressed,
|
|
679
683
|
"data-radius": radius,
|
|
680
684
|
"data-icon-button": isIconButton,
|
|
@@ -882,6 +886,10 @@ const $491b98ef80f40f98$export$379139ebc1c2b235 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
882
886
|
"data-appearance": appearance,
|
|
883
887
|
...inputProps
|
|
884
888
|
}),
|
|
889
|
+
error && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
|
|
890
|
+
...errorMessageProps,
|
|
891
|
+
children: error
|
|
892
|
+
}),
|
|
885
893
|
description && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
|
|
886
894
|
lineHeight: "base",
|
|
887
895
|
...descriptionProps,
|
|
@@ -889,10 +897,6 @@ const $491b98ef80f40f98$export$379139ebc1c2b235 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
889
897
|
as: "div",
|
|
890
898
|
size: "sm",
|
|
891
899
|
children: description
|
|
892
|
-
}),
|
|
893
|
-
error && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
|
|
894
|
-
...errorMessageProps,
|
|
895
|
-
children: error
|
|
896
900
|
})
|
|
897
901
|
]
|
|
898
902
|
});
|
|
@@ -1057,7 +1061,7 @@ $f88e10ca2ba68239$export$48513f6b9f8ce62d.displayName = "checkbox";
|
|
|
1057
1061
|
|
|
1058
1062
|
|
|
1059
1063
|
|
|
1060
|
-
function $
|
|
1064
|
+
function $9a1eb1c261c8b852$export$91527519cfe8e396({ state: state, children: children, popoverRef: popoverRef, ...props }) {
|
|
1061
1065
|
const internalPopoverRef = $8zHUo$react.useRef(null);
|
|
1062
1066
|
const theme = (0, $f2fd0cbe11b7f0dd$export$93d4e7f90805808f)();
|
|
1063
1067
|
const { popoverProps: popoverProps, underlayProps: underlayProps } = (0, $8zHUo$reactaria.usePopover)({
|
|
@@ -1128,7 +1132,7 @@ function $724eace27ebf345b$export$e7eb525bc415b4b4({ asChild: asChild, children:
|
|
|
1128
1132
|
function $724eace27ebf345b$export$d9b273488cd8ce6f({ placement: placement = "bottom start", offset: offset = 8, ...props }) {
|
|
1129
1133
|
const ctx = $8zHUo$react.useContext($724eace27ebf345b$var$DropdownContext);
|
|
1130
1134
|
if (!ctx?.triggerState.isOpen) return null;
|
|
1131
|
-
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $
|
|
1135
|
+
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $9a1eb1c261c8b852$export$91527519cfe8e396), {
|
|
1132
1136
|
placement: placement,
|
|
1133
1137
|
offset: offset,
|
|
1134
1138
|
state: ctx?.triggerState,
|
|
@@ -1603,7 +1607,7 @@ const $d67a8dc6cbdaa7ed$export$acd2d351457d1d82 = ({ label: label, error: error,
|
|
|
1603
1607
|
error && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
|
|
1604
1608
|
children: error
|
|
1605
1609
|
}),
|
|
1606
|
-
state.isOpen && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $
|
|
1610
|
+
state.isOpen && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $9a1eb1c261c8b852$export$91527519cfe8e396), {
|
|
1607
1611
|
popoverRef: popoverRef,
|
|
1608
1612
|
offset: 8,
|
|
1609
1613
|
state: state,
|
|
@@ -1932,7 +1936,7 @@ function $e37831ebf64d8e7d$export$ef9b1a59e592288f({ label: label, selectionMode
|
|
|
1932
1936
|
})
|
|
1933
1937
|
]
|
|
1934
1938
|
}),
|
|
1935
|
-
triggerState.isOpen && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $
|
|
1939
|
+
triggerState.isOpen && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $9a1eb1c261c8b852$export$91527519cfe8e396), {
|
|
1936
1940
|
placement: "bottom start",
|
|
1937
1941
|
offset: 4,
|
|
1938
1942
|
shouldUpdatePosition: true,
|
|
@@ -2306,7 +2310,7 @@ const $e0a58c83d4c36e4e$export$7edc06cf1783b30f = /*#__PURE__*/ $8zHUo$react.for
|
|
|
2306
2310
|
})
|
|
2307
2311
|
]
|
|
2308
2312
|
}),
|
|
2309
|
-
state.isOpen && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $
|
|
2313
|
+
state.isOpen && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $9a1eb1c261c8b852$export$91527519cfe8e396), {
|
|
2310
2314
|
offset: 8,
|
|
2311
2315
|
state: state,
|
|
2312
2316
|
triggerRef: pickerRef,
|
|
@@ -2862,7 +2866,7 @@ function $43de550aebbf1320$export$50e381fea3a45244(props) {
|
|
|
2862
2866
|
|
|
2863
2867
|
|
|
2864
2868
|
|
|
2865
|
-
const $fedef2bba4e6812a$export$ea98c603db73aee7 = /*#__PURE__*/ (0, ($parcel$interopDefault($8zHUo$react))).forwardRef(({ variant: variant = "outline", color: color = "violet", padded: padded = true, gap: gap = "sm", radius: radius, ...props }, ref)=>{
|
|
2869
|
+
const $fedef2bba4e6812a$export$ea98c603db73aee7 = /*#__PURE__*/ (0, ($parcel$interopDefault($8zHUo$react))).forwardRef(({ variant: variant = "outline", color: color = "violet", padded: padded = true, gap: gap = "sm", radius: radius, children: children, ...props }, ref)=>{
|
|
2866
2870
|
const theme = (0, $f2fd0cbe11b7f0dd$export$93d4e7f90805808f)();
|
|
2867
2871
|
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
|
|
2868
2872
|
"data-radius": radius ?? theme?.radius ?? "lg",
|
|
@@ -2874,7 +2878,8 @@ const $fedef2bba4e6812a$export$ea98c603db73aee7 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
2874
2878
|
"data-color": color,
|
|
2875
2879
|
ref: ref,
|
|
2876
2880
|
gap: gap,
|
|
2877
|
-
...props
|
|
2881
|
+
...props,
|
|
2882
|
+
children: children
|
|
2878
2883
|
});
|
|
2879
2884
|
});
|
|
2880
2885
|
$fedef2bba4e6812a$export$ea98c603db73aee7.displayName = "Sticker";
|
|
@@ -3010,11 +3015,14 @@ function $1278141024f0bc4d$var$Dialog({ width: width = 400, title: title, onCanc
|
|
|
3010
3015
|
})
|
|
3011
3016
|
]
|
|
3012
3017
|
}),
|
|
3013
|
-
props.isDismissable && showCloseButton && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)(
|
|
3018
|
+
props.isDismissable && showCloseButton && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("button", {
|
|
3014
3019
|
color: "gray",
|
|
3015
|
-
|
|
3016
|
-
variant: "ghost",
|
|
3017
|
-
|
|
3020
|
+
onClick: handleClose,
|
|
3021
|
+
"data-variant": "ghost",
|
|
3022
|
+
"data-color": "gray",
|
|
3023
|
+
className: "p-button size-sm",
|
|
3024
|
+
"data-radius": "full",
|
|
3025
|
+
"data-icon-button": true,
|
|
3018
3026
|
children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $8zHUo$reacticonshi.HiX), {
|
|
3019
3027
|
size: 18
|
|
3020
3028
|
})
|
|
@@ -3259,6 +3267,70 @@ function $0cdc620c9e9fb79f$export$39299b56cfd4e361({ appearance: appearance = "o
|
|
|
3259
3267
|
|
|
3260
3268
|
|
|
3261
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
|
+
console.log(children);
|
|
3297
|
+
return /*#__PURE__*/ $8zHUo$react.cloneElement(children, {
|
|
3298
|
+
ref: ctx.triggerRef,
|
|
3299
|
+
["data-is-pressed"]: clickProps.isPressed,
|
|
3300
|
+
...triggerProps
|
|
3301
|
+
});
|
|
3302
|
+
}
|
|
3303
|
+
function $0f347092d3465402$export$d7e1f420b25549ff({ children: children, offset: offset = 12, placement: placement, style: style, width: width = 160, className: className }) {
|
|
3304
|
+
const ctx = $8zHUo$react.useContext($0f347092d3465402$var$PopoverContext);
|
|
3305
|
+
if (!ctx) throw "PopoverContent must be used withing a Popover component";
|
|
3306
|
+
if (!ctx.overlayState?.isOpen) return null;
|
|
3307
|
+
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $9a1eb1c261c8b852$export$91527519cfe8e396), {
|
|
3308
|
+
offset: offset,
|
|
3309
|
+
placement: placement,
|
|
3310
|
+
state: ctx.overlayState,
|
|
3311
|
+
triggerRef: ctx.triggerRef,
|
|
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
|
+
|
|
3262
3334
|
|
|
3263
3335
|
|
|
3264
3336
|
|