@raystack/apsara 0.31.0 → 0.32.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/dist/command/command.cjs +3 -0
- package/dist/command/command.cjs.map +1 -1
- package/dist/command/command.d.ts.map +1 -1
- package/dist/command/command.js +3 -0
- package/dist/command/command.js.map +1 -1
- package/dist/dialog/dialog.cjs +12 -0
- package/dist/dialog/dialog.cjs.map +1 -1
- package/dist/dialog/dialog.d.ts.map +1 -1
- package/dist/dialog/dialog.js +12 -0
- package/dist/dialog/dialog.js.map +1 -1
- package/dist/select/select.cjs +3 -0
- package/dist/select/select.cjs.map +1 -1
- package/dist/select/select.d.ts.map +1 -1
- package/dist/select/select.js +3 -0
- package/dist/select/select.js.map +1 -1
- package/dist/sheet/sheet.cjs +9 -0
- package/dist/sheet/sheet.cjs.map +1 -1
- package/dist/sheet/sheet.d.ts +12 -0
- package/dist/sheet/sheet.d.ts.map +1 -1
- package/dist/sheet/sheet.js +9 -0
- package/dist/sheet/sheet.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/table/table.cjs +24 -0
- package/dist/table/table.cjs.map +1 -1
- package/dist/table/table.d.ts.map +1 -1
- package/dist/table/table.js +24 -0
- package/dist/table/table.js.map +1 -1
- package/dist/toggle-group/togglegroup.cjs +9 -0
- package/dist/toggle-group/togglegroup.cjs.map +1 -1
- package/dist/toggle-group/togglegroup.d.ts.map +1 -1
- package/dist/toggle-group/togglegroup.js +9 -0
- package/dist/toggle-group/togglegroup.js.map +1 -1
- package/dist/v1/components/calendar/range-picker.cjs +2 -2
- package/dist/v1/components/calendar/range-picker.cjs.map +1 -1
- package/dist/v1/components/calendar/range-picker.d.ts +5 -1
- package/dist/v1/components/calendar/range-picker.d.ts.map +1 -1
- package/dist/v1/components/calendar/range-picker.js +2 -2
- package/dist/v1/components/calendar/range-picker.js.map +1 -1
- package/dist/v1/components/chip/chip.cjs +6 -6
- package/dist/v1/components/chip/chip.cjs.map +1 -1
- package/dist/v1/components/chip/chip.d.ts +3 -3
- package/dist/v1/components/chip/chip.d.ts.map +1 -1
- package/dist/v1/components/chip/chip.js +6 -6
- package/dist/v1/components/chip/chip.js.map +1 -1
- package/dist/v1/components/chip/chip.module.css.cjs +1 -1
- package/dist/v1/components/chip/chip.module.css.js +1 -1
- package/dist/v1/components/command/command.cjs +52 -0
- package/dist/v1/components/command/command.cjs.map +1 -0
- package/dist/v1/components/command/command.d.ts +2 -0
- package/dist/v1/components/command/command.d.ts.map +1 -0
- package/dist/v1/components/command/command.js +50 -0
- package/dist/v1/components/command/command.js.map +1 -0
- package/dist/v1/components/command/command.module.css.cjs +8 -0
- package/dist/v1/components/command/command.module.css.cjs.map +1 -0
- package/dist/v1/components/command/command.module.css.js +4 -0
- package/dist/v1/components/command/command.module.css.js.map +1 -0
- package/dist/v1/components/command/index.d.ts +2 -0
- package/dist/v1/components/command/index.d.ts.map +1 -0
- package/dist/v1/components/dialog/dialog.cjs +32 -0
- package/dist/v1/components/dialog/dialog.cjs.map +1 -0
- package/dist/v1/components/dialog/dialog.d.ts +26 -0
- package/dist/v1/components/dialog/dialog.d.ts.map +1 -0
- package/dist/v1/components/dialog/dialog.js +29 -0
- package/dist/v1/components/dialog/dialog.js.map +1 -0
- package/dist/v1/components/dialog/dialog.module.css.cjs +8 -0
- package/dist/v1/components/dialog/dialog.module.css.cjs.map +1 -0
- package/dist/v1/components/dialog/dialog.module.css.js +4 -0
- package/dist/v1/components/dialog/dialog.module.css.js.map +1 -0
- package/dist/v1/components/dialog/index.d.ts +2 -0
- package/dist/v1/components/dialog/index.d.ts.map +1 -0
- package/dist/v1/components/flex/flex.cjs +9 -0
- package/dist/v1/components/flex/flex.cjs.map +1 -1
- package/dist/v1/components/flex/flex.d.ts +1 -1
- package/dist/v1/components/flex/flex.d.ts.map +1 -1
- package/dist/v1/components/flex/flex.js +9 -0
- package/dist/v1/components/flex/flex.js.map +1 -1
- package/dist/v1/components/flex/flex.module.css.cjs +1 -1
- package/dist/v1/components/flex/flex.module.css.js +1 -1
- package/dist/v1/components/icon-button/icon-button.cjs +1 -1
- package/dist/v1/components/icon-button/icon-button.cjs.map +1 -1
- package/dist/v1/components/icon-button/icon-button.d.ts +1 -2
- package/dist/v1/components/icon-button/icon-button.d.ts.map +1 -1
- package/dist/v1/components/icon-button/icon-button.js +1 -1
- package/dist/v1/components/icon-button/icon-button.js.map +1 -1
- package/dist/v1/components/input-field/input-field.module.css.cjs +1 -1
- package/dist/v1/components/input-field/input-field.module.css.js +1 -1
- package/dist/v1/components/select/select.cjs +5 -5
- package/dist/v1/components/select/select.cjs.map +1 -1
- package/dist/v1/components/select/select.d.ts +12 -1
- package/dist/v1/components/select/select.d.ts.map +1 -1
- package/dist/v1/components/select/select.js +5 -5
- package/dist/v1/components/select/select.js.map +1 -1
- package/dist/v1/components/select/select.module.css.cjs +1 -1
- package/dist/v1/components/select/select.module.css.js +1 -1
- package/dist/v1/components/sheet/index.d.ts +2 -0
- package/dist/v1/components/sheet/index.d.ts.map +1 -0
- package/dist/v1/components/sheet/sheet.cjs +48 -0
- package/dist/v1/components/sheet/sheet.cjs.map +1 -0
- package/dist/v1/components/sheet/sheet.d.ts +35 -0
- package/dist/v1/components/sheet/sheet.d.ts.map +1 -0
- package/dist/v1/components/sheet/sheet.js +43 -0
- package/dist/v1/components/sheet/sheet.js.map +1 -0
- package/dist/v1/components/sheet/sheet.module.css.cjs +8 -0
- package/dist/v1/components/sheet/sheet.module.css.cjs.map +1 -0
- package/dist/v1/components/sheet/sheet.module.css.js +4 -0
- package/dist/v1/components/sheet/sheet.module.css.js.map +1 -0
- package/dist/v1/components/table/index.d.ts +2 -0
- package/dist/v1/components/table/index.d.ts.map +1 -0
- package/dist/v1/components/table/table.cjs +44 -0
- package/dist/v1/components/table/table.cjs.map +1 -0
- package/dist/v1/components/table/table.d.ts +30 -0
- package/dist/v1/components/table/table.d.ts.map +1 -0
- package/dist/v1/components/table/table.js +42 -0
- package/dist/v1/components/table/table.js.map +1 -0
- package/dist/v1/components/table/table.module.css.cjs +8 -0
- package/dist/v1/components/table/table.module.css.cjs.map +1 -0
- package/dist/v1/components/table/table.module.css.js +4 -0
- package/dist/v1/components/table/table.module.css.js.map +1 -0
- package/dist/v1/components/tooltip/tooltip.cjs +3 -2
- package/dist/v1/components/tooltip/tooltip.cjs.map +1 -1
- package/dist/v1/components/tooltip/tooltip.d.ts +8 -2
- package/dist/v1/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/v1/components/tooltip/tooltip.js +3 -2
- package/dist/v1/components/tooltip/tooltip.js.map +1 -1
- package/dist/v1/index.cjs +10 -0
- package/dist/v1/index.cjs.map +1 -1
- package/dist/v1/index.d.ts +5 -0
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js +5 -0
- package/dist/v1/index.js.map +1 -1
- package/dist/v1/node_modules/.pnpm/@radix-ui_primitive@1.0.0/node_modules/@radix-ui/primitive/dist/index.module.cjs +11 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_primitive@1.0.0/node_modules/@radix-ui/primitive/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_primitive@1.0.0/node_modules/@radix-ui/primitive/dist/index.module.js +9 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_primitive@1.0.0/node_modules/@radix-ui/primitive/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.cjs +30 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.js +27 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-context@1.0.0_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.module.cjs +103 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-context@1.0.0_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-context@1.0.0_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.module.js +101 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-context@1.0.0_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.module.cjs +224 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.module.js +214 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.cjs +298 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.js +280 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.cjs +235 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js +233 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.0_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.module.cjs +32 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.0_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.0_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.module.js +30 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.0_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-focus-scope/dist/index.module.cjs +254 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-focus-scope/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-focus-scope/dist/index.module.js +252 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-focus-scope/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-id@1.0.0_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.module.cjs +40 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-id@1.0.0_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-id@1.0.0_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.module.js +19 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-id@1.0.0_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-menu@2.0.5_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-menu/dist/index.js +2 -2
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-popover@1.0.6_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-popover/dist/index.js +2 -2
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-popover@1.0.6_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -1
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-portal@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.module.cjs +17 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-portal@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-portal@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.module.js +15 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-portal@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-presence@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.module.cjs +133 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-presence@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-presence@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.module.js +131 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-presence@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.cjs +88 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.js +85 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.cjs +82 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.js +79 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.cjs +21 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js +19 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.cjs +50 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js +48 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.cjs +23 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.js +21 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.cjs +14 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js +12 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/cmdk@0.2.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/cmdk/dist/index.cjs +39 -0
- package/dist/v1/node_modules/.pnpm/cmdk@0.2.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/cmdk/dist/index.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/cmdk@0.2.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/cmdk/dist/index.js +8 -0
- package/dist/v1/node_modules/.pnpm/cmdk@0.2.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/cmdk/dist/index.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/command-score@0.1.2/node_modules/command-score/index.cjs +146 -0
- package/dist/v1/node_modules/.pnpm/command-score@0.1.2/node_modules/command-score/index.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/command-score@0.1.2/node_modules/command-score/index.js +142 -0
- package/dist/v1/node_modules/.pnpm/command-score@0.1.2/node_modules/command-score/index.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +34 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +169 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +146 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.cjs +60 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.js +39 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +24 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +22 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +100 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +97 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.cjs +8 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +12 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +2 -2
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.js +2 -2
- package/dist/v1/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { Children, cloneElement, useState, useRef, useEffect, useCallback, useReducer } from 'react';
|
|
2
|
+
import { flushSync } from 'react-dom';
|
|
3
|
+
import { useComposedRefs as $6ed0406888f73fc4$export$c7b2cbe3552a0d05 } from '../../../../../@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.js';
|
|
4
|
+
import { useLayoutEffect as $9f79659886946c16$export$e5c5a5f917a5871c } from '../../../../../@radix-ui_react-use-layout-effect@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js';
|
|
5
|
+
|
|
6
|
+
function $fe963b355347cc68$export$3e6543de14f8614f(initialState, machine) {
|
|
7
|
+
return useReducer((state, event)=>{
|
|
8
|
+
const nextState = machine[state][event];
|
|
9
|
+
return nextState !== null && nextState !== void 0 ? nextState : state;
|
|
10
|
+
}, initialState);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
const $921a889cee6df7e8$export$99c2b779aa4e8b8b = (props)=>{
|
|
15
|
+
const { present: present , children: children } = props;
|
|
16
|
+
const presence = $921a889cee6df7e8$var$usePresence(present);
|
|
17
|
+
const child = typeof children === 'function' ? children({
|
|
18
|
+
present: presence.isPresent
|
|
19
|
+
}) : Children.only(children);
|
|
20
|
+
const ref = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(presence.ref, child.ref);
|
|
21
|
+
const forceMount = typeof children === 'function';
|
|
22
|
+
return forceMount || presence.isPresent ? /*#__PURE__*/ cloneElement(child, {
|
|
23
|
+
ref: ref
|
|
24
|
+
}) : null;
|
|
25
|
+
};
|
|
26
|
+
$921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence';
|
|
27
|
+
/* -------------------------------------------------------------------------------------------------
|
|
28
|
+
* usePresence
|
|
29
|
+
* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$usePresence(present) {
|
|
30
|
+
const [node1, setNode] = useState();
|
|
31
|
+
const stylesRef = useRef({});
|
|
32
|
+
const prevPresentRef = useRef(present);
|
|
33
|
+
const prevAnimationNameRef = useRef('none');
|
|
34
|
+
const initialState = present ? 'mounted' : 'unmounted';
|
|
35
|
+
const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(initialState, {
|
|
36
|
+
mounted: {
|
|
37
|
+
UNMOUNT: 'unmounted',
|
|
38
|
+
ANIMATION_OUT: 'unmountSuspended'
|
|
39
|
+
},
|
|
40
|
+
unmountSuspended: {
|
|
41
|
+
MOUNT: 'mounted',
|
|
42
|
+
ANIMATION_END: 'unmounted'
|
|
43
|
+
},
|
|
44
|
+
unmounted: {
|
|
45
|
+
MOUNT: 'mounted'
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
useEffect(()=>{
|
|
49
|
+
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
|
|
50
|
+
prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';
|
|
51
|
+
}, [
|
|
52
|
+
state
|
|
53
|
+
]);
|
|
54
|
+
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
55
|
+
const styles = stylesRef.current;
|
|
56
|
+
const wasPresent = prevPresentRef.current;
|
|
57
|
+
const hasPresentChanged = wasPresent !== present;
|
|
58
|
+
if (hasPresentChanged) {
|
|
59
|
+
const prevAnimationName = prevAnimationNameRef.current;
|
|
60
|
+
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(styles);
|
|
61
|
+
if (present) send('MOUNT');
|
|
62
|
+
else if (currentAnimationName === 'none' || (styles === null || styles === void 0 ? void 0 : styles.display) === 'none') // If there is no exit animation or the element is hidden, animations won't run
|
|
63
|
+
// so we unmount instantly
|
|
64
|
+
send('UNMOUNT');
|
|
65
|
+
else {
|
|
66
|
+
/**
|
|
67
|
+
* When `present` changes to `false`, we check changes to animation-name to
|
|
68
|
+
* determine whether an animation has started. We chose this approach (reading
|
|
69
|
+
* computed styles) because there is no `animationrun` event and `animationstart`
|
|
70
|
+
* fires after `animation-delay` has expired which would be too late.
|
|
71
|
+
*/ const isAnimating = prevAnimationName !== currentAnimationName;
|
|
72
|
+
if (wasPresent && isAnimating) send('ANIMATION_OUT');
|
|
73
|
+
else send('UNMOUNT');
|
|
74
|
+
}
|
|
75
|
+
prevPresentRef.current = present;
|
|
76
|
+
}
|
|
77
|
+
}, [
|
|
78
|
+
present,
|
|
79
|
+
send
|
|
80
|
+
]);
|
|
81
|
+
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
82
|
+
if (node1) {
|
|
83
|
+
/**
|
|
84
|
+
* Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`
|
|
85
|
+
* event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we
|
|
86
|
+
* make sure we only trigger ANIMATION_END for the currently active animation.
|
|
87
|
+
*/ const handleAnimationEnd = (event)=>{
|
|
88
|
+
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
|
|
89
|
+
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
|
90
|
+
if (event.target === node1 && isCurrentAnimation) // With React 18 concurrency this update is applied
|
|
91
|
+
// a frame after the animation ends, creating a flash of visible content.
|
|
92
|
+
// By manually flushing we ensure they sync within a frame, removing the flash.
|
|
93
|
+
flushSync(()=>send('ANIMATION_END')
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
const handleAnimationStart = (event)=>{
|
|
97
|
+
if (event.target === node1) // if animation occurred, store its name as the previous animation.
|
|
98
|
+
prevAnimationNameRef.current = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
|
|
99
|
+
};
|
|
100
|
+
node1.addEventListener('animationstart', handleAnimationStart);
|
|
101
|
+
node1.addEventListener('animationcancel', handleAnimationEnd);
|
|
102
|
+
node1.addEventListener('animationend', handleAnimationEnd);
|
|
103
|
+
return ()=>{
|
|
104
|
+
node1.removeEventListener('animationstart', handleAnimationStart);
|
|
105
|
+
node1.removeEventListener('animationcancel', handleAnimationEnd);
|
|
106
|
+
node1.removeEventListener('animationend', handleAnimationEnd);
|
|
107
|
+
};
|
|
108
|
+
} else // Transition to the unmounted state if the node is removed prematurely.
|
|
109
|
+
// We avoid doing so during cleanup as the node may change but still exist.
|
|
110
|
+
send('ANIMATION_END');
|
|
111
|
+
}, [
|
|
112
|
+
node1,
|
|
113
|
+
send
|
|
114
|
+
]);
|
|
115
|
+
return {
|
|
116
|
+
isPresent: [
|
|
117
|
+
'mounted',
|
|
118
|
+
'unmountSuspended'
|
|
119
|
+
].includes(state),
|
|
120
|
+
ref: useCallback((node)=>{
|
|
121
|
+
if (node) stylesRef.current = getComputedStyle(node);
|
|
122
|
+
setNode(node);
|
|
123
|
+
}, [])
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$getAnimationName(styles) {
|
|
127
|
+
return (styles === null || styles === void 0 ? void 0 : styles.animationName) || 'none';
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export { $921a889cee6df7e8$export$99c2b779aa4e8b8b as Presence };
|
|
131
|
+
//# sourceMappingURL=index.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.module.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@radix-ui+react-presence@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.module.js"],"sourcesContent":["import {Children as $iqq3r$Children, cloneElement as $iqq3r$cloneElement, useState as $iqq3r$useState, useRef as $iqq3r$useRef, useEffect as $iqq3r$useEffect, useCallback as $iqq3r$useCallback, useReducer as $iqq3r$useReducer} from \"react\";\nimport {flushSync as $iqq3r$flushSync} from \"react-dom\";\nimport {useComposedRefs as $iqq3r$useComposedRefs} from \"@radix-ui/react-compose-refs\";\nimport {useLayoutEffect as $iqq3r$useLayoutEffect} from \"@radix-ui/react-use-layout-effect\";\n\n\n\n\n\n\nfunction $fe963b355347cc68$export$3e6543de14f8614f(initialState, machine) {\n return $iqq3r$useReducer((state, event)=>{\n const nextState = machine[state][event];\n return nextState !== null && nextState !== void 0 ? nextState : state;\n }, initialState);\n}\n\n\nconst $921a889cee6df7e8$export$99c2b779aa4e8b8b = (props)=>{\n const { present: present , children: children } = props;\n const presence = $921a889cee6df7e8$var$usePresence(present);\n const child = typeof children === 'function' ? children({\n present: presence.isPresent\n }) : $iqq3r$Children.only(children);\n const ref = $iqq3r$useComposedRefs(presence.ref, child.ref);\n const forceMount = typeof children === 'function';\n return forceMount || presence.isPresent ? /*#__PURE__*/ $iqq3r$cloneElement(child, {\n ref: ref\n }) : null;\n};\n$921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence';\n/* -------------------------------------------------------------------------------------------------\n * usePresence\n * -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$usePresence(present) {\n const [node1, setNode] = $iqq3r$useState();\n const stylesRef = $iqq3r$useRef({});\n const prevPresentRef = $iqq3r$useRef(present);\n const prevAnimationNameRef = $iqq3r$useRef('none');\n const initialState = present ? 'mounted' : 'unmounted';\n const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(initialState, {\n mounted: {\n UNMOUNT: 'unmounted',\n ANIMATION_OUT: 'unmountSuspended'\n },\n unmountSuspended: {\n MOUNT: 'mounted',\n ANIMATION_END: 'unmounted'\n },\n unmounted: {\n MOUNT: 'mounted'\n }\n });\n $iqq3r$useEffect(()=>{\n const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';\n }, [\n state\n ]);\n $iqq3r$useLayoutEffect(()=>{\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(styles);\n if (present) send('MOUNT');\n else if (currentAnimationName === 'none' || (styles === null || styles === void 0 ? void 0 : styles.display) === 'none') // If there is no exit animation or the element is hidden, animations won't run\n // so we unmount instantly\n send('UNMOUNT');\n else {\n /**\n * When `present` changes to `false`, we check changes to animation-name to\n * determine whether an animation has started. We chose this approach (reading\n * computed styles) because there is no `animationrun` event and `animationstart`\n * fires after `animation-delay` has expired which would be too late.\n */ const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) send('ANIMATION_OUT');\n else send('UNMOUNT');\n }\n prevPresentRef.current = present;\n }\n }, [\n present,\n send\n ]);\n $iqq3r$useLayoutEffect(()=>{\n if (node1) {\n /**\n * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`\n * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we\n * make sure we only trigger ANIMATION_END for the currently active animation.\n */ const handleAnimationEnd = (event)=>{\n const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node1 && isCurrentAnimation) // With React 18 concurrency this update is applied\n // a frame after the animation ends, creating a flash of visible content.\n // By manually flushing we ensure they sync within a frame, removing the flash.\n $iqq3r$flushSync(()=>send('ANIMATION_END')\n );\n };\n const handleAnimationStart = (event)=>{\n if (event.target === node1) // if animation occurred, store its name as the previous animation.\n prevAnimationNameRef.current = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);\n };\n node1.addEventListener('animationstart', handleAnimationStart);\n node1.addEventListener('animationcancel', handleAnimationEnd);\n node1.addEventListener('animationend', handleAnimationEnd);\n return ()=>{\n node1.removeEventListener('animationstart', handleAnimationStart);\n node1.removeEventListener('animationcancel', handleAnimationEnd);\n node1.removeEventListener('animationend', handleAnimationEnd);\n };\n } else // Transition to the unmounted state if the node is removed prematurely.\n // We avoid doing so during cleanup as the node may change but still exist.\n send('ANIMATION_END');\n }, [\n node1,\n send\n ]);\n return {\n isPresent: [\n 'mounted',\n 'unmountSuspended'\n ].includes(state),\n ref: $iqq3r$useCallback((node)=>{\n if (node) stylesRef.current = getComputedStyle(node);\n setNode(node);\n }, [])\n };\n}\n/* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$getAnimationName(styles) {\n return (styles === null || styles === void 0 ? void 0 : styles.animationName) || 'none';\n}\n\n\n\n\nexport {$921a889cee6df7e8$export$99c2b779aa4e8b8b as Presence};\n//# sourceMappingURL=index.module.js.map\n"],"names":["$iqq3r$useReducer","$iqq3r$Children","$iqq3r$useComposedRefs","$iqq3r$cloneElement","$iqq3r$useState","$iqq3r$useRef","$iqq3r$useEffect","$iqq3r$useLayoutEffect","$iqq3r$flushSync","$iqq3r$useCallback"],"mappings":";;;;;AAUA,SAAS,yCAAyC,CAAC,YAAY,EAAE,OAAO,EAAE;AAC1E,IAAI,OAAOA,UAAiB,CAAC,CAAC,KAAK,EAAE,KAAK,GAAG;AAC7C,QAAQ,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;AAChD,QAAQ,OAAO,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,KAAK,CAAC,GAAG,SAAS,GAAG,KAAK,CAAC;AAC9E,KAAK,EAAE,YAAY,CAAC,CAAC;AACrB,CAAC;AACD;AACA;AACK,MAAC,yCAAyC,GAAG,CAAC,KAAK,GAAG;AAC3D,IAAI,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,QAAQ,EAAE,QAAQ,GAAG,GAAG,KAAK,CAAC;AAC7D,IAAI,MAAM,QAAQ,GAAG,iCAAiC,CAAC,OAAO,CAAC,CAAC;AAChE,IAAI,MAAM,KAAK,GAAG,OAAO,QAAQ,KAAK,UAAU,GAAG,QAAQ,CAAC;AAC5D,QAAQ,OAAO,EAAE,Q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C;AAC9B,KAAK,EAAE;AACP,QAAQ,KAAK;AACb,QAAQ,IAAI;AACZ,KAAK,CAAC,CAAC;AACP,IAAI,OAAO;AACX,QAAQ,SAAS,EAAE;AACnB,YAAY,SAAS;AACrB,YAAY,kBAAkB;AAC9B,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;AACzB,QAAQ,GAAG,EAAEC,WAAkB,CAAC,CAAC,IAAI,GAAG;AACxC,YAAY,IAAI,IAAI,EAAE,SAAS,CAAC,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;AACjE,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AAC1B,SAAS,EAAE,EAAE,CAAC;AACd,KAAK,CAAC;AACN,CAAC;AACD,qGAAqG,SAAS,sCAAsC,CAAC,MAAM,EAAE;AAC7J,IAAI,OAAO,CAAC,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,aAAa,KAAK,MAAM,CAAC;AAC5F;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _extends = require('../../../../../@babel_runtime@7.24.8/node_modules/@babel/runtime/helpers/esm/extends.cjs');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var ReactDOM = require('react-dom');
|
|
6
|
+
var index_module = require('../../../../../@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.cjs');
|
|
7
|
+
|
|
8
|
+
const $8927f6f2acc4f386$var$NODES = [
|
|
9
|
+
'a',
|
|
10
|
+
'button',
|
|
11
|
+
'div',
|
|
12
|
+
'h2',
|
|
13
|
+
'h3',
|
|
14
|
+
'img',
|
|
15
|
+
'li',
|
|
16
|
+
'nav',
|
|
17
|
+
'ol',
|
|
18
|
+
'p',
|
|
19
|
+
'span',
|
|
20
|
+
'svg',
|
|
21
|
+
'ul'
|
|
22
|
+
]; // Temporary while we await merge of this fix:
|
|
23
|
+
// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396
|
|
24
|
+
// prettier-ignore
|
|
25
|
+
/* -------------------------------------------------------------------------------------------------
|
|
26
|
+
* Primitive
|
|
27
|
+
* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{
|
|
28
|
+
const Node = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
29
|
+
const { asChild: asChild , ...primitiveProps } = props;
|
|
30
|
+
const Comp = asChild ? index_module.Slot : node;
|
|
31
|
+
React.useEffect(()=>{
|
|
32
|
+
window[Symbol.for('radix-ui')] = true;
|
|
33
|
+
}, []);
|
|
34
|
+
return /*#__PURE__*/ React.createElement(Comp, _extends.default({}, primitiveProps, {
|
|
35
|
+
ref: forwardedRef
|
|
36
|
+
}));
|
|
37
|
+
});
|
|
38
|
+
Node.displayName = `Primitive.${node}`;
|
|
39
|
+
return {
|
|
40
|
+
...primitive,
|
|
41
|
+
[node]: Node
|
|
42
|
+
};
|
|
43
|
+
}, {});
|
|
44
|
+
/* -------------------------------------------------------------------------------------------------
|
|
45
|
+
* Utils
|
|
46
|
+
* -----------------------------------------------------------------------------------------------*/ /**
|
|
47
|
+
* Flush custom event dispatch
|
|
48
|
+
* https://github.com/radix-ui/primitives/pull/1378
|
|
49
|
+
*
|
|
50
|
+
* React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
|
|
51
|
+
*
|
|
52
|
+
* Internally, React prioritises events in the following order:
|
|
53
|
+
* - discrete
|
|
54
|
+
* - continuous
|
|
55
|
+
* - default
|
|
56
|
+
*
|
|
57
|
+
* https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
|
|
58
|
+
*
|
|
59
|
+
* `discrete` is an important distinction as updates within these events are applied immediately.
|
|
60
|
+
* React however, is not able to infer the priority of custom event types due to how they are detected internally.
|
|
61
|
+
* Because of this, it's possible for updates from custom events to be unexpectedly batched when
|
|
62
|
+
* dispatched by another `discrete` event.
|
|
63
|
+
*
|
|
64
|
+
* In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
|
|
65
|
+
* This utility should be used when dispatching a custom event from within another `discrete` event, this utility
|
|
66
|
+
* is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
|
|
67
|
+
* For example:
|
|
68
|
+
*
|
|
69
|
+
* dispatching a known click 👎
|
|
70
|
+
* target.dispatchEvent(new Event(‘click’))
|
|
71
|
+
*
|
|
72
|
+
* dispatching a custom type within a non-discrete event 👎
|
|
73
|
+
* onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
|
|
74
|
+
*
|
|
75
|
+
* dispatching a custom type within a `discrete` event 👍
|
|
76
|
+
* onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
|
|
77
|
+
*
|
|
78
|
+
* Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use
|
|
79
|
+
* this utility with them. This is because it's possible for those handlers to be called implicitly during render
|
|
80
|
+
* e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
|
|
81
|
+
*/ function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
|
|
82
|
+
if (target) ReactDOM.flushSync(()=>target.dispatchEvent(event)
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
exports.Primitive = $8927f6f2acc4f386$export$250ffa63cdc0d034;
|
|
87
|
+
exports.dispatchDiscreteCustomEvent = $8927f6f2acc4f386$export$6d1a0317bde7de7f;
|
|
88
|
+
//# sourceMappingURL=index.module.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.module.cjs","sources":["../../../../../../../../../../../node_modules/.pnpm/@radix-ui+react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.js"],"sourcesContent":["import $4q5Fq$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport {forwardRef as $4q5Fq$forwardRef, useEffect as $4q5Fq$useEffect, createElement as $4q5Fq$createElement} from \"react\";\nimport {flushSync as $4q5Fq$flushSync} from \"react-dom\";\nimport {Slot as $4q5Fq$Slot} from \"@radix-ui/react-slot\";\n\n\n\n\n\nconst $8927f6f2acc4f386$var$NODES = [\n 'a',\n 'button',\n 'div',\n 'h2',\n 'h3',\n 'img',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'span',\n 'svg',\n 'ul'\n]; // Temporary while we await merge of this fix:\n// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396\n// prettier-ignore\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{\n const Node = /*#__PURE__*/ $4q5Fq$forwardRef((props, forwardedRef)=>{\n const { asChild: asChild , ...primitiveProps } = props;\n const Comp = asChild ? $4q5Fq$Slot : node;\n $4q5Fq$useEffect(()=>{\n window[Symbol.for('radix-ui')] = true;\n }, []);\n return /*#__PURE__*/ $4q5Fq$createElement(Comp, $4q5Fq$babelruntimehelpersesmextends({}, primitiveProps, {\n ref: forwardedRef\n }));\n });\n Node.displayName = `Primitive.${node}`;\n return {\n ...primitive,\n [node]: Node\n };\n}, {});\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/ /**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click 👎\n * target.dispatchEvent(new Event(‘click’))\n *\n * dispatching a custom type within a non-discrete event 👎\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}\n *\n * dispatching a custom type within a `discrete` event 👍\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */ function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {\n if (target) $4q5Fq$flushSync(()=>target.dispatchEvent(event)\n );\n}\n/* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$be92b6f5f03c0fe9 = $8927f6f2acc4f386$export$250ffa63cdc0d034;\n\n\n\n\nexport {$8927f6f2acc4f386$export$250ffa63cdc0d034 as Primitive, $8927f6f2acc4f386$export$be92b6f5f03c0fe9 as Root, $8927f6f2acc4f386$export$6d1a0317bde7de7f as dispatchDiscreteCustomEvent};\n//# sourceMappingURL=index.module.js.map\n"],"names":["$4q5Fq$forwardRef","$4q5Fq$Slot","$4q5Fq$useEffect","$4q5Fq$createElement","$4q5Fq$babelruntimehelpersesmextends","$4q5Fq$flushSync"],"mappings":";;;;;;;AASA,MAAM,2BAA2B,GAAG;AACpC,IAAI,GAAG;AACP,IAAI,QAAQ;AACZ,IAAI,KAAK;AACT,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,KAAK;AACT,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K,EAAE;AACtE,IAAI,IAAI,MAAM,EAAEC,kBAAgB,CAAC,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;AAChE,KAAK,CAAC;AACN;;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import _extends from '../../../../../@babel_runtime@7.24.8/node_modules/@babel/runtime/helpers/esm/extends.js';
|
|
2
|
+
import { forwardRef, useEffect, createElement } from 'react';
|
|
3
|
+
import { flushSync } from 'react-dom';
|
|
4
|
+
import { Slot as $5e63c961fc1ce211$export$8c6ed5c666ac1360 } from '../../../../../@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.js';
|
|
5
|
+
|
|
6
|
+
const $8927f6f2acc4f386$var$NODES = [
|
|
7
|
+
'a',
|
|
8
|
+
'button',
|
|
9
|
+
'div',
|
|
10
|
+
'h2',
|
|
11
|
+
'h3',
|
|
12
|
+
'img',
|
|
13
|
+
'li',
|
|
14
|
+
'nav',
|
|
15
|
+
'ol',
|
|
16
|
+
'p',
|
|
17
|
+
'span',
|
|
18
|
+
'svg',
|
|
19
|
+
'ul'
|
|
20
|
+
]; // Temporary while we await merge of this fix:
|
|
21
|
+
// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396
|
|
22
|
+
// prettier-ignore
|
|
23
|
+
/* -------------------------------------------------------------------------------------------------
|
|
24
|
+
* Primitive
|
|
25
|
+
* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{
|
|
26
|
+
const Node = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
27
|
+
const { asChild: asChild , ...primitiveProps } = props;
|
|
28
|
+
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
|
|
29
|
+
useEffect(()=>{
|
|
30
|
+
window[Symbol.for('radix-ui')] = true;
|
|
31
|
+
}, []);
|
|
32
|
+
return /*#__PURE__*/ createElement(Comp, _extends({}, primitiveProps, {
|
|
33
|
+
ref: forwardedRef
|
|
34
|
+
}));
|
|
35
|
+
});
|
|
36
|
+
Node.displayName = `Primitive.${node}`;
|
|
37
|
+
return {
|
|
38
|
+
...primitive,
|
|
39
|
+
[node]: Node
|
|
40
|
+
};
|
|
41
|
+
}, {});
|
|
42
|
+
/* -------------------------------------------------------------------------------------------------
|
|
43
|
+
* Utils
|
|
44
|
+
* -----------------------------------------------------------------------------------------------*/ /**
|
|
45
|
+
* Flush custom event dispatch
|
|
46
|
+
* https://github.com/radix-ui/primitives/pull/1378
|
|
47
|
+
*
|
|
48
|
+
* React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
|
|
49
|
+
*
|
|
50
|
+
* Internally, React prioritises events in the following order:
|
|
51
|
+
* - discrete
|
|
52
|
+
* - continuous
|
|
53
|
+
* - default
|
|
54
|
+
*
|
|
55
|
+
* https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
|
|
56
|
+
*
|
|
57
|
+
* `discrete` is an important distinction as updates within these events are applied immediately.
|
|
58
|
+
* React however, is not able to infer the priority of custom event types due to how they are detected internally.
|
|
59
|
+
* Because of this, it's possible for updates from custom events to be unexpectedly batched when
|
|
60
|
+
* dispatched by another `discrete` event.
|
|
61
|
+
*
|
|
62
|
+
* In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
|
|
63
|
+
* This utility should be used when dispatching a custom event from within another `discrete` event, this utility
|
|
64
|
+
* is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
|
|
65
|
+
* For example:
|
|
66
|
+
*
|
|
67
|
+
* dispatching a known click 👎
|
|
68
|
+
* target.dispatchEvent(new Event(‘click’))
|
|
69
|
+
*
|
|
70
|
+
* dispatching a custom type within a non-discrete event 👎
|
|
71
|
+
* onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
|
|
72
|
+
*
|
|
73
|
+
* dispatching a custom type within a `discrete` event 👍
|
|
74
|
+
* onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
|
|
75
|
+
*
|
|
76
|
+
* Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use
|
|
77
|
+
* this utility with them. This is because it's possible for those handlers to be called implicitly during render
|
|
78
|
+
* e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
|
|
79
|
+
*/ function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
|
|
80
|
+
if (target) flushSync(()=>target.dispatchEvent(event)
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export { $8927f6f2acc4f386$export$250ffa63cdc0d034 as Primitive, $8927f6f2acc4f386$export$6d1a0317bde7de7f as dispatchDiscreteCustomEvent };
|
|
85
|
+
//# sourceMappingURL=index.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.module.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@radix-ui+react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.js"],"sourcesContent":["import $4q5Fq$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport {forwardRef as $4q5Fq$forwardRef, useEffect as $4q5Fq$useEffect, createElement as $4q5Fq$createElement} from \"react\";\nimport {flushSync as $4q5Fq$flushSync} from \"react-dom\";\nimport {Slot as $4q5Fq$Slot} from \"@radix-ui/react-slot\";\n\n\n\n\n\nconst $8927f6f2acc4f386$var$NODES = [\n 'a',\n 'button',\n 'div',\n 'h2',\n 'h3',\n 'img',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'span',\n 'svg',\n 'ul'\n]; // Temporary while we await merge of this fix:\n// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396\n// prettier-ignore\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{\n const Node = /*#__PURE__*/ $4q5Fq$forwardRef((props, forwardedRef)=>{\n const { asChild: asChild , ...primitiveProps } = props;\n const Comp = asChild ? $4q5Fq$Slot : node;\n $4q5Fq$useEffect(()=>{\n window[Symbol.for('radix-ui')] = true;\n }, []);\n return /*#__PURE__*/ $4q5Fq$createElement(Comp, $4q5Fq$babelruntimehelpersesmextends({}, primitiveProps, {\n ref: forwardedRef\n }));\n });\n Node.displayName = `Primitive.${node}`;\n return {\n ...primitive,\n [node]: Node\n };\n}, {});\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/ /**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click 👎\n * target.dispatchEvent(new Event(‘click’))\n *\n * dispatching a custom type within a non-discrete event 👎\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}\n *\n * dispatching a custom type within a `discrete` event 👍\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */ function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {\n if (target) $4q5Fq$flushSync(()=>target.dispatchEvent(event)\n );\n}\n/* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$be92b6f5f03c0fe9 = $8927f6f2acc4f386$export$250ffa63cdc0d034;\n\n\n\n\nexport {$8927f6f2acc4f386$export$250ffa63cdc0d034 as Primitive, $8927f6f2acc4f386$export$be92b6f5f03c0fe9 as Root, $8927f6f2acc4f386$export$6d1a0317bde7de7f as dispatchDiscreteCustomEvent};\n//# sourceMappingURL=index.module.js.map\n"],"names":["$4q5Fq$forwardRef","$4q5Fq$Slot","$4q5Fq$useEffect","$4q5Fq$createElement","$4q5Fq$babelruntimehelpersesmextends","$4q5Fq$flushSync"],"mappings":";;;;;AASA,MAAM,2BAA2B,GAAG;AACpC,IAAI,GAAG;AACP,IAAI,QAAQ;AACZ,IAAI,KAAK;AACT,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,KAAK;AACT,IAAI,IAAI;AACR,IAAI,KAAK;AACT,IAAI,IAAI;AACR,IAAI,GAAG;AACP,IAAI,MAAM;AACV,IAAI,KAAK;AACT,IAAI,IAAI;AACR,CAAC,CAAC;AACF;AACA;AACA;AACA;AACA,qGAA0G,MAAC,yCAAyC,GAAG,2BAA2B,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,IAAI,GAAG;AAC7M,IAAI,MAAM,IAAI,iBAAiBA,UAAiB,CAAC,CAAC,KAAK,EAAE,YAAY,GAAG;AACxE,QAAQ,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,GAAG,cAAc,EAAE,GAAG,KAAK,CAAC;AAC/D,QAAQ,MAAM,IAAI,GAAG,OAAO,GAAGC,yCAAW,GAAG,IAAI,CAAC;AAClD,QAAQC,SAAgB,CAAC,IAAI;AAC7B,YAAY,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC;AAClD,SAAS,EAAE,EAAE,CAAC,CAAC;AACf,QAAQ,qBAAqBC,aAAoB,CAAC,IAAI,EAAEC,QAAoC,CAAC,EAAE,EAAE,cAAc,EAAE;AACjH,YAAY,GAAG,EAAE,YAAY;AAC7B,SAAS,CAAC,CAAC,CAAC;AACZ,KAAK,CAAC,CAAC;AACP,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;AAC3C,IAAI,OAAO;AACX,QAAQ,GAAG,SAAS;AACpB,QAAQ,CAAC,IAAI,GAAG,IAAI;AACpB,KAAK,CAAC;AACN,CAAC,EAAE,EAAE,EAAE;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,yCAAyC,CAAC,MAAM,EAAE,KAAK,EAAE;AACtE,IAAI,IAAI,MAAM,EAAEC,SAAgB,CAAC,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;AAChE,KAAK,CAAC;AACN;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _extends = require('../../../../../@babel_runtime@7.24.8/node_modules/@babel/runtime/helpers/esm/extends.cjs');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var index_module = require('../../../../../@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.cjs');
|
|
6
|
+
|
|
7
|
+
/* -------------------------------------------------------------------------------------------------
|
|
8
|
+
* Slot
|
|
9
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
10
|
+
const { children: children , ...slotProps } = props;
|
|
11
|
+
const childrenArray = React.Children.toArray(children);
|
|
12
|
+
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
|
|
13
|
+
if (slottable) {
|
|
14
|
+
// the new element to render is the one passed as a child of `Slottable`
|
|
15
|
+
const newElement = slottable.props.children;
|
|
16
|
+
const newChildren = childrenArray.map((child)=>{
|
|
17
|
+
if (child === slottable) {
|
|
18
|
+
// because the new element will be the one rendered, we are only interested
|
|
19
|
+
// in grabbing its children (`newElement.props.children`)
|
|
20
|
+
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
21
|
+
return /*#__PURE__*/ React.isValidElement(newElement) ? newElement.props.children : null;
|
|
22
|
+
} else return child;
|
|
23
|
+
});
|
|
24
|
+
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends.default({}, slotProps, {
|
|
25
|
+
ref: forwardedRef
|
|
26
|
+
}), /*#__PURE__*/ React.isValidElement(newElement) ? /*#__PURE__*/ React.cloneElement(newElement, undefined, newChildren) : null);
|
|
27
|
+
}
|
|
28
|
+
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends.default({}, slotProps, {
|
|
29
|
+
ref: forwardedRef
|
|
30
|
+
}), children);
|
|
31
|
+
});
|
|
32
|
+
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';
|
|
33
|
+
/* -------------------------------------------------------------------------------------------------
|
|
34
|
+
* SlotClone
|
|
35
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
36
|
+
const { children: children , ...slotProps } = props;
|
|
37
|
+
if (/*#__PURE__*/ React.isValidElement(children)) return /*#__PURE__*/ React.cloneElement(children, {
|
|
38
|
+
...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
|
|
39
|
+
ref: index_module.composeRefs(forwardedRef, children.ref)
|
|
40
|
+
});
|
|
41
|
+
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
42
|
+
});
|
|
43
|
+
$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';
|
|
44
|
+
/* -------------------------------------------------------------------------------------------------
|
|
45
|
+
* Slottable
|
|
46
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{
|
|
47
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, children);
|
|
48
|
+
};
|
|
49
|
+
/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {
|
|
50
|
+
return /*#__PURE__*/ React.isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
|
|
51
|
+
}
|
|
52
|
+
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
53
|
+
// all child props should override
|
|
54
|
+
const overrideProps = {
|
|
55
|
+
...childProps
|
|
56
|
+
};
|
|
57
|
+
for(const propName in childProps){
|
|
58
|
+
const slotPropValue = slotProps[propName];
|
|
59
|
+
const childPropValue = childProps[propName];
|
|
60
|
+
const isHandler = /^on[A-Z]/.test(propName); // if it's a handler, modify the override by composing the base handler
|
|
61
|
+
if (isHandler) overrideProps[propName] = (...args)=>{
|
|
62
|
+
childPropValue === null || childPropValue === void 0 || childPropValue(...args);
|
|
63
|
+
slotPropValue === null || slotPropValue === void 0 || slotPropValue(...args);
|
|
64
|
+
};
|
|
65
|
+
else if (propName === 'style') overrideProps[propName] = {
|
|
66
|
+
...slotPropValue,
|
|
67
|
+
...childPropValue
|
|
68
|
+
};
|
|
69
|
+
else if (propName === 'className') overrideProps[propName] = [
|
|
70
|
+
slotPropValue,
|
|
71
|
+
childPropValue
|
|
72
|
+
].filter(Boolean).join(' ');
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
...slotProps,
|
|
76
|
+
...overrideProps
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
exports.Slot = $5e63c961fc1ce211$export$8c6ed5c666ac1360;
|
|
81
|
+
exports.Slottable = $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
|
|
82
|
+
//# sourceMappingURL=index.module.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.module.cjs","sources":["../../../../../../../../../../../node_modules/.pnpm/@radix-ui+react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.js"],"sourcesContent":["import $9IrjX$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport {forwardRef as $9IrjX$forwardRef, Children as $9IrjX$Children, isValidElement as $9IrjX$isValidElement, createElement as $9IrjX$createElement, cloneElement as $9IrjX$cloneElement, Fragment as $9IrjX$Fragment} from \"react\";\nimport {composeRefs as $9IrjX$composeRefs} from \"@radix-ui/react-compose-refs\";\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ $9IrjX$forwardRef((props, forwardedRef)=>{\n const { children: children , ...slotProps } = props;\n const childrenArray = $9IrjX$Children.toArray(children);\n const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child)=>{\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if ($9IrjX$Children.count(newElement) > 1) return $9IrjX$Children.only(null);\n return /*#__PURE__*/ $9IrjX$isValidElement(newElement) ? newElement.props.children : null;\n } else return child;\n });\n return /*#__PURE__*/ $9IrjX$createElement($5e63c961fc1ce211$var$SlotClone, $9IrjX$babelruntimehelpersesmextends({}, slotProps, {\n ref: forwardedRef\n }), /*#__PURE__*/ $9IrjX$isValidElement(newElement) ? /*#__PURE__*/ $9IrjX$cloneElement(newElement, undefined, newChildren) : null);\n }\n return /*#__PURE__*/ $9IrjX$createElement($5e63c961fc1ce211$var$SlotClone, $9IrjX$babelruntimehelpersesmextends({}, slotProps, {\n ref: forwardedRef\n }), children);\n});\n$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ $9IrjX$forwardRef((props, forwardedRef)=>{\n const { children: children , ...slotProps } = props;\n if (/*#__PURE__*/ $9IrjX$isValidElement(children)) return /*#__PURE__*/ $9IrjX$cloneElement(children, {\n ...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),\n ref: $9IrjX$composeRefs(forwardedRef, children.ref)\n });\n return $9IrjX$Children.count(children) > 1 ? $9IrjX$Children.only(null) : null;\n});\n$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{\n return /*#__PURE__*/ $9IrjX$createElement($9IrjX$Fragment, null, children);\n};\n/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {\n return /*#__PURE__*/ $9IrjX$isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;\n}\nfunction $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {\n // all child props should override\n const overrideProps = {\n ...childProps\n };\n for(const propName in childProps){\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName); // if it's a handler, modify the override by composing the base handler\n if (isHandler) overrideProps[propName] = (...args)=>{\n childPropValue === null || childPropValue === void 0 || childPropValue(...args);\n slotPropValue === null || slotPropValue === void 0 || slotPropValue(...args);\n };\n else if (propName === 'style') overrideProps[propName] = {\n ...slotPropValue,\n ...childPropValue\n };\n else if (propName === 'className') overrideProps[propName] = [\n slotPropValue,\n childPropValue\n ].filter(Boolean).join(' ');\n }\n return {\n ...slotProps,\n ...overrideProps\n };\n}\nconst $5e63c961fc1ce211$export$be92b6f5f03c0fe9 = $5e63c961fc1ce211$export$8c6ed5c666ac1360;\n\n\n\n\nexport {$5e63c961fc1ce211$export$8c6ed5c666ac1360 as Slot, $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 as Slottable, $5e63c961fc1ce211$export$be92b6f5f03c0fe9 as Root};\n//# sourceMappingURL=index.module.js.map\n"],"names":["$9IrjX$forwardRef","$9IrjX$Children","$9IrjX$isValidElement","$9IrjX$createElement","$9IrjX$babelruntimehelpersesmextends","$9IrjX$cloneElement","$9IrjX$composeRefs","$9IrjX$Fragment"],"mappings":";;;;;;AAOA;AACA;AACA,qGAA0G,MAAC,yCAAyC,iBAAiBA,gBAAiB,CAAC,CAAC,KAAK,EAAE,YAAY,GAAG;AAC9M,IAAI,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;AACxD,IAAI,MAAM,aAAa,GAAGC,cAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5D,IAAI,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;AAC5E,IAAI,IAAI,SAAS,EAAE;AACnB;AACA,QAAQ,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC;AACpD,QAAQ,MAAM,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG;AACvD,YAAY,IAAI,KAAK,KAAK,SAAS,EAAE;AACrC;AACA;AACA,gBAAgB,IAAIA,cAAe,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,OAAOA,cAAe,CAAC,IAAI,CAAC,IAAI,C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AAc;AAC7B,SAAS,CAAC;AACV,aAAa,IAAI,QAAQ,KAAK,WAAW,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG;AACrE,YAAY,aAAa;AACzB,YAAY,cAAc;AAC1B,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpC,KAAK;AACL,IAAI,OAAO;AACX,QAAQ,GAAG,SAAS;AACpB,QAAQ,GAAG,aAAa;AACxB,KAAK,CAAC;AACN;;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import _extends from '../../../../../@babel_runtime@7.24.8/node_modules/@babel/runtime/helpers/esm/extends.js';
|
|
2
|
+
import { forwardRef, Children, isValidElement, createElement, cloneElement, Fragment } from 'react';
|
|
3
|
+
import { composeRefs as $6ed0406888f73fc4$export$43e446d32b3d21af } from '../../../../../@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.js';
|
|
4
|
+
|
|
5
|
+
/* -------------------------------------------------------------------------------------------------
|
|
6
|
+
* Slot
|
|
7
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
8
|
+
const { children: children , ...slotProps } = props;
|
|
9
|
+
const childrenArray = Children.toArray(children);
|
|
10
|
+
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
|
|
11
|
+
if (slottable) {
|
|
12
|
+
// the new element to render is the one passed as a child of `Slottable`
|
|
13
|
+
const newElement = slottable.props.children;
|
|
14
|
+
const newChildren = childrenArray.map((child)=>{
|
|
15
|
+
if (child === slottable) {
|
|
16
|
+
// because the new element will be the one rendered, we are only interested
|
|
17
|
+
// in grabbing its children (`newElement.props.children`)
|
|
18
|
+
if (Children.count(newElement) > 1) return Children.only(null);
|
|
19
|
+
return /*#__PURE__*/ isValidElement(newElement) ? newElement.props.children : null;
|
|
20
|
+
} else return child;
|
|
21
|
+
});
|
|
22
|
+
return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
23
|
+
ref: forwardedRef
|
|
24
|
+
}), /*#__PURE__*/ isValidElement(newElement) ? /*#__PURE__*/ cloneElement(newElement, undefined, newChildren) : null);
|
|
25
|
+
}
|
|
26
|
+
return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
27
|
+
ref: forwardedRef
|
|
28
|
+
}), children);
|
|
29
|
+
});
|
|
30
|
+
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';
|
|
31
|
+
/* -------------------------------------------------------------------------------------------------
|
|
32
|
+
* SlotClone
|
|
33
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
34
|
+
const { children: children , ...slotProps } = props;
|
|
35
|
+
if (/*#__PURE__*/ isValidElement(children)) return /*#__PURE__*/ cloneElement(children, {
|
|
36
|
+
...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
|
|
37
|
+
ref: $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref)
|
|
38
|
+
});
|
|
39
|
+
return Children.count(children) > 1 ? Children.only(null) : null;
|
|
40
|
+
});
|
|
41
|
+
$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';
|
|
42
|
+
/* -------------------------------------------------------------------------------------------------
|
|
43
|
+
* Slottable
|
|
44
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{
|
|
45
|
+
return /*#__PURE__*/ createElement(Fragment, null, children);
|
|
46
|
+
};
|
|
47
|
+
/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {
|
|
48
|
+
return /*#__PURE__*/ isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
|
|
49
|
+
}
|
|
50
|
+
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
51
|
+
// all child props should override
|
|
52
|
+
const overrideProps = {
|
|
53
|
+
...childProps
|
|
54
|
+
};
|
|
55
|
+
for(const propName in childProps){
|
|
56
|
+
const slotPropValue = slotProps[propName];
|
|
57
|
+
const childPropValue = childProps[propName];
|
|
58
|
+
const isHandler = /^on[A-Z]/.test(propName); // if it's a handler, modify the override by composing the base handler
|
|
59
|
+
if (isHandler) overrideProps[propName] = (...args)=>{
|
|
60
|
+
childPropValue === null || childPropValue === void 0 || childPropValue(...args);
|
|
61
|
+
slotPropValue === null || slotPropValue === void 0 || slotPropValue(...args);
|
|
62
|
+
};
|
|
63
|
+
else if (propName === 'style') overrideProps[propName] = {
|
|
64
|
+
...slotPropValue,
|
|
65
|
+
...childPropValue
|
|
66
|
+
};
|
|
67
|
+
else if (propName === 'className') overrideProps[propName] = [
|
|
68
|
+
slotPropValue,
|
|
69
|
+
childPropValue
|
|
70
|
+
].filter(Boolean).join(' ');
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
...slotProps,
|
|
74
|
+
...overrideProps
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { $5e63c961fc1ce211$export$8c6ed5c666ac1360 as Slot, $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 as Slottable };
|
|
79
|
+
//# sourceMappingURL=index.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.module.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@radix-ui+react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.js"],"sourcesContent":["import $9IrjX$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport {forwardRef as $9IrjX$forwardRef, Children as $9IrjX$Children, isValidElement as $9IrjX$isValidElement, createElement as $9IrjX$createElement, cloneElement as $9IrjX$cloneElement, Fragment as $9IrjX$Fragment} from \"react\";\nimport {composeRefs as $9IrjX$composeRefs} from \"@radix-ui/react-compose-refs\";\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ $9IrjX$forwardRef((props, forwardedRef)=>{\n const { children: children , ...slotProps } = props;\n const childrenArray = $9IrjX$Children.toArray(children);\n const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child)=>{\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if ($9IrjX$Children.count(newElement) > 1) return $9IrjX$Children.only(null);\n return /*#__PURE__*/ $9IrjX$isValidElement(newElement) ? newElement.props.children : null;\n } else return child;\n });\n return /*#__PURE__*/ $9IrjX$createElement($5e63c961fc1ce211$var$SlotClone, $9IrjX$babelruntimehelpersesmextends({}, slotProps, {\n ref: forwardedRef\n }), /*#__PURE__*/ $9IrjX$isValidElement(newElement) ? /*#__PURE__*/ $9IrjX$cloneElement(newElement, undefined, newChildren) : null);\n }\n return /*#__PURE__*/ $9IrjX$createElement($5e63c961fc1ce211$var$SlotClone, $9IrjX$babelruntimehelpersesmextends({}, slotProps, {\n ref: forwardedRef\n }), children);\n});\n$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ $9IrjX$forwardRef((props, forwardedRef)=>{\n const { children: children , ...slotProps } = props;\n if (/*#__PURE__*/ $9IrjX$isValidElement(children)) return /*#__PURE__*/ $9IrjX$cloneElement(children, {\n ...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),\n ref: $9IrjX$composeRefs(forwardedRef, children.ref)\n });\n return $9IrjX$Children.count(children) > 1 ? $9IrjX$Children.only(null) : null;\n});\n$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{\n return /*#__PURE__*/ $9IrjX$createElement($9IrjX$Fragment, null, children);\n};\n/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {\n return /*#__PURE__*/ $9IrjX$isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;\n}\nfunction $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {\n // all child props should override\n const overrideProps = {\n ...childProps\n };\n for(const propName in childProps){\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName); // if it's a handler, modify the override by composing the base handler\n if (isHandler) overrideProps[propName] = (...args)=>{\n childPropValue === null || childPropValue === void 0 || childPropValue(...args);\n slotPropValue === null || slotPropValue === void 0 || slotPropValue(...args);\n };\n else if (propName === 'style') overrideProps[propName] = {\n ...slotPropValue,\n ...childPropValue\n };\n else if (propName === 'className') overrideProps[propName] = [\n slotPropValue,\n childPropValue\n ].filter(Boolean).join(' ');\n }\n return {\n ...slotProps,\n ...overrideProps\n };\n}\nconst $5e63c961fc1ce211$export$be92b6f5f03c0fe9 = $5e63c961fc1ce211$export$8c6ed5c666ac1360;\n\n\n\n\nexport {$5e63c961fc1ce211$export$8c6ed5c666ac1360 as Slot, $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 as Slottable, $5e63c961fc1ce211$export$be92b6f5f03c0fe9 as Root};\n//# sourceMappingURL=index.module.js.map\n"],"names":["$9IrjX$forwardRef","$9IrjX$Children","$9IrjX$isValidElement","$9IrjX$createElement","$9IrjX$babelruntimehelpersesmextends","$9IrjX$cloneElement","$9IrjX$composeRefs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AK,CAAC;AACN,IAAI,IAAI,MAAM,QAAQ,IAAI,UAAU,CAAC;AACrC,QAAQ,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAClD,QAAQ,MAAM,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;AACpD,QAAQ,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACpD,QAAQ,IAAI,SAAS,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG;AAC5D,YAAY,cAAc,KAAK,IAAI,IAAI,cAAc,KAAK,KAAK,CAAC,IAAI,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC;AAC5F,YAAY,aAAa,KAAK,IAAI,IAAI,aAAa,KAAK,KAAK,CAAC,IAAI,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC;AACzF,SAAS,CAAC;AACV,aAAa,IAAI,QAAQ,KAAK,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG;AACjE,YAAY,GAAG,aAAa;AAC5B,YAAY,GAAG,cAAc;AAC7B,SAAS,CAAC;AACV,aAAa,IAAI,QAAQ,KAAK,WAAW,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG;AACrE,YAAY,aAAa;AACzB,YAAY,cAAc;AAC1B,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpC,KAAK;AACL,IAAI,OAAO;AACX,QAAQ,GAAG,SAAS;AACpB,QAAQ,GAAG,aAAa;AACxB,KAAK,CAAC;AACN;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
|
|
7
|
+
* prop or avoid re-executing effects when passed as a dependency
|
|
8
|
+
*/ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
|
|
9
|
+
const callbackRef = React.useRef(callback);
|
|
10
|
+
React.useEffect(()=>{
|
|
11
|
+
callbackRef.current = callback;
|
|
12
|
+
}); // https://github.com/facebook/react/issues/19240
|
|
13
|
+
return React.useMemo(()=>(...args)=>{
|
|
14
|
+
var _callbackRef$current;
|
|
15
|
+
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
|
|
16
|
+
}
|
|
17
|
+
, []);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
exports.useCallbackRef = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a;
|
|
21
|
+
//# sourceMappingURL=index.module.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.module.cjs","sources":["../../../../../../../../../../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js"],"sourcesContent":["import {useRef as $lwiWj$useRef, useEffect as $lwiWj$useEffect, useMemo as $lwiWj$useMemo} from \"react\";\n\n\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {\n const callbackRef = $lwiWj$useRef(callback);\n $lwiWj$useEffect(()=>{\n callbackRef.current = callback;\n }); // https://github.com/facebook/react/issues/19240\n return $lwiWj$useMemo(()=>(...args)=>{\n var _callbackRef$current;\n return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);\n }\n , []);\n}\n\n\n\n\nexport {$b1b2314f5f9a1d84$export$25bec8c6f54ee79a as useCallbackRef};\n//# sourceMappingURL=index.module.js.map\n"],"names":["$lwiWj$useRef","$lwiWj$useEffect","$lwiWj$useMemo"],"mappings":";;;;AAGA;AACA;AACA;AACA,IAAI,SAAS,yCAAyC,CAAC,QAAQ,EAAE;AACjE,IAAI,MAAM,WAAW,GAAGA,YAAa,CAAC,QAAQ,CAAC,CAAC;AAChD,IAAIC,eAAgB,CAAC,IAAI;AACzB,QAAQ,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;AACvC,KAAK,CAAC,CAAC;AACP,IAAI,OAAOC,aAAc,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG;AACzC,YAAY,IAAI,oBAAoB,CAAC;AACrC,YAAY,OAAO,CAAC,oBAAoB,GAAG,WAAW,CAAC,OAAO,MAAM,IAAI,IAAI,oBAAoB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,CAAC;AACvK,SAAS;AACT,MAAM,EAAE,CAAC,CAAC;AACV;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useRef, useEffect, useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
|
|
5
|
+
* prop or avoid re-executing effects when passed as a dependency
|
|
6
|
+
*/ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
|
|
7
|
+
const callbackRef = useRef(callback);
|
|
8
|
+
useEffect(()=>{
|
|
9
|
+
callbackRef.current = callback;
|
|
10
|
+
}); // https://github.com/facebook/react/issues/19240
|
|
11
|
+
return useMemo(()=>(...args)=>{
|
|
12
|
+
var _callbackRef$current;
|
|
13
|
+
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
|
|
14
|
+
}
|
|
15
|
+
, []);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { $b1b2314f5f9a1d84$export$25bec8c6f54ee79a as useCallbackRef };
|
|
19
|
+
//# sourceMappingURL=index.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.module.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js"],"sourcesContent":["import {useRef as $lwiWj$useRef, useEffect as $lwiWj$useEffect, useMemo as $lwiWj$useMemo} from \"react\";\n\n\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {\n const callbackRef = $lwiWj$useRef(callback);\n $lwiWj$useEffect(()=>{\n callbackRef.current = callback;\n }); // https://github.com/facebook/react/issues/19240\n return $lwiWj$useMemo(()=>(...args)=>{\n var _callbackRef$current;\n return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);\n }\n , []);\n}\n\n\n\n\nexport {$b1b2314f5f9a1d84$export$25bec8c6f54ee79a as useCallbackRef};\n//# sourceMappingURL=index.module.js.map\n"],"names":["$lwiWj$useRef","$lwiWj$useEffect","$lwiWj$useMemo"],"mappings":";;AAGA;AACA;AACA;AACA,IAAI,SAAS,yCAAyC,CAAC,QAAQ,EAAE;AACjE,IAAI,MAAM,WAAW,GAAGA,MAAa,CAAC,QAAQ,CAAC,CAAC;AAChD,IAAIC,SAAgB,CAAC,IAAI;AACzB,QAAQ,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;AACvC,KAAK,CAAC,CAAC;AACP,IAAI,OAAOC,OAAc,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG;AACzC,YAAY,IAAI,oBAAoB,CAAC;AACrC,YAAY,OAAO,CAAC,oBAAoB,GAAG,WAAW,CAAC,OAAO,MAAM,IAAI,IAAI,oBAAoB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,CAAC;AACvK,SAAS;AACT,MAAM,EAAE,CAAC,CAAC;AACV;;;;","x_google_ignoreList":[0]}
|