@manafishrov/ui 1.0.2 → 1.0.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.
- package/dist/components/form/CheckboxField.js.map +1 -1
- package/dist/components/form/DatePickerField.js.map +1 -1
- package/dist/components/form/Form.js.map +1 -1
- package/dist/components/form/NumberInputField.js.map +1 -1
- package/dist/components/form/PasswordInputField.js.map +1 -1
- package/dist/components/form/RadioGroupField.js.map +1 -1
- package/dist/components/form/SelectField.js.map +1 -1
- package/dist/components/form/SubmitButton.js.map +1 -1
- package/dist/components/form/SwitchField.js.map +1 -1
- package/dist/components/form/TextInputField.js.map +1 -1
- package/dist/components/form/TextareaField.js.map +1 -1
- package/dist/components/sidebar/SidebarDesktop.js +17 -17
- package/dist/components/sidebar/SidebarDesktop.js.map +1 -1
- package/package.json +2 -6
- package/src/components/form/CheckboxField.tsx +9 -19
- package/src/components/form/DatePickerField.tsx +11 -21
- package/src/components/form/Form.tsx +16 -16
- package/src/components/form/NumberInputField.tsx +10 -16
- package/src/components/form/PasswordInputField.tsx +11 -21
- package/src/components/form/RadioGroupField.tsx +6 -16
- package/src/components/form/SelectField.tsx +13 -23
- package/src/components/form/SubmitButton.tsx +6 -12
- package/src/components/form/SwitchField.tsx +9 -19
- package/src/components/form/TextInputField.tsx +9 -15
- package/src/components/form/TextareaField.tsx +9 -15
- package/src/components/sidebar/SidebarDesktop.tsx +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxField.js","sources":["../../../src/components/form/CheckboxField.tsx"],"sourcesContent":["import type { Component, ComponentProps, JSX } from
|
|
1
|
+
{"version":3,"file":"CheckboxField.js","sources":["../../../src/components/form/CheckboxField.tsx"],"sourcesContent":["import type { Component, ComponentProps, JSX } from 'solid-js';\n\nimport { Checkbox, CheckboxControl, CheckboxIndicator, CheckboxLabel } from '@/components/Checkbox';\nimport { Field, FieldContent, FieldDescription, FieldError } from '@/components/Field';\n\nimport { useFieldContext } from './context';\n\nexport type CheckboxFieldProps = ComponentProps<typeof Checkbox> & {\n description?: string;\n label?: JSX.Element;\n};\n\nexport const CheckboxField: Component<CheckboxFieldProps> = (props) => {\n const field = useFieldContext<boolean>();\n const [local, others] = splitProps(props, [\n 'description',\n 'label',\n 'required',\n 'disabled',\n 'readOnly',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldContent>\n <Checkbox\n checked={field().state.value}\n onCheckedChange={(details) => {\n field().handleChange(Boolean(details.checked));\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n {...others}\n >\n <CheckboxControl>\n <CheckboxIndicator />\n </CheckboxControl>\n <CheckboxLabel>{local.label}</CheckboxLabel>\n </Checkbox>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["CheckboxField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldContent","Checkbox","_$mergeProps","checked","value","onCheckedChange","details","handleChange","Boolean","onBlur","handleBlur","CheckboxControl","CheckboxIndicator","CheckboxLabel","label","FieldError","FieldDescription","description"],"mappings":";;;;;AAYO,MAAMA,IAAgDC,CAAAA,MAAU;AACrE,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,eACA,SACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACj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,UAAA,CAAA,GAAAL,EAC5C2B,GAAgB;AAAA,YAAA,IAAAjB,WAAA;AAAA,qBAAEb,EAAM+B;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePickerField.js","sources":["../../../src/components/form/DatePickerField.tsx"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"DatePickerField.js","sources":["../../../src/components/form/DatePickerField.tsx"],"sourcesContent":["import type { DatePickerInputProps, DatePickerRootProps, DateValue } from '@ark-ui/solid';\nimport type { Component } from 'solid-js';\n\nimport {\n DatePicker,\n DatePickerContent,\n DatePickerControl,\n DatePickerInput,\n DatePickerPositioner,\n DatePickerTrigger,\n DatePickerViews,\n} from '@/components/DatePicker';\nimport { Field, FieldContent, FieldDescription, FieldError, FieldLabel } from '@/components/Field';\n\nimport { useFieldContext } from './context';\n\nexport type DatePickerFieldProps = DatePickerRootProps & {\n label?: string;\n description?: string;\n};\n\nconst DatePickerInputGroup: Component<DatePickerInputProps> = (props) => (\n <>\n <DatePickerControl>\n <DatePickerInput {...props} />\n <DatePickerTrigger />\n </DatePickerControl>\n <DatePickerPositioner>\n <DatePickerContent>\n <DatePickerViews />\n </DatePickerContent>\n </DatePickerPositioner>\n </>\n);\n\nconst DATE_PICKER_FIELD_PROPS = [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n 'placeholder',\n] as const;\n\nexport const DatePickerField: Component<DatePickerFieldProps> = (props) => {\n const field = useFieldContext<DateValue[]>();\n const [local, others] = splitProps(props, DATE_PICKER_FIELD_PROPS);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <DatePicker\n value={field().state.value}\n onValueChange={(details) => {\n field().handleChange(details.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n {...others}\n >\n <DatePickerInputGroup placeholder={local.placeholder} />\n </DatePicker>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["DatePickerInputGroup","props","_$createComponent","DatePickerControl","children","DatePickerInput","DatePickerTrigger","DatePickerPositioner","DatePickerContent","DatePickerViews","DATE_PICKER_FIELD_PROPS","DatePickerField","field","useFieldContext","local","others","splitProps","Field","invalid","state","meta","errors","length","disabled","readOnly","required","FieldLabel","label","FieldContent","DatePicker","_$mergeProps","value","onValueChange","details","handleChange","onBlur","handleBlur","placeholder","FieldError","FieldDescription","description"],"mappings":";;;;;AAqBA,MAAMA,IAAyDC,CAAAA,MAAK,CAAAC,EAE/DC,GAAiB;AAAA,EAAA,IAAAC,WAAA;AAAA,WAAA,CAAAF,EACfG,GAAoBJ,CAAK,GAAAC,EACzBI,GAAiB,CAAA,CAAA,CAAA;AAAA,EAAA;AAAA,CAAA,GAAAJ,EAEnBK,GAAoB;AAAA,EAAA,IAAAH,WAAA;AAAA,WAAAF,EAClBM,GAAiB;AAAA,MAAA,IAAAJ,WAAA;AAAA,eAAAF,EACfO,GAAe,EAAA;AAAA,MAAA;AAAA,IAAA,CAAA;AAAA,EAAA;AAAA,CAAA,CAAA,GAMlBC,IAA0B,CAC9B,SACA,eACA,YACA,YACA,YACA,aAAa,GAGFC,IAAoDV,CAAAA,MAAU;AACzE,QAAMW,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWf,GAAOS,CAAuB;AAEjE,SAAAR,EACGe,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEN,EAAAA,EAAQO,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAA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nC,WAAA;AAAA,qBAAEU,EAAM0B;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../../src/components/form/Form.tsx"],"sourcesContent":["import { createFormHook } from
|
|
1
|
+
{"version":3,"file":"Form.js","sources":["../../../src/components/form/Form.tsx"],"sourcesContent":["import { createFormHook } from '@tanstack/solid-form';\n\nimport { CheckboxField } from './CheckboxField';\nimport { ComboboxField } from './ComboboxField';\nimport { formContext, fieldContext } from './context';\nimport { DatePickerField } from './DatePickerField';\nimport { NumberInputField } from './NumberInputField';\nimport { PasswordInputField } from './PasswordInputField';\nimport { PinInputField } from './PinInputField';\nimport { RadioGroupField } from './RadioGroupField';\nimport { SelectField } from './SelectField';\nimport { SliderField } from './SliderField';\nimport { SubmitButton } from './SubmitButton';\nimport { SwitchField } from './SwitchField';\nimport { TagsInputField } from './TagsInputField';\nimport { TextareaField } from './TextareaField';\nimport { TextInputField } from './TextInputField';\n\nexport const { useAppForm, withForm, withFieldGroup } = createFormHook({\n formContext,\n fieldContext,\n fieldComponents: {\n CheckboxField,\n ComboboxField,\n DatePickerField,\n NumberInputField,\n PasswordInputField,\n PinInputField,\n RadioGroupField,\n SelectField,\n SliderField,\n SwitchField,\n TagsInputField,\n TextInputField,\n TextareaField,\n },\n formComponents: {\n SubmitButton,\n },\n});\n"],"names":["useAppForm","withForm","withFieldGroup","createFormHook","formContext","fieldContext","fieldComponents","CheckboxField","ComboboxField","DatePickerField","NumberInputField","PasswordInputField","PinInputField","RadioGroupField","SelectField","SliderField","SwitchField","TagsInputField","TextInputField","TextareaField","formComponents","SubmitButton"],"mappings":";;;;;;;;;;;;;;;;AAkBO,MAAM;AAAA,EAAEA,YAAAA;AAAAA,EAAYC,UAAAA;AAAAA,EAAUC,gBAAAA;AAAe,IAAIC,EAAe;AAAA,EACrEC,aAAAA;AAAAA,EACAC,cAAAA;AAAAA,EACAC,iBAAiB;AAAA,IACfC,eAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,kBAAAA;AAAAA,IACAC,oBAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,eAAAA;AAAAA,EAAAA;AAAAA,EAEFC,gBAAgB;AAAA,IACdC,cAAAA;AAAAA,EAAAA;AAEJ,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInputField.js","sources":["../../../src/components/form/NumberInputField.tsx"],"sourcesContent":["import type { Component, ComponentProps } from
|
|
1
|
+
{"version":3,"file":"NumberInputField.js","sources":["../../../src/components/form/NumberInputField.tsx"],"sourcesContent":["import type { Component, ComponentProps } from 'solid-js';\n\nimport { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';\nimport {\n NumberInput,\n NumberInputControl,\n NumberInputInput,\n NumberInputTriggers,\n} from '@/components/NumberInput';\n\nimport { useFieldContext } from './context';\n\nexport type NumberInputFieldProps = ComponentProps<typeof NumberInput> & {\n label?: string;\n description?: string;\n triggers?: boolean;\n};\n\nexport const NumberInputField: Component<NumberInputFieldProps> = (props) => {\n const field = useFieldContext<number>();\n const [local, others] = splitProps(props, [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n 'triggers',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <NumberInput\n value={String(field().state.value)}\n onValueChange={(details) => {\n field().handleChange(details.valueAsNumber);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n {...others}\n >\n <NumberInputControl>\n <NumberInputInput />\n <Show when={local.triggers !== false}>\n <NumberInputTriggers />\n </Show>\n </NumberInputControl>\n </NumberInput>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["NumberInputField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldLabel","label","FieldContent","NumberInput","_$mergeProps","value","String","onValueChange","details","handleChange","valueAsNumber","onBlur","handleBlur","NumberInputControl","NumberInputInput","_$Show","when","triggers","NumberInputTriggers","FieldError","FieldDescription","description"],"mappings":";;;;;AAkBO,MAAMA,IAAsDC,CAAAA,MAAU;AAC3E,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,SACA,eACA,YACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAA,CAAAV,EAEhCW,GAAU;AAAA,QAAA,IAAAD,WAAA;AAAA,iBAAEb,EAAMe;AAAAA,QAAK;AAAA,MAAA,CAAA,GAAAZ,EACvBa,GAAY;AAAA,QAAA,IAAAH,WAAA;AAAA,iBAAA,CAAAV,EACVc,GAAWC,EAAA;AAAA,YAAA,IACVC,QAAK;AAAA,qBAAE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C;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordInputField.js","sources":["../../../src/components/form/PasswordInputField.tsx"],"sourcesContent":["import { splitProps, type Component, type ComponentProps } from
|
|
1
|
+
{"version":3,"file":"PasswordInputField.js","sources":["../../../src/components/form/PasswordInputField.tsx"],"sourcesContent":["import { splitProps, type Component, type ComponentProps } from 'solid-js';\n\nimport { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';\nimport {\n PasswordInput,\n PasswordInputControl,\n PasswordInputInput,\n PasswordInputVisibilityTrigger,\n PasswordInputIndicator,\n} from '@/components/PasswordInput';\n\nimport { useFieldContext } from './context';\n\nexport type PasswordInputFieldProps = ComponentProps<typeof PasswordInputInput> & {\n label?: string;\n description?: string;\n};\n\nexport const PasswordInputField: Component<PasswordInputFieldProps> = (props) => {\n const field = useFieldContext<string>();\n const [local, others] = splitProps(props, [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <PasswordInput\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <PasswordInputControl>\n <PasswordInputInput\n value={field().state.value}\n onInput={(event) => {\n field().handleChange(event.target.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n {...others}\n />\n <PasswordInputVisibilityTrigger>\n <PasswordInputIndicator />\n </PasswordInputVisibilityTrigger>\n </PasswordInputControl>\n </PasswordInput>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["PasswordInputField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldLabel","label","FieldContent","PasswordInput","PasswordInputControl","PasswordInputInput","_$mergeProps","value","onInput","event","handleChange","target","onBlur","handleBlur","PasswordInputVisibilityTrigger","PasswordInputIndicator","FieldError","FieldDescription","description"],"mappings":";;;;;AAkBO,MAAMA,IAA0DC,CAAAA,MAAU;AAC/E,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,SACA,eACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAA,CAAAV,EAEhCW,GAAU;AAAA,QAAA,IAAAD,WAAA;AAAA,iBAAEb,EAAMe;AAAAA,QAAK;AAAA,MAAA,CAAA,GAAAZ,EACvBa,GAAY;AAAA,QAAA,IAAAH,WAAA;AAAA,iBAAA,CAAAV,EACVc,GAAa;AAAA,YAAA,IACZZ,UAAO;AAAA,qBAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,YAAC;AAAA,YAAA,IAC7CE,WAAQ;AAAA,qBAAEX,EAAMW,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCC,WAAQ;AAAA,qBAAEZ,EAAMY,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCF,WAAQ;AAAA,qBAAEV,EAAMU,YAAY;AAAA,YAAK;AAAA,YAAA,IAAAG,WAAA;AAAA,qBAAAV,EAEhCe,GAAoB;AAAA,gBAAA,IAAAL,WAAA;AAAA,yBAAA,CAAAV,EAClBgB,GAAkBC,EAAA;AAAA,oBAAA,IACjBC,QAAK;AAAA,6BAAEvB,EAAAA,EAAQQ,MAAMe;AAAAA,oBAAK;AAAA,oBAC1BC,SAAUC,CAAAA,MAAU;AAClBzB,sBAAAA,EAAAA,EAAQ0B,aAAaD,EAAME,OAAOJ,KAAK;AAAA,oBACzC;AAAA,oBACAK,QAAQA,MAAM;AACZ5B,sBAAAA,EAAAA,EAAQ6B,WAAAA;AAAAA,oBACV;AAAA,kBAAA,GACI1B,CAAM,CAAA,GAAAE,EAEXyB,GAA8B;AAAA,oBAAA,IAAAf,WAAA;AAAA,6BAAAV,EAC5B0B,GAAsB,EAAA;AAAA,oBAAA;AAAA,kBAAA,CAAA,CAAA;AAAA,gBAAA;AAAA,cAAA,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,GAAA1B,EAI5B2B,GAAU;AAAA,YAAA,IAACtB,SAAM;AAAA,qBAAEV,EAAAA,EAAQQ,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAL,EAC5C4B,GAAgB;AAAA,YAAA,IAAAlB,WAAA;AAAA,qBAAEb,EAAMgC;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupField.js","sources":["../../../src/components/form/RadioGroupField.tsx"],"sourcesContent":["import type { Component, ComponentProps } from
|
|
1
|
+
{"version":3,"file":"RadioGroupField.js","sources":["../../../src/components/form/RadioGroupField.tsx"],"sourcesContent":["import type { Component, ComponentProps } from 'solid-js';\n\nimport { Field, FieldContent, FieldError, FieldDescription } from '@/components/Field';\nimport { RadioGroup } from '@/components/RadioGroup';\n\nimport { useFieldContext } from './context';\n\nexport type RadioGroupFieldProps = ComponentProps<typeof RadioGroup> & {\n label?: string;\n description?: string;\n};\n\nexport const RadioGroupField: Component<RadioGroupFieldProps> = (props) => {\n const field = useFieldContext<string>();\n const [local, others] = splitProps(props, ['description', 'required', 'disabled', 'readOnly']);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldContent>\n <RadioGroup\n value={field().state.value}\n onValueChange={(details) => {\n field().handleChange(details.value ?? '');\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n {...others}\n />\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["RadioGroupField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldContent","RadioGroup","_$mergeProps","value","onValueChange","details","handleChange","onBlur","handleBlur","FieldError","FieldDescription","description"],"mappings":";;;;;AAYO,MAAMA,IAAoDC,CAAAA,MAAU;AACzE,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CAAC,eAAe,YAAY,YAAY,UAAU,CAAC;AAE7F,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAAV,EAEhCW,GAAY;AAAA,QAAA,IAAAD,WAAA;AAAA,iBAAA,CAAAV,EACVY,GAAUC,EAAA;AAAA,YAAA,IACTC,QAAK;AAAA,qBAAEnB,EAAAA,EAAQQ,MAAMW;AAAAA,YAAK;AAAA,YAC1BC,eAAgBC,CAAAA,MAAY;AAC1BrB,cAAAA,EAAAA,EAAQsB,aAAaD,EAAQF,SAAS,EAAE;AAAA,YAC1C;AAAA,YACAI,QAAQA,MAAM;AACZvB,cAAAA,EAAAA,EAAQwB,WAAAA;AAAAA,YACV;AAAA,YAAC,IACDjB,UAAO;AAAA,qBAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,YAAC;AAAA,YAAA,IAC7CE,WAAQ;AAAA,qBAAEX,EAAMW,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCC,WAAQ;AAAA,qBAAEZ,EAAMY,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCF,WAAQ;AAAA,qBAAEV,EAAMU,YAAY;AAAA,YAAK;AAAA,UAAA,GAC7BT,CAAM,CAAA,GAAAE,EAEXoB,GAAU;AAAA,YAAA,IAACf,SAAM;AAAA,qBAAEV,EAAAA,EAAQQ,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAL,EAC5CqB,GAAgB;AAAA,YAAA,IAAAX,WAAA;AAAA,qBAAEb,EAAMyB;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectField.js","sources":["../../../src/components/form/SelectField.tsx"],"sourcesContent":["import type { Component, ComponentProps, JSX } from
|
|
1
|
+
{"version":3,"file":"SelectField.js","sources":["../../../src/components/form/SelectField.tsx"],"sourcesContent":["import type { Component, ComponentProps, JSX } from 'solid-js';\n\nimport { Field, FieldContent, FieldDescription, FieldError, FieldLabel } from '@/components/Field';\nimport {\n Select,\n SelectContent,\n SelectControl,\n SelectPositioner,\n SelectTrigger,\n SelectValue,\n} from '@/components/Select';\n\nimport { useFieldContext } from './context';\n\nconst SelectInput: Component<{ placeholder: string; children: JSX.Element }> = (props) => (\n <>\n <SelectControl>\n <SelectTrigger>\n <SelectValue placeholder={props.placeholder} />\n </SelectTrigger>\n </SelectControl>\n <SelectPositioner>\n <SelectContent>{props.children}</SelectContent>\n </SelectPositioner>\n </>\n);\n\nexport type SelectFieldProps = ComponentProps<typeof Select> & {\n label?: string;\n description?: string;\n placeholder?: string;\n};\n\nexport const SelectField: Component<SelectFieldProps> = (props) => {\n const field = useFieldContext<string[]>();\n const [local, others] = splitProps(props, [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n 'placeholder',\n 'children',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <Select\n value={field().state.value}\n onValueChange={(details) => {\n field().handleChange(details.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n {...others}\n >\n <SelectInput placeholder={local.placeholder ?? ''}>{local.children}</SelectInput>\n </Select>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["SelectInput","props","_$createComponent","SelectControl","children","SelectTrigger","SelectValue","placeholder","SelectPositioner","SelectContent","SelectField","field","useFieldContext","local","others","splitProps","Field","invalid","state","meta","errors","length","disabled","readOnly","required","FieldLabel","label","FieldContent","Select","_$mergeProps","value","onValueChange","details","handleChange","onBlur","handleBlur","FieldError","FieldDescription","description"],"mappings":";;;;;AAcA,MAAMA,IAA0EC,CAAAA,MAAK,CAAAC,EAEhFC,GAAa;AAAA,EAAA,IAAAC,WAAA;AAAA,WAAAF,EACXG,GAAa;AAAA,MAAA,IAAAD,WAAA;AAAA,eAAAF,EACXI,GAAW;AAAA,UAAA,IAACC,cAAW;AAAA,mBAAE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AAA,qBAAEN,EAAAA,EAAQO,MAAMC,KAAKC,OAAOC,SAAS;AAAA,YAAC;AAAA,YAAA,IAC7CC,WAAQ;AAAA,qBAAET,EAAMS,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCC,WAAQ;AAAA,qBAAEV,EAAMU,YAAY;AAAA,YAAK;AAAA,UAAA,GAC7BT,GAAM;AAAA,YAAA,IAAAV,WAAA;AAAA,qBAAAF,EAETF,GAAW;AAAA,gBAAA,IAACO,cAAW;AAAA,yBAAEM,EAAMN,eAAe;AAAA,gBAAE;AAAA,gBAAA,IAAAH,WAAA;AAAA,yBAAGS,EAAMT;AAAAA,gBAAQ;AAAA,cAAA,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,CAAA,GAAAF,EAEnEkC,GAAU;AAAA,YAAA,IAAChB,SAAM;AAAA,qBAAET,EAAAA,EAAQO,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAlB,EAC5CmC,GAAgB;AAAA,YAAA,IAAAjC,WAAA;AAAA,qBAAES,EAAMyB;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmitButton.js","sources":["../../../src/components/form/SubmitButton.tsx"],"sourcesContent":["import type { Component, ComponentProps } from
|
|
1
|
+
{"version":3,"file":"SubmitButton.js","sources":["../../../src/components/form/SubmitButton.tsx"],"sourcesContent":["import type { Component, ComponentProps } from 'solid-js';\n\nimport { Button } from '@/components/Button';\n\nimport { useFormContext } from './context';\n\nexport type SubmitButtonProps = ComponentProps<typeof Button> & {\n loading?: boolean;\n};\n\nexport const SubmitButton: Component<SubmitButtonProps> = (props) => {\n const form = useFormContext();\n const [local, others] = splitProps(props, ['children', 'loading', 'disabled']);\n\n const isLoading = (): boolean =>\n form.state.isSubmitting || form.state.isValidating || (local.loading ?? false);\n\n return (\n <Button\n type='submit'\n loading={isLoading()}\n disabled={local.disabled ?? !form.state.canSubmit}\n {...others}\n >\n {local.children}\n </Button>\n );\n};\n"],"names":["SubmitButton","props","form","useFormContext","local","others","splitProps","isLoading","state","isSubmitting","isValidating","loading","_$createComponent","Button","_$mergeProps","type","disabled","canSubmit","children"],"mappings":";;;;AAUO,MAAMA,IAA8CC,CAAAA,MAAU;AACnE,QAAMC,IAAOC,EAAAA,GACP,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CAAC,YAAY,WAAW,UAAU,CAAC,GAEvEM,IAAYA,MAChBL,EAAKM,MAAMC,gBAAgBP,EAAKM,MAAME,iBAAiBN,EAAMO,WAAW;AAE1E,SAAAC,EACGC,GAAMC,EAAA;AAAA,IACLC,MAAI;AAAA,IAAA,IACJJ,UAAO;AAAA,aAAEJ,EAAAA;AAAAA,IAAW;AAAA,IAAA,IACpBS,WAAQ;AAAA,aAAEZ,EAAMY,YAAY,CAACd,EAAKM,MAAMS;AAAAA,IAAS;AAAA,EAAA,GAC7CZ,GAAM;AAAA,IAAA,IAAAa,WAAA;AAAA,aAETd,EAAMc;AAAAA,IAAQ;AAAA,EAAA,CAAA,CAAA;AAGrB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwitchField.js","sources":["../../../src/components/form/SwitchField.tsx"],"sourcesContent":["import type { Component, ComponentProps, JSX } from
|
|
1
|
+
{"version":3,"file":"SwitchField.js","sources":["../../../src/components/form/SwitchField.tsx"],"sourcesContent":["import type { Component, ComponentProps, JSX } from 'solid-js';\n\nimport { Field, FieldContent, FieldDescription, FieldError } from '@/components/Field';\nimport { Switch, SwitchControl, SwitchLabel, SwitchThumb } from '@/components/Switch';\n\nimport { useFieldContext } from './context';\n\nexport type SwitchFieldProps = ComponentProps<typeof Switch> & {\n description?: string;\n label?: JSX.Element;\n};\n\nexport const SwitchField: Component<SwitchFieldProps> = (props) => {\n const field = useFieldContext<boolean>();\n const [local, others] = splitProps(props, [\n 'description',\n 'label',\n 'required',\n 'disabled',\n 'readOnly',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldContent>\n <Switch\n checked={field().state.value}\n onCheckedChange={(details) => {\n field().handleChange(Boolean(details.checked));\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n {...others}\n >\n <SwitchControl>\n <SwitchThumb />\n </SwitchControl>\n <SwitchLabel>{local.label}</SwitchLabel>\n </Switch>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["SwitchField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldContent","Switch","_$mergeProps","checked","value","onCheckedChange","details","handleChange","Boolean","onBlur","handleBlur","SwitchControl","SwitchThumb","SwitchLabel","label","FieldError","FieldDescription","description"],"mappings":";;;;;AAYO,MAAMA,IAA4CC,CAAAA,MAAU;AACjE,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,eACA,SACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAAV,EAEhCW,GAAY;A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EAAA,CAAA;AAI5C;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputField.js","sources":["../../../src/components/form/TextInputField.tsx"],"sourcesContent":["import { type Component, type ComponentProps, splitProps } from
|
|
1
|
+
{"version":3,"file":"TextInputField.js","sources":["../../../src/components/form/TextInputField.tsx"],"sourcesContent":["import { type Component, type ComponentProps, splitProps } from 'solid-js';\n\nimport { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';\nimport { TextInputControl, TextInputInput } from '@/components/TextInput';\n\nimport { useFieldContext } from './context';\n\nexport type TextInputFieldProps = ComponentProps<typeof TextInputInput> & {\n label?: string;\n description?: string;\n};\n\nexport const TextInputField: Component<TextInputFieldProps> = (props) => {\n const field = useFieldContext<string>();\n const [local, others] = splitProps(props, [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <TextInputControl>\n <TextInputInput\n value={field().state.value}\n onInput={(event) => {\n field().handleChange(event.target.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n {...others}\n />\n </TextInputControl>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["TextInputField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","disabled","readOnly","required","children","FieldLabel","label","FieldContent","TextInputControl","TextInputInput","_$mergeProps","value","onInput","event","handleChange","target","onBlur","handleBlur","FieldError","FieldDescription","description"],"mappings":";;;;;AAYO,MAAMA,IAAkDC,CAAAA,MAAU;AACvE,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,SACA,eACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,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 @@
|
|
|
1
|
-
{"version":3,"file":"TextareaField.js","sources":["../../../src/components/form/TextareaField.tsx"],"sourcesContent":["import type { Component, ComponentProps } from
|
|
1
|
+
{"version":3,"file":"TextareaField.js","sources":["../../../src/components/form/TextareaField.tsx"],"sourcesContent":["import type { Component, ComponentProps } from 'solid-js';\n\nimport { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';\nimport { TextInputControl, TextInputArea } from '@/components/TextInput';\n\nimport { useFieldContext } from './context';\n\nexport type TextareaFieldProps = ComponentProps<typeof TextInputArea> & {\n label?: string;\n description?: string;\n};\n\nexport const TextareaField: Component<TextareaFieldProps> = (props) => {\n const field = useFieldContext<string>();\n const [local, others] = splitProps(props, [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <TextInputControl>\n <TextInputArea\n value={field().state.value}\n onInput={(event) => {\n field().handleChange(event.target.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n {...others}\n />\n </TextInputControl>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["TextareaField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","disabled","readOnly","required","children","FieldLabel","label","FieldContent","TextInputControl","TextInputArea","_$mergeProps","value","onInput","event","handleChange","target","onBlur","handleBlur","FieldError","FieldDescription","description"],"mappings":";;;;;AAYO,MAAMA,IAAgDC,CAAAA,MAAU;AACrE,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,SACA,eACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EA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|
1
|
+
import { template as b, insert as g, createComponent as m, mergeProps as f, effect as w, setAttribute as d, className as x, spread as C } from "solid-js/web";
|
|
2
|
+
import { cn as p } from "../../node_modules/.bun/tailwind-variants@3.2.2_e7cab99c1b720a38/node_modules/tailwind-variants/dist/index.js";
|
|
3
3
|
import { useSidebar as k } from "./context.js";
|
|
4
4
|
import { splitProps as u } from "solid-js";
|
|
5
|
-
var S = /* @__PURE__ */
|
|
6
|
-
const D = (
|
|
7
|
-
const [
|
|
5
|
+
var S = /* @__PURE__ */ b('<div data-slot=sidebar-container><div data-sidebar=sidebar data-slot=sidebar-inner class="group-data-[variant=floating]:shadow-sm flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border">'), z = /* @__PURE__ */ b('<div class="group peer md:block hidden text-sidebar-foreground"data-slot=sidebar><div data-slot=sidebar-gap>');
|
|
6
|
+
const D = (s) => {
|
|
7
|
+
const [e, a] = u(s, ["variant", "side", "class", "children"]);
|
|
8
8
|
return (() => {
|
|
9
|
-
var
|
|
10
|
-
return C(
|
|
9
|
+
var i = S(), r = i.firstChild;
|
|
10
|
+
return C(i, f({
|
|
11
11
|
get class() {
|
|
12
|
-
return
|
|
12
|
+
return p("inset-y-0 md:flex fixed z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear", e.side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", e.variant === "floating" || e.variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", e.class);
|
|
13
13
|
}
|
|
14
|
-
}, a), !1, !0),
|
|
14
|
+
}, a), !1, !0), g(r, () => e.children), i;
|
|
15
15
|
})();
|
|
16
|
-
}, _ = (
|
|
16
|
+
}, _ = (s) => {
|
|
17
17
|
const {
|
|
18
|
-
state:
|
|
19
|
-
} = k(), [a,
|
|
18
|
+
state: e
|
|
19
|
+
} = k(), [a, i] = u(s, ["side", "variant", "collapsible", "class", "children"]);
|
|
20
20
|
return (() => {
|
|
21
21
|
var r = z(), h = r.firstChild;
|
|
22
|
-
return
|
|
22
|
+
return g(r, m(D, f({
|
|
23
23
|
get variant() {
|
|
24
24
|
return a.variant ?? "sidebar";
|
|
25
25
|
},
|
|
@@ -29,13 +29,13 @@ const D = (d) => {
|
|
|
29
29
|
get class() {
|
|
30
30
|
return a.class;
|
|
31
31
|
}
|
|
32
|
-
},
|
|
32
|
+
}, i, {
|
|
33
33
|
get children() {
|
|
34
34
|
return a.children;
|
|
35
35
|
}
|
|
36
|
-
})), null),
|
|
37
|
-
var l =
|
|
38
|
-
return l !== t.e &&
|
|
36
|
+
})), null), w((t) => {
|
|
37
|
+
var l = e(), o = e() === "collapsed" ? a.collapsible ?? "offcanvas" : "", n = a.variant ?? "sidebar", c = a.side ?? "left", v = p("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", a.variant === "floating" || a.variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)");
|
|
38
|
+
return l !== t.e && d(r, "data-state", t.e = l), o !== t.t && d(r, "data-collapsible", t.t = o), n !== t.a && d(r, "data-variant", t.a = n), c !== t.o && d(r, "data-side", t.o = c), v !== t.i && x(h, t.i = v), t;
|
|
39
39
|
}, {
|
|
40
40
|
e: void 0,
|
|
41
41
|
t: void 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarDesktop.js","sources":["../../../src/components/sidebar/SidebarDesktop.tsx"],"sourcesContent":["import type { Component, ComponentProps, JSXElement } from 'solid-js';\n\nimport { cn } from 'tailwind-variants';\n\nimport type { SidebarProps } from './Sidebar';\n\nimport { useSidebar } from './context';\n\ntype SidebarDesktopContainerProps = ComponentProps<'div'> & {\n variant: string;\n side: string;\n children: JSXElement;\n};\n\nconst SidebarDesktopContainer: Component<SidebarDesktopContainerProps> = (props) => {\n const [local, others] = splitProps(props, ['variant', 'side', 'class', 'children']);\n return (\n <div\n data-slot='sidebar-container'\n class={cn(\n 'inset-y-0 md:flex fixed z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear',\n local.side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'\n : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n local.variant === 'floating' || local.variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+
|
|
1
|
+
{"version":3,"file":"SidebarDesktop.js","sources":["../../../src/components/sidebar/SidebarDesktop.tsx"],"sourcesContent":["import type { Component, ComponentProps, JSXElement } from 'solid-js';\n\nimport { cn } from 'tailwind-variants';\n\nimport type { SidebarProps } from './Sidebar';\n\nimport { useSidebar } from './context';\n\ntype SidebarDesktopContainerProps = ComponentProps<'div'> & {\n variant: string;\n side: string;\n children: JSXElement;\n};\n\nconst SidebarDesktopContainer: Component<SidebarDesktopContainerProps> = (props) => {\n const [local, others] = splitProps(props, ['variant', 'side', 'class', 'children']);\n return (\n <div\n data-slot='sidebar-container'\n class={cn(\n 'inset-y-0 md:flex fixed z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear',\n local.side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'\n : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n local.variant === 'floating' || local.variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l',\n local.class,\n )}\n {...others}\n >\n <div\n data-sidebar='sidebar'\n data-slot='sidebar-inner'\n class='group-data-[variant=floating]:shadow-sm flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border'\n >\n {local.children}\n </div>\n </div>\n );\n};\n\nexport const SidebarDesktop: Component<SidebarProps> = (props) => {\n const { state } = useSidebar();\n const [local, others] = splitProps(props, [\n 'side',\n 'variant',\n 'collapsible',\n 'class',\n 'children',\n ]);\n\n return (\n <div\n class='group peer md:block hidden text-sidebar-foreground'\n data-state={state()}\n data-collapsible={state() === 'collapsed' ? (local.collapsible ?? 'offcanvas') : ''}\n data-variant={local.variant ?? 'sidebar'}\n data-side={local.side ?? 'left'}\n data-slot='sidebar'\n >\n <div\n data-slot='sidebar-gap'\n class={cn(\n 'relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n local.variant === 'floating' || local.variant === 'inset'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)',\n )}\n />\n <SidebarDesktopContainer\n variant={local.variant ?? 'sidebar'}\n side={local.side ?? 'left'}\n class={local.class}\n {...others}\n >\n {local.children}\n </SidebarDesktopContainer>\n </div>\n );\n};\n"],"names":["SidebarDesktopContainer","props","local","others","splitProps","_el$","_tmpl$","_el$2","firstChild","_$spread","_$mergeProps","cn","side","variant","class","_$insert","children","SidebarDesktop","state","useSidebar","_el$3","_tmpl$2","_el$4","_$createComponent","_$effect","_p$","_v$","_v$2","collapsible","_v$3","_v$4","_v$5","e","_$setAttribute","t","a","o","i","_$className","undefined"],"mappings":";;;;;AAcA,MAAMA,IAAoEC,CAAAA,MAAU;AAClF,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AAQ,QAAMmB,IAKtBpB,EACL,2FACA,0CACA,sCACAT,EAAMW,YAAY,cAAcX,EAAMW,YAAY,UAC9C,2EACA,wDACN;AAACa,aAAAA,MAAAD,EAAAO,KAAAC,EAAAb,GAAA,cAAAK,EAAAO,IAAAN,CAAA,GAAAC,MAAAF,EAAAS,KAAAD,EAAAb,GAAA,oBAAAK,EAAAS,IAAAP,CAAA,GAAAE,MAAAJ,EAAAU,KAAAF,EAAAb,GAAA,gBAAAK,EAAAU,IAAAN,CAAA,GAAAC,MAAAL,EAAAW,KAAAH,EAAAb,GAAA,aAAAK,EAAAW,IAAAN,CAAA,GAAAC,MAAAN,EAAAY,KAAAC,EAAAhB,GAAAG,EAAAY,IAAAN,CAAA,GAAAN;AAAAA,IAAA,GAAA;AAAA,MAAAO,GAAAO;AAAAA,MAAAL,GAAAK;AAAAA,MAAAJ,GAAAI;AAAAA,MAAAH,GAAAG;AAAAA,MAAAF,GAAAE;AAAAA,IAAAA,CAAA,GAAAnB;AAAAA,EAAA,GAAA;AAYT;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@manafishrov/ui",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.4",
|
|
5
5
|
"description": "Styled component library for Manafish interfaces ",
|
|
6
6
|
"license": "AGPL-3.0-or-later",
|
|
7
7
|
"repository": {
|
|
@@ -247,7 +247,6 @@
|
|
|
247
247
|
"tw-animate-css": "1.4.0"
|
|
248
248
|
},
|
|
249
249
|
"devDependencies": {
|
|
250
|
-
"@inlang/paraglide-js": "2.12.0",
|
|
251
250
|
"@semantic-release/changelog": "6.0.3",
|
|
252
251
|
"@semantic-release/commit-analyzer": "13.0.1",
|
|
253
252
|
"@semantic-release/exec": "7.1.0",
|
|
@@ -255,10 +254,7 @@
|
|
|
255
254
|
"@semantic-release/github": "12.0.6",
|
|
256
255
|
"@semantic-release/release-notes-generator": "14.1.0",
|
|
257
256
|
"semantic-release": "25.0.3",
|
|
258
|
-
"unplugin-
|
|
259
|
-
"unplugin-dts": "1.0.0-beta.6",
|
|
260
|
-
"vite": "7.3.1",
|
|
261
|
-
"vite-plugin-solid": "2.11.10"
|
|
257
|
+
"unplugin-dts": "1.0.0-beta.6"
|
|
262
258
|
},
|
|
263
259
|
"peerDependencies": {
|
|
264
260
|
"@iconify-json/ic": "^1.2.4",
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import type { Component, ComponentProps, JSX } from
|
|
1
|
+
import type { Component, ComponentProps, JSX } from 'solid-js';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
CheckboxControl,
|
|
6
|
-
CheckboxIndicator,
|
|
7
|
-
CheckboxLabel,
|
|
8
|
-
} from "@/components/Checkbox";
|
|
9
|
-
import {
|
|
10
|
-
Field,
|
|
11
|
-
FieldContent,
|
|
12
|
-
FieldDescription,
|
|
13
|
-
FieldError,
|
|
14
|
-
} from "@/components/Field";
|
|
3
|
+
import { Checkbox, CheckboxControl, CheckboxIndicator, CheckboxLabel } from '@/components/Checkbox';
|
|
4
|
+
import { Field, FieldContent, FieldDescription, FieldError } from '@/components/Field';
|
|
15
5
|
|
|
16
|
-
import { useFieldContext } from
|
|
6
|
+
import { useFieldContext } from './context';
|
|
17
7
|
|
|
18
8
|
export type CheckboxFieldProps = ComponentProps<typeof Checkbox> & {
|
|
19
9
|
description?: string;
|
|
@@ -23,11 +13,11 @@ export type CheckboxFieldProps = ComponentProps<typeof Checkbox> & {
|
|
|
23
13
|
export const CheckboxField: Component<CheckboxFieldProps> = (props) => {
|
|
24
14
|
const field = useFieldContext<boolean>();
|
|
25
15
|
const [local, others] = splitProps(props, [
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
16
|
+
'description',
|
|
17
|
+
'label',
|
|
18
|
+
'required',
|
|
19
|
+
'disabled',
|
|
20
|
+
'readOnly',
|
|
31
21
|
]);
|
|
32
22
|
|
|
33
23
|
return (
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
DatePickerRootProps,
|
|
4
|
-
DateValue,
|
|
5
|
-
} from "@ark-ui/solid";
|
|
6
|
-
import type { Component } from "solid-js";
|
|
1
|
+
import type { DatePickerInputProps, DatePickerRootProps, DateValue } from '@ark-ui/solid';
|
|
2
|
+
import type { Component } from 'solid-js';
|
|
7
3
|
|
|
8
4
|
import {
|
|
9
5
|
DatePicker,
|
|
@@ -13,16 +9,10 @@ import {
|
|
|
13
9
|
DatePickerPositioner,
|
|
14
10
|
DatePickerTrigger,
|
|
15
11
|
DatePickerViews,
|
|
16
|
-
} from
|
|
17
|
-
import {
|
|
18
|
-
Field,
|
|
19
|
-
FieldContent,
|
|
20
|
-
FieldDescription,
|
|
21
|
-
FieldError,
|
|
22
|
-
FieldLabel,
|
|
23
|
-
} from "@/components/Field";
|
|
12
|
+
} from '@/components/DatePicker';
|
|
13
|
+
import { Field, FieldContent, FieldDescription, FieldError, FieldLabel } from '@/components/Field';
|
|
24
14
|
|
|
25
|
-
import { useFieldContext } from
|
|
15
|
+
import { useFieldContext } from './context';
|
|
26
16
|
|
|
27
17
|
export type DatePickerFieldProps = DatePickerRootProps & {
|
|
28
18
|
label?: string;
|
|
@@ -44,12 +34,12 @@ const DatePickerInputGroup: Component<DatePickerInputProps> = (props) => (
|
|
|
44
34
|
);
|
|
45
35
|
|
|
46
36
|
const DATE_PICKER_FIELD_PROPS = [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
37
|
+
'label',
|
|
38
|
+
'description',
|
|
39
|
+
'required',
|
|
40
|
+
'disabled',
|
|
41
|
+
'readOnly',
|
|
42
|
+
'placeholder',
|
|
53
43
|
] as const;
|
|
54
44
|
|
|
55
45
|
export const DatePickerField: Component<DatePickerFieldProps> = (props) => {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { createFormHook } from
|
|
1
|
+
import { createFormHook } from '@tanstack/solid-form';
|
|
2
2
|
|
|
3
|
-
import { CheckboxField } from
|
|
4
|
-
import { ComboboxField } from
|
|
5
|
-
import { formContext, fieldContext } from
|
|
6
|
-
import { DatePickerField } from
|
|
7
|
-
import { NumberInputField } from
|
|
8
|
-
import { PasswordInputField } from
|
|
9
|
-
import { PinInputField } from
|
|
10
|
-
import { RadioGroupField } from
|
|
11
|
-
import { SelectField } from
|
|
12
|
-
import { SliderField } from
|
|
13
|
-
import { SubmitButton } from
|
|
14
|
-
import { SwitchField } from
|
|
15
|
-
import { TagsInputField } from
|
|
16
|
-
import { TextareaField } from
|
|
17
|
-
import { TextInputField } from
|
|
3
|
+
import { CheckboxField } from './CheckboxField';
|
|
4
|
+
import { ComboboxField } from './ComboboxField';
|
|
5
|
+
import { formContext, fieldContext } from './context';
|
|
6
|
+
import { DatePickerField } from './DatePickerField';
|
|
7
|
+
import { NumberInputField } from './NumberInputField';
|
|
8
|
+
import { PasswordInputField } from './PasswordInputField';
|
|
9
|
+
import { PinInputField } from './PinInputField';
|
|
10
|
+
import { RadioGroupField } from './RadioGroupField';
|
|
11
|
+
import { SelectField } from './SelectField';
|
|
12
|
+
import { SliderField } from './SliderField';
|
|
13
|
+
import { SubmitButton } from './SubmitButton';
|
|
14
|
+
import { SwitchField } from './SwitchField';
|
|
15
|
+
import { TagsInputField } from './TagsInputField';
|
|
16
|
+
import { TextareaField } from './TextareaField';
|
|
17
|
+
import { TextInputField } from './TextInputField';
|
|
18
18
|
|
|
19
19
|
export const { useAppForm, withForm, withFieldGroup } = createFormHook({
|
|
20
20
|
formContext,
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import type { Component, ComponentProps } from
|
|
1
|
+
import type { Component, ComponentProps } from 'solid-js';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
Field,
|
|
5
|
-
FieldLabel,
|
|
6
|
-
FieldContent,
|
|
7
|
-
FieldError,
|
|
8
|
-
FieldDescription,
|
|
9
|
-
} from "@/components/Field";
|
|
3
|
+
import { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';
|
|
10
4
|
import {
|
|
11
5
|
NumberInput,
|
|
12
6
|
NumberInputControl,
|
|
13
7
|
NumberInputInput,
|
|
14
8
|
NumberInputTriggers,
|
|
15
|
-
} from
|
|
9
|
+
} from '@/components/NumberInput';
|
|
16
10
|
|
|
17
|
-
import { useFieldContext } from
|
|
11
|
+
import { useFieldContext } from './context';
|
|
18
12
|
|
|
19
13
|
export type NumberInputFieldProps = ComponentProps<typeof NumberInput> & {
|
|
20
14
|
label?: string;
|
|
@@ -25,12 +19,12 @@ export type NumberInputFieldProps = ComponentProps<typeof NumberInput> & {
|
|
|
25
19
|
export const NumberInputField: Component<NumberInputFieldProps> = (props) => {
|
|
26
20
|
const field = useFieldContext<number>();
|
|
27
21
|
const [local, others] = splitProps(props, [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
'label',
|
|
23
|
+
'description',
|
|
24
|
+
'required',
|
|
25
|
+
'disabled',
|
|
26
|
+
'readOnly',
|
|
27
|
+
'triggers',
|
|
34
28
|
]);
|
|
35
29
|
|
|
36
30
|
return (
|
|
@@ -1,39 +1,29 @@
|
|
|
1
|
-
import { splitProps, type Component, type ComponentProps } from
|
|
1
|
+
import { splitProps, type Component, type ComponentProps } from 'solid-js';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
Field,
|
|
5
|
-
FieldLabel,
|
|
6
|
-
FieldContent,
|
|
7
|
-
FieldError,
|
|
8
|
-
FieldDescription,
|
|
9
|
-
} from "@/components/Field";
|
|
3
|
+
import { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';
|
|
10
4
|
import {
|
|
11
5
|
PasswordInput,
|
|
12
6
|
PasswordInputControl,
|
|
13
7
|
PasswordInputInput,
|
|
14
8
|
PasswordInputVisibilityTrigger,
|
|
15
9
|
PasswordInputIndicator,
|
|
16
|
-
} from
|
|
10
|
+
} from '@/components/PasswordInput';
|
|
17
11
|
|
|
18
|
-
import { useFieldContext } from
|
|
12
|
+
import { useFieldContext } from './context';
|
|
19
13
|
|
|
20
|
-
export type PasswordInputFieldProps = ComponentProps<
|
|
21
|
-
typeof PasswordInputInput
|
|
22
|
-
> & {
|
|
14
|
+
export type PasswordInputFieldProps = ComponentProps<typeof PasswordInputInput> & {
|
|
23
15
|
label?: string;
|
|
24
16
|
description?: string;
|
|
25
17
|
};
|
|
26
18
|
|
|
27
|
-
export const PasswordInputField: Component<PasswordInputFieldProps> = (
|
|
28
|
-
props,
|
|
29
|
-
) => {
|
|
19
|
+
export const PasswordInputField: Component<PasswordInputFieldProps> = (props) => {
|
|
30
20
|
const field = useFieldContext<string>();
|
|
31
21
|
const [local, others] = splitProps(props, [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
'label',
|
|
23
|
+
'description',
|
|
24
|
+
'required',
|
|
25
|
+
'disabled',
|
|
26
|
+
'readOnly',
|
|
37
27
|
]);
|
|
38
28
|
|
|
39
29
|
return (
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import type { Component, ComponentProps } from
|
|
1
|
+
import type { Component, ComponentProps } from 'solid-js';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
FieldContent,
|
|
6
|
-
FieldError,
|
|
7
|
-
FieldDescription,
|
|
8
|
-
} from "@/components/Field";
|
|
9
|
-
import { RadioGroup } from "@/components/RadioGroup";
|
|
3
|
+
import { Field, FieldContent, FieldError, FieldDescription } from '@/components/Field';
|
|
4
|
+
import { RadioGroup } from '@/components/RadioGroup';
|
|
10
5
|
|
|
11
|
-
import { useFieldContext } from
|
|
6
|
+
import { useFieldContext } from './context';
|
|
12
7
|
|
|
13
8
|
export type RadioGroupFieldProps = ComponentProps<typeof RadioGroup> & {
|
|
14
9
|
label?: string;
|
|
@@ -17,12 +12,7 @@ export type RadioGroupFieldProps = ComponentProps<typeof RadioGroup> & {
|
|
|
17
12
|
|
|
18
13
|
export const RadioGroupField: Component<RadioGroupFieldProps> = (props) => {
|
|
19
14
|
const field = useFieldContext<string>();
|
|
20
|
-
const [local, others] = splitProps(props, [
|
|
21
|
-
"description",
|
|
22
|
-
"required",
|
|
23
|
-
"disabled",
|
|
24
|
-
"readOnly",
|
|
25
|
-
]);
|
|
15
|
+
const [local, others] = splitProps(props, ['description', 'required', 'disabled', 'readOnly']);
|
|
26
16
|
|
|
27
17
|
return (
|
|
28
18
|
<Field
|
|
@@ -35,7 +25,7 @@ export const RadioGroupField: Component<RadioGroupFieldProps> = (props) => {
|
|
|
35
25
|
<RadioGroup
|
|
36
26
|
value={field().state.value}
|
|
37
27
|
onValueChange={(details) => {
|
|
38
|
-
field().handleChange(details.value ??
|
|
28
|
+
field().handleChange(details.value ?? '');
|
|
39
29
|
}}
|
|
40
30
|
onBlur={() => {
|
|
41
31
|
field().handleBlur();
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import type { Component, ComponentProps, JSX } from
|
|
1
|
+
import type { Component, ComponentProps, JSX } from 'solid-js';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
Field,
|
|
5
|
-
FieldContent,
|
|
6
|
-
FieldDescription,
|
|
7
|
-
FieldError,
|
|
8
|
-
FieldLabel,
|
|
9
|
-
} from "@/components/Field";
|
|
3
|
+
import { Field, FieldContent, FieldDescription, FieldError, FieldLabel } from '@/components/Field';
|
|
10
4
|
import {
|
|
11
5
|
Select,
|
|
12
6
|
SelectContent,
|
|
@@ -14,13 +8,11 @@ import {
|
|
|
14
8
|
SelectPositioner,
|
|
15
9
|
SelectTrigger,
|
|
16
10
|
SelectValue,
|
|
17
|
-
} from
|
|
11
|
+
} from '@/components/Select';
|
|
18
12
|
|
|
19
|
-
import { useFieldContext } from
|
|
13
|
+
import { useFieldContext } from './context';
|
|
20
14
|
|
|
21
|
-
const SelectInput: Component<{ placeholder: string; children: JSX.Element }> = (
|
|
22
|
-
props,
|
|
23
|
-
) => (
|
|
15
|
+
const SelectInput: Component<{ placeholder: string; children: JSX.Element }> = (props) => (
|
|
24
16
|
<>
|
|
25
17
|
<SelectControl>
|
|
26
18
|
<SelectTrigger>
|
|
@@ -42,13 +34,13 @@ export type SelectFieldProps = ComponentProps<typeof Select> & {
|
|
|
42
34
|
export const SelectField: Component<SelectFieldProps> = (props) => {
|
|
43
35
|
const field = useFieldContext<string[]>();
|
|
44
36
|
const [local, others] = splitProps(props, [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
37
|
+
'label',
|
|
38
|
+
'description',
|
|
39
|
+
'required',
|
|
40
|
+
'disabled',
|
|
41
|
+
'readOnly',
|
|
42
|
+
'placeholder',
|
|
43
|
+
'children',
|
|
52
44
|
]);
|
|
53
45
|
|
|
54
46
|
return (
|
|
@@ -73,9 +65,7 @@ export const SelectField: Component<SelectFieldProps> = (props) => {
|
|
|
73
65
|
readOnly={local.readOnly ?? false}
|
|
74
66
|
{...others}
|
|
75
67
|
>
|
|
76
|
-
<SelectInput placeholder={local.placeholder ??
|
|
77
|
-
{local.children}
|
|
78
|
-
</SelectInput>
|
|
68
|
+
<SelectInput placeholder={local.placeholder ?? ''}>{local.children}</SelectInput>
|
|
79
69
|
</Select>
|
|
80
70
|
<FieldError errors={field().state.meta.errors} />
|
|
81
71
|
<FieldDescription>{local.description}</FieldDescription>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Component, ComponentProps } from
|
|
1
|
+
import type { Component, ComponentProps } from 'solid-js';
|
|
2
2
|
|
|
3
|
-
import { Button } from
|
|
3
|
+
import { Button } from '@/components/Button';
|
|
4
4
|
|
|
5
|
-
import { useFormContext } from
|
|
5
|
+
import { useFormContext } from './context';
|
|
6
6
|
|
|
7
7
|
export type SubmitButtonProps = ComponentProps<typeof Button> & {
|
|
8
8
|
loading?: boolean;
|
|
@@ -10,20 +10,14 @@ export type SubmitButtonProps = ComponentProps<typeof Button> & {
|
|
|
10
10
|
|
|
11
11
|
export const SubmitButton: Component<SubmitButtonProps> = (props) => {
|
|
12
12
|
const form = useFormContext();
|
|
13
|
-
const [local, others] = splitProps(props, [
|
|
14
|
-
"children",
|
|
15
|
-
"loading",
|
|
16
|
-
"disabled",
|
|
17
|
-
]);
|
|
13
|
+
const [local, others] = splitProps(props, ['children', 'loading', 'disabled']);
|
|
18
14
|
|
|
19
15
|
const isLoading = (): boolean =>
|
|
20
|
-
form.state.isSubmitting ||
|
|
21
|
-
form.state.isValidating ||
|
|
22
|
-
(local.loading ?? false);
|
|
16
|
+
form.state.isSubmitting || form.state.isValidating || (local.loading ?? false);
|
|
23
17
|
|
|
24
18
|
return (
|
|
25
19
|
<Button
|
|
26
|
-
type=
|
|
20
|
+
type='submit'
|
|
27
21
|
loading={isLoading()}
|
|
28
22
|
disabled={local.disabled ?? !form.state.canSubmit}
|
|
29
23
|
{...others}
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import type { Component, ComponentProps, JSX } from
|
|
1
|
+
import type { Component, ComponentProps, JSX } from 'solid-js';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
FieldContent,
|
|
6
|
-
FieldDescription,
|
|
7
|
-
FieldError,
|
|
8
|
-
} from "@/components/Field";
|
|
9
|
-
import {
|
|
10
|
-
Switch,
|
|
11
|
-
SwitchControl,
|
|
12
|
-
SwitchLabel,
|
|
13
|
-
SwitchThumb,
|
|
14
|
-
} from "@/components/Switch";
|
|
3
|
+
import { Field, FieldContent, FieldDescription, FieldError } from '@/components/Field';
|
|
4
|
+
import { Switch, SwitchControl, SwitchLabel, SwitchThumb } from '@/components/Switch';
|
|
15
5
|
|
|
16
|
-
import { useFieldContext } from
|
|
6
|
+
import { useFieldContext } from './context';
|
|
17
7
|
|
|
18
8
|
export type SwitchFieldProps = ComponentProps<typeof Switch> & {
|
|
19
9
|
description?: string;
|
|
@@ -23,11 +13,11 @@ export type SwitchFieldProps = ComponentProps<typeof Switch> & {
|
|
|
23
13
|
export const SwitchField: Component<SwitchFieldProps> = (props) => {
|
|
24
14
|
const field = useFieldContext<boolean>();
|
|
25
15
|
const [local, others] = splitProps(props, [
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
16
|
+
'description',
|
|
17
|
+
'label',
|
|
18
|
+
'required',
|
|
19
|
+
'disabled',
|
|
20
|
+
'readOnly',
|
|
31
21
|
]);
|
|
32
22
|
|
|
33
23
|
return (
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import { type Component, type ComponentProps, splitProps } from
|
|
1
|
+
import { type Component, type ComponentProps, splitProps } from 'solid-js';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
FieldLabel,
|
|
6
|
-
FieldContent,
|
|
7
|
-
FieldError,
|
|
8
|
-
FieldDescription,
|
|
9
|
-
} from "@/components/Field";
|
|
10
|
-
import { TextInputControl, TextInputInput } from "@/components/TextInput";
|
|
3
|
+
import { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';
|
|
4
|
+
import { TextInputControl, TextInputInput } from '@/components/TextInput';
|
|
11
5
|
|
|
12
|
-
import { useFieldContext } from
|
|
6
|
+
import { useFieldContext } from './context';
|
|
13
7
|
|
|
14
8
|
export type TextInputFieldProps = ComponentProps<typeof TextInputInput> & {
|
|
15
9
|
label?: string;
|
|
@@ -19,11 +13,11 @@ export type TextInputFieldProps = ComponentProps<typeof TextInputInput> & {
|
|
|
19
13
|
export const TextInputField: Component<TextInputFieldProps> = (props) => {
|
|
20
14
|
const field = useFieldContext<string>();
|
|
21
15
|
const [local, others] = splitProps(props, [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
'label',
|
|
17
|
+
'description',
|
|
18
|
+
'required',
|
|
19
|
+
'disabled',
|
|
20
|
+
'readOnly',
|
|
27
21
|
]);
|
|
28
22
|
|
|
29
23
|
return (
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import type { Component, ComponentProps } from
|
|
1
|
+
import type { Component, ComponentProps } from 'solid-js';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
FieldLabel,
|
|
6
|
-
FieldContent,
|
|
7
|
-
FieldError,
|
|
8
|
-
FieldDescription,
|
|
9
|
-
} from "@/components/Field";
|
|
10
|
-
import { TextInputControl, TextInputArea } from "@/components/TextInput";
|
|
3
|
+
import { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';
|
|
4
|
+
import { TextInputControl, TextInputArea } from '@/components/TextInput';
|
|
11
5
|
|
|
12
|
-
import { useFieldContext } from
|
|
6
|
+
import { useFieldContext } from './context';
|
|
13
7
|
|
|
14
8
|
export type TextareaFieldProps = ComponentProps<typeof TextInputArea> & {
|
|
15
9
|
label?: string;
|
|
@@ -19,11 +13,11 @@ export type TextareaFieldProps = ComponentProps<typeof TextInputArea> & {
|
|
|
19
13
|
export const TextareaField: Component<TextareaFieldProps> = (props) => {
|
|
20
14
|
const field = useFieldContext<string>();
|
|
21
15
|
const [local, others] = splitProps(props, [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
'label',
|
|
17
|
+
'description',
|
|
18
|
+
'required',
|
|
19
|
+
'disabled',
|
|
20
|
+
'readOnly',
|
|
27
21
|
]);
|
|
28
22
|
|
|
29
23
|
return (
|
|
@@ -23,7 +23,7 @@ const SidebarDesktopContainer: Component<SidebarDesktopContainerProps> = (props)
|
|
|
23
23
|
? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'
|
|
24
24
|
: 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',
|
|
25
25
|
local.variant === 'floating' || local.variant === 'inset'
|
|
26
|
-
? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+
|
|
26
|
+
? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]'
|
|
27
27
|
: 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l',
|
|
28
28
|
local.class,
|
|
29
29
|
)}
|
|
@@ -66,7 +66,7 @@ export const SidebarDesktop: Component<SidebarProps> = (props) => {
|
|
|
66
66
|
'group-data-[collapsible=offcanvas]:w-0',
|
|
67
67
|
'group-data-[side=right]:rotate-180',
|
|
68
68
|
local.variant === 'floating' || local.variant === 'inset'
|
|
69
|
-
? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+
|
|
69
|
+
? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem)]'
|
|
70
70
|
: 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)',
|
|
71
71
|
)}
|
|
72
72
|
/>
|