@superdispatch/ui-lab 0.24.4 → 0.24.6
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-node/index.js +27 -15
- package/dist-node/index.js.map +1 -1
- package/dist-src/button/Button.js +27 -15
- package/dist-types/index.d.ts +1 -1
- package/dist-web/index.js +27 -15
- package/dist-web/index.js.map +1 -1
- package/package.json +2 -2
package/dist-node/index.js
CHANGED
|
@@ -366,12 +366,12 @@ function createButtonVariables(size, _ref) {
|
|
|
366
366
|
function getDefaultVariables(size) {
|
|
367
367
|
return createButtonVariables(size, {
|
|
368
368
|
textColor: ui.Color.White,
|
|
369
|
-
outlineColor: ui.Color.
|
|
369
|
+
outlineColor: ui.Color.Blue30,
|
|
370
370
|
backgroundColor: ui.Color.Blue300,
|
|
371
371
|
textColorHovered: ui.Color.White,
|
|
372
372
|
backgroundColorHovered: ui.Color.Blue500,
|
|
373
373
|
backgroundColorActive: ui.Color.Blue400,
|
|
374
|
-
backgroundColorDisabled: ui.Color.
|
|
374
|
+
backgroundColorDisabled: ui.Color.Blue30
|
|
375
375
|
});
|
|
376
376
|
}
|
|
377
377
|
|
|
@@ -383,10 +383,10 @@ function getNeutralVariables(size) {
|
|
|
383
383
|
return createButtonVariables(size, {
|
|
384
384
|
textColor: ui.Color.Dark500,
|
|
385
385
|
borderColor: ui.Color.Silver500,
|
|
386
|
-
outlineColor: ui.Color.
|
|
386
|
+
outlineColor: ui.Color.Blue30,
|
|
387
387
|
backgroundColor: ui.Color.White,
|
|
388
|
-
textColorHovered: ui.Color.
|
|
389
|
-
borderColorHovered: ui.Color.
|
|
388
|
+
textColorHovered: ui.Color.Blue500,
|
|
389
|
+
borderColorHovered: ui.Color.Blue500,
|
|
390
390
|
backgroundColorHovered: ui.Color.Blue50,
|
|
391
391
|
backgroundColorActive: ui.Color.Blue75,
|
|
392
392
|
textColorDisabled: ui.Color.Silver500
|
|
@@ -395,26 +395,26 @@ function getNeutralVariables(size) {
|
|
|
395
395
|
|
|
396
396
|
function getCriticalVariables(size) {
|
|
397
397
|
return createButtonVariables(size, {
|
|
398
|
-
textColor: ui.Color.
|
|
399
|
-
borderColor: ui.Color.
|
|
400
|
-
outlineColor: ui.Color.
|
|
398
|
+
textColor: ui.Color.Red500,
|
|
399
|
+
borderColor: ui.Color.Red500,
|
|
400
|
+
outlineColor: ui.Color.Red30,
|
|
401
401
|
backgroundColor: ui.Color.Red50,
|
|
402
402
|
backgroundColorHovered: ui.Color.Red75,
|
|
403
|
-
backgroundColorActive: ui.Color.
|
|
404
|
-
textColorDisabled: ui.Color.
|
|
405
|
-
borderColorDisabled: ui.Color.
|
|
403
|
+
backgroundColorActive: ui.Color.Red10,
|
|
404
|
+
textColorDisabled: ui.Color.Red30,
|
|
405
|
+
borderColorDisabled: ui.Color.Red30,
|
|
406
406
|
backgroundColorDisabled: ui.Color.Red50
|
|
407
407
|
});
|
|
408
408
|
}
|
|
409
409
|
|
|
410
410
|
function getTextVariables(size) {
|
|
411
411
|
return createButtonVariables(size, {
|
|
412
|
-
textColor: ui.Color.
|
|
413
|
-
outlineColor: ui.Color.
|
|
412
|
+
textColor: ui.Color.Blue500,
|
|
413
|
+
outlineColor: ui.Color.Blue30,
|
|
414
414
|
textColorHovered: ui.Color.Blue500,
|
|
415
415
|
backgroundColorHovered: ui.Color.Blue50,
|
|
416
416
|
backgroundColorActive: ui.Color.Blue75,
|
|
417
|
-
textColorDisabled: ui.Color.
|
|
417
|
+
textColorDisabled: ui.Color.Blue30
|
|
418
418
|
});
|
|
419
419
|
}
|
|
420
420
|
|
|
@@ -431,6 +431,18 @@ function getInvertedVariables(size) {
|
|
|
431
431
|
});
|
|
432
432
|
}
|
|
433
433
|
|
|
434
|
+
function getSuccessVariables(size) {
|
|
435
|
+
return createButtonVariables(size, {
|
|
436
|
+
textColor: ui.Color.White,
|
|
437
|
+
outlineColor: ui.Color.Green30,
|
|
438
|
+
backgroundColor: ui.Color.Green300,
|
|
439
|
+
backgroundColorHovered: ui.Color.Green500,
|
|
440
|
+
backgroundColorActive: ui.Color.Green500,
|
|
441
|
+
textColorDisabled: ui.Color.White,
|
|
442
|
+
backgroundColorDisabled: ui.Color.Green30
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
|
|
434
446
|
var ButtonRoot$1 = /*#__PURE__*/styled__default.button.withConfig({
|
|
435
447
|
displayName: "Button__ButtonRoot",
|
|
436
448
|
componentId: "SD__sc-1pwdpe3-0"
|
|
@@ -441,7 +453,7 @@ var ButtonRoot$1 = /*#__PURE__*/styled__default.button.withConfig({
|
|
|
441
453
|
variant,
|
|
442
454
|
fullWidth
|
|
443
455
|
} = _ref2;
|
|
444
|
-
var variables = variant === 'primary' ? getPrimaryVariables(size) : variant === 'neutral' ? getNeutralVariables(size) : variant === 'critical' ? getCriticalVariables(size) : variant === 'text' ? getTextVariables(size) : variant === 'inverted' ? getInvertedVariables(size) : getDefaultVariables(size);
|
|
456
|
+
var variables = variant === 'primary' ? getPrimaryVariables(size) : variant === 'neutral' ? getNeutralVariables(size) : variant === 'critical' ? getCriticalVariables(size) : variant === 'text' ? getTextVariables(size) : variant === 'inverted' ? getInvertedVariables(size) : variant === 'success' ? getSuccessVariables(size) : getDefaultVariables(size);
|
|
445
457
|
return styled.css(JSON.parse('["border:0;margin:0;outline:0;position:relative;vertical-align:middle;cursor:pointer;text-decoration:none;&[aria-disabled=\'true\']{cursor:default;pointer-events:none;}-moz-appearance:none;&::-moz-focus-inner{border-style:none;}-webkit-appearance:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;@media print{-webkit-print-color-adjust:exact;}--button-visibility:visible;--button-text-color:",";--button-border-color:",";--button-outline-color:",";--button-background-color:",";--button-padding-x:","px;--button-padding-y:","px;--button-font-size:","px;--button-line-height:","px;","{--button-padding-x:","px;--button-padding-y:","px;--button-font-size:","px;--button-line-height:","px;}&[aria-disabled=\'true\']{--button-text-color:",";--button-border-color:",";--button-background-color:",";&[aria-busy=\'true\']{--button-visibility:hidden;}}&[aria-disabled=\'false\']{&[aria-expanded=\'true\']{--button-text-color:",";--button-border-color:",";--button-background-color:",";}&,&[aria-expanded=\'true\']{&:focus{--button-outline-color:",";}@media (hover:hover) and (pointer:fine){&:hover{--button-text-color:",";--button-border-color:",";--button-background-color:",";}}&:active{--button-background-color:",";}}}display:inline-flex;align-items:center;justify-content:center;min-width:48px;width:",";border-radius:4px;font-family:",";font-weight:",";color:var(--button-text-color);background-color:var(--button-background-color);font-size:var(--button-font-size);line-height:var(--button-line-height);padding:var(--button-padding-y) var(--button-padding-x);box-shadow:inset 0 0 0 1px var(--button-border-color),0 0 0 2px var(--button-outline-color);transition:",";"]'), variables.textColor, variables.borderColor, ui.Color.Transparent, variables.backgroundColor, variables.paddingXMobile, variables.paddingYMobile, variables.fontSizeMobile, variables.lineHeightMobile, theme.breakpoints.up('sm'), variables.paddingX, variables.paddingY, variables.fontSize, variables.lineHeight, variables.textColorDisabled, variables.borderColorDisabled, variables.backgroundColorDisabled, variables.textColorHovered, variables.borderColorHovered, variables.backgroundColorHovered, variables.outlineColor, variables.textColorHovered, variables.borderColorHovered, variables.backgroundColorHovered, variables.backgroundColorActive, fullWidth ? '100%' : 'auto', theme.typography.fontFamily, theme.typography.fontWeightBold, theme.transitions.create(['color', 'box-shadow', 'background-color']));
|
|
446
458
|
});
|
|
447
459
|
var ButtonLabel = /*#__PURE__*/styled__default.span.withConfig({
|