morya-ui 0.3.1 → 0.3.3
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/CHANGELOG.md +62 -0
- package/dist/Button-gBiRj7wz.js +227 -0
- package/dist/{Card-Dsmnzong.js → Card-B1CB9Trm.js} +3 -5
- package/dist/Empty-C5tndBOm.js +147 -0
- package/dist/{FlyoutSubmenu-BrUPmJa1.js → FlyoutSubmenu-H_741alW.js} +2 -2
- package/dist/{Loading-BSsRs6v9.js → Loading-qS2Yv_gm.js} +1 -1
- package/dist/Pagination-Bvv2qvEK.js +166 -0
- package/dist/{Popover-BQ07q4VV.js → Popover-rnZG_ap0.js} +3 -3
- package/dist/Select-CiXd074W.js +572 -0
- package/dist/Skeleton-DCYdXAH2.js +59 -0
- package/dist/{Tooltip-D5DO0B3z.js → Tooltip-B02o9BOW.js} +3 -3
- package/dist/accordion/style.css +16 -71
- package/dist/auto-complete/index.js +120 -122
- package/dist/auto-complete/style.css +6 -82
- package/dist/avatar/style.css +6 -67
- package/dist/badge/style.css +6 -68
- package/dist/block-ui/index.js +1 -1
- package/dist/block-ui/style.css +6 -68
- package/dist/breadcrumb/style.css +6 -61
- package/dist/button/index.js +1 -1
- package/dist/button/style.css +345 -118
- package/dist/card/index.js +1 -1
- package/dist/card/style.css +26 -67
- package/dist/carousel/style.css +6 -73
- package/dist/cascade-select/index.js +3 -3
- package/dist/cascade-select/style.css +6 -75
- package/dist/checkbox/style.css +6 -61
- package/dist/chip/style.css +6 -67
- package/dist/command-menu/index.js +37 -39
- package/dist/command-menu/style.css +6 -75
- package/dist/components/Accordion/styles.css +10 -10
- package/dist/components/AutoComplete/AutoComplete.vue.d.ts.map +1 -1
- package/dist/components/AutoComplete/styles.css +0 -7
- package/dist/components/Badge/styles.css +0 -7
- package/dist/components/BlockUI/styles.css +0 -7
- package/dist/components/Button/Button.vue.d.ts +3 -0
- package/dist/components/Button/Button.vue.d.ts.map +1 -1
- package/dist/components/Button/styles.css +339 -51
- package/dist/components/Button/types.d.ts +11 -2
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/Card/Card.vue.d.ts +2 -2
- package/dist/components/Card/Card.vue.d.ts.map +1 -1
- package/dist/components/Card/index.d.ts +1 -1
- package/dist/components/Card/index.d.ts.map +1 -1
- package/dist/components/Card/styles.css +20 -6
- package/dist/components/Card/types.d.ts +4 -2
- package/dist/components/Card/types.d.ts.map +1 -1
- package/dist/components/Carousel/styles.css +0 -6
- package/dist/components/CommandMenu/CommandMenu.vue.d.ts.map +1 -1
- package/dist/components/ConfigProvider/ConfigProvider.vue.d.ts +2 -2
- package/dist/components/ContextMenu/ContextMenu.vue.d.ts.map +1 -1
- package/dist/components/ContextMenu/styles.css +19 -14
- package/dist/components/Dialog/styles.css +3 -46
- package/dist/components/Dock/styles.css +0 -10
- package/dist/components/Drawer/styles.css +2 -51
- package/dist/components/Fieldset/styles.css +0 -7
- package/dist/components/FileUpload/FileUpload.vue.d.ts.map +1 -1
- package/dist/components/FileUpload/fileUtils.d.ts +8 -0
- package/dist/components/FileUpload/fileUtils.d.ts.map +1 -0
- package/dist/components/Gallery/styles.css +0 -8
- package/dist/components/Icon/styles.css +0 -6
- package/dist/components/Knob/styles.css +0 -6
- package/dist/components/Layout/styles.css +0 -12
- package/dist/components/Listbox/Listbox.vue.d.ts.map +1 -1
- package/dist/components/Loading/styles.css +0 -16
- package/dist/components/Menu/Menu.vue.d.ts.map +1 -1
- package/dist/components/Menu/styles.css +4 -11
- package/dist/components/Message/styles.css +0 -13
- package/dist/components/Page/PageContent.vue.d.ts +2 -1
- package/dist/components/Page/PageContent.vue.d.ts.map +1 -1
- package/dist/components/Page/PageFilterChips.vue.d.ts +16 -0
- package/dist/components/Page/PageFilterChips.vue.d.ts.map +1 -0
- package/dist/components/Page/PageFilters.vue.d.ts +15 -3
- package/dist/components/Page/PageFilters.vue.d.ts.map +1 -1
- package/dist/components/Page/PageHeader.vue.d.ts +8 -4
- package/dist/components/Page/PageHeader.vue.d.ts.map +1 -1
- package/dist/components/Page/PagePlaceholder.vue.d.ts +6 -2
- package/dist/components/Page/PagePlaceholder.vue.d.ts.map +1 -1
- package/dist/components/Page/PageSection.vue.d.ts +8 -2
- package/dist/components/Page/PageSection.vue.d.ts.map +1 -1
- package/dist/components/Page/PageStat.vue.d.ts +8 -3
- package/dist/components/Page/PageStat.vue.d.ts.map +1 -1
- package/dist/components/Page/index.d.ts +2 -1
- package/dist/components/Page/index.d.ts.map +1 -1
- package/dist/components/Page/styles.css +239 -44
- package/dist/components/Page/types.d.ts +40 -0
- package/dist/components/Page/types.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.vue.d.ts.map +1 -1
- package/dist/components/Pagination/styles.css +7 -10
- package/dist/components/Pagination/types.d.ts +1 -1
- package/dist/components/Pagination/types.d.ts.map +1 -1
- package/dist/components/Panel/styles.css +0 -7
- package/dist/components/Popover/styles.css +21 -79
- package/dist/components/ProgressBar/styles.css +0 -9
- package/dist/components/ProgressSpinner/styles.css +0 -7
- package/dist/components/ScrollTop/styles.css +0 -7
- package/dist/components/Scrollbar/styles.css +0 -8
- package/dist/components/Select/Select.vue.d.ts +1 -3
- package/dist/components/Select/Select.vue.d.ts.map +1 -1
- package/dist/components/Select/selectOptions.d.ts +46 -0
- package/dist/components/Select/selectOptions.d.ts.map +1 -0
- package/dist/components/Select/styles.css +5 -7
- package/dist/components/Sidebar/styles.css +0 -6
- package/dist/components/Skeleton/styles.css +0 -6
- package/dist/components/Status/styles.css +0 -7
- package/dist/components/Switch/styles.css +0 -7
- package/dist/components/Table/hooks/useExpandableRow.d.ts.map +1 -1
- package/dist/components/Table/hooks/useTotalItems.d.ts.map +1 -1
- package/dist/components/Table/styles.css +7 -10
- package/dist/components/Table/tableQuery.d.ts +30 -0
- package/dist/components/Table/tableQuery.d.ts.map +1 -0
- package/dist/components/Tree/Tree.vue.d.ts.map +1 -1
- package/dist/components/Tree/treeQuery.d.ts +31 -0
- package/dist/components/Tree/treeQuery.d.ts.map +1 -0
- package/dist/components/TreeSelect/TreeSelect.vue.d.ts.map +1 -1
- package/dist/config-provider/index.js +1 -1
- package/dist/config-provider/style.css +345 -112
- package/dist/confirm-dialog/index.js +2 -2
- package/dist/confirm-dialog/style.css +348 -164
- package/dist/confirm-popup/index.js +5 -5
- package/dist/confirm-popup/style.css +345 -118
- package/dist/context-menu/index.js +105 -96
- package/dist/context-menu/style.css +25 -89
- package/dist/data-view/index.js +2 -2
- package/dist/data-view/style.css +13 -87
- package/dist/date-picker/index.js +3 -3
- package/dist/date-picker/style.css +6 -67
- package/dist/dialog/index.js +2 -2
- package/dist/dialog/style.css +348 -164
- package/dist/divider/style.css +6 -61
- package/dist/dock/style.css +6 -77
- package/dist/drawer/index.js +1 -1
- package/dist/drawer/style.css +8 -118
- package/dist/dropdown/index.js +4 -4
- package/dist/dropdown/style.css +6 -75
- package/dist/empty/index.js +5 -150
- package/dist/empty/style.css +6 -67
- package/dist/fieldset/style.css +6 -74
- package/dist/file-upload/index.js +147 -145
- package/dist/file-upload/style.css +6 -67
- package/dist/filterByQuery-Bczaxzih.js +17 -0
- package/dist/flex/style.css +6 -61
- package/dist/float-label/style.css +6 -61
- package/dist/fluid/style.css +6 -61
- package/dist/form/style.css +6 -61
- package/dist/gallery/style.css +6 -83
- package/dist/grid/style.css +6 -61
- package/dist/icon/style.css +6 -67
- package/dist/icon-field/style.css +6 -61
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9135 -8796
- package/dist/inplace/style.css +6 -61
- package/dist/input/style.css +6 -67
- package/dist/input-color/style.css +6 -61
- package/dist/input-group/style.css +6 -61
- package/dist/input-number/style.css +6 -67
- package/dist/input-otp/style.css +6 -61
- package/dist/input-password/style.css +6 -67
- package/dist/input-tags/style.css +6 -67
- package/dist/knob/style.css +6 -67
- package/dist/label/style.css +6 -61
- package/dist/layout/style.css +6 -87
- package/dist/listbox/index.js +30 -32
- package/dist/listbox/style.css +6 -69
- package/dist/loading/index.js +1 -1
- package/dist/loading/style.css +6 -77
- package/dist/mega-menu/index.js +3 -3
- package/dist/mega-menu/style.css +6 -67
- package/dist/menu/index.js +268 -258
- package/dist/menu/style.css +31 -165
- package/dist/menubar/index.js +3 -3
- package/dist/menubar/style.css +6 -75
- package/dist/message/index.js +1 -1
- package/dist/message/style.css +6 -80
- package/dist/meter-group/style.css +6 -61
- package/dist/order-list/style.css +6 -67
- package/dist/{overlayPlacement-Cd20JTD_.js → overlayPlacement-qwEJPVS4.js} +8 -8
- package/dist/page/index.js +228 -69
- package/dist/page/style.css +1605 -299
- package/dist/page/style.js +3 -0
- package/dist/pagination/index.js +1 -1
- package/dist/pagination/style.css +206 -77
- package/dist/pagination/style.js +1 -0
- package/dist/panel/style.css +6 -74
- package/dist/pick-list/style.css +6 -67
- package/dist/popover/index.js +1 -1
- package/dist/popover/style.css +27 -140
- package/dist/progress-bar/style.css +6 -70
- package/dist/progress-spinner/style.css +6 -68
- package/dist/radio/style.css +6 -61
- package/dist/rating/style.css +6 -67
- package/dist/resolver-map.d.ts.map +1 -1
- package/dist/resolver.js +1 -0
- package/dist/result/style.css +6 -67
- package/dist/scroll-top/style.css +6 -82
- package/dist/scrollbar/style.css +6 -69
- package/dist/select/index.js +2 -545
- package/dist/select/style.css +11 -82
- package/dist/select-button/style.css +6 -61
- package/dist/shared/config.d.ts +2 -2
- package/dist/shared/filterByQuery.d.ts +14 -0
- package/dist/shared/filterByQuery.d.ts.map +1 -0
- package/dist/shared/menu/expand.d.ts +38 -0
- package/dist/shared/menu/expand.d.ts.map +1 -0
- package/dist/shared/menu/index.d.ts +2 -0
- package/dist/shared/menu/index.d.ts.map +1 -1
- package/dist/shared/overlayPlacement.d.ts.map +1 -1
- package/dist/sidebar/style.css +6 -73
- package/dist/skeleton/index.js +2 -59
- package/dist/skeleton/style.css +6 -67
- package/dist/slider/style.css +6 -61
- package/dist/space/style.css +6 -61
- package/dist/speed-dial/index.js +3 -3
- package/dist/speed-dial/style.css +6 -67
- package/dist/split-button/index.js +3 -3
- package/dist/split-button/style.css +345 -118
- package/dist/splitter/style.css +6 -61
- package/dist/status/style.css +6 -74
- package/dist/stepper/style.css +6 -67
- package/dist/styles/base.css +1 -50
- package/dist/styles.css +1 -1
- package/dist/switch/style.css +6 -68
- package/dist/table/index.js +343 -313
- package/dist/table/style.css +20 -111
- package/dist/tabs/style.css +6 -75
- package/dist/tag/style.css +6 -67
- package/dist/terminal/style.css +6 -61
- package/dist/textarea/style.css +6 -67
- package/dist/theme/motionPresets.d.ts.map +1 -1
- package/dist/theme/styles.css +5 -11
- package/dist/theme/useMotion.d.ts +5 -1
- package/dist/theme/useMotion.d.ts.map +1 -1
- package/dist/tiered-menu/index.js +4 -4
- package/dist/tiered-menu/style.css +6 -75
- package/dist/timeline/style.css +6 -75
- package/dist/toast/index.js +1 -1
- package/dist/toast/style.css +6 -67
- package/dist/toggle-button/style.css +6 -67
- package/dist/toolbar/style.css +6 -61
- package/dist/tooltip/index.js +1 -1
- package/dist/tooltip/style.css +6 -61
- package/dist/tree/index.js +158 -172
- package/dist/tree/style.css +6 -67
- package/dist/tree-select/index.js +201 -215
- package/dist/tree-select/style.css +6 -75
- package/dist/tree-table/style.css +6 -67
- package/dist/treeQuery-CnHkyYOA.js +107 -0
- package/dist/{useFloatingViewportSync-DZdJ7W8n.js → useFloatingViewportSync-wLLKIGUA.js} +4 -1
- package/dist/{useMotionTransition-Bxnnb_9u.js → useMotionTransition-95Y79FoL.js} +1 -1
- package/dist/virtual-scroller/style.css +6 -69
- package/package.json +2 -1
- package/dist/Button-smoDleh0.js +0 -156
- package/dist/Pagination-DrXmzcEy.js +0 -158
- package/dist/checkStrategy-CZzuUKDI.js +0 -63
|
@@ -50,6 +50,10 @@
|
|
|
50
50
|
--m-font-size-sm: 0.8125rem;
|
|
51
51
|
--m-font-size-md: 0.875rem;
|
|
52
52
|
--m-font-size-lg: 1.125rem;
|
|
53
|
+
/* Display scale (page titles, KPI figures) */
|
|
54
|
+
--m-font-size-xl: 1.25rem;
|
|
55
|
+
--m-font-size-2xl: 1.5rem;
|
|
56
|
+
--m-font-size-3xl: 1.75rem;
|
|
53
57
|
--m-opacity-disabled: 0.55;
|
|
54
58
|
/* Layering: override --m-z-base via ConfigProvider / createMoryaUI */
|
|
55
59
|
--m-z-base: 1000;
|
|
@@ -192,20 +196,10 @@
|
|
|
192
196
|
|
|
193
197
|
/*
|
|
194
198
|
* Global motion policy (complements per-component rules):
|
|
195
|
-
* - `reduced
|
|
199
|
+
* - `reduced`: keep short paint transitions; stop loops
|
|
196
200
|
* and layout/transform size animation.
|
|
197
201
|
* - `none`: zero all transition/animation durations.
|
|
198
202
|
*/
|
|
199
|
-
@media (prefers-reduced-motion: reduce) {
|
|
200
|
-
html:not([data-m-ignore-reduced-motion]) *,
|
|
201
|
-
html:not([data-m-ignore-reduced-motion]) *::before,
|
|
202
|
-
html:not([data-m-ignore-reduced-motion]) *::after {
|
|
203
|
-
animation-duration: 0.01ms !important;
|
|
204
|
-
animation-iteration-count: 1 !important;
|
|
205
|
-
transition-property: background-color, border-color, color, opacity, box-shadow,
|
|
206
|
-
outline, fill, stroke, stroke-dashoffset !important;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
203
|
|
|
210
204
|
[data-m-motion="reduced"] *,
|
|
211
205
|
[data-m-motion="reduced"] *::before,
|
|
@@ -615,7 +609,7 @@
|
|
|
615
609
|
.m-zoom-enter-from,
|
|
616
610
|
.m-zoom-leave-to {
|
|
617
611
|
opacity: 0;
|
|
618
|
-
transform: scale(0.
|
|
612
|
+
transform: scale(0.95);
|
|
619
613
|
}
|
|
620
614
|
|
|
621
615
|
.m-slide-up-enter-active,
|
|
@@ -660,44 +654,6 @@
|
|
|
660
654
|
transform: translateX(calc(var(--m-motion-distance) * -1));
|
|
661
655
|
}
|
|
662
656
|
|
|
663
|
-
@media (prefers-reduced-motion: reduce) {
|
|
664
|
-
html:not([data-m-ignore-reduced-motion]) .m-fade-enter-active,
|
|
665
|
-
html:not([data-m-ignore-reduced-motion]) .m-fade-leave-active,
|
|
666
|
-
html:not([data-m-ignore-reduced-motion]) .m-scale-fade-enter-active,
|
|
667
|
-
html:not([data-m-ignore-reduced-motion]) .m-scale-fade-leave-active,
|
|
668
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-fade-enter-active,
|
|
669
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-fade-leave-active,
|
|
670
|
-
html:not([data-m-ignore-reduced-motion]) .m-zoom-enter-active,
|
|
671
|
-
html:not([data-m-ignore-reduced-motion]) .m-zoom-leave-active,
|
|
672
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-up-enter-active,
|
|
673
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-up-leave-active,
|
|
674
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-down-enter-active,
|
|
675
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-down-leave-active,
|
|
676
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-left-enter-active,
|
|
677
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-left-leave-active,
|
|
678
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-right-enter-active,
|
|
679
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-right-leave-active {
|
|
680
|
-
transition: none;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
html:not([data-m-ignore-reduced-motion]) .m-scale-fade-enter-from,
|
|
684
|
-
html:not([data-m-ignore-reduced-motion]) .m-scale-fade-leave-to,
|
|
685
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-fade-enter-from,
|
|
686
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-fade-leave-to,
|
|
687
|
-
html:not([data-m-ignore-reduced-motion]) .m-zoom-enter-from,
|
|
688
|
-
html:not([data-m-ignore-reduced-motion]) .m-zoom-leave-to,
|
|
689
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-up-enter-from,
|
|
690
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-up-leave-to,
|
|
691
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-down-enter-from,
|
|
692
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-down-leave-to,
|
|
693
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-left-enter-from,
|
|
694
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-left-leave-to,
|
|
695
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-right-enter-from,
|
|
696
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-right-leave-to {
|
|
697
|
-
transform: none;
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
|
|
701
657
|
[data-m-motion="reduced"] .m-fade-enter-active,
|
|
702
658
|
[data-m-motion="reduced"] .m-fade-leave-active,
|
|
703
659
|
[data-m-motion="reduced"] .m-scale-fade-enter-active,
|
|
@@ -1192,17 +1148,6 @@
|
|
|
1192
1148
|
animation: none !important;
|
|
1193
1149
|
}
|
|
1194
1150
|
|
|
1195
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1196
|
-
html:not([data-m-ignore-reduced-motion]) *,
|
|
1197
|
-
html:not([data-m-ignore-reduced-motion]) *::before,
|
|
1198
|
-
html:not([data-m-ignore-reduced-motion]) *::after {
|
|
1199
|
-
animation-duration: 0.01ms !important;
|
|
1200
|
-
animation-iteration-count: 1 !important;
|
|
1201
|
-
scroll-behavior: auto !important;
|
|
1202
|
-
transition-duration: 0.01ms !important;
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
1151
|
/* Shared picker suffix slot: clear + dropdown indicator (Select, TreeSelect). */
|
|
1207
1152
|
.m-select__control {
|
|
1208
1153
|
--m-control-end-padding: var(--m-control-affix-padding);
|
|
@@ -1681,12 +1626,6 @@
|
|
|
1681
1626
|
}
|
|
1682
1627
|
}
|
|
1683
1628
|
|
|
1684
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1685
|
-
html:not([data-m-ignore-reduced-motion]) .m-icon--spin svg {
|
|
1686
|
-
animation: none;
|
|
1687
|
-
}
|
|
1688
|
-
}
|
|
1689
|
-
|
|
1690
1629
|
:root[data-m-motion='none'] .m-icon--spin svg,
|
|
1691
1630
|
:root[data-m-motion='reduced'] .m-icon--spin svg {
|
|
1692
1631
|
animation: none;
|
|
@@ -1816,14 +1755,6 @@
|
|
|
1816
1755
|
opacity: 0;
|
|
1817
1756
|
}
|
|
1818
1757
|
|
|
1819
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1820
|
-
html:not([data-m-ignore-reduced-motion]) .m-scrollbar__thumb,
|
|
1821
|
-
html:not([data-m-ignore-reduced-motion]) .m-scrollbar-fade-enter-active,
|
|
1822
|
-
html:not([data-m-ignore-reduced-motion]) .m-scrollbar-fade-leave-active {
|
|
1823
|
-
transition: none;
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
|
|
1827
1758
|
:root[data-m-motion='none'] .m-scrollbar__thumb,
|
|
1828
1759
|
:root[data-m-motion='none'] .m-scrollbar-fade-enter-active,
|
|
1829
1760
|
:root[data-m-motion='none'] .m-scrollbar-fade-leave-active,
|
|
@@ -50,6 +50,10 @@
|
|
|
50
50
|
--m-font-size-sm: 0.8125rem;
|
|
51
51
|
--m-font-size-md: 0.875rem;
|
|
52
52
|
--m-font-size-lg: 1.125rem;
|
|
53
|
+
/* Display scale (page titles, KPI figures) */
|
|
54
|
+
--m-font-size-xl: 1.25rem;
|
|
55
|
+
--m-font-size-2xl: 1.5rem;
|
|
56
|
+
--m-font-size-3xl: 1.75rem;
|
|
53
57
|
--m-opacity-disabled: 0.55;
|
|
54
58
|
/* Layering: override --m-z-base via ConfigProvider / createMoryaUI */
|
|
55
59
|
--m-z-base: 1000;
|
|
@@ -192,20 +196,10 @@
|
|
|
192
196
|
|
|
193
197
|
/*
|
|
194
198
|
* Global motion policy (complements per-component rules):
|
|
195
|
-
* - `reduced
|
|
199
|
+
* - `reduced`: keep short paint transitions; stop loops
|
|
196
200
|
* and layout/transform size animation.
|
|
197
201
|
* - `none`: zero all transition/animation durations.
|
|
198
202
|
*/
|
|
199
|
-
@media (prefers-reduced-motion: reduce) {
|
|
200
|
-
html:not([data-m-ignore-reduced-motion]) *,
|
|
201
|
-
html:not([data-m-ignore-reduced-motion]) *::before,
|
|
202
|
-
html:not([data-m-ignore-reduced-motion]) *::after {
|
|
203
|
-
animation-duration: 0.01ms !important;
|
|
204
|
-
animation-iteration-count: 1 !important;
|
|
205
|
-
transition-property: background-color, border-color, color, opacity, box-shadow,
|
|
206
|
-
outline, fill, stroke, stroke-dashoffset !important;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
203
|
|
|
210
204
|
[data-m-motion="reduced"] *,
|
|
211
205
|
[data-m-motion="reduced"] *::before,
|
|
@@ -615,7 +609,7 @@
|
|
|
615
609
|
.m-zoom-enter-from,
|
|
616
610
|
.m-zoom-leave-to {
|
|
617
611
|
opacity: 0;
|
|
618
|
-
transform: scale(0.
|
|
612
|
+
transform: scale(0.95);
|
|
619
613
|
}
|
|
620
614
|
|
|
621
615
|
.m-slide-up-enter-active,
|
|
@@ -660,44 +654,6 @@
|
|
|
660
654
|
transform: translateX(calc(var(--m-motion-distance) * -1));
|
|
661
655
|
}
|
|
662
656
|
|
|
663
|
-
@media (prefers-reduced-motion: reduce) {
|
|
664
|
-
html:not([data-m-ignore-reduced-motion]) .m-fade-enter-active,
|
|
665
|
-
html:not([data-m-ignore-reduced-motion]) .m-fade-leave-active,
|
|
666
|
-
html:not([data-m-ignore-reduced-motion]) .m-scale-fade-enter-active,
|
|
667
|
-
html:not([data-m-ignore-reduced-motion]) .m-scale-fade-leave-active,
|
|
668
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-fade-enter-active,
|
|
669
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-fade-leave-active,
|
|
670
|
-
html:not([data-m-ignore-reduced-motion]) .m-zoom-enter-active,
|
|
671
|
-
html:not([data-m-ignore-reduced-motion]) .m-zoom-leave-active,
|
|
672
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-up-enter-active,
|
|
673
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-up-leave-active,
|
|
674
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-down-enter-active,
|
|
675
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-down-leave-active,
|
|
676
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-left-enter-active,
|
|
677
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-left-leave-active,
|
|
678
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-right-enter-active,
|
|
679
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-right-leave-active {
|
|
680
|
-
transition: none;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
html:not([data-m-ignore-reduced-motion]) .m-scale-fade-enter-from,
|
|
684
|
-
html:not([data-m-ignore-reduced-motion]) .m-scale-fade-leave-to,
|
|
685
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-fade-enter-from,
|
|
686
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-fade-leave-to,
|
|
687
|
-
html:not([data-m-ignore-reduced-motion]) .m-zoom-enter-from,
|
|
688
|
-
html:not([data-m-ignore-reduced-motion]) .m-zoom-leave-to,
|
|
689
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-up-enter-from,
|
|
690
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-up-leave-to,
|
|
691
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-down-enter-from,
|
|
692
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-down-leave-to,
|
|
693
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-left-enter-from,
|
|
694
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-left-leave-to,
|
|
695
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-right-enter-from,
|
|
696
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-right-leave-to {
|
|
697
|
-
transform: none;
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
|
|
701
657
|
[data-m-motion="reduced"] .m-fade-enter-active,
|
|
702
658
|
[data-m-motion="reduced"] .m-fade-leave-active,
|
|
703
659
|
[data-m-motion="reduced"] .m-scale-fade-enter-active,
|
|
@@ -1192,17 +1148,6 @@
|
|
|
1192
1148
|
animation: none !important;
|
|
1193
1149
|
}
|
|
1194
1150
|
|
|
1195
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1196
|
-
html:not([data-m-ignore-reduced-motion]) *,
|
|
1197
|
-
html:not([data-m-ignore-reduced-motion]) *::before,
|
|
1198
|
-
html:not([data-m-ignore-reduced-motion]) *::after {
|
|
1199
|
-
animation-duration: 0.01ms !important;
|
|
1200
|
-
animation-iteration-count: 1 !important;
|
|
1201
|
-
scroll-behavior: auto !important;
|
|
1202
|
-
transition-duration: 0.01ms !important;
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
1151
|
.m-icon {
|
|
1207
1152
|
color: currentColor;
|
|
1208
1153
|
display: inline-flex;
|
|
@@ -1247,12 +1192,6 @@
|
|
|
1247
1192
|
}
|
|
1248
1193
|
}
|
|
1249
1194
|
|
|
1250
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1251
|
-
html:not([data-m-ignore-reduced-motion]) .m-icon--spin svg {
|
|
1252
|
-
animation: none;
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
1195
|
:root[data-m-motion='none'] .m-icon--spin svg,
|
|
1257
1196
|
:root[data-m-motion='reduced'] .m-icon--spin svg {
|
|
1258
1197
|
animation: none;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { i as e, r as t } from "./filterByQuery-Bczaxzih.js";
|
|
2
|
+
//#region src/components/Tree/checkStrategy.ts
|
|
3
|
+
function n(e, t, r) {
|
|
4
|
+
for (let i of e) t(i, r), i.children?.length && n(i.children, t, i);
|
|
5
|
+
}
|
|
6
|
+
function r(e, t, n) {
|
|
7
|
+
t ? n[e.key] = !0 : delete n[e.key];
|
|
8
|
+
for (let i of e.children ?? []) r(i, t, n);
|
|
9
|
+
}
|
|
10
|
+
function i(e) {
|
|
11
|
+
let t = /* @__PURE__ */ new Map();
|
|
12
|
+
return n(e, (e) => {
|
|
13
|
+
t.set(e.key, e.children ?? []);
|
|
14
|
+
}), t;
|
|
15
|
+
}
|
|
16
|
+
function a(e, t) {
|
|
17
|
+
i(e);
|
|
18
|
+
let n = (e) => {
|
|
19
|
+
for (let r of e) r.children?.length && (n(r.children), r.children.every((e) => t[e.key]) ? t[r.key] = !0 : delete t[r.key]);
|
|
20
|
+
};
|
|
21
|
+
n(e);
|
|
22
|
+
}
|
|
23
|
+
function o(e, t, i, o) {
|
|
24
|
+
let s = { ...t };
|
|
25
|
+
return o ? s : (i === "parent" && n(e, (e) => {
|
|
26
|
+
t[e.key] && r(e, !0, s);
|
|
27
|
+
}), a(e, s), s);
|
|
28
|
+
}
|
|
29
|
+
function s(e, t, r, i) {
|
|
30
|
+
if (i || r === "all") return { ...t };
|
|
31
|
+
let a = {};
|
|
32
|
+
if (r === "child") return n(e, (e) => {
|
|
33
|
+
t[e.key] && !e.children?.length && (a[e.key] = !0);
|
|
34
|
+
}), a;
|
|
35
|
+
let o = (e, n) => {
|
|
36
|
+
for (let r of e) {
|
|
37
|
+
let e = !!t[r.key];
|
|
38
|
+
e && !n && (a[r.key] = !0), r.children?.length && o(r.children, e);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
return o(e, !1), a;
|
|
42
|
+
}
|
|
43
|
+
function c(e, t) {
|
|
44
|
+
if (!t) return null;
|
|
45
|
+
for (let n of e) {
|
|
46
|
+
if (n.key === t) return n;
|
|
47
|
+
let e = c(n.children ?? [], t);
|
|
48
|
+
if (e) return e;
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
function l(e, t) {
|
|
53
|
+
let n = [], r = (e, i) => {
|
|
54
|
+
for (let a of e) {
|
|
55
|
+
let e = [...i, a.label];
|
|
56
|
+
if (a.key === t) return n.push(...e), !0;
|
|
57
|
+
if (a.children?.length && r(a.children, e)) return !0;
|
|
58
|
+
}
|
|
59
|
+
return !1;
|
|
60
|
+
};
|
|
61
|
+
return r(e, []), n;
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/components/Tree/treeQuery.ts
|
|
65
|
+
function u(n, r) {
|
|
66
|
+
return e(r.label, t(n));
|
|
67
|
+
}
|
|
68
|
+
function d(e, t, n = u) {
|
|
69
|
+
let r = t.trim();
|
|
70
|
+
return !r || n(r, e) ? !0 : (e.children ?? []).some((e) => d(e, t, n));
|
|
71
|
+
}
|
|
72
|
+
function f(e, t, n) {
|
|
73
|
+
return t.trim() ? e.filter((e) => d(e, t, n)) : e;
|
|
74
|
+
}
|
|
75
|
+
function p(n, r) {
|
|
76
|
+
let i = t(r);
|
|
77
|
+
if (!i) return n;
|
|
78
|
+
let a = (t) => {
|
|
79
|
+
let n = e(t.label, i), r = (t.children ?? []).map(a).filter((e) => e != null);
|
|
80
|
+
return n || r.length ? {
|
|
81
|
+
...t,
|
|
82
|
+
children: r.length ? r : t.children
|
|
83
|
+
} : null;
|
|
84
|
+
};
|
|
85
|
+
return n.map(a).filter((e) => e != null);
|
|
86
|
+
}
|
|
87
|
+
function m(e) {
|
|
88
|
+
let t = {};
|
|
89
|
+
return n(e, (e) => {
|
|
90
|
+
e.children?.length && (t[e.key] = !0);
|
|
91
|
+
}), t;
|
|
92
|
+
}
|
|
93
|
+
function h(e, t, n = {}) {
|
|
94
|
+
let r = n.mode ?? "delete", i = n.open ?? !!e[t];
|
|
95
|
+
if (r === "boolean") return {
|
|
96
|
+
...e,
|
|
97
|
+
[t]: !i
|
|
98
|
+
};
|
|
99
|
+
if (i) {
|
|
100
|
+
let n = { ...e };
|
|
101
|
+
return delete n[t], n;
|
|
102
|
+
}
|
|
103
|
+
let a = n.accordion ? {} : { ...e };
|
|
104
|
+
return a[t] = !0, a;
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
export { h as a, o as c, s as d, r as f, u as i, c as l, p as n, d as o, a as p, f as r, i as s, m as t, l as u };
|
|
@@ -12,7 +12,7 @@ var i = {
|
|
|
12
12
|
"slide-left": { name: "m-slide-left" },
|
|
13
13
|
"slide-right": { name: "m-slide-right" },
|
|
14
14
|
drawer: { name: "m-drawer" },
|
|
15
|
-
popover: { name: "m-
|
|
15
|
+
popover: { name: "m-scale-fade" },
|
|
16
16
|
loading: { name: "m-loading" },
|
|
17
17
|
blockui: { name: "m-blockui" },
|
|
18
18
|
message: { name: "m-message-slide" },
|
|
@@ -50,6 +50,10 @@
|
|
|
50
50
|
--m-font-size-sm: 0.8125rem;
|
|
51
51
|
--m-font-size-md: 0.875rem;
|
|
52
52
|
--m-font-size-lg: 1.125rem;
|
|
53
|
+
/* Display scale (page titles, KPI figures) */
|
|
54
|
+
--m-font-size-xl: 1.25rem;
|
|
55
|
+
--m-font-size-2xl: 1.5rem;
|
|
56
|
+
--m-font-size-3xl: 1.75rem;
|
|
53
57
|
--m-opacity-disabled: 0.55;
|
|
54
58
|
/* Layering: override --m-z-base via ConfigProvider / createMoryaUI */
|
|
55
59
|
--m-z-base: 1000;
|
|
@@ -192,20 +196,10 @@
|
|
|
192
196
|
|
|
193
197
|
/*
|
|
194
198
|
* Global motion policy (complements per-component rules):
|
|
195
|
-
* - `reduced
|
|
199
|
+
* - `reduced`: keep short paint transitions; stop loops
|
|
196
200
|
* and layout/transform size animation.
|
|
197
201
|
* - `none`: zero all transition/animation durations.
|
|
198
202
|
*/
|
|
199
|
-
@media (prefers-reduced-motion: reduce) {
|
|
200
|
-
html:not([data-m-ignore-reduced-motion]) *,
|
|
201
|
-
html:not([data-m-ignore-reduced-motion]) *::before,
|
|
202
|
-
html:not([data-m-ignore-reduced-motion]) *::after {
|
|
203
|
-
animation-duration: 0.01ms !important;
|
|
204
|
-
animation-iteration-count: 1 !important;
|
|
205
|
-
transition-property: background-color, border-color, color, opacity, box-shadow,
|
|
206
|
-
outline, fill, stroke, stroke-dashoffset !important;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
203
|
|
|
210
204
|
[data-m-motion="reduced"] *,
|
|
211
205
|
[data-m-motion="reduced"] *::before,
|
|
@@ -615,7 +609,7 @@
|
|
|
615
609
|
.m-zoom-enter-from,
|
|
616
610
|
.m-zoom-leave-to {
|
|
617
611
|
opacity: 0;
|
|
618
|
-
transform: scale(0.
|
|
612
|
+
transform: scale(0.95);
|
|
619
613
|
}
|
|
620
614
|
|
|
621
615
|
.m-slide-up-enter-active,
|
|
@@ -660,44 +654,6 @@
|
|
|
660
654
|
transform: translateX(calc(var(--m-motion-distance) * -1));
|
|
661
655
|
}
|
|
662
656
|
|
|
663
|
-
@media (prefers-reduced-motion: reduce) {
|
|
664
|
-
html:not([data-m-ignore-reduced-motion]) .m-fade-enter-active,
|
|
665
|
-
html:not([data-m-ignore-reduced-motion]) .m-fade-leave-active,
|
|
666
|
-
html:not([data-m-ignore-reduced-motion]) .m-scale-fade-enter-active,
|
|
667
|
-
html:not([data-m-ignore-reduced-motion]) .m-scale-fade-leave-active,
|
|
668
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-fade-enter-active,
|
|
669
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-fade-leave-active,
|
|
670
|
-
html:not([data-m-ignore-reduced-motion]) .m-zoom-enter-active,
|
|
671
|
-
html:not([data-m-ignore-reduced-motion]) .m-zoom-leave-active,
|
|
672
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-up-enter-active,
|
|
673
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-up-leave-active,
|
|
674
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-down-enter-active,
|
|
675
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-down-leave-active,
|
|
676
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-left-enter-active,
|
|
677
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-left-leave-active,
|
|
678
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-right-enter-active,
|
|
679
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-right-leave-active {
|
|
680
|
-
transition: none;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
html:not([data-m-ignore-reduced-motion]) .m-scale-fade-enter-from,
|
|
684
|
-
html:not([data-m-ignore-reduced-motion]) .m-scale-fade-leave-to,
|
|
685
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-fade-enter-from,
|
|
686
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-fade-leave-to,
|
|
687
|
-
html:not([data-m-ignore-reduced-motion]) .m-zoom-enter-from,
|
|
688
|
-
html:not([data-m-ignore-reduced-motion]) .m-zoom-leave-to,
|
|
689
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-up-enter-from,
|
|
690
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-up-leave-to,
|
|
691
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-down-enter-from,
|
|
692
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-down-leave-to,
|
|
693
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-left-enter-from,
|
|
694
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-left-leave-to,
|
|
695
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-right-enter-from,
|
|
696
|
-
html:not([data-m-ignore-reduced-motion]) .m-slide-right-leave-to {
|
|
697
|
-
transform: none;
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
|
|
701
657
|
[data-m-motion="reduced"] .m-fade-enter-active,
|
|
702
658
|
[data-m-motion="reduced"] .m-fade-leave-active,
|
|
703
659
|
[data-m-motion="reduced"] .m-scale-fade-enter-active,
|
|
@@ -1192,17 +1148,6 @@
|
|
|
1192
1148
|
animation: none !important;
|
|
1193
1149
|
}
|
|
1194
1150
|
|
|
1195
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1196
|
-
html:not([data-m-ignore-reduced-motion]) *,
|
|
1197
|
-
html:not([data-m-ignore-reduced-motion]) *::before,
|
|
1198
|
-
html:not([data-m-ignore-reduced-motion]) *::after {
|
|
1199
|
-
animation-duration: 0.01ms !important;
|
|
1200
|
-
animation-iteration-count: 1 !important;
|
|
1201
|
-
scroll-behavior: auto !important;
|
|
1202
|
-
transition-duration: 0.01ms !important;
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
1151
|
.m-scrollbar {
|
|
1207
1152
|
--m-scrollbar-track-size: 6px;
|
|
1208
1153
|
--m-scrollbar-inset: 0.125rem;
|
|
@@ -1327,14 +1272,6 @@
|
|
|
1327
1272
|
opacity: 0;
|
|
1328
1273
|
}
|
|
1329
1274
|
|
|
1330
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1331
|
-
html:not([data-m-ignore-reduced-motion]) .m-scrollbar__thumb,
|
|
1332
|
-
html:not([data-m-ignore-reduced-motion]) .m-scrollbar-fade-enter-active,
|
|
1333
|
-
html:not([data-m-ignore-reduced-motion]) .m-scrollbar-fade-leave-active {
|
|
1334
|
-
transition: none;
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
1275
|
:root[data-m-motion='none'] .m-scrollbar__thumb,
|
|
1339
1276
|
:root[data-m-motion='none'] .m-scrollbar-fade-enter-active,
|
|
1340
1277
|
:root[data-m-motion='none'] .m-scrollbar-fade-leave-active,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "morya-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.3",
|
|
5
5
|
"description": "Open-source Vue 3 component library with design tokens, themes, and interactive docs.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://morya-space.github.io/morya-ui/",
|
|
@@ -750,6 +750,7 @@
|
|
|
750
750
|
"release:nuxt": "node scripts/release-nuxt.mjs",
|
|
751
751
|
"release:setup": "node scripts/release-setup.mjs",
|
|
752
752
|
"mcp:generate": "pnpm --filter @morya-ui/mcp generate",
|
|
753
|
+
"mcp:generate-recipes": "pnpm --filter @morya-ui/mcp generate:recipes",
|
|
753
754
|
"mcp:check-catalog": "pnpm --filter @morya-ui/mcp check-catalog",
|
|
754
755
|
"mcp:validate-catalog": "pnpm --filter @morya-ui/mcp validate-catalog",
|
|
755
756
|
"mcp:audit-examples": "pnpm --filter @morya-ui/mcp audit-example-coverage",
|
package/dist/Button-smoDleh0.js
DELETED
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { r as e, t } from "./types-DGuu4Eg4.js";
|
|
2
|
-
import { t as n } from "./Icon-od9Ob-Ay.js";
|
|
3
|
-
import { o as r } from "./config-CapALqt3.js";
|
|
4
|
-
import { Comment as i, Fragment as a, Text as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, defineComponent as p, normalizeClass as m, normalizeStyle as h, openBlock as g, ref as _, renderSlot as v, resolveDynamicComponent as y, toDisplayString as b, useSlots as x } from "vue";
|
|
5
|
-
//#region src/components/Button/Button.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var S = [
|
|
7
|
-
"type",
|
|
8
|
-
"disabled",
|
|
9
|
-
"autofocus",
|
|
10
|
-
"aria-busy",
|
|
11
|
-
"aria-label"
|
|
12
|
-
], C = {
|
|
13
|
-
key: 1,
|
|
14
|
-
class: "m-button__label"
|
|
15
|
-
}, w = /* @__PURE__ */ p({
|
|
16
|
-
__name: "Button",
|
|
17
|
-
props: {
|
|
18
|
-
label: {},
|
|
19
|
-
icon: {},
|
|
20
|
-
iconPos: { default: "left" },
|
|
21
|
-
iconOnly: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: !1
|
|
24
|
-
},
|
|
25
|
-
severity: {},
|
|
26
|
-
color: {},
|
|
27
|
-
raised: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
default: !1
|
|
30
|
-
},
|
|
31
|
-
rounded: {
|
|
32
|
-
type: Boolean,
|
|
33
|
-
default: !1
|
|
34
|
-
},
|
|
35
|
-
text: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: !1
|
|
38
|
-
},
|
|
39
|
-
outlined: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: !1
|
|
42
|
-
},
|
|
43
|
-
link: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: !1
|
|
46
|
-
},
|
|
47
|
-
ghost: {
|
|
48
|
-
type: Boolean,
|
|
49
|
-
default: !1
|
|
50
|
-
},
|
|
51
|
-
quaternary: {
|
|
52
|
-
type: Boolean,
|
|
53
|
-
default: !1
|
|
54
|
-
},
|
|
55
|
-
plain: {
|
|
56
|
-
type: Boolean,
|
|
57
|
-
default: !1
|
|
58
|
-
},
|
|
59
|
-
variant: {},
|
|
60
|
-
size: {},
|
|
61
|
-
fluid: {
|
|
62
|
-
type: Boolean,
|
|
63
|
-
default: !1
|
|
64
|
-
},
|
|
65
|
-
loading: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
default: !1
|
|
68
|
-
},
|
|
69
|
-
disabled: {
|
|
70
|
-
type: Boolean,
|
|
71
|
-
default: !1
|
|
72
|
-
},
|
|
73
|
-
badge: {},
|
|
74
|
-
badgeSeverity: { default: null },
|
|
75
|
-
autofocus: {
|
|
76
|
-
type: Boolean,
|
|
77
|
-
default: !1
|
|
78
|
-
},
|
|
79
|
-
nativeType: { default: "button" },
|
|
80
|
-
ariaLabel: {}
|
|
81
|
-
},
|
|
82
|
-
emits: ["click"],
|
|
83
|
-
setup(p, { expose: w, emit: T }) {
|
|
84
|
-
let E = p, D = T, O = x(), k = _(null), A = s(() => !!O.default?.().some((e) => q(e))), j = s(() => A.value || !!E.label?.trim()), M = s(() => E.outlined || E.variant === "outlined"), N = s(() => E.text || E.variant === "text"), P = s(() => E.link || E.variant === "link"), F = s(() => E.ghost || E.variant === "ghost"), I = s(() => E.quaternary || E.variant === "quaternary"), L = s(() => E.fluid), R = r("Button", () => E.size), z = s(() => e(R.value)), B = s(() => E.iconOnly || !j.value && !!(E.icon || O.icon || E.loading)), V = s(() => t(E.severity) ?? "primary"), H = s(() => typeof E.icon == "string" ? E.icon : void 0), U = s(() => typeof E.icon == "string" || !E.icon ? void 0 : E.icon), W = s(() => [
|
|
85
|
-
"m-button",
|
|
86
|
-
`m-button--${V.value}`,
|
|
87
|
-
`m-button--${R.value}`,
|
|
88
|
-
`m-button--icon-${E.iconPos}`,
|
|
89
|
-
{
|
|
90
|
-
"m-button--raised": E.raised,
|
|
91
|
-
"m-button--rounded": E.rounded,
|
|
92
|
-
"m-button--text": N.value,
|
|
93
|
-
"m-button--outlined": M.value,
|
|
94
|
-
"m-button--link": P.value,
|
|
95
|
-
"m-button--ghost": F.value,
|
|
96
|
-
"m-button--quaternary": I.value,
|
|
97
|
-
"m-button--plain": E.plain,
|
|
98
|
-
"m-button--fluid": L.value,
|
|
99
|
-
"m-button--loading": E.loading,
|
|
100
|
-
"m-button--icon-only": B.value,
|
|
101
|
-
"m-button--custom": !!E.color
|
|
102
|
-
}
|
|
103
|
-
]), G = s(() => E.color ? { "--m-button-color": E.color } : void 0), K = s(() => ["m-button__badge", E.badgeSeverity ? `m-button__badge--${t(E.badgeSeverity)}` : "m-button__badge--contrast"]);
|
|
104
|
-
function q(e) {
|
|
105
|
-
if (e == null || typeof e == "boolean") return !1;
|
|
106
|
-
if (typeof e == "string" || typeof e == "number") return String(e).trim().length > 0;
|
|
107
|
-
if (Array.isArray(e)) return e.some((e) => q(e));
|
|
108
|
-
if (typeof e == "object" && "type" in e) {
|
|
109
|
-
let t = e;
|
|
110
|
-
return t.type === i ? !1 : t.type === o ? String(t.children ?? "").trim().length > 0 : t.type !== a || q(t.children);
|
|
111
|
-
}
|
|
112
|
-
return !1;
|
|
113
|
-
}
|
|
114
|
-
function J(e) {
|
|
115
|
-
E.disabled || E.loading || D("click", e);
|
|
116
|
-
}
|
|
117
|
-
function Y() {
|
|
118
|
-
k.value?.focus();
|
|
119
|
-
}
|
|
120
|
-
return w({
|
|
121
|
-
focus: Y,
|
|
122
|
-
ref: k
|
|
123
|
-
}), (e, t) => (g(), u("button", {
|
|
124
|
-
ref_key: "buttonElement",
|
|
125
|
-
ref: k,
|
|
126
|
-
class: m(W.value),
|
|
127
|
-
style: h(G.value),
|
|
128
|
-
type: p.nativeType,
|
|
129
|
-
disabled: p.disabled || p.loading,
|
|
130
|
-
autofocus: p.autofocus || void 0,
|
|
131
|
-
"aria-busy": p.loading || void 0,
|
|
132
|
-
"aria-label": p.ariaLabel || (B.value ? p.label : void 0),
|
|
133
|
-
onClick: J
|
|
134
|
-
}, [
|
|
135
|
-
p.loading || p.icon || e.$slots.icon ? (g(), u("span", {
|
|
136
|
-
key: 0,
|
|
137
|
-
class: m(["m-button__icon", { "m-button__icon--loading": p.loading }]),
|
|
138
|
-
"aria-hidden": "true"
|
|
139
|
-
}, [p.loading ? v(e.$slots, "loadingicon", {}, () => [t[0] ||= d("span", { class: "m-button__spinner" }, null, -1)], void 0, 0) : v(e.$slots, "icon", { class: "m-button__icon-slot" }, () => [H.value ? (g(), c(n, {
|
|
140
|
-
key: 0,
|
|
141
|
-
name: H.value,
|
|
142
|
-
size: z.value
|
|
143
|
-
}, null, 8, ["name", "size"])) : U.value ? (g(), c(y(U.value), {
|
|
144
|
-
key: 1,
|
|
145
|
-
class: "m-button__icon-graphic"
|
|
146
|
-
})) : l("", !0)], void 0, 1)], 2)) : l("", !0),
|
|
147
|
-
j.value && !p.iconOnly ? (g(), u("span", C, [v(e.$slots, "default", {}, () => [f(b(p.label), 1)])])) : l("", !0),
|
|
148
|
-
p.badge != null && p.badge !== "" ? (g(), u("span", {
|
|
149
|
-
key: 2,
|
|
150
|
-
class: m(K.value)
|
|
151
|
-
}, b(p.badge), 3)) : l("", !0)
|
|
152
|
-
], 14, S));
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
//#endregion
|
|
156
|
-
export { w as t };
|