@depup/react-aria-components 1.16.0-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +31 -0
- package/changes.json +10 -0
- package/dist/Autocomplete.main.js +78 -0
- package/dist/Autocomplete.main.js.map +1 -0
- package/dist/Autocomplete.mjs +67 -0
- package/dist/Autocomplete.module.js +67 -0
- package/dist/Autocomplete.module.js.map +1 -0
- package/dist/Breadcrumbs.main.js +103 -0
- package/dist/Breadcrumbs.main.js.map +1 -0
- package/dist/Breadcrumbs.mjs +92 -0
- package/dist/Breadcrumbs.module.js +92 -0
- package/dist/Breadcrumbs.module.js.map +1 -0
- package/dist/Button.main.js +123 -0
- package/dist/Button.main.js.map +1 -0
- package/dist/Button.mjs +113 -0
- package/dist/Button.module.js +113 -0
- package/dist/Button.module.js.map +1 -0
- package/dist/Calendar.main.js +364 -0
- package/dist/Calendar.main.js.map +1 -0
- package/dist/Calendar.mjs +345 -0
- package/dist/Calendar.module.js +345 -0
- package/dist/Calendar.module.js.map +1 -0
- package/dist/Checkbox.main.js +188 -0
- package/dist/Checkbox.main.js.map +1 -0
- package/dist/Checkbox.mjs +176 -0
- package/dist/Checkbox.module.js +176 -0
- package/dist/Checkbox.module.js.map +1 -0
- package/dist/Collection.main.js +105 -0
- package/dist/Collection.main.js.map +1 -0
- package/dist/Collection.mjs +91 -0
- package/dist/Collection.module.js +91 -0
- package/dist/Collection.module.js.map +1 -0
- package/dist/ColorArea.main.js +80 -0
- package/dist/ColorArea.main.js.map +1 -0
- package/dist/ColorArea.mjs +70 -0
- package/dist/ColorArea.module.js +70 -0
- package/dist/ColorArea.module.js.map +1 -0
- package/dist/ColorField.main.js +168 -0
- package/dist/ColorField.main.js.map +1 -0
- package/dist/ColorField.mjs +158 -0
- package/dist/ColorField.module.js +158 -0
- package/dist/ColorField.module.js.map +1 -0
- package/dist/ColorPicker.main.js +102 -0
- package/dist/ColorPicker.main.js.map +1 -0
- package/dist/ColorPicker.mjs +91 -0
- package/dist/ColorPicker.module.js +91 -0
- package/dist/ColorPicker.module.js.map +1 -0
- package/dist/ColorSlider.main.js +112 -0
- package/dist/ColorSlider.main.js.map +1 -0
- package/dist/ColorSlider.mjs +102 -0
- package/dist/ColorSlider.module.js +102 -0
- package/dist/ColorSlider.module.js.map +1 -0
- package/dist/ColorSwatch.main.js +44 -0
- package/dist/ColorSwatch.main.js.map +1 -0
- package/dist/ColorSwatch.mjs +34 -0
- package/dist/ColorSwatch.module.js +34 -0
- package/dist/ColorSwatch.module.js.map +1 -0
- package/dist/ColorSwatchPicker.main.js +102 -0
- package/dist/ColorSwatchPicker.main.js.map +1 -0
- package/dist/ColorSwatchPicker.mjs +95 -0
- package/dist/ColorSwatchPicker.module.js +95 -0
- package/dist/ColorSwatchPicker.module.js.map +1 -0
- package/dist/ColorThumb.main.js +67 -0
- package/dist/ColorThumb.main.js.map +1 -0
- package/dist/ColorThumb.mjs +57 -0
- package/dist/ColorThumb.module.js +57 -0
- package/dist/ColorThumb.module.js.map +1 -0
- package/dist/ColorWheel.main.js +102 -0
- package/dist/ColorWheel.main.js.map +1 -0
- package/dist/ColorWheel.mjs +90 -0
- package/dist/ColorWheel.module.js +90 -0
- package/dist/ColorWheel.module.js.map +1 -0
- package/dist/ComboBox.main.js +322 -0
- package/dist/ComboBox.main.js.map +1 -0
- package/dist/ComboBox.mjs +309 -0
- package/dist/ComboBox.module.js +309 -0
- package/dist/ComboBox.module.js.map +1 -0
- package/dist/DateField.main.js +361 -0
- package/dist/DateField.main.js.map +1 -0
- package/dist/DateField.mjs +345 -0
- package/dist/DateField.module.js +345 -0
- package/dist/DateField.module.js.map +1 -0
- package/dist/DatePicker.main.js +342 -0
- package/dist/DatePicker.main.js.map +1 -0
- package/dist/DatePicker.mjs +328 -0
- package/dist/DatePicker.module.js +328 -0
- package/dist/DatePicker.module.js.map +1 -0
- package/dist/Dialog.main.js +167 -0
- package/dist/Dialog.main.js.map +1 -0
- package/dist/Dialog.mjs +155 -0
- package/dist/Dialog.module.js +155 -0
- package/dist/Dialog.module.js.map +1 -0
- package/dist/Disclosure.main.js +171 -0
- package/dist/Disclosure.main.js.map +1 -0
- package/dist/Disclosure.mjs +157 -0
- package/dist/Disclosure.module.js +157 -0
- package/dist/Disclosure.module.js.map +1 -0
- package/dist/DragAndDrop.main.js +103 -0
- package/dist/DragAndDrop.main.js.map +1 -0
- package/dist/DragAndDrop.mjs +90 -0
- package/dist/DragAndDrop.module.js +90 -0
- package/dist/DragAndDrop.module.js.map +1 -0
- package/dist/DropZone.main.js +127 -0
- package/dist/DropZone.main.js.map +1 -0
- package/dist/DropZone.mjs +121 -0
- package/dist/DropZone.module.js +121 -0
- package/dist/DropZone.module.js.map +1 -0
- package/dist/FieldError.main.js +61 -0
- package/dist/FieldError.main.js.map +1 -0
- package/dist/FieldError.mjs +51 -0
- package/dist/FieldError.module.js +51 -0
- package/dist/FieldError.module.js.map +1 -0
- package/dist/FileTrigger.main.js +60 -0
- package/dist/FileTrigger.main.js.map +1 -0
- package/dist/FileTrigger.mjs +51 -0
- package/dist/FileTrigger.module.js +51 -0
- package/dist/FileTrigger.module.js.map +1 -0
- package/dist/Form.main.js +49 -0
- package/dist/Form.main.js.map +1 -0
- package/dist/Form.mjs +39 -0
- package/dist/Form.module.js +39 -0
- package/dist/Form.module.js.map +1 -0
- package/dist/GridList.main.js +589 -0
- package/dist/GridList.main.js.map +1 -0
- package/dist/GridList.mjs +573 -0
- package/dist/GridList.module.js +573 -0
- package/dist/GridList.module.js.map +1 -0
- package/dist/Group.main.js +72 -0
- package/dist/Group.main.js.map +1 -0
- package/dist/Group.mjs +62 -0
- package/dist/Group.module.js +62 -0
- package/dist/Group.module.js.map +1 -0
- package/dist/Header.main.js +40 -0
- package/dist/Header.main.js.map +1 -0
- package/dist/Header.mjs +30 -0
- package/dist/Header.module.js +30 -0
- package/dist/Header.module.js.map +1 -0
- package/dist/Heading.main.js +40 -0
- package/dist/Heading.main.js.map +1 -0
- package/dist/Heading.mjs +31 -0
- package/dist/Heading.module.js +31 -0
- package/dist/Heading.module.js.map +1 -0
- package/dist/HiddenDateInput.main.js +126 -0
- package/dist/HiddenDateInput.main.js.map +1 -0
- package/dist/HiddenDateInput.mjs +117 -0
- package/dist/HiddenDateInput.module.js +117 -0
- package/dist/HiddenDateInput.module.js.map +1 -0
- package/dist/Input.main.js +72 -0
- package/dist/Input.main.js.map +1 -0
- package/dist/Input.mjs +62 -0
- package/dist/Input.module.js +62 -0
- package/dist/Input.module.js.map +1 -0
- package/dist/Keyboard.main.js +38 -0
- package/dist/Keyboard.main.js.map +1 -0
- package/dist/Keyboard.mjs +28 -0
- package/dist/Keyboard.module.js +28 -0
- package/dist/Keyboard.module.js.map +1 -0
- package/dist/Label.main.js +43 -0
- package/dist/Label.main.js.map +1 -0
- package/dist/Label.mjs +33 -0
- package/dist/Label.module.js +33 -0
- package/dist/Label.module.js.map +1 -0
- package/dist/Link.main.js +72 -0
- package/dist/Link.main.js.map +1 -0
- package/dist/Link.mjs +62 -0
- package/dist/Link.module.js +62 -0
- package/dist/Link.module.js.map +1 -0
- package/dist/ListBox.main.js +477 -0
- package/dist/ListBox.main.js.map +1 -0
- package/dist/ListBox.mjs +463 -0
- package/dist/ListBox.module.js +463 -0
- package/dist/ListBox.module.js.map +1 -0
- package/dist/Menu.main.js +459 -0
- package/dist/Menu.main.js.map +1 -0
- package/dist/Menu.mjs +443 -0
- package/dist/Menu.module.js +443 -0
- package/dist/Menu.module.js.map +1 -0
- package/dist/Meter.main.js +72 -0
- package/dist/Meter.main.js.map +1 -0
- package/dist/Meter.mjs +62 -0
- package/dist/Meter.module.js +62 -0
- package/dist/Meter.module.js.map +1 -0
- package/dist/Modal.main.js +191 -0
- package/dist/Modal.main.js.map +1 -0
- package/dist/Modal.mjs +180 -0
- package/dist/Modal.module.js +180 -0
- package/dist/Modal.module.js.map +1 -0
- package/dist/NumberField.main.js +147 -0
- package/dist/NumberField.main.js.map +1 -0
- package/dist/NumberField.mjs +136 -0
- package/dist/NumberField.module.js +136 -0
- package/dist/NumberField.module.js.map +1 -0
- package/dist/OverlayArrow.main.js +64 -0
- package/dist/OverlayArrow.main.js.map +1 -0
- package/dist/OverlayArrow.mjs +54 -0
- package/dist/OverlayArrow.module.js +54 -0
- package/dist/OverlayArrow.module.js.map +1 -0
- package/dist/Popover.main.js +196 -0
- package/dist/Popover.main.js.map +1 -0
- package/dist/Popover.mjs +186 -0
- package/dist/Popover.module.js +186 -0
- package/dist/Popover.module.js.map +1 -0
- package/dist/ProgressBar.main.js +73 -0
- package/dist/ProgressBar.main.js.map +1 -0
- package/dist/ProgressBar.mjs +63 -0
- package/dist/ProgressBar.module.js +63 -0
- package/dist/ProgressBar.module.js.map +1 -0
- package/dist/RSPContexts.main.js +37 -0
- package/dist/RSPContexts.main.js.map +1 -0
- package/dist/RSPContexts.mjs +25 -0
- package/dist/RSPContexts.module.js +25 -0
- package/dist/RSPContexts.module.js.map +1 -0
- package/dist/RadioGroup.main.js +184 -0
- package/dist/RadioGroup.main.js.map +1 -0
- package/dist/RadioGroup.mjs +171 -0
- package/dist/RadioGroup.module.js +171 -0
- package/dist/RadioGroup.module.js.map +1 -0
- package/dist/SearchField.main.js +140 -0
- package/dist/SearchField.main.js.map +1 -0
- package/dist/SearchField.mjs +130 -0
- package/dist/SearchField.module.js +130 -0
- package/dist/SearchField.module.js.map +1 -0
- package/dist/Select.main.js +324 -0
- package/dist/Select.main.js.map +1 -0
- package/dist/Select.mjs +315 -0
- package/dist/Select.module.js +315 -0
- package/dist/Select.module.js.map +1 -0
- package/dist/SelectionIndicator.main.js +45 -0
- package/dist/SelectionIndicator.main.js.map +1 -0
- package/dist/SelectionIndicator.mjs +35 -0
- package/dist/SelectionIndicator.module.js +35 -0
- package/dist/SelectionIndicator.module.js.map +1 -0
- package/dist/Separator.main.js +71 -0
- package/dist/Separator.main.js.map +1 -0
- package/dist/Separator.mjs +61 -0
- package/dist/Separator.module.js +61 -0
- package/dist/Separator.module.js.map +1 -0
- package/dist/SharedElementTransition.main.js +140 -0
- package/dist/SharedElementTransition.main.js.map +1 -0
- package/dist/SharedElementTransition.mjs +130 -0
- package/dist/SharedElementTransition.module.js +130 -0
- package/dist/SharedElementTransition.module.js.map +1 -0
- package/dist/Slider.main.js +220 -0
- package/dist/Slider.main.js.map +1 -0
- package/dist/Slider.mjs +204 -0
- package/dist/Slider.module.js +204 -0
- package/dist/Slider.module.js.map +1 -0
- package/dist/Switch.main.js +89 -0
- package/dist/Switch.main.js.map +1 -0
- package/dist/Switch.mjs +79 -0
- package/dist/Switch.module.js +79 -0
- package/dist/Switch.module.js.map +1 -0
- package/dist/Table.main.js +1171 -0
- package/dist/Table.main.js.map +1 -0
- package/dist/Table.mjs +1154 -0
- package/dist/Table.module.js +1154 -0
- package/dist/Table.module.js.map +1 -0
- package/dist/TableLayout.main.js +38 -0
- package/dist/TableLayout.main.js.map +1 -0
- package/dist/TableLayout.mjs +33 -0
- package/dist/TableLayout.module.js +33 -0
- package/dist/TableLayout.module.js.map +1 -0
- package/dist/Tabs.main.js +330 -0
- package/dist/Tabs.main.js.map +1 -0
- package/dist/Tabs.mjs +315 -0
- package/dist/Tabs.module.js +315 -0
- package/dist/Tabs.module.js.map +1 -0
- package/dist/TagGroup.main.js +255 -0
- package/dist/TagGroup.main.js.map +1 -0
- package/dist/TagGroup.mjs +242 -0
- package/dist/TagGroup.module.js +242 -0
- package/dist/TagGroup.module.js.map +1 -0
- package/dist/Text.main.js +41 -0
- package/dist/Text.main.js.map +1 -0
- package/dist/Text.mjs +31 -0
- package/dist/Text.module.js +31 -0
- package/dist/Text.module.js.map +1 -0
- package/dist/TextArea.main.js +57 -0
- package/dist/TextArea.main.js.map +1 -0
- package/dist/TextArea.mjs +47 -0
- package/dist/TextArea.module.js +47 -0
- package/dist/TextArea.module.js.map +1 -0
- package/dist/TextField.main.js +145 -0
- package/dist/TextField.main.js.map +1 -0
- package/dist/TextField.mjs +135 -0
- package/dist/TextField.module.js +135 -0
- package/dist/TextField.module.js.map +1 -0
- package/dist/Toast.main.js +183 -0
- package/dist/Toast.main.js.map +1 -0
- package/dist/Toast.mjs +170 -0
- package/dist/Toast.module.js +170 -0
- package/dist/Toast.module.js.map +1 -0
- package/dist/ToggleButton.main.js +96 -0
- package/dist/ToggleButton.main.js.map +1 -0
- package/dist/ToggleButton.mjs +86 -0
- package/dist/ToggleButton.module.js +86 -0
- package/dist/ToggleButton.module.js.map +1 -0
- package/dist/ToggleButtonGroup.main.js +66 -0
- package/dist/ToggleButtonGroup.main.js.map +1 -0
- package/dist/ToggleButtonGroup.mjs +55 -0
- package/dist/ToggleButtonGroup.module.js +55 -0
- package/dist/ToggleButtonGroup.module.js.map +1 -0
- package/dist/Toolbar.main.js +55 -0
- package/dist/Toolbar.main.js.map +1 -0
- package/dist/Toolbar.mjs +45 -0
- package/dist/Toolbar.module.js +45 -0
- package/dist/Toolbar.module.js.map +1 -0
- package/dist/Tooltip.main.js +132 -0
- package/dist/Tooltip.main.js.map +1 -0
- package/dist/Tooltip.mjs +120 -0
- package/dist/Tooltip.module.js +120 -0
- package/dist/Tooltip.module.js.map +1 -0
- package/dist/Tree.main.js +834 -0
- package/dist/Tree.main.js.map +1 -0
- package/dist/Tree.mjs +818 -0
- package/dist/Tree.module.js +818 -0
- package/dist/Tree.module.js.map +1 -0
- package/dist/TreeDropTargetDelegate.main.js +216 -0
- package/dist/TreeDropTargetDelegate.main.js.map +1 -0
- package/dist/TreeDropTargetDelegate.mjs +211 -0
- package/dist/TreeDropTargetDelegate.module.js +211 -0
- package/dist/TreeDropTargetDelegate.module.js.map +1 -0
- package/dist/Virtualizer.main.js +135 -0
- package/dist/Virtualizer.main.js.map +1 -0
- package/dist/Virtualizer.mjs +126 -0
- package/dist/Virtualizer.module.js +126 -0
- package/dist/Virtualizer.module.js.map +1 -0
- package/dist/ar-AE.main.js +9 -0
- package/dist/ar-AE.main.js.map +1 -0
- package/dist/ar-AE.mjs +11 -0
- package/dist/ar-AE.module.js +11 -0
- package/dist/ar-AE.module.js.map +1 -0
- package/dist/bg-BG.main.js +9 -0
- package/dist/bg-BG.main.js.map +1 -0
- package/dist/bg-BG.mjs +11 -0
- package/dist/bg-BG.module.js +11 -0
- package/dist/bg-BG.module.js.map +1 -0
- package/dist/cs-CZ.main.js +9 -0
- package/dist/cs-CZ.main.js.map +1 -0
- package/dist/cs-CZ.mjs +11 -0
- package/dist/cs-CZ.module.js +11 -0
- package/dist/cs-CZ.module.js.map +1 -0
- package/dist/da-DK.main.js +9 -0
- package/dist/da-DK.main.js.map +1 -0
- package/dist/da-DK.mjs +11 -0
- package/dist/da-DK.module.js +11 -0
- package/dist/da-DK.module.js.map +1 -0
- package/dist/de-DE.main.js +9 -0
- package/dist/de-DE.main.js.map +1 -0
- package/dist/de-DE.mjs +11 -0
- package/dist/de-DE.module.js +11 -0
- package/dist/de-DE.module.js.map +1 -0
- package/dist/el-GR.main.js +9 -0
- package/dist/el-GR.main.js.map +1 -0
- package/dist/el-GR.mjs +11 -0
- package/dist/el-GR.module.js +11 -0
- package/dist/el-GR.module.js.map +1 -0
- package/dist/en-US.main.js +9 -0
- package/dist/en-US.main.js.map +1 -0
- package/dist/en-US.mjs +11 -0
- package/dist/en-US.module.js +11 -0
- package/dist/en-US.module.js.map +1 -0
- package/dist/es-ES.main.js +9 -0
- package/dist/es-ES.main.js.map +1 -0
- package/dist/es-ES.mjs +11 -0
- package/dist/es-ES.module.js +11 -0
- package/dist/es-ES.module.js.map +1 -0
- package/dist/et-EE.main.js +9 -0
- package/dist/et-EE.main.js.map +1 -0
- package/dist/et-EE.mjs +11 -0
- package/dist/et-EE.module.js +11 -0
- package/dist/et-EE.module.js.map +1 -0
- package/dist/fi-FI.main.js +9 -0
- package/dist/fi-FI.main.js.map +1 -0
- package/dist/fi-FI.mjs +11 -0
- package/dist/fi-FI.module.js +11 -0
- package/dist/fi-FI.module.js.map +1 -0
- package/dist/fr-FR.main.js +9 -0
- package/dist/fr-FR.main.js.map +1 -0
- package/dist/fr-FR.mjs +11 -0
- package/dist/fr-FR.module.js +11 -0
- package/dist/fr-FR.module.js.map +1 -0
- package/dist/he-IL.main.js +9 -0
- package/dist/he-IL.main.js.map +1 -0
- package/dist/he-IL.mjs +11 -0
- package/dist/he-IL.module.js +11 -0
- package/dist/he-IL.module.js.map +1 -0
- package/dist/hr-HR.main.js +9 -0
- package/dist/hr-HR.main.js.map +1 -0
- package/dist/hr-HR.mjs +11 -0
- package/dist/hr-HR.module.js +11 -0
- package/dist/hr-HR.module.js.map +1 -0
- package/dist/hu-HU.main.js +9 -0
- package/dist/hu-HU.main.js.map +1 -0
- package/dist/hu-HU.mjs +11 -0
- package/dist/hu-HU.module.js +11 -0
- package/dist/hu-HU.module.js.map +1 -0
- package/dist/import.mjs +161 -0
- package/dist/intlStrings.main.js +108 -0
- package/dist/intlStrings.main.js.map +1 -0
- package/dist/intlStrings.mjs +110 -0
- package/dist/intlStrings.module.js +110 -0
- package/dist/intlStrings.module.js.map +1 -0
- package/dist/it-IT.main.js +9 -0
- package/dist/it-IT.main.js.map +1 -0
- package/dist/it-IT.mjs +11 -0
- package/dist/it-IT.module.js +11 -0
- package/dist/it-IT.module.js.map +1 -0
- package/dist/ja-JP.main.js +9 -0
- package/dist/ja-JP.main.js.map +1 -0
- package/dist/ja-JP.mjs +11 -0
- package/dist/ja-JP.module.js +11 -0
- package/dist/ja-JP.module.js.map +1 -0
- package/dist/ko-KR.main.js +9 -0
- package/dist/ko-KR.main.js.map +1 -0
- package/dist/ko-KR.mjs +11 -0
- package/dist/ko-KR.module.js +11 -0
- package/dist/ko-KR.module.js.map +1 -0
- package/dist/lt-LT.main.js +9 -0
- package/dist/lt-LT.main.js.map +1 -0
- package/dist/lt-LT.mjs +11 -0
- package/dist/lt-LT.module.js +11 -0
- package/dist/lt-LT.module.js.map +1 -0
- package/dist/lv-LV.main.js +9 -0
- package/dist/lv-LV.main.js.map +1 -0
- package/dist/lv-LV.mjs +11 -0
- package/dist/lv-LV.module.js +11 -0
- package/dist/lv-LV.module.js.map +1 -0
- package/dist/main.js +430 -0
- package/dist/main.js.map +1 -0
- package/dist/module.js +161 -0
- package/dist/module.js.map +1 -0
- package/dist/nb-NO.main.js +9 -0
- package/dist/nb-NO.main.js.map +1 -0
- package/dist/nb-NO.mjs +11 -0
- package/dist/nb-NO.module.js +11 -0
- package/dist/nb-NO.module.js.map +1 -0
- package/dist/nl-NL.main.js +9 -0
- package/dist/nl-NL.main.js.map +1 -0
- package/dist/nl-NL.mjs +11 -0
- package/dist/nl-NL.module.js +11 -0
- package/dist/nl-NL.module.js.map +1 -0
- package/dist/pl-PL.main.js +9 -0
- package/dist/pl-PL.main.js.map +1 -0
- package/dist/pl-PL.mjs +11 -0
- package/dist/pl-PL.module.js +11 -0
- package/dist/pl-PL.module.js.map +1 -0
- package/dist/pt-BR.main.js +9 -0
- package/dist/pt-BR.main.js.map +1 -0
- package/dist/pt-BR.mjs +11 -0
- package/dist/pt-BR.module.js +11 -0
- package/dist/pt-BR.module.js.map +1 -0
- package/dist/pt-PT.main.js +9 -0
- package/dist/pt-PT.main.js.map +1 -0
- package/dist/pt-PT.mjs +11 -0
- package/dist/pt-PT.module.js +11 -0
- package/dist/pt-PT.module.js.map +1 -0
- package/dist/ro-RO.main.js +9 -0
- package/dist/ro-RO.main.js.map +1 -0
- package/dist/ro-RO.mjs +11 -0
- package/dist/ro-RO.module.js +11 -0
- package/dist/ro-RO.module.js.map +1 -0
- package/dist/ru-RU.main.js +9 -0
- package/dist/ru-RU.main.js.map +1 -0
- package/dist/ru-RU.mjs +11 -0
- package/dist/ru-RU.module.js +11 -0
- package/dist/ru-RU.module.js.map +1 -0
- package/dist/sk-SK.main.js +9 -0
- package/dist/sk-SK.main.js.map +1 -0
- package/dist/sk-SK.mjs +11 -0
- package/dist/sk-SK.module.js +11 -0
- package/dist/sk-SK.module.js.map +1 -0
- package/dist/sl-SI.main.js +9 -0
- package/dist/sl-SI.main.js.map +1 -0
- package/dist/sl-SI.mjs +11 -0
- package/dist/sl-SI.module.js +11 -0
- package/dist/sl-SI.module.js.map +1 -0
- package/dist/sr-SP.main.js +9 -0
- package/dist/sr-SP.main.js.map +1 -0
- package/dist/sr-SP.mjs +11 -0
- package/dist/sr-SP.module.js +11 -0
- package/dist/sr-SP.module.js.map +1 -0
- package/dist/sv-SE.main.js +9 -0
- package/dist/sv-SE.main.js.map +1 -0
- package/dist/sv-SE.mjs +11 -0
- package/dist/sv-SE.module.js +11 -0
- package/dist/sv-SE.module.js.map +1 -0
- package/dist/tr-TR.main.js +9 -0
- package/dist/tr-TR.main.js.map +1 -0
- package/dist/tr-TR.mjs +11 -0
- package/dist/tr-TR.module.js +11 -0
- package/dist/tr-TR.module.js.map +1 -0
- package/dist/types.d.ts +3764 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/uk-UA.main.js +9 -0
- package/dist/uk-UA.main.js.map +1 -0
- package/dist/uk-UA.mjs +11 -0
- package/dist/uk-UA.module.js +11 -0
- package/dist/uk-UA.module.js.map +1 -0
- package/dist/useDragAndDrop.main.js +74 -0
- package/dist/useDragAndDrop.main.js.map +1 -0
- package/dist/useDragAndDrop.mjs +69 -0
- package/dist/useDragAndDrop.module.js +69 -0
- package/dist/useDragAndDrop.module.js.map +1 -0
- package/dist/utils.main.js +205 -0
- package/dist/utils.main.js.map +1 -0
- package/dist/utils.mjs +188 -0
- package/dist/utils.module.js +188 -0
- package/dist/utils.module.js.map +1 -0
- package/dist/zh-CN.main.js +9 -0
- package/dist/zh-CN.main.js.map +1 -0
- package/dist/zh-CN.mjs +11 -0
- package/dist/zh-CN.module.js +11 -0
- package/dist/zh-CN.module.js.map +1 -0
- package/dist/zh-TW.main.js +9 -0
- package/dist/zh-TW.main.js.map +1 -0
- package/dist/zh-TW.mjs +11 -0
- package/dist/zh-TW.module.js +11 -0
- package/dist/zh-TW.module.js.map +1 -0
- package/i18n/ar-AE.js +1 -0
- package/i18n/ar-AE.mjs +1 -0
- package/i18n/bg-BG.js +1 -0
- package/i18n/bg-BG.mjs +1 -0
- package/i18n/cs-CZ.js +1 -0
- package/i18n/cs-CZ.mjs +1 -0
- package/i18n/da-DK.js +1 -0
- package/i18n/da-DK.mjs +1 -0
- package/i18n/de-DE.js +1 -0
- package/i18n/de-DE.mjs +1 -0
- package/i18n/el-GR.js +1 -0
- package/i18n/el-GR.mjs +1 -0
- package/i18n/en-US.js +1 -0
- package/i18n/en-US.mjs +1 -0
- package/i18n/es-ES.js +1 -0
- package/i18n/es-ES.mjs +1 -0
- package/i18n/et-EE.js +1 -0
- package/i18n/et-EE.mjs +1 -0
- package/i18n/fi-FI.js +1 -0
- package/i18n/fi-FI.mjs +1 -0
- package/i18n/fr-FR.js +1 -0
- package/i18n/fr-FR.mjs +1 -0
- package/i18n/he-IL.js +1 -0
- package/i18n/he-IL.mjs +1 -0
- package/i18n/hr-HR.js +1 -0
- package/i18n/hr-HR.mjs +1 -0
- package/i18n/hu-HU.js +1 -0
- package/i18n/hu-HU.mjs +1 -0
- package/i18n/index.d.ts +13 -0
- package/i18n/index.js +118 -0
- package/i18n/index.mjs +115 -0
- package/i18n/it-IT.js +1 -0
- package/i18n/it-IT.mjs +1 -0
- package/i18n/ja-JP.js +1 -0
- package/i18n/ja-JP.mjs +1 -0
- package/i18n/ko-KR.js +1 -0
- package/i18n/ko-KR.mjs +1 -0
- package/i18n/lang.d.ts +7 -0
- package/i18n/lt-LT.js +1 -0
- package/i18n/lt-LT.mjs +1 -0
- package/i18n/lv-LV.js +1 -0
- package/i18n/lv-LV.mjs +1 -0
- package/i18n/nb-NO.js +1 -0
- package/i18n/nb-NO.mjs +1 -0
- package/i18n/nl-NL.js +1 -0
- package/i18n/nl-NL.mjs +1 -0
- package/i18n/pl-PL.js +1 -0
- package/i18n/pl-PL.mjs +1 -0
- package/i18n/pt-BR.js +1 -0
- package/i18n/pt-BR.mjs +1 -0
- package/i18n/pt-PT.js +1 -0
- package/i18n/pt-PT.mjs +1 -0
- package/i18n/ro-RO.js +1 -0
- package/i18n/ro-RO.mjs +1 -0
- package/i18n/ru-RU.js +1 -0
- package/i18n/ru-RU.mjs +1 -0
- package/i18n/sk-SK.js +1 -0
- package/i18n/sk-SK.mjs +1 -0
- package/i18n/sl-SI.js +1 -0
- package/i18n/sl-SI.mjs +1 -0
- package/i18n/sr-SP.js +1 -0
- package/i18n/sr-SP.mjs +1 -0
- package/i18n/sv-SE.js +1 -0
- package/i18n/sv-SE.mjs +1 -0
- package/i18n/tr-TR.js +1 -0
- package/i18n/tr-TR.mjs +1 -0
- package/i18n/uk-UA.js +1 -0
- package/i18n/uk-UA.mjs +1 -0
- package/i18n/zh-CN.js +1 -0
- package/i18n/zh-CN.mjs +1 -0
- package/i18n/zh-TW.js +1 -0
- package/i18n/zh-TW.mjs +1 -0
- package/package.json +105 -0
- package/src/Autocomplete.tsx +64 -0
- package/src/Breadcrumbs.tsx +137 -0
- package/src/Button.tsx +185 -0
- package/src/Calendar.tsx +620 -0
- package/src/Checkbox.tsx +282 -0
- package/src/Collection.tsx +225 -0
- package/src/ColorArea.tsx +89 -0
- package/src/ColorField.tsx +243 -0
- package/src/ColorPicker.tsx +63 -0
- package/src/ColorSlider.tsx +110 -0
- package/src/ColorSwatch.tsx +54 -0
- package/src/ColorSwatchPicker.tsx +125 -0
- package/src/ColorThumb.tsx +108 -0
- package/src/ColorWheel.tsx +122 -0
- package/src/ComboBox.tsx +325 -0
- package/src/DateField.tsx +425 -0
- package/src/DatePicker.tsx +334 -0
- package/src/Dialog.tsx +159 -0
- package/src/Disclosure.tsx +259 -0
- package/src/DragAndDrop.tsx +115 -0
- package/src/DropZone.tsx +145 -0
- package/src/FieldError.tsx +57 -0
- package/src/FileTrigger.tsx +79 -0
- package/src/Form.tsx +52 -0
- package/src/GridList.tsx +678 -0
- package/src/Group.tsx +114 -0
- package/src/Header.tsx +28 -0
- package/src/Heading.tsx +31 -0
- package/src/HiddenDateInput.tsx +152 -0
- package/src/Input.tsx +113 -0
- package/src/Keyboard.tsx +23 -0
- package/src/Label.tsx +29 -0
- package/src/Link.tsx +115 -0
- package/src/ListBox.tsx +577 -0
- package/src/Menu.tsx +496 -0
- package/src/Meter.tsx +93 -0
- package/src/Modal.tsx +262 -0
- package/src/NumberField.tsx +152 -0
- package/src/OverlayArrow.tsx +91 -0
- package/src/Popover.tsx +267 -0
- package/src/ProgressBar.tsx +101 -0
- package/src/RSPContexts.ts +52 -0
- package/src/RadioGroup.tsx +273 -0
- package/src/SearchField.tsx +152 -0
- package/src/Select.tsx +356 -0
- package/src/SelectionIndicator.tsx +46 -0
- package/src/Separator.tsx +76 -0
- package/src/SharedElementTransition.tsx +186 -0
- package/src/Slider.tsx +310 -0
- package/src/Switch.tsx +146 -0
- package/src/Table.tsx +1597 -0
- package/src/TableLayout.ts +28 -0
- package/src/Tabs.tsx +495 -0
- package/src/TagGroup.tsx +310 -0
- package/src/Text.tsx +28 -0
- package/src/TextArea.tsx +65 -0
- package/src/TextField.tsx +148 -0
- package/src/Toast.tsx +248 -0
- package/src/ToggleButton.tsx +103 -0
- package/src/ToggleButtonGroup.tsx +90 -0
- package/src/Toolbar.tsx +69 -0
- package/src/Tooltip.tsx +187 -0
- package/src/Tree.tsx +1066 -0
- package/src/TreeDropTargetDelegate.ts +308 -0
- package/src/Virtualizer.tsx +174 -0
- package/src/index.ts +160 -0
- package/src/useDragAndDrop.tsx +150 -0
- package/src/utils.tsx +351 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import {dom as $64fa3d84918910a7$export$df3a06d6289f983e, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, removeDataAttributes as $64fa3d84918910a7$export$ef03459518577ad4, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.mjs";
|
|
2
|
+
import {ColorFieldContext as $4e85f108e88277b8$export$44644b8a16031b5b} from "./RSPContexts.mjs";
|
|
3
|
+
import {FieldErrorContext as $ee014567cb39d3f0$export$ff05c3ac10437e03} from "./FieldError.mjs";
|
|
4
|
+
import {GroupContext as $a049562f99e7db0e$export$f9c6924e160136d1} from "./Group.mjs";
|
|
5
|
+
import {InputContext as $3985021b0ad6602f$export$37fb8590cf2c088c} from "./Input.mjs";
|
|
6
|
+
import {LabelContext as $01b77f81d0f07f68$export$75b6ee27786ba447} from "./Label.mjs";
|
|
7
|
+
import {TextContext as $514c0188e459b4c0$export$9afb8bc826b033ea} from "./Text.mjs";
|
|
8
|
+
import {useLocale as $kjuGe$useLocale, useColorChannelField as $kjuGe$useColorChannelField, useColorField as $kjuGe$useColorField} from "react-aria";
|
|
9
|
+
import {useColorChannelFieldState as $kjuGe$useColorChannelFieldState, useColorFieldState as $kjuGe$useColorFieldState} from "react-stately";
|
|
10
|
+
import {filterDOMProps as $kjuGe$filterDOMProps} from "@react-aria/utils";
|
|
11
|
+
import $kjuGe$react, {createContext as $kjuGe$createContext, forwardRef as $kjuGe$forwardRef, useRef as $kjuGe$useRef} from "react";
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
15
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
16
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
17
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
+
*
|
|
19
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
20
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
21
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
22
|
+
* governing permissions and limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
const $3ada01a82feafb94$export$96b6d32b05a1a8ed = /*#__PURE__*/ (0, $kjuGe$createContext)(null);
|
|
35
|
+
const $3ada01a82feafb94$export$b865d4358897bb17 = /*#__PURE__*/ (0, $kjuGe$forwardRef)(function ColorField(props, ref) {
|
|
36
|
+
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, (0, $4e85f108e88277b8$export$44644b8a16031b5b));
|
|
37
|
+
if (props.channel) return /*#__PURE__*/ (0, $kjuGe$react).createElement($3ada01a82feafb94$var$ColorChannelField, {
|
|
38
|
+
...props,
|
|
39
|
+
channel: props.channel,
|
|
40
|
+
forwardedRef: ref
|
|
41
|
+
});
|
|
42
|
+
else return /*#__PURE__*/ (0, $kjuGe$react).createElement($3ada01a82feafb94$var$HexColorField, {
|
|
43
|
+
...props,
|
|
44
|
+
forwardedRef: ref
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
function $3ada01a82feafb94$var$ColorChannelField(props) {
|
|
48
|
+
let { locale: locale } = (0, $kjuGe$useLocale)();
|
|
49
|
+
let state = (0, $kjuGe$useColorChannelFieldState)({
|
|
50
|
+
...props,
|
|
51
|
+
locale: locale
|
|
52
|
+
});
|
|
53
|
+
let inputRef = (0, $kjuGe$useRef)(null);
|
|
54
|
+
let [labelRef, label] = (0, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8)(!props['aria-label'] && !props['aria-labelledby']);
|
|
55
|
+
var _props_validationBehavior;
|
|
56
|
+
let { labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $kjuGe$useColorChannelField)({
|
|
57
|
+
...(0, $64fa3d84918910a7$export$ef03459518577ad4)(props),
|
|
58
|
+
label: label,
|
|
59
|
+
validationBehavior: (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : 'native'
|
|
60
|
+
}, state, inputRef);
|
|
61
|
+
return /*#__PURE__*/ (0, $kjuGe$react).createElement((0, $kjuGe$react).Fragment, null, $3ada01a82feafb94$var$useChildren(props, state, props.forwardedRef, inputProps, inputRef, labelProps, labelRef, descriptionProps, errorMessageProps, validation), props.name && /*#__PURE__*/ (0, $kjuGe$react).createElement("input", {
|
|
62
|
+
type: "hidden",
|
|
63
|
+
name: props.name,
|
|
64
|
+
form: props.form,
|
|
65
|
+
value: isNaN(state.numberValue) ? '' : state.numberValue
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
function $3ada01a82feafb94$var$HexColorField(props) {
|
|
69
|
+
var _props_validationBehavior;
|
|
70
|
+
let state = (0, $kjuGe$useColorFieldState)({
|
|
71
|
+
...props,
|
|
72
|
+
validationBehavior: (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : 'native'
|
|
73
|
+
});
|
|
74
|
+
let inputRef = (0, $kjuGe$useRef)(null);
|
|
75
|
+
let [labelRef, label] = (0, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8)(!props['aria-label'] && !props['aria-labelledby']);
|
|
76
|
+
var _props_validationBehavior1;
|
|
77
|
+
let { labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $kjuGe$useColorField)({
|
|
78
|
+
...(0, $64fa3d84918910a7$export$ef03459518577ad4)(props),
|
|
79
|
+
label: label,
|
|
80
|
+
validationBehavior: (_props_validationBehavior1 = props.validationBehavior) !== null && _props_validationBehavior1 !== void 0 ? _props_validationBehavior1 : 'native'
|
|
81
|
+
}, state, inputRef);
|
|
82
|
+
return $3ada01a82feafb94$var$useChildren(props, state, props.forwardedRef, inputProps, inputRef, labelProps, labelRef, descriptionProps, errorMessageProps, validation);
|
|
83
|
+
}
|
|
84
|
+
function $3ada01a82feafb94$var$useChildren(props, state, ref, inputProps, inputRef, labelProps, labelRef, descriptionProps, errorMessageProps, validation) {
|
|
85
|
+
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
86
|
+
...props,
|
|
87
|
+
values: {
|
|
88
|
+
state: state,
|
|
89
|
+
channel: props.channel || 'hex',
|
|
90
|
+
isDisabled: props.isDisabled || false,
|
|
91
|
+
isInvalid: validation.isInvalid || false,
|
|
92
|
+
isReadOnly: props.isReadOnly || false,
|
|
93
|
+
isRequired: props.isRequired || false
|
|
94
|
+
},
|
|
95
|
+
defaultClassName: 'react-aria-ColorField'
|
|
96
|
+
});
|
|
97
|
+
let DOMProps = (0, $kjuGe$filterDOMProps)(props, {
|
|
98
|
+
global: true
|
|
99
|
+
});
|
|
100
|
+
delete DOMProps.id;
|
|
101
|
+
return /*#__PURE__*/ (0, $kjuGe$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
102
|
+
values: [
|
|
103
|
+
[
|
|
104
|
+
$3ada01a82feafb94$export$96b6d32b05a1a8ed,
|
|
105
|
+
state
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
(0, $3985021b0ad6602f$export$37fb8590cf2c088c),
|
|
109
|
+
{
|
|
110
|
+
...inputProps,
|
|
111
|
+
ref: inputRef
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
[
|
|
115
|
+
(0, $01b77f81d0f07f68$export$75b6ee27786ba447),
|
|
116
|
+
{
|
|
117
|
+
...labelProps,
|
|
118
|
+
ref: labelRef
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
[
|
|
122
|
+
(0, $a049562f99e7db0e$export$f9c6924e160136d1),
|
|
123
|
+
{
|
|
124
|
+
role: 'presentation',
|
|
125
|
+
isInvalid: validation.isInvalid,
|
|
126
|
+
isDisabled: props.isDisabled || false
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
[
|
|
130
|
+
(0, $514c0188e459b4c0$export$9afb8bc826b033ea),
|
|
131
|
+
{
|
|
132
|
+
slots: {
|
|
133
|
+
description: descriptionProps,
|
|
134
|
+
errorMessage: errorMessageProps
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
[
|
|
139
|
+
(0, $ee014567cb39d3f0$export$ff05c3ac10437e03),
|
|
140
|
+
validation
|
|
141
|
+
]
|
|
142
|
+
]
|
|
143
|
+
}, /*#__PURE__*/ (0, $kjuGe$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
144
|
+
...DOMProps,
|
|
145
|
+
...renderProps,
|
|
146
|
+
ref: ref,
|
|
147
|
+
slot: props.slot || undefined,
|
|
148
|
+
"data-channel": props.channel || 'hex',
|
|
149
|
+
"data-disabled": props.isDisabled || undefined,
|
|
150
|
+
"data-invalid": validation.isInvalid || undefined,
|
|
151
|
+
"data-readonly": props.isReadOnly || undefined,
|
|
152
|
+
"data-required": props.isRequired || undefined
|
|
153
|
+
}));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
export {$3ada01a82feafb94$export$96b6d32b05a1a8ed as ColorFieldStateContext, $3ada01a82feafb94$export$b865d4358897bb17 as ColorField};
|
|
158
|
+
//# sourceMappingURL=ColorField.module.js.map
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import {dom as $64fa3d84918910a7$export$df3a06d6289f983e, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, removeDataAttributes as $64fa3d84918910a7$export$ef03459518577ad4, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.module.js";
|
|
2
|
+
import {ColorFieldContext as $4e85f108e88277b8$export$44644b8a16031b5b} from "./RSPContexts.module.js";
|
|
3
|
+
import {FieldErrorContext as $ee014567cb39d3f0$export$ff05c3ac10437e03} from "./FieldError.module.js";
|
|
4
|
+
import {GroupContext as $a049562f99e7db0e$export$f9c6924e160136d1} from "./Group.module.js";
|
|
5
|
+
import {InputContext as $3985021b0ad6602f$export$37fb8590cf2c088c} from "./Input.module.js";
|
|
6
|
+
import {LabelContext as $01b77f81d0f07f68$export$75b6ee27786ba447} from "./Label.module.js";
|
|
7
|
+
import {TextContext as $514c0188e459b4c0$export$9afb8bc826b033ea} from "./Text.module.js";
|
|
8
|
+
import {useLocale as $kjuGe$useLocale, useColorChannelField as $kjuGe$useColorChannelField, useColorField as $kjuGe$useColorField} from "react-aria";
|
|
9
|
+
import {useColorChannelFieldState as $kjuGe$useColorChannelFieldState, useColorFieldState as $kjuGe$useColorFieldState} from "react-stately";
|
|
10
|
+
import {filterDOMProps as $kjuGe$filterDOMProps} from "@react-aria/utils";
|
|
11
|
+
import $kjuGe$react, {createContext as $kjuGe$createContext, forwardRef as $kjuGe$forwardRef, useRef as $kjuGe$useRef} from "react";
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
15
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
16
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
17
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
+
*
|
|
19
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
20
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
21
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
22
|
+
* governing permissions and limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
const $3ada01a82feafb94$export$96b6d32b05a1a8ed = /*#__PURE__*/ (0, $kjuGe$createContext)(null);
|
|
35
|
+
const $3ada01a82feafb94$export$b865d4358897bb17 = /*#__PURE__*/ (0, $kjuGe$forwardRef)(function ColorField(props, ref) {
|
|
36
|
+
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, (0, $4e85f108e88277b8$export$44644b8a16031b5b));
|
|
37
|
+
if (props.channel) return /*#__PURE__*/ (0, $kjuGe$react).createElement($3ada01a82feafb94$var$ColorChannelField, {
|
|
38
|
+
...props,
|
|
39
|
+
channel: props.channel,
|
|
40
|
+
forwardedRef: ref
|
|
41
|
+
});
|
|
42
|
+
else return /*#__PURE__*/ (0, $kjuGe$react).createElement($3ada01a82feafb94$var$HexColorField, {
|
|
43
|
+
...props,
|
|
44
|
+
forwardedRef: ref
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
function $3ada01a82feafb94$var$ColorChannelField(props) {
|
|
48
|
+
let { locale: locale } = (0, $kjuGe$useLocale)();
|
|
49
|
+
let state = (0, $kjuGe$useColorChannelFieldState)({
|
|
50
|
+
...props,
|
|
51
|
+
locale: locale
|
|
52
|
+
});
|
|
53
|
+
let inputRef = (0, $kjuGe$useRef)(null);
|
|
54
|
+
let [labelRef, label] = (0, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8)(!props['aria-label'] && !props['aria-labelledby']);
|
|
55
|
+
var _props_validationBehavior;
|
|
56
|
+
let { labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $kjuGe$useColorChannelField)({
|
|
57
|
+
...(0, $64fa3d84918910a7$export$ef03459518577ad4)(props),
|
|
58
|
+
label: label,
|
|
59
|
+
validationBehavior: (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : 'native'
|
|
60
|
+
}, state, inputRef);
|
|
61
|
+
return /*#__PURE__*/ (0, $kjuGe$react).createElement((0, $kjuGe$react).Fragment, null, $3ada01a82feafb94$var$useChildren(props, state, props.forwardedRef, inputProps, inputRef, labelProps, labelRef, descriptionProps, errorMessageProps, validation), props.name && /*#__PURE__*/ (0, $kjuGe$react).createElement("input", {
|
|
62
|
+
type: "hidden",
|
|
63
|
+
name: props.name,
|
|
64
|
+
form: props.form,
|
|
65
|
+
value: isNaN(state.numberValue) ? '' : state.numberValue
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
function $3ada01a82feafb94$var$HexColorField(props) {
|
|
69
|
+
var _props_validationBehavior;
|
|
70
|
+
let state = (0, $kjuGe$useColorFieldState)({
|
|
71
|
+
...props,
|
|
72
|
+
validationBehavior: (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : 'native'
|
|
73
|
+
});
|
|
74
|
+
let inputRef = (0, $kjuGe$useRef)(null);
|
|
75
|
+
let [labelRef, label] = (0, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8)(!props['aria-label'] && !props['aria-labelledby']);
|
|
76
|
+
var _props_validationBehavior1;
|
|
77
|
+
let { labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $kjuGe$useColorField)({
|
|
78
|
+
...(0, $64fa3d84918910a7$export$ef03459518577ad4)(props),
|
|
79
|
+
label: label,
|
|
80
|
+
validationBehavior: (_props_validationBehavior1 = props.validationBehavior) !== null && _props_validationBehavior1 !== void 0 ? _props_validationBehavior1 : 'native'
|
|
81
|
+
}, state, inputRef);
|
|
82
|
+
return $3ada01a82feafb94$var$useChildren(props, state, props.forwardedRef, inputProps, inputRef, labelProps, labelRef, descriptionProps, errorMessageProps, validation);
|
|
83
|
+
}
|
|
84
|
+
function $3ada01a82feafb94$var$useChildren(props, state, ref, inputProps, inputRef, labelProps, labelRef, descriptionProps, errorMessageProps, validation) {
|
|
85
|
+
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
86
|
+
...props,
|
|
87
|
+
values: {
|
|
88
|
+
state: state,
|
|
89
|
+
channel: props.channel || 'hex',
|
|
90
|
+
isDisabled: props.isDisabled || false,
|
|
91
|
+
isInvalid: validation.isInvalid || false,
|
|
92
|
+
isReadOnly: props.isReadOnly || false,
|
|
93
|
+
isRequired: props.isRequired || false
|
|
94
|
+
},
|
|
95
|
+
defaultClassName: 'react-aria-ColorField'
|
|
96
|
+
});
|
|
97
|
+
let DOMProps = (0, $kjuGe$filterDOMProps)(props, {
|
|
98
|
+
global: true
|
|
99
|
+
});
|
|
100
|
+
delete DOMProps.id;
|
|
101
|
+
return /*#__PURE__*/ (0, $kjuGe$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
102
|
+
values: [
|
|
103
|
+
[
|
|
104
|
+
$3ada01a82feafb94$export$96b6d32b05a1a8ed,
|
|
105
|
+
state
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
(0, $3985021b0ad6602f$export$37fb8590cf2c088c),
|
|
109
|
+
{
|
|
110
|
+
...inputProps,
|
|
111
|
+
ref: inputRef
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
[
|
|
115
|
+
(0, $01b77f81d0f07f68$export$75b6ee27786ba447),
|
|
116
|
+
{
|
|
117
|
+
...labelProps,
|
|
118
|
+
ref: labelRef
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
[
|
|
122
|
+
(0, $a049562f99e7db0e$export$f9c6924e160136d1),
|
|
123
|
+
{
|
|
124
|
+
role: 'presentation',
|
|
125
|
+
isInvalid: validation.isInvalid,
|
|
126
|
+
isDisabled: props.isDisabled || false
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
[
|
|
130
|
+
(0, $514c0188e459b4c0$export$9afb8bc826b033ea),
|
|
131
|
+
{
|
|
132
|
+
slots: {
|
|
133
|
+
description: descriptionProps,
|
|
134
|
+
errorMessage: errorMessageProps
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
[
|
|
139
|
+
(0, $ee014567cb39d3f0$export$ff05c3ac10437e03),
|
|
140
|
+
validation
|
|
141
|
+
]
|
|
142
|
+
]
|
|
143
|
+
}, /*#__PURE__*/ (0, $kjuGe$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
144
|
+
...DOMProps,
|
|
145
|
+
...renderProps,
|
|
146
|
+
ref: ref,
|
|
147
|
+
slot: props.slot || undefined,
|
|
148
|
+
"data-channel": props.channel || 'hex',
|
|
149
|
+
"data-disabled": props.isDisabled || undefined,
|
|
150
|
+
"data-invalid": validation.isInvalid || undefined,
|
|
151
|
+
"data-readonly": props.isReadOnly || undefined,
|
|
152
|
+
"data-required": props.isRequired || undefined
|
|
153
|
+
}));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
export {$3ada01a82feafb94$export$96b6d32b05a1a8ed as ColorFieldStateContext, $3ada01a82feafb94$export$b865d4358897bb17 as ColorField};
|
|
158
|
+
//# sourceMappingURL=ColorField.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AA4EM,MAAM,0DAAyB,CAAA,GAAA,oBAAY,EAA0B;AAKrE,MAAM,0DAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,yCAAgB;IAC3D,IAAI,MAAM,OAAO,EACf,qBAAO,gCAAC;QAAmB,GAAG,KAAK;QAAE,SAAS,MAAM,OAAO;QAAE,cAAc;;SAE3E,qBAAO,gCAAC;QAAe,GAAG,KAAK;QAAE,cAAc;;AAEnD;AAOA,SAAS,wCAAkB,KAA6B;IACtD,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,gCAAwB,EAAE;QACpC,GAAG,KAAK;gBACR;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,aAAK,EAAoB;IACxC,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,yCAAM,EAC5B,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;QAW7B;IATtB,IAAI,cACF,UAAU,cACV,UAAU,oBACV,gBAAgB,qBAChB,iBAAiB,EACjB,GAAG,YACJ,GAAG,CAAA,GAAA,2BAAmB,EAAE;QACvB,GAAG,CAAA,GAAA,yCAAmB,EAAE,MAAM;eAC9B;QACA,oBAAoB,CAAA,4BAAA,MAAM,kBAAkB,cAAxB,uCAAA,4BAA4B;IAClD,GAAG,OAAO;IAEV,qBACE,kEACG,kCACC,OACA,OACA,MAAM,YAAY,EAClB,YACA,UACA,YACA,UACA,kBACA,mBACA,aAED,MAAM,IAAI,kBAAI,gCAAC;QAAM,MAAK;QAAS,MAAM,MAAM,IAAI;QAAE,MAAM,MAAM,IAAI;QAAE,OAAO,MAAM,MAAM,WAAW,IAAI,KAAK,MAAM,WAAW;;AAGtI;AAMA,SAAS,oCAAc,KAAyB;QAGxB;IAFtB,IAAI,QAAQ,CAAA,GAAA,yBAAiB,EAAE;QAC7B,GAAG,KAAK;QACR,oBAAoB,CAAA,4BAAA,MAAM,kBAAkB,cAAxB,uCAAA,4BAA4B;IAClD;IAEA,IAAI,WAAW,CAAA,GAAA,aAAK,EAAoB;IACxC,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,yCAAM,EAC5B,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;QAW7B;IATtB,IAAI,cACF,UAAU,cACV,UAAU,oBACV,gBAAgB,qBAChB,iBAAiB,EACjB,GAAG,YACJ,GAAG,CAAA,GAAA,oBAAY,EAAE;QAChB,GAAG,CAAA,GAAA,yCAAmB,EAAE,MAAM;eAC9B;QACA,oBAAoB,CAAA,6BAAA,MAAM,kBAAkB,cAAxB,wCAAA,6BAA4B;IAClD,GAAG,OAAO;IAEV,OAAO,kCACL,OACA,OACA,MAAM,YAAY,EAClB,YACA,UACA,YACA,UACA,kBACA,mBACA;AAEJ;AAEA,SAAS,kCACP,KAAsB,EACtB,KAAsB,EACtB,GAAiC,EACjC,UAA4C,EAC5C,QAA+B,EAC/B,UAAiD,EACjD,QAA+B,EAC/B,gBAA6C,EAC7C,iBAA8C,EAC9C,UAA4B;IAE5B,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;mBACN;YACA,SAAS,MAAM,OAAO,IAAI;YAC1B,YAAY,MAAM,UAAU,IAAI;YAChC,WAAW,WAAW,SAAS,IAAI;YACnC,YAAY,MAAM,UAAU,IAAI;YAChC,YAAY,MAAM,UAAU,IAAI;QAClC;QACA,kBAAkB;IACpB;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAwB;aAAM;YAC/B;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YAC9C;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YAC9C;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,MAAM;oBAAgB,WAAW,WAAW,SAAS;oBAAE,YAAY,MAAM,UAAU,IAAI;gBAAK;aAAE;YAC9G;gBAAC,CAAA,GAAA,yCAAU;gBAAG;oBACZ,OAAO;wBACL,aAAa;wBACb,cAAc;oBAChB;gBACF;aAAE;YACF;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;aAAW;SAChC;qBACD,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,gBAAc,MAAM,OAAO,IAAI;QAC/B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,WAAW,SAAS,IAAI;QACtC,iBAAe,MAAM,UAAU,IAAI;QACnC,iBAAe,MAAM,UAAU,IAAI;;AAG3C","sources":["packages/react-aria-components/src/ColorField.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 {AriaColorFieldProps, useColorChannelField, useColorField, useLocale} from 'react-aria';\nimport {\n ClassNameOrFunction,\n dom,\n Provider,\n RACValidation,\n removeDataAttributes,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorChannel, ColorFieldState, ColorSpace, useColorChannelFieldState, useColorFieldState} from 'react-stately';\nimport {ColorFieldContext} from './RSPContexts';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes, InputDOMProps, ValidationResult} from '@react-types/shared';\nimport {GroupContext} from './Group';\nimport {InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, Ref, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface ColorFieldRenderProps {\n /**\n * Whether the color field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the color field is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the color field is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the color field is required.\n * @selector [data-required]\n */\n isRequired: boolean,\n /**\n * The color channel that this field edits, or \"hex\" if no `channel` prop is set.\n * @selector [data-channel=\"hex | hue | saturation | ...\"]\n */\n channel: ColorChannel | 'hex',\n /**\n * State of the color field.\n */\n state: ColorFieldState\n}\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, InputDOMProps, RenderProps<ColorFieldRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorField'\n */\n className?: ClassNameOrFunction<ColorFieldRenderProps>,\n /**\n * The color channel that this field edits. If not provided, \n * the color is edited as a hex value.\n */\n channel?: ColorChannel,\n /**\n * The color space that the color field operates in if a `channel` prop is provided.\n * If no `channel` is provided, the color field always displays the color as an RGB hex value.\n */\n colorSpace?: ColorSpace\n}\n\nexport const ColorFieldStateContext = createContext<ColorFieldState | null>(null);\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nexport const ColorField = forwardRef(function ColorField(props: ColorFieldProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorFieldContext);\n if (props.channel) {\n return <ColorChannelField {...props} channel={props.channel} forwardedRef={ref} />;\n } else {\n return <HexColorField {...props} forwardedRef={ref} />;\n }\n});\n\ninterface ColorChannelFieldProps extends Omit<ColorFieldProps, 'channel'> {\n channel: ColorChannel,\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction ColorChannelField(props: ColorChannelFieldProps) {\n let {locale} = useLocale();\n let state = useColorChannelFieldState({\n ...props,\n locale\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorChannelField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return (\n <>\n {useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n )}\n {props.name && <input type=\"hidden\" name={props.name} form={props.form} value={isNaN(state.numberValue) ? '' : state.numberValue} />}\n </>\n );\n}\n\ninterface HexColorFieldProps extends ColorFieldProps {\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction HexColorField(props: HexColorFieldProps) {\n let state = useColorFieldState({\n ...props,\n validationBehavior: props.validationBehavior ?? 'native'\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n );\n}\n\nfunction useChildren(\n props: ColorFieldProps,\n state: ColorFieldState,\n ref: ForwardedRef<HTMLDivElement>,\n inputProps: InputHTMLAttributes<HTMLElement>,\n inputRef: Ref<HTMLInputElement>,\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n labelRef: Ref<HTMLLabelElement>,\n descriptionProps: HTMLAttributes<HTMLElement>,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n validation: ValidationResult\n) {\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n channel: props.channel || 'hex',\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid || false,\n isReadOnly: props.isReadOnly || false,\n isRequired: props.isRequired || false\n },\n defaultClassName: 'react-aria-ColorField'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorFieldStateContext, state],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef}],\n [GroupContext, {role: 'presentation', isInvalid: validation.isInvalid, isDisabled: props.isDisabled || false}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <dom.div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-channel={props.channel || 'hex'}\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 );\n}\n"],"names":[],"version":3,"file":"ColorField.module.js.map"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
var $c5ccf687772c0422$exports = require("./utils.main.js");
|
|
2
|
+
var $525402dfec7da5bc$exports = require("./RSPContexts.main.js");
|
|
3
|
+
var $804cfb3beb27b520$exports = require("./ColorSwatch.main.js");
|
|
4
|
+
var $4adbbc5a2d33d279$exports = require("./ColorSwatchPicker.main.js");
|
|
5
|
+
var $lvYpl$reactstately = require("react-stately");
|
|
6
|
+
var $lvYpl$reactaria = require("react-aria");
|
|
7
|
+
var $lvYpl$react = require("react");
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
function $parcel$interopDefault(a) {
|
|
11
|
+
return a && a.__esModule ? a.default : a;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function $parcel$export(e, n, v, s) {
|
|
15
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
$parcel$export(module.exports, "ColorPickerContext", () => $34f42c35e4f8c327$export$cfac98503b32f6d6);
|
|
19
|
+
$parcel$export(module.exports, "ColorPickerStateContext", () => $34f42c35e4f8c327$export$2c14261be40a385f);
|
|
20
|
+
$parcel$export(module.exports, "ColorPicker", () => $34f42c35e4f8c327$export$9feb1bc2e5f1ccb3);
|
|
21
|
+
/*
|
|
22
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
23
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
24
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
25
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
26
|
+
*
|
|
27
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
28
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
29
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
30
|
+
* governing permissions and limitations under the License.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
const $34f42c35e4f8c327$export$cfac98503b32f6d6 = /*#__PURE__*/ (0, $lvYpl$react.createContext)(null);
|
|
39
|
+
const $34f42c35e4f8c327$export$2c14261be40a385f = /*#__PURE__*/ (0, $lvYpl$react.createContext)(null);
|
|
40
|
+
function $34f42c35e4f8c327$export$9feb1bc2e5f1ccb3(props) {
|
|
41
|
+
let ctx = (0, $c5ccf687772c0422$exports.useSlottedContext)($34f42c35e4f8c327$export$cfac98503b32f6d6, props.slot);
|
|
42
|
+
props = (0, $lvYpl$reactaria.mergeProps)(ctx, props);
|
|
43
|
+
let state = (0, $lvYpl$reactstately.useColorPickerState)(props);
|
|
44
|
+
let renderProps = (0, $c5ccf687772c0422$exports.useRenderProps)({
|
|
45
|
+
...props,
|
|
46
|
+
values: {
|
|
47
|
+
color: state.color
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($lvYpl$react))).createElement((0, $c5ccf687772c0422$exports.Provider), {
|
|
51
|
+
values: [
|
|
52
|
+
[
|
|
53
|
+
$34f42c35e4f8c327$export$2c14261be40a385f,
|
|
54
|
+
state
|
|
55
|
+
],
|
|
56
|
+
[
|
|
57
|
+
(0, $525402dfec7da5bc$exports.ColorSliderContext),
|
|
58
|
+
{
|
|
59
|
+
value: state.color,
|
|
60
|
+
onChange: state.setColor
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
[
|
|
64
|
+
(0, $525402dfec7da5bc$exports.ColorAreaContext),
|
|
65
|
+
{
|
|
66
|
+
value: state.color,
|
|
67
|
+
onChange: state.setColor
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
[
|
|
71
|
+
(0, $525402dfec7da5bc$exports.ColorWheelContext),
|
|
72
|
+
{
|
|
73
|
+
value: state.color,
|
|
74
|
+
onChange: state.setColor
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
(0, $525402dfec7da5bc$exports.ColorFieldContext),
|
|
79
|
+
{
|
|
80
|
+
value: state.color,
|
|
81
|
+
onChange: state.setColor
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
[
|
|
85
|
+
(0, $804cfb3beb27b520$exports.ColorSwatchContext),
|
|
86
|
+
{
|
|
87
|
+
color: state.color
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
[
|
|
91
|
+
(0, $4adbbc5a2d33d279$exports.ColorSwatchPickerContext),
|
|
92
|
+
{
|
|
93
|
+
value: state.color,
|
|
94
|
+
onChange: state.setColor
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
]
|
|
98
|
+
}, renderProps.children);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
//# sourceMappingURL=ColorPicker.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAoBM,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAAyC;AAChF,MAAM,0DAA0B,CAAA,GAAA,0BAAY,EAA2B;AAMvE,SAAS,0CAAY,KAAuB;IACjD,IAAI,MAAM,CAAA,GAAA,2CAAgB,EAAE,2CAAoB,MAAM,IAAI;IAC1D,QAAQ,CAAA,GAAA,2BAAS,EAAE,KAAK;IACxB,IAAI,QAAQ,CAAA,GAAA,uCAAkB,EAAE;IAChC,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,OAAO,MAAM,KAAK;QACpB;IACF;IAEA,qBACE,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,4CAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACpE;gBAAC,CAAA,GAAA,0CAAe;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YAClE;gBAAC,CAAA,GAAA,2CAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,2CAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,4CAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;gBAAA;aAAE;YAC1C;gBAAC,CAAA,GAAA,kDAAuB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;SAC3E;OACA,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorPicker.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 {ChildrenOrFunction, Provider, SlotProps, SlottedContextValue, useRenderProps, useSlottedContext} from './utils';\nimport {Color, ColorPickerState, ColorPickerProps as StatelyColorPickerProps, useColorPickerState} from 'react-stately';\nimport {ColorAreaContext, ColorFieldContext, ColorSliderContext, ColorWheelContext} from './RSPContexts';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {ColorSwatchPickerContext} from './ColorSwatchPicker';\nimport {mergeProps} from 'react-aria';\nimport React, {createContext, JSX} from 'react';\n\nexport interface ColorPickerRenderProps {\n /** The currently selected color. */\n color: Color\n}\n\nexport interface ColorPickerProps extends StatelyColorPickerProps, SlotProps {\n /** The children of the component. A function may be provided to alter the children based on component state. */\n children: ChildrenOrFunction<ColorPickerRenderProps>\n}\n\nexport const ColorPickerContext = createContext<SlottedContextValue<ColorPickerProps>>(null);\nexport const ColorPickerStateContext = createContext<ColorPickerState | null>(null);\n\n/**\n * A ColorPicker synchronizes a color value between multiple React Aria color components.\n * It simplifies building color pickers with customizable layouts via composition.\n */\nexport function ColorPicker(props: ColorPickerProps): JSX.Element {\n let ctx = useSlottedContext(ColorPickerContext, props.slot);\n props = mergeProps(ctx, props);\n let state = useColorPickerState(props);\n let renderProps = useRenderProps({\n ...props,\n values: {\n color: state.color\n }\n });\n\n return (\n <Provider\n values={[\n [ColorPickerStateContext, state],\n [ColorSliderContext, {value: state.color, onChange: state.setColor}],\n [ColorAreaContext, {value: state.color, onChange: state.setColor}],\n [ColorWheelContext, {value: state.color, onChange: state.setColor}],\n [ColorFieldContext, {value: state.color, onChange: state.setColor}],\n [ColorSwatchContext, {color: state.color}],\n [ColorSwatchPickerContext, {value: state.color, onChange: state.setColor}]\n ]}>\n {renderProps.children}\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorPicker.main.js.map"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlottedContext as $64fa3d84918910a7$export$fabf2dc03a41866e} from "./utils.mjs";
|
|
2
|
+
import {ColorAreaContext as $4e85f108e88277b8$export$ebe63fadcdce34ed, ColorFieldContext as $4e85f108e88277b8$export$44644b8a16031b5b, ColorSliderContext as $4e85f108e88277b8$export$717b2c0a523a0b53, ColorWheelContext as $4e85f108e88277b8$export$265015d6dc85bf21} from "./RSPContexts.mjs";
|
|
3
|
+
import {ColorSwatchContext as $251c695a52d94a8d$export$83cc445538396800} from "./ColorSwatch.mjs";
|
|
4
|
+
import {ColorSwatchPickerContext as $0bb41941cfe72bd4$export$7214f50881fc1eaf} from "./ColorSwatchPicker.mjs";
|
|
5
|
+
import {useColorPickerState as $arEth$useColorPickerState} from "react-stately";
|
|
6
|
+
import {mergeProps as $arEth$mergeProps} from "react-aria";
|
|
7
|
+
import $arEth$react, {createContext as $arEth$createContext} from "react";
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
11
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
13
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
16
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
17
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
18
|
+
* governing permissions and limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
const $2637d3f5efb23186$export$cfac98503b32f6d6 = /*#__PURE__*/ (0, $arEth$createContext)(null);
|
|
27
|
+
const $2637d3f5efb23186$export$2c14261be40a385f = /*#__PURE__*/ (0, $arEth$createContext)(null);
|
|
28
|
+
function $2637d3f5efb23186$export$9feb1bc2e5f1ccb3(props) {
|
|
29
|
+
let ctx = (0, $64fa3d84918910a7$export$fabf2dc03a41866e)($2637d3f5efb23186$export$cfac98503b32f6d6, props.slot);
|
|
30
|
+
props = (0, $arEth$mergeProps)(ctx, props);
|
|
31
|
+
let state = (0, $arEth$useColorPickerState)(props);
|
|
32
|
+
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
33
|
+
...props,
|
|
34
|
+
values: {
|
|
35
|
+
color: state.color
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return /*#__PURE__*/ (0, $arEth$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
39
|
+
values: [
|
|
40
|
+
[
|
|
41
|
+
$2637d3f5efb23186$export$2c14261be40a385f,
|
|
42
|
+
state
|
|
43
|
+
],
|
|
44
|
+
[
|
|
45
|
+
(0, $4e85f108e88277b8$export$717b2c0a523a0b53),
|
|
46
|
+
{
|
|
47
|
+
value: state.color,
|
|
48
|
+
onChange: state.setColor
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
(0, $4e85f108e88277b8$export$ebe63fadcdce34ed),
|
|
53
|
+
{
|
|
54
|
+
value: state.color,
|
|
55
|
+
onChange: state.setColor
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
[
|
|
59
|
+
(0, $4e85f108e88277b8$export$265015d6dc85bf21),
|
|
60
|
+
{
|
|
61
|
+
value: state.color,
|
|
62
|
+
onChange: state.setColor
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
(0, $4e85f108e88277b8$export$44644b8a16031b5b),
|
|
67
|
+
{
|
|
68
|
+
value: state.color,
|
|
69
|
+
onChange: state.setColor
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
[
|
|
73
|
+
(0, $251c695a52d94a8d$export$83cc445538396800),
|
|
74
|
+
{
|
|
75
|
+
color: state.color
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
[
|
|
79
|
+
(0, $0bb41941cfe72bd4$export$7214f50881fc1eaf),
|
|
80
|
+
{
|
|
81
|
+
value: state.color,
|
|
82
|
+
onChange: state.setColor
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
]
|
|
86
|
+
}, renderProps.children);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
export {$2637d3f5efb23186$export$cfac98503b32f6d6 as ColorPickerContext, $2637d3f5efb23186$export$2c14261be40a385f as ColorPickerStateContext, $2637d3f5efb23186$export$9feb1bc2e5f1ccb3 as ColorPicker};
|
|
91
|
+
//# sourceMappingURL=ColorPicker.module.js.map
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlottedContext as $64fa3d84918910a7$export$fabf2dc03a41866e} from "./utils.module.js";
|
|
2
|
+
import {ColorAreaContext as $4e85f108e88277b8$export$ebe63fadcdce34ed, ColorFieldContext as $4e85f108e88277b8$export$44644b8a16031b5b, ColorSliderContext as $4e85f108e88277b8$export$717b2c0a523a0b53, ColorWheelContext as $4e85f108e88277b8$export$265015d6dc85bf21} from "./RSPContexts.module.js";
|
|
3
|
+
import {ColorSwatchContext as $251c695a52d94a8d$export$83cc445538396800} from "./ColorSwatch.module.js";
|
|
4
|
+
import {ColorSwatchPickerContext as $0bb41941cfe72bd4$export$7214f50881fc1eaf} from "./ColorSwatchPicker.module.js";
|
|
5
|
+
import {useColorPickerState as $arEth$useColorPickerState} from "react-stately";
|
|
6
|
+
import {mergeProps as $arEth$mergeProps} from "react-aria";
|
|
7
|
+
import $arEth$react, {createContext as $arEth$createContext} from "react";
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
11
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
13
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
16
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
17
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
18
|
+
* governing permissions and limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
const $2637d3f5efb23186$export$cfac98503b32f6d6 = /*#__PURE__*/ (0, $arEth$createContext)(null);
|
|
27
|
+
const $2637d3f5efb23186$export$2c14261be40a385f = /*#__PURE__*/ (0, $arEth$createContext)(null);
|
|
28
|
+
function $2637d3f5efb23186$export$9feb1bc2e5f1ccb3(props) {
|
|
29
|
+
let ctx = (0, $64fa3d84918910a7$export$fabf2dc03a41866e)($2637d3f5efb23186$export$cfac98503b32f6d6, props.slot);
|
|
30
|
+
props = (0, $arEth$mergeProps)(ctx, props);
|
|
31
|
+
let state = (0, $arEth$useColorPickerState)(props);
|
|
32
|
+
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
33
|
+
...props,
|
|
34
|
+
values: {
|
|
35
|
+
color: state.color
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return /*#__PURE__*/ (0, $arEth$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
39
|
+
values: [
|
|
40
|
+
[
|
|
41
|
+
$2637d3f5efb23186$export$2c14261be40a385f,
|
|
42
|
+
state
|
|
43
|
+
],
|
|
44
|
+
[
|
|
45
|
+
(0, $4e85f108e88277b8$export$717b2c0a523a0b53),
|
|
46
|
+
{
|
|
47
|
+
value: state.color,
|
|
48
|
+
onChange: state.setColor
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
(0, $4e85f108e88277b8$export$ebe63fadcdce34ed),
|
|
53
|
+
{
|
|
54
|
+
value: state.color,
|
|
55
|
+
onChange: state.setColor
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
[
|
|
59
|
+
(0, $4e85f108e88277b8$export$265015d6dc85bf21),
|
|
60
|
+
{
|
|
61
|
+
value: state.color,
|
|
62
|
+
onChange: state.setColor
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
(0, $4e85f108e88277b8$export$44644b8a16031b5b),
|
|
67
|
+
{
|
|
68
|
+
value: state.color,
|
|
69
|
+
onChange: state.setColor
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
[
|
|
73
|
+
(0, $251c695a52d94a8d$export$83cc445538396800),
|
|
74
|
+
{
|
|
75
|
+
color: state.color
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
[
|
|
79
|
+
(0, $0bb41941cfe72bd4$export$7214f50881fc1eaf),
|
|
80
|
+
{
|
|
81
|
+
value: state.color,
|
|
82
|
+
onChange: state.setColor
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
]
|
|
86
|
+
}, renderProps.children);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
export {$2637d3f5efb23186$export$cfac98503b32f6d6 as ColorPickerContext, $2637d3f5efb23186$export$2c14261be40a385f as ColorPickerStateContext, $2637d3f5efb23186$export$9feb1bc2e5f1ccb3 as ColorPicker};
|
|
91
|
+
//# sourceMappingURL=ColorPicker.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAoBM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAyC;AAChF,MAAM,0DAA0B,CAAA,GAAA,oBAAY,EAA2B;AAMvE,SAAS,0CAAY,KAAuB;IACjD,IAAI,MAAM,CAAA,GAAA,yCAAgB,EAAE,2CAAoB,MAAM,IAAI;IAC1D,QAAQ,CAAA,GAAA,iBAAS,EAAE,KAAK;IACxB,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;IAChC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,OAAO,MAAM,KAAK;QACpB;IACF;IAEA,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACpE;gBAAC,CAAA,GAAA,yCAAe;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YAClE;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;gBAAA;aAAE;YAC1C;gBAAC,CAAA,GAAA,yCAAuB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;SAC3E;OACA,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorPicker.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 {ChildrenOrFunction, Provider, SlotProps, SlottedContextValue, useRenderProps, useSlottedContext} from './utils';\nimport {Color, ColorPickerState, ColorPickerProps as StatelyColorPickerProps, useColorPickerState} from 'react-stately';\nimport {ColorAreaContext, ColorFieldContext, ColorSliderContext, ColorWheelContext} from './RSPContexts';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {ColorSwatchPickerContext} from './ColorSwatchPicker';\nimport {mergeProps} from 'react-aria';\nimport React, {createContext, JSX} from 'react';\n\nexport interface ColorPickerRenderProps {\n /** The currently selected color. */\n color: Color\n}\n\nexport interface ColorPickerProps extends StatelyColorPickerProps, SlotProps {\n /** The children of the component. A function may be provided to alter the children based on component state. */\n children: ChildrenOrFunction<ColorPickerRenderProps>\n}\n\nexport const ColorPickerContext = createContext<SlottedContextValue<ColorPickerProps>>(null);\nexport const ColorPickerStateContext = createContext<ColorPickerState | null>(null);\n\n/**\n * A ColorPicker synchronizes a color value between multiple React Aria color components.\n * It simplifies building color pickers with customizable layouts via composition.\n */\nexport function ColorPicker(props: ColorPickerProps): JSX.Element {\n let ctx = useSlottedContext(ColorPickerContext, props.slot);\n props = mergeProps(ctx, props);\n let state = useColorPickerState(props);\n let renderProps = useRenderProps({\n ...props,\n values: {\n color: state.color\n }\n });\n\n return (\n <Provider\n values={[\n [ColorPickerStateContext, state],\n [ColorSliderContext, {value: state.color, onChange: state.setColor}],\n [ColorAreaContext, {value: state.color, onChange: state.setColor}],\n [ColorWheelContext, {value: state.color, onChange: state.setColor}],\n [ColorFieldContext, {value: state.color, onChange: state.setColor}],\n [ColorSwatchContext, {color: state.color}],\n [ColorSwatchPickerContext, {value: state.color, onChange: state.setColor}]\n ]}>\n {renderProps.children}\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorPicker.module.js.map"}
|