@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.
package/LICENSE ADDED
@@ -0,0 +1,74 @@
1
+ DevsLab Source-Available License 1.0
2
+
3
+ Copyright (c) 2026 DevsLab. All rights reserved.
4
+
5
+ This license governs the DDS software, design tokens, components, icons,
6
+ documentation, and other materials distributed with this license (the
7
+ "Software").
8
+
9
+ 1. Permitted use
10
+
11
+ Subject to this license, DevsLab grants you a limited, worldwide,
12
+ non-exclusive, non-transferable, revocable, royalty-free right to:
13
+
14
+ - download and install unmodified copies of the Software;
15
+ - use and execute the Software for internal or commercial applications;
16
+ - compile, minify, tree-shake, and bundle unmodified Software solely as a
17
+ technical part of building an application; and
18
+ - distribute the resulting object code only as an inseparable part of that
19
+ application and not as a standalone library, design system, component kit,
20
+ template, or asset collection.
21
+
22
+ Normal application configuration through documented public APIs, design-token
23
+ overrides, CSS custom properties, and component properties is permitted and is
24
+ not considered modification of the Software.
25
+
26
+ 2. Restrictions
27
+
28
+ Except where applicable law does not allow the restriction, you may not:
29
+
30
+ - modify, adapt, translate, reverse engineer, or create derivative works of the
31
+ Software itself;
32
+ - publish, republish, sublicense, sell, rent, host, or redistribute the
33
+ Software or any modified version as a standalone package or downloadable
34
+ collection;
35
+ - use the Software or a substantial portion of it to create or operate a
36
+ competing general-purpose design system, UI kit, component library, icon
37
+ library, token library, template marketplace, or hosted equivalent;
38
+ - remove or alter copyright, license, attribution, or provenance notices; or
39
+ - use DevsLab names, logos, product marks, or trade dress except to make a
40
+ truthful statement that an application uses the Software.
41
+
42
+ No patent, trademark, design, or branding rights are granted except the
43
+ copyright permissions stated in Section 1.
44
+
45
+ 3. Ownership and feedback
46
+
47
+ The Software is licensed, not sold. DevsLab and its licensors retain all
48
+ right, title, and interest in the Software. You grant DevsLab a perpetual,
49
+ worldwide, irrevocable, royalty-free right to use feedback you voluntarily
50
+ provide about the Software.
51
+
52
+ 4. Termination
53
+
54
+ This license terminates automatically if you breach it. Upon termination, you
55
+ must stop using and distributing the Software and delete all copies under your
56
+ control. Sections 2, 3, 5, and 6 survive termination.
57
+
58
+ 5. Disclaimer and limitation of liability
59
+
60
+ THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
61
+ EXPRESS OR IMPLIED, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR
62
+ PURPOSE, TITLE, AND NON-INFRINGEMENT. TO THE MAXIMUM EXTENT PERMITTED BY LAW,
63
+ DEVSLAB WILL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
64
+ CONSEQUENTIAL, EXEMPLARY, OR PUNITIVE DAMAGES, OR FOR LOSS OF DATA, PROFITS,
65
+ REVENUE, OR BUSINESS, ARISING FROM OR RELATED TO THE SOFTWARE.
66
+
67
+ 6. Governing law
68
+
69
+ This license is governed by the laws of the Republic of Korea, excluding
70
+ conflict-of-law rules. The Seoul Central District Court has exclusive
71
+ jurisdiction over disputes arising from this license.
72
+
73
+ This is a source-available license, not an open-source license approved by the
74
+ Open Source Initiative.
package/README.ko.md ADDED
@@ -0,0 +1,16 @@
1
+ # @devslab/dds-solid
2
+
3
+ DDS의 공개 SolidJS 2 primitive 패키지다. 애플리케이션 셸에서
4
+ `@devslab/dds-solid/styles.css`를 한 번 불러오고, 컴포넌트는
5
+ `@devslab/dds-solid`에서 사용한다.
6
+
7
+ 상태형 컴포넌트는 controlled(`value`/`open`/`checked`)와
8
+ uncontrolled(`defaultValue`/`defaultOpen`/`defaultChecked`) 방식을 모두
9
+ 지원한다. Dialog는 포커스 trap·복귀와 Escape·외부 클릭 닫기를 담당하고,
10
+ Tabs는 WAI-ARIA 키보드 모델, ToastProvider는 타이머 수명주기를 담당한다.
11
+ Tooltip은 실제 trigger에 `aria-describedby`를 강제하기 위해 render prop을
12
+ 사용한다.
13
+
14
+ 수동 닫기 컨트롤이 필요한 ToastProvider에는 로케일별 `dismissLabel`을
15
+ 주입한다. 생략하면 기존 provider API는 유지하면서 닫기 컨트롤만 렌더하지
16
+ 않으므로 패키지가 영어 접근성 이름을 임의로 출력하지 않는다.
package/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # @devslab/dds-solid
2
+
3
+ Public SolidJS 2 primitives for DDS. Import `@devslab/dds-solid/styles.css`
4
+ once in the application shell, then consume the native-semantic components from
5
+ `@devslab/dds-solid`.
6
+
7
+ Stateful components accept both controlled (`value`/`open`/`checked`) and
8
+ uncontrolled (`defaultValue`/`defaultOpen`/`defaultChecked`) forms. Dialog owns
9
+ focus trap/return and Escape/outside dismissal; Tabs implements the WAI-ARIA
10
+ keyboard model; ToastProvider owns lifecycle timers; Tooltip requires a render
11
+ prop so `aria-describedby` is always attached to the actual trigger.
12
+
13
+ Pass a localized `dismissLabel` to `ToastProvider` when toasts need a manual
14
+ dismiss control. Omitting it preserves the existing provider API while leaving
15
+ out the control, so the package never emits an English accessible-name fallback.
@@ -0,0 +1,9 @@
1
+ import { type Accessor } from "solid-js";
2
+ export interface ControllableOptions<T> {
3
+ value: Accessor<T | undefined>;
4
+ defaultValue: T;
5
+ onChange: ((value: T) => void) | undefined;
6
+ }
7
+ export type ControllableSetter<T> = (next: T | ((previous: T) => T)) => T;
8
+ export declare function createControllableSignal<T>(options: ControllableOptions<T>): [Accessor<T>, ControllableSetter<T>];
9
+ //# sourceMappingURL=controllable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controllable.d.ts","sourceRoot":"","sources":["../src/controllable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEvD,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC,KAAK,EAAE,QAAQ,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAC/B,YAAY,EAAE,CAAC,CAAC;IAChB,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC5C;AAED,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;AAE1E,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAajH"}
@@ -0,0 +1,53 @@
1
+ import { type JSX, type ParentProps } from "solid-js";
2
+ export type ButtonTone = "primary" | "secondary" | "ghost" | "danger";
3
+ export type ControlSize = "sm" | "md" | "lg";
4
+ export interface ButtonProps extends Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, "class"> {
5
+ class?: string;
6
+ tone?: ButtonTone;
7
+ size?: ControlSize;
8
+ loading?: boolean;
9
+ }
10
+ export declare function Button(props: ParentProps<ButtonProps>): JSX.Element;
11
+ export interface IconButtonProps extends Omit<ButtonProps, "tone" | "children"> {
12
+ "aria-label": string;
13
+ tone?: "ghost" | "secondary" | "danger";
14
+ children: JSX.Element;
15
+ }
16
+ export declare function IconButton(props: IconButtonProps): JSX.Element;
17
+ export interface FieldControlProps {
18
+ id: string;
19
+ "aria-describedby": string | undefined;
20
+ "aria-invalid": "true" | undefined;
21
+ "aria-required": "true" | undefined;
22
+ }
23
+ export interface FieldProps {
24
+ id?: string;
25
+ label: JSX.Element;
26
+ helpText?: JSX.Element;
27
+ error?: JSX.Element;
28
+ required?: boolean;
29
+ class?: string;
30
+ children: JSX.Element | ((props: FieldControlProps) => JSX.Element);
31
+ }
32
+ export declare function Field(props: FieldProps): JSX.Element;
33
+ export interface SelectProps extends Omit<JSX.SelectHTMLAttributes<HTMLSelectElement>, "class"> {
34
+ class?: string;
35
+ invalid?: boolean;
36
+ }
37
+ export declare function Select(props: ParentProps<SelectProps>): JSX.Element;
38
+ interface CheckableProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "checked" | "class" | "onChange" | "role" | "type"> {
39
+ checked?: boolean;
40
+ defaultChecked?: boolean;
41
+ onCheckedChange?: (checked: boolean) => void;
42
+ label: JSX.Element;
43
+ class?: string;
44
+ inputClass?: string;
45
+ }
46
+ export type CheckboxProps = CheckableProps;
47
+ export declare const Checkbox: (props: CheckboxProps) => JSX.Element;
48
+ export type RadioProps = CheckableProps;
49
+ export declare const Radio: (props: RadioProps) => JSX.Element;
50
+ export type SwitchProps = CheckableProps;
51
+ export declare const Switch: (props: SwitchProps) => JSX.Element;
52
+ export {};
53
+ //# sourceMappingURL=controls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../src/controls.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,GAAG,EACR,KAAK,WAAW,EACjB,MAAM,UAAU,CAAC;AAKlB,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC;AACtE,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7C,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC7F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,eAcrD;AAED,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,CAAC;IAC7E,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,GAAG,QAAQ,CAAC;IACxC,QAAQ,EAAE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CAAC;IAC7C,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAwBD,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC;AAC3C,eAAO,MAAM,QAAQ,UAAW,aAAa,gBAA6C,CAAC;AAE3F,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC;AACxC,eAAO,MAAM,KAAK,UAAW,UAAU,gBAA0C,CAAC;AAElF,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC;AACzC,eAAO,MAAM,MAAM,UAAW,WAAW,gBAA2D,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type JSX } from "solid-js";
2
+ export declare const focusable: string;
3
+ export interface DialogProps {
4
+ open?: boolean;
5
+ defaultOpen?: boolean;
6
+ onOpenChange?: (open: boolean) => void;
7
+ title: JSX.Element;
8
+ description?: JSX.Element;
9
+ children: JSX.Element;
10
+ actions?: JSX.Element;
11
+ closeOnEscape?: boolean;
12
+ closeOnOutside?: boolean;
13
+ class?: string;
14
+ id?: string;
15
+ }
16
+ export declare function Dialog(props: DialogProps): JSX.Element;
17
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../src/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,GAAG,EACT,MAAM,UAAU,CAAC;AAKlB,eAAO,MAAM,SAAS,QAOX,CAAC;AAEZ,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC1B,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,eA6ExC"}
package/dist/icon.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { type DdsIconName } from "@devslab/dds-icons";
2
+ import { type JSX } from "solid-js";
3
+ export interface IconProps extends Omit<JSX.SvgSVGAttributes<SVGSVGElement>, "name" | "children"> {
4
+ name: DdsIconName;
5
+ label?: string;
6
+ size?: number | string;
7
+ directional?: boolean;
8
+ }
9
+ export declare function Icon(props: IconProps): JSX.Element;
10
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../src/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAc,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AAIhD,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC/F,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,eAwBpC"}
@@ -0,0 +1,8 @@
1
+ export { createControllableSignal, type ControllableOptions } from "./controllable";
2
+ export { Button, Checkbox, Field, IconButton, Radio, Select, Switch, type ButtonProps, type ButtonTone, type CheckboxProps, type FieldControlProps, type FieldProps, type IconButtonProps, type RadioProps, type SelectProps, type SwitchProps, type ControlSize, } from "./controls";
3
+ export { Dialog, type DialogProps } from "./dialog";
4
+ export { Icon, type IconProps } from "./icon";
5
+ export { Tab, TabList, TabPanel, Tabs, type TabPanelProps, type TabProps, type TabsProps } from "./tabs";
6
+ export { ToastProvider, useToast, type ToastApi, type ToastInput, type ToastProviderProps, type ToastTone } from "./toast";
7
+ export { Tooltip, type TooltipProps, type TooltipTriggerProps } from "./tooltip";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACpF,OAAO,EACL,MAAM,EACN,QAAQ,EACR,KAAK,EACL,UAAU,EACV,KAAK,EACL,MAAM,EACN,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,aAAa,EAAE,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AACzG,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,KAAK,kBAAkB,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3H,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC"}