@rjsf/shadcn 6.5.2 → 6.6.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.
Files changed (84) hide show
  1. package/dist/amethyst-haze.css +2 -2
  2. package/dist/caffeine.css +2 -2
  3. package/dist/claude.css +2 -2
  4. package/dist/clean-slate.css +2 -2
  5. package/dist/default.css +2 -2
  6. package/dist/index.cjs +72 -72
  7. package/dist/index.cjs.map +4 -4
  8. package/dist/neo-brutalism.css +2 -2
  9. package/dist/pastel-dreams.css +2 -2
  10. package/dist/rjsf-shadcn.esm.js +84 -84
  11. package/dist/rjsf-shadcn.esm.js.map +4 -4
  12. package/dist/rjsf-shadcn.umd.js +50 -50
  13. package/dist/soft-pop.css +2 -2
  14. package/dist/twitter.css +2 -2
  15. package/dist/vercel.css +2 -2
  16. package/lib/BaseInputTemplate/BaseInputTemplate.js +1 -1
  17. package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
  18. package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -1
  19. package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -1
  20. package/lib/DescriptionField/DescriptionField.js.map +1 -1
  21. package/lib/FieldHelpTemplate/FieldHelpTemplate.js +1 -1
  22. package/lib/FieldHelpTemplate/FieldHelpTemplate.js.map +1 -1
  23. package/lib/Form/Form.js.map +1 -1
  24. package/lib/GridTemplate/GridTemplate.js.map +1 -1
  25. package/lib/IconButton/IconButton.js.map +1 -1
  26. package/lib/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.js.map +1 -1
  27. package/lib/RadioWidget/RadioWidget.js.map +1 -1
  28. package/lib/Templates/Templates.js.map +1 -1
  29. package/lib/Widgets/Widgets.js +1 -1
  30. package/lib/Widgets/Widgets.js.map +1 -1
  31. package/lib/components/ui/alert.d.ts +1 -1
  32. package/lib/components/ui/alert.js.map +1 -1
  33. package/lib/components/ui/badge.d.ts +1 -1
  34. package/lib/components/ui/badge.js +1 -1
  35. package/lib/components/ui/badge.js.map +1 -1
  36. package/lib/components/ui/button.d.ts +1 -1
  37. package/lib/components/ui/button.js.map +1 -1
  38. package/lib/components/ui/checkbox.d.ts +1 -1
  39. package/lib/components/ui/checkbox.js.map +1 -1
  40. package/lib/components/ui/command.d.ts +1 -1
  41. package/lib/components/ui/command.js +2 -2
  42. package/lib/components/ui/command.js.map +1 -1
  43. package/lib/components/ui/dialog.d.ts +1 -1
  44. package/lib/components/ui/dialog.js.map +1 -1
  45. package/lib/components/ui/fancy-multi-select.js +1 -1
  46. package/lib/components/ui/fancy-multi-select.js.map +1 -1
  47. package/lib/components/ui/fancy-select.js +1 -1
  48. package/lib/components/ui/fancy-select.js.map +1 -1
  49. package/lib/components/ui/label.d.ts +1 -1
  50. package/lib/components/ui/label.js.map +1 -1
  51. package/lib/components/ui/radio-group.d.ts +1 -1
  52. package/lib/components/ui/radio-group.js.map +1 -1
  53. package/lib/components/ui/separator.d.ts +1 -1
  54. package/lib/components/ui/separator.js.map +1 -1
  55. package/lib/components/ui/slider.d.ts +1 -1
  56. package/lib/components/ui/slider.js +1 -1
  57. package/lib/components/ui/slider.js.map +1 -1
  58. package/lib/tsconfig.tsbuildinfo +1 -1
  59. package/package.json +18 -18
  60. package/src/BaseInputTemplate/BaseInputTemplate.tsx +2 -2
  61. package/src/CheckboxWidget/CheckboxWidget.tsx +1 -0
  62. package/src/CheckboxesWidget/CheckboxesWidget.tsx +1 -1
  63. package/src/DescriptionField/DescriptionField.tsx +1 -1
  64. package/src/FieldHelpTemplate/FieldHelpTemplate.tsx +2 -1
  65. package/src/Form/Form.tsx +0 -1
  66. package/src/GridTemplate/GridTemplate.tsx +1 -0
  67. package/src/IconButton/IconButton.tsx +1 -1
  68. package/src/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.tsx +1 -0
  69. package/src/RadioWidget/RadioWidget.tsx +1 -1
  70. package/src/Templates/Templates.ts +1 -0
  71. package/src/Widgets/Widgets.ts +2 -1
  72. package/src/components/ui/alert.tsx +1 -1
  73. package/src/components/ui/badge.tsx +1 -1
  74. package/src/components/ui/button.tsx +1 -1
  75. package/src/components/ui/checkbox.tsx +1 -1
  76. package/src/components/ui/command.tsx +3 -2
  77. package/src/components/ui/dialog.tsx +2 -1
  78. package/src/components/ui/fancy-multi-select.tsx +3 -3
  79. package/src/components/ui/fancy-select.tsx +2 -1
  80. package/src/components/ui/label.tsx +1 -1
  81. package/src/components/ui/radio-group.tsx +1 -1
  82. package/src/components/ui/separator.tsx +1 -1
  83. package/src/components/ui/slider.tsx +1 -1
  84. package/src/tsconfig.json +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rjsf/shadcn",
3
- "version": "6.5.2",
3
+ "version": "6.6.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -51,16 +51,17 @@
51
51
  "build:esm": "esbuild ./src/index.ts --bundle --outfile=dist/rjsf-shadcn.esm.js --sourcemap --packages=external --format=esm",
52
52
  "build:umd": "rollup dist/rjsf-shadcn.esm.js --format=umd --file=dist/rjsf-shadcn.umd.js --name=@rjsf/rjsf-shadcn",
53
53
  "build": "npm run build:ts && npm run build:cjs && npm run build:esm && npm run build:umd && npm run build:css && npm run copy-resources",
54
- "cs-check": "prettier -l \"{src,test}/**/*.ts?(x)\"",
55
- "cs-format": "prettier \"{src,test}/**/*.ts?(x)\" --write",
56
- "lint": "eslint src test",
54
+ "cs-check": "oxfmt --check \"{src,test}/**/*.{ts,tsx}\"",
55
+ "cs-format": "oxfmt \"{src,test}/**/*.{ts,tsx}\"",
56
+ "lint": "oxlint src test",
57
57
  "precommit": "lint-staged",
58
- "test": "jest",
59
- "test:update": "jest --u"
58
+ "test": "vitest run",
59
+ "test:update": "vitest run --update-snapshots"
60
60
  },
61
61
  "lint-staged": {
62
- "{src,test}/**/*.ts?(x)": [
63
- "eslint --fix"
62
+ "{src,test}/**/*.{ts,tsx}": [
63
+ "oxlint --fix",
64
+ "oxfmt"
64
65
  ]
65
66
  },
66
67
  "peerDependencies": {
@@ -73,14 +74,13 @@
73
74
  "node": ">=20"
74
75
  },
75
76
  "devDependencies": {
76
- "@rjsf/core": "6.5.2",
77
- "@rjsf/snapshot-tests": "6.5.2",
78
- "@rjsf/utils": "6.5.2",
79
- "@rjsf/validator-ajv8": "6.5.2",
80
- "@tailwindcss/cli": "^4.2.2",
81
- "eslint": "^8.57.1",
82
- "jsdom": "^27.0.1",
83
- "tailwindcss": "^4.1.18"
77
+ "@rjsf/core": "6.6.0",
78
+ "@rjsf/snapshot-tests": "6.6.0",
79
+ "@rjsf/utils": "6.6.0",
80
+ "@rjsf/validator-ajv8": "6.6.0",
81
+ "@tailwindcss/cli": "^4.3.0",
82
+ "jsdom": "^29.1.1",
83
+ "tailwindcss": "^4.3.0"
84
84
  },
85
85
  "dependencies": {
86
86
  "@radix-ui/react-checkbox": "^1.3.3",
@@ -99,8 +99,8 @@
99
99
  "cmdk": "^1.1.1",
100
100
  "lodash": "^4.18.1",
101
101
  "lodash-es": "^4.18.1",
102
- "lucide-react": "^0.548.0",
103
- "tailwind-merge": "^3.5.0",
102
+ "lucide-react": "^1.16.0",
103
+ "tailwind-merge": "^3.6.0",
104
104
  "tailwindcss-animate": "^1.0.7",
105
105
  "uuid": "^14.0.0"
106
106
  },
@@ -1,3 +1,5 @@
1
+ import { ChangeEvent, FocusEvent, MouseEvent, useCallback } from 'react';
2
+ import { SchemaExamples } from '@rjsf/core';
1
3
  import {
2
4
  ariaDescribedByIds,
3
5
  BaseInputTemplateProps,
@@ -7,8 +9,6 @@ import {
7
9
  RJSFSchema,
8
10
  StrictRJSFSchema,
9
11
  } from '@rjsf/utils';
10
- import { ChangeEvent, FocusEvent, MouseEvent, useCallback } from 'react';
11
- import { SchemaExamples } from '@rjsf/core';
12
12
 
13
13
  import { Input } from '../components/ui/input';
14
14
  import { cn } from '../lib/utils';
@@ -9,6 +9,7 @@ import {
9
9
  StrictRJSFSchema,
10
10
  WidgetProps,
11
11
  } from '@rjsf/utils';
12
+
12
13
  import { Checkbox } from '../components/ui/checkbox';
13
14
  import { Label } from '../components/ui/label';
14
15
 
@@ -1,3 +1,4 @@
1
+ import { FocusEvent } from 'react';
1
2
  import {
2
3
  ariaDescribedByIds,
3
4
  enumOptionValueDecoder,
@@ -11,7 +12,6 @@ import {
11
12
  StrictRJSFSchema,
12
13
  WidgetProps,
13
14
  } from '@rjsf/utils';
14
- import { FocusEvent } from 'react';
15
15
 
16
16
  import { Checkbox } from '../components/ui/checkbox';
17
17
  import { Label } from '../components/ui/label';
@@ -1,5 +1,5 @@
1
- import { DescriptionFieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
1
  import { RichDescription } from '@rjsf/core';
2
+ import { DescriptionFieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
3
3
 
4
4
  /** The `DescriptionField` is the template to use to render the description of a field
5
5
  *
@@ -1,5 +1,6 @@
1
- import { FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema, helpId } from '@rjsf/utils';
2
1
  import { RichHelp } from '@rjsf/core';
2
+ import { FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema, helpId } from '@rjsf/utils';
3
+
3
4
  import { cn } from '../lib/utils';
4
5
 
5
6
  /** The `FieldHelpTemplate` component renders any help desired for a field
package/src/Form/Form.tsx CHANGED
@@ -1,5 +1,4 @@
1
1
  import { ComponentType } from 'react';
2
-
3
2
  import { FormProps, withTheme } from '@rjsf/core';
4
3
  import { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
5
4
 
@@ -1,4 +1,5 @@
1
1
  import { GridTemplateProps } from '@rjsf/utils';
2
+
2
3
  import { cn } from '../lib/utils';
3
4
 
4
5
  /** Renders a `GridTemplate` for mui, which is expecting the column sizing information coming in via the
@@ -1,6 +1,6 @@
1
1
  import { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';
2
- import { ChevronDown, ChevronUp, Copy, Trash2, X } from 'lucide-react';
3
2
  import type { VariantProps } from 'class-variance-authority';
3
+ import { ChevronDown, ChevronUp, Copy, Trash2, X } from 'lucide-react';
4
4
 
5
5
  import { Button, buttonVariants } from '../components/ui/button';
6
6
 
@@ -1,4 +1,5 @@
1
1
  import { FormContextType, MultiSchemaFieldTemplateProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+
2
3
  import { cn } from '../lib/utils';
3
4
 
4
5
  export default function MultiSchemaFieldTemplate<
@@ -1,3 +1,4 @@
1
+ import { FocusEvent } from 'react';
1
2
  import {
2
3
  ariaDescribedByIds,
3
4
  enumOptionValueDecoder,
@@ -10,7 +11,6 @@ import {
10
11
  StrictRJSFSchema,
11
12
  WidgetProps,
12
13
  } from '@rjsf/utils';
13
- import { FocusEvent } from 'react';
14
14
 
15
15
  import { Label } from '../components/ui/label';
16
16
  import { RadioGroup, RadioGroupItem } from '../components/ui/radio-group';
@@ -1,4 +1,5 @@
1
1
  import { FormContextType, RJSFSchema, StrictRJSFSchema, TemplatesType } from '@rjsf/utils';
2
+
2
3
  import AddButton from '../AddButton';
3
4
  import ArrayFieldItemTemplate from '../ArrayFieldItemTemplate';
4
5
  import ArrayFieldTemplate from '../ArrayFieldTemplate';
@@ -1,6 +1,7 @@
1
1
  import { FormContextType, RegistryWidgetsType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
- import CheckboxWidget from '../CheckboxWidget/CheckboxWidget';
2
+
3
3
  import CheckboxesWidget from '../CheckboxesWidget/CheckboxesWidget';
4
+ import CheckboxWidget from '../CheckboxWidget/CheckboxWidget';
4
5
  import RadioWidget from '../RadioWidget/RadioWidget';
5
6
  import RangeWidget from '../RangeWidget/RangeWidget';
6
7
  import SelectWidget from '../SelectWidget/SelectWidget';
@@ -1,5 +1,5 @@
1
- import { cva, type VariantProps } from 'class-variance-authority';
2
1
  import { ComponentProps } from 'react';
2
+ import { cva, type VariantProps } from 'class-variance-authority';
3
3
 
4
4
  import { cn } from '../../lib/utils';
5
5
 
@@ -1,6 +1,6 @@
1
- import { cva, type VariantProps } from 'class-variance-authority';
2
1
  import { ComponentProps } from 'react';
3
2
  import { Slot } from '@radix-ui/react-slot';
3
+ import { cva, type VariantProps } from 'class-variance-authority';
4
4
 
5
5
  import { cn } from '../../lib/utils';
6
6
 
@@ -1,6 +1,6 @@
1
+ import { ComponentProps } from 'react';
1
2
  import { Slot } from '@radix-ui/react-slot';
2
3
  import { cva, type VariantProps } from 'class-variance-authority';
3
- import { ComponentProps } from 'react';
4
4
 
5
5
  import { cn } from '../../lib/utils';
6
6
 
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
+ import { ComponentProps } from 'react';
3
4
  import { Indicator, Root } from '@radix-ui/react-checkbox';
4
5
  import { CheckIcon } from '@radix-ui/react-icons';
5
- import { ComponentProps } from 'react';
6
6
 
7
7
  import { cn } from '../../lib/utils';
8
8
 
@@ -1,10 +1,11 @@
1
1
  'use client';
2
2
 
3
+ import { ComponentProps, ComponentPropsWithoutRef, ElementRef, forwardRef } from 'react';
3
4
  import { Command as CommandPrimitive } from 'cmdk';
4
5
  import { Search } from 'lucide-react';
5
- import { ComponentProps, ComponentPropsWithoutRef, ElementRef, forwardRef } from 'react';
6
- import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog';
6
+
7
7
  import { cn } from '../../lib/utils';
8
+ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog';
8
9
 
9
10
  /**
10
11
  * The root Command component that provides command menu functionality
@@ -1,8 +1,9 @@
1
1
  'use client';
2
2
 
3
+ import { ComponentProps } from 'react';
3
4
  import { Close, Content, Description, Overlay, Portal, Root, Title, Trigger } from '@radix-ui/react-dialog';
4
5
  import { XIcon } from 'lucide-react';
5
- import { ComponentProps } from 'react';
6
+
6
7
  import { cn } from '../../lib/utils';
7
8
 
8
9
  /**
@@ -1,8 +1,5 @@
1
1
  'use client';
2
2
 
3
- import { Command as CommandPrimitive } from 'cmdk';
4
- import isEqual from 'lodash/isEqual';
5
- import { X } from 'lucide-react';
6
3
  import {
7
4
  FocusEvent,
8
5
  FocusEventHandler,
@@ -13,6 +10,9 @@ import {
13
10
  useRef,
14
11
  useState,
15
12
  } from 'react';
13
+ import { Command as CommandPrimitive } from 'cmdk';
14
+ import isEqual from 'lodash/isEqual';
15
+ import { X } from 'lucide-react';
16
16
 
17
17
  import { cn } from '../../lib/utils';
18
18
  import { Badge } from './badge';
@@ -1,7 +1,8 @@
1
1
  'use client';
2
2
 
3
- import { Check, ChevronDown } from 'lucide-react';
4
3
  import { FocusEvent, FocusEventHandler, ReactElement, useEffect, useRef, useState } from 'react';
4
+ import { Check, ChevronDown } from 'lucide-react';
5
+
5
6
  import { cn } from '../../lib/utils';
6
7
  import { Command, CommandGroup, CommandItem, CommandList } from './command';
7
8
 
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { Root } from '@radix-ui/react-label';
4
3
  import { ComponentProps } from 'react';
4
+ import { Root } from '@radix-ui/react-label';
5
5
 
6
6
  import { cn } from '../../lib/utils';
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { Root, Indicator, Item } from '@radix-ui/react-radio-group';
4
3
  import { ComponentProps } from 'react';
4
+ import { Root, Indicator, Item } from '@radix-ui/react-radio-group';
5
5
  import { CircleIcon } from 'lucide-react';
6
6
 
7
7
  import { cn } from '../../lib/utils';
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { Root } from '@radix-ui/react-separator';
4
3
  import { ComponentProps } from 'react';
4
+ import { Root } from '@radix-ui/react-separator';
5
5
 
6
6
  import { cn } from '../../lib/utils';
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { Range, Root, Thumb, Track } from '@radix-ui/react-slider';
4
3
  import { ComponentProps, useMemo } from 'react';
4
+ import { Range, Root, Thumb, Track } from '@radix-ui/react-slider';
5
5
 
6
6
  import { cn } from '../../lib/utils';
7
7
 
package/src/tsconfig.json CHANGED
@@ -6,7 +6,6 @@
6
6
  "compilerOptions": {
7
7
  "rootDir": "./",
8
8
  "outDir": "../lib",
9
- "baseUrl": "../",
10
9
  "jsx": "react-jsx"
11
10
  },
12
11
  "references": [