@mmb-digital/design-system-web 0.1.51 → 0.1.52
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/dist/index.cjs.js +17 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +17 -5
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -196,22 +196,29 @@
|
|
|
196
196
|
flex-direction: row;
|
|
197
197
|
gap: ${({theme:e})=>e.spacing.xl};
|
|
198
198
|
align-items: center;
|
|
199
|
-
`;var ge,be,ve;exports.ButtonStyle=void 0,(ge=exports.ButtonStyle||(exports.ButtonStyle={})).PRIMARY="primary",ge.SECONDARY="secondary",ge.TERTIARY="tertiary",exports.ButtonSize=void 0,(be=exports.ButtonSize||(exports.ButtonSize={})).MD="md",be.SM="sm",be.XL="xl",be.XS="xs",be.XXL="xxl",exports.ButtonType=void 0,(ve=exports.ButtonType||(exports.ButtonType={})).BUTTON="button",ve.RESET="reset",ve.SUBMIT="submit";const ye=t.button`
|
|
199
|
+
`;var ge,be,ve;exports.ButtonStyle=void 0,(ge=exports.ButtonStyle||(exports.ButtonStyle={})).PRIMARY="primary",ge.SECONDARY="secondary",ge.TERTIARY="tertiary",exports.ButtonSize=void 0,(be=exports.ButtonSize||(exports.ButtonSize={})).MD="md",be.SM="sm",be.XL="xl",be.XS="xs",be.XXL="xxl",exports.ButtonType=void 0,(ve=exports.ButtonType||(exports.ButtonType={})).ANCHOR="anchor",ve.BUTTON="button",ve.RESET="reset",ve.SUBMIT="submit";const ye=t.button`
|
|
200
200
|
/* common styles */
|
|
201
|
+
box-sizing: border-box;
|
|
201
202
|
display: flex;
|
|
202
203
|
flex-shrink: 0;
|
|
203
204
|
align-items: center;
|
|
204
205
|
justify-content: center;
|
|
205
|
-
width: ${({fullWidth:e})=>!0===e?"100%":"initial"};
|
|
206
|
+
width: ${({$fullWidth:e,$type:t})=>!0===e?"100%":t===exports.ButtonType.ANCHOR?"fit-content":"initial"};
|
|
207
|
+
text-decoration: none;
|
|
206
208
|
cursor: pointer;
|
|
207
209
|
|
|
210
|
+
&:hover {
|
|
211
|
+
text-decoration: none;
|
|
212
|
+
}
|
|
213
|
+
|
|
208
214
|
/* type specific styles */
|
|
209
|
-
${({buttonStyle:e})=>{switch(e){case exports.ButtonStyle.PRIMARY:return t.css`
|
|
215
|
+
${({$buttonStyle:e})=>{switch(e){case exports.ButtonStyle.PRIMARY:return t.css`
|
|
210
216
|
color: ${({theme:e})=>e.colors.fg.neutral.white.light};
|
|
211
217
|
background-color: ${({theme:e})=>e.colors.bg.brand.bold.light};
|
|
212
218
|
border: 1px solid ${({theme:e})=>e.colors.border.brand.bold.light};
|
|
213
219
|
|
|
214
220
|
&:hover {
|
|
221
|
+
color: ${({theme:e})=>e.colors.fg.neutral.white.light};
|
|
215
222
|
background-color: ${({theme:e})=>e.colors.bg.brand.bold.hover.light};
|
|
216
223
|
}
|
|
217
224
|
|
|
@@ -242,6 +249,10 @@
|
|
|
242
249
|
border: 2px solid ${({theme:e})=>e.colors.border.brand.subtle.light};
|
|
243
250
|
}
|
|
244
251
|
|
|
252
|
+
&:hover {
|
|
253
|
+
color: ${({theme:e})=>e.colors.fg.neutral.subtle.light};
|
|
254
|
+
}
|
|
255
|
+
|
|
245
256
|
&:disabled {
|
|
246
257
|
color: ${({theme:e})=>e.colors.fg.disabled.light};
|
|
247
258
|
background-color: ${({theme:e})=>e.colors.bg.neutral.white.light};
|
|
@@ -259,6 +270,7 @@
|
|
|
259
270
|
border: none;
|
|
260
271
|
|
|
261
272
|
&:hover {
|
|
273
|
+
color: ${({theme:e})=>e.colors.fg.neutral.subtle.light};
|
|
262
274
|
background-color: ${({theme:e})=>e.colors.bg.brand.default.light};
|
|
263
275
|
}
|
|
264
276
|
|
|
@@ -277,7 +289,7 @@
|
|
|
277
289
|
`;default:return""}}}
|
|
278
290
|
|
|
279
291
|
/* size specific styles */
|
|
280
|
-
${({size:e})=>{switch(e){case exports.ButtonSize.XS:return t.css`
|
|
292
|
+
${({$size:e})=>{switch(e){case exports.ButtonSize.XS:return t.css`
|
|
281
293
|
gap: ${({theme:e})=>e.spacing.xxs};
|
|
282
294
|
min-height: ${({theme:e})=>e.spacing.xl};
|
|
283
295
|
padding: ${({theme:e})=>e.spacing.xxs} ${({theme:e})=>e.spacing.xs};
|
|
@@ -327,7 +339,7 @@
|
|
|
327
339
|
display: flex;
|
|
328
340
|
align-items: center;
|
|
329
341
|
height: 100%;
|
|
330
|
-
`,we=t=>{const{buttonStyle:n,children:r,disabled:o=!1,displayOnlyIcon:a=!1,fullWidth:i=!1,
|
|
342
|
+
`,we=t=>{const{buttonStyle:n,children:r,disabled:o=!1,displayOnlyIcon:a=!1,fullWidth:i=!1,href:s,iconLeft:l,iconRight:c,onClick:u,size:d,type:p=exports.ButtonType.BUTTON}=t;return e.createElement(ye,{$buttonStyle:n,$fullWidth:i,$size:d,$type:p,as:p===exports.ButtonType.ANCHOR?"a":void 0,disabled:o,href:s,onClick:u},void 0!==l&&e.createElement(xe,null,l),!a&&e.createElement(e.Fragment,null,r,void 0!==c&&e.createElement(xe,null,c)))};function ke(e){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(e)}function Ce(e){var t=function(e,t){if("object"!=ke(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ke(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ke(t)?t:String(t)}function Ie(e,t,n){return(t=Ce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(n),!0).forEach((function(t){Ie(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function De(e,t){if(e){if("string"==typeof e)return Te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Te(e,t):void 0}}function Me(e){return function(e){if(Array.isArray(e))return Te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||De(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Le(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||De(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ae="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ne(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Oe,Pe={exports:{}};
|
|
331
343
|
/*!
|
|
332
344
|
Copyright (c) 2018 Jed Watson.
|
|
333
345
|
Licensed under the MIT License (MIT), see
|