@biotic-ui/drawer
Advanced tools
Comparing version 0.4.1 to 0.5.0
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4
32731
12
191
+ Added@biotic-ui/leptons@^0.5.0
+ Added@biotic-ui/std@^0.5.0
+ Addedreact@17 - 18.x
+ Addedreact-dom@17 - 18.x
+ Added@biotic-ui/leptons@0.5.3(transitive)
+ Added@biotic-ui/std@0.5.3(transitive)
- Removed@babel/code-frame@7.26.2(transitive)
- Removed@babel/generator@7.26.2(transitive)
- Removed@babel/helper-module-imports@7.25.9(transitive)
- Removed@babel/helper-string-parser@7.25.9(transitive)
- Removed@babel/helper-validator-identifier@7.25.9(transitive)
- Removed@babel/parser@7.26.2(transitive)
- Removed@babel/runtime@7.26.0(transitive)
- Removed@babel/template@7.25.9(transitive)
- Removed@babel/traverse@7.25.9(transitive)
- Removed@babel/types@7.26.0(transitive)
- Removed@biotic-ui/leptons@0.4.1(transitive)
- Removed@biotic-ui/std@0.4.1(transitive)
- Removed@emotion/babel-plugin@11.12.0(transitive)
- Removed@emotion/cache@11.13.1(transitive)
- Removed@emotion/css@11.13.4(transitive)
- Removed@emotion/hash@0.9.2(transitive)
- Removed@emotion/memoize@0.9.0(transitive)
- Removed@emotion/serialize@1.3.2(transitive)
- Removed@emotion/sheet@1.4.0(transitive)
- Removed@emotion/unitless@0.10.0(transitive)
- Removed@emotion/utils@1.4.1(transitive)
- Removed@emotion/weak-memoize@0.4.0(transitive)
- Removed@jridgewell/gen-mapping@0.3.5(transitive)
- Removed@jridgewell/resolve-uri@3.1.2(transitive)
- Removed@jridgewell/set-array@1.2.1(transitive)
- Removed@jridgewell/sourcemap-codec@1.5.0(transitive)
- Removed@jridgewell/trace-mapping@0.3.25(transitive)
- Removed@types/parse-json@4.0.2(transitive)
- Removedbabel-plugin-macros@3.1.0(transitive)
- Removedcallsites@3.1.0(transitive)
- Removedconvert-source-map@1.9.0(transitive)
- Removedcosmiconfig@7.1.0(transitive)
- Removedcsstype@3.1.3(transitive)
- Removeddebug@4.3.7(transitive)
- Removederror-ex@1.3.2(transitive)
- Removedescape-string-regexp@4.0.0(transitive)
- Removedfind-root@1.1.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedglobals@11.12.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedimport-fresh@3.3.0(transitive)
- Removedis-arrayish@0.2.1(transitive)
- Removedis-core-module@2.15.1(transitive)
- Removedjsesc@3.0.2(transitive)
- Removedjson-parse-even-better-errors@2.3.1(transitive)
- Removedlines-and-columns@1.2.4(transitive)
- Removedms@2.1.3(transitive)
- Removedparent-module@1.0.1(transitive)
- Removedparse-json@5.2.0(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpath-type@4.0.0(transitive)
- Removedpicocolors@1.1.1(transitive)
- Removedregenerator-runtime@0.14.1(transitive)
- Removedresolve@1.22.8(transitive)
- Removedresolve-from@4.0.0(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedstylis@4.2.0(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedyaml@1.10.2(transitive)