@nimbus-ds/modal 1.0.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 +20 -0
- package/README.md +44 -0
- package/dist/index.d.ts +157 -0
- package/dist/index.js +1 -0
- package/package.json +41 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
The Modal component allows us to call the user's attention to a floating box that can have text, actions or forms to perform tasks by changing the focus from the background. It is an intrusive component as it interrupts the user's operation to present a message or content.
|
|
4
|
+
|
|
5
|
+
## 2023-01-22 `1.0.0`
|
|
6
|
+
|
|
7
|
+
### 📚 3rd party library updates
|
|
8
|
+
|
|
9
|
+
- Added `webpack@5.74.0`. ([#77](https://github.com/TiendaNube/nimbus-design-system/pull/77) by [@juniorconquista](https://github.com/juniorconquista))
|
|
10
|
+
|
|
11
|
+
### 🎉 New features
|
|
12
|
+
|
|
13
|
+
- Added `children`, `open`, `onDismiss`, `portalId` and `padding` properties to the Component. ([#77](https://github.com/TiendaNube/nimbus-design-system/pull/77) by [@juniorconquista](https://github.com/juniorconquista))
|
|
14
|
+
- Added stories on Component. ([#77](https://github.com/TiendaNube/nimbus-design-system/pull/77) by [@juniorconquista](https://github.com/juniorconquista))
|
|
15
|
+
- Created new `Modal.Header` subcomponent. ([#77](https://github.com/TiendaNube/nimbus-design-system/pull/77) by [@juniorconquista](https://github.com/juniorconquista))
|
|
16
|
+
- Added `children` and `title` properties to the Component `Modal.Header`. ([#77](https://github.com/TiendaNube/nimbus-design-system/pull/77) by [@juniorconquista](https://github.com/juniorconquista))
|
|
17
|
+
- Created new `Modal.Body` subcomponent. ([#77](https://github.com/TiendaNube/nimbus-design-system/pull/77) by [@juniorconquista](https://github.com/juniorconquista))
|
|
18
|
+
- Added `children` and `padding` properties to the Component `Modal.Body`. ([#77](https://github.com/TiendaNube/nimbus-design-system/pull/77) by [@juniorconquista](https://github.com/juniorconquista))
|
|
19
|
+
- Created new `Modal.Footer` subcomponent. ([#77](https://github.com/TiendaNube/nimbus-design-system/pull/77) by [@juniorconquista](https://github.com/juniorconquista))
|
|
20
|
+
- Added `children` properties to the Component `Modal.Footer`. ([#77](https://github.com/TiendaNube/nimbus-design-system/pull/77) by [@juniorconquista](https://github.com/juniorconquista))
|
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# `@nimbus-ds/modal`
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@nimbus-ds/modal)
|
|
4
|
+
|
|
5
|
+
The Modal component allows us to call the user's attention to a floating box that can have text, actions or forms to perform tasks by changing the focus from the background. It is an intrusive component as it interrupts the user's operation to present a message or content.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
$ yarn add @nimbus-ds/modal
|
|
11
|
+
# or
|
|
12
|
+
$ npm install @nimbus-ds/modal
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Component Anatomy
|
|
16
|
+
|
|
17
|
+
The component consists of a full-screen translucent background and a centered floating box with rounded corners and shadow with optional padding.
|
|
18
|
+
|
|
19
|
+
## Guidelines
|
|
20
|
+
|
|
21
|
+
We use the component to present dialogs or options to the user that must be completed before continuing the operation. They are intrusive as they completely interrupt browsing, but they should be used occasionally.
|
|
22
|
+
|
|
23
|
+
Modal must present actions to the user. Actions must form part of the footer of the modal, and must be located on the right side.
|
|
24
|
+
|
|
25
|
+
The Modal must be able to be closed using the X button in the header, clicking outside the container or pressing the ESC key on the keyboard.
|
|
26
|
+
|
|
27
|
+
Avoid its use for very long forms or screens with many options.
|
|
28
|
+
|
|
29
|
+
### Recommendations for use
|
|
30
|
+
|
|
31
|
+
- Confirm deletion of an element.
|
|
32
|
+
- Display options as filters in lists.
|
|
33
|
+
- Confirm an action before moving on to another instance.
|
|
34
|
+
|
|
35
|
+
### Related components
|
|
36
|
+
|
|
37
|
+
- Popover - It is a floating element that can be used to present information or actions in a non-intrusive way.
|
|
38
|
+
- Alert - It is a component that presents critical or sensitive information to the user in a non-intrusive way within the context of a screen.
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
View docs [here](https://nimbus.nuvemshop.com.br/documentation/composite-components/modal).
|
|
43
|
+
|
|
44
|
+
<img alt="Nimbus" style="margin-bottom: 30px;" src="https://tiendanube.github.io/design-system-nimbus/static/media/nimbus-logo.ab60bd79.png" height="30" />
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v7.1.0
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
5
|
+
|
|
6
|
+
export interface Conditions<T> {
|
|
7
|
+
xs?: T;
|
|
8
|
+
md?: T;
|
|
9
|
+
lg?: T;
|
|
10
|
+
}
|
|
11
|
+
declare const card: {
|
|
12
|
+
sprinkle: ((props: {
|
|
13
|
+
backgroundColor?: "primary.surface" | "primary.surfaceHighlight" | "success.surface" | "success.surfaceHighlight" | "warning.surface" | "warning.surfaceHighlight" | "danger.surface" | "danger.surfaceHighlight" | "neutral.background" | "neutral.surface" | "neutral.surfaceHighlight" | undefined;
|
|
14
|
+
padding?: "base" | "small" | "none" | undefined;
|
|
15
|
+
}) => string) & {
|
|
16
|
+
properties: Set<"backgroundColor" | "padding">;
|
|
17
|
+
};
|
|
18
|
+
properties: {
|
|
19
|
+
backgroundColor: {
|
|
20
|
+
"primary.surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
21
|
+
"primary.surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
22
|
+
"success.surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
23
|
+
"success.surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
24
|
+
"danger.surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
25
|
+
"danger.surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
26
|
+
"warning.surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
27
|
+
"warning.surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
28
|
+
"neutral.background": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
29
|
+
"neutral.surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
30
|
+
"neutral.surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
31
|
+
};
|
|
32
|
+
padding: {
|
|
33
|
+
base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
34
|
+
small: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
35
|
+
none: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
classnames: {
|
|
39
|
+
container: string;
|
|
40
|
+
header: string;
|
|
41
|
+
body: string;
|
|
42
|
+
footer: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
declare const propertiesModal: {
|
|
46
|
+
padding: {
|
|
47
|
+
base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
48
|
+
small: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
49
|
+
none: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export type PaddingProperties = keyof typeof propertiesModal.padding;
|
|
53
|
+
export interface ModalSprinkle {
|
|
54
|
+
maxWidth?: string | Conditions<string>;
|
|
55
|
+
padding?: PaddingProperties | Conditions<PaddingProperties>;
|
|
56
|
+
}
|
|
57
|
+
declare const modal: {
|
|
58
|
+
sprinkle: import("rainbow-sprinkles/dist/declarations/src/createRuntimeFn").SprinklesFn<[
|
|
59
|
+
{
|
|
60
|
+
config: {
|
|
61
|
+
maxWidth: {
|
|
62
|
+
dynamic: {
|
|
63
|
+
default: string;
|
|
64
|
+
conditions: Record<"xs" | "md" | "lg", string>;
|
|
65
|
+
};
|
|
66
|
+
dynamicScale: true;
|
|
67
|
+
name: "maxWidth";
|
|
68
|
+
vars: {
|
|
69
|
+
default: string;
|
|
70
|
+
conditions: Record<"xs" | "md" | "lg", string>;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
padding: {
|
|
74
|
+
dynamic: {
|
|
75
|
+
default: string;
|
|
76
|
+
conditions: Record<"xs" | "md" | "lg", string>;
|
|
77
|
+
};
|
|
78
|
+
dynamicScale: {
|
|
79
|
+
base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
80
|
+
small: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
81
|
+
none: string;
|
|
82
|
+
};
|
|
83
|
+
name: "padding";
|
|
84
|
+
vars: {
|
|
85
|
+
default: string;
|
|
86
|
+
conditions: Record<"xs" | "md" | "lg", string>;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
} & {
|
|
91
|
+
config: {
|
|
92
|
+
[x: string]: {
|
|
93
|
+
mappings: ("maxWidth" | "padding")[];
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
]>;
|
|
98
|
+
properties: {
|
|
99
|
+
padding: {
|
|
100
|
+
base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
101
|
+
small: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
102
|
+
none: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
classnames: {
|
|
106
|
+
overlay: string;
|
|
107
|
+
container: string;
|
|
108
|
+
close: string;
|
|
109
|
+
header: string;
|
|
110
|
+
body: string;
|
|
111
|
+
footer: string;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
export interface ModalBodyProps extends HTMLAttributes<HTMLElement> {
|
|
115
|
+
/** Body content */
|
|
116
|
+
children: ReactNode;
|
|
117
|
+
/** Card padding */
|
|
118
|
+
padding?: keyof typeof card.properties.padding;
|
|
119
|
+
}
|
|
120
|
+
declare const ModalBody: React.FC<ModalBodyProps>;
|
|
121
|
+
export interface ModalFooterProps extends HTMLAttributes<HTMLElement> {
|
|
122
|
+
/** Footer content */
|
|
123
|
+
children: ReactNode;
|
|
124
|
+
}
|
|
125
|
+
declare const ModalFooter: React.FC<ModalFooterProps>;
|
|
126
|
+
export interface ModalHeaderProps extends HTMLAttributes<HTMLElement> {
|
|
127
|
+
/** Header content */
|
|
128
|
+
children?: ReactNode;
|
|
129
|
+
/** Header title */
|
|
130
|
+
title?: string;
|
|
131
|
+
}
|
|
132
|
+
declare const ModalHeader: React.FC<ModalHeaderProps>;
|
|
133
|
+
export type ModalExtends = ModalSprinkle & HTMLAttributes<HTMLDivElement>;
|
|
134
|
+
export interface ModalComponents {
|
|
135
|
+
Body: typeof ModalBody;
|
|
136
|
+
Footer: typeof ModalFooter;
|
|
137
|
+
Header: typeof ModalHeader;
|
|
138
|
+
}
|
|
139
|
+
export interface ModalProps extends ModalExtends {
|
|
140
|
+
/** Modal content */
|
|
141
|
+
children: ReactNode;
|
|
142
|
+
/** Control open Modal */
|
|
143
|
+
open: boolean;
|
|
144
|
+
/** Function to be passed on actioning the dismiss button */
|
|
145
|
+
onDismiss: (open: boolean) => void;
|
|
146
|
+
/** Modal ID */
|
|
147
|
+
portalId?: string;
|
|
148
|
+
/** Modal padding */
|
|
149
|
+
padding?: keyof typeof modal.properties.padding;
|
|
150
|
+
}
|
|
151
|
+
export declare const Modal: React.FC<ModalProps> & ModalComponents;
|
|
152
|
+
|
|
153
|
+
export {
|
|
154
|
+
Modal as default,
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export {};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@floating-ui/react-dom-interactions"),require("@tiendanube/icons"),require("@nimbus-ds/icon"),require("@nimbus-ds/styles"),require("@nimbus-ds/title")):"function"==typeof define&&define.amd?define(["react","@floating-ui/react-dom-interactions","@tiendanube/icons","@nimbus-ds/icon","@nimbus-ds/styles","@nimbus-ds/title"],t):"object"==typeof exports?exports["@nimbus-ds/modal"]=t(require("react"),require("@floating-ui/react-dom-interactions"),require("@tiendanube/icons"),require("@nimbus-ds/icon"),require("@nimbus-ds/styles"),require("@nimbus-ds/title")):e["@nimbus-ds/modal"]=t(e.react,e["@floating-ui/react-dom-interactions"],e["@tiendanube/icons"],e["@nimbus-ds/icon"],e["@nimbus-ds/styles"],e["@nimbus-ds/title"])}(self,((e,t,r,o,n,a)=>(()=>{"use strict";var i={960:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;const o=r(15).__importDefault(r(156)),n=r(105),a=r(948),i=r(633),l=r(990),c=r(612),u=({className:e,style:t,children:r,padding:c="base",maxWidth:u={xs:"100%",md:"500px"},open:s,portalId:d,onDismiss:f,...p})=>{const{className:y,style:m,otherProps:b}=l.modal.sprinkle({...p,maxWidth:u,padding:c}),{context:v}=(0,n.useFloating)({open:s,onOpenChange:f}),_=(0,n.useClick)(v),h=(0,n.useRole)(v),w=(0,n.useDismiss)(v,{outsidePressEvent:"mousedown"}),{getFloatingProps:g}=(0,n.useInteractions)([_,h,w]),O=(0,n.useId)(),j=(0,n.useId)();return o.default.createElement(n.FloatingPortal,{id:d||"nimbus-modal-floating"},s&&o.default.createElement(n.FloatingOverlay,{className:l.modal.classnames.overlay,lockScroll:!0},o.default.createElement(n.FloatingFocusManager,{context:v},o.default.createElement("div",{...b,style:m,className:[l.modal.classnames.container,y].join(" "),"aria-labelledby":O,"aria-describedby":j,...g(),...p},r,f&&o.default.createElement("button",{"aria-label":"Dismiss modal",className:l.modal.classnames.close,"data-testid":"dismiss-modal-button",type:"button",onClick:()=>f(!s),tabIndex:0},o.default.createElement(i.Icon,{color:"neutral.textLow",source:o.default.createElement(a.CloseIcon,null)}))))))};t.Modal=u,u.Body=c.ModalBody,u.Footer=c.ModalFooter,u.Header=c.ModalHeader,u.displayName="Modal",u.Body.displayName="Modal.Body",u.Footer.displayName="Modal.Footer",u.Header.displayName="Modal.Header"},635:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ModalBody=void 0;const o=r(15).__importDefault(r(156)),n=r(990);t.ModalBody=({className:e,style:t,padding:r="none",children:a,...i})=>{const{className:l,style:c,otherProps:u}=n.modal.sprinkle({...i,padding:r});return o.default.createElement("div",{...u,style:c,className:[n.modal.classnames.body,l].join(" "),...i},a)}},141:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ModalBody=void 0;const o=r(635);var n=r(635);Object.defineProperty(t,"ModalBody",{enumerable:!0,get:function(){return n.ModalBody}}),t.default=o.ModalBody},986:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ModalFooter=void 0;const o=r(15).__importDefault(r(156)),n=r(990);t.ModalFooter=({className:e,style:t,children:r,...a})=>o.default.createElement("div",{className:n.modal.classnames.footer,...a},r)},97:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ModalFooter=void 0;const o=r(986);var n=r(986);Object.defineProperty(t,"ModalFooter",{enumerable:!0,get:function(){return n.ModalFooter}}),t.default=o.ModalFooter},112:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ModalHeader=void 0;const o=r(15).__importDefault(r(156)),n=r(892),a=r(990);t.ModalHeader=({className:e,style:t,title:r,children:i,...l})=>o.default.createElement("div",{...l,className:a.modal.classnames.header},r&&o.default.createElement(n.Title,{"data-testid":"header-title",as:"h3"},r),i)},558:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ModalHeader=void 0;const o=r(112);var n=r(112);Object.defineProperty(t,"ModalHeader",{enumerable:!0,get:function(){return n.ModalHeader}}),t.default=o.ModalHeader},612:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const o=r(15);o.__exportStar(r(141),t),o.__exportStar(r(97),t),o.__exportStar(r(558),t)},15:(e,t,r)=>{r.r(t),r.d(t,{__assign:()=>a,__asyncDelegator:()=>g,__asyncGenerator:()=>w,__asyncValues:()=>O,__await:()=>h,__awaiter:()=>s,__classPrivateFieldGet:()=>S,__classPrivateFieldIn:()=>F,__classPrivateFieldSet:()=>E,__createBinding:()=>f,__decorate:()=>l,__exportStar:()=>p,__extends:()=>n,__generator:()=>d,__importDefault:()=>x,__importStar:()=>M,__makeTemplateObject:()=>j,__metadata:()=>u,__param:()=>c,__read:()=>m,__rest:()=>i,__spread:()=>b,__spreadArray:()=>_,__spreadArrays:()=>v,__values:()=>y});var o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},o(e,t)};function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return a=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},a.apply(this,arguments)};function i(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r}function l(e,t,r,o){var n,a=arguments.length,i=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(i=(a<3?n(i):a>3?n(t,r,i):n(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function c(e,t){return function(r,o){t(r,o,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function s(e,t,r,o){return new(r||(r=Promise))((function(n,a){function i(e){try{c(o.next(e))}catch(e){a(e)}}function l(e){try{c(o.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,l)}c((o=o.apply(e,t||[])).next())}))}function d(e,t){var r,o,n,a,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,o&&(n=2&a[0]?o.return:a[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,a[1])).done)return n;switch(o=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,o=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(n=i.trys,(n=n.length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){i.label=a[1];break}if(6===a[0]&&i.label<n[1]){i.label=n[1],n=a;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(a);break}n[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],o=0}finally{r=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}var f=Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]};function p(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||f(t,e,r)}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,n,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i}function b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function v(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var o=Array(e),n=0;for(t=0;t<r;t++)for(var a=arguments[t],i=0,l=a.length;i<l;i++,n++)o[n]=a[i];return o}function _(e,t,r){if(r||2===arguments.length)for(var o,n=0,a=t.length;n<a;n++)!o&&n in t||(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function h(e){return this instanceof h?(this.v=e,this):new h(e)}function w(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,n=r.apply(e,t||[]),a=[];return o={},i("next"),i("throw"),i("return"),o[Symbol.asyncIterator]=function(){return this},o;function i(e){n[e]&&(o[e]=function(t){return new Promise((function(r,o){a.push([e,t,r,o])>1||l(e,t)}))})}function l(e,t){try{(r=n[e](t)).value instanceof h?Promise.resolve(r.value.v).then(c,u):s(a[0][2],r)}catch(e){s(a[0][3],e)}var r}function c(e){l("next",e)}function u(e){l("throw",e)}function s(e,t){e(t),a.shift(),a.length&&l(a[0][0],a[0][1])}}function g(e){var t,r;return t={},o("next"),o("throw",(function(e){throw e})),o("return"),t[Symbol.iterator]=function(){return this},t;function o(o,n){t[o]=e[o]?function(t){return(r=!r)?{value:h(e[o](t)),done:"return"===o}:n?n(t):t}:n}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=y(e),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(r){t[r]=e[r]&&function(t){return new Promise((function(o,n){(function(e,t,r,o){Promise.resolve(o).then((function(t){e({value:t,done:r})}),t)})(o,n,(t=e[r](t)).done,t.value)}))}}}function j(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var P=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function M(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&f(t,e,r);return P(t,e),t}function x(e){return e&&e.__esModule?e:{default:e}}function S(e,t,r,o){if("a"===r&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?o:"a"===r?o.call(e):o?o.value:t.get(e)}function E(e,t,r,o,n){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?n.call(e,r):n?n.value=r:t.set(e,r),r}function F(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},105:e=>{e.exports=t},633:e=>{e.exports=o},990:e=>{e.exports=n},892:e=>{e.exports=a},948:e=>{e.exports=r},156:t=>{t.exports=e}},l={};function c(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={exports:{}};return i[e](r,r.exports,c),r.exports}c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return(()=>{var e=u;Object.defineProperty(e,"__esModule",{value:!0}),e.Modal=void 0;const t=c(960);var r=c(960);Object.defineProperty(e,"Modal",{enumerable:!0,get:function(){return r.Modal}}),e.default=t.Modal})(),u})()));
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nimbus-ds/modal",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist",
|
|
8
|
+
"README.md"
|
|
9
|
+
],
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "webpack",
|
|
13
|
+
"clean": "rm -rf dist",
|
|
14
|
+
"version": "yarn version"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@floating-ui/react-dom-interactions": "^0.10.1",
|
|
18
|
+
"@nimbus-ds/icon": "^2.0.0",
|
|
19
|
+
"@tiendanube/icons": "^0.3.1"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"react": "^16.8 || ^17.0 || ^18.0",
|
|
23
|
+
"react-dom": "^16.8 || ^17.0 || ^18.0"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://nimbus.nuvemshop.com.br/documentation",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/TiendaNube/nimbus-design-system.git"
|
|
29
|
+
},
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/TiendaNube/nimbus-design-system/issues"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@nimbus-ds/box": "^2.1.0",
|
|
35
|
+
"@nimbus-ds/button": "^2.0.0",
|
|
36
|
+
"@nimbus-ds/stack": "^2.0.0",
|
|
37
|
+
"@nimbus-ds/text": "^5.0.0",
|
|
38
|
+
"@nimbus-ds/title": "^2.0.0",
|
|
39
|
+
"webpack": "^5.74.0"
|
|
40
|
+
}
|
|
41
|
+
}
|