@react-spectrum/s2 3.0.0-nightly-fd7075c5f-250128 → 3.0.0-nightly-e3ed3c7f6-250130
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 +3 -3
- package/dist/Accordion.css +2 -2
- package/dist/Accordion.mjs +3 -3
- package/dist/ActionBar.cjs +47 -47
- package/dist/ActionBar.css +51 -51
- package/dist/ActionBar.mjs +47 -47
- package/dist/ActionButton.cjs +97 -97
- package/dist/ActionButton.css +96 -96
- package/dist/ActionButton.mjs +97 -97
- package/dist/ActionButtonGroup.cjs +11 -11
- package/dist/ActionButtonGroup.css +9 -9
- package/dist/ActionButtonGroup.mjs +11 -11
- package/dist/AlertDialog.cjs +3 -3
- package/dist/AlertDialog.css +3 -3
- package/dist/AlertDialog.mjs +3 -3
- package/dist/Avatar.cjs +17 -17
- package/dist/Avatar.css +14 -14
- package/dist/Avatar.mjs +17 -17
- package/dist/AvatarGroup.cjs +100 -100
- package/dist/AvatarGroup.css +34 -34
- package/dist/AvatarGroup.mjs +100 -100
- package/dist/Badge.cjs +91 -67
- package/dist/Badge.cjs.map +1 -1
- package/dist/Badge.css +163 -91
- package/dist/Badge.css.map +1 -1
- package/dist/Badge.mjs +91 -67
- package/dist/Badge.mjs.map +1 -1
- package/dist/Breadcrumbs.cjs +115 -115
- package/dist/Breadcrumbs.css +89 -89
- package/dist/Breadcrumbs.mjs +115 -115
- package/dist/Button.cjs +236 -152
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css +309 -165
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs +236 -152
- package/dist/Button.mjs.map +1 -1
- package/dist/ButtonGroup.cjs +19 -19
- package/dist/ButtonGroup.css +15 -15
- package/dist/ButtonGroup.mjs +19 -19
- package/dist/Card.cjs +264 -261
- package/dist/Card.cjs.map +1 -1
- package/dist/Card.css +210 -198
- package/dist/Card.css.map +1 -1
- package/dist/Card.mjs +264 -261
- package/dist/Card.mjs.map +1 -1
- package/dist/CardView.cjs +15 -15
- package/dist/CardView.css +18 -18
- package/dist/CardView.mjs +15 -15
- package/dist/CenterBaseline.cjs +1 -1
- package/dist/CenterBaseline.css +2 -2
- package/dist/CenterBaseline.mjs +1 -1
- package/dist/Checkbox.cjs +124 -73
- package/dist/Checkbox.cjs.map +1 -1
- package/dist/Checkbox.css +201 -81
- package/dist/Checkbox.css.map +1 -1
- package/dist/Checkbox.mjs +124 -73
- package/dist/Checkbox.mjs.map +1 -1
- package/dist/CheckboxGroup.cjs +49 -49
- package/dist/CheckboxGroup.css +41 -41
- package/dist/CheckboxGroup.mjs +49 -49
- package/dist/ClearButton.cjs +15 -15
- package/dist/ClearButton.css +17 -17
- package/dist/ClearButton.mjs +15 -15
- package/dist/CloseButton.cjs +35 -35
- package/dist/CloseButton.css +33 -33
- package/dist/CloseButton.mjs +35 -35
- package/dist/ColorArea.cjs +22 -22
- package/dist/ColorArea.css +15 -15
- package/dist/ColorArea.mjs +22 -22
- package/dist/ColorField.cjs +38 -38
- package/dist/ColorField.css +32 -32
- package/dist/ColorField.mjs +38 -38
- package/dist/ColorHandle.cjs +27 -21
- package/dist/ColorHandle.cjs.map +1 -1
- package/dist/ColorHandle.css +93 -45
- package/dist/ColorHandle.css.map +1 -1
- package/dist/ColorHandle.mjs +27 -21
- package/dist/ColorHandle.mjs.map +1 -1
- package/dist/ColorSlider.cjs +52 -52
- package/dist/ColorSlider.css +51 -51
- package/dist/ColorSlider.mjs +52 -52
- package/dist/ColorSwatch.cjs +27 -24
- package/dist/ColorSwatch.cjs.map +1 -1
- package/dist/ColorSwatch.css +41 -29
- package/dist/ColorSwatch.css.map +1 -1
- package/dist/ColorSwatch.mjs +27 -24
- package/dist/ColorSwatch.mjs.map +1 -1
- package/dist/ColorSwatchPicker.cjs +23 -23
- package/dist/ColorSwatchPicker.css +60 -48
- package/dist/ColorSwatchPicker.css.map +1 -1
- package/dist/ColorSwatchPicker.mjs +23 -23
- package/dist/ColorWheel.cjs +22 -22
- package/dist/ColorWheel.css +16 -16
- package/dist/ColorWheel.mjs +22 -22
- package/dist/ComboBox.cjs +80 -80
- package/dist/ComboBox.css +88 -88
- package/dist/ComboBox.mjs +80 -80
- package/dist/ContextualHelp.cjs +5 -5
- package/dist/ContextualHelp.css +38 -38
- package/dist/ContextualHelp.mjs +5 -5
- package/dist/CustomDialog.cjs +31 -31
- package/dist/CustomDialog.css +25 -25
- package/dist/CustomDialog.mjs +31 -31
- package/dist/Dialog.cjs +17 -17
- package/dist/Dialog.css +64 -64
- package/dist/Dialog.mjs +17 -17
- package/dist/Disclosure.cjs +111 -108
- package/dist/Disclosure.cjs.map +1 -1
- package/dist/Disclosure.css +124 -112
- package/dist/Disclosure.css.map +1 -1
- package/dist/Disclosure.mjs +111 -108
- package/dist/Disclosure.mjs.map +1 -1
- package/dist/Divider.cjs +26 -26
- package/dist/Divider.css +16 -16
- package/dist/Divider.mjs +26 -26
- package/dist/DropZone.cjs +56 -47
- package/dist/DropZone.cjs.map +1 -1
- package/dist/DropZone.css +80 -56
- package/dist/DropZone.css.map +1 -1
- package/dist/DropZone.mjs +56 -47
- package/dist/DropZone.mjs.map +1 -1
- package/dist/Field.cjs +204 -150
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css +246 -150
- package/dist/Field.css.map +1 -1
- package/dist/Field.mjs +204 -150
- package/dist/Field.mjs.map +1 -1
- package/dist/Form.cjs +10 -10
- package/dist/Form.css +9 -9
- package/dist/Form.mjs +10 -10
- package/dist/FullscreenDialog.cjs +5 -5
- package/dist/FullscreenDialog.css +72 -72
- package/dist/FullscreenDialog.mjs +5 -5
- package/dist/IllustratedMessage.cjs +134 -134
- package/dist/IllustratedMessage.css +69 -69
- package/dist/IllustratedMessage.mjs +134 -134
- package/dist/Image.cjs +12 -12
- package/dist/Image.css +13 -13
- package/dist/Image.mjs +12 -12
- package/dist/InlineAlert.cjs +104 -77
- package/dist/InlineAlert.cjs.map +1 -1
- package/dist/InlineAlert.css +149 -77
- package/dist/InlineAlert.css.map +1 -1
- package/dist/InlineAlert.mjs +104 -77
- package/dist/InlineAlert.mjs.map +1 -1
- package/dist/Link.cjs +31 -31
- package/dist/Link.css +30 -30
- package/dist/Link.mjs +31 -31
- package/dist/Menu.cjs +269 -264
- package/dist/Menu.cjs.map +1 -1
- package/dist/Menu.css +152 -152
- package/dist/Menu.css.map +1 -1
- package/dist/Menu.mjs +270 -265
- package/dist/Menu.mjs.map +1 -1
- package/dist/Meter.cjs +85 -85
- package/dist/Meter.css +81 -81
- package/dist/Meter.mjs +85 -85
- package/dist/Modal.cjs +48 -48
- package/dist/Modal.css +46 -46
- package/dist/Modal.mjs +48 -48
- package/dist/NumberField.cjs +115 -115
- package/dist/NumberField.css +114 -114
- package/dist/NumberField.mjs +115 -115
- package/dist/Picker.cjs +193 -175
- package/dist/Picker.cjs.map +1 -1
- package/dist/Picker.css +223 -163
- package/dist/Picker.css.map +1 -1
- package/dist/Picker.mjs +193 -175
- package/dist/Picker.mjs.map +1 -1
- package/dist/Popover.cjs +84 -78
- package/dist/Popover.cjs.map +1 -1
- package/dist/Popover.css +89 -65
- package/dist/Popover.css.map +1 -1
- package/dist/Popover.mjs +84 -78
- package/dist/Popover.mjs.map +1 -1
- package/dist/ProgressBar.cjs +98 -98
- package/dist/ProgressBar.css +92 -92
- package/dist/ProgressBar.mjs +98 -98
- package/dist/ProgressCircle.cjs +17 -17
- package/dist/ProgressCircle.css +15 -15
- package/dist/ProgressCircle.mjs +17 -17
- package/dist/Provider.cjs +4 -4
- package/dist/Provider.css +5 -5
- package/dist/Provider.mjs +4 -4
- package/dist/Radio.cjs +152 -80
- package/dist/Radio.cjs.map +1 -1
- package/dist/Radio.css +240 -96
- package/dist/Radio.css.map +1 -1
- package/dist/Radio.mjs +152 -80
- package/dist/Radio.mjs.map +1 -1
- package/dist/RadioGroup.cjs +47 -47
- package/dist/RadioGroup.css +41 -41
- package/dist/RadioGroup.mjs +47 -47
- package/dist/SearchField.cjs +42 -42
- package/dist/SearchField.css +47 -47
- package/dist/SearchField.mjs +42 -42
- package/dist/SegmentedControl.cjs +101 -89
- package/dist/SegmentedControl.cjs.map +1 -1
- package/dist/SegmentedControl.css +140 -92
- package/dist/SegmentedControl.css.map +1 -1
- package/dist/SegmentedControl.mjs +101 -89
- package/dist/SegmentedControl.mjs.map +1 -1
- package/dist/Slider.cjs +229 -196
- package/dist/Slider.cjs.map +1 -1
- package/dist/Slider.css +221 -149
- package/dist/Slider.css.map +1 -1
- package/dist/Slider.mjs +229 -196
- package/dist/Slider.mjs.map +1 -1
- package/dist/StatusLight.cjs +56 -56
- package/dist/StatusLight.css +59 -59
- package/dist/StatusLight.mjs +56 -56
- package/dist/Switch.cjs +107 -74
- package/dist/Switch.cjs.map +1 -1
- package/dist/Switch.css +141 -69
- package/dist/Switch.css.map +1 -1
- package/dist/Switch.mjs +107 -74
- package/dist/Switch.mjs.map +1 -1
- package/dist/TableView.cjs +280 -253
- package/dist/TableView.cjs.map +1 -1
- package/dist/TableView.css +199 -163
- package/dist/TableView.css.map +1 -1
- package/dist/TableView.mjs +280 -253
- package/dist/TableView.mjs.map +1 -1
- package/dist/Tabs.cjs +83 -83
- package/dist/Tabs.css +58 -58
- package/dist/Tabs.mjs +83 -83
- package/dist/TagGroup.cjs +148 -148
- package/dist/TagGroup.css +134 -134
- package/dist/TagGroup.mjs +148 -148
- package/dist/TextField.cjs +59 -59
- package/dist/TextField.css +62 -62
- package/dist/TextField.mjs +59 -59
- package/dist/ToggleButton.cjs +3 -3
- package/dist/ToggleButton.css +12 -12
- package/dist/ToggleButton.mjs +3 -3
- package/dist/Tooltip.cjs +60 -57
- package/dist/Tooltip.cjs.map +1 -1
- package/dist/Tooltip.css +83 -71
- package/dist/Tooltip.css.map +1 -1
- package/dist/Tooltip.mjs +60 -57
- package/dist/Tooltip.mjs.map +1 -1
- package/dist/TreeView.cjs +465 -0
- package/dist/TreeView.cjs.map +1 -0
- package/dist/TreeView.css +632 -0
- package/dist/TreeView.css.map +1 -0
- package/dist/TreeView.mjs +455 -0
- package/dist/TreeView.mjs.map +1 -0
- package/dist/main.cjs +4 -0
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +3 -1
- package/dist/module.mjs.map +1 -1
- package/dist/types.d.ts +21 -1
- package/dist/types.d.ts.map +1 -1
- package/icons/Skeleton.cjs +2 -2
- package/icons/Skeleton.css +5 -5
- package/icons/Skeleton.mjs +2 -2
- package/package.json +20 -19
- package/src/Menu.tsx +2 -0
- package/src/TreeView.tsx +497 -0
- package/src/index.ts +2 -0
- package/style/__tests__/style-macro.test.js +18 -18
- package/style/dist/spectrum-theme.cjs +20 -10
- package/style/dist/spectrum-theme.cjs.map +1 -1
- package/style/dist/spectrum-theme.mjs +20 -10
- package/style/dist/spectrum-theme.mjs.map +1 -1
- package/style/dist/types.d.ts +4 -0
- package/style/dist/types.d.ts.map +1 -1
- package/style/spectrum-theme.ts +18 -11
package/dist/ColorHandle.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AASD,MAAM,oCAAc;AACpB,MAAM,qCAAe,IAAI,2BAA2B;AACpD,MAAM,oCAAc;AACpB,MAAM,2CAAqB;AAC3B,MAAM,qCAAe,IAAI,8BAA8B;AAOhD,SAAS,0CAAY,gBAAC,YAAY,eAAE,WAAW,EAAmB;IACvE,qBACE,gCAAC,CAAA,GAAA,qCAAS;QACR
|
|
1
|
+
{"mappings":"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","sources":["packages/@react-spectrum/s2/src/ColorHandle.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {cloneElement, JSX, RefObject, useState} from 'react';\nimport {ColorThumb} from 'react-aria-components';\nimport {createPortal} from 'react-dom';\nimport {keyframes} from '../style/style-macro' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useId, useLayoutEffect} from '@react-aria/utils';\n\nconst HANDLE_SIZE = 16;\nconst LOUPE_HEIGHT = 64; // Does not include borders\nconst LOUPE_WIDTH = 48;\nconst LOUPE_BORDER_WIDTH = 1;\nconst LOUPE_OFFSET = 12; // Offset from handle to loupe\n\ninterface ColorHandleProps {\n containerRef: RefObject<HTMLElement | null>,\n getPosition: () => {x: number, y: number}\n}\n\nexport function ColorHandle({containerRef, getPosition}: ColorHandleProps) {\n return (\n <ColorThumb\n className={style({\n transition: '[width, height]',\n size: {\n default: HANDLE_SIZE,\n isFocusVisible: 32\n },\n backgroundColor: {\n isDisabled: 'disabled'\n },\n borderRadius: 'full',\n boxSizing: 'border-box',\n borderStyle: 'solid',\n borderWidth: 2,\n borderColor: {\n default: 'white',\n isDisabled: 'disabled'\n },\n outlineStyle: 'solid',\n outlineWidth: 1,\n outlineColor: {\n default: 'black/42',\n forcedColors: 'ButtonBorder'\n }\n })}\n style={({defaultStyle, isDisabled}) => ({\n background: isDisabled ? undefined : `linear-gradient(${defaultStyle.backgroundColor}, ${defaultStyle.backgroundColor}), repeating-conic-gradient(#E1E1E1 0% 25%, white 0% 50%) 50% / 16px 16px`,\n backgroundColor: undefined,\n top: defaultStyle.top || '50%',\n left: defaultStyle.left || '50%'\n })}>\n {({isDragging, color}) => (<>\n <div\n className={style({\n size: 'full',\n borderRadius: 'full',\n boxSizing: 'border-box',\n borderStyle: 'solid',\n borderWidth: 1,\n borderColor: {\n default: 'black/42',\n forcedColors: 'ButtonBorder'\n }\n })} />\n <ColorLoupePortal isOpen={isDragging}>\n <ColorLoupe containerRef={containerRef} color={color} getPosition={getPosition} />\n </ColorLoupePortal>\n </>)}\n </ColorThumb>\n );\n}\n\n// ColorLoupe is rendered in a portal so that it breaks out of clipped/scrolling containers (e.g. popovers).\nfunction ColorLoupePortal({isOpen, children}: { isOpen: boolean, children: JSX.Element }) {\n let [state, setState] = useState(isOpen ? 'open' : 'closed');\n if (isOpen && state === 'closed') {\n setState('open');\n }\n\n if (!isOpen && state === 'open') {\n setState('exiting');\n }\n\n if (isOpen || state === 'exiting') {\n return createPortal(cloneElement(children, {isExiting: state === 'exiting', onExited: () => setState('closed')}), document.body);\n }\n\n return null;\n}\n\nfunction ColorLoupe({isExiting, onExited, containerRef, loupeRef, getPosition, color}: any) {\n let patternId = useId();\n\n // Get the bounding rectangle of the container (e.g. ColorArea/ColorSlider).\n let [containerRect, setContainerRect] = useState({top: 0, left: 0, width: 0, height: 0});\n useLayoutEffect(() => {\n let rect = containerRef.current?.getBoundingClientRect();\n setContainerRect({\n top: rect?.top || 0,\n left: rect?.left || 0,\n width: rect?.width || 0,\n height: rect?.height || 0\n });\n }, [containerRef]);\n\n // Compute the pixel position of the thumb.\n let {x: thumbLeft, y: thumbTop} = getPosition();\n thumbTop *= containerRect.height;\n thumbLeft *= containerRect.width;\n\n let enterAnimation = keyframes(`\n from {\n transform: translateY(8px);\n opacity: 0;\n }\n `);\n\n let exitAnimation = keyframes(`\n to {\n transform: translateY(8px);\n opacity: 0;\n }\n `);\n\n return (\n <svg\n style={{\n // Position relative to the viewport.\n position: 'fixed',\n top: containerRect.top + thumbTop,\n left: containerRect.left + thumbLeft,\n marginTop: -LOUPE_HEIGHT - LOUPE_BORDER_WIDTH * 2 - HANDLE_SIZE / 2 - LOUPE_OFFSET,\n marginLeft: -LOUPE_WIDTH / 2 - LOUPE_BORDER_WIDTH,\n animationName: isExiting ? exitAnimation : enterAnimation\n }}\n className={style({\n filter: 'elevated',\n pointerEvents: 'none',\n animationDuration: 125,\n animationFillMode: 'forwards',\n animationTimingFunction: 'in-out',\n isolation: 'isolate'\n })}\n onAnimationEnd={e => {\n if (e.animationName === exitAnimation) {\n onExited();\n }\n }}\n width={LOUPE_WIDTH + LOUPE_BORDER_WIDTH * 2}\n height={LOUPE_HEIGHT + LOUPE_BORDER_WIDTH * 2}\n ref={loupeRef}\n aria-hidden=\"true\">\n <pattern id={patternId} x=\"0\" y=\"0\" width=\"16\" height=\"16\" patternUnits=\"userSpaceOnUse\">\n <rect fill=\"white\" x=\"0\" y=\"0\" width=\"16\" height=\"16\" />\n <rect fill=\"#E1E1E1\" x=\"0\" y=\"0\" width=\"8\" height=\"8\" />\n <rect fill=\"#E1E1E1\" x=\"8\" y=\"8\" width=\"8\" height=\"8\" />\n </pattern>\n <path\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={`url(#${patternId})`} />\n <path\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={color.toString()} />\n <path\n className={style({\n strokeWidth: 1,\n stroke: {\n default: 'transparent-black-200',\n forcedColors: 'ButtonBorder'\n },\n fill: 'white'\n })}\n d=\"M25 3A21.98 21.98 0 003 25c0 6.2 4 14.794 11.568 24.853A144.233 144.233 0 0025 62.132a144.085 144.085 0 0010.4-12.239C42.99 39.816 47 31.209 47 25A21.98 21.98 0 0025 3m0-2a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\" />\n </svg>\n );\n}\n"],"names":[],"version":3,"file":"ColorHandle.cjs.map"}
|
package/dist/ColorHandle.css
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
@layer _.a {
|
|
2
|
-
.
|
|
2
|
+
._S-1oihi8a {
|
|
3
3
|
transition-property: width, height;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
._U-375x7f {
|
|
7
7
|
transition-duration: .15s;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
._Va {
|
|
11
11
|
transition-timing-function: cubic-bezier(.45, 0, .4, 1);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
.kE {
|
|
15
15
|
width: calc(1rem * var(--s2-scale));
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.kU {
|
|
19
19
|
width: calc(2rem * var(--s2-scale));
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
22
|
+
.jE {
|
|
23
23
|
height: calc(1rem * var(--s2-scale));
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
.jU {
|
|
27
27
|
height: calc(2rem * var(--s2-scale));
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -31,127 +31,163 @@
|
|
|
31
31
|
background-color: var(--lightningcss-light, #e9e9e9) var(--lightningcss-dark, #2c2c2c);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
.tc {
|
|
35
35
|
border-top-width: 2px;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.
|
|
38
|
+
.uc {
|
|
39
39
|
border-bottom-width: 2px;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
.rc {
|
|
43
43
|
border-inline-start-width: 2px;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.
|
|
46
|
+
.sc {
|
|
47
47
|
border-inline-end-width: 2px;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.
|
|
51
|
-
border-color: #fff;
|
|
50
|
+
.xc {
|
|
51
|
+
border-top-color: #fff;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.xi {
|
|
55
|
+
border-top-color: var(--lightningcss-light, #dadada) var(--lightningcss-dark, #393939);
|
|
52
56
|
}
|
|
53
57
|
|
|
54
|
-
.
|
|
55
|
-
border-color:
|
|
58
|
+
.yc {
|
|
59
|
+
border-bottom-color: #fff;
|
|
56
60
|
}
|
|
57
61
|
|
|
58
|
-
.
|
|
62
|
+
.yi {
|
|
63
|
+
border-bottom-color: var(--lightningcss-light, #dadada) var(--lightningcss-dark, #393939);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.vc {
|
|
67
|
+
border-inline-start-color: #fff;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.vi {
|
|
71
|
+
border-inline-start-color: var(--lightningcss-light, #dadada) var(--lightningcss-dark, #393939);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.wc {
|
|
75
|
+
border-inline-end-color: #fff;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.wi {
|
|
79
|
+
border-inline-end-color: var(--lightningcss-light, #dadada) var(--lightningcss-dark, #393939);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
._Pb {
|
|
59
83
|
outline-style: solid;
|
|
60
84
|
}
|
|
61
85
|
|
|
62
|
-
.
|
|
86
|
+
._Rb {
|
|
63
87
|
outline-width: 1px;
|
|
64
88
|
}
|
|
65
89
|
|
|
66
|
-
.
|
|
90
|
+
.cb42 {
|
|
67
91
|
outline-color: #0000006b;
|
|
68
92
|
}
|
|
69
93
|
|
|
70
|
-
.
|
|
94
|
+
.kb {
|
|
71
95
|
width: 100%;
|
|
72
96
|
}
|
|
73
97
|
|
|
74
|
-
.
|
|
98
|
+
.jb {
|
|
75
99
|
height: 100%;
|
|
76
100
|
}
|
|
77
101
|
|
|
78
|
-
.
|
|
102
|
+
._zf {
|
|
79
103
|
border-start-start-radius: 9999px;
|
|
80
104
|
}
|
|
81
105
|
|
|
82
|
-
.
|
|
106
|
+
._Af {
|
|
83
107
|
border-start-end-radius: 9999px;
|
|
84
108
|
}
|
|
85
109
|
|
|
86
|
-
.
|
|
110
|
+
._Bf {
|
|
87
111
|
border-end-start-radius: 9999px;
|
|
88
112
|
}
|
|
89
113
|
|
|
90
|
-
.
|
|
114
|
+
._Cf {
|
|
91
115
|
border-end-end-radius: 9999px;
|
|
92
116
|
}
|
|
93
117
|
|
|
94
|
-
.
|
|
118
|
+
.__ra {
|
|
95
119
|
box-sizing: border-box;
|
|
96
120
|
}
|
|
97
121
|
|
|
98
|
-
.
|
|
122
|
+
.za {
|
|
99
123
|
border-style: solid;
|
|
100
124
|
}
|
|
101
125
|
|
|
102
|
-
.
|
|
126
|
+
.tb {
|
|
103
127
|
border-top-width: 1px;
|
|
104
128
|
}
|
|
105
129
|
|
|
106
|
-
.
|
|
130
|
+
.ub {
|
|
107
131
|
border-bottom-width: 1px;
|
|
108
132
|
}
|
|
109
133
|
|
|
110
|
-
.
|
|
134
|
+
.rb {
|
|
111
135
|
border-inline-start-width: 1px;
|
|
112
136
|
}
|
|
113
137
|
|
|
114
|
-
.
|
|
138
|
+
.sb {
|
|
115
139
|
border-inline-end-width: 1px;
|
|
116
140
|
}
|
|
117
141
|
|
|
118
|
-
.
|
|
119
|
-
border-color: #0000006b;
|
|
142
|
+
.xb42 {
|
|
143
|
+
border-top-color: #0000006b;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.yb42 {
|
|
147
|
+
border-bottom-color: #0000006b;
|
|
120
148
|
}
|
|
121
149
|
|
|
122
|
-
.
|
|
150
|
+
.vb42 {
|
|
151
|
+
border-inline-start-color: #0000006b;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.wb42 {
|
|
155
|
+
border-inline-end-color: #0000006b;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
._yb {
|
|
123
159
|
filter: drop-shadow(0 2px 8px var(--lightningcss-light, #00000029) var(--lightningcss-dark, #0000007a));
|
|
124
160
|
}
|
|
125
161
|
|
|
126
|
-
.
|
|
162
|
+
.__Fa {
|
|
127
163
|
pointer-events: none;
|
|
128
164
|
}
|
|
129
165
|
|
|
130
|
-
.
|
|
166
|
+
._X-375x4t {
|
|
131
167
|
animation-duration: .125s;
|
|
132
168
|
}
|
|
133
169
|
|
|
134
|
-
.
|
|
170
|
+
._0b {
|
|
135
171
|
animation-fill-mode: forwards;
|
|
136
172
|
}
|
|
137
173
|
|
|
138
|
-
.
|
|
174
|
+
._2a {
|
|
139
175
|
animation-timing-function: cubic-bezier(.45, 0, .4, 1);
|
|
140
176
|
}
|
|
141
177
|
|
|
142
|
-
.
|
|
178
|
+
.__Ja {
|
|
143
179
|
isolation: isolate;
|
|
144
180
|
}
|
|
145
181
|
|
|
146
|
-
.
|
|
182
|
+
.Ab {
|
|
147
183
|
stroke-width: 1px;
|
|
148
184
|
}
|
|
149
185
|
|
|
150
|
-
.
|
|
186
|
+
.e_____n {
|
|
151
187
|
stroke: #0000001f;
|
|
152
188
|
}
|
|
153
189
|
|
|
154
|
-
.
|
|
190
|
+
.dA {
|
|
155
191
|
fill: #fff;
|
|
156
192
|
}
|
|
157
193
|
}
|
|
@@ -160,15 +196,27 @@
|
|
|
160
196
|
|
|
161
197
|
@layer _.b.a {
|
|
162
198
|
@media (forced-colors: active) {
|
|
163
|
-
.
|
|
199
|
+
.ca_____I {
|
|
164
200
|
outline-color: buttonborder;
|
|
165
201
|
}
|
|
166
202
|
|
|
167
|
-
.
|
|
168
|
-
border-color: buttonborder;
|
|
203
|
+
.xa_____I {
|
|
204
|
+
border-top-color: buttonborder;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.ya_____I {
|
|
208
|
+
border-bottom-color: buttonborder;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.va_____I {
|
|
212
|
+
border-inline-start-color: buttonborder;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.wa_____I {
|
|
216
|
+
border-inline-end-color: buttonborder;
|
|
169
217
|
}
|
|
170
218
|
|
|
171
|
-
.
|
|
219
|
+
.ea_____K {
|
|
172
220
|
stroke: buttonborder;
|
|
173
221
|
}
|
|
174
222
|
}
|
package/dist/ColorHandle.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"ACiCiB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAgCI;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAkFJ;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA6BE;;;;EAAA;;;;EAAA;;;;;AA/IF;;AAAA;EAAA;IAAA;;;;IAgCI;;;;IA+GF;;;;;;AAtDI;;;;;;;AAOD","sources":["e345175c46126410","packages/@react-spectrum/s2/src/ColorHandle.tsx"],"sourcesContent":["@import \"63203eb3a948f993\";\n@import \"ba33a56d675003f7\";\n@import \"bf115cb0a25c2b12\";\n@import \"5d32c8c9143517d5\";\n@import \"cf10a6b7558ccf38\";\n@import \"d7c9e49b2d44a61e\";\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {cloneElement, JSX, RefObject, useState} from 'react';\nimport {ColorThumb} from 'react-aria-components';\nimport {createPortal} from 'react-dom';\nimport {keyframes} from '../style/style-macro' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useId, useLayoutEffect} from '@react-aria/utils';\n\nconst HANDLE_SIZE = 16;\nconst LOUPE_HEIGHT = 64; // Does not include borders\nconst LOUPE_WIDTH = 48;\nconst LOUPE_BORDER_WIDTH = 1;\nconst LOUPE_OFFSET = 12; // Offset from handle to loupe\n\ninterface ColorHandleProps {\n containerRef: RefObject<HTMLElement | null>,\n getPosition: () => {x: number, y: number}\n}\n\nexport function ColorHandle({containerRef, getPosition}: ColorHandleProps) {\n return (\n <ColorThumb\n className={style({\n transition: '[width, height]',\n size: {\n default: HANDLE_SIZE,\n isFocusVisible: 32\n },\n backgroundColor: {\n isDisabled: 'disabled'\n },\n borderRadius: 'full',\n boxSizing: 'border-box',\n borderStyle: 'solid',\n borderWidth: 2,\n borderColor: {\n default: 'white',\n isDisabled: 'disabled'\n },\n outlineStyle: 'solid',\n outlineWidth: 1,\n outlineColor: {\n default: 'black/42',\n forcedColors: 'ButtonBorder'\n }\n })}\n style={({defaultStyle, isDisabled}) => ({\n background: isDisabled ? undefined : `linear-gradient(${defaultStyle.backgroundColor}, ${defaultStyle.backgroundColor}), repeating-conic-gradient(#E1E1E1 0% 25%, white 0% 50%) 50% / 16px 16px`,\n backgroundColor: undefined,\n top: defaultStyle.top || '50%',\n left: defaultStyle.left || '50%'\n })}>\n {({isDragging, color}) => (<>\n <div\n className={style({\n size: 'full',\n borderRadius: 'full',\n boxSizing: 'border-box',\n borderStyle: 'solid',\n borderWidth: 1,\n borderColor: {\n default: 'black/42',\n forcedColors: 'ButtonBorder'\n }\n })} />\n <ColorLoupePortal isOpen={isDragging}>\n <ColorLoupe containerRef={containerRef} color={color} getPosition={getPosition} />\n </ColorLoupePortal>\n </>)}\n </ColorThumb>\n );\n}\n\n// ColorLoupe is rendered in a portal so that it breaks out of clipped/scrolling containers (e.g. popovers).\nfunction ColorLoupePortal({isOpen, children}: { isOpen: boolean, children: JSX.Element }) {\n let [state, setState] = useState(isOpen ? 'open' : 'closed');\n if (isOpen && state === 'closed') {\n setState('open');\n }\n\n if (!isOpen && state === 'open') {\n setState('exiting');\n }\n\n if (isOpen || state === 'exiting') {\n return createPortal(cloneElement(children, {isExiting: state === 'exiting', onExited: () => setState('closed')}), document.body);\n }\n\n return null;\n}\n\nfunction ColorLoupe({isExiting, onExited, containerRef, loupeRef, getPosition, color}: any) {\n let patternId = useId();\n\n // Get the bounding rectangle of the container (e.g. ColorArea/ColorSlider).\n let [containerRect, setContainerRect] = useState({top: 0, left: 0, width: 0, height: 0});\n useLayoutEffect(() => {\n let rect = containerRef.current?.getBoundingClientRect();\n setContainerRect({\n top: rect?.top || 0,\n left: rect?.left || 0,\n width: rect?.width || 0,\n height: rect?.height || 0\n });\n }, [containerRef]);\n\n // Compute the pixel position of the thumb.\n let {x: thumbLeft, y: thumbTop} = getPosition();\n thumbTop *= containerRect.height;\n thumbLeft *= containerRect.width;\n\n let enterAnimation = keyframes(`\n from {\n transform: translateY(8px);\n opacity: 0;\n }\n `);\n\n let exitAnimation = keyframes(`\n to {\n transform: translateY(8px);\n opacity: 0;\n }\n `);\n\n return (\n <svg\n style={{\n // Position relative to the viewport.\n position: 'fixed',\n top: containerRect.top + thumbTop,\n left: containerRect.left + thumbLeft,\n marginTop: -LOUPE_HEIGHT - LOUPE_BORDER_WIDTH * 2 - HANDLE_SIZE / 2 - LOUPE_OFFSET,\n marginLeft: -LOUPE_WIDTH / 2 - LOUPE_BORDER_WIDTH,\n animationName: isExiting ? exitAnimation : enterAnimation\n }}\n className={style({\n filter: 'elevated',\n pointerEvents: 'none',\n animationDuration: 125,\n animationFillMode: 'forwards',\n animationTimingFunction: 'in-out',\n isolation: 'isolate'\n })}\n onAnimationEnd={e => {\n if (e.animationName === exitAnimation) {\n onExited();\n }\n }}\n width={LOUPE_WIDTH + LOUPE_BORDER_WIDTH * 2}\n height={LOUPE_HEIGHT + LOUPE_BORDER_WIDTH * 2}\n ref={loupeRef}\n aria-hidden=\"true\">\n <pattern id={patternId} x=\"0\" y=\"0\" width=\"16\" height=\"16\" patternUnits=\"userSpaceOnUse\">\n <rect fill=\"white\" x=\"0\" y=\"0\" width=\"16\" height=\"16\" />\n <rect fill=\"#E1E1E1\" x=\"0\" y=\"0\" width=\"8\" height=\"8\" />\n <rect fill=\"#E1E1E1\" x=\"8\" y=\"8\" width=\"8\" height=\"8\" />\n </pattern>\n <path\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={`url(#${patternId})`} />\n <path\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={color.toString()} />\n <path\n className={style({\n strokeWidth: 1,\n stroke: {\n default: 'transparent-black-200',\n forcedColors: 'ButtonBorder'\n },\n fill: 'white'\n })}\n d=\"M25 3A21.98 21.98 0 003 25c0 6.2 4 14.794 11.568 24.853A144.233 144.233 0 0025 62.132a144.085 144.085 0 0010.4-12.239C42.99 39.816 47 31.209 47 25A21.98 21.98 0 0025 3m0-2a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\" />\n </svg>\n );\n}\n"],"names":[],"version":3,"file":"ColorHandle.css.map"}
|
|
1
|
+
{"mappings":"ACiCiB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAgCI;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAkFJ;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA6BE;;;;EAAA;;;;EAAA;;;;;AA/IF;;AAAA;EAAA;IAAA;;;;IAgCI;;;;IAAA;;;;IAAA;;;;IAAA;;;;IA+GF;;;;;;AAtDI;;;;;;;AAOD","sources":["e345175c46126410","packages/@react-spectrum/s2/src/ColorHandle.tsx"],"sourcesContent":["@import \"63203eb3a948f993\";\n@import \"ba33a56d675003f7\";\n@import \"bf115cb0a25c2b12\";\n@import \"5d32c8c9143517d5\";\n@import \"cf10a6b7558ccf38\";\n@import \"d7c9e49b2d44a61e\";\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {cloneElement, JSX, RefObject, useState} from 'react';\nimport {ColorThumb} from 'react-aria-components';\nimport {createPortal} from 'react-dom';\nimport {keyframes} from '../style/style-macro' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useId, useLayoutEffect} from '@react-aria/utils';\n\nconst HANDLE_SIZE = 16;\nconst LOUPE_HEIGHT = 64; // Does not include borders\nconst LOUPE_WIDTH = 48;\nconst LOUPE_BORDER_WIDTH = 1;\nconst LOUPE_OFFSET = 12; // Offset from handle to loupe\n\ninterface ColorHandleProps {\n containerRef: RefObject<HTMLElement | null>,\n getPosition: () => {x: number, y: number}\n}\n\nexport function ColorHandle({containerRef, getPosition}: ColorHandleProps) {\n return (\n <ColorThumb\n className={style({\n transition: '[width, height]',\n size: {\n default: HANDLE_SIZE,\n isFocusVisible: 32\n },\n backgroundColor: {\n isDisabled: 'disabled'\n },\n borderRadius: 'full',\n boxSizing: 'border-box',\n borderStyle: 'solid',\n borderWidth: 2,\n borderColor: {\n default: 'white',\n isDisabled: 'disabled'\n },\n outlineStyle: 'solid',\n outlineWidth: 1,\n outlineColor: {\n default: 'black/42',\n forcedColors: 'ButtonBorder'\n }\n })}\n style={({defaultStyle, isDisabled}) => ({\n background: isDisabled ? undefined : `linear-gradient(${defaultStyle.backgroundColor}, ${defaultStyle.backgroundColor}), repeating-conic-gradient(#E1E1E1 0% 25%, white 0% 50%) 50% / 16px 16px`,\n backgroundColor: undefined,\n top: defaultStyle.top || '50%',\n left: defaultStyle.left || '50%'\n })}>\n {({isDragging, color}) => (<>\n <div\n className={style({\n size: 'full',\n borderRadius: 'full',\n boxSizing: 'border-box',\n borderStyle: 'solid',\n borderWidth: 1,\n borderColor: {\n default: 'black/42',\n forcedColors: 'ButtonBorder'\n }\n })} />\n <ColorLoupePortal isOpen={isDragging}>\n <ColorLoupe containerRef={containerRef} color={color} getPosition={getPosition} />\n </ColorLoupePortal>\n </>)}\n </ColorThumb>\n );\n}\n\n// ColorLoupe is rendered in a portal so that it breaks out of clipped/scrolling containers (e.g. popovers).\nfunction ColorLoupePortal({isOpen, children}: { isOpen: boolean, children: JSX.Element }) {\n let [state, setState] = useState(isOpen ? 'open' : 'closed');\n if (isOpen && state === 'closed') {\n setState('open');\n }\n\n if (!isOpen && state === 'open') {\n setState('exiting');\n }\n\n if (isOpen || state === 'exiting') {\n return createPortal(cloneElement(children, {isExiting: state === 'exiting', onExited: () => setState('closed')}), document.body);\n }\n\n return null;\n}\n\nfunction ColorLoupe({isExiting, onExited, containerRef, loupeRef, getPosition, color}: any) {\n let patternId = useId();\n\n // Get the bounding rectangle of the container (e.g. ColorArea/ColorSlider).\n let [containerRect, setContainerRect] = useState({top: 0, left: 0, width: 0, height: 0});\n useLayoutEffect(() => {\n let rect = containerRef.current?.getBoundingClientRect();\n setContainerRect({\n top: rect?.top || 0,\n left: rect?.left || 0,\n width: rect?.width || 0,\n height: rect?.height || 0\n });\n }, [containerRef]);\n\n // Compute the pixel position of the thumb.\n let {x: thumbLeft, y: thumbTop} = getPosition();\n thumbTop *= containerRect.height;\n thumbLeft *= containerRect.width;\n\n let enterAnimation = keyframes(`\n from {\n transform: translateY(8px);\n opacity: 0;\n }\n `);\n\n let exitAnimation = keyframes(`\n to {\n transform: translateY(8px);\n opacity: 0;\n }\n `);\n\n return (\n <svg\n style={{\n // Position relative to the viewport.\n position: 'fixed',\n top: containerRect.top + thumbTop,\n left: containerRect.left + thumbLeft,\n marginTop: -LOUPE_HEIGHT - LOUPE_BORDER_WIDTH * 2 - HANDLE_SIZE / 2 - LOUPE_OFFSET,\n marginLeft: -LOUPE_WIDTH / 2 - LOUPE_BORDER_WIDTH,\n animationName: isExiting ? exitAnimation : enterAnimation\n }}\n className={style({\n filter: 'elevated',\n pointerEvents: 'none',\n animationDuration: 125,\n animationFillMode: 'forwards',\n animationTimingFunction: 'in-out',\n isolation: 'isolate'\n })}\n onAnimationEnd={e => {\n if (e.animationName === exitAnimation) {\n onExited();\n }\n }}\n width={LOUPE_WIDTH + LOUPE_BORDER_WIDTH * 2}\n height={LOUPE_HEIGHT + LOUPE_BORDER_WIDTH * 2}\n ref={loupeRef}\n aria-hidden=\"true\">\n <pattern id={patternId} x=\"0\" y=\"0\" width=\"16\" height=\"16\" patternUnits=\"userSpaceOnUse\">\n <rect fill=\"white\" x=\"0\" y=\"0\" width=\"16\" height=\"16\" />\n <rect fill=\"#E1E1E1\" x=\"0\" y=\"0\" width=\"8\" height=\"8\" />\n <rect fill=\"#E1E1E1\" x=\"8\" y=\"8\" width=\"8\" height=\"8\" />\n </pattern>\n <path\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={`url(#${patternId})`} />\n <path\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={color.toString()} />\n <path\n className={style({\n strokeWidth: 1,\n stroke: {\n default: 'transparent-black-200',\n forcedColors: 'ButtonBorder'\n },\n fill: 'white'\n })}\n d=\"M25 3A21.98 21.98 0 003 25c0 6.2 4 14.794 11.568 24.853A144.233 144.233 0 0025 62.132a144.085 144.085 0 0010.4-12.239C42.99 39.816 47 31.209 47 25A21.98 21.98 0 0025 3m0-2a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\" />\n </svg>\n );\n}\n"],"names":[],"version":3,"file":"ColorHandle.css.map"}
|
package/dist/ColorHandle.mjs
CHANGED
|
@@ -29,30 +29,36 @@ function $b4f7db7c45cd3de9$export$92862704de639678({ containerRef: containerRef,
|
|
|
29
29
|
return /*#__PURE__*/ (0, $kShzN$jsx)((0, $kShzN$ColorThumb), {
|
|
30
30
|
className: function anonymous(props) {
|
|
31
31
|
let rules = " .";
|
|
32
|
-
rules += '
|
|
33
|
-
rules += '
|
|
34
|
-
rules += '
|
|
35
|
-
if (props.isFocusVisible) rules += ' lU';
|
|
36
|
-
else rules += ' lE';
|
|
32
|
+
rules += ' _S-1oihi8a';
|
|
33
|
+
rules += ' _U-375x7f';
|
|
34
|
+
rules += ' _Va';
|
|
37
35
|
if (props.isFocusVisible) rules += ' kU';
|
|
38
36
|
else rules += ' kE';
|
|
37
|
+
if (props.isFocusVisible) rules += ' jU';
|
|
38
|
+
else rules += ' jE';
|
|
39
39
|
if (props.isDisabled) rules += ' bg';
|
|
40
|
-
rules += ' _wf';
|
|
41
|
-
rules += ' _xf';
|
|
42
|
-
rules += ' _yf';
|
|
43
40
|
rules += ' _zf';
|
|
44
|
-
rules += '
|
|
45
|
-
rules += '
|
|
41
|
+
rules += ' _Af';
|
|
42
|
+
rules += ' _Bf';
|
|
43
|
+
rules += ' _Cf';
|
|
44
|
+
rules += ' __ra';
|
|
45
|
+
rules += ' za';
|
|
46
|
+
rules += ' tc';
|
|
46
47
|
rules += ' uc';
|
|
47
|
-
rules += '
|
|
48
|
+
rules += ' rc';
|
|
48
49
|
rules += ' sc';
|
|
49
|
-
rules += '
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
rules += '
|
|
53
|
-
rules += '
|
|
54
|
-
rules += '
|
|
55
|
-
rules += '
|
|
50
|
+
if (props.isDisabled) rules += ' xi';
|
|
51
|
+
else rules += ' xc';
|
|
52
|
+
if (props.isDisabled) rules += ' yi';
|
|
53
|
+
else rules += ' yc';
|
|
54
|
+
if (props.isDisabled) rules += ' vi';
|
|
55
|
+
else rules += ' vc';
|
|
56
|
+
if (props.isDisabled) rules += ' wi';
|
|
57
|
+
else rules += ' wc';
|
|
58
|
+
rules += ' _Pb';
|
|
59
|
+
rules += ' _Rb';
|
|
60
|
+
rules += ' ca_____I';
|
|
61
|
+
rules += ' cb42';
|
|
56
62
|
return rules;
|
|
57
63
|
},
|
|
58
64
|
style: ({ defaultStyle: defaultStyle, isDisabled: isDisabled })=>({
|
|
@@ -64,7 +70,7 @@ function $b4f7db7c45cd3de9$export$92862704de639678({ containerRef: containerRef,
|
|
|
64
70
|
children: ({ isDragging: isDragging, color: color })=>/*#__PURE__*/ (0, $kShzN$jsxs)((0, $kShzN$Fragment), {
|
|
65
71
|
children: [
|
|
66
72
|
/*#__PURE__*/ (0, $kShzN$jsx)("div", {
|
|
67
|
-
className: "
|
|
73
|
+
className: " kb jb _zf _Af _Bf _Cf __ra za tb ub rb sb xb42 xa_____I yb42 ya_____I vb42 va_____I wb42 wa_____I"
|
|
68
74
|
}),
|
|
69
75
|
/*#__PURE__*/ (0, $kShzN$jsx)($b4f7db7c45cd3de9$var$ColorLoupePortal, {
|
|
70
76
|
isOpen: isDragging,
|
|
@@ -125,7 +131,7 @@ function $b4f7db7c45cd3de9$var$ColorLoupe({ isExiting: isExiting, onExited: onEx
|
|
|
125
131
|
marginLeft: -$b4f7db7c45cd3de9$var$LOUPE_WIDTH / 2 - $b4f7db7c45cd3de9$var$LOUPE_BORDER_WIDTH,
|
|
126
132
|
animationName: isExiting ? exitAnimation : enterAnimation
|
|
127
133
|
},
|
|
128
|
-
className: "
|
|
134
|
+
className: " _yb __Fa _X-375x4t _0b _2a __Ja",
|
|
129
135
|
onAnimationEnd: (e)=>{
|
|
130
136
|
if (e.animationName === exitAnimation) onExited();
|
|
131
137
|
},
|
|
@@ -174,7 +180,7 @@ function $b4f7db7c45cd3de9$var$ColorLoupe({ isExiting: isExiting, onExited: onEx
|
|
|
174
180
|
fill: color.toString()
|
|
175
181
|
}),
|
|
176
182
|
/*#__PURE__*/ (0, $kShzN$jsx)("path", {
|
|
177
|
-
className: "
|
|
183
|
+
className: " Ab e_____n ea_____K dA",
|
|
178
184
|
d: "M25 3A21.98 21.98 0 003 25c0 6.2 4 14.794 11.568 24.853A144.233 144.233 0 0025 62.132a144.085 144.085 0 0010.4-12.239C42.99 39.816 47 31.209 47 25A21.98 21.98 0 0025 3m0-2a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z"
|
|
179
185
|
})
|
|
180
186
|
]
|
package/dist/ColorHandle.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AASD,MAAM,oCAAc;AACpB,MAAM,qCAAe,IAAI,2BAA2B;AACpD,MAAM,oCAAc;AACpB,MAAM,2CAAqB;AAC3B,MAAM,qCAAe,IAAI,8BAA8B;AAOhD,SAAS,0CAAY,gBAAC,YAAY,eAAE,WAAW,EAAmB;IACvE,qBACE,gBAAC,CAAA,GAAA,iBAAS;QACR
|
|
1
|
+
{"mappings":"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","sources":["packages/@react-spectrum/s2/src/ColorHandle.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {cloneElement, JSX, RefObject, useState} from 'react';\nimport {ColorThumb} from 'react-aria-components';\nimport {createPortal} from 'react-dom';\nimport {keyframes} from '../style/style-macro' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useId, useLayoutEffect} from '@react-aria/utils';\n\nconst HANDLE_SIZE = 16;\nconst LOUPE_HEIGHT = 64; // Does not include borders\nconst LOUPE_WIDTH = 48;\nconst LOUPE_BORDER_WIDTH = 1;\nconst LOUPE_OFFSET = 12; // Offset from handle to loupe\n\ninterface ColorHandleProps {\n containerRef: RefObject<HTMLElement | null>,\n getPosition: () => {x: number, y: number}\n}\n\nexport function ColorHandle({containerRef, getPosition}: ColorHandleProps) {\n return (\n <ColorThumb\n className={style({\n transition: '[width, height]',\n size: {\n default: HANDLE_SIZE,\n isFocusVisible: 32\n },\n backgroundColor: {\n isDisabled: 'disabled'\n },\n borderRadius: 'full',\n boxSizing: 'border-box',\n borderStyle: 'solid',\n borderWidth: 2,\n borderColor: {\n default: 'white',\n isDisabled: 'disabled'\n },\n outlineStyle: 'solid',\n outlineWidth: 1,\n outlineColor: {\n default: 'black/42',\n forcedColors: 'ButtonBorder'\n }\n })}\n style={({defaultStyle, isDisabled}) => ({\n background: isDisabled ? undefined : `linear-gradient(${defaultStyle.backgroundColor}, ${defaultStyle.backgroundColor}), repeating-conic-gradient(#E1E1E1 0% 25%, white 0% 50%) 50% / 16px 16px`,\n backgroundColor: undefined,\n top: defaultStyle.top || '50%',\n left: defaultStyle.left || '50%'\n })}>\n {({isDragging, color}) => (<>\n <div\n className={style({\n size: 'full',\n borderRadius: 'full',\n boxSizing: 'border-box',\n borderStyle: 'solid',\n borderWidth: 1,\n borderColor: {\n default: 'black/42',\n forcedColors: 'ButtonBorder'\n }\n })} />\n <ColorLoupePortal isOpen={isDragging}>\n <ColorLoupe containerRef={containerRef} color={color} getPosition={getPosition} />\n </ColorLoupePortal>\n </>)}\n </ColorThumb>\n );\n}\n\n// ColorLoupe is rendered in a portal so that it breaks out of clipped/scrolling containers (e.g. popovers).\nfunction ColorLoupePortal({isOpen, children}: { isOpen: boolean, children: JSX.Element }) {\n let [state, setState] = useState(isOpen ? 'open' : 'closed');\n if (isOpen && state === 'closed') {\n setState('open');\n }\n\n if (!isOpen && state === 'open') {\n setState('exiting');\n }\n\n if (isOpen || state === 'exiting') {\n return createPortal(cloneElement(children, {isExiting: state === 'exiting', onExited: () => setState('closed')}), document.body);\n }\n\n return null;\n}\n\nfunction ColorLoupe({isExiting, onExited, containerRef, loupeRef, getPosition, color}: any) {\n let patternId = useId();\n\n // Get the bounding rectangle of the container (e.g. ColorArea/ColorSlider).\n let [containerRect, setContainerRect] = useState({top: 0, left: 0, width: 0, height: 0});\n useLayoutEffect(() => {\n let rect = containerRef.current?.getBoundingClientRect();\n setContainerRect({\n top: rect?.top || 0,\n left: rect?.left || 0,\n width: rect?.width || 0,\n height: rect?.height || 0\n });\n }, [containerRef]);\n\n // Compute the pixel position of the thumb.\n let {x: thumbLeft, y: thumbTop} = getPosition();\n thumbTop *= containerRect.height;\n thumbLeft *= containerRect.width;\n\n let enterAnimation = keyframes(`\n from {\n transform: translateY(8px);\n opacity: 0;\n }\n `);\n\n let exitAnimation = keyframes(`\n to {\n transform: translateY(8px);\n opacity: 0;\n }\n `);\n\n return (\n <svg\n style={{\n // Position relative to the viewport.\n position: 'fixed',\n top: containerRect.top + thumbTop,\n left: containerRect.left + thumbLeft,\n marginTop: -LOUPE_HEIGHT - LOUPE_BORDER_WIDTH * 2 - HANDLE_SIZE / 2 - LOUPE_OFFSET,\n marginLeft: -LOUPE_WIDTH / 2 - LOUPE_BORDER_WIDTH,\n animationName: isExiting ? exitAnimation : enterAnimation\n }}\n className={style({\n filter: 'elevated',\n pointerEvents: 'none',\n animationDuration: 125,\n animationFillMode: 'forwards',\n animationTimingFunction: 'in-out',\n isolation: 'isolate'\n })}\n onAnimationEnd={e => {\n if (e.animationName === exitAnimation) {\n onExited();\n }\n }}\n width={LOUPE_WIDTH + LOUPE_BORDER_WIDTH * 2}\n height={LOUPE_HEIGHT + LOUPE_BORDER_WIDTH * 2}\n ref={loupeRef}\n aria-hidden=\"true\">\n <pattern id={patternId} x=\"0\" y=\"0\" width=\"16\" height=\"16\" patternUnits=\"userSpaceOnUse\">\n <rect fill=\"white\" x=\"0\" y=\"0\" width=\"16\" height=\"16\" />\n <rect fill=\"#E1E1E1\" x=\"0\" y=\"0\" width=\"8\" height=\"8\" />\n <rect fill=\"#E1E1E1\" x=\"8\" y=\"8\" width=\"8\" height=\"8\" />\n </pattern>\n <path\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={`url(#${patternId})`} />\n <path\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={color.toString()} />\n <path\n className={style({\n strokeWidth: 1,\n stroke: {\n default: 'transparent-black-200',\n forcedColors: 'ButtonBorder'\n },\n fill: 'white'\n })}\n d=\"M25 3A21.98 21.98 0 003 25c0 6.2 4 14.794 11.568 24.853A144.233 144.233 0 0025 62.132a144.085 144.085 0 0010.4-12.239C42.99 39.816 47 31.209 47 25A21.98 21.98 0 0025 3m0-2a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\" />\n </svg>\n );\n}\n"],"names":[],"version":3,"file":"ColorHandle.mjs.map"}
|
package/dist/ColorSlider.cjs
CHANGED
|
@@ -46,19 +46,19 @@ const $fdd6f3d03620d438$export$44fd664bcca5b6fb = /*#__PURE__*/ (0, $hkRua$react
|
|
|
46
46
|
"aria-label": props['aria-label'] || (props.orientation === 'vertical' ? props.label : undefined),
|
|
47
47
|
className: (renderProps)=>UNSAFE_className + function anonymous(props, overrides) {
|
|
48
48
|
let rules = " .";
|
|
49
|
-
let matches = (overrides || '').match(/(?:^|\s)(?:
|
|
49
|
+
let matches = (overrides || '').match(/(?:^|\s)(?:B|C|D|E|__d|__c|g|_9|_8|__E|__g|__h|__e|__f|Y|__U|_b|_d|Z|_a|k|p|q)[^\s]+/g) || [];
|
|
50
50
|
rules += matches.join('');
|
|
51
|
-
let $
|
|
52
|
-
for (let p of matches)if (/^\s*
|
|
53
|
-
if (!$
|
|
54
|
-
if (props.orientation === "horizontal") rules += '
|
|
51
|
+
let $k = false;
|
|
52
|
+
for (let p of matches)if (/^\s*k/.test(p)) $k = true;
|
|
53
|
+
if (!$k) {
|
|
54
|
+
if (props.orientation === "horizontal") rules += ' k___u';
|
|
55
55
|
}
|
|
56
|
-
if (props.orientation === "vertical") rules += '
|
|
57
|
-
if (props.orientation === "vertical") rules += '
|
|
58
|
-
else if (props.orientation === "horizontal") rules += '
|
|
59
|
-
rules += '
|
|
60
|
-
rules += '
|
|
61
|
-
rules += '
|
|
56
|
+
if (props.orientation === "vertical") rules += ' j___u';
|
|
57
|
+
if (props.orientation === "vertical") rules += ' _3a';
|
|
58
|
+
else if (props.orientation === "horizontal") rules += ' _3f';
|
|
59
|
+
rules += ' __l-15pd573';
|
|
60
|
+
rules += ' __n-1kch5qg';
|
|
61
|
+
rules += ' hc';
|
|
62
62
|
return rules;
|
|
63
63
|
}(renderProps, styles),
|
|
64
64
|
children: ({ isDisabled: isDisabled, orientation: orientation, state: state })=>/*#__PURE__*/ (0, $hkRua$reactjsxruntime.jsxs)((0, $hkRua$reactjsxruntime.Fragment), {
|
|
@@ -75,37 +75,37 @@ const $fdd6f3d03620d438$export$44fd664bcca5b6fb = /*#__PURE__*/ (0, $hkRua$react
|
|
|
75
75
|
orientation === 'horizontal' && /*#__PURE__*/ (0, $hkRua$reactjsxruntime.jsx)((0, $hkRua$reactariacomponents.SliderOutput), {
|
|
76
76
|
className: function anonymous(props) {
|
|
77
77
|
let rules = " .";
|
|
78
|
-
rules += ' __b-ny5g4a';
|
|
79
|
-
rules += ' __c-ny5g4a';
|
|
80
|
-
rules += ' __d-ny5g4a';
|
|
81
78
|
rules += ' __e-ny5g4a';
|
|
82
|
-
rules += '
|
|
83
|
-
rules += '
|
|
84
|
-
rules += '
|
|
85
|
-
rules += '
|
|
86
|
-
rules += '
|
|
87
|
-
rules += '
|
|
88
|
-
rules += '
|
|
89
|
-
rules += '
|
|
79
|
+
rules += ' __f-ny5g4a';
|
|
80
|
+
rules += ' __g-ny5g4a';
|
|
81
|
+
rules += ' __h-ny5g4a';
|
|
82
|
+
rules += ' _g-bc1l9oh';
|
|
83
|
+
rules += ' _g-1uotwbwg';
|
|
84
|
+
rules += ' _g-eo0c6sf';
|
|
85
|
+
rules += ' _g-enzzrge';
|
|
86
|
+
rules += ' _g-enzykdd';
|
|
87
|
+
rules += ' _g-enzwzjc';
|
|
88
|
+
rules += ' _g-enzrfpb';
|
|
89
|
+
rules += ' _ga';
|
|
90
90
|
if (props.size === "XL") {
|
|
91
|
-
rules += '
|
|
92
|
-
rules += '
|
|
91
|
+
rules += ' _hbj';
|
|
92
|
+
rules += ' _hi';
|
|
93
93
|
} else if (props.size === "L") {
|
|
94
|
-
rules += '
|
|
95
|
-
rules += '
|
|
94
|
+
rules += ' _hbh';
|
|
95
|
+
rules += ' _hg';
|
|
96
96
|
} else if (props.size === "S") {
|
|
97
|
-
rules += '
|
|
98
|
-
rules += '
|
|
97
|
+
rules += ' _hbd';
|
|
98
|
+
rules += ' _hc';
|
|
99
99
|
} else if (props.size === "XS") {
|
|
100
|
-
rules += '
|
|
101
|
-
rules += '
|
|
100
|
+
rules += ' _hbb';
|
|
101
|
+
rules += ' _ha';
|
|
102
102
|
} else {
|
|
103
|
-
rules += '
|
|
104
|
-
rules += '
|
|
103
|
+
rules += ' _hbf';
|
|
104
|
+
rules += ' _he';
|
|
105
105
|
}
|
|
106
|
-
rules += '
|
|
107
|
-
rules += '
|
|
108
|
-
rules += '
|
|
106
|
+
rules += ' _ib';
|
|
107
|
+
rules += ' _j-1x99dlob';
|
|
108
|
+
rules += ' _ja';
|
|
109
109
|
if (props.isDisabled) rules += ' aj';
|
|
110
110
|
else {
|
|
111
111
|
if (props.isPressed) rules += ' an';
|
|
@@ -113,7 +113,7 @@ const $fdd6f3d03620d438$export$44fd664bcca5b6fb = /*#__PURE__*/ (0, $hkRua$react
|
|
|
113
113
|
else if (props.isHovered) rules += ' an';
|
|
114
114
|
else rules += ' am';
|
|
115
115
|
}
|
|
116
|
-
rules += '
|
|
116
|
+
rules += ' __Lb';
|
|
117
117
|
return rules;
|
|
118
118
|
}
|
|
119
119
|
}),
|
|
@@ -124,24 +124,24 @@ const $fdd6f3d03620d438$export$44fd664bcca5b6fb = /*#__PURE__*/ (0, $hkRua$react
|
|
|
124
124
|
}),
|
|
125
125
|
className: function anonymous(props) {
|
|
126
126
|
let rules = " .";
|
|
127
|
-
rules += ' __b-n9hk5a';
|
|
128
|
-
rules += ' __c-n9hk5a';
|
|
129
|
-
rules += ' __d-n9hk5a';
|
|
130
127
|
rules += ' __e-n9hk5a';
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
rules += '
|
|
136
|
-
rules += '
|
|
137
|
-
rules += '
|
|
128
|
+
rules += ' __f-n9hk5a';
|
|
129
|
+
rules += ' __g-n9hk5a';
|
|
130
|
+
rules += ' __h-n9hk5a';
|
|
131
|
+
if (props.orientation === "vertical") rules += ' kM';
|
|
132
|
+
else if (props.orientation === "horizontal") rules += ' kb';
|
|
133
|
+
if (props.orientation === "vertical") rules += ' jb';
|
|
134
|
+
else if (props.orientation === "horizontal") rules += ' jM';
|
|
138
135
|
rules += ' _zc';
|
|
139
|
-
rules += '
|
|
140
|
-
rules += '
|
|
141
|
-
rules += '
|
|
142
|
-
rules += '
|
|
143
|
-
|
|
144
|
-
|
|
136
|
+
rules += ' _Ac';
|
|
137
|
+
rules += ' _Bc';
|
|
138
|
+
rules += ' _Cc';
|
|
139
|
+
rules += ' ca_____I';
|
|
140
|
+
rules += ' cp10';
|
|
141
|
+
rules += ' _Rb';
|
|
142
|
+
rules += ' _Q-3hmpv';
|
|
143
|
+
if (props.isDisabled) rules += ' _Pa';
|
|
144
|
+
else rules += ' _Pb';
|
|
145
145
|
if (props.isDisabled) rules += ' bg';
|
|
146
146
|
return rules;
|
|
147
147
|
},
|