braid-ui 1.0.11 → 1.0.13

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/index.js CHANGED
@@ -5778,14 +5778,16 @@ function DatePicker({
5778
5778
  buttonClassName,
5779
5779
  calendarClassName,
5780
5780
  align = "start",
5781
- disabledDates
5781
+ disabledDates,
5782
+ label,
5783
+ wrapperClassName
5782
5784
  }) {
5783
5785
  const [open, setOpen] = React15.useState(false);
5784
5786
  const handleSelect = (selectedDate) => {
5785
5787
  onDateChange?.(selectedDate);
5786
5788
  setOpen(false);
5787
5789
  };
5788
- return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
5790
+ const picker = /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
5789
5791
  /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
5790
5792
  Button,
5791
5793
  {
@@ -5814,6 +5816,13 @@ function DatePicker({
5814
5816
  }
5815
5817
  ) })
5816
5818
  ] });
5819
+ if (label) {
5820
+ return /* @__PURE__ */ jsxs("div", { className: cn("space-y-2", wrapperClassName), children: [
5821
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: label }),
5822
+ picker
5823
+ ] });
5824
+ }
5825
+ return picker;
5817
5826
  }
5818
5827
  function DataTable({
5819
5828
  columns: columns2,
@@ -6065,30 +6074,26 @@ var StatementView = ({
6065
6074
  onChange: (e) => onAccountNumberChange(e.target.value)
6066
6075
  }
6067
6076
  ),
6068
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
6069
- /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Start Date" }),
6070
- /* @__PURE__ */ jsx(
6071
- DatePicker,
6072
- {
6073
- date: startDate,
6074
- onDateChange: onStartDateChange,
6075
- placeholder: "Select start date",
6076
- buttonClassName: "w-full"
6077
- }
6078
- )
6079
- ] }),
6080
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
6081
- /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "End Date" }),
6082
- /* @__PURE__ */ jsx(
6083
- DatePicker,
6084
- {
6085
- date: endDate,
6086
- onDateChange: onEndDateChange,
6087
- placeholder: "Select end date",
6088
- buttonClassName: "w-full"
6089
- }
6090
- )
6091
- ] })
6077
+ /* @__PURE__ */ jsx(
6078
+ DatePicker,
6079
+ {
6080
+ label: "Start Date",
6081
+ date: startDate,
6082
+ onDateChange: onStartDateChange,
6083
+ placeholder: "Select start date",
6084
+ buttonClassName: "w-full"
6085
+ }
6086
+ ),
6087
+ /* @__PURE__ */ jsx(
6088
+ DatePicker,
6089
+ {
6090
+ label: "End Date",
6091
+ date: endDate,
6092
+ onDateChange: onEndDateChange,
6093
+ placeholder: "Select end date",
6094
+ buttonClassName: "w-full"
6095
+ }
6096
+ )
6092
6097
  ] }),
6093
6098
  /* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxs(
6094
6099
  Button,