aio-popup 6.0.2 → 6.0.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/index.css CHANGED
@@ -148,7 +148,7 @@
148
148
  background: #fff;
149
149
  color: #323130;
150
150
  padding: 6px 12px;
151
- font-size: 16px;
151
+ font-size: 14px;
152
152
  font-weight: bold;
153
153
  min-height: 36px;
154
154
  gap: 12px;
@@ -814,7 +814,7 @@
814
814
  } */
815
815
  .aio-loading {
816
816
  z-index: 100000000000000000000000000000;
817
- position: absolute;
817
+ position: fixed;
818
818
  direction: ltr;
819
819
  width: 100%;
820
820
  height: 100%;
package/index.d.ts CHANGED
@@ -33,7 +33,7 @@ export type AP_modal = {
33
33
  setAttrs?: AP_setAttrs;
34
34
  };
35
35
  export type AP_alert = {
36
- align?: 'left' | 'right' | 'center';
36
+ rtl?: boolean;
37
37
  icon?: false | ReactNode;
38
38
  type: 'success' | 'error' | 'warning' | 'info';
39
39
  title?: ReactNode;
package/index.js CHANGED
@@ -155,7 +155,7 @@ const usePopup = (props) => {
155
155
  item.onClose();
156
156
  }
157
157
  };
158
- const addAlert = (obj) => Alert(obj);
158
+ const addAlert = (obj) => Alert(Object.assign({ rtl: props === null || props === void 0 ? void 0 : props.rtl }, obj));
159
159
  const addHighlight = (highlight) => setHighlight(highlight);
160
160
  const removeHighlight = () => setHighlight(undefined);
161
161
  const addConfirm = (obj) => {
@@ -516,7 +516,7 @@ const SnackebarBar = () => {
516
516
  return _jsx("div", { className: 'aio-popup-snackebar-bar', style: { transition: `${item.time || 8}s linear` } });
517
517
  };
518
518
  export function Alert(props) {
519
- let { icon, type = '', title = '', text = '', time = 10, className, closeText = 'Close', onClose, align = 'left' } = props;
519
+ let { icon, type = '', title = '', text = '', time = 10, className, closeText = 'Close', onClose, rtl } = props;
520
520
  let $$ = {
521
521
  id: '',
522
522
  time: 0,
@@ -536,7 +536,7 @@ export function Alert(props) {
536
536
  <div class='aio-popup-alert-header'>${$$.getIcon()}</div>
537
537
  <div class='aio-popup-alert-body aio-popup-scroll'>
538
538
  <div class='aio-popup-alert-title'>${ReactDOMServer.renderToStaticMarkup(title)}</div>
539
- <div class='aio-popup-alert-text' style="text-align:${align}">${text}</div>
539
+ <div class='aio-popup-alert-text' style="text-align:${rtl ? 'right' : 'left'}">${text}</div>
540
540
  </div>
541
541
  <div class='aio-popup-alert-footer'>
542
542
  <button class='aio-popup-alert-close ${$$.id}'>${closeText}</button>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aio-popup",
3
- "version": "6.0.2",
3
+ "version": "6.0.4",
4
4
  "description": "handle all types of popup and modals in react",
5
5
  "main": "index.js",
6
6
  "scripts": {