@zimyo/ui 1.0.1 → 1.1.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/package.json +79 -80
- package/dist/_virtual/_rollupPluginBabelHelpers.js +0 -11
- package/dist/components/index.d.ts +0 -59
- package/dist/components/ui/accordion.d.ts +0 -9
- package/dist/components/ui/accordion.js +0 -53
- package/dist/components/ui/alert-dialog.d.ts +0 -16
- package/dist/components/ui/alert-dialog.js +0 -107
- package/dist/components/ui/alert.d.ts +0 -12
- package/dist/components/ui/alert.js +0 -53
- package/dist/components/ui/aspect-ratio.d.ts +0 -6
- package/dist/components/ui/aspect-ratio.js +0 -12
- package/dist/components/ui/avatar.d.ts +0 -8
- package/dist/components/ui/avatar.js +0 -38
- package/dist/components/ui/badge.d.ts +0 -12
- package/dist/components/ui/badge.js +0 -37
- package/dist/components/ui/breadcrumb.d.ts +0 -13
- package/dist/components/ui/breadcrumb.js +0 -90
- package/dist/components/ui/button.d.ts +0 -13
- package/dist/components/ui/button.js +0 -49
- package/dist/components/ui/calendar.d.ts +0 -12
- package/dist/components/ui/calendar.js +0 -134
- package/dist/components/ui/card.d.ts +0 -11
- package/dist/components/ui/card.js +0 -77
- package/dist/components/ui/carousel.d.ts +0 -24
- package/dist/components/ui/carousel.js +0 -163
- package/dist/components/ui/chart.d.ts +0 -43
- package/dist/components/ui/chart.js +0 -187
- package/dist/components/ui/checkbox.d.ts +0 -6
- package/dist/components/ui/checkbox.js +0 -24
- package/dist/components/ui/collapsible.d.ts +0 -8
- package/dist/components/ui/collapsible.js +0 -24
- package/dist/components/ui/command.d.ts +0 -21
- package/dist/components/ui/command.js +0 -110
- package/dist/components/ui/context-menu.d.ts +0 -27
- package/dist/components/ui/context-menu.js +0 -158
- package/dist/components/ui/dialog.d.ts +0 -17
- package/dist/components/ui/dialog.js +0 -102
- package/dist/components/ui/drawer.d.ts +0 -15
- package/dist/components/ui/drawer.js +0 -97
- package/dist/components/ui/dropdown-menu.d.ts +0 -27
- package/dist/components/ui/dropdown-menu.js +0 -160
- package/dist/components/ui/form.d.ts +0 -26
- package/dist/components/ui/form.js +0 -125
- package/dist/components/ui/hover-card.d.ts +0 -8
- package/dist/components/ui/hover-card.js +0 -36
- package/dist/components/ui/input-otp.d.ts +0 -13
- package/dist/components/ui/input-otp.js +0 -61
- package/dist/components/ui/input.d.ts +0 -5
- package/dist/components/ui/input.js +0 -19
- package/dist/components/ui/label.d.ts +0 -6
- package/dist/components/ui/label.js +0 -18
- package/dist/components/ui/menubar.d.ts +0 -28
- package/dist/components/ui/menubar.js +0 -178
- package/dist/components/ui/navigation-menu.d.ts +0 -17
- package/dist/components/ui/navigation-menu.js +0 -102
- package/dist/components/ui/pagination.d.ts +0 -17
- package/dist/components/ui/pagination.js +0 -95
- package/dist/components/ui/popover.d.ts +0 -9
- package/dist/components/ui/popover.js +0 -40
- package/dist/components/ui/progress.d.ts +0 -6
- package/dist/components/ui/progress.js +0 -25
- package/dist/components/ui/radio-group.d.ts +0 -7
- package/dist/components/ui/radio-group.js +0 -34
- package/dist/components/ui/resizable.d.ts +0 -10
- package/dist/components/ui/resizable.js +0 -40
- package/dist/components/ui/scroll-area.d.ts +0 -7
- package/dist/components/ui/scroll-area.js +0 -37
- package/dist/components/ui/select.d.ts +0 -17
- package/dist/components/ui/select.js +0 -118
- package/dist/components/ui/separator.d.ts +0 -6
- package/dist/components/ui/separator.js +0 -22
- package/dist/components/ui/sheet.d.ts +0 -15
- package/dist/components/ui/sheet.js +0 -101
- package/dist/components/ui/sidebar.d.ts +0 -73
- package/dist/components/ui/sidebar.js +0 -484
- package/dist/components/ui/skeleton.d.ts +0 -5
- package/dist/components/ui/skeleton.js +0 -16
- package/dist/components/ui/slider.d.ts +0 -6
- package/dist/components/ui/slider.js +0 -39
- package/dist/components/ui/sonner.d.ts +0 -6
- package/dist/components/ui/sonner.js +0 -18
- package/dist/components/ui/switch.d.ts +0 -6
- package/dist/components/ui/switch.js +0 -21
- package/dist/components/ui/table.d.ts +0 -12
- package/dist/components/ui/table.js +0 -90
- package/dist/components/ui/tabs.d.ts +0 -9
- package/dist/components/ui/tabs.js +0 -48
- package/dist/components/ui/textarea.d.ts +0 -5
- package/dist/components/ui/textarea.js +0 -17
- package/dist/components/ui/toggle-group.d.ts +0 -10
- package/dist/components/ui/toggle-group.js +0 -52
- package/dist/components/ui/toggle.d.ts +0 -12
- package/dist/components/ui/toggle.js +0 -42
- package/dist/components/ui/tooltip.d.ts +0 -9
- package/dist/components/ui/tooltip.js +0 -45
- package/dist/index.d.ts +0 -61
- package/dist/index.js +0 -47
- package/dist/lib/utils.d.ts +0 -5
- package/dist/lib/utils.js +0 -8
- package/dist/node_modules/@date-fns/tz/date/index.js +0 -101
- package/dist/node_modules/@date-fns/tz/date/mini.js +0 -207
- package/dist/node_modules/@date-fns/tz/tzOffset/index.js +0 -43
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +0 -11
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -39
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +0 -79
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +0 -321
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -211
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -29
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -207
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +0 -15
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +0 -17
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +0 -130
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +0 -43
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +0 -89
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -12
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -70
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -18
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -7
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -137
- package/dist/node_modules/class-variance-authority/dist/index.js +0 -44
- package/dist/node_modules/clsx/dist/clsx.js +0 -3
- package/dist/node_modules/cmdk/dist/chunk-NZJY6EH4.js +0 -3
- package/dist/node_modules/cmdk/dist/index.js +0 -10
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +0 -7
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +0 -7
- package/dist/node_modules/date-fns/_lib/format/formatters.js +0 -775
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +0 -94
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +0 -66
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -31
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +0 -11
- package/dist/node_modules/date-fns/_lib/normalizeInterval.js +0 -8
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +0 -25
- package/dist/node_modules/date-fns/addDays.js +0 -41
- package/dist/node_modules/date-fns/addMonths.js +0 -75
- package/dist/node_modules/date-fns/addWeeks.js +0 -33
- package/dist/node_modules/date-fns/addYears.js +0 -33
- package/dist/node_modules/date-fns/constants.js +0 -46
- package/dist/node_modules/date-fns/constructFrom.js +0 -49
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +0 -62
- package/dist/node_modules/date-fns/differenceInCalendarMonths.js +0 -42
- package/dist/node_modules/date-fns/eachMonthOfInterval.js +0 -65
- package/dist/node_modules/date-fns/endOfISOWeek.js +0 -35
- package/dist/node_modules/date-fns/endOfMonth.js +0 -37
- package/dist/node_modules/date-fns/endOfWeek.js +0 -53
- package/dist/node_modules/date-fns/endOfYear.js +0 -37
- package/dist/node_modules/date-fns/format.js +0 -423
- package/dist/node_modules/date-fns/getDayOfYear.js +0 -34
- package/dist/node_modules/date-fns/getDaysInMonth.js +0 -36
- package/dist/node_modules/date-fns/getISOWeek.js +0 -40
- package/dist/node_modules/date-fns/getISOWeekYear.js +0 -52
- package/dist/node_modules/date-fns/getMonth.js +0 -29
- package/dist/node_modules/date-fns/getWeek.js +0 -54
- package/dist/node_modules/date-fns/getWeekYear.js +0 -75
- package/dist/node_modules/date-fns/getYear.js +0 -29
- package/dist/node_modules/date-fns/isAfter.js +0 -25
- package/dist/node_modules/date-fns/isBefore.js +0 -25
- package/dist/node_modules/date-fns/isDate.js +0 -41
- package/dist/node_modules/date-fns/isSameDay.js +0 -46
- package/dist/node_modules/date-fns/isSameMonth.js +0 -43
- package/dist/node_modules/date-fns/isSameYear.js +0 -35
- package/dist/node_modules/date-fns/isValid.js +0 -39
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -10
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -64
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -59
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -22
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -103
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -41
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -13
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -189
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +0 -134
- package/dist/node_modules/date-fns/locale/en-US.js +0 -28
- package/dist/node_modules/date-fns/max.js +0 -49
- package/dist/node_modules/date-fns/min.js +0 -49
- package/dist/node_modules/date-fns/setMonth.js +0 -46
- package/dist/node_modules/date-fns/setYear.js +0 -40
- package/dist/node_modules/date-fns/startOfDay.js +0 -35
- package/dist/node_modules/date-fns/startOfISOWeek.js +0 -35
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +0 -42
- package/dist/node_modules/date-fns/startOfMonth.js +0 -37
- package/dist/node_modules/date-fns/startOfWeek.js +0 -53
- package/dist/node_modules/date-fns/startOfWeekYear.js +0 -64
- package/dist/node_modules/date-fns/startOfYear.js +0 -36
- package/dist/node_modules/date-fns/toDate.js +0 -46
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +0 -1669
- package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +0 -37
- package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +0 -38
- package/dist/node_modules/get-nonce/dist/es2015/index.js +0 -8
- package/dist/node_modules/input-otp/dist/index.js +0 -24
- package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +0 -285
- package/dist/node_modules/react-day-picker/dist/esm/UI.js +0 -122
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +0 -30
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +0 -522
- package/dist/node_modules/react-day-picker/dist/esm/components/Button.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/components/Day.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown.js +0 -21
- package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Footer.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Month.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Months.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js +0 -31
- package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/components/Option.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/components/Root.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/components/Select.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Week.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekday.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/components/Weeks.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/components/custom-components.js +0 -26
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +0 -25
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +0 -21
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +0 -23
- package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +0 -73
- package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +0 -95
- package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +0 -22
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +0 -28
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +0 -33
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +0 -20
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +0 -27
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js +0 -51
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +0 -33
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +0 -24
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +0 -46
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +0 -24
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +0 -28
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +0 -33
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +0 -69
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +0 -51
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +0 -39
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +0 -36
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +0 -37
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +0 -27
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +0 -24
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +0 -38
- package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +0 -27
- package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +0 -31
- package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +0 -11
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +0 -32
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +0 -24
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +0 -22
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js +0 -57
- package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js +0 -45
- package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js +0 -44
- package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +0 -175
- package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +0 -85
- package/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js +0 -25
- package/dist/node_modules/react-day-picker/dist/esm/useFocus.js +0 -50
- package/dist/node_modules/react-day-picker/dist/esm/useSelection.js +0 -31
- package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +0 -92
- package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +0 -62
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +0 -30
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +0 -74
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +0 -35
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +0 -21
- package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards.js +0 -66
- package/dist/node_modules/react-hook-form/dist/index.esm.js +0 -507
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -9
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -160
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -38
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -21
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -110
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -56
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -10
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -31
- package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.js +0 -2407
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +0 -19
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +0 -25
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -51
- package/dist/node_modules/sonner/dist/index.js +0 -1125
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -2956
- package/dist/node_modules/tslib/tslib.es6.js +0 -56
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -24
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -48
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -42
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +0 -21
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +0 -77
- package/dist/node_modules/vaul/dist/index.js +0 -1627
- package/dist/styles.css +0 -1
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/******************************************************************************
|
|
2
|
-
Copyright (c) Microsoft Corporation.
|
|
3
|
-
|
|
4
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
-
purpose with or without fee is hereby granted.
|
|
6
|
-
|
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
-
***************************************************************************** */
|
|
15
|
-
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var __assign = function() {
|
|
19
|
-
__assign = Object.assign || function __assign(t) {
|
|
20
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
21
|
-
s = arguments[i];
|
|
22
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
function __rest(s, e) {
|
|
30
|
-
var t = {};
|
|
31
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
32
|
-
t[p] = s[p];
|
|
33
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
34
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
35
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
36
|
-
t[p[i]] = s[p[i]];
|
|
37
|
-
}
|
|
38
|
-
return t;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function __spreadArray(to, from, pack) {
|
|
42
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
43
|
-
if (ar || !(i in from)) {
|
|
44
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
45
|
-
ar[i] = from[i];
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
52
|
-
var e = new Error(message);
|
|
53
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export { __assign, __rest, __spreadArray };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Assigns a value for a given ref, no matter of the ref format
|
|
3
|
-
* @param {RefObject} ref - a callback function or ref object
|
|
4
|
-
* @param value - a new value
|
|
5
|
-
*
|
|
6
|
-
* @see https://github.com/theKashey/use-callback-ref#assignref
|
|
7
|
-
* @example
|
|
8
|
-
* const refObject = useRef();
|
|
9
|
-
* const refFn = (ref) => {....}
|
|
10
|
-
*
|
|
11
|
-
* assignRef(refObject, "refValue");
|
|
12
|
-
* assignRef(refFn, "refValue");
|
|
13
|
-
*/
|
|
14
|
-
function assignRef(ref, value) {
|
|
15
|
-
if (typeof ref === 'function') {
|
|
16
|
-
ref(value);
|
|
17
|
-
}
|
|
18
|
-
else if (ref) {
|
|
19
|
-
ref.current = value;
|
|
20
|
-
}
|
|
21
|
-
return ref;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { assignRef };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { assignRef } from './assignRef.js';
|
|
3
|
-
import { useCallbackRef } from './useRef.js';
|
|
4
|
-
|
|
5
|
-
var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
6
|
-
var currentValues = new WeakMap();
|
|
7
|
-
/**
|
|
8
|
-
* Merges two or more refs together providing a single interface to set their value
|
|
9
|
-
* @param {RefObject|Ref} refs
|
|
10
|
-
* @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
|
|
11
|
-
*
|
|
12
|
-
* @see {@link mergeRefs} a version without buit-in memoization
|
|
13
|
-
* @see https://github.com/theKashey/use-callback-ref#usemergerefs
|
|
14
|
-
* @example
|
|
15
|
-
* const Component = React.forwardRef((props, ref) => {
|
|
16
|
-
* const ownRef = useRef();
|
|
17
|
-
* const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together
|
|
18
|
-
* return <div ref={domRef}>...</div>
|
|
19
|
-
* }
|
|
20
|
-
*/
|
|
21
|
-
function useMergeRefs(refs, defaultValue) {
|
|
22
|
-
var callbackRef = useCallbackRef(null, function (newValue) {
|
|
23
|
-
return refs.forEach(function (ref) { return assignRef(ref, newValue); });
|
|
24
|
-
});
|
|
25
|
-
// handle refs changes - added or removed
|
|
26
|
-
useIsomorphicLayoutEffect(function () {
|
|
27
|
-
var oldValue = currentValues.get(callbackRef);
|
|
28
|
-
if (oldValue) {
|
|
29
|
-
var prevRefs_1 = new Set(oldValue);
|
|
30
|
-
var nextRefs_1 = new Set(refs);
|
|
31
|
-
var current_1 = callbackRef.current;
|
|
32
|
-
prevRefs_1.forEach(function (ref) {
|
|
33
|
-
if (!nextRefs_1.has(ref)) {
|
|
34
|
-
assignRef(ref, null);
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
nextRefs_1.forEach(function (ref) {
|
|
38
|
-
if (!prevRefs_1.has(ref)) {
|
|
39
|
-
assignRef(ref, current_1);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
currentValues.set(callbackRef, refs);
|
|
44
|
-
}, [refs]);
|
|
45
|
-
return callbackRef;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export { useMergeRefs };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* creates a MutableRef with ref change callback
|
|
5
|
-
* @param initialValue - initial ref value
|
|
6
|
-
* @param {Function} callback - a callback to run when value changes
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);
|
|
10
|
-
* ref.current = 1;
|
|
11
|
-
* // prints 0 -> 1
|
|
12
|
-
*
|
|
13
|
-
* @see https://reactjs.org/docs/hooks-reference.html#useref
|
|
14
|
-
* @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
|
|
15
|
-
* @returns {MutableRefObject}
|
|
16
|
-
*/
|
|
17
|
-
function useCallbackRef(initialValue, callback) {
|
|
18
|
-
var ref = useState(function () { return ({
|
|
19
|
-
// value
|
|
20
|
-
value: initialValue,
|
|
21
|
-
// last callback
|
|
22
|
-
callback: callback,
|
|
23
|
-
// "memoized" public interface
|
|
24
|
-
facade: {
|
|
25
|
-
get current() {
|
|
26
|
-
return ref.value;
|
|
27
|
-
},
|
|
28
|
-
set current(value) {
|
|
29
|
-
var last = ref.value;
|
|
30
|
-
if (last !== value) {
|
|
31
|
-
ref.value = value;
|
|
32
|
-
ref.callback(value, last);
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
}); })[0];
|
|
37
|
-
// update callback
|
|
38
|
-
ref.callback = callback;
|
|
39
|
-
return ref.facade;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { useCallbackRef };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { __rest, __assign } from '../../../tslib/tslib.es6.js';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
var SideCar = function (_a) {
|
|
5
|
-
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
6
|
-
if (!sideCar) {
|
|
7
|
-
throw new Error('Sidecar: please provide `sideCar` property to import the right car');
|
|
8
|
-
}
|
|
9
|
-
var Target = sideCar.read();
|
|
10
|
-
if (!Target) {
|
|
11
|
-
throw new Error('Sidecar medium not found');
|
|
12
|
-
}
|
|
13
|
-
return React.createElement(Target, __assign({}, rest));
|
|
14
|
-
};
|
|
15
|
-
SideCar.isSideCarExport = true;
|
|
16
|
-
function exportSidecar(medium, exported) {
|
|
17
|
-
medium.useMedium(exported);
|
|
18
|
-
return SideCar;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { exportSidecar };
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { __assign } from '../../../tslib/tslib.es6.js';
|
|
2
|
-
|
|
3
|
-
function ItoI(a) {
|
|
4
|
-
return a;
|
|
5
|
-
}
|
|
6
|
-
function innerCreateMedium(defaults, middleware) {
|
|
7
|
-
if (middleware === void 0) { middleware = ItoI; }
|
|
8
|
-
var buffer = [];
|
|
9
|
-
var assigned = false;
|
|
10
|
-
var medium = {
|
|
11
|
-
read: function () {
|
|
12
|
-
if (assigned) {
|
|
13
|
-
throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');
|
|
14
|
-
}
|
|
15
|
-
if (buffer.length) {
|
|
16
|
-
return buffer[buffer.length - 1];
|
|
17
|
-
}
|
|
18
|
-
return defaults;
|
|
19
|
-
},
|
|
20
|
-
useMedium: function (data) {
|
|
21
|
-
var item = middleware(data, assigned);
|
|
22
|
-
buffer.push(item);
|
|
23
|
-
return function () {
|
|
24
|
-
buffer = buffer.filter(function (x) { return x !== item; });
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
assignSyncMedium: function (cb) {
|
|
28
|
-
assigned = true;
|
|
29
|
-
while (buffer.length) {
|
|
30
|
-
var cbs = buffer;
|
|
31
|
-
buffer = [];
|
|
32
|
-
cbs.forEach(cb);
|
|
33
|
-
}
|
|
34
|
-
buffer = {
|
|
35
|
-
push: function (x) { return cb(x); },
|
|
36
|
-
filter: function () { return buffer; },
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
|
-
assignMedium: function (cb) {
|
|
40
|
-
assigned = true;
|
|
41
|
-
var pendingQueue = [];
|
|
42
|
-
if (buffer.length) {
|
|
43
|
-
var cbs = buffer;
|
|
44
|
-
buffer = [];
|
|
45
|
-
cbs.forEach(cb);
|
|
46
|
-
pendingQueue = buffer;
|
|
47
|
-
}
|
|
48
|
-
var executeQueue = function () {
|
|
49
|
-
var cbs = pendingQueue;
|
|
50
|
-
pendingQueue = [];
|
|
51
|
-
cbs.forEach(cb);
|
|
52
|
-
};
|
|
53
|
-
var cycle = function () { return Promise.resolve().then(executeQueue); };
|
|
54
|
-
cycle();
|
|
55
|
-
buffer = {
|
|
56
|
-
push: function (x) {
|
|
57
|
-
pendingQueue.push(x);
|
|
58
|
-
cycle();
|
|
59
|
-
},
|
|
60
|
-
filter: function (filter) {
|
|
61
|
-
pendingQueue = pendingQueue.filter(filter);
|
|
62
|
-
return buffer;
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
return medium;
|
|
68
|
-
}
|
|
69
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
70
|
-
function createSidecarMedium(options) {
|
|
71
|
-
if (options === void 0) { options = {}; }
|
|
72
|
-
var medium = innerCreateMedium(null);
|
|
73
|
-
medium.options = __assign({ async: true, ssr: false }, options);
|
|
74
|
-
return medium;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export { createSidecarMedium };
|