@tmlmobilidade/ui 20250131.2255.24 → 20250205.1234.12
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/cjs/index.js +14 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/common/Button/index.d.ts +2 -1
- package/dist/cjs/types/src/components/layout/Sidebar/index.d.ts +8 -4
- package/dist/esm/index.js +14 -12
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/common/Button/index.d.ts +2 -1
- package/dist/esm/types/src/components/layout/Sidebar/index.d.ts +8 -4
- package/dist/index.d.ts +8 -2
- package/dist/styles.css +47 -30
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -779,7 +779,7 @@ function getValueAtPath(obj, path) {
|
|
|
779
779
|
}
|
|
780
780
|
|
|
781
781
|
/* * */
|
|
782
|
-
function Component$3({ className, icon, children, onClick, target, type = 'button', variant = 'primary', disabled, textTransform = 'none', ...props }) {
|
|
782
|
+
function Component$3({ className, icon, href, children, onClick, target, type = 'button', variant = 'primary', disabled, textTransform = 'none', ...props }) {
|
|
783
783
|
//
|
|
784
784
|
const btnClass = cn(className, styles$l.button, !disabled && {
|
|
785
785
|
[styles$l.danger]: variant === 'danger',
|
|
@@ -791,7 +791,7 @@ function Component$3({ className, icon, children, onClick, target, type = 'butto
|
|
|
791
791
|
[styles$l.warning]: variant === 'warning',
|
|
792
792
|
[styles$l.active]: variant === 'active',
|
|
793
793
|
}, disabled && styles$l.disabled);
|
|
794
|
-
return (jsxRuntimeExports.jsx(core.Button, { className: btnClass, leftSection: icon && icon, onClick: onClick, type: type, variant: variant, disabled: disabled, classNames: { label: styles$l.buttonLabel, ...props.classNames }, ...props, style: { textTransform: textTransform }, children: children }));
|
|
794
|
+
return (jsxRuntimeExports.jsx(core.Button, { className: btnClass, leftSection: icon && icon, onClick: onClick, type: type, component: href ? 'a' : 'button', href: href, variant: variant, disabled: disabled, classNames: { label: styles$l.buttonLabel, ...props.classNames }, ...props, style: { textTransform: textTransform }, children: children }));
|
|
795
795
|
//
|
|
796
796
|
}
|
|
797
797
|
|
|
@@ -858,7 +858,7 @@ function Component({ classNames, ...props }) {
|
|
|
858
858
|
return jsxRuntimeExports.jsx(core.Textarea, { classNames: classNames, ...props });
|
|
859
859
|
}
|
|
860
860
|
|
|
861
|
-
var styles$i = {"wrapper":"styles-module_wrapper__7zsRX","input":"styles-module_input__kZP4l","placeholder":"styles-module_placeholder__uazW4","pillInputWrapper":"styles-module_pillInputWrapper__rtJzo","
|
|
861
|
+
var styles$i = {"wrapper":"styles-module_wrapper__7zsRX","input":"styles-module_input__kZP4l","placeholder":"styles-module_placeholder__uazW4","pillInputWrapper":"styles-module_pillInputWrapper__rtJzo","icon":"styles-module_icon__jXQ8R","pillClearButton":"styles-module_pillClearButton__RYrwJ","pill":"styles-module_pill__eWbVa","label":"styles-module_label__tB0Ce","description":"styles-module_description__KHjxV","error":"styles-module_error__fOsRf","dropdownWrapper":"styles-module_dropdownWrapper__guQYa"};
|
|
862
862
|
|
|
863
863
|
function parseComboboxItem(item) {
|
|
864
864
|
if (typeof item === 'string') {
|
|
@@ -1317,7 +1317,7 @@ function Surface({ children, classNames, borderRadius = 'none', padding = 'none'
|
|
|
1317
1317
|
return (jsxRuntimeExports.jsxs("div", { className: rootClass, ...props, children: [jsxRuntimeExports.jsx("div", { className: surfaceClass, style: { justifyContent, alignItems, flexDirection }, children: children }), divider && jsxRuntimeExports.jsx("div", { className: dividerClass })] }));
|
|
1318
1318
|
}
|
|
1319
1319
|
|
|
1320
|
-
var styles$4 = {"container":"styles-module_container__tduxg","navWrapper":"styles-module_navWrapper__Xb59N","navButton":"styles-module_navButton__kTv0k","selected":"styles-module_selected__w-GVG"};
|
|
1320
|
+
var styles$4 = {"container":"styles-module_container__tduxg","navWrapper":"styles-module_navWrapper__Xb59N","navButton":"styles-module_navButton__kTv0k","selected":"styles-module_selected__w-GVG","disabled":"styles-module_disabled__lxQjN","header":"styles-module_header__Rc7hw","footer":"styles-module_footer__1qqil"};
|
|
1321
1321
|
|
|
1322
1322
|
function useIsActivePage(href) {
|
|
1323
1323
|
if (typeof window === 'undefined')
|
|
@@ -1335,19 +1335,21 @@ function useIsActivePage(href) {
|
|
|
1335
1335
|
return false;
|
|
1336
1336
|
}
|
|
1337
1337
|
|
|
1338
|
-
function Sidebar({ items, classNames }) {
|
|
1338
|
+
function Sidebar({ items, header, footer, classNames, }) {
|
|
1339
|
+
//
|
|
1339
1340
|
//
|
|
1340
1341
|
// A. Render components
|
|
1341
|
-
return (jsxRuntimeExports.jsx("div", { className: cn(styles$4.container, classNames?.container), children: jsxRuntimeExports.
|
|
1342
|
-
|
|
1343
|
-
|
|
1342
|
+
return (jsxRuntimeExports.jsx("div", { className: cn(styles$4.container, classNames?.container), children: jsxRuntimeExports.jsxs("div", { className: cn(styles$4.navWrapper, classNames?.navWrapper), children: [header && (jsxRuntimeExports.jsx("div", { className: cn(styles$4.header, classNames?.header), children: header })), items.map((item) => {
|
|
1343
|
+
return (jsxRuntimeExports.jsx(SidebarItem, { href: item.href, icon: item.icon, label: item.label, disabled: item.disabled }, item.href));
|
|
1344
|
+
}), footer && (jsxRuntimeExports.jsx("div", { className: cn(styles$4.footer, classNames?.footer), children: footer }))] }) }));
|
|
1344
1345
|
//
|
|
1345
1346
|
}
|
|
1346
|
-
function SidebarItem({ href, icon, label, classNames, }) {
|
|
1347
|
+
function SidebarItem({ href, icon, label, disabled, classNames, }) {
|
|
1347
1348
|
const isActive = useIsActivePage(href);
|
|
1348
1349
|
return (jsxRuntimeExports.jsx(core.Tooltip, { label: label, position: "right", children: jsxRuntimeExports.jsx("a", { href: href, children: jsxRuntimeExports.jsx(core.ActionIcon, { className: cn(styles$4.navButton, classNames?.navButton, {
|
|
1349
1350
|
[styles$4.selected]: isActive,
|
|
1350
|
-
|
|
1351
|
+
[styles$4.disabled]: disabled,
|
|
1352
|
+
}), size: "xl", children: icon }) }) }));
|
|
1351
1353
|
}
|
|
1352
1354
|
|
|
1353
1355
|
function accessorSearch(record, accessor, query) {
|
|
@@ -1517,7 +1519,7 @@ function DataTableRow({ columns, record, onRowClick, onRowDoubleClick, onRowCont
|
|
|
1517
1519
|
: String(getValueAtPath(record, column.accessor)) }, colIndex))) }));
|
|
1518
1520
|
}
|
|
1519
1521
|
|
|
1520
|
-
var styles$1 = {"root":"styles-module_root__2WSxN","title":"styles-module_title__qCJZG"
|
|
1522
|
+
var styles$1 = {"root":"styles-module_root__2WSxN","title":"styles-module_title__qCJZG"};
|
|
1521
1523
|
|
|
1522
1524
|
function DataTableTitle({ search, title }) {
|
|
1523
1525
|
//
|
|
@@ -1535,7 +1537,7 @@ function DataTableTitle({ search, title }) {
|
|
|
1535
1537
|
return (jsxRuntimeExports.jsxs("div", { className: styles$1.root, children: [jsxRuntimeExports.jsx("div", { className: styles$1.title, children: title && title }), search && !search.hidden && (jsxRuntimeExports.jsx("div", { className: styles$1.filters, children: jsxRuntimeExports.jsx(Component$2, { onChange: handleSearchChange, placeholder: search.placeholder, value: searchQuery }) }))] }));
|
|
1536
1538
|
}
|
|
1537
1539
|
|
|
1538
|
-
var styles = {"root":"styles-module_root__AStX6","tableWrapper":"styles-module_tableWrapper__ByR84","table":"styles-module_table__IKm6A"
|
|
1540
|
+
var styles = {"root":"styles-module_root__AStX6","tableWrapper":"styles-module_tableWrapper__ByR84","table":"styles-module_table__IKm6A"};
|
|
1539
1541
|
|
|
1540
1542
|
function DataTable({ records, ...props }) {
|
|
1541
1543
|
return (jsxRuntimeExports.jsx(DataTableProvider, { initialRecords: records, searchAccessors: props.search?.accessors ?? [], children: jsxRuntimeExports.jsx(DataTableContent, { ...props }) }));
|