@drawbridge/components 0.1.46 → 0.1.47

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.
Files changed (61) hide show
  1. package/dist/bridge/form-subdomain-shop.js +4 -1
  2. package/dist/bridge/form-subdomain-shop.mjs +4 -1
  3. package/dist/bridge/form-subdomain.js +23 -5
  4. package/dist/bridge/form-subdomain.mjs +23 -5
  5. package/dist/bridge/lib/entry.js +41 -0
  6. package/dist/bridge/lib/entry.mjs +40 -0
  7. package/dist/bridge/product-tile.js +4 -0
  8. package/dist/bridge/product-tile.mjs +4 -0
  9. package/dist/bridge/template-layout.js +27 -8
  10. package/dist/bridge/template-layout.mjs +28 -9
  11. package/dist/bridge/template-modal.js +11 -1
  12. package/dist/bridge/template-modal.mjs +11 -1
  13. package/dist/dashboard/avatar.js +2 -3
  14. package/dist/dashboard/avatar.mjs +2 -3
  15. package/dist/dashboard/campaign-form.js +172 -153
  16. package/dist/dashboard/campaign-form.mjs +172 -153
  17. package/dist/dashboard/campaign-share.js +347 -0
  18. package/dist/dashboard/campaign-share.mjs +314 -0
  19. package/dist/dashboard/card-affiliate.js +1 -1
  20. package/dist/dashboard/card-affiliate.mjs +1 -1
  21. package/dist/dashboard/card-campaign-switch.js +4 -1
  22. package/dist/dashboard/card-campaign-switch.mjs +4 -1
  23. package/dist/dashboard/form-organization-campaign-page.js +73 -39
  24. package/dist/dashboard/form-organization-campaign-page.mjs +73 -39
  25. package/dist/dashboard/input-combobox.js +6 -0
  26. package/dist/dashboard/input-combobox.mjs +6 -0
  27. package/dist/dashboard/input-fields.js +26 -3
  28. package/dist/dashboard/input-fields.mjs +26 -3
  29. package/dist/dashboard/input-font.js +2 -0
  30. package/dist/dashboard/input-font.mjs +2 -0
  31. package/dist/dashboard/input-group-ai.js +15 -3
  32. package/dist/dashboard/input-group-ai.mjs +15 -3
  33. package/dist/dashboard/lib/ab-tests.js +2 -2
  34. package/dist/dashboard/lib/ab-tests.mjs +2 -2
  35. package/dist/dashboard/lib/menu.js +19 -0
  36. package/dist/dashboard/lib/menu.mjs +18 -0
  37. package/dist/dashboard/menu.js +13 -2
  38. package/dist/dashboard/menu.mjs +13 -2
  39. package/dist/dashboard/preview.js +119 -52
  40. package/dist/dashboard/preview.mjs +119 -52
  41. package/dist/dashboard/recharts.js +10 -4
  42. package/dist/dashboard/recharts.mjs +10 -4
  43. package/dist/dashboard/template-dashboard.js +11 -1
  44. package/dist/dashboard/template-dashboard.mjs +11 -1
  45. package/dist/dashboard/template-design.js +209 -130
  46. package/dist/dashboard/template-design.mjs +210 -131
  47. package/dist/dashboard/template-ui.js +157 -55
  48. package/dist/dashboard/template-ui.mjs +158 -56
  49. package/dist/icons/flags.js +134 -0
  50. package/dist/icons/flags.mjs +115 -0
  51. package/dist/shared/carousel.js +14 -5
  52. package/dist/shared/carousel.mjs +14 -5
  53. package/package.json +11 -1
  54. package/types/bridge/form-subdomain.d.ts +13 -0
  55. package/types/bridge/lib/entry.d.ts +5 -0
  56. package/types/bridge/product-tile.d.ts +2 -0
  57. package/types/dashboard/campaign-share.d.ts +16 -0
  58. package/types/dashboard/form-organization-campaign-page.d.ts +8 -1
  59. package/types/dashboard/input-combobox.d.ts +2 -0
  60. package/types/dashboard/preview.d.ts +11 -3
  61. package/types/icons/flags.d.ts +5 -0
@@ -42,7 +42,7 @@ const useCampaignSwitch = ({ campaign, onError, onSuccess }) => {
42
42
  });
43
43
  };
44
44
  };
45
- const SwitchLock = ({ disabled, onChange, value }) => /* @__PURE__ */ jsxs(
45
+ const SwitchLock = ({ disabled, name, onChange, value }) => /* @__PURE__ */ jsxs(
46
46
  "span",
47
47
  {
48
48
  ...{
@@ -63,6 +63,8 @@ const SwitchLock = ({ disabled, onChange, value }) => /* @__PURE__ */ jsxs(
63
63
  InputSwitch,
64
64
  {
65
65
  ...{
66
+ // Impeccable audit, 2026-11-21: the switch is named for its row.
67
+ "aria-label": name,
66
68
  disabled,
67
69
  onChange,
68
70
  value
@@ -78,6 +80,7 @@ const SwitchRow = ({ description, lock, onChange, title, value }) => {
78
80
  {
79
81
  ...{
80
82
  disabled: Boolean(lock),
83
+ name: typeof title === "string" ? title : void 0,
81
84
  onChange,
82
85
  value
83
86
  }
@@ -45,7 +45,7 @@ var import_tabs = __toESM(require("../shared/tabs"));
45
45
  var import_input_fields = require("./input-fields");
46
46
  var import_form_organization_campaign_design = require("./form-organization-campaign-design");
47
47
  var import_helpers = require("../shared/lib/helpers");
48
- const DESIGN = ["descriptions", "images", "style"];
48
+ const DESIGN = ["style"];
49
49
  const FormOrganizationCampaignPageEdit = ({
50
50
  disabled,
51
51
  onError,
@@ -53,6 +53,15 @@ const FormOrganizationCampaignPageEdit = ({
53
53
  onUpdate,
54
54
  organization,
55
55
  tabs,
56
+ // @story campaigns/design
57
+ // The Design page ( Darren, 2026-11-20 ): the main page's Logo and Preview
58
+ // image under its Gallery, saved to the campaign's design. With `tabs` too, its
59
+ // Style tab is in this form, so one Save sends both tabs ( Darren, 2026-11-21 ).
60
+ // `brand`, the linked one, sets the images and the style: the images lock and
61
+ // the Style tab shows `linked` in place of its fields.
62
+ brand,
63
+ images,
64
+ linked,
56
65
  values = {}
57
66
  }) => {
58
67
  var _a;
@@ -73,9 +82,11 @@ const FormOrganizationCampaignPageEdit = ({
73
82
  })
74
83
  ),
75
84
  headline: import_yup.default.string().label("Headline").required().max(150),
85
+ // Code review, 2026-11-21: no style to check while a linked brand sets
86
+ // it, so a refused Save never opens a Style tab with nothing to fix.
76
87
  ...tabs && {
77
88
  ...import_input_fields.schemas.images(),
78
- ...import_input_fields.schemas.style()
89
+ ...!(images && brand) && import_input_fields.schemas.style()
79
90
  },
80
91
  // @story ab-tests/variants
81
92
  // A variant's Title renames it in its test; a page has none of its own.
@@ -100,7 +111,7 @@ const FormOrganizationCampaignPageEdit = ({
100
111
  title
101
112
  } = form;
102
113
  try {
103
- const own = tabs ? (0, import_form_organization_campaign_design.designBody)(form) : null;
114
+ const own = tabs && !images ? (0, import_form_organization_campaign_design.designBody)(form) : null;
104
115
  const args = {
105
116
  body: {
106
117
  description,
@@ -127,8 +138,28 @@ const FormOrganizationCampaignPageEdit = ({
127
138
  method: "PUT"
128
139
  };
129
140
  const response = await (0, import_fetch.request)(args);
141
+ let designed = null;
142
+ if (images && !brand) {
143
+ try {
144
+ designed = await (0, import_fetch.request)({
145
+ body: (0, import_form_organization_campaign_design.designBody)({
146
+ descriptions: form.descriptions,
147
+ images: form.images,
148
+ style: tabs ? form.style : values == null ? void 0 : values.style
149
+ }),
150
+ endpoint: "/organization/" + (values == null ? void 0 : values.organization) + "/campaign/" + (values == null ? void 0 : values.campaign) + "/design",
151
+ method: "PUT"
152
+ });
153
+ } catch (error) {
154
+ onSuccess(response);
155
+ onError(error);
156
+ return;
157
+ }
158
+ ;
159
+ }
160
+ ;
130
161
  reset(getValues());
131
- onSuccess(response);
162
+ onSuccess(designed || response);
132
163
  } catch (error) {
133
164
  onError(error);
134
165
  }
@@ -151,55 +182,56 @@ const FormOrganizationCampaignPageEdit = ({
151
182
  )
152
183
  }
153
184
  ),
154
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
185
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
155
186
  import_fieldset.default,
156
187
  {
157
188
  ...{
158
189
  disabled: disabled || (formState == null ? void 0 : formState.isSubmitting)
159
190
  },
160
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
161
- import_input_fields.InputFieldsMedia,
162
- {
163
- ...{
164
- onUpdate,
165
- organization,
166
- values
191
+ children: [
192
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
193
+ import_input_fields.InputFieldsMedia,
194
+ {
195
+ ...{
196
+ onUpdate,
197
+ organization,
198
+ values
199
+ }
167
200
  }
168
- }
169
- )
201
+ ),
202
+ (tabs || images) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
203
+ import_input_fields.InputFieldsImages,
204
+ {
205
+ ...{
206
+ described: true,
207
+ locked: images ? brand : void 0,
208
+ onUpdate,
209
+ organization,
210
+ preview: Boolean(images),
211
+ values
212
+ }
213
+ }
214
+ )
215
+ ]
170
216
  }
171
217
  )
172
218
  ] });
173
- const look = tabs && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
219
+ const look = tabs && (images && brand ? linked : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
174
220
  import_fieldset.default,
175
221
  {
176
222
  ...{
177
223
  disabled: disabled || (formState == null ? void 0 : formState.isSubmitting)
178
224
  },
179
- children: [
180
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
181
- import_input_fields.InputFieldsImages,
182
- {
183
- ...{
184
- described: true,
185
- onUpdate,
186
- organization,
187
- preview: false,
188
- values
189
- }
190
- }
191
- ),
192
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
193
- import_input_fields.InputFieldsStyle,
194
- {
195
- ...{
196
- onUpdate
197
- }
225
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
226
+ import_input_fields.InputFieldsStyle,
227
+ {
228
+ ...{
229
+ onUpdate
198
230
  }
199
- )
200
- ]
231
+ }
232
+ )
201
233
  }
202
- ) });
234
+ ) }));
203
235
  const refocus = (0, import_react.useRef)(false);
204
236
  (0, import_react.useEffect)(() => {
205
237
  var _a2, _b;
@@ -271,8 +303,10 @@ const FormOrganizationCampaignPageEdit = ({
271
303
  {
272
304
  title: "Content"
273
305
  },
306
+ // Style, not Design: the campaign's page that holds these tabs is
307
+ // called Design ( Darren, 2026-11-20 ).
274
308
  {
275
- title: "Design"
309
+ title: "Style"
276
310
  }
277
311
  ],
278
312
  onChange: setTab,
@@ -282,7 +316,7 @@ const FormOrganizationCampaignPageEdit = ({
282
316
  }
283
317
  }
284
318
  ) : content,
285
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
319
+ !(images && brand && tab === 1) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
286
320
  import_fieldset.default,
287
321
  {
288
322
  ...{
@@ -13,7 +13,7 @@ import Tabs from "../shared/tabs.mjs";
13
13
  import { InputFieldsDetails, InputFieldsImages, InputFieldsMedia, InputFieldsStyle, schemas } from "./input-fields.mjs";
14
14
  import { designBody } from "./form-organization-campaign-design.mjs";
15
15
  import { galleryItems, galleryValue } from "../shared/lib/helpers.mjs";
16
- const DESIGN = ["descriptions", "images", "style"];
16
+ const DESIGN = ["style"];
17
17
  const FormOrganizationCampaignPageEdit = ({
18
18
  disabled,
19
19
  onError,
@@ -21,6 +21,15 @@ const FormOrganizationCampaignPageEdit = ({
21
21
  onUpdate,
22
22
  organization,
23
23
  tabs,
24
+ // @story campaigns/design
25
+ // The Design page ( Darren, 2026-11-20 ): the main page's Logo and Preview
26
+ // image under its Gallery, saved to the campaign's design. With `tabs` too, its
27
+ // Style tab is in this form, so one Save sends both tabs ( Darren, 2026-11-21 ).
28
+ // `brand`, the linked one, sets the images and the style: the images lock and
29
+ // the Style tab shows `linked` in place of its fields.
30
+ brand,
31
+ images,
32
+ linked,
24
33
  values = {}
25
34
  }) => {
26
35
  var _a;
@@ -41,9 +50,11 @@ const FormOrganizationCampaignPageEdit = ({
41
50
  })
42
51
  ),
43
52
  headline: yup.string().label("Headline").required().max(150),
53
+ // Code review, 2026-11-21: no style to check while a linked brand sets
54
+ // it, so a refused Save never opens a Style tab with nothing to fix.
44
55
  ...tabs && {
45
56
  ...schemas.images(),
46
- ...schemas.style()
57
+ ...!(images && brand) && schemas.style()
47
58
  },
48
59
  // @story ab-tests/variants
49
60
  // A variant's Title renames it in its test; a page has none of its own.
@@ -68,7 +79,7 @@ const FormOrganizationCampaignPageEdit = ({
68
79
  title
69
80
  } = form;
70
81
  try {
71
- const own = tabs ? designBody(form) : null;
82
+ const own = tabs && !images ? designBody(form) : null;
72
83
  const args = {
73
84
  body: {
74
85
  description,
@@ -95,8 +106,28 @@ const FormOrganizationCampaignPageEdit = ({
95
106
  method: "PUT"
96
107
  };
97
108
  const response = await request(args);
109
+ let designed = null;
110
+ if (images && !brand) {
111
+ try {
112
+ designed = await request({
113
+ body: designBody({
114
+ descriptions: form.descriptions,
115
+ images: form.images,
116
+ style: tabs ? form.style : values == null ? void 0 : values.style
117
+ }),
118
+ endpoint: "/organization/" + (values == null ? void 0 : values.organization) + "/campaign/" + (values == null ? void 0 : values.campaign) + "/design",
119
+ method: "PUT"
120
+ });
121
+ } catch (error) {
122
+ onSuccess(response);
123
+ onError(error);
124
+ return;
125
+ }
126
+ ;
127
+ }
128
+ ;
98
129
  reset(getValues());
99
- onSuccess(response);
130
+ onSuccess(designed || response);
100
131
  } catch (error) {
101
132
  onError(error);
102
133
  }
@@ -119,55 +150,56 @@ const FormOrganizationCampaignPageEdit = ({
119
150
  )
120
151
  }
121
152
  ),
122
- /* @__PURE__ */ jsx(
153
+ /* @__PURE__ */ jsxs(
123
154
  Fieldset,
124
155
  {
125
156
  ...{
126
157
  disabled: disabled || (formState == null ? void 0 : formState.isSubmitting)
127
158
  },
128
- children: /* @__PURE__ */ jsx(
129
- InputFieldsMedia,
130
- {
131
- ...{
132
- onUpdate,
133
- organization,
134
- values
159
+ children: [
160
+ /* @__PURE__ */ jsx(
161
+ InputFieldsMedia,
162
+ {
163
+ ...{
164
+ onUpdate,
165
+ organization,
166
+ values
167
+ }
135
168
  }
136
- }
137
- )
169
+ ),
170
+ (tabs || images) && /* @__PURE__ */ jsx(
171
+ InputFieldsImages,
172
+ {
173
+ ...{
174
+ described: true,
175
+ locked: images ? brand : void 0,
176
+ onUpdate,
177
+ organization,
178
+ preview: Boolean(images),
179
+ values
180
+ }
181
+ }
182
+ )
183
+ ]
138
184
  }
139
185
  )
140
186
  ] });
141
- const look = tabs && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
187
+ const look = tabs && (images && brand ? linked : /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
142
188
  Fieldset,
143
189
  {
144
190
  ...{
145
191
  disabled: disabled || (formState == null ? void 0 : formState.isSubmitting)
146
192
  },
147
- children: [
148
- /* @__PURE__ */ jsx(
149
- InputFieldsImages,
150
- {
151
- ...{
152
- described: true,
153
- onUpdate,
154
- organization,
155
- preview: false,
156
- values
157
- }
158
- }
159
- ),
160
- /* @__PURE__ */ jsx(
161
- InputFieldsStyle,
162
- {
163
- ...{
164
- onUpdate
165
- }
193
+ children: /* @__PURE__ */ jsx(
194
+ InputFieldsStyle,
195
+ {
196
+ ...{
197
+ onUpdate
166
198
  }
167
- )
168
- ]
199
+ }
200
+ )
169
201
  }
170
- ) });
202
+ ) }));
171
203
  const refocus = useRef(false);
172
204
  useEffect(() => {
173
205
  var _a2, _b;
@@ -239,8 +271,10 @@ const FormOrganizationCampaignPageEdit = ({
239
271
  {
240
272
  title: "Content"
241
273
  },
274
+ // Style, not Design: the campaign's page that holds these tabs is
275
+ // called Design ( Darren, 2026-11-20 ).
242
276
  {
243
- title: "Design"
277
+ title: "Style"
244
278
  }
245
279
  ],
246
280
  onChange: setTab,
@@ -250,7 +284,7 @@ const FormOrganizationCampaignPageEdit = ({
250
284
  }
251
285
  }
252
286
  ) : content,
253
- /* @__PURE__ */ jsx(
287
+ !(images && brand && tab === 1) && /* @__PURE__ */ jsx(
254
288
  Fieldset,
255
289
  {
256
290
  ...{
@@ -40,6 +40,9 @@ var import_card_asset = __toESM(require("../shared/card-asset"));
40
40
  var import_badge = __toESM(require("../shared/badge"));
41
41
  var import_button = __toESM(require("../shared/button"));
42
42
  const InputCombobox = ({
43
+ // The name a reader hears when no visible label names it ( Impeccable audit,
44
+ // 2026-11-21: the font row's weight and letter case ).
45
+ "aria-label": name,
43
46
  disabled = false,
44
47
  onChange,
45
48
  options,
@@ -202,6 +205,9 @@ const InputCombobox = ({
202
205
  import_react2.ComboboxInput,
203
206
  {
204
207
  ...{
208
+ ...name && {
209
+ "aria-label": name
210
+ },
205
211
  autoComplete: "off",
206
212
  className: [
207
213
  "input w-full pr-9 focus:outline-hidden focus:ring-0 focus-visible:outline-hidden focus-visible:ring-0",
@@ -14,6 +14,9 @@ import CardAsset from "../shared/card-asset.mjs";
14
14
  import Badge from "../shared/badge.mjs";
15
15
  import Button from "../shared/button.mjs";
16
16
  const InputCombobox = ({
17
+ // The name a reader hears when no visible label names it ( Impeccable audit,
18
+ // 2026-11-21: the font row's weight and letter case ).
19
+ "aria-label": name,
17
20
  disabled = false,
18
21
  onChange,
19
22
  options,
@@ -176,6 +179,9 @@ const InputCombobox = ({
176
179
  ComboboxInput,
177
180
  {
178
181
  ...{
182
+ ...name && {
183
+ "aria-label": name
184
+ },
179
185
  autoComplete: "off",
180
186
  className: [
181
187
  "input w-full pr-9 focus:outline-hidden focus:ring-0 focus-visible:outline-hidden focus-visible:ring-0",
@@ -59,6 +59,7 @@ var import_hooks = require("./lib/hooks");
59
59
  var import_divider = __toESM(require("../shared/divider"));
60
60
  var import_button = __toESM(require("../shared/button"));
61
61
  var import_map_pin = __toESM(require("../icons/map-pin"));
62
+ var import_lock = __toESM(require("../icons/lock"));
62
63
  var import_plus = __toESM(require("../icons/plus"));
63
64
  var import_trash = __toESM(require("../icons/trash"));
64
65
  var import_geo = require("./lib/geo");
@@ -749,10 +750,29 @@ const useDescriptions = (onUpdate) => {
749
750
  descriptions
750
751
  };
751
752
  };
752
- const InputFieldsImages = ({ described, organization, onUpdate, preview = true, values = {} }) => {
753
+ const InputFieldsImages = ({ described, locked, organization, onUpdate, preview = true, values = {} }) => {
753
754
  var _a, _b, _c, _d;
754
755
  const { control, formState, getValues } = (0, import_react_hook_form.useFormContext)();
755
756
  const { describe, descriptions } = useDescriptions(onUpdate);
757
+ const lock = locked && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
758
+ "span",
759
+ {
760
+ ...{
761
+ className: "flex items-center gap-1"
762
+ },
763
+ children: [
764
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
765
+ import_lock.default,
766
+ {
767
+ ...{
768
+ className: "w-4 h-4 shrink-0"
769
+ }
770
+ }
771
+ ),
772
+ "Set by the connected brand"
773
+ ]
774
+ }
775
+ );
756
776
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [
757
777
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
758
778
  import_react_hook_form.Controller,
@@ -777,6 +797,7 @@ const InputFieldsImages = ({ described, organization, onUpdate, preview = true,
777
797
  description: descriptions == null ? void 0 : descriptions.logo,
778
798
  onDescription: describe("logo")
779
799
  },
800
+ disabled: Boolean(locked),
780
801
  endpoint: "/organization/" + values.organization,
781
802
  onChange: (val) => {
782
803
  onChange(val);
@@ -788,7 +809,8 @@ const InputFieldsImages = ({ described, organization, onUpdate, preview = true,
788
809
  }
789
810
  }
790
811
  ),
791
- label: "Logo"
812
+ label: "Logo",
813
+ message: lock || void 0
792
814
  }
793
815
  }
794
816
  );
@@ -820,6 +842,7 @@ const InputFieldsImages = ({ described, organization, onUpdate, preview = true,
820
842
  description: descriptions == null ? void 0 : descriptions.preview,
821
843
  onDescription: describe("preview")
822
844
  },
845
+ disabled: Boolean(locked),
823
846
  endpoint: "/organization/" + values.organization,
824
847
  organization,
825
848
  onChange: (val) => {
@@ -832,7 +855,7 @@ const InputFieldsImages = ({ described, organization, onUpdate, preview = true,
832
855
  }
833
856
  ),
834
857
  label: "Preview image",
835
- message: "The image that is displayed in applications that support link previews"
858
+ message: lock || "The image that is displayed in applications that support link previews"
836
859
  }
837
860
  }
838
861
  );
@@ -20,6 +20,7 @@ import { useModal } from "./lib/hooks.mjs";
20
20
  import Divider from "../shared/divider.mjs";
21
21
  import Button from "../shared/button.mjs";
22
22
  import MapPin from "../icons/map-pin.mjs";
23
+ import Lock from "../icons/lock.mjs";
23
24
  import Plus from "../icons/plus.mjs";
24
25
  import Trash from "../icons/trash.mjs";
25
26
  const FormReposition = dynamic(() => import("./form-reposition.mjs"), { loading: () => /* @__PURE__ */ jsx(LoaderDynamic, {}), ssr: false });
@@ -710,10 +711,29 @@ const useDescriptions = (onUpdate) => {
710
711
  descriptions
711
712
  };
712
713
  };
713
- const InputFieldsImages = ({ described, organization, onUpdate, preview = true, values = {} }) => {
714
+ const InputFieldsImages = ({ described, locked, organization, onUpdate, preview = true, values = {} }) => {
714
715
  var _a, _b, _c, _d;
715
716
  const { control, formState, getValues } = useFormContext();
716
717
  const { describe, descriptions } = useDescriptions(onUpdate);
718
+ const lock = locked && /* @__PURE__ */ jsxs(
719
+ "span",
720
+ {
721
+ ...{
722
+ className: "flex items-center gap-1"
723
+ },
724
+ children: [
725
+ /* @__PURE__ */ jsx(
726
+ Lock,
727
+ {
728
+ ...{
729
+ className: "w-4 h-4 shrink-0"
730
+ }
731
+ }
732
+ ),
733
+ "Set by the connected brand"
734
+ ]
735
+ }
736
+ );
717
737
  return /* @__PURE__ */ jsxs(Fragment, { children: [
718
738
  /* @__PURE__ */ jsx(
719
739
  Controller,
@@ -738,6 +758,7 @@ const InputFieldsImages = ({ described, organization, onUpdate, preview = true,
738
758
  description: descriptions == null ? void 0 : descriptions.logo,
739
759
  onDescription: describe("logo")
740
760
  },
761
+ disabled: Boolean(locked),
741
762
  endpoint: "/organization/" + values.organization,
742
763
  onChange: (val) => {
743
764
  onChange(val);
@@ -749,7 +770,8 @@ const InputFieldsImages = ({ described, organization, onUpdate, preview = true,
749
770
  }
750
771
  }
751
772
  ),
752
- label: "Logo"
773
+ label: "Logo",
774
+ message: lock || void 0
753
775
  }
754
776
  }
755
777
  );
@@ -781,6 +803,7 @@ const InputFieldsImages = ({ described, organization, onUpdate, preview = true,
781
803
  description: descriptions == null ? void 0 : descriptions.preview,
782
804
  onDescription: describe("preview")
783
805
  },
806
+ disabled: Boolean(locked),
784
807
  endpoint: "/organization/" + values.organization,
785
808
  organization,
786
809
  onChange: (val) => {
@@ -793,7 +816,7 @@ const InputFieldsImages = ({ described, organization, onUpdate, preview = true,
793
816
  }
794
817
  ),
795
818
  label: "Preview image",
796
- message: "The image that is displayed in applications that support link previews"
819
+ message: lock || "The image that is displayed in applications that support link previews"
797
820
  }
798
821
  }
799
822
  );
@@ -485,6 +485,7 @@ const InputFont = ({
485
485
  import_input_combobox.default,
486
486
  {
487
487
  ...{
488
+ "aria-label": "Weight",
488
489
  disabled,
489
490
  onChange: (selectedValue) => {
490
491
  onChange({
@@ -501,6 +502,7 @@ const InputFont = ({
501
502
  import_input_combobox.default,
502
503
  {
503
504
  ...{
505
+ "aria-label": "Letter case",
504
506
  disabled,
505
507
  onChange: (selectedValue) => {
506
508
  onChange({
@@ -453,6 +453,7 @@ const InputFont = ({
453
453
  InputCombobox,
454
454
  {
455
455
  ...{
456
+ "aria-label": "Weight",
456
457
  disabled,
457
458
  onChange: (selectedValue) => {
458
459
  onChange({
@@ -469,6 +470,7 @@ const InputFont = ({
469
470
  InputCombobox,
470
471
  {
471
472
  ...{
473
+ "aria-label": "Letter case",
472
474
  disabled,
473
475
  onChange: (selectedValue) => {
474
476
  onChange({
@@ -31,6 +31,7 @@ __export(input_group_ai_exports, {
31
31
  });
32
32
  module.exports = __toCommonJS(input_group_ai_exports);
33
33
  var import_jsx_runtime = require("react/jsx-runtime");
34
+ var import_react = require("react");
34
35
  var import_react_query = require("@tanstack/react-query");
35
36
  var import_form_ai = require("./form-ai");
36
37
  var import_error = __toESM(require("../shared/error"));
@@ -50,6 +51,7 @@ const InputGroupAI = ({
50
51
  ...rest
51
52
  }) => {
52
53
  const queryClient = (0, import_react_query.useQueryClient)();
54
+ const id = (0, import_react.useId)();
53
55
  const classes = [
54
56
  "input-group"
55
57
  ];
@@ -80,13 +82,21 @@ const InputGroupAI = ({
80
82
  },
81
83
  children: [
82
84
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
83
- "label",
85
+ "div",
84
86
  {
85
87
  ...{
86
88
  className: "flex items-center justify-between"
87
89
  },
88
90
  children: [
89
- label,
91
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
92
+ "label",
93
+ {
94
+ ...{
95
+ htmlFor: id
96
+ },
97
+ children: label
98
+ }
99
+ ),
90
100
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
91
101
  import_button.default,
92
102
  {
@@ -128,7 +138,9 @@ const InputGroupAI = ({
128
138
  ]
129
139
  }
130
140
  ),
131
- input
141
+ (0, import_react.isValidElement)(input) ? (0, import_react.cloneElement)(input, {
142
+ id: input.props.id || id
143
+ }) : input
132
144
  ]
133
145
  }
134
146
  ),