@design-edito/tools 0.4.21 → 0.4.23
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/agnostic/colors/index.d.ts +3 -3
- package/agnostic/colors/index.js +3 -3
- package/agnostic/css/index.d.ts +1 -1
- package/agnostic/css/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/index.d.ts +14 -14
- package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +14 -14
- package/agnostic/html/hyper-json/smart-tags/isolated/index.d.ts +3 -3
- package/agnostic/html/hyper-json/smart-tags/isolated/index.js +3 -3
- package/agnostic/html/index.d.ts +4 -4
- package/agnostic/html/index.js +4 -4
- package/agnostic/index.d.ts +1 -1
- package/agnostic/index.js +1 -1
- package/agnostic/misc/index.d.ts +2 -2
- package/agnostic/misc/index.js +2 -2
- package/agnostic/numbers/index.d.ts +1 -1
- package/agnostic/numbers/index.js +1 -1
- package/agnostic/objects/index.d.ts +2 -2
- package/agnostic/objects/index.js +2 -2
- package/agnostic/sanitization/index.d.ts +1 -1
- package/agnostic/sanitization/index.js +1 -1
- package/agnostic/strings/index.d.ts +1 -1
- package/agnostic/strings/index.js +1 -1
- package/agnostic/time/index.d.ts +1 -1
- package/agnostic/time/index.js +1 -1
- package/components/Button/index.d.ts +2 -7
- package/components/Button/index.js +2 -2
- package/components/Iframe/index.d.ts +16 -34
- package/components/Iframe/index.js +67 -27
- package/components/Input/index.controlled.d.ts +42 -0
- package/components/Input/index.controlled.js +53 -0
- package/components/Input/index.d.ts +21 -17
- package/components/Input/index.js +27 -18
- package/components/Select/index.controlled.d.ts +43 -0
- package/components/Select/index.controlled.js +53 -0
- package/components/Select/index.d.ts +22 -18
- package/components/Select/index.js +27 -18
- package/components/Textarea/index.controlled.d.ts +50 -0
- package/components/Textarea/index.controlled.js +74 -0
- package/components/Textarea/index.d.ts +22 -17
- package/components/Textarea/index.js +27 -18
- package/components/index.d.ts +1 -1
- package/components/index.js +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/node/@google-cloud/storage/file/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/index.js +1 -1
- package/node/cloud-storage/operations/index.d.ts +1 -1
- package/node/cloud-storage/operations/index.js +1 -1
- package/node/ftps/directory/index.d.ts +1 -1
- package/node/ftps/directory/index.js +1 -1
- package/node/images/transform/operations/index.d.ts +2 -2
- package/node/images/transform/operations/index.js +2 -2
- package/node/index.d.ts +1 -1
- package/node/index.js +1 -1
- package/node/process/index.d.ts +1 -1
- package/node/process/index.js +1 -1
- package/node/sftp/file/index.d.ts +1 -1
- package/node/sftp/file/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,30 +1,39 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { isNotFalsy } from '../../agnostic/booleans/is-falsy/index.js';
|
|
5
|
-
import { randomHash } from '../../agnostic/random/uuid/index.js';
|
|
6
|
-
import { textarea as publicClassName } from '../public-classnames.js';
|
|
7
|
-
import { mergeClassNames } from '../utils/index.js';
|
|
8
|
-
import cssModule from './styles.module.css';
|
|
3
|
+
import { ControlledTextarea } from './index.controlled.js';
|
|
9
4
|
/**
|
|
10
|
-
* Textarea field component
|
|
5
|
+
* Textarea field component supporting controlled and hybrid usage.
|
|
11
6
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* All standard textarea attributes are forwarded to the underlying element.
|
|
7
|
+
* Wraps {@link ControlledTextarea} and automatically manages the textarea
|
|
8
|
+
* value when no `value` prop is provided.
|
|
15
9
|
*
|
|
16
10
|
* ### CSS elements
|
|
17
11
|
* - `label`
|
|
18
|
-
* - `textarea`
|
|
19
12
|
* - `error`
|
|
20
13
|
*
|
|
21
14
|
* @param props - Component properties.
|
|
22
15
|
* @see {@link Props}
|
|
23
|
-
*
|
|
16
|
+
*
|
|
17
|
+
* @returns A labelled textarea with optional internal value management.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* - In controlled mode (`value` defined), the textarea value is fully driven
|
|
21
|
+
* by the parent component and internal state is never updated.
|
|
22
|
+
* - In hybrid mode, internal state is initialized from `defaultValue` and
|
|
23
|
+
* subsequently manages value updates itself.
|
|
24
|
+
* - In hybrid mode, the internal value is updated before forwarding the
|
|
25
|
+
* `onChange` callback.
|
|
26
|
+
* - `defaultValue` is only used to initialize internal state and is not
|
|
27
|
+
* forwarded to the underlying controlled component.
|
|
24
28
|
*/
|
|
25
|
-
export const Textarea = ({
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
|
|
29
|
+
export const Textarea = ({ defaultValue, value, onChange, ...rest }) => {
|
|
30
|
+
const isControlled = value !== undefined;
|
|
31
|
+
const [internal, setInternal] = useState(defaultValue ?? '');
|
|
32
|
+
const currentValue = isControlled ? value : internal;
|
|
33
|
+
const handleChange = (e) => {
|
|
34
|
+
if (!isControlled)
|
|
35
|
+
setInternal(e.target.value);
|
|
36
|
+
onChange?.(e);
|
|
37
|
+
};
|
|
38
|
+
return _jsx(ControlledTextarea, { ...rest, value: currentValue, onChange: handleChange });
|
|
30
39
|
};
|
package/components/index.d.ts
CHANGED
|
@@ -20,8 +20,8 @@ export * as sequencer from './Sequencer/index.js'
|
|
|
20
20
|
export * as shadowRoot from './ShadowRoot/index.js'
|
|
21
21
|
export * as subtitles from './Subtitles/index.js'
|
|
22
22
|
export * as textarea from './Textarea/index.js'
|
|
23
|
-
export * as theatre from './Theatre/index.js'
|
|
24
23
|
export * as uiModule from './UIModule/index.js'
|
|
24
|
+
export * as theatre from './Theatre/index.js'
|
|
25
25
|
export * as video from './Video/index.js'
|
|
26
26
|
export * as wipAudioQuote from './_WIP_AudioQuote/index.js'
|
|
27
27
|
export * as wipIcon from './_WIP_Icon/index.js'
|
package/components/index.js
CHANGED
|
@@ -20,8 +20,8 @@ export * as sequencer from './Sequencer/index.js'
|
|
|
20
20
|
export * as shadowRoot from './ShadowRoot/index.js'
|
|
21
21
|
export * as subtitles from './Subtitles/index.js'
|
|
22
22
|
export * as textarea from './Textarea/index.js'
|
|
23
|
-
export * as theatre from './Theatre/index.js'
|
|
24
23
|
export * as uiModule from './UIModule/index.js'
|
|
24
|
+
export * as theatre from './Theatre/index.js'
|
|
25
25
|
export * as video from './Video/index.js'
|
|
26
26
|
export * as wipAudioQuote from './_WIP_AudioQuote/index.js'
|
|
27
27
|
export * as wipIcon from './_WIP_Icon/index.js'
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * as copy from './copy/index.js'
|
|
2
|
-
export * as download from './download/index.js'
|
|
3
2
|
export * as exists from './exists/index.js'
|
|
3
|
+
export * as download from './download/index.js'
|
|
4
4
|
export * as generateSignedUrl from './generate-signed-url/index.js'
|
|
5
5
|
export * as getMetadata from './get-metadata/index.js'
|
|
6
6
|
export * as getPermissions from './get-permissions/index.js'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * as copy from './copy/index.js'
|
|
2
|
-
export * as download from './download/index.js'
|
|
3
2
|
export * as exists from './exists/index.js'
|
|
3
|
+
export * as download from './download/index.js'
|
|
4
4
|
export * as generateSignedUrl from './generate-signed-url/index.js'
|
|
5
5
|
export * as getMetadata from './get-metadata/index.js'
|
|
6
6
|
export * as getPermissions from './get-permissions/index.js'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * as copyFile from './copy-file/index.js'
|
|
2
1
|
export * as copyDir from './copy-dir/index.js'
|
|
2
|
+
export * as copyFile from './copy-file/index.js'
|
|
3
3
|
export * as downloadFile from './download-file/index.js'
|
|
4
4
|
export * as existsFile from './exists-file/index.js'
|
|
5
5
|
export * as listDir from './list-dir/index.js'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * as copyFile from './copy-file/index.js'
|
|
2
1
|
export * as copyDir from './copy-dir/index.js'
|
|
2
|
+
export * as copyFile from './copy-file/index.js'
|
|
3
3
|
export * as downloadFile from './download-file/index.js'
|
|
4
4
|
export * as existsFile from './exists-file/index.js'
|
|
5
5
|
export * as listDir from './list-dir/index.js'
|
|
@@ -9,7 +9,7 @@ export * as hue from './hue/index.js'
|
|
|
9
9
|
export * as level from './level/index.js'
|
|
10
10
|
export * as lighten from './lighten/index.js'
|
|
11
11
|
export * as normalize from './normalize/index.js'
|
|
12
|
-
export * as overlay from './overlay/index.js'
|
|
13
12
|
export * as resize from './resize/index.js'
|
|
14
|
-
export * as
|
|
13
|
+
export * as overlay from './overlay/index.js'
|
|
15
14
|
export * as rotate from './rotate/index.js'
|
|
15
|
+
export * as saturate from './saturate/index.js'
|
|
@@ -9,7 +9,7 @@ export * as hue from './hue/index.js'
|
|
|
9
9
|
export * as level from './level/index.js'
|
|
10
10
|
export * as lighten from './lighten/index.js'
|
|
11
11
|
export * as normalize from './normalize/index.js'
|
|
12
|
-
export * as overlay from './overlay/index.js'
|
|
13
12
|
export * as resize from './resize/index.js'
|
|
14
|
-
export * as
|
|
13
|
+
export * as overlay from './overlay/index.js'
|
|
15
14
|
export * as rotate from './rotate/index.js'
|
|
15
|
+
export * as saturate from './saturate/index.js'
|
package/node/index.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ export * as encryption from './encryption/index.js'
|
|
|
7
7
|
export * as files from './files/index.js'
|
|
8
8
|
export * as ftps from './ftps/index.js'
|
|
9
9
|
export * as images from './images/index.js'
|
|
10
|
-
export * as sftp from './sftp/index.js'
|
|
11
10
|
export * as process from './process/index.js'
|
|
11
|
+
export * as sftp from './sftp/index.js'
|
package/node/index.js
CHANGED
|
@@ -7,5 +7,5 @@ export * as encryption from './encryption/index.js'
|
|
|
7
7
|
export * as files from './files/index.js'
|
|
8
8
|
export * as ftps from './ftps/index.js'
|
|
9
9
|
export * as images from './images/index.js'
|
|
10
|
-
export * as sftp from './sftp/index.js'
|
|
11
10
|
export * as process from './process/index.js'
|
|
11
|
+
export * as sftp from './sftp/index.js'
|
package/node/process/index.d.ts
CHANGED
package/node/process/index.js
CHANGED
package/node/sftp/file/index.js
CHANGED