@decisiv/ui-components 2.0.1-alpha.210 → 2.0.1-alpha.211

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.
Files changed (28) hide show
  1. package/lib/atoms/OptionsList/Option/styles.d.ts +1 -1
  2. package/lib/components/Badge/types.d.ts +1 -1
  3. package/lib/components/List/ContentContainer/index.d.ts +3 -1
  4. package/lib/components/List/ContentContainer/index.d.ts.map +1 -1
  5. package/lib/components/List/ContentContainer/index.js +12 -8
  6. package/lib/components/List/DefaultCell/index.d.ts +1 -2
  7. package/lib/components/List/DefaultCell/index.d.ts.map +1 -1
  8. package/lib/components/List/EditableCell/index.d.ts +13 -0
  9. package/lib/components/List/EditableCell/index.d.ts.map +1 -0
  10. package/lib/components/List/EditableCell/index.js +47 -0
  11. package/lib/components/List/EditableCell/styles.d.ts +204 -0
  12. package/lib/components/List/EditableCell/styles.d.ts.map +1 -0
  13. package/lib/components/List/EditableCell/styles.js +47 -0
  14. package/lib/components/List/ListItem/index.d.ts +1 -1
  15. package/lib/components/List/ListItem/index.d.ts.map +1 -1
  16. package/lib/components/List/ListItem/index.js +4 -2
  17. package/lib/components/List/constants.d.ts +5 -0
  18. package/lib/components/List/constants.d.ts.map +1 -1
  19. package/lib/components/List/constants.js +8 -2
  20. package/lib/components/List/index.d.ts +1 -0
  21. package/lib/components/List/index.d.ts.map +1 -1
  22. package/lib/components/List/index.js +3 -0
  23. package/lib/components/List/types.d.ts +2 -1
  24. package/lib/components/List/types.d.ts.map +1 -1
  25. package/lib/components/Popover/Arrow.d.ts +2 -2
  26. package/lib/components/Tag/propTypes.d.ts +1 -1
  27. package/lib/utils/commonUIColors.d.ts +2 -2
  28. package/package.json +2 -2
@@ -13,5 +13,5 @@ export declare const StyledLabel: import("styled-components").StyledComponent<"p
13
13
  export declare const StyledLabelDetails: import("styled-components").StyledComponent<"p", any, import("../../../components/Typography").PProps & {
14
14
  as: string;
15
15
  shade: number;
16
- }, "shade" | "as">;
16
+ }, "as" | "shade">;
17
17
  //# sourceMappingURL=styles.d.ts.map
@@ -14,7 +14,7 @@ export interface BadgeProps {
14
14
  }
15
15
  declare function variantValidator(props: BadgeProps, propName: 'variant', componentName: 'Badge'): Error | null;
16
16
  export declare const propTypes: {
17
- color: PropTypes.Requireable<"information" | "success" | "warning" | "danger" | "berryCrisp" | "koolaidCake" | "cookieMonster" | "cottonCandy" | "fizzyLime" | "mamboMango" | "carrotCake" | "roseGummy" | "licoriceMousse">;
17
+ color: PropTypes.Requireable<"danger" | "success" | "information" | "warning" | "berryCrisp" | "koolaidCake" | "cookieMonster" | "cottonCandy" | "fizzyLime" | "mamboMango" | "carrotCake" | "roseGummy" | "licoriceMousse">;
18
18
  icon: PropTypes.Validator<PropTypes.ReactComponentLike>;
19
19
  size: PropTypes.Requireable<string>;
20
20
  variant: typeof variantValidator;
@@ -8,11 +8,13 @@ export interface ContentContainerProps<T extends ValueType> {
8
8
  defaultViewState?: ListViewState;
9
9
  Component?: ComponentType<ExternalComponentProps<T>>;
10
10
  value?: T;
11
+ onSubmit?: (value?: T) => void;
11
12
  }
12
- export default function ContentContainer<T extends ValueType = string>({ defaultViewState, Component, value, }: ContentContainerProps<T>): JSX.Element;
13
+ export default function ContentContainer<T extends ValueType = string>({ defaultViewState, Component, value, onSubmit, }: ContentContainerProps<T>): JSX.Element;
13
14
  export declare function useListItemContent(): {
14
15
  viewState: "form" | "view";
15
16
  toggle: () => void;
17
+ onSubmit?: ((value?: string | number | boolean | Record<string, unknown> | undefined) => void) | undefined;
16
18
  size: "small" | "medium";
17
19
  };
18
20
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/List/ContentContainer/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAKZ,aAAa,EAEd,MAAM,OAAO,CAAC;AAOf,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIzC,oBAAY,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5E,UAAU,sBAAsB,CAAC,CAAC,SAAS,SAAS,GAAG,MAAM,CAC3D,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/B,KAAK,CAAC,EAAE,CAAC,CAAC;CACX;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC,SAAS,SAAS;IACxD,gBAAgB,CAAC,EAAE,aAAa,CAAC;IACjC,SAAS,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC;IACrD,KAAK,CAAC,EAAE,CAAC,CAAC;CACX;AAYD,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,CAAC,SAAS,SAAS,GAAG,MAAM,EAAE,EACrE,gBAAgB,EAChB,SAAmE,EACnE,KAAK,GACN,EAAE,qBAAqB,CAAC,CAAC,CAAC,eA4B1B;AAED,wBAAgB,kBAAkB;;;;EAKjC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/List/ContentContainer/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAKZ,aAAa,EAEd,MAAM,OAAO,CAAC;AAKf,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,oBAAY,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5E,UAAU,sBAAsB,CAAC,CAAC,SAAS,SAAS,GAAG,MAAM,CAC3D,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/B,KAAK,CAAC,EAAE,CAAC,CAAC;CACX;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC,SAAS,SAAS;IACxD,gBAAgB,CAAC,EAAE,aAAa,CAAC;IACjC,SAAS,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC;IACrD,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;CAChC;AAaD,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,CAAC,SAAS,SAAS,GAAG,MAAM,EAAE,EACrE,gBAAgB,EAChB,SAAmE,EACnE,KAAK,EACL,QAAQ,GACT,EAAE,qBAAqB,CAAC,CAAC,CAAC,eA8B1B;AAED,wBAAgB,kBAAkB;;;;;EAKjC"}
@@ -45,7 +45,8 @@ function ContentContainer(_ref) {
45
45
  var defaultViewState = _ref.defaultViewState,
46
46
  _ref$Component = _ref.Component,
47
47
  Component = _ref$Component === void 0 ? _DefaultCell.default : _ref$Component,
48
- value = _ref.value;
48
+ value = _ref.value,
49
+ onSubmit = _ref.onSubmit;
49
50
 
50
51
  var _useState = (0, _react.useState)(defaultViewState || 'view'),
51
52
  _useState2 = _slicedToArray(_useState, 2),
@@ -58,14 +59,17 @@ function ContentContainer(_ref) {
58
59
  return _constants.VIEW_STATES.VIEW;
59
60
  });
60
61
  }, []);
61
- var values = (0, _react.useMemo)(function () {
62
- return {
63
- viewState: viewState,
64
- toggle: toggle
65
- };
66
- }, [viewState, toggle]);
62
+ var contextValue = (0, _react.useMemo)(function () {
63
+ return (// eslint-disable-next-line @typescript-eslint/no-object-literal-type-assertion
64
+ {
65
+ viewState: viewState,
66
+ toggle: toggle,
67
+ onSubmit: onSubmit
68
+ }
69
+ );
70
+ }, [viewState, toggle, onSubmit]);
67
71
  return _react.default.createElement(ContentCellProvider.Provider, {
68
- value: values
72
+ value: contextValue
69
73
  }, _react.default.createElement(_BaseCell.default, null, _react.default.createElement(Component, {
70
74
  value: value
71
75
  })));
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
- interface DefaultCellProps {
2
+ export interface DefaultCellProps {
3
3
  value?: string;
4
4
  }
5
5
  export default function DefaultCell({ value }: DefaultCellProps): JSX.Element;
6
- export {};
7
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/List/DefaultCell/index.tsx"],"names":[],"mappings":";AAIA,UAAU,gBAAgB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,KAAK,EAAE,EAAE,gBAAgB,eAM9D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/List/DefaultCell/index.tsx"],"names":[],"mappings":";AAIA,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,KAAK,EAAE,EAAE,gBAAgB,eAM9D"}
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { DefaultCellProps } from '../DefaultCell';
3
+ import { EditableCellAlignment, ListViewState } from '../types';
4
+ import { ButtonProps } from '../../Button';
5
+ interface EditableCellProps extends Partial<DefaultCellProps>, Pick<ButtonProps, 'icon' | 'text'> {
6
+ onClick?: (viewState: ListViewState) => void;
7
+ align?: EditableCellAlignment;
8
+ buttonIcon: ButtonProps['icon'];
9
+ buttonText: ButtonProps['text'];
10
+ }
11
+ export default function EditableCell({ align, value, onClick, buttonText, buttonIcon, }: EditableCellProps): JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/List/EditableCell/index.tsx"],"names":[],"mappings":";AAEA,OAAoB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAG/D,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGhE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,UAAU,iBACR,SAAQ,OAAO,CAAC,gBAAgB,CAAC,EAC/B,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7C,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAChC,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,KAAgB,EAChB,KAAK,EACL,OAAO,EACP,UAAU,EACV,UAAU,GACX,EAAE,iBAAiB,eAoBnB"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = EditableCell;
7
+
8
+ var _react = _interopRequireWildcard(require("react"));
9
+
10
+ var _DefaultCell = _interopRequireDefault(require("../DefaultCell"));
11
+
12
+ var _ = require("../..");
13
+
14
+ var _styles = require("./styles");
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+
18
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
19
+
20
+ function EditableCell(_ref) {
21
+ var _ref$align = _ref.align,
22
+ align = _ref$align === void 0 ? 'inline' : _ref$align,
23
+ value = _ref.value,
24
+ onClick = _ref.onClick,
25
+ buttonText = _ref.buttonText,
26
+ buttonIcon = _ref.buttonIcon;
27
+
28
+ var _useListItemContent = (0, _.useListItemContent)(),
29
+ viewState = _useListItemContent.viewState,
30
+ size = _useListItemContent.size;
31
+
32
+ var handleOnClick = (0, _react.useCallback)(function () {
33
+ onClick && onClick(viewState);
34
+ }, [onClick, viewState]);
35
+ return _react.default.createElement(_styles.Container, {
36
+ align: align
37
+ }, value && _react.default.createElement(_DefaultCell.default, {
38
+ value: value
39
+ }), _react.default.createElement(_styles.Button, {
40
+ variant: "ghost",
41
+ onClick: handleOnClick,
42
+ size: size,
43
+ text: buttonText,
44
+ icon: buttonIcon,
45
+ align: align
46
+ }));
47
+ }
@@ -0,0 +1,204 @@
1
+ /// <reference types="react" />
2
+ import { EditableCellAlignment } from '../types';
3
+ import { ButtonProps } from '../../Button';
4
+ export declare const Container: import("styled-components").StyledComponent<"div", any, Partial<{
5
+ readonly alignContent?: string | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
6
+ readonly XS: "XS";
7
+ readonly SM: "SM";
8
+ readonly MD: "MD";
9
+ readonly LG: "LG";
10
+ readonly XL: "XL";
11
+ }> | undefined;
12
+ readonly alignItems?: string | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
13
+ readonly XS: "XS";
14
+ readonly SM: "SM";
15
+ readonly MD: "MD";
16
+ readonly LG: "LG";
17
+ readonly XL: "XL";
18
+ }> | undefined;
19
+ readonly alignSelf?: string | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
20
+ readonly XS: "XS";
21
+ readonly SM: "SM";
22
+ readonly MD: "MD";
23
+ readonly LG: "LG";
24
+ readonly XL: "XL";
25
+ }> | undefined;
26
+ readonly flex?: string | number | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("react").ReactText, {
27
+ readonly XS: "XS";
28
+ readonly SM: "SM";
29
+ readonly MD: "MD";
30
+ readonly LG: "LG";
31
+ readonly XL: "XL";
32
+ }> | undefined;
33
+ readonly flexBasis?: string | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
34
+ readonly XS: "XS";
35
+ readonly SM: "SM";
36
+ readonly MD: "MD";
37
+ readonly LG: "LG";
38
+ readonly XL: "XL";
39
+ }> | undefined;
40
+ readonly flexDirection?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "row" | "column" | "column-reverse" | "row-reverse" | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").FlexDirectionProperty, {
41
+ readonly XS: "XS";
42
+ readonly SM: "SM";
43
+ readonly MD: "MD";
44
+ readonly LG: "LG";
45
+ readonly XL: "XL";
46
+ }> | undefined;
47
+ readonly flexGrow?: number | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").GlobalsNumber, {
48
+ readonly XS: "XS";
49
+ readonly SM: "SM";
50
+ readonly MD: "MD";
51
+ readonly LG: "LG";
52
+ readonly XL: "XL";
53
+ }> | undefined;
54
+ readonly flexShrink?: number | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").GlobalsNumber, {
55
+ readonly XS: "XS";
56
+ readonly SM: "SM";
57
+ readonly MD: "MD";
58
+ readonly LG: "LG";
59
+ readonly XL: "XL";
60
+ }> | undefined;
61
+ readonly flexWrap?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "nowrap" | "wrap" | "wrap-reverse" | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").FlexWrapProperty, {
62
+ readonly XS: "XS";
63
+ readonly SM: "SM";
64
+ readonly MD: "MD";
65
+ readonly LG: "LG";
66
+ readonly XL: "XL";
67
+ }> | undefined;
68
+ readonly justifyContent?: string | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
69
+ readonly XS: "XS";
70
+ readonly SM: "SM";
71
+ readonly MD: "MD";
72
+ readonly LG: "LG";
73
+ readonly XL: "XL";
74
+ }> | undefined;
75
+ readonly justifyItems?: string | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
76
+ readonly XS: "XS";
77
+ readonly SM: "SM";
78
+ readonly MD: "MD";
79
+ readonly LG: "LG";
80
+ readonly XL: "XL";
81
+ }> | undefined;
82
+ readonly justifySelf?: string | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
83
+ readonly XS: "XS";
84
+ readonly SM: "SM";
85
+ readonly MD: "MD";
86
+ readonly LG: "LG";
87
+ readonly XL: "XL";
88
+ }> | undefined;
89
+ readonly order?: number | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").GlobalsNumber, {
90
+ readonly XS: "XS";
91
+ readonly SM: "SM";
92
+ readonly MD: "MD";
93
+ readonly LG: "LG";
94
+ readonly XL: "XL";
95
+ }> | undefined;
96
+ readonly size?: "XS" | "SM" | "MD" | "LG" | "XL" | undefined;
97
+ }> & Partial<{
98
+ readonly margin: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
99
+ readonly XS: "XS";
100
+ readonly SM: "SM";
101
+ readonly MD: "MD";
102
+ readonly LG: "LG";
103
+ readonly XL: "XL";
104
+ }>;
105
+ readonly marginBottom: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
106
+ readonly XS: "XS";
107
+ readonly SM: "SM";
108
+ readonly MD: "MD";
109
+ readonly LG: "LG";
110
+ readonly XL: "XL";
111
+ }>;
112
+ readonly marginLeft: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
113
+ readonly XS: "XS";
114
+ readonly SM: "SM";
115
+ readonly MD: "MD";
116
+ readonly LG: "LG";
117
+ readonly XL: "XL";
118
+ }>;
119
+ readonly marginRight: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
120
+ readonly XS: "XS";
121
+ readonly SM: "SM";
122
+ readonly MD: "MD";
123
+ readonly LG: "LG";
124
+ readonly XL: "XL";
125
+ }>;
126
+ readonly marginTop: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
127
+ readonly XS: "XS";
128
+ readonly SM: "SM";
129
+ readonly MD: "MD";
130
+ readonly LG: "LG";
131
+ readonly XL: "XL";
132
+ }>;
133
+ readonly marginX: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
134
+ readonly XS: "XS";
135
+ readonly SM: "SM";
136
+ readonly MD: "MD";
137
+ readonly LG: "LG";
138
+ readonly XL: "XL";
139
+ }>;
140
+ readonly marginY: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
141
+ readonly XS: "XS";
142
+ readonly SM: "SM";
143
+ readonly MD: "MD";
144
+ readonly LG: "LG";
145
+ readonly XL: "XL";
146
+ }>;
147
+ readonly padding: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
148
+ readonly XS: "XS";
149
+ readonly SM: "SM";
150
+ readonly MD: "MD";
151
+ readonly LG: "LG";
152
+ readonly XL: "XL";
153
+ }>;
154
+ readonly paddingBottom: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
155
+ readonly XS: "XS";
156
+ readonly SM: "SM";
157
+ readonly MD: "MD";
158
+ readonly LG: "LG";
159
+ readonly XL: "XL";
160
+ }>;
161
+ readonly paddingLeft: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
162
+ readonly XS: "XS";
163
+ readonly SM: "SM";
164
+ readonly MD: "MD";
165
+ readonly LG: "LG";
166
+ readonly XL: "XL";
167
+ }>;
168
+ readonly paddingRight: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
169
+ readonly XS: "XS";
170
+ readonly SM: "SM";
171
+ readonly MD: "MD";
172
+ readonly LG: "LG";
173
+ readonly XL: "XL";
174
+ }>;
175
+ readonly paddingTop: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
176
+ readonly XS: "XS";
177
+ readonly SM: "SM";
178
+ readonly MD: "MD";
179
+ readonly LG: "LG";
180
+ readonly XL: "XL";
181
+ }>;
182
+ readonly paddingX: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
183
+ readonly XS: "XS";
184
+ readonly SM: "SM";
185
+ readonly MD: "MD";
186
+ readonly LG: "LG";
187
+ readonly XL: "XL";
188
+ }>;
189
+ readonly paddingY: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
190
+ readonly XS: "XS";
191
+ readonly SM: "SM";
192
+ readonly MD: "MD";
193
+ readonly LG: "LG";
194
+ readonly XL: "XL";
195
+ }>;
196
+ }> & {
197
+ align: "bottom" | "right" | "inline";
198
+ }, never>;
199
+ interface AlignableButton extends ButtonProps {
200
+ align: EditableCellAlignment;
201
+ }
202
+ export declare const Button: import("styled-components").StyledComponent<import("react").RefForwardingComponent<HTMLButtonElement, ButtonProps>, any, AlignableButton, never>;
203
+ export {};
204
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/List/EditableCell/styles.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAuB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAc3D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAKrB,CAAC;AAYF,UAAU,eAAgB,SAAQ,WAAW;IAC3C,KAAK,EAAE,qBAAqB,CAAC;CAC9B;AAED,eAAO,MAAM,MAAM,kJAElB,CAAC"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Button = exports.Container = void 0;
7
+
8
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
+
10
+ var _rem = _interopRequireDefault(require("polished/lib/helpers/rem"));
11
+
12
+ var _designTokens = require("@decisiv/design-tokens");
13
+
14
+ var _Flex = _interopRequireDefault(require("../../Flex"));
15
+
16
+ var _Button = _interopRequireDefault(require("../../Button"));
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+
20
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
21
+
22
+ var containerAlignmentsStyles = {
23
+ inline: (0, _styledComponents.css)(["flex-direction:row;"]),
24
+ right: (0, _styledComponents.css)(["flex-direction:row;"]),
25
+ bottom: (0, _styledComponents.css)(["flex-direction:column;"])
26
+ };
27
+ var Container = (0, _styledComponents.default)(_Flex.default).withConfig({
28
+ displayName: "styles__Container",
29
+ componentId: "sc-1tnde8x-0"
30
+ })(["gap:", ";text-align:left;", ";"], (0, _rem.default)(_designTokens.spacing.base * 0.5), function (_ref) {
31
+ var align = _ref.align;
32
+ return containerAlignmentsStyles[align];
33
+ });
34
+ exports.Container = Container;
35
+ var buttonAlignmentsStyles = {
36
+ inline: (0, _styledComponents.css)(["height:auto;"]),
37
+ right: (0, _styledComponents.css)([""]),
38
+ bottom: (0, _styledComponents.css)(["align-self:flex-start;"])
39
+ };
40
+ var Button = (0, _styledComponents.default)(_Button.default).withConfig({
41
+ displayName: "styles__Button",
42
+ componentId: "sc-1tnde8x-1"
43
+ })(["", ""], function (_ref2) {
44
+ var align = _ref2.align;
45
+ return buttonAlignmentsStyles[align];
46
+ });
47
+ exports.Button = Button;
@@ -4,5 +4,5 @@ import { LabelContainerProps } from '../LabelContainer';
4
4
  export interface ListItemProps<T extends ValueType> extends Omit<LabelContainerProps, 'onHistoryClick'>, ContentContainerProps<T> {
5
5
  onHistoryClick?: (value?: T) => void;
6
6
  }
7
- export default function ListItem<T extends ValueType = string>({ label, onHistoryClick, historyLabel, tooltipText, Component, defaultViewState, value, }: ListItemProps<T>): JSX.Element;
7
+ export default function ListItem<T extends ValueType = string>({ label, onHistoryClick, historyLabel, tooltipText, Component, defaultViewState, value, onSubmit, }: ListItemProps<T>): JSX.Element;
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/List/ListItem/index.tsx"],"names":[],"mappings":";AAEA,OAAyB,EACvB,qBAAqB,EACrB,SAAS,EACV,MAAM,qBAAqB,CAAC;AAC7B,OAAuB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxE,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,SAAS,CAChD,SAAQ,IAAI,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,EACjD,qBAAqB,CAAC,CAAC,CAAC;IAC1B,cAAc,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,CAAC,SAAS,SAAS,GAAG,MAAM,EAAE,EAC7D,KAAK,EACL,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,KAAK,GACN,EAAE,aAAa,CAAC,CAAC,CAAC,eAoBlB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/List/ListItem/index.tsx"],"names":[],"mappings":";AAEA,OAAyB,EACvB,qBAAqB,EACrB,SAAS,EACV,MAAM,qBAAqB,CAAC;AAC7B,OAAuB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxE,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,SAAS,CAChD,SAAQ,IAAI,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,EACjD,qBAAqB,CAAC,CAAC,CAAC;IAC1B,cAAc,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,CAAC,SAAS,SAAS,GAAG,MAAM,EAAE,EAC7D,KAAK,EACL,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,KAAK,EACL,QAAQ,GACT,EAAE,aAAa,CAAC,CAAC,CAAC,eAqBlB"}
@@ -24,7 +24,8 @@ function ListItem(_ref) {
24
24
  tooltipText = _ref.tooltipText,
25
25
  Component = _ref.Component,
26
26
  defaultViewState = _ref.defaultViewState,
27
- value = _ref.value;
27
+ value = _ref.value,
28
+ onSubmit = _ref.onSubmit;
28
29
  var handleOnDotClick = (0, _react.useCallback)(function () {
29
30
  if (onHistoryClick) onHistoryClick(value);
30
31
  }, [onHistoryClick, value]);
@@ -36,6 +37,7 @@ function ListItem(_ref) {
36
37
  }), _react.default.createElement(_ContentContainer.default, {
37
38
  Component: Component,
38
39
  defaultViewState: defaultViewState,
39
- value: value
40
+ value: value,
41
+ onSubmit: onSubmit
40
42
  }));
41
43
  }
@@ -11,4 +11,9 @@ export declare const VIEW_STATES: {
11
11
  readonly FORM: "form";
12
12
  readonly VIEW: "view";
13
13
  };
14
+ export declare const EDITABLE_CELL_ALIGNMENTS: {
15
+ readonly RIGHT: "right";
16
+ readonly BOTTOM: "bottom";
17
+ readonly INLINE: "inline";
18
+ };
14
19
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/List/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;CAIX,CAAC;AAEX,eAAO,MAAM,KAAK;;;CAGR,CAAC;AAEX,eAAO,MAAM,WAAW;;;CAGd,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/List/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;CAIX,CAAC;AAEX,eAAO,MAAM,KAAK;;;CAGR,CAAC;AAEX,eAAO,MAAM,WAAW;;;CAGd,CAAC;AAEX,eAAO,MAAM,wBAAwB;;;;CAI3B,CAAC"}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.VIEW_STATES = exports.SIZES = exports.VARIANTS = void 0;
6
+ exports.EDITABLE_CELL_ALIGNMENTS = exports.VIEW_STATES = exports.SIZES = exports.VARIANTS = void 0;
7
7
  var VARIANTS = {
8
8
  ZEBRA: 'zebra',
9
9
  WHITE: 'white',
@@ -19,4 +19,10 @@ var VIEW_STATES = {
19
19
  FORM: 'form',
20
20
  VIEW: 'view'
21
21
  };
22
- exports.VIEW_STATES = VIEW_STATES;
22
+ exports.VIEW_STATES = VIEW_STATES;
23
+ var EDITABLE_CELL_ALIGNMENTS = {
24
+ RIGHT: 'right',
25
+ BOTTOM: 'bottom',
26
+ INLINE: 'inline'
27
+ };
28
+ exports.EDITABLE_CELL_ALIGNMENTS = EDITABLE_CELL_ALIGNMENTS;
@@ -7,6 +7,7 @@ declare function List({ variant, size, children, }: ListProps): JSX.Element;
7
7
  declare namespace List {
8
8
  var BaseCell: typeof import("./BaseCell").default;
9
9
  var DefaultCell: typeof import("./DefaultCell").default;
10
+ var EditableCell: typeof import("./EditableCell").default;
10
11
  var Item: typeof ListItem;
11
12
  }
12
13
  export default List;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/List/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAElE,OAAO,EAAE,SAAS,EAAoB,MAAM,SAAS,CAAC;AAKtD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAKlC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,eAAO,MAAM,WAAW,kDAEtB,CAAC;AAEH,iBAAwB,IAAI,CAAC,EAC3B,OAAwB,EACxB,IAAmB,EACnB,QAAQ,GACT,EAAE,SAAS,eAeX;kBAnBuB,IAAI;;;;;eAAJ,IAAI;AAqB5B,eAAO,MAAM,OAAO,yCAEnB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/List/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAElE,OAAO,EAAE,SAAS,EAAoB,MAAM,SAAS,CAAC;AAKtD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAMlC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,eAAO,MAAM,WAAW,kDAEtB,CAAC;AAEH,iBAAwB,IAAI,CAAC,EAC3B,OAAwB,EACxB,IAAmB,EACnB,QAAQ,GACT,EAAE,SAAS,eAeX;kBAnBuB,IAAI;;;;;;eAAJ,IAAI;AAqB5B,eAAO,MAAM,OAAO,yCAEnB,CAAC"}
@@ -24,6 +24,8 @@ var _styles = require("./styles");
24
24
 
25
25
  var _DefaultCell = _interopRequireDefault(require("./DefaultCell"));
26
26
 
27
+ var _EditableCell = _interopRequireDefault(require("./EditableCell"));
28
+
27
29
  var _ContentContainer = require("./ContentContainer");
28
30
 
29
31
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -61,4 +63,5 @@ var useList = function useList() {
61
63
  exports.useList = useList;
62
64
  List.BaseCell = _BaseCell.default;
63
65
  List.DefaultCell = _DefaultCell.default;
66
+ List.EditableCell = _EditableCell.default;
64
67
  List.Item = _ListItem.default;
@@ -1,10 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  import { FlexProps } from '../../modifiers';
3
3
  import { ValueOf } from '../../types';
4
- import { VARIANTS, SIZES, VIEW_STATES } from './constants';
4
+ import { VARIANTS, SIZES, VIEW_STATES, EDITABLE_CELL_ALIGNMENTS } from './constants';
5
5
  export declare type ListVariant = ValueOf<typeof VARIANTS>;
6
6
  export declare type ListSize = ValueOf<typeof SIZES>;
7
7
  export declare type ListViewState = ValueOf<typeof VIEW_STATES>;
8
+ export declare type EditableCellAlignment = ValueOf<typeof EDITABLE_CELL_ALIGNMENTS>;
8
9
  export interface ListProps extends Omit<FlexProps, 'size'> {
9
10
  variant?: ListVariant;
10
11
  size?: ListSize;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/List/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE3D,oBAAY,WAAW,GAAG,OAAO,CAAC,OAAO,QAAQ,CAAC,CAAC;AACnD,oBAAY,QAAQ,GAAG,OAAO,CAAC,OAAO,KAAK,CAAC,CAAC;AAC7C,oBAAY,aAAa,GAAG,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC;AAExD,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;IACxD,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,oBAAY,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/List/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EACL,QAAQ,EACR,KAAK,EACL,WAAW,EACX,wBAAwB,EACzB,MAAM,aAAa,CAAC;AAErB,oBAAY,WAAW,GAAG,OAAO,CAAC,OAAO,QAAQ,CAAC,CAAC;AACnD,oBAAY,QAAQ,GAAG,OAAO,CAAC,OAAO,KAAK,CAAC,CAAC;AAC7C,oBAAY,aAAa,GAAG,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC;AACxD,oBAAY,qBAAqB,GAAG,OAAO,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE7E,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;IACxD,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,oBAAY,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import { ArrowProps } from './types';
2
2
  export declare const arrowColors: {
3
- information: import("@decisiv/design-tokens/lib/color").Color;
3
+ danger: import("@decisiv/design-tokens/lib/color").Color;
4
4
  success: import("@decisiv/design-tokens/lib/color").Color;
5
+ information: import("@decisiv/design-tokens/lib/color").Color;
5
6
  warning: import("@decisiv/design-tokens/lib/color").Color;
6
- danger: import("@decisiv/design-tokens/lib/color").Color;
7
7
  berryCrisp: import("@decisiv/design-tokens/lib/color").Color;
8
8
  koolaidCake: import("@decisiv/design-tokens/lib/color").Color;
9
9
  cookieMonster: import("@decisiv/design-tokens/lib/color").Color;
@@ -7,7 +7,7 @@ export declare const propTypes: {
7
7
  actionAttributes: any;
8
8
  actionIntent: PropTypes.Requireable<string>;
9
9
  actionRef: PropTypes.Requireable<any>;
10
- color: PropTypes.Requireable<"information" | "success" | "warning" | "danger" | "berryCrisp" | "koolaidCake" | "cookieMonster" | "cottonCandy" | "fizzyLime" | "mamboMango" | "carrotCake" | "roseGummy" | "licoriceMousse">;
10
+ color: PropTypes.Requireable<"danger" | "success" | "information" | "warning" | "berryCrisp" | "koolaidCake" | "cookieMonster" | "cottonCandy" | "fizzyLime" | "mamboMango" | "carrotCake" | "roseGummy" | "licoriceMousse">;
11
11
  variant: PropTypes.Requireable<string>;
12
12
  palette: PropTypes.Requireable<string>;
13
13
  size: PropTypes.Requireable<string>;
@@ -12,10 +12,10 @@ export declare type CommonUIColors = {
12
12
  [K in CommonUIColorKeys]: Color;
13
13
  };
14
14
  export declare const viColorKeys: ("berryCrisp" | "koolaidCake" | "cookieMonster" | "cottonCandy" | "fizzyLime" | "mamboMango" | "carrotCake" | "roseGummy" | "licoriceMousse")[];
15
- export declare const statusColorKeys: ("information" | "success" | "warning" | "danger")[];
15
+ export declare const statusColorKeys: ("danger" | "success" | "information" | "warning")[];
16
16
  export declare const viColors: VIColors;
17
17
  export declare const statusColors: StatusColors;
18
- export declare const commonUIColorKeys: ("information" | "success" | "warning" | "danger" | "berryCrisp" | "koolaidCake" | "cookieMonster" | "cottonCandy" | "fizzyLime" | "mamboMango" | "carrotCake" | "roseGummy" | "licoriceMousse")[];
18
+ export declare const commonUIColorKeys: ("danger" | "success" | "information" | "warning" | "berryCrisp" | "koolaidCake" | "cookieMonster" | "cottonCandy" | "fizzyLime" | "mamboMango" | "carrotCake" | "roseGummy" | "licoriceMousse")[];
19
19
  export declare const commonUIColors: CommonUIColors;
20
20
  export declare const commonUIThreeShadeColors: {
21
21
  readonly berryCrisp: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decisiv/ui-components",
3
- "version": "2.0.1-alpha.210+e51d940",
3
+ "version": "2.0.1-alpha.211+22cfa85",
4
4
  "description": "Decisiv's design system React components",
5
5
  "author": "Decisiv UI Development Team",
6
6
  "license": "MIT",
@@ -71,5 +71,5 @@
71
71
  "access": "public"
72
72
  },
73
73
  "private": false,
74
- "gitHead": "e51d9408aec827964739289ebf71550fdb3cb620"
74
+ "gitHead": "22cfa85a7348f88285a256628a844a654e36c7e9"
75
75
  }