@vellira-ui/types 2.28.0 → 2.30.0

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/dist/button.d.ts CHANGED
@@ -3,14 +3,23 @@ export type ButtonColor = 'primary' | 'neutral' | 'success' | 'warning' | 'dange
3
3
  export type ButtonAppearance = 'solid' | 'outline' | 'ghost' | 'soft' | 'link';
4
4
  export type ButtonShape = 'square' | 'rounded' | 'pill';
5
5
  export interface BaseButtonProps {
6
+ /** Visual tone for the button action. */
6
7
  color?: ButtonColor;
8
+ /** Visual style for the button surface. */
7
9
  appearance?: ButtonAppearance;
10
+ /** Button size. */
8
11
  size?: ButtonSize;
12
+ /** Corner shape for the button. */
9
13
  shape?: ButtonShape;
14
+ /** Makes the button fill its container width. */
10
15
  fullWidth?: boolean;
16
+ /** Shows a loading indicator and disables interaction. */
11
17
  loading?: boolean;
18
+ /** Replaces visible content while loading. */
12
19
  loadingText?: string;
20
+ /** Disables interaction. */
13
21
  disabled?: boolean;
22
+ /** Renders the button as an icon-only action. */
14
23
  iconOnly?: boolean;
15
24
  }
16
25
  //# sourceMappingURL=button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../src/button.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5C,MAAM,MAAM,WAAW,GACrB,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC3D,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAC/E,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAExD,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../src/button.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5C,MAAM,MAAM,WAAW,GACrB,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC3D,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAC/E,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAExD,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,mBAAmB;IACnB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,mCAAmC;IACnC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,iDAAiD;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0DAA0D;IAC1D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
@@ -1,8 +1,25 @@
1
1
  export interface BaseFormFieldProps {
2
+ /** Visible field label. */
2
3
  label?: string;
4
+ /** Supporting text linked to the control. */
3
5
  description?: string;
6
+ /** Error message linked to the control. Also implies invalid state. */
4
7
  error?: string;
8
+ /** Marks the field and compatible child controls as required. */
5
9
  required?: boolean;
10
+ /** Disables the field and compatible child controls. */
6
11
  disabled?: boolean;
12
+ /** Shows invalid styling without requiring error text. */
13
+ invalid?: boolean;
14
+ /** Field layout direction. */
15
+ orientation?: 'vertical' | 'horizontal';
16
+ /** Label placement within the selected orientation. */
17
+ labelPosition?: 'top' | 'start';
18
+ /** Field size propagated to compatible child controls. */
19
+ size?: 'sm' | 'md' | 'lg';
20
+ /** Additional label content, such as an info affordance. */
21
+ labelInfo?: string;
22
+ /** Optional marker shown for non-required fields. Do not combine with required. */
23
+ optionalText?: string;
7
24
  }
8
25
  //# sourceMappingURL=formField.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"formField.d.ts","sourceRoot":"","sources":["../src/formField.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
1
+ {"version":3,"file":"formField.d.ts","sourceRoot":"","sources":["../src/formField.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,iEAAiE;IACjE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8BAA8B;IAC9B,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC,uDAAuD;IACvD,aAAa,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;IAChC,0DAA0D;IAC1D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mFAAmF;IACnF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
package/dist/input.d.ts CHANGED
@@ -1,16 +1,49 @@
1
1
  export type InputSize = 'sm' | 'md' | 'lg';
2
+ export type InputColor = 'primary' | 'neutral' | 'success' | 'warning' | 'danger';
3
+ export type InputVariant = 'outline' | 'filled' | 'soft';
2
4
  export type InputType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search';
5
+ export type InputMask = string | ((value: string) => string);
6
+ export type InputFormatter = (value: string) => string;
7
+ export type InputParser = (displayValue: string) => string;
3
8
  export type InputAdornmentTone = 'default' | 'primary' | 'secondary' | 'success' | 'danger' | 'muted' | 'inverse';
4
9
  export interface InputBaseProps {
10
+ /** Visible field label. */
5
11
  label?: string;
12
+ /** Supporting text rendered with the field and linked to the control. */
6
13
  description?: string;
14
+ /** Placeholder shown when the value is empty. */
7
15
  placeholder?: string;
16
+ /** Field size. Inherits from FormField when omitted by compatible controls. */
8
17
  size?: InputSize;
18
+ /** Semantic color palette for the control. */
19
+ color?: InputColor;
20
+ /** Visual variant for the control chrome. */
21
+ variant?: InputVariant;
22
+ /** Disables interaction. Also inherited from FormField by compatible controls. */
9
23
  disabled?: boolean;
24
+ /** Makes the control non-editable while preserving focus and value semantics. */
10
25
  readOnly?: boolean;
26
+ /** Marks the field as required. Also inherited from FormField. */
11
27
  required?: boolean;
28
+ /** Shows invalid styling without requiring error text. Also inherited from FormField. */
29
+ invalid?: boolean;
30
+ /** Shows a spinner in the right slot and makes the field read-only. */
31
+ loading?: boolean;
32
+ /** Shows a clear action when the field has a value. */
12
33
  clearable?: boolean;
34
+ /** Called when the clear action is activated. */
13
35
  onClear?: () => void;
36
+ /** Shows a password visibility toggle for password inputs. */
37
+ revealPassword?: boolean;
38
+ /** Shows the current character count when maxLength is provided. */
39
+ showCounter?: boolean;
40
+ /** Input mask. String masks use # as a digit placeholder. */
41
+ mask?: InputMask;
42
+ /** Formats the displayed value without changing the controlled value. */
43
+ format?: InputFormatter;
44
+ /** Parses a formatted display value before mask/onValueChange. */
45
+ parse?: InputParser;
46
+ /** Error message. Also implies invalid state. */
14
47
  error?: string;
15
48
  }
16
49
  //# sourceMappingURL=input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC3C,MAAM,MAAM,SAAS,GACnB,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,CAAC;AACtE,MAAM,MAAM,kBAAkB,GAC1B,SAAS,GACT,SAAS,GACT,WAAW,GACX,SAAS,GACT,QAAQ,GACR,OAAO,GACP,SAAS,CAAC;AAEd,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI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AO,CAAC;IAElB,uDAAuD;IACvD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,8DAA8D;IAC9D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oEAAoE;IACpE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,yEAAyE;IACzE,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,kEAAkE;IAClE,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
package/dist/radio.d.ts CHANGED
@@ -1,13 +1,24 @@
1
1
  import type { RadioSize } from './radioGroup';
2
2
  export type RadioValue = string;
3
+ export type RadioColor = 'primary' | 'neutral' | 'success' | 'warning' | 'danger';
3
4
  export interface BaseRadioProps {
5
+ /** Value represented by the radio control. */
4
6
  value: RadioValue;
7
+ /** Controlled checked state for standalone usage. */
5
8
  checked?: boolean;
9
+ /** Initial checked state for uncontrolled standalone usage. */
6
10
  defaultChecked?: boolean;
11
+ /** Disables interaction. */
7
12
  disabled?: boolean;
13
+ /** Marks the radio as required. */
8
14
  required?: boolean;
15
+ /** Validation error rendered for invalid state. */
9
16
  error?: string;
17
+ /** Radio control size. */
10
18
  size?: RadioSize;
19
+ /** Selected radio color. */
20
+ color?: RadioColor;
21
+ /** Called when the standalone checked state changes. */
11
22
  onCheckedChange?: (checked: boolean) => void;
12
23
  }
13
24
  //# sourceMappingURL=radio.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../src/radio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C"}
1
+ {"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../src/radio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAChC,MAAM,MAAM,UAAU,GACpB,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE3D,MAAM,WAAW,cAAc;IAC7B,8CAA8C;IAC9C,KAAK,EAAE,UAAU,CAAC;IAClB,qDAAqD;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+DAA+D;IAC/D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0BAA0B;IAC1B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,wDAAwD;IACxD,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C"}
@@ -1,13 +1,22 @@
1
- import type { RadioValue } from './radio';
1
+ import type { RadioColor, RadioValue } from './radio';
2
2
  export type RadioGroupOrientation = 'vertical' | 'horizontal';
3
3
  export type RadioSize = 'sm' | 'md' | 'lg';
4
4
  export interface BaseRadioGroupProps {
5
+ /** Controlled selected value. */
5
6
  value?: RadioValue;
7
+ /** Initial selected value for uncontrolled usage. */
6
8
  defaultValue?: RadioValue;
9
+ /** Disables every radio in the group. */
7
10
  disabled?: boolean;
11
+ /** Marks the radio group as required. */
8
12
  required?: boolean;
13
+ /** Layout direction. */
9
14
  orientation?: RadioGroupOrientation;
15
+ /** Size inherited by child radios. */
10
16
  size?: RadioSize;
17
+ /** Selected color inherited by child radios. */
18
+ color?: RadioColor;
19
+ /** Called when selection changes. */
11
20
  onValueChange?: (value: RadioValue) => void;
12
21
  }
13
22
  //# sourceMappingURL=radioGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"radioGroup.d.ts","sourceRoot":"","sources":["../src/radioGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,YAAY,CAAC;AAC9D,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CAC7C"}
1
+ {"version":3,"file":"radioGroup.d.ts","sourceRoot":"","sources":["../src/radioGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtD,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,YAAY,CAAC;AAC9D,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C,MAAM,WAAW,mBAAmB;IAClC,iCAAiC;IACjC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,qDAAqD;IACrD,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wBAAwB;IACxB,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,sCAAsC;IACtC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,gDAAgD;IAChD,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,qCAAqC;IACrC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CAC7C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellira-ui/types",
3
- "version": "2.28.0",
3
+ "version": "2.30.0",
4
4
  "description": "Shared TypeScript types for Vellira Design System",
5
5
  "author": "Roman Bakurov",
6
6
  "license": "MIT",