@sjsf/flowbite-theme
Advanced tools
@@ -16,9 +16,4 @@ import type { HTMLButtonAttributes } from 'svelte/elements'; | ||
| import Button from 'flowbite-svelte/Button.svelte'; | ||
| declare const Button: import("svelte").Component<import("@sjsf/form/fields/components").ComponentCommonProps & { | ||
| type: ButtonType; | ||
| disabled: boolean; | ||
| children: import("svelte").Snippet; | ||
| onclick: () => void; | ||
| }, {}, "">; | ||
| declare const Button: import("svelte").Component<import("@sjsf/form/fields/components").ButtonComponentProps, {}, "">; | ||
| type Button = ReturnType<typeof Button>; | ||
| export default Button; |
@@ -8,3 +8,3 @@ import type { HTMLAttributes } from 'svelte/elements'; | ||
| declare const Description: import("svelte").Component<import("@sjsf/form/fields/components").ComponentCommonProps & { | ||
| type: import("@sjsf/form/templates/components").ParentTemplateType; | ||
| templateType: import("@sjsf/form/fields/templates").TemplateType; | ||
| description: string; | ||
@@ -11,0 +11,0 @@ }, {}, "">; |
@@ -23,4 +23,4 @@ <script lang="ts" module> | ||
| {#each errors as err} | ||
| <li>{err.message}</li> | ||
| <li>{err}</li> | ||
| {/each} | ||
| </ul> |
@@ -12,3 +12,3 @@ <script lang="ts" module> | ||
| <script lang="ts"> | ||
| import { formHandlers, formAttributes, getFormContext, type ComponentProps } from '@sjsf/form'; | ||
| import { formAttributes, getFormContext, type ComponentProps } from '@sjsf/form'; | ||
@@ -22,3 +22,4 @@ let { config, children, ref = $bindable(), attributes }: ComponentProps['form'] = $props(); | ||
| bind:this={ref} | ||
| {@attach formHandlers(ctx)} | ||
| onsubmit={ctx.submit} | ||
| onreset={ctx.reset} | ||
| class="flex flex-col gap-4" | ||
@@ -25,0 +26,0 @@ {...formAttributes(ctx, config, 'flowbiteForm', attributes, {})} |
@@ -13,7 +13,4 @@ import type { HTMLAttributes } from 'svelte/elements'; | ||
| } | ||
| declare const Layout: import("svelte").Component<import("@sjsf/form/fields/components").ComponentCommonProps & { | ||
| type: LayoutType; | ||
| children: import("svelte").Snippet; | ||
| }, {}, "">; | ||
| declare const Layout: import("svelte").Component<import("@sjsf/form/fields/components").LayoutComponentProps, {}, "">; | ||
| type Layout = ReturnType<typeof Layout>; | ||
| export default Layout; |
@@ -14,3 +14,3 @@ <script lang="ts" module> | ||
| const { title, type, config }: ComponentProps['title'] = $props(); | ||
| const { title, templateType, config }: ComponentProps['title'] = $props(); | ||
@@ -21,3 +21,3 @@ const ctx = getFormContext(); | ||
| <p | ||
| class={['text-gray-900 dark:text-white', { 'font-semibold': type !== 'field' }]} | ||
| class={['text-gray-900 dark:text-white', { 'font-semibold': templateType !== 'fieldTemplate' }]} | ||
| {...titleAttributes(ctx, config, 'flowbiteTitle', {})} | ||
@@ -24,0 +24,0 @@ > |
@@ -8,6 +8,6 @@ import type { HTMLAttributes } from 'svelte/elements'; | ||
| declare const Title: import("svelte").Component<import("@sjsf/form/fields/components").ComponentCommonProps & { | ||
| type: import("@sjsf/form/templates/components").ParentTemplateType; | ||
| title: string; | ||
| templateType: import("@sjsf/form/fields/templates").TemplateType; | ||
| }, {}, "">; | ||
| type Title = ReturnType<typeof Title>; | ||
| export default Title; |
| import type { ComponentDefinitions } from '@sjsf/form'; | ||
| import * as templates from '@sjsf/form/templates/exports'; | ||
| import * as components from './components/exports.js'; | ||
@@ -7,2 +6,2 @@ import * as widgets from './widgets/exports.js'; | ||
| } | ||
| export declare const definitions: typeof templates & typeof components & typeof widgets & Pick<ComponentDefinitions, keyof ExtraWidgets>; | ||
| export declare const definitions: typeof components & typeof widgets & Pick<ComponentDefinitions, keyof ExtraWidgets>; |
@@ -1,8 +0,6 @@ | ||
| import * as templates from '@sjsf/form/templates/exports'; | ||
| import * as components from './components/exports.js'; | ||
| import * as widgets from './widgets/exports.js'; | ||
| export const definitions = { | ||
| ...templates, | ||
| ...components, | ||
| ...widgets | ||
| }; |
+1
-1
@@ -1,1 +0,1 @@ | ||
| export declare const theme: import("@sjsf/form/lib/resolver").Resolver<import("@sjsf/form/lib/resolver").Chain<Record<"stringField" | "numberField" | "integerField" | "booleanField" | "objectField" | "arrayField" | "tupleField" | "nullField" | "oneOfField" | "anyOfField" | "arrayItemField" | "objectPropertyField" | keyof import("@sjsf/form/fields/resolver/definitions").ExtraFields | "titleWithIndex" | "generateNewKey" | "createAdditionalPropertyKey" | "createOriginalKeysOrder", any>, Record<"form" | "title" | "description" | "help" | "submitButton" | "fieldTemplate" | "objectTemplate" | "objectPropertyTemplate" | "arrayTemplate" | "arrayItemTemplate" | "multiFieldTemplate" | "button" | "layout" | "textWidget" | "numberWidget" | "selectWidget" | "checkboxWidget" | "label" | "errorsList" | keyof import("./definitions").ExtraWidgets, any>>, import("@sjsf/form/lib/resolver").Chain<typeof import("@sjsf/form/fields/exports") & Pick<import("@sjsf/form").ComponentDefinitions, keyof import("@sjsf/form/fields/resolver/definitions").ExtraFields>, typeof import("@sjsf/form/templates/exports") & typeof import("./components/exports.js") & typeof import("./widgets/exports.js") & Pick<import("@sjsf/form").ComponentDefinitions, keyof import("./definitions").ExtraWidgets>>>; | ||
| export declare const theme: import("@sjsf/form/lib/resolver").Resolver<import("@sjsf/form/lib/resolver").Chain<Record<"objectField" | "booleanField" | "integerField" | "numberField" | "stringField" | "anyOfField" | "oneOfField" | "arrayField" | "tupleField" | "nullField" | "unknownField" | "fieldTemplate" | "multiFieldTemplate" | "arrayItemField" | "arrayTemplate" | "arrayItemTemplate" | "objectPropertyField" | "objectTemplate" | "objectPropertyTemplate" | keyof import("@sjsf/form/theme").ExtraComponents | "titleWithIndex" | "generateNewKey" | "createAdditionalPropertyKey" | "createOriginalKeysOrder", any>, Record<"form" | "title" | "description" | "help" | "button" | "submitButton" | "layout" | "textWidget" | "numberWidget" | "selectWidget" | "checkboxWidget" | "label" | "errorsList" | keyof import("./definitions").ExtraWidgets, any>>, import("@sjsf/form/lib/resolver").Chain<typeof import("@sjsf/form/fields/exports") & typeof import("@sjsf/form/templates/exports") & Pick<import("@sjsf/form").ComponentDefinitions, keyof import("@sjsf/form/theme").ExtraComponents>, typeof import("./components/exports") & typeof import("./widgets/exports") & Pick<import("@sjsf/form").ComponentDefinitions, keyof import("./definitions").ExtraWidgets>>>; |
+2
-2
| import { extendByRecord } from '@sjsf/form/lib/resolver'; | ||
| import { fields } from '@sjsf/form/fields/resolver'; | ||
| import { base } from '@sjsf/form/theme'; | ||
| import { definitions } from './definitions'; | ||
| export const theme = extendByRecord(fields, definitions); | ||
| export const theme = extendByRecord(base, definitions); |
+1
-1
@@ -1,2 +0,2 @@ | ||
| import { s } from 'testing/demo'; | ||
| import { s } from 'theme-testing/specs'; | ||
| import './extra-widgets/checkboxes-include'; | ||
@@ -3,0 +3,0 @@ import './extra-widgets/date-picker-include'; |
+10
-7
@@ -1,2 +0,2 @@ | ||
| import { s } from 'testing/demo'; | ||
| import { s, DEFAULT_SPECS } from 'theme-testing/specs'; | ||
| import './extra-widgets/checkboxes-include'; | ||
@@ -11,3 +11,4 @@ import './extra-widgets/date-picker-include'; | ||
| export const specs = { | ||
| datePicker: [s.text, { 'ui:components': { textWidget: 'datePickerWidget' } }], | ||
| ...DEFAULT_SPECS, | ||
| datePicker: [s.text, { 'ui:components': { textWidget: 'datePickerWidget' } }, {}], | ||
| multiSelect: [ | ||
@@ -20,3 +21,4 @@ s.uniqueArray, | ||
| } | ||
| } | ||
| }, | ||
| {} | ||
| ], | ||
@@ -30,8 +32,9 @@ radio: [ | ||
| } | ||
| } | ||
| }, | ||
| {} | ||
| ], | ||
| range: [s.number, { 'ui:components': { numberWidget: 'rangeWidget' } }], | ||
| switch: [s.boolean, { 'ui:components': { checkboxWidget: 'switchWidget' } }], | ||
| textarea: [s.text, { 'ui:components': { textWidget: 'textareaWidget' } }] | ||
| range: [s.number, { 'ui:components': { numberWidget: 'rangeWidget' } }, {}], | ||
| switch: [s.boolean, { 'ui:components': { checkboxWidget: 'switchWidget' } }, {}], | ||
| textarea: [s.text, { 'ui:components': { textWidget: 'textareaWidget' } }, {}] | ||
| }; | ||
| export const extraWidgets = Object.keys(import.meta.glob('./extra-widgets/*.svelte')).map((widget) => widget.substring(16, widget.length - 7)); |
+7
-7
| { | ||
| "name": "@sjsf/flowbite-theme", | ||
| "version": "2.4.0", | ||
| "version": "3.0.0-next.12", | ||
| "description": "The flowbite based theme for svelte-jsonschema-form", | ||
@@ -55,3 +55,3 @@ "license": "MIT", | ||
| "peerDependencies": { | ||
| "@sjsf/form": "^2.4.0", | ||
| "@sjsf/form": "^3.0.0-next.12", | ||
| "flowbite": "^2.5.0", | ||
@@ -65,8 +65,8 @@ "flowbite-svelte": "~0.47.0", | ||
| "flowbite-svelte": "~0.47.4", | ||
| "globals": "^16.3.0", | ||
| "globals": "16.4.0", | ||
| "postcss": "^8.5.6", | ||
| "svelte": "~5.38.6", | ||
| "tailwindcss": "^3.4.17", | ||
| "@sjsf/form": "2.4.0", | ||
| "testing": "1.0.12" | ||
| "svelte": "^5.42.3", | ||
| "tailwindcss": "^3.4.18", | ||
| "@sjsf/form": "3.0.0-next.12", | ||
| "theme-testing": "1.0.13-next.12" | ||
| }, | ||
@@ -73,0 +73,0 @@ "svelte": "./dist/index.js", |
+1
-1
@@ -5,3 +5,3 @@ # @sjsf/flowbite-theme | ||
| - [Documentation](https://x0k.github.io/svelte-jsonschema-form/themes/flowbite/) | ||
| - [Documentation](https://x0k.github.io/svelte-jsonschema-form/themes/legacy/flowbite/) | ||
| - [Playground](https://x0k.github.io/svelte-jsonschema-form/playground2/) | ||
@@ -8,0 +8,0 @@ |
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
175253
-0.32%942
-1.05%1
Infinity%