@decisiv/ui-components 2.0.1-alpha.174 → 2.0.1-alpha.176

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.
@@ -42,7 +42,7 @@ export interface BaseInputFieldProps {
42
42
  showCharacterCount?: boolean;
43
43
  hideLabel?: boolean;
44
44
  style?: React.CSSProperties;
45
- value: string;
45
+ value?: string;
46
46
  warningMessage?: string;
47
47
  isTextArea?: boolean;
48
48
  multiple?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atoms/InputField/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EACZ,aAAa,EAEb,GAAG,EACH,sBAAsB,EAGvB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAoB5C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC;IACpC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MA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EACR,mBAAmB,CACK,CAAC;AAQ3B,eAAe,iBAAiB,CAAC"}
@@ -8,7 +8,201 @@ export declare const Body: import("styled-components").StyledComponent<"div", an
8
8
  export declare const ScrollYBox: import("styled-components").StyledComponent<"div", any, {
9
9
  size?: "XS" | "SM" | "MD" | "LG" | "XL" | undefined;
10
10
  }, never>;
11
- export declare const Header: import("styled-components").StyledComponent<"div", any, import("../Flex").FlexComponentProps, never>;
11
+ export declare const Header: import("styled-components").StyledComponent<"div", any, Partial<{
12
+ readonly alignContent?: 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 alignItems?: 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 alignSelf?: string | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
27
+ readonly XS: "XS";
28
+ readonly SM: "SM";
29
+ readonly MD: "MD";
30
+ readonly LG: "LG";
31
+ readonly XL: "XL";
32
+ }> | undefined;
33
+ readonly flex?: string | number | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("react").ReactText, {
34
+ readonly XS: "XS";
35
+ readonly SM: "SM";
36
+ readonly MD: "MD";
37
+ readonly LG: "LG";
38
+ readonly XL: "XL";
39
+ }> | undefined;
40
+ readonly flexBasis?: string | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
41
+ readonly XS: "XS";
42
+ readonly SM: "SM";
43
+ readonly MD: "MD";
44
+ readonly LG: "LG";
45
+ readonly XL: "XL";
46
+ }> | undefined;
47
+ readonly flexDirection?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "row" | "column" | "column-reverse" | "row-reverse" | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").FlexDirectionProperty, {
48
+ readonly XS: "XS";
49
+ readonly SM: "SM";
50
+ readonly MD: "MD";
51
+ readonly LG: "LG";
52
+ readonly XL: "XL";
53
+ }> | undefined;
54
+ readonly flexGrow?: 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 flexShrink?: number | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").GlobalsNumber, {
62
+ readonly XS: "XS";
63
+ readonly SM: "SM";
64
+ readonly MD: "MD";
65
+ readonly LG: "LG";
66
+ readonly XL: "XL";
67
+ }> | undefined;
68
+ readonly flexWrap?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "nowrap" | "wrap" | "wrap-reverse" | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").FlexWrapProperty, {
69
+ readonly XS: "XS";
70
+ readonly SM: "SM";
71
+ readonly MD: "MD";
72
+ readonly LG: "LG";
73
+ readonly XL: "XL";
74
+ }> | undefined;
75
+ readonly justifyContent?: 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 justifyItems?: 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 justifySelf?: string | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
90
+ readonly XS: "XS";
91
+ readonly SM: "SM";
92
+ readonly MD: "MD";
93
+ readonly LG: "LG";
94
+ readonly XL: "XL";
95
+ }> | undefined;
96
+ readonly order?: number | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").GlobalsNumber, {
97
+ readonly XS: "XS";
98
+ readonly SM: "SM";
99
+ readonly MD: "MD";
100
+ readonly LG: "LG";
101
+ readonly XL: "XL";
102
+ }> | undefined;
103
+ readonly size?: "XS" | "SM" | "MD" | "LG" | "XL" | undefined;
104
+ }> & Partial<{
105
+ readonly margin: 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 marginBottom: 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 marginLeft: 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 marginRight: 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 marginTop: 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 marginX: 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 marginY: 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 padding: 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 paddingBottom: 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 paddingLeft: 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 paddingRight: 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 paddingTop: 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 paddingX: 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
+ readonly paddingY: import("../../utils/dynamicModifiers").DynamicModifiersProp<number, {
197
+ readonly XS: "XS";
198
+ readonly SM: "SM";
199
+ readonly MD: "MD";
200
+ readonly LG: "LG";
201
+ readonly XL: "XL";
202
+ }>;
203
+ }> & {
204
+ flexDirection: string;
205
+ }, "flexDirection">;
12
206
  export declare const CloseButtonContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
13
207
  export declare const Content: import("styled-components").StyledComponent<"div", any, Partial<{
14
208
  readonly alignContent?: string | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
@@ -400,4 +594,5 @@ export declare const Footer: import("styled-components").StyledComponent<"div",
400
594
  }> & {
401
595
  hasIcon?: boolean | undefined;
402
596
  }, never>;
597
+ export declare const ActionWrapper: import("styled-components").StyledComponent<"div", any, import("../Flex").FlexComponentProps, never>;
403
598
  //# sourceMappingURL=components.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/components.tsx"],"names":[],"mappings":";AAwCA,eAAO,MAAM,OAAO;;SASnB,CAAC;AAEF,eAAO,MAAM,IAAI;;SA6BhB,CAAC;AAEF,eAAO,MAAM,UAAU;;SAetB,CAAC;AAEF,eAAO,MAAM,MAAM,sGAAiB,CAAC;AAErC,eAAO,MAAM,oBAAoB,oEAIhC,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAOnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAoBlB,CAAC"}
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/components.tsx"],"names":[],"mappings":";AAYA,eAAO,MAAM,OAAO;;SASnB,CAAC;AAEF,eAAO,MAAM,IAAI;;SA6BhB,CAAC;AAEF,eAAO,MAAM,UAAU;;SAetB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAoD,CAAC;AAExE,eAAO,MAAM,oBAAoB,oEAIhC,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAKnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAoBlB,CAAC;AAEF,eAAO,MAAM,aAAa,sGAkBzB,CAAC"}
@@ -3,10 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Footer = exports.Content = exports.CloseButtonContainer = exports.Header = exports.ScrollYBox = exports.Body = exports.Overlay = void 0;
6
+ exports.ActionWrapper = exports.Footer = exports.Content = exports.CloseButtonContainer = exports.Header = exports.ScrollYBox = exports.Body = exports.Overlay = void 0;
7
7
 
8
8
  var _toColorString = _interopRequireDefault(require("polished/lib/color/toColorString"));
9
9
 
10
+ var _rem = _interopRequireDefault(require("polished/lib/helpers/rem"));
11
+
10
12
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
13
 
12
14
  var _breakpointObserver = require("@decisiv/breakpoint-observer");
@@ -23,23 +25,6 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
23
25
 
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
27
 
26
- function withIcon() {
27
- return (0, _styledComponents.css)(["", ";"], (0, _dynamicModifiers.applyDynamicModifiers)('hasIcon', function (_ref) {
28
- var hasIcon = _ref.hasIcon,
29
- size = _ref.size;
30
-
31
- if (hasIcon) {
32
- if (size === _breakpointObserver.sizes.XS) {
33
- return (0, _styledComponents.css)(["padding-left:", "px;"], _designTokens.spacing.base * 2 + 42);
34
- }
35
-
36
- return (0, _styledComponents.css)(["padding-left:", "px;"], _designTokens.spacing.base * 3 + 42);
37
- }
38
-
39
- return '';
40
- }));
41
- }
42
-
43
28
  var Overlay = _styledComponents.default.div.withConfig({
44
29
  displayName: "components__Overlay",
45
30
  componentId: "zcog99-0"
@@ -60,7 +45,9 @@ var ScrollYBox = _styledComponents.default.div.withConfig({
60
45
  })(["overflow-y:auto;position:relative;height:100%;max-height:calc(100vh - 150px);", ";"], (0, _styleModifiers.when)('size', _breakpointObserver.sizes.XS, (0, _styledComponents.css)(["max-height:calc(100vh - 70px);"])));
61
46
 
62
47
  exports.ScrollYBox = ScrollYBox;
63
- var Header = (0, _styledComponents.default)(_Flex.default).withConfig({
48
+ var Header = (0, _styledComponents.default)(_Flex.default).attrs({
49
+ flexDirection: 'column'
50
+ }).withConfig({
64
51
  displayName: "components__Header",
65
52
  componentId: "zcog99-3"
66
53
  })([""]);
@@ -75,10 +62,15 @@ exports.CloseButtonContainer = CloseButtonContainer;
75
62
  var Content = (0, _styledComponents.default)(_Flex.default).withConfig({
76
63
  displayName: "components__Content",
77
64
  componentId: "zcog99-5"
78
- })(["flex:1;flex-direction:row;", ";"], withIcon());
65
+ })(["flex:1;flex-direction:row;"]);
79
66
  exports.Content = Content;
80
67
  var Footer = (0, _styledComponents.default)(_Flex.default).withConfig({
81
68
  displayName: "components__Footer",
82
69
  componentId: "zcog99-6"
83
- })(["background-color:", ";border-radius:0 0 2px 2px;border-top:1px solid ", ";bottom:0;left:0;position:absolute;right:0;", ";", ";"], (0, _toColorString.default)(_designTokens.color.base.fullMoon), (0, _toColorString.default)(_designTokens.color.opacity.charcoal15), withIcon(), (0, _styleModifiers.when)('size', _breakpointObserver.sizes.XS, (0, _styledComponents.css)(["border-radius:0;"])));
84
- exports.Footer = Footer;
70
+ })(["background-color:", ";border-radius:0 0 2px 2px;border-top:1px solid ", ";bottom:0;left:0;position:absolute;right:0;", ";"], (0, _toColorString.default)(_designTokens.color.base.fullMoon), (0, _toColorString.default)(_designTokens.color.opacity.charcoal15), (0, _styleModifiers.when)('size', _breakpointObserver.sizes.XS, (0, _styledComponents.css)(["border-radius:0;background-color:", ";flex-direction:column;"], (0, _toColorString.default)(_designTokens.color.base.fullMoon))));
71
+ exports.Footer = Footer;
72
+ var ActionWrapper = (0, _styledComponents.default)(_Flex.default).withConfig({
73
+ displayName: "components__ActionWrapper",
74
+ componentId: "zcog99-7"
75
+ })(["", ";"], (0, _styleModifiers.when)('size', _breakpointObserver.sizes.XS, (0, _styledComponents.css)(["width:100%;&:not(:first-child){margin-top:", ";}button{font-size:", ";width:100%;height:", ";}"], (0, _rem.default)(_designTokens.spacing.base * 0.5), (0, _rem.default)(_designTokens.typography.size.alias.extraLarge), (0, _rem.default)(_designTokens.spacing.base * 5))));
76
+ exports.ActionWrapper = ActionWrapper;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA0C,MAAM,OAAO,CAAC;AA8B/D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAyJrC,iBAAS,OAAO,CAAC,EACf,OAAO,EACP,OAAO,EACP,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,UAAU,GAAG,KAAK,CAAC,WAAW,GAAG,IAAI,CAmCvC;kBAxCQ,OAAO;;;;AAmDhB,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA0C,MAAM,OAAO,CAAC;AA+B/D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AA6JrC,iBAAS,OAAO,CAAC,EACf,OAAO,EACP,OAAO,EACP,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,UAAU,GAAG,KAAK,CAAC,WAAW,GAAG,IAAI,CAmCvC;kBAxCQ,OAAO;;;;AAmDhB,eAAe,OAAO,CAAC"}
@@ -78,7 +78,7 @@ var actionProps = [{}, {
78
78
  }];
79
79
 
80
80
  function Modal(_ref) {
81
- var _ref2, _ref3, _ref4, _ref5, _ref6;
81
+ var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
82
82
 
83
83
  var actions = _ref.actions,
84
84
  children = _ref.children,
@@ -168,7 +168,7 @@ function Modal(_ref) {
168
168
  }),
169
169
  zIndex: zIndex + 10
170
170
  }, translate(closeHint, 'modal.closeHint'))), IconComponent && _react.default.createElement(_Flex.default, {
171
- marginRight: 1
171
+ marginBottom: 0.5
172
172
  }, IconComponent), _react.default.createElement(_Typography.H2, null, title)), _react.default.createElement(_components.Content, {
173
173
  hasIcon: !!IconComponent,
174
174
  id: modalContentId,
@@ -179,21 +179,22 @@ function Modal(_ref) {
179
179
  hasIcon: !!IconComponent,
180
180
  id: modalFooterId,
181
181
  paddingX: (_ref6 = {}, _defineProperty(_ref6, _breakpointObserver.sizes.LG, 3), _defineProperty(_ref6, _breakpointObserver.sizes.XS, 2), _ref6),
182
- paddingY: 2,
182
+ paddingY: (_ref7 = {}, _defineProperty(_ref7, _breakpointObserver.sizes.LG, 2), _defineProperty(_ref7, _breakpointObserver.sizes.XS, 1.5), _ref7),
183
183
  size: breakpoint
184
184
  }, actions.map(function (action, index) {
185
- return _react.default.createElement(_Flex.default, {
185
+ return _react.default.createElement(_components.ActionWrapper, {
186
186
  key: action.text,
187
- marginRight: 0.5
187
+ marginRight: 0.5,
188
+ size: breakpoint
188
189
  }, _react.default.createElement(_Button.default, _extends({}, (0, _omit.default)(action, ['kind', 'size', 'variant']), actionProps[index])));
189
190
  }))));
190
191
  }
191
192
 
192
- function Manager(_ref7) {
193
- var onClose = _ref7.onClose,
194
- visible = _ref7.visible,
195
- children = _ref7.children,
196
- rest = _objectWithoutProperties(_ref7, ["onClose", "visible", "children"]);
193
+ function Manager(_ref8) {
194
+ var onClose = _ref8.onClose,
195
+ visible = _ref8.visible,
196
+ children = _ref8.children,
197
+ rest = _objectWithoutProperties(_ref8, ["onClose", "visible", "children"]);
197
198
 
198
199
  (0, _utils.useReturnFocus)(!visible);
199
200
 
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { BaseInputFieldProps } from '../../atoms/InputField';
3
+ export interface TagInputProps extends Omit<BaseInputFieldProps, 'onChange' | 'children' | 'value' | 'hideLabel'> {
4
+ hiddenLabel?: boolean;
5
+ defaultTags?: string[];
6
+ tags?: string[];
7
+ onChange?: (value: string[]) => void;
8
+ }
9
+ export default function TagInput({ defaultTags, tags, onChange, disabled, readOnly, label, hiddenLabel, ...props }: TagInputProps): JSX.Element;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TagInput/index.tsx"],"names":[],"mappings":";AAeA,OAAmB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAMzE,MAAM,WAAW,aACf,SAAQ,IAAI,CACV,mBAAmB,EACnB,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,WAAW,CAChD;IACD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,WAAgB,EAChB,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,WAAW,EACX,GAAG,KAAK,EACT,EAAE,aAAa,eAqMf"}
@@ -0,0 +1,217 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = TagInput;
7
+
8
+ var _react = _interopRequireWildcard(require("react"));
9
+
10
+ var _rem = _interopRequireDefault(require("polished/lib/helpers/rem"));
11
+
12
+ var _spacing = _interopRequireDefault(require("@decisiv/design-tokens/lib/spacing"));
13
+
14
+ var _Times = _interopRequireDefault(require("@decisiv/iconix/lib/components/Times"));
15
+
16
+ var _useTranslations = _interopRequireDefault(require("../../utils/useTranslations"));
17
+
18
+ var _InputField = _interopRequireDefault(require("../../atoms/InputField"));
19
+
20
+ var _Tag = _interopRequireDefault(require("../Tag"));
21
+
22
+ var _Button = _interopRequireDefault(require("../Button"));
23
+
24
+ var _styles = require("./styles");
25
+
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
+
28
+ 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; } }
29
+
30
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
31
+
32
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
33
+
34
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
35
+
36
+ function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
37
+
38
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
39
+
40
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
41
+
42
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
43
+
44
+ function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
45
+
46
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
47
+
48
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
49
+
50
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
51
+
52
+ function TagInput(_ref) {
53
+ var _ref$defaultTags = _ref.defaultTags,
54
+ defaultTags = _ref$defaultTags === void 0 ? [] : _ref$defaultTags,
55
+ tags = _ref.tags,
56
+ onChange = _ref.onChange,
57
+ disabled = _ref.disabled,
58
+ readOnly = _ref.readOnly,
59
+ label = _ref.label,
60
+ hiddenLabel = _ref.hiddenLabel,
61
+ props = _objectWithoutProperties(_ref, ["defaultTags", "tags", "onChange", "disabled", "readOnly", "label", "hiddenLabel"]);
62
+
63
+ var clearButtonRef = (0, _react.useRef)(null);
64
+ var inputRef = (0, _react.useRef)(null);
65
+
66
+ var _useState = (0, _react.useState)(false),
67
+ _useState2 = _slicedToArray(_useState, 2),
68
+ inputVisible = _useState2[0],
69
+ setInputVisible = _useState2[1];
70
+
71
+ var _useState3 = (0, _react.useState)(defaultTags),
72
+ _useState4 = _slicedToArray(_useState3, 2),
73
+ innerTags = _useState4[0],
74
+ setInnerTags = _useState4[1];
75
+
76
+ var translate = (0, _useTranslations.default)();
77
+ var isControlled = (0, _react.useMemo)(function () {
78
+ return !!tags;
79
+ }, [tags]);
80
+ var tagsToRender = (0, _react.useMemo)(function () {
81
+ return tags || innerTags;
82
+ }, [tags, innerTags]);
83
+ var isDisabled = disabled || readOnly;
84
+ var handleNotifyChange = (0, _react.useCallback)(function (value) {
85
+ if (!onChange) return;
86
+ onChange(value);
87
+ }, [onChange]);
88
+ var handleAddTag = (0, _react.useCallback)(function (rawString) {
89
+ var text = rawString.replace(/\s+/g, ' ').trim();
90
+ if (!text || tagsToRender.includes(text)) return;
91
+
92
+ if (isControlled) {
93
+ handleNotifyChange([].concat(_toConsumableArray(tags), [text]));
94
+ return;
95
+ }
96
+
97
+ setInnerTags(function (oldState) {
98
+ var newState = [].concat(_toConsumableArray(oldState), [text]);
99
+ handleNotifyChange(newState);
100
+ return newState;
101
+ });
102
+ }, [handleNotifyChange, tags, tagsToRender, isControlled]);
103
+ var handleRemoveOnBackspace = (0, _react.useCallback)(function () {
104
+ if (isControlled) {
105
+ handleNotifyChange(_toConsumableArray(tags.slice(0, -1)));
106
+ return;
107
+ }
108
+
109
+ setInnerTags(function (oldState) {
110
+ var newState = _toConsumableArray(oldState.slice(0, -1));
111
+
112
+ handleNotifyChange(newState);
113
+ return newState;
114
+ });
115
+ }, [isControlled, handleNotifyChange, tags]);
116
+ var handleRemoveTag = (0, _react.useCallback)(function (text) {
117
+ if (isControlled) {
118
+ handleNotifyChange(tags.filter(function (tag) {
119
+ return tag !== text;
120
+ }));
121
+ return;
122
+ }
123
+
124
+ setInnerTags(function (oldState) {
125
+ var newState = oldState.filter(function (tag) {
126
+ return tag !== text;
127
+ });
128
+ handleNotifyChange(newState);
129
+ return newState;
130
+ });
131
+ }, [isControlled, handleNotifyChange, tags]);
132
+ var handleOnKeyUp = (0, _react.useCallback)(function (e) {
133
+ e.stopPropagation();
134
+ var text = e.target.value;
135
+
136
+ if (!text && e.key === 'Backspace') {
137
+ handleRemoveOnBackspace();
138
+ }
139
+
140
+ if (text && e.key === 'Enter') {
141
+ e.preventDefault();
142
+ handleAddTag(text);
143
+ e.target.value = '';
144
+ }
145
+ }, [handleAddTag, handleRemoveOnBackspace]);
146
+ var handleFocus = (0, _react.useCallback)(function () {
147
+ setInputVisible(true);
148
+ }, []);
149
+ var handleBlur = (0, _react.useCallback)(function (e) {
150
+ // Suppress event if clicking in the X button
151
+ if (e.relatedTarget === clearButtonRef.current) {
152
+ return;
153
+ }
154
+
155
+ var text = e.target.value;
156
+ handleAddTag(text);
157
+ e.target.value = '';
158
+ setInputVisible(false);
159
+ }, [handleAddTag]);
160
+ var handleOnClearButtonClick = (0, _react.useCallback)(function () {
161
+ if (inputRef.current) {
162
+ inputRef.current.value = '';
163
+ }
164
+ }, []);
165
+ return _react.default.createElement(_styles.Wrapper, null, _react.default.createElement(_InputField.default, _extends({
166
+ ref: inputRef,
167
+ onFocus: handleFocus,
168
+ onBlur: handleBlur,
169
+ disabled: disabled,
170
+ readOnly: readOnly,
171
+ label: label,
172
+ hideLabel: hiddenLabel
173
+ }, props), function (innerProps) {
174
+ return _react.default.createElement(_styles.Container, null, tagsToRender.map(function (tag) {
175
+ return _react.default.createElement(_Tag.default, {
176
+ key: tag,
177
+ size: "small",
178
+ text: tag,
179
+ palette: "pastel",
180
+ color: isDisabled ? 'licoriceMousse' : 'information',
181
+ action: isDisabled ? undefined : function () {
182
+ return handleRemoveTag(tag);
183
+ },
184
+ actionIntent: "danger",
185
+ actionAttributes: {
186
+ 'aria-label': translate(undefined, 'tagInput.tagAriaLabel', {
187
+ tagName: tag
188
+ })
189
+ },
190
+ actionIcon: isDisabled ? undefined : _Times.default
191
+ });
192
+ }), _react.default.createElement(_styles.InputWrapper, null, _react.default.createElement(_styles.Input, _extends({}, innerProps, {
193
+ isVisible: inputVisible,
194
+ onKeyUp: handleOnKeyUp,
195
+ placeholder: " "
196
+ })), _react.default.createElement(_Button.default, {
197
+ ref: clearButtonRef,
198
+ style: {
199
+ display: 'none',
200
+ position: 'absolute',
201
+ right: 0,
202
+ top: 0,
203
+ bottom: 0,
204
+ paddingRight: (0, _rem.default)(_spacing.default.base * 0.8),
205
+ paddingLeft: (0, _rem.default)(_spacing.default.base * 0.8)
206
+ },
207
+ "aria-label": translate(undefined, 'tagInput.clearButton', {
208
+ inputLabel: label
209
+ }),
210
+ intent: "danger",
211
+ icon: _Times.default,
212
+ size: "small",
213
+ variant: "ghost",
214
+ onClick: handleOnClearButtonClick
215
+ })));
216
+ }));
217
+ }