@parrot-co/parrot-ui 0.1.13 → 0.1.15

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 CHANGED
@@ -418,10 +418,6 @@ const $8ddcc69383feb36a$export$b4e0e71242920c6a = {
418
418
  pill: "full",
419
419
  rounded: undefined
420
420
  };
421
- function $8ddcc69383feb36a$var$ps(styles) {
422
- // 1. iterate over the keys of the styles object
423
- // 2. for each key, check is is valid css property
424
- }
425
421
 
426
422
 
427
423
  function $4af7da5c7dd0b9c2$export$1c4d39b152e0f791(deprecatedProp, newProp, value) {
@@ -2071,6 +2067,35 @@ $71fcf48f7e2e9427$export$f8afaea2e9656b91.displayName = "RadioCard";
2071
2067
 
2072
2068
 
2073
2069
 
2070
+ function $60c8e601ab261224$export$371ab307eab489c0({ className: className, style: style, classNames: classNames, styles: styles, ...props }) {
2071
+ const state = $8zHUo$react.useContext((0, $e158c5cf7e190200$export$b118023277d4a5c3));
2072
+ if (!state) throw new Error("RadioItem must be used within a RadioGroup");
2073
+ const ref = $8zHUo$react.useRef(null);
2074
+ const { inputProps: inputProps } = (0, $8zHUo$reactaria.useRadio)(props, state, ref);
2075
+ return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("label", {
2076
+ style: {
2077
+ ...style,
2078
+ ...styles?.wrapper
2079
+ },
2080
+ className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(className, classNames?.wrapper, "p-radio-item"),
2081
+ "data-checked": inputProps.checked,
2082
+ children: [
2083
+ /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $8zHUo$reactaria.VisuallyHidden), {
2084
+ children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("input", {
2085
+ ...inputProps,
2086
+ ref: ref
2087
+ })
2088
+ }),
2089
+ props.children
2090
+ ]
2091
+ });
2092
+ }
2093
+
2094
+
2095
+
2096
+
2097
+
2098
+
2074
2099
 
2075
2100
 
2076
2101
 
@@ -2082,14 +2107,15 @@ $71fcf48f7e2e9427$export$f8afaea2e9656b91.displayName = "RadioCard";
2082
2107
 
2083
2108
 
2084
2109
 
2085
- const $cfadb0728cf907ff$export$3288d34c523a1192 = /*#__PURE__*/ (0, ($parcel$interopDefault($8zHUo$react))).forwardRef(({ prepend: prepend, append: append, children: children, hashValue: hashValue, color: color, size: size = "sm", shape: shape = "rounded", variant: variant = "light", className: className, ...props }, ref)=>{
2110
+ const $cfadb0728cf907ff$export$3288d34c523a1192 = /*#__PURE__*/ (0, ($parcel$interopDefault($8zHUo$react))).forwardRef(({ prepend: prepend, append: append, children: children, hashValue: hashValue, color: color, size: size = "sm", shape: /**@deprecated use radius instead */ shape = "rounded", variant: variant = "light", className: className, radius: radius = "full", ...props }, ref)=>{
2111
+ (0, $4af7da5c7dd0b9c2$export$1c4d39b152e0f791)("shape", "radius", shape);
2086
2112
  const randomColor = (0, ($parcel$interopDefault($8zHUo$react))).useMemo(()=>{
2087
2113
  if (hashValue) return (0, $4af7da5c7dd0b9c2$export$e4369cabd7e84cd9)(hashValue);
2088
2114
  return "gray";
2089
2115
  }, []);
2090
2116
  return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("span", {
2091
2117
  className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(className, "p-tag"),
2092
- "data-radius": (0, $8ddcc69383feb36a$export$b4e0e71242920c6a)[shape],
2118
+ "data-radius": radius,
2093
2119
  "data-size": size,
2094
2120
  "data-color": color ?? randomColor,
2095
2121
  "data-variant": variant,
@@ -2629,7 +2655,7 @@ $e0a58c83d4c36e4e$export$7edc06cf1783b30f.displayName = "DateInput";
2629
2655
 
2630
2656
 
2631
2657
 
2632
- const $2fdd5844efb4cca1$export$e2255cf6045e8d47 = /*#__PURE__*/ $8zHUo$react.forwardRef(({ src: src, alt: alt, name: name, color: color, variant: variant = "light", fallback: fallback, children: children, size: size = "md", shape: shape, className: className, radius: radius = "lg", classNames: classNames, styles: styles, style: style, ...props }, ref)=>{
2658
+ const $2fdd5844efb4cca1$export$e2255cf6045e8d47 = /*#__PURE__*/ $8zHUo$react.forwardRef(({ src: src, alt: alt, name: name, color: color, variant: variant = "light", fallback: fallback, children: children, size: size = "md", shape: shape, className: className, radius: radius = "full", classNames: classNames, styles: styles, style: style, ...props }, ref)=>{
2633
2659
  const [imageError, setImageError] = $8zHUo$react.useState(false);
2634
2660
  const theme = (0, $f2fd0cbe11b7f0dd$export$93d4e7f90805808f)();
2635
2661
  function getAvatarRadius() {