@react-spectrum/s2 0.9.0 → 0.9.2
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/dist/Accordion.cjs +2 -2
- package/dist/Accordion.css +2 -2
- package/dist/Accordion.mjs +2 -2
- package/dist/ActionBar.cjs +60 -60
- package/dist/ActionBar.css +59 -59
- package/dist/ActionBar.mjs +60 -60
- package/dist/ActionButton.cjs +187 -187
- package/dist/ActionButton.cjs.map +1 -1
- package/dist/ActionButton.css +134 -134
- package/dist/ActionButton.css.map +1 -1
- package/dist/ActionButton.mjs +187 -187
- package/dist/ActionButton.mjs.map +1 -1
- package/dist/ActionButtonGroup.cjs +15 -15
- package/dist/ActionButtonGroup.css +9 -9
- package/dist/ActionButtonGroup.mjs +15 -15
- package/dist/Add.cjs +10 -10
- package/dist/Add.css +6 -6
- package/dist/Add.mjs +10 -10
- package/dist/AlertDialog.cjs +3 -3
- package/dist/AlertDialog.css +3 -3
- package/dist/AlertDialog.mjs +3 -3
- package/dist/Asterisk.cjs +6 -6
- package/dist/Asterisk.css +4 -4
- package/dist/Asterisk.mjs +6 -6
- package/dist/Avatar.cjs +14 -14
- package/dist/Avatar.css +14 -14
- package/dist/Avatar.mjs +14 -14
- package/dist/AvatarGroup.cjs +120 -120
- package/dist/AvatarGroup.css +37 -37
- package/dist/AvatarGroup.mjs +120 -120
- package/dist/Badge.cjs +196 -196
- package/dist/Badge.css +129 -129
- package/dist/Badge.mjs +196 -196
- package/dist/Breadcrumbs.cjs +231 -231
- package/dist/Breadcrumbs.css +102 -102
- package/dist/Breadcrumbs.mjs +231 -231
- package/dist/Button.cjs +328 -328
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css +176 -176
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs +328 -328
- package/dist/Button.mjs.map +1 -1
- package/dist/ButtonGroup.cjs +20 -20
- package/dist/ButtonGroup.css +15 -15
- package/dist/ButtonGroup.mjs +20 -20
- package/dist/Card.cjs +294 -294
- package/dist/Card.css +205 -205
- package/dist/Card.mjs +294 -294
- package/dist/CardView.cjs +17 -17
- package/dist/CardView.css +17 -17
- package/dist/CardView.mjs +17 -17
- package/dist/CenterBaseline.cjs +1 -1
- package/dist/CenterBaseline.css +2 -2
- package/dist/CenterBaseline.mjs +1 -1
- package/dist/Checkbox.cjs +160 -160
- package/dist/Checkbox.css +94 -94
- package/dist/Checkbox.mjs +160 -160
- package/dist/CheckboxGroup.cjs +43 -43
- package/dist/CheckboxGroup.css +41 -41
- package/dist/CheckboxGroup.mjs +43 -43
- package/dist/Checkmark.cjs +12 -12
- package/dist/Checkmark.css +8 -8
- package/dist/Checkmark.mjs +12 -12
- package/dist/Chevron.cjs +12 -12
- package/dist/Chevron.css +10 -10
- package/dist/Chevron.mjs +12 -12
- package/dist/ClearButton.cjs +29 -29
- package/dist/ClearButton.css +29 -29
- package/dist/ClearButton.mjs +29 -29
- package/dist/CloseButton.cjs +54 -54
- package/dist/CloseButton.css +46 -46
- package/dist/CloseButton.mjs +54 -54
- package/dist/ColorArea.cjs +16 -16
- package/dist/ColorArea.css +16 -16
- package/dist/ColorArea.mjs +16 -16
- package/dist/ColorField.cjs +31 -31
- package/dist/ColorField.css +31 -31
- package/dist/ColorField.mjs +31 -31
- package/dist/ColorHandle.cjs +27 -27
- package/dist/ColorHandle.css +42 -42
- package/dist/ColorHandle.mjs +27 -27
- package/dist/ColorSlider.cjs +108 -108
- package/dist/ColorSlider.css +56 -56
- package/dist/ColorSlider.mjs +108 -108
- package/dist/ColorSwatch.cjs +29 -29
- package/dist/ColorSwatch.css +29 -29
- package/dist/ColorSwatch.mjs +29 -29
- package/dist/ColorSwatchPicker.cjs +27 -27
- package/dist/ColorSwatchPicker.css +46 -46
- package/dist/ColorSwatchPicker.mjs +27 -27
- package/dist/ColorWheel.cjs +26 -26
- package/dist/ColorWheel.css +17 -17
- package/dist/ColorWheel.mjs +26 -26
- package/dist/ComboBox.cjs +378 -376
- package/dist/ComboBox.cjs.map +1 -1
- package/dist/ComboBox.css +179 -179
- package/dist/ComboBox.css.map +1 -1
- package/dist/ComboBox.mjs +378 -376
- package/dist/ComboBox.mjs.map +1 -1
- package/dist/ContextualHelp.cjs +5 -5
- package/dist/ContextualHelp.cjs.map +1 -1
- package/dist/ContextualHelp.css +49 -49
- package/dist/ContextualHelp.css.map +1 -1
- package/dist/ContextualHelp.mjs +5 -5
- package/dist/ContextualHelp.mjs.map +1 -1
- package/dist/Cross.cjs +14 -14
- package/dist/Cross.css +10 -10
- package/dist/Cross.mjs +14 -14
- package/dist/CustomDialog.cjs +25 -25
- package/dist/CustomDialog.css +25 -25
- package/dist/CustomDialog.mjs +25 -25
- package/dist/Dash.cjs +10 -10
- package/dist/Dash.css +6 -6
- package/dist/Dash.mjs +10 -10
- package/dist/Dialog.cjs +17 -17
- package/dist/Dialog.css +70 -70
- package/dist/Dialog.mjs +17 -17
- package/dist/Disclosure.cjs +129 -129
- package/dist/Disclosure.css +104 -104
- package/dist/Disclosure.mjs +129 -129
- package/dist/Divider.cjs +25 -25
- package/dist/Divider.css +25 -25
- package/dist/Divider.mjs +25 -25
- package/dist/DropZone.cjs +58 -58
- package/dist/DropZone.css +54 -54
- package/dist/DropZone.mjs +58 -58
- package/dist/Field.cjs +340 -340
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css +144 -144
- package/dist/Field.mjs +340 -340
- package/dist/Field.mjs.map +1 -1
- package/dist/Form.cjs +9 -9
- package/dist/Form.css +9 -9
- package/dist/Form.mjs +9 -9
- package/dist/FullscreenDialog.cjs +5 -5
- package/dist/FullscreenDialog.css +79 -79
- package/dist/FullscreenDialog.mjs +5 -5
- package/dist/IllustratedMessage.cjs +219 -219
- package/dist/IllustratedMessage.css +74 -74
- package/dist/IllustratedMessage.mjs +219 -219
- package/dist/Image.cjs +14 -14
- package/dist/Image.cjs.map +1 -1
- package/dist/Image.css +14 -14
- package/dist/Image.css.map +1 -1
- package/dist/Image.mjs +14 -14
- package/dist/Image.mjs.map +1 -1
- package/dist/InlineAlert.cjs +108 -108
- package/dist/InlineAlert.css +90 -90
- package/dist/InlineAlert.mjs +108 -108
- package/dist/Link.cjs +49 -49
- package/dist/Link.css +41 -41
- package/dist/Link.mjs +49 -49
- package/dist/LinkOut.cjs +8 -8
- package/dist/LinkOut.css +8 -8
- package/dist/LinkOut.mjs +8 -8
- package/dist/Menu.cjs +422 -422
- package/dist/Menu.css +180 -180
- package/dist/Menu.mjs +422 -422
- package/dist/Meter.cjs +153 -153
- package/dist/Meter.css +95 -95
- package/dist/Meter.mjs +153 -153
- package/dist/Modal.cjs +58 -58
- package/dist/Modal.css +50 -50
- package/dist/Modal.mjs +58 -58
- package/dist/NotificationBadge.cjs +56 -56
- package/dist/NotificationBadge.css +51 -51
- package/dist/NotificationBadge.mjs +56 -56
- package/dist/NumberField.cjs +114 -118
- package/dist/NumberField.cjs.map +1 -1
- package/dist/NumberField.css +103 -103
- package/dist/NumberField.css.map +1 -1
- package/dist/NumberField.mjs +115 -119
- package/dist/NumberField.mjs.map +1 -1
- package/dist/Picker.cjs +273 -271
- package/dist/Picker.cjs.map +1 -1
- package/dist/Picker.css +169 -169
- package/dist/Picker.css.map +1 -1
- package/dist/Picker.mjs +273 -271
- package/dist/Picker.mjs.map +1 -1
- package/dist/Popover.cjs +85 -85
- package/dist/Popover.css +66 -66
- package/dist/Popover.mjs +85 -85
- package/dist/ProgressBar.cjs +163 -163
- package/dist/ProgressBar.css +103 -103
- package/dist/ProgressBar.mjs +163 -163
- package/dist/ProgressCircle.cjs +17 -17
- package/dist/ProgressCircle.css +17 -17
- package/dist/ProgressCircle.mjs +17 -17
- package/dist/Provider.cjs +10 -10
- package/dist/Provider.css +9 -9
- package/dist/Provider.mjs +10 -10
- package/dist/Radio.cjs +144 -144
- package/dist/Radio.css +81 -81
- package/dist/Radio.mjs +144 -144
- package/dist/RadioGroup.cjs +41 -41
- package/dist/RadioGroup.css +41 -41
- package/dist/RadioGroup.mjs +41 -41
- package/dist/SearchField.cjs +41 -41
- package/dist/SearchField.css +49 -49
- package/dist/SearchField.mjs +41 -41
- package/dist/SegmentedControl.cjs +171 -171
- package/dist/SegmentedControl.css +120 -120
- package/dist/SegmentedControl.mjs +171 -171
- package/dist/Slider.cjs +288 -288
- package/dist/Slider.css +152 -152
- package/dist/Slider.mjs +288 -288
- package/dist/StatusLight.cjs +115 -115
- package/dist/StatusLight.css +63 -63
- package/dist/StatusLight.mjs +115 -115
- package/dist/Switch.cjs +152 -152
- package/dist/Switch.css +76 -76
- package/dist/Switch.mjs +152 -152
- package/dist/TableView.cjs +310 -310
- package/dist/TableView.css +172 -172
- package/dist/TableView.mjs +310 -310
- package/dist/Tabs.cjs +113 -110
- package/dist/Tabs.cjs.map +1 -1
- package/dist/Tabs.css +92 -92
- package/dist/Tabs.css.map +1 -1
- package/dist/Tabs.mjs +113 -110
- package/dist/Tabs.mjs.map +1 -1
- package/dist/TabsPicker.cjs +123 -123
- package/dist/TabsPicker.css +112 -112
- package/dist/TabsPicker.mjs +123 -123
- package/dist/TagGroup.cjs +202 -202
- package/dist/TagGroup.cjs.map +1 -1
- package/dist/TagGroup.css +147 -147
- package/dist/TagGroup.css.map +1 -1
- package/dist/TagGroup.mjs +202 -202
- package/dist/TagGroup.mjs.map +1 -1
- package/dist/TextField.cjs +57 -57
- package/dist/TextField.css +57 -57
- package/dist/TextField.mjs +57 -57
- package/dist/Toast.cjs +118 -118
- package/dist/Toast.css +105 -105
- package/dist/Toast.mjs +118 -118
- package/dist/ToggleButton.cjs +3 -3
- package/dist/ToggleButton.css +12 -12
- package/dist/ToggleButton.mjs +3 -3
- package/dist/Tooltip.cjs +81 -81
- package/dist/Tooltip.css +68 -68
- package/dist/Tooltip.mjs +81 -81
- package/dist/TreeView.cjs +143 -149
- package/dist/TreeView.cjs.map +1 -1
- package/dist/TreeView.css +143 -143
- package/dist/TreeView.css.map +1 -1
- package/dist/TreeView.mjs +143 -149
- package/dist/TreeView.mjs.map +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/icons/Icon.cjs +10 -10
- package/icons/Icon.css +9 -9
- package/icons/Icon.mjs +10 -10
- package/icons/Skeleton.cjs +4 -3
- package/icons/Skeleton.cjs.map +1 -1
- package/icons/Skeleton.css +6 -6
- package/icons/Skeleton.css.map +1 -1
- package/icons/Skeleton.mjs +4 -3
- package/icons/Skeleton.mjs.map +1 -1
- package/package.json +45 -26
- package/src/ActionButton.tsx +1 -1
- package/src/Button.tsx +3 -3
- package/src/ComboBox.tsx +3 -2
- package/src/ContextualHelp.tsx +2 -2
- package/src/Image.tsx +1 -1
- package/src/NumberField.tsx +0 -2
- package/src/Picker.tsx +3 -2
- package/src/Skeleton.tsx +2 -1
- package/src/Tabs.tsx +7 -5
- package/src/TagGroup.tsx +1 -1
- package/src/TreeView.tsx +1 -6
- package/style/__tests__/style-macro.test.js +56 -56
package/dist/Image.css
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
@layer _.a {
|
|
2
|
-
.
|
|
2
|
+
.gH91 {
|
|
3
3
|
background-color: var(--lightningcss-light, #e9e9e9) var(--lightningcss-dark, #2c2c2c);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
._Nc91 {
|
|
7
7
|
overflow-x: hidden;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.Pc91 {
|
|
11
11
|
overflow-y: hidden;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
.sb91 {
|
|
15
15
|
display: block;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.Za91 {
|
|
19
19
|
width: 100%;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
22
|
+
.Fb91 {
|
|
23
23
|
height: 100%;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
._H40ub4c91 {
|
|
27
27
|
object-fit: inherit;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.
|
|
30
|
+
.__D40ub4c91 {
|
|
31
31
|
object-position: inherit;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
._Ia91 {
|
|
35
35
|
opacity: 0;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.
|
|
38
|
+
._Ib91 {
|
|
39
39
|
opacity: 1;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
.Ye91 {
|
|
43
43
|
transition-property: none;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.
|
|
46
|
+
.Yf91 {
|
|
47
47
|
transition-property: opacity;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.
|
|
50
|
+
.Xe91 {
|
|
51
51
|
transition-duration: .5s;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.
|
|
54
|
+
._2b91 {
|
|
55
55
|
transition-timing-function: cubic-bezier(.45, 0, .4, 1);
|
|
56
56
|
}
|
|
57
57
|
}
|
package/dist/Image.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"ACiHsB;EAAA;;;;EAAA;;;;EAAA;;;;EAKJ;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA","sources":["a1371b57e9afeb00","packages/@react-spectrum/s2/src/Image.tsx"],"sourcesContent":["@import \"be7e52eb05f9e81c\";\n@import \"b32b10d1bd9c4a50\";\n","import {ContextValue, SlotProps} from 'react-aria-components';\nimport {createContext, ForwardedRef, forwardRef, HTMLAttributeReferrerPolicy, ReactNode, useCallback, useContext, useMemo, useReducer, useRef, version} from 'react';\nimport {DefaultImageGroup, ImageGroup} from './ImageCoordinator';\nimport {loadingStyle, useIsSkeleton, useLoadingAnimation} from './Skeleton';\nimport {mergeStyles} from '../style/runtime';\nimport {style} from '../style' with {type: 'macro'};\nimport {StyleString} from '../style/types';\nimport {UnsafeStyles} from './style-utils';\nimport {useLayoutEffect} from '@react-aria/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ImageProps extends UnsafeStyles, SlotProps {\n /** The URL of the image. */\n src?: string,\n // TODO\n // srcSet?: string,\n // sizes?: string,\n /** Accessible alt text for the image. */\n alt?: string,\n /**\n * Indicates if the fetching of the image must be done using a CORS request.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin).\n */\n crossOrigin?: 'anonymous' | 'use-credentials',\n /**\n * Whether the browser should decode images synchronously or asynchronously.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#decoding).\n */\n decoding?: 'async' | 'auto' | 'sync',\n /**\n * Provides a hint of the relative priority to use when fetching the image.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#fetchpriority).\n */\n fetchPriority?: 'high' | 'low' | 'auto',\n /**\n * Whether the image should be loaded immediately or lazily when scrolled into view.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#loading).\n */\n loading?: 'eager' | 'lazy',\n /**\n * A string indicating which referrer to use when fetching the resource.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#referrerpolicy).\n */\n referrerPolicy?: HTMLAttributeReferrerPolicy,\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StyleString,\n /** A function that is called to render a fallback when the image fails to load. */\n renderError?: () => ReactNode,\n /**\n * A group of images to coordinate between, matching the group passed to the `<ImageCoordinator>` component.\n * If not provided, the default image group is used.\n */\n group?: ImageGroup\n}\n\ninterface ImageContextValue extends ImageProps {\n hidden?: boolean\n}\n\nexport const ImageContext = createContext<ContextValue<Partial<ImageContextValue>, HTMLDivElement>>(null);\n\ntype ImageState = 'loading' | 'loaded' | 'revealed' | 'error';\ninterface State {\n state: ImageState,\n src: string,\n startTime: number,\n loadTime: number\n}\n\ntype Action = \n | {type: 'update', src: string}\n | {type: 'loaded'}\n | {type: 'revealed'}\n | {type: 'error'};\n\nfunction createState(src: string): State {\n return {\n state: 'loading',\n src,\n startTime: Date.now(),\n loadTime: 0\n };\n}\n\nfunction reducer(state: State, action: Action): State {\n switch (action.type) {\n case 'update': {\n return {\n state: 'loading',\n src: action.src,\n startTime: Date.now(),\n loadTime: 0\n };\n }\n case 'loaded':\n case 'error': {\n return {\n ...state,\n state: action.type\n };\n }\n case 'revealed': {\n return {\n ...state,\n state: 'revealed',\n loadTime: Date.now() - state.startTime\n };\n }\n default:\n return state;\n }\n}\n\nconst wrapperStyles = style({\n backgroundColor: 'gray-100',\n overflow: 'hidden'\n});\n\nconst imgStyles = style({\n display: 'block',\n width: 'full',\n height: 'full',\n objectFit: 'inherit',\n objectPosition: 'inherit',\n opacity: {\n default: 0,\n isRevealed: 1\n },\n transition: {\n default: 'none',\n isTransitioning: 'opacity'\n },\n transitionDuration: 500\n});\n\nexport const Image = forwardRef(function Image(props: ImageProps, domRef: ForwardedRef<HTMLDivElement>) {\n [props, domRef] = useSpectrumContextProps(props, domRef, ImageContext);\n\n let {\n src = '',\n styles,\n UNSAFE_className = '',\n UNSAFE_style,\n renderError,\n group = DefaultImageGroup,\n // TODO\n // srcSet,\n // sizes,\n alt,\n crossOrigin,\n decoding,\n fetchPriority,\n loading,\n referrerPolicy,\n slot\n } = props;\n let hidden = (props as ImageContextValue).hidden;\n \n let {revealAll, register, unregister, load} = useContext(group);\n let [{state, src: lastSrc, loadTime}, dispatch] = useReducer(reducer, src, createState);\n\n if (src !== lastSrc && !hidden) {\n dispatch({type: 'update', src});\n }\n\n if (state === 'loaded' && revealAll && !hidden) {\n dispatch({type: 'revealed'});\n }\n\n let imgRef = useRef<HTMLImageElement | null>(null);\n useLayoutEffect(() => {\n if (hidden) {\n return;\n }\n\n register(src);\n return () => {\n unregister(src);\n };\n }, [hidden, register, unregister, src]);\n\n let onLoad = useCallback(() => {\n load(src);\n dispatch({type: 'loaded'});\n }, [load, src]);\n\n let onError = useCallback(() => {\n dispatch({type: 'error'});\n unregister(src);\n }, [unregister, src]);\n\n let isSkeleton = useIsSkeleton();\n let isAnimating = isSkeleton || state === 'loading' || state === 'loaded';\n let animation = useLoadingAnimation(isAnimating);\n useLayoutEffect(() => {\n if (hidden) {\n return;\n }\n\n // If the image is already loaded, update state immediately instead of waiting for onLoad.\n if (state === 'loading' && imgRef.current?.complete) {\n // Queue a microtask so we don't hit React's update limit.\n // TODO: is this necessary?\n queueMicrotask(onLoad);\n }\n\n animation(domRef.current);\n });\n\n if (props.alt == null && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'The `alt` prop was not provided to an image. ' +\n 'Add `alt` text for screen readers, or set `alt=\"\"` prop to indicate that the image ' +\n 'is decorative or redundant with displayed text and should not be announced by screen readers.'\n );\n }\n\n let errorState = !isSkeleton && state === 'error' && renderError?.();\n let isRevealed = state === 'revealed' && !isSkeleton;\n let isTransitioning = isRevealed && loadTime > 200;\n return useMemo(() => hidden ? null : (\n <div\n ref={domRef}\n slot={slot || undefined}\n style={UNSAFE_style}\n className={UNSAFE_className + mergeStyles(wrapperStyles, styles) + ' ' + (isAnimating ? loadingStyle : '')}>\n {errorState}\n {!errorState && (\n <img\n {...getFetchPriorityProp(fetchPriority)}\n src={src}\n alt={alt}\n crossOrigin={crossOrigin}\n decoding={decoding}\n loading={loading}\n referrerPolicy={referrerPolicy}\n ref={imgRef}\n onLoad={onLoad}\n onError={onError}\n className={imgStyles({isRevealed, isTransitioning})} />\n )}\n </div>\n ), [slot, hidden, domRef, UNSAFE_style, UNSAFE_className, styles, isAnimating, errorState, src, alt, crossOrigin, decoding, fetchPriority, loading, referrerPolicy, onLoad, onError, isRevealed, isTransitioning]);\n});\n\nfunction getFetchPriorityProp(fetchPriority?: 'high' | 'low' | 'auto'): Record<string, string | undefined> {\n const pieces = version.split('.');\n const major = parseInt(pieces[0], 10);\n if (major >= 19) {\n return {fetchPriority};\n }\n return {fetchpriority: fetchPriority};\n}\n"],"names":[],"version":3,"file":"Image.css.map"}
|
|
1
|
+
{"mappings":"ACiHsB;EAAA;;;;EAAA;;;;EAAA;;;;EAKJ;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA","sources":["a1371b57e9afeb00","packages/@react-spectrum/s2/src/Image.tsx"],"sourcesContent":["@import \"be7e52eb05f9e81c\";\n@import \"b32b10d1bd9c4a50\";\n","import {ContextValue, SlotProps} from 'react-aria-components';\nimport {createContext, ForwardedRef, forwardRef, HTMLAttributeReferrerPolicy, ReactNode, useCallback, useContext, useMemo, useReducer, useRef, version} from 'react';\nimport {DefaultImageGroup, ImageGroup} from './ImageCoordinator';\nimport {loadingStyle, useIsSkeleton, useLoadingAnimation} from './Skeleton';\nimport {mergeStyles} from '../style/runtime';\nimport {style} from '../style' with {type: 'macro'};\nimport {StyleString} from '../style/types';\nimport {UnsafeStyles} from './style-utils';\nimport {useLayoutEffect} from '@react-aria/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ImageProps extends UnsafeStyles, SlotProps {\n /** The URL of the image. */\n src?: string,\n // TODO\n // srcSet?: string,\n // sizes?: string,\n /** Accessible alt text for the image. */\n alt?: string,\n /**\n * Indicates if the fetching of the image must be done using a CORS request.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin).\n */\n crossOrigin?: 'anonymous' | 'use-credentials',\n /**\n * Whether the browser should decode images synchronously or asynchronously.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#decoding).\n */\n decoding?: 'async' | 'auto' | 'sync',\n /**\n * Provides a hint of the relative priority to use when fetching the image.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#fetchpriority).\n */\n fetchPriority?: 'high' | 'low' | 'auto',\n /**\n * Whether the image should be loaded immediately or lazily when scrolled into view.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#loading).\n */\n loading?: 'eager' | 'lazy',\n /**\n * A string indicating which referrer to use when fetching the resource.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#referrerpolicy).\n */\n referrerPolicy?: HTMLAttributeReferrerPolicy,\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StyleString,\n /** A function that is called to render a fallback when the image fails to load. */\n renderError?: () => ReactNode,\n /**\n * A group of images to coordinate between, matching the group passed to the `<ImageCoordinator>` component.\n * If not provided, the default image group is used.\n */\n group?: ImageGroup\n}\n\ninterface ImageContextValue extends ImageProps {\n hidden?: boolean\n}\n\nexport const ImageContext = createContext<ContextValue<Partial<ImageContextValue>, HTMLDivElement>>(null);\n\ntype ImageState = 'loading' | 'loaded' | 'revealed' | 'error';\ninterface State {\n state: ImageState,\n src: string,\n startTime: number,\n loadTime: number\n}\n\ntype Action = \n | {type: 'update', src: string}\n | {type: 'loaded'}\n | {type: 'revealed'}\n | {type: 'error'};\n\nfunction createState(src: string): State {\n return {\n state: 'loading',\n src,\n startTime: Date.now(),\n loadTime: 0\n };\n}\n\nfunction reducer(state: State, action: Action): State {\n switch (action.type) {\n case 'update': {\n return {\n state: 'loading',\n src: action.src,\n startTime: Date.now(),\n loadTime: 0\n };\n }\n case 'loaded':\n case 'error': {\n return {\n ...state,\n state: action.type\n };\n }\n case 'revealed': {\n return {\n ...state,\n state: 'revealed',\n loadTime: Date.now() - state.startTime\n };\n }\n default:\n return state;\n }\n}\n\nconst wrapperStyles = style({\n backgroundColor: 'gray-100',\n overflow: 'hidden'\n});\n\nconst imgStyles = style({\n display: 'block',\n width: 'full',\n height: 'full',\n objectFit: 'inherit',\n objectPosition: 'inherit',\n opacity: {\n default: 0,\n isRevealed: 1\n },\n transition: {\n default: 'none',\n isTransitioning: 'opacity'\n },\n transitionDuration: 500\n});\n\nexport const Image = forwardRef(function Image(props: ImageProps, domRef: ForwardedRef<HTMLDivElement>) {\n [props, domRef] = useSpectrumContextProps(props, domRef, ImageContext);\n\n let {\n src = '',\n styles,\n UNSAFE_className = '',\n UNSAFE_style,\n renderError,\n group = DefaultImageGroup,\n // TODO\n // srcSet,\n // sizes,\n alt,\n crossOrigin,\n decoding,\n fetchPriority,\n loading,\n referrerPolicy,\n slot\n } = props;\n let hidden = (props as ImageContextValue).hidden;\n \n let {revealAll, register, unregister, load} = useContext(group);\n let [{state, src: lastSrc, loadTime}, dispatch] = useReducer(reducer, src, createState);\n\n if (src !== lastSrc && !hidden) {\n dispatch({type: 'update', src});\n }\n\n if (state === 'loaded' && revealAll && !hidden) {\n dispatch({type: 'revealed'});\n }\n\n let imgRef = useRef<HTMLImageElement | null>(null);\n useLayoutEffect(() => {\n if (hidden) {\n return;\n }\n\n register(src);\n return () => {\n unregister(src);\n };\n }, [hidden, register, unregister, src]);\n\n let onLoad = useCallback(() => {\n load(src);\n dispatch({type: 'loaded'});\n }, [load, src]);\n\n let onError = useCallback(() => {\n dispatch({type: 'error'});\n unregister(src);\n }, [unregister, src]);\n\n let isSkeleton = useIsSkeleton();\n let isAnimating = isSkeleton || state === 'loading' || state === 'loaded';\n let animation = useLoadingAnimation(isAnimating);\n useLayoutEffect(() => {\n if (hidden) {\n return;\n }\n\n // If the image is already loaded, update state immediately instead of waiting for onLoad.\n if (state === 'loading' && imgRef.current?.complete) {\n // Queue a microtask so we don't hit React's update limit.\n // TODO: is this necessary?\n queueMicrotask(onLoad);\n }\n\n animation(domRef.current);\n });\n\n if (props.alt == null && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'The `alt` prop was not provided to an image. ' +\n 'Add `alt` text for screen readers, or set `alt=\"\"` prop to indicate that the image ' +\n 'is decorative or redundant with displayed text and should not be announced by screen readers.'\n );\n }\n\n let errorState = !isSkeleton && state === 'error' && renderError?.();\n let isRevealed = state === 'revealed' && !isSkeleton;\n let isTransitioning = isRevealed && loadTime > 200;\n return useMemo(() => hidden ? null : (\n <div\n ref={domRef}\n slot={slot || undefined}\n style={UNSAFE_style}\n className={UNSAFE_className + mergeStyles(wrapperStyles, styles) + ' ' + (isAnimating ? loadingStyle : '')}>\n {errorState}\n {!errorState && (\n <img\n {...getFetchPriorityProp(fetchPriority)}\n src={src || undefined}\n alt={alt}\n crossOrigin={crossOrigin}\n decoding={decoding}\n loading={loading}\n referrerPolicy={referrerPolicy}\n ref={imgRef}\n onLoad={onLoad}\n onError={onError}\n className={imgStyles({isRevealed, isTransitioning})} />\n )}\n </div>\n ), [slot, hidden, domRef, UNSAFE_style, UNSAFE_className, styles, isAnimating, errorState, src, alt, crossOrigin, decoding, fetchPriority, loading, referrerPolicy, onLoad, onError, isRevealed, isTransitioning]);\n});\n\nfunction getFetchPriorityProp(fetchPriority?: 'high' | 'low' | 'auto'): Record<string, string | undefined> {\n const pieces = version.split('.');\n const major = parseInt(pieces[0], 10);\n if (major >= 19) {\n return {fetchPriority};\n }\n return {fetchpriority: fetchPriority};\n}\n"],"names":[],"version":3,"file":"Image.css.map"}
|
package/dist/Image.mjs
CHANGED
|
@@ -48,21 +48,21 @@ function $dbd6f0b2503b938c$var$reducer(state, action) {
|
|
|
48
48
|
return state;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
const $dbd6f0b2503b938c$var$wrapperStyles = "
|
|
51
|
+
const $dbd6f0b2503b938c$var$wrapperStyles = " gH91 _Nc91 Pc91";
|
|
52
52
|
const $dbd6f0b2503b938c$var$imgStyles = function anonymous(props) {
|
|
53
53
|
let rules = " ";
|
|
54
|
-
rules += '
|
|
55
|
-
rules += '
|
|
56
|
-
rules += '
|
|
57
|
-
rules += '
|
|
58
|
-
rules += '
|
|
59
|
-
if (props.isRevealed) rules += '
|
|
60
|
-
else rules += '
|
|
61
|
-
if (props.isTransitioning) rules += '
|
|
62
|
-
else rules += '
|
|
63
|
-
rules += '
|
|
64
|
-
if (props.isTransitioning) rules += '
|
|
65
|
-
else rules += '
|
|
54
|
+
rules += ' sb91';
|
|
55
|
+
rules += ' Za91';
|
|
56
|
+
rules += ' Fb91';
|
|
57
|
+
rules += ' _H40ub4c91';
|
|
58
|
+
rules += ' __D40ub4c91';
|
|
59
|
+
if (props.isRevealed) rules += ' _Ib91';
|
|
60
|
+
else rules += ' _Ia91';
|
|
61
|
+
if (props.isTransitioning) rules += ' Yf91';
|
|
62
|
+
else rules += ' Ye91';
|
|
63
|
+
rules += ' Xe91';
|
|
64
|
+
if (props.isTransitioning) rules += ' _2b91';
|
|
65
|
+
else rules += ' _2b91';
|
|
66
66
|
return rules;
|
|
67
67
|
};
|
|
68
68
|
const $dbd6f0b2503b938c$export$3e431a229df88919 = /*#__PURE__*/ (0, $5AH9h$forwardRef)(function Image(props, domRef) {
|
|
@@ -136,7 +136,7 @@ const $dbd6f0b2503b938c$export$3e431a229df88919 = /*#__PURE__*/ (0, $5AH9h$forwa
|
|
|
136
136
|
errorState,
|
|
137
137
|
!errorState && /*#__PURE__*/ (0, $5AH9h$jsx)("img", {
|
|
138
138
|
...$dbd6f0b2503b938c$var$getFetchPriorityProp(fetchPriority),
|
|
139
|
-
src: src,
|
|
139
|
+
src: src || undefined,
|
|
140
140
|
alt: alt,
|
|
141
141
|
crossOrigin: crossOrigin,
|
|
142
142
|
decoding: decoding,
|
package/dist/Image.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"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","sources":["packages/@react-spectrum/s2/src/Image.tsx"],"sourcesContent":["import {ContextValue, SlotProps} from 'react-aria-components';\nimport {createContext, ForwardedRef, forwardRef, HTMLAttributeReferrerPolicy, ReactNode, useCallback, useContext, useMemo, useReducer, useRef, version} from 'react';\nimport {DefaultImageGroup, ImageGroup} from './ImageCoordinator';\nimport {loadingStyle, useIsSkeleton, useLoadingAnimation} from './Skeleton';\nimport {mergeStyles} from '../style/runtime';\nimport {style} from '../style' with {type: 'macro'};\nimport {StyleString} from '../style/types';\nimport {UnsafeStyles} from './style-utils';\nimport {useLayoutEffect} from '@react-aria/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ImageProps extends UnsafeStyles, SlotProps {\n /** The URL of the image. */\n src?: string,\n // TODO\n // srcSet?: string,\n // sizes?: string,\n /** Accessible alt text for the image. */\n alt?: string,\n /**\n * Indicates if the fetching of the image must be done using a CORS request.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin).\n */\n crossOrigin?: 'anonymous' | 'use-credentials',\n /**\n * Whether the browser should decode images synchronously or asynchronously.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#decoding).\n */\n decoding?: 'async' | 'auto' | 'sync',\n /**\n * Provides a hint of the relative priority to use when fetching the image.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#fetchpriority).\n */\n fetchPriority?: 'high' | 'low' | 'auto',\n /**\n * Whether the image should be loaded immediately or lazily when scrolled into view.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#loading).\n */\n loading?: 'eager' | 'lazy',\n /**\n * A string indicating which referrer to use when fetching the resource.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#referrerpolicy).\n */\n referrerPolicy?: HTMLAttributeReferrerPolicy,\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StyleString,\n /** A function that is called to render a fallback when the image fails to load. */\n renderError?: () => ReactNode,\n /**\n * A group of images to coordinate between, matching the group passed to the `<ImageCoordinator>` component.\n * If not provided, the default image group is used.\n */\n group?: ImageGroup\n}\n\ninterface ImageContextValue extends ImageProps {\n hidden?: boolean\n}\n\nexport const ImageContext = createContext<ContextValue<Partial<ImageContextValue>, HTMLDivElement>>(null);\n\ntype ImageState = 'loading' | 'loaded' | 'revealed' | 'error';\ninterface State {\n state: ImageState,\n src: string,\n startTime: number,\n loadTime: number\n}\n\ntype Action = \n | {type: 'update', src: string}\n | {type: 'loaded'}\n | {type: 'revealed'}\n | {type: 'error'};\n\nfunction createState(src: string): State {\n return {\n state: 'loading',\n src,\n startTime: Date.now(),\n loadTime: 0\n };\n}\n\nfunction reducer(state: State, action: Action): State {\n switch (action.type) {\n case 'update': {\n return {\n state: 'loading',\n src: action.src,\n startTime: Date.now(),\n loadTime: 0\n };\n }\n case 'loaded':\n case 'error': {\n return {\n ...state,\n state: action.type\n };\n }\n case 'revealed': {\n return {\n ...state,\n state: 'revealed',\n loadTime: Date.now() - state.startTime\n };\n }\n default:\n return state;\n }\n}\n\nconst wrapperStyles = style({\n backgroundColor: 'gray-100',\n overflow: 'hidden'\n});\n\nconst imgStyles = style({\n display: 'block',\n width: 'full',\n height: 'full',\n objectFit: 'inherit',\n objectPosition: 'inherit',\n opacity: {\n default: 0,\n isRevealed: 1\n },\n transition: {\n default: 'none',\n isTransitioning: 'opacity'\n },\n transitionDuration: 500\n});\n\nexport const Image = forwardRef(function Image(props: ImageProps, domRef: ForwardedRef<HTMLDivElement>) {\n [props, domRef] = useSpectrumContextProps(props, domRef, ImageContext);\n\n let {\n src = '',\n styles,\n UNSAFE_className = '',\n UNSAFE_style,\n renderError,\n group = DefaultImageGroup,\n // TODO\n // srcSet,\n // sizes,\n alt,\n crossOrigin,\n decoding,\n fetchPriority,\n loading,\n referrerPolicy,\n slot\n } = props;\n let hidden = (props as ImageContextValue).hidden;\n \n let {revealAll, register, unregister, load} = useContext(group);\n let [{state, src: lastSrc, loadTime}, dispatch] = useReducer(reducer, src, createState);\n\n if (src !== lastSrc && !hidden) {\n dispatch({type: 'update', src});\n }\n\n if (state === 'loaded' && revealAll && !hidden) {\n dispatch({type: 'revealed'});\n }\n\n let imgRef = useRef<HTMLImageElement | null>(null);\n useLayoutEffect(() => {\n if (hidden) {\n return;\n }\n\n register(src);\n return () => {\n unregister(src);\n };\n }, [hidden, register, unregister, src]);\n\n let onLoad = useCallback(() => {\n load(src);\n dispatch({type: 'loaded'});\n }, [load, src]);\n\n let onError = useCallback(() => {\n dispatch({type: 'error'});\n unregister(src);\n }, [unregister, src]);\n\n let isSkeleton = useIsSkeleton();\n let isAnimating = isSkeleton || state === 'loading' || state === 'loaded';\n let animation = useLoadingAnimation(isAnimating);\n useLayoutEffect(() => {\n if (hidden) {\n return;\n }\n\n // If the image is already loaded, update state immediately instead of waiting for onLoad.\n if (state === 'loading' && imgRef.current?.complete) {\n // Queue a microtask so we don't hit React's update limit.\n // TODO: is this necessary?\n queueMicrotask(onLoad);\n }\n\n animation(domRef.current);\n });\n\n if (props.alt == null && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'The `alt` prop was not provided to an image. ' +\n 'Add `alt` text for screen readers, or set `alt=\"\"` prop to indicate that the image ' +\n 'is decorative or redundant with displayed text and should not be announced by screen readers.'\n );\n }\n\n let errorState = !isSkeleton && state === 'error' && renderError?.();\n let isRevealed = state === 'revealed' && !isSkeleton;\n let isTransitioning = isRevealed && loadTime > 200;\n return useMemo(() => hidden ? null : (\n <div\n ref={domRef}\n slot={slot || undefined}\n style={UNSAFE_style}\n className={UNSAFE_className + mergeStyles(wrapperStyles, styles) + ' ' + (isAnimating ? loadingStyle : '')}>\n {errorState}\n {!errorState && (\n <img\n {...getFetchPriorityProp(fetchPriority)}\n src={src}\n alt={alt}\n crossOrigin={crossOrigin}\n decoding={decoding}\n loading={loading}\n referrerPolicy={referrerPolicy}\n ref={imgRef}\n onLoad={onLoad}\n onError={onError}\n className={imgStyles({isRevealed, isTransitioning})} />\n )}\n </div>\n ), [slot, hidden, domRef, UNSAFE_style, UNSAFE_className, styles, isAnimating, errorState, src, alt, crossOrigin, decoding, fetchPriority, loading, referrerPolicy, onLoad, onError, isRevealed, isTransitioning]);\n});\n\nfunction getFetchPriorityProp(fetchPriority?: 'high' | 'low' | 'auto'): Record<string, string | undefined> {\n const pieces = version.split('.');\n const major = parseInt(pieces[0], 10);\n if (major >= 19) {\n return {fetchPriority};\n }\n return {fetchpriority: fetchPriority};\n}\n"],"names":[],"version":3,"file":"Image.mjs.map"}
|
|
1
|
+
{"mappings":"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","sources":["packages/@react-spectrum/s2/src/Image.tsx"],"sourcesContent":["import {ContextValue, SlotProps} from 'react-aria-components';\nimport {createContext, ForwardedRef, forwardRef, HTMLAttributeReferrerPolicy, ReactNode, useCallback, useContext, useMemo, useReducer, useRef, version} from 'react';\nimport {DefaultImageGroup, ImageGroup} from './ImageCoordinator';\nimport {loadingStyle, useIsSkeleton, useLoadingAnimation} from './Skeleton';\nimport {mergeStyles} from '../style/runtime';\nimport {style} from '../style' with {type: 'macro'};\nimport {StyleString} from '../style/types';\nimport {UnsafeStyles} from './style-utils';\nimport {useLayoutEffect} from '@react-aria/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ImageProps extends UnsafeStyles, SlotProps {\n /** The URL of the image. */\n src?: string,\n // TODO\n // srcSet?: string,\n // sizes?: string,\n /** Accessible alt text for the image. */\n alt?: string,\n /**\n * Indicates if the fetching of the image must be done using a CORS request.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin).\n */\n crossOrigin?: 'anonymous' | 'use-credentials',\n /**\n * Whether the browser should decode images synchronously or asynchronously.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#decoding).\n */\n decoding?: 'async' | 'auto' | 'sync',\n /**\n * Provides a hint of the relative priority to use when fetching the image.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#fetchpriority).\n */\n fetchPriority?: 'high' | 'low' | 'auto',\n /**\n * Whether the image should be loaded immediately or lazily when scrolled into view.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#loading).\n */\n loading?: 'eager' | 'lazy',\n /**\n * A string indicating which referrer to use when fetching the resource.\n * [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#referrerpolicy).\n */\n referrerPolicy?: HTMLAttributeReferrerPolicy,\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StyleString,\n /** A function that is called to render a fallback when the image fails to load. */\n renderError?: () => ReactNode,\n /**\n * A group of images to coordinate between, matching the group passed to the `<ImageCoordinator>` component.\n * If not provided, the default image group is used.\n */\n group?: ImageGroup\n}\n\ninterface ImageContextValue extends ImageProps {\n hidden?: boolean\n}\n\nexport const ImageContext = createContext<ContextValue<Partial<ImageContextValue>, HTMLDivElement>>(null);\n\ntype ImageState = 'loading' | 'loaded' | 'revealed' | 'error';\ninterface State {\n state: ImageState,\n src: string,\n startTime: number,\n loadTime: number\n}\n\ntype Action = \n | {type: 'update', src: string}\n | {type: 'loaded'}\n | {type: 'revealed'}\n | {type: 'error'};\n\nfunction createState(src: string): State {\n return {\n state: 'loading',\n src,\n startTime: Date.now(),\n loadTime: 0\n };\n}\n\nfunction reducer(state: State, action: Action): State {\n switch (action.type) {\n case 'update': {\n return {\n state: 'loading',\n src: action.src,\n startTime: Date.now(),\n loadTime: 0\n };\n }\n case 'loaded':\n case 'error': {\n return {\n ...state,\n state: action.type\n };\n }\n case 'revealed': {\n return {\n ...state,\n state: 'revealed',\n loadTime: Date.now() - state.startTime\n };\n }\n default:\n return state;\n }\n}\n\nconst wrapperStyles = style({\n backgroundColor: 'gray-100',\n overflow: 'hidden'\n});\n\nconst imgStyles = style({\n display: 'block',\n width: 'full',\n height: 'full',\n objectFit: 'inherit',\n objectPosition: 'inherit',\n opacity: {\n default: 0,\n isRevealed: 1\n },\n transition: {\n default: 'none',\n isTransitioning: 'opacity'\n },\n transitionDuration: 500\n});\n\nexport const Image = forwardRef(function Image(props: ImageProps, domRef: ForwardedRef<HTMLDivElement>) {\n [props, domRef] = useSpectrumContextProps(props, domRef, ImageContext);\n\n let {\n src = '',\n styles,\n UNSAFE_className = '',\n UNSAFE_style,\n renderError,\n group = DefaultImageGroup,\n // TODO\n // srcSet,\n // sizes,\n alt,\n crossOrigin,\n decoding,\n fetchPriority,\n loading,\n referrerPolicy,\n slot\n } = props;\n let hidden = (props as ImageContextValue).hidden;\n \n let {revealAll, register, unregister, load} = useContext(group);\n let [{state, src: lastSrc, loadTime}, dispatch] = useReducer(reducer, src, createState);\n\n if (src !== lastSrc && !hidden) {\n dispatch({type: 'update', src});\n }\n\n if (state === 'loaded' && revealAll && !hidden) {\n dispatch({type: 'revealed'});\n }\n\n let imgRef = useRef<HTMLImageElement | null>(null);\n useLayoutEffect(() => {\n if (hidden) {\n return;\n }\n\n register(src);\n return () => {\n unregister(src);\n };\n }, [hidden, register, unregister, src]);\n\n let onLoad = useCallback(() => {\n load(src);\n dispatch({type: 'loaded'});\n }, [load, src]);\n\n let onError = useCallback(() => {\n dispatch({type: 'error'});\n unregister(src);\n }, [unregister, src]);\n\n let isSkeleton = useIsSkeleton();\n let isAnimating = isSkeleton || state === 'loading' || state === 'loaded';\n let animation = useLoadingAnimation(isAnimating);\n useLayoutEffect(() => {\n if (hidden) {\n return;\n }\n\n // If the image is already loaded, update state immediately instead of waiting for onLoad.\n if (state === 'loading' && imgRef.current?.complete) {\n // Queue a microtask so we don't hit React's update limit.\n // TODO: is this necessary?\n queueMicrotask(onLoad);\n }\n\n animation(domRef.current);\n });\n\n if (props.alt == null && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'The `alt` prop was not provided to an image. ' +\n 'Add `alt` text for screen readers, or set `alt=\"\"` prop to indicate that the image ' +\n 'is decorative or redundant with displayed text and should not be announced by screen readers.'\n );\n }\n\n let errorState = !isSkeleton && state === 'error' && renderError?.();\n let isRevealed = state === 'revealed' && !isSkeleton;\n let isTransitioning = isRevealed && loadTime > 200;\n return useMemo(() => hidden ? null : (\n <div\n ref={domRef}\n slot={slot || undefined}\n style={UNSAFE_style}\n className={UNSAFE_className + mergeStyles(wrapperStyles, styles) + ' ' + (isAnimating ? loadingStyle : '')}>\n {errorState}\n {!errorState && (\n <img\n {...getFetchPriorityProp(fetchPriority)}\n src={src || undefined}\n alt={alt}\n crossOrigin={crossOrigin}\n decoding={decoding}\n loading={loading}\n referrerPolicy={referrerPolicy}\n ref={imgRef}\n onLoad={onLoad}\n onError={onError}\n className={imgStyles({isRevealed, isTransitioning})} />\n )}\n </div>\n ), [slot, hidden, domRef, UNSAFE_style, UNSAFE_className, styles, isAnimating, errorState, src, alt, crossOrigin, decoding, fetchPriority, loading, referrerPolicy, onLoad, onError, isRevealed, isTransitioning]);\n});\n\nfunction getFetchPriorityProp(fetchPriority?: 'high' | 'low' | 'auto'): Record<string, string | undefined> {\n const pieces = version.split('.');\n const major = parseInt(pieces[0], 10);\n if (major >= 19) {\n return {fetchPriority};\n }\n return {fetchpriority: fetchPriority};\n}\n"],"names":[],"version":3,"file":"Image.mjs.map"}
|
package/dist/InlineAlert.cjs
CHANGED
|
@@ -60,84 +60,84 @@ const $72bf3a9f94a75d9f$var$inlineAlert = function anonymous(props, overrides) {
|
|
|
60
60
|
if (p[1] === "_P") position = true;
|
|
61
61
|
rules += p[0];
|
|
62
62
|
}
|
|
63
|
-
if (props.isFocusVisible) rules += '
|
|
64
|
-
else rules += '
|
|
65
|
-
rules += '
|
|
66
|
-
rules += '
|
|
67
|
-
rules += '
|
|
68
|
-
rules += '
|
|
69
|
-
if (!position) rules += '
|
|
70
|
-
rules += '
|
|
71
|
-
rules += '
|
|
72
|
-
rules += '
|
|
73
|
-
rules += '
|
|
74
|
-
rules += '
|
|
75
|
-
rules += '
|
|
76
|
-
rules += '
|
|
77
|
-
rules += '
|
|
78
|
-
rules += '
|
|
79
|
-
rules += '
|
|
80
|
-
rules += '
|
|
81
|
-
rules += '
|
|
82
|
-
rules += '
|
|
83
|
-
rules += '
|
|
84
|
-
if (props.fillStyle === "boldFill") rules += '
|
|
85
|
-
else if (props.fillStyle === "subtleFill") rules += '
|
|
63
|
+
if (props.isFocusVisible) rules += ' _Lf91';
|
|
64
|
+
else rules += ' _Le91';
|
|
65
|
+
rules += ' Oh91';
|
|
66
|
+
rules += ' _Mc91';
|
|
67
|
+
rules += ' _Kd91';
|
|
68
|
+
rules += ' sg91';
|
|
69
|
+
if (!position) rules += ' _Pc91';
|
|
70
|
+
rules += ' _oa91';
|
|
71
|
+
rules += ' Th91';
|
|
72
|
+
rules += ' Qh91';
|
|
73
|
+
rules += ' Sh91';
|
|
74
|
+
rules += ' Rh91';
|
|
75
|
+
rules += ' oc91';
|
|
76
|
+
rules += ' nc91';
|
|
77
|
+
rules += ' kc91';
|
|
78
|
+
rules += ' jc91';
|
|
79
|
+
rules += ' _jf91';
|
|
80
|
+
rules += ' _kc91';
|
|
81
|
+
rules += ' hc91';
|
|
82
|
+
rules += ' mc91';
|
|
83
|
+
rules += ' lc91';
|
|
84
|
+
if (props.fillStyle === "boldFill") rules += ' iA91';
|
|
85
|
+
else if (props.fillStyle === "subtleFill") rules += ' iA91';
|
|
86
86
|
else if (props.fillStyle === "border") {
|
|
87
|
-
if (props.variant === "neutral") rules += '
|
|
88
|
-
else if (props.variant === "negative") rules += '
|
|
89
|
-
else if (props.variant === "notice") rules += '
|
|
90
|
-
else if (props.variant === "positive") rules += '
|
|
91
|
-
else if (props.variant === "informative") rules += '
|
|
87
|
+
if (props.variant === "neutral") rules += ' iy91';
|
|
88
|
+
else if (props.variant === "negative") rules += ' it91';
|
|
89
|
+
else if (props.variant === "notice") rules += ' is91';
|
|
90
|
+
else if (props.variant === "positive") rules += ' il91';
|
|
91
|
+
else if (props.variant === "informative") rules += ' ix91';
|
|
92
92
|
}
|
|
93
93
|
if (props.variant === "neutral") {
|
|
94
|
-
if (props.fillStyle === "boldFill") rules += '
|
|
95
|
-
else if (props.fillStyle === "subtleFill") rules += '
|
|
96
|
-
else if (props.fillStyle === "border") rules += '
|
|
94
|
+
if (props.fillStyle === "boldFill") rules += ' g691';
|
|
95
|
+
else if (props.fillStyle === "subtleFill") rules += ' gI91';
|
|
96
|
+
else if (props.fillStyle === "border") rules += ' gX91';
|
|
97
97
|
} else if (props.variant === "negative") {
|
|
98
|
-
if (props.fillStyle === "boldFill") rules += '
|
|
99
|
-
else if (props.fillStyle === "subtleFill") rules += '
|
|
100
|
-
else if (props.fillStyle === "border") rules += '
|
|
98
|
+
if (props.fillStyle === "boldFill") rules += ' gB91';
|
|
99
|
+
else if (props.fillStyle === "subtleFill") rules += ' gU91';
|
|
100
|
+
else if (props.fillStyle === "border") rules += ' gX91';
|
|
101
101
|
} else if (props.variant === "notice") {
|
|
102
|
-
if (props.fillStyle === "boldFill") rules += '
|
|
103
|
-
else if (props.fillStyle === "subtleFill") rules += '
|
|
104
|
-
else if (props.fillStyle === "border") rules += '
|
|
102
|
+
if (props.fillStyle === "boldFill") rules += ' gQ91';
|
|
103
|
+
else if (props.fillStyle === "subtleFill") rules += ' gV91';
|
|
104
|
+
else if (props.fillStyle === "border") rules += ' gX91';
|
|
105
105
|
} else if (props.variant === "positive") {
|
|
106
|
-
if (props.fillStyle === "boldFill") rules += '
|
|
107
|
-
else if (props.fillStyle === "subtleFill") rules += '
|
|
108
|
-
else if (props.fillStyle === "border") rules += '
|
|
106
|
+
if (props.fillStyle === "boldFill") rules += ' g191';
|
|
107
|
+
else if (props.fillStyle === "subtleFill") rules += ' gA91';
|
|
108
|
+
else if (props.fillStyle === "border") rules += ' gX91';
|
|
109
109
|
} else if (props.variant === "informative") {
|
|
110
|
-
if (props.fillStyle === "boldFill") rules += '
|
|
111
|
-
else if (props.fillStyle === "subtleFill") rules += '
|
|
112
|
-
else if (props.fillStyle === "border") rules += '
|
|
110
|
+
if (props.fillStyle === "boldFill") rules += ' g291';
|
|
111
|
+
else if (props.fillStyle === "subtleFill") rules += ' gG91';
|
|
112
|
+
else if (props.fillStyle === "border") rules += ' gX91';
|
|
113
113
|
}
|
|
114
114
|
return rules;
|
|
115
115
|
};
|
|
116
116
|
const $72bf3a9f94a75d9f$var$icon = function anonymous(props) {
|
|
117
117
|
let rules = " ";
|
|
118
|
-
rules += '
|
|
119
|
-
rules += '
|
|
120
|
-
rules += '
|
|
121
|
-
rules += '
|
|
118
|
+
rules += ' z2U5Crc91';
|
|
119
|
+
rules += ' y2U5Crc91';
|
|
120
|
+
rules += ' B2U5Crc91';
|
|
121
|
+
rules += ' A2U5Crc91';
|
|
122
122
|
if (props.fillStyle === "boldFill") {
|
|
123
|
-
if (props.variant === "notice") rules += ' -_8sjo0b-
|
|
124
|
-
else rules += ' -_8sjo0b-
|
|
123
|
+
if (props.variant === "notice") rules += ' -_8sjo0b-tcwrnr91';
|
|
124
|
+
else rules += ' -_8sjo0b-tw91';
|
|
125
125
|
} else if (props.fillStyle === "subtleFill") {
|
|
126
|
-
if (props.variant === "neutral") rules += ' -_8sjo0b-
|
|
127
|
-
else if (props.variant === "negative") rules += ' -_8sjo0b-
|
|
128
|
-
else if (props.variant === "notice") rules += ' -_8sjo0b-
|
|
129
|
-
else if (props.variant === "positive") rules += ' -_8sjo0b-
|
|
130
|
-
else if (props.variant === "informative") rules += ' -_8sjo0b-
|
|
126
|
+
if (props.variant === "neutral") rules += ' -_8sjo0b-tf91';
|
|
127
|
+
else if (props.variant === "negative") rules += ' -_8sjo0b-tq91';
|
|
128
|
+
else if (props.variant === "notice") rules += ' -_8sjo0b-tq91';
|
|
129
|
+
else if (props.variant === "positive") rules += ' -_8sjo0b-tt91';
|
|
130
|
+
else if (props.variant === "informative") rules += ' -_8sjo0b-tu91';
|
|
131
131
|
} else if (props.fillStyle === "border") {
|
|
132
|
-
if (props.variant === "neutral") rules += ' -_8sjo0b-
|
|
133
|
-
else if (props.variant === "negative") rules += ' -_8sjo0b-
|
|
134
|
-
else if (props.variant === "notice") rules += ' -_8sjo0b-
|
|
135
|
-
else if (props.variant === "positive") rules += ' -_8sjo0b-
|
|
136
|
-
else if (props.variant === "informative") rules += ' -_8sjo0b-
|
|
132
|
+
if (props.variant === "neutral") rules += ' -_8sjo0b-tf91';
|
|
133
|
+
else if (props.variant === "negative") rules += ' -_8sjo0b-tq91';
|
|
134
|
+
else if (props.variant === "notice") rules += ' -_8sjo0b-tm91';
|
|
135
|
+
else if (props.variant === "positive") rules += ' -_8sjo0b-tt91';
|
|
136
|
+
else if (props.variant === "informative") rules += ' -_8sjo0b-tu91';
|
|
137
137
|
}
|
|
138
138
|
return rules;
|
|
139
139
|
};
|
|
140
|
-
const $72bf3a9f94a75d9f$var$grid = "
|
|
140
|
+
const $72bf3a9f94a75d9f$var$grid = " se91 qj91 Dxumf9b91 EeeZzzb91 Za91 CScDOab91";
|
|
141
141
|
let $72bf3a9f94a75d9f$var$ICONS = {
|
|
142
142
|
informative: (0, $0ed6e07b499b9797$exports.default),
|
|
143
143
|
positive: (0, $6391be254c189366$exports.default),
|
|
@@ -147,60 +147,60 @@ let $72bf3a9f94a75d9f$var$ICONS = {
|
|
|
147
147
|
};
|
|
148
148
|
const $72bf3a9f94a75d9f$var$heading = function anonymous(props) {
|
|
149
149
|
let rules = " ";
|
|
150
|
-
rules += '
|
|
151
|
-
rules += '
|
|
152
|
-
rules += '
|
|
153
|
-
rules += '
|
|
154
|
-
rules += '
|
|
155
|
-
rules += '
|
|
156
|
-
rules += '
|
|
157
|
-
rules += '
|
|
158
|
-
rules += '
|
|
159
|
-
rules += '
|
|
160
|
-
rules += '
|
|
161
|
-
rules += '
|
|
162
|
-
rules += '
|
|
163
|
-
rules += '
|
|
164
|
-
rules += '
|
|
165
|
-
rules += '
|
|
166
|
-
rules += '
|
|
167
|
-
rules += '
|
|
168
|
-
rules += '
|
|
169
|
-
rules += '
|
|
170
|
-
rules += '
|
|
171
|
-
rules += '
|
|
172
|
-
rules += '
|
|
150
|
+
rules += ' Jy91';
|
|
151
|
+
rules += ' zPCJngb91';
|
|
152
|
+
rules += ' yPCJngb91';
|
|
153
|
+
rules += ' BPCJngb91';
|
|
154
|
+
rules += ' APCJngb91';
|
|
155
|
+
rules += ' ug91';
|
|
156
|
+
rules += ' uch91';
|
|
157
|
+
rules += ' udi91';
|
|
158
|
+
rules += ' uea91';
|
|
159
|
+
rules += ' ugb91';
|
|
160
|
+
rules += ' uhd91';
|
|
161
|
+
rules += ' uje91';
|
|
162
|
+
rules += ' uic91';
|
|
163
|
+
rules += ' vd91';
|
|
164
|
+
rules += ' vsf91';
|
|
165
|
+
rules += ' wd91';
|
|
166
|
+
rules += ' xd91';
|
|
167
|
+
rules += ' _xa91';
|
|
168
|
+
rules += ' wfd91';
|
|
169
|
+
rules += ' xfd91';
|
|
170
|
+
rules += ' _xfa91';
|
|
171
|
+
rules += ' _Fa91';
|
|
172
|
+
rules += ' _Ffb91';
|
|
173
173
|
if (props.fillStyle === "boldFill") {
|
|
174
|
-
if (props.variant === "notice") rules += '
|
|
175
|
-
else rules += '
|
|
176
|
-
} else rules += '
|
|
174
|
+
if (props.variant === "notice") rules += ' pg91';
|
|
175
|
+
else rules += ' px91';
|
|
176
|
+
} else rules += ' po91';
|
|
177
177
|
return rules;
|
|
178
178
|
};
|
|
179
179
|
const $72bf3a9f94a75d9f$var$content = function anonymous(props) {
|
|
180
180
|
let rules = " ";
|
|
181
|
-
rules += '
|
|
182
|
-
rules += '
|
|
183
|
-
rules += '
|
|
184
|
-
rules += '
|
|
185
|
-
rules += '
|
|
186
|
-
rules += '
|
|
187
|
-
rules += '
|
|
188
|
-
rules += '
|
|
189
|
-
rules += '
|
|
190
|
-
rules += '
|
|
191
|
-
rules += '
|
|
192
|
-
rules += '
|
|
193
|
-
rules += '
|
|
194
|
-
rules += '
|
|
195
|
-
rules += '
|
|
196
|
-
rules += '
|
|
197
|
-
rules += '
|
|
198
|
-
rules += '
|
|
199
|
-
rules += '
|
|
181
|
+
rules += ' zk52g2d91';
|
|
182
|
+
rules += ' yk52g2d91';
|
|
183
|
+
rules += ' Bk52g2d91';
|
|
184
|
+
rules += ' Ak52g2d91';
|
|
185
|
+
rules += ' ug91';
|
|
186
|
+
rules += ' uch91';
|
|
187
|
+
rules += ' udi91';
|
|
188
|
+
rules += ' uea91';
|
|
189
|
+
rules += ' ugb91';
|
|
190
|
+
rules += ' uhd91';
|
|
191
|
+
rules += ' uje91';
|
|
192
|
+
rules += ' uic91';
|
|
193
|
+
rules += ' vd91';
|
|
194
|
+
rules += ' vsf91';
|
|
195
|
+
rules += ' wb91';
|
|
196
|
+
rules += ' xb91';
|
|
197
|
+
rules += ' _xa91';
|
|
198
|
+
rules += ' _Fb91';
|
|
199
|
+
rules += ' _Ffc91';
|
|
200
200
|
if (props.fillStyle === "boldFill") {
|
|
201
|
-
if (props.variant === "notice") rules += '
|
|
202
|
-
else rules += '
|
|
203
|
-
} else rules += '
|
|
201
|
+
if (props.variant === "notice") rules += ' pg91';
|
|
202
|
+
else rules += ' px91';
|
|
203
|
+
} else rules += ' pt91';
|
|
204
204
|
return rules;
|
|
205
205
|
};
|
|
206
206
|
const $72bf3a9f94a75d9f$export$a3b2c96db9b0eb71 = /*#__PURE__*/ (0, $3stts$react.forwardRef)(function InlineAlert(props, ref) {
|