@mintplayer/react-bootstrap 19.26.0 → 19.28.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/accordion/index.mjs +64 -35
- package/accordion/src/BsAccordion.d.ts +19 -19
- package/accordion/src/index.d.ts +1 -0
- package/calendar/index.mjs +107 -9
- package/calendar/src/generated/BsCalendar.generated.d.ts +24 -0
- package/calendar/src/generated/calendar.view.generated.d.ts +14 -0
- package/calendar/src/generated/index.d.ts +1 -0
- package/calendar/src/index.d.ts +2 -1
- package/card/index.mjs +69 -71
- package/card/src/BsCard.d.ts +15 -6
- package/card/src/BsCardBody.d.ts +1 -3
- package/card/src/BsCardFooter.d.ts +4 -5
- package/card/src/BsCardGroup.d.ts +1 -2
- package/card/src/BsCardHeader.d.ts +5 -9
- package/card/src/BsCardImg.d.ts +2 -3
- package/card/src/BsCardLink.d.ts +1 -3
- package/card/src/BsCardSubtitle.d.ts +2 -3
- package/card/src/BsCardText.d.ts +1 -3
- package/card/src/BsCardTitle.d.ts +1 -3
- package/carousel/index.mjs +150 -24
- package/carousel/src/carousel.react.d.ts +5 -0
- package/carousel/src/generated/BsCarousel.generated.d.ts +30 -0
- package/carousel/src/generated/BsCarouselItem.generated.d.ts +6 -0
- package/carousel/src/generated/carousel-item.view.generated.d.ts +14 -0
- package/carousel/src/generated/carousel.view.generated.d.ts +14 -0
- package/carousel/src/generated/index.d.ts +2 -0
- package/carousel/src/index.d.ts +2 -3
- package/charts/hierarchy/index.mjs +178 -15
- package/charts/hierarchy/src/generated/BsHierarchyChart.generated.d.ts +52 -0
- package/charts/hierarchy/src/generated/hierarchy-chart.view.generated.d.ts +14 -0
- package/charts/hierarchy/src/generated/index.d.ts +1 -0
- package/charts/hierarchy/src/index.d.ts +2 -2
- package/charts/sparkline/index.mjs +35 -8
- package/charts/sparkline/src/BsSparkline.d.ts +21 -3
- package/charts/trend/index.mjs +124 -13
- package/charts/trend/src/generated/BsTrendChart.generated.d.ts +28 -0
- package/charts/trend/src/generated/index.d.ts +1 -0
- package/charts/trend/src/generated/trend-chart.view.generated.d.ts +14 -0
- package/charts/trend/src/index.d.ts +2 -2
- package/checkbox/index.mjs +1 -12
- package/checkbox/src/BsCheckbox.d.ts +29 -9
- package/checkbox/src/index.d.ts +1 -0
- package/chunks/BsCheckbox-Bl9Ug6k4.mjs +57 -0
- package/chunks/BsDatatable.generated-JLTLAK_N.mjs +451 -0
- package/chunks/BsDatetimePicker.generated-DI3dZWLN.mjs +206 -0
- package/chunks/BsRadio-C4oy_AGR.mjs +48 -0
- package/chunks/BsSplitterPanel.generated-C0d-JT2N.mjs +87 -0
- package/chunks/BsTreeview.generated-AIvwYLE2.mjs +100 -0
- package/chunks/react-props-D_6lU2Wh.mjs +29 -0
- package/chunks/useMachine-CpK1VckL.mjs +12 -0
- package/code-snippet/index.mjs +118 -13
- package/code-snippet/src/generated/BsCodeSnippet.generated.d.ts +27 -0
- package/code-snippet/src/generated/code-snippet.view.generated.d.ts +14 -0
- package/code-snippet/src/generated/index.d.ts +1 -0
- package/code-snippet/src/index.d.ts +2 -1
- package/datatable/index.mjs +3 -35
- package/datatable/src/generated/BsDatatable.generated.d.ts +79 -0
- package/datatable/src/generated/datatable.view.generated.d.ts +32 -0
- package/datatable/src/generated/index.d.ts +1 -0
- package/datatable/src/index.d.ts +3 -1
- package/datepicker/index.mjs +148 -15
- package/datepicker/src/generated/BsDatepicker.generated.d.ts +35 -0
- package/datepicker/src/generated/datepicker.view.generated.d.ts +14 -0
- package/datepicker/src/generated/index.d.ts +1 -0
- package/datepicker/src/index.d.ts +3 -1
- package/datetime-picker/index.mjs +1 -16
- package/datetime-picker/src/generated/BsDatetimePicker.generated.d.ts +36 -0
- package/datetime-picker/src/generated/datetime-picker.view.generated.d.ts +14 -0
- package/datetime-picker/src/generated/index.d.ts +1 -0
- package/datetime-picker/src/index.d.ts +2 -1
- package/dock/index.mjs +171 -10
- package/dock/src/generated/BsDockManager.generated.d.ts +20 -0
- package/dock/src/generated/dock-manager.view.generated.d.ts +18 -0
- package/dock/src/generated/dock-node.view.generated.d.ts +13 -0
- package/dock/src/generated/index.d.ts +1 -0
- package/dock/src/index.d.ts +3 -1
- package/dropdown-menu/index.mjs +52 -38
- package/dropdown-menu/src/BsDropdownDivider.d.ts +1 -1
- package/dropdown-menu/src/BsDropdownHeader.d.ts +2 -2
- package/dropdown-menu/src/BsDropdownItem.d.ts +7 -10
- package/dropdown-menu/src/BsDropdownMenu.d.ts +15 -17
- package/dropdown-menu/src/index.d.ts +1 -1
- package/file-manager/index.mjs +238 -18
- package/file-manager/src/generated/BsFileManager.generated.d.ts +52 -0
- package/file-manager/src/generated/file-manager.view.generated.d.ts +14 -0
- package/file-manager/src/generated/index.d.ts +1 -0
- package/file-manager/src/index.d.ts +3 -1
- package/input-group/index.mjs +16 -9
- package/input-group/src/BsInputGroup.d.ts +15 -8
- package/machine/index.mjs +65 -1
- package/machine/src/content.d.ts +14 -0
- package/machine/src/core.d.ts +24 -0
- package/machine/src/index.d.ts +2 -0
- package/machine/src/react-props.d.ts +16 -2
- package/multi-range/index.mjs +73 -13
- package/multi-range/src/generated/BsMultiRange.generated.d.ts +28 -0
- package/multi-range/src/generated/index.d.ts +1 -0
- package/multi-range/src/generated/multi-range.view.generated.d.ts +14 -0
- package/multi-range/src/index.d.ts +2 -1
- package/navbar/index.mjs +204 -36
- package/navbar/src/generated/BsNavbar.generated.d.ts +24 -0
- package/navbar/src/generated/BsNavbarDropdown.generated.d.ts +11 -0
- package/navbar/src/generated/BsNavbarItem.generated.d.ts +9 -0
- package/navbar/src/generated/BsNavbarNav.generated.d.ts +8 -0
- package/navbar/src/generated/index.d.ts +4 -0
- package/navbar/src/generated/navbar-dropdown.view.generated.d.ts +17 -0
- package/navbar/src/generated/navbar-item.view.generated.d.ts +14 -0
- package/navbar/src/generated/navbar-nav.view.generated.d.ts +14 -0
- package/navbar/src/generated/navbar.view.generated.d.ts +18 -0
- package/navbar/src/index.d.ts +2 -9
- package/otp-input/index.mjs +83 -13
- package/otp-input/src/generated/BsOtpInput.generated.d.ts +28 -0
- package/otp-input/src/generated/index.d.ts +1 -0
- package/otp-input/src/generated/otp-input.view.generated.d.ts +14 -0
- package/otp-input/src/index.d.ts +2 -1
- package/package.json +7 -6
- package/pagination/index.mjs +43 -9
- package/pagination/src/BsPagination.d.ts +23 -9
- package/phone-input/index.mjs +124 -13
- package/phone-input/src/generated/BsPhoneInput.generated.d.ts +34 -0
- package/phone-input/src/generated/index.d.ts +1 -0
- package/phone-input/src/generated/phone-input.view.generated.d.ts +14 -0
- package/phone-input/src/index.d.ts +2 -1
- package/query-builder/index.mjs +365 -18
- package/query-builder/src/generated/BsQueryBuilder.generated.d.ts +42 -0
- package/query-builder/src/generated/index.d.ts +1 -0
- package/query-builder/src/generated/query-builder-item.view.generated.d.ts +18 -0
- package/query-builder/src/generated/query-builder.view.generated.d.ts +18 -0
- package/query-builder/src/index.d.ts +3 -1
- package/radio/index.mjs +1 -12
- package/radio/src/BsRadio.d.ts +37 -8
- package/radio-group/index.mjs +36 -9
- package/radio-group/src/BsRadioGroup.d.ts +19 -11
- package/ribbon/index.mjs +1048 -99
- package/ribbon/src/generated/BsQuickAccessToolbar.generated.d.ts +8 -0
- package/ribbon/src/generated/BsRibbon.generated.d.ts +30 -0
- package/ribbon/src/generated/BsRibbonButton.generated.d.ts +21 -0
- package/ribbon/src/generated/BsRibbonCheckBox.generated.d.ts +20 -0
- package/ribbon/src/generated/BsRibbonColorPicker.generated.d.ts +20 -0
- package/ribbon/src/generated/BsRibbonComboBox.generated.d.ts +21 -0
- package/ribbon/src/generated/BsRibbonContextualTabSet.generated.d.ts +10 -0
- package/ribbon/src/generated/BsRibbonDropdownButton.generated.d.ts +21 -0
- package/ribbon/src/generated/BsRibbonGallery.generated.d.ts +18 -0
- package/ribbon/src/generated/BsRibbonGalleryItem.generated.d.ts +16 -0
- package/ribbon/src/generated/BsRibbonGroup.generated.d.ts +19 -0
- package/ribbon/src/generated/BsRibbonGroupButton.generated.d.ts +21 -0
- package/ribbon/src/generated/BsRibbonMenuItem.generated.d.ts +19 -0
- package/ribbon/src/generated/BsRibbonMenuSeparator.generated.d.ts +6 -0
- package/ribbon/src/generated/BsRibbonSplitButton.generated.d.ts +25 -0
- package/ribbon/src/generated/BsRibbonTab.generated.d.ts +14 -0
- package/ribbon/src/generated/BsRibbonTemplateItem.generated.d.ts +8 -0
- package/ribbon/src/generated/BsRibbonToggleButton.generated.d.ts +22 -0
- package/ribbon/src/generated/index.d.ts +18 -0
- package/ribbon/src/generated/quick-access-toolbar.view.generated.d.ts +14 -0
- package/ribbon/src/generated/ribbon-button.view.generated.d.ts +16 -0
- package/ribbon/src/generated/ribbon-check-box.view.generated.d.ts +14 -0
- package/ribbon/src/generated/ribbon-color-picker.view.generated.d.ts +14 -0
- package/ribbon/src/generated/ribbon-combo-box.view.generated.d.ts +15 -0
- package/ribbon/src/generated/ribbon-contextual-tab-set.view.generated.d.ts +14 -0
- package/ribbon/src/generated/ribbon-dropdown-button.view.generated.d.ts +16 -0
- package/ribbon/src/generated/ribbon-gallery-item.view.generated.d.ts +16 -0
- package/ribbon/src/generated/ribbon-gallery.view.generated.d.ts +15 -0
- package/ribbon/src/generated/ribbon-group-button.view.generated.d.ts +15 -0
- package/ribbon/src/generated/ribbon-group.view.generated.d.ts +14 -0
- package/ribbon/src/generated/ribbon-menu-item.view.generated.d.ts +16 -0
- package/ribbon/src/generated/ribbon-menu-separator.view.generated.d.ts +14 -0
- package/ribbon/src/generated/ribbon-split-button.view.generated.d.ts +16 -0
- package/ribbon/src/generated/ribbon-tab.view.generated.d.ts +14 -0
- package/ribbon/src/generated/ribbon-template-item.view.generated.d.ts +14 -0
- package/ribbon/src/generated/ribbon-toggle-button.view.generated.d.ts +16 -0
- package/ribbon/src/generated/ribbon.view.generated.d.ts +16 -0
- package/ribbon/src/index.d.ts +3 -1
- package/scheduler/index.mjs +751 -23
- package/scheduler/src/generated/BsScheduler.generated.d.ts +55 -0
- package/scheduler/src/generated/index.d.ts +1 -0
- package/scheduler/src/generated/sched-editor.view.generated.d.ts +13 -0
- package/scheduler/src/generated/sched-month.view.generated.d.ts +13 -0
- package/scheduler/src/generated/sched-popover-event.view.generated.d.ts +13 -0
- package/scheduler/src/generated/sched-popover.view.generated.d.ts +13 -0
- package/scheduler/src/generated/sched-row-panel.view.generated.d.ts +13 -0
- package/scheduler/src/generated/sched-time-grid.view.generated.d.ts +13 -0
- package/scheduler/src/generated/sched-timeline.view.generated.d.ts +13 -0
- package/scheduler/src/generated/sched-year.view.generated.d.ts +13 -0
- package/scheduler/src/generated/scheduler.view.generated.d.ts +14 -0
- package/scheduler/src/index.d.ts +4 -1
- package/select/index.mjs +83 -10
- package/select/src/generated/BsSelect.generated.d.ts +29 -0
- package/select/src/generated/index.d.ts +1 -0
- package/select/src/generated/select.view.generated.d.ts +18 -0
- package/select/src/index.d.ts +2 -1
- package/shell/index.mjs +75 -16
- package/shell/src/BsShell.d.ts +30 -20
- package/shell/src/index.d.ts +2 -2
- package/signature-pad/index.mjs +81 -10
- package/signature-pad/src/generated/BsSignaturePad.generated.d.ts +25 -0
- package/signature-pad/src/generated/index.d.ts +1 -0
- package/signature-pad/src/generated/signature-pad.view.generated.d.ts +14 -0
- package/signature-pad/src/index.d.ts +2 -2
- package/splitter/index.mjs +1 -16
- package/splitter/src/generated/BsSplitter.generated.d.ts +21 -0
- package/splitter/src/generated/BsSplitterPanel.generated.d.ts +6 -0
- package/splitter/src/generated/index.d.ts +2 -0
- package/splitter/src/generated/splitter-panel.view.generated.d.ts +14 -0
- package/splitter/src/generated/splitter.view.generated.d.ts +14 -0
- package/splitter/src/index.d.ts +2 -1
- package/src/index.d.ts +4 -5
- package/tab-control/index.mjs +88 -13
- package/tab-control/src/BsTabControl.d.ts +40 -11
- package/theming/index.mjs +73 -29
- package/theming/src/generated/BsThemeToggle.generated.d.ts +14 -0
- package/theming/src/generated/index.d.ts +1 -0
- package/theming/src/generated/theme-toggle.view.generated.d.ts +14 -0
- package/theming/src/index.d.ts +2 -2
- package/theming/src/useBsTheme.d.ts +2 -2
- package/tile-manager/index.mjs +42 -41
- package/timeline/index.mjs +209 -80
- package/timeline/src/generated/BsTimeline.generated.d.ts +36 -0
- package/timeline/src/generated/BsTimelineItem.generated.d.ts +23 -0
- package/timeline/src/generated/index.d.ts +2 -0
- package/timeline/src/generated/timeline-item.view.generated.d.ts +19 -0
- package/timeline/src/generated/timeline.view.generated.d.ts +39 -0
- package/timeline/src/index.d.ts +3 -4
- package/timepicker/index.mjs +156 -15
- package/timepicker/src/generated/BsTimeList.generated.d.ts +20 -0
- package/timepicker/src/generated/BsTimepicker.generated.d.ts +31 -0
- package/timepicker/src/generated/index.d.ts +2 -0
- package/timepicker/src/generated/time-list.view.generated.d.ts +14 -0
- package/timepicker/src/generated/timepicker.view.generated.d.ts +14 -0
- package/timepicker/src/index.d.ts +2 -2
- package/toggle-button/index.mjs +9 -8
- package/toggle-button/src/BsToggleButton.d.ts +6 -8
- package/toggle-button/src/index.d.ts +1 -1
- package/tree-select/index.mjs +253 -17
- package/tree-select/src/generated/BsTreeSelect.generated.d.ts +46 -0
- package/tree-select/src/generated/index.d.ts +1 -0
- package/tree-select/src/generated/tree-select.view.generated.d.ts +31 -0
- package/tree-select/src/index.d.ts +3 -3
- package/treeview/index.mjs +1 -16
- package/treeview/src/generated/BsTreeview.generated.d.ts +36 -0
- package/treeview/src/generated/index.d.ts +1 -0
- package/treeview/src/generated/treeview.view.generated.d.ts +20 -0
- package/treeview/src/index.d.ts +2 -1
- package/typeahead/index.mjs +87 -76
- package/calendar/src/BsCalendar.d.ts +0 -8
- package/carousel/src/BsCarousel.d.ts +0 -25
- package/charts/hierarchy/src/BsHierarchyChart.d.ts +0 -13
- package/charts/trend/src/BsTrendChart.d.ts +0 -7
- package/chunks/react-props-iXE6Az5D.mjs +0 -27
- package/code-snippet/src/BsCodeSnippet.d.ts +0 -21
- package/datatable/src/BsDatatable.d.ts +0 -85
- package/datepicker/src/BsDatepicker.d.ts +0 -17
- package/datetime-picker/src/BsDatetimePicker.d.ts +0 -13
- package/dock/src/BsDockManager.d.ts +0 -17
- package/file-manager/src/BsFileManager.d.ts +0 -20
- package/multi-range/src/BsMultiRange.d.ts +0 -12
- package/navbar/src/BsNavbar.d.ts +0 -33
- package/navbar/src/BsNavbarBrand.d.ts +0 -17
- package/navbar/src/BsNavbarDropdown.d.ts +0 -23
- package/navbar/src/BsNavbarItem.d.ts +0 -21
- package/otp-input/src/BsOtpInput.d.ts +0 -11
- package/phone-input/src/BsPhoneInput.d.ts +0 -22
- package/query-builder/src/BsQueryBuilder.d.ts +0 -29
- package/react-bootstrap.css +0 -2
- package/ribbon/src/BsRibbon.d.ts +0 -82
- package/scheduler/src/BsScheduler.d.ts +0 -35
- package/select/src/BsSelect.d.ts +0 -15
- package/signature-pad/src/BsSignaturePad.d.ts +0 -11
- package/splitter/src/BsSplitter.d.ts +0 -18
- package/theming/src/BsThemeToggle.d.ts +0 -22
- package/timeline/src/BsTimeline.d.ts +0 -33
- package/timeline/src/BsTimelineItem.d.ts +0 -11
- package/timepicker/src/BsTimeList.d.ts +0 -11
- package/timepicker/src/BsTimepicker.d.ts +0 -11
- package/tree-select/src/BsTreeSelect.d.ts +0 -24
- package/treeview/src/BsTreeview.d.ts +0 -14
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* Plain React `card-subtitle` element. Renders a `div.card-subtitle
|
|
4
|
-
*
|
|
5
|
-
* document sheet. Merges an incoming `className` and spreads remaining props.
|
|
3
|
+
* Plain React `card-subtitle` element. Renders a `div.card-subtitle`; the page
|
|
4
|
+
* baseline styles it. Merges an incoming `className` and spreads remaining props.
|
|
6
5
|
*/
|
|
7
6
|
export declare const BsCardSubtitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
8
7
|
children?: React.ReactNode | undefined;
|
package/card/src/BsCardText.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* Plain React `card-text` element. Renders a `div.card-text`
|
|
4
|
-
* slotted into `<mp-card>` and styled by mp-card's card-anchored
|
|
5
|
-
* document sheet. Merges an incoming `className` and spreads remaining props.
|
|
3
|
+
* Plain React `card-text` element. Renders a `div.card-text`; the page baseline styles it. Merges an incoming `className` and spreads remaining props.
|
|
6
4
|
*/
|
|
7
5
|
export declare const BsCardText: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
8
6
|
children?: React.ReactNode | undefined;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* Plain React `card-title` element. Renders a `div.card-title`
|
|
4
|
-
* slotted into `<mp-card>` and styled by mp-card's card-anchored
|
|
5
|
-
* document sheet. Merges an incoming `className` and spreads remaining props.
|
|
3
|
+
* Plain React `card-title` element. Renders a `div.card-title`; the page baseline styles it. Merges an incoming `className` and spreads remaining props.
|
|
6
4
|
*/
|
|
7
5
|
export declare const BsCardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
8
6
|
children?: React.ReactNode | undefined;
|
package/carousel/index.mjs
CHANGED
|
@@ -1,28 +1,154 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
onAnimationStart: "animation-start",
|
|
14
|
-
onAnimationEnd: "animation-end"
|
|
15
|
-
}
|
|
16
|
-
}), a = e.forwardRef(function({ indicators: e, interval: t, wrap: r, keyboardEvents: a, paused: o, ...s }, c) {
|
|
17
|
-
return /* @__PURE__ */ n(i, {
|
|
1
|
+
import { r as e, t } from "../chunks/react-props-D_6lU2Wh.mjs";
|
|
2
|
+
import { useCore as n } from "../machine/index.mjs";
|
|
3
|
+
import * as r from "react";
|
|
4
|
+
import { Children as i, Fragment as a, forwardRef as o, isValidElement as s, useImperativeHandle as c, useRef as l } from "react";
|
|
5
|
+
import { installLightStyles as u } from "@mintplayer/ui-core/scoped-styles";
|
|
6
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
+
import { carouselCore as m, carouselItemCore as h, carouselScopedStyles as g } from "@mintplayer/ui-core/carousel";
|
|
8
|
+
//#region libs/mintplayer-react-bootstrap/carousel/src/generated/carousel.view.generated.tsx
|
|
9
|
+
function _({ view: n, slots: i = {}, children: a, className: o, attrs: s, rootRef: c }) {
|
|
10
|
+
return /* @__PURE__ */ f(d, { children: /* @__PURE__ */ p("div", {
|
|
11
|
+
"data-mps": "carousel",
|
|
12
|
+
...e(n.root),
|
|
18
13
|
ref: c,
|
|
19
|
-
...
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
...s,
|
|
15
|
+
role: n.root.role ?? s?.role,
|
|
16
|
+
className: [n.root.class, o].filter(Boolean).join(" ") || void 0,
|
|
17
|
+
children: [
|
|
18
|
+
n.playPause ? /* @__PURE__ */ f(d, { children: /* @__PURE__ */ f("div", {
|
|
19
|
+
"data-mps": "carousel",
|
|
20
|
+
...e(n.playPause.wrap),
|
|
21
|
+
children: /* @__PURE__ */ f("button", {
|
|
22
|
+
"data-mps": "carousel",
|
|
23
|
+
...e(n.playPause.button),
|
|
24
|
+
children: /* @__PURE__ */ f("span", {
|
|
25
|
+
"data-mps": "carousel",
|
|
26
|
+
...e(n.playPause.icon)
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
}) }) : null,
|
|
30
|
+
n.radios.map((e, n) => /* @__PURE__ */ f(r.Fragment, { children: /* @__PURE__ */ f("input", {
|
|
31
|
+
"data-mps": "carousel",
|
|
32
|
+
...t(e.bag)
|
|
33
|
+
}) }, e.key)),
|
|
34
|
+
/* @__PURE__ */ f("div", {
|
|
35
|
+
"data-mps": "carousel",
|
|
36
|
+
...e(n.inner),
|
|
37
|
+
children: /* @__PURE__ */ f("div", {
|
|
38
|
+
"data-mps": "carousel",
|
|
39
|
+
...e(n.track),
|
|
40
|
+
children: a ?? null
|
|
41
|
+
})
|
|
42
|
+
}),
|
|
43
|
+
n.indicators ? /* @__PURE__ */ f(d, { children: /* @__PURE__ */ f("div", {
|
|
44
|
+
"data-mps": "carousel",
|
|
45
|
+
...e(n.indicators.bag),
|
|
46
|
+
children: n.indicators.items.map((t, n) => /* @__PURE__ */ f(r.Fragment, { children: /* @__PURE__ */ f("label", {
|
|
47
|
+
"data-mps": "carousel",
|
|
48
|
+
...e(t.bag)
|
|
49
|
+
}) }, t.key))
|
|
50
|
+
}) }) : null,
|
|
51
|
+
/* @__PURE__ */ f("div", {
|
|
52
|
+
"data-mps": "carousel",
|
|
53
|
+
...e(n.controls.bag),
|
|
54
|
+
children: n.controls.pairs.map((t, i) => /* @__PURE__ */ f(r.Fragment, { children: /* @__PURE__ */ p("span", {
|
|
55
|
+
"data-mps": "carousel",
|
|
56
|
+
...e(t.pair),
|
|
57
|
+
children: [/* @__PURE__ */ f("label", {
|
|
58
|
+
"data-mps": "carousel",
|
|
59
|
+
...e(t.prev),
|
|
60
|
+
children: /* @__PURE__ */ f("span", {
|
|
61
|
+
"data-mps": "carousel",
|
|
62
|
+
...e(n.controls.icon.prev)
|
|
63
|
+
})
|
|
64
|
+
}), /* @__PURE__ */ f("label", {
|
|
65
|
+
"data-mps": "carousel",
|
|
66
|
+
...e(t.next),
|
|
67
|
+
children: /* @__PURE__ */ f("span", {
|
|
68
|
+
"data-mps": "carousel",
|
|
69
|
+
...e(n.controls.icon.next)
|
|
70
|
+
})
|
|
71
|
+
})]
|
|
72
|
+
}) }, t.key))
|
|
73
|
+
})
|
|
74
|
+
]
|
|
75
|
+
}) });
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region libs/mintplayer-react-bootstrap/carousel/src/carousel.react.ts
|
|
79
|
+
function v(e) {
|
|
80
|
+
return i.toArray(e).reduce((e, t) => s(t) ? t.type === a ? e + v(t.props.children) : e + 1 : e, 0);
|
|
81
|
+
}
|
|
82
|
+
function y(e, { children: t }) {
|
|
83
|
+
return {
|
|
84
|
+
...e,
|
|
85
|
+
slideCount: v(t)
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region libs/mintplayer-react-bootstrap/carousel/src/generated/BsCarousel.generated.tsx
|
|
90
|
+
var b = o(function({ animation: e = "slide", orientation: t = "horizontal", indicators: r = !1, interval: i = null, wrap: a = !0, keyboardEvents: o = !0, paused: s = !1, inputLabel: d = null, labels: p = null, onSlideChange: h, onPausedChange: v, onSlideStart: b, onSlideEnd: x, className: S, children: C, ...w }, T) {
|
|
91
|
+
u("carousel", g);
|
|
92
|
+
let E = l(null);
|
|
93
|
+
c(T, () => E.current);
|
|
94
|
+
let D = n(m, y({
|
|
95
|
+
animation: e,
|
|
96
|
+
orientation: t,
|
|
97
|
+
indicators: r,
|
|
98
|
+
interval: i,
|
|
99
|
+
wrap: a,
|
|
100
|
+
keyboardEvents: o,
|
|
101
|
+
paused: s,
|
|
102
|
+
inputLabel: d,
|
|
103
|
+
labels: p
|
|
104
|
+
}, { children: C }), {
|
|
105
|
+
idPrefix: "bs-carousel",
|
|
106
|
+
label: w["aria-label"],
|
|
107
|
+
rootRef: E,
|
|
108
|
+
emit: (e, t) => {
|
|
109
|
+
e === "slideChange" && h?.(t), e === "pausedChange" && v?.(t), e === "slideStart" && b?.(t), e === "slideEnd" && x?.(t);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
return /* @__PURE__ */ f(_, {
|
|
113
|
+
...D.props,
|
|
114
|
+
className: S,
|
|
115
|
+
attrs: w,
|
|
116
|
+
rootRef: E,
|
|
117
|
+
children: C
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region libs/mintplayer-react-bootstrap/carousel/src/generated/carousel-item.view.generated.tsx
|
|
122
|
+
function x({ view: t, slots: n = {}, children: r, className: i, attrs: a, rootRef: o }) {
|
|
123
|
+
return /* @__PURE__ */ f(d, { children: /* @__PURE__ */ f("div", {
|
|
124
|
+
"data-mps": "carousel",
|
|
125
|
+
...e(t.root),
|
|
126
|
+
ref: o,
|
|
127
|
+
...a,
|
|
128
|
+
role: t.root.role ?? a?.role,
|
|
129
|
+
className: [t.root.class, i].filter(Boolean).join(" ") || void 0,
|
|
130
|
+
children: r ?? null
|
|
131
|
+
}) });
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region libs/mintplayer-react-bootstrap/carousel/src/generated/BsCarouselItem.generated.tsx
|
|
135
|
+
var S = o(function({ className: e, children: t, ...r }, i) {
|
|
136
|
+
u("carousel", g);
|
|
137
|
+
let a = l(null);
|
|
138
|
+
c(i, () => a.current);
|
|
139
|
+
let o = n(h, {}, {
|
|
140
|
+
idPrefix: "bs-carousel-item",
|
|
141
|
+
label: r["aria-label"],
|
|
142
|
+
rootRef: a,
|
|
143
|
+
emit: () => void 0
|
|
144
|
+
});
|
|
145
|
+
return /* @__PURE__ */ f(x, {
|
|
146
|
+
...o.props,
|
|
147
|
+
className: e,
|
|
148
|
+
attrs: r,
|
|
149
|
+
rootRef: a,
|
|
150
|
+
children: t
|
|
25
151
|
});
|
|
26
152
|
});
|
|
27
153
|
//#endregion
|
|
28
|
-
export {
|
|
154
|
+
export { b as BsCarousel, S as BsCarouselItem };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CarouselInputs, CarouselSlideChangeEventDetail } from '@mintplayer/ui-core/carousel';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface BsCarouselProps extends Omit<React.HTMLAttributes<HTMLElementTagNameMap['div']>, 'animation' | 'orientation' | 'indicators' | 'interval' | 'wrap' | 'keyboardEvents' | 'paused' | 'inputLabel' | 'labels' | 'onSlideChange' | 'onPausedChange' | 'onSlideStart' | 'onSlideEnd'> {
|
|
4
|
+
animation?: CarouselInputs['animation'];
|
|
5
|
+
orientation?: CarouselInputs['orientation'];
|
|
6
|
+
indicators?: CarouselInputs['indicators'];
|
|
7
|
+
interval?: CarouselInputs['interval'];
|
|
8
|
+
wrap?: CarouselInputs['wrap'];
|
|
9
|
+
keyboardEvents?: CarouselInputs['keyboardEvents'];
|
|
10
|
+
paused?: CarouselInputs['paused'];
|
|
11
|
+
inputLabel?: CarouselInputs['inputLabel'];
|
|
12
|
+
labels?: CarouselInputs['labels'];
|
|
13
|
+
/** The committed slide changed. */
|
|
14
|
+
onSlideChange?: (detail: CarouselSlideChangeEventDetail) => void;
|
|
15
|
+
/** Autoplay was paused or resumed from the play/pause button or a method. */
|
|
16
|
+
onPausedChange?: (detail: boolean) => void;
|
|
17
|
+
/** A slide transition started. */
|
|
18
|
+
onSlideStart?: (detail: void) => void;
|
|
19
|
+
/** A slide transition ended. */
|
|
20
|
+
onSlideEnd?: (detail: void) => void;
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A deck of slides shown one at a time, with optional indicators, autoplay, touch swipe and keyboard.
|
|
25
|
+
*
|
|
26
|
+
* Put carousel items inside. A radio per slide holds the index, so the server render navigates with
|
|
27
|
+
* JavaScript off (indicators, prev/next with wrap-around, the radio group arrow keys). Slides are
|
|
28
|
+
* grid-stacked: the deck is as tall as its tallest slide. An `aria-label` names the region.
|
|
29
|
+
*/
|
|
30
|
+
export declare const BsCarousel: React.ForwardRefExoticComponent<BsCarouselProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface BsCarouselItemProps extends Omit<React.HTMLAttributes<HTMLElementTagNameMap['div']>, never> {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
/** One slide of a carousel. Its content is the slide. */
|
|
6
|
+
export declare const BsCarouselItem: React.ForwardRefExoticComponent<BsCarouselItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CarouselItemView } from '@mintplayer/ui-core/carousel';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type CarouselItemTemplateProps = {
|
|
4
|
+
view: CarouselItemView;
|
|
5
|
+
} & {
|
|
6
|
+
slots?: {};
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
/** Merged onto the root element after the bag. */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** The consumer's remaining attributes, spread onto the root element. */
|
|
11
|
+
attrs?: Record<string, unknown>;
|
|
12
|
+
rootRef?: React.Ref<HTMLElementTagNameMap['div']>;
|
|
13
|
+
};
|
|
14
|
+
export declare function CarouselItemTemplate({ view, slots, children, className, attrs, rootRef }: CarouselItemTemplateProps): React.ReactElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CarouselView } from '@mintplayer/ui-core/carousel';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type CarouselTemplateProps = {
|
|
4
|
+
view: CarouselView;
|
|
5
|
+
} & {
|
|
6
|
+
slots?: {};
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
/** Merged onto the root element after the bag. */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** The consumer's remaining attributes, spread onto the root element. */
|
|
11
|
+
attrs?: Record<string, unknown>;
|
|
12
|
+
rootRef?: React.Ref<HTMLElementTagNameMap['div']>;
|
|
13
|
+
};
|
|
14
|
+
export declare function CarouselTemplate({ view, slots, children, className, attrs, rootRef }: CarouselTemplateProps): React.ReactElement;
|
package/carousel/src/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export type {
|
|
3
|
-
export type { CarouselAnimation, CarouselOrientation, CarouselSlideChangeEventDetail, CarouselPausedChangeEventDetail, } from '@mintplayer/web-components/carousel';
|
|
1
|
+
export * from './generated';
|
|
2
|
+
export type { CarouselAnimation, CarouselLabels, CarouselOrientation, CarouselSlideChangeEventDetail, } from '@mintplayer/ui-core/carousel';
|
|
@@ -1,17 +1,180 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { i as e, r as t } from "../../chunks/react-props-D_6lU2Wh.mjs";
|
|
2
|
+
import { useCore as n } from "../../machine/index.mjs";
|
|
3
|
+
import * as r from "react";
|
|
4
|
+
import { forwardRef as i, useImperativeHandle as a, useRef as o } from "react";
|
|
5
|
+
import { installLightStyles as s } from "@mintplayer/ui-core/scoped-styles";
|
|
6
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
|
+
import { hierarchyChartCore as d, hierarchyChartScopedStyles as f } from "@mintplayer/ui-core/charts/hierarchy";
|
|
8
|
+
//#region libs/mintplayer-react-bootstrap/charts/hierarchy/src/generated/hierarchy-chart.view.generated.tsx
|
|
9
|
+
function p({ view: n, slots: i = {}, children: a, className: o, attrs: s, rootRef: d }) {
|
|
10
|
+
return /* @__PURE__ */ l(c, { children: /* @__PURE__ */ u("div", {
|
|
11
|
+
"data-mps": "hierarchy-chart",
|
|
12
|
+
...t(n.root),
|
|
13
|
+
ref: d,
|
|
14
|
+
...s,
|
|
15
|
+
role: n.root.role ?? s?.role,
|
|
16
|
+
className: [n.root.class, o].filter(Boolean).join(" ") || void 0,
|
|
17
|
+
children: [n.breadcrumb ? /* @__PURE__ */ l(c, { children: /* @__PURE__ */ l("nav", {
|
|
18
|
+
"data-mps": "hierarchy-chart",
|
|
19
|
+
...t(n.breadcrumb.nav),
|
|
20
|
+
children: n.breadcrumb.items.map((e, n) => /* @__PURE__ */ u(r.Fragment, { children: [
|
|
21
|
+
e.current ? /* @__PURE__ */ l(c, { children: /* @__PURE__ */ l("span", {
|
|
22
|
+
"data-mps": "hierarchy-chart",
|
|
23
|
+
...t(e.current),
|
|
24
|
+
children: e.text
|
|
25
|
+
}) }) : null,
|
|
26
|
+
e.button ? /* @__PURE__ */ l(c, { children: /* @__PURE__ */ l("button", {
|
|
27
|
+
"data-mps": "hierarchy-chart",
|
|
28
|
+
...t(e.button),
|
|
29
|
+
children: e.text
|
|
30
|
+
}) }) : null,
|
|
31
|
+
e.sep ? /* @__PURE__ */ l(c, { children: /* @__PURE__ */ l("span", {
|
|
32
|
+
"data-mps": "hierarchy-chart",
|
|
33
|
+
...t(e.sep),
|
|
34
|
+
children: "/"
|
|
35
|
+
}) }) : null
|
|
36
|
+
] }, e.key))
|
|
37
|
+
}) }) : null, /* @__PURE__ */ u("div", {
|
|
38
|
+
"data-mps": "hierarchy-chart",
|
|
39
|
+
...t(n.chart),
|
|
40
|
+
style: e(n.chartStyle),
|
|
41
|
+
children: [
|
|
42
|
+
n.sunburst ? /* @__PURE__ */ l(c, { children: /* @__PURE__ */ l("svg", {
|
|
43
|
+
"data-mps": "hierarchy-chart",
|
|
44
|
+
...t(n.sunburst.svg),
|
|
45
|
+
children: /* @__PURE__ */ u("g", {
|
|
46
|
+
"data-mps": "hierarchy-chart",
|
|
47
|
+
...t(n.sunburst.g),
|
|
48
|
+
children: [n.sunburst.arcs.map((e, n) => /* @__PURE__ */ l(r.Fragment, { children: /* @__PURE__ */ l("path", {
|
|
49
|
+
"data-mps": "hierarchy-chart",
|
|
50
|
+
...t(e.bag)
|
|
51
|
+
}) }, e.key)), n.sunburst.labels.map((e, n) => /* @__PURE__ */ l(r.Fragment, { children: /* @__PURE__ */ l("text", {
|
|
52
|
+
"data-mps": "hierarchy-chart",
|
|
53
|
+
...t(e.bag),
|
|
54
|
+
children: e.text
|
|
55
|
+
}) }, e.key))]
|
|
56
|
+
})
|
|
57
|
+
}) }) : null,
|
|
58
|
+
n.sunburst ? /* @__PURE__ */ l(c, { children: /* @__PURE__ */ l("button", {
|
|
59
|
+
"data-mps": "hierarchy-chart",
|
|
60
|
+
...t(n.sunburst.center.bag),
|
|
61
|
+
style: e(n.sunburst.center.style),
|
|
62
|
+
children: n.sunburst.center.text
|
|
63
|
+
}) }) : null,
|
|
64
|
+
n.icicle ? /* @__PURE__ */ l(c, { children: /* @__PURE__ */ u("div", {
|
|
65
|
+
"data-mps": "hierarchy-chart",
|
|
66
|
+
...t(n.icicle.tree),
|
|
67
|
+
children: [/* @__PURE__ */ l("div", {
|
|
68
|
+
"data-mps": "hierarchy-chart",
|
|
69
|
+
...t(n.icicle.focus.bag),
|
|
70
|
+
style: e(n.icicle.focus.style),
|
|
71
|
+
children: n.icicle.focus.label === null ? null : /* @__PURE__ */ l(c, { children: /* @__PURE__ */ l("span", {
|
|
72
|
+
"data-mps": "hierarchy-chart",
|
|
73
|
+
...t(n.cellLabel),
|
|
74
|
+
children: n.icicle.focus.label
|
|
75
|
+
}) })
|
|
76
|
+
}), n.icicle.cells.map((i, a) => /* @__PURE__ */ l(r.Fragment, { children: /* @__PURE__ */ l("div", {
|
|
77
|
+
"data-mps": "hierarchy-chart",
|
|
78
|
+
...t(i.bag),
|
|
79
|
+
style: e(i.style),
|
|
80
|
+
children: i.label === null ? null : /* @__PURE__ */ l(c, { children: /* @__PURE__ */ l("span", {
|
|
81
|
+
"data-mps": "hierarchy-chart",
|
|
82
|
+
...t(n.cellLabel),
|
|
83
|
+
children: i.label
|
|
84
|
+
}) })
|
|
85
|
+
}) }, i.key))]
|
|
86
|
+
}) }) : null,
|
|
87
|
+
n.treemap ? /* @__PURE__ */ l(c, { children: /* @__PURE__ */ u("div", {
|
|
88
|
+
"data-mps": "hierarchy-chart",
|
|
89
|
+
...t(n.treemap.wrap),
|
|
90
|
+
children: [/* @__PURE__ */ l("button", {
|
|
91
|
+
"data-mps": "hierarchy-chart",
|
|
92
|
+
...t(n.treemap.header.bag),
|
|
93
|
+
children: n.treemap.header.text
|
|
94
|
+
}), /* @__PURE__ */ l("div", {
|
|
95
|
+
"data-mps": "hierarchy-chart",
|
|
96
|
+
...t(n.treemap.body),
|
|
97
|
+
children: n.treemap.cells.map((i, a) => /* @__PURE__ */ l(r.Fragment, { children: /* @__PURE__ */ l("div", {
|
|
98
|
+
"data-mps": "hierarchy-chart",
|
|
99
|
+
...t(i.bag),
|
|
100
|
+
style: e(i.style),
|
|
101
|
+
children: i.label === null ? null : /* @__PURE__ */ l(c, { children: /* @__PURE__ */ l("span", {
|
|
102
|
+
"data-mps": "hierarchy-chart",
|
|
103
|
+
...t(n.cellLabel),
|
|
104
|
+
children: i.label
|
|
105
|
+
}) })
|
|
106
|
+
}) }, i.key))
|
|
107
|
+
})]
|
|
108
|
+
}) }) : null,
|
|
109
|
+
/* @__PURE__ */ l("div", {
|
|
110
|
+
"data-mps": "hierarchy-chart",
|
|
111
|
+
...t(n.tooltip.bag),
|
|
112
|
+
style: e(n.tooltip.style),
|
|
113
|
+
children: n.tooltip.text
|
|
114
|
+
}),
|
|
115
|
+
n.hint ? /* @__PURE__ */ l(c, { children: /* @__PURE__ */ l("div", {
|
|
116
|
+
"data-mps": "hierarchy-chart",
|
|
117
|
+
...t(n.hint.bag),
|
|
118
|
+
children: n.hint.text
|
|
119
|
+
}) }) : null,
|
|
120
|
+
/* @__PURE__ */ l("div", {
|
|
121
|
+
"data-mps": "hierarchy-chart",
|
|
122
|
+
...t(n.live),
|
|
123
|
+
children: n.announcement
|
|
124
|
+
})
|
|
125
|
+
]
|
|
126
|
+
})]
|
|
127
|
+
}) });
|
|
128
|
+
}
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region libs/mintplayer-react-bootstrap/charts/hierarchy/src/generated/BsHierarchyChart.generated.tsx
|
|
131
|
+
var m = i(function({ data: e = null, layout: t = "sunburst", rootId: r = null, maxDepth: i = null, minAngle: c = .2, minSize: u = 4, showLabels: m = !0, labelFontSize: h = 12, backdrop: g = null, colorMin: _ = 0, colorMax: v = 100, colorStart: y = "#fe0000", colorEnd: b = "#21b577", transitionDuration: x = 300, locale: S = null, zoomGestures: C = "wheel pinch", zoomHintLabel: w = null, showBreadcrumb: T = !1, breadcrumbLabel: E = "Chart path", zoomOutLabel: D = "Zoom out one level", metricUnitLabel: O = "%", valueUnitLabel: k = "", loadingLabel: A = "Loading", inputLabel: j = null, tooltipFormatter: M = null, labelFormatter: N = null, loadChildren: P = null, onRootIdChange: F, onZoom: I, onNodeSelect: L, onNodeHover: R, onNodeLoadError: z, className: B, children: V, ...H }, U) {
|
|
132
|
+
s("hierarchy-chart", f);
|
|
133
|
+
let W = o(null);
|
|
134
|
+
a(U, () => W.current);
|
|
135
|
+
let G = n(d, {
|
|
136
|
+
data: e,
|
|
137
|
+
layout: t,
|
|
138
|
+
rootId: r,
|
|
139
|
+
maxDepth: i,
|
|
140
|
+
minAngle: c,
|
|
141
|
+
minSize: u,
|
|
142
|
+
showLabels: m,
|
|
143
|
+
labelFontSize: h,
|
|
144
|
+
backdrop: g,
|
|
145
|
+
colorMin: _,
|
|
146
|
+
colorMax: v,
|
|
147
|
+
colorStart: y,
|
|
148
|
+
colorEnd: b,
|
|
149
|
+
transitionDuration: x,
|
|
150
|
+
locale: S,
|
|
151
|
+
zoomGestures: C,
|
|
152
|
+
zoomHintLabel: w,
|
|
153
|
+
showBreadcrumb: T,
|
|
154
|
+
breadcrumbLabel: E,
|
|
155
|
+
zoomOutLabel: D,
|
|
156
|
+
metricUnitLabel: O,
|
|
157
|
+
valueUnitLabel: k,
|
|
158
|
+
loadingLabel: A,
|
|
159
|
+
inputLabel: j,
|
|
160
|
+
tooltipFormatter: M,
|
|
161
|
+
labelFormatter: N,
|
|
162
|
+
loadChildren: P
|
|
163
|
+
}, {
|
|
164
|
+
idPrefix: "bs-hierarchy-chart",
|
|
165
|
+
label: H["aria-label"],
|
|
166
|
+
rootRef: W,
|
|
167
|
+
emit: (e, t) => {
|
|
168
|
+
e === "rootIdChange" && F?.(t), e === "zoom" && I?.(t), e === "nodeSelect" && L?.(t), e === "nodeHover" && R?.(t), e === "nodeLoadError" && z?.(t);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
return /* @__PURE__ */ l(p, {
|
|
172
|
+
...G.props,
|
|
173
|
+
className: B,
|
|
174
|
+
attrs: H,
|
|
175
|
+
rootRef: W,
|
|
176
|
+
children: V
|
|
177
|
+
});
|
|
15
178
|
});
|
|
16
179
|
//#endregion
|
|
17
|
-
export {
|
|
180
|
+
export { m as BsHierarchyChart };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { HierarchyChartInputs, HierarchyHoverEventDetail, HierarchyLoadErrorEventDetail, HierarchyNodeEventDetail } from '@mintplayer/ui-core/charts/hierarchy';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface BsHierarchyChartProps extends Omit<React.HTMLAttributes<HTMLElementTagNameMap['div']>, 'data' | 'layout' | 'rootId' | 'maxDepth' | 'minAngle' | 'minSize' | 'showLabels' | 'labelFontSize' | 'backdrop' | 'colorMin' | 'colorMax' | 'colorStart' | 'colorEnd' | 'transitionDuration' | 'locale' | 'zoomGestures' | 'zoomHintLabel' | 'showBreadcrumb' | 'breadcrumbLabel' | 'zoomOutLabel' | 'metricUnitLabel' | 'valueUnitLabel' | 'loadingLabel' | 'inputLabel' | 'tooltipFormatter' | 'labelFormatter' | 'loadChildren' | 'onRootIdChange' | 'onZoom' | 'onNodeSelect' | 'onNodeHover' | 'onNodeLoadError'> {
|
|
4
|
+
data?: HierarchyChartInputs['data'];
|
|
5
|
+
layout?: HierarchyChartInputs['layout'];
|
|
6
|
+
rootId?: HierarchyChartInputs['rootId'];
|
|
7
|
+
/** A positive number, or `auto`. */
|
|
8
|
+
maxDepth?: HierarchyChartInputs['maxDepth'];
|
|
9
|
+
minAngle?: HierarchyChartInputs['minAngle'];
|
|
10
|
+
minSize?: HierarchyChartInputs['minSize'];
|
|
11
|
+
showLabels?: HierarchyChartInputs['showLabels'];
|
|
12
|
+
labelFontSize?: HierarchyChartInputs['labelFontSize'];
|
|
13
|
+
backdrop?: HierarchyChartInputs['backdrop'];
|
|
14
|
+
colorMin?: HierarchyChartInputs['colorMin'];
|
|
15
|
+
colorMax?: HierarchyChartInputs['colorMax'];
|
|
16
|
+
colorStart?: HierarchyChartInputs['colorStart'];
|
|
17
|
+
colorEnd?: HierarchyChartInputs['colorEnd'];
|
|
18
|
+
transitionDuration?: HierarchyChartInputs['transitionDuration'];
|
|
19
|
+
locale?: HierarchyChartInputs['locale'];
|
|
20
|
+
zoomGestures?: HierarchyChartInputs['zoomGestures'];
|
|
21
|
+
zoomHintLabel?: HierarchyChartInputs['zoomHintLabel'];
|
|
22
|
+
showBreadcrumb?: HierarchyChartInputs['showBreadcrumb'];
|
|
23
|
+
breadcrumbLabel?: HierarchyChartInputs['breadcrumbLabel'];
|
|
24
|
+
zoomOutLabel?: HierarchyChartInputs['zoomOutLabel'];
|
|
25
|
+
metricUnitLabel?: HierarchyChartInputs['metricUnitLabel'];
|
|
26
|
+
valueUnitLabel?: HierarchyChartInputs['valueUnitLabel'];
|
|
27
|
+
loadingLabel?: HierarchyChartInputs['loadingLabel'];
|
|
28
|
+
inputLabel?: HierarchyChartInputs['inputLabel'];
|
|
29
|
+
tooltipFormatter?: HierarchyChartInputs['tooltipFormatter'];
|
|
30
|
+
labelFormatter?: HierarchyChartInputs['labelFormatter'];
|
|
31
|
+
loadChildren?: HierarchyChartInputs['loadChildren'];
|
|
32
|
+
/** The focus node changed (null: the tree root). */
|
|
33
|
+
onRootIdChange?: (detail: string | null) => void;
|
|
34
|
+
/** The chart re-rooted on a node; the detail has its path. */
|
|
35
|
+
onZoom?: (detail: HierarchyNodeEventDetail) => void;
|
|
36
|
+
/** A leaf was clicked or activated with Enter. */
|
|
37
|
+
onNodeSelect?: (detail: HierarchyNodeEventDetail) => void;
|
|
38
|
+
/** The hovered node changed (`node` null when the pointer leaves). */
|
|
39
|
+
onNodeHover?: (detail: HierarchyHoverEventDetail) => void;
|
|
40
|
+
/** A lazy `loadChildren` call rejected; activating the node retries. */
|
|
41
|
+
onNodeLoadError?: (detail: HierarchyLoadErrorEventDetail) => void;
|
|
42
|
+
children?: React.ReactNode;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* One weighted tree, three projections: `layout` is sunburst, icicle or treemap.
|
|
46
|
+
*
|
|
47
|
+
* Size follows the summed leaf `value`, colour follows `colorValue`. Click, Enter or a breadcrumb re-roots
|
|
48
|
+
* on a node (two-way `rootId`); ctrl/cmd+wheel, pinch and `+` / `-` / `0` magnify it geometrically.
|
|
49
|
+
* Every node is a treeitem: arrows move between siblings (Down goes outward), Escape and Backspace zoom out.
|
|
50
|
+
* The server renders the finished chart at a 420px fallback scale, its controls inert until it is live.
|
|
51
|
+
*/
|
|
52
|
+
export declare const BsHierarchyChart: React.ForwardRefExoticComponent<BsHierarchyChartProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HierarchyChartView } from '@mintplayer/ui-core/charts/hierarchy';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type HierarchyChartTemplateProps = {
|
|
4
|
+
view: HierarchyChartView;
|
|
5
|
+
} & {
|
|
6
|
+
slots?: {};
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
/** Merged onto the root element after the bag. */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** The consumer's remaining attributes, spread onto the root element. */
|
|
11
|
+
attrs?: Record<string, unknown>;
|
|
12
|
+
rootRef?: React.Ref<HTMLElementTagNameMap['div']>;
|
|
13
|
+
};
|
|
14
|
+
export declare function HierarchyChartTemplate({ view, slots, children, className, attrs, rootRef }: HierarchyChartTemplateProps): React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BsHierarchyChart, type BsHierarchyChartProps } from './BsHierarchyChart.generated';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export type {
|
|
1
|
+
export * from './generated';
|
|
2
|
+
export type { HierarchyChartLayout, HierarchyChildrenLoader, HierarchyHoverEventDetail, HierarchyLoadErrorEventDetail, HierarchyNode, HierarchyNodeEventDetail, HierarchyNodeFormatter, } from '@mintplayer/ui-core/charts/hierarchy';
|
|
@@ -1,11 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { r as e } from "../../chunks/react-props-D_6lU2Wh.mjs";
|
|
2
|
+
import { forwardRef as t, useEffect as n, useImperativeHandle as r, useRef as i, useState as a } from "react";
|
|
3
|
+
import { installLightStyles as o } from "@mintplayer/ui-core/scoped-styles";
|
|
4
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
5
|
+
import { SPARKLINE_SCOPE as l, connectSparkline as u, sparklineScopedStyles as d } from "@mintplayer/ui-core/charts/sparkline";
|
|
4
6
|
//#region libs/mintplayer-react-bootstrap/charts/sparkline/src/BsSparkline.tsx
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
var f = t(function({ points: t = [], area: f, showLastDot: p, yMin: m, yMax: h, locale: g, inputLabel: _, summaryFormatter: v, className: y, "aria-label": b, ...x }, S) {
|
|
8
|
+
o(l, d);
|
|
9
|
+
let C = i(null);
|
|
10
|
+
r(S, () => C.current);
|
|
11
|
+
let [w, T] = a(void 0);
|
|
12
|
+
n(() => T(C.current?.closest("[lang]")?.getAttribute("lang") ?? void 0), []);
|
|
13
|
+
let E = u(t, {
|
|
14
|
+
area: f,
|
|
15
|
+
showLastDot: p,
|
|
16
|
+
yMin: m,
|
|
17
|
+
yMax: h,
|
|
18
|
+
locale: g ?? w,
|
|
19
|
+
label: b ?? _,
|
|
20
|
+
summaryFormatter: v
|
|
21
|
+
}), { class: D, ...O } = E.root;
|
|
22
|
+
return /* @__PURE__ */ s("span", {
|
|
23
|
+
ref: C,
|
|
24
|
+
...e(O),
|
|
25
|
+
...x,
|
|
26
|
+
className: [String(D), y].filter(Boolean).join(" "),
|
|
27
|
+
children: E.svg && /* @__PURE__ */ c("svg", {
|
|
28
|
+
...e(E.svg),
|
|
29
|
+
children: [
|
|
30
|
+
E.fill && /* @__PURE__ */ s("path", { ...e(E.fill) }),
|
|
31
|
+
/* @__PURE__ */ s("path", { ...e(E.line) }),
|
|
32
|
+
E.dot && /* @__PURE__ */ s("circle", { ...e(E.dot) })
|
|
33
|
+
]
|
|
34
|
+
})
|
|
35
|
+
});
|
|
9
36
|
});
|
|
10
37
|
//#endregion
|
|
11
|
-
export {
|
|
38
|
+
export { f as BsSparkline };
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface BsSparklineProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> {
|
|
3
|
+
/** `null` renders a gap. */
|
|
4
|
+
points?: (number | null)[];
|
|
5
|
+
area?: boolean;
|
|
6
|
+
showLastDot?: boolean;
|
|
7
|
+
yMin?: number;
|
|
8
|
+
yMax?: number;
|
|
9
|
+
/** Number formatting for the generated name. Defaults to the nearest `lang` once mounted. */
|
|
10
|
+
locale?: string;
|
|
11
|
+
inputLabel?: string;
|
|
12
|
+
summaryFormatter?: (points: (number | null)[]) => string | undefined;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* An axis-less inline trend for table cells (#437), rendered from
|
|
16
|
+
* `@mintplayer/ui-core/charts/sparkline`, so the server HTML is the finished
|
|
17
|
+
* chart. The `<span class="sparkline">` is the sized box and the ref; the
|
|
18
|
+
* `role="img"` svg inside is named by `aria-label`, `inputLabel`,
|
|
19
|
+
* `summaryFormatter`, or the generated "first, last, lowest, highest".
|
|
20
|
+
*/
|
|
21
|
+
export declare const BsSparkline: React.ForwardRefExoticComponent<BsSparklineProps & React.RefAttributes<HTMLSpanElement | null>>;
|