@adamjanicki/ui 1.4.5 → 1.4.7

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.
@@ -36,6 +36,10 @@ export type Props = {
36
36
  * [Optional] additional styles to apply to the button
37
37
  */
38
38
  style?: React.CSSProperties;
39
+ /**
40
+ * [Optional] round corners of the bars
41
+ */
42
+ rounded?: boolean;
39
43
  };
40
44
  type OpenStyle = {
41
45
  outer?: React.CSSProperties;
@@ -32,7 +32,7 @@ export var flipAngles = {
32
32
  left: -225,
33
33
  };
34
34
  var Hamburger = function (props) {
35
- var _a = props.size, size = _a === void 0 ? 36 : _a, _b = props.duration, duration = _b === void 0 ? 0.25 : _b, double = props.double, openStyle = props.openStyle, open = props.open, style = props.style, buttonProps = __rest(props, ["size", "duration", "double", "openStyle", "open", "style"]);
35
+ var _a = props.size, size = _a === void 0 ? 36 : _a, _b = props.duration, duration = _b === void 0 ? 0.25 : _b, double = props.double, openStyle = props.openStyle, open = props.open, style = props.style, rounded = props.rounded, buttonProps = __rest(props, ["size", "duration", "double", "openStyle", "open", "style", "rounded"]);
36
36
  var lineHeight = Math.max(1, Math.round(size / 20));
37
37
  var buttonStyle = {
38
38
  width: size,
@@ -48,7 +48,8 @@ var Hamburger = function (props) {
48
48
  width: size * 0.7,
49
49
  backgroundColor: "currentColor",
50
50
  position: "absolute",
51
- transition: "all ".concat(duration, "s ease"),
51
+ transition: "transform ".concat(duration, "s ease, opacity ").concat(duration, "s ease"),
52
+ borderRadius: rounded ? 10000 : 0,
52
53
  };
53
54
  var yTranslateMagnitude = useMemo(function () { return size / (double ? 7 : 4); }, [size, double]);
54
55
  var outer = openStyle.outer, top = openStyle.top, middle = openStyle.middle, bottom = openStyle.bottom;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamjanicki/ui",
3
- "version": "1.4.5",
3
+ "version": "1.4.7",
4
4
  "description": "Basic UI components and hooks for React in TypeScript",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",