Socket
Socket
Sign inDemoInstall

@uxf/ui

Package Overview
Dependencies
27
Maintainers
1
Versions
263
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 10.0.0-beta.85 to 10.0.0-beta.86

dialog/theme.d.ts

2

dialog/dialog.d.ts
import React, { ReactNode } from "react";
import { DialogVariant } from "./theme";
export interface DialogProps {

@@ -8,3 +9,4 @@ children: ReactNode;

open: boolean;
variant?: DialogVariant;
}
export declare const Dialog: React.NamedExoticComponent<DialogProps>;

4

dialog/dialog.js

@@ -30,4 +30,4 @@ "use strict";

exports.Dialog = (0, react_2.memo)((props) => {
var _a;
return (react_2.default.createElement(react_1.Dialog, { className: `uxf-dialog ${(_a = props.className) !== null && _a !== void 0 ? _a : ""}`, open: props.open, onClose: props.disableBackdropClose ? () => null : props.onClose },
var _a, _b;
return (react_2.default.createElement(react_1.Dialog, { className: `uxf-dialog uxf-dialog--variant-${(_a = props.variant) !== null && _a !== void 0 ? _a : "default"} ${(_b = props.className) !== null && _b !== void 0 ? _b : ""}`, open: props.open, onClose: props.disableBackdropClose ? () => null : props.onClose },
react_2.default.createElement(react_1.Dialog.Overlay, { className: "uxf-dialog__backdrop" }),

@@ -34,0 +34,0 @@ react_2.default.createElement("div", { className: "uxf-dialog__wrapper" },

import React, { ReactNode } from "react";
import type { DialogProps } from "../dialog";
import { ModalWidth } from "./theme";
import { ModalVariant, ModalWidth } from "./theme";
export interface ModalProps {

@@ -9,2 +9,3 @@ children: ReactNode;

onClose?: () => void;
variant?: ModalVariant;
width?: ModalWidth;

@@ -11,0 +12,0 @@ }

@@ -30,3 +30,3 @@ "use strict";

exports.Modal = (0, react_1.forwardRef)((props, ref) => {
var _a, _b;
var _a, _b, _c;
const [content, setContent] = (0, react_1.useState)();

@@ -50,4 +50,4 @@ const open = (0, react_1.useCallback)((newModal) => setContent(newModal), []);

}, []);
return content ? (react_1.default.createElement(dialog_1.Dialog, { className: `uxf-modal uxf-modal--width-${(_a = content.width) !== null && _a !== void 0 ? _a : "default"} ${(_b = content.className) !== null && _b !== void 0 ? _b : ""}`, disableBackdropClose: content.disableBackdropClose, onClose: onClose, open: !!content }, content.children)) : null;
return content ? (react_1.default.createElement(dialog_1.Dialog, { className: `uxf-modal uxf-modal--variant-${(_a = content.variant) !== null && _a !== void 0 ? _a : "default"} uxf-modal--width-${(_b = content.width) !== null && _b !== void 0 ? _b : "default"} ${(_c = content.className) !== null && _c !== void 0 ? _c : ""}`, disableBackdropClose: content.disableBackdropClose, onClose: onClose, open: !!content, variant: content.variant }, content.children)) : null;
});
exports.Modal.displayName = "UxfUiModal";

@@ -9,1 +9,5 @@ export interface ModalWidths {

export type ModalWidth = keyof ModalWidths;
export interface ModalVariants {
default: true;
}
export type ModalVariant = keyof ModalVariants;
{
"name": "@uxf/ui",
"version": "10.0.0-beta.85",
"version": "10.0.0-beta.86",
"description": "",

@@ -5,0 +5,0 @@ "publishConfig": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc