@matthiaskrijgsman/mat-ui 0.0.24 → 0.0.26

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 CHANGED
@@ -89,7 +89,7 @@ Define your overrides after importing the mat-ui stylesheet:
89
89
 
90
90
  #### Control sizing
91
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`.
92
+ `Button`, `ButtonIconSquare`, `ButtonIconRound`, `Input`, `InputColor`, `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
93
 
94
94
  | Token | Description | sm · md · lg defaults |
95
95
  |-------|-------------|------------------------|
@@ -156,6 +156,10 @@ Each button variant (`primary`, `white`, `black`, `transparent`, `secondary`, `t
156
156
 
157
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
158
 
159
+ #### Color input
160
+
161
+ `InputColor` reuses the standard input tokens — the color swatch in the field and the outline of the picker's saturation/value plane both derive from `--color-input-border`, and the field itself uses the same `--color-input-*` tokens as `Input`. The picker's hue/brightness gradients and indicator rings are intrinsic to the color-picking UI (not theme-based) and are intentionally not tokenized.
162
+
159
163
  #### Select options
160
164
 
161
165
  | Token | Description | Light default |
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ export type Size = 'sm' | 'md' | 'lg';
3
+ export type InputColorProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> & {
4
+ label?: string | React.ReactNode;
5
+ description?: string | React.ReactNode;
6
+ error?: string | React.ReactNode;
7
+ buttonTray?: React.ReactNode;
8
+ size?: Size;
9
+ };
10
+ export declare const InputColor: (props: InputColorProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ export declare const usePointerDrag: (onPosition: (clientX: number, clientY: number, rect: DOMRect) => void) => {
3
+ isDragging: boolean;
4
+ bind: {
5
+ onPointerDown: (e: React.PointerEvent) => void;
6
+ onPointerMove: (e: React.PointerEvent) => void;
7
+ onPointerUp: (e: React.PointerEvent) => void;
8
+ onPointerCancel: (e: React.PointerEvent) => void;
9
+ };
10
+ };
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export { Button } from "./components/button/Button.tsx";
3
3
  export { ButtonIconSquare } from "./components/button-icon-square/ButtonIconSquare.tsx";
4
4
  export { ButtonIconRound } from "./components/button-icon-round/ButtonIconRound.tsx";
5
5
  export { Input } from "./components/inputs/Input.tsx";
6
+ export { InputColor } from "./components/inputs/InputColor.tsx";
6
7
  export { InputPassword } from "./components/inputs/InputPassword.tsx";
7
8
  export { InputTextArea } from "./components/inputs/InputTextArea.tsx";
8
9
  export { InputRadio } from "./components/inputs/InputRadio.tsx";