@krosoft/react 0.0.259 → 0.0.260
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/components/core/index.js +10 -10
- package/dist/components/core/inputs/RatingInput.d.ts +18 -0
- package/dist/components/core/inputs/RatingInput.d.ts.map +1 -0
- package/dist/components/core/inputs/index.d.ts +1 -0
- package/dist/components/core/inputs/index.d.ts.map +1 -1
- package/dist/components/core/inputs/index.js +2 -1
- package/dist/components/index.js +10 -9
- package/dist/inputs-CNDApo_M.js +39 -0
- package/package.json +1 -1
|
@@ -12,13 +12,13 @@ import { t as N } from "../../ErrorAlert-DClCk3Ey.js";
|
|
|
12
12
|
import { i as P, n as F, r as I, t as L } from "../../SearchInput-CXZd2rSc.js";
|
|
13
13
|
import { ActiveFilters as R, AdvancedFilters as z, FilterField as B, SearchableFilterPill as V, TableFilter as H } from "./filters/index.js";
|
|
14
14
|
import "./forms/index.js";
|
|
15
|
-
import "
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { n as
|
|
19
|
-
import { AppPageHeader as
|
|
20
|
-
import { a as
|
|
21
|
-
import { a as
|
|
22
|
-
import { AppTabContainer as
|
|
23
|
-
import { t as
|
|
24
|
-
export {
|
|
15
|
+
import { t as U } from "../../inputs-CNDApo_M.js";
|
|
16
|
+
import { t as W } from "../../language-CK_kDejF.js";
|
|
17
|
+
import { t as G } from "../../AppTitle-BR4JFZfp.js";
|
|
18
|
+
import { n as K, t as q } from "../../states-BusGNKku.js";
|
|
19
|
+
import { AppPageHeader as J, KpiCardsLayout as Y } from "./layouts/index.js";
|
|
20
|
+
import { a as X, i as Z, n as Q, o as $, r as ee, t as te } from "../../navbar-UsCqs4DK.js";
|
|
21
|
+
import { a as ne, c as re, d as ie, f as ae, i as oe, l as se, n as ce, o as le, p as ue, r as de, s as fe, t as pe, u as me } from "../../table-BSjo9t9_.js";
|
|
22
|
+
import { AppTabContainer as he, AppTabHeader as ge, AppTabs as _e, AppVerticalTabs as ve } from "./tabs/index.js";
|
|
23
|
+
import { t as ye } from "../../theme-QayeX440.js";
|
|
24
|
+
export { re as ACTIONS_COLUMN_KEY, R as ActiveFilters, z as AdvancedFilters, k as AppActions, E as AppDialog, J as AppPageHeader, A as AppSubTitle, he as AppTabContainer, ge as AppTabHeader, _e as AppTabs, G as AppTitle, ve as AppVerticalTabs, v as BarChartHorizontal, C as BarChartVertical, _ as CHART_COLORS, y as ChartCard, S as CircularGauge, D as ConfirmationDialog, r as DashboardCard, ce as DataTable, P as DatePicker, I as DateRangePicker, l as Dialog, c as DialogClose, p as DialogContent, g as DialogDescription, s as DialogFooter, h as DialogHeader, d as DialogOverlay, f as DialogPortal, m as DialogTitle, u as DialogTrigger, N as ErrorAlert, K as ErrorState, B as FilterField, T as FormDialog, M as GenericForm, $ as GlobalSearch, O as ImageInput, pe as JsonTableOutput, e as KpiCard, t as KpiCards, Y as KpiCardsLayout, W as LanguageSelector, b as LineChart, q as LoadingState, i as MetricCard, j as MultiSelect, X as NotificationsBell, w as PieChart, o as Progress, U as RatingInput, se as SELECTION_COLUMN_KEY, L as SearchInput, V as SearchableFilterPill, F as SearchableSelect, ee as Sidebar, Q as SidebarHeader, Z as SidebarNavItem, n as SkeletonCard, a as SkeletonCards, ue as TableActions, fe as TableBody, le as TableBulkActions, H as TableFilter, ne as TableHeader, oe as TablePagination, de as TableSettings, ye as ThemeSelector, te as Topbar, ie as getAlignmentClass, x as getChartColor, ae as getColumnAlignment, me as getFixedCellProps };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type RatingIcon = "heart" | "star";
|
|
2
|
+
interface RatingInputProps {
|
|
3
|
+
/** Valeur courante (0 à max). */
|
|
4
|
+
value: number;
|
|
5
|
+
/** Si fourni, le composant est éditable (clic = définir, re-clic sur la même valeur = remettre à 0). */
|
|
6
|
+
onChange?: (value: number) => void;
|
|
7
|
+
max?: number;
|
|
8
|
+
size?: "sm" | "md";
|
|
9
|
+
/** Symbole utilisé pour la note. Défaut : `star`. */
|
|
10
|
+
icon?: RatingIcon;
|
|
11
|
+
/** Classes appliquées aux symboles pleins, pour surcharger la couleur par défaut de l'icône. */
|
|
12
|
+
colorClassName?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Note discrète (éditable ou lecture seule) : sélection d'une valeur de 0 à `max`, symbolisée par des étoiles ou des cœurs. */
|
|
16
|
+
export declare function RatingInput({ value, onChange, max, size, icon, colorClassName, className }: RatingInputProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=RatingInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RatingInput.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/RatingInput.tsx"],"names":[],"mappings":"AAGA,KAAK,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAenC,UAAU,gBAAgB;IACxB,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,wGAAwG;IACxG,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,qDAAqD;IACrD,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,gGAAgG;IAChG,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,gIAAgI;AAChI,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAO,EAAE,IAAW,EAAE,IAAa,EAAE,cAAc,EAAE,SAAS,EAAE,EAAE,gBAAgB,+BA+BhI"}
|
|
@@ -3,6 +3,7 @@ export { SearchInput } from "./SearchInput";
|
|
|
3
3
|
export { DatePicker } from "./DatePicker";
|
|
4
4
|
export { DateRangePicker } from "./DateRangePicker";
|
|
5
5
|
export { MultiSelect } from "./MultiSelect";
|
|
6
|
+
export { RatingInput } from "./RatingInput";
|
|
6
7
|
export { SearchableSelect } from "./SearchableSelect";
|
|
7
8
|
export type { SearchableSelectOption } from "./SearchableSelect";
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { t as e } from "../../../ImageInput-BLIo5LYH.js";
|
|
2
2
|
import { t } from "../../../MultiSelect-B0Ke0cfS.js";
|
|
3
3
|
import { i as n, n as r, r as i, t as a } from "../../../SearchInput-CXZd2rSc.js";
|
|
4
|
-
|
|
4
|
+
import { t as o } from "../../../inputs-CNDApo_M.js";
|
|
5
|
+
export { n as DatePicker, i as DateRangePicker, e as ImageInput, t as MultiSelect, o as RatingInput, a as SearchInput, r as SearchableSelect };
|
package/dist/components/index.js
CHANGED
|
@@ -16,13 +16,14 @@ import { t as Fr } from "../GenericForm-JqObtUCQ.js";
|
|
|
16
16
|
import { t as Ir } from "../ErrorAlert-DClCk3Ey.js";
|
|
17
17
|
import { i as Lr, n as Rr, r as zr, t as Br } from "../SearchInput-CXZd2rSc.js";
|
|
18
18
|
import { ActiveFilters as Vr, AdvancedFilters as Hr, FilterField as Ur, SearchableFilterPill as Wr, TableFilter as Gr } from "./core/filters/index.js";
|
|
19
|
-
import { t as Kr } from "../
|
|
20
|
-
import { t as qr } from "../
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { a as
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
19
|
+
import { t as Kr } from "../inputs-CNDApo_M.js";
|
|
20
|
+
import { t as qr } from "../language-CK_kDejF.js";
|
|
21
|
+
import { t as Jr } from "../AppTitle-BR4JFZfp.js";
|
|
22
|
+
import { n as Yr, t as Xr } from "../states-BusGNKku.js";
|
|
23
|
+
import { AppPageHeader as Zr, KpiCardsLayout as Qr } from "./core/layouts/index.js";
|
|
24
|
+
import { a as $r, i as ei, n as ti, o as ni, r as ri, t as ii } from "../navbar-UsCqs4DK.js";
|
|
25
|
+
import { a as ai, c as oi, d as si, f as ci, i as li, l as ui, n as di, o as fi, p as pi, r as mi, s as hi, t as gi, u as _i } from "../table-BSjo9t9_.js";
|
|
26
|
+
import { AppTabContainer as vi, AppTabHeader as yi, AppTabs as bi, AppVerticalTabs as xi } from "./core/tabs/index.js";
|
|
27
|
+
import { t as Si } from "../theme-QayeX440.js";
|
|
27
28
|
import "./core/index.js";
|
|
28
|
-
export {
|
|
29
|
+
export { oi as ACTIONS_COLUMN_KEY, ze as Accordion, Ie as AccordionContent, He as AccordionItem, he as AccordionTrigger, Vr as ActiveFilters, Hr as AdvancedFilters, yn as Alert, _n as AlertDescription, w as AlertDialog, Ae as AlertDialogAction, H as AlertDialogCancel, De as AlertDialogContent, Ne as AlertDialogDescription, z as AlertDialogFooter, Z as AlertDialogHeader, Vt as AlertDialogTitle, J as AlertDialogTrigger, vn as AlertTitle, Mr as AppActions, kr as AppDialog, Zr as AppPageHeader, Nr as AppSubTitle, vi as AppTabContainer, yi as AppTabHeader, bi as AppTabs, Jr as AppTitle, xi as AppVerticalTabs, hn as AspectRatio, G as Avatar, ee as AvatarFallback, ve as AvatarImage, fe as Badge, xr as BarChartHorizontal, Er as BarChartVertical, A as Breadcrumb, le as BreadcrumbEllipsis, Ct as BreadcrumbItem, x as BreadcrumbLink, bt as BreadcrumbList, re as BreadcrumbPage, oe as BreadcrumbSeparator, En as Button, br as CHART_COLORS, N as Calendar, l as Card, t as CardContent, a as CardDescription, d as CardFooter, n as CardHeader, r as CardTitle, ln as Carousel, xe as CarouselContent, D as CarouselItem, on as CarouselNext, we as CarouselPrevious, Sr as ChartCard, u as ChartContainer, o as ChartLegend, c as ChartLegendContent, i as ChartStyle, e as ChartTooltip, s as ChartTooltipContent, Ze as Checkbox, Tr as CircularGauge, Ge as Collapsible, nn as CollapsibleContent, fn as CollapsibleTrigger, zn as Command, ar as CommandDialog, cr as CommandEmpty, Vn as CommandGroup, sr as CommandInput, Ln as CommandItem, kn as CommandList, or as CommandSeparator, Rn as CommandShortcut, Ar as ConfirmationDialog, Mt as ContextMenu, Wt as ContextMenuCheckboxItem, _t as ContextMenuContent, Je as ContextMenuGroup, Ft as ContextMenuItem, qt as ContextMenuLabel, et as ContextMenuPortal, Et as ContextMenuRadioGroup, $t as ContextMenuRadioItem, rt as ContextMenuSeparator, ct as ContextMenuShortcut, Rt as ContextMenuSub, kt as ContextMenuSubContent, mt as ContextMenuSubTrigger, dt as ContextMenuTrigger, h as DashboardCard, di as DataTable, Lr as DatePicker, zr as DateRangePicker, jn as Dialog, An as DialogClose, Fn as DialogContent, Yn as DialogDescription, On as DialogFooter, Jn as DialogHeader, Nn as DialogOverlay, Pn as DialogPortal, In as DialogTitle, Mn as DialogTrigger, Q as Drawer, Ht as DrawerClose, Y as DrawerContent, Be as DrawerDescription, Le as DrawerFooter, Ue as DrawerHeader, ge as DrawerOverlay, y as DrawerPortal, at as DrawerTitle, Xt as DrawerTrigger, xt as DropdownMenu, ie as DropdownMenuCheckboxItem, se as DropdownMenuContent, pe as DropdownMenuGroup, L as DropdownMenuItem, K as DropdownMenuLabel, te as DropdownMenuPortal, ye as DropdownMenuRadioGroup, gn as DropdownMenuRadioItem, T as DropdownMenuSeparator, je as DropdownMenuShortcut, U as DropdownMenuSub, Oe as DropdownMenuSubContent, Pe as DropdownMenuSubTrigger, B as DropdownMenuTrigger, Ir as ErrorAlert, Yr as ErrorState, Ur as FilterField, Se as Form, O as FormControl, sn as FormDescription, Or as FormDialog, Te as FormField, P as FormItem, j as FormLabel, ue as FormMessage, Fr as GenericForm, ni as GlobalSearch, pn as HoverCard, Qe as HoverCardContent, un as HoverCardTrigger, jr as ImageInput, Gn as Input, ht as InputOTP, ft as InputOTPGroup, Ke as InputOTPSeparator, rn as InputOTPSlot, gi as JsonTableOutput, f as KpiCard, p as KpiCards, Qr as KpiCardsLayout, S as Label, qr as LanguageSelector, Cr as LineChart, Xr as LoadingState, v as Menubar, ot as MenubarCheckboxItem, Zt as MenubarContent, Nt as MenubarGroup, Gt as MenubarItem, vt as MenubarLabel, Ye as MenubarMenu, It as MenubarPortal, Jt as MenubarRadioGroup, tt as MenubarRadioItem, Dt as MenubarSeparator, en as MenubarShortcut, it as MenubarSub, lt as MenubarSubContent, zt as MenubarSubTrigger, At as MenubarTrigger, g as MetricCard, Pr as MultiSelect, Me as NavigationMenu, R as NavigationMenuContent, X as NavigationMenuIndicator, Bt as NavigationMenuItem, q as NavigationMenuLink, Re as NavigationMenuList, Fe as NavigationMenuTrigger, Ve as NavigationMenuViewport, $r as NotificationsBell, $ as Pagination, _e as PaginationContent, mn as PaginationEllipsis, C as PaginationItem, ke as PaginationLink, V as PaginationNext, Ee as PaginationPrevious, Dr as PieChart, er as Popover, Zn as PopoverContent, Kn as PopoverTrigger, W as Progress, de as RadioGroup, F as RadioGroupItem, Kr as RatingInput, yt as ResizableHandle, ne as ResizablePanel, ae as ResizablePanelGroup, ui as SELECTION_COLUMN_KEY, Un as ScrollArea, Wn as ScrollBar, Br as SearchInput, Wr as SearchableFilterPill, Rr as SearchableSelect, _r as Select, pr as SelectContent, hr as SelectGroup, dr as SelectItem, lr as SelectLabel, mr as SelectScrollDownButton, gr as SelectScrollUpButton, ur as SelectSeparator, fr as SelectTrigger, vr as SelectValue, b as Separator, rr as Sheet, Qn as SheetClose, tr as SheetContent, qn as SheetDescription, Bn as SheetFooter, $n as SheetHeader, nr as SheetOverlay, Hn as SheetPortal, Xn as SheetTitle, ir as SheetTrigger, ri as Sidebar, ti as SidebarHeader, ei as SidebarNavItem, be as SimpleTable, E as SimpleTableBody, an as SimpleTableCaption, Ce as SimpleTableCell, M as SimpleTableFooter, k as SimpleTableHead, ce as SimpleTableHeader, St as SimpleTableRow, yr as Skeleton, m as SkeletonCard, _ as SkeletonCards, cn as Slider, dn as Sonner, tn as Switch, pi as TableActions, hi as TableBody, fi as TableBulkActions, Gr as TableFilter, ai as TableHeader, li as TablePagination, mi as TableSettings, Ot as Tabs, pt as TabsContent, ut as TabsList, We as TabsTrigger, Lt as Textarea, Si as ThemeSelector, Pt as Toast, Kt as ToastAction, $e as ToastClose, Tt as ToastDescription, Qt as ToastProvider, nt as ToastTitle, st as ToastViewport, qe as Toaster, Ut as Toggle, Yt as ToggleGroup, jt as ToggleGroupItem, Dn as Tooltip, Cn as TooltipContent, Tn as TooltipProvider, Sn as TooltipTrigger, ii as Topbar, I as badgeVariants, xn as buttonVariants, bn as controlBaseClass, wn as controlTriggerClass, si as getAlignmentClass, wr as getChartColor, ci as getColumnAlignment, _i as getFixedCellProps, me as navigationMenuTriggerStyle, Xe as toast, gt as toggleVariants, wt as useFormField };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { t as e } from "./tailwind.helper-CJaRYBmL.js";
|
|
2
|
+
import "./ImageInput-BLIo5LYH.js";
|
|
3
|
+
import "./MultiSelect-B0Ke0cfS.js";
|
|
4
|
+
import "./SearchInput-CXZd2rSc.js";
|
|
5
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
6
|
+
import { Heart as n, Star as r } from "lucide-react";
|
|
7
|
+
//#region src/components/core/inputs/RatingInput.tsx
|
|
8
|
+
var i = {
|
|
9
|
+
heart: {
|
|
10
|
+
Icon: n,
|
|
11
|
+
filledClassName: "fill-rose-500 text-rose-500",
|
|
12
|
+
unit: "cœur"
|
|
13
|
+
},
|
|
14
|
+
star: {
|
|
15
|
+
Icon: r,
|
|
16
|
+
filledClassName: "fill-amber-400 text-amber-400",
|
|
17
|
+
unit: "étoile"
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
function a({ value: n, onChange: r, max: a = 5, size: o = "md", icon: s = "star", colorClassName: c, className: l }) {
|
|
21
|
+
let { Icon: u, filledClassName: d, unit: f } = i[s], p = !r, m = o === "sm" ? "h-3.5 w-3.5" : "h-5 w-5", h = c ?? d;
|
|
22
|
+
return /* @__PURE__ */ t("div", {
|
|
23
|
+
className: e("flex items-center gap-0.5", l),
|
|
24
|
+
role: p ? "img" : void 0,
|
|
25
|
+
"aria-label": p ? `${n}/${a} ${f}${n > 1 ? "s" : ""}` : void 0,
|
|
26
|
+
children: Array.from({ length: a }, (i, a) => {
|
|
27
|
+
let o = a + 1, s = /* @__PURE__ */ t(u, { className: e(m, o <= n ? h : "text-muted-foreground/40") });
|
|
28
|
+
return p ? /* @__PURE__ */ t("span", { children: s }, o) : /* @__PURE__ */ t("button", {
|
|
29
|
+
type: "button",
|
|
30
|
+
onClick: () => r?.(n === o ? 0 : o),
|
|
31
|
+
"aria-label": `${o} ${f}${o > 1 ? "s" : ""}`,
|
|
32
|
+
className: "leading-none transition-transform hover:scale-110",
|
|
33
|
+
children: s
|
|
34
|
+
}, o);
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { a as t };
|