@mercurjs/vendor 2.2.0-canary.35 → 2.2.0-canary.36

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AttributeValueInput
3
- } from "./chunk-PXS7WEG4.js";
3
+ } from "./chunk-6YE7WQLK.js";
4
4
  import {
5
5
  useAttributeTableFilters,
6
6
  useAttributeTableQuery
@@ -46,7 +46,7 @@ var AttributeValueInput = ({
46
46
  /* @__PURE__ */ jsx(Select.Trigger, { children: /* @__PURE__ */ jsx(
47
47
  Select.Value,
48
48
  {
49
- placeholder: t("products.create.attributes.selectValues")
49
+ placeholder: t("products.create.attributes.selectValuePlaceholder")
50
50
  }
51
51
  ) }),
52
52
  /* @__PURE__ */ jsx(Select.Content, { children: availableValues.map((v) => /* @__PURE__ */ jsx(Select.Item, { value: v.name, children: v.name }, v.id)) })
@@ -63,7 +63,7 @@ var AttributeValueInput = ({
63
63
  /* @__PURE__ */ jsx(Select.Trigger, { children: /* @__PURE__ */ jsx(
64
64
  Select.Value,
65
65
  {
66
- placeholder: t("products.create.attributes.selectValues")
66
+ placeholder: t("products.create.attributes.selectValuePlaceholder")
67
67
  }
68
68
  ) }),
69
69
  /* @__PURE__ */ jsxs(Select.Content, { children: [
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AttributeValueInput
3
- } from "./chunk-PXS7WEG4.js";
3
+ } from "./chunk-6YE7WQLK.js";
4
4
  import "./chunk-VBRTC2VU.js";
5
5
  import "./chunk-TKGWSUEI.js";
6
6
  import {
@@ -100,7 +100,7 @@ var CreateProductVariantForm = ({
100
100
  });
101
101
  const { mutateAsync, isPending } = useCreateProductVariant(product.id);
102
102
  const handleSubmit = form.handleSubmit(async (data) => {
103
- const { title, options } = data;
103
+ const { title, sku, options } = data;
104
104
  const cleanedOptions = variantAttributes.reduce(
105
105
  (acc, attr) => {
106
106
  const fieldKey = attr.handle ?? attr.id;
@@ -113,6 +113,7 @@ var CreateProductVariantForm = ({
113
113
  await mutateAsync(
114
114
  {
115
115
  title,
116
+ sku: sku || void 0,
116
117
  options: Object.keys(cleanedOptions).length ? cleanedOptions : void 0
117
118
  },
118
119
  {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AttributeValueInput
3
- } from "./chunk-PXS7WEG4.js";
3
+ } from "./chunk-6YE7WQLK.js";
4
4
  import {
5
5
  ChipInput
6
6
  } from "./chunk-KDE4HKH2.js";
@@ -58,22 +58,14 @@ import {
58
58
  } from "./chunk-NBMM2TZK.js";
59
59
 
60
60
  // src/pages/products/[id]/attributes/[attribute_id]/edit/index.tsx
61
- import { Heading, Text } from "@medusajs/ui";
61
+ import { Heading } from "@medusajs/ui";
62
62
  import { useTranslation as useTranslation2 } from "react-i18next";
63
63
  import { useParams } from "react-router-dom";
64
64
 
65
65
  // src/pages/products/[id]/attributes/[attribute_id]/edit/components/edit-attribute-form/edit-attribute-form.tsx
66
66
  var import_types = __toESM(require_dist(), 1);
67
67
  import { zodResolver } from "@hookform/resolvers/zod";
68
- import {
69
- Button,
70
- Hint,
71
- InlineTip,
72
- Input,
73
- Label,
74
- Switch,
75
- toast
76
- } from "@medusajs/ui";
68
+ import { Button, InlineTip, Input, Label, toast } from "@medusajs/ui";
77
69
  import { useForm } from "react-hook-form";
78
70
  import { useTranslation } from "react-i18next";
79
71
  import * as zod from "zod";
@@ -220,22 +212,7 @@ var EditScopedAttributeForm = ({
220
212
  /* @__PURE__ */ jsx(Form.ErrorMessage, {})
221
213
  ] })
222
214
  }
223
- ),
224
- /* @__PURE__ */ jsx("div", {}),
225
- /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-x-3 py-1.5", children: [
226
- /* @__PURE__ */ jsx(
227
- Switch,
228
- {
229
- className: "shrink-0 rtl:rotate-180",
230
- checked: isAxis,
231
- disabled: true
232
- }
233
- ),
234
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
235
- /* @__PURE__ */ jsx(Label, { size: "xsmall", weight: "plus", children: t("products.create.attributes.useForVariants") }),
236
- /* @__PURE__ */ jsx(Hint, { className: "!txt-small", children: t("products.create.attributes.useForVariantsDescription") })
237
- ] })
238
- ] })
215
+ )
239
216
  ] }) }),
240
217
  isAxis && /* @__PURE__ */ jsx(VariantAxisTip, {}),
241
218
  /* @__PURE__ */ jsx(AttributeWarning, {})
@@ -380,7 +357,7 @@ var Component = () => {
380
357
  return /* @__PURE__ */ jsxs2(RouteDrawer, { children: [
381
358
  /* @__PURE__ */ jsxs2(RouteDrawer.Header, { children: [
382
359
  /* @__PURE__ */ jsx2(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx2(Heading, { children: t("products.editAttribute") }) }),
383
- /* @__PURE__ */ jsx2(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx2(Text, { size: "small", className: "text-ui-fg-subtle", children: t("products.editAttributeHint") }) })
360
+ /* @__PURE__ */ jsx2(RouteDrawer.Description, { className: "sr-only", children: t("products.editAttributeHint") })
384
361
  ] }),
385
362
  ready && /* @__PURE__ */ jsx2(EditAttributeForm, { productId: id, attribute })
386
363
  ] });
package/dist/index.js CHANGED
@@ -2953,7 +2953,7 @@ function getRouteMap({
2953
2953
  },
2954
2954
  {
2955
2955
  path: "edit-variant",
2956
- lazy: () => import("./product-variant-edit-AOO2LVNS.js")
2956
+ lazy: () => import("./product-variant-edit-XEHH3SSH.js")
2957
2957
  },
2958
2958
  {
2959
2959
  path: "sales-channels",
@@ -2977,11 +2977,11 @@ function getRouteMap({
2977
2977
  },
2978
2978
  {
2979
2979
  path: "attributes/add",
2980
- lazy: () => import("./add-VELAOHYG.js")
2980
+ lazy: () => import("./add-6BG6LIWT.js")
2981
2981
  },
2982
2982
  {
2983
2983
  path: "attributes/:attribute_id/edit",
2984
- lazy: () => import("./edit-FKHX3YXU.js")
2984
+ lazy: () => import("./edit-A4INM2D6.js")
2985
2985
  },
2986
2986
  {
2987
2987
  path: "metadata",
@@ -2993,7 +2993,7 @@ function getRouteMap({
2993
2993
  },
2994
2994
  {
2995
2995
  path: "variants/create",
2996
- lazy: () => import("./create-DTR2FWZB.js")
2996
+ lazy: () => import("./create-OGNNYU44.js")
2997
2997
  }
2998
2998
  ]
2999
2999
  },
@@ -3016,7 +3016,7 @@ function getRouteMap({
3016
3016
  children: [
3017
3017
  {
3018
3018
  path: "edit",
3019
- lazy: () => import("./product-variant-edit-AOO2LVNS.js")
3019
+ lazy: () => import("./product-variant-edit-XEHH3SSH.js")
3020
3020
  },
3021
3021
  {
3022
3022
  path: "media",
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-7CAFYKKA.js";
9
9
  import {
10
10
  AttributeValueInput
11
- } from "./chunk-PXS7WEG4.js";
11
+ } from "./chunk-6YE7WQLK.js";
12
12
  import "./chunk-JRTZWK77.js";
13
13
  import {
14
14
  optionalInt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mercurjs/vendor",
3
- "version": "2.2.0-canary.35",
3
+ "version": "2.2.0-canary.36",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/mercurjs/mercur",
@@ -29,8 +29,8 @@
29
29
  "lint": "oxlint --max-warnings 0"
30
30
  },
31
31
  "dependencies": {
32
- "@mercurjs/dashboard-shared": "2.2.0-canary.35",
33
- "@mercurjs/client": "2.2.0-canary.35",
32
+ "@mercurjs/dashboard-shared": "2.2.0-canary.36",
33
+ "@mercurjs/client": "2.2.0-canary.36",
34
34
  "@ariakit/react": "^0.4.15",
35
35
  "@babel/runtime": "^7.26.10",
36
36
  "@dnd-kit/core": "^6.1.0",
@@ -83,8 +83,8 @@
83
83
  "tsup": "^8.0.2",
84
84
  "typescript": "5.9.3",
85
85
  "@medusajs/types": "options-preview",
86
- "@mercurjs/core": "2.2.0-canary.35",
87
- "@mercurjs/dashboard-sdk": "2.2.0-canary.35",
88
- "@mercurjs/types": "2.2.0-canary.35"
86
+ "@mercurjs/core": "2.2.0-canary.36",
87
+ "@mercurjs/dashboard-sdk": "2.2.0-canary.36",
88
+ "@mercurjs/types": "2.2.0-canary.36"
89
89
  }
90
90
  }