@hyddenlabs/hydn-ui 0.3.0-alpha.104 → 0.3.0-alpha.151

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/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as React$1 from 'react';
3
2
  import React__default, { ReactNode, CSSProperties, HTMLAttributes, MouseEvent } from 'react';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
 
5
5
  type ButtonProps = {
6
6
  children?: React__default.ReactNode;
@@ -20,27 +20,26 @@ type ButtonProps = {
20
20
  wide?: boolean;
21
21
  active?: boolean;
22
22
  };
23
- declare function Button({ children, onClick, ariaLabel, disabled, type, className, icon, iconPosition, variant, style, size, rounded, loading, fullWidth, wide, active }: Readonly<ButtonProps>): react_jsx_runtime.JSX.Element;
24
- declare namespace Button {
25
- var displayName: string;
26
- }
23
+ declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
27
24
 
28
25
  type ValidationState$5 = 'default' | 'error' | 'success' | 'warning';
29
26
  type InputProps = {
30
27
  value?: string;
31
28
  onChange?: (e: React__default.ChangeEvent<HTMLInputElement>) => void;
29
+ onFocus?: (e: React__default.FocusEvent<HTMLInputElement>) => void;
32
30
  placeholder?: string;
33
31
  disabled?: boolean;
34
32
  type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
35
33
  className?: string;
36
34
  ariaLabel?: string;
35
+ ref?: React__default.Ref<HTMLInputElement>;
37
36
  id?: string;
38
37
  name?: string;
39
38
  required?: boolean;
40
39
  size?: 'sm' | 'md' | 'lg';
41
40
  validationState?: ValidationState$5;
42
41
  };
43
- declare function Input({ value, onChange, placeholder, disabled, type, className, ariaLabel, id, name, required, size, validationState }: Readonly<InputProps>): react_jsx_runtime.JSX.Element;
42
+ declare function Input({ value, onChange, onFocus, placeholder, disabled, type, className, ariaLabel, ref, id, name, required, size, validationState }: Readonly<InputProps>): react_jsx_runtime.JSX.Element;
44
43
  declare namespace Input {
45
44
  var displayName: string;
46
45
  }
@@ -341,18 +340,26 @@ declare namespace Tabs {
341
340
  var displayName: string;
342
341
  }
343
342
 
343
+ type DropdownTriggerProps = {
344
+ title: string;
345
+ subtitle?: string;
346
+ icon?: string;
347
+ hideChevron?: boolean;
348
+ };
344
349
  type DropdownProps = {
345
- trigger: React__default.ReactNode;
350
+ trigger: DropdownTriggerProps;
346
351
  children: React__default.ReactNode;
347
352
  className?: string;
348
353
  align?: 'start' | 'center' | 'end';
349
354
  autoClose?: boolean;
350
355
  size?: 'sm' | 'md';
356
+ variant?: ButtonProps['variant'];
357
+ buttonStyle?: ButtonProps['style'];
351
358
  minWidth?: string;
352
359
  maxWidth?: string;
353
360
  menuClassName?: string;
354
361
  };
355
- declare function Dropdown({ trigger, children, className, align, autoClose, size, minWidth, maxWidth, menuClassName }: Readonly<DropdownProps>): react_jsx_runtime.JSX.Element;
362
+ declare function Dropdown({ trigger, children, className, align, autoClose, size, variant, buttonStyle, minWidth, maxWidth, menuClassName }: Readonly<DropdownProps>): react_jsx_runtime.JSX.Element;
356
363
  declare namespace Dropdown {
357
364
  var displayName: string;
358
365
  }
@@ -364,8 +371,8 @@ type DropdownItemProps = {
364
371
  disabled?: boolean;
365
372
  className?: string;
366
373
  description?: string;
367
- icon?: React__default.ReactNode;
368
- endIcon?: React__default.ReactNode;
374
+ icon?: string;
375
+ endIcon?: string;
369
376
  size?: 'sm' | 'md';
370
377
  __dropdownIndex?: number;
371
378
  __registerItem?: (el: HTMLButtonElement | null, index: number) => void;
@@ -1146,9 +1153,9 @@ type HeadingProps = {
1146
1153
  children: ReactNode;
1147
1154
  level?: 1 | 2 | 3 | 4 | 5 | 6;
1148
1155
  className?: string;
1149
- noMargin?: boolean;
1156
+ hasMargin?: boolean;
1150
1157
  };
1151
- declare function Heading({ children, level, className, noMargin }: Readonly<HeadingProps>): React$1.DetailedReactHTMLElement<{
1158
+ declare function Heading({ children, level, className, hasMargin }: Readonly<HeadingProps>): React$1.DetailedReactHTMLElement<{
1152
1159
  className: string;
1153
1160
  }, HTMLElement>;
1154
1161
  declare namespace Heading {
@@ -1157,13 +1164,28 @@ declare namespace Heading {
1157
1164
 
1158
1165
  type TextProps = {
1159
1166
  children: ReactNode;
1160
- variant?: 'body' | 'muted' | 'small';
1161
- size?: 'xs' | 'sm' | 'base' | 'lg' | 'xl';
1162
- weight?: 'normal' | 'medium' | 'semibold' | 'bold';
1167
+ as?: 'p' | 'span' | 'label' | 'strong' | 'em' | 'small' | 'mark' | 'del' | 'ins' | 'sub' | 'sup' | 'abbr' | 'cite' | 'q';
1168
+ variant?: 'body' | 'muted' | 'small' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'inherit';
1169
+ size?: 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl';
1170
+ weight?: 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold';
1171
+ align?: 'left' | 'center' | 'right' | 'justify';
1172
+ leading?: 'none' | 'tight' | 'snug' | 'normal' | 'relaxed' | 'loose';
1173
+ tracking?: 'tighter' | 'tight' | 'normal' | 'wide' | 'wider' | 'widest';
1174
+ transform?: 'uppercase' | 'lowercase' | 'capitalize' | 'normal';
1175
+ decoration?: 'underline' | 'line-through' | 'none';
1176
+ italic?: boolean;
1177
+ truncate?: boolean;
1178
+ lineClamp?: 1 | 2 | 3 | 4 | 5 | 6;
1179
+ wrap?: 'wrap' | 'nowrap' | 'balance' | 'pretty';
1180
+ wordBreak?: 'normal' | 'words' | 'all' | 'keep';
1181
+ opacity?: 0 | 25 | 50 | 75 | 100;
1182
+ hasMargin?: boolean;
1183
+ selectable?: boolean;
1163
1184
  className?: string;
1164
- noMargin?: boolean;
1185
+ id?: string;
1186
+ htmlFor?: string;
1165
1187
  };
1166
- declare function Text({ children, variant, size, weight, className, noMargin }: Readonly<TextProps>): react_jsx_runtime.JSX.Element;
1188
+ declare function Text({ children, as, variant, size, weight, align, leading, tracking, transform, decoration, italic, truncate, lineClamp, wrap, wordBreak, opacity, hasMargin, selectable, className, id, htmlFor }: Readonly<TextProps>): React$1.DetailedReactHTMLElement<Record<string, unknown>, HTMLElement>;
1167
1189
  declare namespace Text {
1168
1190
  var displayName: string;
1169
1191
  }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as React$1 from 'react';
3
2
  import React__default, { ReactNode, CSSProperties, HTMLAttributes, MouseEvent } from 'react';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
 
5
5
  type ButtonProps = {
6
6
  children?: React__default.ReactNode;
@@ -20,27 +20,26 @@ type ButtonProps = {
20
20
  wide?: boolean;
21
21
  active?: boolean;
22
22
  };
23
- declare function Button({ children, onClick, ariaLabel, disabled, type, className, icon, iconPosition, variant, style, size, rounded, loading, fullWidth, wide, active }: Readonly<ButtonProps>): react_jsx_runtime.JSX.Element;
24
- declare namespace Button {
25
- var displayName: string;
26
- }
23
+ declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
27
24
 
28
25
  type ValidationState$5 = 'default' | 'error' | 'success' | 'warning';
29
26
  type InputProps = {
30
27
  value?: string;
31
28
  onChange?: (e: React__default.ChangeEvent<HTMLInputElement>) => void;
29
+ onFocus?: (e: React__default.FocusEvent<HTMLInputElement>) => void;
32
30
  placeholder?: string;
33
31
  disabled?: boolean;
34
32
  type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
35
33
  className?: string;
36
34
  ariaLabel?: string;
35
+ ref?: React__default.Ref<HTMLInputElement>;
37
36
  id?: string;
38
37
  name?: string;
39
38
  required?: boolean;
40
39
  size?: 'sm' | 'md' | 'lg';
41
40
  validationState?: ValidationState$5;
42
41
  };
43
- declare function Input({ value, onChange, placeholder, disabled, type, className, ariaLabel, id, name, required, size, validationState }: Readonly<InputProps>): react_jsx_runtime.JSX.Element;
42
+ declare function Input({ value, onChange, onFocus, placeholder, disabled, type, className, ariaLabel, ref, id, name, required, size, validationState }: Readonly<InputProps>): react_jsx_runtime.JSX.Element;
44
43
  declare namespace Input {
45
44
  var displayName: string;
46
45
  }
@@ -341,18 +340,26 @@ declare namespace Tabs {
341
340
  var displayName: string;
342
341
  }
343
342
 
343
+ type DropdownTriggerProps = {
344
+ title: string;
345
+ subtitle?: string;
346
+ icon?: string;
347
+ hideChevron?: boolean;
348
+ };
344
349
  type DropdownProps = {
345
- trigger: React__default.ReactNode;
350
+ trigger: DropdownTriggerProps;
346
351
  children: React__default.ReactNode;
347
352
  className?: string;
348
353
  align?: 'start' | 'center' | 'end';
349
354
  autoClose?: boolean;
350
355
  size?: 'sm' | 'md';
356
+ variant?: ButtonProps['variant'];
357
+ buttonStyle?: ButtonProps['style'];
351
358
  minWidth?: string;
352
359
  maxWidth?: string;
353
360
  menuClassName?: string;
354
361
  };
355
- declare function Dropdown({ trigger, children, className, align, autoClose, size, minWidth, maxWidth, menuClassName }: Readonly<DropdownProps>): react_jsx_runtime.JSX.Element;
362
+ declare function Dropdown({ trigger, children, className, align, autoClose, size, variant, buttonStyle, minWidth, maxWidth, menuClassName }: Readonly<DropdownProps>): react_jsx_runtime.JSX.Element;
356
363
  declare namespace Dropdown {
357
364
  var displayName: string;
358
365
  }
@@ -364,8 +371,8 @@ type DropdownItemProps = {
364
371
  disabled?: boolean;
365
372
  className?: string;
366
373
  description?: string;
367
- icon?: React__default.ReactNode;
368
- endIcon?: React__default.ReactNode;
374
+ icon?: string;
375
+ endIcon?: string;
369
376
  size?: 'sm' | 'md';
370
377
  __dropdownIndex?: number;
371
378
  __registerItem?: (el: HTMLButtonElement | null, index: number) => void;
@@ -1146,9 +1153,9 @@ type HeadingProps = {
1146
1153
  children: ReactNode;
1147
1154
  level?: 1 | 2 | 3 | 4 | 5 | 6;
1148
1155
  className?: string;
1149
- noMargin?: boolean;
1156
+ hasMargin?: boolean;
1150
1157
  };
1151
- declare function Heading({ children, level, className, noMargin }: Readonly<HeadingProps>): React$1.DetailedReactHTMLElement<{
1158
+ declare function Heading({ children, level, className, hasMargin }: Readonly<HeadingProps>): React$1.DetailedReactHTMLElement<{
1152
1159
  className: string;
1153
1160
  }, HTMLElement>;
1154
1161
  declare namespace Heading {
@@ -1157,13 +1164,28 @@ declare namespace Heading {
1157
1164
 
1158
1165
  type TextProps = {
1159
1166
  children: ReactNode;
1160
- variant?: 'body' | 'muted' | 'small';
1161
- size?: 'xs' | 'sm' | 'base' | 'lg' | 'xl';
1162
- weight?: 'normal' | 'medium' | 'semibold' | 'bold';
1167
+ as?: 'p' | 'span' | 'label' | 'strong' | 'em' | 'small' | 'mark' | 'del' | 'ins' | 'sub' | 'sup' | 'abbr' | 'cite' | 'q';
1168
+ variant?: 'body' | 'muted' | 'small' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'inherit';
1169
+ size?: 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl';
1170
+ weight?: 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold';
1171
+ align?: 'left' | 'center' | 'right' | 'justify';
1172
+ leading?: 'none' | 'tight' | 'snug' | 'normal' | 'relaxed' | 'loose';
1173
+ tracking?: 'tighter' | 'tight' | 'normal' | 'wide' | 'wider' | 'widest';
1174
+ transform?: 'uppercase' | 'lowercase' | 'capitalize' | 'normal';
1175
+ decoration?: 'underline' | 'line-through' | 'none';
1176
+ italic?: boolean;
1177
+ truncate?: boolean;
1178
+ lineClamp?: 1 | 2 | 3 | 4 | 5 | 6;
1179
+ wrap?: 'wrap' | 'nowrap' | 'balance' | 'pretty';
1180
+ wordBreak?: 'normal' | 'words' | 'all' | 'keep';
1181
+ opacity?: 0 | 25 | 50 | 75 | 100;
1182
+ hasMargin?: boolean;
1183
+ selectable?: boolean;
1163
1184
  className?: string;
1164
- noMargin?: boolean;
1185
+ id?: string;
1186
+ htmlFor?: string;
1165
1187
  };
1166
- declare function Text({ children, variant, size, weight, className, noMargin }: Readonly<TextProps>): react_jsx_runtime.JSX.Element;
1188
+ declare function Text({ children, as, variant, size, weight, align, leading, tracking, transform, decoration, italic, truncate, lineClamp, wrap, wordBreak, opacity, hasMargin, selectable, className, id, htmlFor }: Readonly<TextProps>): React$1.DetailedReactHTMLElement<Record<string, unknown>, HTMLElement>;
1167
1189
  declare namespace Text {
1168
1190
  var displayName: string;
1169
1191
  }