@tempots/beatui 0.14.0 → 0.16.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/README.md +167 -5
- package/dist/{ar-C__uXRig.js → ar-C7sFBvd3.js} +4 -1
- package/dist/beatui.css +1 -1
- package/dist/{de-CaqDmb7M.js → de-g1A7pWNb.js} +4 -1
- package/dist/{es-D2MgpsFw.js → es-VVHXE2N_.js} +4 -1
- package/dist/{fa-7Lh__M6_.js → fa-CJNIz_z3.js} +4 -1
- package/dist/{fr-BFb9eub-.js → fr-CV72Obmu.js} +4 -1
- package/dist/{he-DCxEMw1h.js → he-B7FDQHq5.js} +4 -1
- package/dist/{hi-Bbnlpps9.js → hi-BCajgsBt.js} +4 -1
- package/dist/index.es.js +3146 -2598
- package/dist/index.umd.js +18 -18
- package/dist/{it-CWTDpmhc.js → it-BeJHf7Ur.js} +4 -1
- package/dist/{ja-C1Nynl79.js → ja-D5YyTu5k.js} +4 -1
- package/dist/{ko-BnQv3_8f.js → ko-DNqvHWiZ.js} +4 -1
- package/dist/{nl-CH2009II.js → nl-Cdbu51NB.js} +4 -1
- package/dist/{pl-Cd4dZDyG.js → pl-Bru8UPLn.js} +7 -4
- package/dist/{pt-CZER9j0r.js → pt-LCfmUFgc.js} +4 -1
- package/dist/{ru-CCEGJYwF.js → ru-D7gTuXxP.js} +4 -1
- package/dist/{tr-BVIGQcgy.js → tr-DlFekEUg.js} +4 -1
- package/dist/types/beatui-i18n/default.d.ts +2 -0
- package/dist/types/beatui-i18n/locales/en.d.ts +2 -0
- package/dist/types/beatui-i18n/translations.d.ts +2 -0
- package/dist/types/components/data/index.d.ts +1 -0
- package/dist/types/components/data/unstyled-drop-zone.d.ts +12 -0
- package/dist/types/components/form/control/file-control.d.ts +11 -0
- package/dist/types/components/form/control/index.d.ts +1 -0
- package/dist/types/components/form/controller/color-controller.d.ts +75 -0
- package/dist/types/components/form/controller/index.d.ts +1 -0
- package/dist/types/components/form/input/color-input.d.ts +2 -0
- package/dist/types/components/form/input/file-input.d.ts +11 -0
- package/dist/types/components/form/input/index.d.ts +2 -0
- package/dist/types/components/form/input/input-options.d.ts +2 -1
- package/dist/types/components/navigation/index.d.ts +1 -0
- package/dist/types/components/navigation/tabs/index.d.ts +1 -0
- package/dist/types/components/navigation/tabs/tabs.d.ts +52 -0
- package/dist/types/utils/color-validation.d.ts +64 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/{ur-BVAP8WLA.js → ur-mIO25A6L.js} +4 -1
- package/dist/{vi-Dv4aIcRH.js → vi-Dw_DDZWP.js} +4 -1
- package/dist/{zh-BcAbijvs.js → zh-Dojj6P4C.js} +4 -1
- package/package.json +3 -3
|
@@ -39,7 +39,10 @@ const a = {
|
|
|
39
39
|
fa: () => "Persiano",
|
|
40
40
|
ur: () => "Urdu",
|
|
41
41
|
// input
|
|
42
|
-
emailPlaceholderText: () => "Inserisci la tua email"
|
|
42
|
+
emailPlaceholderText: () => "Inserisci la tua email",
|
|
43
|
+
// drop zone
|
|
44
|
+
dropZoneInstructions: () => "Trascina e rilascia i file qui",
|
|
45
|
+
dropZoneInstructionsWithClick: () => "Trascina e rilascia i file qui, o premi Invio o Spazio per aprire il selettore file"
|
|
43
46
|
};
|
|
44
47
|
export {
|
|
45
48
|
a as default
|
|
@@ -39,7 +39,10 @@ const e = {
|
|
|
39
39
|
fa: () => "ペルシア語",
|
|
40
40
|
ur: () => "ウルドゥー語",
|
|
41
41
|
// input
|
|
42
|
-
emailPlaceholderText: () => "メールアドレスを入力"
|
|
42
|
+
emailPlaceholderText: () => "メールアドレスを入力",
|
|
43
|
+
// drop zone
|
|
44
|
+
dropZoneInstructions: () => "ファイルをここにドラッグ&ドロップ",
|
|
45
|
+
dropZoneInstructionsWithClick: () => "ファイルをここにドラッグ&ドロップ、またはEnterキーまたはSpaceキーを押してファイル選択を開く"
|
|
43
46
|
};
|
|
44
47
|
export {
|
|
45
48
|
e as default,
|
|
@@ -39,7 +39,10 @@ const e = {
|
|
|
39
39
|
fa: () => "페르시아어",
|
|
40
40
|
ur: () => "우르두어",
|
|
41
41
|
// input
|
|
42
|
-
emailPlaceholderText: () => "이메일을 입력하세요"
|
|
42
|
+
emailPlaceholderText: () => "이메일을 입력하세요",
|
|
43
|
+
// drop zone
|
|
44
|
+
dropZoneInstructions: () => "파일을 여기에 드래그 앤 드롭하세요",
|
|
45
|
+
dropZoneInstructionsWithClick: () => "파일을 여기에 드래그 앤 드롭하거나, Enter 또는 Space 키를 눌러 파일 선택기를 여세요"
|
|
43
46
|
};
|
|
44
47
|
export {
|
|
45
48
|
e as default
|
|
@@ -39,7 +39,10 @@ const e = {
|
|
|
39
39
|
fa: () => "Perzisch",
|
|
40
40
|
ur: () => "Urdu",
|
|
41
41
|
// input
|
|
42
|
-
emailPlaceholderText: () => "Voer je e-mail in"
|
|
42
|
+
emailPlaceholderText: () => "Voer je e-mail in",
|
|
43
|
+
// drop zone
|
|
44
|
+
dropZoneInstructions: () => "Sleep bestanden hierheen",
|
|
45
|
+
dropZoneInstructionsWithClick: () => "Sleep bestanden hierheen, of druk op Enter of Spatie om bestandskiezer te openen"
|
|
43
46
|
};
|
|
44
47
|
export {
|
|
45
48
|
e as default,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const i = {
|
|
2
2
|
loadingExtended: () => "Ładowanie, proszę czekać",
|
|
3
3
|
loadingShort: () => "Ładowanie...",
|
|
4
4
|
locale: () => "Język",
|
|
@@ -39,9 +39,12 @@ const a = {
|
|
|
39
39
|
fa: () => "Perski",
|
|
40
40
|
ur: () => "Urdu",
|
|
41
41
|
// input
|
|
42
|
-
emailPlaceholderText: () => "Wprowadź adres e-mail"
|
|
42
|
+
emailPlaceholderText: () => "Wprowadź adres e-mail",
|
|
43
|
+
// drop zone
|
|
44
|
+
dropZoneInstructions: () => "Przeciągnij i upuść pliki tutaj",
|
|
45
|
+
dropZoneInstructionsWithClick: () => "Przeciągnij i upuść pliki tutaj, lub naciśnij Enter lub Spację, aby otworzyć selektor plików"
|
|
43
46
|
};
|
|
44
47
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
i as default,
|
|
49
|
+
i as pl
|
|
47
50
|
};
|
|
@@ -39,7 +39,10 @@ const a = {
|
|
|
39
39
|
fa: () => "Persa",
|
|
40
40
|
ur: () => "Urdu",
|
|
41
41
|
// input
|
|
42
|
-
emailPlaceholderText: () => "Digite seu e-mail"
|
|
42
|
+
emailPlaceholderText: () => "Digite seu e-mail",
|
|
43
|
+
// drop zone
|
|
44
|
+
dropZoneInstructions: () => "Arraste e solte arquivos aqui",
|
|
45
|
+
dropZoneInstructionsWithClick: () => "Arraste e solte arquivos aqui, ou pressione Enter ou Espaço para abrir o seletor de arquivos"
|
|
43
46
|
};
|
|
44
47
|
export {
|
|
45
48
|
a as default
|
|
@@ -39,7 +39,10 @@ const e = {
|
|
|
39
39
|
fa: () => "Персидский",
|
|
40
40
|
ur: () => "Урду",
|
|
41
41
|
// input
|
|
42
|
-
emailPlaceholderText: () => "Введите электронную почту"
|
|
42
|
+
emailPlaceholderText: () => "Введите электронную почту",
|
|
43
|
+
// drop zone
|
|
44
|
+
dropZoneInstructions: () => "Перетащите файлы сюда",
|
|
45
|
+
dropZoneInstructionsWithClick: () => "Перетащите файлы сюда, или нажмите Enter или Пробел, чтобы открыть выбор файлов"
|
|
43
46
|
};
|
|
44
47
|
export {
|
|
45
48
|
e as default,
|
|
@@ -39,7 +39,10 @@ const e = {
|
|
|
39
39
|
fa: () => "Farsça",
|
|
40
40
|
ur: () => "Urduca",
|
|
41
41
|
// input
|
|
42
|
-
emailPlaceholderText: () => "E-postanızı girin"
|
|
42
|
+
emailPlaceholderText: () => "E-postanızı girin",
|
|
43
|
+
// drop zone
|
|
44
|
+
dropZoneInstructions: () => "Dosyaları buraya sürükleyip bırakın",
|
|
45
|
+
dropZoneInstructionsWithClick: () => "Dosyaları buraya sürükleyip bırakın, veya dosya seçiciyi açmak için Enter veya Boşluk tuşuna basın"
|
|
43
46
|
};
|
|
44
47
|
export {
|
|
45
48
|
e as default
|
|
@@ -38,6 +38,8 @@ export declare const defaultMessages: {
|
|
|
38
38
|
fa: () => string;
|
|
39
39
|
ur: () => string;
|
|
40
40
|
emailPlaceholderText: () => string;
|
|
41
|
+
dropZoneInstructions: () => string;
|
|
42
|
+
dropZoneInstructionsWithClick: () => string;
|
|
41
43
|
};
|
|
42
44
|
export declare const defaultLocale = "en";
|
|
43
45
|
export type BeatUIMessages = typeof defaultMessages;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TNode, Value, Signal } from '@tempots/dom';
|
|
2
|
+
export type DropZoneOptions = {
|
|
3
|
+
onDrop: (files: File[]) => void;
|
|
4
|
+
accept?: Value<string>;
|
|
5
|
+
enableClick?: Value<boolean>;
|
|
6
|
+
content: (options: {
|
|
7
|
+
files: Signal<File[]>;
|
|
8
|
+
clear: () => void;
|
|
9
|
+
}) => TNode;
|
|
10
|
+
allowMultiple?: Value<boolean>;
|
|
11
|
+
};
|
|
12
|
+
export declare function UnstyledDropZone({ onDrop, accept, enableClick, content, allowMultiple, }: DropZoneOptions): import("@tempots/dom").Renderable;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TNode, Value } from '@tempots/dom';
|
|
2
|
+
import { ControlOptions } from './control-options';
|
|
3
|
+
import { Merge } from '@tempots/std';
|
|
4
|
+
export type FileControlOptions = Merge<ControlOptions<File[]>, {
|
|
5
|
+
accept?: Value<string>;
|
|
6
|
+
allowMultiple?: Value<boolean>;
|
|
7
|
+
maxFiles?: Value<number>;
|
|
8
|
+
maxFileSize?: Value<number>;
|
|
9
|
+
showFileList?: Value<boolean>;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const FileControl: (options: FileControlOptions, ...children: TNode[]) => import("@tempots/dom").Renderable;
|
|
@@ -4,6 +4,7 @@ export * from './control-options';
|
|
|
4
4
|
export * from './date-control';
|
|
5
5
|
export * from './date-time-control';
|
|
6
6
|
export * from './email-control';
|
|
7
|
+
export * from './file-control';
|
|
7
8
|
export * from './form-status';
|
|
8
9
|
export * from './lazy-native-select-control';
|
|
9
10
|
export * from './native-select-control';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Controller } from './controller';
|
|
2
|
+
import { Signal } from '@tempots/dom';
|
|
3
|
+
import { Path } from './path';
|
|
4
|
+
import { ControllerValidation } from './controller-validation';
|
|
5
|
+
/**
|
|
6
|
+
* Specialized controller for color values with validation and transformation utilities
|
|
7
|
+
*/
|
|
8
|
+
export declare class ColorController extends Controller<string> {
|
|
9
|
+
constructor(path: Path, change: (value: string) => void, value: Signal<string>, status: Signal<ControllerValidation>, parent: {
|
|
10
|
+
disabled: Signal<boolean>;
|
|
11
|
+
});
|
|
12
|
+
/**
|
|
13
|
+
* Validates that the current value is a valid color
|
|
14
|
+
*/
|
|
15
|
+
readonly isValidColor: import("@tempots/dom").Computed<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* Validates that the current value is a valid hex color
|
|
18
|
+
*/
|
|
19
|
+
readonly isValidHex: import("@tempots/dom").Computed<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* Gets the normalized hex color (always 6 characters with # prefix)
|
|
22
|
+
*/
|
|
23
|
+
readonly normalizedHex: import("@tempots/dom").Computed<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Sets the color value with automatic normalization for hex colors
|
|
26
|
+
* @param color - The color value to set
|
|
27
|
+
*/
|
|
28
|
+
readonly setColor: (color: string) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Sets a hex color value
|
|
31
|
+
* @param hex - The hex color value (with or without #)
|
|
32
|
+
*/
|
|
33
|
+
readonly setHex: (hex: string) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Sets an RGB color value
|
|
36
|
+
* @param r - Red value (0-255)
|
|
37
|
+
* @param g - Green value (0-255)
|
|
38
|
+
* @param b - Blue value (0-255)
|
|
39
|
+
*/
|
|
40
|
+
readonly setRgb: (r: number, g: number, b: number) => void;
|
|
41
|
+
/**
|
|
42
|
+
* Gets RGB values from the current color
|
|
43
|
+
* @returns RGB values or null if not a valid hex color
|
|
44
|
+
*/
|
|
45
|
+
readonly getRgb: () => {
|
|
46
|
+
r: number;
|
|
47
|
+
g: number;
|
|
48
|
+
b: number;
|
|
49
|
+
} | null;
|
|
50
|
+
/**
|
|
51
|
+
* Creates a controller that transforms between different color formats
|
|
52
|
+
* @param format - The target color format ('hex', 'rgb', 'hsl')
|
|
53
|
+
* @returns A new controller with format transformation
|
|
54
|
+
*/
|
|
55
|
+
readonly withFormat: (format: "hex" | "rgb" | "hsl") => Controller<string>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Creates a ColorController from a regular Controller<string>
|
|
59
|
+
* @param controller - The base string controller
|
|
60
|
+
* @returns A new ColorController with color-specific functionality
|
|
61
|
+
*/
|
|
62
|
+
export declare function createColorController(controller: Controller<string>): ColorController;
|
|
63
|
+
/**
|
|
64
|
+
* Helper function to create color input options from a ColorController
|
|
65
|
+
* @param controller - The ColorController instance
|
|
66
|
+
* @returns Input options compatible with ColorInput component
|
|
67
|
+
*/
|
|
68
|
+
export declare function colorInputOptionsFromController(controller: ColorController): {
|
|
69
|
+
id: string;
|
|
70
|
+
disabled: Signal<boolean>;
|
|
71
|
+
value: import("@tempots/dom").Computed<string>;
|
|
72
|
+
hasError: Signal<boolean>;
|
|
73
|
+
onChange: (color: string) => void;
|
|
74
|
+
onInput: (color: string) => void;
|
|
75
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Value } from '@tempots/dom';
|
|
2
|
+
import { InputOptions } from './input-options';
|
|
3
|
+
import { Merge } from '@tempots/std';
|
|
4
|
+
export type FileInputOptions = Merge<InputOptions<File[]>, {
|
|
5
|
+
accept?: Value<string>;
|
|
6
|
+
allowMultiple?: Value<boolean>;
|
|
7
|
+
maxFiles?: Value<number>;
|
|
8
|
+
maxFileSize?: Value<number>;
|
|
9
|
+
showFileList?: Value<boolean>;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const FileInput: (options: FileInputOptions) => import("@tempots/dom").Renderable;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export * from './appearance-selector';
|
|
2
2
|
export * from './checkbox-input';
|
|
3
|
+
export * from './color-input';
|
|
3
4
|
export * from './combobox';
|
|
4
5
|
export * from './date-input';
|
|
5
6
|
export * from './date-time-input';
|
|
6
7
|
export * from './editable-text';
|
|
7
8
|
export * from './email-input';
|
|
9
|
+
export * from './file-input';
|
|
8
10
|
export * from './input-container';
|
|
9
11
|
export * from './input-options';
|
|
10
12
|
export * from './input-wrapper';
|
|
@@ -10,6 +10,7 @@ export type CommonInputOptions = {
|
|
|
10
10
|
name?: Value<string>;
|
|
11
11
|
placeholder?: Value<string>;
|
|
12
12
|
id?: Value<string>;
|
|
13
|
+
required?: Value<boolean>;
|
|
13
14
|
};
|
|
14
15
|
export type InputOptions<V> = Merge<CommonInputOptions, {
|
|
15
16
|
value: Value<V>;
|
|
@@ -19,7 +20,7 @@ export type InputOptions<V> = Merge<CommonInputOptions, {
|
|
|
19
20
|
onInput?: (value: V) => void;
|
|
20
21
|
onBlur?: () => void;
|
|
21
22
|
}>;
|
|
22
|
-
export declare const CommonInputAttributes: ({ autocomplete, autofocus, class: cls, disabled, name, placeholder, id, }: CommonInputOptions) => import("@tempots/dom").Renderable<import("@tempots/dom").DOMContext>;
|
|
23
|
+
export declare const CommonInputAttributes: ({ autocomplete, autofocus, class: cls, disabled, name, placeholder, id, required, hasError, }: CommonInputOptions) => import("@tempots/dom").Renderable<import("@tempots/dom").DOMContext>;
|
|
23
24
|
export declare const inputOptionsFromController: <T>(controller: Controller<T>) => {
|
|
24
25
|
id: string;
|
|
25
26
|
disabled: import("@tempots/dom").Signal<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tabs';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { TNode, Value } from '@tempots/dom';
|
|
2
|
+
import { ControlSize } from '../../theme';
|
|
3
|
+
export interface TabItem {
|
|
4
|
+
/** Unique identifier for the tab */
|
|
5
|
+
key: string;
|
|
6
|
+
/** Tab label content */
|
|
7
|
+
label: TNode;
|
|
8
|
+
/** Tab content to display when active */
|
|
9
|
+
content: () => TNode;
|
|
10
|
+
/** Whether the tab is disabled */
|
|
11
|
+
disabled?: Value<boolean>;
|
|
12
|
+
/** ARIA label for accessibility */
|
|
13
|
+
ariaLabel?: Value<string>;
|
|
14
|
+
}
|
|
15
|
+
export type TabsDirection = 'horizontal' | 'vertical';
|
|
16
|
+
export interface TabsOptions {
|
|
17
|
+
/** Array of tab items */
|
|
18
|
+
items: TabItem[];
|
|
19
|
+
/** Currently active tab key */
|
|
20
|
+
value: Value<string>;
|
|
21
|
+
/** Callback when tab changes */
|
|
22
|
+
onChange?: (key: string) => void;
|
|
23
|
+
/** Size of the tabs */
|
|
24
|
+
size?: Value<ControlSize>;
|
|
25
|
+
/** Whether tabs are disabled */
|
|
26
|
+
disabled?: Value<boolean>;
|
|
27
|
+
/** Orientation of the tabs */
|
|
28
|
+
orientation?: Value<TabsDirection>;
|
|
29
|
+
/** Whether to show tab content */
|
|
30
|
+
showContent?: Value<boolean>;
|
|
31
|
+
/** ARIA label for the tab list */
|
|
32
|
+
ariaLabel?: Value<string>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Tabs component that provides tabbed navigation with content panels.
|
|
36
|
+
* Follows WAI-ARIA tabs pattern with proper keyboard navigation and accessibility.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* const activeTab = prop('tab1')
|
|
41
|
+
*
|
|
42
|
+
* Tabs({
|
|
43
|
+
* items: [
|
|
44
|
+
* { key: 'tab1', label: 'First Tab', content: html.div('Content 1') },
|
|
45
|
+
* { key: 'tab2', label: 'Second Tab', content: html.div('Content 2') },
|
|
46
|
+
* ],
|
|
47
|
+
* value: activeTab,
|
|
48
|
+
* onChange: activeTab.set
|
|
49
|
+
* })
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare function Tabs(options: TabsOptions): TNode;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color validation utilities for BeatUI color inputs
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Validates if a string is a valid hex color
|
|
6
|
+
* @param color - The color string to validate
|
|
7
|
+
* @returns true if valid hex color, false otherwise
|
|
8
|
+
*/
|
|
9
|
+
export declare function isValidHexColor(color: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Validates if a string is a valid RGB color
|
|
12
|
+
* @param color - The color string to validate (e.g., "rgb(255, 0, 0)")
|
|
13
|
+
* @returns true if valid RGB color, false otherwise
|
|
14
|
+
*/
|
|
15
|
+
export declare function isValidRgbColor(color: string): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Validates if a string is a valid RGBA color
|
|
18
|
+
* @param color - The color string to validate (e.g., "rgba(255, 0, 0, 0.5)")
|
|
19
|
+
* @returns true if valid RGBA color, false otherwise
|
|
20
|
+
*/
|
|
21
|
+
export declare function isValidRgbaColor(color: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Validates if a string is a valid HSL color
|
|
24
|
+
* @param color - The color string to validate (e.g., "hsl(120, 100%, 50%)")
|
|
25
|
+
* @returns true if valid HSL color, false otherwise
|
|
26
|
+
*/
|
|
27
|
+
export declare function isValidHslColor(color: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Validates if a string is any valid color format
|
|
30
|
+
* @param color - The color string to validate
|
|
31
|
+
* @returns true if valid color in any supported format, false otherwise
|
|
32
|
+
*/
|
|
33
|
+
export declare function isValidColor(color: string): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Normalizes a hex color to always include the # prefix and be 6 characters
|
|
36
|
+
* @param color - The hex color to normalize
|
|
37
|
+
* @returns normalized hex color or null if invalid
|
|
38
|
+
*/
|
|
39
|
+
export declare function normalizeHexColor(color: string): string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Converts RGB values to hex color
|
|
42
|
+
* @param r - Red value (0-255)
|
|
43
|
+
* @param g - Green value (0-255)
|
|
44
|
+
* @param b - Blue value (0-255)
|
|
45
|
+
* @returns hex color string
|
|
46
|
+
*/
|
|
47
|
+
export declare function rgbToHex(r: number, g: number, b: number): string;
|
|
48
|
+
/**
|
|
49
|
+
* Converts hex color to RGB values
|
|
50
|
+
* @param hex - Hex color string (with or without #)
|
|
51
|
+
* @returns RGB values object or null if invalid
|
|
52
|
+
*/
|
|
53
|
+
export declare function hexToRgb(hex: string): {
|
|
54
|
+
r: number;
|
|
55
|
+
g: number;
|
|
56
|
+
b: number;
|
|
57
|
+
} | null;
|
|
58
|
+
/**
|
|
59
|
+
* Gets the contrast ratio between two colors
|
|
60
|
+
* @param color1 - First color (hex format)
|
|
61
|
+
* @param color2 - Second color (hex format)
|
|
62
|
+
* @returns contrast ratio or null if invalid colors
|
|
63
|
+
*/
|
|
64
|
+
export declare function getContrastRatio(color1: string, color2: string): number | null;
|
|
@@ -39,7 +39,10 @@ const e = {
|
|
|
39
39
|
fa: () => "فارسی",
|
|
40
40
|
ur: () => "اردو",
|
|
41
41
|
// input
|
|
42
|
-
emailPlaceholderText: () => "اپنا ای میل داخل کریں"
|
|
42
|
+
emailPlaceholderText: () => "اپنا ای میل داخل کریں",
|
|
43
|
+
// drop zone
|
|
44
|
+
dropZoneInstructions: () => "فائلوں کو یہاں گھسیٹ کر چھوڑیں",
|
|
45
|
+
dropZoneInstructionsWithClick: () => "فائلوں کو یہاں گھسیٹ کر چھوڑیں، یا فائل منتخب کرنے کے لیے Enter یا Space دبائیں"
|
|
43
46
|
};
|
|
44
47
|
export {
|
|
45
48
|
e as default
|
|
@@ -39,7 +39,10 @@ const n = {
|
|
|
39
39
|
fa: () => "Tiếng Ba Tư",
|
|
40
40
|
ur: () => "Tiếng Urdu",
|
|
41
41
|
// input
|
|
42
|
-
emailPlaceholderText: () => "Nhập email của bạn"
|
|
42
|
+
emailPlaceholderText: () => "Nhập email của bạn",
|
|
43
|
+
// drop zone
|
|
44
|
+
dropZoneInstructions: () => "Kéo và thả tệp vào đây",
|
|
45
|
+
dropZoneInstructionsWithClick: () => "Kéo và thả tệp vào đây, hoặc nhấn Enter hoặc Space để mở trình chọn tệp"
|
|
43
46
|
};
|
|
44
47
|
export {
|
|
45
48
|
n as default
|
|
@@ -39,7 +39,10 @@ const e = {
|
|
|
39
39
|
fa: () => "波斯语",
|
|
40
40
|
ur: () => "乌尔都语",
|
|
41
41
|
// input
|
|
42
|
-
emailPlaceholderText: () => "请输入邮箱"
|
|
42
|
+
emailPlaceholderText: () => "请输入邮箱",
|
|
43
|
+
// drop zone
|
|
44
|
+
dropZoneInstructions: () => "将文件拖拽到此处",
|
|
45
|
+
dropZoneInstructionsWithClick: () => "将文件拖拽到此处,或按 Enter 或空格键打开文件选择器"
|
|
43
46
|
};
|
|
44
47
|
export {
|
|
45
48
|
e as default
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tempots/beatui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.umd.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"registry": "https://registry.npmjs.org/"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@tempots/dom": "28.
|
|
57
|
+
"@tempots/dom": "28.4.5",
|
|
58
58
|
"@tempots/std": "0.22.1",
|
|
59
|
-
"@tempots/ui": "6.
|
|
59
|
+
"@tempots/ui": "6.4.1"
|
|
60
60
|
},
|
|
61
61
|
"peerDependenciesMeta": {
|
|
62
62
|
"@tempots/dom": {
|