@yuno-payments/dashboard-design-system 0.0.170 → 0.0.171

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.
Files changed (161) hide show
  1. package/dist/components/atoms/access-denied-alert/access-denied-alert.d.ts +16 -0
  2. package/dist/components/atoms/accordion/accordion.d.ts +66 -0
  3. package/dist/components/atoms/alert/alert.d.ts +26 -1
  4. package/dist/components/atoms/alert/alert.js +9 -8
  5. package/dist/components/atoms/avatar/avatar-group.d.ts +28 -0
  6. package/dist/components/atoms/avatar/avatar.d.ts +25 -0
  7. package/dist/components/atoms/avatar/avatar.js +9 -9
  8. package/dist/components/atoms/badge/badge.d.ts +30 -2
  9. package/dist/components/atoms/badge/badge.js +27 -11
  10. package/dist/components/atoms/button/button.d.ts +44 -0
  11. package/dist/components/atoms/card/card.d.ts +137 -3
  12. package/dist/components/atoms/card/card.js +56 -28
  13. package/dist/components/atoms/checkbox/checkbox.d.ts +38 -2
  14. package/dist/components/atoms/checkbox/checkbox.js +61 -27
  15. package/dist/components/atoms/combobox/combobox.d.ts +18 -0
  16. package/dist/components/atoms/combobox/combobox.js +41 -41
  17. package/dist/components/atoms/combobox/types.d.ts +90 -1
  18. package/dist/components/atoms/currency-field/currency-field.d.ts +38 -0
  19. package/dist/components/atoms/currency-field/currency-field.js +22 -19
  20. package/dist/components/atoms/date-picker/date-picker.d.ts +15 -0
  21. package/dist/components/atoms/date-range-picker/date-range-picker.d.ts +15 -0
  22. package/dist/components/atoms/dots-menu/dots-menu.d.ts +16 -0
  23. package/dist/components/atoms/dots-menu/dots-menu.js +8 -8
  24. package/dist/components/atoms/dots-menu/dots-menu.types.d.ts +52 -0
  25. package/dist/components/atoms/dropdown-menu/dropdown-menu.d.ts +50 -0
  26. package/dist/components/atoms/field/field.d.ts +55 -0
  27. package/dist/components/atoms/field/field.js +53 -46
  28. package/dist/components/atoms/filter/filter-date-range.d.ts +12 -2
  29. package/dist/components/atoms/filter/filter-date-range.js +203 -168
  30. package/dist/components/atoms/filter/filter.d.ts +6 -0
  31. package/dist/components/atoms/filter/filter.js +91 -76
  32. package/dist/components/atoms/filter/index.d.ts +1 -1
  33. package/dist/components/atoms/filter-dropdown/filter-dropdown.d.ts +208 -2
  34. package/dist/components/atoms/filter-dropdown/filter-dropdown.js +214 -160
  35. package/dist/components/atoms/icon/aida-logo.d.ts +3 -0
  36. package/dist/components/atoms/icon/aida-logo.js +64 -0
  37. package/dist/components/atoms/icon/icon-list.d.ts +5 -0
  38. package/dist/components/atoms/icon/icon-list.js +394 -384
  39. package/dist/components/atoms/icon/icon.d.ts +29 -0
  40. package/dist/components/atoms/index.d.ts +3 -2
  41. package/dist/components/atoms/label/index.d.ts +1 -1
  42. package/dist/components/atoms/label/label.d.ts +11 -0
  43. package/dist/components/atoms/label/label.js +28 -0
  44. package/dist/components/atoms/link/link.d.ts +20 -0
  45. package/dist/components/atoms/loading/index.d.ts +1 -0
  46. package/dist/components/atoms/loading/loading.d.ts +39 -0
  47. package/dist/components/atoms/loading/loading.js +37 -0
  48. package/dist/components/atoms/multi-select/multi-select.d.ts +1 -1
  49. package/dist/components/atoms/multi-select/multi-select.js +6 -6
  50. package/dist/components/atoms/multi-values-field/multi-values-field.d.ts +16 -0
  51. package/dist/components/atoms/multi-values-field/multi-values-field.js +109 -87
  52. package/dist/components/atoms/multi-values-field/multi-values-field.types.d.ts +81 -0
  53. package/dist/components/atoms/otp-field/otp-field.d.ts +32 -0
  54. package/dist/components/atoms/password-field/password-field.d.ts +23 -0
  55. package/dist/components/atoms/password-field/password-field.js +1 -1
  56. package/dist/components/atoms/progress/progress.d.ts +15 -0
  57. package/dist/components/atoms/protected-field/protected-field.d.ts +10 -0
  58. package/dist/components/atoms/protected-field/protected-field.types.d.ts +14 -0
  59. package/dist/components/atoms/radio-group/radio-group-option.js +11 -11
  60. package/dist/components/atoms/radio-group/radio-group.d.ts +50 -1
  61. package/dist/components/atoms/radio-group/radio-group.js +13 -12
  62. package/dist/components/atoms/search-field/search-field.d.ts +14 -0
  63. package/dist/components/atoms/search-field/search-field.js +17 -17
  64. package/dist/components/atoms/search-field/search-field.types.d.ts +57 -0
  65. package/dist/components/atoms/select/index.d.ts +2 -0
  66. package/dist/components/atoms/select/search-select.d.ts +22 -0
  67. package/dist/components/atoms/select/search-select.js +201 -0
  68. package/dist/components/atoms/select/select.d.ts +83 -1
  69. package/dist/components/atoms/select/select.js +21 -21
  70. package/dist/components/atoms/separator/separator.d.ts +17 -0
  71. package/dist/components/atoms/skeleton/index.d.ts +9 -0
  72. package/dist/components/atoms/switch/switch.d.ts +56 -2
  73. package/dist/components/atoms/switch/switch.js +64 -32
  74. package/dist/components/atoms/tabs/index.d.ts +16 -0
  75. package/dist/components/atoms/textarea/textarea.d.ts +32 -0
  76. package/dist/components/atoms/textarea/textarea.js +1 -1
  77. package/dist/components/atoms/time-picker/time-picker.d.ts +73 -2
  78. package/dist/components/atoms/time-picker/time-picker.js +218 -3
  79. package/dist/components/atoms/toaster/index.d.ts +15 -0
  80. package/dist/components/atoms/toggle-group/toggle-group.d.ts +26 -1
  81. package/dist/components/atoms/toggle-group/toggle-group.js +15 -14
  82. package/dist/components/atoms/tooltip/tooltip.d.ts +53 -2
  83. package/dist/components/atoms/typography/typography.d.ts +18 -0
  84. package/dist/components/molecules/breadcrumb/breadcrumb.d.ts +50 -0
  85. package/dist/components/molecules/breadcrumb/breadcrumb.js +17 -17
  86. package/dist/components/molecules/dialog-content/dialog-content.d.ts +16 -0
  87. package/dist/components/molecules/dialog-footer/dialog-footer.d.ts +20 -0
  88. package/dist/components/molecules/dialog-header/dialog-header.d.ts +31 -0
  89. package/dist/components/molecules/empty/empty-icon.js +6 -6
  90. package/dist/components/molecules/empty/empty.d.ts +16 -1
  91. package/dist/components/molecules/empty/empty.js +37 -34
  92. package/dist/components/molecules/highlight-banner/highlight-banner.d.ts +17 -0
  93. package/dist/components/molecules/pagination/pagination.d.ts +49 -0
  94. package/dist/components/organisms/data-table/components/cells/data-table-list-cell.d.ts +41 -0
  95. package/dist/components/organisms/data-table/components/column-header/data-table-column-header-content.js +1 -1
  96. package/dist/components/organisms/data-table/components/column-header/data-table-column-header-menu.js +18 -18
  97. package/dist/components/organisms/data-table/components/column-header/data-table-column-header.d.ts +18 -0
  98. package/dist/components/organisms/data-table/components/column-header/data-table-column-header.js +10 -10
  99. package/dist/components/organisms/data-table/components/data-table-body.d.ts +18 -0
  100. package/dist/components/organisms/data-table/components/data-table-header.d.ts +12 -0
  101. package/dist/components/organisms/data-table/components/data-table-header.js +7 -7
  102. package/dist/components/organisms/data-table/components/states/data-table-loading.d.ts +24 -0
  103. package/dist/components/organisms/data-table/components/states/data-table-loading.js +6 -6
  104. package/dist/components/organisms/data-table/data-table.d.ts +133 -4
  105. package/dist/components/organisms/data-table/data-table.js +132 -100
  106. package/dist/components/organisms/data-table/data-table.types.d.ts +35 -26
  107. package/dist/components/organisms/data-table/hooks/use-data-table-columns.js +57 -41
  108. package/dist/components/organisms/data-table/hooks/use-data-table-state.d.ts +8 -2
  109. package/dist/components/organisms/data-table/hooks/use-data-table-state.js +82 -47
  110. package/dist/components/organisms/data-table/utils/data-table-constants.d.ts +8 -2
  111. package/dist/components/organisms/data-table/utils/data-table-constants.js +16 -10
  112. package/dist/components/organisms/data-table/utils/data-table-styles.d.ts +1652 -0
  113. package/dist/components/organisms/data-table/utils/data-table-styles.js +29 -14
  114. package/dist/components/organisms/dialog/dialog.d.ts +67 -1
  115. package/dist/components/organisms/dialog/dialog.js +78 -61
  116. package/dist/components/organisms/index.d.ts +2 -0
  117. package/dist/components/organisms/sheet/sheet.d.ts +69 -0
  118. package/dist/components/organisms/sheet/sheet.js +34 -33
  119. package/dist/components/organisms/tutorial/index.d.ts +2 -0
  120. package/dist/components/organisms/tutorial/tutorial.d.ts +16 -0
  121. package/dist/components/organisms/tutorial/tutorial.js +114 -0
  122. package/dist/components/organisms/tutorial/tutorial.types.d.ts +15 -0
  123. package/dist/hooks/index.d.ts +3 -0
  124. package/dist/hooks/use-body-scroll-lock.d.ts +13 -0
  125. package/dist/hooks/use-escape-key.d.ts +14 -0
  126. package/dist/hooks/use-media-query.d.ts +20 -0
  127. package/dist/hooks/use-media-query.js +21 -0
  128. package/dist/index.css +1 -1
  129. package/dist/index.d.ts +2 -0
  130. package/dist/index.js +173 -162
  131. package/dist/lib/notification-alert.d.ts +42 -0
  132. package/dist/lib/notification-alert.js +75 -0
  133. package/dist/node_modules/@phosphor-icons/react/dist/csr/File.es.js +8 -0
  134. package/dist/node_modules/@phosphor-icons/react/dist/csr/Microphone.es.js +8 -0
  135. package/dist/node_modules/@phosphor-icons/react/dist/csr/Stop.es.js +8 -0
  136. package/dist/node_modules/@phosphor-icons/react/dist/csr/Table.es.js +8 -0
  137. package/dist/node_modules/@phosphor-icons/react/dist/defs/File.es.js +30 -0
  138. package/dist/node_modules/@phosphor-icons/react/dist/defs/Microphone.es.js +36 -0
  139. package/dist/node_modules/@phosphor-icons/react/dist/defs/Stop.es.js +36 -0
  140. package/dist/node_modules/@phosphor-icons/react/dist/defs/Table.es.js +30 -0
  141. package/dist/vendor/shadcn/avatar.js +19 -19
  142. package/dist/vendor/shadcn/badge.js +15 -15
  143. package/dist/vendor/shadcn/card.js +7 -7
  144. package/dist/vendor/shadcn/date-picker.d.ts +2 -2
  145. package/dist/vendor/shadcn/date-picker.js +1 -1
  146. package/dist/vendor/shadcn/date-range-picker.d.ts +2 -2
  147. package/dist/vendor/shadcn/date-range-picker.js +1 -1
  148. package/dist/vendor/shadcn/dialog.js +2 -2
  149. package/dist/vendor/shadcn/input-group.js +17 -17
  150. package/dist/vendor/shadcn/input.js +7 -7
  151. package/dist/vendor/shadcn/popover.js +1 -1
  152. package/dist/vendor/shadcn/select.js +2 -2
  153. package/dist/vendor/shadcn/sonner.d.ts +26 -1
  154. package/dist/vendor/shadcn/sonner.js +12 -8
  155. package/dist/vendor/shadcn/table.js +30 -30
  156. package/dist/vendor/shadcn/textarea.js +9 -9
  157. package/dist/vendor/shadcn/time-picker.d.ts +1 -2
  158. package/dist/vendor/shadcn/time-picker.js +17 -23
  159. package/dist/vendor/shadcn/toggle.js +13 -13
  160. package/dist/vendor/shadcn/tooltip.js +25 -15
  161. package/package.json +1 -1
@@ -1,12 +1,44 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { InputOTP } from '../../../vendor/shadcn/input-otp';
3
3
  import * as React from "react";
4
+ /**
5
+ * Props for the OTPField component
6
+ */
4
7
  export interface OTPFieldProps extends Omit<ComponentProps<typeof InputOTP>, "maxLength" | "render"> {
8
+ /**
9
+ * Number of OTP input slots
10
+ * @default 6
11
+ */
5
12
  maxLength?: number;
13
+ /**
14
+ * Label text displayed above the input
15
+ */
6
16
  label?: string;
17
+ /**
18
+ * Error message displayed below the input
19
+ */
7
20
  error?: string;
21
+ /**
22
+ * Additional CSS classes for the field wrapper
23
+ */
8
24
  className?: string;
25
+ /**
26
+ * Additional CSS classes for the OTP input container
27
+ */
9
28
  containerClassName?: string;
10
29
  }
30
+ /**
31
+ * One-Time Password input field with individual digit slots.
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * <OTPField
36
+ * label="Enter verification code"
37
+ * maxLength={6}
38
+ * value={otp}
39
+ * onChange={(value) => setOtp(value)}
40
+ * />
41
+ * ```
42
+ */
11
43
  declare const OTPField: React.ForwardRefExoticComponent<Omit<OTPFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
12
44
  export { OTPField };
@@ -1,9 +1,32 @@
1
1
  import { InputHTMLAttributes } from 'react';
2
2
  import { FieldProps } from '../field';
3
3
  import { LinkProps } from '../link';
4
+ /**
5
+ * Props for the PasswordField component
6
+ */
4
7
  export interface PasswordFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type">, Omit<FieldProps, "type" | "endIcon" | "endIconProps"> {
8
+ /**
9
+ * Whether password is visible by default
10
+ * @default false
11
+ */
5
12
  defaultVisible?: boolean;
13
+ /**
14
+ * Props for the "Forgot password?" link
15
+ */
6
16
  forgotPasswordLinkProps?: LinkProps;
7
17
  }
18
+ /**
19
+ * Password input field with toggle visibility button and optional "Forgot password?" link.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * <PasswordField
24
+ * label="Password"
25
+ * forgotPasswordLinkProps={{ href: '/forgot-password' }}
26
+ * value={password}
27
+ * onChange={(e) => setPassword(e.target.value)}
28
+ * />
29
+ * ```
30
+ */
8
31
  declare const PasswordField: import('react').ForwardRefExoticComponent<PasswordFieldProps & import('react').RefAttributes<HTMLInputElement>>;
9
32
  export { PasswordField };
@@ -1,7 +1,7 @@
1
1
  import { j as s } from "../../../_virtual/jsx-runtime.js";
2
2
  import { forwardRef as m, useState as p } from "react";
3
3
  import { cn as x } from "../../../lib/utils.js";
4
- import { Label as f } from "../../../vendor/shadcn/label.js";
4
+ import { Label as f } from "../label/label.js";
5
5
  import { Link as w } from "../link/link.js";
6
6
  import { Field as d } from "../field/field.js";
7
7
  const u = m(
@@ -1,8 +1,23 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { Progress as ShadcnProgress } from '../../../vendor/shadcn/progress';
3
+ /**
4
+ * Props for the Progress component
5
+ */
3
6
  interface ProgressProps extends ComponentProps<typeof ShadcnProgress> {
7
+ /**
8
+ * Current progress value (0-100)
9
+ */
4
10
  value?: number;
5
11
  }
12
+ /**
13
+ * Progress bar component for showing task completion or loading status.
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <Progress value={75} />
18
+ * <Progress value={progressPercent} className="w-full" />
19
+ * ```
20
+ */
6
21
  declare const Progress: {
7
22
  ({ value, ...props }: ProgressProps): import("react/jsx-runtime").JSX.Element;
8
23
  displayName: string;
@@ -1,2 +1,12 @@
1
1
  import { ProtectedFieldProps } from './protected-field.types';
2
+ /**
3
+ * Display-only field that can mask sensitive information with asterisks.
4
+ * Automatically truncates long text and provides protected view.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * <ProtectedField text="secret-api-key-12345" protect={true} />
9
+ * <ProtectedField text="user@email.com" protect={false} />
10
+ * ```
11
+ */
2
12
  export declare const ProtectedField: ({ protect, text, className, }: ProtectedFieldProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,19 @@
1
+ /**
2
+ * Props for the ProtectedField component
3
+ */
1
4
  export interface ProtectedFieldProps {
5
+ /**
6
+ * Text to display (will be masked if protected)
7
+ * @default "Default Text"
8
+ */
2
9
  text?: string;
10
+ /**
11
+ * Whether to mask the text with asterisks
12
+ * @default true
13
+ */
3
14
  protect?: boolean;
15
+ /**
16
+ * Additional CSS classes
17
+ */
4
18
  className?: string;
5
19
  }
@@ -1,8 +1,8 @@
1
1
  import { j as r } from "../../../_virtual/jsx-runtime.js";
2
2
  import { RadioGroupItem as d } from "../../../vendor/shadcn/radio-group.js";
3
- import { cn as l } from "../../../lib/utils.js";
4
- import { Label as a } from "../../../vendor/shadcn/label.js";
5
- const u = ({
3
+ import { cn as a } from "../../../lib/utils.js";
4
+ import { Label as l } from "../label/label.js";
5
+ const o = ({
6
6
  option: e,
7
7
  radioId: s,
8
8
  isInlineLayout: t = !1
@@ -17,39 +17,39 @@ const u = ({
17
17
  value: e.value,
18
18
  id: s,
19
19
  disabled: e.disabled,
20
- className: "size-3.5 data-[state=unchecked]:bg-white border-border cursor-pointer"
20
+ className: "size-3.5 data-[state=unchecked]:bg-background border-border cursor-pointer"
21
21
  }
22
22
  ),
23
23
  t ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
24
24
  /* @__PURE__ */ r.jsx(
25
- a,
25
+ l,
26
26
  {
27
27
  htmlFor: s,
28
- className: l(
28
+ className: a(
29
29
  "cursor-pointer",
30
30
  e.disabled && "text-muted-foreground"
31
31
  ),
32
32
  children: e.label
33
33
  }
34
34
  ),
35
- e.description && /* @__PURE__ */ r.jsx("p", { className: "text-sm text-neutral-500 ml-auto", children: e.description })
35
+ e.description && /* @__PURE__ */ r.jsx("p", { className: "text-sm text-muted-foreground ml-auto", children: e.description })
36
36
  ] }) : /* @__PURE__ */ r.jsxs("div", { className: "flex flex-col gap-1.5 flex-1", children: [
37
37
  /* @__PURE__ */ r.jsx(
38
- a,
38
+ l,
39
39
  {
40
40
  htmlFor: s,
41
- className: l(
41
+ className: a(
42
42
  "cursor-pointer",
43
43
  e.disabled && "text-muted-foreground"
44
44
  ),
45
45
  children: e.label
46
46
  }
47
47
  ),
48
- e.description && /* @__PURE__ */ r.jsx("p", { className: "text-sm text-neutral-500", children: e.description })
48
+ e.description && /* @__PURE__ */ r.jsx("p", { className: "text-sm text-muted-foreground", children: e.description })
49
49
  ] })
50
50
  ]
51
51
  }
52
52
  );
53
53
  export {
54
- u as RadioGroupOption
54
+ o as RadioGroupOption
55
55
  };
@@ -1,15 +1,64 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { RadioGroup as ShadcnRadioGroup } from '../../../vendor/shadcn/radio-group';
3
+ /**
4
+ * Represents a single radio option
5
+ */
3
6
  interface RadioOption {
7
+ /**
8
+ * Unique value for this option
9
+ */
4
10
  value: string;
11
+ /**
12
+ * Display label for the option
13
+ */
5
14
  label: string;
15
+ /**
16
+ * Optional description text
17
+ */
6
18
  description?: string;
19
+ /**
20
+ * Whether this option is disabled
21
+ */
7
22
  disabled?: boolean;
8
23
  }
9
- interface RadioGroupProps extends Omit<ComponentProps<typeof ShadcnRadioGroup>, "children"> {
24
+ /**
25
+ * Props for the RadioGroup component
26
+ */
27
+ interface RadioGroupProps extends Omit<ComponentProps<typeof ShadcnRadioGroup>, "children" | "onValueChange"> {
28
+ /**
29
+ * Array of radio options to display
30
+ */
10
31
  options: RadioOption[];
32
+ /**
33
+ * Layout direction of radio buttons
34
+ * @default "vertical"
35
+ */
11
36
  orientation?: "vertical" | "horizontal";
37
+ /**
38
+ * Visual layout style
39
+ * @default "stacked"
40
+ */
12
41
  layout?: "stacked" | "inline";
42
+ /**
43
+ * Callback fired when selection changes
44
+ */
45
+ onChange?: (value: string) => void;
13
46
  }
47
+ /**
48
+ * Radio button group for single-selection from multiple options.
49
+ * Supports vertical/horizontal layouts and inline/stacked styles.
50
+ *
51
+ * @example
52
+ * ```tsx
53
+ * <RadioGroup
54
+ * name="plan"
55
+ * options={[
56
+ * { value: 'free', label: 'Free Plan', description: '$0/month' },
57
+ * { value: 'pro', label: 'Pro Plan', description: '$10/month' }
58
+ * ]}
59
+ * onChange={(value) => console.log(value)}
60
+ * />
61
+ * ```
62
+ */
14
63
  declare const RadioGroup: import('react').ForwardRefExoticComponent<Omit<RadioGroupProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
15
64
  export { RadioGroup, type RadioGroupProps, type RadioOption };
@@ -1,24 +1,25 @@
1
1
  import { j as r } from "../../../_virtual/jsx-runtime.js";
2
2
  import { forwardRef as d } from "react";
3
3
  import { RadioGroup as f } from "../../../vendor/shadcn/radio-group.js";
4
- import { RadioGroupOption as u } from "./radio-group-option.js";
5
- const x = d(
6
- ({ options: a, name: i, orientation: e = "vertical", layout: t = "stacked", ...l }, s) => {
7
- const n = t === "inline", p = e === "horizontal";
4
+ import { RadioGroupOption as x } from "./radio-group-option.js";
5
+ const c = d(
6
+ ({ options: a, name: e, orientation: i = "vertical", layout: t = "stacked", onChange: l, ...n }, s) => {
7
+ const p = t === "inline", m = i === "horizontal";
8
8
  return /* @__PURE__ */ r.jsx(
9
9
  f,
10
10
  {
11
11
  ref: s,
12
- className: p ? "flex flex-row flex-wrap gap-6" : "flex flex-col gap-3",
13
- ...l,
12
+ className: m ? "flex flex-row flex-wrap gap-6" : "flex flex-col gap-3",
13
+ onValueChange: l,
14
+ ...n,
14
15
  children: a.map((o) => {
15
- const m = `${i}-${o.value}`;
16
+ const u = `${e}-${o.value}`;
16
17
  return /* @__PURE__ */ r.jsx(
17
- u,
18
+ x,
18
19
  {
19
20
  option: o,
20
- radioId: m,
21
- isInlineLayout: n
21
+ radioId: u,
22
+ isInlineLayout: p
22
23
  },
23
24
  o.value
24
25
  );
@@ -27,7 +28,7 @@ const x = d(
27
28
  );
28
29
  }
29
30
  );
30
- x.displayName = "RadioGroup";
31
+ c.displayName = "RadioGroup";
31
32
  export {
32
- x as RadioGroup
33
+ c as RadioGroup
33
34
  };
@@ -1,3 +1,17 @@
1
1
  import { SearchFieldProps } from './search-field.types';
2
+ /**
3
+ * Search input field with history dropdown and persistence support.
4
+ * Features search-on-change, history storage, and keyboard navigation.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * <SearchField
9
+ * label="Search products"
10
+ * onSearch={(query) => handleSearch(query)}
11
+ * persistKey="product-search"
12
+ * searchOnChange={false}
13
+ * />
14
+ * ```
15
+ */
2
16
  declare const SearchField: import('react').ForwardRefExoticComponent<SearchFieldProps & import('react').RefAttributes<HTMLInputElement>>;
3
17
  export { SearchField };
@@ -1,10 +1,10 @@
1
1
  import { j as t } from "../../../_virtual/jsx-runtime.js";
2
- import { forwardRef as U, useId as Y, useState as l, useRef as V, useEffect as z } from "react";
2
+ import { forwardRef as U, useId as Y, useState as n, useRef as V, useEffect as z } from "react";
3
3
  import { cn as r } from "../../../lib/utils.js";
4
4
  import { Input as Z } from "../../../vendor/shadcn/input.js";
5
- import { cva as D } from "../../../node_modules/class-variance-authority/dist/index.js";
6
- import { Label as K } from "../../../vendor/shadcn/label.js";
7
5
  import { Icon as w } from "../icon/icon.js";
6
+ import { cva as D } from "../../../node_modules/class-variance-authority/dist/index.js";
7
+ import { Label as K } from "../label/label.js";
8
8
  const P = D("flex gap-2 w-full", {
9
9
  variants: {
10
10
  layout: {
@@ -28,7 +28,7 @@ const P = D("flex gap-2 w-full", {
28
28
  }), te = U(
29
29
  ({
30
30
  placeholder: F = "Search...",
31
- onSearch: n,
31
+ onSearch: l,
32
32
  limitSearch: y = 10,
33
33
  persistKey: c = "",
34
34
  value: m = "",
@@ -43,15 +43,15 @@ const P = D("flex gap-2 w-full", {
43
43
  inputProps: h,
44
44
  ...E
45
45
  }, i) => {
46
- const M = Y(), u = O || h?.id || M, b = !!a, [o, d] = l(m), [f, R] = l(() => {
46
+ const M = Y(), u = O || h?.id || M, b = !!a, [o, d] = n(m), [f, R] = n(() => {
47
47
  if (c) {
48
48
  const e = localStorage.getItem(`${c}_searchfield`);
49
49
  return e ? JSON.parse(e) : [];
50
50
  }
51
51
  return [];
52
- }), [C, L] = l([]), [B, v] = l(!1), [J, I] = l(!1), g = V(null), _ = V(null), G = (e) => {
52
+ }), [C, L] = n([]), [B, v] = n(!1), [J, I] = n(!1), g = V(null), _ = V(null), G = (e) => {
53
53
  const s = e.target.value;
54
- d(s), (s === "" || H) && n(s);
54
+ d(s), (s === "" || H) && l(s);
55
55
  }, W = (e) => {
56
56
  e.key === "Enter" && o !== "" && S();
57
57
  }, S = () => {
@@ -65,11 +65,11 @@ const P = D("flex gap-2 w-full", {
65
65
  R(k), c && localStorage.setItem(
66
66
  `${c}_searchfield`,
67
67
  JSON.stringify(k)
68
- ), n(o);
68
+ ), l(o);
69
69
  }, X = () => {
70
- d(""), n(""), g.current?.focus();
70
+ d(""), l(""), g.current?.focus();
71
71
  }, q = (e) => {
72
- d(e), n(e), v(!1), g.current?.focus();
72
+ d(e), l(e), v(!1), g.current?.focus();
73
73
  }, A = () => {
74
74
  v(!0);
75
75
  }, Q = () => {
@@ -105,16 +105,16 @@ const P = D("flex gap-2 w-full", {
105
105
  placeholder: F,
106
106
  disabled: x,
107
107
  autoComplete: "off",
108
- className: r(
109
- b && "border-destructive focus-visible:border-destructive",
110
- "!px-9",
111
- h?.className
112
- ),
113
108
  "aria-invalid": b,
114
109
  "aria-describedby": p || a ? `${u}-description` : void 0,
115
110
  ...E,
116
111
  ...h,
117
- id: u
112
+ id: u,
113
+ className: r(
114
+ b && "border-destructive focus-visible:border-destructive",
115
+ "!px-9",
116
+ h?.className
117
+ )
118
118
  }
119
119
  ),
120
120
  /* @__PURE__ */ t.jsx(
@@ -124,7 +124,7 @@ const P = D("flex gap-2 w-full", {
124
124
  size: "sm",
125
125
  onClick: S,
126
126
  className: r(
127
- "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",
127
+ "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground dark:text-foreground",
128
128
  !x && "cursor-pointer hover:text-foreground transition-colors"
129
129
  )
130
130
  }
@@ -1,20 +1,77 @@
1
1
  import { InputHTMLAttributes } from 'react';
2
+ /**
3
+ * Represents a search history value
4
+ */
2
5
  export interface SearchValue {
6
+ /**
7
+ * Display label for the search value
8
+ */
3
9
  label: string;
10
+ /**
11
+ * Actual value of the search
12
+ */
4
13
  value: string;
14
+ /**
15
+ * Whether this value is currently selected
16
+ */
5
17
  isSelected?: boolean;
6
18
  }
19
+ /**
20
+ * Props for the SearchField component
21
+ */
7
22
  export interface SearchFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "className"> {
23
+ /**
24
+ * Placeholder text for the input
25
+ * @default "Search..."
26
+ */
8
27
  placeholder?: string;
28
+ /**
29
+ * Callback fired when search is triggered
30
+ */
9
31
  onSearch: (value: string) => void;
32
+ /**
33
+ * Maximum number of search history items to store
34
+ * @default 10
35
+ */
10
36
  limitSearch?: number;
37
+ /**
38
+ * Key for persisting search history in localStorage
39
+ * @default ""
40
+ */
11
41
  persistKey?: string;
42
+ /**
43
+ * Controlled value of the input
44
+ * @default ""
45
+ */
12
46
  value?: string;
47
+ /**
48
+ * Whether to trigger search on every change or only on Enter
49
+ * @default true
50
+ */
13
51
  searchOnChange?: boolean;
52
+ /**
53
+ * Label text displayed above the input
54
+ */
14
55
  label?: string;
56
+ /**
57
+ * Helper text displayed below the input
58
+ */
15
59
  description?: string;
60
+ /**
61
+ * Error message displayed below the input
62
+ */
16
63
  error?: string;
64
+ /**
65
+ * Layout orientation
66
+ * @default "vertical"
67
+ */
17
68
  layout?: "vertical" | "horizontal";
69
+ /**
70
+ * Additional CSS classes for the wrapper
71
+ */
18
72
  className?: string;
73
+ /**
74
+ * Additional props to pass to the input element
75
+ */
19
76
  inputProps?: InputHTMLAttributes<HTMLInputElement>;
20
77
  }
@@ -1,2 +1,4 @@
1
1
  export { Select } from './select';
2
2
  export type { SelectProps, SelectOption, SelectOptionGroup } from './select';
3
+ export { SearchSelect } from './search-select';
4
+ export type { SearchSelectProps } from './search-select';
@@ -0,0 +1,22 @@
1
+ import { SelectOption, SelectOptionGroup } from './select';
2
+ import * as React from "react";
3
+ export interface SearchSelectProps {
4
+ label?: string;
5
+ description?: string;
6
+ error?: string;
7
+ optional?: boolean;
8
+ placeholder?: string;
9
+ value?: string;
10
+ defaultValue?: string;
11
+ onChange?: (value: string) => void;
12
+ disabled?: boolean;
13
+ options?: SelectOption[];
14
+ groups?: SelectOptionGroup[];
15
+ className?: string;
16
+ id?: string;
17
+ searchPlaceholder?: string;
18
+ maxHeight?: number;
19
+ }
20
+ declare const SearchSelect: React.ForwardRefExoticComponent<SearchSelectProps & React.RefAttributes<HTMLButtonElement>>;
21
+ export { SearchSelect };
22
+ export type { SearchSelectProps };