najwer23morsels 0.21.1 → 0.22.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # najwer23morsels
2
2
 
3
+ ## 0.22.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Dialog
8
+
3
9
  ## 0.21.0
4
10
 
5
11
  ### Minor Changes
package/lib/Dialog.js ADDED
@@ -0,0 +1 @@
1
+ import{jsx as o,jsxs as i}from"react/jsx-runtime";import{useRef as e,useEffect as l}from"react";import{B as t}from"./Button-DJMC5h72.js";import{T as a}from"./TextBox-CWSg4nm8.js";import{s as r,g as n}from"./style-inject.es-CrVRO2OA.js";import"./Loader-D8OrIi__.js";var d={n23mDialog:"Dialog-module_n23mDialog__4gk19",dialog:"Dialog-module_dialog__-swDZ",dialogCloseButton:"Dialog-module_dialogCloseButton__nRP56"};r("@layer n23mDialog{.Dialog-module_n23mDialog__4gk19{background-color:#fff;.Dialog-module_dialog__-swDZ{border:1px solid #000;box-sizing:border-box;max-block-size:calc(100dvb - 50px);max-inline-size:min(calc(100vw - 20px),var(--dialog-mw,95%));min-height:100px;overscroll-behavior:none;padding:0;position:relative;& .Dialog-module_dialogCloseButton__nRP56{position:absolute!important;right:10px;top:10px}article{margin-top:55px}&::backdrop{backdrop-filter:blur(5px);background-color:hsla(0,0%,100%,.15);bottom:0;left:0;position:fixed;right:0;top:0}}}}");const s=({children:r,open:s,maxWidth:m,title:c,onCancel:g,className:p,style:u,...h})=>{const b=e(null);return l(()=>{if(!s){b.current?.classList.add(d.minimize);const o=setTimeout(()=>{b.current?.close(),b.current?.classList.remove(d.minimize),document.body.style.paddingRight="0",document.body.style.overflow=""},0);return()=>clearTimeout(o)}b.current?.showModal(),document.body.style.paddingRight=window.innerWidth-document.body.clientWidth+"px",document.body.style.overflow="hidden"},[s]),o("div",{className:[d.n23mDialog,"n23mDialog",p].filter(Boolean).join(" "),...h,style:{...n({"--dialog-mw":m}),...u},children:i("dialog",{className:[c?d.hasTitle:"",d.dialog].join(" "),"modal-mode":"mega",ref:b,onCancel:g,onClick:o=>{o.target===o.currentTarget&&g()},children:[o("div",{className:d.dialogCloseButton,style:{display:s?"block":"none"},children:o(t,{onClick:g,"aria-label":"close dialog",height:"25px",width:"60px",backgroundColor:"orangered",children:o(a,{tag:"h2",mobileSize:14,desktopSize:14,color:"white",children:"Close"})})}),o("article",{children:r})]})})};s.displayName="Dialog";export{s as Dialog};
@@ -3,7 +3,7 @@ interface CalendarProps extends React.HTMLAttributes<HTMLElement> {
3
3
  style?: React.CSSProperties;
4
4
  name: string;
5
5
  label: string;
6
- placeholder: string;
6
+ placeholder?: string;
7
7
  validatorOptions?: ValidatorOptions;
8
8
  initialValue?: '' | `${number}-${number}-${number}`;
9
9
  onBlur?: (e: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
@@ -0,0 +1,9 @@
1
+ interface DialogProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ children?: React.ReactNode;
3
+ style?: React.CSSProperties;
4
+ maxWidth: React.CSSProperties['maxWidth'];
5
+ open: boolean;
6
+ onCancel: () => void;
7
+ }
8
+ export declare const Dialog: React.FC<DialogProps>;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ import { Dialog } from './Dialog';
2
+ export { Dialog };
@@ -3,7 +3,7 @@ interface FooterProps extends React.HTMLAttributes<HTMLDivElement> {
3
3
  style?: React.CSSProperties;
4
4
  author?: string;
5
5
  initialYear?: number;
6
- color: React.CSSProperties['color'];
6
+ color?: React.CSSProperties['color'];
7
7
  backgroundColor?: React.CSSProperties['color'];
8
8
  }
9
9
  export declare const Footer: React.FC<FooterProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "najwer23morsels",
3
- "version": "0.21.1",
3
+ "version": "0.22.0",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./lib/index.mjs",
6
6
  "types": "./lib/index.d.ts",