@devslab/dds-solid 0.3.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.
@@ -0,0 +1,25 @@
1
+ import { type JSX } from "solid-js";
2
+ export type ToastTone = "success" | "warning" | "danger" | "info";
3
+ export interface ToastInput {
4
+ message: JSX.Element;
5
+ tone?: ToastTone;
6
+ duration?: number;
7
+ }
8
+ export interface ToastRecord extends ToastInput {
9
+ id: string;
10
+ }
11
+ export interface ToastApi {
12
+ show: (toast: ToastInput) => string;
13
+ dismiss: (id: string) => void;
14
+ clear: () => void;
15
+ }
16
+ export interface ToastProviderProps {
17
+ children: JSX.Element;
18
+ defaultDuration?: number;
19
+ /** Localized accessible name for the optional manual dismiss control. */
20
+ dismissLabel?: string | ((toast: ToastRecord) => string);
21
+ class?: string;
22
+ }
23
+ export declare function ToastProvider(props: ToastProviderProps): JSX.Element;
24
+ export declare function useToast(): ToastApi;
25
+ //# sourceMappingURL=toast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../src/toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,GAAG,EACT,MAAM,UAAU,CAAC;AAIlB,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAClE,MAAM,WAAW,UAAU;IAAG,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE;AACzF,MAAM,WAAW,WAAY,SAAQ,UAAU;IAAG,EAAE,EAAE,MAAM,CAAA;CAAE;AAC9D,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,MAAM,CAAC;IACpC,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAID,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yEAAyE;IACzE,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,WAAW,KAAK,MAAM,CAAC,CAAC;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,eA8CtD;AAED,wBAAgB,QAAQ,IAAI,QAAQ,CAInC"}
@@ -0,0 +1,19 @@
1
+ import { type JSX } from "solid-js";
2
+ export interface TooltipTriggerProps {
3
+ "aria-describedby": string;
4
+ onFocus: () => void;
5
+ onBlur: () => void;
6
+ onPointerEnter: () => void;
7
+ onPointerLeave: () => void;
8
+ }
9
+ export interface TooltipProps {
10
+ content: JSX.Element;
11
+ children: (props: TooltipTriggerProps) => JSX.Element;
12
+ open?: boolean;
13
+ defaultOpen?: boolean;
14
+ onOpenChange?: (open: boolean) => void;
15
+ id?: string;
16
+ class?: string;
17
+ }
18
+ export declare function Tooltip(props: TooltipProps): JSX.Element;
19
+ //# sourceMappingURL=tooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../src/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AAKpD,MAAM,WAAW,mBAAmB;IAClC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,GAAG,CAAC,OAAO,CAAC;IACtD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,eAqB1C"}
@@ -0,0 +1,3 @@
1
+ export declare function classes(...values: Array<string | false | null | undefined>): string;
2
+ export declare function describedBy(...ids: Array<string | false | null | undefined>): string | undefined;
3
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,MAAM,CAEnF;AAED,wBAAgB,WAAW,CAAC,GAAG,GAAG,EAAE,KAAK,CAAC,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,MAAM,GAAG,SAAS,CAGhG"}
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@devslab/dds-solid",
3
+ "version": "0.3.0",
4
+ "description": "Accessible SolidJS primitives for the DevsLab Design System",
5
+ "type": "module",
6
+ "license": "SEE LICENSE IN LICENSE",
7
+ "sideEffects": [
8
+ "./styles.css"
9
+ ],
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/devslab-kr/dds.git",
13
+ "directory": "packages/dds-solid"
14
+ },
15
+ "publishConfig": {
16
+ "registry": "https://registry.npmjs.org",
17
+ "access": "public",
18
+ "provenance": true
19
+ },
20
+ "files": [
21
+ "dist",
22
+ "styles.css",
23
+ "README.md",
24
+ "README.ko.md"
25
+ ],
26
+ "main": "./dist/index.js",
27
+ "types": "./dist/index.d.ts",
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/index.d.ts",
31
+ "worker": "./dist/server.js",
32
+ "workerd": "./dist/server.js",
33
+ "node": "./dist/server.js",
34
+ "browser": "./dist/index.js",
35
+ "default": "./dist/index.js"
36
+ },
37
+ "./styles.css": "./styles.css"
38
+ },
39
+ "dependencies": {
40
+ "@devslab/dds-css": "0.3.0",
41
+ "@devslab/dds-icons": "0.3.0",
42
+ "@devslab/dds-tokens": "0.3.0"
43
+ },
44
+ "peerDependencies": {
45
+ "solid-js": "1.9.15"
46
+ },
47
+ "devDependencies": {
48
+ "@types/node": "26.3.0",
49
+ "axe-core": "4.13.0",
50
+ "jsdom": "30.0.1",
51
+ "solid-js": "1.9.15",
52
+ "@testing-library/jest-dom": "6.9.1",
53
+ "typescript": "7.0.2",
54
+ "vite": "8.2.1",
55
+ "vite-plugin-solid": "2.11.14",
56
+ "vitest": "4.1.1"
57
+ },
58
+ "scripts": {
59
+ "build": "vite build && vite build --config vite.server.config.ts && tsc -p tsconfig.build.json --emitDeclarationOnly",
60
+ "check": "tsc -p tsconfig.json --noEmit",
61
+ "test": "vitest run --config vitest.config.ts && vitest run --config vitest.ssr.config.ts",
62
+ "test:a11y": "vitest run --config vitest.config.ts src/__tests__/a11y.test.tsx"
63
+ }
64
+ }
package/styles.css ADDED
@@ -0,0 +1,2 @@
1
+ @import "@devslab/dds-tokens/tokens.css";
2
+ @import "@devslab/dds-css/dds.css";