@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.
- package/dist/amethyst-haze.css +2 -2
- package/dist/caffeine.css +2 -2
- package/dist/claude.css +2 -2
- package/dist/clean-slate.css +2 -2
- package/dist/default.css +2 -2
- package/dist/index.cjs +72 -72
- package/dist/index.cjs.map +4 -4
- package/dist/neo-brutalism.css +2 -2
- package/dist/pastel-dreams.css +2 -2
- package/dist/rjsf-shadcn.esm.js +84 -84
- package/dist/rjsf-shadcn.esm.js.map +4 -4
- package/dist/rjsf-shadcn.umd.js +50 -50
- package/dist/soft-pop.css +2 -2
- package/dist/twitter.css +2 -2
- package/dist/vercel.css +2 -2
- package/lib/BaseInputTemplate/BaseInputTemplate.js +1 -1
- package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
- package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -1
- package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -1
- package/lib/DescriptionField/DescriptionField.js.map +1 -1
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js +1 -1
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js.map +1 -1
- package/lib/Form/Form.js.map +1 -1
- package/lib/GridTemplate/GridTemplate.js.map +1 -1
- package/lib/IconButton/IconButton.js.map +1 -1
- package/lib/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.js.map +1 -1
- package/lib/RadioWidget/RadioWidget.js.map +1 -1
- package/lib/Templates/Templates.js.map +1 -1
- package/lib/Widgets/Widgets.js +1 -1
- package/lib/Widgets/Widgets.js.map +1 -1
- package/lib/components/ui/alert.d.ts +1 -1
- package/lib/components/ui/alert.js.map +1 -1
- package/lib/components/ui/badge.d.ts +1 -1
- package/lib/components/ui/badge.js +1 -1
- package/lib/components/ui/badge.js.map +1 -1
- package/lib/components/ui/button.d.ts +1 -1
- package/lib/components/ui/button.js.map +1 -1
- package/lib/components/ui/checkbox.d.ts +1 -1
- package/lib/components/ui/checkbox.js.map +1 -1
- package/lib/components/ui/command.d.ts +1 -1
- package/lib/components/ui/command.js +2 -2
- package/lib/components/ui/command.js.map +1 -1
- package/lib/components/ui/dialog.d.ts +1 -1
- package/lib/components/ui/dialog.js.map +1 -1
- package/lib/components/ui/fancy-multi-select.js +1 -1
- package/lib/components/ui/fancy-multi-select.js.map +1 -1
- package/lib/components/ui/fancy-select.js +1 -1
- package/lib/components/ui/fancy-select.js.map +1 -1
- package/lib/components/ui/label.d.ts +1 -1
- package/lib/components/ui/label.js.map +1 -1
- package/lib/components/ui/radio-group.d.ts +1 -1
- package/lib/components/ui/radio-group.js.map +1 -1
- package/lib/components/ui/separator.d.ts +1 -1
- package/lib/components/ui/separator.js.map +1 -1
- package/lib/components/ui/slider.d.ts +1 -1
- package/lib/components/ui/slider.js +1 -1
- package/lib/components/ui/slider.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +18 -18
- package/src/BaseInputTemplate/BaseInputTemplate.tsx +2 -2
- package/src/CheckboxWidget/CheckboxWidget.tsx +1 -0
- package/src/CheckboxesWidget/CheckboxesWidget.tsx +1 -1
- package/src/DescriptionField/DescriptionField.tsx +1 -1
- package/src/FieldHelpTemplate/FieldHelpTemplate.tsx +2 -1
- package/src/Form/Form.tsx +0 -1
- package/src/GridTemplate/GridTemplate.tsx +1 -0
- package/src/IconButton/IconButton.tsx +1 -1
- package/src/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.tsx +1 -0
- package/src/RadioWidget/RadioWidget.tsx +1 -1
- package/src/Templates/Templates.ts +1 -0
- package/src/Widgets/Widgets.ts +2 -1
- package/src/components/ui/alert.tsx +1 -1
- package/src/components/ui/badge.tsx +1 -1
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/command.tsx +3 -2
- package/src/components/ui/dialog.tsx +2 -1
- package/src/components/ui/fancy-multi-select.tsx +3 -3
- package/src/components/ui/fancy-select.tsx +2 -1
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/radio-group.tsx +1 -1
- package/src/components/ui/separator.tsx +1 -1
- package/src/components/ui/slider.tsx +1 -1
- package/src/tsconfig.json +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rjsf/shadcn",
|
|
3
|
-
"version": "6.
|
|
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": "
|
|
55
|
-
"cs-format": "
|
|
56
|
-
"lint": "
|
|
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": "
|
|
59
|
-
"test:update": "
|
|
58
|
+
"test": "vitest run",
|
|
59
|
+
"test:update": "vitest run --update-snapshots"
|
|
60
60
|
},
|
|
61
61
|
"lint-staged": {
|
|
62
|
-
"{src,test}/**/*.ts
|
|
63
|
-
"
|
|
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.
|
|
77
|
-
"@rjsf/snapshot-tests": "6.
|
|
78
|
-
"@rjsf/utils": "6.
|
|
79
|
-
"@rjsf/validator-ajv8": "6.
|
|
80
|
-
"@tailwindcss/cli": "^4.
|
|
81
|
-
"
|
|
82
|
-
"
|
|
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": "^
|
|
103
|
-
"tailwind-merge": "^3.
|
|
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';
|
|
@@ -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,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,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';
|
package/src/Widgets/Widgets.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FormContextType, RegistryWidgetsType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
-
|
|
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,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,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
|
-
|
|
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
|
-
|
|
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, 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';
|