@sb1/ffe-collapse-react 5.0.14 → 5.1.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.
package/README.md CHANGED
@@ -19,6 +19,14 @@ Alternatively you can do it by adding style to the class
19
19
  `.ffe-collapse-transition`\, adding it to your own class and provide the class
20
20
  through the `className` property or by styling it directly through the `style` property.
21
21
 
22
+ ### Importing compiled CSS
23
+
24
+ If your project does not use Less, you can import the compiled styling:
25
+
26
+ ```css
27
+ @import '~@sb1/ffe-collapse-react/css/collapse.css';
28
+ ```
29
+
22
30
  ## Development
23
31
 
24
32
  To start a local development server, run the following from the designsystem root folder:
@@ -0,0 +1,20 @@
1
+ .ffe-collapse {
2
+ display: grid;
3
+ grid-template-rows: 0fr;
4
+ -webkit-transition: grid-template-rows var(--ffe-transition-duration) var(--ffe-ease);
5
+ -o-transition: grid-template-rows var(--ffe-transition-duration) var(--ffe-ease);
6
+ transition: grid-template-rows var(--ffe-transition-duration) var(--ffe-ease);
7
+ transition: grid-template-rows var(--ffe-transition-duration) var(--ffe-ease), -ms-grid-rows var(--ffe-transition-duration) var(--ffe-ease);
8
+ }
9
+ .ffe-collapse--hidden {
10
+ visibility: hidden;
11
+ }
12
+ .ffe-collapse--open {
13
+ grid-template-rows: 1fr;
14
+ }
15
+ .ffe-collapse__inner {
16
+ overflow: hidden;
17
+ }
18
+ .ffe-collapse__inner.ffe-collapse__inner--visible {
19
+ overflow: visible;
20
+ }
@@ -1 +1 @@
1
- {"root":["../src/Collapse.tsx","../src/index.ts","../src/mergeRefs.ts","../src/usePreviousIsOpen.ts"],"version":"5.6.3"}
1
+ {"root":["../src/Collapse.tsx","../src/index.ts","../src/mergeRefs.ts","../src/usePreviousIsOpen.ts"],"version":"5.7.3"}
package/lib/Collapse.js CHANGED
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
26
26
  }) : function(o, v) {
27
27
  o["default"] = v;
28
28
  });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
29
+ var __importStar = (this && this.__importStar) || (function () {
30
+ var ownKeys = function(o) {
31
+ ownKeys = Object.getOwnPropertyNames || function (o) {
32
+ var ar = [];
33
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
34
+ return ar;
35
+ };
36
+ return ownKeys(o);
37
+ };
38
+ return function (mod) {
39
+ if (mod && mod.__esModule) return mod;
40
+ var result = {};
41
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
42
+ __setModuleDefault(result, mod);
43
+ return result;
44
+ };
45
+ })();
36
46
  var __rest = (this && this.__rest) || function (s, e) {
37
47
  var t = {};
38
48
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -1 +1 @@
1
- {"root":["../src/Collapse.tsx","../src/index.ts","../src/mergeRefs.ts","../src/usePreviousIsOpen.ts"],"version":"5.6.3"}
1
+ {"root":["../src/Collapse.tsx","../src/index.ts","../src/mergeRefs.ts","../src/usePreviousIsOpen.ts"],"version":"5.7.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-collapse-react",
3
- "version": "5.0.14",
3
+ "version": "5.1.1",
4
4
  "description": "React component for expand/collapse",
5
5
  "keywords": [
6
6
  "ffe"
@@ -11,6 +11,7 @@
11
11
  "lib",
12
12
  "es",
13
13
  "less",
14
+ "css",
14
15
  "types"
15
16
  ],
16
17
  "main": "lib/index.js",
@@ -22,7 +23,7 @@
22
23
  "url": "ssh://git@github.com:SpareBank1/designsystem.git"
23
24
  },
24
25
  "scripts": {
25
- "build": "ffe-buildtool tsc",
26
+ "build": "ffe-buildtool tsc && lessc less/collapse.less css/collapse.css --autoprefix",
26
27
  "build:es": "ffe-buildtool tsc --es",
27
28
  "lint": "eslint src --ext ts,tsx",
28
29
  "lint:fix": "eslint src --fix --ext ts,tsx",
@@ -30,7 +31,7 @@
30
31
  "test:watch": "ffe-buildtool jest --watch"
31
32
  },
32
33
  "dependencies": {
33
- "@sb1/ffe-core": "^29.1.4",
34
+ "@sb1/ffe-core": "^29.3.0",
34
35
  "classnames": "^2.3.1"
35
36
  },
36
37
  "devDependencies": {
@@ -45,5 +46,5 @@
45
46
  "publishConfig": {
46
47
  "access": "public"
47
48
  },
48
- "gitHead": "a14800de9fd87134f0eae31e5dad841089aaffd8"
49
+ "gitHead": "f474381dd349e5f8a64b9e6883aa9cb4a6d184d8"
49
50
  }
@@ -1 +1 @@
1
- {"root":["../src/Collapse.tsx","../src/index.ts","../src/mergeRefs.ts","../src/usePreviousIsOpen.ts"],"version":"5.6.3"}
1
+ {"root":["../src/Collapse.tsx","../src/index.ts","../src/mergeRefs.ts","../src/usePreviousIsOpen.ts"],"version":"5.7.3"}