@sb1/ffe-dropdown-react 6.0.50 → 7.0.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.
- package/README.md +0 -5
- package/es/Dropdown.js +26 -27
- package/es/index.js +1 -2
- package/lib/Dropdown.js +31 -33
- package/lib/index.js +4 -8
- package/package.json +4 -4
- package/types/Dropdown.d.ts +5 -0
- package/types/index.d.ts +1 -12
- package/es/index.d.js +0 -1
- package/lib/index.d.js +0 -6
package/README.md
CHANGED
|
@@ -12,11 +12,6 @@ npm install --save @sb1/ffe-dropdown-react
|
|
|
12
12
|
|
|
13
13
|
Full documentation on dropdown usage is available at https://design.sparebank1.no/komponenter/dropdown/.
|
|
14
14
|
|
|
15
|
-
## TypeScript definition files
|
|
16
|
-
|
|
17
|
-
This component supports TypeScript - please update `index.d.ts` if you change any
|
|
18
|
-
of the external methods or properties in this component.
|
|
19
|
-
|
|
20
15
|
## Development
|
|
21
16
|
|
|
22
17
|
To start a local development server, run the following from the designsystem root folder:
|
package/es/Dropdown.js
CHANGED
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
innerRef = props.innerRef,
|
|
12
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
13
|
-
return /*#__PURE__*/React.createElement("select", _extends({
|
|
14
|
-
className: classNames('ffe-dropdown', {
|
|
15
|
-
'ffe-dropdown--inline': inline
|
|
16
|
-
}, className),
|
|
17
|
-
ref: innerRef
|
|
18
|
-
}, rest));
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
19
11
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
28
22
|
};
|
|
29
|
-
|
|
23
|
+
import React from 'react';
|
|
24
|
+
import classNames from 'classnames';
|
|
25
|
+
export var Dropdown = React.forwardRef(function (_a, ref) {
|
|
26
|
+
var className = _a.className, inline = _a.inline, rest = __rest(_a, ["className", "inline"]);
|
|
27
|
+
return (React.createElement("select", __assign({ className: classNames('ffe-dropdown', { 'ffe-dropdown--inline': inline }, className), ref: ref }, rest)));
|
|
28
|
+
});
|
package/es/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default Dropdown;
|
|
1
|
+
export { Dropdown } from './Dropdown';
|
package/lib/Dropdown.js
CHANGED
|
@@ -1,36 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, className),
|
|
24
|
-
ref: innerRef
|
|
25
|
-
}, rest));
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
26
23
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
inline: _propTypes.bool,
|
|
30
|
-
className: _propTypes.string,
|
|
31
|
-
/** Ref-setting function, or ref created by useRef, passed to the select element */
|
|
32
|
-
innerRef: (0, _propTypes.oneOfType)([_propTypes.func, (0, _propTypes.shape)({
|
|
33
|
-
current: _propTypes.object
|
|
34
|
-
})])
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
35
26
|
};
|
|
36
|
-
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Dropdown = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
31
|
+
exports.Dropdown = react_1.default.forwardRef(function (_a, ref) {
|
|
32
|
+
var className = _a.className, inline = _a.inline, rest = __rest(_a, ["className", "inline"]);
|
|
33
|
+
return (react_1.default.createElement("select", __assign({ className: (0, classnames_1.default)('ffe-dropdown', { 'ffe-dropdown--inline': inline }, className), ref: ref }, rest)));
|
|
34
|
+
});
|
package/lib/index.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _Dropdown = _interopRequireDefault(require("./Dropdown"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
var _default = exports.default = _Dropdown.default;
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Dropdown = void 0;
|
|
4
|
+
var Dropdown_1 = require("./Dropdown");
|
|
5
|
+
Object.defineProperty(exports, "Dropdown", { enumerable: true, get: function () { return Dropdown_1.Dropdown; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-dropdown-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "SpareBank 1",
|
|
6
6
|
"files": [
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
"url": "ssh://git@github.com:SpareBank1/designsystem.git"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
|
-
"build": "ffe-buildtool
|
|
20
|
+
"build": "ffe-buildtool tsc",
|
|
21
21
|
"watch": "ffe-buildtool babel-watch",
|
|
22
22
|
"lint": "eslint src",
|
|
23
23
|
"test": "ffe-buildtool jest",
|
|
24
24
|
"test:watch": "ffe-buildtool jest --watch"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@sb1/ffe-form": "^29.0.
|
|
27
|
+
"@sb1/ffe-form": "^29.0.13",
|
|
28
28
|
"classnames": "^2.3.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "279a4e7d3afe4b4679448a28d1cdd8557740fdd5"
|
|
43
43
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export interface DropdownProps extends React.ComponentProps<'select'> {
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
className?: string;
|
|
6
|
-
inline?: boolean;
|
|
7
|
-
innerRef?: React.Ref<HTMLSelectElement>;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
declare class Dropdown extends React.Component<DropdownProps, any> {}
|
|
11
|
-
|
|
12
|
-
export default Dropdown;
|
|
1
|
+
export { Dropdown, DropdownProps } from './Dropdown';
|
package/es/index.d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
package/lib/index.d.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
var React = _interopRequireWildcard(require("react"));
|
|
5
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
6
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|