@aotearoan/neon
Version:
Neon is a lightweight design library of Vue 3 components with minimal dependencies.
91 lines (90 loc) • 2.24 kB
JavaScript
var R = Object.defineProperty;
var T = (p, o, h) => o in p ? R(p, o, { enumerable: !0, configurable: !0, writable: !0, value: h }) : p[o] = h;
var f = (p, o, h) => (T(p, typeof o != "symbol" ? o + "" : o, h), h);
import { NeonPosition as i } from "../enums/NeonPosition.es.js";
import { NeonDropdownPlacement as m } from "../enums/NeonDropdownPlacement.es.js";
const t = class t {
constructor(o, h, L) {
f(this, "placement");
f(this, "majorPlacement");
f(this, "minorPlacement");
this.placement = o, this.majorPlacement = h, this.minorPlacement = L;
}
static toNeonDropdownPlacementObject(o) {
return t.PLACEMENTS[o];
}
static flipMajor(o) {
return t.FLIP_MAJOR[o.placement];
}
static flipMinor(o) {
return t.FLIP_MINOR[o.placement];
}
static flip(o) {
return t.flipMinor(t.flipMajor(o));
}
};
f(t, "TopLeft", new t(
m.TopLeft,
i.Top,
i.Left
)), f(t, "TopRight", new t(
m.TopRight,
i.Top,
i.Right
)), f(t, "BottomLeft", new t(
m.BottomLeft,
i.Bottom,
i.Left
)), f(t, "BottomRight", new t(
m.BottomRight,
i.Bottom,
i.Right
)), f(t, "LeftTop", new t(
m.LeftTop,
i.Left,
i.Top
)), f(t, "LeftBottom", new t(
m.LeftBottom,
i.Left,
i.Bottom
)), f(t, "RightTop", new t(
m.RightTop,
i.Right,
i.Top
)), f(t, "RightBottom", new t(
m.RightBottom,
i.Right,
i.Bottom
)), f(t, "PLACEMENTS", {
"top-left": t.TopLeft,
"top-right": t.TopRight,
"bottom-left": t.BottomLeft,
"bottom-right": t.BottomRight,
"left-top": t.LeftTop,
"left-bottom": t.LeftBottom,
"right-top": t.RightTop,
"right-bottom": t.RightBottom
}), f(t, "FLIP_MAJOR", {
"top-left": t.BottomLeft,
"top-right": t.BottomRight,
"bottom-left": t.TopLeft,
"bottom-right": t.TopRight,
"left-top": t.RightTop,
"left-bottom": t.RightBottom,
"right-top": t.LeftTop,
"right-bottom": t.LeftBottom
}), f(t, "FLIP_MINOR", {
"top-left": t.TopRight,
"top-right": t.TopLeft,
"bottom-left": t.BottomRight,
"bottom-right": t.BottomLeft,
"left-top": t.LeftBottom,
"left-bottom": t.LeftTop,
"right-top": t.RightBottom,
"right-bottom": t.RightTop
});
let g = t;
export {
g as NeonDropdownPlacementObject
};
//# sourceMappingURL=NeonDropdownPlacementObject.es.js.map