@mintplayer/vue-bootstrap 3.28.0 → 3.30.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 +45 -36
- package/accordion/src/BsAccordion.vue.d.ts +12 -5
- package/accordion/src/BsAccordionItem.vue.d.ts +9 -2
- package/accordion/src/accordion-context.d.ts +8 -0
- package/accordion/src/index.d.ts +1 -1
- package/calendar/index.mjs +99 -24
- package/calendar/src/generated/BsCalendar.generated.vue.d.ts +113 -0
- package/{charts/trend/src/BsTrendChart.vue.d.ts → calendar/src/generated/calendar.view.generated.vue.d.ts} +4 -5
- package/calendar/src/generated/index.d.ts +1 -0
- package/calendar/src/index.d.ts +2 -1
- package/card/index.mjs +39 -46
- package/card/src/BsCard.vue.d.ts +8 -1
- package/card/src/BsCardFooter.vue.d.ts +2 -1
- package/card/src/BsCardHeader.vue.d.ts +4 -8
- package/card/src/BsCardImg.vue.d.ts +2 -1
- package/carousel/index.mjs +149 -61
- package/carousel/src/carousel.vue.d.ts +2 -0
- package/carousel/src/generated/BsCarousel.generated.vue.d.ts +234 -0
- package/carousel/src/generated/BsCarouselItem.generated.vue.d.ts +122 -0
- package/{navbar/src/BsNavbarItem.vue.d.ts → carousel/src/generated/carousel-item.view.generated.vue.d.ts} +11 -14
- package/carousel/src/generated/carousel.view.generated.vue.d.ts +27 -0
- package/carousel/src/generated/index.d.ts +2 -0
- package/carousel/src/index.d.ts +2 -2
- package/charts/hierarchy/index.mjs +242 -41
- package/charts/hierarchy/src/generated/BsHierarchyChart.generated.vue.d.ts +292 -0
- package/charts/hierarchy/src/generated/hierarchy-chart.view.generated.vue.d.ts +8 -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 +44 -18
- package/charts/sparkline/src/BsSparkline.vue.d.ts +14 -2
- package/charts/trend/index.mjs +133 -21
- package/charts/trend/src/generated/BsTrendChart.generated.vue.d.ts +136 -0
- package/charts/trend/src/generated/index.d.ts +1 -0
- package/charts/trend/src/generated/trend-chart.view.generated.vue.d.ts +8 -0
- package/charts/trend/src/index.d.ts +2 -2
- package/checkbox/index.mjs +1 -29
- package/checkbox/src/BsCheckbox.vue.d.ts +29 -5
- package/chunks/BsCheckbox-C8H1KT2D.mjs +96 -0
- package/chunks/BsDatatable.generated-uNBvWmhM.mjs +467 -0
- package/chunks/BsDatetimePicker.generated-DB9itVGP.mjs +191 -0
- package/chunks/BsSplitterPanel.generated-B84cMuMJ.mjs +97 -0
- package/chunks/BsTreeview.generated-Rf47miZv.mjs +124 -0
- package/chunks/radio-group-key-CnFhXLW0.mjs +4 -0
- package/code-snippet/index.mjs +123 -31
- package/code-snippet/src/generated/BsCodeSnippet.generated.vue.d.ts +132 -0
- package/code-snippet/src/generated/code-snippet.view.generated.vue.d.ts +8 -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 -86
- package/datatable/src/generated/BsDatatable.generated.vue.d.ts +573 -0
- package/datatable/src/generated/datatable.view.generated.vue.d.ts +59 -0
- package/datatable/src/generated/index.d.ts +1 -0
- package/datatable/src/index.d.ts +3 -1
- package/datepicker/index.mjs +155 -24
- package/datepicker/src/generated/BsDatepicker.generated.vue.d.ts +183 -0
- package/datepicker/src/generated/datepicker.view.generated.vue.d.ts +8 -0
- package/datepicker/src/generated/index.d.ts +1 -0
- package/datepicker/src/index.d.ts +3 -1
- package/datetime-picker/index.mjs +1 -29
- package/datetime-picker/src/generated/BsDatetimePicker.generated.vue.d.ts +216 -0
- package/datetime-picker/src/generated/datetime-picker.view.generated.vue.d.ts +8 -0
- package/datetime-picker/src/generated/index.d.ts +1 -0
- package/datetime-picker/src/index.d.ts +2 -1
- package/dock/index.mjs +122 -23
- package/dock/src/generated/BsDockManager.generated.vue.d.ts +174 -0
- package/dock/src/generated/dock-manager.view.generated.vue.d.ts +33 -0
- package/dock/src/generated/dock-node.view.generated.vue.d.ts +6 -0
- package/dock/src/generated/index.d.ts +1 -0
- package/dock/src/index.d.ts +3 -1
- package/dropdown-menu/index.mjs +33 -31
- package/dropdown-menu/src/BsDropdownItem.vue.d.ts +1 -1
- package/dropdown-menu/src/BsDropdownMenu.vue.d.ts +12 -5
- package/dropdown-menu/src/index.d.ts +1 -1
- package/file-manager/index.mjs +265 -17
- package/file-manager/src/generated/BsFileManager.generated.vue.d.ts +213 -0
- package/file-manager/src/generated/file-manager.view.generated.vue.d.ts +8 -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 +15 -8
- package/input-group/src/BsInputGroup.vue.d.ts +7 -1
- package/machine/index.mjs +84 -1
- package/machine/src/content.d.ts +13 -0
- package/machine/src/core.d.ts +23 -0
- package/machine/src/core.spec.d.ts +1 -0
- package/machine/src/index.d.ts +3 -0
- package/machine/src/transfer-state.d.ts +27 -0
- package/multi-range/index.mjs +97 -22
- package/multi-range/src/generated/BsMultiRange.generated.vue.d.ts +132 -0
- package/multi-range/src/generated/index.d.ts +1 -0
- package/multi-range/src/generated/multi-range.view.generated.vue.d.ts +8 -0
- package/multi-range/src/index.d.ts +2 -1
- package/navbar/index.mjs +189 -57
- package/navbar/src/generated/BsNavbar.generated.vue.d.ts +196 -0
- package/navbar/src/generated/BsNavbarDropdown.generated.vue.d.ts +155 -0
- package/navbar/src/generated/BsNavbarItem.generated.vue.d.ts +144 -0
- package/navbar/src/generated/BsNavbarNav.generated.vue.d.ts +135 -0
- package/navbar/src/generated/index.d.ts +4 -0
- package/navbar/src/generated/navbar-dropdown.view.generated.vue.d.ts +34 -0
- package/navbar/src/generated/navbar-item.view.generated.vue.d.ts +27 -0
- package/navbar/src/generated/navbar-nav.view.generated.vue.d.ts +27 -0
- package/navbar/src/generated/navbar.view.generated.vue.d.ts +38 -0
- package/navbar/src/index.d.ts +2 -5
- package/otp-input/index.mjs +115 -21
- package/otp-input/src/generated/BsOtpInput.generated.vue.d.ts +134 -0
- package/otp-input/src/generated/index.d.ts +1 -0
- package/{theming/src/BsThemeToggle.vue.d.ts → otp-input/src/generated/otp-input.view.generated.vue.d.ts} +3 -3
- package/otp-input/src/index.d.ts +2 -1
- package/package.json +7 -5
- package/pagination/index.mjs +54 -20
- package/pagination/src/BsPagination.vue.d.ts +21 -4
- package/phone-input/index.mjs +151 -31
- package/phone-input/src/generated/BsPhoneInput.generated.vue.d.ts +174 -0
- package/phone-input/src/generated/index.d.ts +1 -0
- package/{file-manager/src/BsFileManager.vue.d.ts → phone-input/src/generated/phone-input.view.generated.vue.d.ts} +3 -3
- package/phone-input/src/index.d.ts +2 -1
- package/query-builder/index.mjs +259 -42
- package/query-builder/src/generated/BsQueryBuilder.generated.vue.d.ts +268 -0
- package/query-builder/src/generated/index.d.ts +1 -0
- package/query-builder/src/generated/query-builder-item.view.generated.vue.d.ts +30 -0
- package/query-builder/src/generated/query-builder.view.generated.vue.d.ts +33 -0
- package/query-builder/src/index.d.ts +3 -1
- package/radio/index.mjs +74 -21
- package/radio/src/BsRadio.vue.d.ts +28 -8
- package/radio/src/index.d.ts +1 -0
- package/radio/src/radio-group-key.d.ts +10 -0
- package/radio-group/index.mjs +37 -20
- package/radio-group/src/BsRadioGroup.vue.d.ts +13 -8
- package/ribbon/index.mjs +1223 -25
- package/ribbon/src/generated/BsQuickAccessToolbar.generated.vue.d.ts +135 -0
- package/ribbon/src/generated/BsRibbon.generated.vue.d.ts +219 -0
- package/ribbon/src/generated/BsRibbonButton.generated.vue.d.ts +199 -0
- package/ribbon/src/generated/BsRibbonCheckBox.generated.vue.d.ts +106 -0
- package/ribbon/src/generated/BsRibbonColorPicker.generated.vue.d.ts +106 -0
- package/ribbon/src/generated/BsRibbonComboBox.generated.vue.d.ts +117 -0
- package/ribbon/src/generated/BsRibbonContextualTabSet.generated.vue.d.ts +153 -0
- package/ribbon/src/generated/BsRibbonDropdownButton.generated.vue.d.ts +204 -0
- package/ribbon/src/generated/BsRibbonGallery.generated.vue.d.ts +210 -0
- package/ribbon/src/generated/BsRibbonGalleryItem.generated.vue.d.ts +175 -0
- package/ribbon/src/generated/BsRibbonGroup.generated.vue.d.ts +199 -0
- package/ribbon/src/generated/BsRibbonGroupButton.generated.vue.d.ts +117 -0
- package/ribbon/src/generated/BsRibbonMenuItem.generated.vue.d.ts +188 -0
- package/ribbon/src/generated/BsRibbonMenuSeparator.generated.vue.d.ts +17 -0
- package/ribbon/src/generated/BsRibbonSplitButton.generated.vue.d.ts +208 -0
- package/ribbon/src/generated/BsRibbonTab.generated.vue.d.ts +175 -0
- package/ribbon/src/generated/BsRibbonTemplateItem.generated.vue.d.ts +135 -0
- package/ribbon/src/generated/BsRibbonToggleButton.generated.vue.d.ts +210 -0
- package/ribbon/src/generated/index.d.ts +18 -0
- package/ribbon/src/generated/quick-access-toolbar.view.generated.vue.d.ts +27 -0
- package/ribbon/src/generated/ribbon-button.view.generated.vue.d.ts +27 -0
- package/ribbon/src/generated/ribbon-check-box.view.generated.vue.d.ts +8 -0
- package/ribbon/src/generated/ribbon-color-picker.view.generated.vue.d.ts +8 -0
- package/ribbon/src/generated/ribbon-combo-box.view.generated.vue.d.ts +9 -0
- package/ribbon/src/generated/ribbon-contextual-tab-set.view.generated.vue.d.ts +27 -0
- package/ribbon/src/generated/ribbon-dropdown-button.view.generated.vue.d.ts +29 -0
- package/ribbon/src/generated/ribbon-gallery-item.view.generated.vue.d.ts +27 -0
- package/ribbon/src/generated/ribbon-gallery.view.generated.vue.d.ts +28 -0
- package/ribbon/src/generated/ribbon-group-button.view.generated.vue.d.ts +9 -0
- package/ribbon/src/generated/ribbon-group.view.generated.vue.d.ts +27 -0
- package/ribbon/src/generated/ribbon-menu-item.view.generated.vue.d.ts +27 -0
- package/ribbon/src/generated/ribbon-menu-separator.view.generated.vue.d.ts +8 -0
- package/ribbon/src/generated/ribbon-split-button.view.generated.vue.d.ts +29 -0
- package/ribbon/src/generated/ribbon-tab.view.generated.vue.d.ts +27 -0
- package/ribbon/src/generated/ribbon-template-item.view.generated.vue.d.ts +27 -0
- package/ribbon/src/generated/ribbon-toggle-button.view.generated.vue.d.ts +27 -0
- package/ribbon/src/generated/ribbon.view.generated.vue.d.ts +29 -0
- package/ribbon/src/index.d.ts +3 -2
- package/scheduler/index.mjs +457 -39
- package/scheduler/src/generated/BsScheduler.generated.vue.d.ts +202 -0
- package/scheduler/src/generated/index.d.ts +1 -0
- package/scheduler/src/generated/sched-editor.view.generated.vue.d.ts +6 -0
- package/scheduler/src/generated/sched-month.view.generated.vue.d.ts +6 -0
- package/scheduler/src/generated/sched-popover-event.view.generated.vue.d.ts +6 -0
- package/scheduler/src/generated/sched-popover.view.generated.vue.d.ts +6 -0
- package/scheduler/src/generated/sched-row-panel.view.generated.vue.d.ts +6 -0
- package/scheduler/src/generated/sched-time-grid.view.generated.vue.d.ts +6 -0
- package/scheduler/src/generated/sched-timeline.view.generated.vue.d.ts +6 -0
- package/scheduler/src/generated/sched-year.view.generated.vue.d.ts +6 -0
- package/scheduler/src/generated/scheduler.view.generated.vue.d.ts +8 -0
- package/scheduler/src/index.d.ts +4 -2
- package/select/index.mjs +129 -30
- package/select/src/generated/BsSelect.generated.vue.d.ts +257 -0
- package/select/src/generated/index.d.ts +1 -0
- package/select/src/generated/select.view.generated.vue.d.ts +37 -0
- package/select/src/index.d.ts +2 -1
- package/shell/index.mjs +54 -27
- package/shell/src/BsShell.vue.d.ts +23 -11
- package/shell/src/index.d.ts +2 -1
- package/shell/src/shell-state-change.d.ts +4 -0
- package/signature-pad/index.mjs +101 -22
- package/signature-pad/src/generated/BsSignaturePad.generated.vue.d.ts +129 -0
- package/signature-pad/src/generated/index.d.ts +1 -0
- package/signature-pad/src/generated/signature-pad.view.generated.vue.d.ts +8 -0
- package/signature-pad/src/index.d.ts +2 -2
- package/splitter/index.mjs +1 -13
- package/splitter/src/generated/BsSplitter.generated.vue.d.ts +177 -0
- package/splitter/src/generated/BsSplitterPanel.generated.vue.d.ts +122 -0
- package/splitter/src/generated/index.d.ts +2 -0
- package/splitter/src/generated/splitter-panel.view.generated.vue.d.ts +27 -0
- package/splitter/src/generated/splitter.view.generated.vue.d.ts +27 -0
- package/splitter/src/index.d.ts +2 -2
- package/src/index.d.ts +4 -7
- package/tab-control/index.mjs +90 -21
- package/tab-control/src/BsTabControl.vue.d.ts +63 -28
- package/{timeline/src/BsTimelineItem.vue.d.ts → tab-control/src/BsTabPage.vue.d.ts} +8 -11
- package/tab-control/src/index.d.ts +2 -1
- package/theming/index.mjs +53 -31
- package/theming/src/generated/BsThemeToggle.generated.vue.d.ts +31 -0
- package/theming/src/generated/index.d.ts +1 -0
- package/theming/src/generated/theme-toggle.view.generated.vue.d.ts +8 -0
- package/theming/src/index.d.ts +2 -2
- package/theming/src/useBsTheme.d.ts +2 -2
- package/tile-manager/src/BsTileManager.vue.d.ts +3 -3
- package/timeline/index.mjs +224 -136
- package/timeline/src/generated/BsTimeline.generated.vue.d.ts +328 -0
- package/timeline/src/generated/BsTimelineItem.generated.vue.d.ts +209 -0
- package/timeline/src/generated/index.d.ts +2 -0
- package/timeline/src/generated/timeline-item.view.generated.vue.d.ts +45 -0
- package/timeline/src/generated/timeline.view.generated.vue.d.ts +89 -0
- package/timeline/src/index.d.ts +3 -4
- package/timepicker/index.mjs +195 -42
- package/timepicker/src/generated/BsTimeList.generated.vue.d.ts +94 -0
- package/timepicker/src/generated/BsTimepicker.generated.vue.d.ts +161 -0
- package/timepicker/src/generated/index.d.ts +2 -0
- package/timepicker/src/generated/time-list.view.generated.vue.d.ts +8 -0
- package/timepicker/src/generated/timepicker.view.generated.vue.d.ts +8 -0
- package/timepicker/src/index.d.ts +2 -2
- package/toggle-button/index.mjs +18 -19
- package/toggle-button/src/BsToggleButton.vue.d.ts +2 -6
- package/tree-select/index.mjs +240 -91
- package/tree-select/src/generated/BsTreeSelect.generated.vue.d.ts +323 -0
- package/tree-select/src/generated/index.d.ts +1 -0
- package/tree-select/src/generated/tree-select.view.generated.vue.d.ts +56 -0
- package/tree-select/src/index.d.ts +3 -3
- package/treeview/index.mjs +1 -58
- package/treeview/src/generated/BsTreeview.generated.vue.d.ts +240 -0
- package/treeview/src/generated/index.d.ts +1 -0
- package/treeview/src/generated/treeview.view.generated.vue.d.ts +36 -0
- package/treeview/src/index.d.ts +2 -1
- package/typeahead/index.mjs +71 -59
- package/typeahead/src/BsTypeahead.vue.d.ts +3 -3
- package/calendar/src/BsCalendar.vue.d.ts +0 -28
- package/carousel/src/BsCarousel.vue.d.ts +0 -53
- package/charts/hierarchy/src/BsHierarchyChart.vue.d.ts +0 -19
- package/code-snippet/src/BsCodeSnippet.vue.d.ts +0 -43
- package/datatable/src/BsDatatable.vue.d.ts +0 -89
- package/datepicker/src/BsDatepicker.vue.d.ts +0 -28
- package/datetime-picker/src/BsDatetimePicker.vue.d.ts +0 -28
- package/dock/src/BsDockManager.vue.d.ts +0 -29
- package/multi-range/src/BsMultiRange.vue.d.ts +0 -11
- package/navbar/src/BsNavbar.vue.d.ts +0 -38
- package/navbar/src/BsNavbarBrand.vue.d.ts +0 -21
- package/navbar/src/BsNavbarDropdown.vue.d.ts +0 -22
- package/otp-input/src/BsOtpInput.vue.d.ts +0 -11
- package/phone-input/src/BsPhoneInput.vue.d.ts +0 -16
- package/query-builder/src/BsQueryBuilder.vue.d.ts +0 -20
- package/ribbon/src/BsRibbon.vue.d.ts +0 -29
- package/scheduler/src/BsScheduler.vue.d.ts +0 -31
- package/select/src/BsSelect.vue.d.ts +0 -33
- package/signature-pad/src/BsSignaturePad.vue.d.ts +0 -12
- package/splitter/src/BsSplitter.vue.d.ts +0 -17
- package/timeline/src/BsTimeline.vue.d.ts +0 -58
- package/timepicker/src/BsTimeList.vue.d.ts +0 -28
- package/timepicker/src/BsTimepicker.vue.d.ts +0 -28
- package/tree-select/src/BsTreeSelect.vue.d.ts +0 -32
- package/treeview/src/BsTreeview.vue.d.ts +0 -27
- package/vue-bootstrap.css +0 -2
package/tab-control/index.mjs
CHANGED
|
@@ -1,29 +1,98 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as e, h as t, onMounted as n, ref as r, shallowRef as i, useId as a } from "vue";
|
|
2
|
+
import { installLightStyles as o } from "@mintplayer/ui-core/scoped-styles";
|
|
3
|
+
import { TAB_CONTROL_SCOPE as s, connectTabControl as c, resolveActiveTab as l, tabControlChanged as u, tabControlKeydown as d, tabControlScopedStyles as f, tabControlTabClick as p } from "@mintplayer/ui-core/tab-control";
|
|
3
4
|
//#endregion
|
|
4
|
-
//#region libs/mintplayer-vue-bootstrap/tab-control/src/
|
|
5
|
-
var
|
|
5
|
+
//#region libs/mintplayer-vue-bootstrap/tab-control/src/BsTabPage.vue
|
|
6
|
+
var m = /* @__PURE__ */ e({
|
|
6
7
|
inheritAttrs: !1,
|
|
7
|
-
__name: "
|
|
8
|
+
__name: "BsTabPage",
|
|
8
9
|
props: {
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
tabId: {},
|
|
11
|
+
disabled: { type: Boolean }
|
|
11
12
|
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
setup(e) {
|
|
14
|
+
return (e, t) => null;
|
|
15
|
+
}
|
|
16
|
+
}), h = (e) => e === "" || e === !0 || e === "true", g = e({
|
|
17
|
+
name: "BsTabControl",
|
|
18
|
+
inheritAttrs: !1,
|
|
19
|
+
props: {
|
|
20
|
+
modelValue: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: void 0
|
|
23
|
+
},
|
|
24
|
+
border: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !0
|
|
27
|
+
},
|
|
28
|
+
selectFirstTab: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: !0
|
|
31
|
+
},
|
|
32
|
+
tabsPosition: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "top"
|
|
21
35
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
36
|
+
},
|
|
37
|
+
emits: { "update:modelValue": (e) => !0 },
|
|
38
|
+
setup(e, { slots: g, emit: _, attrs: v }) {
|
|
39
|
+
o(s, f);
|
|
40
|
+
let y = `bs-tab-control-${a()}`, b = i(null), x = r(null), S = r(!1);
|
|
41
|
+
return n(() => S.value = !0), () => {
|
|
42
|
+
let n = (g.default?.() ?? []).flatMap((e) => Array.isArray(e.children) && typeof e.type == "symbol" ? e.children : [e]).filter((e) => e.type === m).map((e, t) => {
|
|
43
|
+
let { tabId: n, "tab-id": r, disabled: i, role: a, ...o } = e.props ?? {};
|
|
44
|
+
return {
|
|
45
|
+
key: n ?? r ?? String(t),
|
|
46
|
+
disabled: h(i),
|
|
47
|
+
attrs: o,
|
|
48
|
+
slots: e.children ?? {}
|
|
49
|
+
};
|
|
50
|
+
}), r = n.map((e) => ({ disabled: e.disabled })), i = e.modelValue ?? x.value, a = i === null ? -1 : n.findIndex((e) => e.key === i), o = l(r, a < 0 ? null : a, e.selectFirstTab), s = c({
|
|
51
|
+
id: y,
|
|
52
|
+
tabsPosition: e.tabsPosition,
|
|
53
|
+
border: e.border,
|
|
54
|
+
enhanced: S.value
|
|
55
|
+
}, r, o), f = (e) => {
|
|
56
|
+
let t = n[e];
|
|
57
|
+
t && !t.disabled && (x.value = t.key, _("update:modelValue", t.key));
|
|
58
|
+
}, C = t("div", s.strip, [t("ul", s.list, n.map((e, n) => t("li", {
|
|
59
|
+
key: e.key,
|
|
60
|
+
...s.item
|
|
61
|
+
}, [t("label", {
|
|
62
|
+
...s.tabs[n].tab,
|
|
63
|
+
...e.attrs.id && s.tabs[n].tab["aria-controls"] ? { "aria-controls": e.attrs.id } : {},
|
|
64
|
+
onClick: (t) => S.value && p(t, e.disabled) && f(n),
|
|
65
|
+
onKeydown: (e) => {
|
|
66
|
+
let t = b.value && d(b.value, e, n, r);
|
|
67
|
+
t != null && f(t);
|
|
68
|
+
}
|
|
69
|
+
}, e.slots.header?.())])))]);
|
|
70
|
+
return t("div", {
|
|
71
|
+
ref: b,
|
|
72
|
+
...s.root,
|
|
73
|
+
...v,
|
|
74
|
+
class: [s.root.class, v.class],
|
|
75
|
+
onChange: (e) => {
|
|
76
|
+
let t = b.value && u(b.value, e);
|
|
77
|
+
t != null && f(t);
|
|
78
|
+
}
|
|
79
|
+
}, [
|
|
80
|
+
...n.map((e, n) => t("input", {
|
|
81
|
+
key: e.key,
|
|
82
|
+
...s.tabs[n].radio,
|
|
83
|
+
checked: n === o
|
|
84
|
+
})),
|
|
85
|
+
e.tabsPosition === "bottom" ? null : C,
|
|
86
|
+
t("div", s.content, n.map((e, n) => t("div", {
|
|
87
|
+
key: e.key,
|
|
88
|
+
...s.tabs[n].pane,
|
|
89
|
+
...e.attrs,
|
|
90
|
+
class: [s.tabs[n].pane.class, e.attrs.class]
|
|
91
|
+
}, e.slots.default?.()))),
|
|
92
|
+
e.tabsPosition === "bottom" ? C : null
|
|
93
|
+
]);
|
|
94
|
+
};
|
|
26
95
|
}
|
|
27
96
|
});
|
|
28
97
|
//#endregion
|
|
29
|
-
export {
|
|
98
|
+
export { g as BsTabControl, m as BsTabPage };
|
|
@@ -1,29 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
declare const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import { PropType, VNode } from 'vue';
|
|
2
|
+
import { TabsPosition } from '@mintplayer/ui-core/tab-control';
|
|
3
|
+
/**
|
|
4
|
+
* `BsTabControl` — Bootstrap nav-tabs over one native radio per tab (#437).
|
|
5
|
+
*
|
|
6
|
+
* <BsTabControl v-model="tab">
|
|
7
|
+
* <BsTabPage tab-id="home"><template #header>Home</template>Home content</BsTabPage>
|
|
8
|
+
* <BsTabPage tab-id="profile" disabled>…</BsTabPage>
|
|
9
|
+
* </BsTabControl>
|
|
10
|
+
*
|
|
11
|
+
* Renders the markup of `@mintplayer/ui-core/tab-control`, so the server
|
|
12
|
+
* HTML is a working tab control with JavaScript off. After mount the labels
|
|
13
|
+
* become APG tabs (roving tabindex, automatic activation). A render function,
|
|
14
|
+
* because the pages are read from the default slot's vnodes.
|
|
15
|
+
*/
|
|
16
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
17
|
+
/** The shown page's `tab-id` (v-model). */
|
|
18
|
+
modelValue: {
|
|
19
|
+
type: PropType<string | undefined>;
|
|
20
|
+
default: undefined;
|
|
21
|
+
};
|
|
22
|
+
border: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
selectFirstTab: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
tabsPosition: {
|
|
31
|
+
type: PropType<TabsPosition>;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
}>, () => VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
37
|
+
'update:modelValue': (_tabId: string) => true;
|
|
38
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
39
|
+
/** The shown page's `tab-id` (v-model). */
|
|
40
|
+
modelValue: {
|
|
41
|
+
type: PropType<string | undefined>;
|
|
42
|
+
default: undefined;
|
|
28
43
|
};
|
|
29
|
-
|
|
44
|
+
border: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
selectFirstTab: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
52
|
+
tabsPosition: {
|
|
53
|
+
type: PropType<TabsPosition>;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
}>> & Readonly<{
|
|
57
|
+
"onUpdate:modelValue"?: ((_tabId: string) => any) | undefined;
|
|
58
|
+
}>, {
|
|
59
|
+
modelValue: string | undefined;
|
|
60
|
+
border: boolean;
|
|
61
|
+
selectFirstTab: boolean;
|
|
62
|
+
tabsPosition: TabsPosition;
|
|
63
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
64
|
+
export default _default;
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
description?: string;
|
|
5
|
-
time?: string;
|
|
6
|
-
icon?: string;
|
|
7
|
-
color?: string;
|
|
8
|
-
cssClass?: string;
|
|
2
|
+
/** The page's identity in the control's `v-model`. Defaults to its position. */
|
|
3
|
+
tabId?: string;
|
|
9
4
|
disabled?: boolean;
|
|
10
|
-
/** Seeds the timeline's initial selection (when selectable). */
|
|
11
|
-
selected?: boolean;
|
|
12
5
|
};
|
|
13
6
|
declare function __VLS_template(): {
|
|
14
7
|
attrs: Partial<{}>;
|
|
15
|
-
slots: {
|
|
16
|
-
|
|
8
|
+
slots: Readonly<{
|
|
9
|
+
header?: () => unknown;
|
|
10
|
+
default?: () => unknown;
|
|
11
|
+
}> & {
|
|
12
|
+
header?: () => unknown;
|
|
13
|
+
default?: () => unknown;
|
|
17
14
|
};
|
|
18
15
|
refs: {};
|
|
19
16
|
rootEl: any;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { default as BsTabControl } from './BsTabControl.vue';
|
|
2
|
-
export {
|
|
2
|
+
export { default as BsTabPage } from './BsTabPage.vue';
|
|
3
|
+
export type { TabsPosition } from '@mintplayer/ui-core/tab-control';
|
package/theming/index.mjs
CHANGED
|
@@ -1,39 +1,61 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useCore as e } from "../machine/index.mjs";
|
|
2
|
+
import { createBlock as t, createElementBlock as n, createElementVNode as r, defineComponent as i, getCurrentInstance as a, getCurrentScope as o, mergeProps as s, onMounted as c, onScopeDispose as l, openBlock as u, readonly as d, shallowRef as f, toDisplayString as p, unref as m, useTemplateRef as h } from "vue";
|
|
3
|
+
import { installLightStyles as g } from "@mintplayer/ui-core/scoped-styles";
|
|
4
|
+
import { BS_THEME_COOKIE_NAME as _, BS_THEME_DEFAULT_MODES as v, BS_THEME_DEFAULT_MODE_META as y, configureBsTheme as b, getBsThemeStore as x, getBsThemeStore as S, injectThemeAttribute as C, isValidThemeMode as w, readDefaultModeMeta as T, readThemeCookie as E, resolveMode as D, resolveMode as O, resolveServerTheme as k, themeToggleCore as A, themeToggleScopedStyles as j, writeThemeCookie as M } from "@mintplayer/ui-core/theming";
|
|
3
5
|
//#endregion
|
|
4
|
-
//#region libs/mintplayer-vue-bootstrap/theming/src/
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
//#region libs/mintplayer-vue-bootstrap/theming/src/generated/theme-toggle.view.generated.vue
|
|
7
|
+
var N = /* @__PURE__ */ i({
|
|
8
|
+
__name: "theme-toggle.view.generated",
|
|
9
|
+
props: { view: {} },
|
|
10
|
+
setup(e) {
|
|
11
|
+
return (t, i) => (u(), n("span", s({
|
|
12
|
+
"data-mps": "theme-toggle",
|
|
13
|
+
ref: "root"
|
|
14
|
+
}, e.view.root), [
|
|
15
|
+
r("button", s({ "data-mps": "theme-toggle" }, e.view.button), [(u(), n("svg", s({ "data-mps": "theme-toggle" }, e.view.icon), [r("path", s({ "data-mps": "theme-toggle" }, e.view.path), null, 16)], 16))], 16),
|
|
16
|
+
r("span", s({ "data-mps": "theme-toggle" }, e.view.description), p(e.view.descriptionText), 17),
|
|
17
|
+
r("span", s({ "data-mps": "theme-toggle" }, e.view.live), p(e.view.liveText), 17)
|
|
18
|
+
], 16));
|
|
17
19
|
}
|
|
18
|
-
}),
|
|
19
|
-
|
|
20
|
+
}), P = /* @__PURE__ */ i({
|
|
21
|
+
name: "BsThemeToggle",
|
|
22
|
+
__name: "BsThemeToggle.generated",
|
|
23
|
+
props: { modes: {
|
|
24
|
+
type: null,
|
|
25
|
+
default: null
|
|
26
|
+
} },
|
|
27
|
+
setup(n) {
|
|
28
|
+
let r = n;
|
|
29
|
+
g("theme-toggle", j);
|
|
30
|
+
let i = h("template"), a = e(A, () => ({ modes: r.modes }), {
|
|
31
|
+
idPrefix: "bs-theme-toggle",
|
|
32
|
+
root: () => i.value?.$el,
|
|
33
|
+
emit: () => void 0
|
|
34
|
+
}).props;
|
|
35
|
+
return (e, n) => (u(), t(N, s({
|
|
36
|
+
ref_key: "template",
|
|
37
|
+
ref: i
|
|
38
|
+
}, m(a)), null, 16));
|
|
39
|
+
}
|
|
40
|
+
}), F = () => typeof window < "u", I = (e) => {
|
|
41
|
+
F() && S().setMode(e);
|
|
20
42
|
};
|
|
21
|
-
function
|
|
22
|
-
let e =
|
|
23
|
-
if (
|
|
24
|
-
let
|
|
25
|
-
e.value =
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
u || (u = !0,
|
|
29
|
-
},
|
|
43
|
+
function L() {
|
|
44
|
+
let e = f("auto"), t = f(O("auto", !1)), n = () => void 0;
|
|
45
|
+
if (F()) {
|
|
46
|
+
let r = S(), i = () => {
|
|
47
|
+
e.value = r.getMode(), t.value = r.effectiveMode();
|
|
48
|
+
}, s = r.subscribe(i), u = !1;
|
|
49
|
+
n = () => {
|
|
50
|
+
u || (u = !0, s());
|
|
51
|
+
}, o() && l(n), a() ? c(i) : i();
|
|
30
52
|
}
|
|
31
53
|
return {
|
|
32
|
-
mode:
|
|
33
|
-
effectiveMode:
|
|
34
|
-
setMode:
|
|
35
|
-
stop:
|
|
54
|
+
mode: d(e),
|
|
55
|
+
effectiveMode: d(t),
|
|
56
|
+
setMode: I,
|
|
57
|
+
stop: n
|
|
36
58
|
};
|
|
37
59
|
}
|
|
38
60
|
//#endregion
|
|
39
|
-
export {
|
|
61
|
+
export { _ as BS_THEME_COOKIE_NAME, v as BS_THEME_DEFAULT_MODES, y as BS_THEME_DEFAULT_MODE_META, P as BsThemeToggle, b as configureBsTheme, x as getBsThemeStore, C as injectThemeAttribute, w as isValidThemeMode, T as readDefaultModeMeta, E as readThemeCookie, D as resolveMode, k as resolveServerTheme, L as useBsTheme, M as writeThemeCookie };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { ThemeToggleInputs } from '@mintplayer/ui-core/theming';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
modes: {
|
|
5
|
+
type: PropType<ThemeToggleInputs["modes"]>;
|
|
6
|
+
default: null;
|
|
7
|
+
};
|
|
8
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
9
|
+
modes: {
|
|
10
|
+
type: PropType<ThemeToggleInputs["modes"]>;
|
|
11
|
+
default: null;
|
|
12
|
+
};
|
|
13
|
+
}>> & Readonly<{}>, {
|
|
14
|
+
modes: readonly import('@mintplayer/ui-core/theming').BsThemeToggleMode[] | null;
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
16
|
+
template: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
17
|
+
view: import('@mintplayer/ui-core/theming').ThemeToggleView;
|
|
18
|
+
}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
19
|
+
root: HTMLSpanElement;
|
|
20
|
+
}, HTMLSpanElement, import('vue').ComponentProvideOptions, {
|
|
21
|
+
P: {};
|
|
22
|
+
B: {};
|
|
23
|
+
D: {};
|
|
24
|
+
C: {};
|
|
25
|
+
M: {};
|
|
26
|
+
Defaults: {};
|
|
27
|
+
}, Readonly<{
|
|
28
|
+
view: import('@mintplayer/ui-core/theming').ThemeToggleView;
|
|
29
|
+
}> & Readonly<{}>, {}, {}, {}, {}, {}> | null;
|
|
30
|
+
}, HTMLSpanElement>;
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BsThemeToggle } from './BsThemeToggle.generated.vue';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ThemeToggleView } from '@mintplayer/ui-core/theming';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
view: ThemeToggleView;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
6
|
+
root: HTMLSpanElement;
|
|
7
|
+
}, HTMLSpanElement>;
|
|
8
|
+
export default _default;
|
package/theming/src/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './generated';
|
|
2
2
|
export { useBsTheme, type UseBsThemeResult } from './useBsTheme';
|
|
3
|
-
export { BS_THEME_COOKIE_NAME, BS_THEME_DEFAULT_MODE_META, BS_THEME_DEFAULT_MODES, configureBsTheme, getBsThemeStore, injectThemeAttribute, isValidThemeMode, readDefaultModeMeta, readThemeCookie, resolveMode, resolveServerTheme, writeThemeCookie, type BsEffectiveThemeMode, type BsThemeConfig, type BsThemeMode, type BsThemeStore, type BsThemeToggleMode, type ResolveServerThemeOptions, type WriteThemeCookieOptions, } from '@mintplayer/
|
|
3
|
+
export { BS_THEME_COOKIE_NAME, BS_THEME_DEFAULT_MODE_META, BS_THEME_DEFAULT_MODES, configureBsTheme, getBsThemeStore, injectThemeAttribute, isValidThemeMode, readDefaultModeMeta, readThemeCookie, resolveMode, resolveServerTheme, writeThemeCookie, type BsEffectiveThemeMode, type BsThemeConfig, type BsThemeMode, type BsThemeStore, type BsThemeToggleMode, type ResolveServerThemeOptions, type WriteThemeCookieOptions, } from '@mintplayer/ui-core/theming';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { BsEffectiveThemeMode, BsThemeMode } from '@mintplayer/
|
|
2
|
+
import { BsEffectiveThemeMode, BsThemeMode } from '@mintplayer/ui-core/theming';
|
|
3
3
|
export interface UseBsThemeResult {
|
|
4
4
|
/** The mode the user picked: `auto`, `light`, `dark` or a custom mode. */
|
|
5
5
|
mode: Readonly<Ref<BsThemeMode>>;
|
|
@@ -16,7 +16,7 @@ export interface UseBsThemeResult {
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* The document's colour mode as readonly refs, mirrored from the shared
|
|
19
|
-
* browser store (`@mintplayer/
|
|
19
|
+
* browser store (`@mintplayer/ui-core/theming`). They update when the
|
|
20
20
|
* mode changes from anywhere: `setMode`, a `<BsThemeToggle>`, another
|
|
21
21
|
* framework's adapter on the same page, another tab, or the OS preference
|
|
22
22
|
* while in `auto`.
|
|
@@ -2,12 +2,12 @@ import { MintTile, TileBreakpoint, TileDragMode, TileGestureBlocked, TileLayoutC
|
|
|
2
2
|
import { BsTileColumnCountChange } from './types';
|
|
3
3
|
declare const _default: <T extends MintTile>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
|
+
readonly onLayoutChange?: ((change: TileLayoutChange) => any) | undefined;
|
|
5
6
|
readonly onGestureBlocked?: ((blocked: TileGestureBlocked) => any) | undefined;
|
|
6
7
|
readonly "onUpdate:layouts"?: ((value: Readonly<Record<number, TileLayoutSnapshot>>) => any) | undefined;
|
|
7
8
|
readonly onLayoutPreview?: ((change: TileLayoutChange) => any) | undefined;
|
|
8
|
-
readonly onLayoutChange?: ((change: TileLayoutChange) => any) | undefined;
|
|
9
9
|
readonly onColumnCountChange?: ((change: BsTileColumnCountChange) => any) | undefined;
|
|
10
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onGestureBlocked" | "onUpdate:layouts" | "onLayoutPreview" | "
|
|
10
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onLayoutChange" | "onGestureBlocked" | "onUpdate:layouts" | "onLayoutPreview" | "onColumnCountChange"> & ({
|
|
11
11
|
layouts?: TileLayouts;
|
|
12
12
|
} & {
|
|
13
13
|
/** The visible tiles, in DOM order. */
|
|
@@ -60,7 +60,7 @@ declare const _default: <T extends MintTile>(__VLS_props: NonNullable<Awaited<ty
|
|
|
60
60
|
tile: T;
|
|
61
61
|
}): unknown;
|
|
62
62
|
};
|
|
63
|
-
emit: (((evt: "
|
|
63
|
+
emit: (((evt: "layoutChange", change: TileLayoutChange) => void) & ((evt: "gestureBlocked", blocked: TileGestureBlocked) => void) & ((evt: "layoutPreview", change: TileLayoutChange) => void) & ((evt: "columnCountChange", change: BsTileColumnCountChange) => void)) & ((evt: "update:layouts", value: Readonly<Record<number, TileLayoutSnapshot>>) => void);
|
|
64
64
|
}>) => import('vue').VNode & {
|
|
65
65
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
66
66
|
};
|