@parrot-co/parrot-ui 0.1.3 → 0.1.5

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/module.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {jsx as $hgUW1$jsx, jsxs as $hgUW1$jsxs} from "react/jsx-runtime";
2
2
  import $hgUW1$react, {forwardRef as $hgUW1$forwardRef, createContext as $hgUW1$createContext, Children as $hgUW1$Children, useMemo as $hgUW1$useMemo, isValidElement as $hgUW1$isValidElement, useContext as $hgUW1$useContext, useRef as $hgUW1$useRef, cloneElement as $hgUW1$cloneElement, createElement as $hgUW1$createElement, useState as $hgUW1$useState, useEffect as $hgUW1$useEffect, useCallback as $hgUW1$useCallback} from "react";
3
- import {useTextField as $hgUW1$useTextField, useLocale as $hgUW1$useLocale, useNumberField as $hgUW1$useNumberField, useToggleButton as $hgUW1$useToggleButton, useButton as $hgUW1$useButton, useCheckbox as $hgUW1$useCheckbox, useCheckboxGroupItem as $hgUW1$useCheckboxGroupItem, useFocusRing as $hgUW1$useFocusRing, VisuallyHidden as $hgUW1$VisuallyHidden, useCheckboxGroup as $hgUW1$useCheckboxGroup, useMenuTrigger as $hgUW1$useMenuTrigger, usePress as $hgUW1$usePress, mergeProps as $hgUW1$mergeProps, useMenu as $hgUW1$useMenu, useMenuItem as $hgUW1$useMenuItem, useMenuSection as $hgUW1$useMenuSection, useSeparator as $hgUW1$useSeparator, usePopover as $hgUW1$usePopover, Overlay as $hgUW1$Overlay, useFilter as $hgUW1$useFilter, useComboBox as $hgUW1$useComboBox, useListBox as $hgUW1$useListBox, useOption as $hgUW1$useOption, useListBoxSection as $hgUW1$useListBoxSection, useRadio as $hgUW1$useRadio, useRadioGroup as $hgUW1$useRadioGroup, useDatePicker as $hgUW1$useDatePicker, useDateField as $hgUW1$useDateField, useDateSegment as $hgUW1$useDateSegment, useCalendar as $hgUW1$useCalendar, useCalendarGrid as $hgUW1$useCalendarGrid, useCalendarCell as $hgUW1$useCalendarCell, useDrop as $hgUW1$useDrop, useProgressBar as $hgUW1$useProgressBar, useTabList as $hgUW1$useTabList, useTab as $hgUW1$useTab, useTabPanel as $hgUW1$useTabPanel, useHover as $hgUW1$useHover, useSwitch as $hgUW1$useSwitch, useModalOverlay as $hgUW1$useModalOverlay, useDialog as $hgUW1$useDialog, useTag as $hgUW1$useTag, useTagGroup as $hgUW1$useTagGroup} from "react-aria";
3
+ import {useTextField as $hgUW1$useTextField, useLocale as $hgUW1$useLocale, useNumberField as $hgUW1$useNumberField, useToggleButton as $hgUW1$useToggleButton, useButton as $hgUW1$useButton, useCheckbox as $hgUW1$useCheckbox, useCheckboxGroupItem as $hgUW1$useCheckboxGroupItem, useFocusRing as $hgUW1$useFocusRing, VisuallyHidden as $hgUW1$VisuallyHidden, useCheckboxGroup as $hgUW1$useCheckboxGroup, useMenuTrigger as $hgUW1$useMenuTrigger, usePress as $hgUW1$usePress, mergeProps as $hgUW1$mergeProps, useMenu as $hgUW1$useMenu, useMenuItem as $hgUW1$useMenuItem, useMenuSection as $hgUW1$useMenuSection, useSeparator as $hgUW1$useSeparator, usePopover as $hgUW1$usePopover, Overlay as $hgUW1$Overlay, useFilter as $hgUW1$useFilter, useComboBox as $hgUW1$useComboBox, useListBox as $hgUW1$useListBox, useOption as $hgUW1$useOption, useListBoxSection as $hgUW1$useListBoxSection, useRadio as $hgUW1$useRadio, useRadioGroup as $hgUW1$useRadioGroup, useDatePicker as $hgUW1$useDatePicker, useDateField as $hgUW1$useDateField, useDateSegment as $hgUW1$useDateSegment, useCalendar as $hgUW1$useCalendar, useCalendarGrid as $hgUW1$useCalendarGrid, useCalendarCell as $hgUW1$useCalendarCell, useDrop as $hgUW1$useDrop, useProgressBar as $hgUW1$useProgressBar, useTabList as $hgUW1$useTabList, useTab as $hgUW1$useTab, useTabPanel as $hgUW1$useTabPanel, useHover as $hgUW1$useHover, useSwitch as $hgUW1$useSwitch, useModalOverlay as $hgUW1$useModalOverlay, useDialog as $hgUW1$useDialog, useOverlayTrigger as $hgUW1$useOverlayTrigger, useTag as $hgUW1$useTag, useTagGroup as $hgUW1$useTagGroup} from "react-aria";
4
4
  import {HiMinus as $hgUW1$HiMinus, HiPlus as $hgUW1$HiPlus, HiEye as $hgUW1$HiEye, HiCheck as $hgUW1$HiCheck, HiSelector as $hgUW1$HiSelector, HiX as $hgUW1$HiX, HiOutlineCalendar as $hgUW1$HiOutlineCalendar, HiChevronLeft as $hgUW1$HiChevronLeft, HiChevronRight as $hgUW1$HiChevronRight, HiOutlineDocumentAdd as $hgUW1$HiOutlineDocumentAdd, HiOutlineCheckCircle as $hgUW1$HiOutlineCheckCircle, HiOutlineTrash as $hgUW1$HiOutlineTrash, HiOutlineExclamationCircle as $hgUW1$HiOutlineExclamationCircle, HiOutlineRefresh as $hgUW1$HiOutlineRefresh, HiOutlinePaperClip as $hgUW1$HiOutlinePaperClip} from "react-icons/hi";
5
5
  import {useNumberFieldState as $hgUW1$useNumberFieldState, useToggleState as $hgUW1$useToggleState, useCheckboxGroupState as $hgUW1$useCheckboxGroupState, useMenuTriggerState as $hgUW1$useMenuTriggerState, useTreeState as $hgUW1$useTreeState, Item as $hgUW1$Item, Section as $hgUW1$Section, useComboBoxState as $hgUW1$useComboBoxState, useListState as $hgUW1$useListState, useRadioGroupState as $hgUW1$useRadioGroupState, useDatePickerState as $hgUW1$useDatePickerState, useDateFieldState as $hgUW1$useDateFieldState, useCalendarState as $hgUW1$useCalendarState, useTabListState as $hgUW1$useTabListState, useOverlayTriggerState as $hgUW1$useOverlayTriggerState} from "react-stately";
6
6
  import {parseDate as $hgUW1$parseDate, GregorianCalendar as $hgUW1$GregorianCalendar, createCalendar as $hgUW1$createCalendar, endOfMonth as $hgUW1$endOfMonth, getWeeksInMonth as $hgUW1$getWeeksInMonth, isSameMonth as $hgUW1$isSameMonth} from "@internationalized/date";
@@ -1005,7 +1005,7 @@ $0ca204e719955216$export$48513f6b9f8ce62d.displayName = "checkbox";
1005
1005
 
1006
1006
 
1007
1007
 
1008
- function $61ac9d13c14b7f5b$export$5b6b19405a83ff9d({ state: state, children: children, popoverRef: popoverRef, ...props }) {
1008
+ function $fc3eb9661261e42e$export$91527519cfe8e396({ state: state, children: children, popoverRef: popoverRef, ...props }) {
1009
1009
  const internalPopoverRef = $hgUW1$useRef(null);
1010
1010
  const theme = (0, $5fc28f26e128d5c0$export$93d4e7f90805808f)();
1011
1011
  const { popoverProps: popoverProps, underlayProps: underlayProps } = (0, $hgUW1$usePopover)({
@@ -1076,7 +1076,7 @@ function $ad85ba12e832a3ea$export$e7eb525bc415b4b4({ asChild: asChild, children:
1076
1076
  function $ad85ba12e832a3ea$export$d9b273488cd8ce6f({ placement: placement = "bottom start", offset: offset = 8, ...props }) {
1077
1077
  const ctx = $hgUW1$useContext($ad85ba12e832a3ea$var$DropdownContext);
1078
1078
  if (!ctx?.triggerState.isOpen) return null;
1079
- return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $61ac9d13c14b7f5b$export$5b6b19405a83ff9d), {
1079
+ return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $fc3eb9661261e42e$export$91527519cfe8e396), {
1080
1080
  placement: placement,
1081
1081
  offset: offset,
1082
1082
  state: ctx?.triggerState,
@@ -1551,7 +1551,7 @@ const $618e53c42107439d$export$acd2d351457d1d82 = ({ label: label, error: error,
1551
1551
  error && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $9e021ab4f609c8de$export$2e2bcd8739ae039), {
1552
1552
  children: error
1553
1553
  }),
1554
- state.isOpen && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $61ac9d13c14b7f5b$export$5b6b19405a83ff9d), {
1554
+ state.isOpen && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $fc3eb9661261e42e$export$91527519cfe8e396), {
1555
1555
  popoverRef: popoverRef,
1556
1556
  offset: 8,
1557
1557
  state: state,
@@ -1880,7 +1880,7 @@ function $9f79d30a629e2c71$export$ef9b1a59e592288f({ label: label, selectionMode
1880
1880
  })
1881
1881
  ]
1882
1882
  }),
1883
- triggerState.isOpen && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $61ac9d13c14b7f5b$export$5b6b19405a83ff9d), {
1883
+ triggerState.isOpen && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $fc3eb9661261e42e$export$91527519cfe8e396), {
1884
1884
  placement: "bottom start",
1885
1885
  offset: 4,
1886
1886
  shouldUpdatePosition: true,
@@ -2254,7 +2254,7 @@ const $48aceaf3289ec325$export$7edc06cf1783b30f = /*#__PURE__*/ $hgUW1$forwardRe
2254
2254
  })
2255
2255
  ]
2256
2256
  }),
2257
- state.isOpen && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $61ac9d13c14b7f5b$export$5b6b19405a83ff9d), {
2257
+ state.isOpen && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $fc3eb9661261e42e$export$91527519cfe8e396), {
2258
2258
  offset: 8,
2259
2259
  state: state,
2260
2260
  triggerRef: pickerRef,
@@ -3211,6 +3211,70 @@ function $aca304249f917497$export$39299b56cfd4e361({ appearance: appearance = "o
3211
3211
 
3212
3212
 
3213
3213
 
3214
+ const $61ac9d13c14b7f5b$var$PopoverContext = /*#__PURE__*/ $hgUW1$createContext(null);
3215
+ function $61ac9d13c14b7f5b$export$5b6b19405a83ff9d({ children: children, useNativeClickHandler: useNativeClickHandler, ...props }) {
3216
+ const triggerRef = $hgUW1$useRef(null);
3217
+ const state = (0, $hgUW1$useOverlayTriggerState)(props);
3218
+ const { triggerProps: triggerProps, overlayProps: overlayProps } = (0, $hgUW1$useOverlayTrigger)({
3219
+ type: "dialog"
3220
+ }, state, triggerRef);
3221
+ return /*#__PURE__*/ (0, $hgUW1$jsx)($61ac9d13c14b7f5b$var$PopoverContext.Provider, {
3222
+ value: {
3223
+ triggerProps: triggerProps,
3224
+ triggerRef: triggerRef,
3225
+ overlayProps: overlayProps,
3226
+ overlayState: state,
3227
+ props: {
3228
+ useNativeClickHandler: useNativeClickHandler
3229
+ }
3230
+ },
3231
+ children: children
3232
+ });
3233
+ }
3234
+ function $61ac9d13c14b7f5b$export$7dacb05d26466c3({ children: children }) {
3235
+ const ctx = $hgUW1$useContext($61ac9d13c14b7f5b$var$PopoverContext);
3236
+ if (!ctx) throw "PopoverTrigger must be used within a Popover component";
3237
+ const useClickEvents = ctx.props?.useNativeClickHandler;
3238
+ const clickProps = (0, $hgUW1$usePress)(ctx.triggerProps);
3239
+ const triggerProps = useClickEvents ? clickProps.pressProps : ctx.triggerProps;
3240
+ return /*#__PURE__*/ $hgUW1$cloneElement(children, {
3241
+ ref: ctx.triggerRef,
3242
+ ["data-is-pressed"]: clickProps.isPressed,
3243
+ ...triggerProps
3244
+ });
3245
+ }
3246
+ function $61ac9d13c14b7f5b$export$d7e1f420b25549ff({ children: children, offset: offset = 12, placement: placement, style: style, width: width = 160, className: className, ...props }) {
3247
+ const ctx = $hgUW1$useContext($61ac9d13c14b7f5b$var$PopoverContext);
3248
+ if (!ctx) throw "PopoverContent must be used withing a Popover component";
3249
+ if (!ctx.overlayState?.isOpen) return null;
3250
+ return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $fc3eb9661261e42e$export$91527519cfe8e396), {
3251
+ offset: offset,
3252
+ placement: placement,
3253
+ state: ctx.overlayState,
3254
+ triggerRef: ctx.triggerRef,
3255
+ ...props,
3256
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3257
+ ...ctx.overlayProps,
3258
+ "data-radius": "md",
3259
+ className: (0, $cce662c1d2ec881b$export$a274e22fb40f762e)(className, "p-popover-content"),
3260
+ style: {
3261
+ width: width,
3262
+ ...style
3263
+ },
3264
+ children: children
3265
+ })
3266
+ });
3267
+ }
3268
+
3269
+
3270
+
3271
+
3272
+
3273
+
3274
+
3275
+
3276
+
3277
+
3214
3278
 
3215
3279
 
3216
3280
 
@@ -3313,5 +3377,5 @@ const $31aad62a65b342bc$export$a79147a60006308c = (0, $hgUW1$Item);
3313
3377
 
3314
3378
 
3315
3379
 
3316
- export {$ee0105641360f1c1$export$e71c4d32a2263218 as Box, $11bc53f9891a6532$export$ef2184bd89960b14 as Grid, $11bc53f9891a6532$export$9eb849b9b922d396 as GridItem, $e2f278d76a00796a$export$f51f4c4ede09e011 as Flex, $ef10b8551376ecd8$export$f5b8910cec6cf069 as Input, $2e89c7375b40283e$export$6bf0cd3a219bbade as NumberInput, $3157c40f7d0e6fa2$export$5f1af8db9871e1d6 as Text, $7794de767effca39$export$379139ebc1c2b235 as Textarea, $d95a2216d3ccf702$export$353f5b6fc5456de1 as Button, $e3f71af5eaf1c216$export$c25acd513dcc8062 as IconButton, $9230e224c5c26d9c$export$69b1032f2ecdf404 as ButtonGroup, $0ca204e719955216$export$48513f6b9f8ce62d as Checkbox, $1ab2e355b7aa4310$export$4aa08d5625cb8ead as CheckboxGroup, $3ba60d401cc6cc09$export$e44a253a59704894 as DropdownMenu, $618e53c42107439d$export$72b9695b8216309a as ComboBox, $e00a258f2e8c7774$export$d7b12c4107be0d61 as Radio, $e00a258f2e8c7774$export$a98f0dcb43a68a25 as RadioGroup, $e3711da06539818f$export$f8afaea2e9656b91 as RadioCard, $9f79d30a629e2c71$export$ef9b1a59e592288f as Select, $6ae005878b435ce8$export$36d18380658d5d20 as Option, $6ae005878b435ce8$export$6e2c8f0811a474ce as Section, $48aceaf3289ec325$export$7edc06cf1783b30f as DateInput, $11e1beb2a56c81ba$export$e1aef45b828286de as Calendar, $55bcc0e5986993c4$export$e2255cf6045e8d47 as Avatar, $f9f5a5b674d0a63f$export$1a5cb5295a7d2749 as FileUploader, $1a0bc09c6bea5bcc$export$1ff3c3f08ae963c0 as Separator, $2cc726bf01dd2fe8$export$b25a304ec7d746bb as Progress, $e1148cdb3a130657$export$3b0d6d7590275603 as Loader, $28ce03a907630a4d$export$be92b6f5f03c0fe9 as Root, $28ce03a907630a4d$export$6d08773d2e66f8f2 as Item, $c700d45659d35204$export$3288d34c523a1192 as Tag, $fac55dfefd316398$export$b5d5cf8927ab7262 as Switch, $6a8317ccd5d3ba90$export$dbada5ace43900dd as ColorTray, $62ecff109eaa29fb$export$50e381fea3a45244 as IconTray, $6bbafdf52af7a191$export$ea98c603db73aee7 as Sticker, $96f9bd3439bf983b$export$1aaa3deaa90ea306 as Tabs, $18afd8c09c9f3065$export$54ec01a60f47d33d as Table, $727b3a4d9b39464f$export$e6a97ba2cae5bb94 as Timeline, $4bad2c10a2b6e638$export$2b77a92f1a5ad772 as Modal, $4bad2c10a2b6e638$export$33ffd74ebf07f060 as useModal, $41cc567ab0625f8f$export$eef1e68107c58ef2 as Space, $aca304249f917497$export$39299b56cfd4e361 as TagInput, $31aad62a65b342bc$export$67ea30858aaf75e3 as TagGroup, $31aad62a65b342bc$export$a79147a60006308c as TagGroupItem, $5fc28f26e128d5c0$export$d8964aec282183a3 as ThemeProvider, $5fc28f26e128d5c0$export$93d4e7f90805808f as useTheme};
3380
+ export {$ee0105641360f1c1$export$e71c4d32a2263218 as Box, $11bc53f9891a6532$export$ef2184bd89960b14 as Grid, $11bc53f9891a6532$export$9eb849b9b922d396 as GridItem, $e2f278d76a00796a$export$f51f4c4ede09e011 as Flex, $ef10b8551376ecd8$export$f5b8910cec6cf069 as Input, $2e89c7375b40283e$export$6bf0cd3a219bbade as NumberInput, $3157c40f7d0e6fa2$export$5f1af8db9871e1d6 as Text, $7794de767effca39$export$379139ebc1c2b235 as Textarea, $d95a2216d3ccf702$export$353f5b6fc5456de1 as Button, $e3f71af5eaf1c216$export$c25acd513dcc8062 as IconButton, $9230e224c5c26d9c$export$69b1032f2ecdf404 as ButtonGroup, $0ca204e719955216$export$48513f6b9f8ce62d as Checkbox, $1ab2e355b7aa4310$export$4aa08d5625cb8ead as CheckboxGroup, $3ba60d401cc6cc09$export$e44a253a59704894 as DropdownMenu, $618e53c42107439d$export$72b9695b8216309a as ComboBox, $e00a258f2e8c7774$export$d7b12c4107be0d61 as Radio, $e00a258f2e8c7774$export$a98f0dcb43a68a25 as RadioGroup, $e3711da06539818f$export$f8afaea2e9656b91 as RadioCard, $9f79d30a629e2c71$export$ef9b1a59e592288f as Select, $6ae005878b435ce8$export$36d18380658d5d20 as Option, $6ae005878b435ce8$export$6e2c8f0811a474ce as Section, $48aceaf3289ec325$export$7edc06cf1783b30f as DateInput, $11e1beb2a56c81ba$export$e1aef45b828286de as Calendar, $55bcc0e5986993c4$export$e2255cf6045e8d47 as Avatar, $f9f5a5b674d0a63f$export$1a5cb5295a7d2749 as FileUploader, $1a0bc09c6bea5bcc$export$1ff3c3f08ae963c0 as Separator, $2cc726bf01dd2fe8$export$b25a304ec7d746bb as Progress, $e1148cdb3a130657$export$3b0d6d7590275603 as Loader, $28ce03a907630a4d$export$be92b6f5f03c0fe9 as Root, $28ce03a907630a4d$export$6d08773d2e66f8f2 as Item, $c700d45659d35204$export$3288d34c523a1192 as Tag, $fac55dfefd316398$export$b5d5cf8927ab7262 as Switch, $6a8317ccd5d3ba90$export$dbada5ace43900dd as ColorTray, $62ecff109eaa29fb$export$50e381fea3a45244 as IconTray, $6bbafdf52af7a191$export$ea98c603db73aee7 as Sticker, $96f9bd3439bf983b$export$1aaa3deaa90ea306 as Tabs, $18afd8c09c9f3065$export$54ec01a60f47d33d as Table, $727b3a4d9b39464f$export$e6a97ba2cae5bb94 as Timeline, $4bad2c10a2b6e638$export$2b77a92f1a5ad772 as Modal, $4bad2c10a2b6e638$export$33ffd74ebf07f060 as useModal, $41cc567ab0625f8f$export$eef1e68107c58ef2 as Space, $aca304249f917497$export$39299b56cfd4e361 as TagInput, $61ac9d13c14b7f5b$export$5b6b19405a83ff9d as Popover, $61ac9d13c14b7f5b$export$d7e1f420b25549ff as PopoverContent, $61ac9d13c14b7f5b$export$7dacb05d26466c3 as PopoverTrigger, $31aad62a65b342bc$export$67ea30858aaf75e3 as TagGroup, $31aad62a65b342bc$export$a79147a60006308c as TagGroupItem, $5fc28f26e128d5c0$export$d8964aec282183a3 as ThemeProvider, $5fc28f26e128d5c0$export$93d4e7f90805808f as useTheme};
3317
3381
  //# sourceMappingURL=module.js.map