@sito/ui 0.0.202 → 0.1.0
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/components/Button/index.d.ts +1 -1
- package/dist/components/InputControl/index.d.ts +1 -1
- package/dist/components/Notification/Notification.d.ts +2 -1
- package/dist/components/index.d.ts +10 -12
- package/dist/hooks/index.d.ts +2 -3
- package/dist/lib/Notification.d.ts +11 -0
- package/dist/lib/index.d.ts +3 -0
- package/dist/main.css +1 -1
- package/dist/providers/ModeProvider/index.d.ts +1 -1
- package/dist/providers/ModeProvider/types.d.ts +1 -0
- package/dist/providers/NotificationProvider/NotificationProvider.d.ts +7 -3
- package/dist/providers/NotificationProvider/index.d.ts +1 -1
- package/dist/providers/NotificationProvider/types.d.ts +16 -13
- package/dist/providers/StyleProvider/index.d.ts +1 -1
- package/dist/providers/index.d.ts +3 -5
- package/dist/ui.cjs +174 -5
- package/dist/ui.js +20676 -1106
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type { InputControlProps, SelectControlProps, TextareaControlProps, } from "./types";
|
|
2
1
|
import TextareaControl from "./Textarea";
|
|
3
2
|
import SelectControl from "./Select";
|
|
4
3
|
import InputControl from "./Input";
|
|
5
4
|
export { TextareaControl, SelectControl, InputControl };
|
|
5
|
+
export * from "./types";
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { NotificationProps } from "./types";
|
|
2
|
-
export default function Notification(props: NotificationProps): import("react
|
|
3
|
+
export default function Notification(props: NotificationProps): import("react").ReactPortal;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export { Button, IconButton, InputControl, SelectControl, TextareaControl, Switcher, Image, PrintAfter, Notification, Loading, Handler, Error, SplashScreen, };
|
|
12
|
-
export type { ErrorFallbackProps, HandlerProps, ErrorProps, ButtonProps, IconButtonProps, InputControlProps, SelectControlProps, TextareaControlProps, SwitcherProps, ImageProps, PrintAfterProps, NotificationProps, LoadingProps, SplashScreenProps, };
|
|
1
|
+
export * from './Button/';
|
|
2
|
+
export * from "./IconButton";
|
|
3
|
+
export * from "./InputControl";
|
|
4
|
+
export * from "./Switch/";
|
|
5
|
+
export * from "./Image";
|
|
6
|
+
export * from "./PrintAfter";
|
|
7
|
+
export * from "./Notification";
|
|
8
|
+
export * from "./Loading";
|
|
9
|
+
export * from "./SplashScreen";
|
|
10
|
+
export * from "./Error";
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export { useIsElementInViewport, useScreenHandler, useMediaQuery };
|
|
1
|
+
export * from "./useIsElementInViewport";
|
|
2
|
+
export * from "./useScreenHandler";
|
package/dist/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
.appear{animation:appear .5s ease 1}.disappear{animation:disappear .5s ease 1}@keyframes appear{0%{opacity:0;transform:translateY(15px)}to{opacity:1;transform:translateY(0)}}@keyframes disappear{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(15px)}}.aGrow{transform:scale(0);animation-name:aGrow;animation-fill-mode:forwards;animation-timing-function:ease-in-out;animation-duration:.3s}.aShrink{transform:scale(1);animation-name:aShrink;animation-fill-mode:forwards;animation-timing-function:ease-in-out;animation-duration:.3s}@keyframes aGrow{0%{transform:scale(0)}80%{transform:scale(1.1)}to{transform:scale(1)}}@keyframes aShrink{0%{transform:scale(1)}to{transform:scale(0)}}.shake{animation:shake 1 .5s linear}.horizontal-shake{animation:horizontalShake 1 .5s linear}@keyframes shake{0%{transform:rotate(-15deg)}20%{transform:rotate(15deg)}30%{transform:rotate(-15deg)}50%{transform:rotate(0)}}@keyframes horizontalShake{0%{transform:translate(-10px)}20%{transform:translate(+10px)}30%{transform:translate(-10px)}50%{transform:translate(0)}}.button{display:flex;font-weight:600;cursor:default;align-items:center;justify-content:center;padding:.5rem 1.75rem;border-radius:1.5rem;transition-duration:.3s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.outlined.button{border-width:2px}.icon-button{min-width:2.5rem;min-height:2.5rem;width:2.5rem;height:2.5rem;border-radius:100%;font-size:1.25rem;line-height:1.75rem;padding:0}.image{font-style:italic;max-width:100%;height:auto;vertical-align:middle}.box{background-size:0;opacity:1;position:relative;overflow:hidden}.box:before{content:"";position:absolute;height:100%;top:0;right:0;width:calc(200% + 200px);bottom:0;background-image:inherit;animation:move 2s linear infinite}@keyframes move{to{transform:translate(calc(50% + 100px))}}.s-no-padding-left{padding-left:0!important}.s-no-padding-right{padding-right:0!important}.s-small-padding-left{padding-left:.5rem!important}.s-small-padding-right{padding-right:.5rem!important}.sub{display:flex;align-items:center;justify-content:space-between;padding:0 .75rem}.input-control{display:flex;gap:.25rem;align-items:flex-start;justify-content:flex-start;width:100%}.column{flex-direction:column}.row{flex-direction:row}.input-control textarea{width:100%;padding:.5rem 1rem;border-radius:20px;resize:none}.input-control input,.input-control select{width:100%;padding:.5rem 1rem;border-radius:1.5rem}.input-control .sub{width:100%;position:relative;border-radius:1.5rem}.input-control .sub input{border-radius:0}.input-control textarea:focus-visible,.input-control textarea,.input-control input:focus-visible,.input-control input{outline:none!important}.error-root{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;min-height:100vh;min-height:100svh}.s-error-body{width:60%;white-space:break-spaces;text-align:center}.s-error-icon{filter:invert(1);width:40px;height:40px}.loader-container{padding:5%}.loader{width:40px;position:relative;margin:0 auto}.loader:before{content:"";padding-top:100%;display:block}.circular{width:100%;height:100%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite;-webkit-transform-origin:center center;transform-origin:center center}.path{stroke-dasharray:1,200;stroke-dashoffset:0;-webkit-animation:dash 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite;stroke-linecap:round}@-webkit-keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}.loading{display:flex;width:100%;height:100%;align-items:center;justify-content:center}.notification-portal{position:fixed;left:0;bottom:0;z-index:40;gap:8px;padding:8px;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-start;pointer-events:none}.notification-root{min-width:160px;padding:12px 16px;position:relative;border-radius:100px;z-index:10;gap:8px;pointer-events:auto;display:flex;justify-content:space-between;align-items:center}.notification-close-button{position:absolute;top:50%;transform:translateY(-50%);right:.25rem}.close-notification-icon{width:15px;height:15px}.check-input{height:0;width:0;display:none!important}.switcher-root{display:flex;gap:.75rem;align-items:center;justify-content:flex-start}.switcher{width:55px;height:25px;border-radius:100px;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s;position:relative}.ball{width:20px;height:14px;border-radius:20px;top:50%;transition:all .5s ease;position:absolute}.deactivated{transform:translate(20%,-50%)}.activated{transform:translate(150%,-50%)}.splash-screen{height:100vh;height:100svh;display:flex;width:100%;position:fixed;top:0;left:0;z-index:50;flex-direction:column;align-items:center;overflow:hidden;transition-duration:.3s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.logo-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.splash-loading-show{opacity:1}.splash-loading-hide{opacity:0}.splash-loading{transition:opacity .3s cubic-bezier(.4,0,.2,1)}.splash-image{width:100px;height:100px;object-fit:cover;object-position:center;border-radius:100%}.brand{display:flex;flex-direction:column;align-items:center;justify-content:center;margin-bottom:1.25rem}.brand p{font-size:15px}.brand-name{display:flex;align-items:flex-end}.brand-name p{font-size:1.25rem}.splash-sito-logo{width:100px;height:60px;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center}.splash-loading{background-color:#0000!important;height:70px!important}.splash-loading .loader{width:30px}.slide-in-bck-center{-webkit-animation:slide-in-bck-center .7s cubic-bezier(.25,.46,.45,.94) both;animation:slide-in-bck-center .7s cubic-bezier(.25,.46,.45,.94) both}@-webkit-keyframes slide-in-bck-center{0%{-webkit-transform:translateZ(600px);transform:translateZ(600px);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}@keyframes slide-in-bck-center{0%{-webkit-transform:translateZ(600px);transform:translateZ(600px);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}.puff-in-center{-webkit-animation:puff-in-center .7s cubic-bezier(.47,0,.745,.715) both;animation:puff-in-center .7s cubic-bezier(.47,0,.745,.715) both}@-webkit-keyframes puff-in-center{0%{-webkit-transform:scale(2);transform:scale(2);-webkit-filter:blur(4px);filter:blur(4px);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-filter:blur(0px);filter:blur(0px);opacity:1}}@keyframes puff-in-center{0%{-webkit-transform:scale(2);transform:scale(2);-webkit-filter:blur(4px);filter:blur(4px);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-filter:blur(0px);filter:blur(0px);opacity:1}}@-webkit-keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInUp{0%{-webkit-transform:translate3d(0,120%,0);transform:translate3d(0,120%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}.animated{animation-delay:1s;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { ModeProvider, useMode } from "./ModeProvider";
|
|
2
|
-
export
|
|
2
|
+
export * from "./types";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
3
|
-
|
|
1
|
+
import { NotificationProviderProps, NotificationContextType } from "./types";
|
|
2
|
+
export declare function NotificationProvider(props: NotificationProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @returns notification context
|
|
6
|
+
*/
|
|
7
|
+
export declare const useNotification: () => NotificationContextType;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { NotificationProvider, useNotification } from "./NotificationProvider";
|
|
2
|
-
export
|
|
2
|
+
export * from "./types";
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
notification: NotificationType;
|
|
4
|
-
setNotification: React.Dispatch<NotificationActionType>;
|
|
5
|
-
}
|
|
2
|
+
import { NotificationType } from '../../lib';
|
|
6
3
|
export interface NotificationProviderProps {
|
|
7
4
|
children: ReactNode;
|
|
5
|
+
container: Element | DocumentFragment;
|
|
8
6
|
}
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
export type NotificationActionType = {
|
|
8
|
+
type: "set" | "remove";
|
|
9
|
+
items?: NotificationType[];
|
|
10
|
+
index?: number;
|
|
11
|
+
};
|
|
12
|
+
export type NotificationContextType = {
|
|
13
|
+
notification: NotificationType[];
|
|
14
|
+
container: Element | DocumentFragment;
|
|
15
|
+
removeNotification: (index?: number) => void;
|
|
16
|
+
showErrorNotification: (options: NotificationType) => void;
|
|
17
|
+
showNotification: (options: NotificationType) => void;
|
|
18
|
+
showSuccessNotification: (options: NotificationType) => void;
|
|
19
|
+
showStackNotifications: (notifications: NotificationType[]) => void;
|
|
20
|
+
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export type { ModeProviderData, ModeProviderProps, NotificationProviderData, NotificationProviderProps, NotificationActionType, NotificationType, StyleProviderData, StyleProviderProps, UiTheme, ColorPalette, ColorVariants, };
|
|
5
|
-
export { ModeProvider, useMode, NotificationProvider, useNotification, useStyle, StyleProvider, };
|
|
1
|
+
export * from "./ModeProvider";
|
|
2
|
+
export * from "./NotificationProvider";
|
|
3
|
+
export * from "./StyleProvider";
|