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

@leafygreen-ui/box

Package Overview
Dependencies
Maintainers
5
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafygreen-ui/box - npm Package Compare versions

Comparing version 3.1.8 to 3.1.9

src/Box.stories.tsx

7

CHANGELOG.md
# @leafygreen-ui/box
## 3.1.9
### Patch Changes
- 15185af0: Imports Storybook utilities from `@lg-tools/storybook-utils` (previously imported from `@leafygreen-ui/lib`)
- 356a53fd: Update TS builds to use `typescript@4.9.5`
## 3.1.8

@@ -4,0 +11,0 @@

14

dist/Box.d.ts
import React from 'react';
declare type Override<T, U> = Omit<T, keyof U> & U;
declare type Override2<T, U, V> = Override<Override<T, U>, V>;
declare type BoxDefault<Default extends React.ElementType = 'div', ExtraProps = {}> = Override2<React.ComponentPropsWithRef<Default>, {
type Override<T, U> = Omit<T, keyof U> & U;
type Override2<T, U, V> = Override<Override<T, U>, V>;
type BoxDefault<Default extends React.ElementType = 'div', ExtraProps = {}> = Override2<React.ComponentPropsWithRef<Default>, {
as?: never;
href?: never;
}, ExtraProps>;
declare type BoxAnchorDefault<ExtraProps = {}> = Override2<React.ComponentPropsWithRef<'a'>, {
type BoxAnchorDefault<ExtraProps = {}> = Override2<React.ComponentPropsWithRef<'a'>, {
as?: never;
href: string;
}, ExtraProps>;
declare type BoxIntrinsic<TElement extends keyof JSX.IntrinsicElements = keyof JSX.IntrinsicElements, ExtraProps = {}> = Override2<React.ComponentPropsWithRef<TElement>, {
type BoxIntrinsic<TElement extends keyof JSX.IntrinsicElements = keyof JSX.IntrinsicElements, ExtraProps = {}> = Override2<React.ComponentPropsWithRef<TElement>, {
/**

@@ -20,3 +20,3 @@ * The component or HTML Element that the button is rendered as.

}, ExtraProps>;
declare type BoxComponent<TProps = {}, ExtraProps = {}> = Override2<React.PropsWithRef<TProps>, {
type BoxComponent<TProps = {}, ExtraProps = {}> = Override2<React.PropsWithRef<TProps>, {
/**

@@ -27,3 +27,3 @@ * The component or HTML Element that the button is rendered as.

}, ExtraProps>;
export declare type BoxProps<Default extends React.ElementType = 'div', ExtraProps = {}> = BoxAnchorDefault<ExtraProps> | BoxIntrinsic<keyof JSX.IntrinsicElements, ExtraProps> | BoxComponent<{}, ExtraProps> | BoxDefault<Default, ExtraProps>;
export type BoxProps<Default extends React.ElementType = 'div', ExtraProps = {}> = BoxAnchorDefault<ExtraProps> | BoxIntrinsic<keyof JSX.IntrinsicElements, ExtraProps> | BoxComponent<{}, ExtraProps> | BoxDefault<Default, ExtraProps>;
declare function InlineBox(props: BoxDefault, ref: React.Ref<any>): JSX.Element;

@@ -30,0 +30,0 @@ declare function InlineBox(props: BoxAnchorDefault, ref: React.Ref<any>): JSX.Element;

{
"name": "@leafygreen-ui/box",
"version": "3.1.8",
"version": "3.1.9",
"description": "leafyGreen UI Kit Box",

@@ -34,4 +34,4 @@ "main": "./dist/index.js",

"devDependencies": {
"@leafygreen-ui/lib": "^11.0.0"
"@lg-tools/storybook-utils": "^0.1.0"
}
}

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

import e from"react";import{storybookArgTypes as r}from"@leafygreen-ui/lib";import t from"prop-types";function n(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?n(Object(t),!0).forEach((function(r){a(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):n(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function a(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},i.apply(this,arguments)}function l(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var c=["as"];function f(r,t){if(null!=r.as){var n=r.as,o=l(r,c);return e.createElement(n,i({},o,{ref:t}))}return null!=r.href?e.createElement("a",i({},r,{ref:t})):e.createElement("div",i({},r,{ref:t}))}f.displayName="InlineBox";var u=e.forwardRef(f);u.displayName="Box",u.propTypes={as:t.oneOfType([t.elementType,t.element,t.func]),href:t.string};var p=["as"],s={title:"Components/Box",component:u,parameters:{default:"Basic"},argTypes:{as:o(o({},r.as),{},{defaultValue:"div"}),href:{control:"text"}}},b=function(r){var t=r.as,n=l(r,p);return e.createElement(u,i({as:t||"div"},n))},y=b.bind({});y.args={children:"I am a div"};var m=b.bind({});m.args={href:"https://mongodb.design",children:"I am an anchor tag"};var O=b.bind({});O.args={as:"button",children:"I am a button tag"};export{m as Anchor,y as Basic,O as CustomComponent,s as default};
import e from"react";import{storybookArgTypes as r}from"@lg-tools/storybook-utils";import t from"prop-types";function n(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?n(Object(t),!0).forEach((function(r){a(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):n(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function a(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},i.apply(this,arguments)}function l(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var c=["as"];function f(r,t){if(null!=r.as){var n=r.as,o=l(r,c);return e.createElement(n,i({},o,{ref:t}))}return null!=r.href?e.createElement("a",i({},r,{ref:t})):e.createElement("div",i({},r,{ref:t}))}f.displayName="InlineBox";var u=e.forwardRef(f);u.displayName="Box",u.propTypes={as:t.oneOfType([t.elementType,t.element,t.func]),href:t.string};var s=["as"],p={title:"Components/Box",component:u,parameters:{default:"Basic"},argTypes:{as:o(o({},r.as),{},{defaultValue:"div"}),href:{control:"text"}}},b=function(r){var t=r.as,n=l(r,s);return e.createElement(u,i({as:t||"div"},n))},y=b.bind({});y.args={children:"I am a div"};var m=b.bind({});m.args={href:"https://mongodb.design",children:"I am an anchor tag"};var O=b.bind({});O.args={as:"button",children:"I am a button tag"};export{m as Anchor,y as Basic,O as CustomComponent,p as default};

@@ -16,4 +16,4 @@ {

],
"exclude": ["**/*.spec.*", "**/*.story.*"],
"exclude": ["**/*.spec.*", "**/*.stories.*"],
"references": []
}

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