@nimbus-ds/box 4.3.0 → 4.3.2
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 +14 -0
- package/dist/CHANGELOG.md +14 -0
- package/dist/index.d.ts +29 -14
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
A low-level utility component that accepts styled system props to enable custom theme-aware styling
|
|
4
4
|
|
|
5
|
+
## 2025-11-11 `4.3.2`
|
|
6
|
+
|
|
7
|
+
#### 🎉 New features
|
|
8
|
+
|
|
9
|
+
- Fixed `active` dynamic property getting overridden by `hover` property. ([#379](https://github.com/TiendaNube/nimbus-design-system/pull/379) by [@joacotornello](https://github.com/joacotornello))
|
|
10
|
+
- Improved accessibility of `Box` component when rendered as `button`. ([#379](https://github.com/TiendaNube/nimbus-design-system/pull/379) by [@joacotornello](https://github.com/joacotornello))
|
|
11
|
+
- Added `asButton` story to `Box` component. ([#379](https://github.com/TiendaNube/nimbus-design-system/pull/379) by [@joacotornello](https://github.com/joacotornello))
|
|
12
|
+
|
|
13
|
+
## 2025-09-17 `4.3.1`
|
|
14
|
+
|
|
15
|
+
#### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Fixed `ai-generative-interactive` and `ai-generative-interactive-border` options to match Nimbus AI gradient style. ([#352](https://github.com/TiendaNube/nimbus-design-system/pull/352) by [@joacotornello](https://github.com/joacotornello))
|
|
18
|
+
|
|
5
19
|
## 2025-09-16 `4.3.0`
|
|
6
20
|
|
|
7
21
|
#### 🎉 New features
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
A low-level utility component that accepts styled system props to enable custom theme-aware styling
|
|
4
4
|
|
|
5
|
+
## 2025-11-11 `4.3.2`
|
|
6
|
+
|
|
7
|
+
#### 🎉 New features
|
|
8
|
+
|
|
9
|
+
- Fixed `active` dynamic property getting overridden by `hover` property. ([#379](https://github.com/TiendaNube/nimbus-design-system/pull/379) by [@joacotornello](https://github.com/joacotornello))
|
|
10
|
+
- Improved accessibility of `Box` component when rendered as `button`. ([#379](https://github.com/TiendaNube/nimbus-design-system/pull/379) by [@joacotornello](https://github.com/joacotornello))
|
|
11
|
+
- Added `asButton` story to `Box` component. ([#379](https://github.com/TiendaNube/nimbus-design-system/pull/379) by [@joacotornello](https://github.com/joacotornello))
|
|
12
|
+
|
|
13
|
+
## 2025-09-17 `4.3.1`
|
|
14
|
+
|
|
15
|
+
#### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Fixed `ai-generative-interactive` and `ai-generative-interactive-border` options to match Nimbus AI gradient style. ([#352](https://github.com/TiendaNube/nimbus-design-system/pull/352) by [@joacotornello](https://github.com/joacotornello))
|
|
18
|
+
|
|
5
19
|
## 2025-09-16 `4.3.0`
|
|
6
20
|
|
|
7
21
|
#### 🎉 New features
|
package/dist/index.d.ts
CHANGED
|
@@ -110,7 +110,9 @@ declare const propertiesBox: {
|
|
|
110
110
|
"primary-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
111
111
|
"primary-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
112
112
|
"primary-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
113
|
-
"primary-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
113
|
+
"primary-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; /**
|
|
114
|
+
* The width property specifies the width of a box's content area.
|
|
115
|
+
*/
|
|
114
116
|
"success-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
115
117
|
"success-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
116
118
|
"success-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
@@ -125,12 +127,13 @@ declare const propertiesBox: {
|
|
|
125
127
|
"danger-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
126
128
|
"neutral-background": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
127
129
|
"neutral-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
128
|
-
"neutral-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
129
|
-
* The right property participates in specifying the horizontal position of a positioned box.
|
|
130
|
-
*/
|
|
130
|
+
"neutral-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
131
131
|
"neutral-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
132
132
|
"neutral-surfaceDisabled": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
133
133
|
"neutral-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
134
|
+
"neutral-textHigh": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
135
|
+
"ai-generative-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
136
|
+
"ai-generative-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
134
137
|
transparent: string;
|
|
135
138
|
};
|
|
136
139
|
background: {
|
|
@@ -143,7 +146,9 @@ declare const propertiesBox: {
|
|
|
143
146
|
"primary-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
144
147
|
"primary-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
145
148
|
"primary-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
146
|
-
"primary-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
149
|
+
"primary-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; /**
|
|
150
|
+
* The width property specifies the width of a box's content area.
|
|
151
|
+
*/
|
|
147
152
|
"success-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
148
153
|
"success-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
149
154
|
"success-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
@@ -158,12 +163,13 @@ declare const propertiesBox: {
|
|
|
158
163
|
"danger-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
159
164
|
"neutral-background": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
160
165
|
"neutral-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
161
|
-
"neutral-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
162
|
-
* The right property participates in specifying the horizontal position of a positioned box.
|
|
163
|
-
*/
|
|
166
|
+
"neutral-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
164
167
|
"neutral-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
165
168
|
"neutral-surfaceDisabled": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
166
169
|
"neutral-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
170
|
+
"neutral-textHigh": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
171
|
+
"ai-generative-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
172
|
+
"ai-generative-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
167
173
|
transparent: string;
|
|
168
174
|
};
|
|
169
175
|
borderColor: {
|
|
@@ -180,6 +186,10 @@ declare const propertiesBox: {
|
|
|
180
186
|
"danger-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
181
187
|
"danger-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
182
188
|
"neutral-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
189
|
+
/**
|
|
190
|
+
* The gridArea shorthand property specifies a grid item's size and location within a grid by contributing a line,
|
|
191
|
+
* a span, or nothing (automatic) to its grid placement, thereby specifying the edges of its grid area.
|
|
192
|
+
*/
|
|
183
193
|
"neutral-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
184
194
|
"neutral-surfaceDisabled": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
185
195
|
"neutral-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
@@ -201,7 +211,9 @@ declare const propertiesBox: {
|
|
|
201
211
|
borderWidth: {
|
|
202
212
|
"1": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
203
213
|
"2": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
204
|
-
"3": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
214
|
+
"3": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; /**
|
|
215
|
+
* The gap property sets the gaps between rows and columns. It is a shorthand for rowGap and columnGap.
|
|
216
|
+
*/
|
|
205
217
|
"4": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
206
218
|
"5": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
207
219
|
none: string;
|
|
@@ -320,12 +332,12 @@ declare const propertiesBox: {
|
|
|
320
332
|
"18": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
321
333
|
"20": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
322
334
|
h1: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
323
|
-
h2: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
324
|
-
* This defines the ability for a flex item to shrink if necessary.
|
|
325
|
-
*/
|
|
335
|
+
h2: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
326
336
|
h3: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
327
337
|
h4: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
328
|
-
h5: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
338
|
+
h5: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; /**
|
|
339
|
+
* This defines the ability for a flex item to grow if necessary.
|
|
340
|
+
*/
|
|
329
341
|
h6: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
330
342
|
};
|
|
331
343
|
lineHeight: {
|
|
@@ -350,7 +362,9 @@ declare const propertiesBox: {
|
|
|
350
362
|
"16": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
351
363
|
"18": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
352
364
|
"20": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
353
|
-
h1: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
365
|
+
h1: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; /**
|
|
366
|
+
* The flexWrap property sets whether flex items are forced onto one line or can wrap onto multiple lines.
|
|
367
|
+
*/
|
|
354
368
|
h2: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
355
369
|
h3: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
356
370
|
h4: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
@@ -376,6 +390,7 @@ export type BoxLineHeightProperties = keyof typeof propertiesBox.lineHeight;
|
|
|
376
390
|
export type BoxBackgroundProperties = keyof typeof propertiesBox.background;
|
|
377
391
|
export interface BoxConditions<T> extends Conditions<T> {
|
|
378
392
|
focus?: T;
|
|
393
|
+
focusVisible?: T;
|
|
379
394
|
focusWithin?: T;
|
|
380
395
|
active?: T;
|
|
381
396
|
hover?: T;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/styles")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/styles"],t):"object"==typeof exports?exports["@nimbus-ds/box"]=t(require("react"),require("@nimbus-ds/styles")):e["@nimbus-ds/box"]=t(e.react,e["@nimbus-ds/styles"])}(global,((e,t)=>(()=>{"use strict";var r={971:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Box=void 0;const n=r(769).__importStar(r(155)),o=r(367),a=(0,n.forwardRef)((({className:e,style:t,as:r="div",boxSizing:a="border-box",...i},c)=>{const{className:s,style:u,otherProps:l}=o.box.sprinkle({...i,boxSizing:a});return n.default.createElement(r,{ref:c,className:s,style:u,...l})}));t.Box=a,a.displayName="Box"},367:e=>{e.exports=t},155:t=>{t.exports=e},769:(e,t,r)=>{r.r(t),r.d(t,{__addDisposableResource:()=>B,__assign:()=>a,__asyncDelegator:()=>P,__asyncGenerator:()=>x,__asyncValues:()=>S,__await:()=>j,__awaiter:()=>d,__classPrivateFieldGet:()=>I,__classPrivateFieldIn:()=>A,__classPrivateFieldSet:()=>R,__createBinding:()=>b,__decorate:()=>c,__disposeResources:()=>M,__esDecorate:()=>u,__exportStar:()=>v,__extends:()=>o,__generator:()=>_,__importDefault:()=>k,__importStar:()=>D,__makeTemplateObject:()=>E,__metadata:()=>y,__param:()=>s,__propKey:()=>f,__read:()=>w,__rest:()=>i,__runInitializers:()=>l,__setFunctionName:()=>p,__spread:()=>m,__spreadArray:()=>O,__spreadArrays:()=>g,__values:()=>h,default:()=>z});var n=function(e,t){return n=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])},n(e,t)};function o(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}n(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,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function i(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function c(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function s(e,t){return function(r,n){t(r,n,e)}}function u(e,t,r,n,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var c,s=n.kind,u="getter"===s?"get":"setter"===s?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),p=!1,y=r.length-1;y>=0;y--){var d={};for(var _ in n)d[_]="access"===_?{}:n[_];for(var _ in n.access)d.access[_]=n.access[_];d.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var b=(0,r[y])("accessor"===s?{get:f.get,set:f.set}:f[u],d);if("accessor"===s){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(c=i(b.get))&&(f.get=c),(c=i(b.set))&&(f.set=c),(c=i(b.init))&&o.unshift(c)}else(c=i(b))&&("field"===s?o.unshift(c):f[u]=c)}l&&Object.defineProperty(l,n.name,f),p=!0}function l(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function y(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function d(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function c(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}s((n=n.apply(e,t||[])).next())}))}function _(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}}var b=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function v(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||b(t,e,r)}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(w(arguments[t]));return e}function g(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var a=arguments[t],i=0,c=a.length;i<c;i++,o++)n[o]=a[i];return n}function O(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function j(e){return this instanceof j?(this.v=e,this):new j(e)}function x(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),a=[];return n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n;function i(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){a.push([e,t,r,n])>1||c(e,t)}))})}function c(e,t){try{(r=o[e](t)).value instanceof j?Promise.resolve(r.value.v).then(s,u):l(a[0][2],r)}catch(e){l(a[0][3],e)}var r}function s(e){c("next",e)}function u(e){c("throw",e)}function l(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function P(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:j(e[n](t)),done:!1}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=h(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function D(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)&&b(t,e,r);return T(t,e),t}function k(e){return e&&e.__esModule?e:{default:e}}function I(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function R(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function A(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)}function B(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var F="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function M(e){function t(t){e.error=e.hasError?new F(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,(function(e){return t(e),r()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}const z={__extends:o,__assign:a,__rest:i,__decorate:c,__param:s,__metadata:y,__awaiter:d,__generator:_,__createBinding:b,__exportStar:v,__values:h,__read:w,__spread:m,__spreadArrays:g,__spreadArray:O,__await:j,__asyncGenerator:x,__asyncDelegator:P,__asyncValues:S,__makeTemplateObject:E,__importStar:D,__importDefault:k,__classPrivateFieldGet:I,__classPrivateFieldSet:R,__classPrivateFieldIn:A,__addDisposableResource:B,__disposeResources:M}}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={exports:{}};return r[e](a,a.exports,o),a.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{var e=a;Object.defineProperty(e,"__esModule",{value:!0}),e.Box=void 0;const t=o(971);var r=o(971);Object.defineProperty(e,"Box",{enumerable:!0,get:function(){return r.Box}}),e.default=t.Box})(),a})()));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/styles")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/styles"],t):"object"==typeof exports?exports["@nimbus-ds/box"]=t(require("react"),require("@nimbus-ds/styles")):e["@nimbus-ds/box"]=t(e.react,e["@nimbus-ds/styles"])}(global,((e,t)=>(()=>{"use strict";var r={971:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Box=void 0;const n=r(769).__importStar(r(155)),o=r(367),a=(0,n.forwardRef)((({className:e,style:t,as:r="div",boxSizing:a="border-box",...i},c)=>{const s="button"===r,{className:u,style:l,otherProps:f}=o.box.sprinkle({...i,boxSizing:a}),p=[u,s&&o.box.asButton].filter(Boolean).join(" ");return n.default.createElement(r,{ref:c,className:p,style:l,...f})}));t.Box=a,a.displayName="Box"},367:e=>{e.exports=t},155:t=>{t.exports=e},769:(e,t,r)=>{r.r(t),r.d(t,{__addDisposableResource:()=>A,__assign:()=>a,__asyncDelegator:()=>P,__asyncGenerator:()=>x,__asyncValues:()=>S,__await:()=>j,__awaiter:()=>d,__classPrivateFieldGet:()=>I,__classPrivateFieldIn:()=>R,__classPrivateFieldSet:()=>B,__createBinding:()=>b,__decorate:()=>c,__disposeResources:()=>M,__esDecorate:()=>u,__exportStar:()=>v,__extends:()=>o,__generator:()=>_,__importDefault:()=>k,__importStar:()=>D,__makeTemplateObject:()=>E,__metadata:()=>y,__param:()=>s,__propKey:()=>f,__read:()=>w,__rest:()=>i,__runInitializers:()=>l,__setFunctionName:()=>p,__spread:()=>m,__spreadArray:()=>O,__spreadArrays:()=>g,__values:()=>h,default:()=>z});var n=function(e,t){return n=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])},n(e,t)};function o(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}n(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,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function i(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function c(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function s(e,t){return function(r,n){t(r,n,e)}}function u(e,t,r,n,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var c,s=n.kind,u="getter"===s?"get":"setter"===s?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),p=!1,y=r.length-1;y>=0;y--){var d={};for(var _ in n)d[_]="access"===_?{}:n[_];for(var _ in n.access)d.access[_]=n.access[_];d.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var b=(0,r[y])("accessor"===s?{get:f.get,set:f.set}:f[u],d);if("accessor"===s){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(c=i(b.get))&&(f.get=c),(c=i(b.set))&&(f.set=c),(c=i(b.init))&&o.unshift(c)}else(c=i(b))&&("field"===s?o.unshift(c):f[u]=c)}l&&Object.defineProperty(l,n.name,f),p=!0}function l(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function y(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function d(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function c(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}s((n=n.apply(e,t||[])).next())}))}function _(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}}var b=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function v(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||b(t,e,r)}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(w(arguments[t]));return e}function g(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var a=arguments[t],i=0,c=a.length;i<c;i++,o++)n[o]=a[i];return n}function O(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function j(e){return this instanceof j?(this.v=e,this):new j(e)}function x(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),a=[];return n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n;function i(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){a.push([e,t,r,n])>1||c(e,t)}))})}function c(e,t){try{(r=o[e](t)).value instanceof j?Promise.resolve(r.value.v).then(s,u):l(a[0][2],r)}catch(e){l(a[0][3],e)}var r}function s(e){c("next",e)}function u(e){c("throw",e)}function l(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function P(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:j(e[n](t)),done:!1}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=h(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function D(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)&&b(t,e,r);return T(t,e),t}function k(e){return e&&e.__esModule?e:{default:e}}function I(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function B(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function R(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)}function A(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var F="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function M(e){function t(t){e.error=e.hasError?new F(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,(function(e){return t(e),r()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}const z={__extends:o,__assign:a,__rest:i,__decorate:c,__param:s,__metadata:y,__awaiter:d,__generator:_,__createBinding:b,__exportStar:v,__values:h,__read:w,__spread:m,__spreadArrays:g,__spreadArray:O,__await:j,__asyncGenerator:x,__asyncDelegator:P,__asyncValues:S,__makeTemplateObject:E,__importStar:D,__importDefault:k,__classPrivateFieldGet:I,__classPrivateFieldSet:B,__classPrivateFieldIn:R,__addDisposableResource:A,__disposeResources:M}}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={exports:{}};return r[e](a,a.exports,o),a.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{var e=a;Object.defineProperty(e,"__esModule",{value:!0}),e.Box=void 0;const t=o(971);var r=o(971);Object.defineProperty(e,"Box",{enumerable:!0,get:function(){return r.Box}}),e.default=t.Box})(),a})()));
|