@fctc/sme-widget-ui 1.4.2 → 1.4.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/index.js CHANGED
@@ -33990,7 +33990,7 @@ var ToggleButtonField = (props) => {
33990
33990
  {
33991
33991
  name: name2 ?? "",
33992
33992
  control: methods?.control,
33993
- render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "inline-flex items-center w-[34px]", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("label", { className: "relative inline-block w-9 h-5 cursor-pointer", children: [
33993
+ render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "inline-flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("label", { className: "relative inline-block w-8 h-5 cursor-pointer", children: [
33994
33994
  /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
33995
33995
  "input",
33996
33996
  {
@@ -34013,13 +34013,26 @@ var ToggleButtonField = (props) => {
34013
34013
  /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
34014
34014
  "span",
34015
34015
  {
34016
- className: `absolute top-0 left-0 right-0 bottom-0 rounded-full transition duration-300
34016
+ style: {
34017
+ position: "absolute",
34018
+ inset: 0
34019
+ },
34020
+ className: `rounded-full transition duration-300
34017
34021
  ${field.value ? "bg-primary" : "bg-gray-300"}`,
34018
34022
  children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
34019
34023
  "span",
34020
34024
  {
34021
- className: `absolute left-[2px] bottom-[2px] w-4 h-4 bg-white rounded-full transition duration-300
34022
- ${field.value ? "translate-x-4" : ""}`
34025
+ style: {
34026
+ position: "absolute",
34027
+ left: "2px",
34028
+ bottom: "2px",
34029
+ width: "16px",
34030
+ height: "16px",
34031
+ backgroundColor: "white",
34032
+ borderRadius: "9999px",
34033
+ transition: "transform 0.3s",
34034
+ transform: field.value ? "translateX(12px)" : "translateX(0)"
34035
+ }
34023
34036
  }
34024
34037
  )
34025
34038
  }
@@ -34399,7 +34412,7 @@ var Many2ManyField = (props) => {
34399
34412
  handleCheckBoxAll
34400
34413
  }
34401
34414
  ),
34402
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
34415
+ rows?.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
34403
34416
  TableBody,
34404
34417
  {
34405
34418
  tableGroupController,
@@ -34439,7 +34452,20 @@ var Many2ManyField = (props) => {
34439
34452
  checkedAll,
34440
34453
  context
34441
34454
  }
34442
- )
34455
+ ) : /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
34456
+ "td",
34457
+ {
34458
+ className: "w-full",
34459
+ colSpan: columns?.length + 2,
34460
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
34461
+ "div",
34462
+ {
34463
+ className: `flex flex-col items-center justify-center gap-3 py-6`,
34464
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(EmptyTable, {})
34465
+ }
34466
+ )
34467
+ }
34468
+ ) })
34443
34469
  ]
34444
34470
  }
34445
34471
  ) })
package/dist/index.mjs CHANGED
@@ -33871,7 +33871,7 @@ var ToggleButtonField = (props) => {
33871
33871
  {
33872
33872
  name: name2 ?? "",
33873
33873
  control: methods?.control,
33874
- render: ({ field }) => /* @__PURE__ */ jsx100("div", { className: "inline-flex items-center w-[34px]", children: /* @__PURE__ */ jsxs68("label", { className: "relative inline-block w-9 h-5 cursor-pointer", children: [
33874
+ render: ({ field }) => /* @__PURE__ */ jsx100("div", { className: "inline-flex items-center", children: /* @__PURE__ */ jsxs68("label", { className: "relative inline-block w-8 h-5 cursor-pointer", children: [
33875
33875
  /* @__PURE__ */ jsx100(
33876
33876
  "input",
33877
33877
  {
@@ -33894,13 +33894,26 @@ var ToggleButtonField = (props) => {
33894
33894
  /* @__PURE__ */ jsx100(
33895
33895
  "span",
33896
33896
  {
33897
- className: `absolute top-0 left-0 right-0 bottom-0 rounded-full transition duration-300
33897
+ style: {
33898
+ position: "absolute",
33899
+ inset: 0
33900
+ },
33901
+ className: `rounded-full transition duration-300
33898
33902
  ${field.value ? "bg-primary" : "bg-gray-300"}`,
33899
33903
  children: /* @__PURE__ */ jsx100(
33900
33904
  "span",
33901
33905
  {
33902
- className: `absolute left-[2px] bottom-[2px] w-4 h-4 bg-white rounded-full transition duration-300
33903
- ${field.value ? "translate-x-4" : ""}`
33906
+ style: {
33907
+ position: "absolute",
33908
+ left: "2px",
33909
+ bottom: "2px",
33910
+ width: "16px",
33911
+ height: "16px",
33912
+ backgroundColor: "white",
33913
+ borderRadius: "9999px",
33914
+ transition: "transform 0.3s",
33915
+ transform: field.value ? "translateX(12px)" : "translateX(0)"
33916
+ }
33904
33917
  }
33905
33918
  )
33906
33919
  }
@@ -34280,7 +34293,7 @@ var Many2ManyField = (props) => {
34280
34293
  handleCheckBoxAll
34281
34294
  }
34282
34295
  ),
34283
- /* @__PURE__ */ jsx103(
34296
+ rows?.length > 0 ? /* @__PURE__ */ jsx103(
34284
34297
  TableBody,
34285
34298
  {
34286
34299
  tableGroupController,
@@ -34320,7 +34333,20 @@ var Many2ManyField = (props) => {
34320
34333
  checkedAll,
34321
34334
  context
34322
34335
  }
34323
- )
34336
+ ) : /* @__PURE__ */ jsx103("tr", { children: /* @__PURE__ */ jsx103(
34337
+ "td",
34338
+ {
34339
+ className: "w-full",
34340
+ colSpan: columns?.length + 2,
34341
+ children: /* @__PURE__ */ jsx103(
34342
+ "div",
34343
+ {
34344
+ className: `flex flex-col items-center justify-center gap-3 py-6`,
34345
+ children: /* @__PURE__ */ jsx103(EmptyTable, {})
34346
+ }
34347
+ )
34348
+ }
34349
+ ) })
34324
34350
  ]
34325
34351
  }
34326
34352
  ) })
package/dist/widgets.js CHANGED
@@ -33616,7 +33616,7 @@ var ToggleButtonField = (props) => {
33616
33616
  {
33617
33617
  name: name2 ?? "",
33618
33618
  control: methods?.control,
33619
- render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "inline-flex items-center w-[34px]", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("label", { className: "relative inline-block w-9 h-5 cursor-pointer", children: [
33619
+ render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "inline-flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("label", { className: "relative inline-block w-8 h-5 cursor-pointer", children: [
33620
33620
  /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
33621
33621
  "input",
33622
33622
  {
@@ -33639,13 +33639,26 @@ var ToggleButtonField = (props) => {
33639
33639
  /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
33640
33640
  "span",
33641
33641
  {
33642
- className: `absolute top-0 left-0 right-0 bottom-0 rounded-full transition duration-300
33642
+ style: {
33643
+ position: "absolute",
33644
+ inset: 0
33645
+ },
33646
+ className: `rounded-full transition duration-300
33643
33647
  ${field.value ? "bg-primary" : "bg-gray-300"}`,
33644
33648
  children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
33645
33649
  "span",
33646
33650
  {
33647
- className: `absolute left-[2px] bottom-[2px] w-4 h-4 bg-white rounded-full transition duration-300
33648
- ${field.value ? "translate-x-4" : ""}`
33651
+ style: {
33652
+ position: "absolute",
33653
+ left: "2px",
33654
+ bottom: "2px",
33655
+ width: "16px",
33656
+ height: "16px",
33657
+ backgroundColor: "white",
33658
+ borderRadius: "9999px",
33659
+ transition: "transform 0.3s",
33660
+ transform: field.value ? "translateX(12px)" : "translateX(0)"
33661
+ }
33649
33662
  }
33650
33663
  )
33651
33664
  }
@@ -34025,7 +34038,7 @@ var Many2ManyField = (props) => {
34025
34038
  handleCheckBoxAll
34026
34039
  }
34027
34040
  ),
34028
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
34041
+ rows?.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
34029
34042
  TableBody,
34030
34043
  {
34031
34044
  tableGroupController,
@@ -34065,7 +34078,20 @@ var Many2ManyField = (props) => {
34065
34078
  checkedAll,
34066
34079
  context
34067
34080
  }
34068
- )
34081
+ ) : /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
34082
+ "td",
34083
+ {
34084
+ className: "w-full",
34085
+ colSpan: columns?.length + 2,
34086
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
34087
+ "div",
34088
+ {
34089
+ className: `flex flex-col items-center justify-center gap-3 py-6`,
34090
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(EmptyTable, {})
34091
+ }
34092
+ )
34093
+ }
34094
+ ) })
34069
34095
  ]
34070
34096
  }
34071
34097
  ) })
package/dist/widgets.mjs CHANGED
@@ -33553,7 +33553,7 @@ var ToggleButtonField = (props) => {
33553
33553
  {
33554
33554
  name: name2 ?? "",
33555
33555
  control: methods?.control,
33556
- render: ({ field }) => /* @__PURE__ */ jsx100("div", { className: "inline-flex items-center w-[34px]", children: /* @__PURE__ */ jsxs68("label", { className: "relative inline-block w-9 h-5 cursor-pointer", children: [
33556
+ render: ({ field }) => /* @__PURE__ */ jsx100("div", { className: "inline-flex items-center", children: /* @__PURE__ */ jsxs68("label", { className: "relative inline-block w-8 h-5 cursor-pointer", children: [
33557
33557
  /* @__PURE__ */ jsx100(
33558
33558
  "input",
33559
33559
  {
@@ -33576,13 +33576,26 @@ var ToggleButtonField = (props) => {
33576
33576
  /* @__PURE__ */ jsx100(
33577
33577
  "span",
33578
33578
  {
33579
- className: `absolute top-0 left-0 right-0 bottom-0 rounded-full transition duration-300
33579
+ style: {
33580
+ position: "absolute",
33581
+ inset: 0
33582
+ },
33583
+ className: `rounded-full transition duration-300
33580
33584
  ${field.value ? "bg-primary" : "bg-gray-300"}`,
33581
33585
  children: /* @__PURE__ */ jsx100(
33582
33586
  "span",
33583
33587
  {
33584
- className: `absolute left-[2px] bottom-[2px] w-4 h-4 bg-white rounded-full transition duration-300
33585
- ${field.value ? "translate-x-4" : ""}`
33588
+ style: {
33589
+ position: "absolute",
33590
+ left: "2px",
33591
+ bottom: "2px",
33592
+ width: "16px",
33593
+ height: "16px",
33594
+ backgroundColor: "white",
33595
+ borderRadius: "9999px",
33596
+ transition: "transform 0.3s",
33597
+ transform: field.value ? "translateX(12px)" : "translateX(0)"
33598
+ }
33586
33599
  }
33587
33600
  )
33588
33601
  }
@@ -33962,7 +33975,7 @@ var Many2ManyField = (props) => {
33962
33975
  handleCheckBoxAll
33963
33976
  }
33964
33977
  ),
33965
- /* @__PURE__ */ jsx103(
33978
+ rows?.length > 0 ? /* @__PURE__ */ jsx103(
33966
33979
  TableBody,
33967
33980
  {
33968
33981
  tableGroupController,
@@ -34002,7 +34015,20 @@ var Many2ManyField = (props) => {
34002
34015
  checkedAll,
34003
34016
  context
34004
34017
  }
34005
- )
34018
+ ) : /* @__PURE__ */ jsx103("tr", { children: /* @__PURE__ */ jsx103(
34019
+ "td",
34020
+ {
34021
+ className: "w-full",
34022
+ colSpan: columns?.length + 2,
34023
+ children: /* @__PURE__ */ jsx103(
34024
+ "div",
34025
+ {
34026
+ className: `flex flex-col items-center justify-center gap-3 py-6`,
34027
+ children: /* @__PURE__ */ jsx103(EmptyTable, {})
34028
+ }
34029
+ )
34030
+ }
34031
+ ) })
34006
34032
  ]
34007
34033
  }
34008
34034
  ) })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/sme-widget-ui",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",