@tachui/modifiers 0.8.0-alpha
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/LICENSE +363 -0
- package/README.md +322 -0
- package/dist/allows-hit-testing-DscPrcOw.js +464 -0
- package/dist/allows-hit-testing-DscPrcOw.js.map +1 -0
- package/dist/appearance/background.d.ts +38 -0
- package/dist/appearance/background.d.ts.map +1 -0
- package/dist/appearance/border.d.ts +78 -0
- package/dist/appearance/border.d.ts.map +1 -0
- package/dist/appearance/clip-shape.d.ts +23 -0
- package/dist/appearance/clip-shape.d.ts.map +1 -0
- package/dist/appearance/clipped.d.ts +21 -0
- package/dist/appearance/clipped.d.ts.map +1 -0
- package/dist/appearance/foreground.d.ts +19 -0
- package/dist/appearance/foreground.d.ts.map +1 -0
- package/dist/appearance/index.d.ts +11 -0
- package/dist/appearance/index.d.ts.map +1 -0
- package/dist/appearance/index.js +34 -0
- package/dist/appearance/index.js.map +1 -0
- package/dist/attributes/aria.d.ts +101 -0
- package/dist/attributes/aria.d.ts.map +1 -0
- package/dist/attributes/css-properties.d.ts +229 -0
- package/dist/attributes/css-properties.d.ts.map +1 -0
- package/dist/attributes/html.d.ts +108 -0
- package/dist/attributes/html.d.ts.map +1 -0
- package/dist/attributes/index.d.ts +12 -0
- package/dist/attributes/index.d.ts.map +1 -0
- package/dist/base-CkGf4b9G.js +786 -0
- package/dist/base-CkGf4b9G.js.map +1 -0
- package/dist/base.d.ts +154 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/base.js +842 -0
- package/dist/base.js.map +1 -0
- package/dist/basic/base.d.ts +147 -0
- package/dist/basic/base.d.ts.map +1 -0
- package/dist/basic/index.d.ts +9 -0
- package/dist/basic/index.d.ts.map +1 -0
- package/dist/basic/margin.d.ts +266 -0
- package/dist/basic/margin.d.ts.map +1 -0
- package/dist/basic/margin.js +160 -0
- package/dist/basic/margin.js.map +1 -0
- package/dist/basic/padding.d.ts +258 -0
- package/dist/basic/padding.d.ts.map +1 -0
- package/dist/basic/padding.js +155 -0
- package/dist/basic/padding.js.map +1 -0
- package/dist/basic/size.d.ts +113 -0
- package/dist/basic/size.d.ts.map +1 -0
- package/dist/basic/size.js +78 -0
- package/dist/basic/size.js.map +1 -0
- package/dist/clipped-CCW8gJqJ.js +282 -0
- package/dist/clipped-CCW8gJqJ.js.map +1 -0
- package/dist/css-CJEXRr6H.js +124 -0
- package/dist/css-CJEXRr6H.js.map +1 -0
- package/dist/elements/decorative.d.ts +109 -0
- package/dist/elements/decorative.d.ts.map +1 -0
- package/dist/elements/index.d.ts +6 -0
- package/dist/elements/index.d.ts.map +1 -0
- package/dist/elements/pseudo-elements.d.ts +145 -0
- package/dist/elements/pseudo-elements.d.ts.map +1 -0
- package/dist/font-3qM2Z97N.js +135 -0
- package/dist/font-3qM2Z97N.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +885 -0
- package/dist/index.js.map +1 -0
- package/dist/interaction/allows-hit-testing.d.ts +31 -0
- package/dist/interaction/allows-hit-testing.d.ts.map +1 -0
- package/dist/interaction/focusable.d.ts +33 -0
- package/dist/interaction/focusable.d.ts.map +1 -0
- package/dist/interaction/focused.d.ts +28 -0
- package/dist/interaction/focused.d.ts.map +1 -0
- package/dist/interaction/index.d.ts +11 -0
- package/dist/interaction/index.d.ts.map +1 -0
- package/dist/interaction/index.js +32 -0
- package/dist/interaction/index.js.map +1 -0
- package/dist/interaction/keyboard-shortcut.d.ts +30 -0
- package/dist/interaction/keyboard-shortcut.d.ts.map +1 -0
- package/dist/interaction/on-continuous-hover.d.ts +41 -0
- package/dist/interaction/on-continuous-hover.d.ts.map +1 -0
- package/dist/interaction/on-long-press-gesture.d.ts +26 -0
- package/dist/interaction/on-long-press-gesture.d.ts.map +1 -0
- package/dist/interaction/scroll.d.ts +143 -0
- package/dist/interaction/scroll.d.ts.map +1 -0
- package/dist/layout/aspect-ratio.d.ts +65 -0
- package/dist/layout/aspect-ratio.d.ts.map +1 -0
- package/dist/layout/fixed-size.d.ts +49 -0
- package/dist/layout/fixed-size.d.ts.map +1 -0
- package/dist/layout/flexbox.d.ts +253 -0
- package/dist/layout/flexbox.d.ts.map +1 -0
- package/dist/layout/index.d.ts +19 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.js +30 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/layout/offset.d.ts +44 -0
- package/dist/layout/offset.d.ts.map +1 -0
- package/dist/layout/overlay.d.ts +26 -0
- package/dist/layout/overlay.d.ts.map +1 -0
- package/dist/layout/position.d.ts +55 -0
- package/dist/layout/position.d.ts.map +1 -0
- package/dist/layout/scale-effect.d.ts +51 -0
- package/dist/layout/scale-effect.d.ts.map +1 -0
- package/dist/layout/z-index.d.ts +65 -0
- package/dist/layout/z-index.d.ts.map +1 -0
- package/dist/overlay-DDiSLprp.js +774 -0
- package/dist/overlay-DDiSLprp.js.map +1 -0
- package/dist/responsive/index.d.ts +10 -0
- package/dist/responsive/index.d.ts.map +1 -0
- package/dist/types.d.ts +598 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/typography/font.d.ts +24 -0
- package/dist/typography/font.d.ts.map +1 -0
- package/dist/typography/index.d.ts +9 -0
- package/dist/typography/index.d.ts.map +1 -0
- package/dist/typography/index.js +30 -0
- package/dist/typography/index.js.map +1 -0
- package/dist/typography/text.d.ts +70 -0
- package/dist/typography/text.d.ts.map +1 -0
- package/dist/typography/text.js +129 -0
- package/dist/typography/text.js.map +1 -0
- package/dist/typography/typography.d.ts +52 -0
- package/dist/typography/typography.d.ts.map +1 -0
- package/dist/utility/css.d.ts +86 -0
- package/dist/utility/css.d.ts.map +1 -0
- package/dist/utility/index.d.ts +6 -0
- package/dist/utility/index.d.ts.map +1 -0
- package/dist/utility/index.js +17 -0
- package/dist/utility/index.js.map +1 -0
- package/dist/utility/utility.d.ts +69 -0
- package/dist/utility/utility.d.ts.map +1 -0
- package/package.json +117 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Border Modifiers
|
|
3
|
+
*
|
|
4
|
+
* Comprehensive border styling with radius support
|
|
5
|
+
*/
|
|
6
|
+
import { BaseModifier } from '../basic/base';
|
|
7
|
+
import type { ModifierContext } from '@tachui/core/modifiers/types';
|
|
8
|
+
import type { DOMNode } from '@tachui/core/runtime/types';
|
|
9
|
+
export type BorderStyle = 'none' | 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset';
|
|
10
|
+
export interface BorderSide {
|
|
11
|
+
width?: number | string;
|
|
12
|
+
color?: string;
|
|
13
|
+
style?: BorderStyle;
|
|
14
|
+
}
|
|
15
|
+
export interface BorderOptions {
|
|
16
|
+
top?: BorderSide;
|
|
17
|
+
right?: BorderSide;
|
|
18
|
+
bottom?: BorderSide;
|
|
19
|
+
left?: BorderSide;
|
|
20
|
+
all?: BorderSide;
|
|
21
|
+
leading?: BorderSide;
|
|
22
|
+
trailing?: BorderSide;
|
|
23
|
+
horizontal?: BorderSide;
|
|
24
|
+
vertical?: BorderSide;
|
|
25
|
+
width?: number | string;
|
|
26
|
+
color?: string;
|
|
27
|
+
style?: BorderStyle;
|
|
28
|
+
}
|
|
29
|
+
export declare class BorderModifier extends BaseModifier<BorderOptions> {
|
|
30
|
+
readonly type = "border";
|
|
31
|
+
readonly priority = 40;
|
|
32
|
+
apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
|
|
33
|
+
private computeBorderStyles;
|
|
34
|
+
private resolveBorderSides;
|
|
35
|
+
private applySideBorder;
|
|
36
|
+
private formatBorderWidth;
|
|
37
|
+
}
|
|
38
|
+
export type CornerRadiusValue = number | string;
|
|
39
|
+
export interface CornerRadiusConfig {
|
|
40
|
+
topLeft?: CornerRadiusValue;
|
|
41
|
+
topRight?: CornerRadiusValue;
|
|
42
|
+
bottomLeft?: CornerRadiusValue;
|
|
43
|
+
bottomRight?: CornerRadiusValue;
|
|
44
|
+
topLeading?: CornerRadiusValue;
|
|
45
|
+
topTrailing?: CornerRadiusValue;
|
|
46
|
+
bottomLeading?: CornerRadiusValue;
|
|
47
|
+
bottomTrailing?: CornerRadiusValue;
|
|
48
|
+
top?: CornerRadiusValue;
|
|
49
|
+
bottom?: CornerRadiusValue;
|
|
50
|
+
left?: CornerRadiusValue;
|
|
51
|
+
right?: CornerRadiusValue;
|
|
52
|
+
}
|
|
53
|
+
export interface CornerRadiusOptions {
|
|
54
|
+
radius: number | string | CornerRadiusConfig;
|
|
55
|
+
}
|
|
56
|
+
export declare class CornerRadiusModifier extends BaseModifier<CornerRadiusOptions> {
|
|
57
|
+
readonly type = "cornerRadius";
|
|
58
|
+
readonly priority = 35;
|
|
59
|
+
apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
|
|
60
|
+
private computeCornerRadiusStyles;
|
|
61
|
+
private generateCornerRadiusCSS;
|
|
62
|
+
private cornerToCSSProperty;
|
|
63
|
+
private resolveCornerValues;
|
|
64
|
+
private formatRadius;
|
|
65
|
+
}
|
|
66
|
+
export declare function border(options: BorderOptions): BorderModifier;
|
|
67
|
+
export declare function border(width: number | string, color?: string, style?: BorderStyle): BorderModifier;
|
|
68
|
+
export declare function borderTop(width: number | string, color: string, style?: BorderStyle): BorderModifier;
|
|
69
|
+
export declare function borderRight(width: number | string, color: string, style?: BorderStyle): BorderModifier;
|
|
70
|
+
export declare function borderBottom(width: number | string, color: string, style?: BorderStyle): BorderModifier;
|
|
71
|
+
export declare function borderLeft(width: number | string, color: string, style?: BorderStyle): BorderModifier;
|
|
72
|
+
export declare function borderLeading(width: number | string, color: string, style?: BorderStyle): BorderModifier;
|
|
73
|
+
export declare function borderTrailing(width: number | string, color: string, style?: BorderStyle): BorderModifier;
|
|
74
|
+
export declare function borderHorizontal(width: number | string, color: string, style?: BorderStyle): BorderModifier;
|
|
75
|
+
export declare function borderVertical(width: number | string, color: string, style?: BorderStyle): BorderModifier;
|
|
76
|
+
export declare function cornerRadius(value: number | string): CornerRadiusModifier;
|
|
77
|
+
export declare function cornerRadius(config: CornerRadiusConfig): CornerRadiusModifier;
|
|
78
|
+
//# sourceMappingURL=border.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"border.d.ts","sourceRoot":"","sources":["../../src/appearance/border.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,OAAO,GACP,QAAQ,CAAA;AAEZ,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,WAAW,CAAA;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,UAAU,CAAA;IAChB,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,GAAG,CAAC,EAAE,UAAU,CAAA;IAEhB,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,QAAQ,CAAC,EAAE,UAAU,CAAA;IACrB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,QAAQ,CAAC,EAAE,UAAU,CAAA;IAErB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,WAAW,CAAA;CACpB;AAED,qBAAa,cAAe,SAAQ,YAAY,CAAC,aAAa,C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,CAAC,EAAE,WAAW,GAClB,cAAc,CAEhB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,oBAAoB,CAAA;AAC1E,wBAAgB,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clip Shape Modifier
|
|
3
|
+
*
|
|
4
|
+
* SwiftUI-inspired modifier for clipping content to various shapes
|
|
5
|
+
*/
|
|
6
|
+
import { BaseModifier } from '../basic/base';
|
|
7
|
+
import type { ModifierContext } from '@tachui/core/modifiers/types';
|
|
8
|
+
import type { DOMNode } from '@tachui/core/runtime/types';
|
|
9
|
+
export interface ClipShapeOptions {
|
|
10
|
+
shape: 'circle' | 'ellipse' | 'rect' | 'polygon';
|
|
11
|
+
parameters?: Record<string, any>;
|
|
12
|
+
}
|
|
13
|
+
export declare class ClipShapeModifier extends BaseModifier<ClipShapeOptions> {
|
|
14
|
+
readonly type = "clip-shape";
|
|
15
|
+
readonly priority = 90;
|
|
16
|
+
apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
|
|
17
|
+
private generateClipPath;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Creates a clip shape modifier that clips content to the specified shape
|
|
21
|
+
*/
|
|
22
|
+
export declare function clipShape(shape: 'circle' | 'ellipse' | 'rect' | 'polygon', parameters?: Record<string, any>): ClipShapeModifier;
|
|
23
|
+
//# sourceMappingURL=clip-shape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clip-shape.d.ts","sourceRoot":"","sources":["../../src/appearance/clip-shape.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAA;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CACjC;AAED,qBAAa,iBAAkB,SAAQ,YAAY,CAAC,gBAAgB,CAAC;IACnE,QAAQ,CAAC,IAAI,gBAAe;IAC5B,QAAQ,CAAC,QAAQ,MAAK;IAEtB,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS;IAepE,OAAO,CAAC,gBAAgB;CA6BzB;AAED;;GAEG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,EAChD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC/B,iBAAiB,CAEnB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clipped Modifier
|
|
3
|
+
*
|
|
4
|
+
* SwiftUI-inspired modifier for clipping content to its bounds
|
|
5
|
+
*/
|
|
6
|
+
import { BaseModifier } from '../basic/base';
|
|
7
|
+
import type { ModifierContext } from '@tachui/core/modifiers/types';
|
|
8
|
+
import type { DOMNode } from '@tachui/core/runtime/types';
|
|
9
|
+
export interface ClippedOptions {
|
|
10
|
+
clipped: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare class ClippedModifier extends BaseModifier<ClippedOptions> {
|
|
13
|
+
readonly type = "clipped";
|
|
14
|
+
readonly priority = 89;
|
|
15
|
+
apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Creates a clipped modifier that clips content to its bounds
|
|
19
|
+
*/
|
|
20
|
+
export declare function clipped(enabled?: boolean): ClippedModifier;
|
|
21
|
+
//# sourceMappingURL=clipped.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipped.d.ts","sourceRoot":"","sources":["../../src/appearance/clipped.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,qBAAa,eAAgB,SAAQ,YAAY,CAAC,cAAc,CAAC;IAC/D,QAAQ,CAAC,IAAI,aAAY;IACzB,QAAQ,CAAC,QAAQ,MAAK;IAEtB,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS;CAerE;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,OAAO,UAAO,GAAG,eAAe,CAEvD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Foreground Modifiers
|
|
3
|
+
*
|
|
4
|
+
* Text color and foreground styling modifiers
|
|
5
|
+
*/
|
|
6
|
+
import { BaseModifier } from '../basic/base';
|
|
7
|
+
import type { ModifierContext } from '@tachui/core/modifiers/types';
|
|
8
|
+
import type { DOMNode } from '@tachui/core/runtime/types';
|
|
9
|
+
export interface ForegroundOptions {
|
|
10
|
+
color: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class ForegroundModifier extends BaseModifier<ForegroundOptions> {
|
|
13
|
+
readonly type = "foreground";
|
|
14
|
+
readonly priority = 90;
|
|
15
|
+
apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
|
|
16
|
+
}
|
|
17
|
+
export declare function foregroundColor(color: string): ForegroundModifier;
|
|
18
|
+
export declare function foreground(color: string): ForegroundModifier;
|
|
19
|
+
//# sourceMappingURL=foreground.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foreground.d.ts","sourceRoot":"","sources":["../../src/appearance/foreground.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAA;CACd;AAED,qBAAa,kBAAmB,SAAQ,YAAY,CAAC,iBAAiB,CAAC;IACrE,QAAQ,CAAC,IAAI,gBAAe;IAC5B,QAAQ,CAAC,QAAQ,MAAK;IAEtB,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS;CAQrE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,CAEjE;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,CAE5D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Appearance Modifiers
|
|
3
|
+
*
|
|
4
|
+
* Visual styling modifiers for colors, backgrounds, borders, and foreground
|
|
5
|
+
*/
|
|
6
|
+
export * from './background';
|
|
7
|
+
export * from './border';
|
|
8
|
+
export * from './foreground';
|
|
9
|
+
export * from './clip-shape';
|
|
10
|
+
export * from './clipped';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/appearance/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,cAAc,CAAA;AAG5B,cAAc,UAAU,CAAA;AAGxB,cAAc,cAAc,CAAA;AAG5B,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { a as e, B as o, h as d, x as i, z as s, C as n, F as t, c as b, d as g, b as l, e as p, i as u, l as f, q as c, n as x, m as C, k as T, j as M, p as k, t as B, y as G, A as h, u as m, w as R, v as w, f as z, g as F, o as L, r as S, s as j } from "../clipped-CCW8gJqJ.js";
|
|
2
|
+
export {
|
|
3
|
+
e as BackgroundClipModifier,
|
|
4
|
+
o as BackgroundModifier,
|
|
5
|
+
d as BorderModifier,
|
|
6
|
+
i as ClipShapeModifier,
|
|
7
|
+
s as ClippedModifier,
|
|
8
|
+
n as CornerRadiusModifier,
|
|
9
|
+
t as ForegroundModifier,
|
|
10
|
+
b as background,
|
|
11
|
+
g as backgroundClip,
|
|
12
|
+
l as backgroundColor,
|
|
13
|
+
p as blueGradientText,
|
|
14
|
+
u as border,
|
|
15
|
+
f as borderBottom,
|
|
16
|
+
c as borderHorizontal,
|
|
17
|
+
x as borderLeading,
|
|
18
|
+
C as borderLeft,
|
|
19
|
+
T as borderRight,
|
|
20
|
+
M as borderTop,
|
|
21
|
+
k as borderTrailing,
|
|
22
|
+
B as borderVertical,
|
|
23
|
+
G as clipShape,
|
|
24
|
+
h as clipped,
|
|
25
|
+
m as cornerRadius,
|
|
26
|
+
R as foreground,
|
|
27
|
+
w as foregroundColor,
|
|
28
|
+
z as goldGradientText,
|
|
29
|
+
F as gradientText,
|
|
30
|
+
L as oceanGradientText,
|
|
31
|
+
S as rainbowGradientText,
|
|
32
|
+
j as sunsetGradientText
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ARIA Attributes Modifier - Best-in-class accessibility attribute management
|
|
3
|
+
*
|
|
4
|
+
* Comprehensive ARIA (Accessible Rich Internet Applications) attributes with
|
|
5
|
+
* full type safety, validation, and development warnings for accessibility compliance.
|
|
6
|
+
*/
|
|
7
|
+
import type { DOMNode } from '@tachui/core/runtime/types';
|
|
8
|
+
import { BaseModifier } from '../basic/base';
|
|
9
|
+
import type { ModifierContext, ReactiveModifierProps } from '@tachui/core/modifiers/types';
|
|
10
|
+
export interface AriaAttributes {
|
|
11
|
+
label?: string;
|
|
12
|
+
labelledby?: string;
|
|
13
|
+
labeledby?: string;
|
|
14
|
+
describedby?: string;
|
|
15
|
+
expanded?: boolean;
|
|
16
|
+
hidden?: boolean;
|
|
17
|
+
live?: 'off' | 'polite' | 'assertive';
|
|
18
|
+
atomic?: boolean;
|
|
19
|
+
busy?: boolean;
|
|
20
|
+
controls?: string;
|
|
21
|
+
current?: boolean | 'page' | 'step' | 'location' | 'date' | 'time';
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
grabbed?: boolean | 'true' | 'false';
|
|
24
|
+
haspopup?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
25
|
+
invalid?: boolean | 'false' | 'true' | 'grammar' | 'spelling';
|
|
26
|
+
level?: number;
|
|
27
|
+
multiline?: boolean;
|
|
28
|
+
multiselectable?: boolean;
|
|
29
|
+
orientation?: 'horizontal' | 'vertical';
|
|
30
|
+
owns?: string;
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
posinset?: number;
|
|
33
|
+
pressed?: boolean | 'true' | 'false' | 'mixed';
|
|
34
|
+
readonly?: boolean;
|
|
35
|
+
relevant?: 'additions' | 'removals' | 'text' | 'all' | string;
|
|
36
|
+
required?: boolean;
|
|
37
|
+
selected?: boolean;
|
|
38
|
+
setsize?: number;
|
|
39
|
+
sort?: 'none' | 'ascending' | 'descending' | 'other';
|
|
40
|
+
valuemax?: number;
|
|
41
|
+
valuemin?: number;
|
|
42
|
+
valuenow?: number;
|
|
43
|
+
valuetext?: string;
|
|
44
|
+
role?: string;
|
|
45
|
+
[key: string]: string | number | boolean | undefined;
|
|
46
|
+
}
|
|
47
|
+
export interface AriaOptions {
|
|
48
|
+
aria: AriaAttributes;
|
|
49
|
+
}
|
|
50
|
+
export type ReactiveAriaOptions = ReactiveModifierProps<AriaOptions>;
|
|
51
|
+
export declare class AriaModifier extends BaseModifier<AriaOptions> {
|
|
52
|
+
readonly type = "aria";
|
|
53
|
+
readonly priority = 90;
|
|
54
|
+
private static readonly KNOWN_ATTRIBUTES;
|
|
55
|
+
constructor(options: ReactiveAriaOptions);
|
|
56
|
+
apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
|
|
57
|
+
private formatAriaAttributeName;
|
|
58
|
+
private formatAriaAttributeValue;
|
|
59
|
+
private validateAriaAttributes;
|
|
60
|
+
private validateSpecificAriaAttribute;
|
|
61
|
+
private suggestCorrection;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* ARIA attributes modifier for accessibility compliance
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```typescript
|
|
68
|
+
* import { aria } from '@tachui/modifiers'
|
|
69
|
+
*
|
|
70
|
+
* // Basic accessibility attributes
|
|
71
|
+
* element.apply(aria({
|
|
72
|
+
* label: 'Close dialog',
|
|
73
|
+
* role: 'button',
|
|
74
|
+
* expanded: false
|
|
75
|
+
* }))
|
|
76
|
+
*
|
|
77
|
+
* // Form accessibility
|
|
78
|
+
* element.apply(aria({
|
|
79
|
+
* required: true,
|
|
80
|
+
* invalid: false,
|
|
81
|
+
* describedby: 'error-message'
|
|
82
|
+
* }))
|
|
83
|
+
*
|
|
84
|
+
* // Complex widget accessibility
|
|
85
|
+
* element.apply(aria({
|
|
86
|
+
* role: 'tab',
|
|
87
|
+
* selected: true,
|
|
88
|
+
* controls: 'panel-1',
|
|
89
|
+
* labelledby: 'tab-label-1'
|
|
90
|
+
* }))
|
|
91
|
+
*
|
|
92
|
+
* // Live region for dynamic content
|
|
93
|
+
* element.apply(aria({
|
|
94
|
+
* live: 'polite',
|
|
95
|
+
* atomic: true,
|
|
96
|
+
* relevant: 'additions text'
|
|
97
|
+
* }))
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
export declare function aria(attributes: AriaAttributes): AriaModifier;
|
|
101
|
+
//# sourceMappingURL=aria.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aria.d.ts","sourceRoot":"","sources":["../../src/attributes/aria.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,8BAA8B,CAAA;AAMrC,MAAM,WAAW,cAAc;IAE7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,WAAW,CAAA;IACrC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAA;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAA;IACpC,QAAQ,CAAC,EACL,OAAO,GACP,OAAO,GACP,MAAM,GACN,MAAM,GACN,SAAS,GACT,MAAM,GACN,MAAM,GACN,QAAQ,CAAA;IACZ,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,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;gBAEU,OAAO,EAAE,mBAAmB;IAIxC,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS;IAyBpE,OAAO,CAAC,uBAAuB;IAgB/B,OAAO,CAAC,wBAAwB;IAQhC,OAAO,CAAC,sBAAsB;IA0B9B,OAAO,CAAC,6BAA6B;IA8FrC,OAAO,CAAC,iBAAiB;CAuB1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,IAAI,CAAC,UAAU,EAAE,cAAc,GAAG,YAAY,CAE7D"}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS Custom Properties Modifier - Best-in-class CSS variable management
|
|
3
|
+
*
|
|
4
|
+
* Comprehensive CSS custom properties (CSS variables) with full type safety,
|
|
5
|
+
* scoping control, theme integration, and design system token support.
|
|
6
|
+
*/
|
|
7
|
+
import type { DOMNode } from '@tachui/core/runtime/types';
|
|
8
|
+
import { BaseModifier } from '../basic/base';
|
|
9
|
+
import type { ModifierContext, ReactiveModifierProps } from '@tachui/core/modifiers/types';
|
|
10
|
+
export type CSSPropertyValue = string | number;
|
|
11
|
+
export type CSSPropertiesMap = Record<string, CSSPropertyValue>;
|
|
12
|
+
export interface CustomPropertiesOptions {
|
|
13
|
+
properties: CSSPropertiesMap;
|
|
14
|
+
scope?: 'local' | 'global' | 'root';
|
|
15
|
+
}
|
|
16
|
+
export type ReactiveCustomPropertiesOptions = ReactiveModifierProps<CustomPropertiesOptions>;
|
|
17
|
+
export declare class CustomPropertiesModifier extends BaseModifier<CustomPropertiesOptions> {
|
|
18
|
+
readonly type = "customProperties";
|
|
19
|
+
readonly priority = 5;
|
|
20
|
+
constructor(options: ReactiveCustomPropertiesOptions);
|
|
21
|
+
apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
|
|
22
|
+
private computeCustomPropertyStyles;
|
|
23
|
+
private formatPropertyValue;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* CSS custom properties modifier for creating CSS variables
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* import { customProperties } from '@tachui/modifiers'
|
|
31
|
+
*
|
|
32
|
+
* // Local CSS variables
|
|
33
|
+
* element.apply(customProperties({
|
|
34
|
+
* properties: {
|
|
35
|
+
* 'primary-color': '#007AFF',
|
|
36
|
+
* 'font-size': 16,
|
|
37
|
+
* '--custom-spacing': '1rem' // Already prefixed
|
|
38
|
+
* },
|
|
39
|
+
* scope: 'local'
|
|
40
|
+
* }))
|
|
41
|
+
*
|
|
42
|
+
* // Global CSS variables
|
|
43
|
+
* element.apply(customProperties({
|
|
44
|
+
* properties: {
|
|
45
|
+
* 'app-background': '#ffffff',
|
|
46
|
+
* 'app-foreground': '#000000'
|
|
47
|
+
* },
|
|
48
|
+
* scope: 'global'
|
|
49
|
+
* }))
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare function customProperties(options: CustomPropertiesOptions): CustomPropertiesModifier;
|
|
53
|
+
/**
|
|
54
|
+
* Single CSS custom property modifier for individual variables
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* import { customProperty } from '@tachui/modifiers'
|
|
59
|
+
*
|
|
60
|
+
* // Single CSS variable
|
|
61
|
+
* element.apply(customProperty('primary-color', '#007AFF'))
|
|
62
|
+
*
|
|
63
|
+
* // Already prefixed variable
|
|
64
|
+
* element.apply(customProperty('--font-size', 16))
|
|
65
|
+
*
|
|
66
|
+
* // Global scope
|
|
67
|
+
* element.apply(customProperty('theme-background', '#f0f0f0', 'global'))
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export declare function customProperty(name: string, value: CSSPropertyValue, scope?: 'local' | 'global' | 'root'): CustomPropertiesModifier;
|
|
71
|
+
/**
|
|
72
|
+
* CSS variables modifier - convenient alias for customProperties
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* import { cssVariables } from '@tachui/modifiers'
|
|
77
|
+
*
|
|
78
|
+
* // Multiple CSS variables
|
|
79
|
+
* element.apply(cssVariables({
|
|
80
|
+
* 'primary': '#007AFF',
|
|
81
|
+
* 'secondary': '#34C759',
|
|
82
|
+
* 'spacing': 16,
|
|
83
|
+
* 'border-radius': '8px'
|
|
84
|
+
* }))
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
export declare function cssVariables(variables: CSSPropertiesMap): CustomPropertiesModifier;
|
|
88
|
+
export interface ThemeColorPalette {
|
|
89
|
+
primary?: string;
|
|
90
|
+
secondary?: string;
|
|
91
|
+
accent?: string;
|
|
92
|
+
background?: string;
|
|
93
|
+
surface?: string;
|
|
94
|
+
text?: string;
|
|
95
|
+
textSecondary?: string;
|
|
96
|
+
border?: string;
|
|
97
|
+
error?: string;
|
|
98
|
+
warning?: string;
|
|
99
|
+
success?: string;
|
|
100
|
+
info?: string;
|
|
101
|
+
[key: string]: string | undefined;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Theme colors as CSS custom properties with semantic naming
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```typescript
|
|
108
|
+
* import { themeColors } from '@tachui/modifiers'
|
|
109
|
+
*
|
|
110
|
+
* // Semantic theme colors
|
|
111
|
+
* element.apply(themeColors({
|
|
112
|
+
* primary: '#007AFF',
|
|
113
|
+
* secondary: '#34C759',
|
|
114
|
+
* accent: '#FF9500',
|
|
115
|
+
* background: '#FFFFFF',
|
|
116
|
+
* surface: '#F2F2F7',
|
|
117
|
+
* text: '#000000',
|
|
118
|
+
* textSecondary: '#6D6D80',
|
|
119
|
+
* border: '#D1D1D6',
|
|
120
|
+
* error: '#FF3B30',
|
|
121
|
+
* warning: '#FF9500',
|
|
122
|
+
* success: '#34C759',
|
|
123
|
+
* info: '#007AFF'
|
|
124
|
+
* }))
|
|
125
|
+
*
|
|
126
|
+
* // Custom theme colors
|
|
127
|
+
* element.apply(themeColors({
|
|
128
|
+
* brandPrimary: '#6366F1',
|
|
129
|
+
* brandSecondary: '#EC4899',
|
|
130
|
+
* neutralLight: '#F8FAFC',
|
|
131
|
+
* neutralDark: '#0F172A'
|
|
132
|
+
* }))
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
export declare function themeColors(colors: ThemeColorPalette): CustomPropertiesModifier;
|
|
136
|
+
export interface DesignTokens {
|
|
137
|
+
'spacing-xs'?: number | string;
|
|
138
|
+
'spacing-sm'?: number | string;
|
|
139
|
+
'spacing-md'?: number | string;
|
|
140
|
+
'spacing-lg'?: number | string;
|
|
141
|
+
'spacing-xl'?: number | string;
|
|
142
|
+
'spacing-2xl'?: number | string;
|
|
143
|
+
'font-size-xs'?: number | string;
|
|
144
|
+
'font-size-sm'?: number | string;
|
|
145
|
+
'font-size-base'?: number | string;
|
|
146
|
+
'font-size-lg'?: number | string;
|
|
147
|
+
'font-size-xl'?: number | string;
|
|
148
|
+
'font-size-2xl'?: number | string;
|
|
149
|
+
'font-size-3xl'?: number | string;
|
|
150
|
+
'font-weight-light'?: number;
|
|
151
|
+
'font-weight-normal'?: number;
|
|
152
|
+
'font-weight-medium'?: number;
|
|
153
|
+
'font-weight-semibold'?: number;
|
|
154
|
+
'font-weight-bold'?: number;
|
|
155
|
+
'line-height-tight'?: number | string;
|
|
156
|
+
'line-height-normal'?: number | string;
|
|
157
|
+
'line-height-relaxed'?: number | string;
|
|
158
|
+
'line-height-loose'?: number | string;
|
|
159
|
+
'radius-none'?: number | string;
|
|
160
|
+
'radius-sm'?: number | string;
|
|
161
|
+
'radius-md'?: number | string;
|
|
162
|
+
'radius-lg'?: number | string;
|
|
163
|
+
'radius-full'?: string;
|
|
164
|
+
'shadow-sm'?: string;
|
|
165
|
+
'shadow-md'?: string;
|
|
166
|
+
'shadow-lg'?: string;
|
|
167
|
+
'shadow-xl'?: string;
|
|
168
|
+
'duration-fast'?: string;
|
|
169
|
+
'duration-normal'?: string;
|
|
170
|
+
'duration-slow'?: string;
|
|
171
|
+
[key: string]: string | number | undefined;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Design tokens as CSS custom properties for design system consistency
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* ```typescript
|
|
178
|
+
* import { designTokens } from '@tachui/modifiers'
|
|
179
|
+
*
|
|
180
|
+
* // Spacing design tokens
|
|
181
|
+
* element.apply(designTokens({
|
|
182
|
+
* 'spacing-xs': 4,
|
|
183
|
+
* 'spacing-sm': 8,
|
|
184
|
+
* 'spacing-md': 16,
|
|
185
|
+
* 'spacing-lg': 24,
|
|
186
|
+
* 'spacing-xl': 32,
|
|
187
|
+
* 'spacing-2xl': 48
|
|
188
|
+
* }))
|
|
189
|
+
*
|
|
190
|
+
* // Typography design tokens
|
|
191
|
+
* element.apply(designTokens({
|
|
192
|
+
* 'font-size-sm': 14,
|
|
193
|
+
* 'font-size-base': 16,
|
|
194
|
+
* 'font-size-lg': 18,
|
|
195
|
+
* 'font-size-xl': 20,
|
|
196
|
+
* 'font-weight-normal': 400,
|
|
197
|
+
* 'font-weight-medium': 500,
|
|
198
|
+
* 'font-weight-bold': 700,
|
|
199
|
+
* 'line-height-tight': 1.2,
|
|
200
|
+
* 'line-height-normal': 1.5,
|
|
201
|
+
* 'line-height-relaxed': 1.75
|
|
202
|
+
* }))
|
|
203
|
+
*
|
|
204
|
+
* // Border and effects tokens
|
|
205
|
+
* element.apply(designTokens({
|
|
206
|
+
* 'radius-sm': 4,
|
|
207
|
+
* 'radius-md': 8,
|
|
208
|
+
* 'radius-lg': 12,
|
|
209
|
+
* 'radius-full': '50%',
|
|
210
|
+
* 'shadow-sm': '0 1px 2px rgba(0, 0, 0, 0.05)',
|
|
211
|
+
* 'shadow-md': '0 4px 6px rgba(0, 0, 0, 0.1)',
|
|
212
|
+
* 'shadow-lg': '0 10px 15px rgba(0, 0, 0, 0.1)',
|
|
213
|
+
* 'duration-fast': '150ms',
|
|
214
|
+
* 'duration-normal': '300ms',
|
|
215
|
+
* 'duration-slow': '500ms'
|
|
216
|
+
* }))
|
|
217
|
+
*
|
|
218
|
+
* // Custom design tokens
|
|
219
|
+
* element.apply(designTokens({
|
|
220
|
+
* 'container-max-width': '1200px',
|
|
221
|
+
* 'sidebar-width': '280px',
|
|
222
|
+
* 'header-height': '64px',
|
|
223
|
+
* 'z-index-modal': 1000,
|
|
224
|
+
* 'z-index-tooltip': 1100
|
|
225
|
+
* }))
|
|
226
|
+
* ```
|
|
227
|
+
*/
|
|
228
|
+
export declare function designTokens(tokens: DesignTokens): CustomPropertiesModifier;
|
|
229
|
+
//# sourceMappingURL=css-properties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css-properties.d.ts","sourceRoot":"","sources":["../../src/attributes/css-properties.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,8BAA8B,CAAA;AAMrC,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,CAAA;AAC9C,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;AAE/D,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,gBAAgB,CAAA;IAC5B,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;CACpC;AAED,MAAM,MAAM,+BAA+B,GACzC,qBAAqB,CAAC,uBAAuB,CAAC,CAAA;AAEhD,qBAAa,wBAAyB,SAAQ,YAAY,CAAC,uBAAuB,CAAC;IACjF,QAAQ,CAAC,IAAI,sBAAqB;IAClC,QAAQ,CAAC,QAAQ,KAAI;gBAET,OAAO,EAAE,+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MAAM,CAAA;IAGtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IAGpB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAA;IAGxB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;CAC3C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,wBAAwB,CAa3E"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTML Attributes Modifier - Best-in-class HTML element attribute management
|
|
3
|
+
*
|
|
4
|
+
* Comprehensive interface for HTML attributes including ID and data attributes
|
|
5
|
+
* with full validation, development warnings, and production optimization.
|
|
6
|
+
*/
|
|
7
|
+
import type { DOMNode } from '@tachui/core/runtime/types';
|
|
8
|
+
import { BaseModifier } from '../basic/base';
|
|
9
|
+
import type { ModifierContext, ReactiveModifierProps } from '@tachui/core/modifiers/types';
|
|
10
|
+
export type IdValue = string;
|
|
11
|
+
export interface IdOptions {
|
|
12
|
+
id: IdValue;
|
|
13
|
+
}
|
|
14
|
+
export type ReactiveIdOptions = ReactiveModifierProps<IdOptions>;
|
|
15
|
+
export declare class IdModifier extends BaseModifier<IdOptions> {
|
|
16
|
+
readonly type = "id";
|
|
17
|
+
readonly priority = 85;
|
|
18
|
+
constructor(options: ReactiveIdOptions);
|
|
19
|
+
apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
|
|
20
|
+
private validateId;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* HTML element ID modifier
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* import { id } from '@tachui/modifiers'
|
|
28
|
+
*
|
|
29
|
+
* // Set element ID
|
|
30
|
+
* element.apply(id('main-header'))
|
|
31
|
+
* element.apply(id('user-profile-123'))
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare function id(value: IdValue): IdModifier;
|
|
35
|
+
export type DataValue = string | number | boolean;
|
|
36
|
+
export interface DataAttributes {
|
|
37
|
+
[key: string]: DataValue;
|
|
38
|
+
}
|
|
39
|
+
export interface DataOptions {
|
|
40
|
+
data: DataAttributes;
|
|
41
|
+
}
|
|
42
|
+
export type ReactiveDataOptions = ReactiveModifierProps<DataOptions>;
|
|
43
|
+
export declare class DataModifier extends BaseModifier<DataOptions> {
|
|
44
|
+
readonly type = "data";
|
|
45
|
+
readonly priority = 80;
|
|
46
|
+
constructor(options: ReactiveDataOptions);
|
|
47
|
+
apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
|
|
48
|
+
private formatDataAttributeName;
|
|
49
|
+
private formatDataAttributeValue;
|
|
50
|
+
private validateDataAttributes;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* HTML data attributes modifier for testing selectors and analytics
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* import { data } from '@tachui/modifiers'
|
|
58
|
+
*
|
|
59
|
+
* // Single data attribute
|
|
60
|
+
* element.apply(data({ testId: 'login-button' }))
|
|
61
|
+
*
|
|
62
|
+
* // Multiple data attributes
|
|
63
|
+
* element.apply(data({
|
|
64
|
+
* testId: 'user-card',
|
|
65
|
+
* userId: 123,
|
|
66
|
+
* active: true,
|
|
67
|
+
* category: 'premium'
|
|
68
|
+
* }))
|
|
69
|
+
*
|
|
70
|
+
* // Custom data attributes with kebab-case conversion
|
|
71
|
+
* element.apply(data({
|
|
72
|
+
* customAttribute: 'value', // becomes data-custom-attribute="value"
|
|
73
|
+
* 'data-existing': 'kept' // remains data-existing="kept"
|
|
74
|
+
* }))
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
export declare function data(attributes: DataAttributes): DataModifier;
|
|
78
|
+
export type TabIndexValue = number;
|
|
79
|
+
export interface TabIndexOptions {
|
|
80
|
+
tabIndex: TabIndexValue;
|
|
81
|
+
}
|
|
82
|
+
export type ReactiveTabIndexOptions = ReactiveModifierProps<TabIndexOptions>;
|
|
83
|
+
export declare class TabIndexModifier extends BaseModifier<TabIndexOptions> {
|
|
84
|
+
readonly type = "tabIndex";
|
|
85
|
+
readonly priority = 75;
|
|
86
|
+
constructor(options: ReactiveTabIndexOptions);
|
|
87
|
+
apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
|
|
88
|
+
private validateTabIndex;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Tab index modifier for keyboard navigation control
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```typescript
|
|
95
|
+
* import { tabIndex } from '@tachui/modifiers'
|
|
96
|
+
*
|
|
97
|
+
* // Make element focusable in natural tab order
|
|
98
|
+
* element.apply(tabIndex(0))
|
|
99
|
+
*
|
|
100
|
+
* // Remove from tab order but keep programmatically focusable
|
|
101
|
+
* element.apply(tabIndex(-1))
|
|
102
|
+
*
|
|
103
|
+
* // Force specific tab order (not recommended)
|
|
104
|
+
* element.apply(tabIndex(1))
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
export declare function tabIndex(value: TabIndexValue): TabIndexModifier;
|
|
108
|
+
//# sourceMappingURL=html.d.ts.map
|