@rio-m3e/vue 0.6.3 → 0.8.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/README.md +99 -4
- package/dist/app-bar/AppBar.vue.d.ts +42 -0
- package/dist/app-bar/AppBar.vue.js +93 -0
- package/dist/app-bar/context.js +3 -0
- package/dist/badge/Badge.vue.d.ts +15 -0
- package/dist/badge/Badge.vue.js +28 -0
- package/dist/bottom-sheet/BottomSheet.vue.d.ts +34 -0
- package/dist/bottom-sheet/BottomSheet.vue.js +82 -0
- package/dist/browser/rio-vue.css +9418 -0
- package/dist/browser/rio-vue.global.js +600 -0
- package/dist/browser/rio-vue.js +600 -0
- package/dist/button/Button.vue.d.ts +1 -0
- package/dist/button/Button.vue.js +23 -2
- package/dist/button-group/ButtonGroup.vue.d.ts +6 -1
- package/dist/button-group/ButtonGroup.vue.js +27 -4
- package/dist/button-group/context.js +4 -2
- package/dist/card/Card.vue.d.ts +24 -0
- package/dist/card/Card.vue.js +44 -0
- package/dist/card/CardActions.vue.d.ts +14 -0
- package/dist/card/CardActions.vue.js +14 -0
- package/dist/card/CardContent.vue.d.ts +14 -0
- package/dist/card/CardContent.vue.js +14 -0
- package/dist/card/CardHeader.vue.d.ts +27 -0
- package/dist/card/CardHeader.vue.js +34 -0
- package/dist/card/CardMedia.vue.d.ts +14 -0
- package/dist/card/CardMedia.vue.js +14 -0
- package/dist/checkbox/Checkbox.vue.d.ts +2 -0
- package/dist/checkbox/Checkbox.vue.js +6 -0
- package/dist/chip/AssistChip.vue.d.ts +2 -0
- package/dist/chip/AssistChip.vue.js +6 -0
- package/dist/chip/ChipSet.vue.d.ts +2 -0
- package/dist/chip/ChipSet.vue.js +7 -1
- package/dist/chip/FilterChip.vue.d.ts +22 -5
- package/dist/chip/FilterChip.vue.js +57 -8
- package/dist/chip/InputChip.vue.d.ts +2 -0
- package/dist/chip/InputChip.vue.js +6 -0
- package/dist/chip/SuggestionChip.vue.d.ts +2 -0
- package/dist/chip/SuggestionChip.vue.js +6 -0
- package/dist/date-picker/DatePicker.vue.d.ts +16 -3
- package/dist/date-picker/DatePicker.vue.js +13 -4
- package/dist/date-picker/DatePickerCalendar.vue.js +1 -4
- package/dist/date-picker/DatePickerDialog.vue.d.ts +17 -3
- package/dist/date-picker/DatePickerDialog.vue.js +66 -22
- package/dist/date-picker/DateRangeCalendar.vue.js +17 -8
- package/dist/date-picker/DateRangePickerDialog.vue.d.ts +17 -3
- package/dist/date-picker/DateRangePickerDialog.vue.js +29 -16
- package/dist/dialog/Dialog.vue.d.ts +11 -2
- package/dist/dialog/Dialog.vue.js +35 -5
- package/dist/divider/Divider.vue.d.ts +5 -0
- package/dist/divider/Divider.vue.js +21 -0
- package/dist/fab/Fab.vue.d.ts +27 -0
- package/dist/fab/Fab.vue.js +70 -0
- package/dist/fab-menu/FabMenu.vue.d.ts +34 -0
- package/dist/fab-menu/FabMenu.vue.js +76 -0
- package/dist/fab-menu/FabMenuItem.vue.d.ts +22 -0
- package/dist/fab-menu/FabMenuItem.vue.js +29 -0
- package/dist/fab-menu/context.js +4 -0
- package/dist/icon-button/IconButton.vue.d.ts +2 -0
- package/dist/icon-button/IconButton.vue.js +26 -2
- package/dist/ime/composing.js +24 -0
- package/dist/index.d.ts +70 -40
- package/dist/index.js +70 -40
- package/dist/list/List.vue.d.ts +1 -0
- package/dist/list/List.vue.js +4 -1
- package/dist/list/ListItem.vue.d.ts +13 -1
- package/dist/list/ListItem.vue.js +15 -3
- package/dist/loading-indicator/LoadingIndicator.vue.d.ts +1 -0
- package/dist/loading-indicator/LoadingIndicator.vue.js +4 -1
- package/dist/menu/Menu.vue.d.ts +2 -2
- package/dist/menu/Menu.vue.js +11 -2
- package/dist/navigation-bar/NavigationBar.vue.d.ts +31 -0
- package/dist/navigation-bar/NavigationBar.vue.js +63 -0
- package/dist/navigation-bar/NavigationBarItem.vue.d.ts +40 -0
- package/dist/navigation-bar/NavigationBarItem.vue.js +84 -0
- package/dist/navigation-bar/context.js +3 -0
- package/dist/navigation-rail/NavigationRail.vue.d.ts +46 -0
- package/dist/navigation-rail/NavigationRail.vue.js +112 -0
- package/dist/navigation-rail/NavigationRailItem.vue.d.ts +41 -0
- package/dist/navigation-rail/NavigationRailItem.vue.js +85 -0
- package/dist/navigation-rail/NavigationRailSection.vue.d.ts +17 -0
- package/dist/navigation-rail/NavigationRailSection.vue.js +20 -0
- package/dist/navigation-rail/context.js +3 -0
- package/dist/overflow/OverflowItem.vue.d.ts +16 -0
- package/dist/overflow/OverflowItem.vue.js +24 -0
- package/dist/overflow/OverflowMenu.vue.js +94 -0
- package/dist/overflow/overflow.js +79 -0
- package/dist/progress/CircularProgress.vue.d.ts +1 -0
- package/dist/progress/CircularProgress.vue.js +5 -2
- package/dist/progress/LinearProgress.vue.d.ts +1 -0
- package/dist/progress/LinearProgress.vue.js +5 -2
- package/dist/radio/Radio.vue.d.ts +2 -0
- package/dist/radio/Radio.vue.js +7 -1
- package/dist/radio/RadioGroup.vue.d.ts +2 -0
- package/dist/radio/RadioGroup.vue.js +13 -2
- package/dist/rio/rio.js +2 -0
- package/dist/scroll-field/ScrollField.vue.d.ts +1 -0
- package/dist/scroll-field/ScrollField.vue.js +3 -0
- package/dist/search/Search.vue.d.ts +58 -0
- package/dist/search/Search.vue.js +161 -0
- package/dist/select/AfterOptions.vue.js +11 -0
- package/dist/select/Select.vue.d.ts +6 -4
- package/dist/select/Select.vue.js +44 -31
- package/dist/select/SelectOption.vue.d.ts +4 -1
- package/dist/select/SelectOption.vue.js +8 -5
- package/dist/side-sheet/SideSheet.vue.d.ts +43 -0
- package/dist/side-sheet/SideSheet.vue.js +103 -0
- package/dist/slider/RangeSlider.vue.d.ts +1 -0
- package/dist/slider/RangeSlider.vue.js +3 -0
- package/dist/slider/Slider.vue.d.ts +1 -0
- package/dist/slider/Slider.vue.js +3 -0
- package/dist/snackbar/Snackbar.vue.d.ts +31 -0
- package/dist/snackbar/Snackbar.vue.js +48 -0
- package/dist/snackbar/SnackbarHost.vue.d.ts +40 -0
- package/dist/snackbar/SnackbarHost.vue.js +110 -0
- package/dist/snackbar/snackbar.d.ts +16 -0
- package/dist/snackbar/snackbar.js +11 -0
- package/dist/split-button/SplitButton.vue.d.ts +3 -2
- package/dist/split-button/SplitButton.vue.js +3 -0
- package/dist/switch/Switch.vue.d.ts +2 -0
- package/dist/switch/Switch.vue.js +6 -0
- package/dist/tabs/Tab.vue.d.ts +26 -0
- package/dist/tabs/Tab.vue.js +91 -0
- package/dist/tabs/TabGroup.vue.d.ts +22 -0
- package/dist/tabs/TabGroup.vue.js +25 -0
- package/dist/tabs/TabPanel.vue.d.ts +15 -0
- package/dist/tabs/TabPanel.vue.js +20 -0
- package/dist/tabs/Tabs.vue.d.ts +34 -0
- package/dist/tabs/Tabs.vue.js +109 -0
- package/dist/tabs/context.js +5 -0
- package/dist/text-field/TextField.vue.d.ts +9 -2
- package/dist/text-field/TextField.vue.js +94 -47
- package/dist/theme/ThemeProvider.vue.d.ts +22 -0
- package/dist/theme/ThemeProvider.vue.js +26 -0
- package/dist/theme/context.d.ts +7 -0
- package/dist/theme/context.js +7 -0
- package/dist/time-picker/TimeInput.vue.d.ts +7 -1
- package/dist/time-picker/TimeInput.vue.js +5 -2
- package/dist/time-picker/TimePickerDialog.vue.d.ts +9 -3
- package/dist/time-picker/TimePickerDialog.vue.js +5 -2
- package/dist/time-picker/TimeScroll.vue.d.ts +7 -1
- package/dist/time-picker/TimeScroll.vue.js +5 -2
- package/dist/toolbar/FabPlace.vue.js +14 -0
- package/dist/toolbar/Toolbar.vue.d.ts +34 -0
- package/dist/toolbar/Toolbar.vue.js +115 -0
- package/dist/toolbar/context.js +3 -0
- package/dist/tooltip/Tooltip.vue.js +10 -3
- package/package.json +6 -4
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// src/ime/composing.ts
|
|
2
|
+
/**
|
|
3
|
+
* Listeners for an input with `v-model`, which hand the text being composed to `update`: a number
|
|
4
|
+
* for `type="number"`, as `v-model` gives it, and otherwise the text.
|
|
5
|
+
*/
|
|
6
|
+
function useComposingInput(update) {
|
|
7
|
+
let composing = false;
|
|
8
|
+
return {
|
|
9
|
+
/** For `compositionstart` and `compositionend` */
|
|
10
|
+
onComposition(event) {
|
|
11
|
+
composing = event.type === "compositionstart";
|
|
12
|
+
},
|
|
13
|
+
/** For `input` */
|
|
14
|
+
onInput(event) {
|
|
15
|
+
if (!composing) return;
|
|
16
|
+
const target = event.target;
|
|
17
|
+
const most = target.maxLength;
|
|
18
|
+
if (most >= 0 && target.value.length > most) return;
|
|
19
|
+
const number = target.type === "number" ? parseFloat(target.value) : NaN;
|
|
20
|
+
update(Number.isNaN(number) ? target.value : number);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export { useComposingInput };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,44 +1,74 @@
|
|
|
1
|
-
import _default
|
|
2
|
-
import _default$2 from "./
|
|
3
|
-
import _default$3 from "./
|
|
4
|
-
import _default from "./
|
|
5
|
-
import _default$
|
|
6
|
-
import _default$
|
|
7
|
-
import _default$
|
|
8
|
-
import _default$
|
|
9
|
-
import _default$
|
|
10
|
-
import _default$
|
|
11
|
-
import _default$
|
|
12
|
-
import _default$
|
|
13
|
-
import _default$
|
|
1
|
+
import _default from "./app-bar/AppBar.vue.js";
|
|
2
|
+
import _default$2 from "./badge/Badge.vue.js";
|
|
3
|
+
import _default$3 from "./bottom-sheet/BottomSheet.vue.js";
|
|
4
|
+
import _default$4 from "./button/Button.vue.js";
|
|
5
|
+
import _default$5 from "./button-group/ButtonGroup.vue.js";
|
|
6
|
+
import _default$6 from "./card/Card.vue.js";
|
|
7
|
+
import _default$7 from "./card/CardActions.vue.js";
|
|
8
|
+
import _default$8 from "./card/CardContent.vue.js";
|
|
9
|
+
import _default$9 from "./card/CardHeader.vue.js";
|
|
10
|
+
import _default$10 from "./card/CardMedia.vue.js";
|
|
11
|
+
import _default$11 from "./checkbox/Checkbox.vue.js";
|
|
12
|
+
import _default$1 from "./chip/AssistChip.vue.js";
|
|
13
|
+
import _default$12 from "./chip/ChipSet.vue.js";
|
|
14
|
+
import _default$22 from "./chip/FilterChip.vue.js";
|
|
15
|
+
import _default$25 from "./chip/InputChip.vue.js";
|
|
16
|
+
import _default$54 from "./chip/SuggestionChip.vue.js";
|
|
17
|
+
import _default$14 from "./date-picker/DatePicker.vue.js";
|
|
18
|
+
import _default$15 from "./date-picker/DatePickerDialog.vue.js";
|
|
19
|
+
import _default$16 from "./date-picker/DateRangePickerDialog.vue.js";
|
|
20
|
+
import _default$17 from "./dialog/Dialog.vue.js";
|
|
21
|
+
import _default$18 from "./divider/Divider.vue.js";
|
|
22
|
+
import _default$19 from "./fab/Fab.vue.js";
|
|
23
|
+
import _default$20 from "./fab-menu/FabMenu.vue.js";
|
|
24
|
+
import _default$21 from "./fab-menu/FabMenuItem.vue.js";
|
|
25
|
+
import _default$23 from "./icon/Icon.vue.js";
|
|
14
26
|
import { RioIconValue, RioIcons, iconsKey, useIconOfAlias } from "./icon/icons.js";
|
|
15
|
-
import _default$
|
|
27
|
+
import _default$24 from "./icon-button/IconButton.vue.js";
|
|
16
28
|
import { localeKey, messagesKey, useLocale, useMessages } from "./locale/locale.js";
|
|
29
|
+
import _default$40 from "./overflow/OverflowItem.vue.js";
|
|
17
30
|
import { RioOptions, RioPlugin, RioThemeOptions, createRio } from "./rio/rio.js";
|
|
18
|
-
import _default$
|
|
19
|
-
import _default$
|
|
20
|
-
import _default$
|
|
21
|
-
import _default$
|
|
22
|
-
import _default$
|
|
23
|
-
import _default$
|
|
24
|
-
import _default$
|
|
25
|
-
import _default$
|
|
26
|
-
import _default$
|
|
27
|
-
import _default$
|
|
28
|
-
import _default$
|
|
29
|
-
import _default$
|
|
30
|
-
import _default$
|
|
31
|
+
import _default$27 from "./list/List.vue.js";
|
|
32
|
+
import _default$28 from "./list/ListItem.vue.js";
|
|
33
|
+
import _default$30 from "./locale/LocaleProvider.vue.js";
|
|
34
|
+
import _default$29 from "./loading-indicator/LoadingIndicator.vue.js";
|
|
35
|
+
import _default$31 from "./menu/Menu.vue.js";
|
|
36
|
+
import _default$32 from "./menu/MenuDivider.vue.js";
|
|
37
|
+
import _default$33 from "./menu/MenuGroup.vue.js";
|
|
38
|
+
import _default$34 from "./menu/MenuItem.vue.js";
|
|
39
|
+
import _default$53 from "./menu/SubMenu.vue.js";
|
|
40
|
+
import _default$35 from "./navigation-bar/NavigationBar.vue.js";
|
|
41
|
+
import _default$36 from "./navigation-bar/NavigationBarItem.vue.js";
|
|
42
|
+
import _default$37 from "./navigation-rail/NavigationRail.vue.js";
|
|
43
|
+
import _default$38 from "./navigation-rail/NavigationRailItem.vue.js";
|
|
44
|
+
import _default$39 from "./navigation-rail/NavigationRailSection.vue.js";
|
|
45
|
+
import _default$13 from "./progress/CircularProgress.vue.js";
|
|
46
|
+
import _default$26 from "./progress/LinearProgress.vue.js";
|
|
47
|
+
import _default$41 from "./radio/Radio.vue.js";
|
|
48
|
+
import _default$42 from "./radio/RadioGroup.vue.js";
|
|
31
49
|
import { vRipple } from "./ripple/ripple.js";
|
|
32
|
-
import _default$
|
|
33
|
-
import _default$
|
|
34
|
-
import _default$
|
|
35
|
-
import _default$
|
|
36
|
-
import _default$
|
|
37
|
-
import _default$
|
|
38
|
-
import _default$
|
|
39
|
-
import _default$
|
|
40
|
-
import _default$
|
|
41
|
-
import
|
|
42
|
-
import _default$
|
|
43
|
-
import _default$
|
|
44
|
-
|
|
50
|
+
import _default$44 from "./scroll-field/ScrollField.vue.js";
|
|
51
|
+
import _default$45 from "./search/Search.vue.js";
|
|
52
|
+
import _default$46 from "./select/Select.vue.js";
|
|
53
|
+
import _default$47 from "./select/SelectOption.vue.js";
|
|
54
|
+
import _default$48 from "./side-sheet/SideSheet.vue.js";
|
|
55
|
+
import _default$43 from "./slider/RangeSlider.vue.js";
|
|
56
|
+
import _default$49 from "./slider/Slider.vue.js";
|
|
57
|
+
import _default$50 from "./snackbar/Snackbar.vue.js";
|
|
58
|
+
import _default$51 from "./snackbar/SnackbarHost.vue.js";
|
|
59
|
+
import { SnackbarController, snackbarKey, useSnackbar } from "./snackbar/snackbar.js";
|
|
60
|
+
import _default$52 from "./split-button/SplitButton.vue.js";
|
|
61
|
+
import _default$55 from "./switch/Switch.vue.js";
|
|
62
|
+
import _default$56 from "./tabs/Tab.vue.js";
|
|
63
|
+
import _default$57 from "./tabs/TabGroup.vue.js";
|
|
64
|
+
import _default$58 from "./tabs/TabPanel.vue.js";
|
|
65
|
+
import _default$59 from "./tabs/Tabs.vue.js";
|
|
66
|
+
import _default$60 from "./text-field/TextField.vue.js";
|
|
67
|
+
import _default$61 from "./theme/ThemeProvider.vue.js";
|
|
68
|
+
import { themeKey } from "./theme/context.js";
|
|
69
|
+
import _default$62 from "./time-picker/TimeInput.vue.js";
|
|
70
|
+
import _default$63 from "./time-picker/TimePickerDialog.vue.js";
|
|
71
|
+
import _default$64 from "./time-picker/TimeScroll.vue.js";
|
|
72
|
+
import _default$65 from "./toolbar/Toolbar.vue.js";
|
|
73
|
+
import _default$66 from "./tooltip/Tooltip.vue.js";
|
|
74
|
+
export { _default as RioAppBar, _default$1 as RioAssistChip, _default$2 as RioBadge, _default$3 as RioBottomSheet, _default$4 as RioButton, _default$5 as RioButtonGroup, _default$6 as RioCard, _default$7 as RioCardActions, _default$8 as RioCardContent, _default$9 as RioCardHeader, _default$10 as RioCardMedia, _default$11 as RioCheckbox, _default$12 as RioChipSet, _default$13 as RioCircularProgress, _default$14 as RioDatePicker, _default$15 as RioDatePickerDialog, _default$16 as RioDateRangePickerDialog, _default$17 as RioDialog, _default$18 as RioDivider, _default$19 as RioFab, _default$20 as RioFabMenu, _default$21 as RioFabMenuItem, _default$22 as RioFilterChip, _default$23 as RioIcon, _default$24 as RioIconButton, type RioIconValue, type RioIcons, _default$25 as RioInputChip, _default$26 as RioLinearProgress, _default$27 as RioList, _default$28 as RioListItem, _default$29 as RioLoadingIndicator, _default$30 as RioLocaleProvider, _default$31 as RioMenu, _default$32 as RioMenuDivider, _default$33 as RioMenuGroup, _default$34 as RioMenuItem, _default$35 as RioNavigationBar, _default$36 as RioNavigationBarItem, _default$37 as RioNavigationRail, _default$38 as RioNavigationRailItem, _default$39 as RioNavigationRailSection, type RioOptions, _default$40 as RioOverflowItem, type RioPlugin, _default$41 as RioRadio, _default$42 as RioRadioGroup, _default$43 as RioRangeSlider, _default$44 as RioScrollField, _default$45 as RioSearch, _default$46 as RioSelect, _default$47 as RioSelectOption, _default$48 as RioSideSheet, _default$49 as RioSlider, _default$50 as RioSnackbar, _default$51 as RioSnackbarHost, _default$52 as RioSplitButton, _default$53 as RioSubMenu, _default$54 as RioSuggestionChip, _default$55 as RioSwitch, _default$56 as RioTab, _default$57 as RioTabGroup, _default$58 as RioTabPanel, _default$59 as RioTabs, _default$60 as RioTextField, type RioThemeOptions, _default$61 as RioThemeProvider, _default$62 as RioTimeInput, _default$63 as RioTimePickerDialog, _default$64 as RioTimeScroll, _default$65 as RioToolbar, _default$66 as RioTooltip, type SnackbarController, createRio, iconsKey, localeKey, messagesKey, snackbarKey, themeKey, useIconOfAlias, useLocale, useMessages, useSnackbar, vRipple };
|
package/dist/index.js
CHANGED
|
@@ -1,44 +1,74 @@
|
|
|
1
|
-
import _sfc_main
|
|
2
|
-
import _sfc_main$2 from "./
|
|
3
|
-
import _sfc_main$3 from "./
|
|
4
|
-
import _sfc_main from "./
|
|
5
|
-
import _sfc_main$
|
|
6
|
-
import _sfc_main$
|
|
7
|
-
import _sfc_main$
|
|
8
|
-
import _sfc_main$
|
|
9
|
-
import _sfc_main$
|
|
10
|
-
import _sfc_main$
|
|
11
|
-
import _sfc_main$
|
|
12
|
-
import _sfc_main$
|
|
13
|
-
import _sfc_main$
|
|
1
|
+
import _sfc_main from "./app-bar/AppBar.vue.js";
|
|
2
|
+
import _sfc_main$2 from "./badge/Badge.vue.js";
|
|
3
|
+
import _sfc_main$3 from "./bottom-sheet/BottomSheet.vue.js";
|
|
4
|
+
import _sfc_main$4 from "./button/Button.vue.js";
|
|
5
|
+
import _sfc_main$5 from "./button-group/ButtonGroup.vue.js";
|
|
6
|
+
import _sfc_main$6 from "./card/Card.vue.js";
|
|
7
|
+
import _sfc_main$7 from "./card/CardActions.vue.js";
|
|
8
|
+
import _sfc_main$8 from "./card/CardContent.vue.js";
|
|
9
|
+
import _sfc_main$9 from "./card/CardHeader.vue.js";
|
|
10
|
+
import _sfc_main$10 from "./card/CardMedia.vue.js";
|
|
11
|
+
import _sfc_main$11 from "./checkbox/Checkbox.vue.js";
|
|
12
|
+
import _sfc_main$1 from "./chip/AssistChip.vue.js";
|
|
13
|
+
import _sfc_main$12 from "./chip/ChipSet.vue.js";
|
|
14
|
+
import _sfc_main$22 from "./chip/FilterChip.vue.js";
|
|
15
|
+
import _sfc_main$25 from "./chip/InputChip.vue.js";
|
|
16
|
+
import _sfc_main$54 from "./chip/SuggestionChip.vue.js";
|
|
17
|
+
import _sfc_main$14 from "./date-picker/DatePicker.vue.js";
|
|
18
|
+
import _sfc_main$15 from "./date-picker/DatePickerDialog.vue.js";
|
|
19
|
+
import _sfc_main$16 from "./date-picker/DateRangePickerDialog.vue.js";
|
|
20
|
+
import _sfc_main$17 from "./dialog/Dialog.vue.js";
|
|
21
|
+
import _sfc_main$18 from "./divider/Divider.vue.js";
|
|
22
|
+
import _sfc_main$19 from "./fab/Fab.vue.js";
|
|
23
|
+
import _sfc_main$20 from "./fab-menu/FabMenu.vue.js";
|
|
24
|
+
import _sfc_main$21 from "./fab-menu/FabMenuItem.vue.js";
|
|
25
|
+
import _sfc_main$23 from "./icon/Icon.vue.js";
|
|
14
26
|
import { iconsKey, useIconOfAlias } from "./icon/icons.js";
|
|
15
|
-
import _sfc_main$
|
|
27
|
+
import _sfc_main$24 from "./icon-button/IconButton.vue.js";
|
|
16
28
|
import { localeKey, messagesKey, useLocale, useMessages } from "./locale/locale.js";
|
|
29
|
+
import _sfc_main$40 from "./overflow/OverflowItem.vue.js";
|
|
17
30
|
import { createRio } from "./rio/rio.js";
|
|
18
|
-
import _sfc_main$
|
|
19
|
-
import _sfc_main$
|
|
20
|
-
import _sfc_main$
|
|
21
|
-
import _sfc_main$
|
|
22
|
-
import _sfc_main$
|
|
23
|
-
import _sfc_main$
|
|
24
|
-
import _sfc_main$
|
|
25
|
-
import _sfc_main$
|
|
26
|
-
import _sfc_main$
|
|
27
|
-
import _sfc_main$
|
|
28
|
-
import _sfc_main$
|
|
29
|
-
import _sfc_main$
|
|
30
|
-
import _sfc_main$
|
|
31
|
+
import _sfc_main$27 from "./list/List.vue.js";
|
|
32
|
+
import _sfc_main$28 from "./list/ListItem.vue.js";
|
|
33
|
+
import _sfc_main$30 from "./locale/LocaleProvider.vue.js";
|
|
34
|
+
import _sfc_main$29 from "./loading-indicator/LoadingIndicator.vue.js";
|
|
35
|
+
import _sfc_main$31 from "./menu/Menu.vue.js";
|
|
36
|
+
import _sfc_main$32 from "./menu/MenuDivider.vue.js";
|
|
37
|
+
import _sfc_main$33 from "./menu/MenuGroup.vue.js";
|
|
38
|
+
import _sfc_main$34 from "./menu/MenuItem.vue.js";
|
|
39
|
+
import _sfc_main$53 from "./menu/SubMenu.vue.js";
|
|
40
|
+
import _sfc_main$35 from "./navigation-bar/NavigationBar.vue.js";
|
|
41
|
+
import _sfc_main$36 from "./navigation-bar/NavigationBarItem.vue.js";
|
|
42
|
+
import _sfc_main$37 from "./navigation-rail/NavigationRail.vue.js";
|
|
43
|
+
import _sfc_main$38 from "./navigation-rail/NavigationRailItem.vue.js";
|
|
44
|
+
import _sfc_main$39 from "./navigation-rail/NavigationRailSection.vue.js";
|
|
45
|
+
import _sfc_main$13 from "./progress/CircularProgress.vue.js";
|
|
46
|
+
import _sfc_main$26 from "./progress/LinearProgress.vue.js";
|
|
47
|
+
import _sfc_main$41 from "./radio/Radio.vue.js";
|
|
48
|
+
import _sfc_main$42 from "./radio/RadioGroup.vue.js";
|
|
31
49
|
import { vRipple } from "./ripple/ripple.js";
|
|
32
|
-
import _sfc_main$
|
|
33
|
-
import _sfc_main$
|
|
34
|
-
import _sfc_main$
|
|
35
|
-
import _sfc_main$
|
|
36
|
-
import _sfc_main$
|
|
37
|
-
import _sfc_main$
|
|
38
|
-
import _sfc_main$
|
|
39
|
-
import _sfc_main$
|
|
40
|
-
import _sfc_main$
|
|
41
|
-
import
|
|
42
|
-
import _sfc_main$
|
|
43
|
-
import _sfc_main$
|
|
44
|
-
|
|
50
|
+
import _sfc_main$44 from "./scroll-field/ScrollField.vue.js";
|
|
51
|
+
import _sfc_main$45 from "./search/Search.vue.js";
|
|
52
|
+
import _sfc_main$46 from "./select/Select.vue.js";
|
|
53
|
+
import _sfc_main$47 from "./select/SelectOption.vue.js";
|
|
54
|
+
import _sfc_main$48 from "./side-sheet/SideSheet.vue.js";
|
|
55
|
+
import _sfc_main$43 from "./slider/RangeSlider.vue.js";
|
|
56
|
+
import _sfc_main$49 from "./slider/Slider.vue.js";
|
|
57
|
+
import _sfc_main$50 from "./snackbar/Snackbar.vue.js";
|
|
58
|
+
import _sfc_main$51 from "./snackbar/SnackbarHost.vue.js";
|
|
59
|
+
import { snackbarKey, useSnackbar } from "./snackbar/snackbar.js";
|
|
60
|
+
import _sfc_main$52 from "./split-button/SplitButton.vue.js";
|
|
61
|
+
import _sfc_main$55 from "./switch/Switch.vue.js";
|
|
62
|
+
import _sfc_main$56 from "./tabs/Tab.vue.js";
|
|
63
|
+
import _sfc_main$57 from "./tabs/TabGroup.vue.js";
|
|
64
|
+
import _sfc_main$58 from "./tabs/TabPanel.vue.js";
|
|
65
|
+
import _sfc_main$59 from "./tabs/Tabs.vue.js";
|
|
66
|
+
import _sfc_main$60 from "./text-field/TextField.vue.js";
|
|
67
|
+
import _sfc_main$61 from "./theme/ThemeProvider.vue.js";
|
|
68
|
+
import { themeKey } from "./theme/context.js";
|
|
69
|
+
import _sfc_main$62 from "./time-picker/TimeInput.vue.js";
|
|
70
|
+
import _sfc_main$63 from "./time-picker/TimePickerDialog.vue.js";
|
|
71
|
+
import _sfc_main$64 from "./time-picker/TimeScroll.vue.js";
|
|
72
|
+
import _sfc_main$65 from "./toolbar/Toolbar.vue.js";
|
|
73
|
+
import _sfc_main$66 from "./tooltip/Tooltip.vue.js";
|
|
74
|
+
export { _sfc_main as RioAppBar, _sfc_main$1 as RioAssistChip, _sfc_main$2 as RioBadge, _sfc_main$3 as RioBottomSheet, _sfc_main$4 as RioButton, _sfc_main$5 as RioButtonGroup, _sfc_main$6 as RioCard, _sfc_main$7 as RioCardActions, _sfc_main$8 as RioCardContent, _sfc_main$9 as RioCardHeader, _sfc_main$10 as RioCardMedia, _sfc_main$11 as RioCheckbox, _sfc_main$12 as RioChipSet, _sfc_main$13 as RioCircularProgress, _sfc_main$14 as RioDatePicker, _sfc_main$15 as RioDatePickerDialog, _sfc_main$16 as RioDateRangePickerDialog, _sfc_main$17 as RioDialog, _sfc_main$18 as RioDivider, _sfc_main$19 as RioFab, _sfc_main$20 as RioFabMenu, _sfc_main$21 as RioFabMenuItem, _sfc_main$22 as RioFilterChip, _sfc_main$23 as RioIcon, _sfc_main$24 as RioIconButton, _sfc_main$25 as RioInputChip, _sfc_main$26 as RioLinearProgress, _sfc_main$27 as RioList, _sfc_main$28 as RioListItem, _sfc_main$29 as RioLoadingIndicator, _sfc_main$30 as RioLocaleProvider, _sfc_main$31 as RioMenu, _sfc_main$32 as RioMenuDivider, _sfc_main$33 as RioMenuGroup, _sfc_main$34 as RioMenuItem, _sfc_main$35 as RioNavigationBar, _sfc_main$36 as RioNavigationBarItem, _sfc_main$37 as RioNavigationRail, _sfc_main$38 as RioNavigationRailItem, _sfc_main$39 as RioNavigationRailSection, _sfc_main$40 as RioOverflowItem, _sfc_main$41 as RioRadio, _sfc_main$42 as RioRadioGroup, _sfc_main$43 as RioRangeSlider, _sfc_main$44 as RioScrollField, _sfc_main$45 as RioSearch, _sfc_main$46 as RioSelect, _sfc_main$47 as RioSelectOption, _sfc_main$48 as RioSideSheet, _sfc_main$49 as RioSlider, _sfc_main$50 as RioSnackbar, _sfc_main$51 as RioSnackbarHost, _sfc_main$52 as RioSplitButton, _sfc_main$53 as RioSubMenu, _sfc_main$54 as RioSuggestionChip, _sfc_main$55 as RioSwitch, _sfc_main$56 as RioTab, _sfc_main$57 as RioTabGroup, _sfc_main$58 as RioTabPanel, _sfc_main$59 as RioTabs, _sfc_main$60 as RioTextField, _sfc_main$61 as RioThemeProvider, _sfc_main$62 as RioTimeInput, _sfc_main$63 as RioTimePickerDialog, _sfc_main$64 as RioTimeScroll, _sfc_main$65 as RioToolbar, _sfc_main$66 as RioTooltip, createRio, iconsKey, localeKey, messagesKey, snackbarKey, themeKey, useIconOfAlias, useLocale, useMessages, useSnackbar, vRipple };
|
package/dist/list/List.vue.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ListProps, ListSelected } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
2
3
|
import "@rio-m3e/styles/list.css";
|
|
3
4
|
interface Props extends Omit<ListProps, 'selected'> {
|
|
4
5
|
/** The selected value (`single`) or values (`multiple`), with `v-model`. */
|
package/dist/list/List.vue.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { listKey } from "./context.js";
|
|
2
2
|
import { createElementBlock, defineComponent, mergeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, provide, ref, renderSlot, unref, useTemplateRef } from "vue";
|
|
3
3
|
import { attachList, createList } from "@rio-m3e/core";
|
|
4
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
4
5
|
import "@rio-m3e/styles/list.css";
|
|
5
6
|
// src/list/List.vue
|
|
6
7
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
@@ -12,7 +13,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
12
13
|
required: { type: Boolean },
|
|
13
14
|
control: {},
|
|
14
15
|
controlPosition: {},
|
|
15
|
-
label: {}
|
|
16
|
+
label: {},
|
|
17
|
+
color: {}
|
|
16
18
|
},
|
|
17
19
|
emits: ["update:modelValue"],
|
|
18
20
|
setup(__props, { emit: __emit }) {
|
|
@@ -27,6 +29,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
27
29
|
control: __props.control,
|
|
28
30
|
controlPosition: __props.controlPosition,
|
|
29
31
|
label: __props.label,
|
|
32
|
+
color: __props.color,
|
|
30
33
|
selected: __props.modelValue
|
|
31
34
|
}),
|
|
32
35
|
tabStop: () => tabStop.value,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ListValue } from "@rio-m3e/core";
|
|
1
|
+
import { AccentColor, ListItemDivider, ListValue } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
2
3
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
3
4
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
4
5
|
import "@rio-m3e/styles/list.css";
|
|
@@ -9,6 +10,17 @@ type __VLS_Props = {
|
|
|
9
10
|
href?: string;
|
|
10
11
|
/** Disabled items stay focusable among the list's items, and nothing they do happens. */
|
|
11
12
|
disabled?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The theme color it takes while selected, and its control: `'secondary'`, `'tertiary'`,
|
|
15
|
+
* `'error'`, or a static color of the theme. Without it, the spec's, or the list's color.
|
|
16
|
+
*/
|
|
17
|
+
color?: AccentColor;
|
|
18
|
+
/**
|
|
19
|
+
* A divider under the item: `'inset'`, or `divider` alone, 16px in from the start and 24px from
|
|
20
|
+
* the end; `'text'` from the text's start, lined up with the text after a leading icon or avatar,
|
|
21
|
+
* to the end; `'text-inset'` from the text's start to 24px from the end; or `'full'` across it
|
|
22
|
+
*/
|
|
23
|
+
divider?: boolean | ListItemDivider;
|
|
12
24
|
/** Listening for clicks makes the item a button. */
|
|
13
25
|
onClick?: (event: MouseEvent) => void;
|
|
14
26
|
};
|
|
@@ -6,6 +6,7 @@ import _sfc_main$3 from "../switch/Switch.vue.js";
|
|
|
6
6
|
import { listKey, noList } from "./context.js";
|
|
7
7
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, inject, mergeProps, normalizeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, ref, renderSlot, resolveDynamicComponent, unref, useAttrs, useId, useSlots, useTemplateRef, withCtx, withDirectives } from "vue";
|
|
8
8
|
import { attachListItem, createListItem } from "@rio-m3e/core";
|
|
9
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
9
10
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
10
11
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
11
12
|
import "@rio-m3e/styles/list.css";
|
|
@@ -17,6 +18,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
17
18
|
value: {},
|
|
18
19
|
href: {},
|
|
19
20
|
disabled: { type: Boolean },
|
|
21
|
+
color: {},
|
|
22
|
+
divider: { type: Boolean },
|
|
20
23
|
onClick: { type: Function }
|
|
21
24
|
},
|
|
22
25
|
setup(__props) {
|
|
@@ -29,12 +32,16 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
29
32
|
});
|
|
30
33
|
const list = inject(listKey, noList);
|
|
31
34
|
const multiline = ref(false);
|
|
35
|
+
/** Where the text starts, as `attachListItem` measures it for a `'text-inset'` divider */
|
|
36
|
+
const textStart = ref();
|
|
32
37
|
const item = createListItem({
|
|
33
38
|
props: () => ({
|
|
34
39
|
value: props.value,
|
|
35
40
|
href: props.href,
|
|
36
41
|
action: !!props.onClick,
|
|
37
|
-
disabled: props.disabled
|
|
42
|
+
disabled: props.disabled,
|
|
43
|
+
color: props.color,
|
|
44
|
+
divider: props.divider
|
|
38
45
|
}),
|
|
39
46
|
list: () => list,
|
|
40
47
|
key: useId(),
|
|
@@ -44,7 +51,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
44
51
|
supporting: !!slots.supporting,
|
|
45
52
|
trailing: !!slots.trailing
|
|
46
53
|
}),
|
|
47
|
-
multiline: () => multiline.value
|
|
54
|
+
multiline: () => multiline.value,
|
|
55
|
+
textStart: () => textStart.value
|
|
48
56
|
});
|
|
49
57
|
const slotProps = computed(() => ({
|
|
50
58
|
selected: item.selected(),
|
|
@@ -66,7 +74,11 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
66
74
|
useRipple(pressed, root);
|
|
67
75
|
let handle;
|
|
68
76
|
onMounted(() => {
|
|
69
|
-
handle = attachListItem(root.value, {
|
|
77
|
+
handle = attachListItem(root.value, {
|
|
78
|
+
onMultilineChange: (next) => multiline.value = next,
|
|
79
|
+
measuresTextStart: item.measuresTextStart,
|
|
80
|
+
onTextStartChange: (next) => textStart.value = next
|
|
81
|
+
});
|
|
70
82
|
});
|
|
71
83
|
onUpdated(() => handle?.sync());
|
|
72
84
|
onBeforeUnmount(() => handle?.detach());
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LoadingIndicatorProps } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
2
3
|
import "@rio-m3e/styles/loading-indicator.css";
|
|
3
4
|
declare const __VLS_export: import("vue").DefineComponent<LoadingIndicatorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LoadingIndicatorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
5
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, unref, useTemplateRef } from "vue";
|
|
2
2
|
import { attachLoadingIndicator, createLoadingIndicator } from "@rio-m3e/core";
|
|
3
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
3
4
|
import "@rio-m3e/styles/loading-indicator.css";
|
|
4
5
|
// src/loading-indicator/LoadingIndicator.vue
|
|
5
6
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
@@ -9,6 +10,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
9
10
|
max: {},
|
|
10
11
|
contained: { type: Boolean },
|
|
11
12
|
size: {},
|
|
13
|
+
color: {},
|
|
12
14
|
shapes: {}
|
|
13
15
|
},
|
|
14
16
|
setup(__props) {
|
|
@@ -17,7 +19,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
17
19
|
max: __props.max,
|
|
18
20
|
contained: __props.contained,
|
|
19
21
|
size: __props.size,
|
|
20
|
-
shapes: __props.shapes
|
|
22
|
+
shapes: __props.shapes,
|
|
23
|
+
color: __props.color
|
|
21
24
|
}) });
|
|
22
25
|
const root = useTemplateRef("root");
|
|
23
26
|
const path = useTemplateRef("path");
|
package/dist/menu/Menu.vue.d.ts
CHANGED
|
@@ -20,11 +20,11 @@ type __VLS_Slots = {
|
|
|
20
20
|
default?: () => unknown;
|
|
21
21
|
};
|
|
22
22
|
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
|
-
"update:modelValue": (selected: MenuSelected) => any;
|
|
24
23
|
"update:open": (open: boolean) => any;
|
|
24
|
+
"update:modelValue": (selected: MenuSelected) => any;
|
|
25
25
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
26
|
-
"onUpdate:modelValue"?: ((selected: MenuSelected) => any) | undefined;
|
|
27
26
|
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
27
|
+
"onUpdate:modelValue"?: ((selected: MenuSelected) => any) | undefined;
|
|
28
28
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
29
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
30
|
declare const _default: typeof __VLS_export;
|
package/dist/menu/Menu.vue.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { keepPresses } from "../overlay/presses.js";
|
|
2
2
|
import { menuContextOf, menuKey } from "./context.js";
|
|
3
|
-
import { createElementBlock, defineComponent, mergeProps, onBeforeUnmount, onMounted, openBlock, provide, ref, renderSlot, toHandlers, unref, useTemplateRef, watch } from "vue";
|
|
3
|
+
import { createElementBlock, defineComponent, mergeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, provide, ref, renderSlot, toHandlers, unref, useId, useTemplateRef, watch } from "vue";
|
|
4
4
|
import { attachMenu, createMenu } from "@rio-m3e/core";
|
|
5
5
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
6
6
|
import "@rio-m3e/styles/base/direction.css";
|
|
@@ -40,7 +40,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
40
40
|
}),
|
|
41
41
|
onChange: (selected) => emit("update:modelValue", selected),
|
|
42
42
|
onOpenChange: (next) => emit("update:open", next),
|
|
43
|
-
inactive: () => inactive.value
|
|
43
|
+
inactive: () => inactive.value,
|
|
44
|
+
id: `${useId()}-menu`
|
|
44
45
|
});
|
|
45
46
|
provide(menuKey, menuContextOf(menu));
|
|
46
47
|
/** A component's root element, or the element or point itself */
|
|
@@ -56,6 +57,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
56
57
|
offset: __props.offset
|
|
57
58
|
}),
|
|
58
59
|
onClose: () => emit("update:open", false),
|
|
60
|
+
onOpen: () => emit("update:open", true),
|
|
59
61
|
onInactiveChange: (next) => inactive.value = next
|
|
60
62
|
});
|
|
61
63
|
handle.sync(!!__props.open);
|
|
@@ -70,6 +72,13 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
70
72
|
return point ? `${point.x},${point.y}` : anchorTarget();
|
|
71
73
|
};
|
|
72
74
|
watch([anchorKey, () => pointOf()?.element], () => handle?.update(), { flush: "post" });
|
|
75
|
+
let renderedId;
|
|
76
|
+
onUpdated(() => {
|
|
77
|
+
const id = root.value?.id;
|
|
78
|
+
if (id === renderedId) return;
|
|
79
|
+
renderedId = id;
|
|
80
|
+
handle?.update();
|
|
81
|
+
});
|
|
73
82
|
onBeforeUnmount(() => handle?.detach());
|
|
74
83
|
return (_ctx, _cache) => {
|
|
75
84
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { NavigationBarMessages, NavigationBarProps, NavigationBarValue } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
3
|
+
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
4
|
+
import "@rio-m3e/styles/navigation-bar.css";
|
|
5
|
+
interface Props extends Omit<NavigationBarProps, 'active'> {
|
|
6
|
+
/** The value of the active destination's item, with `v-model`. */
|
|
7
|
+
modelValue?: NavigationBarValue;
|
|
8
|
+
/** A language tag, for badges' counts. Without it, the one provided, or the page's. */
|
|
9
|
+
locale?: string;
|
|
10
|
+
/** Replaces what a small badge says. */
|
|
11
|
+
messages?: Partial<NavigationBarMessages>;
|
|
12
|
+
/** The element whose scrolling hides the bar, with `hideOnScroll`. Defaults to the window. */
|
|
13
|
+
scrollTarget?: HTMLElement | null;
|
|
14
|
+
}
|
|
15
|
+
type __VLS_Slots = {
|
|
16
|
+
/** The destinations (`RioNavigationBarItem`) */
|
|
17
|
+
default?: () => unknown;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
"update:modelValue": (value: NavigationBarValue) => any;
|
|
21
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
22
|
+
"onUpdate:modelValue"?: ((value: NavigationBarValue) => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export { _default as default };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { useLocale, useMessages } from "../locale/locale.js";
|
|
2
|
+
import { navigationBarKey } from "./context.js";
|
|
3
|
+
import { createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, provide, renderSlot, unref, useTemplateRef } from "vue";
|
|
4
|
+
import { attachNavigationBar, createNavigationBar } from "@rio-m3e/core";
|
|
5
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
6
|
+
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
7
|
+
import "@rio-m3e/styles/navigation-bar.css";
|
|
8
|
+
// src/navigation-bar/NavigationBar.vue
|
|
9
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
10
|
+
__name: "NavigationBar",
|
|
11
|
+
props: {
|
|
12
|
+
modelValue: {},
|
|
13
|
+
locale: {},
|
|
14
|
+
messages: {},
|
|
15
|
+
scrollTarget: {},
|
|
16
|
+
layout: {},
|
|
17
|
+
label: {},
|
|
18
|
+
color: {},
|
|
19
|
+
hideOnScroll: { type: Boolean }
|
|
20
|
+
},
|
|
21
|
+
emits: ["update:modelValue"],
|
|
22
|
+
setup(__props, { emit: __emit }) {
|
|
23
|
+
const emit = __emit;
|
|
24
|
+
const resolvedLocale = useLocale(() => __props.locale);
|
|
25
|
+
const text = useMessages("navigationBar", resolvedLocale, () => __props.messages);
|
|
26
|
+
const bar = createNavigationBar({
|
|
27
|
+
props: () => ({
|
|
28
|
+
active: __props.modelValue,
|
|
29
|
+
layout: __props.layout,
|
|
30
|
+
label: __props.label,
|
|
31
|
+
color: __props.color,
|
|
32
|
+
hideOnScroll: __props.hideOnScroll
|
|
33
|
+
}),
|
|
34
|
+
onChange: (value) => emit("update:modelValue", value)
|
|
35
|
+
});
|
|
36
|
+
provide(navigationBarKey, {
|
|
37
|
+
isActive: bar.isActive,
|
|
38
|
+
choose: bar.choose,
|
|
39
|
+
locale: resolvedLocale,
|
|
40
|
+
messages: text
|
|
41
|
+
});
|
|
42
|
+
const root = useTemplateRef("root");
|
|
43
|
+
let handle;
|
|
44
|
+
onMounted(() => {
|
|
45
|
+
handle = attachNavigationBar(root.value, {
|
|
46
|
+
hidesOnScroll: bar.hidesOnScroll,
|
|
47
|
+
target: () => __props.scrollTarget ?? void 0
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
onUpdated(() => handle?.update());
|
|
51
|
+
onBeforeUnmount(() => {
|
|
52
|
+
handle?.detach();
|
|
53
|
+
handle = void 0;
|
|
54
|
+
});
|
|
55
|
+
return (_ctx, _cache) => {
|
|
56
|
+
return openBlock(), createElementBlock("nav", mergeProps({
|
|
57
|
+
ref_key: "root",
|
|
58
|
+
ref: root
|
|
59
|
+
}, unref(bar).parts.root()), [createElementVNode("ul", normalizeProps(guardReactiveProps(unref(bar).parts.items())), [renderSlot(_ctx.$slots, "default")], 16)], 16);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AccentColor, NavigationBarValue } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
3
|
+
import "@rio-m3e/styles/base/focus-ring.css";
|
|
4
|
+
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
5
|
+
import "@rio-m3e/styles/navigation-bar.css";
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
/** Identifies the destination: the active one's is the bar's `v-model`. */
|
|
8
|
+
value?: NavigationBarValue;
|
|
9
|
+
/** The destination's name, under the icon or beside it */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Makes the item a link to this address. */
|
|
12
|
+
href?: string;
|
|
13
|
+
/**
|
|
14
|
+
* A badge on the icon: `true` for a small one, a dot, or a count or a short label for a large
|
|
15
|
+
* one. Its text is read after the destination's name.
|
|
16
|
+
*/
|
|
17
|
+
badge?: boolean | number | string;
|
|
18
|
+
/**
|
|
19
|
+
* The theme color it takes while active: `'primary'`, `'tertiary'`, `'error'`, or a static color
|
|
20
|
+
* of the theme. Without it, the spec's, or the bar's color.
|
|
21
|
+
*/
|
|
22
|
+
color?: AccentColor;
|
|
23
|
+
/** The app's own click, after the item has chosen its destination */
|
|
24
|
+
onClick?: (event: MouseEvent) => void;
|
|
25
|
+
};
|
|
26
|
+
type __VLS_Slots = {
|
|
27
|
+
/** The icon, outlined, for an inactive destination */
|
|
28
|
+
default?: () => unknown;
|
|
29
|
+
/** The icon while the destination is active, filled, in place of the default one */
|
|
30
|
+
'active-icon'?: () => unknown;
|
|
31
|
+
};
|
|
32
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
|
+
declare const _default: typeof __VLS_export;
|
|
35
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
36
|
+
new (): {
|
|
37
|
+
$slots: S;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export { _default as default };
|