@page-speed/forms 0.7.3 → 0.7.5

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.md CHANGED
@@ -227,7 +227,7 @@ It is **not** a BEM-only unstyled package anymore.
227
227
  ### Base conventions
228
228
 
229
229
  - Inputs/triggers are transparent shells with semantic borders/rings
230
- - Fields with values (text-like controls) use `ring-2 ring-ring`
230
+ - Fields with values (text-like controls) use `ring-2 ring-primary`
231
231
  - Error states use destructive border/ring
232
232
  - Dropdown selected rows use muted backgrounds
233
233
 
@@ -1,10 +1,11 @@
1
- import { cn, FieldLabel, FieldDescription, LabelGroup, Field, INPUT_AUTOFILL_RESET_CLASSES, Button, Input, buttonVariants } from './chunk-SUF7WJS6.js';
1
+ import { cn, FieldLabel, FieldDescription, LabelGroup, Field, INPUT_AUTOFILL_RESET_CLASSES, Button, Input, buttonVariants } from './chunk-EQKN2OPX.js';
2
2
  import * as React19 from 'react';
3
3
  import { Dialog as Dialog$1, Checkbox as Checkbox$1, RadioGroup as RadioGroup$1, Switch as Switch$1, Select as Select$1, Popover as Popover$1 } from 'radix-ui';
4
4
  import { Command as Command$1 } from 'cmdk';
5
5
  import { useDirection } from '@radix-ui/react-direction';
6
6
  import { Slot } from '@radix-ui/react-slot';
7
7
  import { getDefaultClassNames, DayPicker } from 'react-day-picker';
8
+ import { Icon, DEFAULT_ICON_API_BASE_URL } from '@page-speed/icon';
8
9
 
9
10
  function Textarea({ className, ...props }) {
10
11
  return /* @__PURE__ */ React19.createElement(
@@ -13,7 +14,7 @@ function Textarea({ className, ...props }) {
13
14
  "data-slot": "textarea",
14
15
  className: cn(
15
16
  // Core structure - uses CSS variables only
16
- "flex field-sizing-content min-h-16 w-full rounded-md border border-input",
17
+ "flex field-sizing-content min-h-32 w-full rounded-md border border-input",
17
18
  "bg-transparent px-3 py-2 text-base shadow-xs",
18
19
  "transition-[color,box-shadow] outline-none md:text-sm",
19
20
  // Focus state - uses ring-ring CSS variable
@@ -66,7 +67,7 @@ function TextArea({
66
67
  required,
67
68
  className: cn(
68
69
  // Valid value indicator - ring-2 when has value and no error
69
- !error && hasValue && "ring-2 ring-ring",
70
+ !error && hasValue && "ring-2 ring-primary",
70
71
  // Error state - handled by Textarea component via aria-invalid
71
72
  className
72
73
  ),
@@ -104,6 +105,7 @@ function Checkbox({
104
105
  "aria-invalid:border-destructive aria-invalid:ring-destructive/20",
105
106
  // Disabled state
106
107
  "disabled:cursor-not-allowed disabled:opacity-50",
108
+ " mt-1",
107
109
  className
108
110
  ),
109
111
  ...props
@@ -201,9 +203,9 @@ function Checkbox2({
201
203
  htmlFor: checkboxId,
202
204
  className: cn(
203
205
  "flex gap-3 p-3 duration-200 select-auto font-normal leading-normal",
204
- showChoiceCard && "border rounded-lg hover:ring-2 hover:ring-ring/50",
205
- showChoiceCard && value && "ring-2 ring-ring",
206
- showChoiceCard && error && "border-destructive",
206
+ showChoiceCard && "border rounded-lg hover:ring-2 hover:ring-primary",
207
+ showChoiceCard && value && "ring-2 ring-primary",
208
+ showChoiceCard && error && "ring-2 ring-destructive",
207
209
  disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
208
210
  className
209
211
  )
@@ -289,12 +291,12 @@ function CheckboxGroup({
289
291
  const containerClass = React19.useMemo(() => {
290
292
  return cn(
291
293
  "w-full grid grid-cols-1 border-0 m-0 p-0 min-w-0",
292
- (layout === "grid" || layout === "inline") && "md:grid-cols-2",
293
- layout === "grid" && "gap-3",
294
- layout === "inline" && "gap-0",
294
+ layout === "grid" && "grid grid-cols-1 md:grid-cols-2 ",
295
+ layout === "inline" && "flex flex-wrap",
296
+ useChoiceCard ? "gap-x-6 space-y-4" : "gap-0",
295
297
  className
296
298
  );
297
- }, [layout, className]);
299
+ }, [layout, className, useChoiceCard]);
298
300
  const groupDescriptionId = description ? `${name}-description` : void 0;
299
301
  const groupAriaDescribedBy = [props["aria-describedby"], groupDescriptionId].filter(Boolean).join(" ") || void 0;
300
302
  return /* @__PURE__ */ React19.createElement(
@@ -448,7 +450,17 @@ function Radio({
448
450
  return options.some((option) => option.description);
449
451
  }, [options]);
450
452
  const groupDescriptionId = description ? `${name}-description` : void 0;
451
- return /* @__PURE__ */ React19.createElement("div", { className: cn("w-full", className), "data-invalid": error || void 0 }, (label || description) && /* @__PURE__ */ React19.createElement("div", { className: "mb-3 space-y-1" }, label && /* @__PURE__ */ React19.createElement("div", { className: "text-base font-medium leading-none" }, label), description && /* @__PURE__ */ React19.createElement(FieldDescription, { id: groupDescriptionId, className: "leading-snug" }, description)), /* @__PURE__ */ React19.createElement(
453
+ return /* @__PURE__ */ React19.createElement("div", { className: cn("w-full", className), "data-invalid": error || void 0 }, /* @__PURE__ */ React19.createElement(
454
+ LabelGroup,
455
+ {
456
+ labelHtmlFor: name,
457
+ required,
458
+ variant: "legend",
459
+ secondaryId: groupDescriptionId,
460
+ secondary: description,
461
+ primary: label
462
+ }
463
+ ), /* @__PURE__ */ React19.createElement(
452
464
  RadioGroup,
453
465
  {
454
466
  name,
@@ -458,8 +470,9 @@ function Radio({
458
470
  disabled,
459
471
  required,
460
472
  className: cn(
461
- layout === "grid" && "grid grid-cols-1 md:grid-cols-2 gap-3",
462
- layout === "inline" && "flex flex-wrap gap-0"
473
+ layout === "grid" && "grid grid-cols-1 md:grid-cols-2 ",
474
+ layout === "inline" && "flex flex-wrap",
475
+ useChoiceCard ? "gap-x-6 space-y-4" : "gap-0"
463
476
  ),
464
477
  "aria-invalid": error || props["aria-invalid"],
465
478
  "aria-describedby": groupDescriptionId || props["aria-describedby"],
@@ -476,9 +489,12 @@ function Radio({
476
489
  key: option.value,
477
490
  htmlFor: radioId,
478
491
  className: cn(
479
- "flex gap-3 p-3 duration-200 select-auto font-normal leading-normal",
480
- useChoiceCard && "border rounded-lg hover:ring-2 hover:ring-ring/50",
481
- useChoiceCard && isSelected && "ring-2 ring-ring",
492
+ "flex gap-3 duration-200",
493
+ "select-auto font-normal leading-normal",
494
+ useChoiceCard && "hover:ring-2 hover:ring-primary",
495
+ useChoiceCard && "border rounded-lg p-3",
496
+ !useChoiceCard && "p-1",
497
+ useChoiceCard && isSelected && "ring-2 ring-primary",
482
498
  useChoiceCard && error && "border-destructive",
483
499
  isDisabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
484
500
  )
@@ -634,7 +650,14 @@ function SelectGroup({
634
650
  function SelectValue({
635
651
  ...props
636
652
  }) {
637
- return /* @__PURE__ */ React19.createElement(Select$1.Value, { "data-slot": "select-value", ...props });
653
+ return /* @__PURE__ */ React19.createElement(
654
+ Select$1.Value,
655
+ {
656
+ className: "font-normal",
657
+ "data-slot": "select-value",
658
+ ...props
659
+ }
660
+ );
638
661
  }
639
662
  function SelectTrigger({
640
663
  className,
@@ -915,7 +938,7 @@ function Select2({
915
938
  {
916
939
  className: cn(
917
940
  // Valid value indicator - ring-2 when has value and no error
918
- !error && hasValue && "ring-2 ring-ring",
941
+ !error && hasValue && "ring-2 ring-primary",
919
942
  // Error state - handled by SelectTrigger via aria-invalid
920
943
  className
921
944
  ),
@@ -1349,7 +1372,9 @@ function MultiSelect({
1349
1372
  (option) => option === currentOption
1350
1373
  );
1351
1374
  const nextEnabledIndex = currentEnabledIndex === -1 ? 0 : (currentEnabledIndex + 1) % enabledOptions.length;
1352
- setFocusedIndex(filteredOptions.indexOf(enabledOptions[nextEnabledIndex]));
1375
+ setFocusedIndex(
1376
+ filteredOptions.indexOf(enabledOptions[nextEnabledIndex])
1377
+ );
1353
1378
  break;
1354
1379
  }
1355
1380
  case "ArrowUp": {
@@ -1447,9 +1472,9 @@ function MultiSelect({
1447
1472
  className: cn(
1448
1473
  "flex min-h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm",
1449
1474
  "cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
1450
- !error && hasValue && "ring-2 ring-ring",
1475
+ !error && hasValue && "ring-2 ring-primary",
1451
1476
  disabled && "cursor-not-allowed opacity-50 pointer-events-none",
1452
- error && "border-destructive ring-1 ring-destructive"
1477
+ error && "ring-2 ring-destructive"
1453
1478
  ),
1454
1479
  onKeyDown: handleKeyDown,
1455
1480
  onBlur: handleTriggerBlur,
@@ -1542,7 +1567,7 @@ function MultiSelect({
1542
1567
  },
1543
1568
  "Clear All"
1544
1569
  )),
1545
- isMaxReached && /* @__PURE__ */ React19.createElement("div", { className: "border-b border-destructive bg-destructive/80 px-2 py-1 text-xs font-medium text-destructive-foreground" }, "Maximum ", maxSelections, " selection", maxSelections !== 1 ? "s" : "", " ", "reached"),
1570
+ isMaxReached && /* @__PURE__ */ React19.createElement("div", { className: "border-b border-destructive bg-destructive/80 px-2 py-1 text-xs font-medium text-destructive-foreground" }, "Maximum ", maxSelections, " selection", maxSelections !== 1 ? "s" : "", " reached"),
1546
1571
  /* @__PURE__ */ React19.createElement(CommandList, { role: "listbox", "aria-multiselectable": "true" }, /* @__PURE__ */ React19.createElement(CommandEmpty, null, "No options found"), optionGroups.length > 0 ? optionGroups.map((group, groupIndex) => {
1547
1572
  const groupOptions = group.options.filter(
1548
1573
  (option) => filteredOptions.includes(option)
@@ -2316,7 +2341,13 @@ function FileUploadDropzone(props) {
2316
2341
  tabIndex: context.disabled ? -1 : 0,
2317
2342
  ...dropzoneProps,
2318
2343
  className: cn(
2319
- "relative flex select-none flex-col items-center justify-center gap-2 rounded-lg border border-dashed p-6 outline-none transition-colors hover:bg-accent/50 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/20 data-disabled:pointer-events-none data-disabled:opacity-50 data-dragging:border-ring data-dragging:bg-accent/50 data-invalid:border-destructive data-invalid:ring-destructive/20",
2344
+ "relative flex select-none flex-col items-center",
2345
+ "justify-center gap-2 rounded-lg border border-dashed p-6",
2346
+ "outline-none transition-colors hover:ring-2 hover:ring-primary",
2347
+ "focus-visible:ring-2 focus-visible:ring-primary",
2348
+ "data-disabled:pointer-events-none data-disabled:opacity-50 ",
2349
+ "data-dragging:ring-2 data-dragging:ring-primary",
2350
+ "data-invalid:ring-2 data-invalid:ring-destructive",
2320
2351
  className
2321
2352
  ),
2322
2353
  onClick,
@@ -2551,7 +2582,7 @@ function FileInput({
2551
2582
  value = [],
2552
2583
  onChange,
2553
2584
  onBlur,
2554
- placeholder = "Choose file...",
2585
+ placeholder,
2555
2586
  disabled = false,
2556
2587
  required = false,
2557
2588
  error = false,
@@ -2829,7 +2860,26 @@ function FileInput({
2829
2860
  }
2830
2861
  };
2831
2862
  }, [imageToCrop]);
2832
- const fileCountLabel = normalizedValue.length > 0 ? `${normalizedValue.length} file(s) selected` : placeholder;
2863
+ const dynamicPlaceholder = React19.useMemo(() => {
2864
+ if (placeholder) {
2865
+ return placeholder;
2866
+ }
2867
+ return `Drag & drop file${multiple ? "s" : ""} here`;
2868
+ }, [multiple, placeholder]);
2869
+ const metadataElement = React19.useMemo(() => {
2870
+ const metaList = [];
2871
+ if (accept) {
2872
+ metaList.push(`File type: ${accept}`);
2873
+ }
2874
+ if (maxSize) {
2875
+ metaList.push(`Max file size: ${formatFileSize(maxSize)}`);
2876
+ }
2877
+ if (metaList.length > 0) {
2878
+ return /* @__PURE__ */ React19.createElement("div", { className: "flex text-center items-center justify-center gap-1 opacity-75 text-xs" }, metaList.map((str) => /* @__PURE__ */ React19.createElement("span", { key: str, className: "relative" }, str)));
2879
+ } else {
2880
+ return null;
2881
+ }
2882
+ }, [accept, maxSize]);
2833
2883
  return /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
2834
2884
  FileUpload,
2835
2885
  {
@@ -2860,33 +2910,33 @@ function FileInput({
2860
2910
  FileUploadDropzone,
2861
2911
  {
2862
2912
  role: "button",
2863
- "aria-label": placeholder,
2913
+ "aria-label": dynamicPlaceholder,
2864
2914
  className: cn(
2865
- "flex min-h-32 w-full cursor-pointer items-center justify-center border-input bg-transparent p-6 transition-colors",
2866
- "hover:bg-accent/50",
2867
- "data-[dragging]:bg-accent/50",
2915
+ "flex min-h-32 w-full cursor-pointer",
2916
+ "items-center justify-center border-input",
2917
+ "bg-transparent p-6 transition-colors",
2918
+ "data-[dragging]:ring-2 hover:ring-2",
2868
2919
  disabled && "cursor-not-allowed opacity-50",
2869
2920
  error && "border-destructive"
2870
2921
  )
2871
2922
  },
2872
- /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col items-center gap-1 text-center" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-center rounded-full border p-2.5" }, /* @__PURE__ */ React19.createElement(
2923
+ /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col items-center gap-3 text-center" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-center rounded-full border p-2.5" }, /* @__PURE__ */ React19.createElement(
2873
2924
  "svg",
2874
2925
  {
2875
- width: "24",
2876
- height: "24",
2926
+ width: "18",
2927
+ height: "18",
2877
2928
  viewBox: "0 0 24 24",
2878
2929
  fill: "none",
2879
2930
  stroke: "currentColor",
2880
2931
  strokeWidth: "2",
2881
2932
  strokeLinecap: "round",
2882
2933
  strokeLinejoin: "round",
2883
- className: "text-muted-foreground",
2884
2934
  "aria-hidden": "true"
2885
2935
  },
2886
2936
  /* @__PURE__ */ React19.createElement("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
2887
2937
  /* @__PURE__ */ React19.createElement("polyline", { points: "17 8 12 3 7 8" }),
2888
2938
  /* @__PURE__ */ React19.createElement("line", { x1: "12", y1: "3", x2: "12", y2: "15" })
2889
- )), /* @__PURE__ */ React19.createElement("p", { className: "text-sm font-medium" }, fileCountLabel), accept && /* @__PURE__ */ React19.createElement("p", { className: "text-muted-foreground text-xs" }, "Accepted: ", accept), /* @__PURE__ */ React19.createElement("p", { className: "text-muted-foreground text-xs" }, "Max size: ", formatFileSize(maxSize)))
2939
+ )), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col items-center justify-center gap-1 text-center" }, /* @__PURE__ */ React19.createElement("p", { className: "text-sm font-medium" }, dynamicPlaceholder), metadataElement))
2890
2940
  ),
2891
2941
  /* @__PURE__ */ React19.createElement(FileUploadList, { className: "mt-4" }, normalizedValue.map((file, index) => {
2892
2942
  const progressValue = uploadProgress[file.name];
@@ -2896,9 +2946,12 @@ function FileInput({
2896
2946
  {
2897
2947
  key: `${file.name}-${index}`,
2898
2948
  value: file,
2899
- className: "flex items-center gap-3 border-border bg-card text-card-foreground hover:bg-accent/50 transition-colors"
2949
+ className: cn(
2950
+ "flex items-center gap-3",
2951
+ "border-border bg-card text-card-foreground"
2952
+ )
2900
2953
  },
2901
- showPreview ? /* @__PURE__ */ React19.createElement(FileUploadItemPreview, { className: "h-12 w-12 rounded [&>img]:h-full [&>img]:w-full [&>img]:object-cover [&>svg]:size-6" }) : null,
2954
+ showPreview ? /* @__PURE__ */ React19.createElement(FileUploadItemPreview, { className: "size-12 rounded [&>img]:h-full [&>img]:w-full [&>img]:object-cover [&>svg]:size-6" }) : null,
2902
2955
  /* @__PURE__ */ React19.createElement("div", { className: "flex min-w-0 flex-1 flex-col" }, /* @__PURE__ */ React19.createElement(FileUploadItemMetadata, { className: "min-w-0" }), hasProgress && progressValue < 100 ? /* @__PURE__ */ React19.createElement("div", { className: "mt-1 flex items-center gap-2" }, /* @__PURE__ */ React19.createElement(
2903
2956
  "div",
2904
2957
  {
@@ -2916,7 +2969,7 @@ function FileInput({
2916
2969
  style: { width: `${progressValue}%` }
2917
2970
  }
2918
2971
  )
2919
- ), /* @__PURE__ */ React19.createElement("span", { className: "text-xs" }, progressValue, "%")) : null),
2972
+ ), /* @__PURE__ */ React19.createElement("span", { className: "text-xs" }, progressValue, "%")) : /* @__PURE__ */ React19.createElement("span", { className: "text-xs" }, formatFileSize(file.size))),
2920
2973
  enableCropping && file.type.startsWith("image/") ? /* @__PURE__ */ React19.createElement(
2921
2974
  Button,
2922
2975
  {
@@ -2928,7 +2981,7 @@ function FileInput({
2928
2981
  handleCrop(file);
2929
2982
  },
2930
2983
  disabled,
2931
- className: "h-8 w-8 p-0",
2984
+ className: "size-8 p-0",
2932
2985
  "aria-label": `Crop ${file.name}`
2933
2986
  },
2934
2987
  /* @__PURE__ */ React19.createElement(
@@ -2952,10 +3005,10 @@ function FileInput({
2952
3005
  Button,
2953
3006
  {
2954
3007
  type: "button",
2955
- variant: "ghost",
2956
- size: "icon",
3008
+ variant: "outline",
3009
+ size: "icon-sm",
2957
3010
  disabled,
2958
- className: "h-8 w-8 p-0",
3011
+ className: "size-8 p-0",
2959
3012
  "aria-label": `Remove ${file.name}`
2960
3013
  },
2961
3014
  /* @__PURE__ */ React19.createElement(
@@ -3023,7 +3076,7 @@ function FileInput({
3023
3076
  /* @__PURE__ */ React19.createElement("div", { className: "p-4" }, /* @__PURE__ */ React19.createElement(
3024
3077
  "div",
3025
3078
  {
3026
- className: "relative h-96 w-full overflow-hidden rounded-md bg-accent/40",
3079
+ className: "relative h-96 w-full overflow-hidden rounded-md",
3027
3080
  onMouseDown: (event) => {
3028
3081
  event.preventDefault();
3029
3082
  const startX = event.clientX - crop.x;
@@ -3107,7 +3160,7 @@ function FileInput({
3107
3160
  step: "0.1",
3108
3161
  value: zoom,
3109
3162
  onChange: (event) => onZoomChange(parseFloat(event.target.value)),
3110
- className: "h-2 flex-1 cursor-pointer appearance-none rounded-lg bg-accent/60",
3163
+ className: "h-2 flex-1 cursor-pointer appearance-none rounded-lg bg-primary",
3111
3164
  "aria-label": "Zoom level"
3112
3165
  }
3113
3166
  ))),
@@ -3349,8 +3402,6 @@ function CalendarDayButton({
3349
3402
  }
3350
3403
  );
3351
3404
  }
3352
-
3353
- // src/inputs/DatePicker.tsx
3354
3405
  function formatDate(date, format) {
3355
3406
  if (!date) return "";
3356
3407
  const d = new Date(date);
@@ -3392,7 +3443,7 @@ function DatePicker({
3392
3443
  required = false,
3393
3444
  error = false,
3394
3445
  className = "",
3395
- placeholder = "Select date...",
3446
+ placeholder = "Select date",
3396
3447
  format = "MM/dd/yyyy",
3397
3448
  minDate,
3398
3449
  maxDate,
@@ -3491,23 +3542,20 @@ function DatePicker({
3491
3542
  ), /* @__PURE__ */ React19.createElement(Popover, { open: isOpen, onOpenChange: handleOpenChange }, /* @__PURE__ */ React19.createElement("div", { className: "relative" }, showIcon && /* @__PURE__ */ React19.createElement(
3492
3543
  "span",
3493
3544
  {
3494
- className: "absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none",
3545
+ className: cn(
3546
+ "absolute left-3 top-1/2 -translate-y-1/2",
3547
+ "pointer-events-none flex items-center justify-center",
3548
+ "pointer-events-none"
3549
+ ),
3495
3550
  "aria-hidden": "true"
3496
3551
  },
3497
3552
  /* @__PURE__ */ React19.createElement(
3498
- "svg",
3553
+ Icon,
3499
3554
  {
3500
- xmlns: "http://www.w3.org/2000/svg",
3501
- width: "18",
3502
- height: "18",
3503
- viewBox: "0 0 24 24",
3504
- fill: "none",
3505
- stroke: "currentColor",
3506
- strokeLinecap: "round",
3507
- strokeLinejoin: "round",
3508
- strokeWidth: "2"
3509
- },
3510
- /* @__PURE__ */ React19.createElement("path", { d: "M8 2v4m8-4v4m5 8V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8M3 10h18m-5 10l2 2l4-4" })
3555
+ name: "material-symbols/edit-calendar-outline",
3556
+ apiKey: DEFAULT_ICON_API_BASE_URL,
3557
+ size: 18
3558
+ }
3511
3559
  )
3512
3560
  ), /* @__PURE__ */ React19.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React19.createElement(
3513
3561
  "input",
@@ -3516,14 +3564,18 @@ function DatePicker({
3516
3564
  id: props.id,
3517
3565
  type: "text",
3518
3566
  className: cn(
3519
- "flex h-9 w-full rounded-md border border-input bg-transparent py-1 text-base shadow-sm transition-colors",
3520
- "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
3521
- "disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
3567
+ "flex h-9 w-full rounded-md border",
3568
+ "border-input bg-transparent py-1 text-base",
3569
+ "shadow-sm transition-colors",
3570
+ "focus-visible:outline-none focus-visible:ring-1",
3571
+ "focus-visible:ring-ring",
3572
+ "disabled:cursor-not-allowed",
3573
+ "disabled:opacity-50 md:text-sm",
3522
3574
  INPUT_AUTOFILL_RESET_CLASSES,
3523
3575
  showIcon ? "pl-10" : "pl-3",
3524
3576
  clearable && value ? "pr-10" : "pr-3",
3525
- !error && hasValue && "ring-2 ring-ring",
3526
- error && "border-destructive ring-1 ring-destructive"
3577
+ !error && hasValue && "ring-2 ring-primary",
3578
+ error && "ring-2 ring-destructive"
3527
3579
  ),
3528
3580
  value: displayValue,
3529
3581
  onClick: handleInputClick,
@@ -3692,8 +3744,8 @@ function TimePicker({
3692
3744
  INPUT_AUTOFILL_RESET_CLASSES,
3693
3745
  showIcon ? "pl-10" : "pl-3",
3694
3746
  clearable && value ? "pr-10" : "pr-3",
3695
- !error && hasValue && "ring-2 ring-ring",
3696
- error && "border-destructive ring-1 ring-destructive"
3747
+ !error && hasValue && "ring-2 ring-primary",
3748
+ error && "ring-2 ring-destructive"
3697
3749
  ),
3698
3750
  value: nativeValue,
3699
3751
  onChange: handleChange,
@@ -3746,7 +3798,11 @@ function formatDate2(date, format) {
3746
3798
  return format.replace("MM", month).replace("dd", day).replace("yyyy", String(year)).replace("yy", String(year).slice(2));
3747
3799
  }
3748
3800
  function toDayTimestamp(date) {
3749
- return new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime();
3801
+ return new Date(
3802
+ date.getFullYear(),
3803
+ date.getMonth(),
3804
+ date.getDate()
3805
+ ).getTime();
3750
3806
  }
3751
3807
  function isSameDay(date, target) {
3752
3808
  if (!target) return false;
@@ -3995,8 +4051,8 @@ function DateRangePicker({
3995
4051
  INPUT_AUTOFILL_RESET_CLASSES,
3996
4052
  showIcon ? "pl-10" : "pl-3",
3997
4053
  clearable && (rangeStart || rangeEnd) ? "pr-10" : "pr-3",
3998
- !error && hasValue && "ring-2 ring-ring",
3999
- error && "border-destructive ring-1 ring-destructive"
4054
+ !error && hasValue && "ring-2 ring-primary",
4055
+ error && "ring-2 ring-destructive"
4000
4056
  ),
4001
4057
  value: displayValue,
4002
4058
  onClick: handleInputClick,
@@ -4058,5 +4114,5 @@ function DateRangePicker({
4058
4114
  DateRangePicker.displayName = "DateRangePicker";
4059
4115
 
4060
4116
  export { Checkbox2 as Checkbox, CheckboxGroup, DatePicker, DateRangePicker, FileInput, MultiSelect, Radio, Select2 as Select, Switch2 as Switch, TextArea, TimePicker };
4061
- //# sourceMappingURL=chunk-ZH6XDBWH.js.map
4062
- //# sourceMappingURL=chunk-ZH6XDBWH.js.map
4117
+ //# sourceMappingURL=chunk-DSK3VLIV.js.map
4118
+ //# sourceMappingURL=chunk-DSK3VLIV.js.map