@superdispatch/ui-lab 0.25.0 → 0.25.1
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 +8 -5
- package/dist-node/index.js.map +1 -1
- package/dist-src/button/Button.js +8 -5
- package/dist-web/index.js +8 -5
- package/dist-web/index.js.map +1 -1
- package/package.json +2 -2
package/dist-node/index.js
CHANGED
|
@@ -331,6 +331,7 @@ function createButtonVariables(size, _ref) {
|
|
|
331
331
|
textColor = ui.Color.Transparent,
|
|
332
332
|
textColorHovered = textColor,
|
|
333
333
|
textColorDisabled = textColor,
|
|
334
|
+
iconColor = textColor,
|
|
334
335
|
outlineColor = ui.Color.Transparent,
|
|
335
336
|
borderColor = ui.Color.Transparent,
|
|
336
337
|
borderColorHovered = borderColor,
|
|
@@ -359,7 +360,8 @@ function createButtonVariables(size, _ref) {
|
|
|
359
360
|
backgroundColorActive,
|
|
360
361
|
textColorDisabled,
|
|
361
362
|
borderColorDisabled,
|
|
362
|
-
backgroundColorDisabled
|
|
363
|
+
backgroundColorDisabled,
|
|
364
|
+
iconColor
|
|
363
365
|
};
|
|
364
366
|
}
|
|
365
367
|
|
|
@@ -389,7 +391,8 @@ function getNeutralVariables(size) {
|
|
|
389
391
|
borderColorHovered: ui.Color.Blue500,
|
|
390
392
|
backgroundColorHovered: ui.Color.Blue50,
|
|
391
393
|
backgroundColorActive: ui.Color.Blue75,
|
|
392
|
-
textColorDisabled: ui.Color.Silver500
|
|
394
|
+
textColorDisabled: ui.Color.Silver500,
|
|
395
|
+
iconColor: ui.Color.Dark100
|
|
393
396
|
});
|
|
394
397
|
}
|
|
395
398
|
|
|
@@ -454,7 +457,7 @@ var ButtonRoot$1 = /*#__PURE__*/styled__default.button.withConfig({
|
|
|
454
457
|
fullWidth
|
|
455
458
|
} = _ref2;
|
|
456
459
|
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);
|
|
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:",";span{svg{fill:",";}}}}&: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.textColorHovered, variables.backgroundColorActive, fullWidth ? '100%' : 'auto', theme.typography.fontFamily, theme.typography.fontWeightBold, theme.transitions.create(['color', 'box-shadow', 'background-color']));
|
|
460
|
+
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-icon-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:",";--button-icon-color:",";&[aria-busy=\'true\']{--button-visibility:hidden;}}&[aria-disabled=\'false\']{&[aria-expanded=\'true\']{--button-text-color:",";--button-border-color:",";--button-background-color:",";--button-icon-color:",";}&,&[aria-expanded=\'true\']{&:focus{--button-outline-color:",";}@media (hover:hover) and (pointer:fine){&:hover{--button-text-color:",";--button-border-color:",";--button-background-color:",";span{svg{fill:",";}}}}&: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.iconColor, 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.textColorDisabled, variables.textColorHovered, variables.borderColorHovered, variables.backgroundColorHovered, variables.textColorHovered, variables.outlineColor, variables.textColorHovered, variables.borderColorHovered, variables.backgroundColorHovered, variables.textColorHovered, variables.backgroundColorActive, fullWidth ? '100%' : 'auto', theme.typography.fontFamily, theme.typography.fontWeightBold, theme.transitions.create(['color', 'box-shadow', 'background-color']));
|
|
458
461
|
});
|
|
459
462
|
var ButtonLabel = /*#__PURE__*/styled__default.span.withConfig({
|
|
460
463
|
displayName: "Button__ButtonLabel",
|
|
@@ -463,11 +466,11 @@ var ButtonLabel = /*#__PURE__*/styled__default.span.withConfig({
|
|
|
463
466
|
var ButtonStartIcon = /*#__PURE__*/styled__default.span.withConfig({
|
|
464
467
|
displayName: "Button__ButtonStartIcon",
|
|
465
468
|
componentId: "SD__sc-1pwdpe3-2"
|
|
466
|
-
})(["margin-right:4px;"]);
|
|
469
|
+
})(["margin-right:4px;color:var(--button-icon-color);"]);
|
|
467
470
|
var ButtonEndIcon = /*#__PURE__*/styled__default.span.withConfig({
|
|
468
471
|
displayName: "Button__ButtonEndIcon",
|
|
469
472
|
componentId: "SD__sc-1pwdpe3-3"
|
|
470
|
-
})(["margin-left:4px;"]);
|
|
473
|
+
})(["margin-left:4px;color:var(--button-icon-color);"]);
|
|
471
474
|
var ButtonPendingIndicator = /*#__PURE__*/styled__default.span.withConfig({
|
|
472
475
|
displayName: "Button__ButtonPendingIndicator",
|
|
473
476
|
componentId: "SD__sc-1pwdpe3-4"
|