@transferwise/components 0.0.0-experimental-c54e90a → 0.0.0-experimental-e611dd1
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/build/common/hooks/useResizeObserver.js +3 -3
- package/build/common/hooks/useResizeObserver.js.map +1 -1
- package/build/common/hooks/useResizeObserver.mjs +3 -3
- package/build/common/hooks/useResizeObserver.mjs.map +1 -1
- package/build/field/Field.js +2 -3
- package/build/field/Field.js.map +1 -1
- package/build/field/Field.mjs +2 -3
- package/build/field/Field.mjs.map +1 -1
- package/build/i18n/en.json +0 -2
- package/build/i18n/en.json.js +0 -2
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +0 -2
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/index.js +0 -2
- package/build/index.js.map +1 -1
- package/build/index.mjs +0 -1
- package/build/index.mjs.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.js +2 -3
- package/build/listItem/Prompt/ListItemPrompt.js.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.mjs +2 -3
- package/build/listItem/Prompt/ListItemPrompt.mjs.map +1 -1
- package/build/main.css +29 -192
- package/build/prompt/ActionPrompt/ActionPrompt.js +40 -8
- package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -1
- package/build/prompt/ActionPrompt/ActionPrompt.mjs +40 -8
- package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -1
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.js +4 -11
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.js.map +1 -1
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs +4 -11
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs.map +1 -1
- package/build/styles/main.css +29 -192
- package/build/table/Table.js +5 -5
- package/build/table/Table.js.map +1 -1
- package/build/table/Table.mjs +5 -5
- package/build/table/Table.mjs.map +1 -1
- package/build/typeahead/Typeahead.js +2 -3
- package/build/typeahead/Typeahead.js.map +1 -1
- package/build/typeahead/Typeahead.mjs +2 -3
- package/build/typeahead/Typeahead.mjs.map +1 -1
- package/build/types/common/hooks/useResizeObserver.d.ts +1 -1
- package/build/types/common/hooks/useResizeObserver.d.ts.map +1 -1
- package/build/types/index.d.ts +2 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts +11 -2
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -1
- package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts +3 -35
- package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts.map +1 -1
- package/build/types/prompt/index.d.ts +0 -2
- package/build/types/prompt/index.d.ts.map +1 -1
- package/build/types/test-utils/index.d.ts +0 -4
- package/build/types/test-utils/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/common/bottomSheet/BottomSheet.test.story.tsx +6 -5
- package/src/common/hooks/useResizeObserver.ts +2 -3
- package/src/i18n/en.json +0 -2
- package/src/index.ts +2 -2
- package/src/main.css +29 -192
- package/src/main.less +1 -3
- package/src/prompt/ActionPrompt/ActionPrompt.tsx +62 -9
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.tsx +40 -56
- package/src/prompt/index.ts +0 -4
- package/src/sentimentSurface/SentimentSurface.story.tsx +17 -43
- package/src/table/Table.story.tsx +1 -1
- package/src/table/Table.tsx +5 -5
- package/build/common/hooks/useContainerSize.js +0 -30
- package/build/common/hooks/useContainerSize.js.map +0 -1
- package/build/common/hooks/useContainerSize.mjs +0 -28
- package/build/common/hooks/useContainerSize.mjs.map +0 -1
- package/build/prompt/CriticalBanner/CriticalBanner.js +0 -142
- package/build/prompt/CriticalBanner/CriticalBanner.js.map +0 -1
- package/build/prompt/CriticalBanner/CriticalBanner.mjs +0 -140
- package/build/prompt/CriticalBanner/CriticalBanner.mjs.map +0 -1
- package/build/prompt/CriticalBanner/helpers.js +0 -29
- package/build/prompt/CriticalBanner/helpers.js.map +0 -1
- package/build/prompt/CriticalBanner/helpers.mjs +0 -26
- package/build/prompt/CriticalBanner/helpers.mjs.map +0 -1
- package/build/prompt/common/Expander/Expander.js +0 -35
- package/build/prompt/common/Expander/Expander.js.map +0 -1
- package/build/prompt/common/Expander/Expander.messages.js +0 -17
- package/build/prompt/common/Expander/Expander.messages.js.map +0 -1
- package/build/prompt/common/Expander/Expander.messages.mjs +0 -13
- package/build/prompt/common/Expander/Expander.messages.mjs.map +0 -1
- package/build/prompt/common/Expander/Expander.mjs +0 -33
- package/build/prompt/common/Expander/Expander.mjs.map +0 -1
- package/build/prompt/helpers/promptMedia.js +0 -52
- package/build/prompt/helpers/promptMedia.js.map +0 -1
- package/build/prompt/helpers/promptMedia.mjs +0 -50
- package/build/prompt/helpers/promptMedia.mjs.map +0 -1
- package/build/styles/prompt/CriticalBanner/CriticalBanner.css +0 -132
- package/build/styles/prompt/CriticalBanner/CriticalBanner.vars.css +0 -0
- package/build/styles/prompt/common/Expander/Expander.css +0 -8
- package/build/types/common/hooks/useContainerSize.d.ts +0 -14
- package/build/types/common/hooks/useContainerSize.d.ts.map +0 -1
- package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts +0 -39
- package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts.map +0 -1
- package/build/types/prompt/CriticalBanner/helpers.d.ts +0 -18
- package/build/types/prompt/CriticalBanner/helpers.d.ts.map +0 -1
- package/build/types/prompt/CriticalBanner/index.d.ts +0 -3
- package/build/types/prompt/CriticalBanner/index.d.ts.map +0 -1
- package/build/types/prompt/common/Expander/Expander.d.ts +0 -20
- package/build/types/prompt/common/Expander/Expander.d.ts.map +0 -1
- package/build/types/prompt/common/Expander/Expander.messages.d.ts +0 -14
- package/build/types/prompt/common/Expander/Expander.messages.d.ts.map +0 -1
- package/build/types/prompt/helpers/promptMedia.d.ts +0 -22
- package/build/types/prompt/helpers/promptMedia.d.ts.map +0 -1
- package/src/common/hooks/useContainerSize.test.tsx +0 -121
- package/src/common/hooks/useContainerSize.ts +0 -32
- package/src/prompt/CriticalBanner/CriticalBanner.accessibility.docs.mdx +0 -113
- package/src/prompt/CriticalBanner/CriticalBanner.css +0 -132
- package/src/prompt/CriticalBanner/CriticalBanner.less +0 -153
- package/src/prompt/CriticalBanner/CriticalBanner.story.tsx +0 -635
- package/src/prompt/CriticalBanner/CriticalBanner.test.story.tsx +0 -422
- package/src/prompt/CriticalBanner/CriticalBanner.tsx +0 -178
- package/src/prompt/CriticalBanner/CriticalBanner.vars.css +0 -0
- package/src/prompt/CriticalBanner/CriticalBanner.vars.less +0 -6
- package/src/prompt/CriticalBanner/helpers.ts +0 -39
- package/src/prompt/CriticalBanner/index.ts +0 -2
- package/src/prompt/common/Expander/Expander.css +0 -8
- package/src/prompt/common/Expander/Expander.less +0 -9
- package/src/prompt/common/Expander/Expander.messages.ts +0 -14
- package/src/prompt/common/Expander/Expander.test.tsx +0 -167
- package/src/prompt/common/Expander/Expander.tsx +0 -83
- package/src/prompt/helpers/promptMedia.tsx +0 -79
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var useEffectEvent = require('./useEffectEvent.js');
|
|
5
5
|
|
|
6
|
-
function useResizeObserver(ref, callback
|
|
6
|
+
function useResizeObserver(ref, callback) {
|
|
7
7
|
const handleCallback = useEffectEvent.useEffectEvent(callback);
|
|
8
8
|
React.useEffect(() => {
|
|
9
9
|
if (ref.current != null) {
|
|
@@ -11,14 +11,14 @@ function useResizeObserver(ref, callback, box = 'border-box') {
|
|
|
11
11
|
handleCallback(entry);
|
|
12
12
|
});
|
|
13
13
|
resizeObserver.observe(ref.current, {
|
|
14
|
-
box
|
|
14
|
+
box: 'border-box'
|
|
15
15
|
});
|
|
16
16
|
return () => {
|
|
17
17
|
resizeObserver.disconnect();
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
return () => {};
|
|
21
|
-
}, [handleCallback, ref
|
|
21
|
+
}, [handleCallback, ref]);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
exports.useResizeObserver = useResizeObserver;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResizeObserver.js","sources":["../../../src/common/hooks/useResizeObserver.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { useEffectEvent } from './useEffectEvent';\n\nexport function useResizeObserver(\n ref: React.MutableRefObject<Element | null>,\n callback: (entry: ResizeObserverEntry) => void,\n
|
|
1
|
+
{"version":3,"file":"useResizeObserver.js","sources":["../../../src/common/hooks/useResizeObserver.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { useEffectEvent } from './useEffectEvent';\n\nexport function useResizeObserver(\n ref: React.MutableRefObject<Element | null>,\n callback: (entry: ResizeObserverEntry) => void,\n) {\n const handleCallback = useEffectEvent(callback);\n useEffect(() => {\n if (ref.current != null) {\n const resizeObserver = new ResizeObserver(([entry]) => {\n handleCallback(entry);\n });\n resizeObserver.observe(ref.current, { box: 'border-box' });\n return () => {\n resizeObserver.disconnect();\n };\n }\n return () => {};\n }, [handleCallback, ref]);\n}\n"],"names":["useResizeObserver","ref","callback","handleCallback","useEffectEvent","useEffect","current","resizeObserver","ResizeObserver","entry","observe","box","disconnect"],"mappings":";;;;;AAIM,SAAUA,iBAAiBA,CAC/BC,GAA2C,EAC3CC,QAA8C,EAAA;AAE9C,EAAA,MAAMC,cAAc,GAAGC,6BAAc,CAACF,QAAQ,CAAC;AAC/CG,EAAAA,eAAS,CAAC,MAAK;AACb,IAAA,IAAIJ,GAAG,CAACK,OAAO,IAAI,IAAI,EAAE;MACvB,MAAMC,cAAc,GAAG,IAAIC,cAAc,CAAC,CAAC,CAACC,KAAK,CAAC,KAAI;QACpDN,cAAc,CAACM,KAAK,CAAC;AACvB,MAAA,CAAC,CAAC;AACFF,MAAAA,cAAc,CAACG,OAAO,CAACT,GAAG,CAACK,OAAO,EAAE;AAAEK,QAAAA,GAAG,EAAE;AAAY,OAAE,CAAC;AAC1D,MAAA,OAAO,MAAK;QACVJ,cAAc,CAACK,UAAU,EAAE;MAC7B,CAAC;AACH,IAAA;IACA,OAAO,MAAK,CAAE,CAAC;AACjB,EAAA,CAAC,EAAE,CAACT,cAAc,EAAEF,GAAG,CAAC,CAAC;AAC3B;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
2
|
import { useEffectEvent } from './useEffectEvent.mjs';
|
|
3
3
|
|
|
4
|
-
function useResizeObserver(ref, callback
|
|
4
|
+
function useResizeObserver(ref, callback) {
|
|
5
5
|
const handleCallback = useEffectEvent(callback);
|
|
6
6
|
useEffect(() => {
|
|
7
7
|
if (ref.current != null) {
|
|
@@ -9,14 +9,14 @@ function useResizeObserver(ref, callback, box = 'border-box') {
|
|
|
9
9
|
handleCallback(entry);
|
|
10
10
|
});
|
|
11
11
|
resizeObserver.observe(ref.current, {
|
|
12
|
-
box
|
|
12
|
+
box: 'border-box'
|
|
13
13
|
});
|
|
14
14
|
return () => {
|
|
15
15
|
resizeObserver.disconnect();
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
return () => {};
|
|
19
|
-
}, [handleCallback, ref
|
|
19
|
+
}, [handleCallback, ref]);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export { useResizeObserver };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResizeObserver.mjs","sources":["../../../src/common/hooks/useResizeObserver.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { useEffectEvent } from './useEffectEvent';\n\nexport function useResizeObserver(\n ref: React.MutableRefObject<Element | null>,\n callback: (entry: ResizeObserverEntry) => void,\n
|
|
1
|
+
{"version":3,"file":"useResizeObserver.mjs","sources":["../../../src/common/hooks/useResizeObserver.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { useEffectEvent } from './useEffectEvent';\n\nexport function useResizeObserver(\n ref: React.MutableRefObject<Element | null>,\n callback: (entry: ResizeObserverEntry) => void,\n) {\n const handleCallback = useEffectEvent(callback);\n useEffect(() => {\n if (ref.current != null) {\n const resizeObserver = new ResizeObserver(([entry]) => {\n handleCallback(entry);\n });\n resizeObserver.observe(ref.current, { box: 'border-box' });\n return () => {\n resizeObserver.disconnect();\n };\n }\n return () => {};\n }, [handleCallback, ref]);\n}\n"],"names":["useResizeObserver","ref","callback","handleCallback","useEffectEvent","useEffect","current","resizeObserver","ResizeObserver","entry","observe","box","disconnect"],"mappings":";;;AAIM,SAAUA,iBAAiBA,CAC/BC,GAA2C,EAC3CC,QAA8C,EAAA;AAE9C,EAAA,MAAMC,cAAc,GAAGC,cAAc,CAACF,QAAQ,CAAC;AAC/CG,EAAAA,SAAS,CAAC,MAAK;AACb,IAAA,IAAIJ,GAAG,CAACK,OAAO,IAAI,IAAI,EAAE;MACvB,MAAMC,cAAc,GAAG,IAAIC,cAAc,CAAC,CAAC,CAACC,KAAK,CAAC,KAAI;QACpDN,cAAc,CAACM,KAAK,CAAC;AACvB,MAAA,CAAC,CAAC;AACFF,MAAAA,cAAc,CAACG,OAAO,CAACT,GAAG,CAACK,OAAO,EAAE;AAAEK,QAAAA,GAAG,EAAE;AAAY,OAAE,CAAC;AAC1D,MAAA,OAAO,MAAK;QACVJ,cAAc,CAACK,UAAU,EAAE;MAC7B,CAAC;AACH,IAAA;IACA,OAAO,MAAK,CAAE,CAAC;AACjB,EAAA,CAAC,EAAE,CAACT,cAAc,EAAEF,GAAG,CAAC,CAAC;AAC3B;;;;"}
|
package/build/field/Field.js
CHANGED
|
@@ -27,18 +27,17 @@ require('react-intl');
|
|
|
27
27
|
require('../common/closeButton/CloseButton.messages.js');
|
|
28
28
|
var jsxRuntime = require('react/jsx-runtime');
|
|
29
29
|
var InlinePrompt = require('../prompt/InlinePrompt/InlinePrompt.js');
|
|
30
|
+
require('../statusIcon/StatusIcon.js');
|
|
30
31
|
require('../body/Body.js');
|
|
31
32
|
require('../button/Button.resolver.js');
|
|
32
|
-
require('../prompt/PrimitivePrompt/PrimitivePrompt.js');
|
|
33
33
|
require('../badge/Badge.js');
|
|
34
34
|
require('@wise/art');
|
|
35
|
-
require('../statusIcon/StatusIcon.js');
|
|
36
35
|
require('@transferwise/neptune-validation');
|
|
37
36
|
require('../provider/direction/DirectionProvider.js');
|
|
37
|
+
require('../sentimentSurface/SentimentSurface.js');
|
|
38
38
|
require('../primitives/PrimitiveButton/PrimitiveButton.js');
|
|
39
39
|
require('../primitives/PrimitiveAnchor/PrimitiveAnchor.js');
|
|
40
40
|
require('../link/Link.messages.js');
|
|
41
|
-
require('../prompt/common/Expander/Expander.messages.js');
|
|
42
41
|
var contexts = require('../inputs/contexts.js');
|
|
43
42
|
var Label = require('../label/Label.js');
|
|
44
43
|
|
package/build/field/Field.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.js","sources":["../../src/field/Field.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useId, useRef } from 'react';\n\nimport { Sentiment } from '../common';\nimport { InlinePrompt, type InlinePromptProps } from '../prompt';\nimport {\n FieldLabelContextProvider,\n InputDescribedByProvider,\n InputIdContextProvider,\n InputInvalidProvider,\n} from '../inputs/contexts';\nimport { Label } from '../label';\n\nexport type FieldProps = {\n /** `null` disables auto-generating the `id` attribute, falling back to nesting-based label association over setting `htmlFor` explicitly. */\n id?: string | null;\n /** Should be specified unless the wrapped control has its own labeling mechanism, e.g. `Checkbox`. */\n label?: React.ReactNode;\n /** @default true */\n required?: boolean;\n /** @deprecated Use `description` prop instead. */\n hint?: React.ReactNode;\n message?: React.ReactNode;\n /**\n * Override for the [InlinePrompt icon's default, accessible name](/?path=/docs/other-statusicon-accessibility--docs)\n * announced by the screen readers\n * */\n messageIconLabel?: string;\n /**\n * If true, shows a loading spinner in place of the message icon of the InlinePrompt\n * @default false\n */\n messageLoading?: boolean;\n description?: React.ReactNode;\n /** @deprecated Use `message` and `type={Sentiment.NEGATIVE}` prop instead. */\n error?: React.ReactNode;\n /** @default Sentiment.NEUTRAL */\n sentiment?: InlinePromptProps['sentiment'];\n className?: string;\n children?: React.ReactNode;\n};\n\nexport const Field = ({\n id,\n label,\n required = true,\n message: propMessage,\n messageIconLabel,\n messageLoading,\n hint,\n description = hint,\n sentiment: propType = Sentiment.NEUTRAL,\n className,\n children,\n ...props\n}: FieldProps) => {\n const labelRef = useRef<HTMLLabelElement>(null);\n const sentiment = props.error ? Sentiment.NEGATIVE : propType;\n const message = propMessage || props.error;\n const hasError = sentiment === Sentiment.NEGATIVE;\n\n const labelId = useId();\n\n const fallbackInputId = useId();\n const inputId = id !== null ? (id ?? fallbackInputId) : undefined;\n\n const messageId = useId();\n const descriptionId = useId();\n\n /**\n * form control can have multiple messages to describe it,\n * e.g the description underneath the label and inline alert\n */\n function ariaDescribedbyByIds() {\n const messageIds = [];\n if (description) {\n messageIds.push(descriptionId);\n }\n if (message) {\n messageIds.push(messageId);\n }\n return messageIds.length > 0 ? messageIds.join(' ') : undefined;\n }\n\n return (\n <FieldLabelContextProvider value={{ id: labelId, ref: labelRef }}>\n <InputIdContextProvider value={inputId}>\n <InputDescribedByProvider value={ariaDescribedbyByIds()}>\n <InputInvalidProvider value={hasError}>\n <div\n className={clsx(\n 'np-field form-group d-block',\n {\n 'has-success': sentiment === Sentiment.POSITIVE,\n 'has-warning': sentiment === Sentiment.WARNING,\n 'has-error': hasError,\n 'has-info': sentiment === Sentiment.NEUTRAL,\n },\n className,\n )}\n >\n {label != null ? (\n <>\n <Label ref={labelRef} id={labelId} htmlFor={inputId}>\n {required ? label : <Label.Optional>{label}</Label.Optional>}\n </Label>\n <Label.Description id={descriptionId}>{description}</Label.Description>\n <div className=\"np-field-control\">{children}</div>\n </>\n ) : (\n children\n )}\n\n {message && (\n <InlinePrompt\n sentiment={sentiment}\n id={messageId}\n mediaLabel={messageIconLabel}\n className=\"np-field__prompt\"\n loading={messageLoading}\n width=\"full\"\n >\n {message}\n </InlinePrompt>\n )}\n </div>\n </InputInvalidProvider>\n </InputDescribedByProvider>\n </InputIdContextProvider>\n </FieldLabelContextProvider>\n );\n};\n"],"names":["Field","id","label","required","message","propMessage","messageIconLabel","messageLoading","hint","description","sentiment","propType","Sentiment","NEUTRAL","className","children","props","labelRef","useRef","error","NEGATIVE","hasError","labelId","useId","fallbackInputId","inputId","undefined","messageId","descriptionId","ariaDescribedbyByIds","messageIds","push","length","join","_jsx","FieldLabelContextProvider","value","ref","InputIdContextProvider","InputDescribedByProvider","InputInvalidProvider","_jsxs","clsx","POSITIVE","WARNING","_Fragment","Label","htmlFor","Optional","Description","InlinePrompt","mediaLabel","loading","width"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Field.js","sources":["../../src/field/Field.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useId, useRef } from 'react';\n\nimport { Sentiment } from '../common';\nimport { InlinePrompt, type InlinePromptProps } from '../prompt';\nimport {\n FieldLabelContextProvider,\n InputDescribedByProvider,\n InputIdContextProvider,\n InputInvalidProvider,\n} from '../inputs/contexts';\nimport { Label } from '../label';\n\nexport type FieldProps = {\n /** `null` disables auto-generating the `id` attribute, falling back to nesting-based label association over setting `htmlFor` explicitly. */\n id?: string | null;\n /** Should be specified unless the wrapped control has its own labeling mechanism, e.g. `Checkbox`. */\n label?: React.ReactNode;\n /** @default true */\n required?: boolean;\n /** @deprecated Use `description` prop instead. */\n hint?: React.ReactNode;\n message?: React.ReactNode;\n /**\n * Override for the [InlinePrompt icon's default, accessible name](/?path=/docs/other-statusicon-accessibility--docs)\n * announced by the screen readers\n * */\n messageIconLabel?: string;\n /**\n * If true, shows a loading spinner in place of the message icon of the InlinePrompt\n * @default false\n */\n messageLoading?: boolean;\n description?: React.ReactNode;\n /** @deprecated Use `message` and `type={Sentiment.NEGATIVE}` prop instead. */\n error?: React.ReactNode;\n /** @default Sentiment.NEUTRAL */\n sentiment?: InlinePromptProps['sentiment'];\n className?: string;\n children?: React.ReactNode;\n};\n\nexport const Field = ({\n id,\n label,\n required = true,\n message: propMessage,\n messageIconLabel,\n messageLoading,\n hint,\n description = hint,\n sentiment: propType = Sentiment.NEUTRAL,\n className,\n children,\n ...props\n}: FieldProps) => {\n const labelRef = useRef<HTMLLabelElement>(null);\n const sentiment = props.error ? Sentiment.NEGATIVE : propType;\n const message = propMessage || props.error;\n const hasError = sentiment === Sentiment.NEGATIVE;\n\n const labelId = useId();\n\n const fallbackInputId = useId();\n const inputId = id !== null ? (id ?? fallbackInputId) : undefined;\n\n const messageId = useId();\n const descriptionId = useId();\n\n /**\n * form control can have multiple messages to describe it,\n * e.g the description underneath the label and inline alert\n */\n function ariaDescribedbyByIds() {\n const messageIds = [];\n if (description) {\n messageIds.push(descriptionId);\n }\n if (message) {\n messageIds.push(messageId);\n }\n return messageIds.length > 0 ? messageIds.join(' ') : undefined;\n }\n\n return (\n <FieldLabelContextProvider value={{ id: labelId, ref: labelRef }}>\n <InputIdContextProvider value={inputId}>\n <InputDescribedByProvider value={ariaDescribedbyByIds()}>\n <InputInvalidProvider value={hasError}>\n <div\n className={clsx(\n 'np-field form-group d-block',\n {\n 'has-success': sentiment === Sentiment.POSITIVE,\n 'has-warning': sentiment === Sentiment.WARNING,\n 'has-error': hasError,\n 'has-info': sentiment === Sentiment.NEUTRAL,\n },\n className,\n )}\n >\n {label != null ? (\n <>\n <Label ref={labelRef} id={labelId} htmlFor={inputId}>\n {required ? label : <Label.Optional>{label}</Label.Optional>}\n </Label>\n <Label.Description id={descriptionId}>{description}</Label.Description>\n <div className=\"np-field-control\">{children}</div>\n </>\n ) : (\n children\n )}\n\n {message && (\n <InlinePrompt\n sentiment={sentiment}\n id={messageId}\n mediaLabel={messageIconLabel}\n className=\"np-field__prompt\"\n loading={messageLoading}\n width=\"full\"\n >\n {message}\n </InlinePrompt>\n )}\n </div>\n </InputInvalidProvider>\n </InputDescribedByProvider>\n </InputIdContextProvider>\n </FieldLabelContextProvider>\n );\n};\n"],"names":["Field","id","label","required","message","propMessage","messageIconLabel","messageLoading","hint","description","sentiment","propType","Sentiment","NEUTRAL","className","children","props","labelRef","useRef","error","NEGATIVE","hasError","labelId","useId","fallbackInputId","inputId","undefined","messageId","descriptionId","ariaDescribedbyByIds","messageIds","push","length","join","_jsx","FieldLabelContextProvider","value","ref","InputIdContextProvider","InputDescribedByProvider","InputInvalidProvider","_jsxs","clsx","POSITIVE","WARNING","_Fragment","Label","htmlFor","Optional","Description","InlinePrompt","mediaLabel","loading","width"],"mappings":"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"}
|
package/build/field/Field.mjs
CHANGED
|
@@ -25,18 +25,17 @@ import 'react-intl';
|
|
|
25
25
|
import '../common/closeButton/CloseButton.messages.mjs';
|
|
26
26
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
27
27
|
import { InlinePrompt } from '../prompt/InlinePrompt/InlinePrompt.mjs';
|
|
28
|
+
import '../statusIcon/StatusIcon.mjs';
|
|
28
29
|
import '../body/Body.mjs';
|
|
29
30
|
import '../button/Button.resolver.mjs';
|
|
30
|
-
import '../prompt/PrimitivePrompt/PrimitivePrompt.mjs';
|
|
31
31
|
import '../badge/Badge.mjs';
|
|
32
32
|
import '@wise/art';
|
|
33
|
-
import '../statusIcon/StatusIcon.mjs';
|
|
34
33
|
import '@transferwise/neptune-validation';
|
|
35
34
|
import '../provider/direction/DirectionProvider.mjs';
|
|
35
|
+
import '../sentimentSurface/SentimentSurface.mjs';
|
|
36
36
|
import '../primitives/PrimitiveButton/PrimitiveButton.mjs';
|
|
37
37
|
import '../primitives/PrimitiveAnchor/PrimitiveAnchor.mjs';
|
|
38
38
|
import '../link/Link.messages.mjs';
|
|
39
|
-
import '../prompt/common/Expander/Expander.messages.mjs';
|
|
40
39
|
import { FieldLabelContextProvider, InputIdContextProvider, InputDescribedByProvider, InputInvalidProvider } from '../inputs/contexts.mjs';
|
|
41
40
|
import { Label as LabelNamespace } from '../label/Label.mjs';
|
|
42
41
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.mjs","sources":["../../src/field/Field.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useId, useRef } from 'react';\n\nimport { Sentiment } from '../common';\nimport { InlinePrompt, type InlinePromptProps } from '../prompt';\nimport {\n FieldLabelContextProvider,\n InputDescribedByProvider,\n InputIdContextProvider,\n InputInvalidProvider,\n} from '../inputs/contexts';\nimport { Label } from '../label';\n\nexport type FieldProps = {\n /** `null` disables auto-generating the `id` attribute, falling back to nesting-based label association over setting `htmlFor` explicitly. */\n id?: string | null;\n /** Should be specified unless the wrapped control has its own labeling mechanism, e.g. `Checkbox`. */\n label?: React.ReactNode;\n /** @default true */\n required?: boolean;\n /** @deprecated Use `description` prop instead. */\n hint?: React.ReactNode;\n message?: React.ReactNode;\n /**\n * Override for the [InlinePrompt icon's default, accessible name](/?path=/docs/other-statusicon-accessibility--docs)\n * announced by the screen readers\n * */\n messageIconLabel?: string;\n /**\n * If true, shows a loading spinner in place of the message icon of the InlinePrompt\n * @default false\n */\n messageLoading?: boolean;\n description?: React.ReactNode;\n /** @deprecated Use `message` and `type={Sentiment.NEGATIVE}` prop instead. */\n error?: React.ReactNode;\n /** @default Sentiment.NEUTRAL */\n sentiment?: InlinePromptProps['sentiment'];\n className?: string;\n children?: React.ReactNode;\n};\n\nexport const Field = ({\n id,\n label,\n required = true,\n message: propMessage,\n messageIconLabel,\n messageLoading,\n hint,\n description = hint,\n sentiment: propType = Sentiment.NEUTRAL,\n className,\n children,\n ...props\n}: FieldProps) => {\n const labelRef = useRef<HTMLLabelElement>(null);\n const sentiment = props.error ? Sentiment.NEGATIVE : propType;\n const message = propMessage || props.error;\n const hasError = sentiment === Sentiment.NEGATIVE;\n\n const labelId = useId();\n\n const fallbackInputId = useId();\n const inputId = id !== null ? (id ?? fallbackInputId) : undefined;\n\n const messageId = useId();\n const descriptionId = useId();\n\n /**\n * form control can have multiple messages to describe it,\n * e.g the description underneath the label and inline alert\n */\n function ariaDescribedbyByIds() {\n const messageIds = [];\n if (description) {\n messageIds.push(descriptionId);\n }\n if (message) {\n messageIds.push(messageId);\n }\n return messageIds.length > 0 ? messageIds.join(' ') : undefined;\n }\n\n return (\n <FieldLabelContextProvider value={{ id: labelId, ref: labelRef }}>\n <InputIdContextProvider value={inputId}>\n <InputDescribedByProvider value={ariaDescribedbyByIds()}>\n <InputInvalidProvider value={hasError}>\n <div\n className={clsx(\n 'np-field form-group d-block',\n {\n 'has-success': sentiment === Sentiment.POSITIVE,\n 'has-warning': sentiment === Sentiment.WARNING,\n 'has-error': hasError,\n 'has-info': sentiment === Sentiment.NEUTRAL,\n },\n className,\n )}\n >\n {label != null ? (\n <>\n <Label ref={labelRef} id={labelId} htmlFor={inputId}>\n {required ? label : <Label.Optional>{label}</Label.Optional>}\n </Label>\n <Label.Description id={descriptionId}>{description}</Label.Description>\n <div className=\"np-field-control\">{children}</div>\n </>\n ) : (\n children\n )}\n\n {message && (\n <InlinePrompt\n sentiment={sentiment}\n id={messageId}\n mediaLabel={messageIconLabel}\n className=\"np-field__prompt\"\n loading={messageLoading}\n width=\"full\"\n >\n {message}\n </InlinePrompt>\n )}\n </div>\n </InputInvalidProvider>\n </InputDescribedByProvider>\n </InputIdContextProvider>\n </FieldLabelContextProvider>\n );\n};\n"],"names":["Field","id","label","required","message","propMessage","messageIconLabel","messageLoading","hint","description","sentiment","propType","Sentiment","NEUTRAL","className","children","props","labelRef","useRef","error","NEGATIVE","hasError","labelId","useId","fallbackInputId","inputId","undefined","messageId","descriptionId","ariaDescribedbyByIds","messageIds","push","length","join","_jsx","FieldLabelContextProvider","value","ref","InputIdContextProvider","InputDescribedByProvider","InputInvalidProvider","_jsxs","clsx","POSITIVE","WARNING","_Fragment","Label","htmlFor","Optional","Description","InlinePrompt","mediaLabel","loading","width"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Field.mjs","sources":["../../src/field/Field.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useId, useRef } from 'react';\n\nimport { Sentiment } from '../common';\nimport { InlinePrompt, type InlinePromptProps } from '../prompt';\nimport {\n FieldLabelContextProvider,\n InputDescribedByProvider,\n InputIdContextProvider,\n InputInvalidProvider,\n} from '../inputs/contexts';\nimport { Label } from '../label';\n\nexport type FieldProps = {\n /** `null` disables auto-generating the `id` attribute, falling back to nesting-based label association over setting `htmlFor` explicitly. */\n id?: string | null;\n /** Should be specified unless the wrapped control has its own labeling mechanism, e.g. `Checkbox`. */\n label?: React.ReactNode;\n /** @default true */\n required?: boolean;\n /** @deprecated Use `description` prop instead. */\n hint?: React.ReactNode;\n message?: React.ReactNode;\n /**\n * Override for the [InlinePrompt icon's default, accessible name](/?path=/docs/other-statusicon-accessibility--docs)\n * announced by the screen readers\n * */\n messageIconLabel?: string;\n /**\n * If true, shows a loading spinner in place of the message icon of the InlinePrompt\n * @default false\n */\n messageLoading?: boolean;\n description?: React.ReactNode;\n /** @deprecated Use `message` and `type={Sentiment.NEGATIVE}` prop instead. */\n error?: React.ReactNode;\n /** @default Sentiment.NEUTRAL */\n sentiment?: InlinePromptProps['sentiment'];\n className?: string;\n children?: React.ReactNode;\n};\n\nexport const Field = ({\n id,\n label,\n required = true,\n message: propMessage,\n messageIconLabel,\n messageLoading,\n hint,\n description = hint,\n sentiment: propType = Sentiment.NEUTRAL,\n className,\n children,\n ...props\n}: FieldProps) => {\n const labelRef = useRef<HTMLLabelElement>(null);\n const sentiment = props.error ? Sentiment.NEGATIVE : propType;\n const message = propMessage || props.error;\n const hasError = sentiment === Sentiment.NEGATIVE;\n\n const labelId = useId();\n\n const fallbackInputId = useId();\n const inputId = id !== null ? (id ?? fallbackInputId) : undefined;\n\n const messageId = useId();\n const descriptionId = useId();\n\n /**\n * form control can have multiple messages to describe it,\n * e.g the description underneath the label and inline alert\n */\n function ariaDescribedbyByIds() {\n const messageIds = [];\n if (description) {\n messageIds.push(descriptionId);\n }\n if (message) {\n messageIds.push(messageId);\n }\n return messageIds.length > 0 ? messageIds.join(' ') : undefined;\n }\n\n return (\n <FieldLabelContextProvider value={{ id: labelId, ref: labelRef }}>\n <InputIdContextProvider value={inputId}>\n <InputDescribedByProvider value={ariaDescribedbyByIds()}>\n <InputInvalidProvider value={hasError}>\n <div\n className={clsx(\n 'np-field form-group d-block',\n {\n 'has-success': sentiment === Sentiment.POSITIVE,\n 'has-warning': sentiment === Sentiment.WARNING,\n 'has-error': hasError,\n 'has-info': sentiment === Sentiment.NEUTRAL,\n },\n className,\n )}\n >\n {label != null ? (\n <>\n <Label ref={labelRef} id={labelId} htmlFor={inputId}>\n {required ? label : <Label.Optional>{label}</Label.Optional>}\n </Label>\n <Label.Description id={descriptionId}>{description}</Label.Description>\n <div className=\"np-field-control\">{children}</div>\n </>\n ) : (\n children\n )}\n\n {message && (\n <InlinePrompt\n sentiment={sentiment}\n id={messageId}\n mediaLabel={messageIconLabel}\n className=\"np-field__prompt\"\n loading={messageLoading}\n width=\"full\"\n >\n {message}\n </InlinePrompt>\n )}\n </div>\n </InputInvalidProvider>\n </InputDescribedByProvider>\n </InputIdContextProvider>\n </FieldLabelContextProvider>\n );\n};\n"],"names":["Field","id","label","required","message","propMessage","messageIconLabel","messageLoading","hint","description","sentiment","propType","Sentiment","NEUTRAL","className","children","props","labelRef","useRef","error","NEGATIVE","hasError","labelId","useId","fallbackInputId","inputId","undefined","messageId","descriptionId","ariaDescribedbyByIds","messageIds","push","length","join","_jsx","FieldLabelContextProvider","value","ref","InputIdContextProvider","InputDescribedByProvider","InputInvalidProvider","_jsxs","clsx","POSITIVE","WARNING","_Fragment","Label","htmlFor","Optional","Description","InlinePrompt","mediaLabel","loading","width"],"mappings":"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"}
|
package/build/i18n/en.json
CHANGED
|
@@ -16,8 +16,6 @@
|
|
|
16
16
|
"neptune.DateLookup.selected": "selected",
|
|
17
17
|
"neptune.DateLookup.twentyYears": "20 years",
|
|
18
18
|
"neptune.DateLookup.year": "year",
|
|
19
|
-
"neptune.Expander.collapseAriaLabel": "Collapse",
|
|
20
|
-
"neptune.Expander.expandAriaLabel": "Expand",
|
|
21
19
|
"neptune.ExpressiveMoneyInput.currency.search.placeholder": "Type a currency / country",
|
|
22
20
|
"neptune.ExpressiveMoneyInput.currency.select.currency": "Select currency",
|
|
23
21
|
"neptune.FlowNavigation.back": "back to previous step",
|
package/build/i18n/en.json.js
CHANGED
|
@@ -20,8 +20,6 @@ var en = {
|
|
|
20
20
|
"neptune.DateLookup.selected": "selected",
|
|
21
21
|
"neptune.DateLookup.twentyYears": "20 years",
|
|
22
22
|
"neptune.DateLookup.year": "year",
|
|
23
|
-
"neptune.Expander.collapseAriaLabel": "Collapse",
|
|
24
|
-
"neptune.Expander.expandAriaLabel": "Expand",
|
|
25
23
|
"neptune.ExpressiveMoneyInput.currency.search.placeholder": "Type a currency / country",
|
|
26
24
|
"neptune.ExpressiveMoneyInput.currency.select.currency": "Select currency",
|
|
27
25
|
"neptune.FlowNavigation.back": "back to previous step",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/i18n/en.json.mjs
CHANGED
|
@@ -16,8 +16,6 @@ var en = {
|
|
|
16
16
|
"neptune.DateLookup.selected": "selected",
|
|
17
17
|
"neptune.DateLookup.twentyYears": "20 years",
|
|
18
18
|
"neptune.DateLookup.year": "year",
|
|
19
|
-
"neptune.Expander.collapseAriaLabel": "Collapse",
|
|
20
|
-
"neptune.Expander.expandAriaLabel": "Expand",
|
|
21
19
|
"neptune.ExpressiveMoneyInput.currency.search.placeholder": "Type a currency / country",
|
|
22
20
|
"neptune.ExpressiveMoneyInput.currency.select.currency": "Select currency",
|
|
23
21
|
"neptune.FlowNavigation.back": "back to previous step",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/index.js
CHANGED
|
@@ -55,7 +55,6 @@ var InlineAlert = require('./inlineAlert/InlineAlert.js');
|
|
|
55
55
|
var InlinePrompt = require('./prompt/InlinePrompt/InlinePrompt.js');
|
|
56
56
|
var ActionPrompt = require('./prompt/ActionPrompt/ActionPrompt.js');
|
|
57
57
|
var InfoPrompt = require('./prompt/InfoPrompt/InfoPrompt.js');
|
|
58
|
-
var CriticalBanner = require('./prompt/CriticalBanner/CriticalBanner.js');
|
|
59
58
|
var InputWithDisplayFormat = require('./inputWithDisplayFormat/InputWithDisplayFormat.js');
|
|
60
59
|
var Input = require('./inputs/Input.js');
|
|
61
60
|
var InputGroup = require('./inputs/InputGroup.js');
|
|
@@ -224,7 +223,6 @@ exports.InlineAlert = InlineAlert.default;
|
|
|
224
223
|
exports.InlinePrompt = InlinePrompt.InlinePrompt;
|
|
225
224
|
exports.ActionPrompt = ActionPrompt.ActionPrompt;
|
|
226
225
|
exports.InfoPrompt = InfoPrompt.InfoPrompt;
|
|
227
|
-
exports.CriticalBanner = CriticalBanner.CriticalBanner;
|
|
228
226
|
exports.InputWithDisplayFormat = InputWithDisplayFormat.default;
|
|
229
227
|
exports.Input = Input.Input;
|
|
230
228
|
exports.InputGroup = InputGroup.InputGroup;
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/index.mjs
CHANGED
|
@@ -53,7 +53,6 @@ export { default as InlineAlert } from './inlineAlert/InlineAlert.mjs';
|
|
|
53
53
|
export { InlinePrompt } from './prompt/InlinePrompt/InlinePrompt.mjs';
|
|
54
54
|
export { ActionPrompt } from './prompt/ActionPrompt/ActionPrompt.mjs';
|
|
55
55
|
export { InfoPrompt } from './prompt/InfoPrompt/InfoPrompt.mjs';
|
|
56
|
-
export { CriticalBanner } from './prompt/CriticalBanner/CriticalBanner.mjs';
|
|
57
56
|
export { default as InputWithDisplayFormat } from './inputWithDisplayFormat/InputWithDisplayFormat.mjs';
|
|
58
57
|
export { Input } from './inputs/Input.mjs';
|
|
59
58
|
export { InputGroup } from './inputs/InputGroup.mjs';
|
package/build/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -28,18 +28,17 @@ require('../../common/closeButton/CloseButton.messages.js');
|
|
|
28
28
|
var jsxRuntime = require('react/jsx-runtime');
|
|
29
29
|
var ListItemContext = require('../ListItemContext.js');
|
|
30
30
|
var InlinePrompt = require('../../prompt/InlinePrompt/InlinePrompt.js');
|
|
31
|
+
require('../../statusIcon/StatusIcon.js');
|
|
31
32
|
require('../../body/Body.js');
|
|
32
33
|
require('../../button/Button.resolver.js');
|
|
33
|
-
require('../../prompt/PrimitivePrompt/PrimitivePrompt.js');
|
|
34
34
|
require('../../badge/Badge.js');
|
|
35
35
|
require('@wise/art');
|
|
36
|
-
require('../../statusIcon/StatusIcon.js');
|
|
37
36
|
require('@transferwise/neptune-validation');
|
|
38
37
|
require('../../provider/direction/DirectionProvider.js');
|
|
38
|
+
require('../../sentimentSurface/SentimentSurface.js');
|
|
39
39
|
require('../../primitives/PrimitiveButton/PrimitiveButton.js');
|
|
40
40
|
require('../../primitives/PrimitiveAnchor/PrimitiveAnchor.js');
|
|
41
41
|
require('../../link/Link.messages.js');
|
|
42
|
-
require('../../prompt/common/Expander/Expander.messages.js');
|
|
43
42
|
|
|
44
43
|
const Prompt = ({
|
|
45
44
|
sentiment: sentiment$1 = sentiment.Sentiment.NEUTRAL,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemPrompt.js","sources":["../../../src/listItem/Prompt/ListItemPrompt.tsx"],"sourcesContent":["import { useContext } from 'react';\nimport { Sentiment } from '../../common';\nimport { ListItemContext, type ListItemContextData } from '../ListItemContext';\nimport { InlinePrompt, type InlinePromptProps } from '../../prompt';\n\nexport type ListItemPromptProps = Pick<\n InlinePromptProps,\n 'children' | 'sentiment' | 'mediaLabel' | 'media' | 'loading'\n>;\n\n/**\n * This component allows for rendering an Inline Prompt. <br />\n * In the future it will be a thin wrapper around a standalone component.<br />\n *\n * Please refer to the [Design documentation](https://wise.design/components/list-item#prompt) for details.\n */\nexport const Prompt = ({\n sentiment = Sentiment.NEUTRAL,\n mediaLabel,\n children,\n media,\n loading,\n}: ListItemPromptProps) => {\n const { ids, props } = useContext<ListItemContextData>(ListItemContext);\n const isLongLivedMuted = props.disabled && Boolean(props.disabledPromptMessage);\n\n return (\n <InlinePrompt\n id={ids.prompt}\n sentiment={sentiment}\n media={media}\n loading={loading}\n mediaLabel={mediaLabel}\n muted={isLongLivedMuted}\n className=\"wds-list-item-prompt\"\n >\n {isLongLivedMuted ? props.disabledPromptMessage : children}\n </InlinePrompt>\n );\n};\n\nPrompt.displayName = 'ListItem.Prompt';\n"],"names":["Prompt","sentiment","Sentiment","NEUTRAL","mediaLabel","children","media","loading","ids","props","useContext","ListItemContext","isLongLivedMuted","disabled","Boolean","disabledPromptMessage","_jsx","InlinePrompt","id","prompt","muted","className","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItemPrompt.js","sources":["../../../src/listItem/Prompt/ListItemPrompt.tsx"],"sourcesContent":["import { useContext } from 'react';\nimport { Sentiment } from '../../common';\nimport { ListItemContext, type ListItemContextData } from '../ListItemContext';\nimport { InlinePrompt, type InlinePromptProps } from '../../prompt';\n\nexport type ListItemPromptProps = Pick<\n InlinePromptProps,\n 'children' | 'sentiment' | 'mediaLabel' | 'media' | 'loading'\n>;\n\n/**\n * This component allows for rendering an Inline Prompt. <br />\n * In the future it will be a thin wrapper around a standalone component.<br />\n *\n * Please refer to the [Design documentation](https://wise.design/components/list-item#prompt) for details.\n */\nexport const Prompt = ({\n sentiment = Sentiment.NEUTRAL,\n mediaLabel,\n children,\n media,\n loading,\n}: ListItemPromptProps) => {\n const { ids, props } = useContext<ListItemContextData>(ListItemContext);\n const isLongLivedMuted = props.disabled && Boolean(props.disabledPromptMessage);\n\n return (\n <InlinePrompt\n id={ids.prompt}\n sentiment={sentiment}\n media={media}\n loading={loading}\n mediaLabel={mediaLabel}\n muted={isLongLivedMuted}\n className=\"wds-list-item-prompt\"\n >\n {isLongLivedMuted ? props.disabledPromptMessage : children}\n </InlinePrompt>\n );\n};\n\nPrompt.displayName = 'ListItem.Prompt';\n"],"names":["Prompt","sentiment","Sentiment","NEUTRAL","mediaLabel","children","media","loading","ids","props","useContext","ListItemContext","isLongLivedMuted","disabled","Boolean","disabledPromptMessage","_jsx","InlinePrompt","id","prompt","muted","className","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,MAAMA,MAAM,GAAGA,CAAC;aACrBC,WAAS,GAAGC,mBAAS,CAACC,OAAO;EAC7BC,UAAU;EACVC,QAAQ;EACRC,KAAK;AACLC,EAAAA;AAAO,CACa,KAAI;EACxB,MAAM;IAAEC,GAAG;AAAEC,IAAAA;AAAK,GAAE,GAAGC,gBAAU,CAAsBC,+BAAe,CAAC;EACvE,MAAMC,gBAAgB,GAAGH,KAAK,CAACI,QAAQ,IAAIC,OAAO,CAACL,KAAK,CAACM,qBAAqB,CAAC;EAE/E,oBACEC,cAAA,CAACC,yBAAY,EAAA;IACXC,EAAE,EAAEV,GAAG,CAACW,MAAO;AACflB,IAAAA,SAAS,EAAEA,WAAU;AACrBK,IAAAA,KAAK,EAAEA,KAAM;AACbC,IAAAA,OAAO,EAAEA,OAAQ;AACjBH,IAAAA,UAAU,EAAEA,UAAW;AACvBgB,IAAAA,KAAK,EAAER,gBAAiB;AACxBS,IAAAA,SAAS,EAAC,sBAAsB;AAAAhB,IAAAA,QAAA,EAE/BO,gBAAgB,GAAGH,KAAK,CAACM,qBAAqB,GAAGV;AAAQ,GAC9C,CAAC;AAEnB;AAEAL,MAAM,CAACsB,WAAW,GAAG,iBAAiB;;;;"}
|
|
@@ -26,18 +26,17 @@ import '../../common/closeButton/CloseButton.messages.mjs';
|
|
|
26
26
|
import { jsx } from 'react/jsx-runtime';
|
|
27
27
|
import { ListItemContext } from '../ListItemContext.mjs';
|
|
28
28
|
import { InlinePrompt } from '../../prompt/InlinePrompt/InlinePrompt.mjs';
|
|
29
|
+
import '../../statusIcon/StatusIcon.mjs';
|
|
29
30
|
import '../../body/Body.mjs';
|
|
30
31
|
import '../../button/Button.resolver.mjs';
|
|
31
|
-
import '../../prompt/PrimitivePrompt/PrimitivePrompt.mjs';
|
|
32
32
|
import '../../badge/Badge.mjs';
|
|
33
33
|
import '@wise/art';
|
|
34
|
-
import '../../statusIcon/StatusIcon.mjs';
|
|
35
34
|
import '@transferwise/neptune-validation';
|
|
36
35
|
import '../../provider/direction/DirectionProvider.mjs';
|
|
36
|
+
import '../../sentimentSurface/SentimentSurface.mjs';
|
|
37
37
|
import '../../primitives/PrimitiveButton/PrimitiveButton.mjs';
|
|
38
38
|
import '../../primitives/PrimitiveAnchor/PrimitiveAnchor.mjs';
|
|
39
39
|
import '../../link/Link.messages.mjs';
|
|
40
|
-
import '../../prompt/common/Expander/Expander.messages.mjs';
|
|
41
40
|
|
|
42
41
|
const Prompt = ({
|
|
43
42
|
sentiment = Sentiment.NEUTRAL,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemPrompt.mjs","sources":["../../../src/listItem/Prompt/ListItemPrompt.tsx"],"sourcesContent":["import { useContext } from 'react';\nimport { Sentiment } from '../../common';\nimport { ListItemContext, type ListItemContextData } from '../ListItemContext';\nimport { InlinePrompt, type InlinePromptProps } from '../../prompt';\n\nexport type ListItemPromptProps = Pick<\n InlinePromptProps,\n 'children' | 'sentiment' | 'mediaLabel' | 'media' | 'loading'\n>;\n\n/**\n * This component allows for rendering an Inline Prompt. <br />\n * In the future it will be a thin wrapper around a standalone component.<br />\n *\n * Please refer to the [Design documentation](https://wise.design/components/list-item#prompt) for details.\n */\nexport const Prompt = ({\n sentiment = Sentiment.NEUTRAL,\n mediaLabel,\n children,\n media,\n loading,\n}: ListItemPromptProps) => {\n const { ids, props } = useContext<ListItemContextData>(ListItemContext);\n const isLongLivedMuted = props.disabled && Boolean(props.disabledPromptMessage);\n\n return (\n <InlinePrompt\n id={ids.prompt}\n sentiment={sentiment}\n media={media}\n loading={loading}\n mediaLabel={mediaLabel}\n muted={isLongLivedMuted}\n className=\"wds-list-item-prompt\"\n >\n {isLongLivedMuted ? props.disabledPromptMessage : children}\n </InlinePrompt>\n );\n};\n\nPrompt.displayName = 'ListItem.Prompt';\n"],"names":["Prompt","sentiment","Sentiment","NEUTRAL","mediaLabel","children","media","loading","ids","props","useContext","ListItemContext","isLongLivedMuted","disabled","Boolean","disabledPromptMessage","_jsx","InlinePrompt","id","prompt","muted","className","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItemPrompt.mjs","sources":["../../../src/listItem/Prompt/ListItemPrompt.tsx"],"sourcesContent":["import { useContext } from 'react';\nimport { Sentiment } from '../../common';\nimport { ListItemContext, type ListItemContextData } from '../ListItemContext';\nimport { InlinePrompt, type InlinePromptProps } from '../../prompt';\n\nexport type ListItemPromptProps = Pick<\n InlinePromptProps,\n 'children' | 'sentiment' | 'mediaLabel' | 'media' | 'loading'\n>;\n\n/**\n * This component allows for rendering an Inline Prompt. <br />\n * In the future it will be a thin wrapper around a standalone component.<br />\n *\n * Please refer to the [Design documentation](https://wise.design/components/list-item#prompt) for details.\n */\nexport const Prompt = ({\n sentiment = Sentiment.NEUTRAL,\n mediaLabel,\n children,\n media,\n loading,\n}: ListItemPromptProps) => {\n const { ids, props } = useContext<ListItemContextData>(ListItemContext);\n const isLongLivedMuted = props.disabled && Boolean(props.disabledPromptMessage);\n\n return (\n <InlinePrompt\n id={ids.prompt}\n sentiment={sentiment}\n media={media}\n loading={loading}\n mediaLabel={mediaLabel}\n muted={isLongLivedMuted}\n className=\"wds-list-item-prompt\"\n >\n {isLongLivedMuted ? props.disabledPromptMessage : children}\n </InlinePrompt>\n );\n};\n\nPrompt.displayName = 'ListItem.Prompt';\n"],"names":["Prompt","sentiment","Sentiment","NEUTRAL","mediaLabel","children","media","loading","ids","props","useContext","ListItemContext","isLongLivedMuted","disabled","Boolean","disabledPromptMessage","_jsx","InlinePrompt","id","prompt","muted","className","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,MAAMA,MAAM,GAAGA,CAAC;EACrBC,SAAS,GAAGC,SAAS,CAACC,OAAO;EAC7BC,UAAU;EACVC,QAAQ;EACRC,KAAK;AACLC,EAAAA;AAAO,CACa,KAAI;EACxB,MAAM;IAAEC,GAAG;AAAEC,IAAAA;AAAK,GAAE,GAAGC,UAAU,CAAsBC,eAAe,CAAC;EACvE,MAAMC,gBAAgB,GAAGH,KAAK,CAACI,QAAQ,IAAIC,OAAO,CAACL,KAAK,CAACM,qBAAqB,CAAC;EAE/E,oBACEC,GAAA,CAACC,YAAY,EAAA;IACXC,EAAE,EAAEV,GAAG,CAACW,MAAO;AACflB,IAAAA,SAAS,EAAEA,SAAU;AACrBK,IAAAA,KAAK,EAAEA,KAAM;AACbC,IAAAA,OAAO,EAAEA,OAAQ;AACjBH,IAAAA,UAAU,EAAEA,UAAW;AACvBgB,IAAAA,KAAK,EAAER,gBAAiB;AACxBS,IAAAA,SAAS,EAAC,sBAAsB;AAAAhB,IAAAA,QAAA,EAE/BO,gBAAgB,GAAGH,KAAK,CAACM,qBAAqB,GAAGV;AAAQ,GAC9C,CAAC;AAEnB;AAEAL,MAAM,CAACsB,WAAW,GAAG,iBAAiB;;;;"}
|
package/build/main.css
CHANGED
|
@@ -32233,198 +32233,6 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
32233
32233
|
padding: 0;
|
|
32234
32234
|
}
|
|
32235
32235
|
|
|
32236
|
-
.wds-action-prompt {
|
|
32237
|
-
--Prompt-padding: var(--size-16);
|
|
32238
|
-
--Prompt-actions-gap: var(--size-8);
|
|
32239
|
-
--Prompt-gap: var(--size-10) var(--size-16);
|
|
32240
|
-
--Prompt-border-radius: var(--radius-large);
|
|
32241
|
-
}
|
|
32242
|
-
|
|
32243
|
-
.wds-action-prompt--media-image {
|
|
32244
|
-
width: 48px;
|
|
32245
|
-
width: var(--size-48);
|
|
32246
|
-
height: 48px;
|
|
32247
|
-
height: var(--size-48);
|
|
32248
|
-
-o-object-fit: contain;
|
|
32249
|
-
object-fit: contain;
|
|
32250
|
-
}
|
|
32251
|
-
|
|
32252
|
-
@media (max-width: 767px) {
|
|
32253
|
-
.wds-action-prompt--with-two-actions .wds-prompt__actions-wrapper .wds-Button {
|
|
32254
|
-
flex: 1 1 calc(50% - (var(--Prompt-actions-gap) / 2));
|
|
32255
|
-
min-width: -moz-fit-content;
|
|
32256
|
-
min-width: fit-content;
|
|
32257
|
-
}
|
|
32258
|
-
}
|
|
32259
|
-
|
|
32260
|
-
.wds-action-prompt__content {
|
|
32261
|
-
max-width: calc(48px * 10);
|
|
32262
|
-
max-width: calc(var(--size-48) * 10);
|
|
32263
|
-
}
|
|
32264
|
-
|
|
32265
|
-
.wds-critical-banner {
|
|
32266
|
-
--Prompt-padding: var(--size-16);
|
|
32267
|
-
--Prompt-actions-gap: var(--size-8);
|
|
32268
|
-
--Prompt-gap: var(--size-10) var(--size-16);
|
|
32269
|
-
--Prompt-border-radius: 0;
|
|
32270
|
-
container-type: inline-size;
|
|
32271
|
-
--critical-banner-easing: cubic-bezier(0.9, 0, 0.7, 1);
|
|
32272
|
-
--critical-banner-duration: 150ms;
|
|
32273
|
-
/* Override PrimitivePrompt's --screen-sm-max actions behaviour:
|
|
32274
|
-
actions only go full-width below mobile-max token (container query) */
|
|
32275
|
-
}
|
|
32276
|
-
|
|
32277
|
-
.wds-critical-banner--media-image {
|
|
32278
|
-
width: 48px;
|
|
32279
|
-
width: var(--size-48);
|
|
32280
|
-
height: 48px;
|
|
32281
|
-
height: var(--size-48);
|
|
32282
|
-
-o-object-fit: contain;
|
|
32283
|
-
object-fit: contain;
|
|
32284
|
-
}
|
|
32285
|
-
|
|
32286
|
-
.wds-critical-banner__title {
|
|
32287
|
-
display: -webkit-box;
|
|
32288
|
-
-webkit-line-clamp: 8;
|
|
32289
|
-
line-clamp: 8;
|
|
32290
|
-
-webkit-box-orient: vertical;
|
|
32291
|
-
max-height: 192px;
|
|
32292
|
-
overflow: hidden;
|
|
32293
|
-
transition: max-height var(--critical-banner-duration) var(--critical-banner-easing);
|
|
32294
|
-
}
|
|
32295
|
-
|
|
32296
|
-
.wds-critical-banner--collapsed .wds-critical-banner__title {
|
|
32297
|
-
-webkit-line-clamp: 2;
|
|
32298
|
-
line-clamp: 2;
|
|
32299
|
-
max-height: 48px;
|
|
32300
|
-
}
|
|
32301
|
-
|
|
32302
|
-
.wds-critical-banner__description {
|
|
32303
|
-
max-height: 30vh;
|
|
32304
|
-
opacity: 1;
|
|
32305
|
-
overflow: hidden;
|
|
32306
|
-
transition: max-height var(--critical-banner-duration) var(--critical-banner-easing), opacity var(--critical-banner-duration) var(--critical-banner-easing);
|
|
32307
|
-
}
|
|
32308
|
-
|
|
32309
|
-
.wds-critical-banner--collapsed .wds-critical-banner__description--with-title {
|
|
32310
|
-
max-height: 0;
|
|
32311
|
-
opacity: 0;
|
|
32312
|
-
}
|
|
32313
|
-
|
|
32314
|
-
.wds-critical-banner--collapsed .wds-critical-banner__description:not(.wds-critical-banner__description--with-title) {
|
|
32315
|
-
display: -webkit-box;
|
|
32316
|
-
-webkit-line-clamp: 2;
|
|
32317
|
-
line-clamp: 2;
|
|
32318
|
-
-webkit-box-orient: vertical;
|
|
32319
|
-
overflow: hidden;
|
|
32320
|
-
}
|
|
32321
|
-
|
|
32322
|
-
.wds-critical-banner .wds-prompt__content-wrapper {
|
|
32323
|
-
grid-template-columns: auto 1fr auto;
|
|
32324
|
-
align-items: flex-start;
|
|
32325
|
-
transition: row-gap var(--critical-banner-duration) var(--critical-banner-easing);
|
|
32326
|
-
}
|
|
32327
|
-
|
|
32328
|
-
.wds-critical-banner--collapsed .wds-prompt__content-wrapper {
|
|
32329
|
-
row-gap: 0;
|
|
32330
|
-
}
|
|
32331
|
-
|
|
32332
|
-
.wds-critical-banner__text-wrapper {
|
|
32333
|
-
position: relative;
|
|
32334
|
-
display: flex;
|
|
32335
|
-
flex-direction: column;
|
|
32336
|
-
justify-content: center;
|
|
32337
|
-
min-width: 0;
|
|
32338
|
-
max-width: 480px;
|
|
32339
|
-
height: 100%;
|
|
32340
|
-
padding-top: 3px;
|
|
32341
|
-
}
|
|
32342
|
-
|
|
32343
|
-
@media (max-width: 320px) {
|
|
32344
|
-
.wds-critical-banner__text-wrapper {
|
|
32345
|
-
padding-top: 0;
|
|
32346
|
-
}
|
|
32347
|
-
}
|
|
32348
|
-
|
|
32349
|
-
@container (--screen-400-zoom) {
|
|
32350
|
-
.wds-critical-banner__text-wrapper {
|
|
32351
|
-
padding-top: 0px;
|
|
32352
|
-
}
|
|
32353
|
-
}
|
|
32354
|
-
|
|
32355
|
-
.wds-critical-banner--collapsed .wds-critical-banner__title,
|
|
32356
|
-
.wds-critical-banner--collapsed .wds-critical-banner__description {
|
|
32357
|
-
transform: translateY(0);
|
|
32358
|
-
}
|
|
32359
|
-
|
|
32360
|
-
.wds-critical-banner__toggle {
|
|
32361
|
-
flex-shrink: 0;
|
|
32362
|
-
transition: transform var(--critical-banner-duration) var(--critical-banner-easing);
|
|
32363
|
-
}
|
|
32364
|
-
|
|
32365
|
-
.wds-critical-banner__toggle--collapsed {
|
|
32366
|
-
transform: rotate(180deg);
|
|
32367
|
-
}
|
|
32368
|
-
|
|
32369
|
-
@container (min-width: 768px) {
|
|
32370
|
-
.wds-critical-banner__toggle {
|
|
32371
|
-
display: none;
|
|
32372
|
-
}
|
|
32373
|
-
}
|
|
32374
|
-
|
|
32375
|
-
.wds-critical-banner .wds-prompt__actions-wrapper {
|
|
32376
|
-
grid-column-start: 2;
|
|
32377
|
-
grid-column-end: 3;
|
|
32378
|
-
max-height: 200px;
|
|
32379
|
-
opacity: 1;
|
|
32380
|
-
overflow: visible;
|
|
32381
|
-
}
|
|
32382
|
-
|
|
32383
|
-
@container (max-width: 600px) {
|
|
32384
|
-
.wds-critical-banner .wds-prompt__actions-wrapper {
|
|
32385
|
-
grid-column: span 3;
|
|
32386
|
-
width: 100%;
|
|
32387
|
-
}
|
|
32388
|
-
.wds-critical-banner .wds-prompt__actions-wrapper .wds-Button {
|
|
32389
|
-
flex: 1 1 100%;
|
|
32390
|
-
width: 100%;
|
|
32391
|
-
}
|
|
32392
|
-
}
|
|
32393
|
-
|
|
32394
|
-
.wds-critical-banner--collapsed .wds-prompt__actions-wrapper {
|
|
32395
|
-
max-height: 0;
|
|
32396
|
-
opacity: 0;
|
|
32397
|
-
overflow: hidden;
|
|
32398
|
-
pointer-events: none;
|
|
32399
|
-
}
|
|
32400
|
-
|
|
32401
|
-
@container (max-width: 600px) {
|
|
32402
|
-
.wds-critical-banner--with-two-actions .wds-prompt__actions-wrapper .wds-Button {
|
|
32403
|
-
flex: 1 1 calc(50% - (var(--Prompt-actions-gap) / 2));
|
|
32404
|
-
min-width: -moz-fit-content;
|
|
32405
|
-
min-width: fit-content;
|
|
32406
|
-
}
|
|
32407
|
-
}
|
|
32408
|
-
|
|
32409
|
-
@media (prefers-reduced-motion: reduce) {
|
|
32410
|
-
.wds-critical-banner__description,
|
|
32411
|
-
.wds-critical-banner__title,
|
|
32412
|
-
.wds-critical-banner .wds-prompt__content-wrapper,
|
|
32413
|
-
.wds-critical-banner__toggle {
|
|
32414
|
-
transition: none !important;
|
|
32415
|
-
}
|
|
32416
|
-
}
|
|
32417
|
-
|
|
32418
|
-
.wds-expander-toggle {
|
|
32419
|
-
align-self: flex-start;
|
|
32420
|
-
flex-shrink: 0;
|
|
32421
|
-
transition: transform 0.2s ease-in-out;
|
|
32422
|
-
}
|
|
32423
|
-
|
|
32424
|
-
.wds-expander-toggle--collapsed {
|
|
32425
|
-
transform: rotate(180deg);
|
|
32426
|
-
}
|
|
32427
|
-
|
|
32428
32236
|
.wds-radio-group .np-radio:last-child label {
|
|
32429
32237
|
margin-bottom: 0;
|
|
32430
32238
|
}
|
|
@@ -34850,3 +34658,32 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
34850
34658
|
.np-list-item__action {
|
|
34851
34659
|
flex-shrink: 0;
|
|
34852
34660
|
}
|
|
34661
|
+
|
|
34662
|
+
.wds-action-prompt {
|
|
34663
|
+
--Prompt-padding: var(--size-16);
|
|
34664
|
+
--Prompt-actions-gap: var(--size-8);
|
|
34665
|
+
--Prompt-gap: var(--size-10) var(--size-16);
|
|
34666
|
+
--Prompt-border-radius: var(--radius-large);
|
|
34667
|
+
}
|
|
34668
|
+
|
|
34669
|
+
.wds-action-prompt--media-image {
|
|
34670
|
+
width: 48px;
|
|
34671
|
+
width: var(--size-48);
|
|
34672
|
+
height: 48px;
|
|
34673
|
+
height: var(--size-48);
|
|
34674
|
+
-o-object-fit: contain;
|
|
34675
|
+
object-fit: contain;
|
|
34676
|
+
}
|
|
34677
|
+
|
|
34678
|
+
@media (max-width: 767px) {
|
|
34679
|
+
.wds-action-prompt--with-two-actions .wds-prompt__actions-wrapper .wds-Button {
|
|
34680
|
+
flex: 1 1 calc(50% - (var(--Prompt-actions-gap) / 2));
|
|
34681
|
+
min-width: -moz-fit-content;
|
|
34682
|
+
min-width: fit-content;
|
|
34683
|
+
}
|
|
34684
|
+
}
|
|
34685
|
+
|
|
34686
|
+
.wds-action-prompt__content {
|
|
34687
|
+
max-width: calc(48px * 10);
|
|
34688
|
+
max-width: calc(var(--size-48) * 10);
|
|
34689
|
+
}
|