@fctc/sme-widget-ui 2.0.4 → 2.0.6

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
@@ -17020,7 +17020,7 @@ var BinaryField = (props) => {
17020
17020
  "label",
17021
17021
  {
17022
17022
  htmlFor: inputId,
17023
- className: `relative p-2 flex cursor-pointer items-center justify-center rounded-lg border border-gray-300 hover:border-primary bg-white transition-colors duration-300 ${readonly && "pointer-events-none"} ${onlyImage ? "h-32 w-32" : "w-fit h-fit "}`,
17023
+ className: `relative p-2 flex cursor-pointer items-center justify-center rounded-lg transition-colors duration-300 ${readonly && "pointer-events-none"} ${onlyImage ? "h-32 w-32 border border-gray-300 hover:border-primary bg-white" : "w-fit h-fit "}`,
17024
17024
  children: [
17025
17025
  /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
17026
17026
  "input",
@@ -17046,10 +17046,11 @@ var BinaryField = (props) => {
17046
17046
  /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
17047
17047
  "div",
17048
17048
  {
17049
- className: "absolute size-8 bg-white rounded-lg flex justify-center items-center z-20",
17049
+ className: " size-8 bg-white rounded-lg flex justify-center items-center z-20",
17050
17050
  style: {
17051
- bottom: "-8px",
17052
- left: "-8px",
17051
+ position: onlyImage ? "absolute" : "relative",
17052
+ bottom: onlyImage ? "-8px" : "auto",
17053
+ left: onlyImage ? "-8px" : "auto",
17053
17054
  boxShadow: "0 1px 2px 0 rgba(228, 229, 231, 0.24)",
17054
17055
  width: "2rem",
17055
17056
  height: "2rem",
@@ -33110,10 +33111,11 @@ var ToggleButtonField = (props) => {
33110
33111
  {
33111
33112
  style: {
33112
33113
  position: "absolute",
33113
- inset: 0
33114
+ inset: 0,
33115
+ backgroundColor: field.value ? "var(--color-primary)" : "#D1D5D8"
33114
33116
  },
33115
33117
  className: `rounded-full transition duration-300
33116
- ${field.value ? "bg-primary" : "bg-gray-300"}`,
33118
+ `,
33117
33119
  children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
33118
33120
  "span",
33119
33121
  {
package/dist/index.mjs CHANGED
@@ -16895,7 +16895,7 @@ var BinaryField = (props) => {
16895
16895
  "label",
16896
16896
  {
16897
16897
  htmlFor: inputId,
16898
- className: `relative p-2 flex cursor-pointer items-center justify-center rounded-lg border border-gray-300 hover:border-primary bg-white transition-colors duration-300 ${readonly && "pointer-events-none"} ${onlyImage ? "h-32 w-32" : "w-fit h-fit "}`,
16898
+ className: `relative p-2 flex cursor-pointer items-center justify-center rounded-lg transition-colors duration-300 ${readonly && "pointer-events-none"} ${onlyImage ? "h-32 w-32 border border-gray-300 hover:border-primary bg-white" : "w-fit h-fit "}`,
16899
16899
  children: [
16900
16900
  /* @__PURE__ */ jsx74(
16901
16901
  "input",
@@ -16921,10 +16921,11 @@ var BinaryField = (props) => {
16921
16921
  /* @__PURE__ */ jsx74(
16922
16922
  "div",
16923
16923
  {
16924
- className: "absolute size-8 bg-white rounded-lg flex justify-center items-center z-20",
16924
+ className: " size-8 bg-white rounded-lg flex justify-center items-center z-20",
16925
16925
  style: {
16926
- bottom: "-8px",
16927
- left: "-8px",
16926
+ position: onlyImage ? "absolute" : "relative",
16927
+ bottom: onlyImage ? "-8px" : "auto",
16928
+ left: onlyImage ? "-8px" : "auto",
16928
16929
  boxShadow: "0 1px 2px 0 rgba(228, 229, 231, 0.24)",
16929
16930
  width: "2rem",
16930
16931
  height: "2rem",
@@ -32985,10 +32986,11 @@ var ToggleButtonField = (props) => {
32985
32986
  {
32986
32987
  style: {
32987
32988
  position: "absolute",
32988
- inset: 0
32989
+ inset: 0,
32990
+ backgroundColor: field.value ? "var(--color-primary)" : "#D1D5D8"
32989
32991
  },
32990
32992
  className: `rounded-full transition duration-300
32991
- ${field.value ? "bg-primary" : "bg-gray-300"}`,
32993
+ `,
32992
32994
  children: /* @__PURE__ */ jsx105(
32993
32995
  "span",
32994
32996
  {
package/dist/widgets.js CHANGED
@@ -16273,7 +16273,7 @@ var BinaryField = (props) => {
16273
16273
  "label",
16274
16274
  {
16275
16275
  htmlFor: inputId,
16276
- className: `relative p-2 flex cursor-pointer items-center justify-center rounded-lg border border-gray-300 hover:border-primary bg-white transition-colors duration-300 ${readonly && "pointer-events-none"} ${onlyImage ? "h-32 w-32" : "w-fit h-fit "}`,
16276
+ className: `relative p-2 flex cursor-pointer items-center justify-center rounded-lg transition-colors duration-300 ${readonly && "pointer-events-none"} ${onlyImage ? "h-32 w-32 border border-gray-300 hover:border-primary bg-white" : "w-fit h-fit "}`,
16277
16277
  children: [
16278
16278
  /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
16279
16279
  "input",
@@ -16299,10 +16299,11 @@ var BinaryField = (props) => {
16299
16299
  /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
16300
16300
  "div",
16301
16301
  {
16302
- className: "absolute size-8 bg-white rounded-lg flex justify-center items-center z-20",
16302
+ className: " size-8 bg-white rounded-lg flex justify-center items-center z-20",
16303
16303
  style: {
16304
- bottom: "-8px",
16305
- left: "-8px",
16304
+ position: onlyImage ? "absolute" : "relative",
16305
+ bottom: onlyImage ? "-8px" : "auto",
16306
+ left: onlyImage ? "-8px" : "auto",
16306
16307
  boxShadow: "0 1px 2px 0 rgba(228, 229, 231, 0.24)",
16307
16308
  width: "2rem",
16308
16309
  height: "2rem",
@@ -32363,10 +32364,11 @@ var ToggleButtonField = (props) => {
32363
32364
  {
32364
32365
  style: {
32365
32366
  position: "absolute",
32366
- inset: 0
32367
+ inset: 0,
32368
+ backgroundColor: field.value ? "var(--color-primary)" : "#D1D5D8"
32367
32369
  },
32368
32370
  className: `rounded-full transition duration-300
32369
- ${field.value ? "bg-primary" : "bg-gray-300"}`,
32371
+ `,
32370
32372
  children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
32371
32373
  "span",
32372
32374
  {
package/dist/widgets.mjs CHANGED
@@ -16211,7 +16211,7 @@ var BinaryField = (props) => {
16211
16211
  "label",
16212
16212
  {
16213
16213
  htmlFor: inputId,
16214
- className: `relative p-2 flex cursor-pointer items-center justify-center rounded-lg border border-gray-300 hover:border-primary bg-white transition-colors duration-300 ${readonly && "pointer-events-none"} ${onlyImage ? "h-32 w-32" : "w-fit h-fit "}`,
16214
+ className: `relative p-2 flex cursor-pointer items-center justify-center rounded-lg transition-colors duration-300 ${readonly && "pointer-events-none"} ${onlyImage ? "h-32 w-32 border border-gray-300 hover:border-primary bg-white" : "w-fit h-fit "}`,
16215
16215
  children: [
16216
16216
  /* @__PURE__ */ jsx74(
16217
16217
  "input",
@@ -16237,10 +16237,11 @@ var BinaryField = (props) => {
16237
16237
  /* @__PURE__ */ jsx74(
16238
16238
  "div",
16239
16239
  {
16240
- className: "absolute size-8 bg-white rounded-lg flex justify-center items-center z-20",
16240
+ className: " size-8 bg-white rounded-lg flex justify-center items-center z-20",
16241
16241
  style: {
16242
- bottom: "-8px",
16243
- left: "-8px",
16242
+ position: onlyImage ? "absolute" : "relative",
16243
+ bottom: onlyImage ? "-8px" : "auto",
16244
+ left: onlyImage ? "-8px" : "auto",
16244
16245
  boxShadow: "0 1px 2px 0 rgba(228, 229, 231, 0.24)",
16245
16246
  width: "2rem",
16246
16247
  height: "2rem",
@@ -32301,10 +32302,11 @@ var ToggleButtonField = (props) => {
32301
32302
  {
32302
32303
  style: {
32303
32304
  position: "absolute",
32304
- inset: 0
32305
+ inset: 0,
32306
+ backgroundColor: field.value ? "var(--color-primary)" : "#D1D5D8"
32305
32307
  },
32306
32308
  className: `rounded-full transition duration-300
32307
- ${field.value ? "bg-primary" : "bg-gray-300"}`,
32309
+ `,
32308
32310
  children: /* @__PURE__ */ jsx105(
32309
32311
  "span",
32310
32312
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/sme-widget-ui",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",