@devslab/dds-react 0.21.0 → 0.21.2

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/README.ko.md CHANGED
@@ -47,3 +47,16 @@ const StatusPill = createStatusPill({
47
47
  ```
48
48
 
49
49
  Unknown closed-domain status values throw to expose incomplete catalogs. Domains listed in `openDomains` instead show the unknown value as escaped text.
50
+
51
+ ### DatePicker 직접 입력과 저장
52
+
53
+ `value`/`onChange`는 기존과 같이 날짜 전용 `YYYY-MM-DD` 문자열과 명시적 지우기 `''`만 전달합니다. 입력한 날짜가 완전하고 실재하면 즉시 반영하며 잘못되거나 미완성인 입력을 이전 날짜로 치환하지 않습니다. `required`는 실제 입력의 필수 상태로 전달하고, `readOnly`는 편집과 달력 열기를 막습니다. 잠금 전환 시 열린 달력을 닫습니다. 잘못된 저장 기본값은 원문과 오류를 표시합니다.
54
+
55
+ `onValidityChange(state: DatePickerValidity)`는 원문 `inputValue`, `valid`, 사유(`valid`, `required`, `incomplete`, `invalid`, `rangeUnderflow`, `rangeOverflow`)를 전달합니다. 실제 form은 보이는 입력의 custom validity를 사용합니다. API·버튼·단축키 저장은 반드시 이 콜백의 `valid`를 검사하고 canonical `value`를 저장해야 합니다. 첫 콜백 전에는 저장을 막으세요. 잘못된 draft를 표시하는 동안 부모 `value`에는 이전 유효 날짜가 남을 수 있으므로 `value`만으로 유효성을 판단하면 안 됩니다.
56
+
57
+ 엄격한 Gregorian 날짜와 양 끝을 포함한 min/max를 날짜 전용 값으로 검사하며 조용히 보정하지 않습니다. 필수 입력을 비워도 `onChange('')`는 전달하며 validity는 false입니다. 서버의 최종 검증은 유지해야 합니다. 라이브러리 테스트 통과만으로 제품의 저장 요청이 이 검사를 사용하는지 보장하지 않습니다.
58
+ 기본 한국어(`ko`, `ko-KR`)의 표시 형식은 `YYYY/MM/DD`이며 `value`, `onChange`, min/max, `DatePickerValidity.value`는 `YYYY-MM-DD`를 유지합니다. `inputValue`는 화면 원문이므로 API에 저장하거나 소비자에서 구분자를 치환하지 마세요. 유효하지 않거나 미완성인 입력과 필수 빈 값의 callback `value`는 null, 선택 빈 값은 ''입니다. 표시/저장 변환은 DDS 공통에서만 처리하며 시간대 때문에 날짜를 이동하지 않습니다.
59
+
60
+ validity callback은 최초 mount, 의미 있는 입력·제약·외부 값 변경을 보고합니다. invalid/partial 입력은 `onChange`를 호출하지 않으므로 dirty/이탈 방지와 발행 확인 취소도 validity callback에 연결해야 합니다. callback 함수 identity만 바뀌면 같은 결과를 재보고하지 않아 inline setState 루프를 막습니다. 새 편집기는 문서 ID·명시적 reset revision을 key로 새로 mount하고 useCallback으로 안정적인 함수를 사용하세요. 같은 날짜여도 새 keyed 편집기는 초기 결과를 받습니다. 유효할 때 canonical value, invalid일 때 raw inputValue로 pristine 상태를 비교하면 표시 언어만 바뀔 때의 오탐과 소비자 포맷 코드를 피할 수 있습니다. 영문 예제의 keyed editor·baseline·previous 패턴을 참고하세요.
61
+
62
+ 아직 반영되지 않은 로컬 값과 일치하는 부모 값은 해당 발생 건의 응답으로 보고 최신 draft를 유지합니다. B/C/B 반복을 각각 보존하고 blur/Enter 중복 commit을 막습니다. 미반영 목록에 없는 다른 외부 값은 reset으로 처리합니다. 같은 문자열만으로는 미반영 값과 같은 의도적 reset을 응답과 구별할 수 없으므로 명시적 reset은 keyed editor remount를 사용하세요. 로컬 controlled state는 즉시 갱신하고 서버 저장을 분리하세요.
package/README.md CHANGED
@@ -53,3 +53,44 @@ const StatusPill = createStatusPill({
53
53
  ```
54
54
 
55
55
  Unknown closed-domain status values throw to expose incomplete catalogs. Domains listed in `openDomains` instead show the unknown value as escaped text.
56
+
57
+ ### DatePicker manual input and saving
58
+
59
+ `value`/`onChange` remain canonical date-only `YYYY-MM-DD` strings (or intentional clear `''`). Complete real dates commit while typing; invalid/incomplete text stays visible and never becomes a replacement date. `required` forwards native/accessible required state; `readOnly` prevents edits/calendar opening. Locked transitions close the portal. Invalid persisted values render an error without being parsed or cleared.
60
+
61
+ Subscribe to `onValidityChange(state: DatePickerValidity)` for the exact displayed `inputValue`, canonical `value` (or null while invalid), `valid`, and reason (`valid`, `required`, `incomplete`, `invalid`, `rangeUnderflow`, `rangeOverflow`). Native forms use the visible input's custom validity. API/button/shortcut saves MUST also check the callback state; a canonical parent value may still contain the last valid selection while the visible draft is invalid. Start unknown/blocked until the initial callback. Do not infer validity from `value` alone.
62
+
63
+ ```tsx
64
+ const [date, setDate] = useState('2028-02-28');
65
+ const [dateValidity, setDateValidity] = useState<DatePickerValidity | null>(null);
66
+ <DatePicker label="Date" value={date} onChange={setDate}
67
+ required onValidityChange={setDateValidity} />
68
+ // In every save handler (including shortcuts):
69
+ if (!dateValidity?.valid || dateValidity.value === null) return;
70
+ await save({ date: dateValidity.value });
71
+ ```
72
+
73
+ Strict Gregorian dates and inclusive min/max are validated without timezone normalization or silent clamping. Clearing always reports `onChange('')`; required clear remains invalid. Keep authoritative server validation. Library tests alone do not establish that a consumer's request handler uses this guard.
74
+ Korean (`ko`, `ko-KR`, including the default locale) displays `YYYY/MM/DD`; `value`, `onChange`, min/max and `DatePickerValidity.value` remain `YYYY-MM-DD`. Consumers must not replace separators or persist `inputValue`. ISO paste is accepted by the common parser and normalized only once it is a complete valid date. Date-only values do not shift with timeZone.
75
+
76
+ `onValidityChange` reports initially and on semantic draft/constraint/controlled-value changes, including invalid/partial edits that do not emit `onChange`. Use it for dirty/navigation guards and to cancel a pending publish confirmation when input changes. Replacing only the callback function does not replay an identical report: this prevents inline setState render loops. Key the owning editor by document identity/reset revision, and keep callbacks stable with useCallback. A new keyed instance receives a fresh initial report even for an identical date. Compare canonical value for valid dates and the raw inputValue for invalid drafts when tracking the pristine baseline; do not generate a consumer-side display formatter. Remount/reset that baseline only on an intentional editor change/reset.
77
+
78
+ ```tsx
79
+ <PolicyDateEditor key={`${document.id}:${document.revision}`} document={document} />
80
+ // Inside PolicyDateEditor (one editor identity):
81
+ const baseline = useRef<string | undefined>(undefined);
82
+ const previous = useRef<string | undefined>(undefined);
83
+ const onDateValidity = useCallback((state: DatePickerValidity) => {
84
+ setDateValidity(state);
85
+ const stateKey = JSON.stringify(state.valid ? [true, state.value] : [false, state.inputValue]);
86
+ if (baseline.current === undefined) baseline.current = stateKey;
87
+ setDirty(stateKey !== baseline.current);
88
+ if (previous.current !== undefined && previous.current !== stateKey) {
89
+ closePublishConfirmation();
90
+ }
91
+ previous.current = stateKey;
92
+ }, [closePublishConfirmation]); // Keep closePublishConfirmation stable too.
93
+ // Every button/API/shortcut Save checks valid and persists state.value only.
94
+ ```
95
+
96
+ Delayed controlled echoes matching an outstanding local emission acknowledge that occurrence without replacing a newer draft. Repeated B/C/B is retained as three occurrences; duplicate blur/Enter does not emit again. A changed value not among pending emissions is an external reset and clears pending history. The string-only API cannot distinguish an intentional reset to a still-outstanding identical value from its acknowledgement; use a keyed editor remount for an explicit reset. Keep local controlled state synchronous and persist to the server separately. Unacknowledged emissions are retained until acknowledgement, external reset or unmount.
@@ -1,3 +1,11 @@
1
+ export interface DatePickerValidity {
2
+ /** Exact displayed draft; never persist this display text as an API date. */
3
+ inputValue: string;
4
+ /** Valid ISO date, optional empty string, or null when invalid/incomplete. */
5
+ value: string | null;
6
+ valid: boolean;
7
+ reason: 'valid' | 'required' | 'incomplete' | 'invalid' | 'rangeUnderflow' | 'rangeOverflow';
8
+ }
1
9
  export interface DatePickerProps {
2
10
  label: string;
3
11
  /** ISO calendar date (YYYY-MM-DD), or an empty string. */
@@ -6,8 +14,12 @@ export interface DatePickerProps {
6
14
  locale?: string;
7
15
  timeZone?: string;
8
16
  disabled?: boolean;
17
+ readOnly?: boolean;
18
+ required?: boolean;
19
+ /** Initial mount and semantic draft changes, deduped across callback identity changes. Key by editor identity for a fresh initial report. Button/API saves must guard validity and use its canonical value. */
20
+ onValidityChange?: (state: DatePickerValidity) => void;
9
21
  min?: string;
10
22
  max?: string;
11
23
  }
12
- export declare function DatePicker({ label, value, onChange, locale, timeZone, disabled, min, max }: DatePickerProps): import("react").JSX.Element;
24
+ export declare function DatePicker({ label, value, onChange, locale, timeZone, disabled, readOnly, required, onValidityChange, min, max }: DatePickerProps): import("react").JSX.Element;
13
25
  //# sourceMappingURL=date-picker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../src/date-picker.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAC,MAAM,CAAC;IACb,0DAA0D;IAC1D,KAAK,EAAC,MAAM,CAAC;IACb,QAAQ,EAAC,CAAC,KAAK,EAAC,MAAM,KAAG,IAAI,CAAC;IAC9B,MAAM,CAAC,EAAC,MAAM,CAAC;IACf,QAAQ,CAAC,EAAC,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAC,OAAO,CAAC;IAClB,GAAG,CAAC,EAAC,MAAM,CAAC;IACZ,GAAG,CAAC,EAAC,MAAM,CAAC;CACb;AAKD,wBAAgB,UAAU,CAAC,EAAC,KAAK,EAAC,KAAK,EAAC,QAAQ,EAAC,MAAc,EAAC,QAAqB,EAAC,QAAc,EAAC,GAAG,EAAC,GAAG,EAAC,EAAC,eAAe,+BA2B5H"}
1
+ {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../src/date-picker.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC,6EAA6E;IAC7E,UAAU,EAAC,MAAM,CAAC;IAClB,8EAA8E;IAC9E,KAAK,EAAC,MAAM,GAAC,IAAI,CAAC;IAClB,KAAK,EAAC,OAAO,CAAC;IACd,MAAM,EAAC,OAAO,GAAC,UAAU,GAAC,YAAY,GAAC,SAAS,GAAC,gBAAgB,GAAC,eAAe,CAAC;CACnF;AACD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAC,MAAM,CAAC;IACb,0DAA0D;IAC1D,KAAK,EAAC,MAAM,CAAC;IACb,QAAQ,EAAC,CAAC,KAAK,EAAC,MAAM,KAAG,IAAI,CAAC;IAC9B,MAAM,CAAC,EAAC,MAAM,CAAC;IACf,QAAQ,CAAC,EAAC,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAC,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAC,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAC,OAAO,CAAC;IAClB,+MAA+M;IAC/M,gBAAgB,CAAC,EAAC,CAAC,KAAK,EAAC,kBAAkB,KAAG,IAAI,CAAC;IACnD,GAAG,CAAC,EAAC,MAAM,CAAC;IACZ,GAAG,CAAC,EAAC,MAAM,CAAC;CACb;AAkCD,wBAAgB,UAAU,CAAC,EAAC,KAAK,EAAC,KAAK,EAAC,QAAQ,EAAC,MAAc,EAAC,QAAqB,EAAC,QAAc,EAAC,QAAc,EAAC,QAAc,EAAC,gBAAgB,EAAC,GAAG,EAAC,GAAG,EAAC,EAAC,eAAe,+BAyG3K"}
package/dist/index.js CHANGED
@@ -6,39 +6,39 @@ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
6
6
  import { Tabs as _, Tabs as v, useTabsContext as y } from "@ark-ui/react/tabs";
7
7
  import { RadioGroup as b, RadioGroup as x, useRadioGroupContext as S } from "@ark-ui/react/radio-group";
8
8
  import { Dialog as C, Dialog as w } from "@ark-ui/react/dialog";
9
- import { Tooltip as ee, Tooltip as T } from "@ark-ui/react/tooltip";
10
- import { Portal as E } from "@ark-ui/react/portal";
11
- import { directionPolicy as D, icons as te } from "@devslab/dds-icons";
12
- import { Toast as O, Toast as ne, Toaster as k, createToaster as A } from "@ark-ui/react/toast";
13
- import { DatePicker as j, DatePicker as M, parseDate as N } from "@ark-ui/react/date-picker";
9
+ import { Tooltip as T, Tooltip as E } from "@ark-ui/react/tooltip";
10
+ import { Portal as D } from "@ark-ui/react/portal";
11
+ import { directionPolicy as O, icons as k } from "@devslab/dds-icons";
12
+ import { Toast as A, Toast as j, Toaster as M, createToaster as N } from "@ark-ui/react/toast";
13
+ import { DatePicker as P, DatePicker as F, parseDate as I } from "@ark-ui/react/date-picker";
14
14
  //#region src/controls.tsx
15
- var P = (...e) => e.filter(Boolean).join(" "), F = t(function({ tone: e = "primary", size: t = "md", loading: n, disabled: r, type: i = "button", className: a, children: o, ...s }, c) {
15
+ var L = (...e) => e.filter(Boolean).join(" "), R = t(function({ tone: e = "primary", size: t = "md", loading: n, disabled: r, type: i = "button", className: a, children: o, ...s }, c) {
16
16
  return /* @__PURE__ */ g("button", {
17
17
  ...s,
18
18
  ref: c,
19
19
  type: i,
20
20
  disabled: r || n,
21
21
  "aria-busy": n || void 0,
22
- className: P("dds-btn", `dds-btn--${e}`, t !== "md" && `dds-btn--${t}`, a),
22
+ className: L("dds-btn", `dds-btn--${e}`, t !== "md" && `dds-btn--${t}`, a),
23
23
  children: [n && /* @__PURE__ */ h("span", {
24
24
  className: "dds-spinner",
25
25
  "aria-hidden": !0
26
26
  }), o]
27
27
  });
28
- }), I = t(function({ tone: e = "ghost", size: t = "md", loading: n, disabled: r, type: i = "button", className: a, children: o, ...s }, c) {
28
+ }), z = t(function({ tone: e = "ghost", size: t = "md", loading: n, disabled: r, type: i = "button", className: a, children: o, ...s }, c) {
29
29
  return /* @__PURE__ */ h("button", {
30
30
  ...s,
31
31
  ref: c,
32
32
  type: i,
33
33
  disabled: r || n,
34
34
  "aria-busy": n || void 0,
35
- className: P("dds-iconbtn", e !== "ghost" && `dds-iconbtn--${e}`, t !== "md" && `dds-iconbtn--${t}`, a),
35
+ className: L("dds-iconbtn", e !== "ghost" && `dds-iconbtn--${e}`, t !== "md" && `dds-iconbtn--${t}`, a),
36
36
  children: n ? /* @__PURE__ */ h("span", {
37
37
  className: "dds-spinner",
38
38
  "aria-hidden": !0
39
39
  }) : o
40
40
  });
41
- }), L = t(function({ id: e, label: t, helpText: n, error: r, required: a, className: o, children: s, ...c }, u) {
41
+ }), B = t(function({ id: e, label: t, helpText: n, error: r, required: a, className: o, children: s, ...c }, u) {
42
42
  let d = i(), f = e ?? `dds-field-${d}`, p = {
43
43
  id: f,
44
44
  "aria-describedby": [n && `${f}-help`, r && `${f}-error`].filter(Boolean).join(" ") || void 0,
@@ -56,7 +56,7 @@ var P = (...e) => e.filter(Boolean).join(" "), F = t(function({ tone: e = "prima
56
56
  helperText: `${f}-help`,
57
57
  errorText: `${f}-error`
58
58
  },
59
- className: P("dds-field", !!r && "dds-field--error", o),
59
+ className: L("dds-field", !!r && "dds-field--error", o),
60
60
  children: [
61
61
  /* @__PURE__ */ g(l.Label, {
62
62
  htmlFor: f,
@@ -78,18 +78,18 @@ var P = (...e) => e.filter(Boolean).join(" "), F = t(function({ tone: e = "prima
78
78
  })
79
79
  ]
80
80
  });
81
- }), R = t(function({ invalid: e, wrapperClassName: t, className: n, children: r, ...i }, a) {
81
+ }), V = t(function({ invalid: e, wrapperClassName: t, className: n, children: r, ...i }, a) {
82
82
  return /* @__PURE__ */ h("span", {
83
- className: P("dds-select", t),
83
+ className: L("dds-select", t),
84
84
  children: /* @__PURE__ */ h("select", {
85
85
  ...i,
86
86
  ref: a,
87
- className: P("dds-select__input", n),
87
+ className: L("dds-select__input", n),
88
88
  "aria-invalid": e || i["aria-invalid"],
89
89
  children: r
90
90
  })
91
91
  });
92
- }), z = t(function({ kind: e, label: t, checked: n, defaultChecked: r, onCheckedChange: i, id: a, name: o, value: s, disabled: c, required: l, readOnly: u, form: f, className: m, inputClassName: _, onChange: v, ...y }, b) {
92
+ }), H = t(function({ kind: e, label: t, checked: n, defaultChecked: r, onCheckedChange: i, id: a, name: o, value: s, disabled: c, required: l, readOnly: u, form: f, className: m, inputClassName: _, onChange: v, ...y }, b) {
93
93
  let x = e === "switch" ? p.Root : d.Root, S = e === "switch" ? p.Label : d.Label, C = e === "switch" ? p.Context : d.Context, w = e === "switch" ? "dds-switch" : "dds-check";
94
94
  return /* @__PURE__ */ g(x, {
95
95
  checked: n,
@@ -102,7 +102,7 @@ var P = (...e) => e.filter(Boolean).join(" "), F = t(function({ tone: e = "prima
102
102
  required: l,
103
103
  readOnly: u,
104
104
  form: f,
105
- className: P(w, m),
105
+ className: L(w, m),
106
106
  children: [/* @__PURE__ */ h(C, { children: (t) => {
107
107
  let { style: n, defaultChecked: r, ...i } = t.getHiddenInputProps();
108
108
  return /* @__PURE__ */ h("input", {
@@ -115,51 +115,51 @@ var P = (...e) => e.filter(Boolean).join(" "), F = t(function({ tone: e = "prima
115
115
  onClick: (e) => {
116
116
  y.onClick?.(e), e.defaultPrevented || i.onClick?.(e);
117
117
  },
118
- className: P(`${w}__input`, _)
118
+ className: L(`${w}__input`, _)
119
119
  });
120
120
  } }), /* @__PURE__ */ h(S, { children: t })]
121
121
  });
122
- }), B = t((e, t) => /* @__PURE__ */ h(z, {
122
+ }), U = t((e, t) => /* @__PURE__ */ h(H, {
123
123
  ...e,
124
124
  kind: "checkbox",
125
125
  ref: t
126
- })), V = t((e, t) => /* @__PURE__ */ h(z, {
126
+ })), W = t((e, t) => /* @__PURE__ */ h(H, {
127
127
  ...e,
128
128
  kind: "switch",
129
129
  ref: t
130
- })), H = t(function({ label: e, className: t, inputClassName: n, onCheckedChange: r, onChange: i, ...a }, o) {
130
+ })), G = t(function({ label: e, className: t, inputClassName: n, onCheckedChange: r, onChange: i, ...a }, o) {
131
131
  return /* @__PURE__ */ g("label", {
132
- className: P("dds-check", t),
132
+ className: L("dds-check", t),
133
133
  children: [/* @__PURE__ */ h("input", {
134
134
  ...a,
135
135
  ref: o,
136
136
  type: "radio",
137
- className: P("dds-check__input", n),
137
+ className: L("dds-check__input", n),
138
138
  onChange: (e) => {
139
139
  i?.(e), e.defaultPrevented || r?.(e.currentTarget.checked);
140
140
  }
141
141
  }), /* @__PURE__ */ h("span", { children: e })]
142
142
  });
143
- }), U = t(function({ onValueChange: e, unstyled: t, className: n, ...r }, i) {
143
+ }), ee = t(function({ onValueChange: e, unstyled: t, className: n, ...r }, i) {
144
144
  return /* @__PURE__ */ h(v.Root, {
145
145
  ...r,
146
146
  ref: i,
147
147
  onValueChange: (t) => e?.(t.value),
148
- className: P(!t && "dds-tabs-root", n)
148
+ className: L(!t && "dds-tabs-root", n)
149
149
  });
150
- }), W = t(function({ unstyled: e, className: t, ...n }, r) {
150
+ }), te = t(function({ unstyled: e, className: t, ...n }, r) {
151
151
  return /* @__PURE__ */ h(v.List, {
152
152
  ...n,
153
153
  ref: r,
154
- className: P(!e && "dds-tabs", t)
154
+ className: L(!e && "dds-tabs", t)
155
155
  });
156
- }), G = t(function({ unstyled: e, className: t, ...n }, r) {
156
+ }), ne = t(function({ unstyled: e, className: t, ...n }, r) {
157
157
  return /* @__PURE__ */ h(v.Trigger, {
158
158
  ...n,
159
159
  ref: r,
160
- className: P(!e && "dds-tab", t)
160
+ className: L(!e && "dds-tab", t)
161
161
  });
162
- }), K = t(function({ value: e, style: t, ...n }, r) {
162
+ }), re = t(function({ value: e, style: t, ...n }, r) {
163
163
  let i = y().value !== e;
164
164
  return /* @__PURE__ */ h(v.Content, {
165
165
  ...n,
@@ -172,7 +172,7 @@ var P = (...e) => e.filter(Boolean).join(" "), F = t(function({ tone: e = "prima
172
172
  } : t
173
173
  });
174
174
  });
175
- function q({ option: e }) {
175
+ function ie({ option: e }) {
176
176
  let t = S(), { style: n, defaultChecked: r, ...i } = t.getItemHiddenInputProps(e);
177
177
  return /* @__PURE__ */ h("input", {
178
178
  ...i,
@@ -181,14 +181,14 @@ function q({ option: e }) {
181
181
  className: "dds-check__input"
182
182
  });
183
183
  }
184
- var J = t(function({ options: e, label: t, onValueChange: n, className: r, children: i, ...a }, o) {
184
+ var ae = t(function({ options: e, label: t, onValueChange: n, className: r, children: i, ...a }, o) {
185
185
  return /* @__PURE__ */ g(x.Root, {
186
186
  ...a,
187
187
  ref: o,
188
188
  onValueChange: (e) => {
189
189
  e.value !== null && n?.(e.value);
190
190
  },
191
- className: P("dds-radio-group", r),
191
+ className: L("dds-radio-group", r),
192
192
  children: [
193
193
  /* @__PURE__ */ h(x.Label, {
194
194
  className: "dds-field__label",
@@ -198,12 +198,12 @@ var J = t(function({ options: e, label: t, onValueChange: n, className: r, child
198
198
  value: e.value,
199
199
  disabled: e.disabled,
200
200
  className: "dds-check",
201
- children: [/* @__PURE__ */ h(q, { option: e }), /* @__PURE__ */ h(x.ItemText, { children: e.label })]
201
+ children: [/* @__PURE__ */ h(ie, { option: e }), /* @__PURE__ */ h(x.ItemText, { children: e.label })]
202
202
  }, e.value)),
203
203
  i
204
204
  ]
205
205
  });
206
- }), Y = t(function({ title: e, description: t, children: n, actions: r, onOpenChange: i, closeOnOutside: a, portal: o = !0, className: s, overlayClassName: c, contentProps: l, initialFocus: u, finalFocus: d, frame: f, unstyled: p, ..._ }, v) {
206
+ }), oe = t(function({ title: e, description: t, children: n, actions: r, onOpenChange: i, closeOnOutside: a, portal: o = !0, className: s, overlayClassName: c, contentProps: l, initialFocus: u, finalFocus: d, frame: f, unstyled: p, ..._ }, v) {
207
207
  let y = {
208
208
  title: /* @__PURE__ */ h(w.Title, {
209
209
  className: p ? void 0 : "dds-dialog__title",
@@ -219,12 +219,12 @@ var J = t(function({ options: e, label: t, onValueChange: n, className: r, child
219
219
  children: r
220
220
  })
221
221
  }, b = /* @__PURE__ */ h(w.Positioner, {
222
- className: P(!p && "dds-dialog-overlay", c),
222
+ className: L(!p && "dds-dialog-overlay", c),
223
223
  children: /* @__PURE__ */ h(w.Content, {
224
224
  ...l,
225
225
  ref: v,
226
226
  "aria-describedby": t ? l?.["aria-describedby"] : void 0,
227
- className: P(!p && "dds-dialog", s, l?.className),
227
+ className: L(!p && "dds-dialog", s, l?.className),
228
228
  children: f ? f(y) : /* @__PURE__ */ g(m, { children: [
229
229
  y.title,
230
230
  y.description,
@@ -241,23 +241,23 @@ var J = t(function({ options: e, label: t, onValueChange: n, className: r, child
241
241
  finalFocusEl: d ? () => d() ?? null : _.finalFocusEl,
242
242
  lazyMount: !0,
243
243
  unmountOnExit: !0,
244
- children: o ? /* @__PURE__ */ h(E, { children: b }) : b
244
+ children: o ? /* @__PURE__ */ h(D, { children: b }) : b
245
245
  });
246
246
  });
247
- function X({ content: e, children: t, onOpenChange: n, className: r, contentProps: i, ...a }) {
248
- return /* @__PURE__ */ h(T.Root, {
247
+ function se({ content: e, children: t, onOpenChange: n, className: r, contentProps: i, ...a }) {
248
+ return /* @__PURE__ */ h(E.Root, {
249
249
  openDelay: 0,
250
250
  closeDelay: 0,
251
251
  ...a,
252
252
  onOpenChange: (e) => n?.(e.open),
253
253
  children: /* @__PURE__ */ g("span", {
254
- className: P("dds-tooltip", r),
255
- children: [typeof t == "function" ? /* @__PURE__ */ h(T.Context, { children: (e) => t(e.getTriggerProps()) }) : /* @__PURE__ */ h(T.Trigger, {
254
+ className: L("dds-tooltip", r),
255
+ children: [typeof t == "function" ? /* @__PURE__ */ h(E.Context, { children: (e) => t(e.getTriggerProps()) }) : /* @__PURE__ */ h(E.Trigger, {
256
256
  asChild: !0,
257
257
  children: t
258
- }), /* @__PURE__ */ h(E, { children: /* @__PURE__ */ h(T.Positioner, { children: /* @__PURE__ */ h(T.Content, {
258
+ }), /* @__PURE__ */ h(D, { children: /* @__PURE__ */ h(E.Positioner, { children: /* @__PURE__ */ h(E.Content, {
259
259
  ...i,
260
- className: P("dds-tooltip__bubble", i?.className),
260
+ className: L("dds-tooltip__bubble", i?.className),
261
261
  children: e
262
262
  }) }) })]
263
263
  })
@@ -265,8 +265,8 @@ function X({ content: e, children: t, onOpenChange: n, className: r, contentProp
265
265
  }
266
266
  //#endregion
267
267
  //#region src/icon.tsx
268
- var re = t(function({ name: e, label: t, size: n = 24, directional: r, className: i, ...a }, o) {
269
- let s = te[e];
268
+ var ce = t(function({ name: e, label: t, size: n = 24, directional: r, className: i, ...a }, o) {
269
+ let s = k[e];
270
270
  return /* @__PURE__ */ g("svg", {
271
271
  ...a,
272
272
  ref: o,
@@ -281,12 +281,12 @@ var re = t(function({ name: e, label: t, size: n = 24, directional: r, className
281
281
  role: t ? "img" : void 0,
282
282
  "aria-label": t,
283
283
  "aria-hidden": !t || void 0,
284
- className: P((r ?? D.mirrorInRtl.includes(e)) && D.cssClass, i),
284
+ className: L((r ?? O.mirrorInRtl.includes(e)) && O.cssClass, i),
285
285
  children: [t && /* @__PURE__ */ h("title", { children: t }), /* @__PURE__ */ h("g", { dangerouslySetInnerHTML: { __html: s.body } })]
286
286
  });
287
- }), Z = e(null);
288
- function ie({ children: e, defaultDuration: t = 5e3, dismissLabel: n, regionLabel: s, className: c }) {
289
- let l = i(), u = o(0), d = a(() => A({
287
+ }), K = e(null);
288
+ function le({ children: e, defaultDuration: t = 5e3, dismissLabel: n, regionLabel: s, className: c }) {
289
+ let l = i(), u = o(0), d = a(() => N({
290
290
  placement: "bottom-end",
291
291
  overlap: !1,
292
292
  gap: 8,
@@ -314,20 +314,20 @@ function ie({ children: e, defaultDuration: t = 5e3, dismissLabel: n, regionLabe
314
314
  l,
315
315
  t
316
316
  ]);
317
- return r(() => () => d.remove(), [d]), /* @__PURE__ */ g(Z.Provider, {
317
+ return r(() => () => d.remove(), [d]), /* @__PURE__ */ g(K.Provider, {
318
318
  value: f,
319
- children: [e, /* @__PURE__ */ h(k, {
319
+ children: [e, /* @__PURE__ */ h(M, {
320
320
  toaster: d,
321
321
  label: s ?? "",
322
322
  "aria-label": s ?? "",
323
323
  role: s ? "region" : "presentation",
324
- className: P("dds-toast-region", c),
324
+ className: L("dds-toast-region", c),
325
325
  children: (e) => {
326
326
  let t = e.meta?.dds;
327
- return /* @__PURE__ */ g(O.Root, {
328
- className: P("dds-toast", `dds-toast--${t.tone ?? "info"}`),
327
+ return /* @__PURE__ */ g(A.Root, {
328
+ className: L("dds-toast", `dds-toast--${t.tone ?? "info"}`),
329
329
  role: t.tone === "danger" ? "alert" : "status",
330
- children: [/* @__PURE__ */ h(O.Description, { children: e.description }), n && /* @__PURE__ */ h(O.CloseTrigger, {
330
+ children: [/* @__PURE__ */ h(A.Description, { children: e.description }), n && /* @__PURE__ */ h(A.CloseTrigger, {
331
331
  className: "dds-iconbtn dds-iconbtn--sm",
332
332
  "aria-label": typeof n == "function" ? n(t) : n,
333
333
  children: "×"
@@ -337,17 +337,17 @@ function ie({ children: e, defaultDuration: t = 5e3, dismissLabel: n, regionLabe
337
337
  })]
338
338
  });
339
339
  }
340
- function ae() {
341
- let e = n(Z);
340
+ function ue() {
341
+ let e = n(K);
342
342
  if (!e) throw Error("useToast must be called inside <ToastProvider>");
343
343
  return e;
344
344
  }
345
345
  //#endregion
346
346
  //#region src/console-shell.tsx
347
- function oe(e, t) {
347
+ function de(e, t) {
348
348
  return t.active ?? (t.href.split("/").filter(Boolean).length <= 1 ? e === t.href : e === t.href || e.startsWith(`${t.href}/`));
349
349
  }
350
- var se = t(function({ surface: e, activePath: t, brand: n, context: a, nav: o, labels: c, header: l, foot: u, children: d, className: f, ...p }, m) {
350
+ var fe = t(function({ surface: e, activePath: t, brand: n, context: a, nav: o, labels: c, header: l, foot: u, children: d, className: f, ...p }, m) {
351
351
  let [_, v] = s(!1), [y, b] = s(!1), x = i(), S = `dds-console-rail-${x}`, C = `dds-console-main-${x}`;
352
352
  return r(() => {
353
353
  b(!0);
@@ -358,7 +358,7 @@ var se = t(function({ surface: e, activePath: t, brand: n, context: a, nav: o, l
358
358
  }, []), /* @__PURE__ */ g("div", {
359
359
  ...p,
360
360
  ref: m,
361
- className: P("dds-console-shell", f),
361
+ className: L("dds-console-shell", f),
362
362
  "data-surface": e,
363
363
  "data-hydrated": y ? "true" : void 0,
364
364
  children: [
@@ -417,7 +417,7 @@ var se = t(function({ surface: e, activePath: t, brand: n, context: a, nav: o, l
417
417
  className: "dds-console-rail__item",
418
418
  "data-nav": `${e}.${n.id}`,
419
419
  href: n.href,
420
- "aria-current": oe(t, n) ? "page" : void 0,
420
+ "aria-current": de(t, n) ? "page" : void 0,
421
421
  onClick: () => v(!1),
422
422
  children: [/* @__PURE__ */ h("span", { children: n.label }), n.badge !== void 0 && n.badge > 0 && /* @__PURE__ */ h("span", {
423
423
  className: "dds-console-rail__badge",
@@ -456,7 +456,7 @@ var se = t(function({ surface: e, activePath: t, brand: n, context: a, nav: o, l
456
456
  });
457
457
  //#endregion
458
458
  //#region src/date-picker.tsx
459
- function Q() {
459
+ function pe() {
460
460
  return /* @__PURE__ */ g("svg", {
461
461
  width: "20",
462
462
  height: "20",
@@ -474,7 +474,7 @@ function Q() {
474
474
  }), /* @__PURE__ */ h("path", { d: "M7.5 3v5M16.5 3v5M3.5 10.5h17" })]
475
475
  });
476
476
  }
477
- function $({ next: e = !1 }) {
477
+ function q({ next: e = !1 }) {
478
478
  return /* @__PURE__ */ h("svg", {
479
479
  width: "18",
480
480
  height: "18",
@@ -486,15 +486,112 @@ function $({ next: e = !1 }) {
486
486
  children: /* @__PURE__ */ h("path", { d: e ? "m9 5 7 7-7 7" : "m15 5-7 7 7 7" })
487
487
  });
488
488
  }
489
- function ce({ label: e, value: t, onChange: n, locale: r = "ko-KR", timeZone: i = "Asia/Seoul", disabled: a = !1, min: o, max: s }) {
490
- return /* @__PURE__ */ h(L, {
489
+ function J(e) {
490
+ if (!/^\d{4}-\d{2}-\d{2}$/.test(e)) return !1;
491
+ let t = Number(e.slice(0, 4)), n = Number(e.slice(5, 7)), r = Number(e.slice(8, 10));
492
+ return t < 1 || n < 1 || n > 12 || r < 1 ? !1 : r <= [
493
+ 31,
494
+ t % 4 == 0 && (t % 100 != 0 || t % 400 == 0) ? 29 : 28,
495
+ 31,
496
+ 30,
497
+ 31,
498
+ 30,
499
+ 31,
500
+ 31,
501
+ 30,
502
+ 31,
503
+ 30,
504
+ 31
505
+ ][n - 1];
506
+ }
507
+ function Y(e) {
508
+ return /^ko(?:-|$)/i.test(e);
509
+ }
510
+ function X(e, t) {
511
+ return Y(t) && J(e) ? e.replaceAll("-", "/") : e;
512
+ }
513
+ function Z(e, t) {
514
+ return Y(t) && /^\d{4}\/\d{2}\/\d{2}$/.test(e) ? e.replaceAll("/", "-") : e;
515
+ }
516
+ function Q(e, t, n, r, i = "en-US") {
517
+ let a = Z(e, i), o = e.length < 10 && (/^\d{0,4}(?:-\d{0,2}(?:-\d{0,2})?)?$/.test(e) || Y(i) && /^\d{0,4}(?:\/\d{0,2}(?:\/\d{0,2})?)?$/.test(e)), s = "valid";
518
+ return e === "" ? s = t ? "required" : "valid" : J(a) ? n && !J(n) || r && !J(r) || n && r && n > r ? s = "invalid" : n && a < n ? s = "rangeUnderflow" : r && a > r && (s = "rangeOverflow") : s = o ? "incomplete" : "invalid", {
519
+ inputValue: e,
520
+ value: s === "valid" ? a : null,
521
+ valid: s === "valid",
522
+ reason: s
523
+ };
524
+ }
525
+ function $(e) {
526
+ return J(e) ? [I(e)] : [];
527
+ }
528
+ function me({ label: e, value: t, onChange: n, locale: i = "ko-KR", timeZone: a = "Asia/Seoul", disabled: c = !1, readOnly: l = !1, required: u = !1, onValidityChange: d, min: f, max: p }) {
529
+ let [_, v] = s(() => X(t, i)), [y, b] = s(() => $(t)), [x, S] = s(!1), C = o(null), w = o(!1), T = o(t), E = o(i), O = o([]), k = o(t), A = o(""), j = Z(_, E.current), M = E.current !== i && J(j) ? X(j, i) : _, N = Q(M, u, f, p, i), P = N.valid ? void 0 : i.toLowerCase().startsWith("ko") ? N.reason === "required" ? "날짜를 입력해 주세요." : "YYYY/MM/DD 형식의 유효한 범위 내 날짜를 입력해 주세요." : N.reason === "required" ? "Enter a date." : "Enter a valid date within the allowed range (YYYY-MM-DD).";
530
+ r(() => {
531
+ let e = E.current;
532
+ if (E.current = i, T.current === t) {
533
+ e !== i && v(M);
534
+ return;
535
+ }
536
+ T.current = t;
537
+ let n = O.current.indexOf(t);
538
+ if (n !== -1) {
539
+ O.current.splice(n, 1);
540
+ return;
541
+ }
542
+ O.current = [], k.current = t, v(X(t, i)), (t === "" || J(t)) && b($(t));
543
+ }, [t, i]), r(() => {
544
+ C.current?.setCustomValidity(P ?? "");
545
+ let e = JSON.stringify(N);
546
+ d && A.current !== e && (A.current = e, d(N));
547
+ }, [
548
+ _,
549
+ u,
550
+ f,
551
+ p,
552
+ i,
553
+ P,
554
+ d
555
+ ]), r(() => {
556
+ (c || l) && (w.current = !1, S(!1));
557
+ }, [c, l]), r(() => {
558
+ if (!w.current || c || l) return;
559
+ let e = requestAnimationFrame(() => {
560
+ w.current = !1, C.current?.focus({ preventScroll: !0 });
561
+ });
562
+ return () => cancelAnimationFrame(e);
563
+ }, [
564
+ x,
565
+ y,
566
+ c,
567
+ l
568
+ ]);
569
+ function L(e) {
570
+ let t = Q(e, u, f, p, i);
571
+ if (e !== "" && !t.valid) return;
572
+ let r = e === "" ? "" : t.value;
573
+ b($(r)), r !== k.current && (k.current = r, O.current.push(r), n(r));
574
+ }
575
+ function z(e) {
576
+ v(e);
577
+ let t = Q(e, u, f, p, i);
578
+ C.current?.setCustomValidity(t.valid ? "" : P ?? "Enter a valid date (YYYY-MM-DD)."), (e === "" || t.valid) && (v(X(t.value ?? "", i)), L(e));
579
+ }
580
+ return /* @__PURE__ */ h(B, {
491
581
  label: e,
492
- children: (c) => /* @__PURE__ */ g(M.Root, {
493
- locale: r,
494
- timeZone: i,
495
- disabled: a,
496
- min: o ? N(o) : void 0,
497
- max: s ? N(s) : void 0,
582
+ required: u,
583
+ error: P,
584
+ children: (t) => /* @__PURE__ */ g(F.Root, {
585
+ locale: i,
586
+ timeZone: a,
587
+ disabled: c,
588
+ readOnly: l,
589
+ required: u,
590
+ invalid: !N.valid,
591
+ open: x && !c && !l,
592
+ onOpenChange: (e) => S(e.open && !c && !l),
593
+ min: f && J(f) ? I(f) : void 0,
594
+ max: p && J(p) ? I(p) : void 0,
498
595
  startOfWeek: 0,
499
596
  minView: "day",
500
597
  maxView: "day",
@@ -503,79 +600,104 @@ function ce({ label: e, value: t, onChange: n, locale: r = "ko-KR", timeZone: i
503
600
  dayCell: (e) => `${e.valueText} 선택`,
504
601
  clearTrigger: "선택 날짜 지우기"
505
602
  },
506
- value: t ? [N(t)] : [],
507
- format: (e) => e.toString(),
508
- onValueChange: (e) => n(e.valueAsString[0] || ""),
603
+ value: y,
604
+ format: (e) => X(e.toString(), i),
605
+ onValueChange: (e) => {
606
+ let t = e.value[0]?.toString() || "";
607
+ t !== "" && !Q(t, u, f, p, i).valid || (w.current = !0, v(X(t, i)), L(t));
608
+ },
509
609
  positioning: {
510
610
  placement: "bottom-start",
511
611
  gutter: 8
512
612
  },
513
- children: [/* @__PURE__ */ g(M.Control, {
613
+ children: [/* @__PURE__ */ g(F.Control, {
514
614
  className: "dds-date-picker-control",
515
- children: [/* @__PURE__ */ h(M.Input, {
516
- ...c,
517
- placeholder: "YYYY-MM-DD",
518
- autoComplete: "off"
519
- }), /* @__PURE__ */ h(M.Trigger, {
615
+ children: [/* @__PURE__ */ h("input", {
616
+ ...t,
617
+ ref: C,
618
+ type: "text",
619
+ value: M,
620
+ onChange: () => {},
621
+ required: u,
622
+ readOnly: l,
623
+ disabled: c,
624
+ placeholder: Y(i) ? "YYYY/MM/DD" : "YYYY-MM-DD",
625
+ autoComplete: "off",
626
+ autoCorrect: "off",
627
+ spellCheck: !1,
628
+ onInputCapture: (e) => {
629
+ c || l || (e.stopPropagation(), z(e.currentTarget.value));
630
+ },
631
+ onBlur: () => {
632
+ !c && !l && L(M);
633
+ },
634
+ onKeyDownCapture: (e) => {
635
+ e.key === "Enter" && !e.nativeEvent.isComposing && (e.preventDefault(), e.stopPropagation(), !c && !l && L(M));
636
+ }
637
+ }), /* @__PURE__ */ h(F.Trigger, {
520
638
  asChild: !0,
521
- children: /* @__PURE__ */ h(F, {
639
+ children: /* @__PURE__ */ h(R, {
522
640
  type: "button",
523
641
  tone: "secondary",
524
642
  "aria-label": `${e} 달력 열기`,
525
- children: /* @__PURE__ */ h(Q, {})
643
+ children: /* @__PURE__ */ h(pe, {})
526
644
  })
527
645
  })]
528
- }), /* @__PURE__ */ h(E, { children: /* @__PURE__ */ h(M.Positioner, {
646
+ }), /* @__PURE__ */ h(D, { children: /* @__PURE__ */ h(F.Positioner, {
529
647
  className: "dds-date-picker-positioner",
530
- children: /* @__PURE__ */ h(M.Content, {
648
+ children: /* @__PURE__ */ h(F.Content, {
531
649
  className: "dds-date-picker-content",
532
650
  "aria-label": `${e} 날짜 선택`,
533
- children: /* @__PURE__ */ h(M.View, {
651
+ children: /* @__PURE__ */ h(F.View, {
534
652
  view: "day",
535
- children: /* @__PURE__ */ h(M.Context, { children: (e) => /* @__PURE__ */ g(m, { children: [
536
- /* @__PURE__ */ g(M.ViewControl, {
653
+ children: /* @__PURE__ */ h(F.Context, { children: (e) => /* @__PURE__ */ g(m, { children: [
654
+ /* @__PURE__ */ g(F.ViewControl, {
537
655
  className: "dds-date-picker-header",
538
656
  children: [
539
- /* @__PURE__ */ h(M.PrevTrigger, {
657
+ /* @__PURE__ */ h(F.PrevTrigger, {
540
658
  asChild: !0,
541
- children: /* @__PURE__ */ h(F, {
659
+ children: /* @__PURE__ */ h(R, {
542
660
  type: "button",
543
661
  tone: "secondary",
544
662
  "aria-label": "이전 달",
545
- children: /* @__PURE__ */ h($, {})
663
+ children: /* @__PURE__ */ h(q, {})
546
664
  })
547
665
  }),
548
- /* @__PURE__ */ h(M.RangeText, {}),
549
- /* @__PURE__ */ h(M.NextTrigger, {
666
+ /* @__PURE__ */ h(F.RangeText, {}),
667
+ /* @__PURE__ */ h(F.NextTrigger, {
550
668
  asChild: !0,
551
- children: /* @__PURE__ */ h(F, {
669
+ children: /* @__PURE__ */ h(R, {
552
670
  type: "button",
553
671
  tone: "secondary",
554
672
  "aria-label": "다음 달",
555
- children: /* @__PURE__ */ h($, { next: !0 })
673
+ children: /* @__PURE__ */ h(q, { next: !0 })
556
674
  })
557
675
  })
558
676
  ]
559
677
  }),
560
- /* @__PURE__ */ g(M.Table, {
678
+ /* @__PURE__ */ g(F.Table, {
561
679
  className: "dds-date-picker-table",
562
- children: [/* @__PURE__ */ h(M.TableHead, { children: /* @__PURE__ */ h(M.TableRow, { children: e.weekDays.map((e, t) => /* @__PURE__ */ h(M.TableHeader, { children: e.short }, t)) }) }), /* @__PURE__ */ h(M.TableBody, { children: e.weeks.map((e, t) => /* @__PURE__ */ h(M.TableRow, { children: e.map((e) => /* @__PURE__ */ h(M.TableCell, {
680
+ children: [/* @__PURE__ */ h(F.TableHead, { children: /* @__PURE__ */ h(F.TableRow, { children: e.weekDays.map((e, t) => /* @__PURE__ */ h(F.TableHeader, { children: e.short }, t)) }) }), /* @__PURE__ */ h(F.TableBody, { children: e.weeks.map((e, t) => /* @__PURE__ */ h(F.TableRow, { children: e.map((e) => /* @__PURE__ */ h(F.TableCell, {
563
681
  value: e,
564
- children: /* @__PURE__ */ h(M.TableCellTrigger, { children: e.day })
682
+ children: /* @__PURE__ */ h(F.TableCellTrigger, { children: e.day })
565
683
  }, e.toString())) }, t)) })]
566
684
  }),
567
685
  /* @__PURE__ */ g("div", {
568
686
  className: "dds-date-picker-footer",
569
- children: [/* @__PURE__ */ h(F, {
687
+ children: [/* @__PURE__ */ h(R, {
570
688
  type: "button",
571
689
  tone: "secondary",
572
690
  onClick: () => e.selectToday(),
573
691
  children: "오늘"
574
- }), /* @__PURE__ */ h(M.ClearTrigger, {
692
+ }), /* @__PURE__ */ h(F.ClearTrigger, {
693
+ hidden: !1,
575
694
  asChild: !0,
576
- children: /* @__PURE__ */ h(F, {
695
+ children: /* @__PURE__ */ h(R, {
577
696
  type: "button",
578
697
  tone: "secondary",
698
+ onClick: () => {
699
+ !c && !l && (v(""), L(""));
700
+ },
579
701
  children: "지우기"
580
702
  })
581
703
  })]
@@ -589,7 +711,7 @@ function ce({ label: e, value: t, onChange: n, locale: r = "ko-KR", timeZone: i
589
711
  }
590
712
  //#endregion
591
713
  //#region src/status-pill.tsx
592
- function le(e) {
714
+ function he(e) {
593
715
  let t = new Set(e.openDomains ?? []);
594
716
  return function(n) {
595
717
  let r = e.tones[n.domain]?.[n.value], i = e.label(n.domain, n.value, n.locale);
@@ -609,6 +731,6 @@ function le(e) {
609
731
  };
610
732
  }
611
733
  //#endregion
612
- export { u as ArkCheckbox, j as ArkDatePicker, C as ArkDialog, c as ArkField, b as ArkRadioGroup, f as ArkSwitch, _ as ArkTabs, ne as ArkToast, ee as ArkTooltip, F as Button, B as Checkbox, se as ConsoleShell, ce as DatePicker, Y as Dialog, L as Field, re as Icon, I as IconButton, H as Radio, J as RadioGroup, R as Select, V as Switch, G as Tab, W as TabList, K as TabPanel, U as Tabs, ie as ToastProvider, X as Tooltip, P as classes, le as createStatusPill, ae as useToast };
734
+ export { u as ArkCheckbox, P as ArkDatePicker, C as ArkDialog, c as ArkField, b as ArkRadioGroup, f as ArkSwitch, _ as ArkTabs, j as ArkToast, T as ArkTooltip, R as Button, U as Checkbox, fe as ConsoleShell, me as DatePicker, oe as Dialog, B as Field, ce as Icon, z as IconButton, G as Radio, ae as RadioGroup, V as Select, W as Switch, ne as Tab, te as TabList, re as TabPanel, ee as Tabs, le as ToastProvider, se as Tooltip, L as classes, he as createStatusPill, ue as useToast };
613
735
 
614
736
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/controls.tsx","../src/selection.tsx","../src/overlays.tsx","../src/icon.tsx","../src/toast.tsx","../src/console-shell.tsx","../src/date-picker.tsx","../src/status-pill.tsx"],"sourcesContent":["import {\n forwardRef,\n useId,\n type ButtonHTMLAttributes,\n type InputHTMLAttributes,\n type SelectHTMLAttributes,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { Field as ArkField } from \"@ark-ui/react/field\";\nimport { Checkbox as ArkCheckbox } from \"@ark-ui/react/checkbox\";\nimport { Switch as ArkSwitch } from \"@ark-ui/react/switch\";\nexport const classes = (...values: (string | false | undefined)[]) =>\n values.filter(Boolean).join(\" \");\nexport type ButtonTone = \"primary\" | \"secondary\" | \"ghost\" | \"danger\";\nexport type ControlSize = \"sm\" | \"md\" | \"lg\";\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n tone?: ButtonTone;\n size?: ControlSize;\n loading?: boolean;\n}\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n function Button(\n {\n tone = \"primary\",\n size = \"md\",\n loading,\n disabled,\n type = \"button\",\n className,\n children,\n ...rest\n },\n ref\n ) {\n return (\n <button\n {...rest}\n ref={ref}\n type={type}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n className={classes(\n \"dds-btn\",\n `dds-btn--${tone}`,\n size !== \"md\" && `dds-btn--${size}`,\n className\n )}\n >\n {loading && <span className=\"dds-spinner\" aria-hidden />}\n {children}\n </button>\n );\n }\n);\nexport interface IconButtonProps extends Omit<ButtonProps, \"tone\"> {\n \"aria-label\": string;\n tone?: \"ghost\" | \"secondary\" | \"danger\";\n}\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n function IconButton(\n {\n tone = \"ghost\",\n size = \"md\",\n loading,\n disabled,\n type = \"button\",\n className,\n children,\n ...rest\n },\n ref\n ) {\n return (\n <button\n {...rest}\n ref={ref}\n type={type}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n className={classes(\n \"dds-iconbtn\",\n tone !== \"ghost\" && `dds-iconbtn--${tone}`,\n size !== \"md\" && `dds-iconbtn--${size}`,\n className\n )}\n >\n {loading ? <span className=\"dds-spinner\" aria-hidden /> : children}\n </button>\n );\n }\n);\nexport interface FieldControlProps {\n id: string;\n \"aria-describedby\"?: string;\n \"aria-invalid\"?: true;\n \"aria-required\"?: true;\n}\nexport interface FieldProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"children\"> {\n label: ReactNode;\n helpText?: ReactNode;\n error?: ReactNode;\n required?: boolean;\n children: ReactNode | ((props: FieldControlProps) => ReactNode);\n}\nexport const Field = forwardRef<HTMLDivElement, FieldProps>(function Field(\n {\n id: requested,\n label,\n helpText,\n error,\n required,\n className,\n children,\n ...rest\n },\n ref\n) {\n const generated = useId();\n const id = requested ?? `dds-field-${generated}`;\n const control: FieldControlProps = {\n id,\n \"aria-describedby\":\n [helpText && `${id}-help`, error && `${id}-error`]\n .filter(Boolean)\n .join(\" \") || undefined,\n \"aria-invalid\": error ? true : undefined,\n \"aria-required\": required ? true : undefined,\n };\n return (\n <ArkField.Root\n {...rest}\n ref={ref}\n invalid={Boolean(error)}\n required={required}\n id={id}\n ids={{\n control: `${id}-root`,\n helperText: `${id}-help`,\n errorText: `${id}-error`,\n }}\n className={classes(\n \"dds-field\",\n Boolean(error) && \"dds-field--error\",\n className\n )}\n >\n <ArkField.Label htmlFor={id} className=\"dds-field__label\">\n {label}\n {required && <span aria-hidden> *</span>}\n </ArkField.Label>\n {typeof children === \"function\" ? children(control) : children}\n {helpText && (\n <ArkField.HelperText className=\"dds-field__help\">\n {helpText}\n </ArkField.HelperText>\n )}\n {error && (\n <ArkField.ErrorText className=\"dds-field__error\" role=\"alert\">\n {error}\n </ArkField.ErrorText>\n )}\n </ArkField.Root>\n );\n});\nexport interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {\n invalid?: boolean;\n wrapperClassName?: string;\n}\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(\n function Select(\n { invalid, wrapperClassName, className, children, ...rest },\n ref\n ) {\n return (\n <span className={classes(\"dds-select\", wrapperClassName)}>\n <select\n {...rest}\n ref={ref}\n className={classes(\"dds-select__input\", className)}\n aria-invalid={invalid || rest[\"aria-invalid\"]}\n >\n {children}\n </select>\n </span>\n );\n }\n);\nexport interface CheckboxProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"type\" | \"children\"> {\n label: ReactNode;\n onCheckedChange?: (checked: boolean) => void;\n inputClassName?: string;\n}\nexport type RadioProps = CheckboxProps;\nexport type SwitchProps = CheckboxProps;\nconst Checkable = forwardRef<\n HTMLInputElement,\n CheckboxProps & { kind: \"checkbox\" | \"switch\" }\n>(function Checkable(\n {\n kind,\n label,\n checked,\n defaultChecked,\n onCheckedChange,\n id,\n name,\n value,\n disabled,\n required,\n readOnly,\n form,\n className,\n inputClassName,\n onChange,\n ...rest\n },\n ref\n) {\n const Root = kind === \"switch\" ? ArkSwitch.Root : ArkCheckbox.Root;\n const Label = kind === \"switch\" ? ArkSwitch.Label : ArkCheckbox.Label;\n const Context = kind === \"switch\" ? ArkSwitch.Context : ArkCheckbox.Context;\n const base = kind === \"switch\" ? \"dds-switch\" : \"dds-check\";\n return (\n <Root\n checked={checked}\n defaultChecked={defaultChecked}\n onCheckedChange={(details) => onCheckedChange?.(details.checked === true)}\n ids={id ? { hiddenInput: id } : undefined}\n name={name}\n value={String(value ?? \"on\")}\n disabled={disabled}\n required={required}\n readOnly={readOnly}\n form={form}\n className={classes(base, className)}\n >\n <Context>\n {(api) => {\n // DDS styles the actual input. Keep Ark's events and state, but omit\n // its visually hidden style and use React's controlled checked prop\n // so a caller-declined change also restores the native DOM value.\n const {\n style: _,\n defaultChecked: __,\n ...inputProps\n } = api.getHiddenInputProps();\n return (\n <input\n {...inputProps}\n {...rest}\n ref={ref}\n checked={api.checked}\n role={kind === \"switch\" ? \"switch\" : undefined}\n onChange={onChange ?? (() => {})}\n onClick={(event) => {\n rest.onClick?.(event);\n if (!event.defaultPrevented) inputProps.onClick?.(event);\n }}\n className={classes(`${base}__input`, inputClassName)}\n />\n );\n }}\n </Context>\n <Label>{label}</Label>\n </Root>\n );\n});\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (props, ref) => <Checkable {...props} kind=\"checkbox\" ref={ref} />\n);\nexport const Switch = forwardRef<HTMLInputElement, SwitchProps>(\n (props, ref) => <Checkable {...props} kind=\"switch\" ref={ref} />\n);\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(function Radio(\n { label, className, inputClassName, onCheckedChange, onChange, ...rest },\n ref\n) {\n return (\n <label className={classes(\"dds-check\", className)}>\n <input\n {...rest}\n ref={ref}\n type=\"radio\"\n className={classes(\"dds-check__input\", inputClassName)}\n onChange={(event) => {\n onChange?.(event);\n if (!event.defaultPrevented)\n onCheckedChange?.(event.currentTarget.checked);\n }}\n />\n <span>{label}</span>\n </label>\n );\n});\n","import { forwardRef, type ComponentProps, type ReactNode } from \"react\";\nimport { Tabs as ArkTabs, useTabsContext } from \"@ark-ui/react/tabs\";\nimport {\n RadioGroup as ArkRadioGroup,\n useRadioGroupContext,\n} from \"@ark-ui/react/radio-group\";\nimport { classes } from \"./controls\";\nexport interface TabsProps\n extends Omit<ComponentProps<typeof ArkTabs.Root>, \"onValueChange\"> {\n onValueChange?: (value: string) => void;\n unstyled?: boolean;\n}\nexport const Tabs = forwardRef<HTMLDivElement, TabsProps>(function Tabs(\n { onValueChange, unstyled, className, ...rest },\n ref\n) {\n return (\n <ArkTabs.Root\n {...rest}\n ref={ref}\n onValueChange={(details) => onValueChange?.(details.value)}\n className={classes(!unstyled && \"dds-tabs-root\", className)}\n />\n );\n});\nexport type TabProps = ComponentProps<typeof ArkTabs.Trigger> & {\n unstyled?: boolean;\n};\nexport type TabPanelProps = ComponentProps<typeof ArkTabs.Content>;\nexport const TabList = forwardRef<\n HTMLDivElement,\n ComponentProps<typeof ArkTabs.List> & { unstyled?: boolean }\n>(function TabList({ unstyled, className, ...rest }, ref) {\n return (\n <ArkTabs.List\n {...rest}\n ref={ref}\n className={classes(!unstyled && \"dds-tabs\", className)}\n />\n );\n});\nexport const Tab = forwardRef<HTMLButtonElement, TabProps>(function Tab(\n { unstyled, className, ...rest },\n ref\n) {\n return (\n <ArkTabs.Trigger\n {...rest}\n ref={ref}\n className={classes(!unstyled && \"dds-tab\", className)}\n />\n );\n});\nexport const TabPanel = forwardRef<HTMLDivElement, TabPanelProps>(\n function TabPanel({ value, style, ...rest }, ref) {\n const tabs = useTabsContext();\n const inactive = tabs.value !== value;\n return (\n <ArkTabs.Content\n {...rest}\n value={value}\n ref={ref}\n hidden={inactive}\n style={inactive ? { ...style, display: \"none\" } : style}\n />\n );\n }\n);\nfunction VisibleRadioInput({ option }: { option: RadioOption }) {\n const group = useRadioGroupContext();\n // Ark owns selection and roving focus; DDS displays the native radio.\n const {\n style: _,\n defaultChecked: __,\n ...inputProps\n } = group.getItemHiddenInputProps(option);\n return (\n <input\n {...inputProps}\n checked={group.value === option.value}\n onChange={() => {}}\n className=\"dds-check__input\"\n />\n );\n}\nexport interface RadioOption {\n value: string;\n label: ReactNode;\n disabled?: boolean;\n}\nexport interface RadioGroupProps\n extends Omit<\n ComponentProps<typeof ArkRadioGroup.Root>,\n \"onValueChange\" | \"children\"\n > {\n options: readonly RadioOption[];\n label: ReactNode;\n onValueChange?: (value: string) => void;\n children?: ReactNode;\n}\nexport const RadioGroup = forwardRef<HTMLDivElement, RadioGroupProps>(\n function RadioGroup(\n { options, label, onValueChange, className, children, ...rest },\n ref\n ) {\n return (\n <ArkRadioGroup.Root\n {...rest}\n ref={ref}\n onValueChange={(details) => {\n if (details.value !== null) onValueChange?.(details.value);\n }}\n className={classes(\"dds-radio-group\", className)}\n >\n <ArkRadioGroup.Label className=\"dds-field__label\">\n {label}\n </ArkRadioGroup.Label>\n {options.map((option) => (\n <ArkRadioGroup.Item\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n className=\"dds-check\"\n >\n <VisibleRadioInput option={option} />\n <ArkRadioGroup.ItemText>{option.label}</ArkRadioGroup.ItemText>\n </ArkRadioGroup.Item>\n ))}\n {children}\n </ArkRadioGroup.Root>\n );\n }\n);\n","import {\n forwardRef,\n type ComponentProps,\n type ButtonHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { Dialog as ArkDialog } from \"@ark-ui/react/dialog\";\nimport { Tooltip as ArkTooltip } from \"@ark-ui/react/tooltip\";\nimport { Portal } from \"@ark-ui/react/portal\";\nimport { classes } from \"./controls\";\nexport interface DialogFrameParts {\n title: ReactNode;\n description: ReactNode;\n children: ReactNode;\n actions: ReactNode;\n}\nexport interface DialogProps\n extends Omit<\n ComponentProps<typeof ArkDialog.Root>,\n \"children\" | \"onOpenChange\"\n > {\n title: ReactNode;\n description?: ReactNode;\n children: ReactNode;\n actions?: ReactNode;\n onOpenChange?: (open: boolean) => void;\n closeOnOutside?: boolean;\n portal?: boolean;\n className?: string;\n overlayClassName?: string;\n contentProps?: ComponentProps<typeof ArkDialog.Content>;\n initialFocus?: () => HTMLElement | null | undefined;\n finalFocus?: () => HTMLElement | null | undefined;\n frame?: (parts: DialogFrameParts) => ReactNode;\n unstyled?: boolean;\n}\nexport const Dialog = forwardRef<HTMLDivElement, DialogProps>(function Dialog(\n {\n title,\n description,\n children,\n actions,\n onOpenChange,\n closeOnOutside,\n portal = true,\n className,\n overlayClassName,\n contentProps,\n initialFocus,\n finalFocus,\n frame,\n unstyled,\n ...rest\n },\n ref\n) {\n const parts: DialogFrameParts = {\n title: (\n <ArkDialog.Title className={unstyled ? undefined : \"dds-dialog__title\"}>\n {title}\n </ArkDialog.Title>\n ),\n description: description && (\n <ArkDialog.Description\n className={unstyled ? undefined : \"dds-dialog__body\"}\n >\n {description}\n </ArkDialog.Description>\n ),\n children,\n actions: actions && (\n <div className={unstyled ? undefined : \"dds-dialog__actions\"}>\n {actions}\n </div>\n ),\n };\n const content = (\n <ArkDialog.Positioner\n className={classes(!unstyled && \"dds-dialog-overlay\", overlayClassName)}\n >\n <ArkDialog.Content\n {...contentProps}\n ref={ref}\n aria-describedby={\n description ? contentProps?.[\"aria-describedby\"] : undefined\n }\n className={classes(\n !unstyled && \"dds-dialog\",\n className,\n contentProps?.className\n )}\n >\n {frame ? (\n frame(parts)\n ) : (\n <>\n {parts.title}\n {parts.description}\n {children}\n {parts.actions}\n </>\n )}\n </ArkDialog.Content>\n </ArkDialog.Positioner>\n );\n return (\n <ArkDialog.Root\n {...rest}\n onOpenChange={(details) => onOpenChange?.(details.open)}\n closeOnInteractOutside={closeOnOutside ?? rest.closeOnInteractOutside}\n initialFocusEl={\n initialFocus ? () => initialFocus() ?? null : rest.initialFocusEl\n }\n finalFocusEl={finalFocus ? () => finalFocus() ?? null : rest.finalFocusEl}\n lazyMount\n unmountOnExit\n >\n {portal ? <Portal>{content}</Portal> : content}\n </ArkDialog.Root>\n );\n});\nexport type TooltipTriggerProps = ButtonHTMLAttributes<HTMLButtonElement>;\nexport interface TooltipProps\n extends Omit<\n ComponentProps<typeof ArkTooltip.Root>,\n \"children\" | \"onOpenChange\"\n > {\n content: ReactNode;\n children: ReactNode | ((props: TooltipTriggerProps) => ReactNode);\n onOpenChange?: (open: boolean) => void;\n className?: string;\n contentProps?: ComponentProps<typeof ArkTooltip.Content>;\n}\nexport function Tooltip({\n content,\n children,\n onOpenChange,\n className,\n contentProps,\n ...rest\n}: TooltipProps) {\n return (\n <ArkTooltip.Root\n openDelay={0}\n closeDelay={0}\n {...rest}\n onOpenChange={(details) => onOpenChange?.(details.open)}\n >\n <span className={classes(\"dds-tooltip\", className)}>\n {typeof children === \"function\" ? (\n <ArkTooltip.Context>\n {(api) => children(api.getTriggerProps())}\n </ArkTooltip.Context>\n ) : (\n <ArkTooltip.Trigger asChild>{children}</ArkTooltip.Trigger>\n )}\n <Portal>\n <ArkTooltip.Positioner>\n <ArkTooltip.Content\n {...contentProps}\n className={classes(\n \"dds-tooltip__bubble\",\n contentProps?.className\n )}\n >\n {content}\n </ArkTooltip.Content>\n </ArkTooltip.Positioner>\n </Portal>\n </span>\n </ArkTooltip.Root>\n );\n}\n","import { forwardRef, type SVGProps } from \"react\";\nimport { icons, directionPolicy, type DdsIconName } from \"@devslab/dds-icons\";\nimport { classes } from \"./controls\";\nexport interface IconProps\n extends Omit<SVGProps<SVGSVGElement>, \"name\" | \"children\"> {\n name: DdsIconName;\n label?: string;\n size?: number | string;\n directional?: boolean;\n}\nexport const Icon = forwardRef<SVGSVGElement, IconProps>(function Icon(\n { name, label, size = 24, directional, className, ...rest },\n ref\n) {\n const icon = icons[name];\n return (\n <svg\n {...rest}\n ref={ref}\n viewBox={icon.viewBox}\n width={size}\n height={size}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={icon.strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n role={label ? \"img\" : undefined}\n aria-label={label}\n aria-hidden={label ? undefined : true}\n className={classes(\n (directional ?? directionPolicy.mirrorInRtl.includes(name)) &&\n directionPolicy.cssClass,\n className\n )}\n >\n {label && <title>{label}</title>}\n <g dangerouslySetInnerHTML={{ __html: icon.body }} />\n </svg>\n );\n});\n","import {\n createContext,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n type ReactNode,\n} from \"react\";\nimport { Toast as ArkToast, Toaster, createToaster } from \"@ark-ui/react/toast\";\nimport { classes } from \"./controls\";\nexport type ToastTone = \"success\" | \"warning\" | \"danger\" | \"info\";\nexport interface ToastInput {\n message: ReactNode;\n tone?: ToastTone;\n duration?: number;\n}\nexport interface ToastRecord extends ToastInput {\n id: string;\n}\nexport interface ToastApi {\n show: (toast: ToastInput) => string;\n dismiss: (id: string) => void;\n clear: () => void;\n}\nexport interface ToastProviderProps {\n children: ReactNode;\n defaultDuration?: number;\n dismissLabel?: string | ((toast: ToastRecord) => string);\n regionLabel?: string;\n className?: string;\n}\nconst ToastContext = createContext<ToastApi | null>(null);\nexport function ToastProvider({\n children,\n defaultDuration = 5000,\n dismissLabel,\n regionLabel,\n className,\n}: ToastProviderProps) {\n const prefix = useId();\n const sequence = useRef(0);\n const toaster = useMemo(\n () =>\n createToaster({\n placement: \"bottom-end\",\n overlap: false,\n gap: 8,\n offsets: \"var(--dds-space-16)\",\n removeDelay: 0,\n hotkey: [\"DDS_NO_HOTKEY\"],\n }),\n []\n );\n const api = useMemo<ToastApi>(() => {\n return {\n show(input) {\n const id = `dds-toast-${prefix}-${++sequence.current}`;\n const duration = input.duration ?? defaultDuration;\n toaster.create({\n id,\n description: input.message,\n type: input.tone === \"danger\" ? \"error\" : input.tone ?? \"info\",\n duration: duration > 0 ? duration : Infinity,\n meta: { dds: { ...input, id } },\n });\n return id;\n },\n dismiss: (id) => toaster.remove(id),\n clear: () => toaster.remove(),\n };\n }, [toaster, prefix, defaultDuration]);\n useEffect(() => () => toaster.remove(), [toaster]);\n return (\n <ToastContext.Provider value={api}>\n {children}\n <Toaster\n toaster={toaster}\n label={regionLabel ?? \"\"}\n aria-label={regionLabel ?? \"\"}\n role={regionLabel ? \"region\" : \"presentation\"}\n className={classes(\"dds-toast-region\", className)}\n >\n {(toast) => {\n const record = toast.meta?.dds as ToastRecord;\n return (\n <ArkToast.Root\n className={classes(\n \"dds-toast\",\n `dds-toast--${record.tone ?? \"info\"}`\n )}\n role={record.tone === \"danger\" ? \"alert\" : \"status\"}\n >\n <ArkToast.Description>{toast.description}</ArkToast.Description>\n {dismissLabel && (\n <ArkToast.CloseTrigger\n className=\"dds-iconbtn dds-iconbtn--sm\"\n aria-label={\n typeof dismissLabel === \"function\"\n ? dismissLabel(record)\n : dismissLabel\n }\n >\n ×\n </ArkToast.CloseTrigger>\n )}\n </ArkToast.Root>\n );\n }}\n </Toaster>\n </ToastContext.Provider>\n );\n}\nexport function useToast(): ToastApi {\n const api = useContext(ToastContext);\n if (!api) throw new Error(\"useToast must be called inside <ToastProvider>\");\n return api;\n}\n","import {\n forwardRef,\n useEffect,\n useId,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { classes } from \"./controls\";\nexport interface ConsoleNavItem {\n id: string;\n href: string;\n label: string;\n badge?: number;\n active?: boolean;\n}\nexport interface ConsoleNavGroup {\n label: string;\n items: readonly ConsoleNavItem[];\n}\nexport interface ConsoleShellLabels {\n skip: string;\n menuOpen: string;\n menuClose: string;\n nav: string;\n badge: string;\n}\nexport interface ConsoleHeader {\n eyebrow?: string;\n title: string;\n actions?: ReactNode;\n}\nexport interface ConsoleShellProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"children\" | \"context\"> {\n surface: string;\n activePath: string;\n brand: { href: string; name: string; mark: string };\n context?: readonly { label: string; value: string }[];\n nav: readonly ConsoleNavGroup[];\n labels: ConsoleShellLabels;\n header: ConsoleHeader;\n foot?: ReactNode;\n children: ReactNode;\n}\nfunction isActive(path: string, item: ConsoleNavItem) {\n return (\n item.active ??\n (item.href.split(\"/\").filter(Boolean).length <= 1\n ? path === item.href\n : path === item.href || path.startsWith(`${item.href}/`))\n );\n}\nexport const ConsoleShell = forwardRef<HTMLDivElement, ConsoleShellProps>(\n function ConsoleShell(\n {\n surface,\n activePath,\n brand,\n context,\n nav,\n labels,\n header,\n foot,\n children,\n className,\n ...rest\n },\n ref\n ) {\n const [open, setOpen] = useState(false);\n const [hydrated, setHydrated] = useState(false);\n const id = useId();\n const railId = `dds-console-rail-${id}`;\n const mainId = `dds-console-main-${id}`;\n useEffect(() => {\n setHydrated(true);\n const onKey = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") setOpen(false);\n };\n document.addEventListener(\"keydown\", onKey);\n return () => document.removeEventListener(\"keydown\", onKey);\n }, []);\n return (\n <div\n {...rest}\n ref={ref}\n className={classes(\"dds-console-shell\", className)}\n data-surface={surface}\n data-hydrated={hydrated ? \"true\" : undefined}\n >\n <a className=\"dds-console-skip dds-visually-hidden\" href={`#${mainId}`}>\n {labels.skip}\n </a>\n <button\n className=\"dds-console-rail__toggle\"\n type=\"button\"\n data-action=\"toggle-rail\"\n aria-controls={railId}\n aria-expanded={open}\n onClick={() => setOpen(!open)}\n >\n <span aria-hidden />\n <span className=\"dds-visually-hidden\">\n {open ? labels.menuClose : labels.menuOpen}\n </span>\n </button>\n <div\n className=\"dds-console-rail__scrim\"\n data-open={String(open)}\n onClick={() => setOpen(false)}\n />\n <aside\n id={railId}\n className=\"dds-console-rail\"\n data-open={String(open)}\n >\n <a className=\"dds-console-rail__brand\" href={brand.href}>\n <img src={brand.mark} alt=\"\" width={20} height={20} />\n <strong>{brand.name}</strong>\n </a>\n {context && context.length > 0 && (\n <dl className=\"dds-console-rail__context\">\n {context.map((row, index) => (\n <div key={index}>\n <dt>{row.label}</dt>\n <dd>{row.value}</dd>\n </div>\n ))}\n </dl>\n )}\n <nav className=\"dds-console-rail__nav\" aria-label={labels.nav}>\n {nav.map((group, index) => (\n <section\n key={index}\n className=\"dds-console-rail__group\"\n aria-labelledby={`${id}-group-${index}`}\n >\n <h2\n id={`${id}-group-${index}`}\n className=\"dds-console-rail__group-label\"\n >\n {group.label}\n </h2>\n <ul>\n {group.items.map((item) => (\n <li key={item.id}>\n <a\n className=\"dds-console-rail__item\"\n data-nav={`${surface}.${item.id}`}\n href={item.href}\n aria-current={\n isActive(activePath, item) ? \"page\" : undefined\n }\n onClick={() => setOpen(false)}\n >\n <span>{item.label}</span>\n {item.badge !== undefined && item.badge > 0 && (\n <span\n className=\"dds-console-rail__badge\"\n aria-label={labels.badge.replace(\"{count}\", () =>\n String(item.badge)\n )}\n >\n {item.badge}\n </span>\n )}\n </a>\n </li>\n ))}\n </ul>\n </section>\n ))}\n </nav>\n {foot && <div className=\"dds-console-rail__foot\">{foot}</div>}\n </aside>\n <main id={mainId} className=\"dds-console-main\" tabIndex={-1}>\n <header className=\"dds-console-page-header\">\n <div className=\"dds-console-page-header__text\">\n {header.eyebrow && (\n <p className=\"dds-console-page-eyebrow\">{header.eyebrow}</p>\n )}\n <h1>{header.title}</h1>\n </div>\n {header.actions && (\n <div className=\"dds-console-page-header__actions\">\n {header.actions}\n </div>\n )}\n </header>\n {children}\n </main>\n </div>\n );\n }\n);\n","import {DatePicker as ArkDatePicker,parseDate} from '@ark-ui/react/date-picker';\nimport {Portal} from '@ark-ui/react/portal';\nimport {Button,Field} from './controls';\n\nexport interface DatePickerProps {\n label:string;\n /** ISO calendar date (YYYY-MM-DD), or an empty string. */\n value:string;\n onChange:(value:string)=>void;\n locale?:string;\n timeZone?:string;\n disabled?:boolean;\n min?:string;\n max?:string;\n}\nfunction CalendarIcon(){return <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" aria-hidden=\"true\"><rect x=\"3.5\" y=\"5.5\" width=\"17\" height=\"15\" rx=\"2\"/><path d=\"M7.5 3v5M16.5 3v5M3.5 10.5h17\"/></svg>;}\nfunction Chevron({next=false}:{next?:boolean}){return <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" aria-hidden=\"true\"><path d={next?'m9 5 7 7-7 7':'m15 5-7 7 7 7'}/></svg>;}\n\n\nexport function DatePicker({label,value,onChange,locale='ko-KR',timeZone='Asia/Seoul',disabled=false,min,max}:DatePickerProps){\n return (\n <Field label={label}>\n {control=><ArkDatePicker.Root locale={locale} timeZone={timeZone} disabled={disabled} min={min?parseDate(min):undefined} max={max?parseDate(max):undefined} startOfWeek={0} minView=\"day\" maxView=\"day\" fixedWeeks translations={{dayCell:state=>`${state.valueText} 선택`,clearTrigger:'선택 날짜 지우기'}} value={value?[parseDate(value)]:[]} format={v=>v.toString()} onValueChange={details=>onChange(details.valueAsString[0]||'')} positioning={{placement:'bottom-start',gutter:8}}>\n <ArkDatePicker.Control className=\"dds-date-picker-control\">\n <ArkDatePicker.Input {...control} placeholder=\"YYYY-MM-DD\" autoComplete=\"off\"/>\n <ArkDatePicker.Trigger asChild><Button type=\"button\" tone=\"secondary\" aria-label={`${label} 달력 열기`}><CalendarIcon/></Button></ArkDatePicker.Trigger>\n </ArkDatePicker.Control>\n <Portal><ArkDatePicker.Positioner className=\"dds-date-picker-positioner\"><ArkDatePicker.Content className=\"dds-date-picker-content\" aria-label={`${label} 날짜 선택`}>\n <ArkDatePicker.View view=\"day\">\n <ArkDatePicker.Context>{picker=><>\n <ArkDatePicker.ViewControl className=\"dds-date-picker-header\">\n <ArkDatePicker.PrevTrigger asChild><Button type=\"button\" tone=\"secondary\" aria-label=\"이전 달\"><Chevron/></Button></ArkDatePicker.PrevTrigger>\n <ArkDatePicker.RangeText/>\n <ArkDatePicker.NextTrigger asChild><Button type=\"button\" tone=\"secondary\" aria-label=\"다음 달\"><Chevron next/></Button></ArkDatePicker.NextTrigger>\n </ArkDatePicker.ViewControl>\n <ArkDatePicker.Table className=\"dds-date-picker-table\">\n <ArkDatePicker.TableHead><ArkDatePicker.TableRow>{picker.weekDays.map((day,index)=><ArkDatePicker.TableHeader key={index}>{day.short}</ArkDatePicker.TableHeader>)}</ArkDatePicker.TableRow></ArkDatePicker.TableHead>\n <ArkDatePicker.TableBody>{picker.weeks.map((week,index)=><ArkDatePicker.TableRow key={index}>{week.map(day=><ArkDatePicker.TableCell key={day.toString()} value={day}><ArkDatePicker.TableCellTrigger>{day.day}</ArkDatePicker.TableCellTrigger></ArkDatePicker.TableCell>)}</ArkDatePicker.TableRow>)}</ArkDatePicker.TableBody>\n </ArkDatePicker.Table>\n <div className=\"dds-date-picker-footer\"><Button type=\"button\" tone=\"secondary\" onClick={()=>picker.selectToday()}>오늘</Button><ArkDatePicker.ClearTrigger asChild><Button type=\"button\" tone=\"secondary\">지우기</Button></ArkDatePicker.ClearTrigger></div>\n </>}</ArkDatePicker.Context>\n </ArkDatePicker.View>\n </ArkDatePicker.Content></ArkDatePicker.Positioner></Portal>\n </ArkDatePicker.Root>}\n </Field>\n );\n}\n","export type StatusTone = \"success\" | \"warning\" | \"danger\" | \"info\" | \"brand\" | \"neutral\";\nexport function createStatusPill<D extends string>(config:{\n tones:Record<D,Record<string,StatusTone>>;\n label:(domain:D,value:string,locale:string)=>string|undefined;\n openDomains?:readonly NoInfer<D>[];\n}){\n const open=new Set<string>(config.openDomains??[]);\n return function StatusPill(props:{domain:D;value:string;locale:string}){\n const tone=config.tones[props.domain]?.[props.value];\n const label=config.label(props.domain,props.value,props.locale);\n if(!tone||!label){\n if(open.has(props.domain))return <code data-status={`${props.domain}.${props.value}`}>{props.value}</code>;\n throw new Error(!tone?`StatusPill: no tone for ${props.domain}.${props.value}`:`StatusPill: no label for ${props.domain}.${props.value}`);\n }\n return <span className={tone==='neutral'?'dds-badge':`dds-badge dds-badge--${tone}`} data-status={`${props.domain}.${props.value}`} data-tone={tone}>{label}</span>;\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAYA,IAAa,KAAW,GAAG,MACzB,EAAO,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,GAQpB,IAAS,EACpB,SACE,EACE,UAAO,WACP,UAAO,MACP,YACA,aACA,UAAO,UACP,cACA,aACA,GAAG,KAEL,GACA;CACA,OACE,kBAAC,UAA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,IAAK,EAAO,MAAM,EAAM,OAAO,GAAG,EAAM,QACxC,IAAM,EAAO,MAAM,EAAM,QAAO,EAAM,OAAM,EAAM,MAAM;EAC9D,IAAG,CAAC,KAAM,CAAC,GAAM;GAChB,IAAG,EAAK,IAAI,EAAM,MAAM,GAAE,OAAO,kBAAC,QAAD;IAAM,eAAa,GAAG,EAAM,OAAO,GAAG,EAAM;IAAU,UAAA,EAAM;GAAY,CAAA;GACzG,MAAU,MAAO,IAA8D,4BAA4B,EAAM,OAAO,GAAG,EAAM,UAA3G,2BAA2B,EAAM,OAAO,GAAG,EAAM,OAAiE;EACzI;EACA,OAAO,kBAAC,QAAD;GAAM,WAAW,MAAO,YAAU,cAAY,wBAAwB;GAAQ,eAAa,GAAG,EAAM,OAAO,GAAG,EAAM;GAAS,aAAW;GAAO,UAAA;EAAY,CAAA;CACnK;AACD"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/controls.tsx","../src/selection.tsx","../src/overlays.tsx","../src/icon.tsx","../src/toast.tsx","../src/console-shell.tsx","../src/date-picker.tsx","../src/status-pill.tsx"],"sourcesContent":["import {\n forwardRef,\n useId,\n type ButtonHTMLAttributes,\n type InputHTMLAttributes,\n type SelectHTMLAttributes,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { Field as ArkField } from \"@ark-ui/react/field\";\nimport { Checkbox as ArkCheckbox } from \"@ark-ui/react/checkbox\";\nimport { Switch as ArkSwitch } from \"@ark-ui/react/switch\";\nexport const classes = (...values: (string | false | undefined)[]) =>\n values.filter(Boolean).join(\" \");\nexport type ButtonTone = \"primary\" | \"secondary\" | \"ghost\" | \"danger\";\nexport type ControlSize = \"sm\" | \"md\" | \"lg\";\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n tone?: ButtonTone;\n size?: ControlSize;\n loading?: boolean;\n}\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n function Button(\n {\n tone = \"primary\",\n size = \"md\",\n loading,\n disabled,\n type = \"button\",\n className,\n children,\n ...rest\n },\n ref\n ) {\n return (\n <button\n {...rest}\n ref={ref}\n type={type}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n className={classes(\n \"dds-btn\",\n `dds-btn--${tone}`,\n size !== \"md\" && `dds-btn--${size}`,\n className\n )}\n >\n {loading && <span className=\"dds-spinner\" aria-hidden />}\n {children}\n </button>\n );\n }\n);\nexport interface IconButtonProps extends Omit<ButtonProps, \"tone\"> {\n \"aria-label\": string;\n tone?: \"ghost\" | \"secondary\" | \"danger\";\n}\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n function IconButton(\n {\n tone = \"ghost\",\n size = \"md\",\n loading,\n disabled,\n type = \"button\",\n className,\n children,\n ...rest\n },\n ref\n ) {\n return (\n <button\n {...rest}\n ref={ref}\n type={type}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n className={classes(\n \"dds-iconbtn\",\n tone !== \"ghost\" && `dds-iconbtn--${tone}`,\n size !== \"md\" && `dds-iconbtn--${size}`,\n className\n )}\n >\n {loading ? <span className=\"dds-spinner\" aria-hidden /> : children}\n </button>\n );\n }\n);\nexport interface FieldControlProps {\n id: string;\n \"aria-describedby\"?: string;\n \"aria-invalid\"?: true;\n \"aria-required\"?: true;\n}\nexport interface FieldProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"children\"> {\n label: ReactNode;\n helpText?: ReactNode;\n error?: ReactNode;\n required?: boolean;\n children: ReactNode | ((props: FieldControlProps) => ReactNode);\n}\nexport const Field = forwardRef<HTMLDivElement, FieldProps>(function Field(\n {\n id: requested,\n label,\n helpText,\n error,\n required,\n className,\n children,\n ...rest\n },\n ref\n) {\n const generated = useId();\n const id = requested ?? `dds-field-${generated}`;\n const control: FieldControlProps = {\n id,\n \"aria-describedby\":\n [helpText && `${id}-help`, error && `${id}-error`]\n .filter(Boolean)\n .join(\" \") || undefined,\n \"aria-invalid\": error ? true : undefined,\n \"aria-required\": required ? true : undefined,\n };\n return (\n <ArkField.Root\n {...rest}\n ref={ref}\n invalid={Boolean(error)}\n required={required}\n id={id}\n ids={{\n control: `${id}-root`,\n helperText: `${id}-help`,\n errorText: `${id}-error`,\n }}\n className={classes(\n \"dds-field\",\n Boolean(error) && \"dds-field--error\",\n className\n )}\n >\n <ArkField.Label htmlFor={id} className=\"dds-field__label\">\n {label}\n {required && <span aria-hidden> *</span>}\n </ArkField.Label>\n {typeof children === \"function\" ? children(control) : children}\n {helpText && (\n <ArkField.HelperText className=\"dds-field__help\">\n {helpText}\n </ArkField.HelperText>\n )}\n {error && (\n <ArkField.ErrorText className=\"dds-field__error\" role=\"alert\">\n {error}\n </ArkField.ErrorText>\n )}\n </ArkField.Root>\n );\n});\nexport interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {\n invalid?: boolean;\n wrapperClassName?: string;\n}\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(\n function Select(\n { invalid, wrapperClassName, className, children, ...rest },\n ref\n ) {\n return (\n <span className={classes(\"dds-select\", wrapperClassName)}>\n <select\n {...rest}\n ref={ref}\n className={classes(\"dds-select__input\", className)}\n aria-invalid={invalid || rest[\"aria-invalid\"]}\n >\n {children}\n </select>\n </span>\n );\n }\n);\nexport interface CheckboxProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"type\" | \"children\"> {\n label: ReactNode;\n onCheckedChange?: (checked: boolean) => void;\n inputClassName?: string;\n}\nexport type RadioProps = CheckboxProps;\nexport type SwitchProps = CheckboxProps;\nconst Checkable = forwardRef<\n HTMLInputElement,\n CheckboxProps & { kind: \"checkbox\" | \"switch\" }\n>(function Checkable(\n {\n kind,\n label,\n checked,\n defaultChecked,\n onCheckedChange,\n id,\n name,\n value,\n disabled,\n required,\n readOnly,\n form,\n className,\n inputClassName,\n onChange,\n ...rest\n },\n ref\n) {\n const Root = kind === \"switch\" ? ArkSwitch.Root : ArkCheckbox.Root;\n const Label = kind === \"switch\" ? ArkSwitch.Label : ArkCheckbox.Label;\n const Context = kind === \"switch\" ? ArkSwitch.Context : ArkCheckbox.Context;\n const base = kind === \"switch\" ? \"dds-switch\" : \"dds-check\";\n return (\n <Root\n checked={checked}\n defaultChecked={defaultChecked}\n onCheckedChange={(details) => onCheckedChange?.(details.checked === true)}\n ids={id ? { hiddenInput: id } : undefined}\n name={name}\n value={String(value ?? \"on\")}\n disabled={disabled}\n required={required}\n readOnly={readOnly}\n form={form}\n className={classes(base, className)}\n >\n <Context>\n {(api) => {\n // DDS styles the actual input. Keep Ark's events and state, but omit\n // its visually hidden style and use React's controlled checked prop\n // so a caller-declined change also restores the native DOM value.\n const {\n style: _,\n defaultChecked: __,\n ...inputProps\n } = api.getHiddenInputProps();\n return (\n <input\n {...inputProps}\n {...rest}\n ref={ref}\n checked={api.checked}\n role={kind === \"switch\" ? \"switch\" : undefined}\n onChange={onChange ?? (() => {})}\n onClick={(event) => {\n rest.onClick?.(event);\n if (!event.defaultPrevented) inputProps.onClick?.(event);\n }}\n className={classes(`${base}__input`, inputClassName)}\n />\n );\n }}\n </Context>\n <Label>{label}</Label>\n </Root>\n );\n});\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (props, ref) => <Checkable {...props} kind=\"checkbox\" ref={ref} />\n);\nexport const Switch = forwardRef<HTMLInputElement, SwitchProps>(\n (props, ref) => <Checkable {...props} kind=\"switch\" ref={ref} />\n);\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(function Radio(\n { label, className, inputClassName, onCheckedChange, onChange, ...rest },\n ref\n) {\n return (\n <label className={classes(\"dds-check\", className)}>\n <input\n {...rest}\n ref={ref}\n type=\"radio\"\n className={classes(\"dds-check__input\", inputClassName)}\n onChange={(event) => {\n onChange?.(event);\n if (!event.defaultPrevented)\n onCheckedChange?.(event.currentTarget.checked);\n }}\n />\n <span>{label}</span>\n </label>\n );\n});\n","import { forwardRef, type ComponentProps, type ReactNode } from \"react\";\nimport { Tabs as ArkTabs, useTabsContext } from \"@ark-ui/react/tabs\";\nimport {\n RadioGroup as ArkRadioGroup,\n useRadioGroupContext,\n} from \"@ark-ui/react/radio-group\";\nimport { classes } from \"./controls\";\nexport interface TabsProps\n extends Omit<ComponentProps<typeof ArkTabs.Root>, \"onValueChange\"> {\n onValueChange?: (value: string) => void;\n unstyled?: boolean;\n}\nexport const Tabs = forwardRef<HTMLDivElement, TabsProps>(function Tabs(\n { onValueChange, unstyled, className, ...rest },\n ref\n) {\n return (\n <ArkTabs.Root\n {...rest}\n ref={ref}\n onValueChange={(details) => onValueChange?.(details.value)}\n className={classes(!unstyled && \"dds-tabs-root\", className)}\n />\n );\n});\nexport type TabProps = ComponentProps<typeof ArkTabs.Trigger> & {\n unstyled?: boolean;\n};\nexport type TabPanelProps = ComponentProps<typeof ArkTabs.Content>;\nexport const TabList = forwardRef<\n HTMLDivElement,\n ComponentProps<typeof ArkTabs.List> & { unstyled?: boolean }\n>(function TabList({ unstyled, className, ...rest }, ref) {\n return (\n <ArkTabs.List\n {...rest}\n ref={ref}\n className={classes(!unstyled && \"dds-tabs\", className)}\n />\n );\n});\nexport const Tab = forwardRef<HTMLButtonElement, TabProps>(function Tab(\n { unstyled, className, ...rest },\n ref\n) {\n return (\n <ArkTabs.Trigger\n {...rest}\n ref={ref}\n className={classes(!unstyled && \"dds-tab\", className)}\n />\n );\n});\nexport const TabPanel = forwardRef<HTMLDivElement, TabPanelProps>(\n function TabPanel({ value, style, ...rest }, ref) {\n const tabs = useTabsContext();\n const inactive = tabs.value !== value;\n return (\n <ArkTabs.Content\n {...rest}\n value={value}\n ref={ref}\n hidden={inactive}\n style={inactive ? { ...style, display: \"none\" } : style}\n />\n );\n }\n);\nfunction VisibleRadioInput({ option }: { option: RadioOption }) {\n const group = useRadioGroupContext();\n // Ark owns selection and roving focus; DDS displays the native radio.\n const {\n style: _,\n defaultChecked: __,\n ...inputProps\n } = group.getItemHiddenInputProps(option);\n return (\n <input\n {...inputProps}\n checked={group.value === option.value}\n onChange={() => {}}\n className=\"dds-check__input\"\n />\n );\n}\nexport interface RadioOption {\n value: string;\n label: ReactNode;\n disabled?: boolean;\n}\nexport interface RadioGroupProps\n extends Omit<\n ComponentProps<typeof ArkRadioGroup.Root>,\n \"onValueChange\" | \"children\"\n > {\n options: readonly RadioOption[];\n label: ReactNode;\n onValueChange?: (value: string) => void;\n children?: ReactNode;\n}\nexport const RadioGroup = forwardRef<HTMLDivElement, RadioGroupProps>(\n function RadioGroup(\n { options, label, onValueChange, className, children, ...rest },\n ref\n ) {\n return (\n <ArkRadioGroup.Root\n {...rest}\n ref={ref}\n onValueChange={(details) => {\n if (details.value !== null) onValueChange?.(details.value);\n }}\n className={classes(\"dds-radio-group\", className)}\n >\n <ArkRadioGroup.Label className=\"dds-field__label\">\n {label}\n </ArkRadioGroup.Label>\n {options.map((option) => (\n <ArkRadioGroup.Item\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n className=\"dds-check\"\n >\n <VisibleRadioInput option={option} />\n <ArkRadioGroup.ItemText>{option.label}</ArkRadioGroup.ItemText>\n </ArkRadioGroup.Item>\n ))}\n {children}\n </ArkRadioGroup.Root>\n );\n }\n);\n","import {\n forwardRef,\n type ComponentProps,\n type ButtonHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { Dialog as ArkDialog } from \"@ark-ui/react/dialog\";\nimport { Tooltip as ArkTooltip } from \"@ark-ui/react/tooltip\";\nimport { Portal } from \"@ark-ui/react/portal\";\nimport { classes } from \"./controls\";\nexport interface DialogFrameParts {\n title: ReactNode;\n description: ReactNode;\n children: ReactNode;\n actions: ReactNode;\n}\nexport interface DialogProps\n extends Omit<\n ComponentProps<typeof ArkDialog.Root>,\n \"children\" | \"onOpenChange\"\n > {\n title: ReactNode;\n description?: ReactNode;\n children: ReactNode;\n actions?: ReactNode;\n onOpenChange?: (open: boolean) => void;\n closeOnOutside?: boolean;\n portal?: boolean;\n className?: string;\n overlayClassName?: string;\n contentProps?: ComponentProps<typeof ArkDialog.Content>;\n initialFocus?: () => HTMLElement | null | undefined;\n finalFocus?: () => HTMLElement | null | undefined;\n frame?: (parts: DialogFrameParts) => ReactNode;\n unstyled?: boolean;\n}\nexport const Dialog = forwardRef<HTMLDivElement, DialogProps>(function Dialog(\n {\n title,\n description,\n children,\n actions,\n onOpenChange,\n closeOnOutside,\n portal = true,\n className,\n overlayClassName,\n contentProps,\n initialFocus,\n finalFocus,\n frame,\n unstyled,\n ...rest\n },\n ref\n) {\n const parts: DialogFrameParts = {\n title: (\n <ArkDialog.Title className={unstyled ? undefined : \"dds-dialog__title\"}>\n {title}\n </ArkDialog.Title>\n ),\n description: description && (\n <ArkDialog.Description\n className={unstyled ? undefined : \"dds-dialog__body\"}\n >\n {description}\n </ArkDialog.Description>\n ),\n children,\n actions: actions && (\n <div className={unstyled ? undefined : \"dds-dialog__actions\"}>\n {actions}\n </div>\n ),\n };\n const content = (\n <ArkDialog.Positioner\n className={classes(!unstyled && \"dds-dialog-overlay\", overlayClassName)}\n >\n <ArkDialog.Content\n {...contentProps}\n ref={ref}\n aria-describedby={\n description ? contentProps?.[\"aria-describedby\"] : undefined\n }\n className={classes(\n !unstyled && \"dds-dialog\",\n className,\n contentProps?.className\n )}\n >\n {frame ? (\n frame(parts)\n ) : (\n <>\n {parts.title}\n {parts.description}\n {children}\n {parts.actions}\n </>\n )}\n </ArkDialog.Content>\n </ArkDialog.Positioner>\n );\n return (\n <ArkDialog.Root\n {...rest}\n onOpenChange={(details) => onOpenChange?.(details.open)}\n closeOnInteractOutside={closeOnOutside ?? rest.closeOnInteractOutside}\n initialFocusEl={\n initialFocus ? () => initialFocus() ?? null : rest.initialFocusEl\n }\n finalFocusEl={finalFocus ? () => finalFocus() ?? null : rest.finalFocusEl}\n lazyMount\n unmountOnExit\n >\n {portal ? <Portal>{content}</Portal> : content}\n </ArkDialog.Root>\n );\n});\nexport type TooltipTriggerProps = ButtonHTMLAttributes<HTMLButtonElement>;\nexport interface TooltipProps\n extends Omit<\n ComponentProps<typeof ArkTooltip.Root>,\n \"children\" | \"onOpenChange\"\n > {\n content: ReactNode;\n children: ReactNode | ((props: TooltipTriggerProps) => ReactNode);\n onOpenChange?: (open: boolean) => void;\n className?: string;\n contentProps?: ComponentProps<typeof ArkTooltip.Content>;\n}\nexport function Tooltip({\n content,\n children,\n onOpenChange,\n className,\n contentProps,\n ...rest\n}: TooltipProps) {\n return (\n <ArkTooltip.Root\n openDelay={0}\n closeDelay={0}\n {...rest}\n onOpenChange={(details) => onOpenChange?.(details.open)}\n >\n <span className={classes(\"dds-tooltip\", className)}>\n {typeof children === \"function\" ? (\n <ArkTooltip.Context>\n {(api) => children(api.getTriggerProps())}\n </ArkTooltip.Context>\n ) : (\n <ArkTooltip.Trigger asChild>{children}</ArkTooltip.Trigger>\n )}\n <Portal>\n <ArkTooltip.Positioner>\n <ArkTooltip.Content\n {...contentProps}\n className={classes(\n \"dds-tooltip__bubble\",\n contentProps?.className\n )}\n >\n {content}\n </ArkTooltip.Content>\n </ArkTooltip.Positioner>\n </Portal>\n </span>\n </ArkTooltip.Root>\n );\n}\n","import { forwardRef, type SVGProps } from \"react\";\nimport { icons, directionPolicy, type DdsIconName } from \"@devslab/dds-icons\";\nimport { classes } from \"./controls\";\nexport interface IconProps\n extends Omit<SVGProps<SVGSVGElement>, \"name\" | \"children\"> {\n name: DdsIconName;\n label?: string;\n size?: number | string;\n directional?: boolean;\n}\nexport const Icon = forwardRef<SVGSVGElement, IconProps>(function Icon(\n { name, label, size = 24, directional, className, ...rest },\n ref\n) {\n const icon = icons[name];\n return (\n <svg\n {...rest}\n ref={ref}\n viewBox={icon.viewBox}\n width={size}\n height={size}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={icon.strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n role={label ? \"img\" : undefined}\n aria-label={label}\n aria-hidden={label ? undefined : true}\n className={classes(\n (directional ?? directionPolicy.mirrorInRtl.includes(name)) &&\n directionPolicy.cssClass,\n className\n )}\n >\n {label && <title>{label}</title>}\n <g dangerouslySetInnerHTML={{ __html: icon.body }} />\n </svg>\n );\n});\n","import {\n createContext,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n type ReactNode,\n} from \"react\";\nimport { Toast as ArkToast, Toaster, createToaster } from \"@ark-ui/react/toast\";\nimport { classes } from \"./controls\";\nexport type ToastTone = \"success\" | \"warning\" | \"danger\" | \"info\";\nexport interface ToastInput {\n message: ReactNode;\n tone?: ToastTone;\n duration?: number;\n}\nexport interface ToastRecord extends ToastInput {\n id: string;\n}\nexport interface ToastApi {\n show: (toast: ToastInput) => string;\n dismiss: (id: string) => void;\n clear: () => void;\n}\nexport interface ToastProviderProps {\n children: ReactNode;\n defaultDuration?: number;\n dismissLabel?: string | ((toast: ToastRecord) => string);\n regionLabel?: string;\n className?: string;\n}\nconst ToastContext = createContext<ToastApi | null>(null);\nexport function ToastProvider({\n children,\n defaultDuration = 5000,\n dismissLabel,\n regionLabel,\n className,\n}: ToastProviderProps) {\n const prefix = useId();\n const sequence = useRef(0);\n const toaster = useMemo(\n () =>\n createToaster({\n placement: \"bottom-end\",\n overlap: false,\n gap: 8,\n offsets: \"var(--dds-space-16)\",\n removeDelay: 0,\n hotkey: [\"DDS_NO_HOTKEY\"],\n }),\n []\n );\n const api = useMemo<ToastApi>(() => {\n return {\n show(input) {\n const id = `dds-toast-${prefix}-${++sequence.current}`;\n const duration = input.duration ?? defaultDuration;\n toaster.create({\n id,\n description: input.message,\n type: input.tone === \"danger\" ? \"error\" : input.tone ?? \"info\",\n duration: duration > 0 ? duration : Infinity,\n meta: { dds: { ...input, id } },\n });\n return id;\n },\n dismiss: (id) => toaster.remove(id),\n clear: () => toaster.remove(),\n };\n }, [toaster, prefix, defaultDuration]);\n useEffect(() => () => toaster.remove(), [toaster]);\n return (\n <ToastContext.Provider value={api}>\n {children}\n <Toaster\n toaster={toaster}\n label={regionLabel ?? \"\"}\n aria-label={regionLabel ?? \"\"}\n role={regionLabel ? \"region\" : \"presentation\"}\n className={classes(\"dds-toast-region\", className)}\n >\n {(toast) => {\n const record = toast.meta?.dds as ToastRecord;\n return (\n <ArkToast.Root\n className={classes(\n \"dds-toast\",\n `dds-toast--${record.tone ?? \"info\"}`\n )}\n role={record.tone === \"danger\" ? \"alert\" : \"status\"}\n >\n <ArkToast.Description>{toast.description}</ArkToast.Description>\n {dismissLabel && (\n <ArkToast.CloseTrigger\n className=\"dds-iconbtn dds-iconbtn--sm\"\n aria-label={\n typeof dismissLabel === \"function\"\n ? dismissLabel(record)\n : dismissLabel\n }\n >\n ×\n </ArkToast.CloseTrigger>\n )}\n </ArkToast.Root>\n );\n }}\n </Toaster>\n </ToastContext.Provider>\n );\n}\nexport function useToast(): ToastApi {\n const api = useContext(ToastContext);\n if (!api) throw new Error(\"useToast must be called inside <ToastProvider>\");\n return api;\n}\n","import {\n forwardRef,\n useEffect,\n useId,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { classes } from \"./controls\";\nexport interface ConsoleNavItem {\n id: string;\n href: string;\n label: string;\n badge?: number;\n active?: boolean;\n}\nexport interface ConsoleNavGroup {\n label: string;\n items: readonly ConsoleNavItem[];\n}\nexport interface ConsoleShellLabels {\n skip: string;\n menuOpen: string;\n menuClose: string;\n nav: string;\n badge: string;\n}\nexport interface ConsoleHeader {\n eyebrow?: string;\n title: string;\n actions?: ReactNode;\n}\nexport interface ConsoleShellProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"children\" | \"context\"> {\n surface: string;\n activePath: string;\n brand: { href: string; name: string; mark: string };\n context?: readonly { label: string; value: string }[];\n nav: readonly ConsoleNavGroup[];\n labels: ConsoleShellLabels;\n header: ConsoleHeader;\n foot?: ReactNode;\n children: ReactNode;\n}\nfunction isActive(path: string, item: ConsoleNavItem) {\n return (\n item.active ??\n (item.href.split(\"/\").filter(Boolean).length <= 1\n ? path === item.href\n : path === item.href || path.startsWith(`${item.href}/`))\n );\n}\nexport const ConsoleShell = forwardRef<HTMLDivElement, ConsoleShellProps>(\n function ConsoleShell(\n {\n surface,\n activePath,\n brand,\n context,\n nav,\n labels,\n header,\n foot,\n children,\n className,\n ...rest\n },\n ref\n ) {\n const [open, setOpen] = useState(false);\n const [hydrated, setHydrated] = useState(false);\n const id = useId();\n const railId = `dds-console-rail-${id}`;\n const mainId = `dds-console-main-${id}`;\n useEffect(() => {\n setHydrated(true);\n const onKey = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") setOpen(false);\n };\n document.addEventListener(\"keydown\", onKey);\n return () => document.removeEventListener(\"keydown\", onKey);\n }, []);\n return (\n <div\n {...rest}\n ref={ref}\n className={classes(\"dds-console-shell\", className)}\n data-surface={surface}\n data-hydrated={hydrated ? \"true\" : undefined}\n >\n <a className=\"dds-console-skip dds-visually-hidden\" href={`#${mainId}`}>\n {labels.skip}\n </a>\n <button\n className=\"dds-console-rail__toggle\"\n type=\"button\"\n data-action=\"toggle-rail\"\n aria-controls={railId}\n aria-expanded={open}\n onClick={() => setOpen(!open)}\n >\n <span aria-hidden />\n <span className=\"dds-visually-hidden\">\n {open ? labels.menuClose : labels.menuOpen}\n </span>\n </button>\n <div\n className=\"dds-console-rail__scrim\"\n data-open={String(open)}\n onClick={() => setOpen(false)}\n />\n <aside\n id={railId}\n className=\"dds-console-rail\"\n data-open={String(open)}\n >\n <a className=\"dds-console-rail__brand\" href={brand.href}>\n <img src={brand.mark} alt=\"\" width={20} height={20} />\n <strong>{brand.name}</strong>\n </a>\n {context && context.length > 0 && (\n <dl className=\"dds-console-rail__context\">\n {context.map((row, index) => (\n <div key={index}>\n <dt>{row.label}</dt>\n <dd>{row.value}</dd>\n </div>\n ))}\n </dl>\n )}\n <nav className=\"dds-console-rail__nav\" aria-label={labels.nav}>\n {nav.map((group, index) => (\n <section\n key={index}\n className=\"dds-console-rail__group\"\n aria-labelledby={`${id}-group-${index}`}\n >\n <h2\n id={`${id}-group-${index}`}\n className=\"dds-console-rail__group-label\"\n >\n {group.label}\n </h2>\n <ul>\n {group.items.map((item) => (\n <li key={item.id}>\n <a\n className=\"dds-console-rail__item\"\n data-nav={`${surface}.${item.id}`}\n href={item.href}\n aria-current={\n isActive(activePath, item) ? \"page\" : undefined\n }\n onClick={() => setOpen(false)}\n >\n <span>{item.label}</span>\n {item.badge !== undefined && item.badge > 0 && (\n <span\n className=\"dds-console-rail__badge\"\n aria-label={labels.badge.replace(\"{count}\", () =>\n String(item.badge)\n )}\n >\n {item.badge}\n </span>\n )}\n </a>\n </li>\n ))}\n </ul>\n </section>\n ))}\n </nav>\n {foot && <div className=\"dds-console-rail__foot\">{foot}</div>}\n </aside>\n <main id={mainId} className=\"dds-console-main\" tabIndex={-1}>\n <header className=\"dds-console-page-header\">\n <div className=\"dds-console-page-header__text\">\n {header.eyebrow && (\n <p className=\"dds-console-page-eyebrow\">{header.eyebrow}</p>\n )}\n <h1>{header.title}</h1>\n </div>\n {header.actions && (\n <div className=\"dds-console-page-header__actions\">\n {header.actions}\n </div>\n )}\n </header>\n {children}\n </main>\n </div>\n );\n }\n);\n","import {useEffect,useRef,useState} from 'react';\nimport {DatePicker as ArkDatePicker,parseDate} from '@ark-ui/react/date-picker';\nimport {Portal} from '@ark-ui/react/portal';\nimport {Button,Field} from './controls';\n\nexport interface DatePickerValidity {\n /** Exact displayed draft; never persist this display text as an API date. */\n inputValue:string;\n /** Valid ISO date, optional empty string, or null when invalid/incomplete. */\n value:string|null;\n valid:boolean;\n reason:'valid'|'required'|'incomplete'|'invalid'|'rangeUnderflow'|'rangeOverflow';\n}\nexport interface DatePickerProps {\n label:string;\n /** ISO calendar date (YYYY-MM-DD), or an empty string. */\n value:string;\n onChange:(value:string)=>void;\n locale?:string;\n timeZone?:string;\n disabled?:boolean;\n readOnly?:boolean;\n required?:boolean;\n /** Initial mount and semantic draft changes, deduped across callback identity changes. Key by editor identity for a fresh initial report. Button/API saves must guard validity and use its canonical value. */\n onValidityChange?:(state:DatePickerValidity)=>void;\n min?:string;\n max?:string;\n}\nfunction CalendarIcon(){return <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" aria-hidden=\"true\"><rect x=\"3.5\" y=\"5.5\" width=\"17\" height=\"15\" rx=\"2\"/><path d=\"M7.5 3v5M16.5 3v5M3.5 10.5h17\"/></svg>;}\nfunction Chevron({next=false}:{next?:boolean}){return <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" aria-hidden=\"true\"><path d={next?'m9 5 7 7-7 7':'m15 5-7 7 7 7'}/></svg>;}\n\n\n// Date-only Gregorian validation: never let a permissive parser repair user text.\nfunction isCalendarDate(value:string){\n if(!/^\\d{4}-\\d{2}-\\d{2}$/.test(value))return false;\n const year=Number(value.slice(0,4)),month=Number(value.slice(5,7)),day=Number(value.slice(8,10));\n if(year<1||month<1||month>12||day<1)return false;\n const leap=year%4===0&&(year%100!==0||year%400===0);\n return day<=[31,leap?29:28,31,30,31,30,31,31,30,31,30,31][month-1]!;\n}\nfunction isKorean(locale:string){return /^ko(?:-|$)/i.test(locale);}\nfunction displayDate(value:string,locale:string){\n return isKorean(locale)&&isCalendarDate(value)?value.replaceAll('-','/'):value;\n}\nfunction canonicalInput(inputValue:string,locale:string){\n return isKorean(locale)&&/^\\d{4}\\/\\d{2}\\/\\d{2}$/.test(inputValue)?inputValue.replaceAll('/','-'):inputValue;\n}\nfunction validateInput(inputValue:string,required:boolean,min?:string,max?:string,locale='en-US'):DatePickerValidity{\n const canonical=canonicalInput(inputValue,locale);\n const incomplete=inputValue.length<10&&(/^\\d{0,4}(?:-\\d{0,2}(?:-\\d{0,2})?)?$/.test(inputValue)\n ||(isKorean(locale)&&/^\\d{0,4}(?:\\/\\d{0,2}(?:\\/\\d{0,2})?)?$/.test(inputValue)));\n let reason:DatePickerValidity['reason']='valid';\n if(inputValue==='')reason=required?'required':'valid';\n else if(!isCalendarDate(canonical))reason=incomplete?'incomplete':'invalid';\n else if((min&&!isCalendarDate(min))||(max&&!isCalendarDate(max))||(min&&max&&min>max))reason='invalid';\n else if(min&&canonical<min)reason='rangeUnderflow';\n else if(max&&canonical>max)reason='rangeOverflow';\n return {inputValue,value:reason==='valid'?canonical:null,valid:reason==='valid',reason};\n}\nfunction calendarSelection(value:string){return isCalendarDate(value)?[parseDate(value)]:[];}\n\nexport function DatePicker({label,value,onChange,locale='ko-KR',timeZone='Asia/Seoul',disabled=false,readOnly=false,required=false,onValidityChange,min,max}:DatePickerProps){\n const [draft,setDraft]=useState(()=>displayDate(value,locale));\n const [selection,setSelection]=useState(()=>calendarSelection(value));\n const [open,setOpen]=useState(false);\n const inputRef=useRef<HTMLInputElement>(null);\n const restoreInputFocus=useRef(false);\n const observedValue=useRef(value);\n const observedLocale=useRef(locale);\n // Every outstanding emission is retained, including repeated B/C/B values.\n // Entries end on acknowledgement, an unmatched external reset, or unmount.\n const pendingEchoes=useRef<string[]>([]);\n const emittedValue=useRef(value);\n const notified=useRef('');\n // Convert a complete draft before reporting validity in the new locale.\n const canonicalDraft=canonicalInput(draft,observedLocale.current);\n const effectiveDraft=observedLocale.current!==locale&&isCalendarDate(canonicalDraft)\n ?displayDate(canonicalDraft,locale):draft;\n const validity=validateInput(effectiveDraft,required,min,max,locale);\n const error=validity.valid?undefined:locale.toLowerCase().startsWith('ko')\n ?(validity.reason==='required'?'날짜를 입력해 주세요.':'YYYY/MM/DD 형식의 유효한 범위 내 날짜를 입력해 주세요.')\n :(validity.reason==='required'?'Enter a date.':'Enter a valid date within the allowed range (YYYY-MM-DD).');\n useEffect(()=>{\n const previousLocale=observedLocale.current;\n observedLocale.current=locale;\n if(observedValue.current===value){\n if(previousLocale!==locale)setDraft(effectiveDraft);\n return;\n }\n observedValue.current=value;\n // A matched outstanding value is an acknowledgement, not a draft reset.\n const acknowledged=pendingEchoes.current.indexOf(value);\n if(acknowledged!==-1){pendingEchoes.current.splice(acknowledged,1);return;}\n pendingEchoes.current=[];\n emittedValue.current=value;\n setDraft(displayDate(value,locale));\n if(value===''||isCalendarDate(value))setSelection(calendarSelection(value));\n },[value,locale]);\n useEffect(()=>{\n inputRef.current?.setCustomValidity(error??'');\n const key=JSON.stringify(validity);\n if(onValidityChange&&notified.current!==key){notified.current=key;onValidityChange(validity);}\n },[draft,required,min,max,locale,error,onValidityChange]);\n useEffect(()=>{if(disabled||readOnly){restoreInputFocus.current=false;setOpen(false);}},[disabled,readOnly]);\n // Ark's calendar restores focus to its trigger when it does not own an Input.\n // Return to the DDS input after that calendar frame; cancel on lock/unmount.\n useEffect(()=>{\n if(!restoreInputFocus.current||disabled||readOnly)return;\n const frame=requestAnimationFrame(()=>{\n restoreInputFocus.current=false;\n inputRef.current?.focus({preventScroll:true});\n });\n return ()=>cancelAnimationFrame(frame);\n },[open,selection,disabled,readOnly]);\n function commit(next:string){\n const state=validateInput(next,required,min,max,locale);\n if(next!==''&&!state.valid)return;\n const canonical=next===''?'':state.value!;\n setSelection(calendarSelection(canonical));\n // Blur/Enter must not emit the same local commit again while props lag.\n if(canonical!==emittedValue.current){\n emittedValue.current=canonical;\n pendingEchoes.current.push(canonical);\n onChange(canonical);\n }\n }\n function changeDraft(next:string){\n setDraft(next);\n const state=validateInput(next,required,min,max,locale);\n // Native form submission and callback-based saves both see this edit.\n inputRef.current?.setCustomValidity(state.valid?'':(error??'Enter a valid date (YYYY-MM-DD).'));\n if(next===''||state.valid){\n setDraft(displayDate(state.value??'',locale));\n commit(next);\n }\n }\n return (\n <Field label={label} required={required} error={error}>\n {control=><ArkDatePicker.Root locale={locale} timeZone={timeZone} disabled={disabled} readOnly={readOnly} required={required} invalid={!validity.valid} open={open&&!disabled&&!readOnly} onOpenChange={details=>setOpen(details.open&&!disabled&&!readOnly)} min={min&&isCalendarDate(min)?parseDate(min):undefined} max={max&&isCalendarDate(max)?parseDate(max):undefined} startOfWeek={0} minView=\"day\" maxView=\"day\" fixedWeeks translations={{dayCell:state=>`${state.valueText} 선택`,clearTrigger:'선택 날짜 지우기'}} value={selection} format={v=>displayDate(v.toString(),locale)} onValueChange={details=>{const next=details.value[0]?.toString()||'';if(next!==''&&!validateInput(next,required,min,max,locale).valid)return;restoreInputFocus.current=true;setDraft(displayDate(next,locale));commit(next);}} positioning={{placement:'bottom-start',gutter:8}}>\n {/* DDS owns the raw text input; Ark owns calendar interaction, not draft DOM writes. */}\n <ArkDatePicker.Control className=\"dds-date-picker-control\">\n <input {...control} ref={inputRef} type=\"text\" value={effectiveDraft} onChange={()=>{}} required={required} readOnly={readOnly} disabled={disabled} placeholder={isKorean(locale)?\"YYYY/MM/DD\":\"YYYY-MM-DD\"} autoComplete=\"off\" autoCorrect=\"off\" spellCheck={false}\n onInputCapture={event=>{if(disabled||readOnly)return;event.stopPropagation();changeDraft(event.currentTarget.value);}}\n onBlur={()=>{if(!disabled&&!readOnly)commit(effectiveDraft);}}\n onKeyDownCapture={event=>{if(event.key==='Enter'&&!event.nativeEvent.isComposing){event.preventDefault();event.stopPropagation();if(!disabled&&!readOnly)commit(effectiveDraft);}}}/>\n <ArkDatePicker.Trigger asChild><Button type=\"button\" tone=\"secondary\" aria-label={`${label} 달력 열기`}><CalendarIcon/></Button></ArkDatePicker.Trigger>\n </ArkDatePicker.Control>\n <Portal><ArkDatePicker.Positioner className=\"dds-date-picker-positioner\"><ArkDatePicker.Content className=\"dds-date-picker-content\" aria-label={`${label} 날짜 선택`}>\n <ArkDatePicker.View view=\"day\">\n <ArkDatePicker.Context>{picker=><>\n <ArkDatePicker.ViewControl className=\"dds-date-picker-header\">\n <ArkDatePicker.PrevTrigger asChild><Button type=\"button\" tone=\"secondary\" aria-label=\"이전 달\"><Chevron/></Button></ArkDatePicker.PrevTrigger>\n <ArkDatePicker.RangeText/>\n <ArkDatePicker.NextTrigger asChild><Button type=\"button\" tone=\"secondary\" aria-label=\"다음 달\"><Chevron next/></Button></ArkDatePicker.NextTrigger>\n </ArkDatePicker.ViewControl>\n <ArkDatePicker.Table className=\"dds-date-picker-table\">\n <ArkDatePicker.TableHead><ArkDatePicker.TableRow>{picker.weekDays.map((day,index)=><ArkDatePicker.TableHeader key={index}>{day.short}</ArkDatePicker.TableHeader>)}</ArkDatePicker.TableRow></ArkDatePicker.TableHead>\n <ArkDatePicker.TableBody>{picker.weeks.map((week,index)=><ArkDatePicker.TableRow key={index}>{week.map(day=><ArkDatePicker.TableCell key={day.toString()} value={day}><ArkDatePicker.TableCellTrigger>{day.day}</ArkDatePicker.TableCellTrigger></ArkDatePicker.TableCell>)}</ArkDatePicker.TableRow>)}</ArkDatePicker.TableBody>\n </ArkDatePicker.Table>\n <div className=\"dds-date-picker-footer\"><Button type=\"button\" tone=\"secondary\" onClick={()=>picker.selectToday()}>오늘</Button><ArkDatePicker.ClearTrigger hidden={false} asChild><Button type=\"button\" tone=\"secondary\" onClick={()=>{if(!disabled&&!readOnly){setDraft('');commit('');}}}>지우기</Button></ArkDatePicker.ClearTrigger></div>\n </>}</ArkDatePicker.Context>\n </ArkDatePicker.View>\n </ArkDatePicker.Content></ArkDatePicker.Positioner></Portal>\n </ArkDatePicker.Root>}\n </Field>\n );\n}\n","export type StatusTone = \"success\" | \"warning\" | \"danger\" | \"info\" | \"brand\" | \"neutral\";\nexport function createStatusPill<D extends string>(config:{\n tones:Record<D,Record<string,StatusTone>>;\n label:(domain:D,value:string,locale:string)=>string|undefined;\n openDomains?:readonly NoInfer<D>[];\n}){\n const open=new Set<string>(config.openDomains??[]);\n return function StatusPill(props:{domain:D;value:string;locale:string}){\n const tone=config.tones[props.domain]?.[props.value];\n const label=config.label(props.domain,props.value,props.locale);\n if(!tone||!label){\n if(open.has(props.domain))return <code data-status={`${props.domain}.${props.value}`}>{props.value}</code>;\n throw new Error(!tone?`StatusPill: no tone for ${props.domain}.${props.value}`:`StatusPill: no label for ${props.domain}.${props.value}`);\n }\n return <span className={tone==='neutral'?'dds-badge':`dds-badge dds-badge--${tone}`} data-status={`${props.domain}.${props.value}`} data-tone={tone}>{label}</span>;\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAYA,IAAa,KAAW,GAAG,M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,GAAG,EAAM;IAAU,UAAA,EAAM;GAAY,CAAA;GACzG,MAAU,MAAO,IAA8D,4BAA4B,EAAM,OAAO,GAAG,EAAM,UAA3G,2BAA2B,EAAM,OAAO,GAAG,EAAM,OAAiE;EACzI;EACA,OAAO,kBAAC,QAAD;GAAM,WAAW,MAAO,YAAU,cAAY,wBAAwB;GAAQ,eAAa,GAAG,EAAM,OAAO,GAAG,EAAM;GAAS,aAAW;GAAO,UAAA;EAAY,CAAA;CACnK;AACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devslab/dds-react",
3
- "version": "0.21.0",
3
+ "version": "0.21.2",
4
4
  "description": "Accessible React primitives for the DevsLab Design System",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -39,9 +39,9 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@ark-ui/react": "5.39.3",
42
- "@devslab/dds-css": "0.21.0",
43
- "@devslab/dds-icons": "0.21.0",
44
- "@devslab/dds-tokens": "0.21.0"
42
+ "@devslab/dds-css": "0.21.2",
43
+ "@devslab/dds-icons": "0.21.2",
44
+ "@devslab/dds-tokens": "0.21.2"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react": "^18.3.0 || ^19.0.0",