@tachui/primitives 0.8.0-alpha → 0.8.5-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/dist/{BasicInput-CWFHw9rL.js → BasicInput-BHfrSdoi.js} +46 -33
- package/dist/{Picker-DrZ7ibdt.js → Picker-DKphYduj.js} +243 -244
- package/dist/ScrollView-CBqSqatM.js +704 -0
- package/dist/Text-D0CYYD-Q.js +170 -0
- package/dist/controls/Button.d.ts +19 -28
- package/dist/controls/Button.d.ts.map +1 -1
- package/dist/controls/index.js +1 -1
- package/dist/display/HTML.d.ts +13 -13
- package/dist/display/Image.d.ts +8 -8
- package/dist/display/Image.d.ts.map +1 -1
- package/dist/display/ScrollView.d.ts +216 -0
- package/dist/display/ScrollView.d.ts.map +1 -0
- package/dist/display/Text.d.ts +37 -44
- package/dist/display/Text.d.ts.map +1 -1
- package/dist/display/index.d.ts +1 -0
- package/dist/display/index.d.ts.map +1 -1
- package/dist/display/index.js +20 -17
- package/dist/forms/BasicForm.d.ts +5 -1
- package/dist/forms/BasicForm.d.ts.map +1 -1
- package/dist/forms/index.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +66 -59
- package/dist/layout/Divider.d.ts +9 -3
- package/dist/layout/Divider.d.ts.map +1 -1
- package/dist/layout/Spacer.d.ts +8 -2
- package/dist/layout/Spacer.d.ts.map +1 -1
- package/dist/layout/Stack.d.ts +19 -69
- package/dist/layout/Stack.d.ts.map +1 -1
- package/dist/layout/index.js +267 -13
- package/dist/version.d.ts +14 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +6 -4
- package/dist/Divider-DWgDKavU.js +0 -474
- package/dist/HTML-aWcvQ0VC.js +0 -321
- package/dist/Text-DYyFBJ6i.js +0 -165
package/dist/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E
|
|
3
|
-
import { E as
|
|
4
|
-
import { B as
|
|
5
|
-
import { B as
|
|
1
|
+
import { Divider as b, DividerComponent as P, DividerStyles as I, DividerUtils as y, HStack as j, Spacer as S, SpacerComponent as A, VStack as L, ZStack as C, defaultDividerTheme as V } from "./layout/index.js";
|
|
2
|
+
import { E, T as H, a as $, b as F, c as q } from "./Text-D0CYYD-Q.js";
|
|
3
|
+
import { E as D, j as N, d as _, e as W, f as R, g as M, h as G, i as K, H as Z, I as z, b as J, a as Q, c as X, S as Y, k as ee } from "./ScrollView-CBqSqatM.js";
|
|
4
|
+
import { B as oe, a as ne, E as ie, h as re, c as ae, L as se, b as ce, P as le, i as pe, j as de, T as ge, e as ue, f as me, g as he, d as fe } from "./Picker-DKphYduj.js";
|
|
5
|
+
import { B as we, a as xe, b as ke, c as Be, d as Te, e as be, f as Pe } from "./BasicInput-BHfrSdoi.js";
|
|
6
|
+
import { withModifiers as ye } from "@tachui/core";
|
|
7
|
+
import { LayoutComponent as Se } from "@tachui/core/components";
|
|
6
8
|
function d(e) {
|
|
7
9
|
return e && typeof e == "object" && "value" in e;
|
|
8
10
|
}
|
|
@@ -393,7 +395,7 @@ function u(e) {
|
|
|
393
395
|
function m() {
|
|
394
396
|
return { ...l };
|
|
395
397
|
}
|
|
396
|
-
const
|
|
398
|
+
const w = {
|
|
397
399
|
// Direct validation methods
|
|
398
400
|
validateText: r.validateText,
|
|
399
401
|
validateButton: r.validateButton,
|
|
@@ -423,63 +425,68 @@ const f = {
|
|
|
423
425
|
}
|
|
424
426
|
console.groupEnd();
|
|
425
427
|
}
|
|
426
|
-
};
|
|
428
|
+
}, h = "@tachui/primitives", f = "0.8.0-alpha", x = h, k = f;
|
|
427
429
|
export {
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
Z as
|
|
455
|
-
z as
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
430
|
+
we as BasicForm,
|
|
431
|
+
xe as BasicFormImplementation,
|
|
432
|
+
ke as BasicFormStyles,
|
|
433
|
+
Be as BasicFormValidation,
|
|
434
|
+
Te as BasicInput,
|
|
435
|
+
be as BasicInputStyles,
|
|
436
|
+
Pe as BasicInputUtils,
|
|
437
|
+
oe as Button,
|
|
438
|
+
ne as ButtonStyles,
|
|
439
|
+
b as Divider,
|
|
440
|
+
P as DividerComponent,
|
|
441
|
+
I as DividerStyles,
|
|
442
|
+
y as DividerUtils,
|
|
443
|
+
ie as EnhancedButton,
|
|
444
|
+
D as EnhancedImage,
|
|
445
|
+
re as EnhancedPicker,
|
|
446
|
+
N as EnhancedScrollView,
|
|
447
|
+
E as EnhancedText,
|
|
448
|
+
ae as EnhancedToggle,
|
|
449
|
+
_ as H1,
|
|
450
|
+
W as H2,
|
|
451
|
+
R as H3,
|
|
452
|
+
M as H4,
|
|
453
|
+
G as H5,
|
|
454
|
+
K as H6,
|
|
455
|
+
j as HStack,
|
|
456
|
+
Z as HTML,
|
|
457
|
+
z as Image,
|
|
458
|
+
J as ImageContentModes,
|
|
459
|
+
Q as ImageStates,
|
|
460
|
+
X as ImageUtils,
|
|
461
|
+
Se as LayoutComponent,
|
|
462
|
+
se as Link,
|
|
463
|
+
ce as LinkUtils,
|
|
464
|
+
le as Picker,
|
|
465
|
+
pe as PickerStyles,
|
|
466
|
+
de as PickerUtils,
|
|
464
467
|
r as PrimitiveComponentValidation,
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
+
w as PrimitivesValidationUtils,
|
|
469
|
+
Y as ScrollView,
|
|
470
|
+
ee as ScrollViewUtils,
|
|
471
|
+
S as Spacer,
|
|
472
|
+
A as SpacerComponent,
|
|
473
|
+
x as TACHUI_PACKAGE,
|
|
474
|
+
k as TACHUI_PACKAGE_VERSION,
|
|
468
475
|
n as TachUIValidationError,
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
476
|
+
H as Text,
|
|
477
|
+
$ as TextFormat,
|
|
478
|
+
F as TextStyles,
|
|
479
|
+
ge as Toggle,
|
|
480
|
+
ue as ToggleStyles,
|
|
481
|
+
me as ToggleUtils,
|
|
482
|
+
he as ToggleWithLabel,
|
|
483
|
+
q as Typography,
|
|
484
|
+
L as VStack,
|
|
485
|
+
C as ZStack,
|
|
479
486
|
u as configurePrimitivesValidation,
|
|
480
|
-
|
|
481
|
-
|
|
487
|
+
fe as defaultButtonTheme,
|
|
488
|
+
V as defaultDividerTheme,
|
|
482
489
|
m as getPrimitivesValidationConfig,
|
|
483
490
|
g as withComponentValidation,
|
|
484
|
-
|
|
491
|
+
ye as withModifiers
|
|
485
492
|
};
|
package/dist/layout/Divider.d.ts
CHANGED
|
@@ -6,12 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { ModifiableComponent, ModifierBuilder } from '@tachui/core';
|
|
8
8
|
import type { Signal } from '@tachui/core';
|
|
9
|
-
import type {
|
|
9
|
+
import type { ComponentProps, DOMNode } from '@tachui/core';
|
|
10
|
+
import type { ColorAssetProxy } from '@tachui/core/assets';
|
|
11
|
+
import type { CloneableComponent, CloneOptions } from '@tachui/core/runtime/types';
|
|
10
12
|
/**
|
|
11
13
|
* Divider component properties
|
|
12
14
|
*/
|
|
13
15
|
export interface DividerProps extends ComponentProps {
|
|
14
|
-
color?: string | Signal<string
|
|
16
|
+
color?: string | Signal<string> | ColorAssetProxy;
|
|
15
17
|
thickness?: number | Signal<number>;
|
|
16
18
|
length?: number | string | Signal<number | string>;
|
|
17
19
|
orientation?: 'horizontal' | 'vertical';
|
|
@@ -48,10 +50,11 @@ export declare const defaultDividerTheme: DividerTheme;
|
|
|
48
50
|
/**
|
|
49
51
|
* Divider component implementation
|
|
50
52
|
*/
|
|
51
|
-
export declare class DividerComponent implements
|
|
53
|
+
export declare class DividerComponent implements CloneableComponent<DividerProps> {
|
|
52
54
|
readonly type: "component";
|
|
53
55
|
readonly id: string;
|
|
54
56
|
readonly props: DividerProps;
|
|
57
|
+
mounted: boolean;
|
|
55
58
|
cleanup: (() => void)[];
|
|
56
59
|
private theme;
|
|
57
60
|
constructor(props: DividerProps);
|
|
@@ -62,6 +65,9 @@ export declare class DividerComponent implements ComponentInstance<DividerProps>
|
|
|
62
65
|
* Cleanup resources
|
|
63
66
|
*/
|
|
64
67
|
dispose(): void;
|
|
68
|
+
clone(options?: CloneOptions): this;
|
|
69
|
+
shallowClone(): this;
|
|
70
|
+
deepClone(): this;
|
|
65
71
|
}
|
|
66
72
|
/**
|
|
67
73
|
* Create a Divider component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../src/layout/Divider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAExE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../src/layout/Divider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAExE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,cAAc,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jKb,eAAe,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;;wBAmKxC,MAAM;kBAnKhB,eAAe,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;;CAqK7D,CAAA"}
|
package/dist/layout/Spacer.d.ts
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* along the main axis of its container. Behaves like SwiftUI.Spacer.
|
|
6
6
|
*/
|
|
7
7
|
import type { ModifiableComponent, ModifierBuilder } from '@tachui/core';
|
|
8
|
-
import type {
|
|
8
|
+
import type { ComponentProps, DOMNode } from '@tachui/core';
|
|
9
9
|
import { ComponentWithCSSClasses, type CSSClassesProps } from '@tachui/core';
|
|
10
|
+
import type { CloneableComponent, CloneOptions } from '@tachui/core/runtime/types';
|
|
10
11
|
/**
|
|
11
12
|
* Spacer component properties with CSS classes support
|
|
12
13
|
*/
|
|
@@ -16,12 +17,17 @@ export interface SpacerProps extends ComponentProps, CSSClassesProps {
|
|
|
16
17
|
/**
|
|
17
18
|
* Spacer component implementation with CSS classes support
|
|
18
19
|
*/
|
|
19
|
-
export declare class SpacerComponent extends ComponentWithCSSClasses implements
|
|
20
|
+
export declare class SpacerComponent extends ComponentWithCSSClasses implements CloneableComponent<SpacerProps> {
|
|
20
21
|
readonly type: "component";
|
|
21
22
|
readonly id: string;
|
|
22
23
|
readonly props: SpacerProps;
|
|
24
|
+
mounted: boolean;
|
|
25
|
+
cleanup: (() => void)[];
|
|
23
26
|
constructor(props: SpacerProps);
|
|
24
27
|
render(): DOMNode;
|
|
28
|
+
clone(options?: CloneOptions): this;
|
|
29
|
+
shallowClone(): this;
|
|
30
|
+
deepClone(): this;
|
|
25
31
|
}
|
|
26
32
|
/**
|
|
27
33
|
* Create a Spacer component with optional minimum length
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spacer.d.ts","sourceRoot":"","sources":["../../src/layout/Spacer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,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AAW,CAAC,GAAG;IACpC,QAAQ,EAAE,eAAe,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAA;CAC5D,CAAA"}
|
package/dist/layout/Stack.d.ts
CHANGED
|
@@ -1,74 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Layout Stack Components
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Thin wrappers around the core layout stack implementations to maintain the
|
|
5
|
+
* @tachui/primitives public surface while benefiting from the shared cloning
|
|
6
|
+
* and proxy infrastructure that lives in @tachui/core.
|
|
5
7
|
*/
|
|
6
|
-
import
|
|
7
|
-
import type
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
export interface HStackProps {
|
|
24
|
-
children?: ComponentInstance[];
|
|
25
|
-
spacing?: number;
|
|
26
|
-
alignment?: 'top' | 'center' | 'bottom';
|
|
27
|
-
debugLabel?: string;
|
|
28
|
-
element?: string;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* ZStack component props
|
|
32
|
-
*/
|
|
33
|
-
export interface ZStackProps {
|
|
34
|
-
children?: ComponentInstance[];
|
|
35
|
-
alignment?: 'topLeading' | 'top' | 'topTrailing' | 'leading' | 'center' | 'trailing' | 'bottomLeading' | 'bottom' | 'bottomTrailing';
|
|
36
|
-
element?: string;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Enhanced component wrapper that adds modifier support and preserves concatenation methods
|
|
40
|
-
*/
|
|
41
|
-
export declare function withModifiers<P extends ComponentProps>(component: ComponentInstance<P>): ModifiableComponent<P> & {
|
|
42
|
-
modifier: ModifierBuilder<ModifiableComponent<P>>;
|
|
43
|
-
} & (ComponentInstance<P> extends any ? any : {});
|
|
44
|
-
/**
|
|
45
|
-
* Layout container component class with element override support
|
|
46
|
-
*/
|
|
47
|
-
export declare class LayoutComponent extends ComponentWithCSSClasses implements ComponentInstance<ComponentProps & ElementOverrideProps & CSSClassesProps> {
|
|
48
|
-
props: ComponentProps & ElementOverrideProps & CSSClassesProps;
|
|
49
|
-
private layoutType;
|
|
50
|
-
children: ComponentInstance[];
|
|
51
|
-
private layoutProps;
|
|
52
|
-
readonly type: "component";
|
|
53
|
-
readonly id: string;
|
|
54
|
-
mounted: boolean;
|
|
55
|
-
cleanup: (() => void)[];
|
|
56
|
-
private effectiveTag;
|
|
57
|
-
constructor(props: ComponentProps & ElementOverrideProps & CSSClassesProps, layoutType: 'vstack' | 'hstack' | 'zstack', children?: ComponentInstance[], layoutProps?: any);
|
|
58
|
-
/**
|
|
59
|
-
* Find DOM elements for a specific child component within the layout container
|
|
60
|
-
*/
|
|
61
|
-
private findChildDOMElements;
|
|
62
|
-
render(): DOMNode[];
|
|
63
|
-
/**
|
|
64
|
-
* Cleanup resources
|
|
65
|
-
*/
|
|
66
|
-
dispose(): void;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* SwiftUI-aligned direct exports for layout components
|
|
70
|
-
*/
|
|
71
|
-
export declare function VStack(props?: VStackProps): any;
|
|
72
|
-
export declare function HStack(props?: HStackProps): any;
|
|
73
|
-
export declare function ZStack(props?: ZStackProps): any;
|
|
8
|
+
import { withModifiers } from '@tachui/core';
|
|
9
|
+
import { LayoutComponent as CoreLayoutComponent, type VStackLayoutProps as CoreVStackProps, type HStackLayoutProps as CoreHStackProps, type ZStackLayoutProps as CoreZStackProps } from '@tachui/core/components';
|
|
10
|
+
export { withModifiers };
|
|
11
|
+
export { CoreLayoutComponent as LayoutComponent };
|
|
12
|
+
export type VStackProps = CoreVStackProps;
|
|
13
|
+
export type HStackProps = CoreHStackProps;
|
|
14
|
+
export type ZStackProps = CoreZStackProps;
|
|
15
|
+
export declare function VStack(props?: VStackProps): import("@tachui/core").ModifiableComponent<import("@tachui/core").ComponentProps & import("@tachui/core").ElementOverrideProps & import("@tachui/core").CSSClassesProps> & import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<import("@tachui/core").ComponentProps & import("@tachui/core").ElementOverrideProps & import("@tachui/core").CSSClassesProps>> & {
|
|
16
|
+
modifier: import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<import("@tachui/core").ComponentProps & import("@tachui/core").ElementOverrideProps & import("@tachui/core").CSSClassesProps>>;
|
|
17
|
+
};
|
|
18
|
+
export declare function HStack(props?: HStackProps): import("@tachui/core").ModifiableComponent<import("@tachui/core").ComponentProps & import("@tachui/core").ElementOverrideProps & import("@tachui/core").CSSClassesProps> & import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<import("@tachui/core").ComponentProps & import("@tachui/core").ElementOverrideProps & import("@tachui/core").CSSClassesProps>> & {
|
|
19
|
+
modifier: import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<import("@tachui/core").ComponentProps & import("@tachui/core").ElementOverrideProps & import("@tachui/core").CSSClassesProps>>;
|
|
20
|
+
};
|
|
21
|
+
export declare function ZStack(props?: ZStackProps): import("@tachui/core").ModifiableComponent<import("@tachui/core").ComponentProps & import("@tachui/core").ElementOverrideProps & import("@tachui/core").CSSClassesProps> & import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<import("@tachui/core").ComponentProps & import("@tachui/core").ElementOverrideProps & import("@tachui/core").CSSClassesProps>> & {
|
|
22
|
+
modifier: import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<import("@tachui/core").ComponentProps & import("@tachui/core").ElementOverrideProps & import("@tachui/core").CSSClassesProps>>;
|
|
23
|
+
};
|
|
74
24
|
//# sourceMappingURL=Stack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../src/layout/Stack.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../src/layout/Stack.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAEL,eAAe,IAAI,mBAAmB,EACtC,KAAK,iBAAiB,IAAI,eAAe,EACzC,KAAK,iBAAiB,IAAI,eAAe,EACzC,KAAK,iBAAiB,IAAI,eAAe,EAC1C,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAE,aAAa,EAAE,CAAA;AACxB,OAAO,EAAE,mBAAmB,IAAI,eAAe,EAAE,CAAA;AAEjD,MAAM,MAAM,WAAW,GAAG,eAAe,CAAA;AACzC,MAAM,MAAM,WAAW,GAAG,eAAe,CAAA;AACzC,MAAM,MAAM,WAAW,GAAG,eAAe,CAAA;AAEzC,wBAAgB,MAAM,CAAC,KAAK,GAAE,WAAgB;;EAE7C;AAED,wBAAgB,MAAM,CAAC,KAAK,GAAE,WAAgB;;EAE7C;AAED,wBAAgB,MAAM,CAAC,KAAK,GAAE,WAAgB;;EAE7C"}
|
package/dist/layout/index.js
CHANGED
|
@@ -1,15 +1,269 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { withModifiers as b, ComponentWithCSSClasses as S, h as k, clonePropsPreservingReactivity as m, resetLifecycleState as f, isSignal as l, createEffect as w } from "@tachui/core";
|
|
2
|
+
import { withModifiers as N } from "@tachui/core";
|
|
3
|
+
import { Layout as v } from "@tachui/core/components";
|
|
4
|
+
import { LayoutComponent as W } from "@tachui/core/components";
|
|
5
|
+
function P(e = {}) {
|
|
6
|
+
return v.VStack(e);
|
|
7
|
+
}
|
|
8
|
+
function _(e = {}) {
|
|
9
|
+
return v.HStack(e);
|
|
10
|
+
}
|
|
11
|
+
function A(e = {}) {
|
|
12
|
+
return v.ZStack(e);
|
|
13
|
+
}
|
|
14
|
+
var x = Object.defineProperty, C = (e, t, s) => t in e ? x(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, p = (e, t, s) => C(e, typeof t != "symbol" ? t + "" : t, s);
|
|
15
|
+
class g extends S {
|
|
16
|
+
constructor(t) {
|
|
17
|
+
super(), p(this, "type", "component"), p(this, "id"), p(this, "props"), p(this, "mounted", !1), p(this, "cleanup", []), this.props = t, this.id = `spacer-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
const t = this.props.minLength ?? 0, s = ["tachui-spacer"], n = this.createClassString(this.props, s);
|
|
21
|
+
return k("div", {
|
|
22
|
+
className: n,
|
|
23
|
+
style: {
|
|
24
|
+
// Core flex properties for expansion
|
|
25
|
+
flexGrow: "1",
|
|
26
|
+
flexShrink: "1",
|
|
27
|
+
flexBasis: "0",
|
|
28
|
+
// Minimum size constraints
|
|
29
|
+
minWidth: `${t}px`,
|
|
30
|
+
minHeight: `${t}px`,
|
|
31
|
+
// Ensure proper behavior in both directions
|
|
32
|
+
alignSelf: "stretch"
|
|
33
|
+
// Visual debugging (remove in production)
|
|
34
|
+
// backgroundColor: 'rgba(255, 0, 0, 0.1)', // Uncomment to visualize spacers
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
clone(t = {}) {
|
|
39
|
+
return t.deep ? this.deepClone() : this.shallowClone();
|
|
40
|
+
}
|
|
41
|
+
shallowClone() {
|
|
42
|
+
const t = m(this.props), s = new g(t);
|
|
43
|
+
return f(s), s;
|
|
44
|
+
}
|
|
45
|
+
deepClone() {
|
|
46
|
+
const t = m(this.props, {
|
|
47
|
+
deep: !0
|
|
48
|
+
}), s = new g(t);
|
|
49
|
+
return f(s), s;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function E(e) {
|
|
53
|
+
let t;
|
|
54
|
+
return typeof e == "number" ? t = { minLength: e } : t = e || {}, b(new g(t));
|
|
55
|
+
}
|
|
56
|
+
var $ = Object.defineProperty, F = (e, t, s) => t in e ? $(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, a = (e, t, s) => F(e, typeof t != "symbol" ? t + "" : t, s);
|
|
57
|
+
const r = {
|
|
58
|
+
colors: {
|
|
59
|
+
default: "#E5E5E5",
|
|
60
|
+
light: "#F0F0F0",
|
|
61
|
+
medium: "#D1D1D1",
|
|
62
|
+
heavy: "#A0A0A0",
|
|
63
|
+
primary: "#007AFF",
|
|
64
|
+
secondary: "#5AC8FA",
|
|
65
|
+
subtle: "#F2F2F7",
|
|
66
|
+
prominent: "#1C1C1E"
|
|
67
|
+
},
|
|
68
|
+
thickness: {
|
|
69
|
+
thin: 1,
|
|
70
|
+
medium: 2,
|
|
71
|
+
thick: 3
|
|
72
|
+
},
|
|
73
|
+
spacing: {
|
|
74
|
+
small: 8,
|
|
75
|
+
medium: 16,
|
|
76
|
+
large: 24
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
class y {
|
|
80
|
+
constructor(t) {
|
|
81
|
+
a(this, "type", "component"), a(this, "id"), a(this, "props"), a(this, "mounted", !1), a(this, "cleanup", []), a(this, "theme", r), this.props = t, this.id = `divider-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
82
|
+
}
|
|
83
|
+
resolveValue(t) {
|
|
84
|
+
const s = l(t) ? t() : t;
|
|
85
|
+
return typeof s == "object" && s !== null && typeof s.resolve == "function" ? s.resolve() : typeof s == "object" && s !== null && typeof s.value == "string" ? s.value : s;
|
|
86
|
+
}
|
|
87
|
+
getBaseStyles() {
|
|
88
|
+
const t = this.props.orientation === "vertical", s = this.resolveValue(
|
|
89
|
+
this.props.thickness ?? this.theme.thickness.thin
|
|
90
|
+
), n = this.resolveValue(
|
|
91
|
+
this.props.color ?? this.theme.colors.default
|
|
92
|
+
), u = this.props.style ?? "solid", h = this.resolveValue(this.props.opacity ?? 1), d = this.resolveValue(
|
|
93
|
+
this.props.margin ?? this.theme.spacing.medium
|
|
94
|
+
), c = this.resolveValue(this.props.length ?? "100%"), i = {
|
|
95
|
+
backgroundColor: n,
|
|
96
|
+
opacity: h.toString(),
|
|
97
|
+
borderStyle: u,
|
|
98
|
+
borderColor: n,
|
|
99
|
+
flexShrink: "0"
|
|
100
|
+
// Prevent shrinking
|
|
101
|
+
};
|
|
102
|
+
return t ? (i.width = `${s}px`, i.height = typeof c == "number" ? `${c}px` : c, i.marginLeft = `${d}px`, i.marginRight = `${d}px`, i.borderLeftWidth = `${s}px`, i.backgroundColor = "transparent") : (i.height = `${s}px`, i.width = typeof c == "number" ? `${c}px` : c, i.marginTop = `${d}px`, i.marginBottom = `${d}px`, i.borderTopWidth = `${s}px`, i.backgroundColor = "transparent"), i;
|
|
103
|
+
}
|
|
104
|
+
render() {
|
|
105
|
+
const t = this.props.orientation === "vertical", s = l(this.props.color) || l(this.props.thickness) || l(this.props.length) || l(this.props.margin) || l(this.props.opacity), n = k("div", {
|
|
106
|
+
className: `tachui-divider tachui-divider-${t ? "vertical" : "horizontal"}`,
|
|
107
|
+
style: this.getBaseStyles(),
|
|
108
|
+
role: "separator",
|
|
109
|
+
"aria-orientation": t ? "vertical" : "horizontal"
|
|
110
|
+
});
|
|
111
|
+
if (s) {
|
|
112
|
+
const u = w(() => {
|
|
113
|
+
const h = this.getBaseStyles();
|
|
114
|
+
n.element && Object.assign(n.element.style, h);
|
|
115
|
+
});
|
|
116
|
+
this.cleanup.push(() => u.dispose()), n.dispose = () => {
|
|
117
|
+
this.cleanup.forEach((h) => h());
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
return n;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Cleanup resources
|
|
124
|
+
*/
|
|
125
|
+
dispose() {
|
|
126
|
+
this.cleanup.forEach((t) => {
|
|
127
|
+
try {
|
|
128
|
+
t();
|
|
129
|
+
} catch (s) {
|
|
130
|
+
console.error("Divider component cleanup error:", s);
|
|
131
|
+
}
|
|
132
|
+
}), this.cleanup = [];
|
|
133
|
+
}
|
|
134
|
+
clone(t = {}) {
|
|
135
|
+
return t.deep ? this.deepClone() : this.shallowClone();
|
|
136
|
+
}
|
|
137
|
+
shallowClone() {
|
|
138
|
+
const t = m(this.props), s = new y(t);
|
|
139
|
+
return f(s), s;
|
|
140
|
+
}
|
|
141
|
+
deepClone() {
|
|
142
|
+
const t = m(this.props, {
|
|
143
|
+
deep: !0
|
|
144
|
+
}), s = new y(t);
|
|
145
|
+
return f(s), s;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
function o(e = {}) {
|
|
149
|
+
return b(new y(e));
|
|
150
|
+
}
|
|
151
|
+
const B = {
|
|
152
|
+
/**
|
|
153
|
+
* Create a horizontal divider
|
|
154
|
+
*/
|
|
155
|
+
horizontal(e = {}) {
|
|
156
|
+
return o({ ...e, orientation: "horizontal" });
|
|
157
|
+
},
|
|
158
|
+
/**
|
|
159
|
+
* Create a vertical divider
|
|
160
|
+
*/
|
|
161
|
+
vertical(e, t) {
|
|
162
|
+
return o(typeof e == "object" ? { ...e, orientation: "vertical" } : {
|
|
163
|
+
orientation: "vertical",
|
|
164
|
+
length: e,
|
|
165
|
+
thickness: t
|
|
166
|
+
});
|
|
167
|
+
},
|
|
168
|
+
/**
|
|
169
|
+
* Create a thin divider
|
|
170
|
+
*/
|
|
171
|
+
thin(e) {
|
|
172
|
+
return o({ thickness: r.thickness.thin, color: e });
|
|
173
|
+
},
|
|
174
|
+
/**
|
|
175
|
+
* Create a medium divider
|
|
176
|
+
*/
|
|
177
|
+
medium(e) {
|
|
178
|
+
return o({ thickness: r.thickness.medium, color: e });
|
|
179
|
+
},
|
|
180
|
+
/**
|
|
181
|
+
* Create a thick divider
|
|
182
|
+
*/
|
|
183
|
+
thick(e) {
|
|
184
|
+
return o({ thickness: r.thickness.thick, color: e });
|
|
185
|
+
},
|
|
186
|
+
/**
|
|
187
|
+
* Create a dashed divider
|
|
188
|
+
*/
|
|
189
|
+
dashed(e, t) {
|
|
190
|
+
return o({ style: "dashed", color: e, thickness: t });
|
|
191
|
+
},
|
|
192
|
+
/**
|
|
193
|
+
* Create a dotted divider
|
|
194
|
+
*/
|
|
195
|
+
dotted(e, t) {
|
|
196
|
+
return o({ style: "dotted", color: e, thickness: t });
|
|
197
|
+
},
|
|
198
|
+
/**
|
|
199
|
+
* Create a subtle divider
|
|
200
|
+
*/
|
|
201
|
+
subtle(e) {
|
|
202
|
+
return o({
|
|
203
|
+
color: e || r.colors.light,
|
|
204
|
+
opacity: 0.6
|
|
205
|
+
});
|
|
206
|
+
},
|
|
207
|
+
/**
|
|
208
|
+
* Create a prominent divider
|
|
209
|
+
*/
|
|
210
|
+
prominent(e) {
|
|
211
|
+
return o({
|
|
212
|
+
color: e || r.colors.heavy,
|
|
213
|
+
thickness: r.thickness.medium
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
}, L = {
|
|
217
|
+
theme: r,
|
|
218
|
+
colors: {
|
|
219
|
+
primary: "#007AFF",
|
|
220
|
+
success: "#34C759",
|
|
221
|
+
warning: "#FF9500",
|
|
222
|
+
danger: "#FF3B30"
|
|
223
|
+
},
|
|
224
|
+
thin: (e) => ({
|
|
225
|
+
thickness: r.thickness.thin,
|
|
226
|
+
color: e
|
|
227
|
+
}),
|
|
228
|
+
medium: (e) => ({
|
|
229
|
+
thickness: r.thickness.medium,
|
|
230
|
+
color: e
|
|
231
|
+
}),
|
|
232
|
+
thick: (e) => ({
|
|
233
|
+
thickness: r.thickness.thick,
|
|
234
|
+
color: e
|
|
235
|
+
}),
|
|
236
|
+
createTheme: (e) => ({
|
|
237
|
+
colors: {
|
|
238
|
+
...r.colors,
|
|
239
|
+
...e.colors
|
|
240
|
+
},
|
|
241
|
+
thickness: {
|
|
242
|
+
...r.thickness,
|
|
243
|
+
...e.thickness
|
|
244
|
+
},
|
|
245
|
+
spacing: {
|
|
246
|
+
...r.spacing,
|
|
247
|
+
...e.spacing
|
|
248
|
+
}
|
|
249
|
+
}),
|
|
250
|
+
// Color presets
|
|
251
|
+
primary: (e) => o({ color: e || r.colors.primary }),
|
|
252
|
+
secondary: (e) => o({ color: e || r.colors.secondary }),
|
|
253
|
+
subtle: (e) => o({ color: e || r.colors.subtle }),
|
|
254
|
+
prominent: (e) => o({ color: e || r.colors.prominent })
|
|
255
|
+
};
|
|
2
256
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
257
|
+
o as Divider,
|
|
258
|
+
y as DividerComponent,
|
|
259
|
+
L as DividerStyles,
|
|
260
|
+
B as DividerUtils,
|
|
261
|
+
_ as HStack,
|
|
262
|
+
W as LayoutComponent,
|
|
263
|
+
E as Spacer,
|
|
264
|
+
g as SpacerComponent,
|
|
265
|
+
P as VStack,
|
|
266
|
+
A as ZStack,
|
|
267
|
+
r as defaultDividerTheme,
|
|
268
|
+
N as withModifiers
|
|
15
269
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package Information
|
|
3
|
+
*
|
|
4
|
+
* Provides consistent package name and version exports across all TachUI packages
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The name of this TachUI package (from package.json)
|
|
8
|
+
*/
|
|
9
|
+
export declare const TACHUI_PACKAGE: any;
|
|
10
|
+
/**
|
|
11
|
+
* The version of this TachUI package (from package.json)
|
|
12
|
+
*/
|
|
13
|
+
export declare const TACHUI_PACKAGE_VERSION: any;
|
|
14
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;GAEG;AACH,eAAO,MAAM,cAAc,KAA4B,CAAA;AAEvD;;GAEG;AACH,eAAO,MAAM,sBAAsB,KAA+B,CAAA"}
|