@lawkit/ui 0.1.33 → 0.1.35

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,57 @@
1
+ export declare const wrapper: string;
2
+ export declare const inputWrapper: import('@vanilla-extract/recipes').RuntimeFn<{
3
+ size: {
4
+ small: {
5
+ height: number;
6
+ padding: `0 var(--${string})`;
7
+ };
8
+ medium: {
9
+ height: number;
10
+ padding: "0 14px";
11
+ };
12
+ large: {
13
+ height: number;
14
+ padding: "0 14px";
15
+ };
16
+ };
17
+ open: {
18
+ true: {
19
+ borderColor: `var(--${string})`;
20
+ boxShadow: `var(--${string})`;
21
+ };
22
+ false: {
23
+ selectors: {
24
+ "&:focus-within": {
25
+ borderColor: `var(--${string})`;
26
+ boxShadow: `var(--${string})`;
27
+ };
28
+ };
29
+ };
30
+ };
31
+ disabled: {
32
+ true: {
33
+ backgroundColor: `var(--${string})`;
34
+ cursor: "not-allowed";
35
+ pointerEvents: "none";
36
+ };
37
+ false: {};
38
+ };
39
+ }>;
40
+ export declare const input: string;
41
+ export declare const suffixGroup: string;
42
+ export declare const divider: string;
43
+ export declare const searchIcon: string;
44
+ export declare const badgesArea: string;
45
+ export declare const badge: string;
46
+ export declare const badgeRemove: string;
47
+ export declare const panel: string;
48
+ export declare const option: import('@vanilla-extract/recipes').RuntimeFn<{
49
+ highlighted: {
50
+ true: {
51
+ backgroundColor: `var(--${string})`;
52
+ color: `var(--${string})`;
53
+ };
54
+ false: {};
55
+ };
56
+ }>;
57
+ export declare const noResult: string;
@@ -0,0 +1,41 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ export interface AutoCompleteOption {
3
+ /** 고유 값 */
4
+ value: string;
5
+ /** 표시 라벨 */
6
+ label: string;
7
+ }
8
+ export type AutoCompleteSize = "small" | "medium" | "large";
9
+ export interface AutoCompleteProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange" | "value"> {
10
+ /** 옵션 목록 */
11
+ options: AutoCompleteOption[];
12
+ /** 다중 선택 모드 */
13
+ multiple?: boolean;
14
+ /** 선택된 값 (single: string, multiple: string[]) */
15
+ value?: string | string[];
16
+ /** 선택 변경 콜백 (single: string, multiple: string[]) */
17
+ onChange?: (value: string | string[], option: AutoCompleteOption) => void;
18
+ /** 입력 텍스트 변경 콜백 (외부 필터링용) */
19
+ onInputChange?: (text: string) => void;
20
+ /** 사이즈 */
21
+ inputSize?: AutoCompleteSize;
22
+ /** 비활성화 */
23
+ disabled?: boolean;
24
+ /** 결과 없을 때 메시지 */
25
+ noResultText?: string;
26
+ /** wrapper className */
27
+ className?: string;
28
+ }
29
+ /**
30
+ * **AutoComplete**
31
+ *
32
+ * 텍스트 입력 시 매칭되는 옵션을 드롭다운으로 표시하는 자동완성 컴포넌트.
33
+ *
34
+ * - `multiple`: false(단일) — input에 선택값 표시 / true(다중) — 아래에 badge 태그
35
+ * - `options`: 전체 옵션 목록
36
+ * - `value`: 선택된 값 (단일: string, 다중: string[])
37
+ * - `onChange`: 옵션 선택 시 콜백
38
+ * - `onInputChange`: 입력 텍스트 변경 콜백 (서버 필터링 등)
39
+ * - `inputSize`: small(30) / medium(38) / large(46)
40
+ */
41
+ export declare function AutoComplete({ options, multiple, value, onChange, onInputChange, inputSize, disabled, noResultText, placeholder, className, ...rest }: AutoCompleteProps): import("react/jsx-runtime").JSX.Element;
@@ -58,6 +58,22 @@ export declare const item: import('@vanilla-extract/recipes').RuntimeFn<{
58
58
  };
59
59
  };
60
60
  };
61
+ /**
62
+ * secondary — inactive: secondary solid 테두리 + secondary 텍스트
63
+ * active: primary tint bg + primary 테두리 + primary 텍스트
64
+ */
65
+ secondary: {
66
+ border: `1px solid var(--${string})`;
67
+ backgroundColor: "transparent";
68
+ color: `var(--${string})`;
69
+ selectors: {
70
+ "&:hover:not([aria-checked='true'])": {
71
+ backgroundColor: "rgba(33, 81, 236, 0.12)";
72
+ borderColor: `var(--${string})`;
73
+ color: `var(--${string})`;
74
+ };
75
+ };
76
+ };
61
77
  };
62
78
  size: {
63
79
  small: {
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- export type RadioButtonGroupVariant = "fill" | "outline" | "subtle";
2
+ export type RadioButtonGroupVariant = "fill" | "outline" | "subtle" | "secondary";
3
3
  export interface RadioButtonGroupItem {
4
4
  value: string;
5
5
  label: string;
@@ -1,3 +1,5 @@
1
+ export { AutoComplete } from './components/AutoComplete';
2
+ export type { AutoCompleteProps, AutoCompleteOption, AutoCompleteSize, } from './components/AutoComplete';
1
3
  export { Alert } from './components/Alert';
2
4
  export type { AlertProps, AlertType, AlertSize, AlertAction, } from './components/Alert';
3
5
  export { Button } from './components/Button';
@@ -4,16 +4,16 @@ export declare const sprinkles: ((props: {
4
4
  tablet?: "flex" | "grid" | "block" | "inline-flex" | "none" | undefined;
5
5
  desktop?: "flex" | "grid" | "block" | "inline-flex" | "none" | undefined;
6
6
  } | undefined) | import('@vanilla-extract/sprinkles').ResponsiveArray<2 | 1 | 3, "flex" | "grid" | "block" | "inline-flex" | "none" | null>;
7
- alignItems?: ("center" | "stretch" | {
8
- mobile?: "center" | "stretch" | undefined;
9
- tablet?: "center" | "stretch" | undefined;
10
- desktop?: "center" | "stretch" | undefined;
11
- } | undefined) | import('@vanilla-extract/sprinkles').ResponsiveArray<2 | 1 | 3, "center" | "stretch" | null>;
12
- justifyContent?: ("center" | "flex-start" | "space-between" | {
13
- mobile?: "center" | "flex-start" | "space-between" | undefined;
14
- tablet?: "center" | "flex-start" | "space-between" | undefined;
15
- desktop?: "center" | "flex-start" | "space-between" | undefined;
16
- } | undefined) | import('@vanilla-extract/sprinkles').ResponsiveArray<2 | 1 | 3, "center" | "flex-start" | "space-between" | null>;
7
+ alignItems?: ("stretch" | "center" | {
8
+ mobile?: "stretch" | "center" | undefined;
9
+ tablet?: "stretch" | "center" | undefined;
10
+ desktop?: "stretch" | "center" | undefined;
11
+ } | undefined) | import('@vanilla-extract/sprinkles').ResponsiveArray<2 | 1 | 3, "stretch" | "center" | null>;
12
+ justifyContent?: ("space-between" | "center" | "flex-start" | {
13
+ mobile?: "space-between" | "center" | "flex-start" | undefined;
14
+ tablet?: "space-between" | "center" | "flex-start" | undefined;
15
+ desktop?: "space-between" | "center" | "flex-start" | undefined;
16
+ } | undefined) | import('@vanilla-extract/sprinkles').ResponsiveArray<2 | 1 | 3, "space-between" | "center" | "flex-start" | null>;
17
17
  width?: ("100%" | {
18
18
  mobile?: "100%" | undefined;
19
19
  tablet?: "100%" | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lawkit/ui",
3
- "version": "0.1.33",
3
+ "version": "0.1.35",
4
4
  "type": "module",
5
5
  "description": "LDS Design System — React component library with design tokens",
6
6
  "main": "./dist/index.js",