@dimaan/ui 0.0.12 → 0.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.cjs +327 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +185 -5
- package/dist/index.d.ts +185 -5
- package/dist/index.js +306 -16
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as React10 from 'react';
|
|
2
|
-
import React10__default, { createContext, forwardRef, Children, isValidElement, cloneElement, useRef, useImperativeHandle, useLayoutEffect, useId,
|
|
2
|
+
import React10__default, { createContext, forwardRef, Children, isValidElement, cloneElement, useRef, useImperativeHandle, useLayoutEffect, useId, useState, useMemo, useCallback, createElement, useEffect, useContext } from 'react';
|
|
3
3
|
import * as ReactDOM from 'react-dom';
|
|
4
4
|
import { DirectionProvider } from '@radix-ui/react-direction';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
7
7
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
8
|
-
import { Loader2, Check, Minus, ChevronDown, ChevronUp, ArrowLeft,
|
|
8
|
+
import { Loader2, Check, Minus, Calendar, X, ChevronLeft, ChevronRight, ChevronDown, ChevronUp, ArrowLeft, Menu, ChevronsUpDown, Search, RefreshCw, Inbox, SearchX } from 'lucide-react';
|
|
9
|
+
import * as RadixPopover from '@radix-ui/react-popover';
|
|
10
|
+
import { DayPicker } from 'react-day-picker';
|
|
9
11
|
import * as RadixDropdown from '@radix-ui/react-dropdown-menu';
|
|
10
12
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
11
13
|
import * as RadixSelect from '@radix-ui/react-select';
|
|
@@ -16096,6 +16098,255 @@ var Checkbox = forwardRef(function Checkbox2({
|
|
|
16096
16098
|
] });
|
|
16097
16099
|
});
|
|
16098
16100
|
|
|
16101
|
+
// src/components/date-picker/datePickerVariants.ts
|
|
16102
|
+
var datePickerTriggerVariantClass = {
|
|
16103
|
+
default: "border border-input bg-background hover:border-ring",
|
|
16104
|
+
filled: "border border-transparent bg-muted hover:bg-muted/80",
|
|
16105
|
+
ghost: "border border-transparent bg-transparent hover:bg-accent"
|
|
16106
|
+
};
|
|
16107
|
+
var datePickerTriggerSizeClass = {
|
|
16108
|
+
sm: "h-8 rounded-md ps-2.5 pe-8 text-sm gap-1.5",
|
|
16109
|
+
md: "h-9 rounded-md ps-3 pe-9 text-sm gap-2",
|
|
16110
|
+
lg: "h-11 rounded-md ps-4 pe-10 text-base gap-2"
|
|
16111
|
+
};
|
|
16112
|
+
var datePickerTriggerBaseClass = "group/datepicker relative inline-flex w-full items-center text-foreground outline-none transition-[background-color,border-color,box-shadow] focus-visible:ring-2 focus-visible:ring-ring/40 focus-visible:ring-offset-1 focus-visible:ring-offset-background aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-visible:ring-destructive/40 disabled:pointer-events-none disabled:opacity-50 cursor-pointer";
|
|
16113
|
+
var datePickerPlaceholderClass = "truncate text-muted-foreground";
|
|
16114
|
+
var datePickerValueClass = "truncate text-foreground";
|
|
16115
|
+
var datePickerContentClass = "z-50 overflow-hidden rounded-md border border-border bg-popover p-3 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95";
|
|
16116
|
+
var datePickerCalendarClass = "text-sm";
|
|
16117
|
+
var datePickerCaptionClass = "flex items-center justify-between gap-2 pb-2 text-sm font-semibold";
|
|
16118
|
+
var datePickerNavButtonClass = "inline-flex h-7 w-7 items-center justify-center rounded-md border border-input bg-background text-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 disabled:pointer-events-none disabled:opacity-50";
|
|
16119
|
+
var datePickerDayWrapperClass = "p-0 text-center";
|
|
16120
|
+
var datePickerDayBaseClass = "inline-flex h-8 w-8 items-center justify-center rounded-md text-sm text-foreground font-normal transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40";
|
|
16121
|
+
var datePickerSelectedClass = "[&_button]:bg-primary [&_button]:text-primary-foreground [&_button]:hover:bg-primary [&_button]:hover:text-primary-foreground";
|
|
16122
|
+
var datePickerTodayClass = "[&_button]:font-semibold [&_button]:ring-1 [&_button]:ring-inset [&_button]:ring-ring/40";
|
|
16123
|
+
var datePickerOutsideClass = "[&_button]:text-muted-foreground [&_button]:opacity-60";
|
|
16124
|
+
var datePickerDisabledClass = "[&_button]:pointer-events-none [&_button]:opacity-40";
|
|
16125
|
+
var datePickerWeekdayClass = "h-8 w-8 text-center text-xs font-medium text-muted-foreground";
|
|
16126
|
+
var datePickerWeekClass = "flex w-full";
|
|
16127
|
+
var datePickerWeekdaysClass = "flex w-full";
|
|
16128
|
+
var datePickerMonthGridClass = "w-full border-collapse";
|
|
16129
|
+
var datePickerMonthsClass = "flex flex-col gap-3";
|
|
16130
|
+
var datePickerMonthClass = "flex flex-col gap-2";
|
|
16131
|
+
var datePickerNavClass = "flex items-center gap-1";
|
|
16132
|
+
var DEFAULT_FORMAT_OPTIONS = { dateStyle: "medium" };
|
|
16133
|
+
var ISO_DATE_PATTERN = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
16134
|
+
var DatePicker = forwardRef(function DatePicker2({
|
|
16135
|
+
variant = "default",
|
|
16136
|
+
inputSize = "md",
|
|
16137
|
+
value: controlledValue,
|
|
16138
|
+
defaultValue,
|
|
16139
|
+
onValueChange,
|
|
16140
|
+
onChange,
|
|
16141
|
+
onBlur,
|
|
16142
|
+
name,
|
|
16143
|
+
id,
|
|
16144
|
+
disabled,
|
|
16145
|
+
required,
|
|
16146
|
+
min,
|
|
16147
|
+
max,
|
|
16148
|
+
placeholder,
|
|
16149
|
+
clearable = true,
|
|
16150
|
+
clearLabel = "Clear date",
|
|
16151
|
+
locale,
|
|
16152
|
+
formatOptions = DEFAULT_FORMAT_OPTIONS,
|
|
16153
|
+
side = "bottom",
|
|
16154
|
+
align = "start",
|
|
16155
|
+
"aria-invalid": ariaInvalid,
|
|
16156
|
+
"aria-describedby": ariaDescribedBy,
|
|
16157
|
+
"aria-label": ariaLabel,
|
|
16158
|
+
className,
|
|
16159
|
+
contentClassName
|
|
16160
|
+
}, ref) {
|
|
16161
|
+
const generatedId = useId();
|
|
16162
|
+
const triggerId = id ?? generatedId;
|
|
16163
|
+
const dir = useDirection();
|
|
16164
|
+
const [open, setOpen] = useState(false);
|
|
16165
|
+
const [internalValue, setInternalValue] = useState(defaultValue ?? "");
|
|
16166
|
+
const isControlled = controlledValue !== void 0;
|
|
16167
|
+
const value = isControlled ? controlledValue : internalValue;
|
|
16168
|
+
const selectedDate = useMemo(() => parseIsoDate(value), [value]);
|
|
16169
|
+
const minDate = useMemo(() => parseIsoDate(min), [min]);
|
|
16170
|
+
const maxDate = useMemo(() => parseIsoDate(max), [max]);
|
|
16171
|
+
const disabledMatcher = useMemo(() => {
|
|
16172
|
+
const matchers = [];
|
|
16173
|
+
if (minDate) matchers.push({ before: minDate });
|
|
16174
|
+
if (maxDate) matchers.push({ after: maxDate });
|
|
16175
|
+
return matchers.length > 0 ? matchers : void 0;
|
|
16176
|
+
}, [minDate, maxDate]);
|
|
16177
|
+
const localeForFormat = readDocumentLocale();
|
|
16178
|
+
const displayValue = useMemo(() => {
|
|
16179
|
+
if (!selectedDate) return null;
|
|
16180
|
+
try {
|
|
16181
|
+
return new Intl.DateTimeFormat(localeForFormat, formatOptions).format(selectedDate);
|
|
16182
|
+
} catch {
|
|
16183
|
+
return formatIsoDate(selectedDate);
|
|
16184
|
+
}
|
|
16185
|
+
}, [selectedDate, localeForFormat, formatOptions]);
|
|
16186
|
+
const emitChange = useCallback(
|
|
16187
|
+
(next) => {
|
|
16188
|
+
if (!isControlled) {
|
|
16189
|
+
setInternalValue(next);
|
|
16190
|
+
}
|
|
16191
|
+
onValueChange?.(next);
|
|
16192
|
+
if (onChange) {
|
|
16193
|
+
const synthetic = {
|
|
16194
|
+
target: { value: next, name },
|
|
16195
|
+
currentTarget: { value: next, name },
|
|
16196
|
+
type: "change"
|
|
16197
|
+
};
|
|
16198
|
+
onChange(synthetic);
|
|
16199
|
+
}
|
|
16200
|
+
},
|
|
16201
|
+
[isControlled, onValueChange, onChange, name]
|
|
16202
|
+
);
|
|
16203
|
+
const handleSelect = useCallback(
|
|
16204
|
+
(date) => {
|
|
16205
|
+
if (!date) {
|
|
16206
|
+
emitChange("");
|
|
16207
|
+
return;
|
|
16208
|
+
}
|
|
16209
|
+
emitChange(formatIsoDate(date));
|
|
16210
|
+
setOpen(false);
|
|
16211
|
+
},
|
|
16212
|
+
[emitChange]
|
|
16213
|
+
);
|
|
16214
|
+
const handleClear = useCallback(
|
|
16215
|
+
(event) => {
|
|
16216
|
+
event.preventDefault();
|
|
16217
|
+
event.stopPropagation();
|
|
16218
|
+
emitChange("");
|
|
16219
|
+
},
|
|
16220
|
+
[emitChange]
|
|
16221
|
+
);
|
|
16222
|
+
const showClear = clearable && !disabled && Boolean(value);
|
|
16223
|
+
const PrevIcon = dir === "rtl" ? ChevronRight : ChevronLeft;
|
|
16224
|
+
const NextIcon = dir === "rtl" ? ChevronLeft : ChevronRight;
|
|
16225
|
+
return /* @__PURE__ */ jsxs(RadixPopover.Root, { open, onOpenChange: setOpen, children: [
|
|
16226
|
+
/* @__PURE__ */ jsxs("div", { className: "relative inline-flex w-full", children: [
|
|
16227
|
+
/* @__PURE__ */ jsx(RadixPopover.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
16228
|
+
"button",
|
|
16229
|
+
{
|
|
16230
|
+
ref,
|
|
16231
|
+
id: triggerId,
|
|
16232
|
+
type: "button",
|
|
16233
|
+
disabled,
|
|
16234
|
+
"aria-label": ariaLabel,
|
|
16235
|
+
"aria-invalid": ariaInvalid,
|
|
16236
|
+
"aria-describedby": ariaDescribedBy,
|
|
16237
|
+
onBlur,
|
|
16238
|
+
"data-slot": "date-picker-trigger",
|
|
16239
|
+
"data-state": open ? "open" : "closed",
|
|
16240
|
+
"data-placeholder": value ? void 0 : "",
|
|
16241
|
+
className: cn(
|
|
16242
|
+
datePickerTriggerBaseClass,
|
|
16243
|
+
datePickerTriggerVariantClass[variant],
|
|
16244
|
+
datePickerTriggerSizeClass[inputSize],
|
|
16245
|
+
showClear && (inputSize === "lg" ? "pe-16" : "pe-14"),
|
|
16246
|
+
className
|
|
16247
|
+
),
|
|
16248
|
+
children: [
|
|
16249
|
+
/* @__PURE__ */ jsx("span", { className: displayValue ? datePickerValueClass : datePickerPlaceholderClass, children: displayValue ?? placeholder ?? "" }),
|
|
16250
|
+
/* @__PURE__ */ jsx(
|
|
16251
|
+
Calendar,
|
|
16252
|
+
{
|
|
16253
|
+
"aria-hidden": "true",
|
|
16254
|
+
className: "pointer-events-none absolute end-3 top-1/2 size-4 shrink-0 -translate-y-1/2 text-muted-foreground"
|
|
16255
|
+
}
|
|
16256
|
+
)
|
|
16257
|
+
]
|
|
16258
|
+
}
|
|
16259
|
+
) }),
|
|
16260
|
+
showClear ? /* @__PURE__ */ jsx(
|
|
16261
|
+
"button",
|
|
16262
|
+
{
|
|
16263
|
+
type: "button",
|
|
16264
|
+
tabIndex: -1,
|
|
16265
|
+
"aria-label": clearLabel,
|
|
16266
|
+
onClick: handleClear,
|
|
16267
|
+
"data-slot": "date-picker-clear",
|
|
16268
|
+
className: "absolute end-9 top-1/2 z-10 inline-flex size-5 -translate-y-1/2 items-center justify-center rounded-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
16269
|
+
children: /* @__PURE__ */ jsx(X, { "aria-hidden": "true", className: "size-3.5" })
|
|
16270
|
+
}
|
|
16271
|
+
) : null,
|
|
16272
|
+
name ? /* @__PURE__ */ jsx("input", { type: "hidden", name, value, required, readOnly: true }) : null
|
|
16273
|
+
] }),
|
|
16274
|
+
/* @__PURE__ */ jsx(RadixPopover.Portal, { children: /* @__PURE__ */ jsx(
|
|
16275
|
+
RadixPopover.Content,
|
|
16276
|
+
{
|
|
16277
|
+
side,
|
|
16278
|
+
align,
|
|
16279
|
+
sideOffset: 4,
|
|
16280
|
+
"data-slot": "date-picker-content",
|
|
16281
|
+
className: cn(datePickerContentClass, contentClassName),
|
|
16282
|
+
onOpenAutoFocus: (autoFocusEvent) => {
|
|
16283
|
+
autoFocusEvent.preventDefault();
|
|
16284
|
+
},
|
|
16285
|
+
children: /* @__PURE__ */ jsx(
|
|
16286
|
+
DayPicker,
|
|
16287
|
+
{
|
|
16288
|
+
mode: "single",
|
|
16289
|
+
dir,
|
|
16290
|
+
selected: selectedDate ?? void 0,
|
|
16291
|
+
defaultMonth: selectedDate ?? void 0,
|
|
16292
|
+
onSelect: handleSelect,
|
|
16293
|
+
disabled: disabledMatcher,
|
|
16294
|
+
locale,
|
|
16295
|
+
showOutsideDays: true,
|
|
16296
|
+
className: datePickerCalendarClass,
|
|
16297
|
+
classNames: {
|
|
16298
|
+
months: datePickerMonthsClass,
|
|
16299
|
+
month: datePickerMonthClass,
|
|
16300
|
+
month_caption: datePickerCaptionClass,
|
|
16301
|
+
nav: datePickerNavClass,
|
|
16302
|
+
button_previous: datePickerNavButtonClass,
|
|
16303
|
+
button_next: datePickerNavButtonClass,
|
|
16304
|
+
month_grid: datePickerMonthGridClass,
|
|
16305
|
+
weekdays: datePickerWeekdaysClass,
|
|
16306
|
+
weekday: datePickerWeekdayClass,
|
|
16307
|
+
week: datePickerWeekClass,
|
|
16308
|
+
day: datePickerDayWrapperClass,
|
|
16309
|
+
day_button: datePickerDayBaseClass,
|
|
16310
|
+
selected: datePickerSelectedClass,
|
|
16311
|
+
today: datePickerTodayClass,
|
|
16312
|
+
outside: datePickerOutsideClass,
|
|
16313
|
+
disabled: datePickerDisabledClass
|
|
16314
|
+
},
|
|
16315
|
+
components: {
|
|
16316
|
+
Chevron: ({ orientation }) => {
|
|
16317
|
+
const Icon2 = orientation === "right" ? NextIcon : PrevIcon;
|
|
16318
|
+
return /* @__PURE__ */ jsx(Icon2, { "aria-hidden": "true", className: "size-4" });
|
|
16319
|
+
}
|
|
16320
|
+
}
|
|
16321
|
+
}
|
|
16322
|
+
)
|
|
16323
|
+
}
|
|
16324
|
+
) })
|
|
16325
|
+
] });
|
|
16326
|
+
});
|
|
16327
|
+
function parseIsoDate(value) {
|
|
16328
|
+
if (!value) return void 0;
|
|
16329
|
+
const match = value.match(ISO_DATE_PATTERN);
|
|
16330
|
+
if (!match) return void 0;
|
|
16331
|
+
const year = Number(match[1]);
|
|
16332
|
+
const month = Number(match[2]) - 1;
|
|
16333
|
+
const day = Number(match[3]);
|
|
16334
|
+
const date = new Date(year, month, day);
|
|
16335
|
+
if (Number.isNaN(date.getTime())) return void 0;
|
|
16336
|
+
return date;
|
|
16337
|
+
}
|
|
16338
|
+
function formatIsoDate(date) {
|
|
16339
|
+
const year = String(date.getFullYear()).padStart(4, "0");
|
|
16340
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
16341
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
16342
|
+
return `${year}-${month}-${day}`;
|
|
16343
|
+
}
|
|
16344
|
+
function readDocumentLocale() {
|
|
16345
|
+
if (typeof document === "undefined") return void 0;
|
|
16346
|
+
const lang = document.documentElement.getAttribute("lang");
|
|
16347
|
+
return lang || void 0;
|
|
16348
|
+
}
|
|
16349
|
+
|
|
16099
16350
|
// src/components/dropdown-menu/dropdownMenuVariants.ts
|
|
16100
16351
|
var dropdownMenuContentClass = "z-50 min-w-32 overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95";
|
|
16101
16352
|
var dropdownMenuItemBaseClass = "relative flex w-full cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0";
|
|
@@ -17185,7 +17436,9 @@ var DEFAULT_LABELS = {
|
|
|
17185
17436
|
searchAriaLabel: "Search",
|
|
17186
17437
|
reset: "Reset filters",
|
|
17187
17438
|
emptyTitle: "No results",
|
|
17188
|
-
emptyDescription: "Try clearing the search or adjusting the filters."
|
|
17439
|
+
emptyDescription: "Try clearing the search or adjusting the filters.",
|
|
17440
|
+
noDataTitle: "No data yet",
|
|
17441
|
+
noDataDescription: "Nothing has been added here so far."
|
|
17189
17442
|
};
|
|
17190
17443
|
var FILTER_WIDTH_CLASS = {
|
|
17191
17444
|
narrow: "w-32",
|
|
@@ -17200,11 +17453,14 @@ function ListPage({
|
|
|
17200
17453
|
data: data2,
|
|
17201
17454
|
columns,
|
|
17202
17455
|
getRowId,
|
|
17456
|
+
isLoading = false,
|
|
17457
|
+
loadingRowCount,
|
|
17203
17458
|
searchKeys,
|
|
17204
17459
|
filters,
|
|
17205
17460
|
enableRowSelection,
|
|
17206
17461
|
bulkActions,
|
|
17207
17462
|
emptyState,
|
|
17463
|
+
noDataState,
|
|
17208
17464
|
labels: labelsProp,
|
|
17209
17465
|
className
|
|
17210
17466
|
}) {
|
|
@@ -17255,6 +17511,7 @@ function ListPage({
|
|
|
17255
17511
|
});
|
|
17256
17512
|
}, [data2, search, searchKeys, filters, filterValues]);
|
|
17257
17513
|
const showFilterBar = Boolean(searchKeys?.length) || Boolean(filters?.length);
|
|
17514
|
+
const tableMode = isLoading ? "loading" : data2.length === 0 && !hasActiveFilters ? "no-data" : filtered.length === 0 ? "no-results" : "rows";
|
|
17258
17515
|
return /* @__PURE__ */ jsxs("div", { "data-slot": "list-page", className: cn("space-y-6", className), children: [
|
|
17259
17516
|
/* @__PURE__ */ jsx(PageHeader, { title, description, bordered, actions }),
|
|
17260
17517
|
showFilterBar ? /* @__PURE__ */ jsxs("div", { "data-slot": "list-page-filter-bar", className: "flex flex-wrap items-center gap-3", children: [
|
|
@@ -17267,7 +17524,8 @@ function ListPage({
|
|
|
17267
17524
|
value: search,
|
|
17268
17525
|
onChange: (e) => setSearch(e.target.value),
|
|
17269
17526
|
leadingIcon: /* @__PURE__ */ jsx(Search, {}),
|
|
17270
|
-
wrapperClassName: "sm:max-w-xs"
|
|
17527
|
+
wrapperClassName: "sm:max-w-xs",
|
|
17528
|
+
disabled: isLoading
|
|
17271
17529
|
}
|
|
17272
17530
|
) : null,
|
|
17273
17531
|
filters?.map((f) => /* @__PURE__ */ jsx(
|
|
@@ -17277,16 +17535,17 @@ function ListPage({
|
|
|
17277
17535
|
value: filterValues[f.key],
|
|
17278
17536
|
onValueChange: (v) => setFilter(f.key, v),
|
|
17279
17537
|
options: f.options,
|
|
17280
|
-
className: FILTER_WIDTH_CLASS[f.width ?? "default"]
|
|
17538
|
+
className: FILTER_WIDTH_CLASS[f.width ?? "default"],
|
|
17539
|
+
disabled: isLoading
|
|
17281
17540
|
},
|
|
17282
17541
|
f.key
|
|
17283
17542
|
)),
|
|
17284
|
-
hasActiveFilters ? /* @__PURE__ */ jsxs(Button, { variant: "ghost", onClick: reset, children: [
|
|
17543
|
+
hasActiveFilters && !isLoading ? /* @__PURE__ */ jsxs(Button, { variant: "ghost", onClick: reset, children: [
|
|
17285
17544
|
/* @__PURE__ */ jsx(RefreshCw, {}),
|
|
17286
17545
|
labels.reset
|
|
17287
17546
|
] }) : null
|
|
17288
17547
|
] }) : null,
|
|
17289
|
-
|
|
17548
|
+
tableMode === "loading" || tableMode === "rows" ? /* @__PURE__ */ jsx(
|
|
17290
17549
|
Table,
|
|
17291
17550
|
{
|
|
17292
17551
|
"aria-label": typeof title === "string" ? title : void 0,
|
|
@@ -17294,17 +17553,48 @@ function ListPage({
|
|
|
17294
17553
|
columns,
|
|
17295
17554
|
getRowId,
|
|
17296
17555
|
enableRowSelection,
|
|
17297
|
-
bulkActions
|
|
17556
|
+
bulkActions,
|
|
17557
|
+
loading: isLoading,
|
|
17558
|
+
loadingRowCount
|
|
17559
|
+
}
|
|
17560
|
+
) : tableMode === "no-data" ? /* @__PURE__ */ jsx(
|
|
17561
|
+
"div",
|
|
17562
|
+
{
|
|
17563
|
+
"data-slot": "list-page-empty",
|
|
17564
|
+
"data-state": "no-data",
|
|
17565
|
+
className: "rounded-md border border-border bg-card",
|
|
17566
|
+
children: /* @__PURE__ */ jsx(
|
|
17567
|
+
EmptyState,
|
|
17568
|
+
{
|
|
17569
|
+
size: "lg",
|
|
17570
|
+
icon: noDataState?.icon ?? /* @__PURE__ */ jsx(Inbox, {}),
|
|
17571
|
+
title: noDataState?.title ?? labels.noDataTitle,
|
|
17572
|
+
description: noDataState?.description ?? labels.noDataDescription,
|
|
17573
|
+
action: noDataState?.action !== void 0 ? noDataState.action : null
|
|
17574
|
+
}
|
|
17575
|
+
)
|
|
17298
17576
|
}
|
|
17299
|
-
) : /* @__PURE__ */ jsx(
|
|
17300
|
-
|
|
17577
|
+
) : /* @__PURE__ */ jsx(
|
|
17578
|
+
"div",
|
|
17301
17579
|
{
|
|
17302
|
-
|
|
17303
|
-
|
|
17304
|
-
|
|
17305
|
-
|
|
17580
|
+
"data-slot": "list-page-empty",
|
|
17581
|
+
"data-state": "no-results",
|
|
17582
|
+
className: "rounded-md border border-border bg-card",
|
|
17583
|
+
children: /* @__PURE__ */ jsx(
|
|
17584
|
+
EmptyState,
|
|
17585
|
+
{
|
|
17586
|
+
size: "lg",
|
|
17587
|
+
icon: emptyState?.icon ?? /* @__PURE__ */ jsx(SearchX, {}),
|
|
17588
|
+
title: emptyState?.title ?? labels.emptyTitle,
|
|
17589
|
+
description: emptyState?.description ?? labels.emptyDescription,
|
|
17590
|
+
action: emptyState?.action !== void 0 ? emptyState.action : /* @__PURE__ */ jsxs(Button, { variant: "outline", onClick: reset, children: [
|
|
17591
|
+
/* @__PURE__ */ jsx(RefreshCw, {}),
|
|
17592
|
+
labels.reset
|
|
17593
|
+
] })
|
|
17594
|
+
}
|
|
17595
|
+
)
|
|
17306
17596
|
}
|
|
17307
|
-
)
|
|
17597
|
+
)
|
|
17308
17598
|
] });
|
|
17309
17599
|
}
|
|
17310
17600
|
|
|
@@ -17603,6 +17893,6 @@ react-router-dom/dist/index.js:
|
|
|
17603
17893
|
*)
|
|
17604
17894
|
*/
|
|
17605
17895
|
|
|
17606
|
-
export { AppShell, Avatar, Badge, Button, Checkbox, DashboardContent, DashboardHeader, DashboardLayout, DashboardMain, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, EmptyState, Field, HeaderActions, HeaderCollapseTrigger, HeaderMobileTrigger, HeaderSearch, HeaderTitle, Input, LanguageSwitcher, ListPage, PageHeader, RadioGroup, RadioGroupItem, Select, Sidebar, SidebarFooter, SidebarGroup, SidebarHeader, SidebarNav, SidebarNavGroup, SidebarNavItem, Switch, Table, Textarea, badgeBaseClass, badgeDotSizeClass, badgeSizeClass, badgeVariantClass, buttonBaseClass, buttonSizeClass, buttonVariantClass, cn, dropdownMenuContentClass, dropdownMenuItemBaseClass, dropdownMenuItemInsetClass, dropdownMenuItemVariantClass, dropdownMenuLabelClass, dropdownMenuSeparatorClass, dropdownMenuShortcutClass, emptyStateActionsSpacingClass, emptyStateBaseClass, emptyStateContainerSizeClass, emptyStateDescriptionSizeClass, emptyStateIconWrapperBaseClass, emptyStateIconWrapperSizeClass, emptyStateTitleSizeClass, inputBaseClass, inputSizeClass, inputVariantClass, pageHeaderActionsClass, pageHeaderBackClass, pageHeaderBackIconClass, pageHeaderBaseClass, pageHeaderBorderedClass, pageHeaderBreadcrumbsClass, pageHeaderDescriptionClass, pageHeaderTitleBlockClass, pageHeaderTitleClass, pageHeaderTitleRowClass, radioGroupBaseClass, radioGroupOrientationClass, radioIndicatorBaseClass, radioIndicatorDotClass, radioIndicatorSizeClass, radioItemBaseClass, radioItemSizeClass, radioLabelSizeClass, radioOptionRowClass, selectBaseClass, selectSizeClass, selectVariantClass, switchThumbBaseClass, switchThumbClass, switchTrackBaseClass, switchTrackClass, alignClass as tableAlignClass, tableBaseClass, selectedRowClass as tableSelectedRowClass, tableSizeClass, sortIconClass as tableSortIconClass, textareaBaseClass, textareaResizeClass, textareaSizeClass, textareaVariantClass, useDashboardLayout, useDirection };
|
|
17896
|
+
export { AppShell, Avatar, Badge, Button, Checkbox, DashboardContent, DashboardHeader, DashboardLayout, DashboardMain, DatePicker, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, EmptyState, Field, HeaderActions, HeaderCollapseTrigger, HeaderMobileTrigger, HeaderSearch, HeaderTitle, Input, LanguageSwitcher, ListPage, PageHeader, RadioGroup, RadioGroupItem, Select, Sidebar, SidebarFooter, SidebarGroup, SidebarHeader, SidebarNav, SidebarNavGroup, SidebarNavItem, Switch, Table, Textarea, badgeBaseClass, badgeDotSizeClass, badgeSizeClass, badgeVariantClass, buttonBaseClass, buttonSizeClass, buttonVariantClass, cn, datePickerCalendarClass, datePickerCaptionClass, datePickerContentClass, datePickerDayBaseClass, datePickerDayWrapperClass, datePickerDisabledClass, datePickerMonthClass, datePickerMonthGridClass, datePickerMonthsClass, datePickerNavButtonClass, datePickerNavClass, datePickerOutsideClass, datePickerPlaceholderClass, datePickerSelectedClass, datePickerTodayClass, datePickerTriggerBaseClass, datePickerTriggerSizeClass, datePickerTriggerVariantClass, datePickerValueClass, datePickerWeekClass, datePickerWeekdayClass, datePickerWeekdaysClass, dropdownMenuContentClass, dropdownMenuItemBaseClass, dropdownMenuItemInsetClass, dropdownMenuItemVariantClass, dropdownMenuLabelClass, dropdownMenuSeparatorClass, dropdownMenuShortcutClass, emptyStateActionsSpacingClass, emptyStateBaseClass, emptyStateContainerSizeClass, emptyStateDescriptionSizeClass, emptyStateIconWrapperBaseClass, emptyStateIconWrapperSizeClass, emptyStateTitleSizeClass, inputBaseClass, inputSizeClass, inputVariantClass, pageHeaderActionsClass, pageHeaderBackClass, pageHeaderBackIconClass, pageHeaderBaseClass, pageHeaderBorderedClass, pageHeaderBreadcrumbsClass, pageHeaderDescriptionClass, pageHeaderTitleBlockClass, pageHeaderTitleClass, pageHeaderTitleRowClass, radioGroupBaseClass, radioGroupOrientationClass, radioIndicatorBaseClass, radioIndicatorDotClass, radioIndicatorSizeClass, radioItemBaseClass, radioItemSizeClass, radioLabelSizeClass, radioOptionRowClass, selectBaseClass, selectSizeClass, selectVariantClass, switchThumbBaseClass, switchThumbClass, switchTrackBaseClass, switchTrackClass, alignClass as tableAlignClass, tableBaseClass, selectedRowClass as tableSelectedRowClass, tableSizeClass, sortIconClass as tableSortIconClass, textareaBaseClass, textareaResizeClass, textareaSizeClass, textareaVariantClass, useDashboardLayout, useDirection };
|
|
17607
17897
|
//# sourceMappingURL=index.js.map
|
|
17608
17898
|
//# sourceMappingURL=index.js.map
|