@parrot-co/parrot-ui 0.0.96 → 0.0.98

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
@@ -1726,11 +1726,13 @@ const $71fcf48f7e2e9427$export$f8afaea2e9656b91 = /*#__PURE__*/ $8zHUo$react.for
1726
1726
  })
1727
1727
  }),
1728
1728
  showIndicator && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
1729
- className: "p-fake-radio",
1729
+ className: "p-radio-card-indicator p-fake-radio",
1730
1730
  "data-size": "sm",
1731
1731
  "data-checked": inputProps.checked
1732
1732
  }),
1733
1733
  /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
1734
+ stretchX: true,
1735
+ className: "p-radio-card-content",
1734
1736
  stack: true,
1735
1737
  gap: "xs",
1736
1738
  children: [
@@ -1811,7 +1813,7 @@ $cfadb0728cf907ff$export$3288d34c523a1192.displayName = "Tag";
1811
1813
 
1812
1814
 
1813
1815
 
1814
- function $e37831ebf64d8e7d$export$ef9b1a59e592288f({ label: label, selectionMode: selectionMode = "single", appearance: appearance = "outline", renderValue: renderValue, color: color = "gray", error: error, description: description, size: size = "sm", radius: radius, listBoxColor: listBoxColor, className: className, value: value, defaultValue: defaultValue, onChange: onChange, ...props }) {
1816
+ function $e37831ebf64d8e7d$export$ef9b1a59e592288f({ label: label, selectionMode: selectionMode = "single", appearance: appearance = "outline", renderValue: renderValue, color: color = "gray", error: error, description: description, size: size = "sm", radius: radius, listBoxColor: listBoxColor, className: className, value: value, defaultValue: defaultValue, onChange: onChange, style: style, ...props }) {
1815
1817
  const isMultiple = selectionMode === "multiple";
1816
1818
  function getValue(value) {
1817
1819
  if (!value) return null;
@@ -1830,7 +1832,6 @@ function $e37831ebf64d8e7d$export$ef9b1a59e592288f({ label: label, selectionMode
1830
1832
  });
1831
1833
  }
1832
1834
  const space = (0, $eae337549f49a5a2$export$450c36e0b0e62ccd)();
1833
- const [isFocused, setIsFocused] = $8zHUo$react.useState(false);
1834
1835
  const triggerState = (0, $8zHUo$reactstately.useMenuTriggerState)({});
1835
1836
  const listState = (0, $8zHUo$reactstately.useListState)({
1836
1837
  ...props,
@@ -1879,29 +1880,11 @@ function $e37831ebf64d8e7d$export$ef9b1a59e592288f({ label: label, selectionMode
1879
1880
  });
1880
1881
  }
1881
1882
  return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $eb8f27c3596a0e6b$export$e71c4d32a2263218), {
1883
+ style: style,
1882
1884
  as: "span",
1883
1885
  position: "relative",
1884
1886
  stretchX: true,
1885
1887
  children: [
1886
- selectionMode === "single" && // Implement a hidden select element to allow for native form submission
1887
- // should work for both single and multiple selection modes
1888
- /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $8zHUo$reactaria.HiddenSelect), {
1889
- triggerRef: triggerRef,
1890
- label: label,
1891
- name: props.name,
1892
- state: {
1893
- selectedItem: selectedItems[0],
1894
- selectedKey: selectedItems[0]?.key,
1895
- setSelectedKey: (key)=>listState.selectionManager.setSelectedKeys([
1896
- key
1897
- ]),
1898
- isFocused: isFocused,
1899
- setFocused: setIsFocused,
1900
- ...listState,
1901
- ...triggerState
1902
- },
1903
- isDisabled: props.isDisabled
1904
- }),
1905
1888
  /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
1906
1889
  "data-radius": radius ?? theme?.radius ?? "lg",
1907
1890
  gap: "3xs",
@@ -2076,6 +2059,20 @@ function $9bce4a3d5b18599c$export$b4085f3d3ede4716(array, keys) {
2076
2059
  }
2077
2060
 
2078
2061
 
2062
+ const $284d30e280d297d3$var$monthsByIndex = [
2063
+ "January",
2064
+ "February",
2065
+ "March",
2066
+ "April",
2067
+ "May",
2068
+ "June",
2069
+ "July",
2070
+ "August",
2071
+ "Septemper",
2072
+ "October",
2073
+ "November",
2074
+ "December"
2075
+ ];
2079
2076
  const $284d30e280d297d3$export$e1aef45b828286de = /*#__PURE__*/ $8zHUo$react.forwardRef(({ numberOfMonths: numberOfMonths = 1, color: color, ...props }, ref)=>{
2080
2077
  const { locale: locale } = (0, $8zHUo$reactaria.useLocale)();
2081
2078
  const state = (0, $8zHUo$reactstately.useCalendarState)({
@@ -2087,6 +2084,25 @@ const $284d30e280d297d3$export$e1aef45b828286de = /*#__PURE__*/ $8zHUo$react.for
2087
2084
  }
2088
2085
  });
2089
2086
  const { calendarProps: calendarProps, prevButtonProps: prevButtonProps, nextButtonProps: nextButtonProps, title: title } = (0, $8zHUo$reactaria.useCalendar)(props, state);
2087
+ console.log(state);
2088
+ // function onMonthChange(month: string) {
2089
+ // state.setValue(
2090
+ // parseDate(
2091
+ // `${state.value.year}-${month.padStart(2, "0")}-${state.value.day
2092
+ // .toString()
2093
+ // .padStart(2, "0")}`
2094
+ // )
2095
+ // );
2096
+ // }
2097
+ // function onYearChange(year: string) {
2098
+ // state.setValue(
2099
+ // parseDate(
2100
+ // `${year}-${state.value.month
2101
+ // .toString()
2102
+ // .padStart(2, "0")}-${state.value.day.toString().padStart(2, "0")}`
2103
+ // )
2104
+ // );
2105
+ // }
2090
2106
  return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
2091
2107
  "data-color": color,
2092
2108
  inline: true,
@@ -2230,12 +2246,12 @@ const $e0a58c83d4c36e4e$export$7edc06cf1783b30f = /*#__PURE__*/ $8zHUo$react.for
2230
2246
  }), value: value, defaultValue: defaultValue, onChange: onChange, ...props }, ref)=>{
2231
2247
  const space = (0, $eae337549f49a5a2$export$450c36e0b0e62ccd)();
2232
2248
  function proxyOnChange(date) {
2233
- onChange?.(date.toString(), date);
2249
+ onChange?.(date?.toString(), date);
2234
2250
  }
2235
2251
  const newProps = {
2236
2252
  ...props,
2237
- value: value ? (0, $8zHUo$internationalizeddate.parseDate)(value) : undefined,
2238
- defaultValue: defaultValue ? (0, $8zHUo$internationalizeddate.parseDate)(defaultValue) : undefined,
2253
+ value: value ? (0, $8zHUo$internationalizeddate.parseDate)(value) : null,
2254
+ defaultValue: defaultValue ? (0, $8zHUo$internationalizeddate.parseDate)(defaultValue) : null,
2239
2255
  onChange: proxyOnChange
2240
2256
  };
2241
2257
  const state = (0, $8zHUo$reactstately.useDatePickerState)(newProps);