@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.cjs
CHANGED
|
@@ -7,6 +7,8 @@ var clsx = require('clsx');
|
|
|
7
7
|
var tailwindMerge = require('tailwind-merge');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
9
|
var lucideReact = require('lucide-react');
|
|
10
|
+
var RadixPopover = require('@radix-ui/react-popover');
|
|
11
|
+
var reactDayPicker = require('react-day-picker');
|
|
10
12
|
var RadixDropdown = require('@radix-ui/react-dropdown-menu');
|
|
11
13
|
var reactHookForm = require('react-hook-form');
|
|
12
14
|
var RadixSelect = require('@radix-ui/react-select');
|
|
@@ -33,6 +35,7 @@ function _interopNamespace(e) {
|
|
|
33
35
|
|
|
34
36
|
var React10__namespace = /*#__PURE__*/_interopNamespace(React10);
|
|
35
37
|
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
38
|
+
var RadixPopover__namespace = /*#__PURE__*/_interopNamespace(RadixPopover);
|
|
36
39
|
var RadixDropdown__namespace = /*#__PURE__*/_interopNamespace(RadixDropdown);
|
|
37
40
|
var RadixSelect__namespace = /*#__PURE__*/_interopNamespace(RadixSelect);
|
|
38
41
|
var RadixRadioGroup__namespace = /*#__PURE__*/_interopNamespace(RadixRadioGroup);
|
|
@@ -16122,6 +16125,255 @@ var Checkbox = React10.forwardRef(function Checkbox2({
|
|
|
16122
16125
|
] });
|
|
16123
16126
|
});
|
|
16124
16127
|
|
|
16128
|
+
// src/components/date-picker/datePickerVariants.ts
|
|
16129
|
+
var datePickerTriggerVariantClass = {
|
|
16130
|
+
default: "border border-input bg-background hover:border-ring",
|
|
16131
|
+
filled: "border border-transparent bg-muted hover:bg-muted/80",
|
|
16132
|
+
ghost: "border border-transparent bg-transparent hover:bg-accent"
|
|
16133
|
+
};
|
|
16134
|
+
var datePickerTriggerSizeClass = {
|
|
16135
|
+
sm: "h-8 rounded-md ps-2.5 pe-8 text-sm gap-1.5",
|
|
16136
|
+
md: "h-9 rounded-md ps-3 pe-9 text-sm gap-2",
|
|
16137
|
+
lg: "h-11 rounded-md ps-4 pe-10 text-base gap-2"
|
|
16138
|
+
};
|
|
16139
|
+
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";
|
|
16140
|
+
var datePickerPlaceholderClass = "truncate text-muted-foreground";
|
|
16141
|
+
var datePickerValueClass = "truncate text-foreground";
|
|
16142
|
+
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";
|
|
16143
|
+
var datePickerCalendarClass = "text-sm";
|
|
16144
|
+
var datePickerCaptionClass = "flex items-center justify-between gap-2 pb-2 text-sm font-semibold";
|
|
16145
|
+
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";
|
|
16146
|
+
var datePickerDayWrapperClass = "p-0 text-center";
|
|
16147
|
+
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";
|
|
16148
|
+
var datePickerSelectedClass = "[&_button]:bg-primary [&_button]:text-primary-foreground [&_button]:hover:bg-primary [&_button]:hover:text-primary-foreground";
|
|
16149
|
+
var datePickerTodayClass = "[&_button]:font-semibold [&_button]:ring-1 [&_button]:ring-inset [&_button]:ring-ring/40";
|
|
16150
|
+
var datePickerOutsideClass = "[&_button]:text-muted-foreground [&_button]:opacity-60";
|
|
16151
|
+
var datePickerDisabledClass = "[&_button]:pointer-events-none [&_button]:opacity-40";
|
|
16152
|
+
var datePickerWeekdayClass = "h-8 w-8 text-center text-xs font-medium text-muted-foreground";
|
|
16153
|
+
var datePickerWeekClass = "flex w-full";
|
|
16154
|
+
var datePickerWeekdaysClass = "flex w-full";
|
|
16155
|
+
var datePickerMonthGridClass = "w-full border-collapse";
|
|
16156
|
+
var datePickerMonthsClass = "flex flex-col gap-3";
|
|
16157
|
+
var datePickerMonthClass = "flex flex-col gap-2";
|
|
16158
|
+
var datePickerNavClass = "flex items-center gap-1";
|
|
16159
|
+
var DEFAULT_FORMAT_OPTIONS = { dateStyle: "medium" };
|
|
16160
|
+
var ISO_DATE_PATTERN = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
16161
|
+
var DatePicker = React10.forwardRef(function DatePicker2({
|
|
16162
|
+
variant = "default",
|
|
16163
|
+
inputSize = "md",
|
|
16164
|
+
value: controlledValue,
|
|
16165
|
+
defaultValue,
|
|
16166
|
+
onValueChange,
|
|
16167
|
+
onChange,
|
|
16168
|
+
onBlur,
|
|
16169
|
+
name,
|
|
16170
|
+
id,
|
|
16171
|
+
disabled,
|
|
16172
|
+
required,
|
|
16173
|
+
min,
|
|
16174
|
+
max,
|
|
16175
|
+
placeholder,
|
|
16176
|
+
clearable = true,
|
|
16177
|
+
clearLabel = "Clear date",
|
|
16178
|
+
locale,
|
|
16179
|
+
formatOptions = DEFAULT_FORMAT_OPTIONS,
|
|
16180
|
+
side = "bottom",
|
|
16181
|
+
align = "start",
|
|
16182
|
+
"aria-invalid": ariaInvalid,
|
|
16183
|
+
"aria-describedby": ariaDescribedBy,
|
|
16184
|
+
"aria-label": ariaLabel,
|
|
16185
|
+
className,
|
|
16186
|
+
contentClassName
|
|
16187
|
+
}, ref) {
|
|
16188
|
+
const generatedId = React10.useId();
|
|
16189
|
+
const triggerId = id ?? generatedId;
|
|
16190
|
+
const dir = useDirection();
|
|
16191
|
+
const [open, setOpen] = React10.useState(false);
|
|
16192
|
+
const [internalValue, setInternalValue] = React10.useState(defaultValue ?? "");
|
|
16193
|
+
const isControlled = controlledValue !== void 0;
|
|
16194
|
+
const value = isControlled ? controlledValue : internalValue;
|
|
16195
|
+
const selectedDate = React10.useMemo(() => parseIsoDate(value), [value]);
|
|
16196
|
+
const minDate = React10.useMemo(() => parseIsoDate(min), [min]);
|
|
16197
|
+
const maxDate = React10.useMemo(() => parseIsoDate(max), [max]);
|
|
16198
|
+
const disabledMatcher = React10.useMemo(() => {
|
|
16199
|
+
const matchers = [];
|
|
16200
|
+
if (minDate) matchers.push({ before: minDate });
|
|
16201
|
+
if (maxDate) matchers.push({ after: maxDate });
|
|
16202
|
+
return matchers.length > 0 ? matchers : void 0;
|
|
16203
|
+
}, [minDate, maxDate]);
|
|
16204
|
+
const localeForFormat = readDocumentLocale();
|
|
16205
|
+
const displayValue = React10.useMemo(() => {
|
|
16206
|
+
if (!selectedDate) return null;
|
|
16207
|
+
try {
|
|
16208
|
+
return new Intl.DateTimeFormat(localeForFormat, formatOptions).format(selectedDate);
|
|
16209
|
+
} catch {
|
|
16210
|
+
return formatIsoDate(selectedDate);
|
|
16211
|
+
}
|
|
16212
|
+
}, [selectedDate, localeForFormat, formatOptions]);
|
|
16213
|
+
const emitChange = React10.useCallback(
|
|
16214
|
+
(next) => {
|
|
16215
|
+
if (!isControlled) {
|
|
16216
|
+
setInternalValue(next);
|
|
16217
|
+
}
|
|
16218
|
+
onValueChange?.(next);
|
|
16219
|
+
if (onChange) {
|
|
16220
|
+
const synthetic = {
|
|
16221
|
+
target: { value: next, name },
|
|
16222
|
+
currentTarget: { value: next, name },
|
|
16223
|
+
type: "change"
|
|
16224
|
+
};
|
|
16225
|
+
onChange(synthetic);
|
|
16226
|
+
}
|
|
16227
|
+
},
|
|
16228
|
+
[isControlled, onValueChange, onChange, name]
|
|
16229
|
+
);
|
|
16230
|
+
const handleSelect = React10.useCallback(
|
|
16231
|
+
(date) => {
|
|
16232
|
+
if (!date) {
|
|
16233
|
+
emitChange("");
|
|
16234
|
+
return;
|
|
16235
|
+
}
|
|
16236
|
+
emitChange(formatIsoDate(date));
|
|
16237
|
+
setOpen(false);
|
|
16238
|
+
},
|
|
16239
|
+
[emitChange]
|
|
16240
|
+
);
|
|
16241
|
+
const handleClear = React10.useCallback(
|
|
16242
|
+
(event) => {
|
|
16243
|
+
event.preventDefault();
|
|
16244
|
+
event.stopPropagation();
|
|
16245
|
+
emitChange("");
|
|
16246
|
+
},
|
|
16247
|
+
[emitChange]
|
|
16248
|
+
);
|
|
16249
|
+
const showClear = clearable && !disabled && Boolean(value);
|
|
16250
|
+
const PrevIcon = dir === "rtl" ? lucideReact.ChevronRight : lucideReact.ChevronLeft;
|
|
16251
|
+
const NextIcon = dir === "rtl" ? lucideReact.ChevronLeft : lucideReact.ChevronRight;
|
|
16252
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RadixPopover__namespace.Root, { open, onOpenChange: setOpen, children: [
|
|
16253
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative inline-flex w-full", children: [
|
|
16254
|
+
/* @__PURE__ */ jsxRuntime.jsx(RadixPopover__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16255
|
+
"button",
|
|
16256
|
+
{
|
|
16257
|
+
ref,
|
|
16258
|
+
id: triggerId,
|
|
16259
|
+
type: "button",
|
|
16260
|
+
disabled,
|
|
16261
|
+
"aria-label": ariaLabel,
|
|
16262
|
+
"aria-invalid": ariaInvalid,
|
|
16263
|
+
"aria-describedby": ariaDescribedBy,
|
|
16264
|
+
onBlur,
|
|
16265
|
+
"data-slot": "date-picker-trigger",
|
|
16266
|
+
"data-state": open ? "open" : "closed",
|
|
16267
|
+
"data-placeholder": value ? void 0 : "",
|
|
16268
|
+
className: cn(
|
|
16269
|
+
datePickerTriggerBaseClass,
|
|
16270
|
+
datePickerTriggerVariantClass[variant],
|
|
16271
|
+
datePickerTriggerSizeClass[inputSize],
|
|
16272
|
+
showClear && (inputSize === "lg" ? "pe-16" : "pe-14"),
|
|
16273
|
+
className
|
|
16274
|
+
),
|
|
16275
|
+
children: [
|
|
16276
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: displayValue ? datePickerValueClass : datePickerPlaceholderClass, children: displayValue ?? placeholder ?? "" }),
|
|
16277
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16278
|
+
lucideReact.Calendar,
|
|
16279
|
+
{
|
|
16280
|
+
"aria-hidden": "true",
|
|
16281
|
+
className: "pointer-events-none absolute end-3 top-1/2 size-4 shrink-0 -translate-y-1/2 text-muted-foreground"
|
|
16282
|
+
}
|
|
16283
|
+
)
|
|
16284
|
+
]
|
|
16285
|
+
}
|
|
16286
|
+
) }),
|
|
16287
|
+
showClear ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
16288
|
+
"button",
|
|
16289
|
+
{
|
|
16290
|
+
type: "button",
|
|
16291
|
+
tabIndex: -1,
|
|
16292
|
+
"aria-label": clearLabel,
|
|
16293
|
+
onClick: handleClear,
|
|
16294
|
+
"data-slot": "date-picker-clear",
|
|
16295
|
+
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",
|
|
16296
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { "aria-hidden": "true", className: "size-3.5" })
|
|
16297
|
+
}
|
|
16298
|
+
) : null,
|
|
16299
|
+
name ? /* @__PURE__ */ jsxRuntime.jsx("input", { type: "hidden", name, value, required, readOnly: true }) : null
|
|
16300
|
+
] }),
|
|
16301
|
+
/* @__PURE__ */ jsxRuntime.jsx(RadixPopover__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
16302
|
+
RadixPopover__namespace.Content,
|
|
16303
|
+
{
|
|
16304
|
+
side,
|
|
16305
|
+
align,
|
|
16306
|
+
sideOffset: 4,
|
|
16307
|
+
"data-slot": "date-picker-content",
|
|
16308
|
+
className: cn(datePickerContentClass, contentClassName),
|
|
16309
|
+
onOpenAutoFocus: (autoFocusEvent) => {
|
|
16310
|
+
autoFocusEvent.preventDefault();
|
|
16311
|
+
},
|
|
16312
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
16313
|
+
reactDayPicker.DayPicker,
|
|
16314
|
+
{
|
|
16315
|
+
mode: "single",
|
|
16316
|
+
dir,
|
|
16317
|
+
selected: selectedDate ?? void 0,
|
|
16318
|
+
defaultMonth: selectedDate ?? void 0,
|
|
16319
|
+
onSelect: handleSelect,
|
|
16320
|
+
disabled: disabledMatcher,
|
|
16321
|
+
locale,
|
|
16322
|
+
showOutsideDays: true,
|
|
16323
|
+
className: datePickerCalendarClass,
|
|
16324
|
+
classNames: {
|
|
16325
|
+
months: datePickerMonthsClass,
|
|
16326
|
+
month: datePickerMonthClass,
|
|
16327
|
+
month_caption: datePickerCaptionClass,
|
|
16328
|
+
nav: datePickerNavClass,
|
|
16329
|
+
button_previous: datePickerNavButtonClass,
|
|
16330
|
+
button_next: datePickerNavButtonClass,
|
|
16331
|
+
month_grid: datePickerMonthGridClass,
|
|
16332
|
+
weekdays: datePickerWeekdaysClass,
|
|
16333
|
+
weekday: datePickerWeekdayClass,
|
|
16334
|
+
week: datePickerWeekClass,
|
|
16335
|
+
day: datePickerDayWrapperClass,
|
|
16336
|
+
day_button: datePickerDayBaseClass,
|
|
16337
|
+
selected: datePickerSelectedClass,
|
|
16338
|
+
today: datePickerTodayClass,
|
|
16339
|
+
outside: datePickerOutsideClass,
|
|
16340
|
+
disabled: datePickerDisabledClass
|
|
16341
|
+
},
|
|
16342
|
+
components: {
|
|
16343
|
+
Chevron: ({ orientation }) => {
|
|
16344
|
+
const Icon2 = orientation === "right" ? NextIcon : PrevIcon;
|
|
16345
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Icon2, { "aria-hidden": "true", className: "size-4" });
|
|
16346
|
+
}
|
|
16347
|
+
}
|
|
16348
|
+
}
|
|
16349
|
+
)
|
|
16350
|
+
}
|
|
16351
|
+
) })
|
|
16352
|
+
] });
|
|
16353
|
+
});
|
|
16354
|
+
function parseIsoDate(value) {
|
|
16355
|
+
if (!value) return void 0;
|
|
16356
|
+
const match = value.match(ISO_DATE_PATTERN);
|
|
16357
|
+
if (!match) return void 0;
|
|
16358
|
+
const year = Number(match[1]);
|
|
16359
|
+
const month = Number(match[2]) - 1;
|
|
16360
|
+
const day = Number(match[3]);
|
|
16361
|
+
const date = new Date(year, month, day);
|
|
16362
|
+
if (Number.isNaN(date.getTime())) return void 0;
|
|
16363
|
+
return date;
|
|
16364
|
+
}
|
|
16365
|
+
function formatIsoDate(date) {
|
|
16366
|
+
const year = String(date.getFullYear()).padStart(4, "0");
|
|
16367
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
16368
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
16369
|
+
return `${year}-${month}-${day}`;
|
|
16370
|
+
}
|
|
16371
|
+
function readDocumentLocale() {
|
|
16372
|
+
if (typeof document === "undefined") return void 0;
|
|
16373
|
+
const lang = document.documentElement.getAttribute("lang");
|
|
16374
|
+
return lang || void 0;
|
|
16375
|
+
}
|
|
16376
|
+
|
|
16125
16377
|
// src/components/dropdown-menu/dropdownMenuVariants.ts
|
|
16126
16378
|
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";
|
|
16127
16379
|
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";
|
|
@@ -17211,7 +17463,9 @@ var DEFAULT_LABELS = {
|
|
|
17211
17463
|
searchAriaLabel: "Search",
|
|
17212
17464
|
reset: "Reset filters",
|
|
17213
17465
|
emptyTitle: "No results",
|
|
17214
|
-
emptyDescription: "Try clearing the search or adjusting the filters."
|
|
17466
|
+
emptyDescription: "Try clearing the search or adjusting the filters.",
|
|
17467
|
+
noDataTitle: "No data yet",
|
|
17468
|
+
noDataDescription: "Nothing has been added here so far."
|
|
17215
17469
|
};
|
|
17216
17470
|
var FILTER_WIDTH_CLASS = {
|
|
17217
17471
|
narrow: "w-32",
|
|
@@ -17226,11 +17480,14 @@ function ListPage({
|
|
|
17226
17480
|
data: data2,
|
|
17227
17481
|
columns,
|
|
17228
17482
|
getRowId,
|
|
17483
|
+
isLoading = false,
|
|
17484
|
+
loadingRowCount,
|
|
17229
17485
|
searchKeys,
|
|
17230
17486
|
filters,
|
|
17231
17487
|
enableRowSelection,
|
|
17232
17488
|
bulkActions,
|
|
17233
17489
|
emptyState,
|
|
17490
|
+
noDataState,
|
|
17234
17491
|
labels: labelsProp,
|
|
17235
17492
|
className
|
|
17236
17493
|
}) {
|
|
@@ -17281,6 +17538,7 @@ function ListPage({
|
|
|
17281
17538
|
});
|
|
17282
17539
|
}, [data2, search, searchKeys, filters, filterValues]);
|
|
17283
17540
|
const showFilterBar = Boolean(searchKeys?.length) || Boolean(filters?.length);
|
|
17541
|
+
const tableMode = isLoading ? "loading" : data2.length === 0 && !hasActiveFilters ? "no-data" : filtered.length === 0 ? "no-results" : "rows";
|
|
17284
17542
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "list-page", className: cn("space-y-6", className), children: [
|
|
17285
17543
|
/* @__PURE__ */ jsxRuntime.jsx(PageHeader, { title, description, bordered, actions }),
|
|
17286
17544
|
showFilterBar ? /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "list-page-filter-bar", className: "flex flex-wrap items-center gap-3", children: [
|
|
@@ -17293,7 +17551,8 @@ function ListPage({
|
|
|
17293
17551
|
value: search,
|
|
17294
17552
|
onChange: (e) => setSearch(e.target.value),
|
|
17295
17553
|
leadingIcon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, {}),
|
|
17296
|
-
wrapperClassName: "sm:max-w-xs"
|
|
17554
|
+
wrapperClassName: "sm:max-w-xs",
|
|
17555
|
+
disabled: isLoading
|
|
17297
17556
|
}
|
|
17298
17557
|
) : null,
|
|
17299
17558
|
filters?.map((f) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17303,16 +17562,17 @@ function ListPage({
|
|
|
17303
17562
|
value: filterValues[f.key],
|
|
17304
17563
|
onValueChange: (v) => setFilter(f.key, v),
|
|
17305
17564
|
options: f.options,
|
|
17306
|
-
className: FILTER_WIDTH_CLASS[f.width ?? "default"]
|
|
17565
|
+
className: FILTER_WIDTH_CLASS[f.width ?? "default"],
|
|
17566
|
+
disabled: isLoading
|
|
17307
17567
|
},
|
|
17308
17568
|
f.key
|
|
17309
17569
|
)),
|
|
17310
|
-
hasActiveFilters ? /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", onClick: reset, children: [
|
|
17570
|
+
hasActiveFilters && !isLoading ? /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", onClick: reset, children: [
|
|
17311
17571
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, {}),
|
|
17312
17572
|
labels.reset
|
|
17313
17573
|
] }) : null
|
|
17314
17574
|
] }) : null,
|
|
17315
|
-
|
|
17575
|
+
tableMode === "loading" || tableMode === "rows" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
17316
17576
|
Table,
|
|
17317
17577
|
{
|
|
17318
17578
|
"aria-label": typeof title === "string" ? title : void 0,
|
|
@@ -17320,17 +17580,48 @@ function ListPage({
|
|
|
17320
17580
|
columns,
|
|
17321
17581
|
getRowId,
|
|
17322
17582
|
enableRowSelection,
|
|
17323
|
-
bulkActions
|
|
17583
|
+
bulkActions,
|
|
17584
|
+
loading: isLoading,
|
|
17585
|
+
loadingRowCount
|
|
17586
|
+
}
|
|
17587
|
+
) : tableMode === "no-data" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
17588
|
+
"div",
|
|
17589
|
+
{
|
|
17590
|
+
"data-slot": "list-page-empty",
|
|
17591
|
+
"data-state": "no-data",
|
|
17592
|
+
className: "rounded-md border border-border bg-card",
|
|
17593
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17594
|
+
EmptyState,
|
|
17595
|
+
{
|
|
17596
|
+
size: "lg",
|
|
17597
|
+
icon: noDataState?.icon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Inbox, {}),
|
|
17598
|
+
title: noDataState?.title ?? labels.noDataTitle,
|
|
17599
|
+
description: noDataState?.description ?? labels.noDataDescription,
|
|
17600
|
+
action: noDataState?.action !== void 0 ? noDataState.action : null
|
|
17601
|
+
}
|
|
17602
|
+
)
|
|
17324
17603
|
}
|
|
17325
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
17326
|
-
|
|
17604
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
17605
|
+
"div",
|
|
17327
17606
|
{
|
|
17328
|
-
|
|
17329
|
-
|
|
17330
|
-
|
|
17331
|
-
|
|
17607
|
+
"data-slot": "list-page-empty",
|
|
17608
|
+
"data-state": "no-results",
|
|
17609
|
+
className: "rounded-md border border-border bg-card",
|
|
17610
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17611
|
+
EmptyState,
|
|
17612
|
+
{
|
|
17613
|
+
size: "lg",
|
|
17614
|
+
icon: emptyState?.icon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchX, {}),
|
|
17615
|
+
title: emptyState?.title ?? labels.emptyTitle,
|
|
17616
|
+
description: emptyState?.description ?? labels.emptyDescription,
|
|
17617
|
+
action: emptyState?.action !== void 0 ? emptyState.action : /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", onClick: reset, children: [
|
|
17618
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, {}),
|
|
17619
|
+
labels.reset
|
|
17620
|
+
] })
|
|
17621
|
+
}
|
|
17622
|
+
)
|
|
17332
17623
|
}
|
|
17333
|
-
)
|
|
17624
|
+
)
|
|
17334
17625
|
] });
|
|
17335
17626
|
}
|
|
17336
17627
|
|
|
@@ -17638,6 +17929,7 @@ exports.DashboardContent = DashboardContent;
|
|
|
17638
17929
|
exports.DashboardHeader = DashboardHeader;
|
|
17639
17930
|
exports.DashboardLayout = DashboardLayout;
|
|
17640
17931
|
exports.DashboardMain = DashboardMain;
|
|
17932
|
+
exports.DatePicker = DatePicker;
|
|
17641
17933
|
exports.DropdownMenu = DropdownMenu;
|
|
17642
17934
|
exports.DropdownMenuContent = DropdownMenuContent;
|
|
17643
17935
|
exports.DropdownMenuGroup = DropdownMenuGroup;
|
|
@@ -17679,6 +17971,28 @@ exports.buttonBaseClass = buttonBaseClass;
|
|
|
17679
17971
|
exports.buttonSizeClass = buttonSizeClass;
|
|
17680
17972
|
exports.buttonVariantClass = buttonVariantClass;
|
|
17681
17973
|
exports.cn = cn;
|
|
17974
|
+
exports.datePickerCalendarClass = datePickerCalendarClass;
|
|
17975
|
+
exports.datePickerCaptionClass = datePickerCaptionClass;
|
|
17976
|
+
exports.datePickerContentClass = datePickerContentClass;
|
|
17977
|
+
exports.datePickerDayBaseClass = datePickerDayBaseClass;
|
|
17978
|
+
exports.datePickerDayWrapperClass = datePickerDayWrapperClass;
|
|
17979
|
+
exports.datePickerDisabledClass = datePickerDisabledClass;
|
|
17980
|
+
exports.datePickerMonthClass = datePickerMonthClass;
|
|
17981
|
+
exports.datePickerMonthGridClass = datePickerMonthGridClass;
|
|
17982
|
+
exports.datePickerMonthsClass = datePickerMonthsClass;
|
|
17983
|
+
exports.datePickerNavButtonClass = datePickerNavButtonClass;
|
|
17984
|
+
exports.datePickerNavClass = datePickerNavClass;
|
|
17985
|
+
exports.datePickerOutsideClass = datePickerOutsideClass;
|
|
17986
|
+
exports.datePickerPlaceholderClass = datePickerPlaceholderClass;
|
|
17987
|
+
exports.datePickerSelectedClass = datePickerSelectedClass;
|
|
17988
|
+
exports.datePickerTodayClass = datePickerTodayClass;
|
|
17989
|
+
exports.datePickerTriggerBaseClass = datePickerTriggerBaseClass;
|
|
17990
|
+
exports.datePickerTriggerSizeClass = datePickerTriggerSizeClass;
|
|
17991
|
+
exports.datePickerTriggerVariantClass = datePickerTriggerVariantClass;
|
|
17992
|
+
exports.datePickerValueClass = datePickerValueClass;
|
|
17993
|
+
exports.datePickerWeekClass = datePickerWeekClass;
|
|
17994
|
+
exports.datePickerWeekdayClass = datePickerWeekdayClass;
|
|
17995
|
+
exports.datePickerWeekdaysClass = datePickerWeekdaysClass;
|
|
17682
17996
|
exports.dropdownMenuContentClass = dropdownMenuContentClass;
|
|
17683
17997
|
exports.dropdownMenuItemBaseClass = dropdownMenuItemBaseClass;
|
|
17684
17998
|
exports.dropdownMenuItemInsetClass = dropdownMenuItemInsetClass;
|