@mackin.com/styleguide 8.7.1 → 8.8.0

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.
Files changed (3) hide show
  1. package/index.d.ts +22 -1
  2. package/index.js +51 -12
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -212,15 +212,19 @@ interface FormProps extends BaseProps$3 {
212
212
  inline?: boolean;
213
213
  /** If true, preventDefault and stopPropagation will be applied prior to onSubmit being called. Defaults to true. */
214
214
  ajax?: boolean;
215
+ /** Removes the opinionated flex styling. 'inline' will be ignored. */
216
+ unstyled?: boolean;
215
217
  }
216
218
  /** Use this instead of <form> directly. If we need to fight Chrome's autofill, we can do so at a global level. */
217
- declare const Form: React.ForwardRefExoticComponent<Pick<FormProps, "inline" | "ajax" | "key" | "acceptCharset" | "action" | "autoComplete" | "encType" | "method" | "name" | "noValidate" | "target" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "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"> & React.RefAttributes<HTMLFormElement>>;
219
+ declare const Form: React.ForwardRefExoticComponent<Pick<FormProps, "inline" | "ajax" | "unstyled" | "key" | "acceptCharset" | "action" | "autoComplete" | "encType" | "method" | "name" | "noValidate" | "target" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "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"> & React.RefAttributes<HTMLFormElement>>;
220
+ /** @deprecated Just style normally using flex, grid, etc. */
218
221
  declare const FormFlexRow: (props: {
219
222
  children: React.ReactNode;
220
223
  className?: string;
221
224
  style?: React.CSSProperties;
222
225
  justifyContent?: "space-around" | "space-between" | "space-evenly" | "stretch" | "center" | "end" | "flex-end" | "flex-start" | "start";
223
226
  }) => JSX.Element;
227
+ /** @deprecated Just style normally using flex, grid, etc. */
224
228
  declare const FormColumnRow: (props: {
225
229
  children: React.ReactNode;
226
230
  cols: number;
@@ -733,7 +737,9 @@ interface MackinTheme {
733
737
  primary2: string;
734
738
  primary2Font: string;
735
739
  secondary: string;
740
+ /** @deprecated Bad name. Use 'secondaryFont'. */
736
741
  secondary2Font: string;
742
+ secondaryFont: string;
737
743
  info: string;
738
744
  infoFont: string;
739
745
  warning: string;
@@ -786,7 +792,10 @@ interface MackinTheme {
786
792
  height: string;
787
793
  heightSmall: string;
788
794
  boxShadow: string;
795
+ /** For controls with a background color. */
789
796
  hoverBrightness: string;
797
+ /** For controls without a background color. */
798
+ hoverBackground: string;
790
799
  transitionDuration: string;
791
800
  transitionEasing: string;
792
801
  transition: string;
@@ -864,6 +873,18 @@ interface SliderProps<T extends SliderValue> {
864
873
  renderValue?: (value: number) => string;
865
874
  /** Used with renderValue for the custom element width. Defaults to theme.controls.height * 2. */
866
875
  renderValueWidth?: string;
876
+ /** Styles of the overall slider. */
877
+ className?: string;
878
+ /** Styles for the slider handles. */
879
+ handleClassName?: string;
880
+ /** Styles for the first handle. */
881
+ handle1ClassName?: string;
882
+ /** Styles for the second handle. Ignored if the value is not an array. */
883
+ handle2ClassName?: string;
884
+ /** Styles of the track. */
885
+ trackClassName?: string;
886
+ /** Styles applied to the track between two handlers. Ignored if the value is not an array. */
887
+ innerTrackClassName?: string;
867
888
  }
868
889
  declare const Slider: <T extends SliderValue>(p: SliderProps<T>) => JSX.Element;
869
890
 
package/index.js CHANGED
@@ -128,6 +128,7 @@ const defaultTheme = {
128
128
  primary2: '#007bff',
129
129
  primary2Font: 'rgba(255, 255, 255, 0.9)',
130
130
  secondary: '#9e9e9e',
131
+ secondaryFont: 'rgba(255, 255, 255, 0.9)',
131
132
  secondary2Font: 'rgba(255, 255, 255, 0.9)',
132
133
  info: '#7851a9',
133
134
  infoFont: 'rgba(255, 255, 255, 0.9)',
@@ -182,7 +183,8 @@ const defaultTheme = {
182
183
  boxShadow: '2px 2px 4px rgba(0, 0, 0, 0.25)',
183
184
  headerBoxShadow: '0px 2px 12px 6px rgba(0, 0, 0, 0.2)',
184
185
  buttonBoxShadow: '2px 2px 4px rgba(0, 0, 0, 0.25)',
185
- hoverBrightness: 'brightness(0.75)',
186
+ hoverBrightness: 'brightness(0.8)',
187
+ hoverBackground: 'rgba(0, 0, 0, 0.1)',
186
188
  transitionDuration: '0.25s',
187
189
  transitionEasing: 'ease-in-out',
188
190
  transition: '',
@@ -311,6 +313,7 @@ const Text = (props) => {
311
313
  }, props.children);
312
314
  };
313
315
 
316
+ //TB: FUTURE de-dup these styles. create individual styles and compose them manually.
314
317
  const Button = React__namespace.forwardRef((props, ref) => {
315
318
  var _a;
316
319
  const { variant, round, rightIcon, leftIcon, iconBlock, small, readOnly, waiting, enforceMinWidth, controlAlign } = props, nativeProps = __rest(props, ["variant", "round", "rightIcon", "leftIcon", "iconBlock", "small", "readOnly", "waiting", "enforceMinWidth", "controlAlign"]);
@@ -375,6 +378,9 @@ const Button = React__namespace.forwardRef((props, ref) => {
375
378
  justify-content: center;
376
379
  align-items: center;
377
380
  background-color: transparent;
381
+ &:hover:not(:disabled) {
382
+ background-color: ${theme.controls.hoverBackground};
383
+ }
378
384
  ${props.small && `
379
385
  width: ${theme.controls.heightSmall};
380
386
  min-width: ${theme.controls.heightSmall};
@@ -387,6 +393,9 @@ const Button = React__namespace.forwardRef((props, ref) => {
387
393
  box-shadow: none;
388
394
  border: none;
389
395
  background-color: transparent;
396
+ &:hover:not(:disabled) {
397
+ background-color: ${theme.controls.hoverBackground};
398
+ }
390
399
  `}
391
400
  ${(props.variant === 'text') && `
392
401
  background-color: transparent;
@@ -503,7 +512,6 @@ const Button = React__namespace.forwardRef((props, ref) => {
503
512
  if (props.controlAlign) {
504
513
  return (React__namespace.createElement("span", { className: css.css({
505
514
  display: 'inline-block',
506
- width: '100%',
507
515
  paddingBottom: theme.controls.inputErrorMinHeight
508
516
  }) }, content));
509
517
  }
@@ -1745,14 +1753,19 @@ const ErrorModal = (props) => {
1745
1753
 
1746
1754
  /** Use this instead of <form> directly. If we need to fight Chrome's autofill, we can do so at a global level. */
1747
1755
  const Form = React__namespace.forwardRef((props, ref) => {
1748
- const { inline, children, onSubmit, className, ajax } = props, rest = __rest(props, ["inline", "children", "onSubmit", "className", "ajax"]);
1756
+ const { inline, children, onSubmit, className, ajax, unstyled } = props, rest = __rest(props, ["inline", "children", "onSubmit", "className", "ajax", "unstyled"]);
1749
1757
  const theme = useThemeSafely();
1750
- return (React__namespace.createElement("form", Object.assign({}, rest, { ref: ref, className: css.cx('form', css.css({
1758
+ let defaultStyle;
1759
+ if (!props.unstyled) {
1760
+ defaultStyle = css.css({
1761
+ label: 'Form',
1751
1762
  display: 'flex',
1752
1763
  flexDirection: props.inline ? 'row' : 'column',
1753
1764
  alignItems: props.inline ? 'flex-end' : 'normal',
1754
1765
  gap: theme.controls.gap
1755
- }), props.className), onSubmit: e => {
1766
+ });
1767
+ }
1768
+ return (React__namespace.createElement("form", Object.assign({}, rest, { ref: ref, className: css.cx('form', defaultStyle, props.className), onSubmit: e => {
1756
1769
  if (ajax !== false) {
1757
1770
  e.preventDefault();
1758
1771
  e.stopPropagation();
@@ -1762,6 +1775,7 @@ const Form = React__namespace.forwardRef((props, ref) => {
1762
1775
  }
1763
1776
  } }), children));
1764
1777
  });
1778
+ /** @deprecated Just style normally using flex, grid, etc. */
1765
1779
  const FormFlexRow = (props) => {
1766
1780
  var _a;
1767
1781
  const theme = useThemeSafely();
@@ -1771,6 +1785,7 @@ const FormFlexRow = (props) => {
1771
1785
  justifyContent: (_a = props.justifyContent) !== null && _a !== void 0 ? _a : 'normal'
1772
1786
  }), props.className) }, props.children));
1773
1787
  };
1788
+ /** @deprecated Just style normally using flex, grid, etc. */
1774
1789
  const FormColumnRow = (props) => {
1775
1790
  const theme = useThemeSafely();
1776
1791
  return (React__namespace.createElement("div", { style: props.style, className: css.cx('formColumnRow', css.css({
@@ -2288,6 +2303,7 @@ const BaseInput = React__namespace.forwardRef((props, ref) => {
2288
2303
  const theme = useThemeSafely();
2289
2304
  const { rightControl, round, wrapperClassName, showErrorDisplay } = props, nativeProps = __rest(props, ["rightControl", "round", "wrapperClassName", "showErrorDisplay"]);
2290
2305
  const inputStyles = css.css({
2306
+ backgroundColor: theme.colors.bg,
2291
2307
  fontFamily: theme.fonts.family,
2292
2308
  fontSize: theme.fonts.size,
2293
2309
  width: '100%',
@@ -2354,7 +2370,8 @@ const BaseInput = React__namespace.forwardRef((props, ref) => {
2354
2370
  `}
2355
2371
  `;
2356
2372
  return (React__namespace.createElement("div", { className: css.css({
2357
- width: '100%'
2373
+ width: '100%',
2374
+ label: 'BaseInput'
2358
2375
  }) },
2359
2376
  React__namespace.createElement("div", { className: css.cx('input', inputWrapperStyles, wrapperClassName) },
2360
2377
  inputElement,
@@ -3004,6 +3021,7 @@ const LinkContent = (props) => {
3004
3021
  }) }, props.rightIcon)));
3005
3022
  };
3006
3023
 
3024
+ //TB: FUTURE de-dup these styles. create individual styles and compose them manually.
3007
3025
  const generateLinkStyles = (props, theme) => {
3008
3026
  var _a, _b, _c, _d, _e;
3009
3027
  const linkStyles = css.css `
@@ -3055,9 +3073,15 @@ const generateLinkStyles = (props, theme) => {
3055
3073
  `}
3056
3074
  ${props.variant === 'button' && `
3057
3075
  text-align: center;
3076
+ &:hover {
3077
+ background-color: ${theme.controls.hoverBackground};
3078
+ }
3058
3079
  `}
3059
3080
  ${props.variant === 'circle' && `
3060
3081
  text-align: center;
3082
+ &:hover {
3083
+ background-color: ${theme.controls.hoverBackground};
3084
+ }
3061
3085
  width: ${theme.controls.height};
3062
3086
  border-radius: 100%;
3063
3087
  display: flex;
@@ -3131,6 +3155,9 @@ const generateLinkStyles = (props, theme) => {
3131
3155
  ${props.variant === 'label' && `
3132
3156
  box-shadow: none;
3133
3157
  border: none;
3158
+ &:hover {
3159
+ background-color: ${theme.controls.hoverBackground};
3160
+ }
3134
3161
  `}
3135
3162
  ${props.variant === 'text' && `
3136
3163
  font-weight: normal;
@@ -3147,6 +3174,9 @@ const generateLinkStyles = (props, theme) => {
3147
3174
  font-size: 1.6rem;
3148
3175
  padding-left: 0;
3149
3176
  padding-right: 0;
3177
+ &:hover {
3178
+ background-color: ${theme.controls.hoverBackground};
3179
+ }
3150
3180
  `}
3151
3181
  ${props.block && `
3152
3182
  display: block;
@@ -3295,7 +3325,7 @@ const Picker = (props) => {
3295
3325
  !props.readOnly && (React__namespace.createElement(Icon, { id: "sortDesc", className: css.css({
3296
3326
  position: 'absolute',
3297
3327
  right: `calc(${theme.controls.padding} + ${props.round ? roundPxPadding : '0px'})`,
3298
- height: theme.controls.height,
3328
+ height: '100%',
3299
3329
  pointerEvents: 'none'
3300
3330
  }) }))));
3301
3331
  };
@@ -3843,10 +3873,11 @@ const Slider = (p) => {
3843
3873
  const currentValue = React.useRef(p.value);
3844
3874
  const sliderContainer = React.useRef(null);
3845
3875
  const height = p.showValue ? `calc(${theme.controls.height} + 1.5rem)` : theme.controls.height;
3846
- return (React__default['default'].createElement("div", { ref: sliderContainer, className: css.css({
3876
+ return (React__default['default'].createElement("div", { ref: sliderContainer, className: css.cx(css.css({
3877
+ label: 'Slider',
3847
3878
  width: '100%',
3848
3879
  height,
3849
- }) },
3880
+ }), p.className) },
3850
3881
  React__default['default'].createElement(ReactSlider__default['default'], { step: p.step, min: p.min, max: p.max, value: p.value, onAfterChange: (value, index) => {
3851
3882
  p.onChange(value);
3852
3883
  }, onChange: p.onUpdate || p.showValue ? (value, index) => {
@@ -3859,15 +3890,22 @@ const Slider = (p) => {
3859
3890
  display: 'flex',
3860
3891
  alignItems: 'center',
3861
3892
  height: theme.controls.height
3862
- })) }, rest),
3893
+ }), p.trackClassName) }, rest),
3863
3894
  React__default['default'].createElement("div", { className: css.css({
3864
3895
  backgroundColor: theme.colors.secondary,
3865
3896
  height: `calc(${theme.controls.height} / 4)`,
3866
3897
  borderRadius: theme.controls.roundRadius,
3867
3898
  width: '100%'
3868
- }) }));
3899
+ }, p.innerTrackClassName && rest.key === 'track-1' && Array.isArray(p.value) ? p.innerTrackClassName : undefined) }));
3869
3900
  }, renderThumb: (props, state) => {
3870
3901
  const { className } = props, rest = __rest(props, ["className"]);
3902
+ let specificThumbStyles;
3903
+ if (p.handle1ClassName && props.key === 'thumb-0') {
3904
+ specificThumbStyles = p.handle1ClassName;
3905
+ }
3906
+ else if (p.handle2ClassName && props.key === 'thumb-1') {
3907
+ specificThumbStyles = p.handle2ClassName;
3908
+ }
3871
3909
  return (React__default['default'].createElement("div", Object.assign({ className: css.cx(className, css.css({
3872
3910
  width: theme.controls.height,
3873
3911
  height: theme.controls.height,
@@ -3888,7 +3926,7 @@ const Slider = (p) => {
3888
3926
  '&:hover': {
3889
3927
  filter: theme.controls.hoverBrightness
3890
3928
  }
3891
- })) }, rest), p.showValue && (React__default['default'].createElement(HandleText, { index: state.index, parentElement: sliderContainer.current, value: Array.isArray(currentValue.current) ? currentValue.current[state.index] : currentValue.current, renderValue: p.renderValue, renderValueWidth: p.renderValueWidth }))));
3929
+ }), specificThumbStyles, p.handleClassName) }, rest), p.showValue && (React__default['default'].createElement(HandleText, { index: state.index, parentElement: sliderContainer.current, value: Array.isArray(currentValue.current) ? currentValue.current[state.index] : currentValue.current, renderValue: p.renderValue, renderValueWidth: p.renderValueWidth }))));
3892
3930
  } })));
3893
3931
  };
3894
3932
  const rectsCollideX = (r1, r2) => {
@@ -4178,6 +4216,7 @@ const TextArea = React__namespace.forwardRef((props, ref) => {
4178
4216
  updateErrorMessage();
4179
4217
  }, [props.value]);
4180
4218
  const styles = css.css({
4219
+ backgroundColor: theme.colors.bg,
4181
4220
  maxWidth: '100%',
4182
4221
  minHeight: theme.controls.height,
4183
4222
  fontFamily: theme.fonts.family,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mackin.com/styleguide",
3
- "version": "8.7.1",
3
+ "version": "8.8.0",
4
4
  "description": "",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",