tekivex-ui 2.5.16 → 3.0.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 +22 -8
- package/dist/charts.cjs +1 -1
- package/dist/charts.js +14 -14
- package/dist/{chunk-B3ph66Zb.js → chunk-BHX35YDv.js} +1 -1
- package/dist/chunk-BpuJ3-K8.js +1 -0
- package/dist/{chunk-Bc16rJT-.js → chunk-C8Wy8P59.js} +1 -1
- package/dist/chunk-CDGrC2Wo.js +3 -0
- package/dist/chunk-D7-yknXg.js +1 -0
- package/dist/chunk-DcVMayoM.js +1 -0
- package/dist/chunk-DdHSYetV.js +1 -0
- package/dist/chunk-VUD-TF9j.js +1 -0
- package/dist/headless.cjs +1 -1
- package/dist/headless.js +1 -1
- package/dist/i18n.cjs +1 -1
- package/dist/i18n.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +22 -3
- package/dist/index.js +514 -419
- package/dist/quantum.cjs +1 -1
- package/dist/quantum.js +17 -17
- package/dist/realtime.cjs +1 -1
- package/dist/realtime.js +1 -1
- package/dist/src/components/TkxAadhaarInput.d.ts +22 -0
- package/dist/src/components/TkxAddressInput.d.ts +32 -0
- package/dist/src/components/TkxCalendarLunar.d.ts +25 -0
- package/dist/src/components/TkxCaptcha.d.ts +23 -0
- package/dist/src/components/TkxCheckout.d.ts +26 -0
- package/dist/src/components/TkxConfetti.d.ts +21 -0
- package/dist/src/components/TkxCurrencyInput.d.ts +20 -0
- package/dist/src/components/TkxFontProvider.d.ts +12 -0
- package/dist/src/components/TkxImageEditor.d.ts +44 -0
- package/dist/src/components/TkxInput.d.ts +1 -0
- package/dist/src/components/TkxKycInputs.d.ts +59 -0
- package/dist/src/components/TkxOTP.d.ts +2 -1
- package/dist/src/components/TkxOrgChart.d.ts +32 -0
- package/dist/src/components/TkxPaymentButton.d.ts +61 -0
- package/dist/src/components/TkxPhoneInput.d.ts +34 -0
- package/dist/src/components/TkxSEO.d.ts +58 -0
- package/dist/src/components/TkxSignaturePad.d.ts +21 -0
- package/dist/src/components/TkxSortable.d.ts +18 -0
- package/dist/src/components/TkxSubscription.d.ts +42 -0
- package/dist/src/components/TkxWatermark.d.ts +8 -1
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/engine/security.d.ts +45 -0
- package/dist/src/i18n/index.d.ts +51 -0
- package/dist/src/themes/index.d.ts +6 -1
- package/dist/tekivex-ui.css +1 -1
- package/package.json +20 -4
- package/dist/chunk-BiHAhNbu.js +0 -3
- package/dist/chunk-CVRuGUFA.js +0 -1
- package/dist/chunk-Dc4_ud5s.js +0 -1
- package/dist/chunk-Dj40UFcz.js +0 -1
- package/dist/chunk-DjxOP8W4.js +0 -1
- package/dist/chunk-PJ50l0JC.js +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type CSSProperties } from 'react';
|
|
2
|
+
export interface PhoneCountry {
|
|
3
|
+
iso2: string;
|
|
4
|
+
name: string;
|
|
5
|
+
dial: string;
|
|
6
|
+
length: number | [number, number];
|
|
7
|
+
format?: string;
|
|
8
|
+
flag: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const COUNTRIES: PhoneCountry[];
|
|
11
|
+
export interface PhoneChangePayload {
|
|
12
|
+
raw: string;
|
|
13
|
+
digits: string;
|
|
14
|
+
e164: string;
|
|
15
|
+
country: PhoneCountry;
|
|
16
|
+
valid: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface TkxPhoneInputProps {
|
|
19
|
+
defaultCountry?: string;
|
|
20
|
+
value?: string;
|
|
21
|
+
defaultValue?: string;
|
|
22
|
+
onChange?: (payload: PhoneChangePayload) => void;
|
|
23
|
+
onValid?: (payload: PhoneChangePayload) => void;
|
|
24
|
+
label?: string;
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
required?: boolean;
|
|
28
|
+
id?: string;
|
|
29
|
+
name?: string;
|
|
30
|
+
extraCountries?: PhoneCountry[];
|
|
31
|
+
className?: string;
|
|
32
|
+
style?: CSSProperties;
|
|
33
|
+
}
|
|
34
|
+
export declare const TkxPhoneInput: import("react").ForwardRefExoticComponent<TkxPhoneInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface TkxSEOProps {
|
|
2
|
+
title?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
canonical?: string;
|
|
5
|
+
keywords?: string;
|
|
6
|
+
image?: string;
|
|
7
|
+
twitterSite?: string;
|
|
8
|
+
twitterCreator?: string;
|
|
9
|
+
ogType?: 'website' | 'article' | 'product' | 'profile';
|
|
10
|
+
locale?: string;
|
|
11
|
+
robots?: string;
|
|
12
|
+
schema?: object | object[];
|
|
13
|
+
}
|
|
14
|
+
export declare function TkxSEO({ title, description, canonical, keywords, image, twitterSite, twitterCreator, ogType, locale, robots, schema, }: TkxSEOProps): null;
|
|
15
|
+
export declare const seoSchema: {
|
|
16
|
+
softwareApplication(data: {
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
url: string;
|
|
20
|
+
version?: string;
|
|
21
|
+
license?: string;
|
|
22
|
+
repository?: string;
|
|
23
|
+
downloadUrl?: string;
|
|
24
|
+
price?: string;
|
|
25
|
+
currency?: string;
|
|
26
|
+
}): object;
|
|
27
|
+
article(data: {
|
|
28
|
+
headline: string;
|
|
29
|
+
description: string;
|
|
30
|
+
url: string;
|
|
31
|
+
image?: string;
|
|
32
|
+
author: string;
|
|
33
|
+
datePublished: string;
|
|
34
|
+
dateModified?: string;
|
|
35
|
+
}): object;
|
|
36
|
+
faqPage(items: Array<{
|
|
37
|
+
question: string;
|
|
38
|
+
answer: string;
|
|
39
|
+
}>): object;
|
|
40
|
+
breadcrumbList(items: Array<{
|
|
41
|
+
name: string;
|
|
42
|
+
url: string;
|
|
43
|
+
}>): object;
|
|
44
|
+
product(data: {
|
|
45
|
+
name: string;
|
|
46
|
+
description: string;
|
|
47
|
+
image: string;
|
|
48
|
+
brand: string;
|
|
49
|
+
sku?: string;
|
|
50
|
+
price: string;
|
|
51
|
+
currency: string;
|
|
52
|
+
availability?: "InStock" | "OutOfStock" | "PreOrder";
|
|
53
|
+
rating?: {
|
|
54
|
+
value: number;
|
|
55
|
+
count: number;
|
|
56
|
+
};
|
|
57
|
+
}): object;
|
|
58
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type CSSProperties } from 'react';
|
|
2
|
+
export interface TkxSignaturePadProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
strokeColor?: string;
|
|
7
|
+
strokeWidth?: number;
|
|
8
|
+
backgroundColor?: string;
|
|
9
|
+
onChange?: (dataUrl: string) => void;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
export interface TkxSignaturePadHandle {
|
|
15
|
+
clear: () => void;
|
|
16
|
+
undo: () => void;
|
|
17
|
+
isEmpty: () => boolean;
|
|
18
|
+
toDataURL: (mimeType?: string, quality?: number) => string;
|
|
19
|
+
toBlob: (mimeType?: string, quality?: number) => Promise<Blob | null>;
|
|
20
|
+
}
|
|
21
|
+
export declare const TkxSignaturePad: import("react").ForwardRefExoticComponent<TkxSignaturePadProps & import("react").RefAttributes<TkxSignaturePadHandle>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactElement, type ReactNode, type Ref } from 'react';
|
|
2
|
+
export interface TkxSortableItem<T = unknown> {
|
|
3
|
+
id: string;
|
|
4
|
+
data: T;
|
|
5
|
+
}
|
|
6
|
+
export interface TkxSortableProps<T = unknown> {
|
|
7
|
+
items: TkxSortableItem<T>[];
|
|
8
|
+
onChange: (next: TkxSortableItem<T>[]) => void;
|
|
9
|
+
renderItem: (item: TkxSortableItem<T>, index: number) => ReactNode;
|
|
10
|
+
orientation?: 'vertical' | 'horizontal';
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
ariaLabel?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const TkxSortable: <T>(props: TkxSortableProps<T> & {
|
|
17
|
+
ref?: Ref<HTMLDivElement>;
|
|
18
|
+
}) => ReactElement;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
export type BillingCycle = 'monthly' | 'annual';
|
|
3
|
+
export interface SubscriptionPlan {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
tagline?: string;
|
|
7
|
+
prices: Record<BillingCycle, number>;
|
|
8
|
+
currency: string;
|
|
9
|
+
locale?: string;
|
|
10
|
+
features: string[];
|
|
11
|
+
highlighted?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
ctaLabel?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface TkxPlanSelectorProps {
|
|
16
|
+
plans: SubscriptionPlan[];
|
|
17
|
+
cycle: BillingCycle;
|
|
18
|
+
selectedId?: string;
|
|
19
|
+
onSelect?: (plan: SubscriptionPlan) => void;
|
|
20
|
+
className?: string;
|
|
21
|
+
style?: CSSProperties;
|
|
22
|
+
}
|
|
23
|
+
export declare const TkxPlanSelector: import("react").ForwardRefExoticComponent<TkxPlanSelectorProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
24
|
+
export interface TkxBillingCycleToggleProps {
|
|
25
|
+
value: BillingCycle;
|
|
26
|
+
onChange: (next: BillingCycle) => void;
|
|
27
|
+
annualSavingsLabel?: string;
|
|
28
|
+
className?: string;
|
|
29
|
+
style?: CSSProperties;
|
|
30
|
+
}
|
|
31
|
+
export declare function TkxBillingCycleToggle({ value, onChange, annualSavingsLabel, className, style, }: TkxBillingCycleToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export interface TkxProrationPreviewProps {
|
|
33
|
+
newPlan: SubscriptionPlan;
|
|
34
|
+
currentPlan: SubscriptionPlan;
|
|
35
|
+
cycle: BillingCycle;
|
|
36
|
+
daysRemaining: number;
|
|
37
|
+
cycleDays: number;
|
|
38
|
+
className?: string;
|
|
39
|
+
style?: CSSProperties;
|
|
40
|
+
children?: ReactNode;
|
|
41
|
+
}
|
|
42
|
+
export declare function TkxProrationPreview({ newPlan, currentPlan, cycle, daysRemaining, cycleDays, className, style, children, }: TkxProrationPreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
+
export type WatermarkPattern = 'tiled' | 'single' | 'fingerprint';
|
|
2
3
|
export interface TkxWatermarkProps {
|
|
3
4
|
text: string | string[];
|
|
4
5
|
children: ReactNode;
|
|
@@ -7,5 +8,11 @@ export interface TkxWatermarkProps {
|
|
|
7
8
|
fontSize?: number;
|
|
8
9
|
color?: string;
|
|
9
10
|
zIndex?: number;
|
|
11
|
+
pattern?: WatermarkPattern;
|
|
12
|
+
dynamic?: boolean;
|
|
13
|
+
refreshMs?: number;
|
|
14
|
+
intensifyOnDevtools?: boolean;
|
|
15
|
+
fingerprintId?: string;
|
|
10
16
|
}
|
|
11
|
-
export declare function
|
|
17
|
+
export declare function useDevtoolsOpen(): boolean;
|
|
18
|
+
export declare function TkxWatermark({ text, children, rotate, gap, fontSize, color, zIndex, pattern, dynamic, refreshMs, intensifyOnDevtools, fingerprintId, }: TkxWatermarkProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -69,6 +69,7 @@ export * from './TkxAffix';
|
|
|
69
69
|
export * from './TkxAnchor';
|
|
70
70
|
export * from './TkxCascader';
|
|
71
71
|
export * from './TkxList';
|
|
72
|
+
export * from './TkxOrgChart';
|
|
72
73
|
export * from './TkxDropdown';
|
|
73
74
|
export * from './TkxAIConfidenceBar';
|
|
74
75
|
export * from './TkxAIChatBubble';
|
|
@@ -41,6 +41,51 @@ export interface AuditFilter {
|
|
|
41
41
|
export declare function audit(action: string, component: string, meta?: Record<string, unknown>): AuditEntry;
|
|
42
42
|
export declare function getAuditLog(filter?: AuditFilter): readonly AuditEntry[];
|
|
43
43
|
export declare function verifyAuditIntegrity(): boolean;
|
|
44
|
+
export declare function sanitizeHref(raw: unknown): string | null;
|
|
45
|
+
export declare function sanitizeHTML(raw: unknown): string;
|
|
46
|
+
export declare function sanitizeCSS(raw: unknown): string;
|
|
47
|
+
export declare function sanitizeJSON<T = unknown>(raw: string): T | null;
|
|
48
|
+
export declare function isSafeAttrName(name: unknown): boolean;
|
|
49
|
+
export declare function sanitizeUnicode(raw: unknown): string;
|
|
50
|
+
export interface TkxCSPOptions {
|
|
51
|
+
allowInlineStyles?: boolean;
|
|
52
|
+
imgHosts?: string[];
|
|
53
|
+
connectHosts?: string[];
|
|
54
|
+
fontHosts?: string[];
|
|
55
|
+
scriptNonce?: string;
|
|
56
|
+
reportOnly?: boolean;
|
|
57
|
+
reportUri?: string;
|
|
58
|
+
}
|
|
59
|
+
export declare function buildTkxCSP(opts?: TkxCSPOptions): string;
|
|
60
|
+
export declare function installTrustedTypes(): void;
|
|
61
|
+
export declare function isFramed(): boolean;
|
|
62
|
+
export declare function installFrameBuster(onDetect?: () => void): void;
|
|
63
|
+
export interface RateLimiter {
|
|
64
|
+
check(): boolean;
|
|
65
|
+
reset(): void;
|
|
66
|
+
}
|
|
67
|
+
export declare function createRateLimiter(n: number, intervalMs: number): RateLimiter;
|
|
68
|
+
export declare function sniffMimeType(file: File): Promise<string | null>;
|
|
69
|
+
export declare function scrubPII(raw: unknown): string;
|
|
70
|
+
export declare function deepFreeze<T>(obj: T): Readonly<T>;
|
|
71
|
+
export declare const SecurityCore: Readonly<{
|
|
72
|
+
sanitizeString: typeof sanitizeString;
|
|
73
|
+
sanitizeHref: typeof sanitizeHref;
|
|
74
|
+
sanitizeHTML: typeof sanitizeHTML;
|
|
75
|
+
sanitizeCSS: typeof sanitizeCSS;
|
|
76
|
+
sanitizeJSON: typeof sanitizeJSON;
|
|
77
|
+
sanitizeUnicode: typeof sanitizeUnicode;
|
|
78
|
+
isSafeAttrName: typeof isSafeAttrName;
|
|
79
|
+
buildTkxCSP: typeof buildTkxCSP;
|
|
80
|
+
installTrustedTypes: typeof installTrustedTypes;
|
|
81
|
+
isFramed: typeof isFramed;
|
|
82
|
+
installFrameBuster: typeof installFrameBuster;
|
|
83
|
+
createRateLimiter: typeof createRateLimiter;
|
|
84
|
+
sniffMimeType: typeof sniffMimeType;
|
|
85
|
+
scrubPII: typeof scrubPII;
|
|
86
|
+
deepFreeze: typeof deepFreeze;
|
|
87
|
+
__brand: "TekiVex SecurityCore v2.6.0 © 007krcs";
|
|
88
|
+
}>;
|
|
44
89
|
export declare const Shield: {
|
|
45
90
|
sanitize: typeof sanitizeString;
|
|
46
91
|
sanitizeProps: typeof sanitizeProps;
|
package/dist/src/i18n/index.d.ts
CHANGED
|
@@ -24,6 +24,41 @@ export interface LocaleStrings {
|
|
|
24
24
|
filterPlaceholder: string;
|
|
25
25
|
exportCsv: string;
|
|
26
26
|
rowsSelected: (n: number) => string;
|
|
27
|
+
firstPage?: string;
|
|
28
|
+
lastPage?: string;
|
|
29
|
+
previousPage?: string;
|
|
30
|
+
nextPage?: string;
|
|
31
|
+
showingRange?: (start: number, end: number, total: number) => string;
|
|
32
|
+
itemsPerPage?: string;
|
|
33
|
+
uploadFiles?: string;
|
|
34
|
+
acceptedFormats?: (formats: string) => string;
|
|
35
|
+
maxFileSize?: (size: string) => string;
|
|
36
|
+
clearDate?: string;
|
|
37
|
+
previousMonth?: string;
|
|
38
|
+
nextMonth?: string;
|
|
39
|
+
yesterday?: string;
|
|
40
|
+
last7Days?: string;
|
|
41
|
+
last30Days?: string;
|
|
42
|
+
thisMonth?: string;
|
|
43
|
+
lastMonth?: string;
|
|
44
|
+
notifications?: string;
|
|
45
|
+
commandSearch?: string;
|
|
46
|
+
noCommandsFound?: string;
|
|
47
|
+
closeDrawer?: string;
|
|
48
|
+
fieldRequired?: string;
|
|
49
|
+
invalidFormat?: string;
|
|
50
|
+
minLength?: (n: number) => string;
|
|
51
|
+
maxLength?: (n: number) => string;
|
|
52
|
+
minValue?: (n: number) => string;
|
|
53
|
+
maxValue?: (n: number) => string;
|
|
54
|
+
noRows?: string;
|
|
55
|
+
resetFilters?: string;
|
|
56
|
+
increment?: string;
|
|
57
|
+
decrement?: string;
|
|
58
|
+
oneTimePassword?: string;
|
|
59
|
+
breadcrumb?: string;
|
|
60
|
+
showHiddenItems?: string;
|
|
61
|
+
richTextContent?: string;
|
|
27
62
|
}
|
|
28
63
|
export declare const enUS: LocaleStrings;
|
|
29
64
|
export declare const esES: LocaleStrings;
|
|
@@ -52,6 +87,14 @@ export declare const thTH: LocaleStrings;
|
|
|
52
87
|
export declare const viVN: LocaleStrings;
|
|
53
88
|
export declare const idID: LocaleStrings;
|
|
54
89
|
export declare const roRO: LocaleStrings;
|
|
90
|
+
export declare const hiIN: LocaleStrings;
|
|
91
|
+
export declare const mrIN: LocaleStrings;
|
|
92
|
+
export declare const bnIN: LocaleStrings;
|
|
93
|
+
export declare const taIN: LocaleStrings;
|
|
94
|
+
export declare const teIN: LocaleStrings;
|
|
95
|
+
export declare const guIN: LocaleStrings;
|
|
96
|
+
export declare const paIN: LocaleStrings;
|
|
97
|
+
export declare const urPK: LocaleStrings;
|
|
55
98
|
export declare const LOCALES: {
|
|
56
99
|
readonly 'en-US': LocaleStrings;
|
|
57
100
|
readonly 'es-ES': LocaleStrings;
|
|
@@ -80,6 +123,14 @@ export declare const LOCALES: {
|
|
|
80
123
|
readonly 'vi-VN': LocaleStrings;
|
|
81
124
|
readonly 'id-ID': LocaleStrings;
|
|
82
125
|
readonly 'ro-RO': LocaleStrings;
|
|
126
|
+
readonly 'hi-IN': LocaleStrings;
|
|
127
|
+
readonly 'mr-IN': LocaleStrings;
|
|
128
|
+
readonly 'bn-IN': LocaleStrings;
|
|
129
|
+
readonly 'ta-IN': LocaleStrings;
|
|
130
|
+
readonly 'te-IN': LocaleStrings;
|
|
131
|
+
readonly 'gu-IN': LocaleStrings;
|
|
132
|
+
readonly 'pa-IN': LocaleStrings;
|
|
133
|
+
readonly 'ur-PK': LocaleStrings;
|
|
83
134
|
};
|
|
84
135
|
export type LocaleCode = keyof typeof LOCALES;
|
|
85
136
|
export declare function isRTL(locale: string): boolean;
|
|
@@ -17,12 +17,17 @@ export declare const quantumDark: ThemeTokens;
|
|
|
17
17
|
export declare const auroraLight: ThemeTokens;
|
|
18
18
|
export declare function createTheme(base: ThemeTokens, overrides?: Partial<ThemeTokens>): ThemeTokens;
|
|
19
19
|
export declare const ThemeContext: import("react").Context<ThemeTokens>;
|
|
20
|
+
export type ColorScheme = 'light' | 'dark' | 'auto';
|
|
20
21
|
export interface ThemeProviderProps {
|
|
21
22
|
theme?: ThemeTokens;
|
|
23
|
+
mode?: ColorScheme;
|
|
24
|
+
lightTheme?: ThemeTokens;
|
|
25
|
+
darkTheme?: ThemeTokens;
|
|
22
26
|
children: ReactNode;
|
|
23
27
|
}
|
|
24
|
-
export declare function ThemeProvider({ theme, children }: ThemeProviderProps): import("react").FunctionComponentElement<import("react").ProviderProps<ThemeTokens>>;
|
|
28
|
+
export declare function ThemeProvider({ theme, mode, lightTheme, darkTheme, children, }: ThemeProviderProps): import("react").FunctionComponentElement<import("react").ProviderProps<ThemeTokens>>;
|
|
25
29
|
export declare function useTheme(): ThemeTokens;
|
|
30
|
+
export declare function usePrefersColorScheme(): 'light' | 'dark';
|
|
26
31
|
export interface ColorPalette {
|
|
27
32
|
50: string;
|
|
28
33
|
100: string;
|
package/dist/tekivex-ui.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
*,:before,:after{box-sizing:border-box}:root{--tkx-bg:#0a0a0f;--tkx-surface:#12121a;--tkx-surfaceAlt:#1a1a2e;--tkx-border:#2a2a3e;--tkx-text:#e8e8f4;--tkx-textMuted:#88a;--tkx-primary:#00f5d4;--tkx-secondary:#7b2ff7;--tkx-danger:#f72585;--tkx-warning:#ffbe0b;--tkx-success:#06d6a0;--tkx-info:#3a86ff;--tkx-space-xs:4px;--tkx-space-sm:8px;--tkx-space-md:16px;--tkx-space-lg:24px;--tkx-space-xl:32px;--tkx-radius-sm:4px;--tkx-radius-md:8px;--tkx-radius-lg:12px;--tkx-radius-full:9999px;--tkx-font-family:system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--tkx-font-mono:"Cascadia Code", "Fira Code", "Consolas", monospace;--tkx-transition:.2s ease;--tkx-transition-fast:.1s ease}.tkx-focus-ring:focus-visible{outline:2px solid var(--tkx-primary);outline-offset:2px;border-radius:2px}:focus:not(:focus-visible){outline:none}.tkx-skip-nav{z-index:9999;background:var(--tkx-primary);color:var(--tkx-bg);transition:top var(--tkx-transition-fast);border-radius:0 0 4px;padding:8px 16px;font-weight:600;text-decoration:none;position:absolute;top:-9999px;left:0}.tkx-skip-nav:focus{outline:2px solid var(--tkx-bg);outline-offset:2px;top:0}.tkx-sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@keyframes tkx-fade-in{0%{opacity:0}to{opacity:1}}@keyframes tkx-slide-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes tkx-pulse{0%,to{opacity:1}50%{opacity:.4}}@keyframes tkx-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes tkx-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@keyframes tkx-ripple{0%{opacity:.6;transform:scale(0)}to{opacity:0;transform:scale(4)}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@media (prefers-contrast:more){:root{--tkx-border:currentColor}.tkx-focus-ring:focus-visible{outline-width:3px}}@media (forced-colors:active){.tkx-button,.tkx-badge,.tkx-toggle,.tkx-input,.tkx-card{forced-color-adjust:none}}
|
|
1
|
+
*,:before,:after{box-sizing:border-box}:root{--tkx-bg:#0a0a0f;--tkx-surface:#12121a;--tkx-surfaceAlt:#1a1a2e;--tkx-border:#2a2a3e;--tkx-text:#e8e8f4;--tkx-textMuted:#88a;--tkx-primary:#00f5d4;--tkx-secondary:#7b2ff7;--tkx-danger:#f72585;--tkx-warning:#ffbe0b;--tkx-success:#06d6a0;--tkx-info:#3a86ff;--tkx-space-xs:4px;--tkx-space-sm:8px;--tkx-space-md:16px;--tkx-space-lg:24px;--tkx-space-xl:32px;--tkx-radius-sm:4px;--tkx-radius-md:8px;--tkx-radius-lg:12px;--tkx-radius-full:9999px;--tkx-font-family:system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--tkx-font-mono:"Cascadia Code", "Fira Code", "Consolas", monospace;--tkx-transition:.2s ease;--tkx-transition-fast:.1s ease}.tkx-focus-ring:focus-visible{outline:2px solid var(--tkx-primary);outline-offset:2px;border-radius:2px}:focus:not(:focus-visible){outline:none}.tkx-skip-nav{z-index:9999;background:var(--tkx-primary);color:var(--tkx-bg);transition:top var(--tkx-transition-fast);border-radius:0 0 4px;padding:8px 16px;font-weight:600;text-decoration:none;position:absolute;top:-9999px;left:0}.tkx-skip-nav:focus{outline:2px solid var(--tkx-bg);outline-offset:2px;top:0}.tkx-sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@keyframes tkx-fade-in{0%{opacity:0}to{opacity:1}}@keyframes tkx-slide-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes tkx-pulse{0%,to{opacity:1}50%{opacity:.4}}@keyframes tkx-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes tkx-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@keyframes tkx-ripple{0%{opacity:.6;transform:scale(0)}to{opacity:0;transform:scale(4)}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@media (prefers-contrast:more){:root{--tkx-border:currentColor}.tkx-focus-ring:focus-visible{outline-width:3px}}@media (forced-colors:active){.tkx-button,.tkx-badge,.tkx-toggle,.tkx-input,.tkx-card{forced-color-adjust:none}}[dir=rtl] .tkx-flip-icon{transform:scaleX(-1)}[dir=rtl] .tkx-drawer-left{inset-inline:auto 0}[dir=rtl] .tkx-drawer-right{inset-inline:0 auto}[dir=rtl] .tkx-pagination-prev svg,[dir=rtl] .tkx-pagination-next svg{transform:scaleX(-1)}
|
|
2
2
|
/*$vite$:1*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tekivex-ui",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Production-grade React component library —
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Production-grade React component library — 94 components, WCAG 2.1 AAA, WAI-ARIA 1.2, built-in charts, headless primitives, zero-runtime CSS engine, 35-locale i18n, Indian KYC pack, TypeScript-first.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -66,7 +66,15 @@
|
|
|
66
66
|
"css:build": "node scripts/css-build.mjs",
|
|
67
67
|
"build:demo": "vite build --config ./demo/vite.config.ts",
|
|
68
68
|
"prepublishOnly": "npm run build",
|
|
69
|
-
"pack:check": "npm pack --dry-run"
|
|
69
|
+
"pack:check": "npm pack --dry-run",
|
|
70
|
+
"metrics:collect": "node scripts/collect-metrics.mjs",
|
|
71
|
+
"figma:build": "node packages/figma-kit/scripts/export-tokens.mjs && node packages/figma-kit/scripts/build-variant-catalog.mjs",
|
|
72
|
+
"verify:zero-deps": "node scripts/verify-zero-deps.mjs",
|
|
73
|
+
"bundle:report": "node scripts/bundle-report.mjs",
|
|
74
|
+
"i18n:audit": "node scripts/i18n-audit.mjs",
|
|
75
|
+
"dev:demo": "vite --config ./demo/vite.config.ts",
|
|
76
|
+
"test:visual": "playwright test",
|
|
77
|
+
"test:bundlers": "node scripts/test-bundlers.mjs"
|
|
70
78
|
},
|
|
71
79
|
"peerDependencies": {
|
|
72
80
|
"react": ">=18.0.0",
|
|
@@ -127,7 +135,15 @@
|
|
|
127
135
|
"animation",
|
|
128
136
|
"tekivex",
|
|
129
137
|
"enterprise",
|
|
130
|
-
"zero-runtime"
|
|
138
|
+
"zero-runtime",
|
|
139
|
+
"react-19",
|
|
140
|
+
"react-server-components",
|
|
141
|
+
"rsc",
|
|
142
|
+
"vite",
|
|
143
|
+
"nextjs",
|
|
144
|
+
"remix",
|
|
145
|
+
"webpack",
|
|
146
|
+
"atomic-css"
|
|
131
147
|
],
|
|
132
148
|
"author": {
|
|
133
149
|
"name": "007krcs",
|
package/dist/chunk-BiHAhNbu.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{f as e}from"./chunk-PJ50l0JC.js";import{a as r,m as t,t as l}from"./chunk-Dj40UFcz.js";import{cloneElement as n,createContext as a,useCallback as s,useContext as i,useEffect as o,useMemo as u,useRef as c,useState as d}from"react";import{Fragment as f,jsx as m,jsxs as h}from"react/jsx-runtime";var x=a(null);async function F(e,r){for(const t of r){if(t.required&&(null==e||""===e||Array.isArray(e)&&0===e.length))return t.message??"This field is required";if(null!=e&&""!==e){if(void 0!==t.min){if("string"==typeof e&&e.length<t.min)return t.message??`Must be at least ${t.min} characters`;if("number"==typeof e&&e<t.min)return t.message??`Must be at least ${t.min}`}if(void 0!==t.max){if("string"==typeof e&&e.length>t.max)return t.message??`Must be no more than ${t.max} characters`;if("number"==typeof e&&e>t.max)return t.message??`Must be no more than ${t.max}`}if(t.pattern&&"string"==typeof e&&!t.pattern.test(e))return t.message??"Invalid format";if(t.validator){const r=await t.validator(e);if(r)return r}}}return null}function p(){const e=i(x),r=c({}),t=c({}),l=c({}),n=u(()=>({getFieldValue:e=>r.current[e],setFieldValue:(e,t)=>{r.current[e]=t},getFieldsValue:()=>({...r.current}),setFieldsValue:e=>{Object.assign(r.current,e)},validateFields:()=>Promise.resolve({...r.current}),validateField:e=>Promise.resolve(!0),resetFields:()=>{r.current={},t.current={},l.current={}},getFieldError:e=>t.current[e]??null,isFieldTouched:e=>l.current[e]??!1}),[]);return e?e.instance:n}function y({onSubmit:t,onValuesChange:n,initialValues:a={},layout:i="vertical",disabled:f=!1,children:h,className:p,style:y,form:v}){const g=e(),[b,w]=d({values:{...a},errors:{},touched:{}}),V=c(a),k=c({}),N=c(b);N.current=b;const T=s((e,r)=>{k.current[e]=r},[]),j=s(e=>{delete k.current[e]},[]),E=s((e,r)=>{w(t=>{const l={...t,values:{...t.values,[e]:r}};return n?.({[e]:r},l.values),l})},[n]),M=s((e,r)=>{w(t=>({...t,errors:{...t.errors,[e]:r}}))},[]),q=s(e=>{w(r=>({...r,touched:{...r.touched,[e]:!0}}))},[]),z=s(async e=>{const r=k.current[e];if(!r)return!0;const t=N.current.values[e],l=await F(t,r.rules);return w(r=>({...r,errors:{...r.errors,[e]:l},touched:{...r.touched,[e]:!0}})),null===l},[]),C=s(async()=>{const e=Object.keys(k.current),r=await Promise.all(e.map(async e=>{const r=k.current[e],t=N.current.values[e];return{name:e,error:await F(t,r.rules)}})),t={},l={};let n=!1;for(const{name:a,error:s}of r)t[a]=s,l[a]=!0,s&&(n=!0);if(w(e=>({...e,errors:{...e.errors,...t},touched:{...e.touched,...l}})),n){const e=Object.fromEntries(r.filter(e=>e.error).map(e=>[e.name,e.error]));return Promise.reject(e)}return{...N.current.values}},[]),P=s(()=>{w({values:{...V.current},errors:{},touched:{}})},[]),$=u(()=>({getFieldValue:e=>N.current.values[e],setFieldValue:E,getFieldsValue:()=>({...N.current.values}),setFieldsValue:e=>{w(r=>{const t={...r.values,...e};return n?.(e,t),{...r,values:t}})},validateFields:C,validateField:z,resetFields:P,getFieldError:e=>N.current.errors[e]??null,isFieldTouched:e=>!!N.current.touched[e]}),[E,C,z,P,n]),O=s(async e=>{e.preventDefault();try{const e=await C();await(t?.(e))}catch{}},[C,t]),R=r("inline"===i?"flex flex-row flex-wrap items-end gap-4":"flex flex-col gap-5");o(()=>{if(!v)return;const e=v;e.getFieldValue=$.getFieldValue,e.setFieldValue=$.setFieldValue,e.getFieldsValue=$.getFieldsValue,e.setFieldsValue=$.setFieldsValue,e.validateFields=$.validateFields,e.validateField=$.validateField,e.resetFields=$.resetFields,e.getFieldError=$.getFieldError,e.isFieldTouched=$.isFieldTouched},[v,$]);const S=v??$,B=u(()=>({state:b,initialValues:V.current,layout:i,disabled:f,fieldMeta:k,setFieldValue:E,setFieldError:M,setFieldTouched:q,registerField:T,unregisterField:j,validateField:z,instance:S}),[b,i,f,E,M,q,T,j,z,S]);/* @__PURE__ */
|
|
2
|
-
return m(x.Provider,{value:B,children:/* @__PURE__ */m("form",{noValidate:!0,role:"form","aria-label":"Form",onSubmit:O,className:l(R,p),style:{color:g.text,...y},children:h})})}function v({name:a,label:o,rules:d,help:F,required:p,children:y,className:v,style:g}){const b=e(),w=function(){const e=i(x);if(!e)throw new Error("TkxFormField must be used inside a <TkxForm>. Wrap your fields in a TkxForm component.");return e}(),{state:V,layout:k,disabled:N}=w,T=u(()=>function(e,r){const t=e?[...e]:[];return r&&!t.some(e=>e.required)&&t.unshift({required:!0,message:"This field is required"}),t}(d,p),[d,p]),j=function(e){return e.some(e=>e.required)}(T),E=c({rules:T});E.current.rules=T;const M=c(!1);M.current||(w.registerField(a,E.current),M.current=!0),u(()=>{w.registerField(a,E.current)},[T,a,w]);const q=V.values[a],z=V.touched[a]?V.errors[a]??null:null,C=z?t(z):null,P=o?t(o):void 0,$=F?t(F):void 0,O=s(e=>{let r;if(null!==e&&"object"==typeof e&&"target"in e){const t=e.target;r="checkbox"===t.type?t.checked:t.value}else r=e;w.setFieldValue(a,r)},[w,a]),R=s(()=>{w.setFieldTouched(a),w.validateField(a)},[w,a]),S=n(y,{value:q??"",onChange:O,onBlur:R,error:C??void 0,isInvalid:!!C,isRequired:j,disabled:N||y.props.disabled,name:a}),B="horizontal"===k,I="inline"===k,Y=/* @__PURE__ */m("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:/* @__PURE__ */m("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),A=P?/* @__PURE__ */h("label",{className:r("text-sm font-medium font-sans",B?"min-w-[140px] pt-2.5":""),style:{color:b.text},children:[P,j&&/* @__PURE__ */m("span",{"aria-hidden":"true",className:r("ml-1"),style:{color:b.danger},children:"*"})]}):null,W=/* @__PURE__ */h(f,{children:[$&&!C&&/* @__PURE__ */m("span",{className:r("text-xs mt-0.5"),style:{color:b.textMuted},children:$}),C&&/* @__PURE__ */h("span",{role:"alert",className:r("text-xs flex items-center gap-1 mt-0.5"),style:{color:b.danger,animation:"tkxFormErrorReveal 200ms ease-out"},children:[Y,C]})]});/* @__PURE__ */
|
|
3
|
-
return h("div",I?{className:l(r("flex flex-col gap-1"),v),style:g,children:[A,S,W]}:B?{className:l(r("flex flex-row gap-4 items-start"),v),style:g,children:[A,/* @__PURE__ */h("div",{className:r("flex flex-col gap-1 flex-1 min-w-0"),children:[S,W]})]}:{className:l(r("flex flex-col gap-1"),v),style:g,children:[A,S,W]})}y.displayName="TkxForm",v.displayName="TkxFormField";var g=!1;!function(){if(g)return;if("undefined"==typeof document)return;g=!0;const e=document.createElement("style");e.setAttribute("data-tkx-form",""),e.textContent="\n @keyframes tkxFormErrorReveal {\n from {\n opacity: 0;\n transform: translateY(-4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n ",document.head.appendChild(e)}();export{v as n,p as r,y as t};
|
package/dist/chunk-CVRuGUFA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require("./chunk-DmRB1Blb.js");const e=require("./chunk-DjxOP8W4.js"),r=require("./chunk-Dc4_ud5s.js");let t=require("react"),l=require("react/jsx-runtime");var n=(0,t.createContext)(null);async function i(e,r){for(const t of r){if(t.required&&(null==e||""===e||Array.isArray(e)&&0===e.length))return t.message??"This field is required";if(null!=e&&""!==e){if(void 0!==t.min){if("string"==typeof e&&e.length<t.min)return t.message??`Must be at least ${t.min} characters`;if("number"==typeof e&&e<t.min)return t.message??`Must be at least ${t.min}`}if(void 0!==t.max){if("string"==typeof e&&e.length>t.max)return t.message??`Must be no more than ${t.max} characters`;if("number"==typeof e&&e>t.max)return t.message??`Must be no more than ${t.max}`}if(t.pattern&&"string"==typeof e&&!t.pattern.test(e))return t.message??"Invalid format";if(t.validator){const r=await t.validator(e);if(r)return r}}}return null}function s(){const e=(0,t.useContext)(n),r=(0,t.useRef)({}),l=(0,t.useRef)({}),i=(0,t.useRef)({}),s=(0,t.useMemo)(()=>({getFieldValue:e=>r.current[e],setFieldValue:(e,t)=>{r.current[e]=t},getFieldsValue:()=>({...r.current}),setFieldsValue:e=>{Object.assign(r.current,e)},validateFields:()=>Promise.resolve({...r.current}),validateField:e=>Promise.resolve(!0),resetFields:()=>{r.current={},l.current={},i.current={}},getFieldError:e=>l.current[e]??null,isFieldTouched:e=>i.current[e]??!1}),[]);return e?e.instance:s}function a({onSubmit:s,onValuesChange:a,initialValues:o={},layout:u="vertical",disabled:c=!1,children:d,className:f,style:m,form:h}){const x=e.useTheme(),[F,v]=(0,t.useState)({values:{...o},errors:{},touched:{}}),y=(0,t.useRef)(o),p=(0,t.useRef)({}),b=(0,t.useRef)(F);b.current=F;const g=(0,t.useCallback)((e,r)=>{p.current[e]=r},[]),k=(0,t.useCallback)(e=>{delete p.current[e]},[]),w=(0,t.useCallback)((e,r)=>{v(t=>{const l={...t,values:{...t.values,[e]:r}};return a?.({[e]:r},l.values),l})},[a]),V=(0,t.useCallback)((e,r)=>{v(t=>({...t,errors:{...t.errors,[e]:r}}))},[]),T=(0,t.useCallback)(e=>{v(r=>({...r,touched:{...r.touched,[e]:!0}}))},[]),j=(0,t.useCallback)(async e=>{const r=p.current[e];if(!r)return!0;const t=b.current.values[e],l=await i(t,r.rules);return v(r=>({...r,errors:{...r.errors,[e]:l},touched:{...r.touched,[e]:!0}})),null===l},[]),N=(0,t.useCallback)(async()=>{const e=Object.keys(p.current),r=await Promise.all(e.map(async e=>{const r=p.current[e],t=b.current.values[e];return{name:e,error:await i(t,r.rules)}})),t={},l={};let n=!1;for(const{name:i,error:s}of r)t[i]=s,l[i]=!0,s&&(n=!0);if(v(e=>({...e,errors:{...e.errors,...t},touched:{...e.touched,...l}})),n){const e=Object.fromEntries(r.filter(e=>e.error).map(e=>[e.name,e.error]));return Promise.reject(e)}return{...b.current.values}},[]),q=(0,t.useCallback)(()=>{v({values:{...y.current},errors:{},touched:{}})},[]),E=(0,t.useMemo)(()=>({getFieldValue:e=>b.current.values[e],setFieldValue:w,getFieldsValue:()=>({...b.current.values}),setFieldsValue:e=>{v(r=>{const t={...r.values,...e};return a?.(e,t),{...r,values:t}})},validateFields:N,validateField:j,resetFields:q,getFieldError:e=>b.current.errors[e]??null,isFieldTouched:e=>!!b.current.touched[e]}),[w,N,j,q,a]),M=(0,t.useCallback)(async e=>{e.preventDefault();try{const e=await N();await(s?.(e))}catch{}},[N,s]),O="inline"===u?r.tkx("flex flex-row flex-wrap items-end gap-4"):r.tkx("flex flex-col gap-5");(0,t.useEffect)(()=>{if(!h)return;const e=h;e.getFieldValue=E.getFieldValue,e.setFieldValue=E.setFieldValue,e.getFieldsValue=E.getFieldsValue,e.setFieldsValue=E.setFieldsValue,e.validateFields=E.validateFields,e.validateField=E.validateField,e.resetFields=E.resetFields,e.getFieldError=E.getFieldError,e.isFieldTouched=E.isFieldTouched},[h,E]);const z=h??E,C=(0,t.useMemo)(()=>({state:F,initialValues:y.current,layout:u,disabled:c,fieldMeta:p,setFieldValue:w,setFieldError:V,setFieldTouched:T,registerField:g,unregisterField:k,validateField:j,instance:z}),[F,u,c,w,V,T,g,k,j,z]);return(0,l.jsx)(n.Provider,{value:C,children:(0,l.jsx)("form",{noValidate:!0,role:"form","aria-label":"Form",onSubmit:M,className:r.cx(O,f),style:{color:x.text,...m},children:d})})}function o({name:i,label:s,rules:a,help:o,required:u,children:c,className:d,style:f}){const m=e.useTheme(),h=function(){const e=(0,t.useContext)(n);if(!e)throw new Error("TkxFormField must be used inside a <TkxForm>. Wrap your fields in a TkxForm component.");return e}(),{state:x,layout:F,disabled:v}=h,y=(0,t.useMemo)(()=>function(e,r){const t=e?[...e]:[];return r&&!t.some(e=>e.required)&&t.unshift({required:!0,message:"This field is required"}),t}(a,u),[a,u]),p=function(e){return e.some(e=>e.required)}(y),b=(0,t.useRef)({rules:y});b.current.rules=y;const g=(0,t.useRef)(!1);g.current||(h.registerField(i,b.current),g.current=!0),(0,t.useMemo)(()=>{h.registerField(i,b.current)},[y,i,h]);const k=x.values[i],w=x.touched[i]?x.errors[i]??null:null,V=w?r.sanitizeString(w):null,T=s?r.sanitizeString(s):void 0,j=o?r.sanitizeString(o):void 0,N=(0,t.useCallback)(e=>{let r;if(null!==e&&"object"==typeof e&&"target"in e){const t=e.target;r="checkbox"===t.type?t.checked:t.value}else r=e;h.setFieldValue(i,r)},[h,i]),q=(0,t.useCallback)(()=>{h.setFieldTouched(i),h.validateField(i)},[h,i]),E=c,M=(0,t.cloneElement)(E,{value:k??"",onChange:N,onBlur:q,error:V??void 0,isInvalid:!!V,isRequired:p,disabled:v||E.props.disabled,name:i}),O="horizontal"===F,z="inline"===F,C=(0,l.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),P=T?(0,l.jsxs)("label",{className:r.tkx("text-sm font-medium font-sans",O?"min-w-[140px] pt-2.5":""),style:{color:m.text},children:[T,p&&(0,l.jsx)("span",{"aria-hidden":"true",className:r.tkx("ml-1"),style:{color:m.danger},children:"*"})]}):null,$=(0,l.jsxs)(l.Fragment,{children:[j&&!V&&(0,l.jsx)("span",{className:r.tkx("text-xs mt-0.5"),style:{color:m.textMuted},children:j}),V&&(0,l.jsxs)("span",{role:"alert",className:r.tkx("text-xs flex items-center gap-1 mt-0.5"),style:{color:m.danger,animation:"tkxFormErrorReveal 200ms ease-out"},children:[C,V]})]});return z?(0,l.jsxs)("div",{className:r.cx(r.tkx("flex flex-col gap-1"),d),style:f,children:[P,M,$]}):O?(0,l.jsxs)("div",{className:r.cx(r.tkx("flex flex-row gap-4 items-start"),d),style:f,children:[P,(0,l.jsxs)("div",{className:r.tkx("flex flex-col gap-1 flex-1 min-w-0"),children:[M,$]})]}):(0,l.jsxs)("div",{className:r.cx(r.tkx("flex flex-col gap-1"),d),style:f,children:[P,M,$]})}a.displayName="TkxForm",o.displayName="TkxFormField";var u=!1;!function(){if(u)return;if("undefined"==typeof document)return;u=!0;const e=document.createElement("style");e.setAttribute("data-tkx-form",""),e.textContent="\n @keyframes tkxFormErrorReveal {\n from {\n opacity: 0;\n transform: translateY(-4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n ",document.head.appendChild(e)}(),Object.defineProperty(exports,"TkxForm",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"TkxFormField",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"useTkxForm",{enumerable:!0,get:function(){return s}});
|
package/dist/chunk-Dc4_ud5s.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./chunk-DjxOP8W4.js");var t={"<":"<",">":">","&":"&","'":"'",'"':""","`":"`"};function r(e){let r=String(e);return r=r.replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g,""),r.replace(/[<>&'"`]/g,e=>t[e]??e)}function n(e){const t={};for(const r of Object.keys(e))t[r]=o(e[r]);return t}function o(e){return"string"==typeof e?r(e):Array.isArray(e)?e.map(o):null===e||"object"!=typeof e||function(e){return"object"==typeof e&&null!==e&&"$$typeof"in e}(e)?e:n(e)}function i(e,t){const r=[];for(const[n,o]of Object.entries(t)){const t=e[n],i=null==t;o.required&&i?r.push(`prop '${n}' is required`):i||(typeof t===o.type?("number"===o.type&&"number"==typeof t&&(void 0!==o.min&&t<o.min&&r.push(`prop '${n}' must be >= ${o.min}`),void 0!==o.max&&t>o.max&&r.push(`prop '${n}' must be <= ${o.max}`)),"string"===o.type&&"string"==typeof t&&o.pattern&&!o.pattern.test(t)&&r.push(`prop '${n}' does not match pattern ${o.pattern}`),o.enum&&!o.enum.includes(t)&&r.push(`prop '${n}' must be one of: ${o.enum.join(", ")}`)):r.push(`prop '${n}' must be of type ${o.type}, got ${typeof t}`))}return{valid:0===r.length,errors:r}}var l=new Map,s=[];function a(t,r,n){const o=e.fnv1aHash(JSON.stringify(n??{})),i=e.fnv1aHash((s.length>0?s[s.length-1].chainHash:"00000000")+o+r+t),l=Object.freeze({timestamp:Date.now(),component:r,action:t,propsHash:o,chainHash:i});return s=Object.freeze([...s,l]),l}function f(e){let t=s;return e?.component&&(t=t.filter(t=>t.component===e.component)),e?.action&&(t=t.filter(t=>t.action===e.action)),e?.limit&&(t=t.slice(-e.limit)),t}function u(){let t="00000000";for(const r of s){if(e.fnv1aHash(t+r.propsHash+r.component+r.action)!==r.chainHash)return!1;t=r.chainHash}return!0}var c={sanitize:r,sanitizeProps:n,validateProps:i,createCSP:function(e,t){const r={componentId:e,permissions:t,directives:{"default-src":["'self'"],"style-src":t.allowInlineStyles?["'self'","'unsafe-inline'"]:["'self'"],"img-src":t.allowDataUrls?["'self'","data:"]:t.allowExternalSrc?["'self'","*"]:["'self'"],"script-src":t.allowScripts?["'self'"]:["'none'"]}};return l.set(e,r),r},hasPermission:function(e,t){return!0===l.get(e)?.permissions[t]},audit:a,getAuditLog:f,verifyAuditIntegrity:u},d={0:"0",px:"1px",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px",auto:"auto",full:"100%",screen:"100vw",svh:"100svh",dvh:"100dvh",fit:"fit-content",max:"max-content",min:"min-content"},p={...d,screen:"100vh"},b={"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","5/6":"83.333333%","1/12":"8.333333%","5/12":"41.666667%","7/12":"58.333333%","11/12":"91.666667%"},m={none:"0",sm:"2px","":"4px",md:"6px",lg:"8px",xl:"12px","2xl":"16px","3xl":"24px",full:"9999px"},x={sm:"0 1px 2px 0 rgba(0,0,0,.05)","":"0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1)",md:"0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1)",lg:"0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1)",xl:"0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1)","2xl":"0 25px 50px -12px rgba(0,0,0,.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,.05)",none:"none"},g={xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},h={thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},w={none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},$={tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},y={none:"0",sm:"4px","":"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},v=Object.fromEntries([0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100].map(e=>[String(e),String(e/100)])),k=new Set(["bg","surface","surfaceAlt","border","text","textMuted","primary","secondary","danger","warning","success","info"]),j={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},z=/javascript\s*:|vbscript\s*:|data\s*:\s*text\/html|data\s*:\s*text\/javascript|expression\s*\(|[\r\n\x00]/i,O=new Set(["behavior","-moz-binding","-webkit-binding","src"]),S=new Set(["width","min-width","max-width","height","min-height","max-height","margin","margin-top","margin-right","margin-bottom","margin-left","padding","padding-top","padding-right","padding-bottom","padding-left","position","top","right","bottom","left","z-index","inset","flex","flex-grow","flex-shrink","flex-basis","flex-direction","flex-wrap","align-items","align-self","align-content","justify-content","justify-items","justify-self","gap","row-gap","column-gap","grid-template-columns","grid-template-rows","grid-column","grid-row","grid-area","grid-template-areas","font-size","font-weight","font-family","font-style","line-height","letter-spacing","text-align","text-decoration","text-transform","text-overflow","white-space","word-break","word-wrap","overflow-wrap","color","background","background-color","background-image","background-position","background-size","background-repeat","opacity","border","border-top","border-right","border-bottom","border-left","border-width","border-style","border-color","border-radius","outline","outline-offset","box-shadow","text-shadow","filter","backdrop-filter","transform","transition","animation","display","overflow","overflow-x","overflow-y","visibility","pointer-events","cursor","user-select","aspect-ratio","object-fit","object-position","list-style","vertical-align","float","clear","resize","scroll-behavior","content"]);function A(e){return z.test(e)||e.includes("}")||e.includes("{")||e.includes("<")||e.includes(">")?null:e}function P(e){const t=e.match(/^\[(.+)]$/);return t?A(t[1]):null}function C(e){return k.has(e)?`var(--tkx-${e})`:"transparent"===e?"transparent":"current"===e?"currentColor":"white"===e?"#ffffff":"black"===e?"#000000":"inherit"===e?"inherit":P(e)||(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e),e)}function q(e){const t=e.match(/^\[([a-zA-Z-]+):(.+)]$/);if(t){const e=function(e){const t=e.toLowerCase().trim();return O.has(t)?null:S.has(t)?t:null}(t[1]),r=A(t[2]);return e&&r?{[e]:r}:null}const r={flex:"flex","inline-flex":"inline-flex",grid:"grid","inline-grid":"inline-grid",block:"block","inline-block":"inline-block",inline:"inline",hidden:"none",contents:"contents","flow-root":"flow-root",table:"table","table-row":"table-row","table-cell":"table-cell","table-caption":"table-caption","list-item":"list-item"};if(r[e])return{display:r[e]};const n={"flex-row":"row","flex-col":"column","flex-row-reverse":"row-reverse","flex-col-reverse":"column-reverse"};if(n[e])return{"flex-direction":n[e]};const o={"flex-wrap":"wrap","flex-nowrap":"nowrap","flex-wrap-reverse":"wrap-reverse"};if(o[e])return{"flex-wrap":o[e]};const i={"flex-1":"1 1 0%","flex-auto":"1 1 auto","flex-none":"none","flex-initial":"0 1 auto"};if(i[e])return{flex:i[e]};if("grow"===e||"flex-grow"===e)return{"flex-grow":"1"};if("grow-0"===e)return{"flex-grow":"0"};if("shrink"===e||"flex-shrink"===e)return{"flex-shrink":"1"};if("shrink-0"===e||"flex-shrink-0"===e)return{"flex-shrink":"0"};const l={"items-start":"flex-start","items-end":"flex-end","items-center":"center","items-stretch":"stretch","items-baseline":"baseline"};if(l[e])return{"align-items":l[e]};const s={"justify-start":"flex-start","justify-end":"flex-end","justify-center":"center","justify-between":"space-between","justify-around":"space-around","justify-evenly":"space-evenly","justify-stretch":"stretch","justify-normal":"normal"};if(s[e])return{"justify-content":s[e]};const a={"self-auto":"auto","self-start":"flex-start","self-end":"flex-end","self-center":"center","self-stretch":"stretch","self-baseline":"baseline"};if(a[e])return{"align-self":a[e]};const f={"content-start":"flex-start","content-end":"flex-end","content-center":"center","content-between":"space-between","content-around":"space-around","content-evenly":"space-evenly","content-stretch":"stretch"};if(f[e])return{"align-content":f[e]};let u;if(u=e.match(/^grid-cols-(\d+|none|subgrid)$/))return{"grid-template-columns":"none"===u[1]?"none":"subgrid"===u[1]?"subgrid":`repeat(${u[1]},minmax(0,1fr))`};if(u=e.match(/^grid-rows-(\d+|none|subgrid)$/))return{"grid-template-rows":"none"===u[1]?"none":"subgrid"===u[1]?"subgrid":`repeat(${u[1]},minmax(0,1fr))`};if(u=e.match(/^col-span-(full|\d+)$/))return{"grid-column":"full"===u[1]?"1 / -1":`span ${u[1]} / span ${u[1]}`};if(u=e.match(/^col-start-(\d+|auto)$/))return{"grid-column-start":u[1]};if(u=e.match(/^col-end-(\d+|auto)$/))return{"grid-column-end":u[1]};if(u=e.match(/^row-span-(full|\d+)$/))return{"grid-row":"full"===u[1]?"1 / -1":`span ${u[1]} / span ${u[1]}`};if(u=e.match(/^row-start-(\d+|auto)$/))return{"grid-row-start":u[1]};if(u=e.match(/^row-end-(\d+|auto)$/))return{"grid-row-end":u[1]};if("grid-flow-row"===e)return{"grid-auto-flow":"row"};if("grid-flow-col"===e)return{"grid-auto-flow":"column"};if("grid-flow-dense"===e)return{"grid-auto-flow":"dense"};if("grid-flow-row-dense"===e)return{"grid-auto-flow":"row dense"};if("grid-flow-col-dense"===e)return{"grid-auto-flow":"column dense"};if(u=e.match(/^p-(.+)$/)){const e=d[u[1]]??P(u[1]);if(e)return{padding:e}}if(u=e.match(/^px-(.+)$/)){const e=d[u[1]]??P(u[1]);if(e)return{"padding-left":e,"padding-right":e}}if(u=e.match(/^py-(.+)$/)){const e=d[u[1]]??P(u[1]);if(e)return{"padding-top":e,"padding-bottom":e}}if(u=e.match(/^pt-(.+)$/)){const e=d[u[1]]??P(u[1]);if(e)return{"padding-top":e}}if(u=e.match(/^pr-(.+)$/)){const e=d[u[1]]??P(u[1]);if(e)return{"padding-right":e}}if(u=e.match(/^pb-(.+)$/)){const e=d[u[1]]??P(u[1]);if(e)return{"padding-bottom":e}}if(u=e.match(/^pl-(.+)$/)){const e=d[u[1]]??P(u[1]);if(e)return{"padding-left":e}}if(u=e.match(/^-?m-(.+)$/)){const t=e.startsWith("-"),r=d[u[1]]??P(u[1]);if(r)return{margin:t&&"0"!==r?`-${r}`:r}}if(u=e.match(/^-?mx-(.+)$/)){const t=e.startsWith("-"),r=d[u[1]]??P(u[1]);if(r){const e=t&&"0"!==r?`-${r}`:r;return{"margin-left":e,"margin-right":e}}}if(u=e.match(/^-?my-(.+)$/)){const t=e.startsWith("-"),r=d[u[1]]??P(u[1]);if(r){const e=t&&"0"!==r?`-${r}`:r;return{"margin-top":e,"margin-bottom":e}}}if(u=e.match(/^-?mt-(.+)$/)){const t=e.startsWith("-"),r=d[u[1]]??P(u[1]);if(r)return{"margin-top":t&&"0"!==r?`-${r}`:r}}if(u=e.match(/^-?mr-(.+)$/)){const t=e.startsWith("-"),r=d[u[1]]??P(u[1]);if(r)return{"margin-right":t&&"0"!==r?`-${r}`:r}}if(u=e.match(/^-?mb-(.+)$/)){const t=e.startsWith("-"),r=d[u[1]]??P(u[1]);if(r)return{"margin-bottom":t&&"0"!==r?`-${r}`:r}}if(u=e.match(/^-?ml-(.+)$/)){const t=e.startsWith("-"),r=d[u[1]]??P(u[1]);if(r)return{"margin-left":t&&"0"!==r?`-${r}`:r}}if("mx-auto"===e)return{"margin-left":"auto","margin-right":"auto"};if("my-auto"===e)return{"margin-top":"auto","margin-bottom":"auto"};if(u=e.match(/^gap-(.+)$/)){const e=d[u[1]]??P(u[1]);if(e)return{gap:e}}if(u=e.match(/^gap-x-(.+)$/)){const e=d[u[1]]??P(u[1]);if(e)return{"column-gap":e}}if(u=e.match(/^gap-y-(.+)$/)){const e=d[u[1]]??P(u[1]);if(e)return{"row-gap":e}}if(u=e.match(/^w-(.+)$/)){const e=u[1],t=d[e]??b[e]??P(e);if(t)return{width:t}}if(u=e.match(/^min-w-(.+)$/)){const e=d[u[1]]??P(u[1]);if(e)return{"min-width":e}}if(u=e.match(/^max-w-(.+)$/)){const e={none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",screen:"100vw",min:"min-content",max:"max-content",fit:"fit-content"}[u[1]]??d[u[1]]??P(u[1]);if(e)return{"max-width":e}}if(u=e.match(/^h-(.+)$/)){const e=u[1],t=p[e]??b[e]??P(e);if(t)return{height:t}}if(u=e.match(/^min-h-(.+)$/)){const e={0:"0",full:"100%",screen:"100vh",svh:"100svh",dvh:"100dvh"}[u[1]]??d[u[1]]??P(u[1]);if(e)return{"min-height":e}}if(u=e.match(/^max-h-(.+)$/)){const e=p[u[1]]??P(u[1]);if(e)return{"max-height":e}}if(u=e.match(/^size-(.+)$/)){const e=d[u[1]]??b[u[1]]??P(u[1]);if(e)return{width:e,height:e}}if(u=e.match(/^text-(xs|sm|base|lg|[2-9]xl|\d+xl)$/)){const[e,t]=g[u[1]]??["1rem","1.5rem"];return{"font-size":e,"line-height":t}}if(u=e.match(/^font-(thin|extralight|light|normal|medium|semibold|bold|extrabold|black|\d+)$/))return{"font-weight":h[u[1]]??u[1]};if(u=e.match(/^leading-(.+)$/)){const e=w[u[1]]??P(u[1]);if(e)return{"line-height":e}}if(u=e.match(/^tracking-(.+)$/)){const e=$[u[1]]??P(u[1]);if(e)return{"letter-spacing":e}}const c={"text-left":"left","text-center":"center","text-right":"right","text-justify":"justify","text-start":"start","text-end":"end"};if(c[e])return{"text-align":c[e]};if("italic"===e)return{"font-style":"italic"};if("not-italic"===e)return{"font-style":"normal"};if("uppercase"===e)return{"text-transform":"uppercase"};if("lowercase"===e)return{"text-transform":"lowercase"};if("capitalize"===e)return{"text-transform":"capitalize"};if("normal-case"===e)return{"text-transform":"none"};if("underline"===e)return{"text-decoration-line":"underline"};if("overline"===e)return{"text-decoration-line":"overline"};if("line-through"===e)return{"text-decoration-line":"line-through"};if("no-underline"===e)return{"text-decoration-line":"none"};if("truncate"===e)return{overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"};if("text-ellipsis"===e)return{"text-overflow":"ellipsis"};if("text-clip"===e)return{"text-overflow":"clip"};if("whitespace-normal"===e)return{"white-space":"normal"};if("whitespace-nowrap"===e)return{"white-space":"nowrap"};if("whitespace-pre"===e)return{"white-space":"pre"};if("whitespace-pre-wrap"===e)return{"white-space":"pre-wrap"};if("whitespace-pre-line"===e)return{"white-space":"pre-line"};if("break-words"===e)return{"overflow-wrap":"break-word"};if("break-all"===e)return{"word-break":"break-all"};if("break-keep"===e)return{"word-break":"keep-all"};if("font-mono"===e)return{"font-family":"var(--tkx-font-mono,monospace)"};if("font-sans"===e)return{"font-family":"var(--tkx-font-family,system-ui,sans-serif)"};if("font-serif"===e)return{"font-family":"ui-serif,Georgia,serif"};if("antialiased"===e)return{"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"};if(u=e.match(/^indent-(.+)$/)){const e=d[u[1]]??P(u[1]);if(e)return{"text-indent":e}}if(u=e.match(/^line-clamp-(\d+)$/))return{overflow:"hidden",display:"-webkit-box","-webkit-line-clamp":u[1],"-webkit-box-orient":"vertical"};if(u=e.match(/^text-(.+)$/)){const[e,t]=u[1].split("/"),r=C(e);if(!["left","center","right","justify","start","end","xs","sm","base","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl","8xl","9xl"].includes(e)){if(t){const e=parseInt(t)/100;return{color:r,opacity:String(e)}}return{color:r}}}if(u=e.match(/^bg-(.+)$/)){const[e,t]=u[1].split("/"),r=C(e);return t?{"background-color":r,opacity:String(parseInt(t)/100)}:"none"===e?{background:"none"}:{"background-color":r}}if(u=e.match(/^border-color-(.+)$/))return{"border-color":C(u[1])};if(u=e.match(/^fill-(.+)$/))return{fill:C(u[1])};if(u=e.match(/^stroke-(.+)$/))return{stroke:C(u[1])};if(u=e.match(/^shadow-color-(.+)$/))return{"--tkx-shadow-color":C(u[1])};if(u=e.match(/^ring-color-(.+)$/))return{"--tkx-ring-color":C(u[1])};if(u=e.match(/^accent-(.+)$/))return{"accent-color":C(u[1])};if(u=e.match(/^caret-(.+)$/))return{"caret-color":C(u[1])};if(u=e.match(/^outline-color-(.+)$/))return{"outline-color":C(u[1])};if("border"===e)return{"border-width":"1px"};if(u=e.match(/^border-(\d+)$/))return{"border-width":`${u[1]}px`};if("border-t"===e)return{"border-top-width":"1px"};if(u=e.match(/^border-t-(\d+)$/))return{"border-top-width":`${u[1]}px`};if("border-r"===e)return{"border-right-width":"1px"};if(u=e.match(/^border-r-(\d+)$/))return{"border-right-width":`${u[1]}px`};if("border-b"===e)return{"border-bottom-width":"1px"};if(u=e.match(/^border-b-(\d+)$/))return{"border-bottom-width":`${u[1]}px`};if("border-l"===e)return{"border-left-width":"1px"};if(u=e.match(/^border-l-(\d+)$/))return{"border-left-width":`${u[1]}px`};if("border-x"===e)return{"border-left-width":"1px","border-right-width":"1px"};if("border-y"===e)return{"border-top-width":"1px","border-bottom-width":"1px"};if("border-none"===e)return{"border-style":"none"};if("border-solid"===e)return{"border-style":"solid"};if("border-dashed"===e)return{"border-style":"dashed"};if("border-dotted"===e)return{"border-style":"dotted"};if("border-double"===e)return{"border-style":"double"};if((u=e.match(/^border-([a-zA-Z].*)$/))&&k.has(u[1]))return{"border-color":`var(--tkx-${u[1]})`};if(u=e.match(/^border-\[(.+)]$/))return{"border-color":u[1]};if("border-0"===e)return{"border-width":"0"};if("rounded"===e)return{"border-radius":m[""]};if(u=e.match(/^rounded-(none|sm|md|lg|xl|2xl|3xl|full|\[.+])$/))return{"border-radius":m[u[1]]??P(u[1])??u[1]};if(u=e.match(/^rounded-(t|r|b|l|tl|tr|br|bl)(?:-(none|sm|md|lg|xl|2xl|3xl|full))?$/)){const e=u[1],t=m[u[2]??""]??m[""];return{t:{"border-top-left-radius":t,"border-top-right-radius":t},r:{"border-top-right-radius":t,"border-bottom-right-radius":t},b:{"border-bottom-left-radius":t,"border-bottom-right-radius":t},l:{"border-top-left-radius":t,"border-bottom-left-radius":t},tl:{"border-top-left-radius":t},tr:{"border-top-right-radius":t},br:{"border-bottom-right-radius":t},bl:{"border-bottom-left-radius":t}}[e]??{}}const j={0:"0",1:"1px",2:"2px",ring:"3px",4:"4px",8:"8px"};if("ring"===e)return{"box-shadow":"0 0 0 3px var(--tkx-ring-color,var(--tkx-primary))"};if((u=e.match(/^ring-(\d+)$/))&&j[u[1]])return{"box-shadow":`0 0 0 ${j[u[1]]} var(--tkx-ring-color,var(--tkx-primary))`};if("ring-inset"===e)return{"--tkx-ring-offset":"inset"};if(u=e.match(/^ring-offset-(\d+)$/))return{"--tkx-ring-offset-width":`${u[1]}px`,"box-shadow":`0 0 0 ${u[1]}px var(--tkx-bg)`};if("shadow"===e)return{"box-shadow":x[""]};if(u=e.match(/^shadow-(sm|md|lg|xl|2xl|inner|none)$/))return{"box-shadow":x[u[1]]};if(u=e.match(/^opacity-(\d+)$/)){const e=v[u[1]];if(void 0!==e)return{opacity:e}}if("bg-none"===e)return{background:"none"};const z={"bg-auto":"auto","bg-cover":"cover","bg-contain":"contain"};if(z[e])return{"background-size":z[e]};const q={"bg-center":"center","bg-top":"top","bg-bottom":"bottom","bg-left":"left","bg-right":"right"};if(q[e])return{"background-position":q[e]};const F={"bg-repeat":"repeat","bg-no-repeat":"no-repeat","bg-repeat-x":"repeat-x","bg-repeat-y":"repeat-y"};if(F[e])return{"background-repeat":F[e]};if("backdrop-blur"===e)return{"backdrop-filter":`blur(${y[""]})`};if(u=e.match(/^backdrop-blur-(none|sm|md|lg|xl|2xl|3xl)$/))return{"backdrop-filter":`blur(${y[u[1]]})`};if("blur"===e)return{filter:`blur(${y[""]})`};if(u=e.match(/^blur-(none|sm|md|lg|xl|2xl|3xl)$/))return{filter:`blur(${y[u[1]]})`};if("grayscale"===e)return{filter:"grayscale(100%)"};if("grayscale-0"===e)return{filter:"grayscale(0)"};if("invert"===e)return{filter:"invert(100%)"};if("invert-0"===e)return{filter:"invert(0)"};const I={static:"static",relative:"relative",absolute:"absolute",fixed:"fixed",sticky:"sticky"};if(I[e])return{position:I[e]};if("inset-0"===e)return{top:"0",right:"0",bottom:"0",left:"0"};if("inset-auto"===e)return{top:"auto",right:"auto",bottom:"auto",left:"auto"};if("inset-full"===e)return{top:"100%",right:"100%",bottom:"100%",left:"100%"};if("inset-x-0"===e)return{left:"0",right:"0"};if("inset-y-0"===e)return{top:"0",bottom:"0"};if(u=e.match(/^-?top-(.+)$/)){const t=e.startsWith("-"),r=d[u[1]]??b[u[1]]??P(u[1]);if(r)return{top:t&&"0"!==r?`-${r}`:r}}if(u=e.match(/^-?right-(.+)$/)){const t=e.startsWith("-"),r=d[u[1]]??b[u[1]]??P(u[1]);if(r)return{right:t&&"0"!==r?`-${r}`:r}}if(u=e.match(/^-?bottom-(.+)$/)){const t=e.startsWith("-"),r=d[u[1]]??b[u[1]]??P(u[1]);if(r)return{bottom:t&&"0"!==r?`-${r}`:r}}if(u=e.match(/^-?left-(.+)$/)){const t=e.startsWith("-"),r=d[u[1]]??b[u[1]]??P(u[1]);if(r)return{left:t&&"0"!==r?`-${r}`:r}}const M={0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",100:"100",1e3:"1000",9e3:"9000",auto:"auto"};if(u=e.match(/^z-(.+)$/)){const e=M[u[1]]??P(u[1]);if(e)return{"z-index":e}}const X={"overflow-auto":"auto","overflow-hidden":"hidden","overflow-visible":"visible","overflow-scroll":"scroll","overflow-clip":"clip"};if(X[e])return{overflow:X[e]};if(u=e.match(/^overflow-(x|y)-(auto|hidden|visible|scroll|clip)$/))return{[`overflow-${u[1]}`]:u[2]};if("scrollbar-hide"===e)return{"-ms-overflow-style":"none","scrollbar-width":"none"};if("visible"===e)return{visibility:"visible"};if("invisible"===e)return{visibility:"hidden"};if("collapse"===e)return{visibility:"collapse"};const Y={"cursor-auto":"auto","cursor-default":"default","cursor-pointer":"pointer","cursor-wait":"wait","cursor-text":"text","cursor-move":"move","cursor-help":"help","cursor-not-allowed":"not-allowed","cursor-none":"none","cursor-grab":"grab","cursor-grabbing":"grabbing","cursor-zoom-in":"zoom-in","cursor-zoom-out":"zoom-out","cursor-crosshair":"crosshair"};if(Y[e])return{cursor:Y[e]};if("select-none"===e)return{"user-select":"none"};if("select-text"===e)return{"user-select":"text"};if("select-all"===e)return{"user-select":"all"};if("select-auto"===e)return{"user-select":"auto"};if("pointer-events-none"===e)return{"pointer-events":"none"};if("pointer-events-auto"===e)return{"pointer-events":"auto"};const B={0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"};if(u=e.match(/^scale-(.+)$/)){const e=B[u[1]]??P(u[1]);if(e)return{transform:`scale(${e})`}}if(u=e.match(/^scale-x-(.+)$/)){const e=B[u[1]]??P(u[1]);if(e)return{transform:`scaleX(${e})`}}if(u=e.match(/^scale-y-(.+)$/)){const e=B[u[1]]??P(u[1]);if(e)return{transform:`scaleY(${e})`}}const L={0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"};if(u=e.match(/^-?rotate-(.+)$/)){const t=e.startsWith("-"),r=L[u[1]]??P(u[1]);if(r)return{transform:t?`rotate(-${r})`:`rotate(${r})`}}if(u=e.match(/^-?translate-x-(.+)$/)){const t=e.startsWith("-"),r=d[u[1]]??b[u[1]]??P(u[1]);if(r)return{transform:`translateX(${t&&"0"!==r?`-${r}`:r})`}}if(u=e.match(/^-?translate-y-(.+)$/)){const t=e.startsWith("-"),r=d[u[1]]??b[u[1]]??P(u[1]);if(r)return{transform:`translateY(${t&&"0"!==r?`-${r}`:r})`}}if(u=e.match(/^-?skew-x-(.+)$/)){const t=e.startsWith("-"),r=P(u[1])??`${u[1]}deg`;return{transform:t?`skewX(-${r})`:`skewX(${r})`}}if(u=e.match(/^-?skew-y-(.+)$/)){const t=e.startsWith("-"),r=P(u[1])??`${u[1]}deg`;return{transform:t?`skewY(-${r})`:`skewY(${r})`}}const Z={"origin-center":"center","origin-top":"top","origin-top-right":"top right","origin-right":"right","origin-bottom-right":"bottom right","origin-bottom":"bottom","origin-bottom-left":"bottom left","origin-left":"left","origin-top-left":"top left"};if(Z[e])return{"transform-origin":Z[e]};const H={transition:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter","transition-all":"all","transition-colors":"color,background-color,border-color,text-decoration-color,fill,stroke","transition-opacity":"opacity","transition-shadow":"box-shadow","transition-transform":"transform","transition-none":"none"};if(H[e])return{"transition-property":H[e],"transition-timing-function":"cubic-bezier(0.4,0,0.2,1)","transition-duration":"150ms"};const D={75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"};if(u=e.match(/^duration-(.+)$/)){const e=D[u[1]]??P(u[1]);if(e)return{"transition-duration":e}}if(u=e.match(/^delay-(.+)$/)){const e=D[u[1]]??P(u[1]);if(e)return{"transition-delay":e}}const E={"ease-linear":"linear","ease-in":"cubic-bezier(0.4,0,1,1)","ease-out":"cubic-bezier(0,0,0.2,1)","ease-in-out":"cubic-bezier(0.4,0,0.2,1)"};if(E[e])return{"transition-timing-function":E[e]};const G={"animate-none":"none","animate-spin":"tkx-spin 1s linear infinite","animate-ping":"tkx-ping 1s cubic-bezier(0,0,0.2,1) infinite","animate-pulse":"tkx-pulse 2s cubic-bezier(0.4,0,0.6,1) infinite","animate-bounce":"tkx-bounce 1s infinite","animate-fade-in":"tkx-fade-in 200ms ease both","animate-slide-up":"tkx-slide-up 200ms ease both","animate-shimmer":"tkx-shimmer 1.5s infinite"};if(G[e])return{animation:G[e]};const J={"object-contain":"contain","object-cover":"cover","object-fill":"fill","object-none":"none","object-scale-down":"scale-down"};return J[e]?{"object-fit":J[e]}:"aspect-square"===e?{"aspect-ratio":"1 / 1"}:"aspect-video"===e?{"aspect-ratio":"16 / 9"}:"aspect-auto"===e?{"aspect-ratio":"auto"}:(u=e.match(/^aspect-\[(.+)]$/))?{"aspect-ratio":u[1]}:"list-none"===e?{"list-style-type":"none"}:"list-disc"===e?{"list-style-type":"disc"}:"list-decimal"===e?{"list-style-type":"decimal"}:"list-inside"===e?{"list-style-position":"inside"}:"list-outside"===e?{"list-style-position":"outside"}:(u=e.match(/^columns-(\d+)$/))?{columns:u[1]}:"resize"===e?{resize:"both"}:"resize-none"===e?{resize:"none"}:"resize-x"===e?{resize:"horizontal"}:"resize-y"===e?{resize:"vertical"}:"sr-only"===e?{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)","white-space":"nowrap",border:"0"}:"not-sr-only"===e?{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",clip:"auto","white-space":"normal"}:"focus-ring"===e?{outline:"2px solid var(--tkx-primary)","outline-offset":"2px","border-radius":"2px"}:"appearance-none"===e?{appearance:"none"}:"outline-none"===e?{outline:"none"}:"outline"===e?{outline:"2px solid currentColor","outline-offset":"2px"}:"float-left"===e?{float:"left"}:"float-right"===e?{float:"right"}:"float-none"===e?{float:"none"}:"clear-both"===e?{clear:"both"}:"isolate"===e?{isolation:"isolate"}:"isolation-auto"===e?{isolation:"auto"}:(u=e.match(/^will-change-(.+)$/))?{"will-change":u[1]}:"touch-manipulation"===e?{"touch-action":"manipulation"}:"touch-none"===e?{"touch-action":"none"}:"touch-pan-x"===e?{"touch-action":"pan-x"}:"touch-pan-y"===e?{"touch-action":"pan-y"}:"scroll-smooth"===e?{"scroll-behavior":"smooth"}:"scroll-auto"===e?{"scroll-behavior":"auto"}:(u=e.match(/^\[(--[a-zA-Z0-9-]+):(.+)]$/))?{[u[1]]:u[2]}:Q(e)||null}function F(e){let t=0,r=-1;for(let n=0;n<e.length;n++)if("["===e[n])t++;else if("]"===e[n])t--;else if(":"===e[n]&&0===t){r=n;break}return-1===r?{variant:null,utility:e}:{variant:e.slice(0,r),utility:e.slice(r+1)}}function I(e,t){for(const[r,n]of Object.entries(t))e[r]=n}function M(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}var X=new Map,Y=null,B=null;function L(){return Y&&Y.isConnected||(Y=document.getElementById("tkx-atomic"))||((Y=document.createElement("style")).id="tkx-atomic",document.head.appendChild(Y)),Y}function Z(e){const t=[];for(const r of e)if(r)if("string"==typeof r)t.push(...r.split(/\s+/).filter(Boolean));else if(Array.isArray(r))t.push(...Z(r));else if("object"==typeof r)for(const[e,n]of Object.entries(r))n&&t.push(e);return t}function H(...t){const r=Z(t);if(0===r.length)return"";const n={base:{},variants:{}};for(const e of r){const{variant:t,utility:r}=F(e),o=q(r);o&&(t?(n.variants[t]||(n.variants[t]={}),I(n.variants[t],o)):I(n.base,o))}const o=[],i=M(n.base),l=e.fnv1aHash([i,...Object.entries(n.variants).map(([e,t])=>`${e}{${M(t)}}`)].join("|")),s=`tkx-${l}`;i&&o.push(`.${s}{${i}}`);for(const[e,a]of Object.entries(n.variants)){const t=M(a);if(t)if(e.startsWith("@")){const r=j[e.slice(1)];r&&o.push(`@media(min-width:${r}){.${s}{${t}}}`)}else if("motion-safe"===e)o.push(`@media(prefers-reduced-motion:no-preference){.${s}{${t}}}`);else if("motion-reduce"===e)o.push(`@media(prefers-reduced-motion:reduce){.${s}{${t}}}`);else if("contrast-more"===e)o.push(`@media(prefers-contrast:more){.${s}{${t}}}`);else if("forced-colors"===e)o.push(`@media(forced-colors:active){.${s}{${t}}}`);else if("dark"===e)o.push(`@media(prefers-color-scheme:dark){.${s}{${t}}}`);else if("print"===e)o.push(`@media print{.${s}{${t}}}`);else if("group-hover"===e)o.push(`.group:hover .${s}{${t}}`);else if("group-focus"===e)o.push(`.group:focus-within .${s}{${t}}`);else if("peer-hover"===e)o.push(`.peer:hover~.${s}{${t}}`);else{const r={hover:":hover",focus:":focus","focus-visible":":focus-visible","focus-within":":focus-within",active:":active",disabled:":disabled",checked:":checked",required:":required",valid:":valid",invalid:":invalid",first:":first-child",last:":last-child",odd:":nth-child(odd)",even:":nth-child(even)","first-of-type":":first-of-type","last-of-type":":last-of-type","only-child":":only-child","only-of-type":":only-of-type",empty:":empty",visited:":visited",target:":target","placeholder-shown":":placeholder-shown","read-only":":read-only",before:"::before",after:"::after",placeholder:"::placeholder",selection:"::selection","file-selector":"::file-selector-button",marker:"::marker"}[e]??`:${e}`;o.push(`.${s}${r}{${t}}`)}}return o.length>0&&function(e,t){if(X.has(e))return;if(X.set(e,t),"undefined"==typeof document)return;const r=function(){if(B)return B;try{const e=new CSSStyleSheet;return document.adoptedStyleSheets=[...document.adoptedStyleSheets,e],B=e,e}catch{return null}}();if(r){const e=function(e){const t=[];let r=0,n=0;for(let o=0;o<e.length;o++)if("{"===e[o])r++;else if("}"===e[o]&&(r--,0===r)){const r=e.slice(n,o+1).trim();r&&t.push(r),n=o+1}return t}(t);for(const t of e)try{r.insertRule(t,r.cssRules.length)}catch{L().textContent+=t+"\n"}}else L().textContent+=t+"\n"}(l,o.join("")),s}var D=H;function E(){return Array.from(X.values()).join("\n")}function G(){X.clear(),Y=null,B&&"undefined"!=typeof document&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(e=>e!==B),B=null)}function J(...e){return e.filter(Boolean).join(" ")}var N=new Map;function R(e){N.set(e.name,e.utilities)}function U(e){N.delete(e)}function K(){return Array.from(N.keys())}function Q(e){for(const t of N.values())if(t[e])return t[e];return null}Object.defineProperty(exports,"Shield",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"audit",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"cx",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"extractAtomicCSS",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"getAuditLog",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"resetAtomicCSS",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"resolvePluginUtility",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"sanitizeProps",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"sanitizeString",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"tkx",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"tkxListPlugins",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"tkxPlugin",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"tkxRemovePlugin",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"tx",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"validateProps",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"verifyAuditIntegrity",{enumerable:!0,get:function(){return u}});
|