@terraware/web-components 2.1.0 → 2.1.2
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/components/Autocomplete/Autocomplete.d.ts +1 -8
- package/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/components/Dropdown.d.ts +20 -4
- package/components/Dropdown.d.ts.map +1 -1
- package/components/Dropdown.js +26 -1
- package/components/Pill/index.d.ts +11 -0
- package/components/Pill/index.d.ts.map +1 -0
- package/components/Pill/index.js +41 -0
- package/components/Pill/styles.scss +48 -0
- package/components/PillList/index.d.ts +14 -0
- package/components/PillList/index.d.ts.map +1 -0
- package/components/PillList/index.js +33 -0
- package/components/types/index.d.ts +5 -0
- package/components/types/index.d.ts.map +1 -0
- package/components/types/index.js +5 -0
- package/index.d.ts +6 -3
- package/index.d.ts.map +1 -1
- package/index.js +22 -0
- package/package.json +1 -1
- package/stories/Dropdown.stories.d.ts +2 -1
- package/stories/Dropdown.stories.d.ts.map +1 -1
- package/stories/PillList.stories.d.ts +9 -0
- package/stories/PillList.stories.d.ts.map +1 -0
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { TooltipProps } from '@mui/material';
|
|
2
|
+
import { DropdownItem as Option } from '../types';
|
|
2
3
|
import '../Select/styles.scss';
|
|
3
4
|
import './styles.scss';
|
|
4
|
-
export type Option = {
|
|
5
|
-
value: any;
|
|
6
|
-
label: string;
|
|
7
|
-
};
|
|
8
5
|
export type ValueType = string | Option;
|
|
9
6
|
export interface Props {
|
|
10
7
|
id: string;
|
|
@@ -21,9 +18,5 @@ export interface Props {
|
|
|
21
18
|
errorText?: string;
|
|
22
19
|
tooltipTitle?: TooltipProps['title'];
|
|
23
20
|
}
|
|
24
|
-
export type DropdownItem = {
|
|
25
|
-
label: string;
|
|
26
|
-
value: string;
|
|
27
|
-
};
|
|
28
21
|
export default function Autocomplete({ id, label, values, onChange, selected, freeSolo, disabled, className, hideClearIcon, isEqual, placeholder, errorText, tooltipTitle, }: Props): JSX.Element;
|
|
29
22
|
//# sourceMappingURL=Autocomplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA8C,YAAY,EAAE,MAAM,eAAe,CAAC;AAIzF,OAAO,
|
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA8C,YAAY,EAAE,MAAM,eAAe,CAAC;AAIzF,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,uBAAuB,CAAC;AAC/B,OAAO,eAAe,CAAC;AAEvB,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAExC,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,QAAQ,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,EAAE,EACF,KAAK,EACL,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,aAAa,EACb,OAAO,EACP,WAAW,EACX,SAAS,EACT,YAAY,GACb,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA+ErB"}
|
package/components/Dropdown.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TooltipProps } from '@mui/material';
|
|
2
|
+
import { DropdownItem } from './types';
|
|
2
3
|
export interface Props {
|
|
3
4
|
id: string;
|
|
4
5
|
label: string;
|
|
@@ -7,10 +8,6 @@ export interface Props {
|
|
|
7
8
|
selected: string | undefined;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
}
|
|
10
|
-
export type DropdownItem = {
|
|
11
|
-
label: string;
|
|
12
|
-
value: string;
|
|
13
|
-
};
|
|
14
11
|
export declare function DropdownV1({ id, label, values, onChange, selected, disabled }: Props): JSX.Element;
|
|
15
12
|
export interface DropdownProps {
|
|
16
13
|
onChange: (newValue: string) => void;
|
|
@@ -45,4 +42,23 @@ export interface DropdownProps {
|
|
|
45
42
|
* />
|
|
46
43
|
*/
|
|
47
44
|
export default function Dropdown(props: DropdownProps): JSX.Element;
|
|
45
|
+
export interface DropdownAutocompleteProps {
|
|
46
|
+
id: string;
|
|
47
|
+
label: string;
|
|
48
|
+
options: DropdownItem[];
|
|
49
|
+
onChange: (newValue: string) => void;
|
|
50
|
+
selectedValue: string;
|
|
51
|
+
freeSolo: boolean;
|
|
52
|
+
disabled?: boolean;
|
|
53
|
+
readOnly?: boolean;
|
|
54
|
+
className?: string;
|
|
55
|
+
hideClearIcon?: boolean;
|
|
56
|
+
placeholder?: string;
|
|
57
|
+
errorText?: string;
|
|
58
|
+
tooltipTitle?: TooltipProps['title'];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* A simple dropdown wrapper for Autocomplete that handles { label: string, value: string } values.
|
|
62
|
+
*/
|
|
63
|
+
export declare function DropdownAutocomplete(props: DropdownAutocompleteProps): JSX.Element;
|
|
48
64
|
//# sourceMappingURL=Dropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../src/components/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../src/components/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC3G,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMvC,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;IACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAQD,wBAAgB,UAAU,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAkBlG;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,GAA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ownV1;
|
|
9
9
|
exports.default = Dropdown;
|
|
10
|
+
exports.DropdownAutocomplete = DropdownAutocomplete;
|
|
10
11
|
|
|
11
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
12
13
|
|
|
@@ -14,6 +15,8 @@ var _material = require("@mui/material");
|
|
|
14
15
|
|
|
15
16
|
var _SelectT = _interopRequireDefault(require("./Select/SelectT"));
|
|
16
17
|
|
|
18
|
+
var _Autocomplete = _interopRequireDefault(require("./Autocomplete/Autocomplete"));
|
|
19
|
+
|
|
17
20
|
var _styles = require("@mui/styles");
|
|
18
21
|
|
|
19
22
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -103,7 +106,29 @@ function Dropdown(props) {
|
|
|
103
106
|
},
|
|
104
107
|
onChange: function onChange(option) {
|
|
105
108
|
return _onChange(option.value);
|
|
109
|
+
}
|
|
110
|
+
}));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* A simple dropdown wrapper for Autocomplete that handles { label: string, value: string } values.
|
|
115
|
+
*/
|
|
116
|
+
function DropdownAutocomplete(props) {
|
|
117
|
+
var selectedValue = props.selectedValue,
|
|
118
|
+
_onChange2 = props.onChange,
|
|
119
|
+
options = props.options,
|
|
120
|
+
remainingProps = (0, _objectWithoutProperties2.default)(props, ["selectedValue", "onChange", "options"]);
|
|
121
|
+
var selectedItem = options === null || options === void 0 ? void 0 : options.find(function (option) {
|
|
122
|
+
return option.value === selectedValue;
|
|
123
|
+
});
|
|
124
|
+
return /*#__PURE__*/_react.default.createElement(_Autocomplete.default, Object.assign({}, remainingProps, {
|
|
125
|
+
values: options,
|
|
126
|
+
selected: selectedItem,
|
|
127
|
+
isEqual: function isEqual(A, B) {
|
|
128
|
+
return A.value === B.value;
|
|
106
129
|
},
|
|
107
|
-
|
|
130
|
+
onChange: function onChange(option) {
|
|
131
|
+
return _onChange2(option.value);
|
|
132
|
+
}
|
|
108
133
|
}));
|
|
109
134
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './styles.scss';
|
|
2
|
+
type PillProps<IdType> = {
|
|
3
|
+
id: IdType;
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
onRemove?: (id: IdType) => void;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
export default function Pill<IdType>({ id, label, value, onRemove, className }: PillProps<IdType>): JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Pill/index.tsx"],"names":[],"mappings":"AAGA,OAAO,eAAe,CAAC;AAEvB,KAAK,SAAS,CAAC,MAAM,IAAI;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,OAAO,CAc9G"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = Pill;
|
|
9
|
+
|
|
10
|
+
var _material = require("@mui/material");
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _Icon = _interopRequireDefault(require("../Icon/Icon"));
|
|
15
|
+
|
|
16
|
+
require("./styles.scss");
|
|
17
|
+
|
|
18
|
+
function Pill(_ref) {
|
|
19
|
+
var id = _ref.id,
|
|
20
|
+
label = _ref.label,
|
|
21
|
+
value = _ref.value,
|
|
22
|
+
onRemove = _ref.onRemove,
|
|
23
|
+
className = _ref.className;
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
25
|
+
className: "pill ".concat(className !== null && className !== void 0 ? className : '')
|
|
26
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
27
|
+
className: "label"
|
|
28
|
+
}, label, ":"), /*#__PURE__*/_react.default.createElement("p", {
|
|
29
|
+
className: "value"
|
|
30
|
+
}, value), onRemove ? /*#__PURE__*/_react.default.createElement(_material.IconButton, {
|
|
31
|
+
onClick: function onClick() {
|
|
32
|
+
return onRemove(id);
|
|
33
|
+
},
|
|
34
|
+
className: "iconContainer"
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
36
|
+
name: "close",
|
|
37
|
+
className: "icon"
|
|
38
|
+
})) : /*#__PURE__*/_react.default.createElement("div", {
|
|
39
|
+
className: "spacer"
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@import '../../style-dictionary-dist/terraware.scss';
|
|
2
|
+
|
|
3
|
+
@font-face {
|
|
4
|
+
font-family: 'Inter';
|
|
5
|
+
src: local('Inter'), url(../../fonts/Inter.ttf) format('truetype');
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.pill {
|
|
9
|
+
font-family: $tw-fnt-base-font-family;
|
|
10
|
+
background: $tw-clr-bg-tertiary;
|
|
11
|
+
padding: $tw-spc-base-xx-small $tw-spc-base-xx-small $tw-spc-base-xx-small 12px;
|
|
12
|
+
display: flex;
|
|
13
|
+
border-radius: 13px;
|
|
14
|
+
align-items: center;
|
|
15
|
+
margin-right: $tw-spc-base-x-small;
|
|
16
|
+
margin-bottom: $tw-spc-base-x-small;
|
|
17
|
+
|
|
18
|
+
.label {
|
|
19
|
+
font-size: 12px;
|
|
20
|
+
color: $tw-clr-txt;
|
|
21
|
+
font-weight: 400;
|
|
22
|
+
margin: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.value {
|
|
26
|
+
padding-left: $tw-spc-base-xx-small;
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
color: $tw-clr-txt;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
margin: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.icon {
|
|
34
|
+
fill: $tw-clr-icn;
|
|
35
|
+
width: 12px;
|
|
36
|
+
height: 12px;
|
|
37
|
+
margin: 0 $tw-spc-base-xx-small;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.iconContainer {
|
|
41
|
+
padding: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.spacer {
|
|
45
|
+
width: $tw-spc-base-x-small;
|
|
46
|
+
height: 12px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type PillListItem<IdType> = {
|
|
2
|
+
id: IdType;
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onRemove?: (id: IdType) => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
export type PillListProps<IdType> = {
|
|
9
|
+
data: PillListItem<IdType>[];
|
|
10
|
+
onRemove?: (id: IdType) => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
export default function PillList<IdType>(props: PillListProps<IdType>): JSX.Element;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PillList/index.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,YAAY,CAAC,MAAM,IAAI;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,MAAM,IAAI;IAClC,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,OAAO,CAiBlF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = PillList;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _Pill = _interopRequireDefault(require("../Pill"));
|
|
13
|
+
|
|
14
|
+
var _material = require("@mui/material");
|
|
15
|
+
|
|
16
|
+
function PillList(props) {
|
|
17
|
+
var data = props.data,
|
|
18
|
+
onRemove = props.onRemove,
|
|
19
|
+
className = props.className;
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
21
|
+
display: "flex",
|
|
22
|
+
flexWrap: "wrap"
|
|
23
|
+
}, data.map(function (item, index) {
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_Pill.default, {
|
|
25
|
+
key: index,
|
|
26
|
+
id: item.id,
|
|
27
|
+
label: item.label,
|
|
28
|
+
value: item.value,
|
|
29
|
+
onRemove: item.onRemove || onRemove,
|
|
30
|
+
className: item.className || className
|
|
31
|
+
});
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,GAAG,CAAC;CACZ,CAAC"}
|
package/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import Checkbox from './components/Checkbox';
|
|
|
4
4
|
import DatePicker from './components/DatePicker/DatePicker';
|
|
5
5
|
import DialogBox from './components/DialogBox/DialogBox';
|
|
6
6
|
import Divisor from './components/Divisor';
|
|
7
|
-
import Dropdown, { DropdownV1 } from './components/Dropdown';
|
|
7
|
+
import Dropdown, { DropdownV1, DropdownAutocomplete } from './components/Dropdown';
|
|
8
8
|
import ErrorBox from './components/ErrorBox/ErrorBox';
|
|
9
9
|
import Icon from './components/Icon/Icon';
|
|
10
10
|
import IconTooltip from './components/IconTooltip';
|
|
@@ -14,6 +14,8 @@ import NavFooter from './components/Navbar/NavFooter';
|
|
|
14
14
|
import NavItem from './components/Navbar/NavItem';
|
|
15
15
|
import NavSection from './components/Navbar/NavSection';
|
|
16
16
|
import Note from './components/Note';
|
|
17
|
+
import Pill from './components/Pill';
|
|
18
|
+
import PillList from './components/PillList';
|
|
17
19
|
import ProgressCircle from './components/ProgressCircle/ProgressCircle';
|
|
18
20
|
import RadioButton from './components/RadioButton';
|
|
19
21
|
import Select from './components/Select/Select';
|
|
@@ -28,9 +30,10 @@ import { EnhancedTableDetailsRow, RendererProps, TableColumnType } from './compo
|
|
|
28
30
|
import * as Svg from './components/svg';
|
|
29
31
|
import Message from './components/Message/Message';
|
|
30
32
|
import theme from './theme';
|
|
33
|
+
export type { PillListItem } from './components/PillList';
|
|
31
34
|
export type { IconName } from './components/Icon/icons/';
|
|
32
35
|
export type { Size } from './components/Size';
|
|
33
|
-
export type { DropdownItem } from './components/
|
|
36
|
+
export type { DropdownItem } from './components/types';
|
|
34
37
|
export type { EnhancedTableDetailsRow, RendererProps, TableColumnType, TableRowType, SortOrder };
|
|
35
|
-
export { Autocomplete, Button, CellRenderer, CellDateRenderer, Checkbox, DatePicker, descendingComparator, DialogBox, Divisor, Dropdown, DropdownV1, ErrorBox, getComparator, icons, Icon, IconTooltip, Message, NavFooter, NavItem, NavSection, Navbar, Note, ProgressCircle, RadioButton, Select, SelectT, stableSort, SummaryBox, Svg, Textfield, TextTruncated, Table, theme, };
|
|
38
|
+
export { Autocomplete, Button, CellRenderer, CellDateRenderer, Checkbox, DatePicker, descendingComparator, DialogBox, Divisor, Dropdown, DropdownAutocomplete, DropdownV1, ErrorBox, getComparator, icons, Icon, IconTooltip, Message, NavFooter, NavItem, NavSection, Navbar, Note, Pill, PillList, ProgressCircle, RadioButton, Select, SelectT, stableSort, SummaryBox, Svg, Textfield, TextTruncated, Table, theme, };
|
|
36
39
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,YAAY,MAAM,wCAAwC,CAAC;AAClE,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAChD,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,UAAU,MAAM,oCAAoC,CAAC;AAC5D,OAAO,SAAS,MAAM,kCAAkC,CAAC;AACzD,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,YAAY,MAAM,wCAAwC,CAAC;AAClE,OAAO,MAAM,MAAM,4BAA4B,CAAC;AACh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GAAG,MAAM,kBAAkB,CAAC;AACxC,OAAO,OAAO,MAAM,8BAA8B,CAAC;AACnD,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,YAAY,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,YAAY,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,YAAY,EAAE,uBAAuB,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;AAEjG,OAAO,EACL,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,oBAAoB,EACpB,SAAS,EACT,OAAO,EACP,QAAQ,EACR,oBAAoB,EACpB,UAAU,EACV,QAAQ,EACR,aAAa,EACb,KAAK,EACL,IAAI,EACJ,WAAW,EACX,OAAO,EACP,SAAS,EACT,OAAO,EACP,UAAU,EACV,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,WAAW,EACX,MAAM,EACN,OAAO,EACP,UAAU,EACV,UAAU,EACV,GAAG,EACH,SAAS,EACT,aAAa,EACb,KAAK,EACL,KAAK,GACN,CAAC"}
|
package/index.js
CHANGED
|
@@ -53,6 +53,12 @@ Object.defineProperty(exports, "DropdownV1", {
|
|
|
53
53
|
return _Dropdown.DropdownV1;
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
+
Object.defineProperty(exports, "DropdownAutocomplete", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function get() {
|
|
59
|
+
return _Dropdown.DropdownAutocomplete;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
56
62
|
Object.defineProperty(exports, "ErrorBox", {
|
|
57
63
|
enumerable: true,
|
|
58
64
|
get: function get() {
|
|
@@ -107,6 +113,18 @@ Object.defineProperty(exports, "Note", {
|
|
|
107
113
|
return _Note.default;
|
|
108
114
|
}
|
|
109
115
|
});
|
|
116
|
+
Object.defineProperty(exports, "Pill", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function get() {
|
|
119
|
+
return _Pill.default;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
Object.defineProperty(exports, "PillList", {
|
|
123
|
+
enumerable: true,
|
|
124
|
+
get: function get() {
|
|
125
|
+
return _PillList.default;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
110
128
|
Object.defineProperty(exports, "ProgressCircle", {
|
|
111
129
|
enumerable: true,
|
|
112
130
|
get: function get() {
|
|
@@ -231,6 +249,10 @@ var _NavSection = _interopRequireDefault(require("./components/Navbar/NavSection
|
|
|
231
249
|
|
|
232
250
|
var _Note = _interopRequireDefault(require("./components/Note"));
|
|
233
251
|
|
|
252
|
+
var _Pill = _interopRequireDefault(require("./components/Pill"));
|
|
253
|
+
|
|
254
|
+
var _PillList = _interopRequireDefault(require("./components/PillList"));
|
|
255
|
+
|
|
234
256
|
var _ProgressCircle = _interopRequireDefault(require("./components/ProgressCircle/ProgressCircle"));
|
|
235
257
|
|
|
236
258
|
var _RadioButton = _interopRequireDefault(require("./components/RadioButton"));
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Story } from '@storybook/react';
|
|
2
|
-
import Dropdown, { Props as DropdownV1Props, DropdownProps } from '../components/Dropdown';
|
|
2
|
+
import Dropdown, { Props as DropdownV1Props, DropdownProps, DropdownAutocompleteProps } from '../components/Dropdown';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: typeof Dropdown;
|
|
@@ -7,4 +7,5 @@ declare const _default: {
|
|
|
7
7
|
export default _default;
|
|
8
8
|
export declare const LegacyDropdown: Story<DropdownV1Props>;
|
|
9
9
|
export declare const Default: Story<DropdownProps>;
|
|
10
|
+
export declare const Autocomplete: Story<DropdownAutocompleteProps>;
|
|
10
11
|
//# sourceMappingURL=Dropdown.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Dropdown.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Dropdown.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Dropdown.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,QAAQ,EAAE,EACf,KAAK,IAAI,eAAe,EAExB,aAAa,EACb,yBAAyB,EAE1B,MAAM,wBAAwB,CAAC;;;;;AAEhC,wBAGE;AAYF,eAAO,MAAM,cAAc,wBAA8B,CAAC;AAsB1D,eAAO,MAAM,OAAO,sBAA4B,CAAC;AAyBjD,eAAO,MAAM,YAAY,kCAAwC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Story } from '@storybook/react';
|
|
2
|
+
import PillList, { PillListProps } from '../components/PillList';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof PillList;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const Default: Story<PillListProps<number>>;
|
|
9
|
+
//# sourceMappingURL=PillList.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PillList.stories.d.ts","sourceRoot":"","sources":["../../src/stories/PillList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,OAAO,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;;;;;AAEjE,wBAGE;AAMF,eAAO,MAAM,OAAO,8BAAoB,CAAC"}
|