@opensite/ui 1.9.2 → 1.9.3

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/registry.js CHANGED
@@ -14543,23 +14543,56 @@ function ContactDark({
14543
14543
  },
14544
14544
  className: cn("space-y-6", formClassName),
14545
14545
  children: [
14546
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-12 gap-6", children: formFields.map((field) => /* @__PURE__ */ jsx(
14547
- "div",
14548
- {
14549
- className: getColumnSpanClass(field.columnSpan),
14550
- children: /* @__PURE__ */ jsx(
14551
- DynamicFormField,
14546
+ /* @__PURE__ */ jsx("div", { className: "space-y-4", children: formFields.map((field, index) => {
14547
+ const prevField = index > 0 ? formFields[index - 1] : null;
14548
+ const shouldGroup = field.columnSpan && field.columnSpan <= 6 && prevField?.columnSpan && prevField.columnSpan <= 6 && prevField.columnSpan + field.columnSpan <= 12;
14549
+ if (shouldGroup && index > 0) {
14550
+ return null;
14551
+ }
14552
+ const nextField = index < formFields.length - 1 ? formFields[index + 1] : null;
14553
+ const groupWithNext = field.columnSpan && field.columnSpan <= 6 && nextField?.columnSpan && nextField.columnSpan <= 6 && field.columnSpan + nextField.columnSpan <= 12;
14554
+ if (groupWithNext && nextField) {
14555
+ return /* @__PURE__ */ jsxs(
14556
+ "div",
14552
14557
  {
14553
- field,
14554
- uploadProgress,
14555
- onFileUpload: uploadFiles,
14556
- onFileRemove: removeFile,
14557
- isUploading
14558
- }
14559
- )
14560
- },
14561
- field.name
14562
- )) }),
14558
+ className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
14559
+ children: [
14560
+ /* @__PURE__ */ jsx("div", { className: "min-h-[76px]", children: /* @__PURE__ */ jsx(
14561
+ DynamicFormField,
14562
+ {
14563
+ field,
14564
+ uploadProgress,
14565
+ onFileUpload: uploadFiles,
14566
+ onFileRemove: removeFile,
14567
+ isUploading
14568
+ }
14569
+ ) }),
14570
+ /* @__PURE__ */ jsx("div", { className: "min-h-[76px]", children: /* @__PURE__ */ jsx(
14571
+ DynamicFormField,
14572
+ {
14573
+ field: nextField,
14574
+ uploadProgress,
14575
+ onFileUpload: uploadFiles,
14576
+ onFileRemove: removeFile,
14577
+ isUploading
14578
+ }
14579
+ ) })
14580
+ ]
14581
+ },
14582
+ field.name
14583
+ );
14584
+ }
14585
+ return /* @__PURE__ */ jsx("div", { className: "min-h-[76px]", children: /* @__PURE__ */ jsx(
14586
+ DynamicFormField,
14587
+ {
14588
+ field,
14589
+ uploadProgress,
14590
+ onFileUpload: uploadFiles,
14591
+ onFileRemove: removeFile,
14592
+ isUploading
14593
+ }
14594
+ ) }, field.name);
14595
+ }) }),
14563
14596
  actionsSlot || actions && actions.length > 0 ? actionsContent : /* @__PURE__ */ jsxs(
14564
14597
  Pressable,
14565
14598
  {
@@ -15836,23 +15869,56 @@ function ContactFaq({
15836
15869
  },
15837
15870
  className: cn("space-y-4", formClassName),
15838
15871
  children: [
15839
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-12 gap-6", children: formFields.map((field) => /* @__PURE__ */ jsx(
15840
- "div",
15841
- {
15842
- className: getColumnSpanClass(field.columnSpan),
15843
- children: /* @__PURE__ */ jsx(
15844
- DynamicFormField,
15872
+ /* @__PURE__ */ jsx("div", { className: "space-y-4", children: formFields.map((field, index) => {
15873
+ const prevField = index > 0 ? formFields[index - 1] : null;
15874
+ const shouldGroup = field.columnSpan && field.columnSpan <= 6 && prevField?.columnSpan && prevField.columnSpan <= 6 && prevField.columnSpan + field.columnSpan <= 12;
15875
+ if (shouldGroup && index > 0) {
15876
+ return null;
15877
+ }
15878
+ const nextField = index < formFields.length - 1 ? formFields[index + 1] : null;
15879
+ const groupWithNext = field.columnSpan && field.columnSpan <= 6 && nextField?.columnSpan && nextField.columnSpan <= 6 && field.columnSpan + nextField.columnSpan <= 12;
15880
+ if (groupWithNext && nextField) {
15881
+ return /* @__PURE__ */ jsxs(
15882
+ "div",
15845
15883
  {
15846
- field,
15847
- uploadProgress,
15848
- onFileUpload: uploadFiles,
15849
- onFileRemove: removeFile,
15850
- isUploading
15851
- }
15852
- )
15853
- },
15854
- field.name
15855
- )) }),
15884
+ className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
15885
+ children: [
15886
+ /* @__PURE__ */ jsx("div", { className: "min-h-[76px]", children: /* @__PURE__ */ jsx(
15887
+ DynamicFormField,
15888
+ {
15889
+ field,
15890
+ uploadProgress,
15891
+ onFileUpload: uploadFiles,
15892
+ onFileRemove: removeFile,
15893
+ isUploading
15894
+ }
15895
+ ) }),
15896
+ /* @__PURE__ */ jsx("div", { className: "min-h-[76px]", children: /* @__PURE__ */ jsx(
15897
+ DynamicFormField,
15898
+ {
15899
+ field: nextField,
15900
+ uploadProgress,
15901
+ onFileUpload: uploadFiles,
15902
+ onFileRemove: removeFile,
15903
+ isUploading
15904
+ }
15905
+ ) })
15906
+ ]
15907
+ },
15908
+ field.name
15909
+ );
15910
+ }
15911
+ return /* @__PURE__ */ jsx("div", { className: "min-h-[76px]", children: /* @__PURE__ */ jsx(
15912
+ DynamicFormField,
15913
+ {
15914
+ field,
15915
+ uploadProgress,
15916
+ onFileUpload: uploadFiles,
15917
+ onFileRemove: removeFile,
15918
+ isUploading
15919
+ }
15920
+ ) }, field.name);
15921
+ }) }),
15856
15922
  actionsSlot || actions && actions.length > 0 ? actionsContent : /* @__PURE__ */ jsxs(
15857
15923
  Pressable,
15858
15924
  {
@@ -18857,23 +18923,56 @@ function ContactPhotography({
18857
18923
  },
18858
18924
  className: cn("space-y-4", formClassName),
18859
18925
  children: [
18860
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-12 gap-6", children: formFields.map((field) => /* @__PURE__ */ jsx(
18861
- "div",
18862
- {
18863
- className: getColumnSpanClass(field.columnSpan),
18864
- children: /* @__PURE__ */ jsx(
18865
- DynamicFormField,
18926
+ /* @__PURE__ */ jsx("div", { className: "space-y-4", children: formFields.map((field, index) => {
18927
+ const prevField = index > 0 ? formFields[index - 1] : null;
18928
+ const shouldGroup = field.columnSpan && field.columnSpan <= 6 && prevField?.columnSpan && prevField.columnSpan <= 6 && prevField.columnSpan + field.columnSpan <= 12;
18929
+ if (shouldGroup && index > 0) {
18930
+ return null;
18931
+ }
18932
+ const nextField = index < formFields.length - 1 ? formFields[index + 1] : null;
18933
+ const groupWithNext = field.columnSpan && field.columnSpan <= 6 && nextField?.columnSpan && nextField.columnSpan <= 6 && field.columnSpan + nextField.columnSpan <= 12;
18934
+ if (groupWithNext && nextField) {
18935
+ return /* @__PURE__ */ jsxs(
18936
+ "div",
18866
18937
  {
18867
- field,
18868
- uploadProgress,
18869
- onFileUpload: uploadFiles,
18870
- onFileRemove: removeFile,
18871
- isUploading
18872
- }
18873
- )
18874
- },
18875
- field.name
18876
- )) }),
18938
+ className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
18939
+ children: [
18940
+ /* @__PURE__ */ jsx("div", { className: "min-h-[76px]", children: /* @__PURE__ */ jsx(
18941
+ DynamicFormField,
18942
+ {
18943
+ field,
18944
+ uploadProgress,
18945
+ onFileUpload: uploadFiles,
18946
+ onFileRemove: removeFile,
18947
+ isUploading
18948
+ }
18949
+ ) }),
18950
+ /* @__PURE__ */ jsx("div", { className: "min-h-[76px]", children: /* @__PURE__ */ jsx(
18951
+ DynamicFormField,
18952
+ {
18953
+ field: nextField,
18954
+ uploadProgress,
18955
+ onFileUpload: uploadFiles,
18956
+ onFileRemove: removeFile,
18957
+ isUploading
18958
+ }
18959
+ ) })
18960
+ ]
18961
+ },
18962
+ field.name
18963
+ );
18964
+ }
18965
+ return /* @__PURE__ */ jsx("div", { className: "min-h-[76px]", children: /* @__PURE__ */ jsx(
18966
+ DynamicFormField,
18967
+ {
18968
+ field,
18969
+ uploadProgress,
18970
+ onFileUpload: uploadFiles,
18971
+ onFileRemove: removeFile,
18972
+ isUploading
18973
+ }
18974
+ ) }, field.name);
18975
+ }) }),
18877
18976
  actionsSlot || actions && actions.length > 0 ? actionsContent : /* @__PURE__ */ jsxs(
18878
18977
  Pressable,
18879
18978
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opensite/ui",
3
- "version": "1.9.2",
3
+ "version": "1.9.3",
4
4
  "description": "Foundational UI component library for OpenSite Semantic Site Builder with tree-shakable exports and abstract styling",
5
5
  "keywords": [
6
6
  "react",