@motor-hero/ui-kit 0.46.1 → 0.48.0
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/base-dialog.d.ts +16 -5
- package/dist/components/base-dialog.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 +28 -16
- 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 +28 -16
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/components/app-shell.tsx +1 -1
- package/src/components/base-dialog.tsx +24 -9
- package/src/components/date-picker.tsx +1 -1
- package/src/components/mode-toggle.tsx +1 -1
- package/src/components/pagination.tsx +7 -3
- 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":["../src/index.ts"],"names":[],"mappings":"AAE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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
|
}
|
|
@@ -422,7 +422,7 @@ function BaseDialog({
|
|
|
422
422
|
)
|
|
423
423
|
] }),
|
|
424
424
|
/* @__PURE__ */ jsx6("div", { className: "min-h-0 flex-1 overflow-y-auto px-6 py-4", children }),
|
|
425
|
-
footer && /* @__PURE__ */ jsx6("div", { className: "flex shrink-0 flex-col-reverse gap-2 border-t px-6 py-3 sm:flex-row sm:justify-end", children: footer })
|
|
425
|
+
footer && /* @__PURE__ */ jsx6("div", { className: "flex shrink-0 flex-col-reverse gap-2 border-t px-6 py-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] sm:flex-row sm:justify-end", children: footer })
|
|
426
426
|
] });
|
|
427
427
|
const isModal = modal ?? !isDesktop;
|
|
428
428
|
return /* @__PURE__ */ jsx6(Dialog.Root, { open, onOpenChange, modal: isModal, children: /* @__PURE__ */ jsxs5(Dialog.Portal, { children: [
|
|
@@ -458,9 +458,13 @@ function BaseDialog({
|
|
|
458
458
|
document.body.style.pointerEvents = "";
|
|
459
459
|
},
|
|
460
460
|
className: cn(
|
|
461
|
-
"fixed z-50 flex
|
|
462
|
-
"inset-x-0 bottom-0 rounded-t-2xl",
|
|
463
|
-
|
|
461
|
+
"fixed z-50 flex w-full flex-col bg-background shadow-lg outline-none",
|
|
462
|
+
"inset-x-0 bottom-0 rounded-t-2xl max-h-[calc(100dvh_-_max(0.75rem,env(safe-area-inset-top)))]",
|
|
463
|
+
// Entra deslizando de baixo, como os drawers (vaul) do restante do
|
|
464
|
+
// kit; no desktop os slides sairiam brigando com o translate de
|
|
465
|
+
// centralização, então ficam restritos ao mobile.
|
|
466
|
+
"max-sm:slide-in-from-bottom-8 max-sm:slide-out-to-bottom-8",
|
|
467
|
+
"sm:inset-x-auto sm:bottom-auto sm:left-1/2 sm:top-1/2 sm:max-h-[92dvh] sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-lg",
|
|
464
468
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
465
469
|
sizeClasses[size],
|
|
466
470
|
className
|
|
@@ -1173,7 +1177,7 @@ function DatePickerImpl({
|
|
|
1173
1177
|
"aria-haspopup": "dialog",
|
|
1174
1178
|
"aria-expanded": open,
|
|
1175
1179
|
onClick: () => setOpen(!open),
|
|
1176
|
-
className: "absolute right-
|
|
1180
|
+
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",
|
|
1177
1181
|
children: withTime ? /* @__PURE__ */ jsx12(Clock, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx12(CalendarIcon, { className: "h-4 w-4" })
|
|
1178
1182
|
}
|
|
1179
1183
|
)
|
|
@@ -1704,7 +1708,7 @@ function ModeToggle() {
|
|
|
1704
1708
|
"button",
|
|
1705
1709
|
{
|
|
1706
1710
|
type: "button",
|
|
1707
|
-
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",
|
|
1711
|
+
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",
|
|
1708
1712
|
"aria-label": "Alternar tema",
|
|
1709
1713
|
children: [
|
|
1710
1714
|
/* @__PURE__ */ jsx20(Sun, { className: "h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
|
|
@@ -1960,7 +1964,7 @@ function PageHeader({ title, description, action, className }) {
|
|
|
1960
1964
|
|
|
1961
1965
|
// src/components/pagination.tsx
|
|
1962
1966
|
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1963
|
-
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";
|
|
1967
|
+
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";
|
|
1964
1968
|
function Pagination({
|
|
1965
1969
|
page,
|
|
1966
1970
|
onPageChange,
|
|
@@ -1976,7 +1980,7 @@ function Pagination({
|
|
|
1976
1980
|
return /* @__PURE__ */ jsxs19(
|
|
1977
1981
|
"div",
|
|
1978
1982
|
{
|
|
1979
|
-
className: `flex items-center ${showPageSizeSelector ? "justify-between" : "justify-end"} gap-4 ${className ?? ""}`,
|
|
1983
|
+
className: `flex flex-wrap items-center ${showPageSizeSelector ? "justify-between" : "justify-end"} gap-x-4 gap-y-2 ${className ?? ""}`,
|
|
1980
1984
|
children: [
|
|
1981
1985
|
showPageSizeSelector && /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2", children: [
|
|
1982
1986
|
/* @__PURE__ */ jsx23("label", { htmlFor: "pagination-page-size", className: "text-sm text-muted-foreground", children: "Itens por p\xE1gina" }),
|
|
@@ -1986,7 +1990,7 @@ function Pagination({
|
|
|
1986
1990
|
id: "pagination-page-size",
|
|
1987
1991
|
value: pageSize,
|
|
1988
1992
|
onChange: (e) => onPageSizeChange?.(Number(e.target.value)),
|
|
1989
|
-
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",
|
|
1993
|
+
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",
|
|
1990
1994
|
children: (pageSizeOptions ?? []).map((size) => /* @__PURE__ */ jsx23("option", { value: size, children: size }, size))
|
|
1991
1995
|
}
|
|
1992
1996
|
)
|
|
@@ -2046,7 +2050,7 @@ var PasswordInput = React9.forwardRef(({ containerClassName, className, ...props
|
|
|
2046
2050
|
onClick: () => setVisible((prev) => !prev),
|
|
2047
2051
|
"aria-label": visible ? "Ocultar senha" : "Mostrar senha",
|
|
2048
2052
|
tabIndex: -1,
|
|
2049
|
-
className: "absolute right-
|
|
2053
|
+
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",
|
|
2050
2054
|
children: visible ? /* @__PURE__ */ jsx24(EyeOff, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx24(Eye, { className: "h-4 w-4" })
|
|
2051
2055
|
}
|
|
2052
2056
|
)
|
|
@@ -2092,6 +2096,11 @@ function ProgressBar({
|
|
|
2092
2096
|
|
|
2093
2097
|
// src/components/responsive-data-view.tsx
|
|
2094
2098
|
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2099
|
+
var BREAKPOINT_CLASSES = {
|
|
2100
|
+
md: { table: "md:block", cards: "md:hidden" },
|
|
2101
|
+
lg: { table: "lg:block", cards: "lg:hidden" },
|
|
2102
|
+
xl: { table: "xl:block", cards: "xl:hidden" }
|
|
2103
|
+
};
|
|
2095
2104
|
function ResponsiveDataView({
|
|
2096
2105
|
table,
|
|
2097
2106
|
cards,
|
|
@@ -2102,7 +2111,8 @@ function ResponsiveDataView({
|
|
|
2102
2111
|
emptyTitle = "Nenhum registro encontrado",
|
|
2103
2112
|
emptyDescription,
|
|
2104
2113
|
emptyAction,
|
|
2105
|
-
pagination
|
|
2114
|
+
pagination,
|
|
2115
|
+
breakpoint = "md"
|
|
2106
2116
|
}) {
|
|
2107
2117
|
if (!isLoading && !isBusy && isEmpty) {
|
|
2108
2118
|
return /* @__PURE__ */ jsx26("div", { className: "rounded-md border", children: /* @__PURE__ */ jsx26(
|
|
@@ -2116,19 +2126,21 @@ function ResponsiveDataView({
|
|
|
2116
2126
|
) });
|
|
2117
2127
|
}
|
|
2118
2128
|
const busyClass = isBusy && "pointer-events-none opacity-50";
|
|
2129
|
+
const visibility = BREAKPOINT_CLASSES[breakpoint];
|
|
2119
2130
|
return /* @__PURE__ */ jsxs22("div", { className: "space-y-4", children: [
|
|
2120
2131
|
/* @__PURE__ */ jsx26(
|
|
2121
2132
|
"div",
|
|
2122
2133
|
{
|
|
2123
2134
|
"aria-busy": isBusy,
|
|
2124
2135
|
className: cn(
|
|
2125
|
-
"hidden overflow-x-auto rounded-md border transition-opacity
|
|
2136
|
+
"hidden overflow-x-auto rounded-md border transition-opacity",
|
|
2137
|
+
visibility.table,
|
|
2126
2138
|
busyClass
|
|
2127
2139
|
),
|
|
2128
2140
|
children: table
|
|
2129
2141
|
}
|
|
2130
2142
|
),
|
|
2131
|
-
/* @__PURE__ */ jsx26("div", { "aria-busy": isBusy, className: cn("transition-opacity
|
|
2143
|
+
/* @__PURE__ */ jsx26("div", { "aria-busy": isBusy, className: cn("transition-opacity", visibility.cards, busyClass), children: cards }),
|
|
2132
2144
|
pagination
|
|
2133
2145
|
] });
|
|
2134
2146
|
}
|
|
@@ -2139,7 +2151,7 @@ import { ChevronRight as ChevronRight3, MoreVertical } from "lucide-react";
|
|
|
2139
2151
|
import { useState as useState12 } from "react";
|
|
2140
2152
|
import { Drawer as DrawerPrimitive6 } from "vaul";
|
|
2141
2153
|
import { Fragment as Fragment6, jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2142
|
-
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";
|
|
2154
|
+
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";
|
|
2143
2155
|
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";
|
|
2144
2156
|
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";
|
|
2145
2157
|
function RowActionsMenu({
|