@matthiaskrijgsman/mat-ui 0.0.42 → 0.0.44
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 -1
- package/dist/components/TabButtons.d.ts +3 -0
- package/dist/components/Tabs.d.ts +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +945 -895
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -142,6 +142,8 @@ Font weights resolve through a three-step base scale; the semantic tokens below
|
|
|
142
142
|
| `--font-weight-button` | `Button`, `ButtonIconSquare`, `ButtonIconRound`, file-input action text | `--font-weight-strong` |
|
|
143
143
|
| `--font-weight-badge` | `Badge` | `--font-weight-strong` |
|
|
144
144
|
| `--font-weight-tab` | `TabButtons` | `--font-weight-strong` |
|
|
145
|
+
| `--font-weight-tab-count` | `TabButtons` / `Tabs` count chip | `--font-weight-strong` |
|
|
146
|
+
| `--font-weight-tabs` | `Tabs` (underline) tab labels | `--font-weight-strong` |
|
|
145
147
|
| `--font-weight-input-label` | `InputLabel` (label above inputs) | `--font-weight-medium` |
|
|
146
148
|
| `--font-weight-input-description` | `InputDescription` | `--font-weight-medium` |
|
|
147
149
|
| `--font-weight-input-error` | `InputError` | `--font-weight-medium` |
|
|
@@ -159,6 +161,7 @@ Font weights resolve through a three-step base scale; the semantic tokens below
|
|
|
159
161
|
| `--font-size-label` | Dropdown / select group label size | `var(--text-sm)` |
|
|
160
162
|
| `--font-size-description` | `InputDescription` and `PanelField` label size | `var(--text-sm)` |
|
|
161
163
|
| `--font-size-error` | `InputError` size | `var(--text-sm)` |
|
|
164
|
+
| `--font-size-tab-count` | `TabButtons` / `Tabs` count chip size | `var(--text-xs)` |
|
|
162
165
|
|
|
163
166
|
> The text size of the input/button itself comes from the **control sizing** scale below (`--control-size-{size}-font-size`), not from these tokens.
|
|
164
167
|
|
|
@@ -185,7 +188,8 @@ Semantic radius tokens map onto Tailwind's radius scale. Override a token to cha
|
|
|
185
188
|
|
|
186
189
|
| Token | Applies to | Default |
|
|
187
190
|
|-------|-----------|---------|
|
|
188
|
-
| `--border-width-input` | Border width of inputs, selects, buttons, panels, dropdowns, modals, check/radio | `1px` |
|
|
191
|
+
| `--border-width-input` | Border width of inputs, selects, buttons, panels, dropdowns, modals, check/radio, the `Tabs` bottom rule | `1px` |
|
|
192
|
+
| `--border-width-tabs-indicator` | Active-tab underline in `Tabs` | `2px` |
|
|
189
193
|
| `--shadow-control` | Resting elevation of buttons, inputs, panels, tabs | `var(--shadow-sm)` |
|
|
190
194
|
| `--shadow-dropdown` | `DropdownPanel` and the Lexical floating toolbar | `var(--shadow-lg)` |
|
|
191
195
|
| `--shadow-overlay` | `Modal` and `SidebarModal` | `var(--shadow-xl)` |
|
|
@@ -342,6 +346,24 @@ All three components also rely on the shared `--color-status-success` / `--color
|
|
|
342
346
|
| `--color-tab-bg-active` | Tab background on press | `rgb(209 213 219 / 0.8)` |
|
|
343
347
|
| `--color-tab-active-bg` | Active tab background | `#ffffff` |
|
|
344
348
|
| `--color-tab-active-border` | Active tab border | `#e5e7eb` |
|
|
349
|
+
| `--color-tab-count-bg` | Count chip background (inactive tab) | `#e5e7eb` |
|
|
350
|
+
| `--color-tab-count-text` | Count chip text (inactive tab) | `#374151` |
|
|
351
|
+
| `--color-tab-active-count-bg` | Count chip background (active tab) | `#111827` |
|
|
352
|
+
| `--color-tab-active-count-text` | Count chip text (active tab) | `#ffffff` |
|
|
353
|
+
|
|
354
|
+
### Color — tabs (underline)
|
|
355
|
+
|
|
356
|
+
| Token | Description | Light default |
|
|
357
|
+
|-------|-------------|---------------|
|
|
358
|
+
| `--color-tabs-text` | Inactive tab text and icon color | `#6b7280` |
|
|
359
|
+
| `--color-tabs-text-hover` | Inactive tab text on hover | `#374151` |
|
|
360
|
+
| `--color-tabs-active-text` | Active tab text and icon color | `#111827` |
|
|
361
|
+
| `--color-tabs-border` | Bottom rule under the tab list | `#e5e7eb` |
|
|
362
|
+
| `--color-tabs-active-indicator` | Active tab underline | `#111827` |
|
|
363
|
+
| `--color-tabs-count-bg` | Count chip background | `#f3f4f6` |
|
|
364
|
+
| `--color-tabs-count-text` | Count chip text | `#4b5563` |
|
|
365
|
+
| `--color-tabs-active-count-bg` | Count chip background (active tab) | `var(--color-tabs-count-bg)` |
|
|
366
|
+
| `--color-tabs-active-count-text` | Count chip text (active tab) | `var(--color-tabs-count-text)` |
|
|
345
367
|
|
|
346
368
|
### Color — panel
|
|
347
369
|
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { TablerIcon } from "@tabler/icons-react";
|
|
3
|
+
export type Size = 'sm' | 'md' | 'lg';
|
|
3
4
|
export type TabButton = {
|
|
4
5
|
label: string | React.ReactNode;
|
|
5
6
|
active?: boolean;
|
|
6
7
|
onClick?: () => void;
|
|
7
8
|
href?: string;
|
|
8
9
|
Icon?: TablerIcon;
|
|
10
|
+
count?: React.ReactNode;
|
|
9
11
|
};
|
|
10
12
|
export type TabButtonsProps = {
|
|
11
13
|
className?: string;
|
|
12
14
|
tabs: TabButton[];
|
|
15
|
+
size?: Size;
|
|
13
16
|
};
|
|
14
17
|
export declare const TabButtons: (props: TabButtonsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TabButton } from "@/components/TabButtons.tsx";
|
|
2
|
+
export type Size = 'sm' | 'md' | 'lg';
|
|
3
|
+
export type TabsProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
tabs: TabButton[];
|
|
6
|
+
size?: Size;
|
|
7
|
+
};
|
|
8
|
+
export declare const Tabs: (props: TabsProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export { SidebarModal } from "./components/SidebarModal.tsx";
|
|
|
51
51
|
export { Badge } from "./components/Badge.tsx";
|
|
52
52
|
export { BadgeColor } from "./components/BadgeColors.tsx";
|
|
53
53
|
export { TabButtons } from "./components/TabButtons.tsx";
|
|
54
|
+
export { Tabs } from "./components/Tabs.tsx";
|
|
54
55
|
export { AutoScroll } from "./components/AutoScroll.tsx";
|
|
55
56
|
export { Spinner } from "./spinner/Spinner.tsx";
|
|
56
57
|
export { Table } from "./table/Table.tsx";
|