@voyantjs/products-ui 0.31.0 → 0.31.1

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.
@@ -4,7 +4,7 @@ import { useProductDayMutation } from "@voyantjs/products-react";
4
4
  import { Button } from "@voyantjs/ui/components/button";
5
5
  import { Input } from "@voyantjs/ui/components/input";
6
6
  import { Label } from "@voyantjs/ui/components/label";
7
- import { Textarea } from "@voyantjs/ui/components/textarea";
7
+ import { RichTextEditor } from "@voyantjs/ui/components/rich-text-editor";
8
8
  import { Loader2 } from "lucide-react";
9
9
  import * as React from "react";
10
10
  import { useProductsUiMessagesOrDefault } from "../i18n/provider.js";
@@ -71,7 +71,7 @@ export function ProductDayForm({ mode, onSuccess, onCancel }) {
71
71
  : messages.productDayForm.validation.saveFailed);
72
72
  }
73
73
  };
74
- return (_jsxs("form", { "data-slot": "product-day-form", onSubmit: handleSubmit, className: "flex flex-col gap-4", children: [_jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "product-day-number", children: messages.productDayForm.fields.dayNumber }), _jsx(Input, { id: "product-day-number", type: "number", min: "1", autoFocus: true, required: true, value: state.dayNumber, onChange: (event) => field("dayNumber")(event.target.value) })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "product-day-location", children: messages.productDayForm.fields.location }), _jsx(Input, { id: "product-day-location", value: state.location, onChange: (event) => field("location")(event.target.value), placeholder: messages.productDayForm.placeholders.location })] })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "product-day-title", children: messages.productDayForm.fields.title }), _jsx(Input, { id: "product-day-title", value: state.title, onChange: (event) => field("title")(event.target.value), placeholder: messages.productDayForm.placeholders.title })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "product-day-description", children: messages.productDayForm.fields.description }), _jsx(Textarea, { id: "product-day-description", value: state.description, onChange: (event) => field("description")(event.target.value), placeholder: messages.productDayForm.placeholders.description })] }), error ? _jsx("p", { className: "text-sm text-destructive", children: error }) : null, _jsxs("div", { className: "flex items-center justify-end gap-2", children: [onCancel ? (_jsx(Button, { type: "button", variant: "ghost", onClick: onCancel, disabled: isSubmitting, children: messages.common.cancel })) : null, _jsxs(Button, { type: "submit", disabled: isSubmitting, children: [isSubmitting ? (_jsx(Loader2, { className: "mr-2 size-4 animate-spin", "aria-hidden": "true" })) : null, mode.kind === "create"
74
+ return (_jsxs("form", { "data-slot": "product-day-form", onSubmit: handleSubmit, className: "flex flex-col gap-4", children: [_jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "product-day-number", children: messages.productDayForm.fields.dayNumber }), _jsx(Input, { id: "product-day-number", type: "number", min: "1", autoFocus: true, required: true, value: state.dayNumber, onChange: (event) => field("dayNumber")(event.target.value) })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "product-day-location", children: messages.productDayForm.fields.location }), _jsx(Input, { id: "product-day-location", value: state.location, onChange: (event) => field("location")(event.target.value), placeholder: messages.productDayForm.placeholders.location })] })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "product-day-title", children: messages.productDayForm.fields.title }), _jsx(Input, { id: "product-day-title", value: state.title, onChange: (event) => field("title")(event.target.value), placeholder: messages.productDayForm.placeholders.title })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "product-day-description", children: messages.productDayForm.fields.description }), _jsx(RichTextEditor, { value: state.description, onChange: field("description"), placeholder: messages.productDayForm.placeholders.description, editorClassName: "max-h-[320px] overflow-y-auto" })] }), error ? _jsx("p", { className: "text-sm text-destructive", children: error }) : null, _jsxs("div", { className: "flex items-center justify-end gap-2", children: [onCancel ? (_jsx(Button, { type: "button", variant: "ghost", onClick: onCancel, disabled: isSubmitting, children: messages.common.cancel })) : null, _jsxs(Button, { type: "submit", disabled: isSubmitting, children: [isSubmitting ? (_jsx(Loader2, { className: "mr-2 size-4 animate-spin", "aria-hidden": "true" })) : null, mode.kind === "create"
75
75
  ? messages.productDayForm.actions.addDay
76
76
  : messages.productDayForm.actions.saveDay] })] })] }));
77
77
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/products-ui",
3
- "version": "0.31.0",
3
+ "version": "0.31.1",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,17 +45,17 @@
45
45
  "react-dom": "^19.0.0",
46
46
  "react-hook-form": "^7.60.0",
47
47
  "zod": "^4.3.6",
48
- "@voyantjs/availability-react": "0.31.0",
49
- "@voyantjs/catalog-react": "0.31.0",
50
- "@voyantjs/finance": "0.31.0",
51
- "@voyantjs/finance-ui": "0.31.0",
52
- "@voyantjs/pricing-react": "0.31.0",
53
- "@voyantjs/products-react": "0.31.0",
54
- "@voyantjs/suppliers-react": "0.31.0",
55
- "@voyantjs/ui": "0.31.0"
48
+ "@voyantjs/availability-react": "0.31.1",
49
+ "@voyantjs/catalog-react": "0.31.1",
50
+ "@voyantjs/finance": "0.31.1",
51
+ "@voyantjs/finance-ui": "0.31.1",
52
+ "@voyantjs/pricing-react": "0.31.1",
53
+ "@voyantjs/products-react": "0.31.1",
54
+ "@voyantjs/suppliers-react": "0.31.1",
55
+ "@voyantjs/ui": "0.31.1"
56
56
  },
57
57
  "dependencies": {
58
- "@voyantjs/i18n": "0.31.0"
58
+ "@voyantjs/i18n": "0.31.1"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@tanstack/react-query": "^5.96.2",
@@ -68,16 +68,16 @@
68
68
  "typescript": "^6.0.2",
69
69
  "vitest": "^4.1.2",
70
70
  "zod": "^4.3.6",
71
- "@voyantjs/availability-react": "0.31.0",
72
- "@voyantjs/catalog-react": "0.31.0",
73
- "@voyantjs/finance": "0.31.0",
74
- "@voyantjs/finance-ui": "0.31.0",
75
- "@voyantjs/i18n": "0.31.0",
76
- "@voyantjs/pricing-react": "0.31.0",
77
- "@voyantjs/products-react": "0.31.0",
78
- "@voyantjs/suppliers-react": "0.31.0",
71
+ "@voyantjs/availability-react": "0.31.1",
72
+ "@voyantjs/catalog-react": "0.31.1",
73
+ "@voyantjs/finance": "0.31.1",
74
+ "@voyantjs/finance-ui": "0.31.1",
75
+ "@voyantjs/i18n": "0.31.1",
76
+ "@voyantjs/pricing-react": "0.31.1",
77
+ "@voyantjs/products-react": "0.31.1",
78
+ "@voyantjs/suppliers-react": "0.31.1",
79
79
  "@voyantjs/voyant-typescript-config": "0.1.0",
80
- "@voyantjs/ui": "0.31.0"
80
+ "@voyantjs/ui": "0.31.1"
81
81
  },
82
82
  "files": [
83
83
  "dist",