@mackin.com/styleguide 8.4.0 → 8.4.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.
Files changed (2) hide show
  1. package/index.js +12 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2527,13 +2527,17 @@ const DateInput = React__namespace.forwardRef((props, ref) => {
2527
2527
  const nativeProps = __rest(props, ["customError", "reposition", "onValueChange"]);
2528
2528
  useIgnoreMount(() => {
2529
2529
  var _a;
2530
+ /*
2531
+ Run this right away.
2532
+ If not, our value may be valid but our error system reports it otherwise due to not being updated yet.
2533
+ */
2534
+ updateDateErrorMessages();
2530
2535
  if ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.checkValidity()) {
2531
2536
  props.onValueChange(dateValue);
2532
2537
  }
2533
2538
  else {
2534
2539
  props.onValueChange(undefined);
2535
2540
  }
2536
- updateDateErrorMessages();
2537
2541
  }, [dateValue]);
2538
2542
  useIgnoreMount(() => {
2539
2543
  updateDateErrorMessages();
@@ -2850,13 +2854,14 @@ const useMediaQuery = (query) => {
2850
2854
  };
2851
2855
 
2852
2856
  const Nav = (props) => {
2853
- var _a, _b, _c, _d;
2857
+ var _a, _b, _c;
2854
2858
  const nav = React__namespace.useRef(null);
2855
2859
  const theme = useThemeSafely();
2856
2860
  const totalNavOffset = `calc(${theme.layout.navWidth} + 20px)`;
2857
2861
  const backdrop = React__namespace.useContext(BackdropContext);
2858
2862
  const isLargeScreen = useMediaQuery(`(min-width:${theme.breakpoints.desktop})`);
2859
2863
  const log = useLogger(`Nav ${(_a = props.id) !== null && _a !== void 0 ? _a : '?'}`, (_b = props.__debug) !== null && _b !== void 0 ? _b : false);
2864
+ const slideMs = (_c = props.slideMs) !== null && _c !== void 0 ? _c : theme.timings.nav.slideMs;
2860
2865
  const slideRight = css.keyframes `
2861
2866
  0% {
2862
2867
  transform: translateX(0);
@@ -2876,10 +2881,10 @@ const Nav = (props) => {
2876
2881
  }
2877
2882
  `;
2878
2883
  const classNavShowing = css.css `
2879
- animation: ${slideRight} ${(_c = props.slideMs) !== null && _c !== void 0 ? _c : theme.timings.nav.slideMs}ms cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
2884
+ animation: ${slideRight} ${slideMs}ms cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
2880
2885
  `;
2881
2886
  const classNavNotShowing = css.css `
2882
- animation: ${slideLeft} ${(_d = props.slideMs) !== null && _d !== void 0 ? _d : theme.timings.nav.slideMs}ms cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
2887
+ animation: ${slideLeft} ${slideMs}ms cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
2883
2888
  `;
2884
2889
  // the padding-top here is to offset the navs' content from the header. the shadow creeps over it.
2885
2890
  const navStyles = css.css `
@@ -2938,7 +2943,7 @@ const Nav = (props) => {
2938
2943
  if (nav && nav.current) {
2939
2944
  nav.current.classList.remove(classNavNotShowing);
2940
2945
  }
2941
- }, 250);
2946
+ }, slideMs);
2942
2947
  }
2943
2948
  }
2944
2949
  }
@@ -3112,6 +3117,8 @@ const generateLinkStyles = (props, theme) => {
3112
3117
  width: ${theme.controls.height};
3113
3118
  text-align: center;
3114
3119
  font-size: 1.6rem;
3120
+ padding-left: 0;
3121
+ padding-right: 0;
3115
3122
  `}
3116
3123
  ${props.block && `
3117
3124
  display: block;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mackin.com/styleguide",
3
- "version": "8.4.0",
3
+ "version": "8.4.1",
4
4
  "description": "",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",