@matthiaskrijgsman/mat-ui 0.0.15 → 0.0.17

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,7 +1,7 @@
1
1
  import * as React from "react";
2
+ import type { TablerIcon } from '@tabler/icons-react';
2
3
  export type Variant = 'primary' | 'secondary' | 'tertiary' | 'white' | 'black' | 'transparent';
3
4
  export type Size = 'sm' | 'md' | 'lg';
4
- import type { TablerIcon } from '@tabler/icons-react';
5
5
  export type ButtonIconRoundProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
6
6
  variant?: Variant;
7
7
  size?: Size;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
+ import type { TablerIcon } from '@tabler/icons-react';
2
3
  export type Variant = 'primary' | 'secondary' | 'tertiary' | 'white' | 'black' | 'transparent';
3
4
  export type Size = 'sm' | 'md' | 'lg';
4
- import type { TablerIcon } from '@tabler/icons-react';
5
5
  export type ButtonIconSquareProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
6
6
  variant?: Variant;
7
7
  size?: Size;
@@ -1,10 +1,12 @@
1
1
  import * as React from "react";
2
2
  import { type TablerIcon } from "@tabler/icons-react";
3
- export type InputProps = React.InputHTMLAttributes<HTMLInputElement> & {
3
+ export type Size = 'sm' | 'md' | 'lg';
4
+ export type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> & {
4
5
  label?: string | React.ReactNode;
5
6
  description?: string | React.ReactNode;
6
7
  error?: string | React.ReactNode;
7
8
  Icon?: TablerIcon;
8
9
  buttonTray?: React.ReactNode;
10
+ size?: Size;
9
11
  };
10
12
  export declare const Input: (props: InputProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ export type Size = 'sm' | 'md' | 'lg';
2
3
  export type InputSelectProps<T> = {
3
4
  name?: string;
4
5
  id?: string;
@@ -11,6 +12,7 @@ export type InputSelectProps<T> = {
11
12
  placeholder?: string;
12
13
  maxHeight?: number;
13
14
  error?: string | React.ReactNode;
15
+ size?: Size;
14
16
  };
15
17
  export type Option<T> = {
16
18
  label: string | React.ReactNode;
@@ -1,9 +1,11 @@
1
1
  import * as React from "react";
2
- export type InputSelectNativeProps = React.InputHTMLAttributes<HTMLSelectElement> & {
2
+ export type Size = 'sm' | 'md' | 'lg';
3
+ export type InputSelectNativeProps = Omit<React.InputHTMLAttributes<HTMLSelectElement>, 'size'> & {
3
4
  label?: string | React.ReactNode;
4
5
  description?: string | React.ReactNode;
5
6
  options?: OptionNative[];
6
7
  error?: string | React.ReactNode;
8
+ size?: Size;
7
9
  };
8
10
  export type OptionNative = {
9
11
  label: string;
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ export type Size = 'sm' | 'md' | 'lg';
2
3
  export type InputSelectSearchableProps<T> = {
3
4
  name?: string;
4
5
  id?: string;
@@ -12,6 +13,7 @@ export type InputSelectSearchableProps<T> = {
12
13
  placeholder?: string;
13
14
  maxHeight?: number;
14
15
  error?: string | React.ReactNode;
16
+ size?: Size;
15
17
  };
16
18
  export type Option<T> = {
17
19
  label: string | React.ReactNode;
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ export type Size = 'sm' | 'md' | 'lg';
2
3
  export type InputSelectSearchableAsyncProps<T> = {
3
4
  name?: string;
4
5
  id?: string;
@@ -13,6 +14,7 @@ export type InputSelectSearchableAsyncProps<T> = {
13
14
  placeholder?: string;
14
15
  maxHeight?: number;
15
16
  error?: string | React.ReactNode;
17
+ size?: Size;
16
18
  };
17
19
  export type Option<T> = {
18
20
  label: string | React.ReactNode;
@@ -1,7 +1,9 @@
1
1
  import * as React from "react";
2
+ export type Size = 'sm' | 'md' | 'lg';
2
3
  export type InputTextAreaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> & {
3
4
  label?: string | React.ReactNode;
4
5
  description?: string | React.ReactNode;
5
6
  error?: string | React.ReactNode;
7
+ size?: Size;
6
8
  };
7
9
  export declare const InputTextArea: (props: InputTextAreaProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ export type ControlSize = 'sm' | 'md' | 'lg';
2
+ export declare const sizeHeightClasses: Record<ControlSize, string>;
3
+ export declare const sizeMinHeightClasses: Record<ControlSize, string>;
4
+ export declare const sizeFontClasses: Record<ControlSize, string>;
5
+ export declare const sizeGapClasses: Record<ControlSize, string>;
6
+ export declare const sizePaddingXClasses: Record<ControlSize, string>;
7
+ export declare const sizePaddingLeftClasses: Record<ControlSize, string>;
8
+ export declare const sizePaddingRightClasses: Record<ControlSize, string>;
9
+ export declare const sizePaddingRightWithTrayClasses: Record<ControlSize, string>;
10
+ export declare const sizePaddingLeftWithIconClasses: Record<ControlSize, string>;
11
+ export declare const sizeIconLeftPositionClasses: Record<ControlSize, string>;
12
+ export declare const sizeTrayRightPositionClasses: Record<ControlSize, string>;
13
+ export declare const sizeIconClasses: Record<ControlSize, string>;
14
+ export declare const sizeSquareClasses: Record<ControlSize, string>;
@@ -0,0 +1,3 @@
1
+ import type { ControlSize } from "@/control-size/control-size.util.ts";
2
+ export declare const ControlSizeContext: import("react").Context<ControlSize>;
3
+ export declare const useControlSize: () => ControlSize;