@acronis-platform/ui-react 0.62.0 → 2.0.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/components/ui/alert/alert.js +118 -60
- package/dist/components/ui/alert/alert.js.map +1 -1
- package/dist/components/ui/button-group/button-group.js +57 -0
- package/dist/components/ui/button-group/button-group.js.map +1 -0
- package/dist/components/ui/button-icon-menu/button-icon-menu.js +26 -0
- package/dist/components/ui/button-icon-menu/button-icon-menu.js.map +1 -0
- package/dist/components/ui/calendar-panel/calendar-panel.js.map +1 -1
- package/dist/components/ui/checkbox/checkbox.js +1 -1
- package/dist/components/ui/checkbox/checkbox.js.map +1 -1
- package/dist/components/ui/chip/chip.js +33 -33
- package/dist/components/ui/chip/chip.js.map +1 -1
- package/dist/components/ui/data-table/data-table-bulk-actions-bar.js +38 -0
- package/dist/components/ui/data-table/data-table-bulk-actions-bar.js.map +1 -0
- package/dist/components/ui/data-table/data-table-column-header.js +23 -20
- package/dist/components/ui/data-table/data-table-column-header.js.map +1 -1
- package/dist/components/ui/data-table/data-table-expand-trigger.js +23 -15
- package/dist/components/ui/data-table/data-table-expand-trigger.js.map +1 -1
- package/dist/components/ui/data-table/data-table-pagination.js +29 -28
- package/dist/components/ui/data-table/data-table-pagination.js.map +1 -1
- package/dist/components/ui/data-table/data-table-selection.js +7 -0
- package/dist/components/ui/data-table/data-table-selection.js.map +1 -0
- package/dist/components/ui/data-table/data-table-toolbar.js +21 -23
- package/dist/components/ui/data-table/data-table-toolbar.js.map +1 -1
- package/dist/components/ui/data-table/data-table-view-options.js +12 -10
- package/dist/components/ui/data-table/data-table-view-options.js.map +1 -1
- package/dist/components/ui/data-table/data-table.js +347 -183
- package/dist/components/ui/data-table/data-table.js.map +1 -1
- package/dist/components/ui/date-range-picker/date-range-picker-utils.js +11 -23
- package/dist/components/ui/date-range-picker/date-range-picker-utils.js.map +1 -1
- package/dist/components/ui/date-range-picker/date-range-picker.js +94 -134
- package/dist/components/ui/date-range-picker/date-range-picker.js.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.js +129 -72
- package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/ui/filter-chips/filter-chips.js +44 -0
- package/dist/components/ui/filter-chips/filter-chips.js.map +1 -0
- package/dist/components/ui/filter-search/filter-search.js +184 -138
- package/dist/components/ui/filter-search/filter-search.js.map +1 -1
- package/dist/components/ui/fitted-actions/fitted-actions.js +139 -0
- package/dist/components/ui/fitted-actions/fitted-actions.js.map +1 -0
- package/dist/components/ui/input-date-picker/input-date-picker.js +103 -93
- package/dist/components/ui/input-date-picker/input-date-picker.js.map +1 -1
- package/dist/components/ui/input-password/input-password.js +76 -66
- package/dist/components/ui/input-password/input-password.js.map +1 -1
- package/dist/components/ui/input-search/input-search.js +9 -9
- package/dist/components/ui/input-search/input-search.js.map +1 -1
- package/dist/components/ui/input-select/input-select.js +8 -8
- package/dist/components/ui/input-select/input-select.js.map +1 -1
- package/dist/components/ui/input-text/input-text.js +77 -66
- package/dist/components/ui/input-text/input-text.js.map +1 -1
- package/dist/components/ui/input-text-area/input-text-area.js +76 -66
- package/dist/components/ui/input-text-area/input-text-area.js.map +1 -1
- package/dist/components/ui/link/link.js +50 -35
- package/dist/components/ui/link/link.js.map +1 -1
- package/dist/components/ui/number-field/number-field.js +1 -1
- package/dist/components/ui/number-field/number-field.js.map +1 -1
- package/dist/components/ui/popover/popover.js +75 -56
- package/dist/components/ui/popover/popover.js.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.js +46 -30
- package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
- package/dist/components/ui/stepper/stepper.js +70 -0
- package/dist/components/ui/stepper/stepper.js.map +1 -0
- package/dist/components/ui/stepper-item/stepper-item.js +97 -0
- package/dist/components/ui/stepper-item/stepper-item.js.map +1 -0
- package/dist/components/ui/table/table-pagination.js +54 -47
- package/dist/components/ui/table/table-pagination.js.map +1 -1
- package/dist/components/ui/table/table-view-options.js +32 -19
- package/dist/components/ui/table/table-view-options.js.map +1 -1
- package/dist/components/ui/table/table.js +112 -63
- package/dist/components/ui/table/table.js.map +1 -1
- package/dist/components/ui/timeline/timeline.js +10 -10
- package/dist/components/ui/timeline/timeline.js.map +1 -1
- package/dist/components/ui/timer/timer.js +47 -0
- package/dist/components/ui/timer/timer.js.map +1 -0
- package/dist/components/ui/toast/toast.js +168 -61
- package/dist/components/ui/toast/toast.js.map +1 -1
- package/dist/components/ui/truncate-text/middle-truncate.js +20 -0
- package/dist/components/ui/truncate-text/middle-truncate.js.map +1 -0
- package/dist/components/ui/truncate-text/text-width.js +12 -0
- package/dist/components/ui/truncate-text/text-width.js.map +1 -0
- package/dist/components/ui/truncate-text/truncate-text.js +152 -0
- package/dist/components/ui/truncate-text/truncate-text.js.map +1 -0
- package/dist/index.js +516 -471
- package/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/addDays.js +5 -5
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/addDays.js.map +1 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/constants.js +3 -6
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/constants.js.map +1 -1
- package/dist/react.js +516 -471
- package/dist/react.js.map +1 -1
- package/dist/src/components/ui/alert/alert.d.ts +34 -3
- package/dist/src/components/ui/alert/index.d.ts +2 -2
- package/dist/src/components/ui/button/button.d.ts +1 -1
- package/dist/src/components/ui/button-group/button-group.d.ts +38 -0
- package/dist/src/components/ui/button-group/index.d.ts +1 -0
- package/dist/src/components/ui/button-icon/button-icon.d.ts +1 -1
- package/dist/src/components/ui/button-icon-menu/button-icon-menu.d.ts +28 -0
- package/dist/src/components/ui/button-icon-menu/index.d.ts +1 -0
- package/dist/src/components/ui/button-menu/button-menu.d.ts +1 -1
- package/dist/src/components/ui/calendar-panel/calendar-panel.d.ts +2 -2
- package/dist/src/components/ui/chip/chip.d.ts +1 -1
- package/dist/src/components/ui/data-table/data-table-bulk-actions-bar.d.ts +26 -0
- package/dist/src/components/ui/data-table/data-table-column-header.d.ts +6 -1
- package/dist/src/components/ui/data-table/data-table-expand-trigger.d.ts +4 -0
- package/dist/src/components/ui/data-table/data-table-pagination.d.ts +15 -1
- package/dist/src/components/ui/data-table/data-table-selection.d.ts +11 -0
- package/dist/src/components/ui/data-table/data-table-view-options.d.ts +3 -2
- package/dist/src/components/ui/data-table/data-table.d.ts +88 -3
- package/dist/src/components/ui/data-table/data-table.docs.d.ts +61 -1
- package/dist/src/components/ui/data-table/index.d.ts +3 -1
- package/dist/src/components/ui/date-range-picker/date-range-picker-utils.d.ts +10 -16
- package/dist/src/components/ui/date-range-picker/date-range-picker.d.ts +46 -2
- package/dist/src/components/ui/dropdown-menu/dropdown-menu.d.ts +8 -1
- package/dist/src/components/ui/dropdown-menu/index.d.ts +1 -1
- package/dist/src/components/ui/filter-chips/filter-chips.d.ts +25 -0
- package/dist/src/components/ui/filter-chips/index.d.ts +1 -0
- package/dist/src/components/ui/filter-search/filter-search.d.ts +39 -1
- package/dist/src/components/ui/fitted-actions/fitted-actions.d.ts +50 -0
- package/dist/src/components/ui/fitted-actions/fitted-actions.docs.d.ts +45 -0
- package/dist/src/components/ui/fitted-actions/index.d.ts +1 -0
- package/dist/src/components/ui/link/index.d.ts +1 -1
- package/dist/src/components/ui/link/link.d.ts +22 -4
- package/dist/src/components/ui/metric/metric.d.ts +1 -1
- package/dist/src/components/ui/popover/popover.d.ts +30 -1
- package/dist/src/components/ui/popover/popover.docs.d.ts +27 -2
- package/dist/src/components/ui/scroll-area/scroll-area.d.ts +24 -0
- package/dist/src/components/ui/stepper/index.d.ts +1 -0
- package/dist/src/components/ui/stepper/stepper.d.ts +40 -0
- package/dist/src/components/ui/stepper-item/index.d.ts +1 -0
- package/dist/src/components/ui/stepper-item/stepper-item.d.ts +41 -0
- package/dist/src/components/ui/table/index.d.ts +1 -1
- package/dist/src/components/ui/table/table-pagination.d.ts +21 -0
- package/dist/src/components/ui/table/table-view-options.d.ts +9 -2
- package/dist/src/components/ui/table/table.d.ts +40 -1
- package/dist/src/components/ui/tag/tag.d.ts +1 -1
- package/dist/src/components/ui/timer/index.d.ts +1 -0
- package/dist/src/components/ui/timer/timer.d.ts +28 -0
- package/dist/src/components/ui/toast/index.d.ts +1 -1
- package/dist/src/components/ui/toast/toast.d.ts +51 -18
- package/dist/src/components/ui/toast/toast.docs.d.ts +4 -0
- package/dist/src/components/ui/trend-indicator/trend-indicator.d.ts +1 -1
- package/dist/src/components/ui/truncate-text/__tests__/middle-truncate.test.d.ts +1 -0
- package/dist/src/components/ui/truncate-text/index.d.ts +3 -0
- package/dist/src/components/ui/truncate-text/middle-truncate.d.ts +13 -0
- package/dist/src/components/ui/truncate-text/text-width.d.ts +11 -0
- package/dist/src/components/ui/truncate-text/truncate-text.d.ts +45 -0
- package/dist/src/components/ui/truncate-text/truncate-text.docs.d.ts +35 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/ui-react.css +1 -1
- package/package.json +4 -4
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getDefaultOptions.js +0 -8
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getDefaultOptions.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getISODay.js +0 -9
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getISODay.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Parser.js +0 -23
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Parser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Setter.js +0 -42
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Setter.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/constants.js +0 -50
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/constants.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +0 -50
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +0 -50
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DateParser.js +0 -62
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DateParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +0 -52
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayParser.js +0 -50
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +0 -50
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/EraParser.js +0 -34
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/EraParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +0 -22
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +0 -23
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +0 -33
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +0 -33
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +0 -34
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +0 -34
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +0 -106
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +0 -49
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +0 -49
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +0 -50
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +0 -41
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +0 -81
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +0 -49
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +0 -70
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +0 -33
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +0 -78
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MonthParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +0 -76
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +0 -33
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/SecondParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +0 -81
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +0 -78
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +0 -76
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +0 -23
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +0 -23
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/YearParser.js +0 -50
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/YearParser.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers.js +0 -68
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/utils.js +0 -104
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/utils.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse.js +0 -86
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setDay.js +0 -12
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setDay.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISODay.js +0 -11
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISODay.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISOWeek.js +0 -10
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISOWeek.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setWeek.js +0 -10
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setWeek.js.map +0 -1
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/transpose.js +0 -18
- package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/transpose.js.map +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { DayPickerLocale, Matcher } from 'react-day-picker';
|
|
1
2
|
import { DateRange } from './date-range-picker-utils';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
export type { DateRange };
|
|
4
5
|
export interface DateRangePickerProps {
|
|
5
6
|
/** The applied range (controlled). Omit for uncontrolled use with `defaultValue`. */
|
|
6
7
|
value?: DateRange;
|
|
7
|
-
/** The initial applied range (uncontrolled)
|
|
8
|
+
/** The initial applied range (uncontrolled). */
|
|
8
9
|
defaultValue?: DateRange;
|
|
9
10
|
/** Called with the committed range when Apply is pressed. */
|
|
10
11
|
onValueChange?: (range: DateRange) => void;
|
|
@@ -20,8 +21,51 @@ export interface DateRangePickerProps {
|
|
|
20
21
|
disabled?: boolean;
|
|
21
22
|
/** Marks the trigger required. */
|
|
22
23
|
required?: boolean;
|
|
23
|
-
/** Extra classes merged onto the trigger. */
|
|
24
|
+
/** Extra classes merged onto the trigger's field wrapper (label + box + message). */
|
|
24
25
|
className?: string;
|
|
26
|
+
/** Days that cannot be selected in the calendar. */
|
|
27
|
+
disabledDays?: Matcher | Matcher[];
|
|
28
|
+
/** Minimum number of nights between the range's start and end (`differenceInCalendarDays(to, from)`) — e.g. `min={7}` requires at least 8 selectable days. */
|
|
29
|
+
min?: number;
|
|
30
|
+
/** Maximum number of nights between the range's start and end (`differenceInCalendarDays(to, from)`) — e.g. `max={31}` admits up to 32 selectable days. */
|
|
31
|
+
max?: number;
|
|
32
|
+
/** Render the leading/trailing days of the adjacent months. */
|
|
33
|
+
showOutsideDays?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* First day of the week (0 = Sunday). Defaults to `locale`'s own week
|
|
36
|
+
* start, falling back to Monday when no `locale` is given.
|
|
37
|
+
*/
|
|
38
|
+
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
39
|
+
/**
|
|
40
|
+
* First year offered by the year dropdown and the earliest month the grid
|
|
41
|
+
* can navigate to. Defaults to 50 years back.
|
|
42
|
+
*/
|
|
43
|
+
fromYear?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Last year offered by the year dropdown and the latest month the grid can
|
|
46
|
+
* navigate to. Defaults to 50 years ahead.
|
|
47
|
+
*/
|
|
48
|
+
toYear?: number;
|
|
49
|
+
/**
|
|
50
|
+
* Localizes weekday names, the calendar's default day-cell/caption
|
|
51
|
+
* accessible labels, and the trigger's month name (e.g. `import { es }
|
|
52
|
+
* from 'react-day-picker/locale'`). The trigger's day/year order stays
|
|
53
|
+
* fixed (`MMM d, yyyy`) — only the month name translates, not the
|
|
54
|
+
* ordering. Defaults to date-fns `enUS`. Does not translate `monthLabel`/
|
|
55
|
+
* `yearLabel`/`cancelLabel`/`applyLabel`/`formatMonthLabel` — those are
|
|
56
|
+
* separate props.
|
|
57
|
+
*/
|
|
58
|
+
locale?: DayPickerLocale;
|
|
59
|
+
/** Accessible name of the calendar's month dropdown. */
|
|
60
|
+
monthLabel?: string;
|
|
61
|
+
/** Accessible name of the calendar's year dropdown. */
|
|
62
|
+
yearLabel?: string;
|
|
63
|
+
/** Formats a month's name for the month dropdown. Defaults to `locale`-aware `date-fns` formatting. */
|
|
64
|
+
formatMonthLabel?: (date: Date) => string;
|
|
65
|
+
/** Popup footer's "Cancel" button label. */
|
|
66
|
+
cancelLabel?: string;
|
|
67
|
+
/** Popup footer's "Apply" button label. */
|
|
68
|
+
applyLabel?: string;
|
|
25
69
|
}
|
|
26
70
|
declare const DateRangePicker: React.ForwardRefExoticComponent<DateRangePickerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
27
71
|
export { DateRangePicker };
|
|
@@ -29,4 +29,11 @@ declare function DropdownMenuShortcut({ className, ...props }: React.HTMLAttribu
|
|
|
29
29
|
declare namespace DropdownMenuShortcut {
|
|
30
30
|
var displayName: string;
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ContextMenuCheckboxItemProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
33
|
+
declare const DropdownMenuRadioGroup: React.NamedExoticComponent<Omit<import('@base-ui/react').ContextMenuRadioGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
+
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ContextMenuRadioItemProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
35
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
36
|
+
inset?: boolean;
|
|
37
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuPortal, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuPortal, type DropdownMenuContentProps, } from './dropdown-menu';
|
|
1
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuPortal, type DropdownMenuContentProps, } from './dropdown-menu';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface FilterChipsProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
4
|
+
/**
|
|
5
|
+
* Replace the rendered `<div>` with another element or component
|
|
6
|
+
* (Base UI composition). Accepts a React element or a render function.
|
|
7
|
+
*/
|
|
8
|
+
render?: useRender.RenderProp;
|
|
9
|
+
/** Accessible name for the applied-filter region. */
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const FilterChips: React.ForwardRefExoticComponent<FilterChipsProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export type FilterChipsListProps = React.ComponentPropsWithoutRef<'div'>;
|
|
14
|
+
declare const FilterChipsList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
export interface FilterChipsResetProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
16
|
+
/**
|
|
17
|
+
* Replace the rendered `<button>` with another element or component
|
|
18
|
+
* (Base UI composition). Accepts a React element or a render function.
|
|
19
|
+
*/
|
|
20
|
+
render?: useRender.RenderProp;
|
|
21
|
+
/** Label for the reset action. */
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
declare const FilterChipsReset: React.ForwardRefExoticComponent<FilterChipsResetProps & React.RefAttributes<HTMLButtonElement>>;
|
|
25
|
+
export { FilterChips, FilterChipsList, FilterChipsReset };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FilterChips, FilterChipsList, FilterChipsReset, type FilterChipsProps, type FilterChipsListProps, type FilterChipsResetProps, } from './filter-chips';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { FilterChipsProps } from '../filter-chips';
|
|
2
|
+
import { PopoverContent } from '../popover';
|
|
1
3
|
import * as React from 'react';
|
|
2
4
|
export type FilterSearchProps = React.ComponentPropsWithoutRef<'div'>;
|
|
3
5
|
declare const FilterSearch: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -25,6 +27,12 @@ export interface FilterSearchFiltersProps extends Omit<React.ComponentPropsWitho
|
|
|
25
27
|
onApply?: (filters: Record<string, unknown>) => void;
|
|
26
28
|
/** Label for the filter trigger button. */
|
|
27
29
|
label?: React.ReactNode;
|
|
30
|
+
/** Label for the "Reset filters" action inside the popover. */
|
|
31
|
+
resetFiltersLabel?: React.ReactNode;
|
|
32
|
+
/** Label for the "Cancel" action inside the popover. */
|
|
33
|
+
cancelLabel?: React.ReactNode;
|
|
34
|
+
/** Label for the "Apply" action inside the popover. */
|
|
35
|
+
applyLabel?: React.ReactNode;
|
|
28
36
|
/**
|
|
29
37
|
* Filter field children rendered inside the popover form. Plain children —
|
|
30
38
|
* wire each field to the draft via `useFilterSearchFilters`. Group fields with
|
|
@@ -33,15 +41,45 @@ export interface FilterSearchFiltersProps extends Omit<React.ComponentPropsWitho
|
|
|
33
41
|
children?: React.ReactNode;
|
|
34
42
|
/** Additional classes merged onto the trigger button. */
|
|
35
43
|
className?: string;
|
|
44
|
+
/** Additional classes merged onto the popover content. */
|
|
45
|
+
contentClassName?: string;
|
|
46
|
+
/** Which side of the trigger to render the popover on. Defaults to `'bottom'`. */
|
|
47
|
+
side?: React.ComponentProps<typeof PopoverContent>['side'];
|
|
48
|
+
/** Alignment of the popover along the chosen side. Defaults to `'start'`. */
|
|
49
|
+
align?: React.ComponentProps<typeof PopoverContent>['align'];
|
|
50
|
+
/** Distance in px between the trigger and the popover. */
|
|
51
|
+
sideOffset?: React.ComponentProps<typeof PopoverContent>['sideOffset'];
|
|
52
|
+
/**
|
|
53
|
+
* Portal container the popover mounts into. Defaults to the nearest
|
|
54
|
+
* `PortalContainerProvider`, or `document.body` if none is set — see
|
|
55
|
+
* `PopoverContent`'s `portalContainer` prop.
|
|
56
|
+
*/
|
|
57
|
+
portalContainer?: React.ComponentProps<typeof PopoverContent>['portalContainer'];
|
|
58
|
+
/**
|
|
59
|
+
* Element/rect the popover is confined to when avoiding collisions. See
|
|
60
|
+
* `PopoverContent`'s `collisionBoundary` prop for the default behavior
|
|
61
|
+
* inside a constrained portal container.
|
|
62
|
+
*/
|
|
63
|
+
collisionBoundary?: React.ComponentProps<typeof PopoverContent>['collisionBoundary'];
|
|
64
|
+
/**
|
|
65
|
+
* Which CSS `position` the popover uses. See `PopoverContent`'s
|
|
66
|
+
* `positionMethod` prop for the default behavior inside a constrained
|
|
67
|
+
* portal container.
|
|
68
|
+
*/
|
|
69
|
+
positionMethod?: React.ComponentProps<typeof PopoverContent>['positionMethod'];
|
|
36
70
|
}
|
|
37
71
|
declare const FilterSearchFilters: React.ForwardRefExoticComponent<FilterSearchFiltersProps & React.RefAttributes<HTMLButtonElement>>;
|
|
38
|
-
export interface FilterSearchAppliedFiltersProps extends Omit<
|
|
72
|
+
export interface FilterSearchAppliedFiltersProps extends Omit<FilterChipsProps, 'children'> {
|
|
39
73
|
/** The currently applied filter values, keyed by an arbitrary consumer-chosen id. */
|
|
40
74
|
filters: Record<string, unknown>;
|
|
41
75
|
/** Called with the remaining filters when a chip is removed or "Reset filters" clears all. */
|
|
42
76
|
onValueChange: (next: Record<string, unknown>) => void;
|
|
43
77
|
/** Format an applied-filter chip's label. Defaults to `"<key>: <value>"`. */
|
|
44
78
|
getFilterChipLabel?: (key: string, value: unknown) => React.ReactNode;
|
|
79
|
+
/** Format a filter chip's remove-button accessible label. Defaults to `"Remove <key> filter"`. */
|
|
80
|
+
getRemoveFilterLabel?: (key: string) => string;
|
|
81
|
+
/** Label for the "Reset filters" action. */
|
|
82
|
+
resetFiltersLabel?: React.ReactNode;
|
|
45
83
|
}
|
|
46
84
|
/**
|
|
47
85
|
* Renders one removable chip per applied filter plus a "Reset filters" action
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Pure overflow math (no DOM). Greedily fits leading actions into
|
|
4
|
+
* `containerWidth - dropdownWidth`, accounting for the inter-item `gap`. Returns
|
|
5
|
+
* how many render inline; the rest overflow into the menu. Exported for testing.
|
|
6
|
+
*/
|
|
7
|
+
export declare function computeFittedVisibleCount({ containerWidth, itemWidths, dropdownWidth, gap, }: {
|
|
8
|
+
containerWidth: number;
|
|
9
|
+
itemWidths: number[];
|
|
10
|
+
dropdownWidth: number;
|
|
11
|
+
gap?: number;
|
|
12
|
+
}): number;
|
|
13
|
+
export interface FittedAction {
|
|
14
|
+
/** Stable identity. */
|
|
15
|
+
id: string;
|
|
16
|
+
/** Visible label (also the overflow menu-item label). */
|
|
17
|
+
label: React.ReactNode;
|
|
18
|
+
/** Optional leading 16px icon. */
|
|
19
|
+
icon?: React.ReactNode;
|
|
20
|
+
/** Set `false` to omit the action entirely. */
|
|
21
|
+
isDisplayed?: boolean;
|
|
22
|
+
/** Render a divider above this item when it sits in the overflow menu. */
|
|
23
|
+
divided?: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/** Invoked when this action is chosen (inline click or menu select). */
|
|
26
|
+
onSelect?: () => void;
|
|
27
|
+
}
|
|
28
|
+
export interface FittedActionsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
29
|
+
/** Ordered actions; trailing items overflow into the menu first. Defaults to `[]`. */
|
|
30
|
+
actions?: FittedAction[];
|
|
31
|
+
/** Collapse overflow into a "More" menu. Default true. */
|
|
32
|
+
showDropdown?: boolean;
|
|
33
|
+
/** Label for the overflow trigger. Default "More". */
|
|
34
|
+
moreLabel?: React.ReactNode;
|
|
35
|
+
/** Inter-item gap in px (also reserved when measuring). Default 8. */
|
|
36
|
+
gap?: number;
|
|
37
|
+
/** Fired for any chosen action, after its own `onSelect`. */
|
|
38
|
+
onAction?: (action: FittedAction) => void;
|
|
39
|
+
/** Customize the inline action element. Default: a ghost `Button`. */
|
|
40
|
+
renderAction?: (action: FittedAction, api: {
|
|
41
|
+
onSelect: () => void;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
}) => React.ReactNode;
|
|
44
|
+
/** Customize the overflow trigger (used as the menu trigger's `render`). Default: a ghost `Button`. */
|
|
45
|
+
renderTrigger?: (api: {
|
|
46
|
+
label: React.ReactNode;
|
|
47
|
+
}) => React.ReactElement;
|
|
48
|
+
}
|
|
49
|
+
declare const FittedActions: React.ForwardRefExoticComponent<FittedActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
50
|
+
export { FittedActions };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for `FittedActions` — the responsive action row.
|
|
4
|
+
* Extends `div` props (excluding `onSelect`).
|
|
5
|
+
*/
|
|
6
|
+
export interface FittedActionsProps {
|
|
7
|
+
/** Ordered actions; trailing items overflow into the menu first. Defaults to `[]`. */
|
|
8
|
+
actions?: FittedAction[];
|
|
9
|
+
/** Collapse overflow into a "More" menu. Default `true`. */
|
|
10
|
+
showDropdown?: boolean;
|
|
11
|
+
/** Label for the overflow trigger. Default `"More"`. */
|
|
12
|
+
moreLabel?: React.ReactNode;
|
|
13
|
+
/** Inter-item gap in px (also reserved when measuring). Default `8`. */
|
|
14
|
+
gap?: number;
|
|
15
|
+
/** Fired for any chosen action, after its own `onSelect`. */
|
|
16
|
+
onAction?: (action: FittedAction) => void;
|
|
17
|
+
/** Customize the inline action element. Default: a ghost `Button`. */
|
|
18
|
+
renderAction?: (action: FittedAction, api: {
|
|
19
|
+
onSelect: () => void;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
}) => React.ReactNode;
|
|
22
|
+
/** Customize the overflow trigger (used as the menu trigger's `render`). Default: a ghost `Button`. */
|
|
23
|
+
renderTrigger?: (api: {
|
|
24
|
+
label: React.ReactNode;
|
|
25
|
+
}) => React.ReactElement;
|
|
26
|
+
/** Extra classes merged onto the root `<div>`. */
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
/** A single action in the `FittedActions` bar. */
|
|
30
|
+
export interface FittedAction {
|
|
31
|
+
/** Stable identity — used as React key. */
|
|
32
|
+
id: string;
|
|
33
|
+
/** Visible label (also the overflow menu-item label). */
|
|
34
|
+
label: React.ReactNode;
|
|
35
|
+
/** Optional leading 16px icon rendered before the label. */
|
|
36
|
+
icon?: React.ReactNode;
|
|
37
|
+
/** Set `false` to omit the action entirely without removing it from the array. */
|
|
38
|
+
isDisplayed?: boolean;
|
|
39
|
+
/** Render a divider above this item when it appears in the overflow menu. */
|
|
40
|
+
divided?: boolean;
|
|
41
|
+
/** Disables the action (inline button and overflow menu item both become inert). */
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
/** Invoked when this action is chosen — inline click or overflow menu select. */
|
|
44
|
+
onSelect?: () => void;
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FittedActions, computeFittedVisibleCount, type FittedAction, type FittedActionsProps, } from './fitted-actions';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Link, type LinkProps } from './link';
|
|
1
|
+
export { Link, linkVariants, type LinkProps } from './link';
|
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
3
|
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
declare const linkVariants: (props?: ({
|
|
5
|
+
variant?: "normal" | "inverse" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, VariantProps<typeof linkVariants> {
|
|
8
|
+
/**
|
|
9
|
+
* Which surface the link sits on (Figma's `background`): `normal` for ordinary
|
|
10
|
+
* surfaces, `inverse` for a backdrop/scrim or other dark brand surface.
|
|
11
|
+
*/
|
|
12
|
+
variant?: 'normal' | 'inverse';
|
|
13
|
+
/**
|
|
14
|
+
* Append a trailing external-link icon (e.g. for links that leave the app).
|
|
15
|
+
* Has no effect on `variant="inverse"` — the design defines no external icon for
|
|
16
|
+
* links on a backdrop.
|
|
17
|
+
*/
|
|
5
18
|
external?: boolean;
|
|
6
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Render the link inert: disabled color, removed from the tab order, no navigation.
|
|
21
|
+
* Ignored entirely on `variant="inverse"` — the design defines no disabled state on
|
|
22
|
+
* a backdrop, so the link renders exactly as an enabled one (still navigable and
|
|
23
|
+
* focusable). Omit the link, or use `variant="normal"`, when you need it inert.
|
|
24
|
+
*/
|
|
7
25
|
disabled?: boolean;
|
|
8
26
|
/**
|
|
9
27
|
* Replace the rendered `<a>` with another element or component (Base UI
|
|
@@ -12,4 +30,4 @@ export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>
|
|
|
12
30
|
render?: useRender.RenderProp;
|
|
13
31
|
}
|
|
14
32
|
declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
15
|
-
export { Link };
|
|
33
|
+
export { Link, linkVariants };
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const metricVariants: (props?: ({
|
|
4
4
|
size?: "small" | "medium" | "large" | null | undefined;
|
|
5
|
-
status?: "info" | "success" | "warning" | "critical" | "
|
|
5
|
+
status?: "info" | "success" | "warning" | "critical" | "danger" | "neutral" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export interface MetricProps extends React.ComponentProps<'div'>, VariantProps<typeof metricVariants> {
|
|
8
8
|
/** What the value measures — e.g. "Gross margin". Rendered as an uppercase note heading. */
|
|
@@ -17,11 +17,40 @@ export interface PopoverContentProps extends React.ComponentPropsWithoutRef<type
|
|
|
17
17
|
portal?: boolean;
|
|
18
18
|
/**
|
|
19
19
|
* Portal container. Pass a shadow-root mount for isolated-style previews
|
|
20
|
-
* (the docs demos do this via `useShadowMount`)
|
|
20
|
+
* (the docs demos do this via `useShadowMount`), or a constrained
|
|
21
|
+
* MFE/Shadow DOM mount point (see `PortalContainerProvider`).
|
|
21
22
|
*/
|
|
22
23
|
portalContainer?: PopoverPrimitive.Portal.Props['container'];
|
|
23
24
|
/** Keep the content mounted while closed (Base UI `Portal` prop). */
|
|
24
25
|
keepMounted?: PopoverPrimitive.Portal.Props['keepMounted'];
|
|
26
|
+
/**
|
|
27
|
+
* Element/rect the popup is confined to when avoiding collisions. Defaults
|
|
28
|
+
* to Base UI's own `'clipping-ancestors'` behavior — left alone here,
|
|
29
|
+
* since pairing it with the `positionMethod` default below already avoids
|
|
30
|
+
* clipping inside a constrained `portalContainer` (see that prop's doc).
|
|
31
|
+
* Override explicitly if a different boundary is needed.
|
|
32
|
+
*/
|
|
33
|
+
collisionBoundary?: PopoverPrimitive.Positioner.Props['collisionBoundary'];
|
|
34
|
+
/**
|
|
35
|
+
* Which CSS `position` the popup uses. Defaults to `'fixed'` whenever the
|
|
36
|
+
* popup is portaled (`portal` is not `false`) into a resolved
|
|
37
|
+
* `portalContainer` — an `'absolute'`-positioned popup
|
|
38
|
+
* (Base UI's own default) is still clipped by a `portalContainer` ancestor
|
|
39
|
+
* that constrains overflow (e.g. a Shadow DOM host with `overflow: hidden`)
|
|
40
|
+
* no matter how the collision boundary is computed, since it shares that
|
|
41
|
+
* ancestor's containing block. `'fixed'` escapes a plain overflow-clipping
|
|
42
|
+
* ancestor — for a `fixed`-positioned popup, the collision-detection
|
|
43
|
+
* library (floating-ui) drops overflow ancestors that don't establish
|
|
44
|
+
* their own containing block, so it clips against the real viewport
|
|
45
|
+
* instead, which is also unaffected by page scroll (unlike measuring
|
|
46
|
+
* `document.documentElement`'s own bounding rect, which shrinks by the
|
|
47
|
+
* scroll offset). Note this is not an absolute guarantee: an ancestor with
|
|
48
|
+
* `transform`, `filter`, `will-change`, `backdrop-filter`, `perspective`,
|
|
49
|
+
* or `contain: paint`/`layout` *does* establish a containing block, so it
|
|
50
|
+
* still clips (and repositions relative to) a `fixed` descendant. Override
|
|
51
|
+
* explicitly if a different strategy is needed.
|
|
52
|
+
*/
|
|
53
|
+
positionMethod?: PopoverPrimitive.Positioner.Props['positionMethod'];
|
|
25
54
|
}
|
|
26
55
|
declare const PopoverContent: React.ForwardRefExoticComponent<PopoverContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
56
|
/**
|
|
@@ -14,11 +14,36 @@ export interface PopoverContentProps {
|
|
|
14
14
|
portal?: boolean;
|
|
15
15
|
/**
|
|
16
16
|
* Portal container. Pass a shadow-root mount for isolated-style previews
|
|
17
|
-
* (the docs demos do this via `useShadowMount`)
|
|
17
|
+
* (the docs demos do this via `useShadowMount`), or a `RefObject` pointing
|
|
18
|
+
* at a not-yet-mounted container element — its `current` is resolved once
|
|
19
|
+
* attached, so it doesn't need to be available on first render.
|
|
18
20
|
*/
|
|
19
|
-
portalContainer?: HTMLElement | null
|
|
21
|
+
portalContainer?: HTMLElement | ShadowRoot | null | React.RefObject<HTMLElement | ShadowRoot | null>;
|
|
20
22
|
/** Keep the content mounted while closed. */
|
|
21
23
|
keepMounted?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Element/rect the popup is confined to when avoiding collisions. Defaults
|
|
26
|
+
* to Base UI's own `'clipping-ancestors'` behavior, left alone here — see
|
|
27
|
+
* `positionMethod` for why that already avoids clipping inside a
|
|
28
|
+
* constrained `portalContainer`.
|
|
29
|
+
*/
|
|
30
|
+
collisionBoundary?: Element | Element[] | {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
width: number;
|
|
34
|
+
height: number;
|
|
35
|
+
} | 'clipping-ancestors';
|
|
36
|
+
/**
|
|
37
|
+
* Which CSS `position` the popup uses. Defaults to `fixed` whenever the
|
|
38
|
+
* popup is portaled into a resolved `portalContainer`, so it escapes a
|
|
39
|
+
* plain overflow-clipping container (e.g. `overflow: hidden`) — the
|
|
40
|
+
* collision-detection library drops such an ancestor from its clipping
|
|
41
|
+
* chain for a `fixed`-positioned element, resolving to the real,
|
|
42
|
+
* scroll-independent viewport. Not a guarantee against an ancestor that
|
|
43
|
+
* also has a `transform`/`filter`/`will-change`/etc., which establishes
|
|
44
|
+
* its own containing block for fixed descendants and still clips.
|
|
45
|
+
*/
|
|
46
|
+
positionMethod?: 'absolute' | 'fixed';
|
|
22
47
|
/** Extra classes merged onto the popup. */
|
|
23
48
|
className?: string;
|
|
24
49
|
children?: React.ReactNode;
|
|
@@ -5,6 +5,30 @@ declare const ScrollBar: React.ForwardRefExoticComponent<Omit<Omit<import('@base
|
|
|
5
5
|
export interface ScrollAreaProps extends React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> {
|
|
6
6
|
/** Which scrollbar(s) to render. @default 'vertical' */
|
|
7
7
|
orientation?: 'vertical' | 'horizontal' | 'both';
|
|
8
|
+
/**
|
|
9
|
+
* Ref to the **viewport** — the element that actually scrolls.
|
|
10
|
+
*
|
|
11
|
+
* `ref` reaches the root, which is `overflow: hidden` and never scrolls, so
|
|
12
|
+
* it reports `scrollTop: 0` and `scrollHeight === clientHeight` forever.
|
|
13
|
+
* Anything that measures, observes, or programmatically scrolls the region
|
|
14
|
+
* needs this one instead: a virtualizer's scroll element, an infinite-scroll
|
|
15
|
+
* observer, a scroll-to-item call.
|
|
16
|
+
*/
|
|
17
|
+
viewportRef?: React.Ref<HTMLDivElement>;
|
|
18
|
+
/**
|
|
19
|
+
* Extra props for the viewport — a scroll handler, a tab index, or
|
|
20
|
+
* `data-*` attributes that must sit on the element that scrolls rather than
|
|
21
|
+
* on the wrapper around it.
|
|
22
|
+
*
|
|
23
|
+
* The `data-*` index signature is deliberate: JSX grants intrinsic elements
|
|
24
|
+
* an arbitrary-`data-*` escape hatch, but a props object typed as
|
|
25
|
+
* `HTMLAttributes` does not get it — so without this, the main thing this
|
|
26
|
+
* prop exists for (marking the scrolling element for an observer) would not
|
|
27
|
+
* type-check.
|
|
28
|
+
*/
|
|
29
|
+
viewportProps?: React.HTMLAttributes<HTMLDivElement> & {
|
|
30
|
+
readonly [attribute: `data-${string}`]: unknown;
|
|
31
|
+
};
|
|
8
32
|
}
|
|
9
33
|
declare const ScrollArea: React.ForwardRefExoticComponent<ScrollAreaProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
34
|
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stepper, type StepperProps } from './stepper';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* The `StepperItem` elements making up the sequence. Rendered in the wide
|
|
5
|
+
* (>= 1024px) layout only — the compact layout is a text summary and shows no
|
|
6
|
+
* items at all.
|
|
7
|
+
*/
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/** 1-based index of the step the user is on, e.g. `3`. Compact layout only. */
|
|
10
|
+
currentStep: React.ReactNode;
|
|
11
|
+
/** How many steps there are in total, e.g. `5`. Compact layout only. */
|
|
12
|
+
totalSteps: React.ReactNode;
|
|
13
|
+
/** The current step's name. Compact layout only. */
|
|
14
|
+
current: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* The next step's name. Omit it — on the last step, say — and the whole
|
|
17
|
+
* "Next: …" line is left out rather than rendered empty. Compact layout only.
|
|
18
|
+
*/
|
|
19
|
+
next?: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* The word introducing the step counter. A prop, not an inlined literal, so
|
|
22
|
+
* the string can be translated (see `context/conventions.md` §"Localization —
|
|
23
|
+
* no hardcoded labels"): this component generates the text itself, unlike the
|
|
24
|
+
* step names, which the caller supplies.
|
|
25
|
+
*/
|
|
26
|
+
stepLabel?: string;
|
|
27
|
+
/** The word joining the current step number to the total. Translatable — see `stepLabel`. */
|
|
28
|
+
ofLabel?: string;
|
|
29
|
+
/** The label introducing the next step's name. Translatable — see `stepLabel`. */
|
|
30
|
+
nextLabel?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The punctuation joining the step counter to the current step's name. A prop
|
|
33
|
+
* for the same reason as `stepLabel`: the component generates it, and not every
|
|
34
|
+
* locale writes it as `": "` (French, say, spaces before the colon; CJK uses a
|
|
35
|
+
* full-width one).
|
|
36
|
+
*/
|
|
37
|
+
separatorLabel?: string;
|
|
38
|
+
}
|
|
39
|
+
declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLDivElement>>;
|
|
40
|
+
export { Stepper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StepperItem, stepperItemVariants, type StepperItemProps, type StepperItemVariant, type StepperItemState, } from './stepper-item';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const stepperItemVariants: (props?: ({
|
|
5
|
+
variant?: "current" | "completed" | "future" | null | undefined;
|
|
6
|
+
state?: "active" | "hover" | "idle" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
/** Kept in lockstep with the `cva` axes above. */
|
|
9
|
+
export type StepperItemVariant = NonNullable<VariantProps<typeof stepperItemVariants>['variant']>;
|
|
10
|
+
export type StepperItemState = NonNullable<VariantProps<typeof stepperItemVariants>['state']>;
|
|
11
|
+
export interface StepperItemProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
12
|
+
/**
|
|
13
|
+
* The step's structural role in the sequence. Drives the container background
|
|
14
|
+
* and the label color. Defaults to `current` for prop ergonomics — in a real
|
|
15
|
+
* sequence every step declares its own.
|
|
16
|
+
*/
|
|
17
|
+
variant?: StepperItemVariant;
|
|
18
|
+
/**
|
|
19
|
+
* Interaction state. Only produces a different look when `variant` is
|
|
20
|
+
* `completed` (`idle` has no background, `hover` and `active` paint one).
|
|
21
|
+
* Ignored for `current`, which always renders in its highlighted look, and for
|
|
22
|
+
* `future`, which always renders disabled and non-interactive.
|
|
23
|
+
*/
|
|
24
|
+
state?: StepperItemState;
|
|
25
|
+
/**
|
|
26
|
+
* The step's marker — required, and entirely the caller's to compose. Pass any
|
|
27
|
+
* `Avatar` composition (color scheme, initials / icon / image, size overrides);
|
|
28
|
+
* this component renders it verbatim and never styles it.
|
|
29
|
+
*/
|
|
30
|
+
avatar: React.ReactElement;
|
|
31
|
+
/** The step name. */
|
|
32
|
+
label?: React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Replace the rendered `<div>` with another element or component (Base UI
|
|
35
|
+
* composition) — e.g. a `<button>`, since a completed step is usually a way
|
|
36
|
+
* back to an earlier step.
|
|
37
|
+
*/
|
|
38
|
+
render?: useRender.RenderProp;
|
|
39
|
+
}
|
|
40
|
+
declare const StepperItem: React.ForwardRefExoticComponent<StepperItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
export { StepperItem, stepperItemVariants };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, type TableRowProps, type TableHeadProps, type TableCellProps, } from './table';
|
|
1
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableSelectCell, TableActionsCell, TableSettingsCell, TableCaption, type TableRowProps, type TableHeadProps, type TableCellProps, type TableSelectCellProps, type TableActionsCellProps, } from './table';
|
|
2
2
|
export { TablePagination, type TablePaginationProps, } from './table-pagination';
|
|
3
3
|
export { TableViewOptions, type TableViewOptionsProps, type TableColumnVisibility, } from './table-view-options';
|
|
@@ -16,6 +16,27 @@ export interface TablePaginationProps extends Omit<React.HTMLAttributes<HTMLDivE
|
|
|
16
16
|
onPageIndexChange: (pageIndex: number) => void;
|
|
17
17
|
/** Invoked with the next page size. */
|
|
18
18
|
onPageSizeChange: (pageSize: number) => void;
|
|
19
|
+
/** Label of the rows-per-page select (also its accessible name). */
|
|
20
|
+
rowsPerPageLabel?: string;
|
|
21
|
+
/** Accessible name of the first-page control. */
|
|
22
|
+
firstPageLabel?: string;
|
|
23
|
+
/** Accessible name of the previous-page control. */
|
|
24
|
+
previousPageLabel?: string;
|
|
25
|
+
/** Accessible name of the next-page control. */
|
|
26
|
+
nextPageLabel?: string;
|
|
27
|
+
/** Accessible name of the last-page control. */
|
|
28
|
+
lastPageLabel?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Builds the page indicator. Receives the 1-based page number and the total
|
|
31
|
+
* page count; `pageCount === 0` means there are no pages.
|
|
32
|
+
*/
|
|
33
|
+
pageLabel?: (page: number, pageCount: number) => string;
|
|
34
|
+
/**
|
|
35
|
+
* Builds the leading row summary. Receives the selected-row count (or
|
|
36
|
+
* `undefined` when selection isn't tracked) and the total row count. Return
|
|
37
|
+
* `null` for no summary.
|
|
38
|
+
*/
|
|
39
|
+
summaryLabel?: (selectedRows: number | undefined, totalRows: number) => string | null;
|
|
19
40
|
}
|
|
20
41
|
declare const TablePagination: React.ForwardRefExoticComponent<TablePaginationProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
42
|
export { TablePagination };
|
|
@@ -12,10 +12,17 @@ export interface TableViewOptionsProps {
|
|
|
12
12
|
columns: TableColumnVisibility[];
|
|
13
13
|
/** Invoked with the column id whose visibility was toggled. */
|
|
14
14
|
onToggle: (id: string) => void;
|
|
15
|
-
/** Trigger label. Defaults to `View`. */
|
|
15
|
+
/** Trigger label. Defaults to `View`. Ignored when `iconOnly`. */
|
|
16
16
|
triggerLabel?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Render the trigger as a cog-only icon button instead of a labelled
|
|
19
|
+
* `Button` — the shape that fits the 48px `TableSettingsCell` column.
|
|
20
|
+
*/
|
|
21
|
+
iconOnly?: boolean;
|
|
22
|
+
/** Accessible name of the `iconOnly` trigger. Override to localize. */
|
|
23
|
+
triggerAriaLabel?: string;
|
|
17
24
|
}
|
|
18
|
-
declare function TableViewOptions({ columns, onToggle, triggerLabel, }: TableViewOptionsProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function TableViewOptions({ columns, onToggle, triggerLabel, iconOnly, triggerAriaLabel, }: TableViewOptionsProps): import("react/jsx-runtime").JSX.Element;
|
|
19
26
|
declare namespace TableViewOptions {
|
|
20
27
|
var displayName: string;
|
|
21
28
|
}
|
|
@@ -31,5 +31,44 @@ export interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElem
|
|
|
31
31
|
wrap?: boolean;
|
|
32
32
|
}
|
|
33
33
|
declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
34
|
+
export interface TableSelectCellProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
35
|
+
/**
|
|
36
|
+
* Render the select-all cell of the header row (`<th>`) instead of a row's
|
|
37
|
+
* selection cell (`<td>`).
|
|
38
|
+
*/
|
|
39
|
+
header?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The row-selection cell (design part `TableCheckbox`) — a fixed 32px column
|
|
43
|
+
* holding a label-less `Checkbox`. Only the leading padding is applied, matching
|
|
44
|
+
* the design (16px padding + a 16px box), so the checkbox sits flush against the
|
|
45
|
+
* first data cell.
|
|
46
|
+
*/
|
|
47
|
+
declare const TableSelectCell: React.ForwardRefExoticComponent<TableSelectCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
48
|
+
export interface TableActionsCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
49
|
+
/**
|
|
50
|
+
* Suppress this row's actions because a selection is in play — the cell
|
|
51
|
+
* still reserves its 48px column (so the grid doesn't reflow) but renders no
|
|
52
|
+
* children and no hover/press tint. Per the design, that means any row is
|
|
53
|
+
* selected, including exactly one. Pass `isBulkSelectionActive(table)` (from
|
|
54
|
+
* the data-table part) rather than re-deriving the threshold.
|
|
55
|
+
*/
|
|
56
|
+
bulkSelectionActive?: boolean;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The trailing row-actions cell (design part `TableActions`) — a fixed 48px
|
|
60
|
+
* column, end-aligned, holding the consumer's overflow trigger (e.g. a
|
|
61
|
+
* `ButtonIcon` with `EllipsisIcon` opening a `DropdownMenu`). The cell itself
|
|
62
|
+
* carries the hover/press tint and the focus ring, per the design.
|
|
63
|
+
*/
|
|
64
|
+
declare const TableActionsCell: React.ForwardRefExoticComponent<TableActionsCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
65
|
+
/**
|
|
66
|
+
* The trailing header cell holding the column-settings trigger (design part
|
|
67
|
+
* `TableSettings`) — a fixed 48px column, end-aligned, holding the consumer's
|
|
68
|
+
* gear trigger (e.g. a `ButtonIcon` with `CogIcon`). Visual states only; what
|
|
69
|
+
* the trigger opens (a column-visibility menu) is the consumer's choice —
|
|
70
|
+
* `TableViewOptions` is the ready-made one.
|
|
71
|
+
*/
|
|
72
|
+
declare const TableSettingsCell: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
34
73
|
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
35
|
-
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
|
74
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableSelectCell, TableActionsCell, TableSettingsCell, TableCaption, };
|