@openfin/ui-library 0.1.8-alpha.1617374485 → 0.1.8-alpha.1617399033

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/README.md CHANGED
@@ -104,12 +104,11 @@ yarn test
104
104
 
105
105
  ## How to Contribute
106
106
 
107
- ### 1. Enable the pre-push hook
107
+ ### 1. Git pre-push hook is handled by Husky automatically
108
108
 
109
109
  ```sh
110
- touch .git/hooks/pre-push &&
111
- printf "yarn git:pre-push" >> .git/hooks/pre-push &&
112
- chmod +x .git/hooks/pre-push
110
+ $ yarn git:pre-push
111
+ # Husky should runs this command automatically before pushing
113
112
  ```
114
113
 
115
114
  ### 2. Open a pull request 😎
@@ -9,4 +9,8 @@ export declare const Mixins: {
9
9
  readonly base: import("styled-components").FlattenSimpleInterpolation;
10
10
  readonly small: import("styled-components").FlattenSimpleInterpolation;
11
11
  };
12
+ readonly appRegion: {
13
+ readonly drag: import("styled-components").FlattenSimpleInterpolation;
14
+ readonly noDrag: import("styled-components").FlattenSimpleInterpolation;
15
+ };
12
16
  };
@@ -53,6 +53,20 @@ const scrollbarSmall = styled_components_1.css `
53
53
  --scrollbarSize: 2px;
54
54
  ${scrollbar};
55
55
  `;
56
+ /**
57
+ * App Region Drag Behavior
58
+ * This affects what parts of the DOM can drag the OpenFin / Electron browser window
59
+ * - Apply 'Drag' to make an area behave like a drag handle
60
+ * - Apply 'NoDrag' to unset an area inside of a draggable area
61
+ *
62
+ * Note: DOM elements behaving as draggable regions typically ignore any other event handlers
63
+ */
64
+ const appRegionDrag = styled_components_1.css `
65
+ -webkit-app-region: drag;
66
+ `;
67
+ const appRegionNoDrag = styled_components_1.css `
68
+ -webkit-app-region: no-drag;
69
+ `;
56
70
  /**
57
71
  * Mixins --
58
72
  * Reusable utility fragments of CSS that make sense to express once (for consistency, maintainability).
@@ -64,4 +78,8 @@ exports.Mixins = {
64
78
  [constants_1.Size.base]: scrollbar,
65
79
  [constants_1.Size.small]: scrollbarSmall,
66
80
  },
81
+ appRegion: {
82
+ drag: appRegionDrag,
83
+ noDrag: appRegionNoDrag,
84
+ },
67
85
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openfin/ui-library",
3
3
  "description": "OpenFin UI Component Library",
4
- "version": "0.1.8-alpha.1617374485",
4
+ "version": "0.1.8-alpha.1617399033",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "repository": "github:openfin/ui-library",
@@ -53,6 +53,7 @@
53
53
  "eslint-plugin-prettier": "^3.3.1",
54
54
  "eslint-plugin-react": "^7.22.0",
55
55
  "faker": "^5.4.0",
56
+ "husky": "^6.0.0",
56
57
  "prettier": "^2.2.1",
57
58
  "react": "^17.0.1",
58
59
  "react-dom": "^17.0.1",
@@ -84,7 +85,8 @@
84
85
  "storybook": "yarn storybook:cache-clear && start-storybook -p 6006 -s public",
85
86
  "storybook:build": "build-storybook -s public",
86
87
  "storybook:cache-clear": "rimraf ./node_modules/.cache/storybook",
87
- "git:pre-push": "yarn lint && yarn test --watchAll=false && yarn build"
88
+ "git:pre-push": "yarn lint && yarn test --watchAll=false && yarn build",
89
+ "prepare": "husky install"
88
90
  },
89
91
  "env": {
90
92
  "jest/globals": true