@parrot-co/parrot-ui 0.1.1 → 0.1.3
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 +127 -15
- package/dist/main.js.map +1 -1
- package/dist/module.js +127 -17
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +36 -22
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -54,6 +54,8 @@ $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, "TagGroup", () => $d26053f02b9f370b$export$67ea30858aaf75e3);
|
|
58
|
+
$parcel$export(module.exports, "TagGroupItem", () => $d26053f02b9f370b$export$a79147a60006308c);
|
|
57
59
|
$parcel$export(module.exports, "ThemeProvider", () => $f2fd0cbe11b7f0dd$export$d8964aec282183a3);
|
|
58
60
|
$parcel$export(module.exports, "useTheme", () => $f2fd0cbe11b7f0dd$export$93d4e7f90805808f);
|
|
59
61
|
|
|
@@ -496,6 +498,11 @@ const $d9ffc65197682590$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
496
498
|
})
|
|
497
499
|
]
|
|
498
500
|
}),
|
|
501
|
+
error && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
|
|
502
|
+
validationStatus: validationStatus,
|
|
503
|
+
...errorMessageProps,
|
|
504
|
+
children: error
|
|
505
|
+
}),
|
|
499
506
|
description && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
|
|
500
507
|
as: "div",
|
|
501
508
|
variant: "light",
|
|
@@ -504,11 +511,6 @@ const $d9ffc65197682590$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
504
511
|
lineHeight: "base",
|
|
505
512
|
...descriptionProps,
|
|
506
513
|
children: description
|
|
507
|
-
}),
|
|
508
|
-
error && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
|
|
509
|
-
validationStatus: validationStatus,
|
|
510
|
-
...errorMessageProps,
|
|
511
|
-
children: error
|
|
512
514
|
})
|
|
513
515
|
]
|
|
514
516
|
});
|
|
@@ -673,6 +675,7 @@ const $5a6f28f3fd58ff6e$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
673
675
|
const Comp = as;
|
|
674
676
|
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)(Comp, {
|
|
675
677
|
style: style,
|
|
678
|
+
"data-is-toggle": isToggle,
|
|
676
679
|
"data-pressed": isPressed,
|
|
677
680
|
"data-radius": radius,
|
|
678
681
|
"data-icon-button": isIconButton,
|
|
@@ -880,6 +883,10 @@ const $491b98ef80f40f98$export$379139ebc1c2b235 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
880
883
|
"data-appearance": appearance,
|
|
881
884
|
...inputProps
|
|
882
885
|
}),
|
|
886
|
+
error && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
|
|
887
|
+
...errorMessageProps,
|
|
888
|
+
children: error
|
|
889
|
+
}),
|
|
883
890
|
description && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
|
|
884
891
|
lineHeight: "base",
|
|
885
892
|
...descriptionProps,
|
|
@@ -887,10 +894,6 @@ const $491b98ef80f40f98$export$379139ebc1c2b235 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
887
894
|
as: "div",
|
|
888
895
|
size: "sm",
|
|
889
896
|
children: description
|
|
890
|
-
}),
|
|
891
|
-
error && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
|
|
892
|
-
...errorMessageProps,
|
|
893
|
-
children: error
|
|
894
897
|
})
|
|
895
898
|
]
|
|
896
899
|
});
|
|
@@ -2860,7 +2863,7 @@ function $43de550aebbf1320$export$50e381fea3a45244(props) {
|
|
|
2860
2863
|
|
|
2861
2864
|
|
|
2862
2865
|
|
|
2863
|
-
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)=>{
|
|
2866
|
+
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)=>{
|
|
2864
2867
|
const theme = (0, $f2fd0cbe11b7f0dd$export$93d4e7f90805808f)();
|
|
2865
2868
|
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
|
|
2866
2869
|
"data-radius": radius ?? theme?.radius ?? "lg",
|
|
@@ -2872,7 +2875,8 @@ const $fedef2bba4e6812a$export$ea98c603db73aee7 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
2872
2875
|
"data-color": color,
|
|
2873
2876
|
ref: ref,
|
|
2874
2877
|
gap: gap,
|
|
2875
|
-
...props
|
|
2878
|
+
...props,
|
|
2879
|
+
children: children
|
|
2876
2880
|
});
|
|
2877
2881
|
});
|
|
2878
2882
|
$fedef2bba4e6812a$export$ea98c603db73aee7.displayName = "Sticker";
|
|
@@ -3008,11 +3012,14 @@ function $1278141024f0bc4d$var$Dialog({ width: width = 400, title: title, onCanc
|
|
|
3008
3012
|
})
|
|
3009
3013
|
]
|
|
3010
3014
|
}),
|
|
3011
|
-
props.isDismissable && showCloseButton && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)(
|
|
3015
|
+
props.isDismissable && showCloseButton && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("button", {
|
|
3012
3016
|
color: "gray",
|
|
3013
|
-
|
|
3014
|
-
variant: "ghost",
|
|
3015
|
-
|
|
3017
|
+
onClick: handleClose,
|
|
3018
|
+
"data-variant": "ghost",
|
|
3019
|
+
"data-color": "gray",
|
|
3020
|
+
className: "p-button size-sm",
|
|
3021
|
+
"data-radius": "full",
|
|
3022
|
+
"data-icon-button": true,
|
|
3016
3023
|
children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $8zHUo$reacticonshi.HiX), {
|
|
3017
3024
|
size: 18
|
|
3018
3025
|
})
|
|
@@ -3254,4 +3261,109 @@ function $0cdc620c9e9fb79f$export$39299b56cfd4e361({ appearance: appearance = "o
|
|
|
3254
3261
|
|
|
3255
3262
|
|
|
3256
3263
|
|
|
3264
|
+
|
|
3265
|
+
|
|
3266
|
+
|
|
3267
|
+
|
|
3268
|
+
|
|
3269
|
+
|
|
3270
|
+
|
|
3271
|
+
|
|
3272
|
+
function $d26053f02b9f370b$var$Tag(props) {
|
|
3273
|
+
const theme = (0, $f2fd0cbe11b7f0dd$export$93d4e7f90805808f)();
|
|
3274
|
+
const { activeColor: activeColor = theme?.color ?? "gray", activeVariant: activeVariant = "solid", idleColor: idleColor = "gray", idleVariant: idleVariant = "outline", item: item, state: state, autoColor: autoColor } = props;
|
|
3275
|
+
const tagRef = $8zHUo$react.useRef(null);
|
|
3276
|
+
const { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $8zHUo$reactaria.useFocusRing)({
|
|
3277
|
+
within: true
|
|
3278
|
+
});
|
|
3279
|
+
const { rowProps: rowProps, gridCellProps: gridCellProps, isSelected: isSelected } = (0, $8zHUo$reactaria.useTag)(props, state, tagRef);
|
|
3280
|
+
const colors = $8zHUo$react.useMemo(()=>{
|
|
3281
|
+
if (autoColor) {
|
|
3282
|
+
const color = (0, $4af7da5c7dd0b9c2$export$e4369cabd7e84cd9)(item.textValue);
|
|
3283
|
+
return {
|
|
3284
|
+
active: color,
|
|
3285
|
+
idle: color
|
|
3286
|
+
};
|
|
3287
|
+
}
|
|
3288
|
+
return {
|
|
3289
|
+
active: activeColor,
|
|
3290
|
+
idle: idleColor
|
|
3291
|
+
};
|
|
3292
|
+
}, [
|
|
3293
|
+
activeColor,
|
|
3294
|
+
idleColor,
|
|
3295
|
+
autoColor
|
|
3296
|
+
]);
|
|
3297
|
+
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
|
|
3298
|
+
ref: tagRef,
|
|
3299
|
+
...rowProps,
|
|
3300
|
+
...focusProps,
|
|
3301
|
+
"data-focus-visible": isFocusVisible,
|
|
3302
|
+
"data-is-toggle": true,
|
|
3303
|
+
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-button", "size-sm"),
|
|
3304
|
+
"data-variant": isSelected ? activeVariant : idleVariant,
|
|
3305
|
+
"data-radius": "full",
|
|
3306
|
+
"data-color": isSelected ? colors.active : colors.idle,
|
|
3307
|
+
children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
|
|
3308
|
+
...gridCellProps,
|
|
3309
|
+
children: item.rendered
|
|
3310
|
+
})
|
|
3311
|
+
});
|
|
3312
|
+
}
|
|
3313
|
+
function $d26053f02b9f370b$export$67ea30858aaf75e3({ wrap: wrap = "wrap", gap: gap, columnGap: columnGap, rowGap: rowGap, align: align, justify: justify, activeColor: activeColor, activeVariant: activeVariant, idleColor: idleColor, idleVariant: idleVariant, autoColor: autoColor, ...props }) {
|
|
3314
|
+
const { label: label, description: description, errorMessage: errorMessage } = props;
|
|
3315
|
+
const tagGroupRef = $8zHUo$react.useRef(null);
|
|
3316
|
+
const state = (0, $8zHUo$reactstately.useListState)(props);
|
|
3317
|
+
const { gridProps: gridProps, labelProps: labelProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $8zHUo$reactaria.useTagGroup)(props, state, tagGroupRef);
|
|
3318
|
+
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
|
|
3319
|
+
stack: true,
|
|
3320
|
+
className: "tag-group",
|
|
3321
|
+
children: [
|
|
3322
|
+
label && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $5a5b41d120374960$export$2e2bcd8739ae039), {
|
|
3323
|
+
...labelProps,
|
|
3324
|
+
children: label
|
|
3325
|
+
}),
|
|
3326
|
+
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
|
|
3327
|
+
wrap: wrap,
|
|
3328
|
+
gap: gap,
|
|
3329
|
+
columnGap: columnGap,
|
|
3330
|
+
rowGap: rowGap,
|
|
3331
|
+
align: align,
|
|
3332
|
+
justify: justify,
|
|
3333
|
+
ref: tagGroupRef,
|
|
3334
|
+
...gridProps,
|
|
3335
|
+
children: [
|
|
3336
|
+
...state.collection
|
|
3337
|
+
].map((item)=>{
|
|
3338
|
+
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)($d26053f02b9f370b$var$Tag, {
|
|
3339
|
+
autoColor: autoColor,
|
|
3340
|
+
activeColor: activeColor,
|
|
3341
|
+
activeVariant: activeVariant,
|
|
3342
|
+
idleColor: idleColor,
|
|
3343
|
+
idleVariant: idleVariant,
|
|
3344
|
+
state: state,
|
|
3345
|
+
item: item
|
|
3346
|
+
}, item.key);
|
|
3347
|
+
})
|
|
3348
|
+
}),
|
|
3349
|
+
errorMessage && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $4b54f76a59afa8a5$export$2e2bcd8739ae039), {
|
|
3350
|
+
...errorMessageProps,
|
|
3351
|
+
children: errorMessage
|
|
3352
|
+
}),
|
|
3353
|
+
description && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
|
|
3354
|
+
as: "div",
|
|
3355
|
+
...descriptionProps,
|
|
3356
|
+
children: description
|
|
3357
|
+
})
|
|
3358
|
+
]
|
|
3359
|
+
});
|
|
3360
|
+
}
|
|
3361
|
+
const $d26053f02b9f370b$export$a79147a60006308c = (0, $8zHUo$reactstately.Item);
|
|
3362
|
+
|
|
3363
|
+
|
|
3364
|
+
|
|
3365
|
+
|
|
3366
|
+
|
|
3367
|
+
|
|
3368
|
+
|
|
3257
3369
|
//# sourceMappingURL=main.js.map
|