@matthiaskrijgsman/mat-ui 0.0.18 → 0.0.20
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 +23 -0
- package/dist/components/inputs/InputTextArea.d.ts +2 -0
- package/dist/components/inputs/input-file/InputFileMultiple.d.ts +23 -0
- package/dist/components/inputs/input-file/InputFileSingle.d.ts +24 -0
- package/dist/components/inputs/input-file/UploadFileTile.d.ts +10 -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 +7 -1
- package/dist/index.js +7883 -4604
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +79 -26
- package/dist/index.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +7 -1
- package/package.json +3 -1
- /package/dist/components/{Panel.d.ts → panel/Panel.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -146,6 +146,16 @@ Each button variant (`primary`, `white`, `black`, `transparent`, `secondary`, `t
|
|
|
146
146
|
| `--color-input-icon-button-ring` | Ring color for icon buttons inside inputs | `#e5e7eb` |
|
|
147
147
|
| `--color-input-icon-button-icon` | Icon color for icon buttons inside inputs | `#6b7280` |
|
|
148
148
|
|
|
149
|
+
#### File inputs
|
|
150
|
+
|
|
151
|
+
`InputFileSingle` and `UploadFileTile` are composed from existing primitives (input tokens, `Button` for the inset "Choose" button, `ButtonIconSquare` for the remove (X) button) — no dedicated tokens of their own. `InputFileMultiple` adds:
|
|
152
|
+
|
|
153
|
+
| Token | Description | Light default |
|
|
154
|
+
|-------|-------------|---------------|
|
|
155
|
+
| `--color-input-file-icon-bg` | Background of the central icon frame inside `InputFileMultiple`'s dropzone | `#f3f4f6` |
|
|
156
|
+
|
|
157
|
+
All three components also rely on the shared `--color-status-success` / `--color-status-error` tokens for the green check / red error icons in their upload-state slots.
|
|
158
|
+
|
|
149
159
|
#### Select options
|
|
150
160
|
|
|
151
161
|
| Token | Description | Light default |
|
|
@@ -212,6 +222,7 @@ Each button variant (`primary`, `white`, `black`, `transparent`, `secondary`, `t
|
|
|
212
222
|
|-------|-------------|---------------|
|
|
213
223
|
| `--color-panel-bg` | Panel background | `#ffffff` |
|
|
214
224
|
| `--color-panel-border` | Panel border | `#e5e7eb` |
|
|
225
|
+
| `--color-panel-text` | Panel default text color (inherited by `PanelField`) | `#111827` |
|
|
215
226
|
|
|
216
227
|
#### Modal & Sidebar modal
|
|
217
228
|
|
|
@@ -231,6 +242,7 @@ Each button variant (`primary`, `white`, `black`, `transparent`, `secondary`, `t
|
|
|
231
242
|
| `--color-table-border` | Table border color | `#e5e7eb` |
|
|
232
243
|
| `--color-table-row-bg` | Row background | `#ffffff` |
|
|
233
244
|
| `--color-table-row-bg-hover` | Row background on hover | `#f9fafb` |
|
|
245
|
+
| `--color-table-row-text` | Row text color | `#111827` |
|
|
234
246
|
| `--color-table-resize-handle` | Column resize handle | `#e5e7eb` |
|
|
235
247
|
| `--color-table-resize-handle-hover` | Resize handle on hover | `#d1d5db` |
|
|
236
248
|
| `--color-table-resize-handle-active` | Resize handle while dragging | `#2563eb` |
|
|
@@ -253,3 +265,14 @@ Each button variant (`primary`, `white`, `black`, `transparent`, `secondary`, `t
|
|
|
253
265
|
| `--color-badge-black-ring` | Black badge ring | `#d6d3d1` |
|
|
254
266
|
|
|
255
267
|
> 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.
|
|
268
|
+
|
|
269
|
+
#### Status
|
|
270
|
+
|
|
271
|
+
Shared color tokens for status/notification indicators. Currently used by `PanelLink`'s `status` prop, but available for any component.
|
|
272
|
+
|
|
273
|
+
| Token | Description | Light default |
|
|
274
|
+
|-------|-------------|---------------|
|
|
275
|
+
| `--color-status-error` | Error / destructive state | `#dc2626` |
|
|
276
|
+
| `--color-status-warning` | Warning state | `#f59e0b` |
|
|
277
|
+
| `--color-status-success` | Success state | `#16a34a` |
|
|
278
|
+
| `--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,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type Accept, type FileRejection } from "react-dropzone";
|
|
3
|
+
import { type TablerIcon } from "@tabler/icons-react";
|
|
4
|
+
import { type UploadFileTileProps } from "@/components/inputs/input-file/UploadFileTile.tsx";
|
|
5
|
+
export type InputFileMultipleProps = {
|
|
6
|
+
label?: string | React.ReactNode;
|
|
7
|
+
description?: string | React.ReactNode;
|
|
8
|
+
error?: string | React.ReactNode;
|
|
9
|
+
title?: string;
|
|
10
|
+
hint?: React.ReactNode;
|
|
11
|
+
Icon?: TablerIcon;
|
|
12
|
+
onUpload?: (file: File) => Promise<void> | void;
|
|
13
|
+
onFileRemoved?: (file: File) => void;
|
|
14
|
+
onDropRejected?: (fileRejections: FileRejection[]) => void;
|
|
15
|
+
renderFileTile?: (file: File, defaultProps: UploadFileTileProps) => React.ReactNode;
|
|
16
|
+
accept?: Accept;
|
|
17
|
+
maxSize?: number;
|
|
18
|
+
minSize?: number;
|
|
19
|
+
maxFiles?: number;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
className?: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const InputFileMultiple: (props: InputFileMultipleProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type Accept, type FileRejection } from "react-dropzone";
|
|
3
|
+
import { type TablerIcon } from "@tabler/icons-react";
|
|
4
|
+
export type Size = 'sm' | 'md' | 'lg';
|
|
5
|
+
export type InputFileSingleProps = {
|
|
6
|
+
label?: string | React.ReactNode;
|
|
7
|
+
description?: string | React.ReactNode;
|
|
8
|
+
error?: string | React.ReactNode;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
buttonText?: string;
|
|
11
|
+
Icon?: TablerIcon;
|
|
12
|
+
size?: Size;
|
|
13
|
+
value?: File | null;
|
|
14
|
+
isUploaded?: boolean;
|
|
15
|
+
isUploading?: boolean;
|
|
16
|
+
onChange?: (file: File | null) => void | Promise<void>;
|
|
17
|
+
onDropRejected?: (fileRejections: FileRejection[]) => void;
|
|
18
|
+
accept?: Accept;
|
|
19
|
+
maxSize?: number;
|
|
20
|
+
minSize?: number;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const InputFileSingle: (props: InputFileSingleProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type UploadFileTileProps = {
|
|
3
|
+
file: File;
|
|
4
|
+
isUploaded?: boolean;
|
|
5
|
+
isUploading?: boolean;
|
|
6
|
+
error?: string | React.ReactNode;
|
|
7
|
+
onRemove?: () => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const UploadFileTile: (props: UploadFileTileProps) => 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
|
@@ -14,12 +14,18 @@ export { InputError } from "./components/inputs/InputError.tsx";
|
|
|
14
14
|
export { InputErrorIcon } from "./components/inputs/InputErrorIcon.tsx";
|
|
15
15
|
export { InputIconButton } from "./components/inputs/InputIconButton.tsx";
|
|
16
16
|
export { InputIconButtonTray } from "./components/inputs/InputIconButtonTray.tsx";
|
|
17
|
+
export { InputFileSingle } from "./components/inputs/input-file/InputFileSingle.tsx";
|
|
18
|
+
export { InputFileMultiple } from "./components/inputs/input-file/InputFileMultiple.tsx";
|
|
19
|
+
export { UploadFileTile } from "./components/inputs/input-file/UploadFileTile.tsx";
|
|
17
20
|
export { InputSelectNative } from "./components/inputs/InputSelectNative.tsx";
|
|
18
21
|
export { InputSelect } from "./components/inputs/InputSelect.tsx";
|
|
19
22
|
export { InputSelectSearchable } from "./components/inputs/InputSelectSearchable.tsx";
|
|
20
23
|
export { InputSelectSearchableAsync } from "./components/inputs/InputSelectSearchableAsync.tsx";
|
|
21
24
|
export { InputSelectOption } from "./components/inputs/InputSelectOption.tsx";
|
|
22
|
-
export { Panel } from "./components/Panel.tsx";
|
|
25
|
+
export { Panel } from "./components/panel/Panel.tsx";
|
|
26
|
+
export { PanelStack } from "./components/panel/PanelStack.tsx";
|
|
27
|
+
export { PanelField } from "./components/panel/PanelField.tsx";
|
|
28
|
+
export { PanelLink } from "./components/panel/PanelLink.tsx";
|
|
23
29
|
export { Divider } from "./components/Divider.tsx";
|
|
24
30
|
export { Tooltip } from "./components/Tooltip.tsx";
|
|
25
31
|
export { Modal } from "./components/Modal.tsx";
|