@zimyo/ui 1.0.2 → 1.1.1
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/Accordion/index.d.ts +34 -0
- package/dist/Accordion/index.esm.js +129 -0
- package/dist/Accordion/index.js +137 -0
- package/dist/Button/index.d.ts +15 -0
- package/dist/Button/index.esm.js +23 -0
- package/dist/Button/index.js +28 -0
- package/dist/Card/index.d.ts +41 -0
- package/dist/Card/index.esm.js +36 -0
- package/dist/Card/index.js +38 -0
- package/dist/Popover/index.d.ts +19 -0
- package/dist/Popover/index.esm.js +22 -0
- package/dist/Popover/index.js +27 -0
- package/dist/RadioGroup/index.d.ts +31 -0
- package/dist/RadioGroup/index.esm.js +92 -0
- package/dist/RadioGroup/index.js +97 -0
- package/dist/Typography/index.d.ts +30 -0
- package/dist/Typography/index.esm.js +57 -0
- package/dist/Typography/index.js +66 -0
- package/package.json +106 -83
- package/dist/components/index.d.ts +0 -60
- package/dist/components/ui/accordion.d.ts +0 -10
- package/dist/components/ui/accordion.js +0 -58
- package/dist/components/ui/alert-dialog.d.ts +0 -17
- package/dist/components/ui/alert-dialog.js +0 -108
- package/dist/components/ui/alert.d.ts +0 -13
- package/dist/components/ui/alert.js +0 -52
- 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 -9
- package/dist/components/ui/avatar.js +0 -37
- package/dist/components/ui/badge.d.ts +0 -13
- package/dist/components/ui/badge.js +0 -36
- package/dist/components/ui/breadcrumb.d.ts +0 -14
- package/dist/components/ui/breadcrumb.js +0 -94
- package/dist/components/ui/button.d.ts +0 -14
- package/dist/components/ui/button.js +0 -48
- package/dist/components/ui/calendar.d.ts +0 -13
- package/dist/components/ui/calendar.js +0 -137
- package/dist/components/ui/card.d.ts +0 -12
- package/dist/components/ui/card.js +0 -76
- package/dist/components/ui/carousel.d.ts +0 -25
- package/dist/components/ui/carousel.js +0 -173
- package/dist/components/ui/chart.d.ts +0 -44
- package/dist/components/ui/chart.js +0 -203
- package/dist/components/ui/checkbox.d.ts +0 -7
- package/dist/components/ui/checkbox.js +0 -26
- 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 -22
- package/dist/components/ui/command.js +0 -119
- package/dist/components/ui/context-menu.d.ts +0 -28
- package/dist/components/ui/context-menu.js +0 -171
- package/dist/components/ui/dialog.d.ts +0 -18
- package/dist/components/ui/dialog.js +0 -106
- package/dist/components/ui/drawer.d.ts +0 -16
- package/dist/components/ui/drawer.js +0 -99
- package/dist/components/ui/dropdown-menu.d.ts +0 -28
- package/dist/components/ui/dropdown-menu.js +0 -173
- package/dist/components/ui/form.d.ts +0 -27
- package/dist/components/ui/form.js +0 -129
- package/dist/components/ui/hover-card.d.ts +0 -9
- package/dist/components/ui/hover-card.js +0 -36
- package/dist/components/ui/input-otp.d.ts +0 -14
- package/dist/components/ui/input-otp.js +0 -66
- package/dist/components/ui/input.d.ts +0 -6
- package/dist/components/ui/input.js +0 -18
- package/dist/components/ui/label.d.ts +0 -7
- package/dist/components/ui/label.js +0 -17
- package/dist/components/ui/menubar.d.ts +0 -29
- package/dist/components/ui/menubar.js +0 -191
- package/dist/components/ui/navigation-menu.d.ts +0 -18
- package/dist/components/ui/navigation-menu.js +0 -108
- package/dist/components/ui/pagination.d.ts +0 -18
- package/dist/components/ui/pagination.js +0 -103
- package/dist/components/ui/popover.d.ts +0 -10
- package/dist/components/ui/popover.js +0 -41
- package/dist/components/ui/progress.d.ts +0 -7
- package/dist/components/ui/progress.js +0 -26
- package/dist/components/ui/radio-group.d.ts +0 -8
- package/dist/components/ui/radio-group.js +0 -36
- package/dist/components/ui/resizable.d.ts +0 -11
- package/dist/components/ui/resizable.js +0 -42
- package/dist/components/ui/scroll-area.d.ts +0 -8
- package/dist/components/ui/scroll-area.js +0 -41
- package/dist/components/ui/select.d.ts +0 -18
- package/dist/components/ui/select.js +0 -136
- package/dist/components/ui/separator.d.ts +0 -7
- package/dist/components/ui/separator.js +0 -21
- package/dist/components/ui/sheet.d.ts +0 -16
- package/dist/components/ui/sheet.js +0 -106
- package/dist/components/ui/sidebar.d.ts +0 -74
- package/dist/components/ui/sidebar.js +0 -511
- 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 -7
- package/dist/components/ui/slider.js +0 -41
- 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 -7
- package/dist/components/ui/switch.js +0 -22
- package/dist/components/ui/table.d.ts +0 -13
- package/dist/components/ui/table.js +0 -90
- package/dist/components/ui/tabs.d.ts +0 -10
- package/dist/components/ui/tabs.js +0 -47
- package/dist/components/ui/textarea.d.ts +0 -6
- package/dist/components/ui/textarea.js +0 -16
- package/dist/components/ui/toggle-group.d.ts +0 -11
- package/dist/components/ui/toggle-group.js +0 -57
- package/dist/components/ui/toggle.d.ts +0 -13
- package/dist/components/ui/toggle.js +0 -41
- package/dist/components/ui/tooltip.d.ts +0 -10
- package/dist/components/ui/tooltip.js +0 -50
- package/dist/index.d.ts +0 -63
- package/dist/index.js +0 -48
- 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/providers/ThemeProvider.d.ts +0 -12
- package/dist/providers/ThemeProvider.js +0 -27
- package/dist/providers/index.d.ts +0 -3
- package/dist/styles.css +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AccordionProps as AccordionProps$1, AccordionSummaryProps, AccordionDetailsProps } from '@mui/material';
|
|
3
|
+
import { SxProps } from '@mui/system';
|
|
4
|
+
|
|
5
|
+
interface AccordionProps extends Omit<AccordionProps$1, 'sx' | 'onChange' | 'expanded'> {
|
|
6
|
+
type?: 'single' | 'multiple';
|
|
7
|
+
collapsible?: boolean;
|
|
8
|
+
value?: string | string[];
|
|
9
|
+
defaultValue?: string | string[];
|
|
10
|
+
onValueChange?: (value: string | string[]) => void;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
sx?: SxProps;
|
|
13
|
+
}
|
|
14
|
+
interface AccordionItemProps extends Omit<AccordionProps$1, 'sx'> {
|
|
15
|
+
value: string;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
sx?: SxProps;
|
|
18
|
+
}
|
|
19
|
+
interface AccordionTriggerProps extends Omit<AccordionSummaryProps, 'sx'> {
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
sx?: SxProps;
|
|
22
|
+
expandIcon?: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
interface AccordionContentProps extends Omit<AccordionDetailsProps, 'sx'> {
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
sx?: SxProps;
|
|
27
|
+
}
|
|
28
|
+
declare const Accordion: React.ForwardRefExoticComponent<Omit<AccordionProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionTriggerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
+
|
|
33
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Accordion as default };
|
|
34
|
+
export type { AccordionContentProps, AccordionItemProps, AccordionProps, AccordionTriggerProps };
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useTheme, Accordion as Accordion$1, AccordionSummary, AccordionDetails } from '@mui/material';
|
|
4
|
+
import { createSvgIcon } from '@mui/material/utils';
|
|
5
|
+
|
|
6
|
+
var ExpandMoreIcon = createSvgIcon(/*#__PURE__*/jsx("path", {
|
|
7
|
+
d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
|
|
8
|
+
}), 'ExpandMore');
|
|
9
|
+
|
|
10
|
+
const AccordionContext = React.createContext({});
|
|
11
|
+
// Main Accordion Container Component
|
|
12
|
+
const Accordion = React.forwardRef(({ type = 'single', collapsible = false, value: controlledValue, defaultValue, onValueChange, children, sx = {}, ...props }, ref) => {
|
|
13
|
+
const theme = useTheme();
|
|
14
|
+
// Internal state management
|
|
15
|
+
const [internalValue, setInternalValue] = React.useState(() => {
|
|
16
|
+
if (controlledValue !== undefined)
|
|
17
|
+
return controlledValue;
|
|
18
|
+
if (defaultValue !== undefined)
|
|
19
|
+
return defaultValue;
|
|
20
|
+
return type === 'multiple' ? [] : '';
|
|
21
|
+
});
|
|
22
|
+
const value = controlledValue !== undefined ? controlledValue : internalValue;
|
|
23
|
+
const handleValueChange = React.useCallback((newValue) => {
|
|
24
|
+
if (controlledValue === undefined) {
|
|
25
|
+
setInternalValue(newValue);
|
|
26
|
+
}
|
|
27
|
+
onValueChange?.(newValue);
|
|
28
|
+
}, [controlledValue, onValueChange]);
|
|
29
|
+
const contextValue = React.useMemo(() => ({
|
|
30
|
+
type,
|
|
31
|
+
collapsible,
|
|
32
|
+
value,
|
|
33
|
+
defaultValue,
|
|
34
|
+
onValueChange: handleValueChange,
|
|
35
|
+
}), [type, collapsible, value, defaultValue, handleValueChange]);
|
|
36
|
+
return (jsx(AccordionContext.Provider, { value: contextValue, children: jsx("div", { ref: ref, style: {
|
|
37
|
+
display: 'flex',
|
|
38
|
+
flexDirection: 'column',
|
|
39
|
+
gap: theme.spacing(1),
|
|
40
|
+
}, ...props, children: children }) }));
|
|
41
|
+
});
|
|
42
|
+
// AccordionItem Component
|
|
43
|
+
const AccordionItem = React.forwardRef(({ value: itemValue, children, sx = {}, ...props }, ref) => {
|
|
44
|
+
const theme = useTheme();
|
|
45
|
+
const context = React.useContext(AccordionContext);
|
|
46
|
+
const isExpanded = React.useMemo(() => {
|
|
47
|
+
if (context.type === 'multiple') {
|
|
48
|
+
return Array.isArray(context.value) && context.value.includes(itemValue);
|
|
49
|
+
}
|
|
50
|
+
return context.value === itemValue;
|
|
51
|
+
}, [context.value, context.type, itemValue]);
|
|
52
|
+
const handleChange = React.useCallback(() => {
|
|
53
|
+
if (!context.onValueChange)
|
|
54
|
+
return;
|
|
55
|
+
if (context.type === 'multiple') {
|
|
56
|
+
const currentValue = Array.isArray(context.value) ? context.value : [];
|
|
57
|
+
const newValue = isExpanded
|
|
58
|
+
? currentValue.filter(v => v !== itemValue)
|
|
59
|
+
: [...currentValue, itemValue];
|
|
60
|
+
context.onValueChange(newValue);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
const newValue = isExpanded && context.collapsible ? '' : itemValue;
|
|
64
|
+
context.onValueChange(newValue);
|
|
65
|
+
}
|
|
66
|
+
}, [context, itemValue, isExpanded]);
|
|
67
|
+
return (jsx(Accordion$1, { ref: ref, expanded: isExpanded, onChange: handleChange, variant: "outlined", sx: {
|
|
68
|
+
borderRadius: theme.radius?.sm || theme.shape.borderRadius,
|
|
69
|
+
'&:before': {
|
|
70
|
+
display: 'none',
|
|
71
|
+
},
|
|
72
|
+
'&.Mui-expanded': {
|
|
73
|
+
margin: 0,
|
|
74
|
+
},
|
|
75
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
76
|
+
...sx,
|
|
77
|
+
}, ...props, children: children }));
|
|
78
|
+
});
|
|
79
|
+
// AccordionTrigger Component
|
|
80
|
+
const AccordionTrigger = React.forwardRef(({ children, sx = {}, expandIcon, ...props }, ref) => {
|
|
81
|
+
const theme = useTheme();
|
|
82
|
+
const defaultExpandIcon = expandIcon !== undefined ? expandIcon : jsx(ExpandMoreIcon, {});
|
|
83
|
+
return (jsx(AccordionSummary, { ref: ref, expandIcon: defaultExpandIcon, sx: {
|
|
84
|
+
borderRadius: theme.radius?.sm || theme.shape.borderRadius,
|
|
85
|
+
minHeight: 56,
|
|
86
|
+
fontWeight: 500,
|
|
87
|
+
'&.Mui-expanded': {
|
|
88
|
+
minHeight: 56,
|
|
89
|
+
borderBottomLeftRadius: 0,
|
|
90
|
+
borderBottomRightRadius: 0,
|
|
91
|
+
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
92
|
+
},
|
|
93
|
+
'& .MuiAccordionSummary-content': {
|
|
94
|
+
margin: '12px 0',
|
|
95
|
+
'&.Mui-expanded': {
|
|
96
|
+
margin: '12px 0',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
'& .MuiAccordionSummary-expandIconWrapper': {
|
|
100
|
+
transition: theme.transitions.create('transform', {
|
|
101
|
+
duration: theme.transitions.duration.shortest,
|
|
102
|
+
}),
|
|
103
|
+
'&.Mui-expanded': {
|
|
104
|
+
transform: 'rotate(180deg)',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
'&:hover': {
|
|
108
|
+
backgroundColor: theme.palette.action.hover,
|
|
109
|
+
},
|
|
110
|
+
...sx,
|
|
111
|
+
}, ...props, children: children }));
|
|
112
|
+
});
|
|
113
|
+
// AccordionContent Component
|
|
114
|
+
const AccordionContent = React.forwardRef(({ children, sx = {}, ...props }, ref) => {
|
|
115
|
+
const theme = useTheme();
|
|
116
|
+
return (jsx(AccordionDetails, { ref: ref, sx: {
|
|
117
|
+
padding: theme.spacing(2),
|
|
118
|
+
borderBottomLeftRadius: theme.radius?.sm || theme.shape.borderRadius,
|
|
119
|
+
borderBottomRightRadius: theme.radius?.sm || theme.shape.borderRadius,
|
|
120
|
+
...sx,
|
|
121
|
+
}, ...props, children: children }));
|
|
122
|
+
});
|
|
123
|
+
// Set display names
|
|
124
|
+
Accordion.displayName = 'Accordion';
|
|
125
|
+
AccordionItem.displayName = 'AccordionItem';
|
|
126
|
+
AccordionTrigger.displayName = 'AccordionTrigger';
|
|
127
|
+
AccordionContent.displayName = 'AccordionContent';
|
|
128
|
+
|
|
129
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Accordion as default };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var material = require('@mui/material');
|
|
8
|
+
var utils = require('@mui/material/utils');
|
|
9
|
+
|
|
10
|
+
var ExpandMoreIcon = utils.createSvgIcon(/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
11
|
+
d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
|
|
12
|
+
}), 'ExpandMore');
|
|
13
|
+
|
|
14
|
+
const AccordionContext = React.createContext({});
|
|
15
|
+
// Main Accordion Container Component
|
|
16
|
+
const Accordion = React.forwardRef(({ type = 'single', collapsible = false, value: controlledValue, defaultValue, onValueChange, children, sx = {}, ...props }, ref) => {
|
|
17
|
+
const theme = material.useTheme();
|
|
18
|
+
// Internal state management
|
|
19
|
+
const [internalValue, setInternalValue] = React.useState(() => {
|
|
20
|
+
if (controlledValue !== undefined)
|
|
21
|
+
return controlledValue;
|
|
22
|
+
if (defaultValue !== undefined)
|
|
23
|
+
return defaultValue;
|
|
24
|
+
return type === 'multiple' ? [] : '';
|
|
25
|
+
});
|
|
26
|
+
const value = controlledValue !== undefined ? controlledValue : internalValue;
|
|
27
|
+
const handleValueChange = React.useCallback((newValue) => {
|
|
28
|
+
if (controlledValue === undefined) {
|
|
29
|
+
setInternalValue(newValue);
|
|
30
|
+
}
|
|
31
|
+
onValueChange?.(newValue);
|
|
32
|
+
}, [controlledValue, onValueChange]);
|
|
33
|
+
const contextValue = React.useMemo(() => ({
|
|
34
|
+
type,
|
|
35
|
+
collapsible,
|
|
36
|
+
value,
|
|
37
|
+
defaultValue,
|
|
38
|
+
onValueChange: handleValueChange,
|
|
39
|
+
}), [type, collapsible, value, defaultValue, handleValueChange]);
|
|
40
|
+
return (jsxRuntime.jsx(AccordionContext.Provider, { value: contextValue, children: jsxRuntime.jsx("div", { ref: ref, style: {
|
|
41
|
+
display: 'flex',
|
|
42
|
+
flexDirection: 'column',
|
|
43
|
+
gap: theme.spacing(1),
|
|
44
|
+
}, ...props, children: children }) }));
|
|
45
|
+
});
|
|
46
|
+
// AccordionItem Component
|
|
47
|
+
const AccordionItem = React.forwardRef(({ value: itemValue, children, sx = {}, ...props }, ref) => {
|
|
48
|
+
const theme = material.useTheme();
|
|
49
|
+
const context = React.useContext(AccordionContext);
|
|
50
|
+
const isExpanded = React.useMemo(() => {
|
|
51
|
+
if (context.type === 'multiple') {
|
|
52
|
+
return Array.isArray(context.value) && context.value.includes(itemValue);
|
|
53
|
+
}
|
|
54
|
+
return context.value === itemValue;
|
|
55
|
+
}, [context.value, context.type, itemValue]);
|
|
56
|
+
const handleChange = React.useCallback(() => {
|
|
57
|
+
if (!context.onValueChange)
|
|
58
|
+
return;
|
|
59
|
+
if (context.type === 'multiple') {
|
|
60
|
+
const currentValue = Array.isArray(context.value) ? context.value : [];
|
|
61
|
+
const newValue = isExpanded
|
|
62
|
+
? currentValue.filter(v => v !== itemValue)
|
|
63
|
+
: [...currentValue, itemValue];
|
|
64
|
+
context.onValueChange(newValue);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
const newValue = isExpanded && context.collapsible ? '' : itemValue;
|
|
68
|
+
context.onValueChange(newValue);
|
|
69
|
+
}
|
|
70
|
+
}, [context, itemValue, isExpanded]);
|
|
71
|
+
return (jsxRuntime.jsx(material.Accordion, { ref: ref, expanded: isExpanded, onChange: handleChange, variant: "outlined", sx: {
|
|
72
|
+
borderRadius: theme.radius?.sm || theme.shape.borderRadius,
|
|
73
|
+
'&:before': {
|
|
74
|
+
display: 'none',
|
|
75
|
+
},
|
|
76
|
+
'&.Mui-expanded': {
|
|
77
|
+
margin: 0,
|
|
78
|
+
},
|
|
79
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
80
|
+
...sx,
|
|
81
|
+
}, ...props, children: children }));
|
|
82
|
+
});
|
|
83
|
+
// AccordionTrigger Component
|
|
84
|
+
const AccordionTrigger = React.forwardRef(({ children, sx = {}, expandIcon, ...props }, ref) => {
|
|
85
|
+
const theme = material.useTheme();
|
|
86
|
+
const defaultExpandIcon = expandIcon !== undefined ? expandIcon : jsxRuntime.jsx(ExpandMoreIcon, {});
|
|
87
|
+
return (jsxRuntime.jsx(material.AccordionSummary, { ref: ref, expandIcon: defaultExpandIcon, sx: {
|
|
88
|
+
borderRadius: theme.radius?.sm || theme.shape.borderRadius,
|
|
89
|
+
minHeight: 56,
|
|
90
|
+
fontWeight: 500,
|
|
91
|
+
'&.Mui-expanded': {
|
|
92
|
+
minHeight: 56,
|
|
93
|
+
borderBottomLeftRadius: 0,
|
|
94
|
+
borderBottomRightRadius: 0,
|
|
95
|
+
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
96
|
+
},
|
|
97
|
+
'& .MuiAccordionSummary-content': {
|
|
98
|
+
margin: '12px 0',
|
|
99
|
+
'&.Mui-expanded': {
|
|
100
|
+
margin: '12px 0',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
'& .MuiAccordionSummary-expandIconWrapper': {
|
|
104
|
+
transition: theme.transitions.create('transform', {
|
|
105
|
+
duration: theme.transitions.duration.shortest,
|
|
106
|
+
}),
|
|
107
|
+
'&.Mui-expanded': {
|
|
108
|
+
transform: 'rotate(180deg)',
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
'&:hover': {
|
|
112
|
+
backgroundColor: theme.palette.action.hover,
|
|
113
|
+
},
|
|
114
|
+
...sx,
|
|
115
|
+
}, ...props, children: children }));
|
|
116
|
+
});
|
|
117
|
+
// AccordionContent Component
|
|
118
|
+
const AccordionContent = React.forwardRef(({ children, sx = {}, ...props }, ref) => {
|
|
119
|
+
const theme = material.useTheme();
|
|
120
|
+
return (jsxRuntime.jsx(material.AccordionDetails, { ref: ref, sx: {
|
|
121
|
+
padding: theme.spacing(2),
|
|
122
|
+
borderBottomLeftRadius: theme.radius?.sm || theme.shape.borderRadius,
|
|
123
|
+
borderBottomRightRadius: theme.radius?.sm || theme.shape.borderRadius,
|
|
124
|
+
...sx,
|
|
125
|
+
}, ...props, children: children }));
|
|
126
|
+
});
|
|
127
|
+
// Set display names
|
|
128
|
+
Accordion.displayName = 'Accordion';
|
|
129
|
+
AccordionItem.displayName = 'AccordionItem';
|
|
130
|
+
AccordionTrigger.displayName = 'AccordionTrigger';
|
|
131
|
+
AccordionContent.displayName = 'AccordionContent';
|
|
132
|
+
|
|
133
|
+
exports.Accordion = Accordion;
|
|
134
|
+
exports.AccordionContent = AccordionContent;
|
|
135
|
+
exports.AccordionItem = AccordionItem;
|
|
136
|
+
exports.AccordionTrigger = AccordionTrigger;
|
|
137
|
+
exports.default = Accordion;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps as ButtonProps$1 } from '@mui/material';
|
|
3
|
+
import { SxProps } from '@mui/system';
|
|
4
|
+
|
|
5
|
+
interface ButtonProps extends Omit<ButtonProps$1, 'sx'> {
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
loadingText?: string;
|
|
8
|
+
sx?: SxProps;
|
|
9
|
+
loaderSize?: number;
|
|
10
|
+
loaderPosition?: 'start' | 'end' | 'center';
|
|
11
|
+
}
|
|
12
|
+
declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
|
|
14
|
+
export { Button, Button as default };
|
|
15
|
+
export type { ButtonProps };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useTheme, Button as Button$1, CircularProgress } from '@mui/material';
|
|
4
|
+
|
|
5
|
+
const Button = React.forwardRef(({ children, loading = false, loadingText, loaderSize = 18, loaderPosition = 'start', variant = 'contained', color = 'primary', size = 'medium', sx = {}, disabled, startIcon, endIcon, ...props }, ref) => {
|
|
6
|
+
const theme = useTheme();
|
|
7
|
+
const showStartSpinner = loading && loaderPosition === 'start';
|
|
8
|
+
const showEndSpinner = loading && loaderPosition === 'end';
|
|
9
|
+
const showCenterSpinner = loading && loaderPosition === 'center';
|
|
10
|
+
return (jsx(Button$1, { ref: ref, variant: variant, color: color, size: size, disabled: disabled || loading, startIcon: showStartSpinner ? (jsx(CircularProgress, { size: loaderSize, color: "inherit" })) : (startIcon), endIcon: showEndSpinner ? (jsx(CircularProgress, { size: loaderSize, color: "inherit" })) : (endIcon), sx: {
|
|
11
|
+
borderRadius: theme.radius.sm,
|
|
12
|
+
fontWeight: 500,
|
|
13
|
+
textTransform: 'none',
|
|
14
|
+
letterSpacing: '0.5px',
|
|
15
|
+
px: size === 'small' ? 1.5 : size === 'large' ? 3 : 2,
|
|
16
|
+
py: size === 'small' ? 0.5 : size === 'large' ? 1.5 : 1,
|
|
17
|
+
position: 'relative',
|
|
18
|
+
...sx,
|
|
19
|
+
}, ...props, children: showCenterSpinner ? (jsx(CircularProgress, { size: loaderSize, color: "inherit" })) : loading && loadingText ? (loadingText) : (children) }));
|
|
20
|
+
});
|
|
21
|
+
Button.displayName = 'Button';
|
|
22
|
+
|
|
23
|
+
export { Button, Button as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var material = require('@mui/material');
|
|
8
|
+
|
|
9
|
+
const Button = React.forwardRef(({ children, loading = false, loadingText, loaderSize = 18, loaderPosition = 'start', variant = 'contained', color = 'primary', size = 'medium', sx = {}, disabled, startIcon, endIcon, ...props }, ref) => {
|
|
10
|
+
const theme = material.useTheme();
|
|
11
|
+
const showStartSpinner = loading && loaderPosition === 'start';
|
|
12
|
+
const showEndSpinner = loading && loaderPosition === 'end';
|
|
13
|
+
const showCenterSpinner = loading && loaderPosition === 'center';
|
|
14
|
+
return (jsxRuntime.jsx(material.Button, { ref: ref, variant: variant, color: color, size: size, disabled: disabled || loading, startIcon: showStartSpinner ? (jsxRuntime.jsx(material.CircularProgress, { size: loaderSize, color: "inherit" })) : (startIcon), endIcon: showEndSpinner ? (jsxRuntime.jsx(material.CircularProgress, { size: loaderSize, color: "inherit" })) : (endIcon), sx: {
|
|
15
|
+
borderRadius: theme.radius.sm,
|
|
16
|
+
fontWeight: 500,
|
|
17
|
+
textTransform: 'none',
|
|
18
|
+
letterSpacing: '0.5px',
|
|
19
|
+
px: size === 'small' ? 1.5 : size === 'large' ? 3 : 2,
|
|
20
|
+
py: size === 'small' ? 0.5 : size === 'large' ? 1.5 : 1,
|
|
21
|
+
position: 'relative',
|
|
22
|
+
...sx,
|
|
23
|
+
}, ...props, children: showCenterSpinner ? (jsxRuntime.jsx(material.CircularProgress, { size: loaderSize, color: "inherit" })) : loading && loadingText ? (loadingText) : (children) }));
|
|
24
|
+
});
|
|
25
|
+
Button.displayName = 'Button';
|
|
26
|
+
|
|
27
|
+
exports.Button = Button;
|
|
28
|
+
exports.default = Button;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import { CardProps } from '@mui/material';
|
|
5
|
+
import { SxProps } from '@mui/system';
|
|
6
|
+
|
|
7
|
+
interface CardRootProps extends CardProps {
|
|
8
|
+
sx?: SxProps;
|
|
9
|
+
variant?: 'elevated' | 'outlined' | 'bordered';
|
|
10
|
+
children: React__default.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare const Card: React$1.FC<CardRootProps> & {
|
|
14
|
+
Header: ({ title, subtitle, action, }: {
|
|
15
|
+
title?: string | React.ReactNode;
|
|
16
|
+
subtitle?: string | React.ReactNode;
|
|
17
|
+
action?: React.ReactNode;
|
|
18
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
19
|
+
Content: ({ children, sx }: {
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
sx?: any;
|
|
22
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
23
|
+
Body: ({ children, sx }: {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
sx?: any;
|
|
26
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
27
|
+
Actions: ({ children, sx }: {
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
sx?: any;
|
|
30
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
31
|
+
Image: ({ src, height, alt }: {
|
|
32
|
+
src: string;
|
|
33
|
+
height?: number | string;
|
|
34
|
+
alt?: string;
|
|
35
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
36
|
+
Skeleton: ({ lines }: {
|
|
37
|
+
lines?: number;
|
|
38
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { Card as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useTheme, Card as Card$1, CardHeader as CardHeader$1, Typography, CardActions as CardActions$1, Box, Skeleton } from '@mui/material';
|
|
3
|
+
import MuiCardContent from '@mui/material/CardContent';
|
|
4
|
+
import CardMedia from '@mui/material/CardMedia';
|
|
5
|
+
|
|
6
|
+
const CardRoot = ({ children, sx = {}, elevation = 1, variant = 'elevated', ...props }) => {
|
|
7
|
+
const theme = useTheme();
|
|
8
|
+
return (jsx(Card$1, { elevation: variant === 'elevated' ? elevation : 0, variant: variant === 'outlined' ? 'outlined' : 'elevation', sx: {
|
|
9
|
+
borderRadius: theme.radius?.sm || 8,
|
|
10
|
+
border: variant === 'bordered' ? `1px solid ${theme.palette.divider}` : 'none',
|
|
11
|
+
overflow: 'hidden',
|
|
12
|
+
backgroundColor: theme.palette.background.paper,
|
|
13
|
+
...sx,
|
|
14
|
+
}, ...props, children: children }));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const CardHeader = ({ title, subtitle, action, }) => (jsx(CardHeader$1, { title: typeof title === 'string' ? (jsx(Typography, { variant: "h6", fontWeight: 600, children: title })) : (title), subheader: typeof subtitle === 'string' ? (jsx(Typography, { variant: "body2", color: "text.secondary", children: subtitle })) : (subtitle), action: action }));
|
|
18
|
+
|
|
19
|
+
const CardContent = ({ children, sx }) => (jsx(MuiCardContent, { sx: sx, children: children }));
|
|
20
|
+
|
|
21
|
+
const CardActions = ({ children, sx }) => (jsx(CardActions$1, { sx: sx, children: children }));
|
|
22
|
+
|
|
23
|
+
const CardImage = ({ src, height = 160, alt = 'card image' }) => (jsx(CardMedia, { component: "img", height: height, image: src, alt: alt }));
|
|
24
|
+
|
|
25
|
+
const CardSkeleton = ({ lines = 3 }) => (jsxs(Box, { p: 2, children: [jsx(Skeleton, { variant: "rectangular", height: 140 }), [...Array(lines)].map((_, i) => (jsx(Skeleton, { variant: "text", height: 20, sx: { mt: 1 } }, i)))] }));
|
|
26
|
+
|
|
27
|
+
const Card = Object.assign(CardRoot, {
|
|
28
|
+
Header: CardHeader,
|
|
29
|
+
Content: CardContent,
|
|
30
|
+
Body: CardContent, // alias
|
|
31
|
+
Actions: CardActions,
|
|
32
|
+
Image: CardImage,
|
|
33
|
+
Skeleton: CardSkeleton,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export { Card as default };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var material = require('@mui/material');
|
|
5
|
+
var MuiCardContent = require('@mui/material/CardContent');
|
|
6
|
+
var CardMedia = require('@mui/material/CardMedia');
|
|
7
|
+
|
|
8
|
+
const CardRoot = ({ children, sx = {}, elevation = 1, variant = 'elevated', ...props }) => {
|
|
9
|
+
const theme = material.useTheme();
|
|
10
|
+
return (jsxRuntime.jsx(material.Card, { elevation: variant === 'elevated' ? elevation : 0, variant: variant === 'outlined' ? 'outlined' : 'elevation', sx: {
|
|
11
|
+
borderRadius: theme.radius?.sm || 8,
|
|
12
|
+
border: variant === 'bordered' ? `1px solid ${theme.palette.divider}` : 'none',
|
|
13
|
+
overflow: 'hidden',
|
|
14
|
+
backgroundColor: theme.palette.background.paper,
|
|
15
|
+
...sx,
|
|
16
|
+
}, ...props, children: children }));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const CardHeader = ({ title, subtitle, action, }) => (jsxRuntime.jsx(material.CardHeader, { title: typeof title === 'string' ? (jsxRuntime.jsx(material.Typography, { variant: "h6", fontWeight: 600, children: title })) : (title), subheader: typeof subtitle === 'string' ? (jsxRuntime.jsx(material.Typography, { variant: "body2", color: "text.secondary", children: subtitle })) : (subtitle), action: action }));
|
|
20
|
+
|
|
21
|
+
const CardContent = ({ children, sx }) => (jsxRuntime.jsx(MuiCardContent, { sx: sx, children: children }));
|
|
22
|
+
|
|
23
|
+
const CardActions = ({ children, sx }) => (jsxRuntime.jsx(material.CardActions, { sx: sx, children: children }));
|
|
24
|
+
|
|
25
|
+
const CardImage = ({ src, height = 160, alt = 'card image' }) => (jsxRuntime.jsx(CardMedia, { component: "img", height: height, image: src, alt: alt }));
|
|
26
|
+
|
|
27
|
+
const CardSkeleton = ({ lines = 3 }) => (jsxRuntime.jsxs(material.Box, { p: 2, children: [jsxRuntime.jsx(material.Skeleton, { variant: "rectangular", height: 140 }), [...Array(lines)].map((_, i) => (jsxRuntime.jsx(material.Skeleton, { variant: "text", height: 20, sx: { mt: 1 } }, i)))] }));
|
|
28
|
+
|
|
29
|
+
const Card = Object.assign(CardRoot, {
|
|
30
|
+
Header: CardHeader,
|
|
31
|
+
Content: CardContent,
|
|
32
|
+
Body: CardContent, // alias
|
|
33
|
+
Actions: CardActions,
|
|
34
|
+
Image: CardImage,
|
|
35
|
+
Skeleton: CardSkeleton,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
module.exports = Card;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PopoverProps as PopoverProps$1 } from '@mui/material';
|
|
4
|
+
|
|
5
|
+
interface PopoverProps extends Partial<PopoverProps$1> {
|
|
6
|
+
open: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
anchorEl: HTMLElement | null;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
width?: number | string;
|
|
11
|
+
maxWidth?: number | string;
|
|
12
|
+
minWidth?: number | string;
|
|
13
|
+
padding?: number;
|
|
14
|
+
border?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const Popover: ({ open, onClose, anchorEl, children, width, maxWidth, minWidth, padding, border, anchorOrigin, transformOrigin, ...rest }: PopoverProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
+
|
|
18
|
+
export { Popover, Popover as default };
|
|
19
|
+
export type { PopoverProps };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useTheme, Popover as Popover$1, Fade } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
const Popover = ({ open, onClose, anchorEl, children, width = 240, maxWidth = '100%', minWidth = 200, padding = 2, border = true, anchorOrigin = { vertical: 'bottom', horizontal: 'left' }, transformOrigin = { vertical: 'top', horizontal: 'left' }, ...rest }) => {
|
|
5
|
+
const theme = useTheme();
|
|
6
|
+
return (jsx(Popover$1, { open: open, anchorEl: anchorEl, onClose: onClose, disableScrollLock: true, TransitionComponent: Fade, transitionDuration: 150, anchorOrigin: anchorOrigin, transformOrigin: transformOrigin, PaperProps: {
|
|
7
|
+
elevation: 0,
|
|
8
|
+
sx: {
|
|
9
|
+
boxShadow: 'none',
|
|
10
|
+
bgcolor: theme.palette.background.paper,
|
|
11
|
+
border: border ? `1px solid ${theme.palette.divider}` : 'none',
|
|
12
|
+
borderRadius: theme.radius.md,
|
|
13
|
+
px: theme.spacing(padding),
|
|
14
|
+
py: theme.spacing(padding),
|
|
15
|
+
width,
|
|
16
|
+
maxWidth,
|
|
17
|
+
minWidth,
|
|
18
|
+
},
|
|
19
|
+
}, ...rest, children: children }));
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { Popover, Popover as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var material = require('@mui/material');
|
|
7
|
+
|
|
8
|
+
const Popover = ({ open, onClose, anchorEl, children, width = 240, maxWidth = '100%', minWidth = 200, padding = 2, border = true, anchorOrigin = { vertical: 'bottom', horizontal: 'left' }, transformOrigin = { vertical: 'top', horizontal: 'left' }, ...rest }) => {
|
|
9
|
+
const theme = material.useTheme();
|
|
10
|
+
return (jsxRuntime.jsx(material.Popover, { open: open, anchorEl: anchorEl, onClose: onClose, disableScrollLock: true, TransitionComponent: material.Fade, transitionDuration: 150, anchorOrigin: anchorOrigin, transformOrigin: transformOrigin, PaperProps: {
|
|
11
|
+
elevation: 0,
|
|
12
|
+
sx: {
|
|
13
|
+
boxShadow: 'none',
|
|
14
|
+
bgcolor: theme.palette.background.paper,
|
|
15
|
+
border: border ? `1px solid ${theme.palette.divider}` : 'none',
|
|
16
|
+
borderRadius: theme.radius.md,
|
|
17
|
+
px: theme.spacing(padding),
|
|
18
|
+
py: theme.spacing(padding),
|
|
19
|
+
width,
|
|
20
|
+
maxWidth,
|
|
21
|
+
minWidth,
|
|
22
|
+
},
|
|
23
|
+
}, ...rest, children: children }));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.Popover = Popover;
|
|
27
|
+
exports.default = Popover;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SxProps } from '@mui/system';
|
|
3
|
+
|
|
4
|
+
interface RadioOption {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
description?: string;
|
|
9
|
+
}
|
|
10
|
+
interface RadioGroupProps {
|
|
11
|
+
label?: string;
|
|
12
|
+
options: RadioOption[];
|
|
13
|
+
value?: string;
|
|
14
|
+
defaultValue?: string;
|
|
15
|
+
onChange?: (value: string) => void;
|
|
16
|
+
name?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
error?: boolean;
|
|
20
|
+
helperText?: string;
|
|
21
|
+
row?: boolean;
|
|
22
|
+
size?: 'small' | 'medium';
|
|
23
|
+
color?: 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
24
|
+
sx?: SxProps;
|
|
25
|
+
radioSx?: SxProps;
|
|
26
|
+
labelSx?: SxProps;
|
|
27
|
+
}
|
|
28
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
|
|
30
|
+
export { RadioGroup, RadioGroup as default };
|
|
31
|
+
export type { RadioGroupProps, RadioOption };
|