melonykit 1.1.3 → 1.1.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.
Files changed (2) hide show
  1. package/dist/index.js +35 -13
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1032,11 +1032,11 @@ var Dt = bt`
1032
1032
  };
1033
1033
  //#endregion
1034
1034
  //#region src/components/_popup-box.jsx
1035
- function kt({ className: e, trigger: t, children: n, isOpen: r = !1, origin: i = "center", width: a }) {
1035
+ function kt({ className: e, trigger: t, children: n, isOpen: r = !1, origin: i = "bottom", width: a }) {
1036
1036
  return /* @__PURE__ */ l(c, { children: /* @__PURE__ */ u("div", {
1037
1037
  className: At.base,
1038
1038
  children: [t, r && /* @__PURE__ */ l(c, { children: /* @__PURE__ */ l("div", {
1039
- className: D(At.popup, At[i] ?? At.center, e),
1039
+ className: D(At.popup, At[i.replace(/-([a-z])/g, (e, t) => t.toUpperCase())] ?? At.center, e),
1040
1040
  style: { width: a },
1041
1041
  children: n
1042
1042
  }) })]
@@ -1050,7 +1050,6 @@ var At = {
1050
1050
  popup: O`
1051
1051
  position: absolute;
1052
1052
  z-index: ${k.zIndex.front + 1};
1053
- top: calc(100% + .5rem);
1054
1053
  min-width: 100%;
1055
1054
  width: max-content;
1056
1055
  max-width: calc(100vw - 2rem);
@@ -1063,22 +1062,45 @@ var At = {
1063
1062
  font-family: ${k.fontFamily}, sans-serif;
1064
1063
  `,
1065
1064
  center: O`
1065
+ top: calc(100% + .5rem);
1066
1066
  left: 50%;
1067
1067
  transform: translateX(-50%);
1068
1068
  `,
1069
1069
  left: O`
1070
- left: 0;
1070
+ top: 50%;
1071
+ right: calc(100% + .5rem);
1072
+ transform: translateY(-50%);
1071
1073
  `,
1072
1074
  right: O`
1075
+ top: 50%;
1076
+ left: calc(100% + .5rem);
1077
+ transform: translateY(-50%);
1078
+ `,
1079
+ topLeft: O`
1080
+ bottom: calc(100% + .5rem);
1081
+ left: 0;
1082
+ `,
1083
+ top: O`
1084
+ bottom: calc(100% + .5rem);
1085
+ left: 50%;
1086
+ transform: translateX(-50%);
1087
+ `,
1088
+ topRight: O`
1073
1089
  right: 0;
1090
+ bottom: calc(100% + .5rem);
1091
+ `,
1092
+ bottomLeft: O`
1093
+ top: calc(100% + .5rem);
1094
+ left: 0;
1074
1095
  `,
1075
- leftSide: O`
1076
- top: 0;
1077
- right: calc(100% + 1rem);
1096
+ bottom: O`
1097
+ top: calc(100% + .5rem);
1098
+ left: 50%;
1099
+ transform: translateX(-50%);
1078
1100
  `,
1079
- rightSide: O`
1080
- top: 0;
1081
- left: calc(100% + 1rem);
1101
+ bottomRight: O`
1102
+ top: calc(100% + .5rem);
1103
+ right: 0;
1082
1104
  `
1083
1105
  };
1084
1106
  //#endregion
@@ -1117,7 +1139,7 @@ function Mt({ item: e }) {
1117
1139
  onClick: d
1118
1140
  }),
1119
1141
  isOpen: n.value,
1120
- origin: "right",
1142
+ origin: "bottom-right",
1121
1143
  children: r.map((e, t) => /* @__PURE__ */ u("button", {
1122
1144
  type: "button",
1123
1145
  className: Nt.option,
@@ -1702,7 +1724,7 @@ function en({ items: e = [], value: t, width: n, isDisabled: r = !1, onChange: o
1702
1724
  className: tn.popup,
1703
1725
  trigger: b,
1704
1726
  isOpen: m.value,
1705
- origin: "left",
1727
+ origin: "bottom-left",
1706
1728
  children: e.map((e) => /* @__PURE__ */ l("button", {
1707
1729
  type: "button",
1708
1730
  className: tn.option,
@@ -2660,7 +2682,7 @@ function On({ id: e, settings: n, headerContent: r, title: o, description: d, co
2660
2682
  }
2661
2683
  }),
2662
2684
  isOpen: S.value,
2663
- origin: "right",
2685
+ origin: "bottom-right",
2664
2686
  children: f.map((e) => /* @__PURE__ */ l(sn, {
2665
2687
  label: e.label ?? e.key,
2666
2688
  isChecked: C.value[e.key] !== !1,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Vadim Hermann",
3
3
  "name": "melonykit",
4
- "version": "1.1.3",
4
+ "version": "1.1.4",
5
5
  "type": "module",
6
6
  "description": "Preact based ui and utility functions toolkit",
7
7
  "main": "./dist/index.js",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@pivanov/vite-plugin-svg-sprite": "3.1.8",
43
- "@playwright/test": "1.64.0",
43
+ "@playwright/test": "1.64.1",
44
44
  "@preact/preset-vite": "2.10.6",
45
45
  "@preact/signals": "2.11.2",
46
46
  "@types/node": "26.6.5",