torch-glare 2.5.2 → 2.5.4

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 (51) hide show
  1. package/apps/lib/components/ActionButton.tsx +39 -6
  2. package/apps/lib/components/Badge.tsx +5 -2
  3. package/apps/lib/components/BadgeField.tsx +1 -1
  4. package/apps/lib/components/Button.tsx +4 -4
  5. package/apps/lib/components/Calendar.tsx +7 -17
  6. package/apps/lib/components/ColorPicker.tsx +1 -1
  7. package/apps/lib/components/DataViews/data-views.tsx +1 -1
  8. package/apps/lib/components/DataViews/filters/filters.tsx +1 -1
  9. package/apps/lib/components/DataViews/header.tsx +5 -2
  10. package/apps/lib/components/DataViews/panel/section.tsx +3 -1
  11. package/apps/lib/components/DataViews/views/board-view.tsx +3 -1
  12. package/apps/lib/components/DataViews/views/inbox-view.tsx +4 -1
  13. package/apps/lib/components/DataViews/views/pane-views.tsx +5 -1
  14. package/apps/lib/components/DataViews/views/table-view.tsx +67 -8
  15. package/apps/lib/components/DataViews/views/tree-view.tsx +5 -3
  16. package/apps/lib/components/Drawer.tsx +18 -1
  17. package/apps/lib/components/FormBuilder/context.ts +9 -1
  18. package/apps/lib/components/FormBuilder/submit.tsx +11 -2
  19. package/apps/lib/components/FormBuilder/types.ts +5 -1
  20. package/apps/lib/components/FormRenderer/form-renderer.tsx +15 -3
  21. package/apps/lib/components/FormRenderer/stepper.tsx +35 -14
  22. package/apps/lib/components/FormRenderer/types.ts +1 -1
  23. package/apps/lib/components/Input.tsx +19 -4
  24. package/apps/lib/components/Popover.tsx +93 -55
  25. package/apps/lib/components/SearchableSelect.tsx +12 -11
  26. package/apps/lib/components/SearchableTree.tsx +10 -11
  27. package/apps/lib/components/SearchableTreeDialog.tsx +10 -11
  28. package/apps/lib/components/SectionBlock.tsx +14 -2
  29. package/apps/lib/components/Select.tsx +35 -11
  30. package/apps/lib/components/SimpleSelect.tsx +2 -2
  31. package/apps/lib/components/SlideDatePicker.tsx +17 -4
  32. package/apps/lib/components/Stepper.tsx +329 -180
  33. package/apps/lib/components/Switch.tsx +2 -2
  34. package/apps/lib/components/Table.tsx +55 -30
  35. package/apps/lib/components/Textarea.tsx +29 -4
  36. package/apps/lib/components/TreeDropDown.tsx +18 -6
  37. package/apps/lib/components/TreeFolder/TreeFolder.tsx +61 -61
  38. package/apps/lib/registry.json +7 -16
  39. package/apps/lib/tsconfig.tsbuildinfo +1 -1
  40. package/docs/components/action-button.md +3 -1
  41. package/docs/components/data-views/index.md +7 -0
  42. package/docs/components/form-builder.md +4 -2
  43. package/docs/components/form-renderer.md +1 -1
  44. package/docs/components/stepper.md +119 -24
  45. package/docs/components/table.md +33 -0
  46. package/docs/how-to/forms-with-form-builder.md +3 -1
  47. package/docs/reference/tailwind-plugins.md +42 -0
  48. package/docs/tutorials/getting-started.md +32 -11
  49. package/package.json +1 -1
  50. package/apps/lib/components/FormStepper.tsx +0 -272
  51. package/docs/components/form-stepper.md +0 -250
@@ -47,7 +47,11 @@ export const SlideDatePicker = forwardRef<HTMLInputElement, SlideDatePickerProps
47
47
  const defaultPickerValue = {
48
48
  year: String(today.getFullYear()),
49
49
  month: String(today.getMonth() + 1),
50
- day: String(today.getDate()),
50
+ // Zero-padded to match `getDayArray`, which emits "01".."31". Unpadded, a single-digit day
51
+ // ("5") matches no item in the wheel, so the picker cannot select the current date and falls
52
+ // back to the first day of the month — the field then shows the wrong date. Only reproducible
53
+ // on the 1st–9th, which is why it survived this long.
54
+ day: String(today.getDate()).padStart(2, "0"),
51
55
  hour: String(today.getHours()),
52
56
  minute: String(today.getMinutes()),
53
57
  time: today.getHours() < 12 ? "AM" : "PM",
@@ -60,7 +64,9 @@ export const SlideDatePicker = forwardRef<HTMLInputElement, SlideDatePickerProps
60
64
 
61
65
  const currentYear = new Date().getFullYear();
62
66
  const years = Array.from({ length: 200 }, (_, i) => `${currentYear - 100 + i}`);
63
- const months = Array.from({ length: 12 }, (_, i) => String(i + 1).padStart(2, ""));
67
+ // No padding: these must match `defaultPickerValue.month`, which is unpadded. (This previously
68
+ // read `padStart(2, "")` — an empty pad string, so it never padded anything.)
69
+ const months = Array.from({ length: 12 }, (_, i) => String(i + 1));
64
70
  const days = getDayArray(Number(pickerValue.year), Number(pickerValue.month));
65
71
  const monthsNames = [
66
72
  "January",
@@ -143,18 +149,25 @@ export const SlideDatePicker = forwardRef<HTMLInputElement, SlideDatePickerProps
143
149
 
144
150
  return (
145
151
  <Popover onOpenChange={setIsOpen}>
146
- <PopoverTrigger ref={triggerRef} asChild data-theme={theme} className="w-full flex-1">
152
+ {/* The theme goes to the field as a prop, not as `data-theme` on the trigger. `asChild`
153
+ merges trigger props onto the child, which lands the attribute on the bare <input> — the
154
+ text then resolves dark tokens while the field around it follows the page, and on a light
155
+ page the value is white on white. Passing `theme` through means the whole field is dark
156
+ together, so it stays dark *and* readable. */}
157
+ <PopoverTrigger ref={triggerRef} asChild className="w-full flex-1">
147
158
  {isValidElement(children) ? (
148
- cloneElement(children as React.ReactElement<HTMLInputElement>, {
159
+ cloneElement(children as React.ReactElement<HTMLInputElement & { theme?: string }>, {
149
160
  value:
150
161
  (children as React.ReactElement<HTMLInputElement>).props.value ?? formattedValue,
151
162
  type: "input",
152
163
  readOnly: true,
164
+ theme,
153
165
  })
154
166
  ) : (
155
167
  /* If the children is not a valid element, Show the default input */
156
168
  <InputField
157
169
  readOnly
170
+ theme={theme}
158
171
  type="input"
159
172
  {...props}
160
173
  childrenSide={