@camstack/ui-library 1.2.361 → 1.2.363

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.
@@ -1,6 +1,12 @@
1
1
  import { type ButtonHTMLAttributes, type ForwardRefExoticComponent, type RefAttributes } from "react";
2
2
  export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
- variant?: "primary" | "secondary" | "ghost" | "danger" | "outline";
3
+ /**
4
+ * `unstyled` draws nothing: no height, padding, colour or radius. It is the
5
+ * library's wrapper for a pressable whose look is the caller's layout (a row,
6
+ * a chip, a toggle segment), so the browser's `<button>` never appears in a
7
+ * page. A control that should LOOK like a button uses another variant.
8
+ */
9
+ variant?: "primary" | "secondary" | "ghost" | "danger" | "outline" | "unstyled";
4
10
  size?: "sm" | "md" | "lg";
5
11
  }
6
12
  export declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,7 @@
1
+ import { type InputHTMLAttributes, type ForwardRefExoticComponent, type RefAttributes } from "react";
2
+ export interface FileInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {}
3
+ /**
4
+ * The picker behind a `Button`: always visually hidden. The caller keeps a ref
5
+ * and opens it with `ref.current?.click()` from a library `Button`.
6
+ */
7
+ export declare const FileInput: ForwardRefExoticComponent<FileInputProps & RefAttributes<HTMLInputElement>>;
@@ -10,6 +10,10 @@ export * from "./skeleton";
10
10
  export * from "./input";
11
11
  export * from "./select";
12
12
  export * from "./checkbox";
13
+ export * from "./textarea";
14
+ export * from "./slider";
15
+ export * from "./radio";
16
+ export * from "./file-input";
13
17
  export * from "./switch";
14
18
  export * from "./dialog";
15
19
  export * from "./dropdown";
@@ -0,0 +1,4 @@
1
+ import { type InputHTMLAttributes, type ForwardRefExoticComponent, type RefAttributes } from "react";
2
+ export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {}
3
+ /** One radio button; group them with a shared `name`. */
4
+ export declare const Radio: ForwardRefExoticComponent<RadioProps & RefAttributes<HTMLInputElement>>;
@@ -4,7 +4,10 @@ export interface SelectOption {
4
4
  label: string;
5
5
  }
6
6
  export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
7
- options: SelectOption[];
7
+ /** The choices. Omit it and pass `<option>` / `<optgroup>` children for a grouped or computed list. */
8
+ options?: SelectOption[];
9
+ /** Classes of the wrapper that carries the chevron (default `relative w-full`). */
10
+ wrapperClassName?: string;
8
11
  }
9
12
  /**
10
13
  * A native `<select>` styled to match the rest of the field set.
@@ -0,0 +1,4 @@
1
+ import { type InputHTMLAttributes, type ForwardRefExoticComponent, type RefAttributes } from "react";
2
+ export interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {}
3
+ /** A range slider (`min`, `max`, `step`, `value`, `onChange`). Carries an `aria-label` at the call site. */
4
+ export declare const Slider: ForwardRefExoticComponent<SliderProps & RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,6 @@
1
+ import { type TextareaHTMLAttributes, type ForwardRefExoticComponent, type RefAttributes } from "react";
2
+ export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
3
+ state?: "default" | "error";
4
+ }
5
+ /** Multi-line text field, drawn like `Input` (same border, focus ring and disabled affordance). */
6
+ export declare const Textarea: ForwardRefExoticComponent<TextareaProps & RefAttributes<HTMLTextAreaElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/ui-library",
3
- "version": "1.2.361",
3
+ "version": "1.2.363",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/camstack/server.git",