@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.
@@ -58,12 +58,12 @@ function createButtonVariables(size, _ref) {
58
58
  function getDefaultVariables(size) {
59
59
  return createButtonVariables(size, {
60
60
  textColor: Color.White,
61
- outlineColor: Color.Blue100,
61
+ outlineColor: Color.Blue30,
62
62
  backgroundColor: Color.Blue300,
63
63
  textColorHovered: Color.White,
64
64
  backgroundColorHovered: Color.Blue500,
65
65
  backgroundColorActive: Color.Blue400,
66
- backgroundColorDisabled: Color.Blue100
66
+ backgroundColorDisabled: Color.Blue30
67
67
  });
68
68
  }
69
69
 
@@ -75,10 +75,10 @@ function getNeutralVariables(size) {
75
75
  return createButtonVariables(size, {
76
76
  textColor: Color.Dark500,
77
77
  borderColor: Color.Silver500,
78
- outlineColor: Color.Blue100,
78
+ outlineColor: Color.Blue30,
79
79
  backgroundColor: Color.White,
80
- textColorHovered: Color.Blue300,
81
- borderColorHovered: Color.Blue300,
80
+ textColorHovered: Color.Blue500,
81
+ borderColorHovered: Color.Blue500,
82
82
  backgroundColorHovered: Color.Blue50,
83
83
  backgroundColorActive: Color.Blue75,
84
84
  textColorDisabled: Color.Silver500
@@ -87,26 +87,26 @@ function getNeutralVariables(size) {
87
87
 
88
88
  function getCriticalVariables(size) {
89
89
  return createButtonVariables(size, {
90
- textColor: Color.Red300,
91
- borderColor: Color.Red300,
92
- outlineColor: Color.Red75,
90
+ textColor: Color.Red500,
91
+ borderColor: Color.Red500,
92
+ outlineColor: Color.Red30,
93
93
  backgroundColor: Color.Red50,
94
94
  backgroundColorHovered: Color.Red75,
95
- backgroundColorActive: Color.Red100,
96
- textColorDisabled: Color.Red100,
97
- borderColorDisabled: Color.Red100,
95
+ backgroundColorActive: Color.Red10,
96
+ textColorDisabled: Color.Red30,
97
+ borderColorDisabled: Color.Red30,
98
98
  backgroundColorDisabled: Color.Red50
99
99
  });
100
100
  }
101
101
 
102
102
  function getTextVariables(size) {
103
103
  return createButtonVariables(size, {
104
- textColor: Color.Blue400,
105
- outlineColor: Color.Blue100,
104
+ textColor: Color.Blue500,
105
+ outlineColor: Color.Blue30,
106
106
  textColorHovered: Color.Blue500,
107
107
  backgroundColorHovered: Color.Blue50,
108
108
  backgroundColorActive: Color.Blue75,
109
- textColorDisabled: Color.Blue100
109
+ textColorDisabled: Color.Blue30
110
110
  });
111
111
  }
112
112
 
@@ -123,6 +123,18 @@ function getInvertedVariables(size) {
123
123
  });
124
124
  }
125
125
 
126
+ function getSuccessVariables(size) {
127
+ return createButtonVariables(size, {
128
+ textColor: Color.White,
129
+ outlineColor: Color.Green30,
130
+ backgroundColor: Color.Green300,
131
+ backgroundColorHovered: Color.Green500,
132
+ backgroundColorActive: Color.Green500,
133
+ textColorDisabled: Color.White,
134
+ backgroundColorDisabled: Color.Green30
135
+ });
136
+ }
137
+
126
138
  var ButtonRoot = /*#__PURE__*/styled.button.withConfig({
127
139
  displayName: "Button__ButtonRoot",
128
140
  componentId: "SD__sc-1pwdpe3-0"
@@ -133,7 +145,7 @@ var ButtonRoot = /*#__PURE__*/styled.button.withConfig({
133
145
  variant,
134
146
  fullWidth
135
147
  } = _ref2;
136
- var variables = variant === 'primary' ? getPrimaryVariables(size) : variant === 'neutral' ? getNeutralVariables(size) : variant === 'critical' ? getCriticalVariables(size) : variant === 'text' ? getTextVariables(size) : variant === 'inverted' ? getInvertedVariables(size) : getDefaultVariables(size);
148
+ 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);
137
149
  return 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, 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']));
138
150
  });
139
151
  var ButtonLabel = /*#__PURE__*/styled.span.withConfig({
@@ -93,7 +93,7 @@ interface ButtonAreaProps extends ButtonBaseProps {
93
93
  declare const ButtonArea: ForwardRefExoticComponent<Pick<ButtonAreaProps, "className" | "style" | "classes" | "innerRef" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "form" | "key" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "fullWidth" | "variant" | "action" | "buttonRef" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "TouchRippleProps" | "icon" | "active"> & RefAttributes<HTMLButtonElement>>;
94
94
 
95
95
  declare type ButtonSizeProp = 'small' | 'medium' | 'large';
96
- declare type ButtonVariantProp = 'critical' | 'default' | 'inverted' | 'neutral' | 'primary' | 'text';
96
+ declare type ButtonVariantProp = 'critical' | 'default' | 'inverted' | 'neutral' | 'primary' | 'text' | 'success';
97
97
  interface BaseButtonProps<T extends HTMLElement> extends Pick<AriaAttributes, 'aria-label' | 'aria-controls' | 'aria-haspopup' | 'aria-labelledby'> {
98
98
  active?: boolean;
99
99
  pending?: boolean;
package/dist-web/index.js CHANGED
@@ -359,12 +359,12 @@ function createButtonVariables(size, _ref) {
359
359
  function getDefaultVariables(size) {
360
360
  return createButtonVariables(size, {
361
361
  textColor: Color.White,
362
- outlineColor: Color.Blue100,
362
+ outlineColor: Color.Blue30,
363
363
  backgroundColor: Color.Blue300,
364
364
  textColorHovered: Color.White,
365
365
  backgroundColorHovered: Color.Blue500,
366
366
  backgroundColorActive: Color.Blue400,
367
- backgroundColorDisabled: Color.Blue100
367
+ backgroundColorDisabled: Color.Blue30
368
368
  });
369
369
  }
370
370
 
@@ -376,10 +376,10 @@ function getNeutralVariables(size) {
376
376
  return createButtonVariables(size, {
377
377
  textColor: Color.Dark500,
378
378
  borderColor: Color.Silver500,
379
- outlineColor: Color.Blue100,
379
+ outlineColor: Color.Blue30,
380
380
  backgroundColor: Color.White,
381
- textColorHovered: Color.Blue300,
382
- borderColorHovered: Color.Blue300,
381
+ textColorHovered: Color.Blue500,
382
+ borderColorHovered: Color.Blue500,
383
383
  backgroundColorHovered: Color.Blue50,
384
384
  backgroundColorActive: Color.Blue75,
385
385
  textColorDisabled: Color.Silver500
@@ -388,26 +388,26 @@ function getNeutralVariables(size) {
388
388
 
389
389
  function getCriticalVariables(size) {
390
390
  return createButtonVariables(size, {
391
- textColor: Color.Red300,
392
- borderColor: Color.Red300,
393
- outlineColor: Color.Red75,
391
+ textColor: Color.Red500,
392
+ borderColor: Color.Red500,
393
+ outlineColor: Color.Red30,
394
394
  backgroundColor: Color.Red50,
395
395
  backgroundColorHovered: Color.Red75,
396
- backgroundColorActive: Color.Red100,
397
- textColorDisabled: Color.Red100,
398
- borderColorDisabled: Color.Red100,
396
+ backgroundColorActive: Color.Red10,
397
+ textColorDisabled: Color.Red30,
398
+ borderColorDisabled: Color.Red30,
399
399
  backgroundColorDisabled: Color.Red50
400
400
  });
401
401
  }
402
402
 
403
403
  function getTextVariables(size) {
404
404
  return createButtonVariables(size, {
405
- textColor: Color.Blue400,
406
- outlineColor: Color.Blue100,
405
+ textColor: Color.Blue500,
406
+ outlineColor: Color.Blue30,
407
407
  textColorHovered: Color.Blue500,
408
408
  backgroundColorHovered: Color.Blue50,
409
409
  backgroundColorActive: Color.Blue75,
410
- textColorDisabled: Color.Blue100
410
+ textColorDisabled: Color.Blue30
411
411
  });
412
412
  }
413
413
 
@@ -424,6 +424,18 @@ function getInvertedVariables(size) {
424
424
  });
425
425
  }
426
426
 
427
+ function getSuccessVariables(size) {
428
+ return createButtonVariables(size, {
429
+ textColor: Color.White,
430
+ outlineColor: Color.Green30,
431
+ backgroundColor: Color.Green300,
432
+ backgroundColorHovered: Color.Green500,
433
+ backgroundColorActive: Color.Green500,
434
+ textColorDisabled: Color.White,
435
+ backgroundColorDisabled: Color.Green30
436
+ });
437
+ }
438
+
427
439
  var ButtonRoot$1 = /*#__PURE__*/styled.button.withConfig({
428
440
  displayName: "Button__ButtonRoot",
429
441
  componentId: "SD__sc-1pwdpe3-0"
@@ -434,7 +446,7 @@ var ButtonRoot$1 = /*#__PURE__*/styled.button.withConfig({
434
446
  variant,
435
447
  fullWidth
436
448
  } = _ref2;
437
- var variables = variant === 'primary' ? getPrimaryVariables(size) : variant === 'neutral' ? getNeutralVariables(size) : variant === 'critical' ? getCriticalVariables(size) : variant === 'text' ? getTextVariables(size) : variant === 'inverted' ? getInvertedVariables(size) : getDefaultVariables(size);
449
+ 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);
438
450
  return 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, 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']));
439
451
  });
440
452
  var ButtonLabel = /*#__PURE__*/styled.span.withConfig({