@hilum/ui 3.7.0 → 3.7.1

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
@@ -13826,26 +13826,33 @@ function SearchableTable({
13826
13826
  ] }) }) });
13827
13827
  };
13828
13828
  return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
13829
- /* @__PURE__ */ jsx("div", { className: "md:rounded-lg md:border md:border-border md:bg-muted/30 md:p-3", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2.5 md:flex-row md:flex-wrap md:items-center md:justify-start md:gap-3", children: [
13830
- /* @__PURE__ */ jsx(
13831
- InputGroup,
13832
- {
13833
- placeholder: searchPlaceholder,
13834
- value: searchTerm,
13835
- onChange: (event) => onSearchChange(event.target.value),
13836
- leadingIcon: /* @__PURE__ */ jsx(Search, { className: "size-4" }),
13837
- wrapperClassName: "w-full min-w-0 md:min-w-[280px] md:max-w-[520px] md:flex-1 md:basis-[340px]",
13838
- className: "h-9 bg-background"
13839
- }
13840
- ),
13841
- /* @__PURE__ */ jsx("div", { className: "flex w-full min-w-0 flex-col gap-2 sm:flex-row sm:flex-wrap md:w-auto md:justify-end", children: Object.entries(filters).map(([key, filter]) => /* @__PURE__ */ jsxs(Select, { value: filter.value, onValueChange: filter.onChange, children: [
13842
- /* @__PURE__ */ jsxs(SelectTrigger, { className: "h-9 w-full bg-background sm:w-[180px]", children: [
13843
- /* @__PURE__ */ jsx(Filter, { className: "mr-2 size-4" }),
13844
- /* @__PURE__ */ jsx(SelectValue, { placeholder: filter.placeholder })
13845
- ] }),
13846
- /* @__PURE__ */ jsx(SelectContent, { children: filter.options.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.value, children: option.label }, option.value)) })
13847
- ] }, key)) })
13848
- ] }) }),
13829
+ /* @__PURE__ */ jsxs(
13830
+ "div",
13831
+ {
13832
+ "data-slot": "searchable-table-toolbar",
13833
+ className: "flex flex-col gap-2.5 md:flex-row md:flex-wrap md:items-center md:justify-start md:gap-3",
13834
+ children: [
13835
+ /* @__PURE__ */ jsx(
13836
+ InputGroup,
13837
+ {
13838
+ placeholder: searchPlaceholder,
13839
+ value: searchTerm,
13840
+ onChange: (event) => onSearchChange(event.target.value),
13841
+ leadingIcon: /* @__PURE__ */ jsx(Search, { className: "size-4" }),
13842
+ wrapperClassName: "w-full min-w-0 md:min-w-[280px] md:max-w-[520px] md:flex-1 md:basis-[340px]",
13843
+ className: "h-9 bg-background"
13844
+ }
13845
+ ),
13846
+ /* @__PURE__ */ jsx("div", { className: "flex w-full min-w-0 flex-col gap-2 sm:flex-row sm:flex-wrap md:w-auto md:justify-end", children: Object.entries(filters).map(([key, filter]) => /* @__PURE__ */ jsxs(Select, { value: filter.value, onValueChange: filter.onChange, children: [
13847
+ /* @__PURE__ */ jsxs(SelectTrigger, { className: "h-9 w-full bg-background sm:w-[180px]", children: [
13848
+ /* @__PURE__ */ jsx(Filter, { className: "mr-2 size-4" }),
13849
+ /* @__PURE__ */ jsx(SelectValue, { placeholder: filter.placeholder })
13850
+ ] }),
13851
+ /* @__PURE__ */ jsx(SelectContent, { children: filter.options.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.value, children: option.label }, option.value)) })
13852
+ ] }, key)) })
13853
+ ]
13854
+ }
13855
+ ),
13849
13856
  /* @__PURE__ */ jsx(StackedList, { bordered: false, className: "rounded-none bg-transparent md:hidden", children: displayData.length === 0 ? renderEmptyState("px-0 py-9") : displayData.map((item) => {
13850
13857
  if (mobileCard) {
13851
13858
  return /* @__PURE__ */ jsx(StackedListItem, { className: "px-0 py-0", children: mobileCard(item) }, item.id);
@@ -16127,6 +16134,7 @@ function TitledCard({
16127
16134
  titleClassName
16128
16135
  }) {
16129
16136
  const hasHeader = Boolean(title || subtitle || actionButtons);
16137
+ const hasContent = Boolean(children);
16130
16138
  const canUseCardHeading = Boolean(title) && !actionButtons && !titleClassName;
16131
16139
  const contentPaddingClassName = contentPadding === "flush" ? "p-0" : contentPadding === "flush-mobile" ? "p-0 sm:p-5" : hasHeader ? "p-4 sm:p-5" : "p-0 sm:p-5";
16132
16140
  const isMobileFlat = mobileSurface === "flat" || mobileSurface === "flush";
@@ -16134,11 +16142,7 @@ function TitledCard({
16134
16142
  Card,
16135
16143
  {
16136
16144
  mobileSurface,
16137
- className: cn(
16138
- "min-w-0 overflow-hidden border border-border bg-card shadow-natural",
16139
- containerClassName,
16140
- className
16141
- ),
16145
+ className: cn("min-w-0 overflow-hidden", containerClassName, className),
16142
16146
  "data-slot": "titled-card",
16143
16147
  children: [
16144
16148
  canUseCardHeading ? /* @__PURE__ */ jsx(
@@ -16146,7 +16150,10 @@ function TitledCard({
16146
16150
  {
16147
16151
  title,
16148
16152
  ...subtitle ? { description: subtitle } : {},
16149
- className: cn(isMobileFlat && "max-sm:border-b-0 max-sm:px-0 max-sm:pb-3"),
16153
+ className: cn(
16154
+ !hasContent && "border-b-0",
16155
+ isMobileFlat && "max-sm:border-b-0 max-sm:px-0 max-sm:pb-3"
16156
+ ),
16150
16157
  children: Icon && /* @__PURE__ */ jsx(Icon, { className: "size-5 shrink-0 text-muted-foreground" })
16151
16158
  }
16152
16159
  ) : hasHeader ? /* @__PURE__ */ jsxs(
@@ -16154,6 +16161,7 @@ function TitledCard({
16154
16161
  {
16155
16162
  className: cn(
16156
16163
  "flex flex-col gap-3 border-b border-border p-4 sm:flex-row sm:items-start sm:justify-between sm:p-5",
16164
+ !hasContent && "border-b-0",
16157
16165
  isMobileFlat && "max-sm:border-b-0 max-sm:px-0 max-sm:pb-3"
16158
16166
  ),
16159
16167
  children: [