@dev-dga/react 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dhaifallah
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.cjs ADDED
@@ -0,0 +1,520 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ Button: () => Button,
24
+ Checkbox: () => Checkbox,
25
+ DgaProvider: () => DgaProvider,
26
+ Input: () => Input,
27
+ Textarea: () => Textarea,
28
+ buttonVariants: () => buttonVariants,
29
+ checkboxVariants: () => checkboxVariants,
30
+ cn: () => cn,
31
+ inputVariants: () => inputVariants,
32
+ textareaVariants: () => textareaVariants,
33
+ useDga: () => useDga
34
+ });
35
+ module.exports = __toCommonJS(src_exports);
36
+
37
+ // src/components/Button/Button.tsx
38
+ var import_react = require("react");
39
+ var import_class_variance_authority = require("class-variance-authority");
40
+
41
+ // src/utils/cn.ts
42
+ var import_clsx = require("clsx");
43
+ function cn(...inputs) {
44
+ return (0, import_clsx.clsx)(inputs);
45
+ }
46
+
47
+ // src/internal/icons/index.tsx
48
+ var import_jsx_runtime = require("react/jsx-runtime");
49
+ function Spinner(props) {
50
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
51
+ "svg",
52
+ {
53
+ xmlns: "http://www.w3.org/2000/svg",
54
+ width: "1em",
55
+ height: "1em",
56
+ viewBox: "0 0 24 24",
57
+ fill: "none",
58
+ stroke: "currentColor",
59
+ strokeWidth: "2",
60
+ strokeLinecap: "round",
61
+ strokeLinejoin: "round",
62
+ className: "ddga-spinner",
63
+ ...props,
64
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
65
+ }
66
+ );
67
+ }
68
+ function Check(props) {
69
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
70
+ "svg",
71
+ {
72
+ xmlns: "http://www.w3.org/2000/svg",
73
+ width: "1em",
74
+ height: "1em",
75
+ viewBox: "0 0 24 24",
76
+ fill: "none",
77
+ stroke: "currentColor",
78
+ strokeWidth: "3",
79
+ strokeLinecap: "round",
80
+ strokeLinejoin: "round",
81
+ ...props,
82
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M20 6 9 17l-5-5" })
83
+ }
84
+ );
85
+ }
86
+ function Minus(props) {
87
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
88
+ "svg",
89
+ {
90
+ xmlns: "http://www.w3.org/2000/svg",
91
+ width: "1em",
92
+ height: "1em",
93
+ viewBox: "0 0 24 24",
94
+ fill: "none",
95
+ stroke: "currentColor",
96
+ strokeWidth: "3",
97
+ strokeLinecap: "round",
98
+ strokeLinejoin: "round",
99
+ ...props,
100
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M5 12h14" })
101
+ }
102
+ );
103
+ }
104
+
105
+ // src/components/Button/Button.tsx
106
+ var import_jsx_runtime2 = require("react/jsx-runtime");
107
+ var buttonVariants = (0, import_class_variance_authority.cva)("ddga-button", {
108
+ variants: {
109
+ variant: {
110
+ primary: "ddga-button--primary",
111
+ secondary: "ddga-button--secondary",
112
+ outline: "ddga-button--outline",
113
+ ghost: "ddga-button--ghost",
114
+ destructive: "ddga-button--destructive"
115
+ },
116
+ size: {
117
+ sm: "ddga-button--sm",
118
+ md: "ddga-button--md",
119
+ lg: "ddga-button--lg",
120
+ icon: "ddga-button--icon",
121
+ "icon-sm": "ddga-button--icon-sm"
122
+ },
123
+ fullWidth: {
124
+ true: "ddga-button--full-width"
125
+ }
126
+ },
127
+ compoundVariants: [],
128
+ defaultVariants: {
129
+ variant: "primary",
130
+ size: "md"
131
+ }
132
+ });
133
+ function Button({
134
+ variant,
135
+ size,
136
+ fullWidth,
137
+ loading,
138
+ disabled,
139
+ startIcon,
140
+ endIcon,
141
+ iconFlip,
142
+ className,
143
+ children,
144
+ type = "button",
145
+ ...props
146
+ }) {
147
+ if (process.env.NODE_ENV === "development" && (size === "icon" || size === "icon-sm")) {
148
+ if (!props["aria-label"] && !props["aria-labelledby"]) {
149
+ console.warn(
150
+ '[@dev-dga/react] Button with an icon-only size (size="icon" or "icon-sm") requires an aria-label or aria-labelledby attribute for screen reader accessibility.'
151
+ );
152
+ }
153
+ }
154
+ const isDisabled = disabled || loading;
155
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
156
+ "button",
157
+ {
158
+ type,
159
+ disabled: isDisabled,
160
+ "aria-disabled": isDisabled || void 0,
161
+ "aria-busy": loading || void 0,
162
+ "data-slot": "button",
163
+ className: cn(
164
+ buttonVariants({ variant, size, fullWidth }),
165
+ loading && "ddga-button--loading",
166
+ className
167
+ ),
168
+ ...props,
169
+ children: [
170
+ loading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Spinner, { "aria-hidden": "true" }),
171
+ !loading && startIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: cn("ddga-button__icon", iconFlip && "ddga-icon-flip"), "aria-hidden": "true", children: startIcon }),
172
+ children != null && children !== "" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ddga-button__text", children }),
173
+ !loading && endIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: cn("ddga-button__icon", iconFlip && "ddga-icon-flip"), "aria-hidden": "true", children: endIcon })
174
+ ]
175
+ }
176
+ );
177
+ }
178
+
179
+ // src/components/Input/Input.tsx
180
+ var import_class_variance_authority2 = require("class-variance-authority");
181
+
182
+ // src/internal/field/use-field-a11y.ts
183
+ var import_react2 = require("react");
184
+ function isPresent(value) {
185
+ return value != null && value !== "";
186
+ }
187
+ function useFieldA11y(options) {
188
+ const generatedId = (0, import_react2.useId)();
189
+ const fieldId = options.id ?? generatedId;
190
+ const helperId = `${fieldId}-helper`;
191
+ const errorId = `${fieldId}-error`;
192
+ const hasError = !!options.error;
193
+ const hasErrorMessage = hasError && isPresent(options.errorMessage);
194
+ const hasHelper = !hasErrorMessage && isPresent(options.helperText);
195
+ if (process.env.NODE_ENV === "development" && !options.label) {
196
+ if (!options["aria-label"] && !options["aria-labelledby"]) {
197
+ console.warn(
198
+ `[@dev-dga/react] ${options.name} requires a \`label\`, or an aria-label / aria-labelledby attribute, for screen reader accessibility.`
199
+ );
200
+ }
201
+ }
202
+ return {
203
+ fieldId,
204
+ helperId,
205
+ errorId,
206
+ hasError,
207
+ hasErrorMessage,
208
+ hasHelper,
209
+ controlProps: {
210
+ id: fieldId,
211
+ "aria-invalid": hasError || void 0,
212
+ "aria-describedby": hasErrorMessage ? errorId : hasHelper ? helperId : void 0
213
+ }
214
+ };
215
+ }
216
+
217
+ // src/internal/field/FieldMessage.tsx
218
+ var import_jsx_runtime3 = require("react/jsx-runtime");
219
+ function FieldMessage({ id, variant, children }) {
220
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
221
+ "p",
222
+ {
223
+ id,
224
+ "data-slot": `field-${variant}`,
225
+ className: `ddga-field__message ddga-field__message--${variant}`,
226
+ "aria-live": variant === "error" ? "polite" : void 0,
227
+ children
228
+ }
229
+ );
230
+ }
231
+
232
+ // src/components/Input/Input.tsx
233
+ var import_jsx_runtime4 = require("react/jsx-runtime");
234
+ var inputVariants = (0, import_class_variance_authority2.cva)("ddga-input", {
235
+ variants: {
236
+ size: {
237
+ sm: "ddga-input--sm",
238
+ md: "ddga-input--md",
239
+ lg: "ddga-input--lg"
240
+ },
241
+ error: {
242
+ true: "ddga-input--error"
243
+ }
244
+ },
245
+ defaultVariants: {
246
+ size: "md"
247
+ }
248
+ });
249
+ function Input({
250
+ id: externalId,
251
+ label,
252
+ helperText,
253
+ errorMessage,
254
+ error,
255
+ size,
256
+ required,
257
+ startAdornment,
258
+ endAdornment,
259
+ className,
260
+ ...props
261
+ }) {
262
+ const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } = useFieldA11y({
263
+ name: "Input",
264
+ id: externalId,
265
+ label,
266
+ error,
267
+ errorMessage,
268
+ helperText,
269
+ "aria-label": props["aria-label"],
270
+ "aria-labelledby": props["aria-labelledby"]
271
+ });
272
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { "data-slot": "input-field", className: "ddga-field", children: [
273
+ label && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("label", { htmlFor: fieldId, className: "ddga-input__label", children: [
274
+ label,
275
+ required && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "aria-hidden": "true", className: "ddga-input__required", children: "*" })
276
+ ] }),
277
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
278
+ "div",
279
+ {
280
+ "data-slot": "input-control",
281
+ className: cn(inputVariants({ size, error: hasError }), className),
282
+ children: [
283
+ startAdornment != null && startAdornment !== "" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
284
+ "span",
285
+ {
286
+ "data-slot": "input-adornment",
287
+ className: "ddga-input__adornment ddga-input__adornment--start",
288
+ children: startAdornment
289
+ }
290
+ ),
291
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
292
+ "input",
293
+ {
294
+ ...props,
295
+ ...controlProps,
296
+ "data-slot": "input",
297
+ required,
298
+ className: "ddga-input__field"
299
+ }
300
+ ),
301
+ endAdornment != null && endAdornment !== "" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
302
+ "span",
303
+ {
304
+ "data-slot": "input-adornment",
305
+ className: "ddga-input__adornment ddga-input__adornment--end",
306
+ children: endAdornment
307
+ }
308
+ )
309
+ ]
310
+ }
311
+ ),
312
+ hasErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
313
+ hasHelper && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FieldMessage, { id: helperId, variant: "helper", children: helperText })
314
+ ] });
315
+ }
316
+
317
+ // src/components/Textarea/Textarea.tsx
318
+ var import_class_variance_authority3 = require("class-variance-authority");
319
+ var import_jsx_runtime5 = require("react/jsx-runtime");
320
+ var textareaVariants = (0, import_class_variance_authority3.cva)("ddga-textarea", {
321
+ variants: {
322
+ size: {
323
+ sm: "ddga-textarea--sm",
324
+ md: "ddga-textarea--md",
325
+ lg: "ddga-textarea--lg"
326
+ },
327
+ error: {
328
+ true: "ddga-textarea--error"
329
+ },
330
+ // Horizontal/both resize breaks form layout (same reason it's not the
331
+ // default) — only vertical or locked are offered.
332
+ resize: {
333
+ vertical: "ddga-textarea--resize-vertical",
334
+ none: "ddga-textarea--resize-none"
335
+ }
336
+ },
337
+ defaultVariants: {
338
+ size: "md",
339
+ resize: "vertical"
340
+ }
341
+ });
342
+ function Textarea({
343
+ id: externalId,
344
+ label,
345
+ helperText,
346
+ errorMessage,
347
+ error,
348
+ size,
349
+ resize,
350
+ required,
351
+ rows = 3,
352
+ className,
353
+ ...props
354
+ }) {
355
+ const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } = useFieldA11y({
356
+ name: "Textarea",
357
+ id: externalId,
358
+ label,
359
+ error,
360
+ errorMessage,
361
+ helperText,
362
+ "aria-label": props["aria-label"],
363
+ "aria-labelledby": props["aria-labelledby"]
364
+ });
365
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { "data-slot": "textarea-field", className: "ddga-field", children: [
366
+ label && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { htmlFor: fieldId, className: "ddga-textarea__label", children: [
367
+ label,
368
+ required && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { "aria-hidden": "true", className: "ddga-textarea__required", children: "*" })
369
+ ] }),
370
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
371
+ "textarea",
372
+ {
373
+ ...props,
374
+ ...controlProps,
375
+ "data-slot": "textarea",
376
+ rows,
377
+ required,
378
+ className: cn(textareaVariants({ size, error: hasError, resize }), className)
379
+ }
380
+ ),
381
+ hasErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
382
+ hasHelper && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FieldMessage, { id: helperId, variant: "helper", children: helperText })
383
+ ] });
384
+ }
385
+
386
+ // src/components/Checkbox/Checkbox.tsx
387
+ var import_radix_ui = require("radix-ui");
388
+ var import_class_variance_authority4 = require("class-variance-authority");
389
+ var import_jsx_runtime6 = require("react/jsx-runtime");
390
+ var checkboxVariants = (0, import_class_variance_authority4.cva)("ddga-checkbox", {
391
+ variants: {
392
+ size: {
393
+ sm: "ddga-checkbox--sm",
394
+ md: "ddga-checkbox--md"
395
+ },
396
+ error: {
397
+ true: "ddga-checkbox--error"
398
+ }
399
+ },
400
+ defaultVariants: {
401
+ size: "md"
402
+ }
403
+ });
404
+ function Checkbox({
405
+ id: externalId,
406
+ label,
407
+ helperText,
408
+ errorMessage,
409
+ error,
410
+ size,
411
+ required,
412
+ className,
413
+ ...props
414
+ }) {
415
+ const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } = useFieldA11y({
416
+ name: "Checkbox",
417
+ id: externalId,
418
+ label,
419
+ error,
420
+ errorMessage,
421
+ helperText,
422
+ "aria-label": props["aria-label"],
423
+ "aria-labelledby": props["aria-labelledby"]
424
+ });
425
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { "data-slot": "checkbox-field", className: "ddga-field", children: [
426
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "ddga-checkbox-row", children: [
427
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
428
+ import_radix_ui.Checkbox.Root,
429
+ {
430
+ ...props,
431
+ ...controlProps,
432
+ "data-slot": "checkbox",
433
+ required,
434
+ className: cn(checkboxVariants({ size, error: hasError }), className),
435
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
436
+ import_radix_ui.Checkbox.Indicator,
437
+ {
438
+ "data-slot": "checkbox-indicator",
439
+ className: "ddga-checkbox__indicator",
440
+ children: [
441
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Check, { className: "ddga-checkbox__check", "aria-hidden": "true" }),
442
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Minus, { className: "ddga-checkbox__minus", "aria-hidden": "true" })
443
+ ]
444
+ }
445
+ )
446
+ }
447
+ ),
448
+ label && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { htmlFor: fieldId, className: "ddga-checkbox__label", children: [
449
+ label,
450
+ required && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { "aria-hidden": "true", className: "ddga-checkbox__required", children: "*" })
451
+ ] })
452
+ ] }),
453
+ hasErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
454
+ hasHelper && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FieldMessage, { id: helperId, variant: "helper", children: helperText })
455
+ ] });
456
+ }
457
+
458
+ // src/providers/DgaProvider.tsx
459
+ var import_react4 = require("react");
460
+ var import_radix_ui2 = require("radix-ui");
461
+
462
+ // src/providers/DgaContext.ts
463
+ var import_react3 = require("react");
464
+ var DgaContext = (0, import_react3.createContext)(null);
465
+ function useDga() {
466
+ const ctx = (0, import_react3.useContext)(DgaContext);
467
+ if (!ctx) {
468
+ throw new Error("useDga must be used within a <DgaProvider>");
469
+ }
470
+ return ctx;
471
+ }
472
+
473
+ // src/providers/DgaProvider.tsx
474
+ var import_jsx_runtime7 = require("react/jsx-runtime");
475
+ function DgaProvider({
476
+ dir = "ltr",
477
+ locale,
478
+ mode = "light",
479
+ as: Component = "div",
480
+ className,
481
+ style: consumerStyle,
482
+ children
483
+ }) {
484
+ const parentCtx = (0, import_react4.useContext)(DgaContext);
485
+ const isNested = parentCtx !== null;
486
+ const rootRef = (0, import_react4.useRef)(null);
487
+ const resolvedLocale = locale ?? (dir === "rtl" ? "ar" : "en");
488
+ const ctxValue = (0, import_react4.useMemo)(
489
+ () => ({ dir, locale: resolvedLocale, mode, rootRef }),
490
+ [dir, resolvedLocale, mode]
491
+ );
492
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DgaContext.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
493
+ Component,
494
+ {
495
+ ref: rootRef,
496
+ dir,
497
+ lang: resolvedLocale,
498
+ "data-slot": "dga-root",
499
+ "data-theme": mode,
500
+ className,
501
+ style: { colorScheme: mode, ...consumerStyle },
502
+ children: isNested ? children : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_radix_ui2.Tooltip.Provider, { delayDuration: 300, skipDelayDuration: 100, children })
503
+ }
504
+ ) });
505
+ }
506
+ // Annotate the CommonJS export names for ESM import in node:
507
+ 0 && (module.exports = {
508
+ Button,
509
+ Checkbox,
510
+ DgaProvider,
511
+ Input,
512
+ Textarea,
513
+ buttonVariants,
514
+ checkboxVariants,
515
+ cn,
516
+ inputVariants,
517
+ textareaVariants,
518
+ useDga
519
+ });
520
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/components/Button/Button.tsx","../src/utils/cn.ts","../src/internal/icons/index.tsx","../src/components/Input/Input.tsx","../src/internal/field/use-field-a11y.ts","../src/internal/field/FieldMessage.tsx","../src/components/Textarea/Textarea.tsx","../src/components/Checkbox/Checkbox.tsx","../src/providers/DgaProvider.tsx","../src/providers/DgaContext.ts"],"sourcesContent":["export { Button, buttonVariants, type ButtonProps } from './components/Button';\nexport { Input, inputVariants, type InputProps } from './components/Input';\nexport { Textarea, textareaVariants, type TextareaProps } from './components/Textarea';\nexport { Checkbox, checkboxVariants, type CheckboxProps } from './components/Checkbox';\nexport { DgaProvider, type DgaProviderProps } from './providers/DgaProvider';\nexport { useDga } from './providers/DgaContext';\nexport { cn } from './utils/cn';\n","'use client';\n\nimport { type ReactNode } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { Spinner } from '../../internal/icons';\n\n// ─── 1. Variants (cva) ─── //\n\nconst buttonVariants = cva('ddga-button', {\n variants: {\n variant: {\n primary: 'ddga-button--primary',\n secondary: 'ddga-button--secondary',\n outline: 'ddga-button--outline',\n ghost: 'ddga-button--ghost',\n destructive: 'ddga-button--destructive',\n },\n size: {\n sm: 'ddga-button--sm',\n md: 'ddga-button--md',\n lg: 'ddga-button--lg',\n icon: 'ddga-button--icon',\n 'icon-sm': 'ddga-button--icon-sm',\n },\n fullWidth: {\n true: 'ddga-button--full-width',\n },\n },\n compoundVariants: [],\n defaultVariants: {\n variant: 'primary',\n size: 'md',\n },\n});\n\n// ─── 2. Types ─── //\n\ninterface ButtonProps extends React.ComponentProps<'button'>, VariantProps<typeof buttonVariants> {\n loading?: boolean;\n startIcon?: ReactNode;\n endIcon?: ReactNode;\n /** Flip start/end icons horizontally in RTL (for chevrons, arrows, etc.) */\n iconFlip?: boolean;\n}\n\n// ─── 3. Component ─── //\n\nfunction Button({\n variant,\n size,\n fullWidth,\n loading,\n disabled,\n startIcon,\n endIcon,\n iconFlip,\n className,\n children,\n type = 'button',\n ...props\n}: ButtonProps) {\n // Dev-only: warn if icon-only button has no accessible name\n if (process.env.NODE_ENV === 'development' && (size === 'icon' || size === 'icon-sm')) {\n if (!props['aria-label'] && !props['aria-labelledby']) {\n console.warn(\n '[@dev-dga/react] Button with an icon-only size (size=\"icon\" or ' +\n '\"icon-sm\") requires an aria-label or aria-labelledby attribute ' +\n 'for screen reader accessibility.',\n );\n }\n }\n\n const isDisabled = disabled || loading;\n\n return (\n <button\n type={type}\n disabled={isDisabled}\n // Both disabled and aria-disabled are set intentionally:\n // - disabled: removes from tab order and prevents interaction\n // - aria-disabled: explicit signal for ARIA consumers that don't read native disabled\n aria-disabled={isDisabled || undefined}\n aria-busy={loading || undefined}\n data-slot=\"button\"\n className={cn(\n buttonVariants({ variant, size, fullWidth }),\n loading && 'ddga-button--loading',\n className,\n )}\n {...props}\n >\n {loading && <Spinner aria-hidden=\"true\" />}\n {!loading && startIcon && (\n <span className={cn('ddga-button__icon', iconFlip && 'ddga-icon-flip')} aria-hidden=\"true\">\n {startIcon}\n </span>\n )}\n {children != null && children !== '' && <span className=\"ddga-button__text\">{children}</span>}\n {!loading && endIcon && (\n <span className={cn('ddga-button__icon', iconFlip && 'ddga-icon-flip')} aria-hidden=\"true\">\n {endIcon}\n </span>\n )}\n </button>\n );\n}\n\n// ─── 4. Exports ─── //\n\nexport { Button, buttonVariants };\nexport type { ButtonProps };\n","import { clsx, type ClassValue } from 'clsx';\n\nexport function cn(...inputs: ClassValue[]) {\n return clsx(inputs);\n}\n","'use client';\n\n/**\n * Internal loading spinner icon.\n * Not exported from the public API — used only by Button and similar components.\n */\nexport function Spinner(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"ddga-spinner\"\n {...props}\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n </svg>\n );\n}\n\n/**\n * Internal checkmark icon — used by Checkbox (checked state).\n * Not exported from the public API.\n */\nexport function Check(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n {...props}\n >\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n );\n}\n\n/**\n * Internal minus/dash icon — used by Checkbox (indeterminate state).\n * Not exported from the public API.\n */\nexport function Minus(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n {...props}\n >\n <path d=\"M5 12h14\" />\n </svg>\n );\n}\n","'use client';\n\nimport type { ReactNode } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { useFieldA11y, FieldMessage } from '../../internal/field';\n\n// ─── 1. Variants (cva) ─── //\n\n// Applied to the *control* (the bordered box), not the raw <input>. The\n// control owns the border, sizing, focus ring and disabled/error styling\n// so leading/trailing adornments sit inside the field.\nconst inputVariants = cva('ddga-input', {\n variants: {\n size: {\n sm: 'ddga-input--sm',\n md: 'ddga-input--md',\n lg: 'ddga-input--lg',\n },\n error: {\n true: 'ddga-input--error',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\n// ─── 2. Types ─── //\n\n// `Omit<…, 'size'>`: the native HTML `size` attribute (visible character\n// width, a number) collides with our design-system `size` variant. The\n// variant is far more useful; drop the rarely-used native attribute.\ninterface InputProps\n extends Omit<React.ComponentProps<'input'>, 'size'>, VariantProps<typeof inputVariants> {\n /** Visible field label, auto-associated to the input via `htmlFor`/`id`. */\n label?: ReactNode;\n /** Hint shown below the field. Hidden while an error message is showing. */\n helperText?: ReactNode;\n /** Message shown below the field when `error` is true. */\n errorMessage?: ReactNode;\n /** Marks the field invalid: sets `aria-invalid` and error styling. */\n error?: boolean;\n /**\n * Content rendered inside the field, before the input (icon or short text,\n * e.g. a search glyph or `https://`). May be interactive — it is NOT\n * `aria-hidden`. Mark purely-decorative icons `aria-hidden` yourself.\n */\n startAdornment?: ReactNode;\n /**\n * Content rendered inside the field, after the input. Compose a clear\n * button or password-reveal toggle here with `<Button size=\"icon-sm\">`\n * — the 28px in-field icon size that fits the field without overflow.\n */\n endAdornment?: ReactNode;\n}\n\n// ─── 3. Component ─── //\n\nfunction Input({\n id: externalId,\n label,\n helperText,\n errorMessage,\n error,\n size,\n required,\n startAdornment,\n endAdornment,\n className,\n ...props\n}: InputProps) {\n const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } =\n useFieldA11y({\n name: 'Input',\n id: externalId,\n label,\n error,\n errorMessage,\n helperText,\n 'aria-label': props['aria-label'],\n 'aria-labelledby': props['aria-labelledby'],\n });\n\n return (\n <div data-slot=\"input-field\" className=\"ddga-field\">\n {label && (\n <label htmlFor={fieldId} className=\"ddga-input__label\">\n {label}\n {required && (\n <span aria-hidden=\"true\" className=\"ddga-input__required\">\n *\n </span>\n )}\n </label>\n )}\n <div\n data-slot=\"input-control\"\n className={cn(inputVariants({ size, error: hasError }), className)}\n >\n {startAdornment != null && startAdornment !== '' && (\n <span\n data-slot=\"input-adornment\"\n className=\"ddga-input__adornment ddga-input__adornment--start\"\n >\n {startAdornment}\n </span>\n )}\n <input\n // Spread props first, then the a11y contract (controlProps) so a\n // consumer cannot accidentally clobber the wiring.\n {...props}\n {...controlProps}\n data-slot=\"input\"\n required={required}\n className=\"ddga-input__field\"\n />\n {endAdornment != null && endAdornment !== '' && (\n <span\n data-slot=\"input-adornment\"\n className=\"ddga-input__adornment ddga-input__adornment--end\"\n >\n {endAdornment}\n </span>\n )}\n </div>\n {hasErrorMessage && (\n <FieldMessage id={errorId} variant=\"error\">\n {errorMessage}\n </FieldMessage>\n )}\n {hasHelper && (\n <FieldMessage id={helperId} variant=\"helper\">\n {helperText}\n </FieldMessage>\n )}\n </div>\n );\n}\n\n// ─── 4. Exports ─── //\n\nexport { Input, inputVariants };\nexport type { InputProps };\n","import { useId, type ReactNode } from 'react';\n\n// Internal — not part of the public API. Shared by Input / Textarea /\n// Checkbox (and future form controls) so the id generation, error/helper\n// precedence, control ARIA wiring, and dev-time a11y warning live in\n// exactly one place instead of being hand-rolled per component.\n\ninterface UseFieldA11yOptions {\n /** Component name used in the dev warning, e.g. `'Input'`. */\n name: string;\n /** Caller-supplied id; falls back to a stable generated one. */\n id?: string;\n label?: ReactNode;\n error?: boolean;\n errorMessage?: ReactNode;\n helperText?: ReactNode;\n /** From the consumer's props — used to suppress the no-label warning. */\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n}\n\ninterface FieldA11y {\n fieldId: string;\n helperId: string;\n errorId: string;\n hasError: boolean;\n hasErrorMessage: boolean;\n hasHelper: boolean;\n /** Spread onto the control element (input / textarea / Radix root). */\n controlProps: {\n id: string;\n 'aria-invalid': true | undefined;\n 'aria-describedby': string | undefined;\n };\n}\n\nfunction isPresent(value: ReactNode): boolean {\n return value != null && value !== '';\n}\n\nexport function useFieldA11y(options: UseFieldA11yOptions): FieldA11y {\n // useId() is SSR-safe — stable across server/client, no hydration mismatch.\n const generatedId = useId();\n const fieldId = options.id ?? generatedId;\n const helperId = `${fieldId}-helper`;\n const errorId = `${fieldId}-error`;\n\n const hasError = !!options.error;\n const hasErrorMessage = hasError && isPresent(options.errorMessage);\n // An error message replaces helper text (one description at a time).\n const hasHelper = !hasErrorMessage && isPresent(options.helperText);\n\n // Dev-only: warn if the field has no accessible name. This library makes\n // the accessible path the default across every form control.\n if (process.env.NODE_ENV === 'development' && !options.label) {\n if (!options['aria-label'] && !options['aria-labelledby']) {\n console.warn(\n `[@dev-dga/react] ${options.name} requires a \\`label\\`, or an ` +\n 'aria-label / aria-labelledby attribute, for screen reader accessibility.',\n );\n }\n }\n\n return {\n fieldId,\n helperId,\n errorId,\n hasError,\n hasErrorMessage,\n hasHelper,\n controlProps: {\n id: fieldId,\n 'aria-invalid': hasError || undefined,\n 'aria-describedby': hasErrorMessage ? errorId : hasHelper ? helperId : undefined,\n },\n };\n}\n","import type { ReactNode } from 'react';\n\n// Internal — not public API. The helper / error line below a form control.\n// Identical markup and styling across Input / Textarea / Checkbox, so it\n// lives here once. No 'use client': pure markup, no hooks or client APIs.\n\ninterface FieldMessageProps {\n id: string;\n /** `error` announces politely; `helper` is static. */\n variant: 'error' | 'helper';\n children: ReactNode;\n}\n\nexport function FieldMessage({ id, variant, children }: FieldMessageProps) {\n return (\n <p\n id={id}\n data-slot={`field-${variant}`}\n className={`ddga-field__message ddga-field__message--${variant}`}\n // Polite (not assertive): an assertive error interrupts the user\n // mid-interaction, the wrong UX for field-level validation.\n aria-live={variant === 'error' ? 'polite' : undefined}\n >\n {children}\n </p>\n );\n}\n","'use client';\n\nimport type { ReactNode } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { useFieldA11y, FieldMessage } from '../../internal/field';\n\n// ─── 1. Variants (cva) ─── //\n\n// Applied to the <textarea> directly: unlike Input there are no adornments,\n// so the field owns its own border / focus ring / state styling — no\n// control wrapper needed.\nconst textareaVariants = cva('ddga-textarea', {\n variants: {\n size: {\n sm: 'ddga-textarea--sm',\n md: 'ddga-textarea--md',\n lg: 'ddga-textarea--lg',\n },\n error: {\n true: 'ddga-textarea--error',\n },\n // Horizontal/both resize breaks form layout (same reason it's not the\n // default) — only vertical or locked are offered.\n resize: {\n vertical: 'ddga-textarea--resize-vertical',\n none: 'ddga-textarea--resize-none',\n },\n },\n defaultVariants: {\n size: 'md',\n resize: 'vertical',\n },\n});\n\n// ─── 2. Types ─── //\n\n// `<textarea>` has no native `size` attribute (unlike `<input>`), so the\n// cva `size` variant doesn't collide — no `Omit` needed.\ninterface TextareaProps\n extends React.ComponentProps<'textarea'>, VariantProps<typeof textareaVariants> {\n /** Visible field label, auto-associated to the textarea via `htmlFor`/`id`. */\n label?: ReactNode;\n /** Hint shown below the field. Hidden while an error message is showing. */\n helperText?: ReactNode;\n /** Message shown below the field when `error` is true. */\n errorMessage?: ReactNode;\n /** Marks the field invalid: sets `aria-invalid` and error styling. */\n error?: boolean;\n}\n\n// ─── 3. Component ─── //\n\nfunction Textarea({\n id: externalId,\n label,\n helperText,\n errorMessage,\n error,\n size,\n resize,\n required,\n rows = 3,\n className,\n ...props\n}: TextareaProps) {\n const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } =\n useFieldA11y({\n name: 'Textarea',\n id: externalId,\n label,\n error,\n errorMessage,\n helperText,\n 'aria-label': props['aria-label'],\n 'aria-labelledby': props['aria-labelledby'],\n });\n\n return (\n <div data-slot=\"textarea-field\" className=\"ddga-field\">\n {label && (\n <label htmlFor={fieldId} className=\"ddga-textarea__label\">\n {label}\n {required && (\n <span aria-hidden=\"true\" className=\"ddga-textarea__required\">\n *\n </span>\n )}\n </label>\n )}\n <textarea\n // Spread props first, then the a11y contract (controlProps) so a\n // consumer cannot accidentally clobber the wiring.\n {...props}\n {...controlProps}\n data-slot=\"textarea\"\n rows={rows}\n required={required}\n className={cn(textareaVariants({ size, error: hasError, resize }), className)}\n />\n {hasErrorMessage && (\n <FieldMessage id={errorId} variant=\"error\">\n {errorMessage}\n </FieldMessage>\n )}\n {hasHelper && (\n <FieldMessage id={helperId} variant=\"helper\">\n {helperText}\n </FieldMessage>\n )}\n </div>\n );\n}\n\n// ─── 4. Exports ─── //\n\nexport { Textarea, textareaVariants };\nexport type { TextareaProps };\n","'use client';\n\nimport type { ReactNode } from 'react';\nimport { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { Check, Minus } from '../../internal/icons';\nimport { useFieldA11y, FieldMessage } from '../../internal/field';\n\n// ─── 1. Variants (cva) ─── //\n\n// Applied to the Radix Root (the role=checkbox button). Two sizes only —\n// a \"lg\" checkbox is unusual; keep the surface honest.\nconst checkboxVariants = cva('ddga-checkbox', {\n variants: {\n size: {\n sm: 'ddga-checkbox--sm',\n md: 'ddga-checkbox--md',\n },\n error: {\n true: 'ddga-checkbox--error',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\n// ─── 2. Types ─── //\n\n// Radix owns the state model (checked / defaultChecked / onCheckedChange /\n// indeterminate via checked=\"indeterminate\" / disabled / required / name /\n// value). We add the composed label + helper/error + a11y wiring. `children`\n// is omitted — the indicator is rendered internally.\ninterface CheckboxProps\n extends\n Omit<React.ComponentProps<typeof CheckboxPrimitive.Root>, 'children'>,\n VariantProps<typeof checkboxVariants> {\n /** Visible label, sits beside the box, associated via `htmlFor`/`id`. */\n label?: ReactNode;\n /** Hint shown below the row. Hidden while an error message is showing. */\n helperText?: ReactNode;\n /** Message shown below the row when `error` is true. */\n errorMessage?: ReactNode;\n /** Marks the field invalid: sets `aria-invalid` and error styling. */\n error?: boolean;\n}\n\n// ─── 3. Component ─── //\n\nfunction Checkbox({\n id: externalId,\n label,\n helperText,\n errorMessage,\n error,\n size,\n required,\n className,\n ...props\n}: CheckboxProps) {\n const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } =\n useFieldA11y({\n name: 'Checkbox',\n id: externalId,\n label,\n error,\n errorMessage,\n helperText,\n 'aria-label': props['aria-label'],\n 'aria-labelledby': props['aria-labelledby'],\n });\n\n return (\n <div data-slot=\"checkbox-field\" className=\"ddga-field\">\n <div className=\"ddga-checkbox-row\">\n <CheckboxPrimitive.Root\n // Spread props first, then the a11y contract (controlProps) so a\n // consumer cannot accidentally clobber the wiring.\n {...props}\n {...controlProps}\n data-slot=\"checkbox\"\n required={required}\n className={cn(checkboxVariants({ size, error: hasError }), className)}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"ddga-checkbox__indicator\"\n >\n {/* Both render inside the indicator (which only mounts when\n checked or indeterminate); CSS picks one via Root data-state. */}\n <Check className=\"ddga-checkbox__check\" aria-hidden=\"true\" />\n <Minus className=\"ddga-checkbox__minus\" aria-hidden=\"true\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n {label && (\n <label htmlFor={fieldId} className=\"ddga-checkbox__label\">\n {label}\n {required && (\n <span aria-hidden=\"true\" className=\"ddga-checkbox__required\">\n *\n </span>\n )}\n </label>\n )}\n </div>\n {hasErrorMessage && (\n <FieldMessage id={errorId} variant=\"error\">\n {errorMessage}\n </FieldMessage>\n )}\n {hasHelper && (\n <FieldMessage id={helperId} variant=\"helper\">\n {helperText}\n </FieldMessage>\n )}\n </div>\n );\n}\n\n// ─── 4. Exports ─── //\n\nexport { Checkbox, checkboxVariants };\nexport type { CheckboxProps };\n","'use client';\n\nimport { useRef, useMemo, useContext } from 'react';\nimport { Tooltip as TooltipPrimitive } from 'radix-ui';\nimport { DgaContext, type DgaContextValue } from './DgaContext';\n\ntype DgaRootElement =\n | 'div'\n | 'main'\n | 'nav'\n | 'section'\n | 'article'\n | 'aside'\n | 'header'\n | 'footer';\n\nexport interface DgaProviderProps {\n dir?: 'ltr' | 'rtl';\n locale?: string;\n mode?: 'light' | 'dark';\n as?: DgaRootElement;\n className?: string;\n style?: React.CSSProperties;\n children: React.ReactNode;\n}\n\nexport function DgaProvider({\n dir = 'ltr',\n locale,\n mode = 'light',\n as: Component = 'div',\n className,\n style: consumerStyle,\n children,\n}: DgaProviderProps) {\n const parentCtx = useContext(DgaContext);\n const isNested = parentCtx !== null;\n const rootRef = useRef<HTMLDivElement>(null);\n const resolvedLocale = locale ?? (dir === 'rtl' ? 'ar' : 'en');\n\n const ctxValue = useMemo<DgaContextValue>(\n () => ({ dir, locale: resolvedLocale, mode, rootRef }),\n [dir, resolvedLocale, mode],\n );\n\n return (\n <DgaContext.Provider value={ctxValue}>\n <Component\n ref={rootRef as React.RefObject<never>}\n dir={dir}\n lang={resolvedLocale}\n data-slot=\"dga-root\"\n data-theme={mode}\n className={className}\n style={{ colorScheme: mode, ...consumerStyle }}\n >\n {isNested ? (\n children\n ) : (\n <TooltipPrimitive.Provider delayDuration={300} skipDelayDuration={100}>\n {children}\n </TooltipPrimitive.Provider>\n )}\n </Component>\n </DgaContext.Provider>\n );\n}\n","'use client';\n\nimport { createContext, useContext } from 'react';\n\nexport interface DgaContextValue {\n dir: 'ltr' | 'rtl';\n locale: string;\n mode: 'light' | 'dark';\n rootRef: React.RefObject<HTMLElement | null>;\n}\n\nexport const DgaContext = createContext<DgaContextValue | null>(null);\n\nexport function useDga(): DgaContextValue {\n const ctx = useContext(DgaContext);\n if (!ctx) {\n throw new Error('useDga must be used within a <DgaProvider>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A,IACpD,CAAC,KAAK,gBAAgB,IAAI;AAAA,EAC5B;AAEA,SACE,6CAAC,WAAW,UAAX,EAAoB,OAAO,UAC1B;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL;AAAA,MACA,MAAM;AAAA,MACN,aAAU;AAAA,MACV,cAAY;AAAA,MACZ;AAAA,MACA,OAAO,EAAE,aAAa,MAAM,GAAG,cAAc;AAAA,MAE5C,qBACC,WAEA,6CAAC,iBAAAC,QAAiB,UAAjB,EAA0B,eAAe,KAAK,mBAAmB,KAC/D,UACH;AAAA;AAAA,EAEJ,GACF;AAEJ;","names":["import_jsx_runtime","import_class_variance_authority","import_react","import_jsx_runtime","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","CheckboxPrimitive","import_react","import_radix_ui","import_react","import_jsx_runtime","TooltipPrimitive"]}