@motor-hero/ui-kit 0.47.0 → 0.48.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/components/combobox.d.ts.map +1 -1
- package/dist/components/multi-combobox.d.ts.map +1 -1
- package/dist/components/pagination.d.ts.map +1 -1
- package/dist/components/responsive-data-view.d.ts +8 -1
- package/dist/components/responsive-data-view.d.ts.map +1 -1
- package/dist/components/row-actions-menu.d.ts.map +1 -1
- package/dist/index.cjs +29 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -14
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/components/app-shell.tsx +1 -1
- package/src/components/combobox.tsx +4 -1
- package/src/components/date-picker.tsx +1 -1
- package/src/components/mode-toggle.tsx +1 -1
- package/src/components/multi-combobox.tsx +6 -2
- package/src/components/pagination.tsx +3 -2
- package/src/components/password-input.tsx +1 -1
- package/src/components/responsive-data-view.tsx +23 -2
- package/src/components/row-actions-menu.tsx +2 -1
- package/src/components/user-menu.tsx +1 -1
- package/src/index.ts +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export type { PaginationProps } from "./components/pagination";
|
|
|
30
30
|
export { Pagination } from "./components/pagination";
|
|
31
31
|
export { PasswordInput } from "./components/password-input";
|
|
32
32
|
export { ProgressBar } from "./components/progress-bar";
|
|
33
|
-
export { ResponsiveDataView } from "./components/responsive-data-view";
|
|
33
|
+
export { ResponsiveDataView, type ResponsiveDataViewBreakpoint } from "./components/responsive-data-view";
|
|
34
34
|
export type { RowAction, RowActionsMenuProps, } from "./components/row-actions-menu";
|
|
35
35
|
export { RowActionsMenu } from "./components/row-actions-menu";
|
|
36
36
|
export { SearchInput } from "./components/search-input";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../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mBAAmB,GACnB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,YAAY,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -102,7 +102,7 @@ function UserMenu({
|
|
|
102
102
|
"button",
|
|
103
103
|
{
|
|
104
104
|
type: "button",
|
|
105
|
-
className: "inline-flex h-9 w-9 items-center justify-center overflow-hidden rounded-full border border-input bg-background text-xs font-semibold shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
105
|
+
className: "inline-flex h-9 w-9 max-sm:h-10 max-sm:w-10 items-center justify-center overflow-hidden rounded-full border border-input bg-background text-xs font-semibold shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
106
106
|
"aria-label": "Menu do usu\xE1rio",
|
|
107
107
|
"data-testid": "user-menu",
|
|
108
108
|
children: user?.avatarUrl ? /* @__PURE__ */ jsx3(
|
|
@@ -337,7 +337,7 @@ function AppShell({
|
|
|
337
337
|
{
|
|
338
338
|
type: "button",
|
|
339
339
|
onClick: () => setMobileOpen(true),
|
|
340
|
-
className: "inline-flex h-9 w-9 items-center justify-center rounded-md border border-input bg-background shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground md:hidden",
|
|
340
|
+
className: "inline-flex h-9 w-9 max-sm:h-10 max-sm:w-10 items-center justify-center rounded-md border border-input bg-background shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground md:hidden",
|
|
341
341
|
"aria-label": "Abrir menu",
|
|
342
342
|
children: /* @__PURE__ */ jsx4(Menu, { className: "h-4 w-4" })
|
|
343
343
|
}
|
|
@@ -748,7 +748,10 @@ function Combobox({
|
|
|
748
748
|
const selected = fromPage ?? (value ? labelCache.current.get(value) : void 0) ?? (creatable && value ? { value, label: value } : void 0);
|
|
749
749
|
const handleOpenChange = (next) => {
|
|
750
750
|
setOpen(next);
|
|
751
|
-
if (!next)
|
|
751
|
+
if (!next) {
|
|
752
|
+
setSearch("");
|
|
753
|
+
onSearchChange?.("");
|
|
754
|
+
}
|
|
752
755
|
};
|
|
753
756
|
const handleSelect = (next) => {
|
|
754
757
|
onChange(deselectable && next === value ? "" : next);
|
|
@@ -1177,7 +1180,7 @@ function DatePickerImpl({
|
|
|
1177
1180
|
"aria-haspopup": "dialog",
|
|
1178
1181
|
"aria-expanded": open,
|
|
1179
1182
|
onClick: () => setOpen(!open),
|
|
1180
|
-
className: "absolute right-
|
|
1183
|
+
className: "absolute right-1 top-1/2 inline-flex size-8 -translate-y-1/2 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground disabled:pointer-events-none disabled:opacity-50",
|
|
1181
1184
|
children: withTime ? /* @__PURE__ */ jsx12(Clock, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx12(CalendarIcon, { className: "h-4 w-4" })
|
|
1182
1185
|
}
|
|
1183
1186
|
)
|
|
@@ -1708,7 +1711,7 @@ function ModeToggle() {
|
|
|
1708
1711
|
"button",
|
|
1709
1712
|
{
|
|
1710
1713
|
type: "button",
|
|
1711
|
-
className: "relative inline-flex h-9 w-9 items-center justify-center rounded-md border border-input bg-background text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1714
|
+
className: "relative inline-flex h-9 w-9 max-sm:h-10 max-sm:w-10 items-center justify-center rounded-md border border-input bg-background text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1712
1715
|
"aria-label": "Alternar tema",
|
|
1713
1716
|
children: [
|
|
1714
1717
|
/* @__PURE__ */ jsx20(Sun, { className: "h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
|
|
@@ -1789,6 +1792,10 @@ function MultiCombobox({
|
|
|
1789
1792
|
const [open, setOpen] = React8.useState(false);
|
|
1790
1793
|
const isDesktop = useIsDesktop();
|
|
1791
1794
|
const isServer = onSearchChange !== void 0;
|
|
1795
|
+
const handleOpenChange = (next) => {
|
|
1796
|
+
setOpen(next);
|
|
1797
|
+
if (!next) onSearchChange?.("");
|
|
1798
|
+
};
|
|
1792
1799
|
const labelCache = React8.useRef(/* @__PURE__ */ new Map());
|
|
1793
1800
|
const byValue = /* @__PURE__ */ new Map();
|
|
1794
1801
|
for (const option of options) byValue.set(option.value, option);
|
|
@@ -1917,7 +1924,7 @@ function MultiCombobox({
|
|
|
1917
1924
|
}
|
|
1918
1925
|
);
|
|
1919
1926
|
if (isDesktop) {
|
|
1920
|
-
return /* @__PURE__ */ jsxs17(PopoverPrimitive5.Root, { open, onOpenChange:
|
|
1927
|
+
return /* @__PURE__ */ jsxs17(PopoverPrimitive5.Root, { open, onOpenChange: handleOpenChange, children: [
|
|
1921
1928
|
/* @__PURE__ */ jsx21(PopoverPrimitive5.Trigger, { asChild: true, disabled, children: trigger }),
|
|
1922
1929
|
/* @__PURE__ */ jsx21(PopoverPrimitive5.Portal, { children: /* @__PURE__ */ jsx21(
|
|
1923
1930
|
PopoverPrimitive5.Content,
|
|
@@ -1931,7 +1938,7 @@ function MultiCombobox({
|
|
|
1931
1938
|
) })
|
|
1932
1939
|
] });
|
|
1933
1940
|
}
|
|
1934
|
-
return /* @__PURE__ */ jsxs17(DrawerPrimitive5.Root, { open, onOpenChange:
|
|
1941
|
+
return /* @__PURE__ */ jsxs17(DrawerPrimitive5.Root, { open, onOpenChange: handleOpenChange, children: [
|
|
1935
1942
|
/* @__PURE__ */ jsx21(DrawerPrimitive5.Trigger, { asChild: true, disabled, children: trigger }),
|
|
1936
1943
|
/* @__PURE__ */ jsxs17(DrawerPrimitive5.Portal, { children: [
|
|
1937
1944
|
/* @__PURE__ */ jsx21(DrawerPrimitive5.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
@@ -1964,7 +1971,7 @@ function PageHeader({ title, description, action, className }) {
|
|
|
1964
1971
|
|
|
1965
1972
|
// src/components/pagination.tsx
|
|
1966
1973
|
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1967
|
-
var navButtonClass2 = "inline-flex h-8 items-center justify-center rounded-md border border-input bg-background px-3 text-xs font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground cursor-pointer disabled:pointer-events-none disabled:opacity-50";
|
|
1974
|
+
var navButtonClass2 = "inline-flex h-8 max-sm:h-10 items-center justify-center rounded-md border border-input bg-background px-3 text-xs font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground cursor-pointer disabled:pointer-events-none disabled:opacity-50";
|
|
1968
1975
|
function Pagination({
|
|
1969
1976
|
page,
|
|
1970
1977
|
onPageChange,
|
|
@@ -1990,7 +1997,7 @@ function Pagination({
|
|
|
1990
1997
|
id: "pagination-page-size",
|
|
1991
1998
|
value: pageSize,
|
|
1992
1999
|
onChange: (e) => onPageSizeChange?.(Number(e.target.value)),
|
|
1993
|
-
className: "h-8 rounded-md border border-input bg-background px-2 text-xs font-medium shadow-sm transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring cursor-pointer",
|
|
2000
|
+
className: "h-8 max-sm:h-10 rounded-md border border-input bg-background px-2 text-xs font-medium shadow-sm transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring cursor-pointer",
|
|
1994
2001
|
children: (pageSizeOptions ?? []).map((size) => /* @__PURE__ */ jsx23("option", { value: size, children: size }, size))
|
|
1995
2002
|
}
|
|
1996
2003
|
)
|
|
@@ -2050,7 +2057,7 @@ var PasswordInput = React9.forwardRef(({ containerClassName, className, ...props
|
|
|
2050
2057
|
onClick: () => setVisible((prev) => !prev),
|
|
2051
2058
|
"aria-label": visible ? "Ocultar senha" : "Mostrar senha",
|
|
2052
2059
|
tabIndex: -1,
|
|
2053
|
-
className: "absolute right-
|
|
2060
|
+
className: "absolute right-1 top-1/2 inline-flex size-8 -translate-y-1/2 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground",
|
|
2054
2061
|
children: visible ? /* @__PURE__ */ jsx24(EyeOff, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx24(Eye, { className: "h-4 w-4" })
|
|
2055
2062
|
}
|
|
2056
2063
|
)
|
|
@@ -2096,6 +2103,11 @@ function ProgressBar({
|
|
|
2096
2103
|
|
|
2097
2104
|
// src/components/responsive-data-view.tsx
|
|
2098
2105
|
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2106
|
+
var BREAKPOINT_CLASSES = {
|
|
2107
|
+
md: { table: "md:block", cards: "md:hidden" },
|
|
2108
|
+
lg: { table: "lg:block", cards: "lg:hidden" },
|
|
2109
|
+
xl: { table: "xl:block", cards: "xl:hidden" }
|
|
2110
|
+
};
|
|
2099
2111
|
function ResponsiveDataView({
|
|
2100
2112
|
table,
|
|
2101
2113
|
cards,
|
|
@@ -2106,7 +2118,8 @@ function ResponsiveDataView({
|
|
|
2106
2118
|
emptyTitle = "Nenhum registro encontrado",
|
|
2107
2119
|
emptyDescription,
|
|
2108
2120
|
emptyAction,
|
|
2109
|
-
pagination
|
|
2121
|
+
pagination,
|
|
2122
|
+
breakpoint = "md"
|
|
2110
2123
|
}) {
|
|
2111
2124
|
if (!isLoading && !isBusy && isEmpty) {
|
|
2112
2125
|
return /* @__PURE__ */ jsx26("div", { className: "rounded-md border", children: /* @__PURE__ */ jsx26(
|
|
@@ -2120,19 +2133,21 @@ function ResponsiveDataView({
|
|
|
2120
2133
|
) });
|
|
2121
2134
|
}
|
|
2122
2135
|
const busyClass = isBusy && "pointer-events-none opacity-50";
|
|
2136
|
+
const visibility = BREAKPOINT_CLASSES[breakpoint];
|
|
2123
2137
|
return /* @__PURE__ */ jsxs22("div", { className: "space-y-4", children: [
|
|
2124
2138
|
/* @__PURE__ */ jsx26(
|
|
2125
2139
|
"div",
|
|
2126
2140
|
{
|
|
2127
2141
|
"aria-busy": isBusy,
|
|
2128
2142
|
className: cn(
|
|
2129
|
-
"hidden overflow-x-auto rounded-md border transition-opacity
|
|
2143
|
+
"hidden overflow-x-auto rounded-md border transition-opacity",
|
|
2144
|
+
visibility.table,
|
|
2130
2145
|
busyClass
|
|
2131
2146
|
),
|
|
2132
2147
|
children: table
|
|
2133
2148
|
}
|
|
2134
2149
|
),
|
|
2135
|
-
/* @__PURE__ */ jsx26("div", { "aria-busy": isBusy, className: cn("transition-opacity
|
|
2150
|
+
/* @__PURE__ */ jsx26("div", { "aria-busy": isBusy, className: cn("transition-opacity", visibility.cards, busyClass), children: cards }),
|
|
2136
2151
|
pagination
|
|
2137
2152
|
] });
|
|
2138
2153
|
}
|
|
@@ -2143,7 +2158,7 @@ import { ChevronRight as ChevronRight3, MoreVertical } from "lucide-react";
|
|
|
2143
2158
|
import { useState as useState12 } from "react";
|
|
2144
2159
|
import { Drawer as DrawerPrimitive6 } from "vaul";
|
|
2145
2160
|
import { Fragment as Fragment6, jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2146
|
-
var triggerClass = "inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50";
|
|
2161
|
+
var triggerClass = "inline-flex h-8 w-8 max-sm:h-10 max-sm:w-10 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50";
|
|
2147
2162
|
var itemClass2 = "flex w-full cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
2148
2163
|
var sheetItemClass2 = "flex w-full cursor-pointer select-none items-center gap-3 rounded-md px-3 py-3 text-base outline-none transition-colors hover:bg-accent active:bg-accent disabled:pointer-events-none disabled:opacity-50";
|
|
2149
2164
|
function RowActionsMenu({
|