@xola/ui-kit 2.0.0-82 → 2.0.0-83

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## Xola UI Kit
2
2
 
3
- React component library for the next generation of Xola apps. See a preview at https://ui.xola.io
3
+ Xola's React component library with Tailwind CSS for the next generation of Xola apps. See a preview at https://ui.xola.io
4
4
 
5
5
  ### Requirements
6
6
 
package/build/ui-kit.mjs CHANGED
@@ -7003,18 +7003,18 @@ rc.propTypes = {
7003
7003
  };
7004
7004
  const oc = {
7005
7005
  primary: "bg-primary",
7006
- secondary: "bg-secondary-dark",
7007
- success: "bg-success-dark",
7006
+ secondary: "bg-secondary",
7007
+ success: "bg-success",
7008
7008
  warning: "bg-warning",
7009
7009
  danger: "bg-danger",
7010
- caution: "bg-caution-dark"
7010
+ caution: "bg-caution"
7011
7011
  }, ac = {
7012
- small: "px-3 py-2 text-sm leading-3.5 shadow max-w-[200px]",
7013
- medium: "px-4 py-3 text-base leading-4 shadow-md max-w-[400px]",
7014
- large: "px-4 py-4 text-lg leading-4.5 shadow-lg max-w-xl"
7012
+ small: "px-3 py-2 text-sm leading-3.5 shadow max-w-50",
7013
+ medium: "px-4 py-3.5 text-base leading-4 shadow max-w-100",
7014
+ large: "px-4.5 py-4 text-md leading-4.5 shadow max-w-xl"
7015
7015
  }, ic = {
7016
7016
  duration: 3e3,
7017
- position: "top-right",
7017
+ position: "top-center",
7018
7018
  reverseOrder: !1
7019
7019
  }, qr = {
7020
7020
  show({ text: e, size: t = "medium", color: o = "success", className: a, canClose: r = !0, onClose: i, children: s, ...c }) {
@@ -7023,13 +7023,26 @@ const oc = {
7023
7023
  const d = qr.getStyles(o, t, a, r);
7024
7024
  ar.custom(qr.container.bind(this, e, d, r ? i : null), u);
7025
7025
  },
7026
+ primary(e, t) {
7027
+ this.show({ color: "primary", text: e, ...t });
7028
+ },
7029
+ secondary(e, t) {
7030
+ this.show({ color: "secondary", text: e, ...t });
7031
+ },
7032
+ success(e, t) {
7033
+ this.show({ color: "success", text: e, ...t });
7034
+ },
7035
+ warning(e, t) {
7036
+ this.show({ color: "warning", text: e, ...t });
7037
+ },
7038
+ caution(e, t) {
7039
+ this.show({ color: "caution", text: e, ...t });
7040
+ },
7041
+ danger(e, t) {
7042
+ this.show({ color: "danger", text: e, text: e, ...t });
7043
+ },
7026
7044
  getStyles(e, t, o) {
7027
- return C(
7028
- "flex opacity-90 ring-1 ring-black ring-opacity-5 rounded text-white pointer-events-auto",
7029
- oc[e],
7030
- ac[t],
7031
- o
7032
- );
7045
+ return C("flex text-white rounded pointer-events-auto", oc[e], ac[t], o);
7033
7046
  },
7034
7047
  container(e, t, o, a) {
7035
7048
  const r = (i) => o(i, a);
@@ -7039,19 +7052,19 @@ const oc = {
7039
7052
  show: a.visible,
7040
7053
  enter: "transition transform duration-500 ease-out",
7041
7054
  enterFrom: "-translate-y-full !opacity-0",
7042
- enterTo: "translate-y-0 !opacity-90",
7055
+ enterTo: "translate-y-0 !opacity-100",
7043
7056
  leave: "transition transform duration-500 ease-in",
7044
- leaveFrom: "!opacity-90",
7045
- leaveTo: "!opacity-0"
7057
+ leaveFrom: "!opacity-90 translate-y-0",
7058
+ leaveTo: "!opacity-0 -translate-y-full"
7046
7059
  }, /* @__PURE__ */ n.createElement("div", {
7047
7060
  key: a.id,
7048
7061
  className: t
7049
7062
  }, /* @__PURE__ */ n.createElement("div", {
7050
7063
  className: "w-full"
7051
- }, e), o ? /* @__PURE__ */ n.createElement("div", {
7052
- className: "flex cursor-pointer items-center justify-center pl-3 text-white hover:text-black",
7064
+ }, e), o && /* @__PURE__ */ n.createElement("div", {
7065
+ className: "flex cursor-pointer items-center justify-center pl-3 opacity-60 hover:opacity-100",
7053
7066
  onClick: r
7054
- }, /* @__PURE__ */ n.createElement(Ye, null)) : null));
7067
+ }, /* @__PURE__ */ n.createElement(Ye, null))));
7055
7068
  },
7056
7069
  dismiss(e) {
7057
7070
  ar.dismiss(e);