@doist/reactist 31.0.0 → 31.2.0
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/CHANGELOG.md +12 -0
- package/dist/reactist.cjs.development.js +312 -406
- package/dist/reactist.cjs.development.js.map +1 -1
- package/dist/reactist.cjs.production.min.js +1 -1
- package/dist/reactist.cjs.production.min.js.map +1 -1
- package/es/avatar/avatar.js +3 -6
- package/es/avatar/avatar.js.map +1 -1
- package/es/badge/badge.js +3 -6
- package/es/badge/badge.js.map +1 -1
- package/es/banner/banner.js +15 -22
- package/es/banner/banner.js.map +1 -1
- package/es/banner/banner.module.css.js +1 -1
- package/es/base-field/base-field.js +6 -7
- package/es/base-field/base-field.js.map +1 -1
- package/es/box/box.js +43 -46
- package/es/box/box.js.map +1 -1
- package/es/button/button.js +18 -22
- package/es/button/button.js.map +1 -1
- package/es/checkbox-field/checkbox-field.js +9 -12
- package/es/checkbox-field/checkbox-field.js.map +1 -1
- package/es/checkbox-field/checkbox-icon.js +3 -6
- package/es/checkbox-field/checkbox-icon.js.map +1 -1
- package/es/columns/columns.js +15 -20
- package/es/columns/columns.js.map +1 -1
- package/es/components/deprecated-button/deprecated-button.js +10 -13
- package/es/components/deprecated-button/deprecated-button.js.map +1 -1
- package/es/components/deprecated-dropdown/dropdown.js +6 -8
- package/es/components/deprecated-dropdown/dropdown.js.map +1 -1
- package/es/components/deprecated-select/select.js +3 -6
- package/es/components/deprecated-select/select.js.map +1 -1
- package/es/components/keyboard-shortcut/keyboard-shortcut.js +7 -11
- package/es/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/es/divider/divider.js +3 -6
- package/es/divider/divider.js.map +1 -1
- package/es/heading/heading.js +3 -6
- package/es/heading/heading.js.map +1 -1
- package/es/hidden/hidden.js +6 -9
- package/es/hidden/hidden.js.map +1 -1
- package/es/icons/alert-icon.js +3 -6
- package/es/icons/alert-icon.js.map +1 -1
- package/es/icons/banner-icon.js +3 -6
- package/es/icons/banner-icon.js.map +1 -1
- package/es/inline/inline.js +9 -12
- package/es/inline/inline.js.map +1 -1
- package/es/loading/loading.js +3 -6
- package/es/loading/loading.js.map +1 -1
- package/es/menu/menu.js +26 -39
- package/es/menu/menu.js.map +1 -1
- package/es/modal/modal.js +28 -39
- package/es/modal/modal.js.map +1 -1
- package/es/password-field/password-field.js +3 -6
- package/es/password-field/password-field.js.map +1 -1
- package/es/prose/prose.js +3 -6
- package/es/prose/prose.js.map +1 -1
- package/es/select-field/select-field.js +7 -8
- package/es/select-field/select-field.js.map +1 -1
- package/es/stack/stack.js +10 -13
- package/es/stack/stack.js.map +1 -1
- package/es/switch-field/switch-field.js +3 -6
- package/es/switch-field/switch-field.js.map +1 -1
- package/es/tabs/tabs.js +14 -19
- package/es/tabs/tabs.js.map +1 -1
- package/es/text/text.js +11 -14
- package/es/text/text.js.map +1 -1
- package/es/text-area/text-area.js +7 -11
- package/es/text-area/text-area.js.map +1 -1
- package/es/text-field/text-field.js +7 -11
- package/es/text-field/text-field.js.map +1 -1
- package/es/text-link/text-link.js +8 -11
- package/es/text-link/text-link.js.map +1 -1
- package/es/toast/static-toast.js +3 -6
- package/es/toast/static-toast.js.map +1 -1
- package/es/toast/use-toasts.js +10 -13
- package/es/toast/use-toasts.js.map +1 -1
- package/lib/avatar/avatar.js +3 -7
- package/lib/avatar/avatar.js.map +1 -1
- package/lib/badge/badge.js +3 -7
- package/lib/badge/badge.js.map +1 -1
- package/lib/banner/banner.js +15 -23
- package/lib/banner/banner.js.map +1 -1
- package/lib/banner/banner.module.css.js +1 -1
- package/lib/base-field/base-field.js +6 -10
- package/lib/base-field/base-field.js.map +1 -1
- package/lib/box/box.js +43 -48
- package/lib/box/box.js.map +1 -1
- package/lib/button/button.js +18 -23
- package/lib/button/button.js.map +1 -1
- package/lib/checkbox-field/checkbox-field.js +9 -13
- package/lib/checkbox-field/checkbox-field.js.map +1 -1
- package/lib/checkbox-field/checkbox-icon.js +3 -7
- package/lib/checkbox-field/checkbox-icon.js.map +1 -1
- package/lib/columns/columns.js +15 -21
- package/lib/columns/columns.js.map +1 -1
- package/lib/components/deprecated-button/deprecated-button.js +10 -14
- package/lib/components/deprecated-button/deprecated-button.js.map +1 -1
- package/lib/components/deprecated-dropdown/dropdown.js +6 -9
- package/lib/components/deprecated-dropdown/dropdown.js.map +1 -1
- package/lib/components/deprecated-select/select.js +3 -7
- package/lib/components/deprecated-select/select.js.map +1 -1
- package/lib/components/keyboard-shortcut/keyboard-shortcut.js +7 -12
- package/lib/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/lib/divider/divider.js +3 -7
- package/lib/divider/divider.js.map +1 -1
- package/lib/heading/heading.js +3 -7
- package/lib/heading/heading.js.map +1 -1
- package/lib/hidden/hidden.js +6 -10
- package/lib/hidden/hidden.js.map +1 -1
- package/lib/icons/alert-icon.js +3 -7
- package/lib/icons/alert-icon.js.map +1 -1
- package/lib/icons/banner-icon.js +3 -7
- package/lib/icons/banner-icon.js.map +1 -1
- package/lib/inline/inline.js +9 -13
- package/lib/inline/inline.js.map +1 -1
- package/lib/loading/loading.js +3 -7
- package/lib/loading/loading.js.map +1 -1
- package/lib/menu/menu.js +26 -41
- package/lib/menu/menu.js.map +1 -1
- package/lib/modal/modal.js +28 -40
- package/lib/modal/modal.js.map +1 -1
- package/lib/password-field/password-field.js +3 -7
- package/lib/password-field/password-field.js.map +1 -1
- package/lib/prose/prose.js +3 -7
- package/lib/prose/prose.js.map +1 -1
- package/lib/select-field/select-field.js +7 -9
- package/lib/select-field/select-field.js.map +1 -1
- package/lib/stack/stack.js +10 -14
- package/lib/stack/stack.js.map +1 -1
- package/lib/switch-field/switch-field.js +3 -7
- package/lib/switch-field/switch-field.js.map +1 -1
- package/lib/tabs/tabs.js +14 -20
- package/lib/tabs/tabs.js.map +1 -1
- package/lib/text/text.js +11 -15
- package/lib/text/text.js.map +1 -1
- package/lib/text-area/text-area.js +7 -12
- package/lib/text-area/text-area.js.map +1 -1
- package/lib/text-field/text-field.js +7 -12
- package/lib/text-field/text-field.js.map +1 -1
- package/lib/text-link/text-link.js +8 -12
- package/lib/text-link/text-link.js.map +1 -1
- package/lib/toast/static-toast.js +3 -7
- package/lib/toast/static-toast.js.map +1 -1
- package/lib/toast/use-toasts.js +10 -15
- package/lib/toast/use-toasts.js.map +1 -1
- package/package.json +22 -54
- package/styles/banner.css +1 -1
- package/styles/banner.module.css.css +1 -1
- package/styles/prose.css +1 -1
- package/styles/prose.module.css.css +1 -1
- package/styles/reactist.css +3 -3
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
6
|
-
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
7
6
|
var React = require('react');
|
|
8
7
|
var box = require('../box/box.js');
|
|
9
8
|
var polymorphism = require('../utils/polymorphism.js');
|
|
@@ -30,19 +29,16 @@ function _interopNamespace(e) {
|
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
33
|
-
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
34
32
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
35
33
|
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
} = _ref,
|
|
45
|
-
props = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
34
|
+
const TextLink = polymorphism.polymorphicComponent(function TextLink({
|
|
35
|
+
as = 'a',
|
|
36
|
+
openInNewTab = false,
|
|
37
|
+
exceptionallySetClassName,
|
|
38
|
+
color = 'default',
|
|
39
|
+
underline = true,
|
|
40
|
+
...props
|
|
41
|
+
}, ref) {
|
|
46
42
|
return /*#__PURE__*/React__namespace.createElement(box.Box, _extends__default["default"]({}, props, {
|
|
47
43
|
as: as,
|
|
48
44
|
display: "inline",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-link.js","sources":["../../src/text-link/text-link.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Box } from '../box'\nimport { polymorphicComponent } from '../utils/polymorphism'\n\nimport styles from './text-link.module.css'\n\nimport type { OpenInNewTab } from '../utils/common-types'\n\ntype TextLinkColors = 'default' | 'inherit'\n\ntype TextLinkProps = OpenInNewTab & {\n color?: TextLinkColors\n underline?: boolean\n}\n\nconst TextLink = polymorphicComponent<'a', TextLinkProps>(function TextLink(\n {\n as = 'a',\n openInNewTab = false,\n exceptionallySetClassName,\n color = 'default',\n underline = true,\n ...props\n },\n ref,\n) {\n return (\n <Box\n {...props}\n as={as}\n display=\"inline\"\n className={[\n exceptionallySetClassName,\n styles.container,\n styles[color],\n underline ? styles.underline : styles['no-underline'],\n ]}\n ref={ref}\n target={openInNewTab ? '_blank' : undefined}\n rel={openInNewTab ? 'noopener noreferrer' : undefined}\n />\n )\n})\n\nexport { TextLink }\nexport type { TextLinkProps }\n"],"names":["TextLink","polymorphicComponent","
|
|
1
|
+
{"version":3,"file":"text-link.js","sources":["../../src/text-link/text-link.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Box } from '../box'\nimport { polymorphicComponent } from '../utils/polymorphism'\n\nimport styles from './text-link.module.css'\n\nimport type { OpenInNewTab } from '../utils/common-types'\n\ntype TextLinkColors = 'default' | 'inherit'\n\ntype TextLinkProps = OpenInNewTab & {\n color?: TextLinkColors\n underline?: boolean\n}\n\nconst TextLink = polymorphicComponent<'a', TextLinkProps>(function TextLink(\n {\n as = 'a',\n openInNewTab = false,\n exceptionallySetClassName,\n color = 'default',\n underline = true,\n ...props\n },\n ref,\n) {\n return (\n <Box\n {...props}\n as={as}\n display=\"inline\"\n className={[\n exceptionallySetClassName,\n styles.container,\n styles[color],\n underline ? styles.underline : styles['no-underline'],\n ]}\n ref={ref}\n target={openInNewTab ? '_blank' : undefined}\n rel={openInNewTab ? 'noopener noreferrer' : undefined}\n />\n )\n})\n\nexport { TextLink }\nexport type { TextLinkProps }\n"],"names":["TextLink","polymorphicComponent","as","openInNewTab","exceptionallySetClassName","color","underline","props","ref","React","createElement","Box","_extends","display","className","styles","container","target","undefined","rel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,MAAMA,QAAQ,GAAGC,iCAAoB,CAAqB,SAASD,QAAQA,CACvE;AACIE,EAAAA,EAAE,GAAG,GAAG;AACRC,EAAAA,YAAY,GAAG,KAAK;EACpBC,yBAAyB;AACzBC,EAAAA,KAAK,GAAG,SAAS;AACjBC,EAAAA,SAAS,GAAG,IAAI;EAChB,GAAGC,KAAAA;AACP,CAAC,EACDC,GAAG,EACL;EACE,oBACIC,gBAAA,CAAAC,aAAA,CAACC,OAAG,EAAAC,4BAAA,KACIL,KAAK,EAAA;AACTL,IAAAA,EAAE,EAAEA,EAAG;AACPW,IAAAA,OAAO,EAAC,QAAQ;IAChBC,SAAS,EAAE,CACPV,yBAAyB,EACzBW,0BAAM,CAACC,SAAS,EAChBD,0BAAM,CAACV,KAAK,CAAC,EACbC,SAAS,GAAGS,0BAAM,CAACT,SAAS,GAAGS,0BAAM,CAAC,cAAc,CAAC,CACvD;AACFP,IAAAA,GAAG,EAAEA,GAAI;AACTS,IAAAA,MAAM,EAAEd,YAAY,GAAG,QAAQ,GAAGe,SAAU;AAC5CC,IAAAA,GAAG,EAAEhB,YAAY,GAAG,qBAAqB,GAAGe,SAAAA;AAAU,GAAA,CACzD,CAAC,CAAA;AAEV,CAAC;;;;"}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
6
|
-
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
7
6
|
var reactCompilerRuntime = require('react-compiler-runtime');
|
|
8
7
|
var React = require('react');
|
|
9
8
|
var box = require('../box/box.js');
|
|
@@ -16,10 +15,8 @@ var toast_module = require('./toast.module.css.js');
|
|
|
16
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
16
|
|
|
18
17
|
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
19
|
-
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
20
18
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
19
|
|
|
22
|
-
const _excluded = ["message", "description", "icon", "action", "onDismiss", "dismissLabel"];
|
|
23
20
|
/**
|
|
24
21
|
* A toast that shows a message, and an optional action associated with it.
|
|
25
22
|
*
|
|
@@ -44,16 +41,15 @@ const StaticToast = /*#__PURE__*/React__default["default"].forwardRef(function T
|
|
|
44
41
|
let props;
|
|
45
42
|
let t1;
|
|
46
43
|
if ($[0] !== t0) {
|
|
47
|
-
var _t = t0;
|
|
48
44
|
({
|
|
49
45
|
message,
|
|
50
46
|
description,
|
|
51
47
|
icon,
|
|
52
48
|
action,
|
|
53
49
|
onDismiss,
|
|
54
|
-
dismissLabel: t1
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
dismissLabel: t1,
|
|
51
|
+
...props
|
|
52
|
+
} = t0);
|
|
57
53
|
$[0] = t0;
|
|
58
54
|
$[1] = action;
|
|
59
55
|
$[2] = description;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static-toast.js","sources":["../../src/toast/static-toast.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Box } from '../box'\nimport { Button, IconButton } from '../button'\nimport { CloseIcon } from '../icons/close-icon'\nimport { Stack } from '../stack'\nimport { Text } from '../text'\n\nimport styles from './toast.module.css'\n\ntype ToastActionObject = {\n label: string\n onClick: () => void\n closeToast?: boolean\n}\n\ntype StaticToastProps = {\n /**\n * The message shown in the toast.\n */\n message: NonNullable<React.ReactNode>\n\n /**\n * An optional extra description that complements the main message shown in the toast.\n */\n description?: React.ReactNode\n\n /**\n * An icon to be shown in front of the message.\n */\n icon?: React.ReactNode\n\n /**\n * The action to call when the user clicks on the dismiss button. If omitted, the dismiss button\n * does not appear.\n */\n onDismiss?: () => void\n\n /**\n * The label for the button that dismisses the toast.\n */\n dismissLabel?: string\n\n /**\n * What to render in the action slot. Usually a button or link.\n *\n * You can also pass an object that containst the action label, and a function that performs the\n * action. This is used by the toast component to render a button for you.\n *\n * In general, you should prefer the action object most of the time. But it is possible to pass\n * a React element instead, if you need more control over what to render. For instance, you may\n * want to render a link instead of a button.\n *\n * Keep in mind, though, that the default button rendered uses `variant=\"tertiary\"` and\n * `size=\"small\"`. In most cases you should stick to the variants `tertiary` or `primary`, which\n * are the ones that look better in the toast's dark background. And in all cases you should use\n * size `small`.\n */\n action?: React.ReactElement | ToastActionObject\n}\n\n/**\n * A toast that shows a message, and an optional action associated with it.\n *\n * This component is generally not meant to be used directly. Most of the time you'll want to use\n * toasts generated via `useToasts` instead. However, this component is available in case you need\n * to take control of rendering a toast under different circumstances than that of notification-like\n * floating toasts.\n *\n * This component makes no assumptions outwardly about how it is positioned on the screen. That is,\n * it will not be shown floating or fixed to the viewport edges, as toasts normally show up. It only\n * provides the toast look and feel, but you are responsible for positioning it as you want.\n *\n * @see useToasts\n */\nconst StaticToast = React.forwardRef<HTMLDivElement, StaticToastProps>(function Toast(\n { message, description, icon, action, onDismiss, dismissLabel = 'Close', ...props },\n ref,\n) {\n return (\n <Box\n ref={ref}\n role=\"alert\"\n aria-live=\"polite\"\n borderRadius=\"full\"\n width=\"fitContent\"\n background=\"toast\"\n display=\"flex\"\n padding=\"large\"\n alignItems=\"center\"\n className={styles.toastContainer}\n {...props}\n >\n {icon ? <ToastContentSlot>{icon}</ToastContentSlot> : null}\n\n <Box flexGrow={1} maxWidth=\"small\">\n {description ? (\n <Stack space=\"small\">\n <Text weight=\"bold\">{message} </Text>\n <Text>{description}</Text>\n </Stack>\n ) : (\n <Text>{message}</Text>\n )}\n </Box>\n\n {action ? (\n <ToastContentSlot>\n {isActionObject(action) ? (\n <Button variant=\"tertiary\" size=\"small\" onClick={action.onClick}>\n {action.label}\n </Button>\n ) : (\n action\n )}\n </ToastContentSlot>\n ) : null}\n\n {onDismiss ? (\n <ToastContentSlot>\n <IconButton\n variant=\"quaternary\"\n size=\"small\"\n onClick={onDismiss}\n aria-label={dismissLabel}\n icon={<CloseIcon />}\n />\n </ToastContentSlot>\n ) : null}\n </Box>\n )\n})\n\nfunction isActionObject(action: StaticToastProps['action']): action is ToastActionObject {\n return (\n action != null &&\n typeof action === 'object' &&\n 'label' in action &&\n 'onClick' in action &&\n typeof action.label === 'string' &&\n typeof action.onClick === 'function'\n )\n}\n\nfunction ToastContentSlot({ children }: { children: React.ReactNode }) {\n return (\n <Box\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n marginX=\"-xsmall\"\n marginY=\"-medium\"\n className={styles.slot}\n >\n {children}\n </Box>\n )\n}\n\nexport { isActionObject, StaticToast }\nexport type { StaticToastProps }\n"],"names":["StaticToast","React","forwardRef","Toast","t0","ref","$","_c","action","description","icon","message","onDismiss","props","t1","_t","dismissLabel","_objectWithoutProperties","_excluded","undefined","t2","createElement","ToastContentSlot","t3","Box","flexGrow","maxWidth","Stack","space","Text","weight","t4","isActionObject","Button","variant","size","onClick","label","t5","IconButton","CloseIcon","t6","_extends","role","borderRadius","width","background","display","padding","alignItems","className","styles","toastContainer","children","justifyContent","marginX","marginY","slot"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA6DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACMA,MAAAA,WAAW,gBAAGC,yBAAK,CAACC,UAAU,CAAmC,SAAAC,KAAAA,CAAAC,EAAA,EAAAC,GAAA,EAAA;EAAA,MAAAC,CAAA,GAAAC,sBAAA,CAAA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AA,CAAA;AAAA,GAAA;AAAA,EAAA,OATNQ,EASM,CAAA;AAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"static-toast.js","sources":["../../src/toast/static-toast.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Box } from '../box'\nimport { Button, IconButton } from '../button'\nimport { CloseIcon } from '../icons/close-icon'\nimport { Stack } from '../stack'\nimport { Text } from '../text'\n\nimport styles from './toast.module.css'\n\ntype ToastActionObject = {\n label: string\n onClick: () => void\n closeToast?: boolean\n}\n\ntype StaticToastProps = {\n /**\n * The message shown in the toast.\n */\n message: NonNullable<React.ReactNode>\n\n /**\n * An optional extra description that complements the main message shown in the toast.\n */\n description?: React.ReactNode\n\n /**\n * An icon to be shown in front of the message.\n */\n icon?: React.ReactNode\n\n /**\n * The action to call when the user clicks on the dismiss button. If omitted, the dismiss button\n * does not appear.\n */\n onDismiss?: () => void\n\n /**\n * The label for the button that dismisses the toast.\n */\n dismissLabel?: string\n\n /**\n * What to render in the action slot. Usually a button or link.\n *\n * You can also pass an object that containst the action label, and a function that performs the\n * action. This is used by the toast component to render a button for you.\n *\n * In general, you should prefer the action object most of the time. But it is possible to pass\n * a React element instead, if you need more control over what to render. For instance, you may\n * want to render a link instead of a button.\n *\n * Keep in mind, though, that the default button rendered uses `variant=\"tertiary\"` and\n * `size=\"small\"`. In most cases you should stick to the variants `tertiary` or `primary`, which\n * are the ones that look better in the toast's dark background. And in all cases you should use\n * size `small`.\n */\n action?: React.ReactElement | ToastActionObject\n}\n\n/**\n * A toast that shows a message, and an optional action associated with it.\n *\n * This component is generally not meant to be used directly. Most of the time you'll want to use\n * toasts generated via `useToasts` instead. However, this component is available in case you need\n * to take control of rendering a toast under different circumstances than that of notification-like\n * floating toasts.\n *\n * This component makes no assumptions outwardly about how it is positioned on the screen. That is,\n * it will not be shown floating or fixed to the viewport edges, as toasts normally show up. It only\n * provides the toast look and feel, but you are responsible for positioning it as you want.\n *\n * @see useToasts\n */\nconst StaticToast = React.forwardRef<HTMLDivElement, StaticToastProps>(function Toast(\n { message, description, icon, action, onDismiss, dismissLabel = 'Close', ...props },\n ref,\n) {\n return (\n <Box\n ref={ref}\n role=\"alert\"\n aria-live=\"polite\"\n borderRadius=\"full\"\n width=\"fitContent\"\n background=\"toast\"\n display=\"flex\"\n padding=\"large\"\n alignItems=\"center\"\n className={styles.toastContainer}\n {...props}\n >\n {icon ? <ToastContentSlot>{icon}</ToastContentSlot> : null}\n\n <Box flexGrow={1} maxWidth=\"small\">\n {description ? (\n <Stack space=\"small\">\n <Text weight=\"bold\">{message} </Text>\n <Text>{description}</Text>\n </Stack>\n ) : (\n <Text>{message}</Text>\n )}\n </Box>\n\n {action ? (\n <ToastContentSlot>\n {isActionObject(action) ? (\n <Button variant=\"tertiary\" size=\"small\" onClick={action.onClick}>\n {action.label}\n </Button>\n ) : (\n action\n )}\n </ToastContentSlot>\n ) : null}\n\n {onDismiss ? (\n <ToastContentSlot>\n <IconButton\n variant=\"quaternary\"\n size=\"small\"\n onClick={onDismiss}\n aria-label={dismissLabel}\n icon={<CloseIcon />}\n />\n </ToastContentSlot>\n ) : null}\n </Box>\n )\n})\n\nfunction isActionObject(action: StaticToastProps['action']): action is ToastActionObject {\n return (\n action != null &&\n typeof action === 'object' &&\n 'label' in action &&\n 'onClick' in action &&\n typeof action.label === 'string' &&\n typeof action.onClick === 'function'\n )\n}\n\nfunction ToastContentSlot({ children }: { children: React.ReactNode }) {\n return (\n <Box\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n marginX=\"-xsmall\"\n marginY=\"-medium\"\n className={styles.slot}\n >\n {children}\n </Box>\n )\n}\n\nexport { isActionObject, StaticToast }\nexport type { StaticToastProps }\n"],"names":["StaticToast","React","forwardRef","Toast","t0","ref","$","_c","action","description","icon","message","onDismiss","props","t1","dismissLabel","undefined","t2","createElement","ToastContentSlot","t3","Box","flexGrow","maxWidth","Stack","space","Text","weight","t4","isActionObject","Button","variant","size","onClick","label","t5","IconButton","CloseIcon","t6","_extends","role","borderRadius","width","background","display","padding","alignItems","className","styles","toastContainer","children","justifyContent","marginX","marginY","slot"],"mappings":";;;;;;;;;;;;;;;;;;;AA6DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACMA,MAAAA,WAAW,gBAAGC,yBAAK,CAACC,UAAU,CAAmC,SAAAC,KAAAA,CAAAC,EAAA,EAAAC,GAAA,EAAA;EAAA,MAAAC,CAAA,GAAAC,sBAAA,CAAA,EAAA,CAAA,CAAA;AAAA,EAAA,IAAAC,MAAA,CAAA;AAAA,EAAA,IAAAC,WAAA,CAAA;AAAA,EAAA,IAAAC,IAAA,CAAA;AAAA,EAAA,IAAAC,OAAA,CAAA;AAAA,EAAA,IAAAC,SAAA,CAAA;AAAA,EAAA,IAAAC,KAAA,CAAA;AAAA,EAAA,IAAAC,EAAA,CAAA;EAAA,IAAAR,CAAA,QAAAF,EAAA,EAAA;AACnE,IAAA,CAAA;MAAAO,OAAA;MAAAF,WAAA;MAAAC,IAAA;MAAAF,MAAA;MAAAI,SAAA;AAAAG,MAAAA,YAAA,EAAAD,EAAA;MAAA,GAAAD,KAAAA;AAAA,KAAA,GAAAT,EAAmF,EAAA;AAAAE,IAAAA,CAAA,MAAAF,EAAA,CAAA;AAAAE,IAAAA,CAAA,MAAAE,MAAA,CAAA;AAAAF,IAAAA,CAAA,MAAAG,WAAA,CAAA;AAAAH,IAAAA,CAAA,MAAAI,IAAA,CAAA;AAAAJ,IAAAA,CAAA,MAAAK,OAAA,CAAA;AAAAL,IAAAA,CAAA,MAAAM,SAAA,CAAA;AAAAN,IAAAA,CAAA,MAAAO,KAAA,CAAA;AAAAP,IAAAA,CAAA,MAAAQ,EAAA,CAAA;AAAA,GAAA,MAAA;AAAAN,IAAAA,MAAA,GAAAF,CAAA,CAAA,CAAA,CAAA,CAAA;AAAAG,IAAAA,WAAA,GAAAH,CAAA,CAAA,CAAA,CAAA,CAAA;AAAAI,IAAAA,IAAA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AAM,IAAAA;AAAK,KAAA,EAErBJ,QACA,CAAC,CAAA;AAAA5C,IAAAA,CAAA,MAAA4C,QAAA,CAAA;AAAA5C,IAAAA,CAAA,MAAAQ,EAAA,CAAA;AAAA,GAAA,MAAA;AAAAA,IAAAA,EAAA,GAAAR,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAAA,OATNQ,EASM,CAAA;AAAA;;;;;"}
|
package/lib/toast/use-toasts.js
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
6
|
-
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
7
|
-
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
8
6
|
var reactCompilerRuntime = require('react-compiler-runtime');
|
|
9
7
|
var React = require('react');
|
|
10
8
|
var react = require('@ariakit/react');
|
|
@@ -18,12 +16,8 @@ var toast_module = require('./toast.module.css.js');
|
|
|
18
16
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
17
|
|
|
20
18
|
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
21
|
-
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
22
|
-
var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
|
|
23
19
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
24
20
|
|
|
25
|
-
const _excluded = ["toastId"];
|
|
26
|
-
|
|
27
21
|
/**
|
|
28
22
|
* The props needed to fire up a new notification toast.
|
|
29
23
|
*/
|
|
@@ -132,10 +126,11 @@ const InternalToast = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
132
126
|
}
|
|
133
127
|
let t10;
|
|
134
128
|
if ($[14] !== action || $[15] !== t8 || $[16] !== t9) {
|
|
135
|
-
t10 =
|
|
129
|
+
t10 = {
|
|
130
|
+
...action,
|
|
136
131
|
closeToast: t8,
|
|
137
132
|
onClick: t9
|
|
138
|
-
}
|
|
133
|
+
};
|
|
139
134
|
$[14] = action;
|
|
140
135
|
$[15] = t8;
|
|
141
136
|
$[16] = t9;
|
|
@@ -243,12 +238,12 @@ function ToastsProvider(t0) {
|
|
|
243
238
|
if ($[3] !== defaultAutoDismissDelay || $[4] !== defaultDismissLabel || $[5] !== removeToast) {
|
|
244
239
|
t6 = function showToast(props) {
|
|
245
240
|
const toastId_0 = commonHelpers.generateElementId("toast");
|
|
246
|
-
const newToast =
|
|
241
|
+
const newToast = {
|
|
247
242
|
autoDismissDelay: defaultAutoDismissDelay,
|
|
248
|
-
dismissLabel: defaultDismissLabel
|
|
249
|
-
|
|
243
|
+
dismissLabel: defaultDismissLabel,
|
|
244
|
+
...props,
|
|
250
245
|
toastId: toastId_0
|
|
251
|
-
}
|
|
246
|
+
};
|
|
252
247
|
setToasts(list_0 => [...list_0, newToast]);
|
|
253
248
|
return () => removeToast(toastId_0);
|
|
254
249
|
};
|
|
@@ -273,9 +268,9 @@ function ToastsProvider(t0) {
|
|
|
273
268
|
space: "medium"
|
|
274
269
|
}, toasts.map(t8 => {
|
|
275
270
|
const {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
271
|
+
toastId: toastId_1,
|
|
272
|
+
...props_0
|
|
273
|
+
} = t8;
|
|
279
274
|
return /*#__PURE__*/React__default["default"].createElement(InternalToast, _extends__default["default"]({
|
|
280
275
|
key: toastId_1,
|
|
281
276
|
ref: mappedRef(toastId_1),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-toasts.js","sources":["../../src/toast/use-toasts.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Portal } from '@ariakit/react'\n\nimport { Box } from '../box'\nimport { Stack } from '../stack'\nimport { generateElementId } from '../utils/common-helpers'\n\nimport { isActionObject, StaticToast } from './static-toast'\nimport { useToastsAnimation } from './toast-animation'\n\nimport styles from './toast.module.css'\n\nimport type { Space } from '../utils/common-types'\nimport type { StaticToastProps } from './static-toast'\n\n/**\n * The props needed to fire up a new notification toast.\n */\ntype ToastProps = StaticToastProps & {\n /**\n * The number of seconds the toast is expected to be shown before it is dismissed automatically,\n * or false to disable auto-dismiss.\n *\n * It defaults to whatever is the autoDismissDelay set in the ToastsProvider.\n */\n autoDismissDelay?: number | false\n\n /**\n * The label for the button that dismisses the toast.\n *\n * It defaults to the value set in the ToastsProvider, but individual toasts can have a\n * different value if needed.\n */\n dismissLabel?: string\n\n /**\n * Whether to show the dismiss button or not.\n *\n * Use this value with care. If combined with disabling `autoDismissDelay`, it may leave you\n * with toasts that the user won't be able to dismiss at will. It then is your responsibility to\n * dismiss the toast by calling the function returned by `showToast`.\n */\n showDismissButton?: boolean\n}\n\n//\n// InternalToast component and its props\n//\n\ntype InternalToastProps = Omit<ToastProps, 'autoDismissDelay' | 'dismissLabel'> &\n Required<Pick<ToastProps, 'autoDismissDelay' | 'dismissLabel'>> & {\n toastId: string\n onRemoveToast: (toastId: string) => void\n }\n\n/** @private */\nconst InternalToast = React.forwardRef<HTMLDivElement, InternalToastProps>(function InternalToast(\n {\n message,\n description,\n icon,\n action,\n autoDismissDelay,\n dismissLabel,\n showDismissButton = true,\n toastId,\n onDismiss,\n onRemoveToast,\n },\n ref,\n) {\n const timeoutRef = React.useRef<number | undefined>()\n\n const removeToast = React.useCallback(\n function removeToast() {\n onRemoveToast(toastId)\n onDismiss?.()\n },\n [onDismiss, onRemoveToast, toastId],\n )\n\n const startTimeout = React.useCallback(\n function startTimeout() {\n if (!autoDismissDelay) return\n timeoutRef.current = window.setTimeout(removeToast, autoDismissDelay * 1000)\n },\n [autoDismissDelay, removeToast],\n )\n\n const stopTimeout = React.useCallback(function stopTimeout() {\n clearTimeout(timeoutRef.current)\n timeoutRef.current = undefined\n }, [])\n\n React.useEffect(\n function setupAutoDismiss() {\n stopTimeout()\n startTimeout()\n\n return stopTimeout\n },\n [startTimeout, stopTimeout],\n )\n\n /**\n * If the action is toast action object and not a custom element,\n * the `onClick` property is wrapped in another handler responsible\n * for removing the toast when the action is triggered.\n */\n const actionWithCustomActionHandler = React.useMemo(() => {\n if (!isActionObject(action)) {\n return action\n }\n\n return {\n ...action,\n closeToast: action.closeToast ?? true,\n onClick: function handleActionClick() {\n if (!action) {\n return\n }\n\n action.onClick()\n\n if (action.closeToast ?? true) {\n removeToast()\n }\n },\n }\n }, [action, removeToast])\n\n return (\n <StaticToast\n ref={ref}\n message={message}\n description={description}\n icon={icon}\n action={actionWithCustomActionHandler}\n onDismiss={showDismissButton ? removeToast : undefined}\n dismissLabel={dismissLabel}\n // @ts-expect-error\n onMouseEnter={stopTimeout}\n onMouseLeave={startTimeout}\n />\n )\n})\n\n//\n// Internal state and context\n//\n\ntype InternalToastEntry = Omit<InternalToastProps, 'onRemoveToast'>\ntype ToastsList = readonly InternalToastEntry[]\n\ntype ShowToastAction = (props: ToastProps) => () => void\nconst ToastsContext = React.createContext<ShowToastAction>(() => () => undefined)\n\n/**\n * The props needed by the ToastsProvider component.\n *\n * @see ToastsProvider\n */\ntype ToastsProviderProps = {\n /**\n * The default label to apply to toast dismiss buttons.\n *\n * This is useful in environments that need locatization, so you do not need to pass the same\n * translated label every time you trigger a toast.\n *\n * However, you can still apply a different label to a specific toast, by passing a different\n * value when calling showToast.\n *\n * @default 'Close'\n */\n defaultDismissLabel?: string\n\n /**\n * The default number of seconds after which the toast will be dismissed automatically.\n *\n * You can pass a different value to a specific toast when calling `showToast`. You can even\n * pass `false` if you want a certain toast to never be dismissed automatically.\n *\n * @default 10 (seconds)\n */\n defaultAutoDismissDelay?: number\n\n /**\n * The padding used to separate the toasts from the viewport borders.\n *\n * @default 'large'\n */\n padding?: Space\n\n /**\n * The app wrapped by the provider.\n */\n children: NonNullable<React.ReactNode>\n\n /**\n * Custom classname for the toasts container, if you need to fine-tune the position or other styles\n */\n containerClassName?: string\n}\n\n/**\n * Provides the state management and rendering of the toasts currently active.\n *\n * You need to render this near the top of your app components tree, in order to `useToasts`.\n *\n * @see useToasts\n */\nfunction ToastsProvider({\n children,\n padding = 'large',\n defaultAutoDismissDelay = 10 /* seconds */,\n defaultDismissLabel = 'Close',\n containerClassName,\n}: ToastsProviderProps) {\n const [toasts, setToasts] = React.useState<ToastsList>([])\n const { mappedRef, animateRemove } = useToastsAnimation()\n\n const removeToast = React.useCallback(\n function onRemoveToast(toastId: string) {\n animateRemove(toastId, () => {\n setToasts((list) => {\n const index = list.findIndex((n) => n.toastId === toastId)\n if (index < 0) return list\n const copy = [...list]\n copy.splice(index, 1)\n return copy\n })\n })\n },\n [animateRemove],\n )\n\n const showToast = React.useCallback(\n function showToast(props: ToastProps) {\n const toastId = generateElementId('toast')\n const newToast: InternalToastEntry = {\n autoDismissDelay: defaultAutoDismissDelay,\n dismissLabel: defaultDismissLabel,\n ...props,\n toastId,\n }\n setToasts((list) => [...list, newToast])\n return () => removeToast(toastId)\n },\n [defaultAutoDismissDelay, defaultDismissLabel, removeToast],\n )\n\n return (\n <ToastsContext.Provider value={showToast}>\n {children}\n <Portal>\n {toasts.length === 0 ? null : (\n <Box\n className={[styles.stackedToastsView, containerClassName]}\n position=\"fixed\"\n width=\"full\"\n paddingX={padding}\n paddingBottom={padding}\n data-testid=\"toasts-container\"\n >\n <Stack space=\"medium\">\n {toasts.map(({ toastId, ...props }) => (\n <InternalToast\n key={toastId}\n ref={mappedRef(toastId)}\n toastId={toastId}\n onRemoveToast={removeToast}\n {...props}\n />\n ))}\n </Stack>\n </Box>\n )}\n </Portal>\n </ToastsContext.Provider>\n )\n}\n\n/**\n * Provides a function `showToast` that shows a new toast every time you call it.\n *\n * ```jsx\n * const showToast = useToasts()\n *\n * <button onClick={() => showToast({ message: 'Hello' })}>\n * Say hello\n * </button>\n * ```\n *\n * All toasts fired via this function are rendered in a global fixed location, and stacked one on\n * top of the other.\n *\n * When called, `showToast` returns a function that dismisses the toast when called.\n *\n * @see ToastsProvider\n */\nfunction useToasts() {\n return React.useContext(ToastsContext)\n}\n\n/**\n * Adds a toast to be rendered, stacked alongside any other currently active toasts.\n *\n * For most situations, you should prefer to use the `showToast` function obtained from `useToasts`.\n * This component is provided for convenience to render toasts in the markup, but it has some\n * peculiarities, which are discussed below.\n *\n * Internally, this calls `showToast`. It is provided for two reasons:\n *\n * 1. Convenience, when you want to fire a toast in markup/jsx code. Keep in mind, though, that\n * toasts rendered in this way will be removed from view when the context where it is rendered\n * is unmounted. Unlike toasts fired with `showToast`, which will normally be dismissed, either\n * by the user or after a delay. They'll still be animated on their way out, though.\n * 2. When combined with disabling dismissing it (e.g. `showDismissButton={false}` and\n * `autoDismissDelay={false}` it provides a way to show \"permanent\" toasts that only go away when\n * the component ceases to be rendered).\n *\n * This is useful for cases when the consumer wants to control when a toast is visible, and to keep\n * it visible based on an app-specific condition.\n *\n * Something important to note about this component is that it triggers the toast based on the props\n * passed when first rendered, and it does not update the toast if these props change on subsequent\n * renders. In this sense, this is an imperative component, more than a descriptive one. This is\n * done to simplify the internals, and to keep it in line with how `showToast` works: you fire up a\n * toast imperatively, and you loose control over it. It remains rendered according to the props you\n * first passed.\n *\n * @see useToasts\n */\nfunction Toast(props: ToastProps) {\n const showToast = useToasts()\n const propsRef = React.useRef<ToastProps>(props)\n React.useEffect(() => {\n const dismissToast = showToast(propsRef.current)\n return dismissToast\n }, [showToast])\n return null\n}\n\nexport { Toast, ToastsProvider, useToasts }\nexport type { ToastProps, ToastsProviderProps }\n"],"names":["InternalToast","React","forwardRef","t0","ref","$","_c","message","description","icon","action","autoDismissDelay","dismissLabel","showDismissButton","t1","toastId","onDismiss","onRemoveToast","undefined","timeoutRef","useRef","t2","removeToast","t3","startTimeout","current","window","setTimeout","t4","Symbol","for","stopTimeout","clearTimeout","t5","t6","setupAutoDismiss","useEffect","t7","bb0","isActionObject","t8","closeToast","t9","handleActionClick","onClick","t10","_objectSpread","actionWithCustomActionHandler","createElement","StaticToast","ToastsContext","createContext","ToastsProvider","children","padding","defaultAutoDismissDelay","defaultDismissLabel","containerClassName","toasts","setToasts","useState","mappedRef","animateRemove","useToastsAnimation","list","index","findIndex","n","copy","splice","showToast","props","toastId_0","generateElementId","newToast","list_0","length","Box","className","styles","stackedToastsView","position","width","Stack","space","map","toastId_1","props_0","_objectWithoutProperties","_excluded","_extends","Portal","Provider","useToasts","useContext","Toast","propsRef","dismissToast"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;;AA4BA;AACA;AACA;;AAQA;AACA,MAAMA,aAAa,gBAAGC,yBAAK,CAACC,UAAU,CAAqC,SAAAF,aAAAA,CAAAG,EAAA,EAAAC,GAAA,EAAA;EAAA,MAAAC,CAAA,GAAAC,sBAAA,CAAA,EAAA,CAAA,CAAA;AACvE,EAAA,MAAA;IAAAC,OAAA;IAAAC,WAAA;IAAAC,IAAA;IAAAC,MAAA;IAAAC,gBAAA;IAAAC,YAAA;AAAAC,IAAAA,iBAAA,EAAAC,EAAA;IAAAC,OAAA;IAAAC,SAAA;AAAAC,IAAAA,aAAAA;AAAA,GAAA,GAAAd,EAWC,CAAA;EAJG,MAAAU,iBAAA,GAAAC,EAAwB,KAAxBI,SAAwB,GAAxB,IAAwB,GAAxBJ,EAAwB,CAAA;AAO5B,EAAA,MAAAK,UAAA,GAAmBlB,yBAAK,CAAAmB,MAAO,EAAsB,CAAA;AAAA,EAAA,IAAAC,EAAA,CAAA;EAAA,IAAAhB,CAAA,CAAAW,CAAAA,CAAAA,KAAAA,SAAA,IAAAX,CAAA,QAAAY,aAAA,IAAAZ,CAAA,CAAA,CAAA,CAAA,KAAAU,OAAA,EAAA;AAGjDM,IAAAA,EAAA,YAAAC,WAAA,GAAA;MACIL,aAAa,CAACF,OAAO,CAAC,CAAA;AACtBC,MAAAA,SAAS,IAAI,CAAA;KAChB,CAAA;AAAAX,IAAAA,CAAA,MAAAW,SAAA,CAAA;AAAAX,IAAAA,CAAA,MAAAY,a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AAE,CAAA;AAC7B,EAAA,MAAAG,QAAA,GAAiB/F,yBAAK,CAAAmB,MAAO,CAAamD,KAAK,CAAC,CAAA;AAAA,EAAA,IAAApE,EAAA,CAAA;AAAA,EAAA,IAAAW,EAAA,CAAA;EAAA,IAAAT,CAAA,QAAAiE,SAAA,EAAA;AAChCnE,IAAAA,EAAA,GAAAA,MAAA;AACZ,MAAA,MAAA8F,YAAA,GAAqB3B,SAAS,CAAC0B,QAAQ,CAAAvE,OAAQ,CAAC,CAAA;AAAA,MAAA,OACzCwE,YAAY,CAAA;KACtB,CAAA;IAAEnF,EAAA,GAAA,CAACwD,SAAS,CAAC,CAAA;AAAAjE,IAAAA,CAAA,MAAAiE,SAAA,CAAA;AAAAjE,IAAAA,CAAA,MAAAF,EAAA,CAAA;AAAAE,IAAAA,CAAA,MAAAS,EAAA,CAAA;AAAA,GAAA,MAAA;AAAAX,IAAAA,EAAA,GAAAE,CAAA,CAAA,CAAA,CAAA,CAAA;AAAAS,IAAAA,EAAA,GAAAT,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,GAAA;AAHdJ,EAAAA,yBAAK,CAAAmC,SAAU,CAACjC,EAGf,EAAEW,EAAW,CAAC,CAAA;AAAA,EAAA,OACR,IAAI,CAAA;AAAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"use-toasts.js","sources":["../../src/toast/use-toasts.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Portal } from '@ariakit/react'\n\nimport { Box } from '../box'\nimport { Stack } from '../stack'\nimport { generateElementId } from '../utils/common-helpers'\n\nimport { isActionObject, StaticToast } from './static-toast'\nimport { useToastsAnimation } from './toast-animation'\n\nimport styles from './toast.module.css'\n\nimport type { Space } from '../utils/common-types'\nimport type { StaticToastProps } from './static-toast'\n\n/**\n * The props needed to fire up a new notification toast.\n */\ntype ToastProps = StaticToastProps & {\n /**\n * The number of seconds the toast is expected to be shown before it is dismissed automatically,\n * or false to disable auto-dismiss.\n *\n * It defaults to whatever is the autoDismissDelay set in the ToastsProvider.\n */\n autoDismissDelay?: number | false\n\n /**\n * The label for the button that dismisses the toast.\n *\n * It defaults to the value set in the ToastsProvider, but individual toasts can have a\n * different value if needed.\n */\n dismissLabel?: string\n\n /**\n * Whether to show the dismiss button or not.\n *\n * Use this value with care. If combined with disabling `autoDismissDelay`, it may leave you\n * with toasts that the user won't be able to dismiss at will. It then is your responsibility to\n * dismiss the toast by calling the function returned by `showToast`.\n */\n showDismissButton?: boolean\n}\n\n//\n// InternalToast component and its props\n//\n\ntype InternalToastProps = Omit<ToastProps, 'autoDismissDelay' | 'dismissLabel'> &\n Required<Pick<ToastProps, 'autoDismissDelay' | 'dismissLabel'>> & {\n toastId: string\n onRemoveToast: (toastId: string) => void\n }\n\n/** @private */\nconst InternalToast = React.forwardRef<HTMLDivElement, InternalToastProps>(function InternalToast(\n {\n message,\n description,\n icon,\n action,\n autoDismissDelay,\n dismissLabel,\n showDismissButton = true,\n toastId,\n onDismiss,\n onRemoveToast,\n },\n ref,\n) {\n const timeoutRef = React.useRef<number | undefined>()\n\n const removeToast = React.useCallback(\n function removeToast() {\n onRemoveToast(toastId)\n onDismiss?.()\n },\n [onDismiss, onRemoveToast, toastId],\n )\n\n const startTimeout = React.useCallback(\n function startTimeout() {\n if (!autoDismissDelay) return\n timeoutRef.current = window.setTimeout(removeToast, autoDismissDelay * 1000)\n },\n [autoDismissDelay, removeToast],\n )\n\n const stopTimeout = React.useCallback(function stopTimeout() {\n clearTimeout(timeoutRef.current)\n timeoutRef.current = undefined\n }, [])\n\n React.useEffect(\n function setupAutoDismiss() {\n stopTimeout()\n startTimeout()\n\n return stopTimeout\n },\n [startTimeout, stopTimeout],\n )\n\n /**\n * If the action is toast action object and not a custom element,\n * the `onClick` property is wrapped in another handler responsible\n * for removing the toast when the action is triggered.\n */\n const actionWithCustomActionHandler = React.useMemo(() => {\n if (!isActionObject(action)) {\n return action\n }\n\n return {\n ...action,\n closeToast: action.closeToast ?? true,\n onClick: function handleActionClick() {\n if (!action) {\n return\n }\n\n action.onClick()\n\n if (action.closeToast ?? true) {\n removeToast()\n }\n },\n }\n }, [action, removeToast])\n\n return (\n <StaticToast\n ref={ref}\n message={message}\n description={description}\n icon={icon}\n action={actionWithCustomActionHandler}\n onDismiss={showDismissButton ? removeToast : undefined}\n dismissLabel={dismissLabel}\n // @ts-expect-error\n onMouseEnter={stopTimeout}\n onMouseLeave={startTimeout}\n />\n )\n})\n\n//\n// Internal state and context\n//\n\ntype InternalToastEntry = Omit<InternalToastProps, 'onRemoveToast'>\ntype ToastsList = readonly InternalToastEntry[]\n\ntype ShowToastAction = (props: ToastProps) => () => void\nconst ToastsContext = React.createContext<ShowToastAction>(() => () => undefined)\n\n/**\n * The props needed by the ToastsProvider component.\n *\n * @see ToastsProvider\n */\ntype ToastsProviderProps = {\n /**\n * The default label to apply to toast dismiss buttons.\n *\n * This is useful in environments that need locatization, so you do not need to pass the same\n * translated label every time you trigger a toast.\n *\n * However, you can still apply a different label to a specific toast, by passing a different\n * value when calling showToast.\n *\n * @default 'Close'\n */\n defaultDismissLabel?: string\n\n /**\n * The default number of seconds after which the toast will be dismissed automatically.\n *\n * You can pass a different value to a specific toast when calling `showToast`. You can even\n * pass `false` if you want a certain toast to never be dismissed automatically.\n *\n * @default 10 (seconds)\n */\n defaultAutoDismissDelay?: number\n\n /**\n * The padding used to separate the toasts from the viewport borders.\n *\n * @default 'large'\n */\n padding?: Space\n\n /**\n * The app wrapped by the provider.\n */\n children: NonNullable<React.ReactNode>\n\n /**\n * Custom classname for the toasts container, if you need to fine-tune the position or other styles\n */\n containerClassName?: string\n}\n\n/**\n * Provides the state management and rendering of the toasts currently active.\n *\n * You need to render this near the top of your app components tree, in order to `useToasts`.\n *\n * @see useToasts\n */\nfunction ToastsProvider({\n children,\n padding = 'large',\n defaultAutoDismissDelay = 10 /* seconds */,\n defaultDismissLabel = 'Close',\n containerClassName,\n}: ToastsProviderProps) {\n const [toasts, setToasts] = React.useState<ToastsList>([])\n const { mappedRef, animateRemove } = useToastsAnimation()\n\n const removeToast = React.useCallback(\n function onRemoveToast(toastId: string) {\n animateRemove(toastId, () => {\n setToasts((list) => {\n const index = list.findIndex((n) => n.toastId === toastId)\n if (index < 0) return list\n const copy = [...list]\n copy.splice(index, 1)\n return copy\n })\n })\n },\n [animateRemove],\n )\n\n const showToast = React.useCallback(\n function showToast(props: ToastProps) {\n const toastId = generateElementId('toast')\n const newToast: InternalToastEntry = {\n autoDismissDelay: defaultAutoDismissDelay,\n dismissLabel: defaultDismissLabel,\n ...props,\n toastId,\n }\n setToasts((list) => [...list, newToast])\n return () => removeToast(toastId)\n },\n [defaultAutoDismissDelay, defaultDismissLabel, removeToast],\n )\n\n return (\n <ToastsContext.Provider value={showToast}>\n {children}\n <Portal>\n {toasts.length === 0 ? null : (\n <Box\n className={[styles.stackedToastsView, containerClassName]}\n position=\"fixed\"\n width=\"full\"\n paddingX={padding}\n paddingBottom={padding}\n data-testid=\"toasts-container\"\n >\n <Stack space=\"medium\">\n {toasts.map(({ toastId, ...props }) => (\n <InternalToast\n key={toastId}\n ref={mappedRef(toastId)}\n toastId={toastId}\n onRemoveToast={removeToast}\n {...props}\n />\n ))}\n </Stack>\n </Box>\n )}\n </Portal>\n </ToastsContext.Provider>\n )\n}\n\n/**\n * Provides a function `showToast` that shows a new toast every time you call it.\n *\n * ```jsx\n * const showToast = useToasts()\n *\n * <button onClick={() => showToast({ message: 'Hello' })}>\n * Say hello\n * </button>\n * ```\n *\n * All toasts fired via this function are rendered in a global fixed location, and stacked one on\n * top of the other.\n *\n * When called, `showToast` returns a function that dismisses the toast when called.\n *\n * @see ToastsProvider\n */\nfunction useToasts() {\n return React.useContext(ToastsContext)\n}\n\n/**\n * Adds a toast to be rendered, stacked alongside any other currently active toasts.\n *\n * For most situations, you should prefer to use the `showToast` function obtained from `useToasts`.\n * This component is provided for convenience to render toasts in the markup, but it has some\n * peculiarities, which are discussed below.\n *\n * Internally, this calls `showToast`. It is provided for two reasons:\n *\n * 1. Convenience, when you want to fire a toast in markup/jsx code. Keep in mind, though, that\n * toasts rendered in this way will be removed from view when the context where it is rendered\n * is unmounted. Unlike toasts fired with `showToast`, which will normally be dismissed, either\n * by the user or after a delay. They'll still be animated on their way out, though.\n * 2. When combined with disabling dismissing it (e.g. `showDismissButton={false}` and\n * `autoDismissDelay={false}` it provides a way to show \"permanent\" toasts that only go away when\n * the component ceases to be rendered).\n *\n * This is useful for cases when the consumer wants to control when a toast is visible, and to keep\n * it visible based on an app-specific condition.\n *\n * Something important to note about this component is that it triggers the toast based on the props\n * passed when first rendered, and it does not update the toast if these props change on subsequent\n * renders. In this sense, this is an imperative component, more than a descriptive one. This is\n * done to simplify the internals, and to keep it in line with how `showToast` works: you fire up a\n * toast imperatively, and you loose control over it. It remains rendered according to the props you\n * first passed.\n *\n * @see useToasts\n */\nfunction Toast(props: ToastProps) {\n const showToast = useToasts()\n const propsRef = React.useRef<ToastProps>(props)\n React.useEffect(() => {\n const dismissToast = showToast(propsRef.current)\n return dismissToast\n }, [showToast])\n return null\n}\n\nexport { Toast, ToastsProvider, useToasts }\nexport type { ToastProps, ToastsProviderProps }\n"],"names":["InternalToast","React","forwardRef","t0","ref","$","_c","message","description","icon","action","autoDismissDelay","dismissLabel","showDismissButton","t1","toastId","onDismiss","onRemoveToast","undefined","timeoutRef","useRef","t2","removeToast","t3","startTimeout","current","window","setTimeout","t4","Symbol","for","stopTimeout","clearTimeout","t5","t6","setupAutoDismiss","useEffect","t7","bb0","isActionObject","t8","closeToast","t9","handleActionClick","onClick","t10","actionWithCustomActionHandler","createElement","StaticToast","ToastsContext","createContext","ToastsProvider","children","padding","defaultAutoDismissDelay","defaultDismissLabel","containerClassName","toasts","setToasts","useState","mappedRef","animateRemove","useToastsAnimation","list","index","findIndex","n","copy","splice","showToast","props","toastId_0","generateElementId","newToast","list_0","length","Box","className","styles","stackedToastsView","position","width","Stack","space","map","toastId_1","props_0","_extends","Portal","Provider","useToasts","useContext","Toast","propsRef","dismissToast"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A;AAAAhE,IAAAA,CAAA,MAAAF,EAAA,CAAA;AAAAE,IAAAA,CAAA,MAAAS,EAAA,CAAA;AAAA,GAAA,MAAA;AAAAX,IAAAA,EAAA,GAAAE,CAAA,CAAA,CAAA,CAAA,CAAA;AAAAS,IAAAA,EAAA,GAAAT,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,GAAA;AAHdJ,EAAAA,yBAAK,CAAAmC,SAAU,CAACjC,EAGf,EAAEW,EAAW,CAAC,CAAA;AAAA,EAAA,OACR,IAAI,CAAA;AAAA;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doist/reactist",
|
|
3
3
|
"description": "Open source React components by Doist",
|
|
4
|
-
"version": "31.
|
|
4
|
+
"version": "31.2.0",
|
|
5
5
|
"repository": "https://github.com/Doist/reactist",
|
|
6
6
|
"homepage": "https://github.com/Doist/reactist#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"poststart:yalc": "yalc installations clean",
|
|
46
46
|
"start:yalc:success": "./scripts/organize-styles.sh && yalc push --sig",
|
|
47
47
|
"build": "scripts/build.sh",
|
|
48
|
-
"build:storybook": "
|
|
48
|
+
"build:storybook": "storybook build -o storybook-static",
|
|
49
49
|
"clean": "rimraf es lib styles dist",
|
|
50
50
|
"test": "jest --passWithNoTests",
|
|
51
51
|
"test:watch": "npm run test -- --watch",
|
|
52
52
|
"test:coverage": "npm run test -- --coverage",
|
|
53
53
|
"type-check": "tsc --noEmit -p ./tsconfig.json",
|
|
54
54
|
"lint": "eslint --format codeframe --cache --ext js,jsx,ts,tsx ./",
|
|
55
|
-
"storybook": "
|
|
55
|
+
"storybook": "storybook dev -p 6006",
|
|
56
56
|
"prettify": "prettier --write \"./**/*.{js,jsx,ts,tsx,json,css,scss,less,md,mdx}\"",
|
|
57
57
|
"plop": "plop"
|
|
58
58
|
},
|
|
@@ -66,20 +66,9 @@
|
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@ariakit/react": "0.4.19",
|
|
69
|
-
"@semantic-release/changelog": "6.0.3",
|
|
70
|
-
"@semantic-release/exec": "7.1.0",
|
|
71
|
-
"@semantic-release/git": "10.0.1",
|
|
72
69
|
"@babel/cli": "7.28.3",
|
|
73
70
|
"@babel/core": "7.28.5",
|
|
74
|
-
"@babel/plugin-proposal-class-properties": "^7.10.1",
|
|
75
|
-
"@babel/plugin-proposal-export-default-from": "^7.0.0",
|
|
76
|
-
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
|
|
77
|
-
"@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6",
|
|
78
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.10.1",
|
|
79
|
-
"@babel/plugin-proposal-optional-chaining": "7.21.0",
|
|
80
71
|
"@babel/plugin-transform-runtime": "7.28.5",
|
|
81
|
-
"@babel/plugin-transform-spread": "^7.0.0",
|
|
82
|
-
"@babel/polyfill": "^7.0.0",
|
|
83
72
|
"@babel/preset-env": "^7.0.0",
|
|
84
73
|
"@babel/preset-react": "^7.0.0",
|
|
85
74
|
"@babel/preset-typescript": "^7.10.1",
|
|
@@ -88,26 +77,22 @@
|
|
|
88
77
|
"@doist/prettier-config": "4.0.0",
|
|
89
78
|
"@doist/react-compiler-tracker": "2.1.2",
|
|
90
79
|
"@doist/tsconfig": "2.0.0",
|
|
91
|
-
"@geometricpanda/storybook-addon-badges": "^0.2.2",
|
|
92
80
|
"@rollup/plugin-babel": "6.1.0",
|
|
93
81
|
"@rollup/plugin-commonjs": "28.0.9",
|
|
94
82
|
"@rollup/plugin-node-resolve": "16.0.3",
|
|
95
83
|
"@rollup/plugin-terser": "0.4.4",
|
|
96
84
|
"@rollup/plugin-typescript": "12.3.0",
|
|
97
|
-
"@
|
|
98
|
-
"@
|
|
99
|
-
"@
|
|
100
|
-
"@storybook/addon-
|
|
101
|
-
"@storybook/addon-links": "
|
|
102
|
-
"@storybook/
|
|
103
|
-
"@storybook/
|
|
104
|
-
"@
|
|
105
|
-
"@
|
|
106
|
-
"@
|
|
107
|
-
"@testing-library/
|
|
108
|
-
"@testing-library/react": "14.3.1",
|
|
109
|
-
"@testing-library/user-event": "^13.2.1",
|
|
110
|
-
"@types/cheerio": "^0.22.22",
|
|
85
|
+
"@semantic-release/changelog": "6.0.3",
|
|
86
|
+
"@semantic-release/exec": "7.1.0",
|
|
87
|
+
"@semantic-release/git": "10.0.1",
|
|
88
|
+
"@storybook/addon-docs": "9.1.20",
|
|
89
|
+
"@storybook/addon-links": "9.1.20",
|
|
90
|
+
"@storybook/react": "9.1.20",
|
|
91
|
+
"@storybook/react-vite": "9.1.20",
|
|
92
|
+
"@testing-library/dom": "10.4.1",
|
|
93
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
94
|
+
"@testing-library/react": "16.3.2",
|
|
95
|
+
"@testing-library/user-event": "14.6.1",
|
|
111
96
|
"@types/classnames": "^2.2.10",
|
|
112
97
|
"@types/jest": "28.1.8",
|
|
113
98
|
"@types/jest-axe": "^3.5.3",
|
|
@@ -116,14 +101,12 @@
|
|
|
116
101
|
"@types/react-dom": "18.3.0",
|
|
117
102
|
"@typescript-eslint/eslint-plugin": "8.46.2",
|
|
118
103
|
"@typescript-eslint/parser": "8.46.2",
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"babel-loader": "^8.1.0",
|
|
104
|
+
"@vitejs/plugin-react": "5.2.0",
|
|
105
|
+
"autoprefixer": "10.5.0",
|
|
122
106
|
"babel-plugin-react-compiler": "1.0.0",
|
|
123
|
-
"chromatic": "
|
|
107
|
+
"chromatic": "16.10.1",
|
|
124
108
|
"classnames": "^2.2.5",
|
|
125
109
|
"conventional-changelog-conventionalcommits": "9.3.0",
|
|
126
|
-
"css-loader": "^4.2.2",
|
|
127
110
|
"cssnano": "^5.0.16",
|
|
128
111
|
"eslint": "8.57.1",
|
|
129
112
|
"eslint-config-prettier": "^8.5.0",
|
|
@@ -132,41 +115,32 @@
|
|
|
132
115
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
133
116
|
"eslint-plugin-prettier": "5.5.4",
|
|
134
117
|
"eslint-plugin-react": "7.37.5",
|
|
135
|
-
"
|
|
118
|
+
"find-up": "7.0.0",
|
|
136
119
|
"husky": "^4.3.0",
|
|
137
120
|
"jest": "^28.1.0",
|
|
138
121
|
"jest-axe": "^5.0.1",
|
|
139
122
|
"jest-environment-jsdom": "^28.1.0",
|
|
140
123
|
"jest-watch-typeahead": "^1.1.0",
|
|
141
124
|
"less": "^3.8.1",
|
|
142
|
-
"less-loader": "^7.0.0",
|
|
143
125
|
"lint-staged": "^10.4.0",
|
|
144
126
|
"marked": "^4.2.12",
|
|
145
|
-
"mini-css-extract-plugin": "^0.11.0",
|
|
146
127
|
"mockdate": "^3.0.2",
|
|
147
|
-
"optimize-css-assets-webpack-plugin": "^5.0.3",
|
|
148
|
-
"path": "^0.12.7",
|
|
149
128
|
"plop": "^3.1.1",
|
|
150
129
|
"prettier": "3.6.2",
|
|
151
|
-
"raw-loader": "^4.0.1",
|
|
152
130
|
"react": "18.3.1",
|
|
153
131
|
"react-compiler-runtime": "1.0.0",
|
|
154
|
-
"react-docgen-typescript-loader": "^3.7.2",
|
|
155
132
|
"react-dom": "18.3.1",
|
|
133
|
+
"react-docgen-typescript": "2.4.0",
|
|
156
134
|
"react-is": "18.3.1",
|
|
157
|
-
"react-svg-loader": "^3.0.3",
|
|
158
|
-
"react-test-renderer": "18.3.1",
|
|
159
135
|
"rimraf": "^3.0.2",
|
|
160
|
-
"semantic-release": "25.0.3",
|
|
161
136
|
"rollup": "2.79.2",
|
|
162
137
|
"rollup-plugin-styles": "4.0.0",
|
|
163
138
|
"rollup-plugin-visualizer": "6.0.5",
|
|
164
|
-
"
|
|
165
|
-
"
|
|
166
|
-
"ts-loader": "^8.0.2",
|
|
139
|
+
"semantic-release": "25.0.3",
|
|
140
|
+
"storybook": "9.1.20",
|
|
167
141
|
"tslib": "^2.0.0",
|
|
168
142
|
"typescript": "5.9.3",
|
|
169
|
-
"
|
|
143
|
+
"vite": "6.4.2"
|
|
170
144
|
},
|
|
171
145
|
"dependencies": {
|
|
172
146
|
"@babel/runtime": "^7.28.4",
|
|
@@ -179,12 +153,6 @@
|
|
|
179
153
|
"use-callback-ref": "^1.3.0"
|
|
180
154
|
},
|
|
181
155
|
"overrides": {
|
|
182
|
-
"@geometricpanda/storybook-addon-badges": {
|
|
183
|
-
"react": "$react",
|
|
184
|
-
"react-dom": "$react-dom",
|
|
185
|
-
"react-is": "$react-is"
|
|
186
|
-
},
|
|
187
|
-
"fork-ts-checker-webpack-plugin": "$fork-ts-checker-webpack-plugin",
|
|
188
156
|
"pretty-format": {
|
|
189
157
|
"react-is": "$react-is"
|
|
190
158
|
},
|
package/styles/banner.css
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
:root{--reactist-button-small-font-size:var(--reactist-font-size-caption);--reactist-button-small-spacing:var(--reactist-spacing-small);--reactist-button-small-height:28px;--reactist-button-normal-font-size:var(--reactist-font-size-copy);--reactist-button-normal-spacing:var(--reactist-spacing-medium);--reactist-button-normal-height:32px;--reactist-button-large-font-size:var(--reactist-font-size-body);--reactist-button-large-spacing:var(--reactist-spacing-large);--reactist-button-large-height:36px;--reactist-actionable-primary-idle-tint:#fff;--reactist-actionable-primary-idle-fill:#008aa6;--reactist-actionable-primary-hover-tint:#fff;--reactist-actionable-primary-hover-fill:#007992;--reactist-actionable-primary-disabled-tint:#fff;--reactist-actionable-primary-disabled-fill:#99d0db;--reactist-actionable-secondary-idle-tint:#282f30;--reactist-actionable-secondary-idle-fill:#f2f6f7;--reactist-actionable-secondary-hover-tint:#282f30;--reactist-actionable-secondary-hover-fill:#e3e7e8;--reactist-actionable-secondary-disabled-tint:#a9acac;--reactist-actionable-secondary-disabled-fill:#f2f6f7;--reactist-actionable-tertiary-idle-tint:#006f85;--reactist-actionable-tertiary-hover-tint:#006f85;--reactist-actionable-tertiary-hover-fill:#f2f6f7;--reactist-actionable-tertiary-disabled-tint:#99c5ce;--reactist-actionable-quaternary-idle-tint:#6c777a;--reactist-actionable-quaternary-hover-tint:#282f30;--reactist-actionable-quaternary-hover-fill:#e0e7e8;--reactist-actionable-quaternary-disabled-tint:#c4c9ca;--reactist-actionable-primary-destructive-idle-tint:#fff;--reactist-actionable-primary-destructive-idle-fill:#dc4c3e;--reactist-actionable-primary-destructive-hover-tint:#fff;--reactist-actionable-primary-destructive-hover-fill:#b03d32;--reactist-actionable-primary-destructive-disabled-tint:#fff;--reactist-actionable-primary-destructive-disabled-fill:#f1b7b2;--reactist-actionable-secondary-destructive-idle-tint:#dc4c3e;--reactist-actionable-secondary-destructive-hover-tint:#b03d32;--reactist-actionable-secondary-destructive-hover-fill:transparent;--reactist-actionable-secondary-destructive-disabled-tint:#f1b7b2}._3930afa0{align-items:center;background-color:transparent;border:1px solid transparent;border-radius:var(--reactist-border-radius-small);color:inherit;cursor:pointer;display:flex;flex-direction:row;font-family:var(--reactist-font-family);font-weight:var(--reactist-font-weight-medium);justify-content:center;max-width:100%;text-decoration:none;transition-duration:.3s;transition-property:color,background-color;transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}._90654824{font-size:inherit;text-overflow:ellipsis;white-space:nowrap}._3930afa0:active:not([aria-disabled=true]){transform:scale(.97);transition:transform .2s cubic-bezier(.02,1.505,.745,1.235)}._3930afa0{--reactist-spinner-tint:var(--reactist-btn-idle-tint);--reactist-spinner-fill:var(--reactist-btn-idle-fill);font-size:var(--reactist-btn-font-size);height:var(--reactist-btn-height);line-height:var(--reactist-btn-height);padding:0 var(--reactist-btn-spacing)}._3930afa0.c05d17c2{border-radius:1000px}._3930afa0._1e29d236{--reactist-btn-height:var(--reactist-button-small-height);--reactist-btn-spacing:var(--reactist-button-small-spacing);--reactist-btn-font-size:var(--reactist-button-small-font-size)}._3930afa0._7246d092{--reactist-btn-height:var(--reactist-button-normal-height);--reactist-btn-spacing:var(--reactist-button-normal-spacing);--reactist-btn-font-size:var(--reactist-button-normal-font-size)}._3930afa0._2d084671{--reactist-btn-height:var(--reactist-button-large-height);--reactist-btn-spacing:var(--reactist-button-large-spacing);--reactist-btn-font-size:var(--reactist-button-large-font-size)}._3930afa0:not(._2b0b9d95){background-color:var(--reactist-btn-idle-fill);color:var(--reactist-btn-idle-tint)}._3930afa0:focus-visible:not([aria-disabled=true]),._3930afa0:hover:not([aria-disabled=true]),._3930afa0[aria-expanded=true]{background-color:var(--reactist-btn-hover-fill);color:var(--reactist-btn-hover-tint)}._3930afa0._2b0b9d95{background-color:var(--reactist-btn-disabled-fill);color:var(--reactist-btn-disabled-tint);cursor:not-allowed}._3930afa0:not(.abd5766f){min-width:68px}._3930afa0.abd5766f{height:var(--reactist-btn-height);padding:0;width:var(--reactist-btn-height)}._3930afa0 ._380e7c73{margin-left:-6px;margin-right:calc(var(--reactist-btn-spacing) - 6px)}._3930afa0 ._20fe4105{margin-left:calc(var(--reactist-btn-spacing) - 6px);margin-right:-6px}._3930afa0>*{pointer-events:none}._7ea1378e{--reactist-btn-idle-tint:var(--reactist-actionable-primary-idle-tint);--reactist-btn-idle-fill:var(--reactist-actionable-primary-idle-fill);--reactist-btn-hover-tint:var(--reactist-actionable-primary-hover-tint);--reactist-btn-hover-fill:var(--reactist-actionable-primary-hover-fill);--reactist-btn-disabled-tint:var(--reactist-actionable-primary-disabled-tint);--reactist-btn-disabled-fill:var(--reactist-actionable-primary-disabled-fill)}._64ee8afd{--reactist-btn-idle-tint:var(--reactist-actionable-secondary-idle-tint);--reactist-btn-idle-fill:var(--reactist-actionable-secondary-idle-fill);--reactist-btn-hover-tint:var(--reactist-actionable-secondary-hover-tint);--reactist-btn-hover-fill:var(--reactist-actionable-secondary-hover-fill);--reactist-btn-disabled-tint:var(--reactist-actionable-secondary-disabled-tint);--reactist-btn-disabled-fill:var(--reactist-actionable-secondary-disabled-fill)}._650176bf{--reactist-btn-idle-tint:var(--reactist-actionable-tertiary-idle-tint);--reactist-btn-idle-fill:transparent;--reactist-btn-hover-tint:var(--reactist-actionable-tertiary-hover-tint);--reactist-btn-hover-fill:var(--reactist-actionable-tertiary-hover-fill);--reactist-btn-disabled-tint:var(--reactist-actionable-tertiary-disabled-tint);--reactist-btn-disabled-fill:transparent}.aa19cb97{--reactist-btn-idle-tint:var(--reactist-actionable-quaternary-idle-tint);--reactist-btn-idle-fill:transparent;--reactist-btn-hover-tint:var(--reactist-actionable-quaternary-hover-tint);--reactist-btn-hover-fill:var(--reactist-actionable-quaternary-hover-fill);--reactist-btn-disabled-tint:var(--reactist-actionable-quaternary-disabled-tint);--reactist-btn-disabled-fill:transparent}._7ea1378e._7a2d9a8c{--reactist-btn-idle-tint:var(--reactist-actionable-primary-destructive-idle-tint);--reactist-btn-idle-fill:var(--reactist-actionable-primary-destructive-idle-fill);--reactist-btn-hover-tint:var(--reactist-actionable-primary-destructive-hover-tint);--reactist-btn-hover-fill:var(--reactist-actionable-primary-destructive-hover-fill);--reactist-btn-disabled-tint:var(--reactist-actionable-primary-destructive-disabled-tint);--reactist-btn-disabled-fill:var(--reactist-actionable-primary-destructive-disabled-fill)}._64ee8afd._7a2d9a8c{--reactist-btn-idle-tint:var(--reactist-actionable-secondary-destructive-idle-tint);--reactist-btn-idle-fill:transparent;--reactist-btn-hover-tint:var(--reactist-actionable-secondary-destructive-hover-tint);--reactist-btn-hover-fill:var(--reactist-actionable-secondary-destructive-hover-fill);--reactist-btn-disabled-tint:var(--reactist-actionable-secondary-destructive-disabled-tint);--reactist-btn-disabled-fill:transparent;border-color:var(--reactist-btn-idle-tint)}._64ee8afd._7a2d9a8c:hover{border-color:var(--reactist-btn-hover-tint)}._64ee8afd._7a2d9a8c._2b0b9d95{border-color:var(--reactist-btn-disabled-tint)}._650176bf._7a2d9a8c,.aa19cb97._7a2d9a8c{--reactist-btn-idle-tint:var(--reactist-actionable-secondary-destructive-idle-tint);--reactist-btn-hover-tint:var(--reactist-actionable-secondary-destructive-hover-tint);--reactist-btn-disabled-tint:var(--reactist-actionable-secondary-destructive-disabled-tint)}
|
|
9
9
|
:root{--reactist-banner-info-icon-color:#316fea;--reactist-banner-upgrade-icon-color:#f48318;--reactist-banner-experiment-icon-color:#f48318;--reactist-banner-warning-icon-color:#eb8909;--reactist-banner-error-icon-color:#dc4c3e;--reactist-banner-success-icon-color:#058527}._447f8e53{color:var(--reactist-banner-info-icon-color)}.cdb7a2b8{color:var(--reactist-banner-upgrade-icon-color)}._210efb55{color:var(--reactist-banner-experiment-icon-color)}.cd91167f{color:var(--reactist-banner-warning-icon-color)}.a52763ee{color:var(--reactist-banner-error-icon-color)}.c6229331{color:var(--reactist-banner-success-icon-color)}
|
|
10
10
|
:root{--reactist-text-link-idle-tint:var(--reactist-actionable-tertiary-idle-tint);--reactist-text-link-hover-tint:var(--reactist-actionable-tertiary-hover-tint);--reactist-text-link-idle-decoration:underline;--reactist-text-link-hover-decoration:underline}.d77fcdc6{cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit}.d77fcdc6 svg{fill:currentColor;color:inherit;display:inline-block;font-size:inherit;height:1em;padding:0 6px;vertical-align:-.125em;width:1em}._468ce45c,._468ce45c *{color:var(--reactist-text-link-idle-tint)}._468ce45c:hover,._468ce45c:hover *{color:var(--reactist-text-link-hover-tint)}._54f92a1e,._54f92a1e *{color:inherit}._54f92a1e:hover,._54f92a1e:hover *{color:var(--reactist-text-link-hover-tint)}.cdc8b08c,.cdc8b08c *{-webkit-text-decoration:var(--reactist-text-link-idle-decoration);text-decoration:var(--reactist-text-link-idle-decoration)}.cdc8b08c:hover,.cdc8b08c:hover *{-webkit-text-decoration:var(--reactist-text-link-hover-decoration);text-decoration:var(--reactist-text-link-hover-decoration)}._06995bac,._06995bac *{text-decoration:none}._06995bac:hover,._06995bac:hover *{-webkit-text-decoration:var(--reactist-text-link-hover-decoration);text-decoration:var(--reactist-text-link-hover-decoration)}
|
|
11
|
-
:root{--reactist-banner-background-color:#fcfaf8;--reactist-banner-border-color:#e6e6e6;--reactist-divider-color:var(--reactist-divider-secondary);--reactist-banner-main-copy-font-size:14px;--reactist-banner-main-copy-line-height:21px;--reactist-banner-main-copy-spacing:-0.15px;--reactist-banner-main-copy-color:#202020;--reactist-banner-secondary-copy-font-size:12px;--reactist-banner-secondary-copy-line-height:20px;--reactist-banner-secondary-copy-color:#666;--reactist-banner-min-width:0}.
|
|
11
|
+
:root{--reactist-banner-background-color:#fcfaf8;--reactist-banner-border-color:#e6e6e6;--reactist-banner-divider-color:var(--reactist-divider-secondary);--reactist-banner-main-copy-font-size:14px;--reactist-banner-main-copy-line-height:21px;--reactist-banner-main-copy-spacing:-0.15px;--reactist-banner-main-copy-color:#202020;--reactist-banner-secondary-copy-font-size:12px;--reactist-banner-secondary-copy-line-height:20px;--reactist-banner-secondary-copy-color:#666;--reactist-banner-min-width:0}.a9238c10{background-color:var(--reactist-banner-background-color);border:1px solid var(--reactist-banner-border-color);container-name:banner;container-type:inline-size;font-family:var(--reactist-font-family);min-height:64px;min-width:var(--reactist-banner-min-width);overflow:hidden}.a9238c10:has(._74fb1d6c){container-type:normal;width:-moz-min-content;width:min-content}.cb9aeb0c{align-items:flex-start;padding:var(--reactist-spacing-large)}._7d720b64,.e20c1413{color:var(--reactist-banner-main-copy-color);font-size:var(--reactist-banner-main-copy-font-size);letter-spacing:var(--reactist-banner-main-copy-spacing);line-height:var(--reactist-banner-main-copy-line-height)}._7d720b64{font-weight:var(--reactist-font-weight-strong)}.e20c1413.a4ec529c{color:var(--reactist-banner-secondary-copy-color);font-size:var(--reactist-banner-secondary-copy-font-size);letter-spacing:normal;line-height:var(--reactist-banner-secondary-copy-line-height)}._74fb1d6c{border-bottom:1px solid var(--reactist-banner-divider-color)}._74fb1d6c img,.f7f9b63d svg{display:block}._22bc210c ._97060900,.f7f9b63d:empty{display:none}._32c8bd8c{flex:1 1 auto;padding:calc(var(--reactist-spacing-xsmall)/2) 0}._32c8bd8c ._0569f1dd:first-of-type{margin-left:var(--reactist-spacing-xsmall)}._154f8e60{align-self:center}@container banner (width < 235px){.cb9aeb0c,.f76860a9{flex-direction:column}.f76860a9{align-items:stretch}._22bc210c{align-items:center;flex-direction:row;justify-content:space-between}._22bc210c:has(.f7f9b63d:empty){justify-content:flex-end}._22bc210c ._97060900{display:flex}._154f8e60{align-self:flex-start}._154f8e60 ._97060900{display:none}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--reactist-banner-background-color:#fcfaf8;--reactist-banner-border-color:#e6e6e6;--reactist-divider-color:var(--reactist-divider-secondary);--reactist-banner-main-copy-font-size:14px;--reactist-banner-main-copy-line-height:21px;--reactist-banner-main-copy-spacing:-0.15px;--reactist-banner-main-copy-color:#202020;--reactist-banner-secondary-copy-font-size:12px;--reactist-banner-secondary-copy-line-height:20px;--reactist-banner-secondary-copy-color:#666;--reactist-banner-min-width:0}.
|
|
1
|
+
:root{--reactist-banner-background-color:#fcfaf8;--reactist-banner-border-color:#e6e6e6;--reactist-banner-divider-color:var(--reactist-divider-secondary);--reactist-banner-main-copy-font-size:14px;--reactist-banner-main-copy-line-height:21px;--reactist-banner-main-copy-spacing:-0.15px;--reactist-banner-main-copy-color:#202020;--reactist-banner-secondary-copy-font-size:12px;--reactist-banner-secondary-copy-line-height:20px;--reactist-banner-secondary-copy-color:#666;--reactist-banner-min-width:0}.a9238c10{background-color:var(--reactist-banner-background-color);border:1px solid var(--reactist-banner-border-color);container-name:banner;container-type:inline-size;font-family:var(--reactist-font-family);min-height:64px;min-width:var(--reactist-banner-min-width);overflow:hidden}.a9238c10:has(._74fb1d6c){container-type:normal;width:-moz-min-content;width:min-content}.cb9aeb0c{align-items:flex-start;padding:var(--reactist-spacing-large)}._7d720b64,.e20c1413{color:var(--reactist-banner-main-copy-color);font-size:var(--reactist-banner-main-copy-font-size);letter-spacing:var(--reactist-banner-main-copy-spacing);line-height:var(--reactist-banner-main-copy-line-height)}._7d720b64{font-weight:var(--reactist-font-weight-strong)}.e20c1413.a4ec529c{color:var(--reactist-banner-secondary-copy-color);font-size:var(--reactist-banner-secondary-copy-font-size);letter-spacing:normal;line-height:var(--reactist-banner-secondary-copy-line-height)}._74fb1d6c{border-bottom:1px solid var(--reactist-banner-divider-color)}._74fb1d6c img,.f7f9b63d svg{display:block}._22bc210c ._97060900,.f7f9b63d:empty{display:none}._32c8bd8c{flex:1 1 auto;padding:calc(var(--reactist-spacing-xsmall)/2) 0}._32c8bd8c ._0569f1dd:first-of-type{margin-left:var(--reactist-spacing-xsmall)}._154f8e60{align-self:center}@container banner (width < 235px){.cb9aeb0c,.f76860a9{flex-direction:column}.f76860a9{align-items:stretch}._22bc210c{align-items:center;flex-direction:row;justify-content:space-between}._22bc210c:has(.f7f9b63d:empty){justify-content:flex-end}._22bc210c ._97060900{display:flex}._154f8e60{align-self:flex-start}._154f8e60 ._97060900{display:none}}
|
package/styles/prose.css
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
.c7813d79{margin-top:var(--reactist-spacing-xsmall)}.d3449da6{margin-top:var(--reactist-spacing-small)}._4ea254c1{margin-top:var(--reactist-spacing-medium)}.c0844f64{margin-top:var(--reactist-spacing-large)}._213145b4{margin-top:var(--reactist-spacing-xlarge)}.df61c84c{margin-top:var(--reactist-spacing-xxlarge)}.efe72b13{margin-top:calc(var(--reactist-spacing-xsmall)*-1)}._870c2768{margin-top:calc(var(--reactist-spacing-small)*-1)}._0b927c57{margin-top:calc(var(--reactist-spacing-medium)*-1)}._461db014{margin-top:calc(var(--reactist-spacing-large)*-1)}._2a3a8cb8{margin-top:calc(var(--reactist-spacing-xlarge)*-1)}._9bcda921{margin-top:calc(var(--reactist-spacing-xxlarge)*-1)}@media (min-width:768px){._6add01e4{margin-top:var(--reactist-spacing-xsmall)}._735ef86b{margin-top:var(--reactist-spacing-small)}._0477d068{margin-top:var(--reactist-spacing-medium)}._2c90af97{margin-top:var(--reactist-spacing-large)}._63a82db6{margin-top:var(--reactist-spacing-xlarge)}._03cd7726{margin-top:var(--reactist-spacing-xxlarge)}.c986a62a{margin-top:calc(var(--reactist-spacing-xsmall)*-1)}.be2bdcdd{margin-top:calc(var(--reactist-spacing-small)*-1)}._47d2686b{margin-top:calc(var(--reactist-spacing-medium)*-1)}._25e5af9d{margin-top:calc(var(--reactist-spacing-large)*-1)}.ee82f441{margin-top:calc(var(--reactist-spacing-xlarge)*-1)}.a6f9d404{margin-top:calc(var(--reactist-spacing-xxlarge)*-1)}}@media (min-width:992px){._4d8d9a36{margin-top:var(--reactist-spacing-xsmall)}.e813cee7{margin-top:var(--reactist-spacing-small)}._56975b7d{margin-top:var(--reactist-spacing-medium)}._53b367f6{margin-top:var(--reactist-spacing-large)}.d69e7311{margin-top:var(--reactist-spacing-xlarge)}._92f57c7e{margin-top:var(--reactist-spacing-xxlarge)}._96880d3e{margin-top:calc(var(--reactist-spacing-xsmall)*-1)}.dc3f3555{margin-top:calc(var(--reactist-spacing-small)*-1)}._86dd06bb{margin-top:calc(var(--reactist-spacing-medium)*-1)}.c93ef12e{margin-top:calc(var(--reactist-spacing-large)*-1)}.bc8fd4a2{margin-top:calc(var(--reactist-spacing-xlarge)*-1)}.b12a9124{margin-top:calc(var(--reactist-spacing-xxlarge)*-1)}}._6016f4fb{margin-right:var(--reactist-spacing-xsmall)}.b85e3dfa{margin-right:var(--reactist-spacing-small)}._297575f4{margin-right:var(--reactist-spacing-medium)}.b401ac6c{margin-right:var(--reactist-spacing-large)}.dc3ec387{margin-right:var(--reactist-spacing-xlarge)}._24694604{margin-right:var(--reactist-spacing-xxlarge)}._8e9bf2ee{margin-right:calc(var(--reactist-spacing-xsmall)*-1)}.ae9d1115{margin-right:calc(var(--reactist-spacing-small)*-1)}._14e46fc3{margin-right:calc(var(--reactist-spacing-medium)*-1)}._3370631b{margin-right:calc(var(--reactist-spacing-large)*-1)}._3f0e9b50{margin-right:calc(var(--reactist-spacing-xlarge)*-1)}.bc13e010{margin-right:calc(var(--reactist-spacing-xxlarge)*-1)}@media (min-width:768px){._6fa1aae3{margin-right:var(--reactist-spacing-xsmall)}._2976c5cb{margin-right:var(--reactist-spacing-small)}._38d94802{margin-right:var(--reactist-spacing-medium)}.db9569b5{margin-right:var(--reactist-spacing-large)}._4a52f06d{margin-right:var(--reactist-spacing-xlarge)}._8a0f0410{margin-right:var(--reactist-spacing-xxlarge)}.e7d40e9d{margin-right:calc(var(--reactist-spacing-xsmall)*-1)}._680fde91{margin-right:calc(var(--reactist-spacing-small)*-1)}._021010ca{margin-right:calc(var(--reactist-spacing-medium)*-1)}._9e52c87c{margin-right:calc(var(--reactist-spacing-large)*-1)}._4d602613{margin-right:calc(var(--reactist-spacing-xlarge)*-1)}._21b1b65a{margin-right:calc(var(--reactist-spacing-xxlarge)*-1)}}@media (min-width:992px){._7321bc07{margin-right:var(--reactist-spacing-xsmall)}.fa1721f4{margin-right:var(--reactist-spacing-small)}._3fd7b4b8{margin-right:var(--reactist-spacing-medium)}._4fdc2f74{margin-right:var(--reactist-spacing-large)}.c0254761{margin-right:var(--reactist-spacing-xlarge)}._710a5f09{margin-right:var(--reactist-spacing-xxlarge)}.e08bee7f{margin-right:calc(var(--reactist-spacing-xsmall)*-1)}.e5ab73d2{margin-right:calc(var(--reactist-spacing-small)*-1)}._5e731477{margin-right:calc(var(--reactist-spacing-medium)*-1)}._0f57a22e{margin-right:calc(var(--reactist-spacing-large)*-1)}._25f26ed3{margin-right:calc(var(--reactist-spacing-xlarge)*-1)}._11a3b4e0{margin-right:calc(var(--reactist-spacing-xxlarge)*-1)}}._6a4f69f7{margin-bottom:var(--reactist-spacing-xsmall)}.db26b033{margin-bottom:var(--reactist-spacing-small)}.c7313022{margin-bottom:var(--reactist-spacing-medium)}.a5885889{margin-bottom:var(--reactist-spacing-large)}._33dfbd8e{margin-bottom:var(--reactist-spacing-xlarge)}._795ad2de{margin-bottom:var(--reactist-spacing-xxlarge)}.a329dbd3{margin-bottom:calc(var(--reactist-spacing-xsmall)*-1)}._85e739fb{margin-bottom:calc(var(--reactist-spacing-small)*-1)}._681f65ff{margin-bottom:calc(var(--reactist-spacing-medium)*-1)}.caf50d8f{margin-bottom:calc(var(--reactist-spacing-large)*-1)}._1e084cbf{margin-bottom:calc(var(--reactist-spacing-xlarge)*-1)}._3dfb1c7e{margin-bottom:calc(var(--reactist-spacing-xxlarge)*-1)}@media (min-width:768px){.ef4735be{margin-bottom:var(--reactist-spacing-xsmall)}.de55afba{margin-bottom:var(--reactist-spacing-small)}._0e33ce88{margin-bottom:var(--reactist-spacing-medium)}._8ca391fc{margin-bottom:var(--reactist-spacing-large)}._3a609d23{margin-bottom:var(--reactist-spacing-xlarge)}._3e1177e4{margin-bottom:var(--reactist-spacing-xxlarge)}.d384884d{margin-bottom:calc(var(--reactist-spacing-xsmall)*-1)}._75254cec{margin-bottom:calc(var(--reactist-spacing-small)*-1)}._5d9f127d{margin-bottom:calc(var(--reactist-spacing-medium)*-1)}._835f1089{margin-bottom:calc(var(--reactist-spacing-large)*-1)}.dad52a72{margin-bottom:calc(var(--reactist-spacing-xlarge)*-1)}._8703a4bf{margin-bottom:calc(var(--reactist-spacing-xxlarge)*-1)}}@media (min-width:992px){._90fd20e9{margin-bottom:var(--reactist-spacing-xsmall)}.f3769191{margin-bottom:var(--reactist-spacing-small)}._156410f8{margin-bottom:var(--reactist-spacing-medium)}._7fed74d0{margin-bottom:var(--reactist-spacing-large)}._477dc10e{margin-bottom:var(--reactist-spacing-xlarge)}._85c82d89{margin-bottom:var(--reactist-spacing-xxlarge)}._4f09c1e0{margin-bottom:calc(var(--reactist-spacing-xsmall)*-1)}._9523e048{margin-bottom:calc(var(--reactist-spacing-small)*-1)}.efe10240{margin-bottom:calc(var(--reactist-spacing-medium)*-1)}.c43971e6{margin-bottom:calc(var(--reactist-spacing-large)*-1)}.f9b4da15{margin-bottom:calc(var(--reactist-spacing-xlarge)*-1)}.a10fdf70{margin-bottom:calc(var(--reactist-spacing-xxlarge)*-1)}}.f9be90b4{margin-left:var(--reactist-spacing-xsmall)}.f53218d5{margin-left:var(--reactist-spacing-small)}.c4a9b3ab{margin-left:var(--reactist-spacing-medium)}._5755e2c3{margin-left:var(--reactist-spacing-large)}._33fc9354{margin-left:var(--reactist-spacing-xlarge)}._4749a3bf{margin-left:var(--reactist-spacing-xxlarge)}.c76cb3c7{margin-left:calc(var(--reactist-spacing-xsmall)*-1)}._96003c07{margin-left:calc(var(--reactist-spacing-small)*-1)}._09988d07{margin-left:calc(var(--reactist-spacing-medium)*-1)}.b4a486f6{margin-left:calc(var(--reactist-spacing-large)*-1)}.f396e75e{margin-left:calc(var(--reactist-spacing-xlarge)*-1)}._81d1f26d{margin-left:calc(var(--reactist-spacing-xxlarge)*-1)}@media (min-width:768px){._0a46e8f1{margin-left:var(--reactist-spacing-xsmall)}._57c970af{margin-left:var(--reactist-spacing-small)}._4b6099d3{margin-left:var(--reactist-spacing-medium)}._378fcff5{margin-left:var(--reactist-spacing-large)}.f8785663{margin-left:var(--reactist-spacing-xlarge)}._72f957ee{margin-left:var(--reactist-spacing-xxlarge)}._2288c7e1{margin-left:calc(var(--reactist-spacing-xsmall)*-1)}.b27c1c05{margin-left:calc(var(--reactist-spacing-small)*-1)}._702cbb13{margin-left:calc(var(--reactist-spacing-medium)*-1)}._1a2748b4{margin-left:calc(var(--reactist-spacing-large)*-1)}.b8c043a5{margin-left:calc(var(--reactist-spacing-xlarge)*-1)}._8dc8ff63{margin-left:calc(var(--reactist-spacing-xxlarge)*-1)}}@media (min-width:992px){.c2af646d{margin-left:var(--reactist-spacing-xsmall)}.c03d07be{margin-left:var(--reactist-spacing-small)}._915fb1d3{margin-left:var(--reactist-spacing-medium)}._64214ee1{margin-left:var(--reactist-spacing-large)}._7be4a22c{margin-left:var(--reactist-spacing-xlarge)}._5ec0a401{margin-left:var(--reactist-spacing-xxlarge)}.ea29f1ee{margin-left:calc(var(--reactist-spacing-xsmall)*-1)}.c26652c7{margin-left:calc(var(--reactist-spacing-small)*-1)}.c24f6af9{margin-left:calc(var(--reactist-spacing-medium)*-1)}.c2671f27{margin-left:calc(var(--reactist-spacing-large)*-1)}.cc51a04e{margin-left:calc(var(--reactist-spacing-xlarge)*-1)}.fd581f54{margin-left:calc(var(--reactist-spacing-xxlarge)*-1)}}
|
|
4
4
|
.c4803194{padding-top:var(--reactist-spacing-xsmall)}._4e9ab24b{padding-top:var(--reactist-spacing-small)}._1d226e27{padding-top:var(--reactist-spacing-medium)}.eb6097f1{padding-top:var(--reactist-spacing-large)}.d3229ba4{padding-top:var(--reactist-spacing-xlarge)}._47978ba4{padding-top:var(--reactist-spacing-xxlarge)}@media (min-width:768px){.f987719c{padding-top:var(--reactist-spacing-xsmall)}._8dbc4b4d{padding-top:var(--reactist-spacing-small)}.ae44fe07{padding-top:var(--reactist-spacing-medium)}.ffe9548d{padding-top:var(--reactist-spacing-large)}.f2b76a44{padding-top:var(--reactist-spacing-xlarge)}.c6eb8f43{padding-top:var(--reactist-spacing-xxlarge)}}@media (min-width:992px){._8699b560{padding-top:var(--reactist-spacing-xsmall)}._02c374b7{padding-top:var(--reactist-spacing-small)}._0dd0332f{padding-top:var(--reactist-spacing-medium)}.da55f1f6{padding-top:var(--reactist-spacing-large)}._8ef2a278{padding-top:var(--reactist-spacing-xlarge)}._8b493b28{padding-top:var(--reactist-spacing-xxlarge)}}._211eebc7{padding-right:var(--reactist-spacing-xsmall)}.ad0ccf15{padding-right:var(--reactist-spacing-small)}.a03e39af{padding-right:var(--reactist-spacing-medium)}.f0941ead{padding-right:var(--reactist-spacing-large)}.e47c5a43{padding-right:var(--reactist-spacing-xlarge)}.e849a5cf{padding-right:var(--reactist-spacing-xxlarge)}@media (min-width:768px){._85374228{padding-right:var(--reactist-spacing-xsmall)}._89df37b9{padding-right:var(--reactist-spacing-small)}._1cc50ebe{padding-right:var(--reactist-spacing-medium)}._1060982b{padding-right:var(--reactist-spacing-large)}.be58847d{padding-right:var(--reactist-spacing-xlarge)}._45093484{padding-right:var(--reactist-spacing-xxlarge)}}@media (min-width:992px){.f8d99d6a{padding-right:var(--reactist-spacing-xsmall)}.efa076d9{padding-right:var(--reactist-spacing-small)}.e59caa64{padding-right:var(--reactist-spacing-medium)}.da42f46a{padding-right:var(--reactist-spacing-large)}.b3ee2580{padding-right:var(--reactist-spacing-xlarge)}._3ef94658{padding-right:var(--reactist-spacing-xxlarge)}}.b0e6eab4{padding-bottom:var(--reactist-spacing-xsmall)}._9510d053{padding-bottom:var(--reactist-spacing-small)}.d7af60c9{padding-bottom:var(--reactist-spacing-medium)}.b75f86cd{padding-bottom:var(--reactist-spacing-large)}.fbd4ce29{padding-bottom:var(--reactist-spacing-xlarge)}._33e3ad63{padding-bottom:var(--reactist-spacing-xxlarge)}@media (min-width:768px){.f0302da7{padding-bottom:var(--reactist-spacing-xsmall)}._4f9b8012{padding-bottom:var(--reactist-spacing-small)}._4333e20e{padding-bottom:var(--reactist-spacing-medium)}._30bbc76c{padding-bottom:var(--reactist-spacing-large)}.ba5a4008{padding-bottom:var(--reactist-spacing-xlarge)}._423a3b1a{padding-bottom:var(--reactist-spacing-xxlarge)}}@media (min-width:992px){.b40139b7{padding-bottom:var(--reactist-spacing-xsmall)}.f96071fa{padding-bottom:var(--reactist-spacing-small)}.fe803c9a{padding-bottom:var(--reactist-spacing-medium)}._01686eb9{padding-bottom:var(--reactist-spacing-large)}.afa763d8{padding-bottom:var(--reactist-spacing-xlarge)}.a95785f1{padding-bottom:var(--reactist-spacing-xxlarge)}}.cad4e2ec{padding-left:var(--reactist-spacing-xsmall)}.d70b3c17{padding-left:var(--reactist-spacing-small)}._8c851bd6{padding-left:var(--reactist-spacing-medium)}._078feb3c{padding-left:var(--reactist-spacing-large)}._76ab968c{padding-left:var(--reactist-spacing-xlarge)}.aaca85d7{padding-left:var(--reactist-spacing-xxlarge)}@media (min-width:768px){._5eb0e5aa{padding-left:var(--reactist-spacing-xsmall)}._0384fb4f{padding-left:var(--reactist-spacing-small)}.edffff6f{padding-left:var(--reactist-spacing-medium)}._873b9a46{padding-left:var(--reactist-spacing-large)}._89105db5{padding-left:var(--reactist-spacing-xlarge)}.db1966fe{padding-left:var(--reactist-spacing-xxlarge)}}@media (min-width:992px){.b17f826b{padding-left:var(--reactist-spacing-xsmall)}._6dc83610{padding-left:var(--reactist-spacing-small)}._3421b8b2{padding-left:var(--reactist-spacing-medium)}._68cec7a6{padding-left:var(--reactist-spacing-large)}._94bde020{padding-left:var(--reactist-spacing-xlarge)}.b94ee579{padding-left:var(--reactist-spacing-xxlarge)}}
|
|
5
5
|
._68ab48ca{min-width:0}._6fa2b565{min-width:var(--reactist-width-xsmall)}.dd50fabd{min-width:var(--reactist-width-small)}.e7e2c808{min-width:var(--reactist-width-medium)}._6abbe25e{min-width:var(--reactist-width-large)}._54f479ac{min-width:var(--reactist-width-xlarge)}._148492bc{max-width:var(--reactist-width-xsmall)}.bd023b96{max-width:var(--reactist-width-small)}.e102903f{max-width:var(--reactist-width-medium)}._0e8d76d7{max-width:var(--reactist-width-large)}._47a031d0{max-width:var(--reactist-width-xlarge)}.cd4c8183{max-width:100%}._5f5959e8{width:0}._8c75067a{width:100%}._56a651f6{width:auto}._26f87bb8{width:-moz-max-content;width:max-content}._07a6ab44{width:-moz-min-content;width:min-content}.a87016fa{width:-moz-fit-content;width:fit-content}._1a972e50{width:var(--reactist-width-xsmall)}.c96d8261{width:var(--reactist-width-small)}.f3829d42{width:var(--reactist-width-medium)}._2caef228{width:var(--reactist-width-large)}._069e1491{width:var(--reactist-width-xlarge)}
|
|
6
|
-
:root{--reactist-prose-code-fill:#f7fafb;--reactist-prose-code-tint:var(--reactist-content-primary);--reactist-prose-code-border:var(--reactist-divider-primary);--reactist-prose-quote-tint:#4a6368;--reactist-prose-link-idle-tint:#006f85;--reactist-prose-link-idle-underline:var(--reactist-divider-primary);--reactist-prose-link-hover-tint:#006f85;--reactist-prose-link-hover-underline:#006f85;--reactist-prose-horizontal-rule-color:var(--reactist-divider-primary);--reactist-prose-content-font-size:15px;--reactist-prose-em-multiplier:1.5;--reactist-prose-space-1:calc(var(--reactist-prose-em-multiplier)*var(--reactist-prose-content-font-size)/3);--reactist-prose-space-2:calc(var(--reactist-prose-em-multiplier)*var(--reactist-prose-content-font-size)*2/3);--reactist-prose-space-3:calc(var(--reactist-prose-em-multiplier)*var(--reactist-prose-content-font-size)*1);--reactist-prose-space-4:calc(var(--reactist-prose-em-multiplier)*var(--reactist-prose-content-font-size)*4/3);--reactist-prose-space-6:calc(var(--reactist-prose-em-multiplier)*var(--reactist-prose-content-font-size)*5/3)}._37468e52{word-wrap:break-word;color:var(--reactist-content-primary);font-size:var(--reactist-prose-content-font-size);line-height:1.65;overflow-wrap:break-word;word-break:break-word}._37468e52,._37468e52 *,._37468e52 :after,._37468e52 :before{box-sizing:border-box}._37468e52 p{margin-top:var(--reactist-prose-space-2)}._37468e52 h1,._37468e52 h2,._37468e52 h3,._37468e52 h4,._37468e52 h5,._37468e52 h6{font-weight:600;margin:0}._37468e52 h1{font-size:1.35em;line-height:1.35;margin-top:var(--reactist-prose-space-4)}._37468e52 h2{font-size:1.2em;line-height:1.45;margin-top:var(--reactist-prose-space-3)}._37468e52 h1 *,._37468e52 h2 *{font-size:1em}._37468e52 h3,._37468e52 h4,._37468e52 h5,._37468e52 h6{font-size:inherit;line-height:inherit;margin-top:var(--reactist-prose-space-2)}._37468e52 ol,._37468e52 ul{margin:var(--reactist-prose-space-1) 0 0;padding-left:var(--reactist-prose-space-4)}._37468e52 ol li p,._37468e52 ul li p{margin-block:var(--reactist-prose-space-1)}._37468e52 ol li p:first-child,._37468e52 ul li p:first-child{margin:0}._37468e52 ul{list-style:disc}._37468e52 ul ul{list-style:circle}._37468e52 ul ul ul{list-style:square}._37468e52 ol{list-style:decimal}._37468e52 li+li,._37468e52 ol ol,._37468e52 ol ul,._37468e52 ul ol,._37468e52 ul ul{margin-top:calc(var(--reactist-prose-space-1)*.5)}._37468e52 ol li{padding-left:4px}._37468e52 ul li::marker{font-size:.9em}._37468e52 hr{border:none;border-top:1px solid var(--reactist-prose-horizontal-rule-color);margin-block:var(--reactist-prose-space-2)}._37468e52 blockquote{color:var(--reactist-prose-quote-tint);margin:0;margin-block:var(--reactist-prose-space-2);padding:0;padding-block:0;padding-inline:var(--reactist-spacing-large);position:relative}._37468e52 blockquote:before{border-left:2px solid var(--reactist-divider-primary);bottom:.25em;content:"";left:0;position:absolute;top:.25em}._37468e52 blockquote :first-child{margin-top:0}._37468e52 blockquote code{color:inherit}._37468e52 :not(pre)>code,._37468e52 pre{background-color:var(--reactist-prose-code-fill);border:1px solid var(--reactist-prose-code-border);border-radius:var(--reactist-border-radius-small);color:var(--reactist-prose-code-tint);font-family:var(--reactist-font-family-monospace);font-size:.875em;line-height:1.6}._37468e52 :not(pre)>code{padding:2px 4px}._37468e52 pre{margin:var(--reactist-prose-space-2) 0 0;padding:var(--reactist-prose-space-1) var(--reactist-prose-space-2)}._37468e52 pre code{overflow:auto;white-space:break-spaces}._37468e52 h1+*{margin-top:var(--reactist-prose-space-1)!important}._37468e52 h1+h2,._37468e52 h2+h3,._37468e52 h3+h4,._37468e52 h4+h5,._37468e52 h5+h6{margin-top:var(--reactist-prose-space-3)!important}._37468e52 h2+:not(h3){margin-top:var(--reactist-prose-space-1)!important}._37468e52 em{font-style:italic}._37468e52 b,._37468e52 strong{font-weight:600}._37468e52 a,._37468e52 a code{color:var(--reactist-prose-link-idle-tint)
|
|
6
|
+
:root{--reactist-prose-code-fill:#f7fafb;--reactist-prose-code-tint:var(--reactist-content-primary);--reactist-prose-code-border:var(--reactist-divider-primary);--reactist-prose-quote-tint:#4a6368;--reactist-prose-link-idle-tint:#006f85;--reactist-prose-link-idle-underline:var(--reactist-divider-primary);--reactist-prose-link-hover-tint:#006f85;--reactist-prose-link-hover-underline:#006f85;--reactist-prose-horizontal-rule-color:var(--reactist-divider-primary);--reactist-prose-content-font-size:15px;--reactist-prose-em-multiplier:1.5;--reactist-prose-space-1:calc(var(--reactist-prose-em-multiplier)*var(--reactist-prose-content-font-size)/3);--reactist-prose-space-2:calc(var(--reactist-prose-em-multiplier)*var(--reactist-prose-content-font-size)*2/3);--reactist-prose-space-3:calc(var(--reactist-prose-em-multiplier)*var(--reactist-prose-content-font-size)*1);--reactist-prose-space-4:calc(var(--reactist-prose-em-multiplier)*var(--reactist-prose-content-font-size)*4/3);--reactist-prose-space-6:calc(var(--reactist-prose-em-multiplier)*var(--reactist-prose-content-font-size)*5/3)}._37468e52{word-wrap:break-word;color:var(--reactist-content-primary);font-size:var(--reactist-prose-content-font-size);line-height:1.65;overflow-wrap:break-word;word-break:break-word}._37468e52,._37468e52 *,._37468e52 :after,._37468e52 :before{box-sizing:border-box}._37468e52 p{margin-top:var(--reactist-prose-space-2)}._37468e52 h1,._37468e52 h2,._37468e52 h3,._37468e52 h4,._37468e52 h5,._37468e52 h6{font-weight:600;margin:0}._37468e52 h1{font-size:1.35em;line-height:1.35;margin-top:var(--reactist-prose-space-4)}._37468e52 h2{font-size:1.2em;line-height:1.45;margin-top:var(--reactist-prose-space-3)}._37468e52 h1 *,._37468e52 h2 *{font-size:1em}._37468e52 h3,._37468e52 h4,._37468e52 h5,._37468e52 h6{font-size:inherit;line-height:inherit;margin-top:var(--reactist-prose-space-2)}._37468e52 ol,._37468e52 ul{margin:var(--reactist-prose-space-1) 0 0;padding-left:var(--reactist-prose-space-4)}._37468e52 ol li p,._37468e52 ul li p{margin-block:var(--reactist-prose-space-1)}._37468e52 ol li p:first-child,._37468e52 ul li p:first-child{margin:0}._37468e52 ul{list-style:disc}._37468e52 ul ul{list-style:circle}._37468e52 ul ul ul{list-style:square}._37468e52 ol{list-style:decimal}._37468e52 li+li,._37468e52 ol ol,._37468e52 ol ul,._37468e52 ul ol,._37468e52 ul ul{margin-top:calc(var(--reactist-prose-space-1)*.5)}._37468e52 ol li{padding-left:4px}._37468e52 ul li::marker{font-size:.9em}._37468e52 hr{border:none;border-top:1px solid var(--reactist-prose-horizontal-rule-color);margin-block:var(--reactist-prose-space-2)}._37468e52 blockquote{color:var(--reactist-prose-quote-tint);margin:0;margin-block:var(--reactist-prose-space-2);padding:0;padding-block:0;padding-inline:var(--reactist-spacing-large);position:relative}._37468e52 blockquote:before{border-left:2px solid var(--reactist-divider-primary);bottom:.25em;content:"";left:0;position:absolute;top:.25em}._37468e52 blockquote :first-child{margin-top:0}._37468e52 blockquote code{color:inherit}._37468e52 :not(pre)>code,._37468e52 pre{background-color:var(--reactist-prose-code-fill);border:1px solid var(--reactist-prose-code-border);border-radius:var(--reactist-border-radius-small);color:var(--reactist-prose-code-tint);font-family:var(--reactist-font-family-monospace);font-size:.875em;line-height:1.6}._37468e52 :not(pre)>code{padding:2px 4px}._37468e52 pre{margin:var(--reactist-prose-space-2) 0 0;padding:var(--reactist-prose-space-1) var(--reactist-prose-space-2)}._37468e52 pre code{overflow:auto;white-space:break-spaces}._37468e52 h1+*{margin-top:var(--reactist-prose-space-1)!important}._37468e52 h1+h2,._37468e52 h2+h3,._37468e52 h3+h4,._37468e52 h4+h5,._37468e52 h5+h6{margin-top:var(--reactist-prose-space-3)!important}._37468e52 h2+:not(h3){margin-top:var(--reactist-prose-space-1)!important}._37468e52 em{font-style:italic}._37468e52 b,._37468e52 strong{font-weight:600}._37468e52 a,._37468e52 a code{color:var(--reactist-prose-link-idle-tint);text-decoration-color:var(--reactist-prose-link-idle-underline);text-decoration-line:underline;text-decoration-style:solid}._37468e52 a:active,._37468e52 a:active code,._37468e52 a:focus,._37468e52 a:focus code,._37468e52 a:hover,._37468e52 a:hover code{color:var(--reactist-prose-link-hover-tint);text-decoration-color:var(--reactist-prose-link-hover-underline)}._37468e52._6abbd828{letter-spacing:.0065em}._37468e52._6abbd828 h1,._37468e52._6abbd828 h2{letter-spacing:.0125em}._37468e52._6abbd828 b,._37468e52._6abbd828 b *,._37468e52._6abbd828 strong,._37468e52._6abbd828 strong *{letter-spacing:.01em}
|