@wellingtonhlc/shared-ui 0.26.14 → 0.27.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/Button.js +1 -1
- package/dist/components/ConfirmationDialog.js +3 -3
- package/dist/components/FieldControl.d.ts +2 -0
- package/dist/components/FieldControl.d.ts.map +1 -1
- package/dist/components/FieldControl.js +3 -3
- package/dist/components/Filter.d.ts.map +1 -1
- package/dist/components/Filter.js +2 -2
- package/dist/components/Modal.d.ts.map +1 -1
- package/dist/components/Modal.js +3 -3
- package/dist/components/Page.d.ts.map +1 -1
- package/dist/components/Page.js +1 -0
- package/dist/components/SelectionField.js +1 -1
- package/dist/components/Table.d.ts +36 -3
- package/dist/components/Table.d.ts.map +1 -1
- package/dist/components/Table.js +84 -5
- package/dist/components/TextareaField.d.ts +2 -0
- package/dist/components/TextareaField.d.ts.map +1 -1
- package/dist/components/TextareaField.js +15 -7
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/Workspace.d.ts +3 -1
- package/dist/components/Workspace.d.ts.map +1 -1
- package/dist/components/Workspace.js +13 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +210 -21
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ const variantClasses = {
|
|
|
10
10
|
success: 'border-[var(--status-success-border,#86efac)] bg-[var(--status-success-bg,rgba(220,252,231,0.8))] text-[var(--status-success-text,#15803d)] shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--status-success-border,#86efac)_18%,transparent)] hover:bg-[color-mix(in_srgb,var(--status-success-bg,rgba(220,252,231,0.8))_78%,var(--status-success-border,#86efac))]',
|
|
11
11
|
warning: 'border-[var(--status-warning-border,#fcd34d)] bg-[var(--status-warning-bg,rgba(254,243,199,0.8))] text-[var(--status-warning-text,#92400e)] shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--status-warning-border,#fcd34d)_18%,transparent)] hover:bg-[color-mix(in_srgb,var(--status-warning-bg,rgba(254,243,199,0.8))_78%,var(--status-warning-border,#fcd34d))]',
|
|
12
12
|
danger: 'border-[var(--status-danger-border,#fca5a5)] bg-[var(--status-danger-bg,rgba(254,202,202,0.8))] text-[var(--status-danger-text,#b91c1c)] shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--status-danger-border,#fca5a5)_18%,transparent)] hover:bg-[color-mix(in_srgb,var(--status-danger-bg,rgba(254,202,202,0.8))_78%,var(--status-danger-border,#fca5a5))]',
|
|
13
|
-
destructive: 'border-transparent bg-[
|
|
13
|
+
destructive: 'border-transparent bg-[#dc2626] text-white hover:bg-[#b91c1c]',
|
|
14
14
|
sidebar: 'border-transparent bg-transparent text-foreground-muted hover:bg-[color-mix(in_srgb,var(--brand)_10%,transparent)] hover:text-[var(--brand)]',
|
|
15
15
|
};
|
|
16
16
|
const sizeClasses = {
|
|
@@ -26,8 +26,8 @@ const dialogVariantStyles = {
|
|
|
26
26
|
},
|
|
27
27
|
destructive: {
|
|
28
28
|
icon: AlertCircleIcon,
|
|
29
|
-
iconClassName: 'text-[color-mix(in_srgb
|
|
30
|
-
titleClassName: 'text-[color-mix(in_srgb
|
|
29
|
+
iconClassName: 'text-[color-mix(in_srgb,#dc2626_86%,var(--foreground))]',
|
|
30
|
+
titleClassName: 'text-[color-mix(in_srgb,#dc2626_86%,var(--foreground))]',
|
|
31
31
|
},
|
|
32
32
|
};
|
|
33
33
|
const buttonVariantDefaults = {
|
|
@@ -150,7 +150,7 @@ function Root({ children, className, closeOnEscape = true, onOpenChange, open, o
|
|
|
150
150
|
if (!open) {
|
|
151
151
|
return null;
|
|
152
152
|
}
|
|
153
|
-
return createPortal(_jsx(ConfirmationDialogContext.Provider, { value: value, children: _jsx("div", { className: cn('fixed inset-0 z-[
|
|
153
|
+
return createPortal(_jsx(ConfirmationDialogContext.Provider, { value: value, children: _jsx("div", { className: cn('fixed inset-0 z-[10000] flex items-center justify-center bg-black/50 p-4 backdrop-blur-[2px]', overlayClassName), role: "presentation", children: _jsxs("section", { "aria-describedby": descriptionId, "aria-labelledby": titleId, "aria-modal": "true", className: cn('border-app-border bg-background-secondary text-foreground relative grid gap-4 rounded-xl border p-6 shadow-2xl', className), role: "alertdialog", style: { width: 'min(29rem, calc(100vw - 2rem))' }, children: [_jsx("button", { "aria-label": "Fechar", className: cn('text-foreground-muted hover:bg-background hover:text-foreground absolute right-4 top-4 inline-flex size-7 cursor-pointer items-center justify-center rounded-md opacity-60 transition disabled:cursor-not-allowed disabled:opacity-30'), disabled: isBusy, onClick: close, type: "button", children: _jsx(XIcon, { className: "size-3.5" }) }), children] }) }) }), document.body);
|
|
154
154
|
}
|
|
155
155
|
function Icon({ className }) {
|
|
156
156
|
const { variant } = useConfirmationDialog();
|
|
@@ -11,6 +11,8 @@ export interface FieldControlProps {
|
|
|
11
11
|
roundedFull?: boolean;
|
|
12
12
|
size?: FormControlSize;
|
|
13
13
|
labelPosition?: 'top' | 'right' | 'bottom' | 'left';
|
|
14
|
+
/** Faz o campo preencher a altura disponivel do container (wrapper e controle crescem). */
|
|
15
|
+
stretch?: boolean;
|
|
14
16
|
disabled?: boolean;
|
|
15
17
|
children?: React.ReactNode | ((props: FormControlRenderProps) => React.ReactNode);
|
|
16
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldControl.d.ts","sourceRoot":"","sources":["../../src/components/FieldControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAGhC,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,gBAAgB,CAAC,EAAE,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AAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,sBAAsB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;CACnF;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2HpD,CAAC"}
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { cn } from '../utils/cn';
|
|
4
4
|
import { fieldWrapper, labelBase, } from './form-control-helpers';
|
|
5
5
|
import { FieldValidationError } from './FieldValidationError';
|
|
6
|
-
export const FieldControl = ({ label, id, wrapperClassName, labelClassName = '', labelAction, labelPosition = 'top', errorMessage, roundedFull = false, size = 'sm', disabled = false, hasValidation = false, children, }) => {
|
|
6
|
+
export const FieldControl = ({ label, id, wrapperClassName, labelClassName = '', labelAction, labelPosition = 'top', errorMessage, roundedFull = false, size = 'sm', stretch = false, disabled = false, hasValidation = false, children, }) => {
|
|
7
7
|
const generatedId = React.useId().replace(/:/g, '');
|
|
8
8
|
const componentId = id ?? `fc-${generatedId}`;
|
|
9
9
|
const errorId = `${componentId}-error`;
|
|
@@ -48,7 +48,7 @@ export const FieldControl = ({ label, id, wrapperClassName, labelClassName = '',
|
|
|
48
48
|
};
|
|
49
49
|
const renderedChildren = typeof children === 'function' ? children(renderProps) : children;
|
|
50
50
|
const renderedLabel = label ? (_jsxs("div", { className: cn('flex items-center justify-between gap-2', isHorizontal && 'shrink-0'), style: { order: labelOrder }, children: [_jsx("label", { htmlFor: componentId, className: mergedLabelClassName, children: label }), labelAction] })) : null;
|
|
51
|
-
return (_jsxs("div", { className: cn(fieldWrapper, wrapperClassName, scopeClass, roundedClass), "data-disabled": disabled || undefined, "data-invalid": !!errorMessage || undefined, children: [_jsx("style", { children: `
|
|
51
|
+
return (_jsxs("div", { className: cn(fieldWrapper, stretch && 'h-full min-h-0', wrapperClassName, scopeClass, roundedClass), "data-disabled": disabled || undefined, "data-invalid": !!errorMessage || undefined, children: [_jsx("style", { children: `
|
|
52
52
|
.${scopeClass} input,
|
|
53
53
|
.${scopeClass} textarea,
|
|
54
54
|
.${scopeClass} select { color: var(--foreground); }
|
|
@@ -68,6 +68,6 @@ export const FieldControl = ({ label, id, wrapperClassName, labelClassName = '',
|
|
|
68
68
|
.${roundedClass} input::placeholder,
|
|
69
69
|
.${roundedClass} textarea::placeholder,
|
|
70
70
|
.${roundedClass} select::placeholder { opacity: 0.5; }
|
|
71
|
-
` }), _jsxs("div", { className: cn('flex gap-2', flexDirection), children: [labelOrder === 0 && renderedLabel, _jsx("div", { style: { order: inputOrder }, className: isHorizontal
|
|
71
|
+
` }), _jsxs("div", { className: cn('flex gap-2', flexDirection, stretch && 'min-h-0 flex-1'), children: [labelOrder === 0 && renderedLabel, _jsx("div", { style: { order: inputOrder }, className: cn(isHorizontal && 'flex-1', stretch && 'min-h-0 flex-1'), children: renderedChildren }), labelOrder === 1 && renderedLabel] }), _jsx(FieldValidationError, { id: errorId, message: errorMessage, hasValidation: hasValidation })] }));
|
|
72
72
|
};
|
|
73
73
|
FieldControl.displayName = 'FieldControl';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Filter.d.ts","sourceRoot":"","sources":["../../src/components/Filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,SAAS,EAEd,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,OAAO,EAAyB,KAAK,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAK5F,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,K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AE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,uBAAuB,8DAA2D,CAAC;AAEhG,iBAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,iBAAiB,+BAS/D;AAED,iBAAS,gBAAgB,CAAC,EAAE,QAAQ,EAAE,WAAkB,EAAE,IAAI,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,qBAAqB,+BAiB/H;AAED,iBAAS,aAAa,CAAC,EAAE,WAAW,EAAE,KAAiB,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,+BAmB/F;AAuBD,iBAAS,UAAU,CAAC,EAClB,KAAiB,EACjB,WAAgB,EAChB,QAAQ,EACR,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,kBAAuB,EACvB,QAAQ,EACR,OAAO,EACP,WAAW,EACX,UAAU,EACV,YAAoB,EACpB,eAAuB,EACvB,eAAe,GAChB,EAAE,eAAe,+BAoDjB;AAED,eAAO,MAAM,MAAM;;;;;CAKlB,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { Card } from './Card';
|
|
|
8
8
|
import { RenderIf } from './RenderIf';
|
|
9
9
|
export const FilterVisibilityContext = createContext(null);
|
|
10
10
|
function FilterFooter({ children, className }) {
|
|
11
|
-
return (_jsx("div", { className: cn('border-app-border flex shrink-0 items-center justify-end gap-2 border-t px-4 py-3', className), children: children }));
|
|
11
|
+
return (_jsx("div", { "data-slot": "filter-footer", className: cn('border-app-border flex shrink-0 items-center justify-end gap-2 border-t px-4 py-3', className), children: children }));
|
|
12
12
|
}
|
|
13
13
|
function FilterVisibility({ children, defaultOpen = true, open: controlledOpen, onOpenChange, className }) {
|
|
14
14
|
const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
|
|
@@ -58,7 +58,7 @@ function FilterRoot({ title = 'Filtros', description = '', children, className,
|
|
|
58
58
|
onSubmit?.(event);
|
|
59
59
|
}
|
|
60
60
|
const bodyContent = (_jsxs("div", { className: "flex min-h-0 flex-1 flex-col gap-3", children: [_jsx("div", { className: cn('min-h-0 flex-1 overflow-y-auto [scrollbar-gutter:stable]', contentClassName), children: _jsxs("div", { className: cn('flex flex-col gap-1 py-3 pl-4 pr-1', fieldsClassName), children: [description ? _jsx("p", { className: "text-foreground-muted text-xs leading-5", children: description }) : null, contentChildren] }) }), hasExplicitFooter ? footerChildren : null, !hasExplicitFooter && hasAutomaticActions ? (_jsx(FilterActions, { actionsDisabled: actionsDisabled, clearLabel: clearLabel, isSubmitting: isSubmitting, onClear: onClear, onSubmit: onSubmit, submitLabel: submitLabel })) : null] }));
|
|
61
|
-
return (_jsxs(Card.Root, { id: visibility?.contentId, className: cn('flex h-full w-full min-w-0 flex-col overflow-hidden', maxHeightClassName, className), "data-slot": "filter-root", "data-state": isOpen ? 'open' : 'closed', children: [_jsxs(Card.Title, { children: [_jsx(FilterIcon, { className: "text-primary h-4 w-4" }), title] }), _jsx(Card.Body, { density: "none", className: cn('flex min-h-0 flex-1 flex-col', bodyClassName), children: onSubmit ? _jsx("form", { className: "flex min-h-0 flex-1 flex-col", onSubmit: handleSubmit, children: bodyContent }) : bodyContent })] }));
|
|
61
|
+
return (_jsxs(Card.Root, { id: visibility?.contentId, className: cn('flex h-full w-full min-w-0 flex-col overflow-hidden', maxHeightClassName, className), "data-slot": "filter-root", "data-state": isOpen ? 'open' : 'closed', children: [_jsxs(Card.Title, { "data-slot": "filter-header", children: [_jsx(FilterIcon, { className: "text-primary h-4 w-4" }), title] }), _jsx(Card.Body, { density: "none", className: cn('flex min-h-0 flex-1 flex-col', bodyClassName), children: onSubmit ? _jsx("form", { className: "flex min-h-0 flex-1 flex-col", onSubmit: handleSubmit, children: bodyContent }) : bodyContent })] }));
|
|
62
62
|
}
|
|
63
63
|
export const Filter = {
|
|
64
64
|
Root: FilterRoot,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names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C;IACpE,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAkED,iBAAS,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,4UAW9F;AAED,iBAAS,SAAS,CAAC,EACjB,kBAA0B,EAC1B,QAAgB,EAChB,QAAQ,EACR,SAAS,EACT,OAAmB,EACnB,gBAAgB,EAChB,MAAM,EACN,eAAsB,EACtB,IAAW,EACX,OAAmB,EACnB,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,cAAc,qBAqEhB;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,OAAmB,EAAE,SAAiB,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,qBAetG;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,OAAmB,EAAE,eAAuB,EAAE,UAAkB,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,qBAc3H;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,OAAmB,EAAE,SAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,qBAcrG;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAE9F;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,qBAE1G;AAED,eAAO,MAAM,KAAK;;;;;;;;;;;CAWjB,CAAC"}
|
package/dist/components/Modal.js
CHANGED
|
@@ -73,17 +73,17 @@ function ModalRoot({ allowExternalFocus = false, centered = false, children, cla
|
|
|
73
73
|
onOpenChange?.(nextOpen);
|
|
74
74
|
}
|
|
75
75
|
const hasFooter = React.Children.toArray(children).some((child) => React.isValidElement(child) && child.type === ModalFooter);
|
|
76
|
-
return (_jsx(DialogPrimitive.Root, { ...props, open: open, onOpenChange: handleOpenChange, children: _jsxs(DialogPrimitive.Portal, { children: [_jsx(DialogPrimitive.Overlay, { style: { zIndex: overlayZIndex }, className: cn('fixed inset-0 z-[100] bg-black/50 backdrop-blur-[2px]
|
|
76
|
+
return (_jsx(DialogPrimitive.Root, { ...props, modal: !allowExternalFocus, open: open, onOpenChange: handleOpenChange, children: _jsxs(DialogPrimitive.Portal, { children: [_jsx(DialogPrimitive.Overlay, { style: { zIndex: overlayZIndex }, className: cn('fixed inset-0 z-[100] bg-black/50 backdrop-blur-[2px]', allowExternalFocus && 'pointer-events-none', overlayClassName) }), _jsxs(DialogPrimitive.Content, { style: {
|
|
77
77
|
zIndex: contentZIndex,
|
|
78
78
|
width: widthVariants[size],
|
|
79
79
|
...(!centered && offset ? { top: `${offset}px` } : {}),
|
|
80
|
-
}, className: cn('fixed z-[110] grid max-h-[95vh]', hasFooter ? 'grid-rows-[auto_minmax(0,1fr)_auto]' : 'grid-rows-[auto_minmax(0,1fr)]', 'rounded-xl
|
|
80
|
+
}, className: cn('fixed z-[110] grid max-h-[95vh]', hasFooter ? 'grid-rows-[auto_minmax(0,1fr)_auto]' : 'grid-rows-[auto_minmax(0,1fr)]', 'rounded-xl', density === 'default' && 'p-6', density === 'compact' && 'p-4', variant === 'default' && 'border-app-border bg-background-secondary text-foreground border shadow-lg', variant === 'elevated' && 'border-app-border bg-surface text-foreground border shadow-2xl', centered ? 'left-[50%] top-[50%] -translate-x-1/2 -translate-y-1/2' : 'left-[50%] top-[2.5%] -translate-x-1/2', sizeVariants[size], minHeightVariants[size], className), children: [children, showCloseButton ? (_jsxs(DialogPrimitive.Close, { className: cn('absolute right-4 top-4 inline-flex h-8 w-8 items-center justify-center rounded-md', 'text-foreground-muted hover:bg-background hover:text-foreground cursor-pointer transition-colors', 'focus:ring-brand/50 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none'), children: [_jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Fechar" })] })) : null] })] }) }));
|
|
81
81
|
}
|
|
82
82
|
function ModalHeader({ className, density = 'default', separated = false, ...props }) {
|
|
83
83
|
return (_jsx("div", { "data-slot": "modal-header", className: cn('flex flex-col text-center sm:text-left', density === 'default' && 'gap-1.5 [&_[data-slot=modal-description]]:text-sm [&_[data-slot=modal-title]]:text-lg', density === 'compact' && 'gap-0.5 [&_[data-slot=modal-description]]:text-xs [&_[data-slot=modal-title]]:text-base', separated && density === 'default' && 'border-app-border border-b pb-4', separated && density === 'compact' && 'border-app-border border-b pb-2', className), ...props }));
|
|
84
84
|
}
|
|
85
85
|
function ModalBody({ className, density = 'default', overflowVisible = false, scrollable = false, ...props }) {
|
|
86
|
-
return (_jsx("div", { "data-slot": "modal-body", className: cn('flex min-h-0 flex-col', density === 'default' && 'space-y-5 text-sm leading-6', density === 'compact' && 'space-y-2 text-xs leading-5', overflowVisible ? 'overflow-visible' : scrollable ? 'overflow-y-auto
|
|
86
|
+
return (_jsx("div", { "data-slot": "modal-body", className: cn('flex min-h-0 flex-col', density === 'default' && 'space-y-5 py-4 text-sm leading-6', density === 'compact' && 'space-y-2 py-2 text-xs leading-5', overflowVisible ? 'overflow-visible' : scrollable ? 'overflow-y-auto pr-1' : 'overflow-visible', className), ...props }));
|
|
87
87
|
}
|
|
88
88
|
function ModalFooter({ className, density = 'default', separated = true, ...props }) {
|
|
89
89
|
return (_jsx("div", { "data-slot": "modal-footer", className: cn('flex flex-col-reverse sm:flex-row sm:justify-end', density === 'default' && 'mt-3 gap-2.5 pt-5', density === 'compact' && 'mt-0 gap-1.5 pt-2', separated && 'border-app-border border-t', className), ...props }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../src/components/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,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AAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,wBAAwB,+BAK3E;AAED,UAAU,oBAAoB;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,mBAAmB,CAAC;CAC/B;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,oBAAoB,sCAoBjE;AAED,UAAU,eAAe;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAED,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,kBAAkB,CAAC,CAAC;AAChE,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,oBAAoB,CAAC,CAAC;AAExE,iBAAS,KAAK,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,+BAM/D;AAED,iBAAS,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,+BAM3E;AAED,iBAAS,MAAM,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,eAAe,+BAexE;AAED,eAAO,MAAM,IAAI;;;;;;;;;;;CAWhB,CAAC"}
|
package/dist/components/Page.js
CHANGED
|
@@ -100,6 +100,6 @@ export function SelectionField({ label, description, value, placeholder = 'Selec
|
|
|
100
100
|
? 'cursor-not-allowed'
|
|
101
101
|
: cn('cursor-pointer', !isClearHover &&
|
|
102
102
|
'hover:border-[color-mix(in_srgb,var(--brand)_58%,var(--app-border))] hover:bg-[color-mix(in_srgb,var(--brand)_8%,var(--surface))]'), size === 'lg' ? 'rounded-lg' : 'rounded-md', controlSizeClass[size], controlGapClass[size], resolvedIcon ? controlIconPaddingClass[size] : controlLeadingPaddingClass[size], controlClassName),
|
|
103
|
-
}), "data-empty": !hasValue || undefined, "data-loading": loading || undefined, onClick: handleOpen, children: [resolvedIcon ? (_jsx("span", { className: cn('inline-flex shrink-0 items-center justify-center rounded-md text-foreground-muted', !hasValue && 'text-[color-mix(in_srgb,var(--brand)_72%,var(--foreground-muted))]', actionSizeClass[size], iconSizeClass[size]), "aria-hidden": "true", children: resolvedIcon })) : null, _jsxs("div", { className: cn('min-w-0 flex-1 text-left', textGapClass[size]), children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsxs("span", { className: cn('min-w-0 truncate font-semibold', hasValue ? 'text-foreground' : 'text-foreground-muted'), children: [title, required && !hasValue ? _jsx("span", { "aria-hidden": "true", children: " *" }) : null] }), meta ? (_jsx("span", { className: "border-app-border bg-background text-foreground-muted shrink-0 rounded border px-1.5 py-0.5 font-mono text-[0.65rem] leading-none", children: meta })) : null] }), subtitle ? (_jsx("p", { className: cn('text-foreground-muted truncate text-xs font-medium', (size === 'xs' || size === 'sm') && 'sr-only'), children: subtitle })) : null] }), shortcutHint ? (_jsx("kbd", { className: "border-app-border bg-background text-foreground-muted hidden shrink-0 rounded border px-1.5 py-1 font-mono text-[0.65rem] leading-none sm:inline-flex", children: shortcutHint })) : null, showClear ? (_jsx("button", { type: "button", "aria-label": clearTooltip, className: cn('inline-flex cursor-pointer shrink-0 items-center justify-center rounded-md border border-transparent bg-transparent text-foreground-muted transition-colors', 'hover:bg-[color-mix(in_srgb,var(--destructive)_10%,transparent)] hover:text-[var(--destructive)]', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--destructive)]/25', actionSizeClass[size]), title: clearTooltip, onClick: handleClear, onMouseEnter: handleClearMouseEnter, onMouseLeave: handleClearMouseLeave, children: _jsx(X, { "aria-hidden": "true" }) })) : null, _jsx("span", { onClick: stopPropagation, children: selectionTrigger })] }), description ? (_jsx("p", { id: describedById, className: "mt-1 text-xs font-medium text-foreground-muted", children: description })) : null] }));
|
|
103
|
+
}), "data-empty": !hasValue || undefined, "data-loading": loading || undefined, onClick: handleOpen, children: [resolvedIcon ? (_jsx("span", { className: cn('inline-flex shrink-0 items-center justify-center rounded-md text-foreground-muted', !hasValue && 'text-[color-mix(in_srgb,var(--brand)_72%,var(--foreground-muted))]', actionSizeClass[size], iconSizeClass[size]), "aria-hidden": "true", children: resolvedIcon })) : null, _jsxs("div", { className: cn('min-w-0 flex-1 text-left', textGapClass[size]), children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsxs("span", { className: cn('min-w-0 truncate font-semibold', hasValue ? 'text-foreground' : 'text-foreground-muted'), children: [title, required && !hasValue ? _jsx("span", { "aria-hidden": "true", children: " *" }) : null] }), meta ? (_jsx("span", { className: "border-app-border bg-background text-foreground-muted shrink-0 rounded border px-1.5 py-0.5 font-mono text-[0.65rem] leading-none", children: meta })) : null] }), subtitle ? (_jsx("p", { className: cn('text-foreground-muted truncate text-xs font-medium', (size === 'xs' || size === 'sm') && 'sr-only'), children: subtitle })) : null] }), shortcutHint ? (_jsx("kbd", { className: "border-app-border bg-background text-foreground-muted hidden shrink-0 rounded border px-1.5 py-1 font-mono text-[0.65rem] leading-none sm:inline-flex", children: shortcutHint })) : null, showClear ? (_jsx("button", { type: "button", "aria-label": clearTooltip, className: cn('inline-flex cursor-pointer shrink-0 items-center justify-center rounded-md border border-transparent bg-transparent text-foreground-muted transition-colors', 'hover:bg-[color-mix(in_srgb,var(--destructive)_10%,transparent)] hover:text-[var(--destructive)]', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--destructive)]/25', actionSizeClass[size]), title: clearTooltip, onClick: handleClear, onMouseEnter: handleClearMouseEnter, onMouseLeave: handleClearMouseLeave, children: _jsx(X, { "aria-hidden": "true" }) })) : null, disabled ? null : _jsx("span", { onClick: stopPropagation, children: selectionTrigger })] }), description ? (_jsx("p", { id: describedById, className: "mt-1 text-xs font-medium text-foreground-muted", children: description })) : null] }));
|
|
104
104
|
} }));
|
|
105
105
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { type ButtonHTMLAttributes, type HTMLAttributes, type TableHTMLAttributes, type TdHTMLAttributes, type ThHTMLAttributes } from 'react';
|
|
1
|
+
import { type ButtonHTMLAttributes, type ColHTMLAttributes, type HTMLAttributes, type TableHTMLAttributes, type TdHTMLAttributes, type ThHTMLAttributes } from 'react';
|
|
2
2
|
import { Pagination } from './Pagination';
|
|
3
3
|
interface TableRootProps extends TableHTMLAttributes<HTMLTableElement> {
|
|
4
4
|
chrome?: 'default' | 'flat';
|
|
5
5
|
density?: 'default' | 'compact';
|
|
6
6
|
fill?: boolean;
|
|
7
|
+
layout?: 'auto' | 'fixed';
|
|
7
8
|
isFramed?: boolean;
|
|
8
9
|
viewportClassName?: string;
|
|
9
10
|
wrapperClassName?: string;
|
|
@@ -12,8 +13,38 @@ interface TableRootProps extends TableHTMLAttributes<HTMLTableElement> {
|
|
|
12
13
|
interface TableRowProps extends HTMLAttributes<HTMLTableRowElement> {
|
|
13
14
|
isInteractive?: boolean;
|
|
14
15
|
}
|
|
16
|
+
export declare const TABLE_ACTION_CELL_WIDTH_PX: number;
|
|
17
|
+
/**
|
|
18
|
+
* O rotulo "Ações" ocupa ~45px. Um grupo com um unico botao (28px) nao o comporta,
|
|
19
|
+
* entao o grupo inteiro respeita este minimo — sem nunca absorver a sobra da tabela.
|
|
20
|
+
*/
|
|
21
|
+
export declare const TABLE_ACTION_GROUP_MIN_WIDTH_PX = 56;
|
|
22
|
+
/**
|
|
23
|
+
* Folga entre o icone da ponta e a borda da tabela: sem ela o botao encosta na
|
|
24
|
+
* moldura. Entra como padding, entao o valor inteiro vira folga na borda
|
|
25
|
+
* (centralizar o botao mandaria metade dela para o vao entre icones).
|
|
26
|
+
*/
|
|
27
|
+
export declare const TABLE_ACTION_EDGE_GUTTER_PX = 12;
|
|
28
|
+
export declare function getTableActionColumnWidth(actionCount?: number, hasEdgeGutter?: boolean): number;
|
|
29
|
+
export type TableActionColumnSize = 'sm' | 'md' | 'lg';
|
|
30
|
+
interface TableActionHeadProps extends ThHTMLAttributes<HTMLTableCellElement> {
|
|
31
|
+
size?: TableActionColumnSize;
|
|
32
|
+
}
|
|
33
|
+
interface TableActionColProps extends ColHTMLAttributes<HTMLTableColElement> {
|
|
34
|
+
actionCount?: number;
|
|
35
|
+
hasEdgeGutter?: boolean;
|
|
36
|
+
}
|
|
37
|
+
interface TableActionCellProps extends TdHTMLAttributes<HTMLTableCellElement> {
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Tonalidade semantica do icone. Todas mantem o corpo do `ghost` (sem preenchimento
|
|
41
|
+
* nem borda) e so trocam a cor: icone tonalizado em repouso e hover com a mesma cor
|
|
42
|
+
* suavizada, igual ao default faz com a `--brand`.
|
|
43
|
+
*/
|
|
44
|
+
export type TableActionTone = 'default' | 'success' | 'danger';
|
|
15
45
|
interface TableActionProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
16
|
-
|
|
46
|
+
size?: 'xs' | 'sm';
|
|
47
|
+
tone?: TableActionTone;
|
|
17
48
|
tooltip?: string;
|
|
18
49
|
}
|
|
19
50
|
export declare const Table: {
|
|
@@ -23,8 +54,10 @@ export declare const Table: {
|
|
|
23
54
|
Footer: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
24
55
|
Row: import("react").ForwardRefExoticComponent<TableRowProps & import("react").RefAttributes<HTMLTableRowElement>>;
|
|
25
56
|
Head: import("react").ForwardRefExoticComponent<ThHTMLAttributes<HTMLTableCellElement> & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
57
|
+
ActionHead: import("react").ForwardRefExoticComponent<TableActionHeadProps & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
58
|
+
ActionCol: import("react").ForwardRefExoticComponent<TableActionColProps & import("react").RefAttributes<HTMLTableColElement>>;
|
|
26
59
|
Cell: import("react").ForwardRefExoticComponent<TdHTMLAttributes<HTMLTableCellElement> & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
27
|
-
ActionCell: import("react").ForwardRefExoticComponent<
|
|
60
|
+
ActionCell: import("react").ForwardRefExoticComponent<TableActionCellProps & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
28
61
|
Action: import("react").ForwardRefExoticComponent<TableActionProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
29
62
|
Pagination: typeof Pagination;
|
|
30
63
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../src/components/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,UAAU,cAAe,SAAQ,mBAAmB,CAAC,gBAAgB,CAAC;IACpE,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;CAC/C;
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../src/components/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EAEtB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,UAAU,cAAe,SAAQ,mB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AAE,IAAI,GAAG,IAAI,CAAC;IACnB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAoBD,eAAO,MAAM,KAAK;;;;;;;;;;;;;CAajB,CAAC"}
|
package/dist/components/Table.js
CHANGED
|
@@ -3,12 +3,12 @@ import { Children, forwardRef, isValidElement, } from 'react';
|
|
|
3
3
|
import { cn } from '../utils/cn';
|
|
4
4
|
import { Button } from './Button';
|
|
5
5
|
import { Pagination } from './Pagination';
|
|
6
|
-
const Root = forwardRef(({ children, chrome = 'default', className, density = 'default', fill = true, isFramed = true, viewportClassName, wrapperClassName, wrapperProps, ...props }, ref) => {
|
|
6
|
+
const Root = forwardRef(({ children, chrome = 'default', className, density = 'default', fill = true, layout = 'auto', isFramed = true, viewportClassName, wrapperClassName, wrapperProps, ...props }, ref) => {
|
|
7
7
|
const childNodes = Children.toArray(children);
|
|
8
8
|
const tableChildren = childNodes.filter((child) => !isValidElement(child) || child.type !== Pagination);
|
|
9
9
|
const paginationChildren = childNodes.filter((child) => isValidElement(child) && child.type === Pagination);
|
|
10
10
|
const { className: wrapperPropsClassName, ...resolvedWrapperProps } = wrapperProps ?? {};
|
|
11
|
-
return (_jsxs("div", { ...resolvedWrapperProps, "data-slot": "table-root", className: cn('bg-surface flex w-full min-w-0 flex-col overflow-hidden', fill && 'h-full min-h-0 grow', isFramed && 'border-app-border rounded-[var(--radius)] border', isFramed && chrome === 'default' && 'shadow-[0_4px_6px_-1px_rgb(0_0_0/0.07),0_2px_4px_-2px_rgb(0_0_0/0.05)]', density === 'compact' && '[&_td]:py-2 [&_th]:py-2', wrapperPropsClassName, wrapperClassName), children: [_jsx("div", { className: cn('min-h-0 flex-1 overflow-auto', viewportClassName), children: _jsx("table", { ref: ref, className: cn('w-full border-separate border-spacing-0 caption-bottom text-sm text-foreground', className), ...props, children: tableChildren }) }), paginationChildren.length > 0 && (_jsx("div", { className: cn('border-app-border bg-
|
|
11
|
+
return (_jsxs("div", { ...resolvedWrapperProps, "data-slot": "table-root", className: cn('bg-surface flex w-full min-w-0 flex-col overflow-hidden', fill && 'h-full min-h-0 grow', isFramed && 'border-app-border rounded-[var(--radius)] border', isFramed && chrome === 'default' && 'shadow-[0_4px_6px_-1px_rgb(0_0_0/0.07),0_2px_4px_-2px_rgb(0_0_0/0.05)]', density === 'compact' && '[&_td]:py-2 [&_th]:py-2', wrapperPropsClassName, wrapperClassName), children: [_jsx("div", { className: cn('min-h-0 flex-1 overflow-auto', viewportClassName), children: _jsx("table", { ref: ref, className: cn('w-full border-separate border-spacing-0 caption-bottom text-sm text-foreground', layout === 'fixed' && 'table-fixed', className), ...props, children: tableChildren }) }), paginationChildren.length > 0 && (_jsx("div", { "data-slot": "table-pagination", className: cn('border-app-border bg-background-secondary shrink-0 border-t px-3 py-2', density === 'compact' && 'px-3 py-2'), children: paginationChildren }))] }));
|
|
12
12
|
});
|
|
13
13
|
Root.displayName = 'Table.Root';
|
|
14
14
|
const Header = forwardRef(({ className, ...props }, ref) => _jsx("thead", { ref: ref, className: cn('bg-background-secondary', className), ...props }));
|
|
@@ -17,15 +17,92 @@ const Body = forwardRef(({ className, ...props }, ref) => _jsx("tbody", { ref: r
|
|
|
17
17
|
Body.displayName = 'Table.Body';
|
|
18
18
|
const Footer = forwardRef(({ className, ...props }, ref) => (_jsx("tfoot", { ref: ref, className: cn('border-app-border bg-background border-t font-medium', className), ...props })));
|
|
19
19
|
Footer.displayName = 'Table.Footer';
|
|
20
|
-
const Row = forwardRef(({ className, isInteractive = true, ...props }, ref) => (_jsx("tr", { ref: ref, className: cn('transition-colors hover:bg-[color-mix(in_srgb,var(--brand)_5%,transparent)] last:[&>td]:border-b-0', isInteractive && 'cursor-pointer', className), ...props })));
|
|
20
|
+
const Row = forwardRef(({ className, isInteractive = true, ...props }, ref) => (_jsx("tr", { ref: ref, className: cn('transition-colors hover:bg-[color-mix(in_srgb,var(--brand)_5%,transparent)] has-[td[data-slot=table-action-cell]:hover]:bg-transparent last:[&>td]:border-b-0', isInteractive && 'cursor-pointer', className), ...props })));
|
|
21
21
|
Row.displayName = 'Table.Row';
|
|
22
22
|
const Head = forwardRef(({ className, ...props }, ref) => (_jsx("th", { ref: ref, className: cn('border-app-border bg-background-secondary sticky top-0 z-[2] h-10 whitespace-nowrap border-b px-3 py-2.5 text-left align-middle text-xs font-extrabold tracking-[0.045em] text-foreground-muted uppercase', className), ...props })));
|
|
23
23
|
Head.displayName = 'Table.Head';
|
|
24
24
|
const Cell = forwardRef(({ className, ...props }, ref) => (_jsx("td", { ref: ref, className: cn('border-app-border border-b px-3 py-2.5 align-middle text-foreground', className), ...props })));
|
|
25
25
|
Cell.displayName = 'Table.Cell';
|
|
26
|
-
|
|
26
|
+
/** Tamanho `xs` do Button (min-h-7): nao encolher abaixo disso. */
|
|
27
|
+
const ACTION_BUTTON_SIZE_PX = 28;
|
|
28
|
+
const ACTION_CELL_PADDING_PX = 2;
|
|
29
|
+
export const TABLE_ACTION_CELL_WIDTH_PX = ACTION_BUTTON_SIZE_PX + ACTION_CELL_PADDING_PX * 2;
|
|
30
|
+
/**
|
|
31
|
+
* O rotulo "Ações" ocupa ~45px. Um grupo com um unico botao (28px) nao o comporta,
|
|
32
|
+
* entao o grupo inteiro respeita este minimo — sem nunca absorver a sobra da tabela.
|
|
33
|
+
*/
|
|
34
|
+
export const TABLE_ACTION_GROUP_MIN_WIDTH_PX = 56;
|
|
35
|
+
/**
|
|
36
|
+
* Folga entre o icone da ponta e a borda da tabela: sem ela o botao encosta na
|
|
37
|
+
* moldura. Entra como padding, entao o valor inteiro vira folga na borda
|
|
38
|
+
* (centralizar o botao mandaria metade dela para o vao entre icones).
|
|
39
|
+
*/
|
|
40
|
+
export const TABLE_ACTION_EDGE_GUTTER_PX = 12;
|
|
41
|
+
/**
|
|
42
|
+
* A folga vale para a celula que encosta na moldura — `:first-child`/`:last-child`
|
|
43
|
+
* dizem isso sem prop nenhuma, entao qualquer tabela que use `Table.ActionCell`
|
|
44
|
+
* ganha o comportamento (e o `ActionHead` recebe o mesmo recuo, o que mantem o
|
|
45
|
+
* rotulo centralizado sobre os icones, e nao sobre o grupo + folga).
|
|
46
|
+
*/
|
|
47
|
+
const ACTION_EDGE_PAD_VAR = '--table-action-edge-pad';
|
|
48
|
+
const actionEdgeStyle = {
|
|
49
|
+
[ACTION_EDGE_PAD_VAR]: `${ACTION_CELL_PADDING_PX + TABLE_ACTION_EDGE_GUTTER_PX}px`,
|
|
50
|
+
};
|
|
51
|
+
const actionEdgeClasses = 'first:[padding-inline-start:var(--table-action-edge-pad)] last:[padding-inline-end:var(--table-action-edge-pad)]';
|
|
52
|
+
/**
|
|
53
|
+
* O Head traz `px-3`, entao o ActionHead precisa de `!` para reduzir o padding —
|
|
54
|
+
* e `!important` ganha de regra normal mesmo com especificidade menor. Logo a
|
|
55
|
+
* folga da ponta tambem precisa ser `!` aqui, senao o rotulo fica fora de centro.
|
|
56
|
+
*/
|
|
57
|
+
const actionEdgeImportantClasses = 'first:[padding-inline-start:var(--table-action-edge-pad)]! last:[padding-inline-end:var(--table-action-edge-pad)]!';
|
|
58
|
+
export function getTableActionColumnWidth(actionCount = 1, hasEdgeGutter = false) {
|
|
59
|
+
const columnCount = Math.max(actionCount, 1);
|
|
60
|
+
const groupWidth = Math.max(columnCount * TABLE_ACTION_CELL_WIDTH_PX, TABLE_ACTION_GROUP_MIN_WIDTH_PX);
|
|
61
|
+
return groupWidth / columnCount + (hasEdgeGutter ? TABLE_ACTION_EDGE_GUTTER_PX : 0);
|
|
62
|
+
}
|
|
63
|
+
const actionColumnWidthClasses = {
|
|
64
|
+
sm: 'w-16',
|
|
65
|
+
md: 'w-20',
|
|
66
|
+
lg: 'w-28',
|
|
67
|
+
};
|
|
68
|
+
const ActionHead = forwardRef(({ children = 'Ações', className, colSpan, size = 'sm', style, ...props }, ref) => (_jsx(Head, { ref: ref, colSpan: colSpan,
|
|
69
|
+
// O sufixo `!` vence o `px-3` do Head: o cn do pacote nao usa tailwind-merge.
|
|
70
|
+
className: cn(!colSpan && actionColumnWidthClasses[size], 'px-0.5!', actionEdgeImportantClasses, 'text-center', className), style: { ...actionEdgeStyle, ...style }, ...props, children: children })));
|
|
71
|
+
ActionHead.displayName = 'Table.ActionHead';
|
|
72
|
+
const ActionCol = forwardRef(({ actionCount = 1, hasEdgeGutter = false, style, ...props }, ref) => {
|
|
73
|
+
const width = `${getTableActionColumnWidth(actionCount, hasEdgeGutter)}px`;
|
|
74
|
+
return _jsx("col", { ref: ref, style: { ...style, width, minWidth: width, maxWidth: width }, ...props });
|
|
75
|
+
});
|
|
76
|
+
ActionCol.displayName = 'Table.ActionCol';
|
|
77
|
+
const ActionCell = forwardRef(({ children, className, style, ...props }, ref) => (_jsx("td", { ref: ref, "data-slot": "table-action-cell", className: cn('border-app-border border-b px-0.5 py-0.5 text-center align-middle', actionEdgeClasses, className),
|
|
78
|
+
// A largura e obrigatoria: em layout `auto` (tabela sem colgroup) uma celula
|
|
79
|
+
// sem width volta a absorver a sobra da tabela. Em `fixed` quem manda e o
|
|
80
|
+
// <col>, e na ponta o proprio padding faz a celula crescer o necessario.
|
|
81
|
+
style: {
|
|
82
|
+
...actionEdgeStyle,
|
|
83
|
+
...style,
|
|
84
|
+
width: `${TABLE_ACTION_CELL_WIDTH_PX}px`,
|
|
85
|
+
minWidth: `${TABLE_ACTION_CELL_WIDTH_PX}px`,
|
|
86
|
+
}, ...props, children: _jsx("div", { className: "flex min-h-7 items-center justify-center", children: children }) })));
|
|
27
87
|
ActionCell.displayName = 'Table.ActionCell';
|
|
28
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Mesmo vermelho do `destructive` do ConfirmationDialog: a cor chapada misturada
|
|
90
|
+
* com o `--foreground` puxa para escuro no tema claro e para claro no escuro, o que
|
|
91
|
+
* mantem o tom saturado nos dois. Nao usar os tokens `--status-*-text`: eles sao
|
|
92
|
+
* feitos para texto sobre o fundo do badge e, no escuro, saem lavados (rosa/menta).
|
|
93
|
+
*
|
|
94
|
+
* `!` obrigatorio: o cn do pacote nao usa tailwind-merge, entao sem ele o
|
|
95
|
+
* `text-foreground-muted`/`hover:bg` do ghost venceria pela ordem do CSS.
|
|
96
|
+
*/
|
|
97
|
+
const actionToneClasses = {
|
|
98
|
+
default: '',
|
|
99
|
+
success: 'text-[color-mix(in_srgb,#16a34a_86%,var(--foreground))]! hover:bg-[color-mix(in_srgb,#16a34a_10%,transparent)]! hover:text-[color-mix(in_srgb,#16a34a_86%,var(--foreground))]! dark:hover:bg-[color-mix(in_srgb,#16a34a_16%,transparent)]!',
|
|
100
|
+
danger: 'text-[color-mix(in_srgb,#dc2626_86%,var(--foreground))]! hover:bg-[color-mix(in_srgb,#dc2626_10%,transparent)]! hover:text-[color-mix(in_srgb,#dc2626_86%,var(--foreground))]! dark:hover:bg-[color-mix(in_srgb,#dc2626_16%,transparent)]!',
|
|
101
|
+
};
|
|
102
|
+
const Action = forwardRef(({ className, size = 'xs', tone = 'default', tooltip, ...props }, ref) => (
|
|
103
|
+
// `props` vem primeiro: o corpo (variant/size/className) e do Table.Action, e nao
|
|
104
|
+
// pode ser sobrescrito por quem chama — o tom e a unica alavanca de cor.
|
|
105
|
+
_jsx(Button, { ...props, ref: ref, "aria-label": props['aria-label'] ?? tooltip, className: cn('size-7 min-h-7 min-w-7 p-0', actionToneClasses[tone], className), size: size, variant: "ghost", tooltip: tooltip })));
|
|
29
106
|
Action.displayName = 'Table.Action';
|
|
30
107
|
export const Table = {
|
|
31
108
|
Root,
|
|
@@ -34,6 +111,8 @@ export const Table = {
|
|
|
34
111
|
Footer,
|
|
35
112
|
Row,
|
|
36
113
|
Head,
|
|
114
|
+
ActionHead,
|
|
115
|
+
ActionCol,
|
|
37
116
|
Cell,
|
|
38
117
|
ActionCell,
|
|
39
118
|
Action,
|
|
@@ -7,6 +7,8 @@ export interface TextareaFieldProps extends Omit<React.TextareaHTMLAttributes<HT
|
|
|
7
7
|
hasValidation?: boolean;
|
|
8
8
|
roundedFull?: boolean;
|
|
9
9
|
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
10
|
+
/** Faz o textarea preencher a altura disponivel do container em vez de usar altura fixa. */
|
|
11
|
+
stretch?: boolean;
|
|
10
12
|
}
|
|
11
13
|
export declare const TextareaField: React.ForwardRefExoticComponent<TextareaFieldProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
12
14
|
//# sourceMappingURL=TextareaField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextareaField.d.ts","sourceRoot":"","sources":["../../src/components/TextareaField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACzG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"TextareaField.d.ts","sourceRoot":"","sources":["../../src/components/TextareaField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACzG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,4FAA4F;IAC5F,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,aAAa,gGA8EzB,CAAC"}
|
|
@@ -3,24 +3,32 @@ import React from 'react';
|
|
|
3
3
|
import { cn } from '../utils/cn';
|
|
4
4
|
import { controlClasses } from './form-control-helpers';
|
|
5
5
|
import { FieldControl } from './FieldControl';
|
|
6
|
-
export const TextareaField = React.forwardRef(({ label, errorMessage, id, className, wrapperClassName = '', labelClassName = '', roundedFull = false, size = 'sm', placeholder, disabled = false, hasValidation = false, ...props }, ref) => {
|
|
6
|
+
export const TextareaField = React.forwardRef(({ label, errorMessage, id, className, wrapperClassName = '', labelClassName = '', roundedFull = false, size = 'sm', stretch = false, placeholder, disabled = false, hasValidation = false, ...props }, ref) => {
|
|
7
7
|
const componentId = id || props.name;
|
|
8
8
|
const sizeMap = {
|
|
9
|
-
xs: '
|
|
10
|
-
sm: '
|
|
11
|
-
md: '
|
|
12
|
-
lg: '
|
|
9
|
+
xs: 'text-xs px-2',
|
|
10
|
+
sm: 'text-sm px-3',
|
|
11
|
+
md: 'text-sm px-4',
|
|
12
|
+
lg: 'text-base px-6',
|
|
13
|
+
};
|
|
14
|
+
const heightMap = {
|
|
15
|
+
xs: 'h-7',
|
|
16
|
+
sm: 'h-9',
|
|
17
|
+
md: 'h-12',
|
|
18
|
+
lg: 'h-14',
|
|
13
19
|
};
|
|
14
20
|
const roundedClass = roundedFull ? 'rounded-full' : size === 'lg' ? 'rounded-lg' : 'rounded-md';
|
|
15
21
|
const sizeClassArr = [];
|
|
16
22
|
if (!props.rows) {
|
|
17
23
|
sizeClassArr.push(sizeMap[size ?? 'sm']);
|
|
24
|
+
if (!stretch)
|
|
25
|
+
sizeClassArr.push(heightMap[size ?? 'sm']);
|
|
18
26
|
sizeClassArr.push(roundedClass);
|
|
19
27
|
}
|
|
20
|
-
return (_jsx(FieldControl, { label: label, id: componentId, labelClassName: labelClassName, wrapperClassName: wrapperClassName, errorMessage: errorMessage, roundedFull: roundedFull, size: size, disabled: disabled, hasValidation: hasValidation, children: ({ controlId, describedBy, errorMessage: controlError, disabled: controlDisabled, label: controlLabel }) => (_jsx("textarea", { ref: ref, ...props, id: controlId, disabled: controlDisabled, placeholder: placeholder ?? controlLabel, "aria-invalid": !!controlError, "aria-describedby": describedBy, className: controlClasses({
|
|
28
|
+
return (_jsx(FieldControl, { label: label, id: componentId, labelClassName: labelClassName, wrapperClassName: wrapperClassName, errorMessage: errorMessage, roundedFull: roundedFull, size: size, stretch: stretch, disabled: disabled, hasValidation: hasValidation, children: ({ controlId, describedBy, errorMessage: controlError, disabled: controlDisabled, label: controlLabel }) => (_jsx("textarea", { ref: ref, ...props, id: controlId, disabled: controlDisabled, placeholder: placeholder ?? controlLabel, "aria-invalid": !!controlError, "aria-describedby": describedBy, className: controlClasses({
|
|
21
29
|
errorMessage: controlError,
|
|
22
30
|
disabled: controlDisabled,
|
|
23
|
-
extra: cn(...sizeClassArr, roundedFull && 'min-h-[2rem] px-4 py-1.5', className),
|
|
31
|
+
extra: cn(...sizeClassArr, roundedFull && 'min-h-[2rem] px-4 py-1.5', stretch && 'h-full min-h-0', className),
|
|
24
32
|
}) })) }));
|
|
25
33
|
});
|
|
26
34
|
TextareaField.displayName = 'TextareaField';
|
|
@@ -36,5 +36,5 @@ export function Tooltip({ children, className, content, delayDuration = 300, ope
|
|
|
36
36
|
return;
|
|
37
37
|
setOpen((current) => !current);
|
|
38
38
|
}
|
|
39
|
-
return (_jsx(TooltipPrimitive.Provider, { delayDuration: delayDuration, children: _jsxs(TooltipPrimitive.Root, { open: openOnClick ? open : undefined, onOpenChange: openOnClick ? handleOpenChange : undefined, children: [_jsx(TooltipPrimitive.Trigger, { asChild: true, ref: triggerRef, onClick: handleTriggerClick, children: children }), _jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, { ref: contentRef, className: cn('border-app-border bg-surface text-foreground z-
|
|
39
|
+
return (_jsx(TooltipPrimitive.Provider, { delayDuration: delayDuration, children: _jsxs(TooltipPrimitive.Root, { open: openOnClick ? open : undefined, onOpenChange: openOnClick ? handleOpenChange : undefined, children: [_jsx(TooltipPrimitive.Trigger, { asChild: true, ref: triggerRef, onClick: handleTriggerClick, children: children }), _jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, { ref: contentRef, className: cn('border-app-border bg-surface text-foreground z-[200] rounded-md border px-3 py-1.5 text-xs shadow-lg', 'data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0', className), side: side, sideOffset: sideOffset, children: [content, _jsx(TooltipPrimitive.Arrow, { className: "fill-surface" })] }) })] }) }));
|
|
40
40
|
}
|
|
@@ -11,10 +11,12 @@ export interface WorkspaceTableProps {
|
|
|
11
11
|
children: ReactNode;
|
|
12
12
|
}
|
|
13
13
|
declare function WorkspaceTable({ children }: WorkspaceTableProps): import("react").JSX.Element;
|
|
14
|
-
declare function
|
|
14
|
+
declare function WorkspaceFilterTrigger(): import("react").JSX.Element;
|
|
15
|
+
declare function WorkspaceRoot({ filters, children, className, appearance, }: WorkspaceRootProps): import("react").JSX.Element;
|
|
15
16
|
export declare const Workspace: {
|
|
16
17
|
Root: typeof WorkspaceRoot;
|
|
17
18
|
Table: typeof WorkspaceTable;
|
|
19
|
+
FilterTrigger: typeof WorkspaceFilterTrigger;
|
|
18
20
|
};
|
|
19
21
|
export {};
|
|
20
22
|
//# sourceMappingURL=Workspace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Workspace.d.ts","sourceRoot":"","sources":["../../src/components/Workspace.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Workspace.d.ts","sourceRoot":"","sources":["../../src/components/Workspace.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAYtE,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,OAAO,EAAE,SAAS,CAAC;IACnB,6DAA6D;IAC7D,QAAQ,EAAE,YAAY,CAAC,mBAAmB,EAAE,OAAO,cAAc,CAAC,CAAC;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;CACrC;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,iBAAS,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,+BAExD;AAED,iBAAS,sBAAsB,gCAgB9B;AAED,iBAAS,aAAa,CAAC,EACrB,OAAO,EACP,QAAQ,EACR,SAAS,EACT,UAAwB,GACzB,EAAE,kBAAkB,+BAgDpB;AAED,eAAO,MAAM,SAAS;;;;CAIrB,CAAC"}
|
|
@@ -1,25 +1,33 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useContext } from 'react';
|
|
3
|
+
import { FilterIcon, FilterXIcon } from 'lucide-react';
|
|
3
4
|
import { cn } from '../utils/cn';
|
|
4
5
|
import { Card } from './Card';
|
|
5
6
|
import { EmptyState } from './EmptyState';
|
|
6
|
-
import { FilterVisibilityContext } from './Filter';
|
|
7
|
+
import { Filter, FilterVisibilityContext } from './Filter';
|
|
8
|
+
import { Page } from './Page';
|
|
7
9
|
import { RenderCase } from './RenderCase';
|
|
8
10
|
import { RenderIf } from './RenderIf';
|
|
9
11
|
import { WorkspaceResultContext } from './WorkspaceContext';
|
|
10
12
|
function WorkspaceTable({ children }) {
|
|
11
13
|
return _jsx(_Fragment, { children: children });
|
|
12
14
|
}
|
|
13
|
-
function
|
|
15
|
+
function WorkspaceFilterTrigger() {
|
|
16
|
+
const visibility = useContext(FilterVisibilityContext);
|
|
17
|
+
const isFilterOpen = visibility?.open ?? true;
|
|
18
|
+
return (_jsx(Filter.Trigger, { triggerSlot: (_jsx(Page.ActionButton, { "aria-label": isFilterOpen ? 'Ocultar filtros' : 'Mostrar filtros', icon: isFilterOpen ? _jsx(FilterXIcon, { "aria-hidden": "true" }) : _jsx(FilterIcon, { "aria-hidden": "true" }), label: isFilterOpen ? 'Ocultar filtros' : 'Mostrar filtros', tooltip: isFilterOpen ? 'Ocultar filtros' : 'Mostrar filtros' })) }));
|
|
19
|
+
}
|
|
20
|
+
function WorkspaceRoot({ filters, children, className, appearance = 'separated', }) {
|
|
14
21
|
const visibility = useContext(FilterVisibilityContext);
|
|
15
22
|
const isJoined = appearance === 'joined';
|
|
16
23
|
const isFilterOpen = visibility?.open ?? true;
|
|
17
24
|
const result = children;
|
|
18
|
-
return (_jsxs("div", { className: cn('grid min-h-0 flex-1 xl:grid-rows-[minmax(0,1fr)]', isJoined
|
|
19
|
-
? 'gap-0 overflow-hidden rounded-[var(--radius)] border border-app-border bg-background-secondary [&_[data-slot=filter-root]]:rounded-none [&_[data-slot=filter-root]]:border-0 [&_[data-slot=filter-root]]:!border-r [&_[data-slot=filter-root]]:!border-app-border [&_[data-slot=table-root]]
|
|
20
|
-
: 'gap-3', isFilterOpen ? 'xl:grid-cols-[280px_minmax(0,1fr)]' : 'xl:grid-cols-[minmax(0,1fr)]', className), children: [_jsx(RenderIf, { when: isFilterOpen, children: _jsx("aside", { className: "min-h-0 xl:self-stretch xl:[&>*]:h-full xl:[&>*]:min-h-0", children: filters }) }), _jsx("section", { className: cn(
|
|
25
|
+
return (_jsxs("div", { className: cn('grid h-full min-h-0 flex-1 xl:grid-rows-[minmax(0,1fr)]', isJoined
|
|
26
|
+
? 'gap-0 overflow-hidden rounded-[var(--radius)] border border-app-border bg-background-secondary [&_[data-slot=filter-root]]:rounded-none [&_[data-slot=filter-root]]:border-0 [&_[data-slot=filter-root]]:!border-r [&_[data-slot=filter-root]]:!border-app-border [&_[data-slot=filter-header]]:!h-10 [&_[data-slot=filter-header]]:!rounded-none [&_[data-slot=filter-header]]:!bg-background-secondary [&_[data-slot=filter-footer]]:!px-3 [&_[data-slot=filter-footer]]:!py-2 [&_[data-slot=filter-footer]_button]:!h-8 [&_[data-slot=filter-footer]_button]:!min-h-8 [&_[data-slot=filter-footer]_button]:!px-2.5 [&_[data-slot=filter-footer]_button]:!py-0 [&_[data-slot=filter-footer]_button]:!text-xs [&_[data-slot=table-root]]:!rounded-none [&_[data-slot=table-root]]:!border-0 [&_[data-slot=table-root]]:!shadow-none [&_[data-slot=table-pagination]]:!px-3 [&_[data-slot=table-pagination]]:!py-2'
|
|
27
|
+
: 'gap-3', isFilterOpen ? 'xl:grid-cols-[280px_minmax(0,1fr)]' : 'xl:grid-cols-[minmax(0,1fr)]', className), children: [_jsx(RenderIf, { when: isFilterOpen, children: _jsx("aside", { className: "min-h-0 xl:self-stretch xl:[&>*]:h-full xl:[&>*]:min-h-0", children: filters }) }), _jsx("section", { className: cn("flex h-full min-h-0 flex-1 flex-col", isJoined ? "bg-background-secondary" : "bg-transparent"), children: _jsx(WorkspaceResultContext.Provider, { value: true, children: _jsxs(RenderCase.Root, { children: [_jsx(RenderCase.If, { when: Boolean(result && (Array.isArray(result) ? result.length > 0 : true)), children: result }), _jsx(RenderCase.Else, { children: _jsx(Card.Root, { className: "flex flex-1 items-center justify-center bg-surface/60 p-8 shadow-sm", children: _jsx(EmptyState, { title: "Nenhum resultado", description: "Ajuste os filtros e pesquise novamente." }) }) })] }) }) })] }));
|
|
21
28
|
}
|
|
22
29
|
export const Workspace = {
|
|
23
30
|
Root: WorkspaceRoot,
|
|
24
31
|
Table: WorkspaceTable,
|
|
32
|
+
FilterTrigger: WorkspaceFilterTrigger,
|
|
25
33
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export { PasswordInput, type PasswordInputProps } from './components/PasswordInp
|
|
|
34
34
|
export { Filter, FilterVisibilityContext, type FilterFooterProps, type FilterRootProps, type FilterTriggerProps, type FilterVisibilityProps, } from './components/Filter';
|
|
35
35
|
export { Workspace, type WorkspaceRootProps } from './components/Workspace';
|
|
36
36
|
export { Sidebar, type SidebarRootProps } from './components/Sidebar';
|
|
37
|
-
export { Table } from './components/Table';
|
|
37
|
+
export { Table, TABLE_ACTION_CELL_WIDTH_PX, TABLE_ACTION_EDGE_GUTTER_PX, TABLE_ACTION_GROUP_MIN_WIDTH_PX, getTableActionColumnWidth, type TableActionColumnSize, type TableActionTone, } from './components/Table';
|
|
38
38
|
export { TabsUnderlined, type TabsUnderlinedProps, type UnderlinedTabItem } from './components/TabsUnderlined';
|
|
39
39
|
export { Tooltip, type TooltipProps, type TooltipSide } from './components/Tooltip';
|
|
40
40
|
export { ThemePreferencesSelector, type ThemeAppearance, type ThemeColorOption, type ThemePreferencesSelectorProps, type ThemePreferencesValue, } from './components/ThemePreferencesSelector';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,EACL,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,wBAAwB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,GACnC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAA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EACpB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,WAAW,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC9G,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ export { PasswordInput } from './components/PasswordInput';
|
|
|
34
34
|
export { Filter, FilterVisibilityContext, } from './components/Filter';
|
|
35
35
|
export { Workspace } from './components/Workspace';
|
|
36
36
|
export { Sidebar } from './components/Sidebar';
|
|
37
|
-
export { Table } from './components/Table';
|
|
37
|
+
export { Table, TABLE_ACTION_CELL_WIDTH_PX, TABLE_ACTION_EDGE_GUTTER_PX, TABLE_ACTION_GROUP_MIN_WIDTH_PX, getTableActionColumnWidth, } from './components/Table';
|
|
38
38
|
export { TabsUnderlined } from './components/TabsUnderlined';
|
|
39
39
|
export { Tooltip } from './components/Tooltip';
|
|
40
40
|
export { ThemePreferencesSelector, } from './components/ThemePreferencesSelector';
|
package/dist/styles.css
CHANGED
|
@@ -954,9 +954,15 @@ h2.react-datepicker__current-month {
|
|
|
954
954
|
.z-\[110\] {
|
|
955
955
|
z-index: 110;
|
|
956
956
|
}
|
|
957
|
+
.z-\[200\] {
|
|
958
|
+
z-index: 200;
|
|
959
|
+
}
|
|
957
960
|
.z-\[999\] {
|
|
958
961
|
z-index: 999;
|
|
959
962
|
}
|
|
963
|
+
.z-\[10000\] {
|
|
964
|
+
z-index: 10000;
|
|
965
|
+
}
|
|
960
966
|
.order-3 {
|
|
961
967
|
order: 3;
|
|
962
968
|
}
|
|
@@ -1209,6 +1215,9 @@ h2.react-datepicker__current-month {
|
|
|
1209
1215
|
.h-56 {
|
|
1210
1216
|
height: calc(var(--spacing) * 56);
|
|
1211
1217
|
}
|
|
1218
|
+
.h-64 {
|
|
1219
|
+
height: calc(var(--spacing) * 64);
|
|
1220
|
+
}
|
|
1212
1221
|
.h-72 {
|
|
1213
1222
|
height: calc(var(--spacing) * 72);
|
|
1214
1223
|
}
|
|
@@ -1374,12 +1383,18 @@ h2.react-datepicker__current-month {
|
|
|
1374
1383
|
.w-14 {
|
|
1375
1384
|
width: calc(var(--spacing) * 14);
|
|
1376
1385
|
}
|
|
1386
|
+
.w-16 {
|
|
1387
|
+
width: calc(var(--spacing) * 16);
|
|
1388
|
+
}
|
|
1377
1389
|
.w-20 {
|
|
1378
1390
|
width: calc(var(--spacing) * 20);
|
|
1379
1391
|
}
|
|
1380
1392
|
.w-24 {
|
|
1381
1393
|
width: calc(var(--spacing) * 24);
|
|
1382
1394
|
}
|
|
1395
|
+
.w-28 {
|
|
1396
|
+
width: calc(var(--spacing) * 28);
|
|
1397
|
+
}
|
|
1383
1398
|
.w-32 {
|
|
1384
1399
|
width: calc(var(--spacing) * 32);
|
|
1385
1400
|
}
|
|
@@ -1542,9 +1557,6 @@ h2.react-datepicker__current-month {
|
|
|
1542
1557
|
.min-w-\[18rem\] {
|
|
1543
1558
|
min-width: 18rem;
|
|
1544
1559
|
}
|
|
1545
|
-
.min-w-\[48rem\] {
|
|
1546
|
-
min-width: 48rem;
|
|
1547
|
-
}
|
|
1548
1560
|
.flex-1 {
|
|
1549
1561
|
flex: 1;
|
|
1550
1562
|
}
|
|
@@ -1557,6 +1569,9 @@ h2.react-datepicker__current-month {
|
|
|
1557
1569
|
.grow {
|
|
1558
1570
|
flex-grow: 1;
|
|
1559
1571
|
}
|
|
1572
|
+
.table-fixed {
|
|
1573
|
+
table-layout: fixed;
|
|
1574
|
+
}
|
|
1560
1575
|
.caption-bottom {
|
|
1561
1576
|
caption-side: bottom;
|
|
1562
1577
|
}
|
|
@@ -1620,12 +1635,18 @@ h2.react-datepicker__current-month {
|
|
|
1620
1635
|
.touch-none {
|
|
1621
1636
|
touch-action: none;
|
|
1622
1637
|
}
|
|
1638
|
+
.resize-none {
|
|
1639
|
+
resize: none;
|
|
1640
|
+
}
|
|
1623
1641
|
.list-disc {
|
|
1624
1642
|
list-style-type: disc;
|
|
1625
1643
|
}
|
|
1626
1644
|
.appearance-none {
|
|
1627
1645
|
appearance: none;
|
|
1628
1646
|
}
|
|
1647
|
+
.grid-cols-1 {
|
|
1648
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
1649
|
+
}
|
|
1629
1650
|
.grid-cols-2 {
|
|
1630
1651
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1631
1652
|
}
|
|
@@ -1967,6 +1988,9 @@ h2.react-datepicker__current-month {
|
|
|
1967
1988
|
.\!bg-transparent {
|
|
1968
1989
|
background-color: transparent !important;
|
|
1969
1990
|
}
|
|
1991
|
+
.bg-\[\#dc2626\] {
|
|
1992
|
+
background-color: #dc2626;
|
|
1993
|
+
}
|
|
1970
1994
|
.bg-\[color-mix\(in_srgb\,\#3b82f6_16\%\,var\(--background-secondary\)\)\] {
|
|
1971
1995
|
background-color: #3b82f6;
|
|
1972
1996
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -2075,9 +2099,6 @@ h2.react-datepicker__current-month {
|
|
|
2075
2099
|
.bg-\[var\(--brand\)\] {
|
|
2076
2100
|
background-color: var(--brand);
|
|
2077
2101
|
}
|
|
2078
|
-
.bg-\[var\(--destructive\)\] {
|
|
2079
|
-
background-color: var(--destructive);
|
|
2080
|
-
}
|
|
2081
2102
|
.bg-\[var\(--status-danger-bg\,rgba\(254\,202\,202\,0\.8\)\)\] {
|
|
2082
2103
|
background-color: var(--status-danger-bg,rgba(254,202,202,0.8));
|
|
2083
2104
|
}
|
|
@@ -2210,6 +2231,12 @@ h2.react-datepicker__current-month {
|
|
|
2210
2231
|
.p-8 {
|
|
2211
2232
|
padding: calc(var(--spacing) * 8);
|
|
2212
2233
|
}
|
|
2234
|
+
.px-0\.5 {
|
|
2235
|
+
padding-inline: calc(var(--spacing) * 0.5);
|
|
2236
|
+
}
|
|
2237
|
+
.px-0\.5\! {
|
|
2238
|
+
padding-inline: calc(var(--spacing) * 0.5) !important;
|
|
2239
|
+
}
|
|
2213
2240
|
.px-1\.5 {
|
|
2214
2241
|
padding-inline: calc(var(--spacing) * 1.5);
|
|
2215
2242
|
}
|
|
@@ -2516,6 +2543,24 @@ h2.react-datepicker__current-month {
|
|
|
2516
2543
|
.whitespace-nowrap {
|
|
2517
2544
|
white-space: nowrap;
|
|
2518
2545
|
}
|
|
2546
|
+
.text-\[color-mix\(in_srgb\,\#16a34a_86\%\,var\(--foreground\)\)\]\! {
|
|
2547
|
+
color: #16a34a !important;
|
|
2548
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2549
|
+
color: color-mix(in srgb,#16a34a 86%,var(--foreground)) !important;
|
|
2550
|
+
}
|
|
2551
|
+
}
|
|
2552
|
+
.text-\[color-mix\(in_srgb\,\#dc2626_86\%\,var\(--foreground\)\)\] {
|
|
2553
|
+
color: #dc2626;
|
|
2554
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2555
|
+
color: color-mix(in srgb,#dc2626 86%,var(--foreground));
|
|
2556
|
+
}
|
|
2557
|
+
}
|
|
2558
|
+
.text-\[color-mix\(in_srgb\,\#dc2626_86\%\,var\(--foreground\)\)\]\! {
|
|
2559
|
+
color: #dc2626 !important;
|
|
2560
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2561
|
+
color: color-mix(in srgb,#dc2626 86%,var(--foreground)) !important;
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2519
2564
|
.text-\[color-mix\(in_srgb\,var\(--brand\)_68\%\,var\(--foreground-muted\)\)\] {
|
|
2520
2565
|
color: var(--brand);
|
|
2521
2566
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -2806,6 +2851,9 @@ h2.react-datepicker__current-month {
|
|
|
2806
2851
|
--tw-saturate: saturate(50%);
|
|
2807
2852
|
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
|
|
2808
2853
|
}
|
|
2854
|
+
.filter {
|
|
2855
|
+
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
|
|
2856
|
+
}
|
|
2809
2857
|
.backdrop-blur-\[1\.5px\] {
|
|
2810
2858
|
--tw-backdrop-blur: blur(1.5px);
|
|
2811
2859
|
-webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
|
@@ -2976,6 +3024,26 @@ h2.react-datepicker__current-month {
|
|
|
2976
3024
|
border-left-width: 0px;
|
|
2977
3025
|
}
|
|
2978
3026
|
}
|
|
3027
|
+
.first\:\[padding-inline-start\:var\(--table-action-edge-pad\)\] {
|
|
3028
|
+
&:first-child {
|
|
3029
|
+
padding-inline-start: var(--table-action-edge-pad);
|
|
3030
|
+
}
|
|
3031
|
+
}
|
|
3032
|
+
.first\:\[padding-inline-start\:var\(--table-action-edge-pad\)\]\! {
|
|
3033
|
+
&:first-child {
|
|
3034
|
+
padding-inline-start: var(--table-action-edge-pad) !important;
|
|
3035
|
+
}
|
|
3036
|
+
}
|
|
3037
|
+
.last\:\[padding-inline-end\:var\(--table-action-edge-pad\)\] {
|
|
3038
|
+
&:last-child {
|
|
3039
|
+
padding-inline-end: var(--table-action-edge-pad);
|
|
3040
|
+
}
|
|
3041
|
+
}
|
|
3042
|
+
.last\:\[padding-inline-end\:var\(--table-action-edge-pad\)\]\! {
|
|
3043
|
+
&:last-child {
|
|
3044
|
+
padding-inline-end: var(--table-action-edge-pad) !important;
|
|
3045
|
+
}
|
|
3046
|
+
}
|
|
2979
3047
|
.hover\:-translate-y-px {
|
|
2980
3048
|
&:hover {
|
|
2981
3049
|
@media (hover: hover) {
|
|
@@ -3070,6 +3138,27 @@ h2.react-datepicker__current-month {
|
|
|
3070
3138
|
}
|
|
3071
3139
|
}
|
|
3072
3140
|
}
|
|
3141
|
+
.hover\:bg-\[\#b91c1c\] {
|
|
3142
|
+
&:hover {
|
|
3143
|
+
@media (hover: hover) {
|
|
3144
|
+
background-color: #b91c1c;
|
|
3145
|
+
}
|
|
3146
|
+
}
|
|
3147
|
+
}
|
|
3148
|
+
.hover\:bg-\[color-mix\(in_srgb\,\#16a34a_10\%\,transparent\)\]\! {
|
|
3149
|
+
&:hover {
|
|
3150
|
+
@media (hover: hover) {
|
|
3151
|
+
background-color: color-mix(in srgb,#16a34a 10%,transparent) !important;
|
|
3152
|
+
}
|
|
3153
|
+
}
|
|
3154
|
+
}
|
|
3155
|
+
.hover\:bg-\[color-mix\(in_srgb\,\#dc2626_10\%\,transparent\)\]\! {
|
|
3156
|
+
&:hover {
|
|
3157
|
+
@media (hover: hover) {
|
|
3158
|
+
background-color: color-mix(in srgb,#dc2626 10%,transparent) !important;
|
|
3159
|
+
}
|
|
3160
|
+
}
|
|
3161
|
+
}
|
|
3073
3162
|
.hover\:bg-\[color-mix\(in_srgb\,\#facc15_14\%\,transparent\)\] {
|
|
3074
3163
|
&:hover {
|
|
3075
3164
|
@media (hover: hover) {
|
|
@@ -3177,16 +3266,6 @@ h2.react-datepicker__current-month {
|
|
|
3177
3266
|
}
|
|
3178
3267
|
}
|
|
3179
3268
|
}
|
|
3180
|
-
.hover\:bg-\[color-mix\(in_srgb\,var\(--destructive\)_88\%\,\#000\)\] {
|
|
3181
|
-
&:hover {
|
|
3182
|
-
@media (hover: hover) {
|
|
3183
|
-
background-color: var(--destructive);
|
|
3184
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
3185
|
-
background-color: color-mix(in srgb,var(--destructive) 88%,#000);
|
|
3186
|
-
}
|
|
3187
|
-
}
|
|
3188
|
-
}
|
|
3189
|
-
}
|
|
3190
3269
|
.hover\:bg-\[color-mix\(in_srgb\,var\(--foreground-muted\)_8\%\,var\(--background-secondary\)\)\] {
|
|
3191
3270
|
&:hover {
|
|
3192
3271
|
@media (hover: hover) {
|
|
@@ -3317,6 +3396,26 @@ h2.react-datepicker__current-month {
|
|
|
3317
3396
|
}
|
|
3318
3397
|
}
|
|
3319
3398
|
}
|
|
3399
|
+
.hover\:text-\[color-mix\(in_srgb\,\#16a34a_86\%\,var\(--foreground\)\)\]\! {
|
|
3400
|
+
&:hover {
|
|
3401
|
+
@media (hover: hover) {
|
|
3402
|
+
color: #16a34a !important;
|
|
3403
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
3404
|
+
color: color-mix(in srgb,#16a34a 86%,var(--foreground)) !important;
|
|
3405
|
+
}
|
|
3406
|
+
}
|
|
3407
|
+
}
|
|
3408
|
+
}
|
|
3409
|
+
.hover\:text-\[color-mix\(in_srgb\,\#dc2626_86\%\,var\(--foreground\)\)\]\! {
|
|
3410
|
+
&:hover {
|
|
3411
|
+
@media (hover: hover) {
|
|
3412
|
+
color: #dc2626 !important;
|
|
3413
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
3414
|
+
color: color-mix(in srgb,#dc2626 86%,var(--foreground)) !important;
|
|
3415
|
+
}
|
|
3416
|
+
}
|
|
3417
|
+
}
|
|
3418
|
+
}
|
|
3320
3419
|
.hover\:text-\[color-mix\(in_srgb\,var\(--brand\)_86\%\,var\(--foreground\)\)\] {
|
|
3321
3420
|
&:hover {
|
|
3322
3421
|
@media (hover: hover) {
|
|
@@ -3672,6 +3771,11 @@ h2.react-datepicker__current-month {
|
|
|
3672
3771
|
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
|
|
3673
3772
|
}
|
|
3674
3773
|
}
|
|
3774
|
+
.has-\[td\[data-slot\=table-action-cell\]\:hover\]\:bg-transparent {
|
|
3775
|
+
&:has(*:is(td[data-slot=table-action-cell]:hover)) {
|
|
3776
|
+
background-color: transparent;
|
|
3777
|
+
}
|
|
3778
|
+
}
|
|
3675
3779
|
.data-\[expanded\=true\]\:grid-rows-\[1fr\] {
|
|
3676
3780
|
&[data-expanded="true"] {
|
|
3677
3781
|
grid-template-rows: 1fr;
|
|
@@ -4075,6 +4179,24 @@ h2.react-datepicker__current-month {
|
|
|
4075
4179
|
}
|
|
4076
4180
|
}
|
|
4077
4181
|
}
|
|
4182
|
+
.dark\:hover\:bg-\[color-mix\(in_srgb\,\#16a34a_16\%\,transparent\)\]\! {
|
|
4183
|
+
@media (prefers-color-scheme: dark) {
|
|
4184
|
+
&:hover {
|
|
4185
|
+
@media (hover: hover) {
|
|
4186
|
+
background-color: color-mix(in srgb,#16a34a 16%,transparent) !important;
|
|
4187
|
+
}
|
|
4188
|
+
}
|
|
4189
|
+
}
|
|
4190
|
+
}
|
|
4191
|
+
.dark\:hover\:bg-\[color-mix\(in_srgb\,\#dc2626_16\%\,transparent\)\]\! {
|
|
4192
|
+
@media (prefers-color-scheme: dark) {
|
|
4193
|
+
&:hover {
|
|
4194
|
+
@media (hover: hover) {
|
|
4195
|
+
background-color: color-mix(in srgb,#dc2626 16%,transparent) !important;
|
|
4196
|
+
}
|
|
4197
|
+
}
|
|
4198
|
+
}
|
|
4199
|
+
}
|
|
4078
4200
|
.dark\:hover\:bg-\[color-mix\(in_srgb\,var\(--brand\)_12\%\,transparent\)\] {
|
|
4079
4201
|
@media (prefers-color-scheme: dark) {
|
|
4080
4202
|
&:hover {
|
|
@@ -4228,6 +4350,57 @@ h2.react-datepicker__current-month {
|
|
|
4228
4350
|
}
|
|
4229
4351
|
}
|
|
4230
4352
|
}
|
|
4353
|
+
.\[\&_\[data-slot\=filter-footer\]\]\:\!px-3 {
|
|
4354
|
+
& [data-slot=filter-footer] {
|
|
4355
|
+
padding-inline: calc(var(--spacing) * 3) !important;
|
|
4356
|
+
}
|
|
4357
|
+
}
|
|
4358
|
+
.\[\&_\[data-slot\=filter-footer\]\]\:\!py-2 {
|
|
4359
|
+
& [data-slot=filter-footer] {
|
|
4360
|
+
padding-block: calc(var(--spacing) * 2) !important;
|
|
4361
|
+
}
|
|
4362
|
+
}
|
|
4363
|
+
.\[\&_\[data-slot\=filter-footer\]_button\]\:\!h-8 {
|
|
4364
|
+
& [data-slot=filter-footer] button {
|
|
4365
|
+
height: calc(var(--spacing) * 8) !important;
|
|
4366
|
+
}
|
|
4367
|
+
}
|
|
4368
|
+
.\[\&_\[data-slot\=filter-footer\]_button\]\:\!min-h-8 {
|
|
4369
|
+
& [data-slot=filter-footer] button {
|
|
4370
|
+
min-height: calc(var(--spacing) * 8) !important;
|
|
4371
|
+
}
|
|
4372
|
+
}
|
|
4373
|
+
.\[\&_\[data-slot\=filter-footer\]_button\]\:\!px-2\.5 {
|
|
4374
|
+
& [data-slot=filter-footer] button {
|
|
4375
|
+
padding-inline: calc(var(--spacing) * 2.5) !important;
|
|
4376
|
+
}
|
|
4377
|
+
}
|
|
4378
|
+
.\[\&_\[data-slot\=filter-footer\]_button\]\:\!py-0 {
|
|
4379
|
+
& [data-slot=filter-footer] button {
|
|
4380
|
+
padding-block: calc(var(--spacing) * 0) !important;
|
|
4381
|
+
}
|
|
4382
|
+
}
|
|
4383
|
+
.\[\&_\[data-slot\=filter-footer\]_button\]\:\!text-xs {
|
|
4384
|
+
& [data-slot=filter-footer] button {
|
|
4385
|
+
font-size: var(--text-xs) !important;
|
|
4386
|
+
line-height: var(--tw-leading, var(--text-xs--line-height)) !important;
|
|
4387
|
+
}
|
|
4388
|
+
}
|
|
4389
|
+
.\[\&_\[data-slot\=filter-header\]\]\:\!h-10 {
|
|
4390
|
+
& [data-slot=filter-header] {
|
|
4391
|
+
height: calc(var(--spacing) * 10) !important;
|
|
4392
|
+
}
|
|
4393
|
+
}
|
|
4394
|
+
.\[\&_\[data-slot\=filter-header\]\]\:\!rounded-none {
|
|
4395
|
+
& [data-slot=filter-header] {
|
|
4396
|
+
border-radius: 0 !important;
|
|
4397
|
+
}
|
|
4398
|
+
}
|
|
4399
|
+
.\[\&_\[data-slot\=filter-header\]\]\:\!bg-background-secondary {
|
|
4400
|
+
& [data-slot=filter-header] {
|
|
4401
|
+
background-color: var(--color-background-secondary) !important;
|
|
4402
|
+
}
|
|
4403
|
+
}
|
|
4231
4404
|
.\[\&_\[data-slot\=filter-root\]\]\:rounded-none {
|
|
4232
4405
|
& [data-slot=filter-root] {
|
|
4233
4406
|
border-radius: 0;
|
|
@@ -4274,15 +4447,31 @@ h2.react-datepicker__current-month {
|
|
|
4274
4447
|
line-height: var(--tw-leading, var(--text-lg--line-height));
|
|
4275
4448
|
}
|
|
4276
4449
|
}
|
|
4277
|
-
.\[\&_\[data-slot\=table-
|
|
4450
|
+
.\[\&_\[data-slot\=table-pagination\]\]\:\!px-3 {
|
|
4451
|
+
& [data-slot=table-pagination] {
|
|
4452
|
+
padding-inline: calc(var(--spacing) * 3) !important;
|
|
4453
|
+
}
|
|
4454
|
+
}
|
|
4455
|
+
.\[\&_\[data-slot\=table-pagination\]\]\:\!py-2 {
|
|
4456
|
+
& [data-slot=table-pagination] {
|
|
4457
|
+
padding-block: calc(var(--spacing) * 2) !important;
|
|
4458
|
+
}
|
|
4459
|
+
}
|
|
4460
|
+
.\[\&_\[data-slot\=table-root\]\]\:\!rounded-none {
|
|
4278
4461
|
& [data-slot=table-root] {
|
|
4279
|
-
border-radius: 0;
|
|
4462
|
+
border-radius: 0 !important;
|
|
4280
4463
|
}
|
|
4281
4464
|
}
|
|
4282
|
-
.\[\&_\[data-slot\=table-root\]\]
|
|
4465
|
+
.\[\&_\[data-slot\=table-root\]\]\:\!border-0 {
|
|
4283
4466
|
& [data-slot=table-root] {
|
|
4284
|
-
border-style: var(--tw-border-style);
|
|
4285
|
-
border-width: 0px;
|
|
4467
|
+
border-style: var(--tw-border-style) !important;
|
|
4468
|
+
border-width: 0px !important;
|
|
4469
|
+
}
|
|
4470
|
+
}
|
|
4471
|
+
.\[\&_\[data-slot\=table-root\]\]\:\!shadow-none {
|
|
4472
|
+
& [data-slot=table-root] {
|
|
4473
|
+
--tw-shadow: 0 0 #0000 !important;
|
|
4474
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
|
|
4286
4475
|
}
|
|
4287
4476
|
}
|
|
4288
4477
|
.\[\&_svg\]\:size-3\.5 {
|