react-aria-components 3.0.0-nightly-ab9fd5c68-241125 → 3.0.0-nightly-10a43de88-241127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Breadcrumbs.main.js +2 -5
- package/dist/Breadcrumbs.main.js.map +1 -1
- package/dist/Breadcrumbs.mjs +3 -6
- package/dist/Breadcrumbs.module.js +3 -6
- package/dist/Breadcrumbs.module.js.map +1 -1
- package/dist/Button.main.js +2 -5
- package/dist/Button.main.js.map +1 -1
- package/dist/Button.mjs +2 -5
- package/dist/Button.module.js +2 -5
- package/dist/Button.module.js.map +1 -1
- package/dist/Calendar.main.js +9 -22
- package/dist/Calendar.main.js.map +1 -1
- package/dist/Calendar.mjs +9 -22
- package/dist/Calendar.module.js +9 -22
- package/dist/Calendar.module.js.map +1 -1
- package/dist/Checkbox.main.js +5 -12
- package/dist/Checkbox.main.js.map +1 -1
- package/dist/Checkbox.mjs +6 -13
- package/dist/Checkbox.module.js +6 -13
- package/dist/Checkbox.module.js.map +1 -1
- package/dist/ColorArea.main.js +2 -5
- package/dist/ColorArea.main.js.map +1 -1
- package/dist/ColorArea.mjs +3 -6
- package/dist/ColorArea.module.js +3 -6
- package/dist/ColorArea.module.js.map +1 -1
- package/dist/ColorField.main.js +2 -5
- package/dist/ColorField.main.js.map +1 -1
- package/dist/ColorField.mjs +2 -5
- package/dist/ColorField.module.js +2 -5
- package/dist/ColorField.module.js.map +1 -1
- package/dist/ColorSlider.main.js +2 -5
- package/dist/ColorSlider.main.js.map +1 -1
- package/dist/ColorSlider.mjs +2 -5
- package/dist/ColorSlider.module.js +2 -5
- package/dist/ColorSlider.module.js.map +1 -1
- package/dist/ColorSwatch.main.js +2 -5
- package/dist/ColorSwatch.main.js.map +1 -1
- package/dist/ColorSwatch.mjs +2 -5
- package/dist/ColorSwatch.module.js +2 -5
- package/dist/ColorSwatch.module.js.map +1 -1
- package/dist/ColorSwatchPicker.main.js +4 -8
- package/dist/ColorSwatchPicker.main.js.map +1 -1
- package/dist/ColorSwatchPicker.mjs +5 -9
- package/dist/ColorSwatchPicker.module.js +5 -9
- package/dist/ColorSwatchPicker.module.js.map +1 -1
- package/dist/ColorThumb.main.js +2 -5
- package/dist/ColorThumb.main.js.map +1 -1
- package/dist/ColorThumb.mjs +3 -6
- package/dist/ColorThumb.module.js +3 -6
- package/dist/ColorThumb.module.js.map +1 -1
- package/dist/ColorWheel.main.js +5 -11
- package/dist/ColorWheel.main.js.map +1 -1
- package/dist/ColorWheel.mjs +6 -12
- package/dist/ColorWheel.module.js +6 -12
- package/dist/ColorWheel.module.js.map +1 -1
- package/dist/ComboBox.main.js +2 -5
- package/dist/ComboBox.main.js.map +1 -1
- package/dist/ComboBox.mjs +3 -6
- package/dist/ComboBox.module.js +3 -6
- package/dist/ComboBox.module.js.map +1 -1
- package/dist/DateField.main.js +8 -23
- package/dist/DateField.main.js.map +1 -1
- package/dist/DateField.mjs +9 -24
- package/dist/DateField.module.js +9 -24
- package/dist/DateField.module.js.map +1 -1
- package/dist/DatePicker.main.js +4 -11
- package/dist/DatePicker.main.js.map +1 -1
- package/dist/DatePicker.mjs +5 -12
- package/dist/DatePicker.module.js +5 -12
- package/dist/DatePicker.module.js.map +1 -1
- package/dist/Dialog.main.js +2 -5
- package/dist/Dialog.main.js.map +1 -1
- package/dist/Dialog.mjs +3 -6
- package/dist/Dialog.module.js +3 -6
- package/dist/Dialog.module.js.map +1 -1
- package/dist/Disclosure.main.js +6 -16
- package/dist/Disclosure.main.js.map +1 -1
- package/dist/Disclosure.mjs +6 -16
- package/dist/Disclosure.module.js +6 -16
- package/dist/Disclosure.module.js.map +1 -1
- package/dist/DragAndDrop.main.js +2 -5
- package/dist/DragAndDrop.main.js.map +1 -1
- package/dist/DragAndDrop.mjs +3 -6
- package/dist/DragAndDrop.module.js +3 -6
- package/dist/DragAndDrop.module.js.map +1 -1
- package/dist/DropZone.main.js +2 -5
- package/dist/DropZone.main.js.map +1 -1
- package/dist/DropZone.mjs +3 -6
- package/dist/DropZone.module.js +3 -6
- package/dist/DropZone.module.js.map +1 -1
- package/dist/FieldError.main.js +2 -5
- package/dist/FieldError.main.js.map +1 -1
- package/dist/FieldError.mjs +3 -6
- package/dist/FieldError.module.js +3 -6
- package/dist/FieldError.module.js.map +1 -1
- package/dist/FileTrigger.main.js +2 -5
- package/dist/FileTrigger.main.js.map +1 -1
- package/dist/FileTrigger.mjs +2 -5
- package/dist/FileTrigger.module.js +2 -5
- package/dist/FileTrigger.module.js.map +1 -1
- package/dist/Form.main.js +2 -6
- package/dist/Form.main.js.map +1 -1
- package/dist/Form.mjs +2 -6
- package/dist/Form.module.js +2 -6
- package/dist/Form.module.js.map +1 -1
- package/dist/GridList.main.js +2 -6
- package/dist/GridList.main.js.map +1 -1
- package/dist/GridList.mjs +3 -7
- package/dist/GridList.module.js +3 -7
- package/dist/GridList.module.js.map +1 -1
- package/dist/Group.main.js +2 -5
- package/dist/Group.main.js.map +1 -1
- package/dist/Group.mjs +2 -5
- package/dist/Group.module.js +2 -5
- package/dist/Group.module.js.map +1 -1
- package/dist/Heading.main.js +2 -3
- package/dist/Heading.main.js.map +1 -1
- package/dist/Heading.mjs +2 -3
- package/dist/Heading.module.js +2 -3
- package/dist/Heading.module.js.map +1 -1
- package/dist/Input.main.js +2 -5
- package/dist/Input.main.js.map +1 -1
- package/dist/Input.mjs +2 -5
- package/dist/Input.module.js +2 -5
- package/dist/Input.module.js.map +1 -1
- package/dist/Keyboard.main.js +2 -3
- package/dist/Keyboard.main.js.map +1 -1
- package/dist/Keyboard.mjs +2 -3
- package/dist/Keyboard.module.js +2 -3
- package/dist/Keyboard.module.js.map +1 -1
- package/dist/Label.main.js +2 -3
- package/dist/Label.main.js.map +1 -1
- package/dist/Label.mjs +2 -3
- package/dist/Label.module.js +2 -3
- package/dist/Label.module.js.map +1 -1
- package/dist/Link.main.js +2 -6
- package/dist/Link.main.js.map +1 -1
- package/dist/Link.mjs +2 -6
- package/dist/Link.module.js +2 -6
- package/dist/Link.module.js.map +1 -1
- package/dist/ListBox.main.js +5 -10
- package/dist/ListBox.main.js.map +1 -1
- package/dist/ListBox.mjs +6 -11
- package/dist/ListBox.module.js +6 -11
- package/dist/ListBox.module.js.map +1 -1
- package/dist/Menu.main.js +5 -10
- package/dist/Menu.main.js.map +1 -1
- package/dist/Menu.mjs +5 -10
- package/dist/Menu.module.js +5 -10
- package/dist/Menu.module.js.map +1 -1
- package/dist/Meter.main.js +2 -5
- package/dist/Meter.main.js.map +1 -1
- package/dist/Meter.mjs +2 -5
- package/dist/Meter.module.js +2 -5
- package/dist/Meter.module.js.map +1 -1
- package/dist/Modal.main.js +3 -6
- package/dist/Modal.main.js.map +1 -1
- package/dist/Modal.mjs +4 -7
- package/dist/Modal.module.js +4 -7
- package/dist/Modal.module.js.map +1 -1
- package/dist/NumberField.main.js +2 -5
- package/dist/NumberField.main.js.map +1 -1
- package/dist/NumberField.mjs +3 -6
- package/dist/NumberField.module.js +3 -6
- package/dist/NumberField.module.js.map +1 -1
- package/dist/OverlayArrow.main.js +2 -6
- package/dist/OverlayArrow.main.js.map +1 -1
- package/dist/OverlayArrow.mjs +2 -6
- package/dist/OverlayArrow.module.js +2 -6
- package/dist/OverlayArrow.module.js.map +1 -1
- package/dist/Popover.main.js +2 -5
- package/dist/Popover.main.js.map +1 -1
- package/dist/Popover.mjs +3 -6
- package/dist/Popover.module.js +3 -6
- package/dist/Popover.module.js.map +1 -1
- package/dist/ProgressBar.main.js +2 -6
- package/dist/ProgressBar.main.js.map +1 -1
- package/dist/ProgressBar.mjs +2 -6
- package/dist/ProgressBar.module.js +2 -6
- package/dist/ProgressBar.module.js.map +1 -1
- package/dist/RadioGroup.main.js +4 -10
- package/dist/RadioGroup.main.js.map +1 -1
- package/dist/RadioGroup.mjs +4 -10
- package/dist/RadioGroup.module.js +4 -10
- package/dist/RadioGroup.module.js.map +1 -1
- package/dist/SearchField.main.js +2 -5
- package/dist/SearchField.main.js.map +1 -1
- package/dist/SearchField.mjs +3 -6
- package/dist/SearchField.module.js +3 -6
- package/dist/SearchField.module.js.map +1 -1
- package/dist/Select.main.js +5 -12
- package/dist/Select.main.js.map +1 -1
- package/dist/Select.mjs +6 -13
- package/dist/Select.module.js +6 -13
- package/dist/Select.module.js.map +1 -1
- package/dist/Slider.main.js +8 -20
- package/dist/Slider.main.js.map +1 -1
- package/dist/Slider.mjs +9 -21
- package/dist/Slider.module.js +9 -21
- package/dist/Slider.module.js.map +1 -1
- package/dist/Switch.main.js +2 -5
- package/dist/Switch.main.js.map +1 -1
- package/dist/Switch.mjs +2 -5
- package/dist/Switch.module.js +2 -5
- package/dist/Switch.module.js.map +1 -1
- package/dist/Table.main.js +6 -12
- package/dist/Table.main.js.map +1 -1
- package/dist/Table.mjs +7 -13
- package/dist/Table.module.js +7 -13
- package/dist/Table.module.js.map +1 -1
- package/dist/Tabs.main.js +6 -16
- package/dist/Tabs.main.js.map +1 -1
- package/dist/Tabs.mjs +7 -17
- package/dist/Tabs.module.js +7 -17
- package/dist/Tabs.module.js.map +1 -1
- package/dist/TagGroup.main.js +4 -10
- package/dist/TagGroup.main.js.map +1 -1
- package/dist/TagGroup.mjs +5 -11
- package/dist/TagGroup.module.js +5 -11
- package/dist/TagGroup.module.js.map +1 -1
- package/dist/Text.main.js +2 -3
- package/dist/Text.main.js.map +1 -1
- package/dist/Text.mjs +2 -3
- package/dist/Text.module.js +2 -3
- package/dist/Text.module.js.map +1 -1
- package/dist/TextArea.main.js +2 -5
- package/dist/TextArea.main.js.map +1 -1
- package/dist/TextArea.mjs +2 -5
- package/dist/TextArea.module.js +2 -5
- package/dist/TextArea.module.js.map +1 -1
- package/dist/TextField.main.js +2 -5
- package/dist/TextField.main.js.map +1 -1
- package/dist/TextField.mjs +3 -6
- package/dist/TextField.module.js +3 -6
- package/dist/TextField.module.js.map +1 -1
- package/dist/ToggleButton.main.js +2 -5
- package/dist/ToggleButton.main.js.map +1 -1
- package/dist/ToggleButton.mjs +3 -6
- package/dist/ToggleButton.module.js +3 -6
- package/dist/ToggleButton.module.js.map +1 -1
- package/dist/ToggleButtonGroup.main.js +2 -5
- package/dist/ToggleButtonGroup.main.js.map +1 -1
- package/dist/ToggleButtonGroup.mjs +2 -5
- package/dist/ToggleButtonGroup.module.js +2 -5
- package/dist/ToggleButtonGroup.module.js.map +1 -1
- package/dist/Toolbar.main.js +2 -6
- package/dist/Toolbar.main.js.map +1 -1
- package/dist/Toolbar.mjs +2 -6
- package/dist/Toolbar.module.js +2 -6
- package/dist/Toolbar.module.js.map +1 -1
- package/dist/Tooltip.main.js +2 -5
- package/dist/Tooltip.main.js.map +1 -1
- package/dist/Tooltip.mjs +3 -6
- package/dist/Tooltip.module.js +3 -6
- package/dist/Tooltip.module.js.map +1 -1
- package/dist/Tree.main.js +2 -6
- package/dist/Tree.main.js.map +1 -1
- package/dist/Tree.mjs +3 -7
- package/dist/Tree.module.js +3 -7
- package/dist/Tree.module.js.map +1 -1
- package/dist/types.d.ts +10 -10
- package/dist/types.d.ts.map +1 -1
- package/package.json +30 -30
- package/src/Breadcrumbs.tsx +5 -8
- package/src/Button.tsx +5 -8
- package/src/Calendar.tsx +19 -31
- package/src/Checkbox.tsx +11 -17
- package/src/ColorArea.tsx +5 -8
- package/src/ColorField.tsx +5 -8
- package/src/ColorSlider.tsx +5 -8
- package/src/ColorSwatch.tsx +5 -8
- package/src/ColorSwatchPicker.tsx +7 -13
- package/src/ColorThumb.tsx +5 -8
- package/src/ColorWheel.tsx +10 -16
- package/src/ComboBox.tsx +5 -8
- package/src/DateField.tsx +21 -33
- package/src/DatePicker.tsx +9 -15
- package/src/Dialog.tsx +5 -8
- package/src/Disclosure.tsx +16 -25
- package/src/DragAndDrop.tsx +5 -8
- package/src/DropZone.tsx +5 -8
- package/src/FieldError.tsx +5 -8
- package/src/FileTrigger.tsx +5 -8
- package/src/Form.tsx +6 -9
- package/src/GridList.tsx +6 -9
- package/src/Group.tsx +5 -8
- package/src/Heading.tsx +2 -5
- package/src/Input.tsx +5 -8
- package/src/Keyboard.tsx +2 -5
- package/src/Label.tsx +2 -5
- package/src/Link.tsx +6 -9
- package/src/ListBox.tsx +8 -12
- package/src/Menu.tsx +8 -12
- package/src/Meter.tsx +5 -8
- package/src/Modal.tsx +5 -8
- package/src/NumberField.tsx +5 -8
- package/src/OverlayArrow.tsx +6 -9
- package/src/Popover.tsx +5 -8
- package/src/ProgressBar.tsx +6 -9
- package/src/RadioGroup.tsx +10 -16
- package/src/SearchField.tsx +5 -8
- package/src/Select.tsx +11 -17
- package/src/Slider.tsx +20 -32
- package/src/Switch.tsx +5 -8
- package/src/Table.tsx +10 -19
- package/src/Tabs.tsx +14 -23
- package/src/TagGroup.tsx +8 -14
- package/src/Text.tsx +2 -5
- package/src/TextArea.tsx +5 -7
- package/src/TextField.tsx +5 -8
- package/src/ToggleButton.tsx +5 -8
- package/src/ToggleButtonGroup.tsx +5 -8
- package/src/Toolbar.tsx +6 -9
- package/src/Tooltip.tsx +5 -8
- package/src/Tree.tsx +6 -9
package/dist/TextArea.module.js
CHANGED
|
@@ -11,7 +11,7 @@ let $216918bed6669f72$var$filterHoverProps = (props)=>{
|
|
|
11
11
|
let { onHoverStart: onHoverStart, onHoverChange: onHoverChange, onHoverEnd: onHoverEnd, ...otherProps } = props;
|
|
12
12
|
return otherProps;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
const $216918bed6669f72$export$f5c9f3c2c4054eec = /*#__PURE__*/ (0, $9Usiy$forwardRef)(function TextArea(props, ref) {
|
|
15
15
|
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $216918bed6669f72$export$2dc6166a7e65358c);
|
|
16
16
|
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $9Usiy$useHover)(props);
|
|
17
17
|
let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $9Usiy$useFocusRing)({
|
|
@@ -40,10 +40,7 @@ function $216918bed6669f72$var$TextArea(props, ref) {
|
|
|
40
40
|
"data-focus-visible": isFocusVisible || undefined,
|
|
41
41
|
"data-invalid": isInvalid || undefined
|
|
42
42
|
});
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* A textarea allows a user to input mult-line text.
|
|
46
|
-
*/ const $216918bed6669f72$export$f5c9f3c2c4054eec = /*#__PURE__*/ (0, $9Usiy$forwardRef)($216918bed6669f72$var$TextArea);
|
|
43
|
+
});
|
|
47
44
|
|
|
48
45
|
|
|
49
46
|
export {$216918bed6669f72$export$2dc6166a7e65358c as TextAreaContext, $216918bed6669f72$export$f5c9f3c2c4054eec as TextArea};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;AAOO,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAAoD,CAAC;AAEhG,IAAI,yCAAmB,CAAC;IACtB,6DAA6D;IAC7D,IAAI,gBAAC,YAAY,iBAAE,aAAa,cAAE,UAAU,EAAE,GAAG,YAAW,GAAG;IAC/D,OAAO;AACT;
|
|
1
|
+
{"mappings":";;;;;;;AAOO,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAAoD,CAAC;AAEhG,IAAI,yCAAmB,CAAC;IACtB,6DAA6D;IAC7D,IAAI,gBAAC,YAAY,iBAAE,aAAa,cAAE,UAAU,EAAE,GAAG,YAAW,GAAG;IAC/D,OAAO;AACT;AAKO,MAAM,0DAAW,CAAA,GAAA,iBAAS,EAAE,SAAS,SAAS,KAAoB,EAAE,GAAsC;IAC/G,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAE3C,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;IACvC,IAAI,aAAC,SAAS,kBAAE,cAAc,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,mBAAW,EAAE;QACzD,aAAa;QACb,WAAW,MAAM,SAAS;IAC5B;IAEA,IAAI,YAAY,CAAC,CAAC,KAAK,CAAC,eAAe,IAAI,KAAK,CAAC,eAAe,KAAK;IACrE,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;uBACN;uBACA;4BACA;YACA,YAAY,MAAM,QAAQ,IAAI;uBAC9B;QACF;QACA,kBAAkB;IACpB;IAEA,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,uCAAiB,QAAQ,YAAY,WAAW;QAC9D,GAAG,WAAW;QACf,KAAK;QACL,gBAAc,aAAa;QAC3B,iBAAe,MAAM,QAAQ,IAAI;QACjC,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,gBAAc,aAAa;;AAEjC","sources":["packages/react-aria-components/src/TextArea.tsx"],"sourcesContent":["import {ContextValue, StyleRenderProps, useContextProps, useRenderProps} from './utils';\nimport {HoverEvents, mergeProps, useFocusRing, useHover} from 'react-aria';\nimport {InputRenderProps} from './Input';\nimport React, {createContext, ForwardedRef, forwardRef, TextareaHTMLAttributes} from 'react';\n\nexport interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'className' | 'style'>, HoverEvents, StyleRenderProps<InputRenderProps> {}\n\nexport const TextAreaContext = createContext<ContextValue<TextAreaProps, HTMLTextAreaElement>>({});\n\nlet filterHoverProps = (props: TextAreaProps) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {onHoverStart, onHoverChange, onHoverEnd, ...otherProps} = props;\n return otherProps;\n};\n\n/**\n * A textarea allows a user to input mult-line text.\n */\nexport const TextArea = forwardRef(function TextArea(props: TextAreaProps, ref: ForwardedRef<HTMLTextAreaElement>) {\n [props, ref] = useContextProps(props, ref, TextAreaContext);\n\n let {hoverProps, isHovered} = useHover(props);\n let {isFocused, isFocusVisible, focusProps} = useFocusRing({\n isTextInput: true,\n autoFocus: props.autoFocus\n });\n\n let isInvalid = !!props['aria-invalid'] && props['aria-invalid'] !== 'false';\n let renderProps = useRenderProps({\n ...props,\n values: {\n isHovered,\n isFocused,\n isFocusVisible,\n isDisabled: props.disabled || false,\n isInvalid\n },\n defaultClassName: 'react-aria-TextArea'\n });\n\n return (\n <textarea\n {...mergeProps(filterHoverProps(props), focusProps, hoverProps)}\n {...renderProps}\n ref={ref}\n data-focused={isFocused || undefined}\n data-disabled={props.disabled || undefined}\n data-hovered={isHovered || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-invalid={isInvalid || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"TextArea.module.js.map"}
|
package/dist/TextField.main.js
CHANGED
|
@@ -41,7 +41,7 @@ $parcel$export(module.exports, "TextField", () => $3f2c5af9d7d8905b$export$2c732
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
const $3f2c5af9d7d8905b$export$2129e27b3ef0d483 = /*#__PURE__*/ (0, $1Ma1u$react.createContext)(null);
|
|
44
|
-
|
|
44
|
+
const $3f2c5af9d7d8905b$export$2c73285ae9390cec = /*#__PURE__*/ (0, $1Ma1u$react.forwardRef)(function TextField(props, ref) {
|
|
45
45
|
[props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $3f2c5af9d7d8905b$export$2129e27b3ef0d483);
|
|
46
46
|
let { validationBehavior: formValidationBehavior } = (0, $c5ccf687772c0422$exports.useSlottedContext)((0, $35157657e549736b$exports.FormContext)) || {};
|
|
47
47
|
var _props_validationBehavior, _ref;
|
|
@@ -120,10 +120,7 @@ function $3f2c5af9d7d8905b$var$TextField(props, ref) {
|
|
|
120
120
|
]
|
|
121
121
|
]
|
|
122
122
|
}, renderProps.children));
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* A text field allows a user to enter a plain text value with a keyboard.
|
|
126
|
-
*/ const $3f2c5af9d7d8905b$export$2c73285ae9390cec = /*#__PURE__*/ (0, $1Ma1u$react.forwardRef)($3f2c5af9d7d8905b$var$TextField);
|
|
123
|
+
});
|
|
127
124
|
|
|
128
125
|
|
|
129
126
|
//# sourceMappingURL=TextField.main.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AA0CM,MAAM,0DAAmB,CAAA,GAAA,0BAAY,EAAgD;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AA0CM,MAAM,0DAAmB,CAAA,GAAA,0BAAY,EAAgD;AAKrF,MAAM,4CAA0B,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,UAAU,KAAqB,EAAE,GAAiC;IAC/I,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,EAAC,oBAAoB,sBAAsB,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE,CAAA,GAAA,qCAAU,MAAM,CAAC;QAC7D,2BAAA;IAAzB,IAAI,qBAAqB,CAAA,OAAA,CAAA,4BAAA,MAAM,kBAAkB,cAAxB,uCAAA,4BAA4B,oCAA5B,kBAAA,OAAsD;IAC/E,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAE;IACtB,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,iCAAM;IAC9B,IAAI,CAAC,kBAAkB,oBAAoB,GAAG,CAAA,GAAA,qBAAO,EAAE;IACvD,IAAI,cAAC,UAAU,cAAE,UAAU,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAE,GAAG,YAAW,GAAG,CAAA,GAAA,6BAAW,EAAO;QACnG,GAAG,CAAA,GAAA,8CAAmB,EAAE,MAAM;0BAC9B;eACA;4BACA;IACF,GAAG;IAEH,oFAAoF;IACpF,6DAA6D;IAC7D,IAAI,qBAAqB,CAAA,GAAA,wBAAU,EAAE,CAAC;QACpC,SAAS,OAAO,GAAG;QACnB,IAAI,IACF,oBAAoB,cAAc,sBAAsB,aAAa;IAEzE,GAAG,EAAE;IAEL,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,YAAY,MAAM,UAAU,IAAI;YAChC,WAAW,WAAW,SAAS;YAC/B,YAAY,MAAM,UAAU,IAAI;YAChC,YAAY,MAAM,UAAU,IAAI;QAClC;QACA,kBAAkB;IACpB;IAEA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE;IAC9B,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,WAAW,SAAS,IAAI;QACtC,iBAAe,MAAM,UAAU,IAAI;QACnC,iBAAe,MAAM,UAAU,IAAI;qBACnC,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC,CAAA,GAAA,sCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YAC9C;gBAAC,CAAA,GAAA,sCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAkB;aAAE;YACxD;gBAAC,CAAA,GAAA,yCAAc;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAkB;aAAE;YAC3D;gBAAC,CAAA,GAAA,qCAAU;gBAAG;oBACZ,OAAO;wBACL,aAAa;wBACb,cAAc;oBAChB;gBACF;aAAE;YACF;gBAAC,CAAA,GAAA,2CAAgB;gBAAG;aAAW;SAChC;OACA,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/TextField.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 */\n\nimport {AriaTextFieldProps, useTextField} from 'react-aria';\nimport {ContextValue, DOMProps, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {FormContext} from './Form';\nimport {forwardRefType} from '@react-types/shared';\nimport {InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef, useCallback, useRef, useState} from 'react';\nimport {TextAreaContext} from './TextArea';\nimport {TextContext} from './Text';\n\nexport interface TextFieldRenderProps {\n /**\n * Whether the text field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the value is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the text field is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the text field is required.\n * @selector [data-required]\n */\n isRequired: boolean\n}\n\nexport interface TextFieldProps extends Omit<AriaTextFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, Omit<DOMProps, 'style' | 'className' | 'children'>, SlotProps, RenderProps<TextFieldRenderProps> {\n /** Whether the value is invalid. */\n isInvalid?: boolean\n}\n\nexport const TextFieldContext = createContext<ContextValue<TextFieldProps, HTMLDivElement>>(null);\n\n/**\n * A text field allows a user to enter a plain text value with a keyboard.\n */\nexport const TextField = /*#__PURE__*/ (forwardRef as forwardRefType)(function TextField(props: TextFieldProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, TextFieldContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let inputRef = useRef(null);\n let [labelRef, label] = useSlot();\n let [inputElementType, setInputElementType] = useState('input');\n let {labelProps, inputProps, descriptionProps, errorMessageProps, ...validation} = useTextField<any>({\n ...removeDataAttributes(props),\n inputElementType,\n label,\n validationBehavior\n }, inputRef);\n\n // Intercept setting the input ref so we can determine what kind of element we have.\n // useTextField uses this to determine what props to include.\n let inputOrTextAreaRef = useCallback((el) => {\n inputRef.current = el;\n if (el) {\n setInputElementType(el instanceof HTMLTextAreaElement ? 'textarea' : 'input');\n }\n }, []);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid,\n isReadOnly: props.isReadOnly || false,\n isRequired: props.isRequired || false\n },\n defaultClassName: 'react-aria-TextField'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}\n data-invalid={validation.isInvalid || undefined}\n data-readonly={props.isReadOnly || undefined}\n data-required={props.isRequired || undefined}>\n <Provider\n values={[\n [LabelContext, {...labelProps, ref: labelRef}],\n [InputContext, {...inputProps, ref: inputOrTextAreaRef}],\n [TextAreaContext, {...inputProps, ref: inputOrTextAreaRef}],\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"],"names":[],"version":3,"file":"TextField.main.js.map"}
|
package/dist/TextField.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import {TextAreaContext as $216918bed6669f72$export$2dc6166a7e65358c} from "./Te
|
|
|
7
7
|
import {TextContext as $514c0188e459b4c0$export$9afb8bc826b033ea} from "./Text.mjs";
|
|
8
8
|
import {useTextField as $jmnGn$useTextField} from "react-aria";
|
|
9
9
|
import {filterDOMProps as $jmnGn$filterDOMProps} from "@react-aria/utils";
|
|
10
|
-
import $jmnGn$react, {createContext as $jmnGn$createContext,
|
|
10
|
+
import $jmnGn$react, {createContext as $jmnGn$createContext, forwardRef as $jmnGn$forwardRef, useRef as $jmnGn$useRef, useState as $jmnGn$useState, useCallback as $jmnGn$useCallback} from "react";
|
|
11
11
|
|
|
12
12
|
/*
|
|
13
13
|
* Copyright 2022 Adobe. All rights reserved.
|
|
@@ -30,7 +30,7 @@ import $jmnGn$react, {createContext as $jmnGn$createContext, useRef as $jmnGn$us
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
const $bcdf0525bf22703d$export$2129e27b3ef0d483 = /*#__PURE__*/ (0, $jmnGn$createContext)(null);
|
|
33
|
-
|
|
33
|
+
const $bcdf0525bf22703d$export$2c73285ae9390cec = /*#__PURE__*/ (0, $jmnGn$forwardRef)(function TextField(props, ref) {
|
|
34
34
|
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $bcdf0525bf22703d$export$2129e27b3ef0d483);
|
|
35
35
|
let { validationBehavior: formValidationBehavior } = (0, $64fa3d84918910a7$export$fabf2dc03a41866e)((0, $d3e0e05bdfcf66bd$export$c24727297075ec6a)) || {};
|
|
36
36
|
var _props_validationBehavior, _ref;
|
|
@@ -109,10 +109,7 @@ function $bcdf0525bf22703d$var$TextField(props, ref) {
|
|
|
109
109
|
]
|
|
110
110
|
]
|
|
111
111
|
}, renderProps.children));
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* A text field allows a user to enter a plain text value with a keyboard.
|
|
115
|
-
*/ const $bcdf0525bf22703d$export$2c73285ae9390cec = /*#__PURE__*/ (0, $jmnGn$forwardRef)($bcdf0525bf22703d$var$TextField);
|
|
112
|
+
});
|
|
116
113
|
|
|
117
114
|
|
|
118
115
|
export {$bcdf0525bf22703d$export$2129e27b3ef0d483 as TextFieldContext, $bcdf0525bf22703d$export$2c73285ae9390cec as TextField};
|
package/dist/TextField.module.js
CHANGED
|
@@ -7,7 +7,7 @@ import {TextAreaContext as $216918bed6669f72$export$2dc6166a7e65358c} from "./Te
|
|
|
7
7
|
import {TextContext as $514c0188e459b4c0$export$9afb8bc826b033ea} from "./Text.module.js";
|
|
8
8
|
import {useTextField as $jmnGn$useTextField} from "react-aria";
|
|
9
9
|
import {filterDOMProps as $jmnGn$filterDOMProps} from "@react-aria/utils";
|
|
10
|
-
import $jmnGn$react, {createContext as $jmnGn$createContext,
|
|
10
|
+
import $jmnGn$react, {createContext as $jmnGn$createContext, forwardRef as $jmnGn$forwardRef, useRef as $jmnGn$useRef, useState as $jmnGn$useState, useCallback as $jmnGn$useCallback} from "react";
|
|
11
11
|
|
|
12
12
|
/*
|
|
13
13
|
* Copyright 2022 Adobe. All rights reserved.
|
|
@@ -30,7 +30,7 @@ import $jmnGn$react, {createContext as $jmnGn$createContext, useRef as $jmnGn$us
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
const $bcdf0525bf22703d$export$2129e27b3ef0d483 = /*#__PURE__*/ (0, $jmnGn$createContext)(null);
|
|
33
|
-
|
|
33
|
+
const $bcdf0525bf22703d$export$2c73285ae9390cec = /*#__PURE__*/ (0, $jmnGn$forwardRef)(function TextField(props, ref) {
|
|
34
34
|
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $bcdf0525bf22703d$export$2129e27b3ef0d483);
|
|
35
35
|
let { validationBehavior: formValidationBehavior } = (0, $64fa3d84918910a7$export$fabf2dc03a41866e)((0, $d3e0e05bdfcf66bd$export$c24727297075ec6a)) || {};
|
|
36
36
|
var _props_validationBehavior, _ref;
|
|
@@ -109,10 +109,7 @@ function $bcdf0525bf22703d$var$TextField(props, ref) {
|
|
|
109
109
|
]
|
|
110
110
|
]
|
|
111
111
|
}, renderProps.children));
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* A text field allows a user to enter a plain text value with a keyboard.
|
|
115
|
-
*/ const $bcdf0525bf22703d$export$2c73285ae9390cec = /*#__PURE__*/ (0, $jmnGn$forwardRef)($bcdf0525bf22703d$var$TextField);
|
|
112
|
+
});
|
|
116
113
|
|
|
117
114
|
|
|
118
115
|
export {$bcdf0525bf22703d$export$2129e27b3ef0d483 as TextFieldContext, $bcdf0525bf22703d$export$2c73285ae9390cec as TextField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AA0CM,MAAM,0DAAmB,CAAA,GAAA,oBAAY,EAAgD;
|
|
1
|
+
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AA0CM,MAAM,0DAAmB,CAAA,GAAA,oBAAY,EAAgD;AAKrF,MAAM,4CAA0B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,UAAU,KAAqB,EAAE,GAAiC;IAC/I,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,WAAW,CAAA,GAAA,aAAK,EAAE;IACtB,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,yCAAM;IAC9B,IAAI,CAAC,kBAAkB,oBAAoB,GAAG,CAAA,GAAA,eAAO,EAAE;IACvD,IAAI,cAAC,UAAU,cAAE,UAAU,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAE,GAAG,YAAW,GAAG,CAAA,GAAA,mBAAW,EAAO;QACnG,GAAG,CAAA,GAAA,yCAAmB,EAAE,MAAM;0BAC9B;eACA;4BACA;IACF,GAAG;IAEH,oFAAoF;IACpF,6DAA6D;IAC7D,IAAI,qBAAqB,CAAA,GAAA,kBAAU,EAAE,CAAC;QACpC,SAAS,OAAO,GAAG;QACnB,IAAI,IACF,oBAAoB,cAAc,sBAAsB,aAAa;IAEzE,GAAG,EAAE;IAEL,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,YAAY,MAAM,UAAU,IAAI;YAChC,WAAW,WAAW,SAAS;YAC/B,YAAY,MAAM,UAAU,IAAI;YAChC,YAAY,MAAM,UAAU,IAAI;QAClC;QACA,kBAAkB;IACpB;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE;IAC9B,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,WAAW,SAAS,IAAI;QACtC,iBAAe,MAAM,UAAU,IAAI;QACnC,iBAAe,MAAM,UAAU,IAAI;qBACnC,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YAC9C;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAkB;aAAE;YACxD;gBAAC,CAAA,GAAA,yCAAc;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAkB;aAAE;YAC3D;gBAAC,CAAA,GAAA,yCAAU;gBAAG;oBACZ,OAAO;wBACL,aAAa;wBACb,cAAc;oBAChB;gBACF;aAAE;YACF;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;aAAW;SAChC;OACA,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/TextField.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 */\n\nimport {AriaTextFieldProps, useTextField} from 'react-aria';\nimport {ContextValue, DOMProps, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {FormContext} from './Form';\nimport {forwardRefType} from '@react-types/shared';\nimport {InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef, useCallback, useRef, useState} from 'react';\nimport {TextAreaContext} from './TextArea';\nimport {TextContext} from './Text';\n\nexport interface TextFieldRenderProps {\n /**\n * Whether the text field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the value is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the text field is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the text field is required.\n * @selector [data-required]\n */\n isRequired: boolean\n}\n\nexport interface TextFieldProps extends Omit<AriaTextFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, Omit<DOMProps, 'style' | 'className' | 'children'>, SlotProps, RenderProps<TextFieldRenderProps> {\n /** Whether the value is invalid. */\n isInvalid?: boolean\n}\n\nexport const TextFieldContext = createContext<ContextValue<TextFieldProps, HTMLDivElement>>(null);\n\n/**\n * A text field allows a user to enter a plain text value with a keyboard.\n */\nexport const TextField = /*#__PURE__*/ (forwardRef as forwardRefType)(function TextField(props: TextFieldProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, TextFieldContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let inputRef = useRef(null);\n let [labelRef, label] = useSlot();\n let [inputElementType, setInputElementType] = useState('input');\n let {labelProps, inputProps, descriptionProps, errorMessageProps, ...validation} = useTextField<any>({\n ...removeDataAttributes(props),\n inputElementType,\n label,\n validationBehavior\n }, inputRef);\n\n // Intercept setting the input ref so we can determine what kind of element we have.\n // useTextField uses this to determine what props to include.\n let inputOrTextAreaRef = useCallback((el) => {\n inputRef.current = el;\n if (el) {\n setInputElementType(el instanceof HTMLTextAreaElement ? 'textarea' : 'input');\n }\n }, []);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid,\n isReadOnly: props.isReadOnly || false,\n isRequired: props.isRequired || false\n },\n defaultClassName: 'react-aria-TextField'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}\n data-invalid={validation.isInvalid || undefined}\n data-readonly={props.isReadOnly || undefined}\n data-required={props.isRequired || undefined}>\n <Provider\n values={[\n [LabelContext, {...labelProps, ref: labelRef}],\n [InputContext, {...inputProps, ref: inputOrTextAreaRef}],\n [TextAreaContext, {...inputProps, ref: inputOrTextAreaRef}],\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"],"names":[],"version":3,"file":"TextField.module.js.map"}
|
|
@@ -31,7 +31,7 @@ $parcel$export(module.exports, "ToggleButton", () => $3def510c5b419a98$export$d2
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
const $3def510c5b419a98$export$43506d75ebd2e218 = /*#__PURE__*/ (0, $3sDBP$react.createContext)({});
|
|
34
|
-
|
|
34
|
+
const $3def510c5b419a98$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $3sDBP$react.forwardRef)(function ToggleButton(props, ref) {
|
|
35
35
|
[props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $3def510c5b419a98$export$43506d75ebd2e218);
|
|
36
36
|
let groupState = (0, $3sDBP$react.useContext)((0, $fed71ed29b70a020$exports.ToggleGroupStateContext));
|
|
37
37
|
let state = (0, $3sDBP$reactstately.useToggleState)(groupState && props.id != null ? {
|
|
@@ -75,10 +75,7 @@ function $3def510c5b419a98$var$ToggleButton(props, ref) {
|
|
|
75
75
|
"data-hovered": isHovered || undefined,
|
|
76
76
|
"data-focus-visible": isFocusVisible || undefined
|
|
77
77
|
});
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* A toggle button allows a user to toggle a selection on or off, for example switching between two states or modes.
|
|
81
|
-
*/ const $3def510c5b419a98$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $3sDBP$react.forwardRef)($3def510c5b419a98$var$ToggleButton);
|
|
78
|
+
});
|
|
82
79
|
|
|
83
80
|
|
|
84
81
|
//# sourceMappingURL=ToggleButton.main.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA2BM,MAAM,0DAAsB,CAAA,GAAA,0BAAY,EAAsD,CAAC;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA2BM,MAAM,0DAAsB,CAAA,GAAA,0BAAY,EAAsD,CAAC;AAK/F,MAAM,4CAA6B,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,aAAa,KAAwB,EAAE,GAAoC;IAC3J,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,aAAa,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,iDAAsB;IAClD,IAAI,QAAQ,CAAA,GAAA,kCAAa,EAAE,cAAc,MAAM,EAAE,IAAI,OAAO;QAC1D,YAAY,WAAW,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE;QAChD,UAAS,UAAU;YACjB,WAAW,WAAW,CAAC,MAAM,EAAE,EAAG;QACpC;IACF,IAAI;IAEJ,IAAI,eAAC,WAAW,aAAE,SAAS,cAAE,UAAU,cAAE,UAAU,EAAC,GAAG,cAAc,MAAM,EAAE,IAAI,OAE7E,CAAA,GAAA,yCAAuB,EAAE;QAAC,GAAG,KAAK;QAAE,IAAI,MAAM,EAAE;IAAA,GAAG,YAAY,OAE/D,CAAA,GAAA,gCAAc,EAAE;QAAC,GAAG,KAAK;QAAE,IAAI,MAAM,EAAE,IAAI,OAAO,OAAO,MAAM,EAAE,IAAI;IAAS,GAAG,OAAO;IAE5F,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,6BAAW,EAAE;IAC3D,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,yBAAO,EAAE;IACvC,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,IAAI;QACJ,QAAQ;uBAAC;uBAAW;uBAAW;YAAW,YAAY,MAAM,UAAU;4BAAE;wBAAgB;mBAAY;QAAK;QACzG,kBAAkB;IACpB;IAEA,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,2BAAS,EAAE,aAAa,YAAY,WAAW;QAClD,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,gBAAc,aAAa;QAC3B,iBAAe,cAAc;QAC7B,gBAAc,aAAa;QAC3B,iBAAe,cAAc;QAC7B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;;AAE5C","sources":["packages/react-aria-components/src/ToggleButton.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 */\n\nimport {AriaToggleButtonProps, HoverEvents, mergeProps, useFocusRing, useHover, useToggleButton, useToggleButtonGroupItem} from 'react-aria';\nimport {ButtonRenderProps} from './Button';\nimport {ContextValue, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';\nimport {forwardRefType, Key} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\nimport {ToggleGroupStateContext} from './ToggleButtonGroup';\nimport {ToggleState, useToggleState} from 'react-stately';\n\nexport interface ToggleButtonRenderProps extends Omit<ButtonRenderProps, 'isPending'> {\n /**\n * Whether the button is currently selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * State of the toggle button.\n */\n state: ToggleState\n}\n\nexport interface ToggleButtonProps extends Omit<AriaToggleButtonProps, 'children' | 'elementType' | 'id'>, HoverEvents, SlotProps, RenderProps<ToggleButtonRenderProps> {\n /** When used in a ToggleButtonGroup, an identifier for the item in `selectedKeys`. When used standalone, a DOM id. */\n id?: Key\n}\n\nexport const ToggleButtonContext = createContext<ContextValue<ToggleButtonProps, HTMLButtonElement>>({});\n\n/**\n * A toggle button allows a user to toggle a selection on or off, for example switching between two states or modes.\n */\nexport const ToggleButton = /*#__PURE__*/ (forwardRef as forwardRefType)(function ToggleButton(props: ToggleButtonProps, ref: ForwardedRef<HTMLButtonElement>) {\n [props, ref] = useContextProps(props, ref, ToggleButtonContext);\n let groupState = useContext(ToggleGroupStateContext);\n let state = useToggleState(groupState && props.id != null ? {\n isSelected: groupState.selectedKeys.has(props.id),\n onChange(isSelected) {\n groupState.setSelected(props.id!, isSelected);\n }\n } : props);\n\n let {buttonProps, isPressed, isSelected, isDisabled} = groupState && props.id != null\n // eslint-disable-next-line react-hooks/rules-of-hooks\n ? useToggleButtonGroupItem({...props, id: props.id}, groupState, ref)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n : useToggleButton({...props, id: props.id != null ? String(props.id) : undefined}, state, ref);\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing(props);\n let {hoverProps, isHovered} = useHover(props);\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n values: {isHovered, isPressed, isFocused, isSelected: state.isSelected, isFocusVisible, isDisabled, state},\n defaultClassName: 'react-aria-ToggleButton'\n });\n\n return (\n <button\n {...mergeProps(buttonProps, focusProps, hoverProps)}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-focused={isFocused || undefined}\n data-disabled={isDisabled || undefined}\n data-pressed={isPressed || undefined}\n data-selected={isSelected || undefined}\n data-hovered={isHovered || undefined}\n data-focus-visible={isFocusVisible || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"ToggleButton.main.js.map"}
|
package/dist/ToggleButton.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.mjs";
|
|
2
2
|
import {ToggleGroupStateContext as $84b7d8702d4ff4a8$export$a8a71863db173133} from "./ToggleButtonGroup.mjs";
|
|
3
3
|
import {useToggleButtonGroupItem as $jrJ9L$useToggleButtonGroupItem, useToggleButton as $jrJ9L$useToggleButton, useFocusRing as $jrJ9L$useFocusRing, useHover as $jrJ9L$useHover, mergeProps as $jrJ9L$mergeProps} from "react-aria";
|
|
4
|
-
import $jrJ9L$react, {createContext as $jrJ9L$createContext,
|
|
4
|
+
import $jrJ9L$react, {createContext as $jrJ9L$createContext, forwardRef as $jrJ9L$forwardRef, useContext as $jrJ9L$useContext} from "react";
|
|
5
5
|
import {useToggleState as $jrJ9L$useToggleState} from "react-stately";
|
|
6
6
|
|
|
7
7
|
/*
|
|
@@ -20,7 +20,7 @@ import {useToggleState as $jrJ9L$useToggleState} from "react-stately";
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
const $efde0372d7a700fe$export$43506d75ebd2e218 = /*#__PURE__*/ (0, $jrJ9L$createContext)({});
|
|
23
|
-
|
|
23
|
+
const $efde0372d7a700fe$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $jrJ9L$forwardRef)(function ToggleButton(props, ref) {
|
|
24
24
|
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $efde0372d7a700fe$export$43506d75ebd2e218);
|
|
25
25
|
let groupState = (0, $jrJ9L$useContext)((0, $84b7d8702d4ff4a8$export$a8a71863db173133));
|
|
26
26
|
let state = (0, $jrJ9L$useToggleState)(groupState && props.id != null ? {
|
|
@@ -64,10 +64,7 @@ function $efde0372d7a700fe$var$ToggleButton(props, ref) {
|
|
|
64
64
|
"data-hovered": isHovered || undefined,
|
|
65
65
|
"data-focus-visible": isFocusVisible || undefined
|
|
66
66
|
});
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* A toggle button allows a user to toggle a selection on or off, for example switching between two states or modes.
|
|
70
|
-
*/ const $efde0372d7a700fe$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $jrJ9L$forwardRef)($efde0372d7a700fe$var$ToggleButton);
|
|
67
|
+
});
|
|
71
68
|
|
|
72
69
|
|
|
73
70
|
export {$efde0372d7a700fe$export$43506d75ebd2e218 as ToggleButtonContext, $efde0372d7a700fe$export$d2b052e7b4be1756 as ToggleButton};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.module.js";
|
|
2
2
|
import {ToggleGroupStateContext as $84b7d8702d4ff4a8$export$a8a71863db173133} from "./ToggleButtonGroup.module.js";
|
|
3
3
|
import {useToggleButtonGroupItem as $jrJ9L$useToggleButtonGroupItem, useToggleButton as $jrJ9L$useToggleButton, useFocusRing as $jrJ9L$useFocusRing, useHover as $jrJ9L$useHover, mergeProps as $jrJ9L$mergeProps} from "react-aria";
|
|
4
|
-
import $jrJ9L$react, {createContext as $jrJ9L$createContext,
|
|
4
|
+
import $jrJ9L$react, {createContext as $jrJ9L$createContext, forwardRef as $jrJ9L$forwardRef, useContext as $jrJ9L$useContext} from "react";
|
|
5
5
|
import {useToggleState as $jrJ9L$useToggleState} from "react-stately";
|
|
6
6
|
|
|
7
7
|
/*
|
|
@@ -20,7 +20,7 @@ import {useToggleState as $jrJ9L$useToggleState} from "react-stately";
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
const $efde0372d7a700fe$export$43506d75ebd2e218 = /*#__PURE__*/ (0, $jrJ9L$createContext)({});
|
|
23
|
-
|
|
23
|
+
const $efde0372d7a700fe$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $jrJ9L$forwardRef)(function ToggleButton(props, ref) {
|
|
24
24
|
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $efde0372d7a700fe$export$43506d75ebd2e218);
|
|
25
25
|
let groupState = (0, $jrJ9L$useContext)((0, $84b7d8702d4ff4a8$export$a8a71863db173133));
|
|
26
26
|
let state = (0, $jrJ9L$useToggleState)(groupState && props.id != null ? {
|
|
@@ -64,10 +64,7 @@ function $efde0372d7a700fe$var$ToggleButton(props, ref) {
|
|
|
64
64
|
"data-hovered": isHovered || undefined,
|
|
65
65
|
"data-focus-visible": isFocusVisible || undefined
|
|
66
66
|
});
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* A toggle button allows a user to toggle a selection on or off, for example switching between two states or modes.
|
|
70
|
-
*/ const $efde0372d7a700fe$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $jrJ9L$forwardRef)($efde0372d7a700fe$var$ToggleButton);
|
|
67
|
+
});
|
|
71
68
|
|
|
72
69
|
|
|
73
70
|
export {$efde0372d7a700fe$export$43506d75ebd2e218 as ToggleButtonContext, $efde0372d7a700fe$export$d2b052e7b4be1756 as ToggleButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA2BM,MAAM,0DAAsB,CAAA,GAAA,oBAAY,EAAsD,CAAC;
|
|
1
|
+
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA2BM,MAAM,0DAAsB,CAAA,GAAA,oBAAY,EAAsD,CAAC;AAK/F,MAAM,4CAA6B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,aAAa,KAAwB,EAAE,GAAoC;IAC3J,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,aAAa,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAsB;IAClD,IAAI,QAAQ,CAAA,GAAA,qBAAa,EAAE,cAAc,MAAM,EAAE,IAAI,OAAO;QAC1D,YAAY,WAAW,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE;QAChD,UAAS,UAAU;YACjB,WAAW,WAAW,CAAC,MAAM,EAAE,EAAG;QACpC;IACF,IAAI;IAEJ,IAAI,eAAC,WAAW,aAAE,SAAS,cAAE,UAAU,cAAE,UAAU,EAAC,GAAG,cAAc,MAAM,EAAE,IAAI,OAE7E,CAAA,GAAA,+BAAuB,EAAE;QAAC,GAAG,KAAK;QAAE,IAAI,MAAM,EAAE;IAAA,GAAG,YAAY,OAE/D,CAAA,GAAA,sBAAc,EAAE;QAAC,GAAG,KAAK;QAAE,IAAI,MAAM,EAAE,IAAI,OAAO,OAAO,MAAM,EAAE,IAAI;IAAS,GAAG,OAAO;IAE5F,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW,EAAE;IAC3D,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;IACvC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,IAAI;QACJ,QAAQ;uBAAC;uBAAW;uBAAW;YAAW,YAAY,MAAM,UAAU;4BAAE;wBAAgB;mBAAY;QAAK;QACzG,kBAAkB;IACpB;IAEA,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,aAAa,YAAY,WAAW;QAClD,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,gBAAc,aAAa;QAC3B,iBAAe,cAAc;QAC7B,gBAAc,aAAa;QAC3B,iBAAe,cAAc;QAC7B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;;AAE5C","sources":["packages/react-aria-components/src/ToggleButton.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 */\n\nimport {AriaToggleButtonProps, HoverEvents, mergeProps, useFocusRing, useHover, useToggleButton, useToggleButtonGroupItem} from 'react-aria';\nimport {ButtonRenderProps} from './Button';\nimport {ContextValue, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';\nimport {forwardRefType, Key} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\nimport {ToggleGroupStateContext} from './ToggleButtonGroup';\nimport {ToggleState, useToggleState} from 'react-stately';\n\nexport interface ToggleButtonRenderProps extends Omit<ButtonRenderProps, 'isPending'> {\n /**\n * Whether the button is currently selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * State of the toggle button.\n */\n state: ToggleState\n}\n\nexport interface ToggleButtonProps extends Omit<AriaToggleButtonProps, 'children' | 'elementType' | 'id'>, HoverEvents, SlotProps, RenderProps<ToggleButtonRenderProps> {\n /** When used in a ToggleButtonGroup, an identifier for the item in `selectedKeys`. When used standalone, a DOM id. */\n id?: Key\n}\n\nexport const ToggleButtonContext = createContext<ContextValue<ToggleButtonProps, HTMLButtonElement>>({});\n\n/**\n * A toggle button allows a user to toggle a selection on or off, for example switching between two states or modes.\n */\nexport const ToggleButton = /*#__PURE__*/ (forwardRef as forwardRefType)(function ToggleButton(props: ToggleButtonProps, ref: ForwardedRef<HTMLButtonElement>) {\n [props, ref] = useContextProps(props, ref, ToggleButtonContext);\n let groupState = useContext(ToggleGroupStateContext);\n let state = useToggleState(groupState && props.id != null ? {\n isSelected: groupState.selectedKeys.has(props.id),\n onChange(isSelected) {\n groupState.setSelected(props.id!, isSelected);\n }\n } : props);\n\n let {buttonProps, isPressed, isSelected, isDisabled} = groupState && props.id != null\n // eslint-disable-next-line react-hooks/rules-of-hooks\n ? useToggleButtonGroupItem({...props, id: props.id}, groupState, ref)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n : useToggleButton({...props, id: props.id != null ? String(props.id) : undefined}, state, ref);\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing(props);\n let {hoverProps, isHovered} = useHover(props);\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n values: {isHovered, isPressed, isFocused, isSelected: state.isSelected, isFocusVisible, isDisabled, state},\n defaultClassName: 'react-aria-ToggleButton'\n });\n\n return (\n <button\n {...mergeProps(buttonProps, focusProps, hoverProps)}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-focused={isFocused || undefined}\n data-disabled={isDisabled || undefined}\n data-pressed={isPressed || undefined}\n data-selected={isSelected || undefined}\n data-hovered={isHovered || undefined}\n data-focus-visible={isFocusVisible || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"ToggleButton.module.js.map"}
|
|
@@ -31,7 +31,7 @@ $parcel$export(module.exports, "ToggleButtonGroup", () => $fed71ed29b70a020$expo
|
|
|
31
31
|
|
|
32
32
|
const $fed71ed29b70a020$export$298258635ae0dd97 = /*#__PURE__*/ (0, $kZVyu$react.createContext)({});
|
|
33
33
|
const $fed71ed29b70a020$export$a8a71863db173133 = /*#__PURE__*/ (0, $kZVyu$react.createContext)(null);
|
|
34
|
-
|
|
34
|
+
const $fed71ed29b70a020$export$40258cc1d95ff477 = /*#__PURE__*/ (0, $kZVyu$react.forwardRef)(function ToggleButtonGroup(props, ref) {
|
|
35
35
|
[props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $fed71ed29b70a020$export$298258635ae0dd97);
|
|
36
36
|
let state = (0, $kZVyu$reactstately.useToggleGroupState)(props);
|
|
37
37
|
let { groupProps: groupProps } = (0, $kZVyu$reactaria.useToggleButtonGroup)(props, state, ref);
|
|
@@ -53,10 +53,7 @@ function $fed71ed29b70a020$var$ToggleButtonGroup(props, ref) {
|
|
|
53
53
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($kZVyu$react))).createElement($fed71ed29b70a020$export$a8a71863db173133.Provider, {
|
|
54
54
|
value: state
|
|
55
55
|
}, renderProps.children));
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* A toggle button group allows a user to toggle multiple options, with single or multiple selection.
|
|
59
|
-
*/ const $fed71ed29b70a020$export$40258cc1d95ff477 = /*#__PURE__*/ (0, $kZVyu$react.forwardRef)($fed71ed29b70a020$var$ToggleButtonGroup);
|
|
56
|
+
});
|
|
60
57
|
|
|
61
58
|
|
|
62
59
|
//# sourceMappingURL=ToggleButtonGroup.main.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAqBM,MAAM,0DAA2B,CAAA,GAAA,0BAAY,EAAwD,CAAC;AACtG,MAAM,0DAA0B,CAAA,GAAA,0BAAY,EAA2B;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAqBM,MAAM,0DAA2B,CAAA,GAAA,0BAAY,EAAwD,CAAC;AACtG,MAAM,0DAA0B,CAAA,GAAA,0BAAY,EAA2B;AAKvE,MAAM,4CAAkC,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,kBAAkB,KAA6B,EAAE,GAAiC;IACvK,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,uCAAkB,EAAE;IAChC,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,qCAAmB,EAAE,OAAO,OAAO;IAEtD,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,YAAY,MAAM,UAAU;mBAC5B;QACF;QACA,kBAAkB;IACpB;IAEA,qBACE,0DAAC;QACE,GAAG,UAAU;QACb,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,oBAAkB,MAAM,WAAW,IAAI;QACvC,iBAAe,MAAM,UAAU,IAAI;qBACnC,0DAAC,0CAAwB,QAAQ;QAAC,OAAO;OACtC,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/ToggleButtonGroup.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 */\nimport {AriaToggleButtonGroupProps, useToggleButtonGroup} from 'react-aria';\nimport {ContextValue, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';\nimport {forwardRefType} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {ToggleGroupState, useToggleGroupState} from 'react-stately';\n\nexport interface ToggleButtonGroupRenderProps {\n /**\n * Whether the toggle button group is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the toggle button group.\n */\n state: ToggleGroupState\n}\n\nexport interface ToggleButtonGroupProps extends AriaToggleButtonGroupProps, RenderProps<ToggleButtonGroupRenderProps>, SlotProps {}\n\nexport const ToggleButtonGroupContext = createContext<ContextValue<ToggleButtonGroupProps, HTMLDivElement>>({});\nexport const ToggleGroupStateContext = createContext<ToggleGroupState | null>(null);\n\n/**\n * A toggle button group allows a user to toggle multiple options, with single or multiple selection.\n */\nexport const ToggleButtonGroup = /*#__PURE__*/ (forwardRef as forwardRefType)(function ToggleButtonGroup(props: ToggleButtonGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ToggleButtonGroupContext);\n let state = useToggleGroupState(props);\n let {groupProps} = useToggleButtonGroup(props, state, ref);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n isDisabled: state.isDisabled,\n state\n },\n defaultClassName: 'react-aria-ToggleButtonGroup'\n });\n\n return (\n <div\n {...groupProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={props.orientation || 'horizontal'}\n data-disabled={props.isDisabled || undefined}>\n <ToggleGroupStateContext.Provider value={state}>\n {renderProps.children}\n </ToggleGroupStateContext.Provider>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ToggleButtonGroup.main.js.map"}
|
|
@@ -19,7 +19,7 @@ import {useToggleGroupState as $1lXgK$useToggleGroupState} from "react-stately";
|
|
|
19
19
|
|
|
20
20
|
const $84b7d8702d4ff4a8$export$298258635ae0dd97 = /*#__PURE__*/ (0, $1lXgK$createContext)({});
|
|
21
21
|
const $84b7d8702d4ff4a8$export$a8a71863db173133 = /*#__PURE__*/ (0, $1lXgK$createContext)(null);
|
|
22
|
-
|
|
22
|
+
const $84b7d8702d4ff4a8$export$40258cc1d95ff477 = /*#__PURE__*/ (0, $1lXgK$forwardRef)(function ToggleButtonGroup(props, ref) {
|
|
23
23
|
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $84b7d8702d4ff4a8$export$298258635ae0dd97);
|
|
24
24
|
let state = (0, $1lXgK$useToggleGroupState)(props);
|
|
25
25
|
let { groupProps: groupProps } = (0, $1lXgK$useToggleButtonGroup)(props, state, ref);
|
|
@@ -41,10 +41,7 @@ function $84b7d8702d4ff4a8$var$ToggleButtonGroup(props, ref) {
|
|
|
41
41
|
}, /*#__PURE__*/ (0, $1lXgK$react).createElement($84b7d8702d4ff4a8$export$a8a71863db173133.Provider, {
|
|
42
42
|
value: state
|
|
43
43
|
}, renderProps.children));
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* A toggle button group allows a user to toggle multiple options, with single or multiple selection.
|
|
47
|
-
*/ const $84b7d8702d4ff4a8$export$40258cc1d95ff477 = /*#__PURE__*/ (0, $1lXgK$forwardRef)($84b7d8702d4ff4a8$var$ToggleButtonGroup);
|
|
44
|
+
});
|
|
48
45
|
|
|
49
46
|
|
|
50
47
|
export {$84b7d8702d4ff4a8$export$298258635ae0dd97 as ToggleButtonGroupContext, $84b7d8702d4ff4a8$export$a8a71863db173133 as ToggleGroupStateContext, $84b7d8702d4ff4a8$export$40258cc1d95ff477 as ToggleButtonGroup};
|
|
@@ -19,7 +19,7 @@ import {useToggleGroupState as $1lXgK$useToggleGroupState} from "react-stately";
|
|
|
19
19
|
|
|
20
20
|
const $84b7d8702d4ff4a8$export$298258635ae0dd97 = /*#__PURE__*/ (0, $1lXgK$createContext)({});
|
|
21
21
|
const $84b7d8702d4ff4a8$export$a8a71863db173133 = /*#__PURE__*/ (0, $1lXgK$createContext)(null);
|
|
22
|
-
|
|
22
|
+
const $84b7d8702d4ff4a8$export$40258cc1d95ff477 = /*#__PURE__*/ (0, $1lXgK$forwardRef)(function ToggleButtonGroup(props, ref) {
|
|
23
23
|
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $84b7d8702d4ff4a8$export$298258635ae0dd97);
|
|
24
24
|
let state = (0, $1lXgK$useToggleGroupState)(props);
|
|
25
25
|
let { groupProps: groupProps } = (0, $1lXgK$useToggleButtonGroup)(props, state, ref);
|
|
@@ -41,10 +41,7 @@ function $84b7d8702d4ff4a8$var$ToggleButtonGroup(props, ref) {
|
|
|
41
41
|
}, /*#__PURE__*/ (0, $1lXgK$react).createElement($84b7d8702d4ff4a8$export$a8a71863db173133.Provider, {
|
|
42
42
|
value: state
|
|
43
43
|
}, renderProps.children));
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* A toggle button group allows a user to toggle multiple options, with single or multiple selection.
|
|
47
|
-
*/ const $84b7d8702d4ff4a8$export$40258cc1d95ff477 = /*#__PURE__*/ (0, $1lXgK$forwardRef)($84b7d8702d4ff4a8$var$ToggleButtonGroup);
|
|
44
|
+
});
|
|
48
45
|
|
|
49
46
|
|
|
50
47
|
export {$84b7d8702d4ff4a8$export$298258635ae0dd97 as ToggleButtonGroupContext, $84b7d8702d4ff4a8$export$a8a71863db173133 as ToggleGroupStateContext, $84b7d8702d4ff4a8$export$40258cc1d95ff477 as ToggleButtonGroup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAqBM,MAAM,0DAA2B,CAAA,GAAA,oBAAY,EAAwD,CAAC;AACtG,MAAM,0DAA0B,CAAA,GAAA,oBAAY,EAA2B;
|
|
1
|
+
{"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAqBM,MAAM,0DAA2B,CAAA,GAAA,oBAAY,EAAwD,CAAC;AACtG,MAAM,0DAA0B,CAAA,GAAA,oBAAY,EAA2B;AAKvE,MAAM,4CAAkC,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,kBAAkB,KAA6B,EAAE,GAAiC;IACvK,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;IAChC,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,2BAAmB,EAAE,OAAO,OAAO;IAEtD,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,YAAY,MAAM,UAAU;mBAC5B;QACF;QACA,kBAAkB;IACpB;IAEA,qBACE,gCAAC;QACE,GAAG,UAAU;QACb,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,oBAAkB,MAAM,WAAW,IAAI;QACvC,iBAAe,MAAM,UAAU,IAAI;qBACnC,gCAAC,0CAAwB,QAAQ;QAAC,OAAO;OACtC,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/ToggleButtonGroup.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 */\nimport {AriaToggleButtonGroupProps, useToggleButtonGroup} from 'react-aria';\nimport {ContextValue, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';\nimport {forwardRefType} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {ToggleGroupState, useToggleGroupState} from 'react-stately';\n\nexport interface ToggleButtonGroupRenderProps {\n /**\n * Whether the toggle button group is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the toggle button group.\n */\n state: ToggleGroupState\n}\n\nexport interface ToggleButtonGroupProps extends AriaToggleButtonGroupProps, RenderProps<ToggleButtonGroupRenderProps>, SlotProps {}\n\nexport const ToggleButtonGroupContext = createContext<ContextValue<ToggleButtonGroupProps, HTMLDivElement>>({});\nexport const ToggleGroupStateContext = createContext<ToggleGroupState | null>(null);\n\n/**\n * A toggle button group allows a user to toggle multiple options, with single or multiple selection.\n */\nexport const ToggleButtonGroup = /*#__PURE__*/ (forwardRef as forwardRefType)(function ToggleButtonGroup(props: ToggleButtonGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ToggleButtonGroupContext);\n let state = useToggleGroupState(props);\n let {groupProps} = useToggleButtonGroup(props, state, ref);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n isDisabled: state.isDisabled,\n state\n },\n defaultClassName: 'react-aria-ToggleButtonGroup'\n });\n\n return (\n <div\n {...groupProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={props.orientation || 'horizontal'}\n data-disabled={props.isDisabled || undefined}>\n <ToggleGroupStateContext.Provider value={state}>\n {renderProps.children}\n </ToggleGroupStateContext.Provider>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ToggleButtonGroup.module.js.map"}
|
package/dist/Toolbar.main.js
CHANGED
|
@@ -29,7 +29,7 @@ $parcel$export(module.exports, "Toolbar", () => $a36bb7fee39de77a$export$4c26001
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
const $a36bb7fee39de77a$export$6311e7ab80ef752f = /*#__PURE__*/ (0, $6hkB7$react.createContext)({});
|
|
32
|
-
|
|
32
|
+
const $a36bb7fee39de77a$export$4c260019440d418f = /*#__PURE__*/ (0, $6hkB7$react.forwardRef)(function Toolbar(props, ref) {
|
|
33
33
|
[props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $a36bb7fee39de77a$export$6311e7ab80ef752f);
|
|
34
34
|
let { toolbarProps: toolbarProps } = (0, $6hkB7$reactariatoolbar.useToolbar)(props, ref);
|
|
35
35
|
let renderProps = (0, $c5ccf687772c0422$exports.useRenderProps)({
|
|
@@ -48,11 +48,7 @@ function $a36bb7fee39de77a$var$Toolbar(props, ref) {
|
|
|
48
48
|
slot: props.slot || undefined,
|
|
49
49
|
"data-orientation": props.orientation || 'horizontal'
|
|
50
50
|
}, renderProps.children);
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* A toolbar is a container for a set of interactive controls, such as buttons, dropdown menus, or checkboxes,
|
|
54
|
-
* with arrow key navigation.
|
|
55
|
-
*/ const $a36bb7fee39de77a$export$4c260019440d418f = /*#__PURE__*/ (0, $6hkB7$react.forwardRef)($a36bb7fee39de77a$var$Toolbar);
|
|
51
|
+
});
|
|
56
52
|
|
|
57
53
|
|
|
58
54
|
//# sourceMappingURL=Toolbar.main.js.map
|
package/dist/Toolbar.main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAmBM,MAAM,0DAAiB,CAAA,GAAA,0BAAY,EAA8C,CAAC;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAmBM,MAAM,0DAAiB,CAAA,GAAA,0BAAY,EAA8C,CAAC;AAMlF,MAAM,4CAAwB,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,QAAQ,KAAmB,EAAE,GAAiC;IACzI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,kCAAS,EAAE,OAAO;IACvC,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YAAC,aAAa,MAAM,WAAW,IAAI;QAAY;QACvD,kBAAkB;IACpB;IACA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE;IAC9B,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,gCAAS,EAAE,cAAc,SAAS;QACrC,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,oBAAkB,MAAM,WAAW,IAAI;OACtC,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/Toolbar.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 {AriaToolbarProps, useToolbar} from '@react-aria/toolbar';\nimport {ContextValue, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {forwardRefType, Orientation} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ToolbarRenderProps {\n /**\n * The current orientation of the toolbar.\n * @selector [data-orientation]\n */\n orientation: Orientation\n}\n\nexport interface ToolbarProps extends AriaToolbarProps, SlotProps, RenderProps<ToolbarRenderProps> {\n}\n\nexport const ToolbarContext = createContext<ContextValue<ToolbarProps, HTMLDivElement>>({});\n\n/**\n * A toolbar is a container for a set of interactive controls, such as buttons, dropdown menus, or checkboxes,\n * with arrow key navigation.\n */\nexport const Toolbar = /*#__PURE__*/ (forwardRef as forwardRefType)(function Toolbar(props: ToolbarProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ToolbarContext);\n let {toolbarProps} = useToolbar(props, ref);\n let renderProps = useRenderProps({\n ...props,\n values: {orientation: props.orientation || 'horizontal'},\n defaultClassName: 'react-aria-Toolbar'\n });\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <div\n {...mergeProps(toolbarProps, DOMProps)}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={props.orientation || 'horizontal'}>\n {renderProps.children}\n </div>\n );\n});\n"],"names":[],"version":3,"file":"Toolbar.main.js.map"}
|
package/dist/Toolbar.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import $8qPHH$react, {createContext as $8qPHH$createContext, forwardRef as $8qPH
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
const $13c3c67164f4d5be$export$6311e7ab80ef752f = /*#__PURE__*/ (0, $8qPHH$createContext)({});
|
|
21
|
-
|
|
21
|
+
const $13c3c67164f4d5be$export$4c260019440d418f = /*#__PURE__*/ (0, $8qPHH$forwardRef)(function Toolbar(props, ref) {
|
|
22
22
|
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $13c3c67164f4d5be$export$6311e7ab80ef752f);
|
|
23
23
|
let { toolbarProps: toolbarProps } = (0, $8qPHH$useToolbar)(props, ref);
|
|
24
24
|
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
@@ -37,11 +37,7 @@ function $13c3c67164f4d5be$var$Toolbar(props, ref) {
|
|
|
37
37
|
slot: props.slot || undefined,
|
|
38
38
|
"data-orientation": props.orientation || 'horizontal'
|
|
39
39
|
}, renderProps.children);
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* A toolbar is a container for a set of interactive controls, such as buttons, dropdown menus, or checkboxes,
|
|
43
|
-
* with arrow key navigation.
|
|
44
|
-
*/ const $13c3c67164f4d5be$export$4c260019440d418f = /*#__PURE__*/ (0, $8qPHH$forwardRef)($13c3c67164f4d5be$var$Toolbar);
|
|
40
|
+
});
|
|
45
41
|
|
|
46
42
|
|
|
47
43
|
export {$13c3c67164f4d5be$export$6311e7ab80ef752f as ToolbarContext, $13c3c67164f4d5be$export$4c260019440d418f as Toolbar};
|
package/dist/Toolbar.module.js
CHANGED
|
@@ -18,7 +18,7 @@ import $8qPHH$react, {createContext as $8qPHH$createContext, forwardRef as $8qPH
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
const $13c3c67164f4d5be$export$6311e7ab80ef752f = /*#__PURE__*/ (0, $8qPHH$createContext)({});
|
|
21
|
-
|
|
21
|
+
const $13c3c67164f4d5be$export$4c260019440d418f = /*#__PURE__*/ (0, $8qPHH$forwardRef)(function Toolbar(props, ref) {
|
|
22
22
|
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $13c3c67164f4d5be$export$6311e7ab80ef752f);
|
|
23
23
|
let { toolbarProps: toolbarProps } = (0, $8qPHH$useToolbar)(props, ref);
|
|
24
24
|
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
@@ -37,11 +37,7 @@ function $13c3c67164f4d5be$var$Toolbar(props, ref) {
|
|
|
37
37
|
slot: props.slot || undefined,
|
|
38
38
|
"data-orientation": props.orientation || 'horizontal'
|
|
39
39
|
}, renderProps.children);
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* A toolbar is a container for a set of interactive controls, such as buttons, dropdown menus, or checkboxes,
|
|
43
|
-
* with arrow key navigation.
|
|
44
|
-
*/ const $13c3c67164f4d5be$export$4c260019440d418f = /*#__PURE__*/ (0, $8qPHH$forwardRef)($13c3c67164f4d5be$var$Toolbar);
|
|
40
|
+
});
|
|
45
41
|
|
|
46
42
|
|
|
47
43
|
export {$13c3c67164f4d5be$export$6311e7ab80ef752f as ToolbarContext, $13c3c67164f4d5be$export$4c260019440d418f as Toolbar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAmBM,MAAM,0DAAiB,CAAA,GAAA,oBAAY,EAA8C,CAAC;
|
|
1
|
+
{"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAmBM,MAAM,0DAAiB,CAAA,GAAA,oBAAY,EAA8C,CAAC;AAMlF,MAAM,4CAAwB,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,QAAQ,KAAmB,EAAE,GAAiC;IACzI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,iBAAS,EAAE,OAAO;IACvC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YAAC,aAAa,MAAM,WAAW,IAAI;QAAY;QACvD,kBAAkB;IACpB;IACA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE;IAC9B,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,cAAc,SAAS;QACrC,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,oBAAkB,MAAM,WAAW,IAAI;OACtC,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/Toolbar.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 {AriaToolbarProps, useToolbar} from '@react-aria/toolbar';\nimport {ContextValue, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {forwardRefType, Orientation} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ToolbarRenderProps {\n /**\n * The current orientation of the toolbar.\n * @selector [data-orientation]\n */\n orientation: Orientation\n}\n\nexport interface ToolbarProps extends AriaToolbarProps, SlotProps, RenderProps<ToolbarRenderProps> {\n}\n\nexport const ToolbarContext = createContext<ContextValue<ToolbarProps, HTMLDivElement>>({});\n\n/**\n * A toolbar is a container for a set of interactive controls, such as buttons, dropdown menus, or checkboxes,\n * with arrow key navigation.\n */\nexport const Toolbar = /*#__PURE__*/ (forwardRef as forwardRefType)(function Toolbar(props: ToolbarProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ToolbarContext);\n let {toolbarProps} = useToolbar(props, ref);\n let renderProps = useRenderProps({\n ...props,\n values: {orientation: props.orientation || 'horizontal'},\n defaultClassName: 'react-aria-Toolbar'\n });\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <div\n {...mergeProps(toolbarProps, DOMProps)}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={props.orientation || 'horizontal'}>\n {renderProps.children}\n </div>\n );\n});\n"],"names":[],"version":3,"file":"Toolbar.module.js.map"}
|
package/dist/Tooltip.main.js
CHANGED
|
@@ -61,7 +61,7 @@ function $f9dd4061eb43ac38$export$8c610744efcf8a1d(props) {
|
|
|
61
61
|
ref: ref
|
|
62
62
|
}, props.children));
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
const $f9dd4061eb43ac38$export$28c660c63b792dea = /*#__PURE__*/ (0, $ct4WB$react.forwardRef)(function Tooltip({ UNSTABLE_portalContainer: UNSTABLE_portalContainer, ...props }, ref) {
|
|
65
65
|
[props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $f9dd4061eb43ac38$export$39ae08fa83328b12);
|
|
66
66
|
let contextState = (0, $ct4WB$react.useContext)($f9dd4061eb43ac38$export$7a7623236eec67fa);
|
|
67
67
|
let localState = (0, $ct4WB$reactstately.useTooltipTriggerState)(props);
|
|
@@ -75,10 +75,7 @@ function $f9dd4061eb43ac38$var$Tooltip({ UNSTABLE_portalContainer: UNSTABLE_port
|
|
|
75
75
|
tooltipRef: ref,
|
|
76
76
|
isExiting: isExiting
|
|
77
77
|
}));
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* A tooltip displays a description of an element on hover or focus.
|
|
81
|
-
*/ const $f9dd4061eb43ac38$export$28c660c63b792dea = /*#__PURE__*/ (0, $ct4WB$react.forwardRef)($f9dd4061eb43ac38$var$Tooltip);
|
|
78
|
+
});
|
|
82
79
|
function $f9dd4061eb43ac38$var$TooltipInner(props) {
|
|
83
80
|
let state = (0, $ct4WB$react.useContext)($f9dd4061eb43ac38$export$7a7623236eec67fa);
|
|
84
81
|
// Calculate the arrow size internally
|