orcs-design-system 3.3.38 → 3.3.39

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.
@@ -88,6 +88,29 @@ export const disabledTextArea = () => /*#__PURE__*/_jsx(TextArea, {
88
88
  disabled: true
89
89
  });
90
90
  disabledTextArea.storyName = "Disabled";
91
+ export const resizeTextArea = () => /*#__PURE__*/_jsxs(Spacer, {
92
+ my: "r",
93
+ children: [/*#__PURE__*/_jsx(TextArea, {
94
+ id: "TextAreaResizeNone",
95
+ label: "Not resizable",
96
+ resize: "none",
97
+ rows: "3",
98
+ defaultValue: "This textarea cannot be resized"
99
+ }), /*#__PURE__*/_jsx(TextArea, {
100
+ id: "TextAreaResizeHorizontal",
101
+ label: "Horizontal resize only",
102
+ resize: "horizontal",
103
+ rows: "3",
104
+ defaultValue: "This textarea can only be resized horizontally"
105
+ }), /*#__PURE__*/_jsx(TextArea, {
106
+ id: "TextAreaResizeVertical",
107
+ label: "Vertical resize only",
108
+ resize: "vertical",
109
+ rows: "3",
110
+ defaultValue: "This textarea can only be resized vertically"
111
+ })]
112
+ });
113
+ resizeTextArea.storyName = "Resize Options";
91
114
  defaultTextArea.__docgenInfo = {
92
115
  "description": "",
93
116
  "methods": [],
@@ -127,4 +150,9 @@ disabledTextArea.__docgenInfo = {
127
150
  "description": "",
128
151
  "methods": [],
129
152
  "displayName": "disabledTextArea"
153
+ };
154
+ resizeTextArea.__docgenInfo = {
155
+ "description": "",
156
+ "methods": [],
157
+ "displayName": "resizeTextArea"
130
158
  };
@@ -40,6 +40,7 @@ const Input = styled("textarea").withConfig({
40
40
  borderWidth: themeGet("borderWidths.1")(props),
41
41
  borderStyle: "solid",
42
42
  borderColor: props.invalid ? themeGet("colors.dangerLight")(props) : props.valid ? themeGet("colors.successLight")(props) : themeGet("colors.black30")(props),
43
+ resize: props.resize || "both",
43
44
  "&:hover": {
44
45
  borderColor: props.invalid ? themeGet("colors.dangerDark")(props) : props.valid ? themeGet("colors.successDark")(props) : themeGet("colors.primary")(props)
45
46
  },
@@ -86,6 +87,7 @@ const TextArea = /*#__PURE__*/React.forwardRef((props, ref) => {
86
87
  bold,
87
88
  cols,
88
89
  rows,
90
+ resize,
89
91
  onChange,
90
92
  defaultValue,
91
93
  autoFocus,
@@ -93,6 +95,7 @@ const TextArea = /*#__PURE__*/React.forwardRef((props, ref) => {
93
95
  WrapperStyles,
94
96
  LabelStyles,
95
97
  ariaLabel,
98
+ onKeyDown,
96
99
  InputStyles
97
100
  } = props;
98
101
  const component = /*#__PURE__*/_jsxs(Wrapper, {
@@ -114,6 +117,7 @@ const TextArea = /*#__PURE__*/React.forwardRef((props, ref) => {
114
117
  cols: cols,
115
118
  disabled: disabled,
116
119
  rows: rows,
120
+ resize: resize,
117
121
  autoFocus: autoFocus,
118
122
  valid: valid,
119
123
  invalid: invalid,
@@ -121,6 +125,7 @@ const TextArea = /*#__PURE__*/React.forwardRef((props, ref) => {
121
125
  "data-testid": props["data-testid"],
122
126
  defaultValue: defaultValue,
123
127
  "aria-label": ariaLabel,
128
+ onKeyDown: onKeyDown,
124
129
  ...InputStyles,
125
130
  children: value
126
131
  })]
@@ -180,7 +185,10 @@ TextArea.propTypes = {
180
185
  /** Specifies `textarea` default value (different from placeholder) */
181
186
  defaultValue: PropTypes.string,
182
187
  /** Specifies the design theme object */
183
- theme: PropTypes.object
188
+ theme: PropTypes.object,
189
+ /** Controls how the textarea can be resized (none, both, horizontal, vertical) */
190
+ resize: PropTypes.oneOf(["none", "both", "horizontal", "vertical"]),
191
+ onKeyDown: PropTypes.func
184
192
  };
185
193
  TextArea.__docgenInfo = {
186
194
  "description": "",
@@ -334,6 +342,33 @@ TextArea.__docgenInfo = {
334
342
  "name": "object"
335
343
  },
336
344
  "required": false
345
+ },
346
+ "resize": {
347
+ "description": "Controls how the textarea can be resized (none, both, horizontal, vertical)",
348
+ "type": {
349
+ "name": "enum",
350
+ "value": [{
351
+ "value": "\"none\"",
352
+ "computed": false
353
+ }, {
354
+ "value": "\"both\"",
355
+ "computed": false
356
+ }, {
357
+ "value": "\"horizontal\"",
358
+ "computed": false
359
+ }, {
360
+ "value": "\"vertical\"",
361
+ "computed": false
362
+ }]
363
+ },
364
+ "required": false
365
+ },
366
+ "onKeyDown": {
367
+ "description": "",
368
+ "type": {
369
+ "name": "func"
370
+ },
371
+ "required": false
337
372
  }
338
373
  }
339
374
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orcs-design-system",
3
- "version": "3.3.38",
3
+ "version": "3.3.39",
4
4
  "engines": {
5
5
  "node": "20.12.2"
6
6
  },