@proyecto-viviana/solidaria-components 0.0.2 → 0.0.3
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/index.d.ts +532 -19
- package/dist/index.js +46 -46
- package/dist/index.jsx +1201 -0
- package/package.json +7 -5
- package/dist/Button.d.ts +0 -49
- package/dist/Button.d.ts.map +0 -1
- package/dist/Checkbox.d.ts +0 -97
- package/dist/Checkbox.d.ts.map +0 -1
- package/dist/Link.d.ts +0 -52
- package/dist/Link.d.ts.map +0 -1
- package/dist/ProgressBar.d.ts +0 -45
- package/dist/ProgressBar.d.ts.map +0 -1
- package/dist/RadioGroup.d.ts +0 -99
- package/dist/RadioGroup.d.ts.map +0 -1
- package/dist/Separator.d.ts +0 -37
- package/dist/Separator.d.ts.map +0 -1
- package/dist/Switch.d.ts +0 -63
- package/dist/Switch.d.ts.map +0 -1
- package/dist/TextField.d.ts +0 -85
- package/dist/TextField.d.ts.map +0 -1
- package/dist/VisuallyHidden.d.ts +0 -18
- package/dist/VisuallyHidden.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/utils.d.ts +0 -76
- package/dist/utils.d.ts.map +0 -1
package/dist/utils.d.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility functions for solidaria-components
|
|
3
|
-
* Port of react-aria-components/src/utils.tsx
|
|
4
|
-
*/
|
|
5
|
-
import { type JSX, type Accessor, createContext } from 'solid-js';
|
|
6
|
-
/**
|
|
7
|
-
* Render props pattern - children can be a function that receives state
|
|
8
|
-
*/
|
|
9
|
-
export type RenderChildren<T> = JSX.Element | ((renderProps: T) => JSX.Element);
|
|
10
|
-
/**
|
|
11
|
-
* Class name can be a string or a function that computes based on state
|
|
12
|
-
*/
|
|
13
|
-
export type ClassNameOrFunction<T> = string | ((renderProps: T) => string);
|
|
14
|
-
/**
|
|
15
|
-
* Style can be an object or a function that computes based on state
|
|
16
|
-
*/
|
|
17
|
-
export type StyleOrFunction<T> = JSX.CSSProperties | ((renderProps: T) => JSX.CSSProperties);
|
|
18
|
-
/**
|
|
19
|
-
* Common render props interface
|
|
20
|
-
*/
|
|
21
|
-
export interface RenderPropsBase<T> {
|
|
22
|
-
/** The children of the component. A function may be provided to receive render props. */
|
|
23
|
-
children?: RenderChildren<T>;
|
|
24
|
-
/** The CSS className for the element. A function may be provided to compute the class based on state. */
|
|
25
|
-
class?: ClassNameOrFunction<T>;
|
|
26
|
-
/** The inline style for the element. A function may be provided to compute the style based on state. */
|
|
27
|
-
style?: StyleOrFunction<T>;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Slot props for named slots
|
|
31
|
-
*/
|
|
32
|
-
export interface SlotProps {
|
|
33
|
-
/** A slot name for the component. */
|
|
34
|
-
slot?: string;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Resolves render props (children, class, style) based on component state
|
|
38
|
-
*/
|
|
39
|
-
export declare function useRenderProps<T extends object>(props: RenderPropsBase<T> & {
|
|
40
|
-
defaultClassName?: string;
|
|
41
|
-
}, values: Accessor<T>): Accessor<{
|
|
42
|
-
children: JSX.Element;
|
|
43
|
-
class: string;
|
|
44
|
-
style: JSX.CSSProperties | undefined;
|
|
45
|
-
}>;
|
|
46
|
-
/**
|
|
47
|
-
* Context value that can be null or the actual value
|
|
48
|
-
*/
|
|
49
|
-
export type ContextValue<T> = T | null;
|
|
50
|
-
/**
|
|
51
|
-
* Creates a context with props and ref merging support
|
|
52
|
-
*/
|
|
53
|
-
export declare function createSlottedContext<T>(): import("solid-js").Context<T | null>;
|
|
54
|
-
/**
|
|
55
|
-
* Use context with null check
|
|
56
|
-
*/
|
|
57
|
-
export declare function useSlottedContext<T>(context: ReturnType<typeof createContext<T | null>>): T | null;
|
|
58
|
-
/**
|
|
59
|
-
* Converts boolean state values to data attributes
|
|
60
|
-
*/
|
|
61
|
-
export declare function dataAttr(value: boolean | undefined): '' | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* Creates data attributes from render props
|
|
64
|
-
*/
|
|
65
|
-
export declare function createDataAttributes<T extends Record<string, boolean | string | undefined>>(values: T): Record<string, string | undefined>;
|
|
66
|
-
/**
|
|
67
|
-
* Remove data attributes from props (for internal use)
|
|
68
|
-
*/
|
|
69
|
-
export declare function removeDataAttributes<T extends Record<string, unknown>>(props: T): T;
|
|
70
|
-
/**
|
|
71
|
-
* Filter DOM props - keep only valid DOM attributes
|
|
72
|
-
*/
|
|
73
|
-
export declare function filterDOMProps<T extends Record<string, unknown>>(props: T, options?: {
|
|
74
|
-
global?: boolean;
|
|
75
|
-
}): Record<string, unknown>;
|
|
76
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/dist/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,KAAK,GAAG,EACR,KAAK,QAAQ,EACb,aAAa,EAGd,MAAM,UAAU,CAAC;AAMlB;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC,CAAC;AAEhF;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,MAAM,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,GAAG,CAAC,aAAa,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,GAAG,CAAC,aAAa,CAAC,CAAC;AAE7F;;GAEG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,yFAAyF;IACzF,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC7B,yGAAyG;IACzG,KAAK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