@matthiaskrijgsman/mat-ui 0.0.17 → 0.0.19
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/README.md +26 -0
- package/dist/components/inputs/InputTextArea.d.ts +2 -0
- package/dist/components/panel/PanelField.d.ts +8 -0
- package/dist/components/panel/PanelLink.d.ts +17 -0
- package/dist/components/panel/PanelStack.d.ts +7 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +2709 -2464
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +49 -24
- package/dist/index.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/table/Table.d.ts +20 -2
- package/dist/table/TableColumnHead.d.ts +7 -1
- package/dist/types.d.ts +5 -2
- package/package.json +1 -1
- /package/dist/components/{Panel.d.ts → panel/Panel.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -87,6 +87,19 @@ Define your overrides after importing the mat-ui stylesheet:
|
|
|
87
87
|
| `--color-input-focus-ring` | Focus ring color for buttons and inputs | `rgb(17 24 39 / 0.15)` |
|
|
88
88
|
| `--border-radius-input` | Border radius for inputs and selects | `var(--radius-xl)` |
|
|
89
89
|
|
|
90
|
+
#### Control sizing
|
|
91
|
+
|
|
92
|
+
`Button`, `ButtonIconSquare`, `ButtonIconRound`, `Input`, `InputTextArea`, `InputSelectNative`, `InputSelect`, `InputSelectSearchable`, and `InputSelectSearchableAsync` accept a `size?: 'sm' | 'md' | 'lg'` prop (default `'md'`) and read their dimensions from a single shared scale. Override these to adjust heights, padding, font size, and icon sizing consistently across all controls. Replace `{size}` with `sm`, `md`, or `lg`.
|
|
93
|
+
|
|
94
|
+
| Token | Description | sm · md · lg defaults |
|
|
95
|
+
|-------|-------------|------------------------|
|
|
96
|
+
| `--control-size-{size}-height` | Control height (also width for square/round icon buttons) | `2.5rem` · `3rem` · `3.5rem` |
|
|
97
|
+
| `--control-size-{size}-px` | Horizontal padding | `1rem` · `1rem` · `1.25rem` |
|
|
98
|
+
| `--control-size-{size}-gap` | Gap between icon and label inside buttons | `0.5rem` · `0.5rem` · `0.75rem` |
|
|
99
|
+
| `--control-size-{size}-font-size` | Text size | `1rem` · `1rem` · `1rem` |
|
|
100
|
+
| `--control-size-{size}-icon` | Icon glyph size inside controls | `1rem` · `1.25rem` · `1.5rem` |
|
|
101
|
+
| `--control-size-{size}-icon-offset` | Distance from the input edge to a leading icon (used when an `Icon` prop is set on `Input`) | `1rem` · `1rem` · `1.25rem` |
|
|
102
|
+
|
|
90
103
|
#### Buttons
|
|
91
104
|
|
|
92
105
|
Each button variant (`primary`, `white`, `black`, `transparent`, `secondary`, `tertiary`) uses the same set of tokens. Replace `{variant}` with the variant name.
|
|
@@ -199,6 +212,7 @@ Each button variant (`primary`, `white`, `black`, `transparent`, `secondary`, `t
|
|
|
199
212
|
|-------|-------------|---------------|
|
|
200
213
|
| `--color-panel-bg` | Panel background | `#ffffff` |
|
|
201
214
|
| `--color-panel-border` | Panel border | `#e5e7eb` |
|
|
215
|
+
| `--color-panel-text` | Panel default text color (inherited by `PanelField`) | `#111827` |
|
|
202
216
|
|
|
203
217
|
#### Modal & Sidebar modal
|
|
204
218
|
|
|
@@ -218,6 +232,7 @@ Each button variant (`primary`, `white`, `black`, `transparent`, `secondary`, `t
|
|
|
218
232
|
| `--color-table-border` | Table border color | `#e5e7eb` |
|
|
219
233
|
| `--color-table-row-bg` | Row background | `#ffffff` |
|
|
220
234
|
| `--color-table-row-bg-hover` | Row background on hover | `#f9fafb` |
|
|
235
|
+
| `--color-table-row-text` | Row text color | `#111827` |
|
|
221
236
|
| `--color-table-resize-handle` | Column resize handle | `#e5e7eb` |
|
|
222
237
|
| `--color-table-resize-handle-hover` | Resize handle on hover | `#d1d5db` |
|
|
223
238
|
| `--color-table-resize-handle-active` | Resize handle while dragging | `#2563eb` |
|
|
@@ -240,3 +255,14 @@ Each button variant (`primary`, `white`, `black`, `transparent`, `secondary`, `t
|
|
|
240
255
|
| `--color-badge-black-ring` | Black badge ring | `#d6d3d1` |
|
|
241
256
|
|
|
242
257
|
> Colored badges (red, blue, green, etc.) use Tailwind color utility classes and are not token-based. They adapt to dark mode automatically via Tailwind's `dark:` variants.
|
|
258
|
+
|
|
259
|
+
#### Status
|
|
260
|
+
|
|
261
|
+
Shared color tokens for status/notification indicators. Currently used by `PanelLink`'s `status` prop, but available for any component.
|
|
262
|
+
|
|
263
|
+
| Token | Description | Light default |
|
|
264
|
+
|-------|-------------|---------------|
|
|
265
|
+
| `--color-status-error` | Error / destructive state | `#dc2626` |
|
|
266
|
+
| `--color-status-warning` | Warning state | `#f59e0b` |
|
|
267
|
+
| `--color-status-success` | Success state | `#16a34a` |
|
|
268
|
+
| `--color-status-info` | Informational state | `#2563eb` |
|
|
@@ -5,5 +5,7 @@ export type InputTextAreaProps = React.TextareaHTMLAttributes<HTMLTextAreaElemen
|
|
|
5
5
|
description?: string | React.ReactNode;
|
|
6
6
|
error?: string | React.ReactNode;
|
|
7
7
|
size?: Size;
|
|
8
|
+
autogrow?: boolean;
|
|
9
|
+
ref?: React.Ref<HTMLTextAreaElement>;
|
|
8
10
|
};
|
|
9
11
|
export declare const InputTextArea: (props: InputTextAreaProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type PanelFieldOrientation = 'vertical' | 'horizontal';
|
|
3
|
+
export type PanelFieldProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
label?: string | React.ReactNode;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
orientation?: PanelFieldOrientation;
|
|
7
|
+
};
|
|
8
|
+
export declare const PanelField: (props: PanelFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type TablerIcon } from "@tabler/icons-react";
|
|
3
|
+
export type PanelLinkStatus = 'error' | 'warning' | 'success' | 'info';
|
|
4
|
+
type PanelLinkBaseProps = {
|
|
5
|
+
Icon?: TablerIcon;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
status?: PanelLinkStatus;
|
|
8
|
+
};
|
|
9
|
+
type PanelLinkAnchorProps = PanelLinkBaseProps & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, keyof PanelLinkBaseProps> & {
|
|
10
|
+
href: string;
|
|
11
|
+
};
|
|
12
|
+
type PanelLinkButtonProps = PanelLinkBaseProps & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, keyof PanelLinkBaseProps> & {
|
|
13
|
+
href?: undefined;
|
|
14
|
+
};
|
|
15
|
+
export type PanelLinkProps = PanelLinkAnchorProps | PanelLinkButtonProps;
|
|
16
|
+
export declare const PanelLink: (props: PanelLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type PanelStackProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
};
|
|
5
|
+
export declare const PanelStack: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,10 @@ export { InputSelect } from "./components/inputs/InputSelect.tsx";
|
|
|
19
19
|
export { InputSelectSearchable } from "./components/inputs/InputSelectSearchable.tsx";
|
|
20
20
|
export { InputSelectSearchableAsync } from "./components/inputs/InputSelectSearchableAsync.tsx";
|
|
21
21
|
export { InputSelectOption } from "./components/inputs/InputSelectOption.tsx";
|
|
22
|
-
export { Panel } from "./components/Panel.tsx";
|
|
22
|
+
export { Panel } from "./components/panel/Panel.tsx";
|
|
23
|
+
export { PanelStack } from "./components/panel/PanelStack.tsx";
|
|
24
|
+
export { PanelField } from "./components/panel/PanelField.tsx";
|
|
25
|
+
export { PanelLink } from "./components/panel/PanelLink.tsx";
|
|
23
26
|
export { Divider } from "./components/Divider.tsx";
|
|
24
27
|
export { Tooltip } from "./components/Tooltip.tsx";
|
|
25
28
|
export { Modal } from "./components/Modal.tsx";
|