react-aria-components 1.6.0 → 1.7.1
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/README.md +1 -1
- package/dist/Autocomplete.main.js +23 -12
- package/dist/Autocomplete.main.js.map +1 -1
- package/dist/Autocomplete.mjs +23 -12
- package/dist/Autocomplete.module.js +23 -12
- package/dist/Autocomplete.module.js.map +1 -1
- package/dist/Checkbox.main.js +1 -1
- package/dist/Checkbox.main.js.map +1 -1
- package/dist/Checkbox.mjs +1 -1
- package/dist/Checkbox.module.js +1 -1
- package/dist/Checkbox.module.js.map +1 -1
- package/dist/Collection.main.js.map +1 -1
- package/dist/Collection.module.js.map +1 -1
- package/dist/ColorArea.main.js +4 -4
- package/dist/ColorArea.main.js.map +1 -1
- package/dist/ColorArea.mjs +2 -2
- package/dist/ColorArea.module.js +2 -2
- package/dist/ColorArea.module.js.map +1 -1
- package/dist/ColorField.main.js +8 -10
- package/dist/ColorField.main.js.map +1 -1
- package/dist/ColorField.mjs +4 -6
- package/dist/ColorField.module.js +4 -6
- package/dist/ColorField.module.js.map +1 -1
- package/dist/ColorPicker.main.js +2 -2
- package/dist/ColorPicker.main.js.map +1 -1
- package/dist/ColorPicker.mjs +1 -1
- package/dist/ColorPicker.module.js +1 -1
- package/dist/ColorPicker.module.js.map +1 -1
- package/dist/ColorSlider.main.js +5 -7
- package/dist/ColorSlider.main.js.map +1 -1
- package/dist/ColorSlider.mjs +3 -5
- package/dist/ColorSlider.module.js +3 -5
- package/dist/ColorSlider.module.js.map +1 -1
- package/dist/ColorSwatch.main.js +2 -2
- package/dist/ColorSwatch.main.js.map +1 -1
- package/dist/ColorSwatch.mjs +1 -1
- package/dist/ColorSwatch.module.js +1 -1
- package/dist/ColorSwatch.module.js.map +1 -1
- package/dist/ColorSwatchPicker.main.js +3 -3
- package/dist/ColorSwatchPicker.main.js.map +1 -1
- package/dist/ColorSwatchPicker.mjs +1 -1
- package/dist/ColorSwatchPicker.module.js +1 -1
- package/dist/ColorSwatchPicker.module.js.map +1 -1
- package/dist/ColorThumb.main.js +2 -6
- package/dist/ColorThumb.main.js.map +1 -1
- package/dist/ColorThumb.mjs +1 -5
- package/dist/ColorThumb.module.js +1 -5
- package/dist/ColorThumb.module.js.map +1 -1
- package/dist/ColorWheel.main.js +4 -4
- package/dist/ColorWheel.main.js.map +1 -1
- package/dist/ColorWheel.mjs +2 -2
- package/dist/ColorWheel.module.js +2 -2
- package/dist/ColorWheel.module.js.map +1 -1
- package/dist/ComboBox.main.js +1 -1
- package/dist/ComboBox.main.js.map +1 -1
- package/dist/ComboBox.mjs +1 -1
- package/dist/ComboBox.module.js +1 -1
- package/dist/ComboBox.module.js.map +1 -1
- package/dist/DateField.main.js +4 -3
- package/dist/DateField.main.js.map +1 -1
- package/dist/DateField.mjs +4 -3
- package/dist/DateField.module.js +4 -3
- package/dist/DateField.module.js.map +1 -1
- package/dist/DatePicker.main.js +2 -2
- package/dist/DatePicker.main.js.map +1 -1
- package/dist/DatePicker.mjs +2 -2
- package/dist/DatePicker.module.js +2 -2
- package/dist/DatePicker.module.js.map +1 -1
- package/dist/Dialog.main.js +2 -1
- package/dist/Dialog.main.js.map +1 -1
- package/dist/Dialog.mjs +2 -1
- package/dist/Dialog.module.js +2 -1
- package/dist/Dialog.module.js.map +1 -1
- package/dist/Disclosure.main.js +5 -7
- package/dist/Disclosure.main.js.map +1 -1
- package/dist/Disclosure.mjs +2 -4
- package/dist/Disclosure.module.js +2 -4
- package/dist/Disclosure.module.js.map +1 -1
- package/dist/DropZone.main.js +1 -3
- package/dist/DropZone.main.js.map +1 -1
- package/dist/DropZone.mjs +1 -3
- package/dist/DropZone.module.js +1 -3
- package/dist/DropZone.module.js.map +1 -1
- package/dist/GridList.main.js.map +1 -1
- package/dist/GridList.module.js.map +1 -1
- package/dist/Group.main.js.map +1 -1
- package/dist/Group.module.js.map +1 -1
- package/dist/ListBox.main.js +17 -16
- package/dist/ListBox.main.js.map +1 -1
- package/dist/ListBox.mjs +19 -18
- package/dist/ListBox.module.js +19 -18
- package/dist/ListBox.module.js.map +1 -1
- package/dist/Menu.main.js +39 -24
- package/dist/Menu.main.js.map +1 -1
- package/dist/Menu.mjs +40 -25
- package/dist/Menu.module.js +40 -25
- package/dist/Menu.module.js.map +1 -1
- package/dist/Meter.main.js +1 -1
- package/dist/Meter.main.js.map +1 -1
- package/dist/Meter.mjs +1 -1
- package/dist/Meter.module.js +1 -1
- package/dist/Meter.module.js.map +1 -1
- package/dist/NumberField.main.js +4 -2
- package/dist/NumberField.main.js.map +1 -1
- package/dist/NumberField.mjs +4 -2
- package/dist/NumberField.module.js +4 -2
- package/dist/NumberField.module.js.map +1 -1
- package/dist/Popover.main.js +67 -15
- package/dist/Popover.main.js.map +1 -1
- package/dist/Popover.mjs +69 -17
- package/dist/Popover.module.js +69 -17
- package/dist/Popover.module.js.map +1 -1
- package/dist/ProgressBar.main.js +1 -1
- package/dist/ProgressBar.main.js.map +1 -1
- package/dist/ProgressBar.mjs +1 -1
- package/dist/ProgressBar.module.js +1 -1
- package/dist/ProgressBar.module.js.map +1 -1
- package/dist/RadioGroup.main.js +1 -1
- package/dist/RadioGroup.main.js.map +1 -1
- package/dist/RadioGroup.mjs +1 -1
- package/dist/RadioGroup.module.js +1 -1
- package/dist/RadioGroup.module.js.map +1 -1
- package/dist/SearchField.main.js +4 -2
- package/dist/SearchField.main.js.map +1 -1
- package/dist/SearchField.mjs +5 -3
- package/dist/SearchField.module.js +5 -3
- package/dist/SearchField.module.js.map +1 -1
- package/dist/Select.main.js +3 -2
- package/dist/Select.main.js.map +1 -1
- package/dist/Select.mjs +3 -2
- package/dist/Select.module.js +3 -2
- package/dist/Select.module.js.map +1 -1
- package/dist/Slider.main.js +2 -2
- package/dist/Slider.main.js.map +1 -1
- package/dist/Slider.mjs +2 -2
- package/dist/Slider.module.js +2 -2
- package/dist/Slider.module.js.map +1 -1
- package/dist/Table.main.js +15 -6
- package/dist/Table.main.js.map +1 -1
- package/dist/Table.mjs +15 -6
- package/dist/Table.module.js +15 -6
- package/dist/Table.module.js.map +1 -1
- package/dist/TableLayout.main.js.map +1 -1
- package/dist/TableLayout.module.js.map +1 -1
- package/dist/Tabs.main.js +3 -2
- package/dist/Tabs.main.js.map +1 -1
- package/dist/Tabs.mjs +4 -3
- package/dist/Tabs.module.js +4 -3
- package/dist/Tabs.module.js.map +1 -1
- package/dist/TagGroup.main.js +1 -1
- package/dist/TagGroup.main.js.map +1 -1
- package/dist/TagGroup.mjs +1 -1
- package/dist/TagGroup.module.js +1 -1
- package/dist/TagGroup.module.js.map +1 -1
- package/dist/TextField.main.js +4 -2
- package/dist/TextField.main.js.map +1 -1
- package/dist/TextField.mjs +5 -3
- package/dist/TextField.module.js +5 -3
- package/dist/TextField.module.js.map +1 -1
- package/dist/Toast.main.js +148 -0
- package/dist/Toast.main.js.map +1 -0
- package/dist/Toast.mjs +137 -0
- package/dist/Toast.module.js +137 -0
- package/dist/Toast.module.js.map +1 -0
- package/dist/Tree.main.js +38 -34
- package/dist/Tree.main.js.map +1 -1
- package/dist/Tree.mjs +34 -30
- package/dist/Tree.module.js +34 -30
- package/dist/Tree.module.js.map +1 -1
- package/dist/Virtualizer.main.js +4 -1
- package/dist/Virtualizer.main.js.map +1 -1
- package/dist/Virtualizer.mjs +4 -1
- package/dist/Virtualizer.module.js +4 -1
- package/dist/Virtualizer.module.js.map +1 -1
- package/dist/import.mjs +9 -7
- package/dist/main.js +31 -17
- package/dist/main.js.map +1 -1
- package/dist/module.js +9 -7
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +159 -59
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.main.js +9 -7
- package/dist/utils.main.js.map +1 -1
- package/dist/utils.mjs +9 -7
- package/dist/utils.module.js +9 -7
- package/dist/utils.module.js.map +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.mjs +1 -1
- package/package.json +25 -30
- package/src/Autocomplete.tsx +19 -15
- package/src/Checkbox.tsx +3 -1
- package/src/Collection.tsx +2 -2
- package/src/ColorArea.tsx +2 -3
- package/src/ColorField.tsx +8 -6
- package/src/ColorPicker.tsx +1 -2
- package/src/ColorSlider.tsx +5 -5
- package/src/ColorSwatch.tsx +2 -2
- package/src/ColorSwatchPicker.tsx +1 -1
- package/src/ColorThumb.tsx +2 -4
- package/src/ColorWheel.tsx +2 -2
- package/src/ComboBox.tsx +3 -1
- package/src/DateField.tsx +8 -3
- package/src/DatePicker.tsx +6 -2
- package/src/Dialog.tsx +6 -2
- package/src/Disclosure.tsx +2 -3
- package/src/DropZone.tsx +1 -2
- package/src/GridList.tsx +5 -0
- package/src/Group.tsx +1 -0
- package/src/ListBox.tsx +11 -9
- package/src/Menu.tsx +53 -25
- package/src/Meter.tsx +3 -1
- package/src/NumberField.tsx +11 -2
- package/src/Popover.tsx +77 -25
- package/src/ProgressBar.tsx +3 -1
- package/src/RadioGroup.tsx +3 -1
- package/src/SearchField.tsx +6 -4
- package/src/Select.tsx +5 -2
- package/src/Slider.tsx +6 -2
- package/src/Table.tsx +35 -15
- package/src/TableLayout.ts +1 -1
- package/src/Tabs.tsx +6 -3
- package/src/TagGroup.tsx +3 -1
- package/src/TextField.tsx +6 -4
- package/src/Toast.tsx +184 -0
- package/src/Tree.tsx +67 -49
- package/src/Virtualizer.tsx +18 -3
- package/src/index.ts +16 -16
- package/src/utils.tsx +8 -10
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# [React Aria Components](https://react-spectrum.adobe.com/react-aria/index.html)
|
|
2
2
|
|
|
3
|
-
Over
|
|
3
|
+
Over 50 components with built-in behavior, adaptive interactions, top-tier accessibility, and internationalization out of the box, ready for your styles.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
var $1bcfcef5af644e13$exports = require("./Input.main.js");
|
|
1
2
|
var $c5ccf687772c0422$exports = require("./utils.main.js");
|
|
2
3
|
var $a83c69b310385d53$exports = require("./SearchField.main.js");
|
|
3
4
|
var $3f2c5af9d7d8905b$exports = require("./TextField.main.js");
|
|
@@ -15,10 +16,10 @@ function $parcel$export(e, n, v, s) {
|
|
|
15
16
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
$parcel$export(module.exports, "
|
|
19
|
-
$parcel$export(module.exports, "
|
|
19
|
+
$parcel$export(module.exports, "AutocompleteContext", () => $33f48720060787fa$export$36e687af51cd0967);
|
|
20
|
+
$parcel$export(module.exports, "AutocompleteStateContext", () => $33f48720060787fa$export$68ee3368b6d68148);
|
|
20
21
|
$parcel$export(module.exports, "UNSTABLE_InternalAutocompleteContext", () => $33f48720060787fa$export$65d2a03b8800d6e3);
|
|
21
|
-
$parcel$export(module.exports, "
|
|
22
|
+
$parcel$export(module.exports, "Autocomplete", () => $33f48720060787fa$export$2f2b9559550c7bbc);
|
|
22
23
|
/*
|
|
23
24
|
* Copyright 2024 Adobe. All rights reserved.
|
|
24
25
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -36,24 +37,28 @@ $parcel$export(module.exports, "UNSTABLE_Autocomplete", () => $33f48720060787fa$
|
|
|
36
37
|
|
|
37
38
|
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
const $33f48720060787fa$export$
|
|
40
|
+
|
|
41
|
+
const $33f48720060787fa$export$36e687af51cd0967 = /*#__PURE__*/ (0, $5lGAV$react.createContext)(null);
|
|
42
|
+
const $33f48720060787fa$export$68ee3368b6d68148 = /*#__PURE__*/ (0, $5lGAV$react.createContext)(null);
|
|
41
43
|
const $33f48720060787fa$export$65d2a03b8800d6e3 = /*#__PURE__*/ (0, $5lGAV$react.createContext)(null);
|
|
42
|
-
function $33f48720060787fa$export$
|
|
43
|
-
let ctx = (0, $c5ccf687772c0422$exports.useSlottedContext)($33f48720060787fa$export$
|
|
44
|
+
function $33f48720060787fa$export$2f2b9559550c7bbc(props) {
|
|
45
|
+
let ctx = (0, $c5ccf687772c0422$exports.useSlottedContext)($33f48720060787fa$export$36e687af51cd0967, props.slot);
|
|
44
46
|
props = (0, $5lGAV$reactariautils.mergeProps)(ctx, props);
|
|
45
|
-
let { filter: filter } = props;
|
|
46
|
-
let state = (0, $5lGAV$reactstatelyautocomplete.
|
|
47
|
+
let { filter: filter, disableAutoFocusFirst: disableAutoFocusFirst } = props;
|
|
48
|
+
let state = (0, $5lGAV$reactstatelyautocomplete.useAutocompleteState)(props);
|
|
49
|
+
let inputRef = (0, $5lGAV$react.useRef)(null);
|
|
47
50
|
let collectionRef = (0, $5lGAV$react.useRef)(null);
|
|
48
|
-
let { textFieldProps: textFieldProps, collectionProps: collectionProps, collectionRef: mergedCollectionRef,
|
|
51
|
+
let { textFieldProps: textFieldProps, collectionProps: collectionProps, collectionRef: mergedCollectionRef, filter: filterFn } = (0, $5lGAV$reactariaautocomplete.useAutocomplete)({
|
|
49
52
|
...(0, $c5ccf687772c0422$exports.removeDataAttributes)(props),
|
|
50
53
|
filter: filter,
|
|
54
|
+
disableAutoFocusFirst: disableAutoFocusFirst,
|
|
55
|
+
inputRef: inputRef,
|
|
51
56
|
collectionRef: collectionRef
|
|
52
57
|
}, state);
|
|
53
58
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($5lGAV$react))).createElement((0, $c5ccf687772c0422$exports.Provider), {
|
|
54
59
|
values: [
|
|
55
60
|
[
|
|
56
|
-
$33f48720060787fa$export$
|
|
61
|
+
$33f48720060787fa$export$68ee3368b6d68148,
|
|
57
62
|
state
|
|
58
63
|
],
|
|
59
64
|
[
|
|
@@ -64,10 +69,16 @@ function $33f48720060787fa$export$d834fde4e1147cd8(props) {
|
|
|
64
69
|
(0, $3f2c5af9d7d8905b$exports.TextFieldContext),
|
|
65
70
|
textFieldProps
|
|
66
71
|
],
|
|
72
|
+
[
|
|
73
|
+
(0, $1bcfcef5af644e13$exports.InputContext),
|
|
74
|
+
{
|
|
75
|
+
ref: inputRef
|
|
76
|
+
}
|
|
77
|
+
],
|
|
67
78
|
[
|
|
68
79
|
$33f48720060787fa$export$65d2a03b8800d6e3,
|
|
69
80
|
{
|
|
70
|
-
|
|
81
|
+
filter: filterFn,
|
|
71
82
|
collectionProps: collectionProps,
|
|
72
83
|
collectionRef: mergedCollectionRef
|
|
73
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAmBM,MAAM,0DAAsB,CAAA,GAAA,0BAAY,EAAmD;AAC3F,MAAM,0DAA2B,CAAA,GAAA,0BAAY,EAA4B;AAGzE,MAAM,0DAAuC,CAAA,GAAA,0BAAY,EAA2C;AAKpG,SAAS,0CAAa,KAAwB;IACnD,IAAI,MAAM,CAAA,GAAA,2CAAgB,EAAE,2CAAqB,MAAM,IAAI;IAC3D,QAAQ,CAAA,GAAA,gCAAS,EAAE,KAAK;IACxB,IAAI,UAAC,MAAM,yBAAE,qBAAqB,EAAC,GAAG;IACtC,IAAI,QAAQ,CAAA,GAAA,oDAAmB,EAAE;IACjC,IAAI,WAAW,CAAA,GAAA,mBAAK,EAA2B;IAC/C,IAAI,gBAAgB,CAAA,GAAA,mBAAK,EAAe;IACxC,IAAI,kBACF,cAAc,mBACd,eAAe,EACf,eAAe,mBAAmB,EAClC,QAAQ,QAAQ,EACjB,GAAG,CAAA,GAAA,4CAAc,EAAE;QAClB,GAAG,CAAA,GAAA,8CAAmB,EAAE,MAAM;gBAC9B;+BACA;kBACA;uBACA;IACF,GAAG;IAEH,qBACE,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAA0B;aAAM;YACjC;gBAAC,CAAA,GAAA,4CAAiB;gBAAG;aAAe;YACpC;gBAAC,CAAA,GAAA,0CAAe;gBAAG;aAAe;YAClC;gBAAC,CAAA,GAAA,sCAAW;gBAAG;oBAAC,KAAK;gBAAQ;aAAE;YAC/B;gBAAC;gBAAsC;oBACrC,QAAQ;qCACR;oBACA,eAAe;gBACjB;aAAE;SACH;OACA,MAAM,QAAQ;AAGrB","sources":["packages/react-aria-components/src/Autocomplete.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 {AriaAutocompleteProps, CollectionOptions, useAutocomplete} from '@react-aria/autocomplete';\nimport {AutocompleteState, useAutocompleteState} from '@react-stately/autocomplete';\nimport {InputContext} from './Input';\nimport {mergeProps} from '@react-aria/utils';\nimport {Provider, removeDataAttributes, SlotProps, SlottedContextValue, useSlottedContext} from './utils';\nimport React, {createContext, RefObject, useRef} from 'react';\nimport {SearchFieldContext} from './SearchField';\nimport {TextFieldContext} from './TextField';\n\nexport interface AutocompleteProps extends AriaAutocompleteProps, SlotProps {}\n\ninterface InternalAutocompleteContextValue {\n filter?: (nodeTextValue: string) => boolean,\n collectionProps: CollectionOptions,\n collectionRef: RefObject<HTMLElement | null>\n}\n\nexport const AutocompleteContext = createContext<SlottedContextValue<Partial<AutocompleteProps>>>(null);\nexport const AutocompleteStateContext = createContext<AutocompleteState | null>(null);\n// This context is to pass the register and filter down to whatever collection component is wrapped by the Autocomplete\n// TODO: export from RAC, but rename to something more appropriate\nexport const UNSTABLE_InternalAutocompleteContext = createContext<InternalAutocompleteContextValue | null>(null);\n\n/**\n * An autocomplete combines a TextField or SearchField with a Menu or ListBox, allowing users to search or filter a list of suggestions.\n */\nexport function Autocomplete(props: AutocompleteProps) {\n let ctx = useSlottedContext(AutocompleteContext, props.slot);\n props = mergeProps(ctx, props);\n let {filter, disableAutoFocusFirst} = props;\n let state = useAutocompleteState(props);\n let inputRef = useRef<HTMLInputElement | null>(null);\n let collectionRef = useRef<HTMLElement>(null);\n let {\n textFieldProps,\n collectionProps,\n collectionRef: mergedCollectionRef,\n filter: filterFn\n } = useAutocomplete({\n ...removeDataAttributes(props),\n filter,\n disableAutoFocusFirst,\n inputRef,\n collectionRef\n }, state);\n\n return (\n <Provider\n values={[\n [AutocompleteStateContext, state],\n [SearchFieldContext, textFieldProps],\n [TextFieldContext, textFieldProps],\n [InputContext, {ref: inputRef}],\n [UNSTABLE_InternalAutocompleteContext, {\n filter: filterFn,\n collectionProps,\n collectionRef: mergedCollectionRef\n }]\n ]}>\n {props.children}\n </Provider>\n );\n};\n"],"names":[],"version":3,"file":"Autocomplete.main.js.map"}
|
package/dist/Autocomplete.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import {InputContext as $3985021b0ad6602f$export$37fb8590cf2c088c} from "./Input.mjs";
|
|
1
2
|
import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, removeDataAttributes as $64fa3d84918910a7$export$ef03459518577ad4, useSlottedContext as $64fa3d84918910a7$export$fabf2dc03a41866e} from "./utils.mjs";
|
|
2
3
|
import {SearchFieldContext as $440f4836bcb56932$export$d1c4e4c63cb03a11} from "./SearchField.mjs";
|
|
3
4
|
import {TextFieldContext as $bcdf0525bf22703d$export$2129e27b3ef0d483} from "./TextField.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
5
|
+
import {useAutocomplete as $llkzs$useAutocomplete} from "@react-aria/autocomplete";
|
|
6
|
+
import {useAutocompleteState as $llkzs$useAutocompleteState} from "@react-stately/autocomplete";
|
|
6
7
|
import {mergeProps as $llkzs$mergeProps} from "@react-aria/utils";
|
|
7
8
|
import $llkzs$react, {createContext as $llkzs$createContext, useRef as $llkzs$useRef} from "react";
|
|
8
9
|
|
|
@@ -23,24 +24,28 @@ import $llkzs$react, {createContext as $llkzs$createContext, useRef as $llkzs$us
|
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
const $d2f53cda644affe3$export$
|
|
27
|
+
|
|
28
|
+
const $d2f53cda644affe3$export$36e687af51cd0967 = /*#__PURE__*/ (0, $llkzs$createContext)(null);
|
|
29
|
+
const $d2f53cda644affe3$export$68ee3368b6d68148 = /*#__PURE__*/ (0, $llkzs$createContext)(null);
|
|
28
30
|
const $d2f53cda644affe3$export$65d2a03b8800d6e3 = /*#__PURE__*/ (0, $llkzs$createContext)(null);
|
|
29
|
-
function $d2f53cda644affe3$export$
|
|
30
|
-
let ctx = (0, $64fa3d84918910a7$export$fabf2dc03a41866e)($d2f53cda644affe3$export$
|
|
31
|
+
function $d2f53cda644affe3$export$2f2b9559550c7bbc(props) {
|
|
32
|
+
let ctx = (0, $64fa3d84918910a7$export$fabf2dc03a41866e)($d2f53cda644affe3$export$36e687af51cd0967, props.slot);
|
|
31
33
|
props = (0, $llkzs$mergeProps)(ctx, props);
|
|
32
|
-
let { filter: filter } = props;
|
|
33
|
-
let state = (0, $llkzs$
|
|
34
|
+
let { filter: filter, disableAutoFocusFirst: disableAutoFocusFirst } = props;
|
|
35
|
+
let state = (0, $llkzs$useAutocompleteState)(props);
|
|
36
|
+
let inputRef = (0, $llkzs$useRef)(null);
|
|
34
37
|
let collectionRef = (0, $llkzs$useRef)(null);
|
|
35
|
-
let { textFieldProps: textFieldProps, collectionProps: collectionProps, collectionRef: mergedCollectionRef,
|
|
38
|
+
let { textFieldProps: textFieldProps, collectionProps: collectionProps, collectionRef: mergedCollectionRef, filter: filterFn } = (0, $llkzs$useAutocomplete)({
|
|
36
39
|
...(0, $64fa3d84918910a7$export$ef03459518577ad4)(props),
|
|
37
40
|
filter: filter,
|
|
41
|
+
disableAutoFocusFirst: disableAutoFocusFirst,
|
|
42
|
+
inputRef: inputRef,
|
|
38
43
|
collectionRef: collectionRef
|
|
39
44
|
}, state);
|
|
40
45
|
return /*#__PURE__*/ (0, $llkzs$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
41
46
|
values: [
|
|
42
47
|
[
|
|
43
|
-
$d2f53cda644affe3$export$
|
|
48
|
+
$d2f53cda644affe3$export$68ee3368b6d68148,
|
|
44
49
|
state
|
|
45
50
|
],
|
|
46
51
|
[
|
|
@@ -51,10 +56,16 @@ function $d2f53cda644affe3$export$d834fde4e1147cd8(props) {
|
|
|
51
56
|
(0, $bcdf0525bf22703d$export$2129e27b3ef0d483),
|
|
52
57
|
textFieldProps
|
|
53
58
|
],
|
|
59
|
+
[
|
|
60
|
+
(0, $3985021b0ad6602f$export$37fb8590cf2c088c),
|
|
61
|
+
{
|
|
62
|
+
ref: inputRef
|
|
63
|
+
}
|
|
64
|
+
],
|
|
54
65
|
[
|
|
55
66
|
$d2f53cda644affe3$export$65d2a03b8800d6e3,
|
|
56
67
|
{
|
|
57
|
-
|
|
68
|
+
filter: filterFn,
|
|
58
69
|
collectionProps: collectionProps,
|
|
59
70
|
collectionRef: mergedCollectionRef
|
|
60
71
|
}
|
|
@@ -64,5 +75,5 @@ function $d2f53cda644affe3$export$d834fde4e1147cd8(props) {
|
|
|
64
75
|
}
|
|
65
76
|
|
|
66
77
|
|
|
67
|
-
export {$d2f53cda644affe3$export$
|
|
78
|
+
export {$d2f53cda644affe3$export$36e687af51cd0967 as AutocompleteContext, $d2f53cda644affe3$export$68ee3368b6d68148 as AutocompleteStateContext, $d2f53cda644affe3$export$65d2a03b8800d6e3 as UNSTABLE_InternalAutocompleteContext, $d2f53cda644affe3$export$2f2b9559550c7bbc as Autocomplete};
|
|
68
79
|
//# sourceMappingURL=Autocomplete.module.js.map
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import {InputContext as $3985021b0ad6602f$export$37fb8590cf2c088c} from "./Input.module.js";
|
|
1
2
|
import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, removeDataAttributes as $64fa3d84918910a7$export$ef03459518577ad4, useSlottedContext as $64fa3d84918910a7$export$fabf2dc03a41866e} from "./utils.module.js";
|
|
2
3
|
import {SearchFieldContext as $440f4836bcb56932$export$d1c4e4c63cb03a11} from "./SearchField.module.js";
|
|
3
4
|
import {TextFieldContext as $bcdf0525bf22703d$export$2129e27b3ef0d483} from "./TextField.module.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
5
|
+
import {useAutocomplete as $llkzs$useAutocomplete} from "@react-aria/autocomplete";
|
|
6
|
+
import {useAutocompleteState as $llkzs$useAutocompleteState} from "@react-stately/autocomplete";
|
|
6
7
|
import {mergeProps as $llkzs$mergeProps} from "@react-aria/utils";
|
|
7
8
|
import $llkzs$react, {createContext as $llkzs$createContext, useRef as $llkzs$useRef} from "react";
|
|
8
9
|
|
|
@@ -23,24 +24,28 @@ import $llkzs$react, {createContext as $llkzs$createContext, useRef as $llkzs$us
|
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
const $d2f53cda644affe3$export$
|
|
27
|
+
|
|
28
|
+
const $d2f53cda644affe3$export$36e687af51cd0967 = /*#__PURE__*/ (0, $llkzs$createContext)(null);
|
|
29
|
+
const $d2f53cda644affe3$export$68ee3368b6d68148 = /*#__PURE__*/ (0, $llkzs$createContext)(null);
|
|
28
30
|
const $d2f53cda644affe3$export$65d2a03b8800d6e3 = /*#__PURE__*/ (0, $llkzs$createContext)(null);
|
|
29
|
-
function $d2f53cda644affe3$export$
|
|
30
|
-
let ctx = (0, $64fa3d84918910a7$export$fabf2dc03a41866e)($d2f53cda644affe3$export$
|
|
31
|
+
function $d2f53cda644affe3$export$2f2b9559550c7bbc(props) {
|
|
32
|
+
let ctx = (0, $64fa3d84918910a7$export$fabf2dc03a41866e)($d2f53cda644affe3$export$36e687af51cd0967, props.slot);
|
|
31
33
|
props = (0, $llkzs$mergeProps)(ctx, props);
|
|
32
|
-
let { filter: filter } = props;
|
|
33
|
-
let state = (0, $llkzs$
|
|
34
|
+
let { filter: filter, disableAutoFocusFirst: disableAutoFocusFirst } = props;
|
|
35
|
+
let state = (0, $llkzs$useAutocompleteState)(props);
|
|
36
|
+
let inputRef = (0, $llkzs$useRef)(null);
|
|
34
37
|
let collectionRef = (0, $llkzs$useRef)(null);
|
|
35
|
-
let { textFieldProps: textFieldProps, collectionProps: collectionProps, collectionRef: mergedCollectionRef,
|
|
38
|
+
let { textFieldProps: textFieldProps, collectionProps: collectionProps, collectionRef: mergedCollectionRef, filter: filterFn } = (0, $llkzs$useAutocomplete)({
|
|
36
39
|
...(0, $64fa3d84918910a7$export$ef03459518577ad4)(props),
|
|
37
40
|
filter: filter,
|
|
41
|
+
disableAutoFocusFirst: disableAutoFocusFirst,
|
|
42
|
+
inputRef: inputRef,
|
|
38
43
|
collectionRef: collectionRef
|
|
39
44
|
}, state);
|
|
40
45
|
return /*#__PURE__*/ (0, $llkzs$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
41
46
|
values: [
|
|
42
47
|
[
|
|
43
|
-
$d2f53cda644affe3$export$
|
|
48
|
+
$d2f53cda644affe3$export$68ee3368b6d68148,
|
|
44
49
|
state
|
|
45
50
|
],
|
|
46
51
|
[
|
|
@@ -51,10 +56,16 @@ function $d2f53cda644affe3$export$d834fde4e1147cd8(props) {
|
|
|
51
56
|
(0, $bcdf0525bf22703d$export$2129e27b3ef0d483),
|
|
52
57
|
textFieldProps
|
|
53
58
|
],
|
|
59
|
+
[
|
|
60
|
+
(0, $3985021b0ad6602f$export$37fb8590cf2c088c),
|
|
61
|
+
{
|
|
62
|
+
ref: inputRef
|
|
63
|
+
}
|
|
64
|
+
],
|
|
54
65
|
[
|
|
55
66
|
$d2f53cda644affe3$export$65d2a03b8800d6e3,
|
|
56
67
|
{
|
|
57
|
-
|
|
68
|
+
filter: filterFn,
|
|
58
69
|
collectionProps: collectionProps,
|
|
59
70
|
collectionRef: mergedCollectionRef
|
|
60
71
|
}
|
|
@@ -64,5 +75,5 @@ function $d2f53cda644affe3$export$d834fde4e1147cd8(props) {
|
|
|
64
75
|
}
|
|
65
76
|
|
|
66
77
|
|
|
67
|
-
export {$d2f53cda644affe3$export$
|
|
78
|
+
export {$d2f53cda644affe3$export$36e687af51cd0967 as AutocompleteContext, $d2f53cda644affe3$export$68ee3368b6d68148 as AutocompleteStateContext, $d2f53cda644affe3$export$65d2a03b8800d6e3 as UNSTABLE_InternalAutocompleteContext, $d2f53cda644affe3$export$2f2b9559550c7bbc as Autocomplete};
|
|
68
79
|
//# sourceMappingURL=Autocomplete.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAmBM,MAAM,0DAAsB,CAAA,GAAA,oBAAY,EAAmD;AAC3F,MAAM,0DAA2B,CAAA,GAAA,oBAAY,EAA4B;AAGzE,MAAM,0DAAuC,CAAA,GAAA,oBAAY,EAA2C;AAKpG,SAAS,0CAAa,KAAwB;IACnD,IAAI,MAAM,CAAA,GAAA,yCAAgB,EAAE,2CAAqB,MAAM,IAAI;IAC3D,QAAQ,CAAA,GAAA,iBAAS,EAAE,KAAK;IACxB,IAAI,UAAC,MAAM,yBAAE,qBAAqB,EAAC,GAAG;IACtC,IAAI,QAAQ,CAAA,GAAA,2BAAmB,EAAE;IACjC,IAAI,WAAW,CAAA,GAAA,aAAK,EAA2B;IAC/C,IAAI,gBAAgB,CAAA,GAAA,aAAK,EAAe;IACxC,IAAI,kBACF,cAAc,mBACd,eAAe,EACf,eAAe,mBAAmB,EAClC,QAAQ,QAAQ,EACjB,GAAG,CAAA,GAAA,sBAAc,EAAE;QAClB,GAAG,CAAA,GAAA,yCAAmB,EAAE,MAAM;gBAC9B;+BACA;kBACA;uBACA;IACF,GAAG;IAEH,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAA0B;aAAM;YACjC;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;aAAe;YACpC;gBAAC,CAAA,GAAA,yCAAe;gBAAG;aAAe;YAClC;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,KAAK;gBAAQ;aAAE;YAC/B;gBAAC;gBAAsC;oBACrC,QAAQ;qCACR;oBACA,eAAe;gBACjB;aAAE;SACH;OACA,MAAM,QAAQ;AAGrB","sources":["packages/react-aria-components/src/Autocomplete.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 {AriaAutocompleteProps, CollectionOptions, useAutocomplete} from '@react-aria/autocomplete';\nimport {AutocompleteState, useAutocompleteState} from '@react-stately/autocomplete';\nimport {InputContext} from './Input';\nimport {mergeProps} from '@react-aria/utils';\nimport {Provider, removeDataAttributes, SlotProps, SlottedContextValue, useSlottedContext} from './utils';\nimport React, {createContext, RefObject, useRef} from 'react';\nimport {SearchFieldContext} from './SearchField';\nimport {TextFieldContext} from './TextField';\n\nexport interface AutocompleteProps extends AriaAutocompleteProps, SlotProps {}\n\ninterface InternalAutocompleteContextValue {\n filter?: (nodeTextValue: string) => boolean,\n collectionProps: CollectionOptions,\n collectionRef: RefObject<HTMLElement | null>\n}\n\nexport const AutocompleteContext = createContext<SlottedContextValue<Partial<AutocompleteProps>>>(null);\nexport const AutocompleteStateContext = createContext<AutocompleteState | null>(null);\n// This context is to pass the register and filter down to whatever collection component is wrapped by the Autocomplete\n// TODO: export from RAC, but rename to something more appropriate\nexport const UNSTABLE_InternalAutocompleteContext = createContext<InternalAutocompleteContextValue | null>(null);\n\n/**\n * An autocomplete combines a TextField or SearchField with a Menu or ListBox, allowing users to search or filter a list of suggestions.\n */\nexport function Autocomplete(props: AutocompleteProps) {\n let ctx = useSlottedContext(AutocompleteContext, props.slot);\n props = mergeProps(ctx, props);\n let {filter, disableAutoFocusFirst} = props;\n let state = useAutocompleteState(props);\n let inputRef = useRef<HTMLInputElement | null>(null);\n let collectionRef = useRef<HTMLElement>(null);\n let {\n textFieldProps,\n collectionProps,\n collectionRef: mergedCollectionRef,\n filter: filterFn\n } = useAutocomplete({\n ...removeDataAttributes(props),\n filter,\n disableAutoFocusFirst,\n inputRef,\n collectionRef\n }, state);\n\n return (\n <Provider\n values={[\n [AutocompleteStateContext, state],\n [SearchFieldContext, textFieldProps],\n [TextFieldContext, textFieldProps],\n [InputContext, {ref: inputRef}],\n [UNSTABLE_InternalAutocompleteContext, {\n filter: filterFn,\n collectionProps,\n collectionRef: mergedCollectionRef\n }]\n ]}>\n {props.children}\n </Provider>\n );\n};\n"],"names":[],"version":3,"file":"Autocomplete.module.js.map"}
|
package/dist/Checkbox.main.js
CHANGED
|
@@ -53,7 +53,7 @@ const $e733553516d848a9$export$4aa08d5625cb8ead = /*#__PURE__*/ (0, $72alD$react
|
|
|
53
53
|
...props,
|
|
54
54
|
validationBehavior: validationBehavior
|
|
55
55
|
});
|
|
56
|
-
let [labelRef, label] = (0, $c5ccf687772c0422$exports.useSlot)();
|
|
56
|
+
let [labelRef, label] = (0, $c5ccf687772c0422$exports.useSlot)(!props['aria-label'] && !props['aria-labelledby']);
|
|
57
57
|
let { groupProps: groupProps, labelProps: labelProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $72alD$reactaria.useCheckboxGroup)({
|
|
58
58
|
...props,
|
|
59
59
|
label: label,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAqGM,MAAM,0DAAuB,CAAA,GAAA,0BAAY,EAAoD;AAC7F,MAAM,0DAA4B,CAAA,GAAA,0BAAY,EAA6B;AAK3E,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served.\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 */\nimport {AriaCheckboxGroupProps, AriaCheckboxProps, HoverEvents, mergeProps, useCheckbox, useCheckboxGroup, useCheckboxGroupItem, useFocusRing, useHover, VisuallyHidden} from 'react-aria';\nimport {CheckboxContext} from './RSPContexts';\nimport {CheckboxGroupState, useCheckboxGroupState, useToggleState} from 'react-stately';\nimport {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps, mergeRefs, useObjectRef} from '@react-aria/utils';\nimport {FormContext} from './Form';\nimport {forwardRefType, RefObject} from '@react-types/shared';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\nimport {TextContext} from './Text';\n\nexport interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'children' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<CheckboxGroupRenderProps>, SlotProps {}\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, 'children' | 'validationState' | 'validationBehavior'>, HoverEvents, RACValidation, RenderProps<CheckboxRenderProps>, SlotProps {\n /**\n * A ref for the HTML input element.\n */\n inputRef?: RefObject<HTMLInputElement | null>\n}\n\nexport interface CheckboxGroupRenderProps {\n /**\n * Whether the checkbox group is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the checkbox group is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the checkbox group is required.\n * @selector [data-required]\n */\n isRequired: boolean,\n /**\n * Whether the checkbox group is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * State of the checkbox group.\n */\n state: CheckboxGroupState\n}\n\nexport interface CheckboxRenderProps {\n /**\n * Whether the checkbox is selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * Whether the checkbox is indeterminate.\n * @selector [data-indeterminate]\n */\n isIndeterminate: boolean,\n /**\n * Whether the checkbox is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the checkbox is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the checkbox is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the checkbox is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the checkbox is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the checkbox is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the checkbox invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the checkbox is required.\n * @selector [data-required]\n */\n isRequired: boolean\n}\n\nexport const CheckboxGroupContext = createContext<ContextValue<CheckboxGroupProps, HTMLDivElement>>(null);\nexport const CheckboxGroupStateContext = createContext<CheckboxGroupState | null>(null);\n\n/**\n * A checkbox group allows a user to select multiple items from a list of options.\n */\nexport const CheckboxGroup = /*#__PURE__*/ (forwardRef as forwardRefType)(function CheckboxGroup(props: CheckboxGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, CheckboxGroupContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let state = useCheckboxGroupState({\n ...props,\n validationBehavior\n });\n let [labelRef, label] = useSlot();\n let {groupProps, labelProps, descriptionProps, errorMessageProps, ...validation} = useCheckboxGroup({\n ...props,\n label,\n validationBehavior\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: props.isRequired || false,\n isInvalid: state.isInvalid,\n state\n },\n defaultClassName: 'react-aria-CheckboxGroup'\n });\n\n return (\n <div\n {...groupProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-required={props.isRequired || undefined}\n data-invalid={state.isInvalid || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [CheckboxGroupStateContext, state],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n\n/**\n * A checkbox allows a user to select multiple items from a list of individual items, or\n * to mark one individual item as selected.\n */\nexport const Checkbox = /*#__PURE__*/ (forwardRef as forwardRefType)(function Checkbox(props: CheckboxProps, ref: ForwardedRef<HTMLLabelElement>) {\n let {\n inputRef: userProvidedInputRef = null,\n ...otherProps\n } = props;\n [props, ref] = useContextProps(otherProps, ref, CheckboxContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let groupState = useContext(CheckboxGroupStateContext);\n let inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null));\n let {labelProps, inputProps, isSelected, isDisabled, isReadOnly, isPressed, isInvalid} = groupState\n // eslint-disable-next-line react-hooks/rules-of-hooks\n ? useCheckboxGroupItem({\n ...removeDataAttributes(props),\n // Value is optional for standalone checkboxes, but required for CheckboxGroup items;\n // it's passed explicitly here to avoid typescript error (requires ignore).\n // @ts-ignore\n value: props.value,\n // ReactNode type doesn't allow function children.\n children: typeof props.children === 'function' ? true : props.children\n }, groupState, inputRef)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n : useCheckbox({\n ...removeDataAttributes(props),\n children: typeof props.children === 'function' ? true : props.children,\n validationBehavior\n // eslint-disable-next-line react-hooks/rules-of-hooks\n }, useToggleState(props), inputRef);\n let {isFocused, isFocusVisible, focusProps} = useFocusRing();\n let isInteractionDisabled = isDisabled || isReadOnly;\n\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled: isInteractionDisabled\n });\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-Checkbox',\n values: {\n isSelected,\n isIndeterminate: props.isIndeterminate || false,\n isPressed,\n isHovered,\n isFocused,\n isFocusVisible,\n isDisabled,\n isReadOnly,\n isInvalid,\n isRequired: props.isRequired || false\n }\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <label\n {...mergeProps(DOMProps, labelProps, hoverProps, renderProps)}\n ref={ref}\n slot={props.slot || undefined}\n data-selected={isSelected || undefined}\n data-indeterminate={props.isIndeterminate || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}\n data-readonly={isReadOnly || undefined}\n data-invalid={isInvalid || undefined}\n data-required={props.isRequired || undefined}>\n <VisuallyHidden elementType=\"span\">\n <input {...mergeProps(inputProps, focusProps)} ref={inputRef} />\n </VisuallyHidden>\n {renderProps.children}\n </label>\n );\n});\n"],"names":[],"version":3,"file":"Checkbox.main.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAqGM,MAAM,0DAAuB,CAAA,GAAA,0BAAY,EAAoD;AAC7F,MAAM,0DAA4B,CAAA,GAAA,0BAAY,EAA6B;AAK3E,MAAM,4CAA8B,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,cAAc,KAAyB,EAAE,GAAiC;IAC3J,CAAC,OA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MAAM;QAC9B,UAAU,OAAO,MAAM,QAAQ,KAAK,aAAa,OAAO,MAAM,QAAQ;4BACtE;IAEF,GAAG,CAAA,GAAA,kCAAa,EAAE,QAAQ;IAC5B,IAAI,aAAC,SAAS,kBAAE,cAAc,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,6BAAW;IACzD,IAAI,wBAAwB,cAAc;IAE1C,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,yBAAO,EAAE;QACrC,GAAG,KAAK;QACR,YAAY;IACd;IAEA,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;wBACN;YACA,iBAAiB,MAAM,eAAe,IAAI;uBAC1C;uBACA;uBACA;4BACA;wBACA;wBACA;uBACA;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE;IAC9B,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,2BAAS,EAAE,UAAU,YAAY,YAAY,YAAY;QAC7D,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,cAAc;QAC7B,sBAAoB,MAAM,eAAe,IAAI;QAC7C,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,iBAAe,cAAc;QAC7B,iBAAe,cAAc;QAC7B,gBAAc,aAAa;QAC3B,iBAAe,MAAM,UAAU,IAAI;qBACnC,0DAAC,CAAA,GAAA,+BAAa;QAAE,aAAY;qBAC1B,0DAAC;QAAO,GAAG,CAAA,GAAA,2BAAS,EAAE,YAAY,WAAW;QAAE,KAAK;SAErD,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/Checkbox.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 */\nimport {AriaCheckboxGroupProps, AriaCheckboxProps, HoverEvents, mergeProps, useCheckbox, useCheckboxGroup, useCheckboxGroupItem, useFocusRing, useHover, VisuallyHidden} from 'react-aria';\nimport {CheckboxContext} from './RSPContexts';\nimport {CheckboxGroupState, useCheckboxGroupState, useToggleState} from 'react-stately';\nimport {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps, mergeRefs, useObjectRef} from '@react-aria/utils';\nimport {FormContext} from './Form';\nimport {forwardRefType, RefObject} from '@react-types/shared';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\nimport {TextContext} from './Text';\n\nexport interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'children' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<CheckboxGroupRenderProps>, SlotProps {}\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, 'children' | 'validationState' | 'validationBehavior'>, HoverEvents, RACValidation, RenderProps<CheckboxRenderProps>, SlotProps {\n /**\n * A ref for the HTML input element.\n */\n inputRef?: RefObject<HTMLInputElement | null>\n}\n\nexport interface CheckboxGroupRenderProps {\n /**\n * Whether the checkbox group is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the checkbox group is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the checkbox group is required.\n * @selector [data-required]\n */\n isRequired: boolean,\n /**\n * Whether the checkbox group is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * State of the checkbox group.\n */\n state: CheckboxGroupState\n}\n\nexport interface CheckboxRenderProps {\n /**\n * Whether the checkbox is selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * Whether the checkbox is indeterminate.\n * @selector [data-indeterminate]\n */\n isIndeterminate: boolean,\n /**\n * Whether the checkbox is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the checkbox is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the checkbox is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the checkbox is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the checkbox is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the checkbox is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the checkbox invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the checkbox is required.\n * @selector [data-required]\n */\n isRequired: boolean\n}\n\nexport const CheckboxGroupContext = createContext<ContextValue<CheckboxGroupProps, HTMLDivElement>>(null);\nexport const CheckboxGroupStateContext = createContext<CheckboxGroupState | null>(null);\n\n/**\n * A checkbox group allows a user to select multiple items from a list of options.\n */\nexport const CheckboxGroup = /*#__PURE__*/ (forwardRef as forwardRefType)(function CheckboxGroup(props: CheckboxGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, CheckboxGroupContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let state = useCheckboxGroupState({\n ...props,\n validationBehavior\n });\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {groupProps, labelProps, descriptionProps, errorMessageProps, ...validation} = useCheckboxGroup({\n ...props,\n label,\n validationBehavior\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: props.isRequired || false,\n isInvalid: state.isInvalid,\n state\n },\n defaultClassName: 'react-aria-CheckboxGroup'\n });\n\n return (\n <div\n {...groupProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-required={props.isRequired || undefined}\n data-invalid={state.isInvalid || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [CheckboxGroupStateContext, state],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n\n/**\n * A checkbox allows a user to select multiple items from a list of individual items, or\n * to mark one individual item as selected.\n */\nexport const Checkbox = /*#__PURE__*/ (forwardRef as forwardRefType)(function Checkbox(props: CheckboxProps, ref: ForwardedRef<HTMLLabelElement>) {\n let {\n inputRef: userProvidedInputRef = null,\n ...otherProps\n } = props;\n [props, ref] = useContextProps(otherProps, ref, CheckboxContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let groupState = useContext(CheckboxGroupStateContext);\n let inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null));\n let {labelProps, inputProps, isSelected, isDisabled, isReadOnly, isPressed, isInvalid} = groupState\n // eslint-disable-next-line react-hooks/rules-of-hooks\n ? useCheckboxGroupItem({\n ...removeDataAttributes(props),\n // Value is optional for standalone checkboxes, but required for CheckboxGroup items;\n // it's passed explicitly here to avoid typescript error (requires ignore).\n // @ts-ignore\n value: props.value,\n // ReactNode type doesn't allow function children.\n children: typeof props.children === 'function' ? true : props.children\n }, groupState, inputRef)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n : useCheckbox({\n ...removeDataAttributes(props),\n children: typeof props.children === 'function' ? true : props.children,\n validationBehavior\n // eslint-disable-next-line react-hooks/rules-of-hooks\n }, useToggleState(props), inputRef);\n let {isFocused, isFocusVisible, focusProps} = useFocusRing();\n let isInteractionDisabled = isDisabled || isReadOnly;\n\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled: isInteractionDisabled\n });\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-Checkbox',\n values: {\n isSelected,\n isIndeterminate: props.isIndeterminate || false,\n isPressed,\n isHovered,\n isFocused,\n isFocusVisible,\n isDisabled,\n isReadOnly,\n isInvalid,\n isRequired: props.isRequired || false\n }\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <label\n {...mergeProps(DOMProps, labelProps, hoverProps, renderProps)}\n ref={ref}\n slot={props.slot || undefined}\n data-selected={isSelected || undefined}\n data-indeterminate={props.isIndeterminate || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}\n data-readonly={isReadOnly || undefined}\n data-invalid={isInvalid || undefined}\n data-required={props.isRequired || undefined}>\n <VisuallyHidden elementType=\"span\">\n <input {...mergeProps(inputProps, focusProps)} ref={inputRef} />\n </VisuallyHidden>\n {renderProps.children}\n </label>\n );\n});\n"],"names":[],"version":3,"file":"Checkbox.main.js.map"}
|
package/dist/Checkbox.mjs
CHANGED
|
@@ -40,7 +40,7 @@ const $bc237834342dbd75$export$4aa08d5625cb8ead = /*#__PURE__*/ (0, $kPH7g$forwa
|
|
|
40
40
|
...props,
|
|
41
41
|
validationBehavior: validationBehavior
|
|
42
42
|
});
|
|
43
|
-
let [labelRef, label] = (0, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8)();
|
|
43
|
+
let [labelRef, label] = (0, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8)(!props['aria-label'] && !props['aria-labelledby']);
|
|
44
44
|
let { groupProps: groupProps, labelProps: labelProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $kPH7g$useCheckboxGroup)({
|
|
45
45
|
...props,
|
|
46
46
|
label: label,
|
package/dist/Checkbox.module.js
CHANGED
|
@@ -40,7 +40,7 @@ const $bc237834342dbd75$export$4aa08d5625cb8ead = /*#__PURE__*/ (0, $kPH7g$forwa
|
|
|
40
40
|
...props,
|
|
41
41
|
validationBehavior: validationBehavior
|
|
42
42
|
});
|
|
43
|
-
let [labelRef, label] = (0, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8)();
|
|
43
|
+
let [labelRef, label] = (0, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8)(!props['aria-label'] && !props['aria-labelledby']);
|
|
44
44
|
let { groupProps: groupProps, labelProps: labelProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $kPH7g$useCheckboxGroup)({
|
|
45
45
|
...props,
|
|
46
46
|
label: label,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAqGM,MAAM,0DAAuB,CAAA,GAAA,oBAAY,EAAoD;AAC7F,MAAM,0DAA4B,CAAA,GAAA,oBAAY,EAA6B;AAK3E,MAAM,4CAA8B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,cAAc,KAAyB,EAAE,GAAiC;IAC3J,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,EAAC,oBAAoB,sBAAsB,EAAC,GAAG,CAAA,GAAA,yCAAgB,EAAE,CAAA,GAAA,yCAAU,MAAM,CAAC;QAC7D,2BAAA;IAAzB,IAAI,qBAAqB,CAAA,OAAA,CAAA,4BAAA,MAAM,kBAAkB,cAAxB,uCAAA,4BAA4B,oCAA5B,kBAAA,OAAsD;IAC/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cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;wBACN;YACA,iBAAiB,MAAM,eAAe,IAAI;uBAC1C;uBACA;uBACA;4BACA;wBACA;wBACA;uBACA;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE;IAC9B,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,YAAY,YAAY,YAAY;QAC7D,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,cAAc;QAC7B,sBAAoB,MAAM,eAAe,IAAI;QAC7C,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,iBAAe,cAAc;QAC7B,iBAAe,cAAc;QAC7B,gBAAc,aAAa;QAC3B,iBAAe,MAAM,UAAU,IAAI;qBACnC,gCAAC,CAAA,GAAA,qBAAa;QAAE,aAAY;qBAC1B,gCAAC;QAAO,GAAG,CAAA,GAAA,iBAAS,EAAE,YAAY,WAAW;QAAE,KAAK;SAErD,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/Checkbox.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 */\nimport {AriaCheckboxGroupProps, AriaCheckboxProps, HoverEvents, mergeProps, useCheckbox, useCheckboxGroup, useCheckboxGroupItem, useFocusRing, useHover, VisuallyHidden} from 'react-aria';\nimport {CheckboxContext} from './RSPContexts';\nimport {CheckboxGroupState, useCheckboxGroupState, useToggleState} from 'react-stately';\nimport {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps, mergeRefs, useObjectRef} from '@react-aria/utils';\nimport {FormContext} from './Form';\nimport {forwardRefType, RefObject} from '@react-types/shared';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\nimport {TextContext} from './Text';\n\nexport interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'children' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<CheckboxGroupRenderProps>, SlotProps {}\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, 'children' | 'validationState' | 'validationBehavior'>, HoverEvents, RACValidation, RenderProps<CheckboxRenderProps>, SlotProps {\n /**\n * A ref for the HTML input element.\n */\n inputRef?: RefObject<HTMLInputElement | null>\n}\n\nexport interface CheckboxGroupRenderProps {\n /**\n * Whether the checkbox group is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the checkbox group is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the checkbox group is required.\n * @selector [data-required]\n */\n isRequired: boolean,\n /**\n * Whether the checkbox group is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * State of the checkbox group.\n */\n state: CheckboxGroupState\n}\n\nexport interface CheckboxRenderProps {\n /**\n * Whether the checkbox is selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * Whether the checkbox is indeterminate.\n * @selector [data-indeterminate]\n */\n isIndeterminate: boolean,\n /**\n * Whether the checkbox is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the checkbox is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the checkbox is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the checkbox is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the checkbox is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the checkbox is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the checkbox invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the checkbox is required.\n * @selector [data-required]\n */\n isRequired: boolean\n}\n\nexport const CheckboxGroupContext = createContext<ContextValue<CheckboxGroupProps, HTMLDivElement>>(null);\nexport const CheckboxGroupStateContext = createContext<CheckboxGroupState | null>(null);\n\n/**\n * A checkbox group allows a user to select multiple items from a list of options.\n */\nexport const CheckboxGroup = /*#__PURE__*/ (forwardRef as forwardRefType)(function CheckboxGroup(props: CheckboxGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, CheckboxGroupContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let state = useCheckboxGroupState({\n ...props,\n validationBehavior\n });\n let [labelRef, label] = useSlot();\n let {groupProps, labelProps, descriptionProps, errorMessageProps, ...validation} = useCheckboxGroup({\n ...props,\n label,\n validationBehavior\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: props.isRequired || false,\n isInvalid: state.isInvalid,\n state\n },\n defaultClassName: 'react-aria-CheckboxGroup'\n });\n\n return (\n <div\n {...groupProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-required={props.isRequired || undefined}\n data-invalid={state.isInvalid || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [CheckboxGroupStateContext, state],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n\n/**\n * A checkbox allows a user to select multiple items from a list of individual items, or\n * to mark one individual item as selected.\n */\nexport const Checkbox = /*#__PURE__*/ (forwardRef as forwardRefType)(function Checkbox(props: CheckboxProps, ref: ForwardedRef<HTMLLabelElement>) {\n let {\n inputRef: userProvidedInputRef = null,\n ...otherProps\n } = props;\n [props, ref] = useContextProps(otherProps, ref, CheckboxContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let groupState = useContext(CheckboxGroupStateContext);\n let inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null));\n let {labelProps, inputProps, isSelected, isDisabled, isReadOnly, isPressed, isInvalid} = groupState\n // eslint-disable-next-line react-hooks/rules-of-hooks\n ? useCheckboxGroupItem({\n ...removeDataAttributes(props),\n // Value is optional for standalone checkboxes, but required for CheckboxGroup items;\n // it's passed explicitly here to avoid typescript error (requires ignore).\n // @ts-ignore\n value: props.value,\n // ReactNode type doesn't allow function children.\n children: typeof props.children === 'function' ? true : props.children\n }, groupState, inputRef)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n : useCheckbox({\n ...removeDataAttributes(props),\n children: typeof props.children === 'function' ? true : props.children,\n validationBehavior\n // eslint-disable-next-line react-hooks/rules-of-hooks\n }, useToggleState(props), inputRef);\n let {isFocused, isFocusVisible, focusProps} = useFocusRing();\n let isInteractionDisabled = isDisabled || isReadOnly;\n\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled: isInteractionDisabled\n });\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-Checkbox',\n values: {\n isSelected,\n isIndeterminate: props.isIndeterminate || false,\n isPressed,\n isHovered,\n isFocused,\n isFocusVisible,\n isDisabled,\n isReadOnly,\n isInvalid,\n isRequired: props.isRequired || false\n }\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <label\n {...mergeProps(DOMProps, labelProps, hoverProps, renderProps)}\n ref={ref}\n slot={props.slot || undefined}\n data-selected={isSelected || undefined}\n data-indeterminate={props.isIndeterminate || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}\n data-readonly={isReadOnly || undefined}\n data-invalid={isInvalid || undefined}\n data-required={props.isRequired || undefined}>\n <VisuallyHidden elementType=\"span\">\n <input {...mergeProps(inputProps, focusProps)} ref={inputRef} />\n </VisuallyHidden>\n {renderProps.children}\n </label>\n );\n});\n"],"names":[],"version":3,"file":"Checkbox.module.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAqGM,MAAM,0DAAuB,CAAA,GAAA,oBAAY,EAAoD;AAC7F,MAAM,0DAA4B,CAAA,GAAA,oBAAY,EAA6B;AAK3E,MAAM,4CAA8B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,cAAc,KAAyB,EAAE,GAAiC;IAC3J,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,EAAC,oBAAoB,sBAAsB,EAAC,GAAG,CAAA,GAAA,yCAAgB,EAAE,CAAA,GAAA,yCAAU,MAAM,CAAC;QAC7D,2BAAA;IAAzB,IAAI,qBAAqB,CAAA,OAAA,CAAA,4BAAA,MAAM,kBAAkB,cAAxB,uCAAA,4BAA4B,oCAA5B,kBAAA,OAAsD;IAC/E,IAAI,QAAQ,CAAA,GAAA,4BAAoB,EAAE;QAChC,GAAG,KAAK;4BACR;IACF;IACA,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,yCAAM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kB;QAClB,QAAQ;wBACN;YACA,iBAAiB,MAAM,eAAe,IAAI;uBAC1C;uBACA;uBACA;4BACA;wBACA;wBACA;uBACA;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE;IAC9B,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,YAAY,YAAY,YAAY;QAC7D,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,cAAc;QAC7B,sBAAoB,MAAM,eAAe,IAAI;QAC7C,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,iBAAe,cAAc;QAC7B,iBAAe,cAAc;QAC7B,gBAAc,aAAa;QAC3B,iBAAe,MAAM,UAAU,IAAI;qBACnC,gCAAC,CAAA,GAAA,qBAAa;QAAE,aAAY;qBAC1B,gCAAC;QAAO,GAAG,CAAA,GAAA,iBAAS,EAAE,YAAY,WAAW;QAAE,KAAK;SAErD,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/Checkbox.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 */\nimport {AriaCheckboxGroupProps, AriaCheckboxProps, HoverEvents, mergeProps, useCheckbox, useCheckboxGroup, useCheckboxGroupItem, useFocusRing, useHover, VisuallyHidden} from 'react-aria';\nimport {CheckboxContext} from './RSPContexts';\nimport {CheckboxGroupState, useCheckboxGroupState, useToggleState} from 'react-stately';\nimport {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps, mergeRefs, useObjectRef} from '@react-aria/utils';\nimport {FormContext} from './Form';\nimport {forwardRefType, RefObject} from '@react-types/shared';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\nimport {TextContext} from './Text';\n\nexport interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'children' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<CheckboxGroupRenderProps>, SlotProps {}\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, 'children' | 'validationState' | 'validationBehavior'>, HoverEvents, RACValidation, RenderProps<CheckboxRenderProps>, SlotProps {\n /**\n * A ref for the HTML input element.\n */\n inputRef?: RefObject<HTMLInputElement | null>\n}\n\nexport interface CheckboxGroupRenderProps {\n /**\n * Whether the checkbox group is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the checkbox group is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the checkbox group is required.\n * @selector [data-required]\n */\n isRequired: boolean,\n /**\n * Whether the checkbox group is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * State of the checkbox group.\n */\n state: CheckboxGroupState\n}\n\nexport interface CheckboxRenderProps {\n /**\n * Whether the checkbox is selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * Whether the checkbox is indeterminate.\n * @selector [data-indeterminate]\n */\n isIndeterminate: boolean,\n /**\n * Whether the checkbox is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the checkbox is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the checkbox is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the checkbox is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the checkbox is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the checkbox is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the checkbox invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the checkbox is required.\n * @selector [data-required]\n */\n isRequired: boolean\n}\n\nexport const CheckboxGroupContext = createContext<ContextValue<CheckboxGroupProps, HTMLDivElement>>(null);\nexport const CheckboxGroupStateContext = createContext<CheckboxGroupState | null>(null);\n\n/**\n * A checkbox group allows a user to select multiple items from a list of options.\n */\nexport const CheckboxGroup = /*#__PURE__*/ (forwardRef as forwardRefType)(function CheckboxGroup(props: CheckboxGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, CheckboxGroupContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let state = useCheckboxGroupState({\n ...props,\n validationBehavior\n });\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {groupProps, labelProps, descriptionProps, errorMessageProps, ...validation} = useCheckboxGroup({\n ...props,\n label,\n validationBehavior\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: props.isRequired || false,\n isInvalid: state.isInvalid,\n state\n },\n defaultClassName: 'react-aria-CheckboxGroup'\n });\n\n return (\n <div\n {...groupProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-required={props.isRequired || undefined}\n data-invalid={state.isInvalid || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [CheckboxGroupStateContext, state],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n\n/**\n * A checkbox allows a user to select multiple items from a list of individual items, or\n * to mark one individual item as selected.\n */\nexport const Checkbox = /*#__PURE__*/ (forwardRef as forwardRefType)(function Checkbox(props: CheckboxProps, ref: ForwardedRef<HTMLLabelElement>) {\n let {\n inputRef: userProvidedInputRef = null,\n ...otherProps\n } = props;\n [props, ref] = useContextProps(otherProps, ref, CheckboxContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let groupState = useContext(CheckboxGroupStateContext);\n let inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null));\n let {labelProps, inputProps, isSelected, isDisabled, isReadOnly, isPressed, isInvalid} = groupState\n // eslint-disable-next-line react-hooks/rules-of-hooks\n ? useCheckboxGroupItem({\n ...removeDataAttributes(props),\n // Value is optional for standalone checkboxes, but required for CheckboxGroup items;\n // it's passed explicitly here to avoid typescript error (requires ignore).\n // @ts-ignore\n value: props.value,\n // ReactNode type doesn't allow function children.\n children: typeof props.children === 'function' ? true : props.children\n }, groupState, inputRef)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n : useCheckbox({\n ...removeDataAttributes(props),\n children: typeof props.children === 'function' ? true : props.children,\n validationBehavior\n // eslint-disable-next-line react-hooks/rules-of-hooks\n }, useToggleState(props), inputRef);\n let {isFocused, isFocusVisible, focusProps} = useFocusRing();\n let isInteractionDisabled = isDisabled || isReadOnly;\n\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled: isInteractionDisabled\n });\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-Checkbox',\n values: {\n isSelected,\n isIndeterminate: props.isIndeterminate || false,\n isPressed,\n isHovered,\n isFocused,\n isFocusVisible,\n isDisabled,\n isReadOnly,\n isInvalid,\n isRequired: props.isRequired || false\n }\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <label\n {...mergeProps(DOMProps, labelProps, hoverProps, renderProps)}\n ref={ref}\n slot={props.slot || undefined}\n data-selected={isSelected || undefined}\n data-indeterminate={props.isIndeterminate || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}\n data-readonly={isReadOnly || undefined}\n data-invalid={isInvalid || undefined}\n data-required={props.isRequired || undefined}>\n <VisuallyHidden elementType=\"span\">\n <input {...mergeProps(inputProps, focusProps)} ref={inputRef} />\n </VisuallyHidden>\n {renderProps.children}\n </label>\n );\n});\n"],"names":[],"version":3,"file":"Checkbox.module.js.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAyFM,MAAM,0DAAiB,CAAA,GAAA,0BAAY,EAA8B;AAGjE,MAAM,4CAAU,WAAW,GAAG,CAAA,GAAA,iDAAoB,EAAE,WAAW,CAAmB,OAAwB,KAAgC;IAC/I,IAAI,QAAC,IAAI,UAAE,MAAM,EAAC,GAAG,CAAA,GAAA,uBAAS,EAAE;IAChC,QAAQ,IAAI,CAAC,CAAC,qCAAqC,EAAE,KAAK,UAAU,CAAC;IACrE,OAAO,OAAO,OAAO,KAAK,SAAS;AACrC;AAmCO,MAAM,4CAAgD;IAC3D,gBAAe,cAAC,UAAU,uBAAE,mBAAmB,EAAC;QAC9C,OAAO,0CAAoB,YAAY,MAAM;IAC/C;IACA,kBAAiB,cAAC,UAAU,UAAE,MAAM,uBAAE,mBAAmB,EAAC;QACxD,OAAO,0CAAoB,YAAY,QAAQ;IACjD;AACF;AAEA,SAAS,0CACP,UAAsC,EACtC,MAA4B,EAC5B,mBAA2D;IAE3D,OAAO,CAAA,GAAA,6CAAgB,EAAE;QACvB,OAAO,SAAS,WAAW,WAAW,CAAE,OAAO,GAAG,IAAI;QACtD,cAAc;YAAC;SAAoB;QACnC,UAAS,IAAI;gBAYgB;YAX3B,IAAI,WAAW,KAAK,MAAM,CAAE;YAC5B,IAAI,CAAC,uBAAuB,KAAK,IAAI,KAAK,QACxC,OAAO;YAGT,IAAI,MAAM,KAAK,GAAG;YAClB,IAAI,WAAW,WAAW,WAAW,CAAC;YACtC,qBACE,sHACG,oBAAoB;gBAAC,MAAM;qBAAQ;gBAAK,cAAc;YAAQ,IAC9D,UACA,AAAE,CAAA,YAAY,QAAQ,EAAA,sBAAA,WAAW,OAAO,CAAC,uBAAnB,0CAAA,oBAA8B,IAAI,MAAK,MAAK,KAAO,oBAAoB;gBAAC,MAAM;qBAAQ;gBAAK,cAAc;YAAO;QAG7I;IACF;AACF;AAEO,MAAM,0DAA4B,CAAA,GAAA,0BAAY,EAAsB;AAEpE,SAAS,0CAAiB,UAAsB;IACrD,OAAO,CAAA,GAAA,oBAAM,EAAE,IAAM,cAAc,OAAO,IAAI,IAAI;YAAC;SAAW,IAAI,MAAM;QAAC;KAAW;AACtF","sources":["packages/react-aria-components/src/Collection.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 */\nimport {CollectionBase, DropTargetDelegate, ItemDropTarget, Key, LayoutDelegate, RefObject} from '@react-types/shared';\nimport {createBranchComponent, useCachedChildren} from '@react-aria/collections';\nimport {Collection as ICollection, Node, SelectionBehavior, SelectionMode, SectionProps as SharedSectionProps} from 'react-stately';\nimport React, {createContext, ForwardedRef, HTMLAttributes, JSX, ReactElement, ReactNode, useContext, useMemo} from 'react';\nimport {StyleProps} from './utils';\n\nexport interface CollectionProps<T> extends Omit<CollectionBase<T>, 'children'> {\n /** The contents of the collection. */\n children?: ReactNode | ((item: T) => ReactNode),\n /** Values that should invalidate the item cache when using dynamic collections. */\n dependencies?: any
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAyFM,MAAM,0DAAiB,CAAA,GAAA,0BAAY,EAA8B;AAGjE,MAAM,4CAAU,WAAW,GAAG,CAAA,GAAA,iDAAoB,EAAE,WAAW,CAAmB,OAAwB,KAAgC;IAC/I,IAAI,QAAC,IAAI,UAAE,MAAM,EAAC,GAAG,CAAA,GAAA,uBAAS,EAAE;IAChC,QAAQ,IAAI,CAAC,CAAC,qCAAqC,EAAE,KAAK,UAAU,CAAC;IACrE,OAAO,OAAO,OAAO,KAAK,SAAS;AACrC;AAmCO,MAAM,4CAAgD;IAC3D,gBAAe,cAAC,UAAU,uBAAE,mBAAmB,EAAC;QAC9C,OAAO,0CAAoB,YAAY,MAAM;IAC/C;IACA,kBAAiB,cAAC,UAAU,UAAE,MAAM,uBAAE,mBAAmB,EAAC;QACxD,OAAO,0CAAoB,YAAY,QAAQ;IACjD;AACF;AAEA,SAAS,0CACP,UAAsC,EACtC,MAA4B,EAC5B,mBAA2D;IAE3D,OAAO,CAAA,GAAA,6CAAgB,EAAE;QACvB,OAAO,SAAS,WAAW,WAAW,CAAE,OAAO,GAAG,IAAI;QACtD,cAAc;YAAC;SAAoB;QACnC,UAAS,IAAI;gBAYgB;YAX3B,IAAI,WAAW,KAAK,MAAM,CAAE;YAC5B,IAAI,CAAC,uBAAuB,KAAK,IAAI,KAAK,QACxC,OAAO;YAGT,IAAI,MAAM,KAAK,GAAG;YAClB,IAAI,WAAW,WAAW,WAAW,CAAC;YACtC,qBACE,sHACG,oBAAoB;gBAAC,MAAM;qBAAQ;gBAAK,cAAc;YAAQ,IAC9D,UACA,AAAE,CAAA,YAAY,QAAQ,EAAA,sBAAA,WAAW,OAAO,CAAC,uBAAnB,0CAAA,oBAA8B,IAAI,MAAK,MAAK,KAAO,oBAAoB;gBAAC,MAAM;qBAAQ;gBAAK,cAAc;YAAO;QAG7I;IACF;AACF;AAEO,MAAM,0DAA4B,CAAA,GAAA,0BAAY,EAAsB;AAEpE,SAAS,0CAAiB,UAAsB;IACrD,OAAO,CAAA,GAAA,oBAAM,EAAE,IAAM,cAAc,OAAO,IAAI,IAAI;YAAC;SAAW,IAAI,MAAM;QAAC;KAAW;AACtF","sources":["packages/react-aria-components/src/Collection.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 */\nimport {CollectionBase, DropTargetDelegate, ItemDropTarget, Key, LayoutDelegate, RefObject} from '@react-types/shared';\nimport {createBranchComponent, useCachedChildren} from '@react-aria/collections';\nimport {Collection as ICollection, Node, SelectionBehavior, SelectionMode, SectionProps as SharedSectionProps} from 'react-stately';\nimport React, {createContext, ForwardedRef, HTMLAttributes, JSX, ReactElement, ReactNode, useContext, useMemo} from 'react';\nimport {StyleProps} from './utils';\n\nexport interface CollectionProps<T> extends Omit<CollectionBase<T>, 'children'> {\n /** The contents of the collection. */\n children?: ReactNode | ((item: T) => ReactNode),\n /** Values that should invalidate the item cache when using dynamic collections. */\n dependencies?: ReadonlyArray<any>\n}\n\nexport interface ItemRenderProps {\n /**\n * Whether the item is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the item is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the item is currently selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * Whether the item is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the item is currently keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the item is non-interactive, i.e. both selection and actions are disabled and the item may\n * not be focused. Dependent on `disabledKeys` and `disabledBehavior`.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * The type of selection that is allowed in the collection.\n * @selector [data-selection-mode=\"single | multiple\"]\n */\n selectionMode: SelectionMode,\n /** The selection behavior for the collection. */\n selectionBehavior: SelectionBehavior,\n /**\n * Whether the item allows dragging.\n * @note This property is only available in collection components that support drag and drop.\n * @selector [data-allows-dragging]\n */\n allowsDragging?: boolean,\n /**\n * Whether the item is currently being dragged.\n * @note This property is only available in collection components that support drag and drop.\n * @selector [data-dragging]\n */\n isDragging?: boolean,\n /**\n * Whether the item is currently an active drop target.\n * @note This property is only available in collection components that support drag and drop.\n * @selector [data-drop-target]\n */\n isDropTarget?: boolean\n}\n\nexport interface SectionProps<T> extends Omit<SharedSectionProps<T>, 'children' | 'title'>, StyleProps {\n /** The unique id of the section. */\n id?: Key,\n /** The object value that this section represents. When using dynamic collections, this is set automatically. */\n value?: T,\n /** Static child items or a function to render children. */\n children?: ReactNode | ((item: T) => ReactElement),\n /** Values that should invalidate the item cache when using dynamic collections. */\n dependencies?: ReadonlyArray<any>\n}\n\ninterface SectionContextValue {\n name: string,\n render: (props: SectionProps<any>, ref: ForwardedRef<HTMLElement>, section: Node<any>, className?: string) => ReactElement\n}\n\nexport const SectionContext = createContext<SectionContextValue | null>(null);\n\n/** @deprecated */\nexport const Section = /*#__PURE__*/ createBranchComponent('section', <T extends object>(props: SectionProps<T>, ref: ForwardedRef<HTMLElement>, section: Node<T>): JSX.Element => {\n let {name, render} = useContext(SectionContext)!;\n console.warn(`<Section> is deprecated. Please use <${name}> instead.`);\n return render(props, ref, section, 'react-aria-Section');\n});\n\nexport interface CollectionBranchProps {\n /** The collection of items to render. */\n collection: ICollection<Node<unknown>>,\n /** The parent node of the items to render. */\n parent: Node<unknown>,\n /** A function that renders a drop indicator between items. */\n renderDropIndicator?: (target: ItemDropTarget) => ReactNode\n}\n\nexport interface CollectionRootProps extends HTMLAttributes<HTMLElement> {\n /** The collection of items to render. */\n collection: ICollection<Node<unknown>>,\n /** A set of keys for items that should always be persisted in the DOM. */\n persistedKeys?: Set<Key> | null,\n /** A ref to the scroll container for the collection. */\n scrollRef?: RefObject<HTMLElement | null>,\n /** A function that renders a drop indicator between items. */\n renderDropIndicator?: (target: ItemDropTarget) => ReactNode\n}\n\nexport interface CollectionRenderer {\n /** Whether this is a virtualized collection. */\n isVirtualized?: boolean,\n /** A delegate object that provides layout information for items in the collection. */\n layoutDelegate?: LayoutDelegate,\n /** A delegate object that provides drop targets for pointer coordinates within the collection. */\n dropTargetDelegate?: DropTargetDelegate,\n /** A component that renders the root collection items. */\n CollectionRoot: React.ComponentType<CollectionRootProps>,\n /** A component that renders the child collection items. */\n CollectionBranch: React.ComponentType<CollectionBranchProps>\n}\n\nexport const DefaultCollectionRenderer: CollectionRenderer = {\n CollectionRoot({collection, renderDropIndicator}) {\n return useCollectionRender(collection, null, renderDropIndicator);\n },\n CollectionBranch({collection, parent, renderDropIndicator}) {\n return useCollectionRender(collection, parent, renderDropIndicator);\n }\n};\n\nfunction useCollectionRender(\n collection: ICollection<Node<unknown>>,\n parent: Node<unknown> | null,\n renderDropIndicator?: (target: ItemDropTarget) => ReactNode\n) {\n return useCachedChildren({\n items: parent ? collection.getChildren!(parent.key) : collection,\n dependencies: [renderDropIndicator],\n children(node) {\n let rendered = node.render!(node);\n if (!renderDropIndicator || node.type !== 'item') {\n return rendered;\n }\n\n let key = node.key;\n let keyAfter = collection.getKeyAfter(key);\n return (\n <>\n {renderDropIndicator({type: 'item', key, dropPosition: 'before'})}\n {rendered}\n {((keyAfter == null || collection.getItem(keyAfter)?.type !== 'item')) && renderDropIndicator({type: 'item', key, dropPosition: 'after'})}\n </>\n );\n }\n });\n}\n\nexport const CollectionRendererContext = createContext<CollectionRenderer>(DefaultCollectionRenderer);\n\nexport function usePersistedKeys(focusedKey: Key | null) {\n return useMemo(() => focusedKey != null ? new Set([focusedKey]) : null, [focusedKey]);\n}\n"],"names":[],"version":3,"file":"Collection.main.js.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAyFM,MAAM,0DAAiB,CAAA,GAAA,oBAAY,EAA8B;AAGjE,MAAM,4CAAU,WAAW,GAAG,CAAA,GAAA,4BAAoB,EAAE,WAAW,CAAmB,OAAwB,KAAgC;IAC/I,IAAI,QAAC,IAAI,UAAE,MAAM,EAAC,GAAG,CAAA,GAAA,iBAAS,EAAE;IAChC,QAAQ,IAAI,CAAC,CAAC,qCAAqC,EAAE,KAAK,UAAU,CAAC;IACrE,OAAO,OAAO,OAAO,KAAK,SAAS;AACrC;AAmCO,MAAM,4CAAgD;IAC3D,gBAAe,cAAC,UAAU,uBAAE,mBAAmB,EAAC;QAC9C,OAAO,0CAAoB,YAAY,MAAM;IAC/C;IACA,kBAAiB,cAAC,UAAU,UAAE,MAAM,uBAAE,mBAAmB,EAAC;QACxD,OAAO,0CAAoB,YAAY,QAAQ;IACjD;AACF;AAEA,SAAS,0CACP,UAAsC,EACtC,MAA4B,EAC5B,mBAA2D;IAE3D,OAAO,CAAA,GAAA,wBAAgB,EAAE;QACvB,OAAO,SAAS,WAAW,WAAW,CAAE,OAAO,GAAG,IAAI;QACtD,cAAc;YAAC;SAAoB;QACnC,UAAS,IAAI;gBAYgB;YAX3B,IAAI,WAAW,KAAK,MAAM,CAAE;YAC5B,IAAI,CAAC,uBAAuB,KAAK,IAAI,KAAK,QACxC,OAAO;YAGT,IAAI,MAAM,KAAK,GAAG;YAClB,IAAI,WAAW,WAAW,WAAW,CAAC;YACtC,qBACE,kEACG,oBAAoB;gBAAC,MAAM;qBAAQ;gBAAK,cAAc;YAAQ,IAC9D,UACA,AAAE,CAAA,YAAY,QAAQ,EAAA,sBAAA,WAAW,OAAO,CAAC,uBAAnB,0CAAA,oBAA8B,IAAI,MAAK,MAAK,KAAO,oBAAoB;gBAAC,MAAM;qBAAQ;gBAAK,cAAc;YAAO;QAG7I;IACF;AACF;AAEO,MAAM,0DAA4B,CAAA,GAAA,oBAAY,EAAsB;AAEpE,SAAS,0CAAiB,UAAsB;IACrD,OAAO,CAAA,GAAA,cAAM,EAAE,IAAM,cAAc,OAAO,IAAI,IAAI;YAAC;SAAW,IAAI,MAAM;QAAC;KAAW;AACtF","sources":["packages/react-aria-components/src/Collection.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 */\nimport {CollectionBase, DropTargetDelegate, ItemDropTarget, Key, LayoutDelegate, RefObject} from '@react-types/shared';\nimport {createBranchComponent, useCachedChildren} from '@react-aria/collections';\nimport {Collection as ICollection, Node, SelectionBehavior, SelectionMode, SectionProps as SharedSectionProps} from 'react-stately';\nimport React, {createContext, ForwardedRef, HTMLAttributes, JSX, ReactElement, ReactNode, useContext, useMemo} from 'react';\nimport {StyleProps} from './utils';\n\nexport interface CollectionProps<T> extends Omit<CollectionBase<T>, 'children'> {\n /** The contents of the collection. */\n children?: ReactNode | ((item: T) => ReactNode),\n /** Values that should invalidate the item cache when using dynamic collections. */\n dependencies?: any
|
|
1
|
+
{"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAyFM,MAAM,0DAAiB,CAAA,GAAA,oBAAY,EAA8B;AAGjE,MAAM,4CAAU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I,MAAM;QAAC;KAAW;AACtF","sources":["packages/react-aria-components/src/Collection.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 */\nimport {CollectionBase, DropTargetDelegate, ItemDropTarget, Key, LayoutDelegate, RefObject} from '@react-types/shared';\nimport {createBranchComponent, useCachedChildren} from '@react-aria/collections';\nimport {Collection as ICollection, Node, SelectionBehavior, SelectionMode, SectionProps as SharedSectionProps} from 'react-stately';\nimport React, {createContext, ForwardedRef, HTMLAttributes, JSX, ReactElement, ReactNode, useContext, useMemo} from 'react';\nimport {StyleProps} from './utils';\n\nexport interface CollectionProps<T> extends Omit<CollectionBase<T>, 'children'> {\n /** The contents of the collection. */\n children?: ReactNode | ((item: T) => ReactNode),\n /** Values that should invalidate the item cache when using dynamic collections. */\n dependencies?: ReadonlyArray<any>\n}\n\nexport interface ItemRenderProps {\n /**\n * Whether the item is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the item is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the item is currently selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * Whether the item is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the item is currently keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the item is non-interactive, i.e. both selection and actions are disabled and the item may\n * not be focused. Dependent on `disabledKeys` and `disabledBehavior`.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * The type of selection that is allowed in the collection.\n * @selector [data-selection-mode=\"single | multiple\"]\n */\n selectionMode: SelectionMode,\n /** The selection behavior for the collection. */\n selectionBehavior: SelectionBehavior,\n /**\n * Whether the item allows dragging.\n * @note This property is only available in collection components that support drag and drop.\n * @selector [data-allows-dragging]\n */\n allowsDragging?: boolean,\n /**\n * Whether the item is currently being dragged.\n * @note This property is only available in collection components that support drag and drop.\n * @selector [data-dragging]\n */\n isDragging?: boolean,\n /**\n * Whether the item is currently an active drop target.\n * @note This property is only available in collection components that support drag and drop.\n * @selector [data-drop-target]\n */\n isDropTarget?: boolean\n}\n\nexport interface SectionProps<T> extends Omit<SharedSectionProps<T>, 'children' | 'title'>, StyleProps {\n /** The unique id of the section. */\n id?: Key,\n /** The object value that this section represents. When using dynamic collections, this is set automatically. */\n value?: T,\n /** Static child items or a function to render children. */\n children?: ReactNode | ((item: T) => ReactElement),\n /** Values that should invalidate the item cache when using dynamic collections. */\n dependencies?: ReadonlyArray<any>\n}\n\ninterface SectionContextValue {\n name: string,\n render: (props: SectionProps<any>, ref: ForwardedRef<HTMLElement>, section: Node<any>, className?: string) => ReactElement\n}\n\nexport const SectionContext = createContext<SectionContextValue | null>(null);\n\n/** @deprecated */\nexport const Section = /*#__PURE__*/ createBranchComponent('section', <T extends object>(props: SectionProps<T>, ref: ForwardedRef<HTMLElement>, section: Node<T>): JSX.Element => {\n let {name, render} = useContext(SectionContext)!;\n console.warn(`<Section> is deprecated. Please use <${name}> instead.`);\n return render(props, ref, section, 'react-aria-Section');\n});\n\nexport interface CollectionBranchProps {\n /** The collection of items to render. */\n collection: ICollection<Node<unknown>>,\n /** The parent node of the items to render. */\n parent: Node<unknown>,\n /** A function that renders a drop indicator between items. */\n renderDropIndicator?: (target: ItemDropTarget) => ReactNode\n}\n\nexport interface CollectionRootProps extends HTMLAttributes<HTMLElement> {\n /** The collection of items to render. */\n collection: ICollection<Node<unknown>>,\n /** A set of keys for items that should always be persisted in the DOM. */\n persistedKeys?: Set<Key> | null,\n /** A ref to the scroll container for the collection. */\n scrollRef?: RefObject<HTMLElement | null>,\n /** A function that renders a drop indicator between items. */\n renderDropIndicator?: (target: ItemDropTarget) => ReactNode\n}\n\nexport interface CollectionRenderer {\n /** Whether this is a virtualized collection. */\n isVirtualized?: boolean,\n /** A delegate object that provides layout information for items in the collection. */\n layoutDelegate?: LayoutDelegate,\n /** A delegate object that provides drop targets for pointer coordinates within the collection. */\n dropTargetDelegate?: DropTargetDelegate,\n /** A component that renders the root collection items. */\n CollectionRoot: React.ComponentType<CollectionRootProps>,\n /** A component that renders the child collection items. */\n CollectionBranch: React.ComponentType<CollectionBranchProps>\n}\n\nexport const DefaultCollectionRenderer: CollectionRenderer = {\n CollectionRoot({collection, renderDropIndicator}) {\n return useCollectionRender(collection, null, renderDropIndicator);\n },\n CollectionBranch({collection, parent, renderDropIndicator}) {\n return useCollectionRender(collection, parent, renderDropIndicator);\n }\n};\n\nfunction useCollectionRender(\n collection: ICollection<Node<unknown>>,\n parent: Node<unknown> | null,\n renderDropIndicator?: (target: ItemDropTarget) => ReactNode\n) {\n return useCachedChildren({\n items: parent ? collection.getChildren!(parent.key) : collection,\n dependencies: [renderDropIndicator],\n children(node) {\n let rendered = node.render!(node);\n if (!renderDropIndicator || node.type !== 'item') {\n return rendered;\n }\n\n let key = node.key;\n let keyAfter = collection.getKeyAfter(key);\n return (\n <>\n {renderDropIndicator({type: 'item', key, dropPosition: 'before'})}\n {rendered}\n {((keyAfter == null || collection.getItem(keyAfter)?.type !== 'item')) && renderDropIndicator({type: 'item', key, dropPosition: 'after'})}\n </>\n );\n }\n });\n}\n\nexport const CollectionRendererContext = createContext<CollectionRenderer>(DefaultCollectionRenderer);\n\nexport function usePersistedKeys(focusedKey: Key | null) {\n return useMemo(() => focusedKey != null ? new Set([focusedKey]) : null, [focusedKey]);\n}\n"],"names":[],"version":3,"file":"Collection.module.js.map"}
|
package/dist/ColorArea.main.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var $525402dfec7da5bc$exports = require("./RSPContexts.main.js");
|
|
2
2
|
var $9775047c98afa2ef$exports = require("./ColorThumb.main.js");
|
|
3
3
|
var $c5ccf687772c0422$exports = require("./utils.main.js");
|
|
4
|
-
var $hLuah$
|
|
4
|
+
var $hLuah$reactaria = require("react-aria");
|
|
5
|
+
var $hLuah$reactstately = require("react-stately");
|
|
5
6
|
var $hLuah$reactariautils = require("@react-aria/utils");
|
|
6
7
|
var $hLuah$react = require("react");
|
|
7
|
-
var $hLuah$reactariacolor = require("@react-aria/color");
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
function $parcel$interopDefault(a) {
|
|
@@ -29,8 +29,8 @@ const $4b8ff932b8d77df7$export$b2103f68a961418e = /*#__PURE__*/ (0, $hLuah$react
|
|
|
29
29
|
[props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, (0, $525402dfec7da5bc$exports.ColorAreaContext));
|
|
30
30
|
let inputXRef = (0, $hLuah$react.useRef)(null);
|
|
31
31
|
let inputYRef = (0, $hLuah$react.useRef)(null);
|
|
32
|
-
let state = (0, $hLuah$
|
|
33
|
-
let { colorAreaProps: colorAreaProps, xInputProps: xInputProps, yInputProps: yInputProps, thumbProps: thumbProps } = (0, $hLuah$
|
|
32
|
+
let state = (0, $hLuah$reactstately.useColorAreaState)(props);
|
|
33
|
+
let { colorAreaProps: colorAreaProps, xInputProps: xInputProps, yInputProps: yInputProps, thumbProps: thumbProps } = (0, $hLuah$reactaria.useColorArea)({
|
|
34
34
|
...props,
|
|
35
35
|
inputXRef: inputXRef,
|
|
36
36
|
inputYRef: inputYRef,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsBO,MAAM,yDAAwB,CAAA,GAAA,0BAAY,EAAyB;AAKnE,MAAM,0DAAY,CAAA,GAAA,uBAAS,EAAE,SAAS,UAAU,KAAqB,EAAE,GAAiC;IAC7G,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,0CAAe;IAC1D,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IACvB,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IAEvB,IAAI,QAAQ,CAAA,GAAA,qCAAgB,EAAE;IAC9B,IAAI,kBACF,cAAc,eACd,WAAW,eACX,WAAW,cACX,UAAU,EACX,GAAG,CAAA,GAAA,6BAAW,EAAE;QACf,GAAG,KAAK;mBACR;mBACA;QACA,cAAc;IAChB,GAAG;IAEH,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,eAAe,KAAK;QAClC,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE;IAC9B,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC;QACC,KAAK;QACJ,GAAG,cAAc;QACjB,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;qBACnC,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAuB;aAAM;YAC9B;gBAAC,CAAA,GAAA,mDAAwB;gBAAG;2BAAC;gCAAO;+BAAY;iCAAW;+BAAa;iCAAW;oBAAa,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC/H;OACA,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/ColorArea.tsx"],"sourcesContent":["import {AriaColorAreaProps, useColorArea} from 'react-aria';\nimport {ColorAreaContext} from './RSPContexts';\nimport {ColorAreaState, useColorAreaState} from 'react-stately';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {Provider, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef, useRef} from 'react';\n\nexport interface ColorAreaRenderProps {\n /**\n * Whether the color area is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color area.\n */\n state: ColorAreaState\n}\n\nexport interface ColorAreaProps extends AriaColorAreaProps, RenderProps<ColorAreaRenderProps>, SlotProps {}\n\nexport const ColorAreaStateContext = createContext<ColorAreaState | null>(null);\n\n/**\n * A color area allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = forwardRef(function ColorArea(props: ColorAreaProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorAreaContext);\n let inputXRef = useRef(null);\n let inputYRef = useRef(null);\n\n let state = useColorAreaState(props);\n let {\n colorAreaProps,\n xInputProps,\n yInputProps,\n thumbProps\n } = useColorArea({\n ...props,\n inputXRef,\n inputYRef,\n containerRef: ref\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorArea',\n defaultStyle: colorAreaProps.style,\n values: {\n state,\n isDisabled: props.isDisabled || false\n }\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <div\n ref={ref}\n {...colorAreaProps}\n {...DOMProps}\n {...renderProps}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorAreaStateContext, state],\n [InternalColorThumbContext, {state, thumbProps, inputXRef, xInputProps, inputYRef, yInputProps, isDisabled: props.isDisabled}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ColorArea.main.js.map"}
|
package/dist/ColorArea.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {ColorAreaContext as $4e85f108e88277b8$export$ebe63fadcdce34ed} from "./RSPContexts.mjs";
|
|
2
2
|
import {InternalColorThumbContext as $e2b71ec1d6016406$export$c80c0ea2ca5cb846} from "./ColorThumb.mjs";
|
|
3
3
|
import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import {useColorArea as $xv8AM$useColorArea} from "react-aria";
|
|
5
|
+
import {useColorAreaState as $xv8AM$useColorAreaState} from "react-stately";
|
|
5
6
|
import {filterDOMProps as $xv8AM$filterDOMProps} from "@react-aria/utils";
|
|
6
7
|
import $xv8AM$react, {createContext as $xv8AM$createContext, forwardRef as $xv8AM$forwardRef, useRef as $xv8AM$useRef} from "react";
|
|
7
|
-
import {useColorArea as $xv8AM$useColorArea} from "@react-aria/color";
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|