Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@biotic-ui/drawer

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@biotic-ui/drawer - npm Package Compare versions

Comparing version 0.4.1 to 0.5.0

style.css

54

lib/main.js

@@ -5,4 +5,2 @@ var $9NW7u$reactjsxruntime = require("react/jsx-runtime");

var $9NW7u$bioticuistd = require("@biotic-ui/std");
var $9NW7u$bioticuileptons = require("@biotic-ui/leptons");
var $9NW7u$emotioncss = require("@emotion/css");

@@ -19,38 +17,2 @@ function $parcel$export(e, n, v, s) {

let $ab2f2a1d9c97d031$export$4df8d4373bc60300 = (0, $9NW7u$emotioncss.css)`
--_drawer-timing-function: var(--drawer-timing-function, var(--ease-5));
--_drawer-duration: var(--drawer-duration, 200ms);
max-width: 100vw;
height: 100vh;
position: fixed;
background: var(--drawer-background, #fff);
overflow-y: auto;
top: 0;
z-index: 11;
transition: transform var(--_drawer-duration) var(--_drawer-timing-function);
--menu-box-shadow: none;
--menu-width: auto;
--menu-padding: 0;
--menu-border: none;
`;
let $ab2f2a1d9c97d031$export$5880b8b5730aff45 = {
left: (0, $9NW7u$emotioncss.css)`
left: 0;
transform: translateX(-100%);
`,
right: (0, $9NW7u$emotioncss.css)`
right: 0;
transform: translateX(100%);
`
};
let $ab2f2a1d9c97d031$export$3ce6949f20cea765 = (0, $9NW7u$emotioncss.css)`
box-shadow: var(--shadow-2);
transform: translateX(0);
`;
let $3fda9891a3178231$export$13807d9ee5a34a42;

@@ -62,4 +24,3 @@ (function(Position) {

let $3fda9891a3178231$var$NoOp = ()=>{};
function $3fda9891a3178231$export$4071300121a182f5(props) {
let { open: open , children: children , maxWidth: maxWidth = "auto" , onClose: onClose = $3fda9891a3178231$var$NoOp , position: position = $3fda9891a3178231$export$13807d9ee5a34a42.Left , scrollable: scrollable = false , } = props;
function $3fda9891a3178231$export$4071300121a182f5({ open: open , children: children , maxWidth: maxWidth = "auto" , onClose: onClose = $3fda9891a3178231$var$NoOp , position: position = $3fda9891a3178231$export$13807d9ee5a34a42.Left , scrollable: scrollable = false , className: className = "" , backdropClassName: backdropClassName = "" , ...props }) {
let DrawerContainer = (0, $9NW7u$bioticuistd.useGetContainer)("biotic-drawer-container");

@@ -78,9 +39,11 @@ (0, $9NW7u$bioticuistd.useOnEscape)(()=>open && onClose({

let backdropClasses = [
(0, $9NW7u$bioticuileptons.backdrop),
open ? `${0, $9NW7u$bioticuileptons.backdrop}--open` : ""
"biotic-backdrop",
open ? `biotic-backdrop--open` : "",
backdropClassName
].join(" ");
let classes = [
$ab2f2a1d9c97d031$export$4df8d4373bc60300,
position === $3fda9891a3178231$export$13807d9ee5a34a42.Left ? $ab2f2a1d9c97d031$export$5880b8b5730aff45.left : $ab2f2a1d9c97d031$export$5880b8b5730aff45.right,
open ? $ab2f2a1d9c97d031$export$3ce6949f20cea765 : "",
"biotic-drawer",
position === $3fda9891a3178231$export$13807d9ee5a34a42.Left ? "biotic-drawer--left" : "biotic-drawer--right",
open ? "biotic-drawer--open" : "",
className
].join(" ");

@@ -98,2 +61,3 @@ let Drawer = /*#__PURE__*/ (0, $9NW7u$reactjsxruntime.jsxs)((0, $9NW7u$react.Fragment), {

},
...props,
children: children

@@ -100,0 +64,0 @@ })

@@ -5,4 +5,2 @@ import {jsxs as $kM5B2$jsxs, jsx as $kM5B2$jsx} from "react/jsx-runtime";

import {useGetContainer as $kM5B2$useGetContainer, useOnEscape as $kM5B2$useOnEscape, usePreventScroll as $kM5B2$usePreventScroll} from "@biotic-ui/std";
import {backdrop as $kM5B2$backdrop} from "@biotic-ui/leptons";
import {css as $kM5B2$css} from "@emotion/css";

@@ -13,38 +11,2 @@

let $e2c380140ef8990b$export$4df8d4373bc60300 = (0, $kM5B2$css)`
--_drawer-timing-function: var(--drawer-timing-function, var(--ease-5));
--_drawer-duration: var(--drawer-duration, 200ms);
max-width: 100vw;
height: 100vh;
position: fixed;
background: var(--drawer-background, #fff);
overflow-y: auto;
top: 0;
z-index: 11;
transition: transform var(--_drawer-duration) var(--_drawer-timing-function);
--menu-box-shadow: none;
--menu-width: auto;
--menu-padding: 0;
--menu-border: none;
`;
let $e2c380140ef8990b$export$5880b8b5730aff45 = {
left: (0, $kM5B2$css)`
left: 0;
transform: translateX(-100%);
`,
right: (0, $kM5B2$css)`
right: 0;
transform: translateX(100%);
`
};
let $e2c380140ef8990b$export$3ce6949f20cea765 = (0, $kM5B2$css)`
box-shadow: var(--shadow-2);
transform: translateX(0);
`;
let $037ebc366e0a313a$export$13807d9ee5a34a42;

@@ -56,4 +18,3 @@ (function(Position) {

let $037ebc366e0a313a$var$NoOp = ()=>{};
function $037ebc366e0a313a$export$4071300121a182f5(props) {
let { open: open , children: children , maxWidth: maxWidth = "auto" , onClose: onClose = $037ebc366e0a313a$var$NoOp , position: position = $037ebc366e0a313a$export$13807d9ee5a34a42.Left , scrollable: scrollable = false , } = props;
function $037ebc366e0a313a$export$4071300121a182f5({ open: open , children: children , maxWidth: maxWidth = "auto" , onClose: onClose = $037ebc366e0a313a$var$NoOp , position: position = $037ebc366e0a313a$export$13807d9ee5a34a42.Left , scrollable: scrollable = false , className: className = "" , backdropClassName: backdropClassName = "" , ...props }) {
let DrawerContainer = (0, $kM5B2$useGetContainer)("biotic-drawer-container");

@@ -72,9 +33,11 @@ (0, $kM5B2$useOnEscape)(()=>open && onClose({

let backdropClasses = [
(0, $kM5B2$backdrop),
open ? `${0, $kM5B2$backdrop}--open` : ""
"biotic-backdrop",
open ? `biotic-backdrop--open` : "",
backdropClassName
].join(" ");
let classes = [
$e2c380140ef8990b$export$4df8d4373bc60300,
position === $037ebc366e0a313a$export$13807d9ee5a34a42.Left ? $e2c380140ef8990b$export$5880b8b5730aff45.left : $e2c380140ef8990b$export$5880b8b5730aff45.right,
open ? $e2c380140ef8990b$export$3ce6949f20cea765 : "",
"biotic-drawer",
position === $037ebc366e0a313a$export$13807d9ee5a34a42.Left ? "biotic-drawer--left" : "biotic-drawer--right",
open ? "biotic-drawer--open" : "",
className
].join(" ");

@@ -92,2 +55,3 @@ let Drawer = /*#__PURE__*/ (0, $kM5B2$jsxs)((0, $kM5B2$Fragment), {

},
...props,
children: children

@@ -94,0 +58,0 @@ })

@@ -1,2 +0,2 @@

import { ReactNode } from "react";
import { HTMLAttributes } from "react";
type CloseEvent = {

@@ -10,5 +10,4 @@ backdrop: boolean;

}
type Props = {
type Props = HTMLAttributes<HTMLDivElement> & {
open: boolean;
children?: ReactNode;
maxWidth?: 'auto' | number;

@@ -18,5 +17,6 @@ onClose: (e: CloseEvent) => void;

scrollable?: boolean;
backdropClassName?: string;
};
export function Drawer(props: Props): import("react").ReactPortal | null;
export function Drawer({ open, children, maxWidth, onClose, position, scrollable, className, backdropClassName, ...props }: Props): import("react").ReactPortal | null;
//# sourceMappingURL=types.d.ts.map
{
"name": "@biotic-ui/drawer",
"version": "0.4.1",
"version": "0.5.0",
"description": "React Drawer",

@@ -30,10 +30,9 @@ "source": "src/main.ts",

"homepage": "https://github.com/riezler-co/biotic#readme",
"peerDependencies": {
"@biotic-ui/leptons": "^0.4.1",
"@biotic-ui/std": "^0.4.1",
"@emotion/css": "^11.10.5",
"dependencies": {
"@biotic-ui/leptons": "^0.5.0",
"@biotic-ui/std": "^0.5.0",
"react": "17 - 18.x",
"react-dom": "17 - 18.x"
},
"gitHead": "4d47ca609b3d59878dd7f9280cf9e74228490790",
"gitHead": "f34dcb031e1abcb02d03c3ce56c5650a7ab80f62",
"publishConfig": {

@@ -40,0 +39,0 @@ "access": "public"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc