@mono-lit/helper 0.0.2 → 0.0.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/dist/{breakpoints-CAbhDUht.js → breakpoints-DllybT82.js} +7 -5
- package/dist/checkbox.css_raw-AYtSbUtY.js +5 -0
- package/dist/{chip-limits-BMoO31JM.js → chip-limits-CFABydIL.js} +5 -3
- package/dist/{chip-strip-Cw3gyz0q.js → chip-strip-bNfLn52Z.js} +5 -3
- package/dist/chip.css_raw-ChfRSHLO.js +5 -0
- package/dist/{color-DHYrfXsX.js → color-CEYYtRX-.js} +8 -7
- package/dist/{css-class-BRKRzHx-.js → css-class-B6Tc_MAx.js} +2 -1
- package/dist/{css-size-DhHSVZJK.js → css-size-DWAPgQdT.js} +2 -1
- package/dist/{data-source-controller-Dbb4fd8I.js → data-source-controller-Cf_sMxEh.js} +4 -2
- package/dist/{data-source-controller-B_rgHCjw.js → data-source-controller-Dx6IQ2CN.js} +4 -2
- package/dist/{data-source-options-CP-X62Pa.js → data-source-options-Bk-UoaZV.js} +15 -10
- package/dist/{data-source-options-Jqj7LU3Z.js → data-source-options-QjuI73g8.js} +17 -12
- package/dist/{data-source-read-B4DGp6UQ.js → data-source-read-Cuqw3LcP.js} +7 -4
- package/dist/{data-source-read-DL88aH8t.js → data-source-read-FxqzQkk2.js} +8 -5
- package/dist/{decorate-DEXtNagw.js → decorate-DbYFpi8R.js} +7 -5
- package/dist/{element-props-CLB6yvbm.js → element-props-xvw0EB7H.js} +4 -3
- package/dist/{esm-Ptok4SQZ.js → esm-D0We7ndD.js} +48 -44
- package/dist/{excel-DopRbEMK.js → excel-BXzr3uI1.js} +192 -16
- package/dist/{excel-CY6zGkcx.js → excel-DtRpxmxs.js} +27 -16
- package/dist/{export-BiGVyxt6.js → export-B91P6J1y.js} +104 -18
- package/dist/export.js +103 -18
- package/dist/{field-icons-DELrSdqJ.js → field-icons-FmyBWa0g.js} +3 -1
- package/dist/{field-path-C92eGLg3.js → field-path-BabiMrrA.js} +3 -2
- package/dist/{filter-builder-CE4zE0V5.js → filter-builder-B6Y2mmbM.js} +7 -4
- package/dist/{filter-builder-Bke3qOgJ.js → filter-builder-C0T3pMx2.js} +7 -4
- package/dist/{filter-eval-DIfU2EAn.js → filter-eval-ChDSaAUH.js} +7 -5
- package/dist/{filter-odata-C1vSGZaY.js → filter-odata-Bi27XUpQ.js} +9 -6
- package/dist/{form-control-core-B8d7k6vk.js → form-control-core-CIdMLXMo.js} +9 -6
- package/dist/{form-control-core-eeRr0zLU.js → form-control-core-CRZPZ1ru.js} +9 -6
- package/dist/hydration-flush-DHrl4_KK.js +1014 -0
- package/dist/{icon-CJkTlmTb.js → icon-BM9N-jOt.js} +5 -2
- package/dist/{icon-dVhYJUIH.js → icon-ClxnYhBG.js} +4 -2
- package/dist/{import-BgJdkwBI.js → import-Dc4eXC02.js} +22 -16
- package/dist/import.js +22 -16
- package/dist/index.js +17 -16
- package/dist/{index.node-BIqEGehH.js → index.node-dvrNviMx.js} +26 -20
- package/dist/index.node.js +17 -16
- package/dist/input.css_raw-CGESifay.js +5 -0
- package/dist/{layout-var-CZnzMC0s.js → layout-var-BSBKY49k.js} +3 -2
- package/dist/{light-slots-BVJwyg_2.js → light-slots-4ZCjOcBg.js} +6 -4
- package/dist/{light-slots-DW1WgfgT.js → light-slots-DdDdZ6zs.js} +6 -4
- package/dist/{markdown-DfqrfOJN.js → markdown-uGlE_OfJ.js} +414 -369
- package/dist/mono-button-CeDB9khW.js +878 -0
- package/dist/mono-button.shadow-D9NdMsmH.js +790 -0
- package/dist/{mono-data-chart-CEv29_NS.js → mono-data-chart-ChkelNT7.js} +15 -12
- package/dist/{mono-data-dropdown-Wnoke6zO.js → mono-data-dropdown-DxpUUk2y.js} +5 -3
- package/dist/{mono-data-grid-YjR3n9Ar.js → mono-data-grid-8jmeIXUU.js} +56 -38
- package/dist/{mono-data-grid-CjkEqxgE.js → mono-data-grid-BHlo1IgR.js} +56 -38
- package/dist/{mono-element-B0kP_96P.js → mono-element-C7vCschg.js} +7 -4
- package/dist/{mono-event-Bi1qP9uN.js → mono-event-BPku9HpS.js} +4 -3
- package/dist/{mono-form-controller-5PfsU4qa.js → mono-form-controller-IYn0MuUQ.js} +7 -4
- package/dist/{mono-modal-controller-BMO3n3rP.js → mono-modal-controller-ClObbHUs.js} +9 -7
- package/dist/{mono-ui-CPV7rrdo.js → mono-ui-BwUc0L6B.js} +22 -20
- package/dist/{normalize-error-Gcgmgh5i.js → normalize-error-D93O4q8g.js} +26 -20
- package/dist/{notifier-CE4yxMUQ.js → notifier-BIrqUzRh.js} +11 -1
- package/dist/nuxt.js +20 -15
- package/dist/{popup-portal-BziRX1yG.js → popup-portal-HWhkd7oy.js} +6 -4
- package/dist/{popup-stack-CEEMib__.js → popup-stack-De05Y-mJ.js} +13 -10
- package/dist/{rate-limit-BBa2PO79.js → rate-limit-e9Jlpl5l.js} +12 -9
- package/dist/{reactive-Di3mTMnV.js → reactive-DFCdZbH9.js} +30 -22
- package/dist/{reactive-D3EERqgO.js → reactive-Dtd-esHO.js} +2 -1
- package/dist/search.js +5 -4
- package/dist/src/components/accordion/accordion-core.d.ts +42 -40
- package/dist/src/components/accordion/accordion-types.d.ts +50 -48
- package/dist/src/components/accordion/index.d.ts +3 -2
- package/dist/src/components/accordion/index.shadow.d.ts +4 -4
- package/dist/src/components/accordion/mono-accordion.d.ts +44 -40
- package/dist/src/components/accordion/mono-accordion.shadow.d.ts +42 -38
- package/dist/src/components/alert/alert-core.d.ts +30 -28
- package/dist/src/components/alert/alert-types.d.ts +36 -34
- package/dist/src/components/alert/index.d.ts +3 -2
- package/dist/src/components/alert/index.shadow.d.ts +4 -4
- package/dist/src/components/alert/mono-alert.d.ts +30 -26
- package/dist/src/components/alert/mono-alert.shadow.d.ts +24 -20
- package/dist/src/components/breadcrumb/breadcrumb-core.d.ts +42 -40
- package/dist/src/components/breadcrumb/breadcrumb-list-core.d.ts +31 -29
- package/dist/src/components/breadcrumb/breadcrumb-render.d.ts +18 -16
- package/dist/src/components/breadcrumb/breadcrumb-types.d.ts +89 -87
- package/dist/src/components/breadcrumb/breadcrumb-utils.d.ts +18 -15
- package/dist/src/components/breadcrumb/index.d.ts +6 -5
- package/dist/src/components/breadcrumb/index.shadow.d.ts +7 -7
- package/dist/src/components/breadcrumb/mono-breadcrumb-list.d.ts +18 -14
- package/dist/src/components/breadcrumb/mono-breadcrumb-list.shadow.d.ts +33 -29
- package/dist/src/components/breadcrumb/mono-breadcrumb.d.ts +24 -20
- package/dist/src/components/breadcrumb/mono-breadcrumb.shadow.d.ts +55 -51
- package/dist/src/components/button/button-core.d.ts +73 -71
- package/dist/src/components/button/button-dropdown-core.d.ts +55 -53
- package/dist/src/components/button/button-dropdown-types.d.ts +98 -96
- package/dist/src/components/button/button-types.d.ts +157 -155
- package/dist/src/components/button/button-utils.d.ts +7 -5
- package/dist/src/components/button/index.button-dropdown.d.ts +5 -3
- package/dist/src/components/button/index.button-dropdown.shadow.d.ts +5 -3
- package/dist/src/components/button/index.d.ts +4 -7
- package/dist/src/components/button/index.shadow.d.ts +5 -4
- package/dist/src/components/button/mono-button-dropdown.d.ts +24 -19
- package/dist/src/components/button/mono-button-dropdown.shadow.d.ts +34 -29
- package/dist/src/components/button/mono-button.d.ts +105 -101
- package/dist/src/components/button/mono-button.shadow.d.ts +42 -38
- package/dist/src/components/card/card-core.d.ts +59 -57
- package/dist/src/components/card/card-types.d.ts +91 -89
- package/dist/src/components/card/card-utils.d.ts +11 -9
- package/dist/src/components/card/index.d.ts +4 -3
- package/dist/src/components/card/index.shadow.d.ts +5 -5
- package/dist/src/components/card/mono-card.d.ts +36 -32
- package/dist/src/components/card/mono-card.shadow.d.ts +32 -28
- package/dist/src/components/chart/chart-core.d.ts +30 -28
- package/dist/src/components/chart/chart-odata.d.ts +17 -16
- package/dist/src/components/chart/chart-types.d.ts +269 -267
- package/dist/src/components/chart/index.d.ts +7 -7
- package/dist/src/components/chart/index.shadow.d.ts +7 -6
- package/dist/src/components/chart/mono-chart-presets.d.ts +33 -29
- package/dist/src/components/chart/mono-chart-presets.shadow.d.ts +33 -29
- package/dist/src/components/chart/mono-chart.d.ts +13 -9
- package/dist/src/components/chart/mono-chart.shadow.d.ts +13 -9
- package/dist/src/components/chart/mono-data-chart.d.ts +4 -26
- package/dist/src/components/checkbox/checkbox-core.d.ts +39 -37
- package/dist/src/components/checkbox/checkbox-types.d.ts +59 -57
- package/dist/src/components/checkbox/checkbox-utils.d.ts +13 -11
- package/dist/src/components/checkbox/index.d.ts +4 -3
- package/dist/src/components/checkbox/index.shadow.d.ts +5 -4
- package/dist/src/components/checkbox/mono-checkbox.d.ts +21 -17
- package/dist/src/components/checkbox/mono-checkbox.shadow.d.ts +31 -27
- package/dist/src/components/chip/chip-core.d.ts +42 -40
- package/dist/src/components/chip/chip-types.d.ts +104 -102
- package/dist/src/components/chip/chip-utils.d.ts +20 -18
- package/dist/src/components/chip/index.d.ts +5 -7
- package/dist/src/components/chip/index.shadow.d.ts +6 -5
- package/dist/src/components/chip/mono-chip.d.ts +31 -27
- package/dist/src/components/chip/mono-chip.shadow.d.ts +19 -15
- package/dist/src/components/chip/mono-status-dot.d.ts +19 -17
- package/dist/src/components/date/date-core.d.ts +64 -62
- package/dist/src/components/date/date-types.d.ts +143 -141
- package/dist/src/components/date/index.d.ts +3 -2
- package/dist/src/components/date/index.shadow.d.ts +4 -3
- package/dist/src/components/date/mono-date.d.ts +12 -8
- package/dist/src/components/date/mono-date.shadow.d.ts +21 -17
- package/dist/src/components/drawer/drawer-core.d.ts +75 -73
- package/dist/src/components/drawer/drawer-types.d.ts +109 -107
- package/dist/src/components/drawer/index.d.ts +3 -2
- package/dist/src/components/drawer/index.shadow.d.ts +4 -3
- package/dist/src/components/drawer/mono-drawer.d.ts +32 -28
- package/dist/src/components/drawer/mono-drawer.shadow.d.ts +34 -31
- package/dist/src/components/dropdown/dropdown-core.d.ts +31 -29
- package/dist/src/components/dropdown/dropdown-types.d.ts +62 -60
- package/dist/src/components/dropdown/index.d.ts +3 -2
- package/dist/src/components/dropdown/index.shadow.d.ts +4 -3
- package/dist/src/components/dropdown/mono-dropdown.d.ts +23 -19
- package/dist/src/components/dropdown/mono-dropdown.shadow.d.ts +19 -15
- package/dist/src/components/dropdown-table/dropdown-table-core.d.ts +53 -51
- package/dist/src/components/dropdown-table/dropdown-table-types.d.ts +218 -216
- package/dist/src/components/dropdown-table/index.d.ts +5 -4
- package/dist/src/components/dropdown-table/index.shadow.d.ts +6 -5
- package/dist/src/components/dropdown-table/mono-data-dropdown.d.ts +119 -129
- package/dist/src/components/dropdown-table/mono-dropdown-table.d.ts +20 -16
- package/dist/src/components/dropdown-table/mono-dropdown-table.shadow.d.ts +15 -11
- package/dist/src/components/file-upload/file-upload-core.d.ts +44 -42
- package/dist/src/components/file-upload/file-upload-types.d.ts +123 -121
- package/dist/src/components/file-upload/file-upload-utils.d.ts +7 -4
- package/dist/src/components/file-upload/index.d.ts +4 -3
- package/dist/src/components/file-upload/index.shadow.d.ts +5 -4
- package/dist/src/components/file-upload/mono-file-upload.d.ts +20 -16
- package/dist/src/components/file-upload/mono-file-upload.shadow.d.ts +34 -30
- package/dist/src/components/filter/filter-builder-core.d.ts +17 -15
- package/dist/src/components/filter/filter-builder.d.ts +4 -22
- package/dist/src/components/filter/filter-odata.d.ts +3 -1
- package/dist/src/components/filter/filter-operators.d.ts +3 -1
- package/dist/src/components/filter/filter-types.d.ts +172 -170
- package/dist/src/components/filter/index.d.ts +6 -5
- package/dist/src/components/filter/index.shadow.d.ts +7 -6
- package/dist/src/components/filter/mono-filter-builder.d.ts +13 -10
- package/dist/src/components/filter/mono-filter-builder.shadow.d.ts +10 -7
- package/dist/src/components/form/form-control-core.d.ts +14 -12
- package/dist/src/components/form/form-rules.d.ts +7 -5
- package/dist/src/components/form/form-types.d.ts +214 -214
- package/dist/src/components/form/index.d.ts +5 -5
- package/dist/src/components/form/mono-form-controller.d.ts +4 -15
- package/dist/src/components/input/index.d.ts +5 -5
- package/dist/src/components/input/index.shadow.d.ts +6 -7
- package/dist/src/components/input/input-core.d.ts +73 -71
- package/dist/src/components/input/input-format.d.ts +22 -20
- package/dist/src/components/input/input-types.d.ts +167 -165
- package/dist/src/components/input/input-utils.d.ts +7 -5
- package/dist/src/components/input/mono-input.d.ts +35 -31
- package/dist/src/components/input/mono-input.shadow.d.ts +17 -13
- package/dist/src/components/menu/index.d.ts +7 -5
- package/dist/src/components/menu/index.shadow.d.ts +7 -6
- package/dist/src/components/menu/menu-core.d.ts +47 -45
- package/dist/src/components/menu/menu-render.d.ts +42 -40
- package/dist/src/components/menu/menu-types.d.ts +132 -130
- package/dist/src/components/menu/menu-utils.d.ts +16 -13
- package/dist/src/components/menu/mono-menu-list.d.ts +116 -114
- package/dist/src/components/menu/mono-menu.d.ts +30 -26
- package/dist/src/components/menu/mono-menu.shadow.d.ts +22 -18
- package/dist/src/components/modal/index.d.ts +5 -3
- package/dist/src/components/modal/index.shadow.d.ts +6 -4
- package/dist/src/components/modal/modal-core.d.ts +81 -79
- package/dist/src/components/modal/modal-types.d.ts +223 -221
- package/dist/src/components/modal/mono-modal-controller.d.ts +4 -3
- package/dist/src/components/modal/mono-modal.d.ts +32 -28
- package/dist/src/components/modal/mono-modal.shadow.d.ts +38 -35
- package/dist/src/components/nav/index.d.ts +4 -3
- package/dist/src/components/nav/index.shadow.d.ts +5 -5
- package/dist/src/components/nav/mono-nav.d.ts +28 -24
- package/dist/src/components/nav/mono-nav.shadow.d.ts +10 -7
- package/dist/src/components/nav/nav-core.d.ts +16 -14
- package/dist/src/components/nav/nav-types.d.ts +23 -22
- package/dist/src/components/nav/nav-utils.d.ts +10 -8
- package/dist/src/components/radio/index.d.ts +4 -3
- package/dist/src/components/radio/index.shadow.d.ts +5 -4
- package/dist/src/components/radio/mono-radio.d.ts +19 -15
- package/dist/src/components/radio/mono-radio.shadow.d.ts +22 -18
- package/dist/src/components/radio/radio-core.d.ts +31 -29
- package/dist/src/components/radio/radio-types.d.ts +48 -46
- package/dist/src/components/radio/radio-utils.d.ts +5 -3
- package/dist/src/components/rich-text-editor/index.d.ts +5 -4
- package/dist/src/components/rich-text-editor/index.shadow.d.ts +6 -5
- package/dist/src/components/rich-text-editor/mono-rich-text-editor.d.ts +19 -15
- package/dist/src/components/rich-text-editor/mono-rich-text-editor.shadow.d.ts +22 -19
- package/dist/src/components/rich-text-editor/rich-text-editor-core.d.ts +61 -59
- package/dist/src/components/rich-text-editor/rich-text-editor-loader.d.ts +2 -0
- package/dist/src/components/rich-text-editor/rich-text-editor-toolbar.d.ts +5 -3
- package/dist/src/components/rich-text-editor/rich-text-editor-types.d.ts +179 -177
- package/dist/src/components/select/index.d.ts +4 -3
- package/dist/src/components/select/index.shadow.d.ts +5 -4
- package/dist/src/components/select/mono-select.d.ts +58 -54
- package/dist/src/components/select/mono-select.shadow.d.ts +30 -27
- package/dist/src/components/select/select-core.d.ts +82 -80
- package/dist/src/components/select/select-types.d.ts +228 -227
- package/dist/src/components/select/select-utils.d.ts +7 -5
- package/dist/src/components/sidebar/index.d.ts +4 -3
- package/dist/src/components/sidebar/index.shadow.d.ts +5 -5
- package/dist/src/components/sidebar/mono-sidebar.d.ts +22 -18
- package/dist/src/components/sidebar/mono-sidebar.shadow.d.ts +11 -8
- package/dist/src/components/sidebar/sidebar-core.d.ts +33 -31
- package/dist/src/components/sidebar/sidebar-types.d.ts +77 -75
- package/dist/src/components/sidebar/sidebar-utils.d.ts +28 -26
- package/dist/src/components/switch/index.d.ts +4 -3
- package/dist/src/components/switch/index.shadow.d.ts +5 -4
- package/dist/src/components/switch/mono-switch.d.ts +19 -15
- package/dist/src/components/switch/mono-switch.shadow.d.ts +23 -19
- package/dist/src/components/switch/switch-core.d.ts +35 -33
- package/dist/src/components/switch/switch-types.d.ts +55 -53
- package/dist/src/components/switch/switch-utils.d.ts +5 -3
- package/dist/src/components/table/array-source.d.ts +31 -29
- package/dist/src/components/table/date-filter-tree.d.ts +25 -23
- package/dist/src/components/table/grouping.d.ts +22 -20
- package/dist/src/components/table/index.d.ts +28 -32
- package/dist/src/components/table/index.shadow.d.ts +34 -46
- package/dist/src/components/table/mono-data-grid.d.ts +1447 -1456
- package/dist/src/components/table/mono-table-checkbox-core.d.ts +34 -32
- package/dist/src/components/table/mono-table-checkbox.d.ts +12 -8
- package/dist/src/components/table/mono-table-checkbox.shadow.d.ts +16 -12
- package/dist/src/components/table/mono-table-detail-core.d.ts +29 -27
- package/dist/src/components/table/mono-table-detail.d.ts +12 -8
- package/dist/src/components/table/mono-table-detail.shadow.d.ts +13 -9
- package/dist/src/components/table/mono-table-empty-core.d.ts +24 -22
- package/dist/src/components/table/mono-table-empty.d.ts +17 -13
- package/dist/src/components/table/mono-table-empty.shadow.d.ts +22 -18
- package/dist/src/components/table/mono-table-error-core.d.ts +24 -22
- package/dist/src/components/table/mono-table-error.d.ts +12 -8
- package/dist/src/components/table/mono-table-error.shadow.d.ts +15 -11
- package/dist/src/components/table/mono-table-info-core.d.ts +6 -4
- package/dist/src/components/table/mono-table-info.d.ts +12 -8
- package/dist/src/components/table/mono-table-info.shadow.d.ts +9 -5
- package/dist/src/components/table/mono-table-loading-core.d.ts +7 -5
- package/dist/src/components/table/mono-table-loading.d.ts +12 -8
- package/dist/src/components/table/mono-table-loading.shadow.d.ts +9 -5
- package/dist/src/components/table/mono-table-page-size-core.d.ts +7 -5
- package/dist/src/components/table/mono-table-page-size.d.ts +12 -8
- package/dist/src/components/table/mono-table-page-size.shadow.d.ts +9 -5
- package/dist/src/components/table/mono-table-paging-core.d.ts +16 -14
- package/dist/src/components/table/mono-table-paging-group-core.d.ts +10 -8
- package/dist/src/components/table/mono-table-paging-group.d.ts +12 -8
- package/dist/src/components/table/mono-table-paging-group.shadow.d.ts +9 -5
- package/dist/src/components/table/mono-table-paging.d.ts +12 -8
- package/dist/src/components/table/mono-table-paging.shadow.d.ts +9 -5
- package/dist/src/components/table/mono-table-search-core.d.ts +51 -49
- package/dist/src/components/table/mono-table-search.d.ts +25 -22
- package/dist/src/components/table/mono-table-search.shadow.d.ts +12 -9
- package/dist/src/components/table/mono-table-sort-core.d.ts +16 -14
- package/dist/src/components/table/mono-table-sort.d.ts +21 -18
- package/dist/src/components/table/mono-table-sort.shadow.d.ts +11 -8
- package/dist/src/components/table/mono-table-summary-core.d.ts +9 -7
- package/dist/src/components/table/mono-table-summary.d.ts +12 -8
- package/dist/src/components/table/mono-table-summary.shadow.d.ts +9 -5
- package/dist/src/components/table/mono-table-th-core.d.ts +23 -21
- package/dist/src/components/table/mono-table-th.d.ts +21 -18
- package/dist/src/components/table/mono-table-th.shadow.d.ts +11 -8
- package/dist/src/components/table/store-group-source.d.ts +14 -12
- package/dist/src/components/table/table-controller-core.d.ts +17 -15
- package/dist/src/components/table/table-filter-icons.d.ts +3 -1
- package/dist/src/components/table/table-menu-core.d.ts +40 -38
- package/dist/src/components/table/table-overlay.d.ts +43 -41
- package/dist/src/components/table/table-sort-icons.d.ts +4 -2
- package/dist/src/components/table/table-sort-utils.d.ts +3 -1
- package/dist/src/components/table/table-types.d.ts +391 -400
- package/dist/src/components/tabs/index.d.ts +3 -2
- package/dist/src/components/tabs/index.shadow.d.ts +4 -3
- package/dist/src/components/tabs/mono-tabs.d.ts +21 -17
- package/dist/src/components/tabs/mono-tabs.shadow.d.ts +21 -17
- package/dist/src/components/tabs/tabs-core.d.ts +36 -34
- package/dist/src/components/tabs/tabs-types.d.ts +48 -46
- package/dist/src/components/tag-input/index.d.ts +5 -3
- package/dist/src/components/tag-input/index.shadow.d.ts +6 -4
- package/dist/src/components/tag-input/mono-tag-input.d.ts +56 -52
- package/dist/src/components/tag-input/mono-tag-input.shadow.d.ts +41 -38
- package/dist/src/components/tag-input/tag-input-core.d.ts +95 -93
- package/dist/src/components/tag-input/tag-input-types.d.ts +343 -346
- package/dist/src/components/tag-input/tag-input-utils.d.ts +7 -5
- package/dist/src/components/textarea/index.d.ts +4 -3
- package/dist/src/components/textarea/index.shadow.d.ts +5 -4
- package/dist/src/components/textarea/mono-textarea.d.ts +19 -15
- package/dist/src/components/textarea/mono-textarea.shadow.d.ts +19 -16
- package/dist/src/components/textarea/textarea-core.d.ts +48 -46
- package/dist/src/components/textarea/textarea-types.d.ts +120 -118
- package/dist/src/components/textarea/textarea-utils.d.ts +7 -5
- package/dist/src/components/tooltip/control-tooltip.d.ts +3 -1
- package/dist/src/components/tooltip/index.d.ts +6 -5
- package/dist/src/components/tooltip/tooltip-config.d.ts +17 -15
- package/dist/src/components/tooltip/tooltip-declarative.d.ts +3 -1
- package/dist/src/components/tooltip/tooltip-loader.d.ts +2 -0
- package/dist/src/components/tooltip/tooltip-types.d.ts +74 -72
- package/dist/src/composables/breakpoints.d.ts +9 -7
- package/dist/src/composables/chip-limits.d.ts +12 -10
- package/dist/src/composables/chip-strip.d.ts +91 -89
- package/dist/src/composables/color.d.ts +6 -4
- package/dist/src/composables/css-class.d.ts +4 -2
- package/dist/src/composables/css-size.d.ts +9 -7
- package/dist/src/composables/data-source-controller.d.ts +90 -88
- package/dist/src/composables/element-props.d.ts +3 -3
- package/dist/src/composables/field-icons.d.ts +3 -1
- package/dist/src/composables/hybird-prop.d.ts +10 -8
- package/dist/src/composables/hydration-flush.d.ts +16 -14
- package/dist/src/composables/icon.d.ts +3 -1
- package/dist/src/composables/layout-var.d.ts +2 -0
- package/dist/src/composables/light-slots.d.ts +34 -32
- package/dist/src/composables/mdi-glyphs.d.ts +2 -0
- package/dist/src/composables/mono-element.d.ts +3 -1
- package/dist/src/composables/mono-event.d.ts +15 -13
- package/dist/src/composables/mono-pending.d.ts +4 -2
- package/dist/src/composables/mono-skeleton.d.ts +100 -98
- package/dist/src/composables/mono-ui.d.ts +17 -18
- package/dist/src/composables/notifier.d.ts +20 -18
- package/dist/src/composables/popup-portal.d.ts +177 -175
- package/dist/src/composables/popup-stack.d.ts +36 -34
- package/dist/src/composables/rate-limit.d.ts +33 -31
- package/dist/src/composables/reactive.d.ts +3 -1
- package/dist/src/composables/shadow-css.d.ts +17 -15
- package/dist/src/composables/visibility.d.ts +6 -4
- package/dist/src/data/theme/index.d.ts +9 -7
- package/dist/src/data/theme/presets.d.ts +64 -62
- package/dist/src/entries/index.d.ts +36 -1
- package/dist/src/entries/index.node.d.ts +34 -41
- package/dist/src/entries/search.d.ts +2 -2
- package/dist/src/export/detail.d.ts +14 -12
- package/dist/src/export/download.d.ts +2 -0
- package/dist/src/export/excel/index.d.ts +13 -11
- package/dist/src/export/excel/nodes.d.ts +95 -93
- package/dist/src/export/expression.d.ts +3 -1
- package/dist/src/export/helpers.d.ts +3 -1
- package/dist/src/export/index.d.ts +6 -4
- package/dist/src/export/markdown.d.ts +19 -17
- package/dist/src/export/resolve-data.d.ts +3 -1
- package/dist/src/export/sentinel.d.ts +32 -30
- package/dist/src/export/sheet-name.d.ts +7 -5
- package/dist/src/export/styles.d.ts +13 -11
- package/dist/src/export/template.d.ts +3 -1
- package/dist/src/export/types.d.ts +224 -222
- package/dist/src/import/coerce.d.ts +5 -3
- package/dist/src/import/index.d.ts +12 -10
- package/dist/src/import/match.d.ts +20 -18
- package/dist/src/import/parse.d.ts +5 -3
- package/dist/src/import/types.d.ts +125 -123
- package/dist/src/nuxt/index.d.ts +92 -90
- package/dist/src/search/data-search.d.ts +92 -90
- package/dist/src/search/field-path.d.ts +10 -8
- package/dist/src/search/filter-eval.d.ts +2 -0
- package/dist/src/search/index.d.ts +6 -22
- package/dist/src/search/odata-search.d.ts +9 -7
- package/dist/src/search/search-expr.d.ts +16 -14
- package/dist/src/utils/data-source-apply.d.ts +11 -9
- package/dist/src/utils/data-source-options.d.ts +37 -35
- package/dist/src/utils/data-source-read.d.ts +40 -54
- package/dist/src/utils/data-source-summary.d.ts +8 -7
- package/dist/src/utils/normalize-error.d.ts +16 -14
- package/dist/src/vite/index.d.ts +34 -34
- package/dist/src/vite/mono-client-only.d.ts +34 -32
- package/dist/src/vite/mono-ssr-stub.d.ts +8 -6
- package/dist/src/vite/shadow-manifest.d.ts +2 -0
- package/dist/{styles-BIJ31TM4.js → styles-D-ergrfR.js} +417 -207
- package/dist/{tooltip-DQqNpqk2.js → tooltip-FCMRUSLi.js} +32 -25
- package/dist/tooltip.js +3 -2
- package/dist/ui/accordion.js +16 -12
- package/dist/ui/alert.js +21 -14
- package/dist/ui/breadcrumb.js +28 -18
- package/dist/ui/button-dropdown.js +18 -14
- package/dist/ui/button.js +4 -2
- package/dist/ui/card.js +17 -12
- package/dist/ui/chart.js +31 -26
- package/dist/ui/checkbox.js +17 -12
- package/dist/ui/chip.js +19 -12
- package/dist/ui/date.js +19 -15
- package/dist/ui/drawer.js +26 -20
- package/dist/ui/dropdown-table.js +39 -30
- package/dist/ui/dropdown.js +19 -15
- package/dist/ui/file-upload.js +22 -17
- package/dist/ui/filter.js +18 -14
- package/dist/ui/form.js +4 -3
- package/dist/ui/index.css +1073 -2197
- package/dist/ui/input.js +24 -17
- package/dist/ui/menu.js +32 -20
- package/dist/ui/modal.js +33 -26
- package/dist/ui/nav.js +21 -15
- package/dist/ui/radio.js +17 -12
- package/dist/ui/rich-text-editor.js +34 -28
- package/dist/ui/select.js +32 -26
- package/dist/ui/shadow/accordion.js +13 -9
- package/dist/ui/shadow/alert.js +13 -9
- package/dist/ui/shadow/breadcrumb.js +23 -14
- package/dist/ui/shadow/button-dropdown.js +17 -13
- package/dist/ui/shadow/button.js +4 -2
- package/dist/ui/shadow/card.js +15 -10
- package/dist/ui/shadow/chart.js +36 -29
- package/dist/ui/shadow/checkbox.js +13 -9
- package/dist/ui/shadow/chip.js +16 -10
- package/dist/ui/shadow/date.js +19 -12
- package/dist/ui/shadow/drawer.js +22 -16
- package/dist/ui/shadow/dropdown-table.js +39 -28
- package/dist/ui/shadow/dropdown.js +15 -11
- package/dist/ui/shadow/file-upload.js +26 -19
- package/dist/ui/shadow/filter.js +17 -13
- package/dist/ui/shadow/input.js +20 -14
- package/dist/ui/shadow/menu.js +24 -14
- package/dist/ui/shadow/modal.js +35 -27
- package/dist/ui/shadow/nav.js +18 -12
- package/dist/ui/shadow/radio.js +15 -10
- package/dist/ui/shadow/rich-text-editor.js +32 -26
- package/dist/ui/shadow/select.js +30 -24
- package/dist/ui/shadow/sidebar.js +23 -16
- package/dist/ui/shadow/switch.js +15 -10
- package/dist/ui/shadow/table.js +123 -84
- package/dist/ui/shadow/tabs.js +12 -8
- package/dist/ui/shadow/tag-input.js +37 -31
- package/dist/ui/shadow/textarea.js +17 -12
- package/dist/ui/sidebar.js +27 -20
- package/dist/ui/switch.js +17 -12
- package/dist/ui/table.js +129 -87
- package/dist/ui/tabs.js +15 -11
- package/dist/ui/tag-input.js +33 -27
- package/dist/ui/textarea.js +19 -14
- package/dist/{vite-C5iUK7so.js → vite-DcyRlTTf.js} +17 -9
- package/dist/vite.js +3 -2
- package/package.json +15 -14
- package/dist/checkbox-Cqpie9Ap.js +0 -4
- package/dist/chip-DBUUa2eB.js +0 -4
- package/dist/data/theme/presets.json.d.ts +0 -140
- package/dist/export.d.ts +0 -1
- package/dist/hydration-flush-RB5Tz5nl.js +0 -1001
- package/dist/import.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.node.d.ts +0 -1
- package/dist/input-zGOULADt.js +0 -4
- package/dist/mono-button-simcTQdW.js +0 -873
- package/dist/mono-button.shadow-B_rKOY9N.js +0 -784
- package/dist/nuxt.d.ts +0 -1
- package/dist/search.d.ts +0 -1
- package/dist/tooltip.d.ts +0 -1
- package/dist/ui/accordion.d.ts +0 -1
- package/dist/ui/alert.d.ts +0 -1
- package/dist/ui/breadcrumb.d.ts +0 -1
- package/dist/ui/button-dropdown.d.ts +0 -1
- package/dist/ui/button.d.ts +0 -1
- package/dist/ui/card.d.ts +0 -1
- package/dist/ui/chart.d.ts +0 -1
- package/dist/ui/checkbox.d.ts +0 -1
- package/dist/ui/chip.d.ts +0 -1
- package/dist/ui/date.d.ts +0 -1
- package/dist/ui/drawer.d.ts +0 -1
- package/dist/ui/dropdown-table.d.ts +0 -1
- package/dist/ui/dropdown.d.ts +0 -1
- package/dist/ui/file-upload.d.ts +0 -1
- package/dist/ui/filter.d.ts +0 -1
- package/dist/ui/form.d.ts +0 -1
- package/dist/ui/input.d.ts +0 -1
- package/dist/ui/menu.d.ts +0 -1
- package/dist/ui/modal.d.ts +0 -1
- package/dist/ui/nav.d.ts +0 -1
- package/dist/ui/radio.d.ts +0 -1
- package/dist/ui/rich-text-editor.d.ts +0 -1
- package/dist/ui/select.d.ts +0 -1
- package/dist/ui/sidebar.d.ts +0 -1
- package/dist/ui/switch.d.ts +0 -1
- package/dist/ui/table.d.ts +0 -1
- package/dist/ui/tabs.d.ts +0 -1
- package/dist/ui/tag-input.d.ts +0 -1
- package/dist/ui/textarea.d.ts +0 -1
- package/dist/vite.d.ts +0 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { a as __decorate, f as customElement, i as withShadowUtilityStyles, l as defineHybridPropAliases, r as toShadowCss, s as booleanStringConverter, t as flushSsrHydration } from "../../hydration-flush-
|
|
2
|
-
import { t as dispatchMonoEvent } from "../../mono-event-
|
|
3
|
-
import { t as buildSizeStyle } from "../../css-size-
|
|
4
|
-
import { t as MonoFormControlCore } from "../../form-control-core-
|
|
1
|
+
import { a as __decorate, f as customElement, i as withShadowUtilityStyles, l as defineHybridPropAliases, r as toShadowCss, s as booleanStringConverter, t as flushSsrHydration } from "../../hydration-flush-DHrl4_KK.js";
|
|
2
|
+
import { t as dispatchMonoEvent } from "../../mono-event-BPku9HpS.js";
|
|
3
|
+
import { t as buildSizeStyle } from "../../css-size-DWAPgQdT.js";
|
|
4
|
+
import { t as MonoFormControlCore } from "../../form-control-core-CIdMLXMo.js";
|
|
5
5
|
import { LitElement, html, isServer, nothing, unsafeCSS } from "lit";
|
|
6
6
|
import { property, query, state } from "lit/decorators.js";
|
|
7
7
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
8
8
|
import { styleMap } from "lit/directives/style-map.js";
|
|
9
|
+
|
|
9
10
|
//#region src/components/textarea/textarea-core.ts
|
|
10
|
-
|
|
11
|
+
const numberStringConverter = {
|
|
11
12
|
fromAttribute(value) {
|
|
12
13
|
if (value === null || value === "") return void 0;
|
|
13
14
|
const parsed = Number(value);
|
|
@@ -26,7 +27,7 @@ var numberStringConverter = {
|
|
|
26
27
|
* and the slot strategy via the `_slotOutlet` hook (light: `data-mono-slot`
|
|
27
28
|
* placeholders; shadow: native `<slot>`). Mirrors `switch-core`/`select-core`.
|
|
28
29
|
*/
|
|
29
|
-
|
|
30
|
+
const MonoTextareaCore = (superClass) => {
|
|
30
31
|
class MonoTextareaCoreClass extends MonoFormControlCore(superClass) {
|
|
31
32
|
constructor(...args) {
|
|
32
33
|
super(...args);
|
|
@@ -713,18 +714,20 @@ var MonoTextareaCore = (superClass) => {
|
|
|
713
714
|
})], MonoTextareaCoreClass.prototype, "maxHeight", void 0);
|
|
714
715
|
return MonoTextareaCoreClass;
|
|
715
716
|
};
|
|
717
|
+
|
|
716
718
|
//#endregion
|
|
717
|
-
//#region src
|
|
718
|
-
var textarea_default = "/* =========================================================================\r\n mono-textarea — a port of Basecoat's `.textarea` inside a `.field`\r\n (basecoat-css@1.0.2, vega style).\r\n\r\n Styled by ATTRIBUTE, like Basecoat — and the attributes mirror the element's\r\n props one for one, so hand-written markup reads like the Lit / Vue tag:\r\n\r\n <mono-textarea size=\"sm\" color=\"danger\" label=\"Notes\" placeholder=\"…\">\r\n <div mono-textarea mono-size=\"sm\" mono-color=\"danger\">\r\n <label mono-label>Notes</label>\r\n <textarea mono-native placeholder=\"…\"></textarea>\r\n <div mono-message-wrap><div mono-message=\"helper\">…</div></div>\r\n </div>\r\n\r\n An absent attribute is the prop's default (`:not([mono-size])` = md,\r\n `:not([mono-color])` = primary, `:not([mono-variant])` = outlined). The\r\n element renders these on its root (both builds) plus the states\r\n `mono-disabled` / `mono-readonly` / `mono-required` / `mono-auto-resize` and\r\n `mono-validation-state=\"valid|invalid|warning\"`. The old classes\r\n (`.mono-textarea.md.primary.outlined`) are still emitted as inert hooks until\r\n 2.0 but no rule here reads them.\r\n\r\n Selector map (ours ≡ upstream):\r\n [mono-textarea] ≡ .field (flex w-full flex-col gap-3)\r\n [mono-textarea] > [mono-label] ≡ .field > label / .label\r\n [mono-native] ≡ .field > textarea / .textarea\r\n (field-sizing-content min-h-16 w-full rounded-md\r\n border-input bg-transparent px-2.5 py-2 shadow-xs\r\n text-base md:text-sm, focus ring-3 ring-ring/50)\r\n [mono-message-wrap] > [mono-message=\"…\"] ≡ .field > p / .field [role='alert']\r\n [mono-validation-state=\"invalid\"] ≡ aria-invalid:border-destructive aria-invalid:ring-destructive/20\r\n [mono-validation-state=\"valid|warning\"] ≡ EXTENSION (the same treatment in --success / --warning)\r\n [mono-size=\"xs|sm|lg|xl|xxl\"] ≡ EXTENSION (Basecoat sizes only the select; the\r\n ladder is --mono-control-height-*)\r\n [mono-variant=\"filled\"] ≡ EXTENSION (luma/mira/rhea's textarea: bg-input/50, no shadow)\r\n [mono-variant=\"underlined\"] ≡ EXTENSION (sera's: border-transparent border-b-input,\r\n rounded-none px-0, the ring on the bottom edge only)\r\n [mono-counter], [mono-footer] ≡ EXTENSION (the character counter row)\r\n\r\n A textarea must NOT be --mono-control-height-* tall — it is multi-line — but\r\n its metrics DERIVE from that token, or retuning the ladder leaves it behind:\r\n\r\n padY = (T - L) / 2 - B\r\n min-height = ROWS x L + 2*padY + 2*B = T + (ROWS - 1) x L\r\n\r\n with T the control height, L one text line (font x line-height) and B the\r\n border. The first puts the textarea's FIRST line box at the same offset as an\r\n input's single line, so the two start their text on the same baseline side by\r\n side; the second reads as \"one input tall, plus N-1 lines\". ROWS is the only\r\n per-size literal. (Upstream's own `min-h-16` is a flat 64px; the derivation is\r\n mono's, and `field-sizing: content` still grows the box from there.)\r\n\r\n Specificity contract (same as the pre-port class sheet): a part's RESTING rule\r\n is exactly one attribute strong — `:where([mono-textarea]) [mono-native]` =\r\n (0,1,0) — so a utility class handed in through `cssClass` wins by source\r\n order, while the prop and state rules stay heavier and win over it.\r\n\r\n Inner parts: [mono-label] (+ [mono-required-mark]), [mono-native],\r\n [mono-footer] > [mono-message-wrap] > [mono-message=\"helper|valid|invalid|\r\n warning\"] / [mono-counter] (+ [mono-near], [mono-over]). The shadow build\r\n marks an unassigned slot wrapper [mono-empty].\r\n\r\n FLAVORS set `--mono-textarea-{radius,padding-x-<size>,padding-y-<size>,\r\n font-<size>,line-height,ring-width,ring-alpha,gap,resize,bg,border-color,\r\n shadow}` and the outline-scoped `--mono-textarea-outline-*`; every fallback\r\n here is vega's value\r\n (`node scripts/basecoat-styles.mjs --varying \"textarea\"`).\r\n ========================================================================= */\r\n\r\nmono-textarea {\r\n display: block;\r\n}\r\n\r\n[mono-textarea] {\r\n /* ── palette: each slot is a public knob over a Basecoat token ─────────── */\r\n --_mono-textarea-text: var(--mono-textarea-color, var(--mono-textarea-text, var(--foreground)));\r\n --_mono-textarea-placeholder: var(--mono-textarea-placeholder, var(--muted-foreground));\r\n --_mono-textarea-muted: var(--mono-textarea-muted, var(--muted-foreground));\r\n /* the `color` prop picks the FOCUS colour; primary is Basecoat's `--ring` */\r\n --_mono-textarea-primary: var(--mono-textarea-primary, var(--ring));\r\n --_mono-textarea-secondary: var(--mono-textarea-secondary, var(--muted-foreground));\r\n --_mono-textarea-success: var(--mono-textarea-success, var(--success));\r\n --_mono-textarea-danger: var(--mono-textarea-danger, var(--destructive));\r\n --_mono-textarea-warning: var(--mono-textarea-warning, var(--warning));\r\n --_mono-textarea-info: var(--mono-textarea-info, var(--info));\r\n --_mono-textarea-teal: var(--mono-textarea-teal, var(--teal));\r\n --_mono-textarea-purple: var(--mono-textarea-purple, var(--purple));\r\n --_mono-textarea-neutral: var(--mono-textarea-neutral, var(--neutral));\r\n --_mono-textarea-dark: var(--mono-textarea-dark, var(--dark));\r\n --_mono-textarea-valid: var(--mono-textarea-valid, var(--success));\r\n --_mono-textarea-invalid: var(--mono-textarea-invalid, var(--destructive));\r\n\r\n /* ── the painted result — three tiers, base = vega's .textarea ─────────── */\r\n --_mono-textarea-ring-color: var(--mono-textarea-ring-color, var(--mono-textarea-focus-color, var(--_mono-textarea-ring-color-preset, var(--_mono-textarea-primary))));\r\n --_mono-textarea-ring-width: var(--mono-textarea-ring-width, var(--_mono-textarea-ring-width-preset, var(--mono-ring-width)));\r\n --_mono-textarea-ring-alpha: var(--mono-textarea-ring-alpha, var(--mono-ring-alpha));\r\n --_mono-textarea-border-color: var(--mono-textarea-rest-border, var(--mono-textarea-border-color, var(--_mono-textarea-border-color-preset, var(--input))));\r\n --_mono-textarea-side-border-color: var(--_mono-textarea-side-border-color-preset, var(--_mono-textarea-border-color));\r\n --_mono-textarea-bg: var(--mono-textarea-bg, var(--mono-textarea-surface, var(--_mono-textarea-bg-preset, var(--mono-mode-surface))));\r\n --_mono-textarea-shadow: var(--mono-textarea-shadow, var(--_mono-textarea-shadow-preset, var(--mono-shadow-xs)));\r\n --_mono-textarea-border-width: var(--mono-textarea-border-width, var(--mono-border-width));\r\n --_mono-textarea-radius: var(--mono-textarea-radius, var(--_mono-textarea-radius-preset, var(--mono-radius-md)));\r\n\r\n /* ── md metrics live on the unqualified root ON PURPOSE: hand-written\r\n `<div mono-textarea>` that names no size renders exactly like size=\"md\".\r\n basecoat@1.0.2 styles/vega.css .textarea — px-2.5 py-2 text-base md:text-sm ── */\r\n --_mono-textarea-height: var(--mono-textarea-height-md, var(--mono-control-height-md));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-md, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 2.5)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-md, var(--mono-text-sm));\r\n --_mono-textarea-line-height: var(--mono-textarea-line-height, var(--mono-textarea-line-height-md, var(--mono-leading-normal)));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-md, 4));\r\n\r\n /* one text line, and the two derived metrics that hang off it */\r\n --_mono-textarea-line: calc(var(--_mono-textarea-font-size) * var(--_mono-textarea-line-height));\r\n --_mono-textarea-padding-y: var(\r\n --mono-textarea-padding-y,\r\n max(0px, calc((var(--_mono-textarea-height) - var(--_mono-textarea-line)) / 2 - var(--_mono-textarea-border-width)))\r\n );\r\n --_mono-textarea-min-height: var(\r\n --mono-textarea-min-height,\r\n calc(var(--_mono-textarea-height) + (var(--_mono-textarea-rows) - 1) * var(--_mono-textarea-line))\r\n );\r\n\r\n /* basecoat@1.0.2 styles/vega.css .field — flex w-full flex-col gap-3 */\r\n display: flex;\r\n flex-direction: column;\r\n gap: var(--mono-textarea-gap, calc(var(--mono-spacing) * 3));\r\n width: 100%;\r\n min-width: 0;\r\n color: var(--_mono-textarea-text);\r\n font-family: inherit;\r\n}\r\n\r\n[mono-textarea],\r\n:where([mono-textarea]) *,\r\n:where([mono-textarea]) *::before,\r\n:where([mono-textarea]) *::after {\r\n box-sizing: border-box;\r\n}\r\n\r\n/* The element wraps the footer in an aria-describedby outlet; hand-written markup\r\n has no such wrapper. It is a flex child either way, so an EMPTY outlet still\r\n paid the root's `gap` and made the element stand taller than the same raw\r\n markup. The shadow build always RENDERS the footer and marks it empty, so the\r\n test is for a footer that is actually showing. */\r\n[mono-textarea] > [mono-message-outlet]:not(:has([mono-footer]:not([mono-empty]))) {\r\n display: none;\r\n}\r\n\r\n/* the shadow build renders every region and marks the empty ones; the light\r\n build renders only what exists. Out-specifies the region rules on purpose —\r\n a zero-weight hide would tie with them and lose on source order. */\r\n[mono-textarea] :is([mono-label], [mono-message], [mono-footer], [mono-counter])[mono-empty] {\r\n display: none;\r\n}\r\n\r\n/* =========================================\r\n Sizes — EXTENSION: Basecoat sizes only the select, so the ladder is\r\n --mono-control-height-* and the derivation above\r\n ========================================= */\r\n\r\n[mono-textarea][mono-size=\"xs\"] {\r\n --_mono-textarea-height: var(--mono-textarea-height-xs, var(--mono-control-height-xs));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-xs, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 2)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-xs, var(--mono-text-xs));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-xs, 3));\r\n}\r\n\r\n[mono-textarea][mono-size=\"sm\"] {\r\n --_mono-textarea-height: var(--mono-textarea-height-sm, var(--mono-control-height-sm));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-sm, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 2.5)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-sm, var(--mono-textarea-font-md, var(--mono-text-sm)));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-sm, 3));\r\n}\r\n\r\n[mono-textarea][mono-size=\"lg\"] {\r\n --_mono-textarea-height: var(--mono-textarea-height-lg, var(--mono-control-height-lg));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-lg, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 2.5)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-lg, var(--mono-textarea-font-md, var(--mono-text-sm)));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-lg, 4));\r\n}\r\n\r\n[mono-textarea][mono-size=\"xl\"] {\r\n --_mono-textarea-height: var(--mono-textarea-height-xl, var(--mono-control-height-xl));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-xl, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 3)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-xl, var(--mono-text-base));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-xl, 5));\r\n}\r\n\r\n[mono-textarea][mono-size=\"xxl\"] {\r\n --_mono-textarea-height: var(--mono-textarea-height-xxl, var(--mono-control-height-xxl));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-xxl, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 3)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-xxl, var(--mono-text-base));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-xxl, 5));\r\n}\r\n\r\n/* =========================================\r\n Colours — EXTENSION: the `color` prop is the FOCUS colour, nothing else\r\n ========================================= */\r\n\r\n[mono-textarea][mono-color=\"secondary\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-secondary);\r\n}\r\n[mono-textarea][mono-color=\"success\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-success);\r\n}\r\n[mono-textarea][mono-color=\"danger\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-danger);\r\n}\r\n[mono-textarea][mono-color=\"warning\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-warning);\r\n}\r\n[mono-textarea][mono-color=\"info\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-info);\r\n}\r\n[mono-textarea][mono-color=\"teal\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-teal);\r\n}\r\n[mono-textarea][mono-color=\"purple\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-purple);\r\n}\r\n[mono-textarea][mono-color=\"neutral\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-neutral);\r\n}\r\n[mono-textarea][mono-color=\"dark\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-dark);\r\n}\r\n\r\n/* =========================================\r\n Label\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field > label, .label\r\n — text-sm leading-snug font-medium */\r\n:where([mono-textarea]) > [mono-label] {\r\n display: flex;\r\n align-items: center;\r\n gap: calc(var(--mono-spacing) * 1);\r\n font-size: var(--mono-textarea-label-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-textarea-label-line-height, var(--mono-leading-snug));\r\n font-weight: var(--mono-textarea-label-font-weight, var(--mono-label-font-weight, var(--mono-font-weight-medium)));\r\n color: var(--mono-textarea-label-color, var(--_mono-textarea-text));\r\n}\r\n\r\n[mono-textarea][mono-validation-state=\"invalid\"] > [mono-label] {\r\n color: var(--mono-textarea-label-color, var(--_mono-textarea-invalid));\r\n}\r\n\r\n:where([mono-textarea]) [mono-required-mark] {\r\n color: var(--mono-textarea-required-color, var(--destructive));\r\n}\r\n\r\n/* =========================================\r\n The field\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/textarea.css .field > textarea, .textarea\r\n — flex field-sizing-content min-h-16 w-full outline-none\r\n placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 */\r\n/* basecoat@1.0.2 styles/vega.css .field > textarea, .textarea\r\n — rounded-md border border-input bg-transparent px-2.5 py-2 text-base md:text-sm\r\n shadow-xs transition-[color,box-shadow] (dark:bg-input/30 via --mono-mode-surface);\r\n mono: `--tw-ring-*` flattened to the ring + shadow slots, and the height is\r\n derived from the control step rather than upstream's flat min-h-16 */\r\n:where([mono-textarea]) [mono-native] {\r\n --_mono-textarea-ring: 0 0 #0000;\r\n display: block;\r\n width: 100%;\r\n min-width: 0;\r\n min-height: var(--_mono-textarea-min-height);\r\n padding: var(--_mono-textarea-padding-y) var(--_mono-textarea-padding-x);\r\n border: var(--_mono-textarea-border-width) solid var(--_mono-textarea-border-color);\r\n border-radius: var(--_mono-textarea-radius);\r\n background-color: var(--_mono-textarea-bg);\r\n color: var(--_mono-textarea-text);\r\n font-family: inherit;\r\n font-size: var(--_mono-textarea-font-size);\r\n line-height: var(--_mono-textarea-line-height);\r\n resize: var(--mono-textarea-resize, vertical);\r\n outline: none;\r\n box-shadow: var(--_mono-textarea-ring), var(--_mono-textarea-shadow);\r\n transition-property: color, background-color, border-color, box-shadow;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n}\r\n\r\n/* Upstream grows the box with `field-sizing: content`, which has no ceiling.\r\n mono's `auto-resize` is a JS height instead, BECAUSE it honours `min-rows` and\r\n `max-rows` — so this rule must not hand the sizing back to the browser, or the\r\n two fight over the height. All the attribute does here is drop the manual grip:\r\n a box that resizes itself should not also offer one. */\r\n[mono-textarea][mono-auto-resize] > [mono-native] {\r\n resize: var(--mono-textarea-resize, none);\r\n}\r\n\r\n/* placeholder:text-muted-foreground */\r\n:where([mono-textarea]) [mono-native]::placeholder {\r\n color: var(--_mono-textarea-placeholder);\r\n opacity: 1;\r\n}\r\n\r\n/* focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 */\r\n:where([mono-textarea]) [mono-native]:focus-visible,\r\n:where([mono-textarea]) [mono-native]:focus {\r\n border-color: var(--_mono-textarea-ring-color);\r\n --_mono-textarea-ring: 0 0 0 var(--_mono-textarea-ring-width) color-mix(in oklab, var(--_mono-textarea-ring-color) var(--_mono-textarea-ring-alpha), transparent);\r\n}\r\n\r\n/* aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20\r\n (dark: /50 and /40, carried by the mode tokens) */\r\n[mono-textarea][mono-validation-state=\"invalid\"] > [mono-native],\r\n:where([mono-textarea]) [mono-native][aria-invalid=\"true\"] {\r\n --_mono-textarea-border-color: var(--mono-mode-invalid-border);\r\n --_mono-textarea-ring: 0 0 0 var(--_mono-textarea-ring-width) var(--mono-mode-invalid-ring);\r\n}\r\n\r\n/* EXTENSION — the same treatment in the success / warning roles */\r\n[mono-textarea][mono-validation-state=\"valid\"] > [mono-native] {\r\n --_mono-textarea-border-color: color-mix(in oklab, var(--_mono-textarea-valid) var(--mono-mode-state-border-alpha), transparent);\r\n --_mono-textarea-ring: 0 0 0 var(--_mono-textarea-ring-width) color-mix(in oklab, var(--_mono-textarea-valid) var(--mono-mode-state-ring-alpha), transparent);\r\n}\r\n\r\n[mono-textarea][mono-validation-state=\"warning\"] > [mono-native] {\r\n --_mono-textarea-border-color: color-mix(in oklab, var(--_mono-textarea-warning) var(--mono-mode-state-border-alpha), transparent);\r\n --_mono-textarea-ring: 0 0 0 var(--_mono-textarea-ring-width) color-mix(in oklab, var(--_mono-textarea-warning) var(--mono-mode-state-ring-alpha), transparent);\r\n}\r\n\r\n/* disabled:cursor-not-allowed disabled:opacity-50 */\r\n[mono-textarea][mono-disabled] > [mono-native],\r\n:where([mono-textarea]) [mono-native]:disabled {\r\n cursor: not-allowed;\r\n opacity: 0.5;\r\n background-color: var(--mono-textarea-disabled-bg, var(--_mono-textarea-bg));\r\n}\r\n\r\n/* EXTENSION — readonly is legible, not dimmed: a muted surface and no caret */\r\n[mono-textarea][mono-readonly] > [mono-native],\r\n:where([mono-textarea]) [mono-native]:read-only:not(:disabled) {\r\n background-color: var(--mono-textarea-readonly-bg, var(--muted));\r\n cursor: default;\r\n}\r\n\r\n/* =========================================\r\n Variants — EXTENSION: the two other looks Basecoat's styles ship\r\n ========================================= */\r\n\r\n/* `outlined` is the default and IS vega's textarea. The `--mono-textarea-outline-*`\r\n knobs are how a FLAVOR restyles this variant alone: writing the shared\r\n `--mono-textarea-bg` would repaint `filled` and `underlined` too (the public\r\n tier out-ranks a variant's preset), which is exactly what made every style's\r\n underlined textarea come out as a filled box. */\r\n[mono-textarea]:is(:not([mono-variant]), [mono-variant=\"outlined\"]) {\r\n --_mono-textarea-bg-preset: var(--mono-textarea-outline-bg);\r\n --_mono-textarea-border-color-preset: var(--mono-textarea-outline-border-color);\r\n --_mono-textarea-side-border-color-preset: var(--mono-textarea-outline-side-border-color);\r\n --_mono-textarea-shadow-preset: var(--mono-textarea-outline-shadow, var(--mono-shadow-xs));\r\n --_mono-textarea-radius-preset: var(--mono-textarea-outline-radius);\r\n --_mono-textarea-padding-x-preset: var(--mono-textarea-outline-padding-x);\r\n --_mono-textarea-ring-width-preset: var(--mono-textarea-outline-ring-width);\r\n}\r\n\r\n/* `filled` ≡ luma / mira / rhea's textarea: a tinted surface, no border, no shadow */\r\n[mono-textarea][mono-variant=\"filled\"] {\r\n --_mono-textarea-bg-preset: var(--mono-textarea-filled-bg, color-mix(in oklab, var(--input) 50%, transparent));\r\n --_mono-textarea-border-color-preset: transparent;\r\n --_mono-textarea-shadow-preset: 0 0 #0000;\r\n}\r\n\r\n/* `underlined` ≡ sera's: square, the bottom edge only, and the ring rides that\r\n edge instead of wrapping the box (never `box-shadow: none` — the resting slot\r\n is neutralised so a focus rule can still fill it) */\r\n[mono-textarea][mono-variant=\"underlined\"] {\r\n --_mono-textarea-radius-preset: 0;\r\n --_mono-textarea-bg-preset: transparent;\r\n /* the bottom edge keeps --_mono-textarea-border-color; only the other three\r\n sides are cleared, through the side slot */\r\n --_mono-textarea-side-border-color-preset: transparent;\r\n --_mono-textarea-shadow-preset: 0 0 #0000;\r\n --_mono-textarea-padding-x-preset: 0px;\r\n --_mono-textarea-ring-width-preset: 0px;\r\n}\r\n\r\n[mono-textarea][mono-variant=\"underlined\"] > [mono-native],\r\n[mono-textarea]:is(:not([mono-variant]), [mono-variant=\"outlined\"]) > [mono-native] {\r\n border-color: var(--_mono-textarea-side-border-color);\r\n border-bottom-color: var(--_mono-textarea-border-color);\r\n}\r\n\r\n[mono-textarea][mono-variant=\"underlined\"] > [mono-native]:is(:focus, :focus-visible) {\r\n border-color: var(--_mono-textarea-side-border-color);\r\n border-bottom-color: var(--_mono-textarea-ring-color);\r\n}\r\n\r\n/* =========================================\r\n Footer — EXTENSION: the message row and the character counter\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .fieldset legend + p, .field > p, .field section > p\r\n — text-sm text-muted-foreground leading-normal font-normal */\r\n:where([mono-textarea]) > [mono-footer] {\r\n display: flex;\r\n align-items: flex-start;\r\n justify-content: space-between;\r\n gap: calc(var(--mono-spacing) * 2);\r\n}\r\n\r\n:where([mono-textarea]) [mono-message-wrap] {\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n}\r\n\r\n:where([mono-textarea]) [mono-message] {\r\n font-size: var(--mono-textarea-message-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-textarea-message-line-height, var(--mono-leading-normal));\r\n color: var(--_mono-textarea-muted);\r\n}\r\n\r\n/* .field [role='alert'] — the invalid message is the destructive one */\r\n:where([mono-textarea]) [mono-message=\"invalid\"] {\r\n color: var(--_mono-textarea-invalid);\r\n}\r\n\r\n:where([mono-textarea]) [mono-message=\"valid\"] {\r\n color: var(--_mono-textarea-valid);\r\n}\r\n\r\n:where([mono-textarea]) [mono-message=\"warning\"] {\r\n color: var(--_mono-textarea-warning);\r\n}\r\n\r\n:where([mono-textarea]) [mono-counter] {\r\n flex: 0 0 auto;\r\n font-size: var(--mono-textarea-counter-font-size, var(--mono-text-xs));\r\n line-height: var(--mono-leading-normal);\r\n font-variant-numeric: tabular-nums;\r\n color: var(--_mono-textarea-muted);\r\n}\r\n\r\n:where([mono-textarea]) [mono-counter][mono-near] {\r\n color: var(--_mono-textarea-warning);\r\n}\r\n\r\n:where([mono-textarea]) [mono-counter][mono-over] {\r\n color: var(--_mono-textarea-invalid);\r\n font-weight: var(--mono-font-weight-medium);\r\n}\r\n\r\n@media (prefers-reduced-motion: reduce) {\r\n :where([mono-textarea]) [mono-native] {\r\n transition: none;\r\n }\r\n}\r\n";
|
|
719
|
+
//#region \0raw:C:\Users\VCT-DEV\Desktop\libs\packages\helper\src\components\textarea\textarea.css?raw.js
|
|
720
|
+
var textarea_css_raw_default = "/* =========================================================================\r\n mono-textarea — a port of Basecoat's `.textarea` inside a `.field`\r\n (basecoat-css@1.0.2, vega style).\r\n\r\n Styled by ATTRIBUTE, like Basecoat — and the attributes mirror the element's\r\n props one for one, so hand-written markup reads like the Lit / Vue tag:\r\n\r\n <mono-textarea size=\"sm\" color=\"danger\" label=\"Notes\" placeholder=\"…\">\r\n <div mono-textarea mono-size=\"sm\" mono-color=\"danger\">\r\n <label mono-label>Notes</label>\r\n <textarea mono-native placeholder=\"…\"></textarea>\r\n <div mono-message-wrap><div mono-message=\"helper\">…</div></div>\r\n </div>\r\n\r\n An absent attribute is the prop's default (`:not([mono-size])` = md,\r\n `:not([mono-color])` = primary, `:not([mono-variant])` = outlined). The\r\n element renders these on its root (both builds) plus the states\r\n `mono-disabled` / `mono-readonly` / `mono-required` / `mono-auto-resize` and\r\n `mono-validation-state=\"valid|invalid|warning\"`. The old classes\r\n (`.mono-textarea.md.primary.outlined`) are still emitted as inert hooks until\r\n 2.0 but no rule here reads them.\r\n\r\n Selector map (ours ≡ upstream):\r\n [mono-textarea] ≡ .field (flex w-full flex-col gap-3)\r\n [mono-textarea] > [mono-label] ≡ .field > label / .label\r\n [mono-native] ≡ .field > textarea / .textarea\r\n (field-sizing-content min-h-16 w-full rounded-md\r\n border-input bg-transparent px-2.5 py-2 shadow-xs\r\n text-base md:text-sm, focus ring-3 ring-ring/50)\r\n [mono-message-wrap] > [mono-message=\"…\"] ≡ .field > p / .field [role='alert']\r\n [mono-validation-state=\"invalid\"] ≡ aria-invalid:border-destructive aria-invalid:ring-destructive/20\r\n [mono-validation-state=\"valid|warning\"] ≡ EXTENSION (the same treatment in --success / --warning)\r\n [mono-size=\"xs|sm|lg|xl|xxl\"] ≡ EXTENSION (Basecoat sizes only the select; the\r\n ladder is --mono-control-height-*)\r\n [mono-variant=\"filled\"] ≡ EXTENSION (luma/mira/rhea's textarea: bg-input/50, no shadow)\r\n [mono-variant=\"underlined\"] ≡ EXTENSION (sera's: border-transparent border-b-input,\r\n rounded-none px-0, the ring on the bottom edge only)\r\n [mono-counter], [mono-footer] ≡ EXTENSION (the character counter row)\r\n\r\n A textarea must NOT be --mono-control-height-* tall — it is multi-line — but\r\n its metrics DERIVE from that token, or retuning the ladder leaves it behind:\r\n\r\n padY = (T - L) / 2 - B\r\n min-height = ROWS x L + 2*padY + 2*B = T + (ROWS - 1) x L\r\n\r\n with T the control height, L one text line (font x line-height) and B the\r\n border. The first puts the textarea's FIRST line box at the same offset as an\r\n input's single line, so the two start their text on the same baseline side by\r\n side; the second reads as \"one input tall, plus N-1 lines\". ROWS is the only\r\n per-size literal. (Upstream's own `min-h-16` is a flat 64px; the derivation is\r\n mono's, and `field-sizing: content` still grows the box from there.)\r\n\r\n Specificity contract (same as the pre-port class sheet): a part's RESTING rule\r\n is exactly one attribute strong — `:where([mono-textarea]) [mono-native]` =\r\n (0,1,0) — so a utility class handed in through `cssClass` wins by source\r\n order, while the prop and state rules stay heavier and win over it.\r\n\r\n Inner parts: [mono-label] (+ [mono-required-mark]), [mono-native],\r\n [mono-footer] > [mono-message-wrap] > [mono-message=\"helper|valid|invalid|\r\n warning\"] / [mono-counter] (+ [mono-near], [mono-over]). The shadow build\r\n marks an unassigned slot wrapper [mono-empty].\r\n\r\n FLAVORS set `--mono-textarea-{radius,padding-x-<size>,padding-y-<size>,\r\n font-<size>,line-height,ring-width,ring-alpha,gap,resize,bg,border-color,\r\n shadow}` and the outline-scoped `--mono-textarea-outline-*`; every fallback\r\n here is vega's value\r\n (`node scripts/basecoat-styles.mjs --varying \"textarea\"`).\r\n ========================================================================= */\r\n\r\nmono-textarea {\r\n display: block;\r\n}\r\n\r\n[mono-textarea] {\r\n /* ── palette: each slot is a public knob over a Basecoat token ─────────── */\r\n --_mono-textarea-text: var(--mono-textarea-color, var(--mono-textarea-text, var(--foreground)));\r\n --_mono-textarea-placeholder: var(--mono-textarea-placeholder, var(--muted-foreground));\r\n --_mono-textarea-muted: var(--mono-textarea-muted, var(--muted-foreground));\r\n /* the `color` prop picks the FOCUS colour; primary is Basecoat's `--ring` */\r\n --_mono-textarea-primary: var(--mono-textarea-primary, var(--ring));\r\n --_mono-textarea-secondary: var(--mono-textarea-secondary, var(--muted-foreground));\r\n --_mono-textarea-success: var(--mono-textarea-success, var(--success));\r\n --_mono-textarea-danger: var(--mono-textarea-danger, var(--destructive));\r\n --_mono-textarea-warning: var(--mono-textarea-warning, var(--warning));\r\n --_mono-textarea-info: var(--mono-textarea-info, var(--info));\r\n --_mono-textarea-teal: var(--mono-textarea-teal, var(--teal));\r\n --_mono-textarea-purple: var(--mono-textarea-purple, var(--purple));\r\n --_mono-textarea-neutral: var(--mono-textarea-neutral, var(--neutral));\r\n --_mono-textarea-dark: var(--mono-textarea-dark, var(--dark));\r\n --_mono-textarea-valid: var(--mono-textarea-valid, var(--success));\r\n --_mono-textarea-invalid: var(--mono-textarea-invalid, var(--destructive));\r\n\r\n /* ── the painted result — three tiers, base = vega's .textarea ─────────── */\r\n --_mono-textarea-ring-color: var(--mono-textarea-ring-color, var(--mono-textarea-focus-color, var(--_mono-textarea-ring-color-preset, var(--_mono-textarea-primary))));\r\n --_mono-textarea-ring-width: var(--mono-textarea-ring-width, var(--_mono-textarea-ring-width-preset, var(--mono-ring-width)));\r\n --_mono-textarea-ring-alpha: var(--mono-textarea-ring-alpha, var(--mono-ring-alpha));\r\n --_mono-textarea-border-color: var(--mono-textarea-rest-border, var(--mono-textarea-border-color, var(--_mono-textarea-border-color-preset, var(--input))));\r\n --_mono-textarea-side-border-color: var(--_mono-textarea-side-border-color-preset, var(--_mono-textarea-border-color));\r\n --_mono-textarea-bg: var(--mono-textarea-bg, var(--mono-textarea-surface, var(--_mono-textarea-bg-preset, var(--mono-mode-surface))));\r\n --_mono-textarea-shadow: var(--mono-textarea-shadow, var(--_mono-textarea-shadow-preset, var(--mono-shadow-xs)));\r\n --_mono-textarea-border-width: var(--mono-textarea-border-width, var(--mono-border-width));\r\n --_mono-textarea-radius: var(--mono-textarea-radius, var(--_mono-textarea-radius-preset, var(--mono-radius-md)));\r\n\r\n /* ── md metrics live on the unqualified root ON PURPOSE: hand-written\r\n `<div mono-textarea>` that names no size renders exactly like size=\"md\".\r\n basecoat@1.0.2 styles/vega.css .textarea — px-2.5 py-2 text-base md:text-sm ── */\r\n --_mono-textarea-height: var(--mono-textarea-height-md, var(--mono-control-height-md));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-md, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 2.5)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-md, var(--mono-text-sm));\r\n --_mono-textarea-line-height: var(--mono-textarea-line-height, var(--mono-textarea-line-height-md, var(--mono-leading-normal)));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-md, 4));\r\n\r\n /* one text line, and the two derived metrics that hang off it */\r\n --_mono-textarea-line: calc(var(--_mono-textarea-font-size) * var(--_mono-textarea-line-height));\r\n --_mono-textarea-padding-y: var(\r\n --mono-textarea-padding-y,\r\n max(0px, calc((var(--_mono-textarea-height) - var(--_mono-textarea-line)) / 2 - var(--_mono-textarea-border-width)))\r\n );\r\n --_mono-textarea-min-height: var(\r\n --mono-textarea-min-height,\r\n calc(var(--_mono-textarea-height) + (var(--_mono-textarea-rows) - 1) * var(--_mono-textarea-line))\r\n );\r\n\r\n /* basecoat@1.0.2 styles/vega.css .field — flex w-full flex-col gap-3 */\r\n display: flex;\r\n flex-direction: column;\r\n gap: var(--mono-textarea-gap, calc(var(--mono-spacing) * 3));\r\n width: 100%;\r\n min-width: 0;\r\n color: var(--_mono-textarea-text);\r\n font-family: inherit;\r\n}\r\n\r\n[mono-textarea],\r\n:where([mono-textarea]) *,\r\n:where([mono-textarea]) *::before,\r\n:where([mono-textarea]) *::after {\r\n box-sizing: border-box;\r\n}\r\n\r\n/* The element wraps the footer in an aria-describedby outlet; hand-written markup\r\n has no such wrapper. It is a flex child either way, so an EMPTY outlet still\r\n paid the root's `gap` and made the element stand taller than the same raw\r\n markup. The shadow build always RENDERS the footer and marks it empty, so the\r\n test is for a footer that is actually showing. */\r\n[mono-textarea] > [mono-message-outlet]:not(:has([mono-footer]:not([mono-empty]))) {\r\n display: none;\r\n}\r\n\r\n/* the shadow build renders every region and marks the empty ones; the light\r\n build renders only what exists. Out-specifies the region rules on purpose —\r\n a zero-weight hide would tie with them and lose on source order. */\r\n[mono-textarea] :is([mono-label], [mono-message], [mono-footer], [mono-counter])[mono-empty] {\r\n display: none;\r\n}\r\n\r\n/* =========================================\r\n Sizes — EXTENSION: Basecoat sizes only the select, so the ladder is\r\n --mono-control-height-* and the derivation above\r\n ========================================= */\r\n\r\n[mono-textarea][mono-size=\"xs\"] {\r\n --_mono-textarea-height: var(--mono-textarea-height-xs, var(--mono-control-height-xs));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-xs, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 2)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-xs, var(--mono-text-xs));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-xs, 3));\r\n}\r\n\r\n[mono-textarea][mono-size=\"sm\"] {\r\n --_mono-textarea-height: var(--mono-textarea-height-sm, var(--mono-control-height-sm));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-sm, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 2.5)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-sm, var(--mono-textarea-font-md, var(--mono-text-sm)));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-sm, 3));\r\n}\r\n\r\n[mono-textarea][mono-size=\"lg\"] {\r\n --_mono-textarea-height: var(--mono-textarea-height-lg, var(--mono-control-height-lg));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-lg, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 2.5)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-lg, var(--mono-textarea-font-md, var(--mono-text-sm)));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-lg, 4));\r\n}\r\n\r\n[mono-textarea][mono-size=\"xl\"] {\r\n --_mono-textarea-height: var(--mono-textarea-height-xl, var(--mono-control-height-xl));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-xl, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 3)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-xl, var(--mono-text-base));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-xl, 5));\r\n}\r\n\r\n[mono-textarea][mono-size=\"xxl\"] {\r\n --_mono-textarea-height: var(--mono-textarea-height-xxl, var(--mono-control-height-xxl));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-xxl, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 3)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-xxl, var(--mono-text-base));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-xxl, 5));\r\n}\r\n\r\n/* =========================================\r\n Colours — EXTENSION: the `color` prop is the FOCUS colour, nothing else\r\n ========================================= */\r\n\r\n[mono-textarea][mono-color=\"secondary\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-secondary);\r\n}\r\n[mono-textarea][mono-color=\"success\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-success);\r\n}\r\n[mono-textarea][mono-color=\"danger\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-danger);\r\n}\r\n[mono-textarea][mono-color=\"warning\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-warning);\r\n}\r\n[mono-textarea][mono-color=\"info\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-info);\r\n}\r\n[mono-textarea][mono-color=\"teal\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-teal);\r\n}\r\n[mono-textarea][mono-color=\"purple\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-purple);\r\n}\r\n[mono-textarea][mono-color=\"neutral\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-neutral);\r\n}\r\n[mono-textarea][mono-color=\"dark\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-dark);\r\n}\r\n\r\n/* =========================================\r\n Label\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field > label, .label\r\n — text-sm leading-snug font-medium */\r\n:where([mono-textarea]) > [mono-label] {\r\n display: flex;\r\n align-items: center;\r\n gap: calc(var(--mono-spacing) * 1);\r\n font-size: var(--mono-textarea-label-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-textarea-label-line-height, var(--mono-leading-snug));\r\n font-weight: var(--mono-textarea-label-font-weight, var(--mono-label-font-weight, var(--mono-font-weight-medium)));\r\n color: var(--mono-textarea-label-color, var(--_mono-textarea-text));\r\n}\r\n\r\n[mono-textarea][mono-validation-state=\"invalid\"] > [mono-label] {\r\n color: var(--mono-textarea-label-color, var(--_mono-textarea-invalid));\r\n}\r\n\r\n:where([mono-textarea]) [mono-required-mark] {\r\n color: var(--mono-textarea-required-color, var(--destructive));\r\n}\r\n\r\n/* =========================================\r\n The field\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/textarea.css .field > textarea, .textarea\r\n — flex field-sizing-content min-h-16 w-full outline-none\r\n placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 */\r\n/* basecoat@1.0.2 styles/vega.css .field > textarea, .textarea\r\n — rounded-md border border-input bg-transparent px-2.5 py-2 text-base md:text-sm\r\n shadow-xs transition-[color,box-shadow] (dark:bg-input/30 via --mono-mode-surface);\r\n mono: `--tw-ring-*` flattened to the ring + shadow slots, and the height is\r\n derived from the control step rather than upstream's flat min-h-16 */\r\n:where([mono-textarea]) [mono-native] {\r\n --_mono-textarea-ring: 0 0 #0000;\r\n display: block;\r\n width: 100%;\r\n min-width: 0;\r\n min-height: var(--_mono-textarea-min-height);\r\n padding: var(--_mono-textarea-padding-y) var(--_mono-textarea-padding-x);\r\n border: var(--_mono-textarea-border-width) solid var(--_mono-textarea-border-color);\r\n border-radius: var(--_mono-textarea-radius);\r\n background-color: var(--_mono-textarea-bg);\r\n color: var(--_mono-textarea-text);\r\n font-family: inherit;\r\n font-size: var(--_mono-textarea-font-size);\r\n line-height: var(--_mono-textarea-line-height);\r\n resize: var(--mono-textarea-resize, vertical);\r\n outline: none;\r\n box-shadow: var(--_mono-textarea-ring), var(--_mono-textarea-shadow);\r\n transition-property: color, background-color, border-color, box-shadow;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n}\r\n\r\n/* Upstream grows the box with `field-sizing: content`, which has no ceiling.\r\n mono's `auto-resize` is a JS height instead, BECAUSE it honours `min-rows` and\r\n `max-rows` — so this rule must not hand the sizing back to the browser, or the\r\n two fight over the height. All the attribute does here is drop the manual grip:\r\n a box that resizes itself should not also offer one. */\r\n[mono-textarea][mono-auto-resize] > [mono-native] {\r\n resize: var(--mono-textarea-resize, none);\r\n}\r\n\r\n/* placeholder:text-muted-foreground */\r\n:where([mono-textarea]) [mono-native]::placeholder {\r\n color: var(--_mono-textarea-placeholder);\r\n opacity: 1;\r\n}\r\n\r\n/* focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 */\r\n:where([mono-textarea]) [mono-native]:focus-visible,\r\n:where([mono-textarea]) [mono-native]:focus {\r\n border-color: var(--_mono-textarea-ring-color);\r\n --_mono-textarea-ring: 0 0 0 var(--_mono-textarea-ring-width) color-mix(in oklab, var(--_mono-textarea-ring-color) var(--_mono-textarea-ring-alpha), transparent);\r\n}\r\n\r\n/* aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20\r\n (dark: /50 and /40, carried by the mode tokens) */\r\n[mono-textarea][mono-validation-state=\"invalid\"] > [mono-native],\r\n:where([mono-textarea]) [mono-native][aria-invalid=\"true\"] {\r\n --_mono-textarea-border-color: var(--mono-mode-invalid-border);\r\n --_mono-textarea-ring: 0 0 0 var(--_mono-textarea-ring-width) var(--mono-mode-invalid-ring);\r\n}\r\n\r\n/* EXTENSION — the same treatment in the success / warning roles */\r\n[mono-textarea][mono-validation-state=\"valid\"] > [mono-native] {\r\n --_mono-textarea-border-color: color-mix(in oklab, var(--_mono-textarea-valid) var(--mono-mode-state-border-alpha), transparent);\r\n --_mono-textarea-ring: 0 0 0 var(--_mono-textarea-ring-width) color-mix(in oklab, var(--_mono-textarea-valid) var(--mono-mode-state-ring-alpha), transparent);\r\n}\r\n\r\n[mono-textarea][mono-validation-state=\"warning\"] > [mono-native] {\r\n --_mono-textarea-border-color: color-mix(in oklab, var(--_mono-textarea-warning) var(--mono-mode-state-border-alpha), transparent);\r\n --_mono-textarea-ring: 0 0 0 var(--_mono-textarea-ring-width) color-mix(in oklab, var(--_mono-textarea-warning) var(--mono-mode-state-ring-alpha), transparent);\r\n}\r\n\r\n/* disabled:cursor-not-allowed disabled:opacity-50 */\r\n[mono-textarea][mono-disabled] > [mono-native],\r\n:where([mono-textarea]) [mono-native]:disabled {\r\n cursor: not-allowed;\r\n opacity: 0.5;\r\n background-color: var(--mono-textarea-disabled-bg, var(--_mono-textarea-bg));\r\n}\r\n\r\n/* EXTENSION — readonly is legible, not dimmed: a muted surface and no caret */\r\n[mono-textarea][mono-readonly] > [mono-native],\r\n:where([mono-textarea]) [mono-native]:read-only:not(:disabled) {\r\n background-color: var(--mono-textarea-readonly-bg, var(--muted));\r\n cursor: default;\r\n}\r\n\r\n/* =========================================\r\n Variants — EXTENSION: the two other looks Basecoat's styles ship\r\n ========================================= */\r\n\r\n/* `outlined` is the default and IS vega's textarea. The `--mono-textarea-outline-*`\r\n knobs are how a FLAVOR restyles this variant alone: writing the shared\r\n `--mono-textarea-bg` would repaint `filled` and `underlined` too (the public\r\n tier out-ranks a variant's preset), which is exactly what made every style's\r\n underlined textarea come out as a filled box. */\r\n[mono-textarea]:is(:not([mono-variant]), [mono-variant=\"outlined\"]) {\r\n --_mono-textarea-bg-preset: var(--mono-textarea-outline-bg);\r\n --_mono-textarea-border-color-preset: var(--mono-textarea-outline-border-color);\r\n --_mono-textarea-side-border-color-preset: var(--mono-textarea-outline-side-border-color);\r\n --_mono-textarea-shadow-preset: var(--mono-textarea-outline-shadow, var(--mono-shadow-xs));\r\n --_mono-textarea-radius-preset: var(--mono-textarea-outline-radius);\r\n --_mono-textarea-padding-x-preset: var(--mono-textarea-outline-padding-x);\r\n --_mono-textarea-ring-width-preset: var(--mono-textarea-outline-ring-width);\r\n}\r\n\r\n/* `filled` ≡ luma / mira / rhea's textarea: a tinted surface, no border, no shadow */\r\n[mono-textarea][mono-variant=\"filled\"] {\r\n --_mono-textarea-bg-preset: var(--mono-textarea-filled-bg, color-mix(in oklab, var(--input) 50%, transparent));\r\n --_mono-textarea-border-color-preset: transparent;\r\n --_mono-textarea-shadow-preset: 0 0 #0000;\r\n}\r\n\r\n/* `underlined` ≡ sera's: square, the bottom edge only, and the ring rides that\r\n edge instead of wrapping the box (never `box-shadow: none` — the resting slot\r\n is neutralised so a focus rule can still fill it) */\r\n[mono-textarea][mono-variant=\"underlined\"] {\r\n --_mono-textarea-radius-preset: 0;\r\n --_mono-textarea-bg-preset: transparent;\r\n /* the bottom edge keeps --_mono-textarea-border-color; only the other three\r\n sides are cleared, through the side slot */\r\n --_mono-textarea-side-border-color-preset: transparent;\r\n --_mono-textarea-shadow-preset: 0 0 #0000;\r\n --_mono-textarea-padding-x-preset: 0px;\r\n --_mono-textarea-ring-width-preset: 0px;\r\n}\r\n\r\n[mono-textarea][mono-variant=\"underlined\"] > [mono-native],\r\n[mono-textarea]:is(:not([mono-variant]), [mono-variant=\"outlined\"]) > [mono-native] {\r\n border-color: var(--_mono-textarea-side-border-color);\r\n border-bottom-color: var(--_mono-textarea-border-color);\r\n}\r\n\r\n[mono-textarea][mono-variant=\"underlined\"] > [mono-native]:is(:focus, :focus-visible) {\r\n border-color: var(--_mono-textarea-side-border-color);\r\n border-bottom-color: var(--_mono-textarea-ring-color);\r\n}\r\n\r\n/* =========================================\r\n Footer — EXTENSION: the message row and the character counter\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .fieldset legend + p, .field > p, .field section > p\r\n — text-sm text-muted-foreground leading-normal font-normal */\r\n:where([mono-textarea]) > [mono-footer] {\r\n display: flex;\r\n align-items: flex-start;\r\n justify-content: space-between;\r\n gap: calc(var(--mono-spacing) * 2);\r\n}\r\n\r\n:where([mono-textarea]) [mono-message-wrap] {\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n}\r\n\r\n:where([mono-textarea]) [mono-message] {\r\n font-size: var(--mono-textarea-message-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-textarea-message-line-height, var(--mono-leading-normal));\r\n color: var(--_mono-textarea-muted);\r\n}\r\n\r\n/* .field [role='alert'] — the invalid message is the destructive one */\r\n:where([mono-textarea]) [mono-message=\"invalid\"] {\r\n color: var(--_mono-textarea-invalid);\r\n}\r\n\r\n:where([mono-textarea]) [mono-message=\"valid\"] {\r\n color: var(--_mono-textarea-valid);\r\n}\r\n\r\n:where([mono-textarea]) [mono-message=\"warning\"] {\r\n color: var(--_mono-textarea-warning);\r\n}\r\n\r\n:where([mono-textarea]) [mono-counter] {\r\n flex: 0 0 auto;\r\n font-size: var(--mono-textarea-counter-font-size, var(--mono-text-xs));\r\n line-height: var(--mono-leading-normal);\r\n font-variant-numeric: tabular-nums;\r\n color: var(--_mono-textarea-muted);\r\n}\r\n\r\n:where([mono-textarea]) [mono-counter][mono-near] {\r\n color: var(--_mono-textarea-warning);\r\n}\r\n\r\n:where([mono-textarea]) [mono-counter][mono-over] {\r\n color: var(--_mono-textarea-invalid);\r\n font-weight: var(--mono-font-weight-medium);\r\n}\r\n\r\n@media (prefers-reduced-motion: reduce) {\r\n :where([mono-textarea]) [mono-native] {\r\n transition: none;\r\n }\r\n}\r\n";
|
|
721
|
+
|
|
719
722
|
//#endregion
|
|
720
723
|
//#region src/components/textarea/mono-textarea.shadow.ts
|
|
721
|
-
|
|
722
|
-
|
|
724
|
+
const SHADOW_EXTRA_CSS = "";
|
|
725
|
+
let MonoTextareaShadow = class MonoTextareaShadow extends withShadowUtilityStyles(MonoTextareaCore(LitElement)) {
|
|
723
726
|
static {
|
|
724
727
|
this.disableWarning?.("change-in-update");
|
|
725
728
|
}
|
|
726
729
|
static {
|
|
727
|
-
this.styles = [unsafeCSS(toShadowCss(
|
|
730
|
+
this.styles = [unsafeCSS(toShadowCss(textarea_css_raw_default, {
|
|
728
731
|
host: "mono-textarea",
|
|
729
732
|
append: SHADOW_EXTRA_CSS
|
|
730
733
|
}))];
|
|
@@ -772,6 +775,7 @@ var MonoTextareaShadow = class MonoTextareaShadow extends withShadowUtilityStyle
|
|
|
772
775
|
}
|
|
773
776
|
};
|
|
774
777
|
MonoTextareaShadow = __decorate([customElement("mono-shadow-textarea")], MonoTextareaShadow);
|
|
778
|
+
|
|
775
779
|
//#endregion
|
|
776
780
|
//#region src/components/textarea/textarea-utils.ts
|
|
777
781
|
function validateTextareaProps(props) {
|
|
@@ -812,5 +816,6 @@ function validateTextareaProps(props) {
|
|
|
812
816
|
if (props.validationState && !validStates.includes(props.validationState)) return false;
|
|
813
817
|
return true;
|
|
814
818
|
}
|
|
819
|
+
|
|
815
820
|
//#endregion
|
|
816
|
-
export { MonoTextareaCore, MonoTextareaShadow, validateTextareaProps };
|
|
821
|
+
export { MonoTextareaCore, MonoTextareaShadow, validateTextareaProps };
|
package/dist/ui/sidebar.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { l as monoHostChildNodes } from "../mono-ui-
|
|
2
|
-
import { i as setExternalScrollLock } from "../popup-stack-
|
|
3
|
-
import { t as customElement } from "../mono-element-
|
|
4
|
-
import { a as defineHybridPropAliases, o as numberStringConverter, r as booleanStringConverter, t as __decorate } from "../decorate-
|
|
5
|
-
import { t as dispatchMonoEvent } from "../mono-event-
|
|
6
|
-
import { i as guardHostTextContent, s as placeSlotNode } from "../light-slots-
|
|
7
|
-
import { n as cssPart, r as defineCssClassAliases, t as applyCssClass } from "../css-class-
|
|
8
|
-
import { a as validateColorProp, i as isThemeColorToken, n as colorClassToken, r as customColorStyle, t as CUSTOM_COLOR_CLASS } from "../color-
|
|
9
|
-
import { n as releaseLayoutVar, t as claimLayoutVar } from "../layout-var-
|
|
1
|
+
import { l as monoHostChildNodes } from "../mono-ui-BwUc0L6B.js";
|
|
2
|
+
import { i as setExternalScrollLock } from "../popup-stack-De05Y-mJ.js";
|
|
3
|
+
import { t as customElement } from "../mono-element-C7vCschg.js";
|
|
4
|
+
import { a as defineHybridPropAliases, o as numberStringConverter, r as booleanStringConverter, t as __decorate } from "../decorate-DbYFpi8R.js";
|
|
5
|
+
import { t as dispatchMonoEvent } from "../mono-event-BPku9HpS.js";
|
|
6
|
+
import { i as guardHostTextContent, s as placeSlotNode } from "../light-slots-DdDdZ6zs.js";
|
|
7
|
+
import { n as cssPart, r as defineCssClassAliases, t as applyCssClass } from "../css-class-B6Tc_MAx.js";
|
|
8
|
+
import { a as validateColorProp, i as isThemeColorToken, n as colorClassToken, r as customColorStyle, t as CUSTOM_COLOR_CLASS } from "../color-CEYYtRX-.js";
|
|
9
|
+
import { n as releaseLayoutVar, t as claimLayoutVar } from "../layout-var-BSBKY49k.js";
|
|
10
10
|
import { LitElement, html, isServer, nothing, unsafeCSS } from "lit";
|
|
11
11
|
import { property, state } from "lit/decorators.js";
|
|
12
|
+
|
|
12
13
|
//#region src/components/sidebar/sidebar-utils.ts
|
|
13
|
-
|
|
14
|
+
const SIDEBAR_AUTO_BREAKPOINT = 768;
|
|
14
15
|
/**
|
|
15
16
|
* `typeof window === 'undefined'` alone is NOT a safe server guard: a DOM shim
|
|
16
17
|
* can define `window` without `matchMedia` (the @lit-labs/ssr v3 shim happens
|
|
@@ -93,6 +94,7 @@ function sidebarRootAttrs(props) {
|
|
|
93
94
|
color: !props.color || props.color === "surface" ? null : isThemeColorToken(props.color) ? props.color : CUSTOM_COLOR_CLASS
|
|
94
95
|
};
|
|
95
96
|
}
|
|
97
|
+
|
|
96
98
|
//#endregion
|
|
97
99
|
//#region src/components/sidebar/sidebar-core.ts
|
|
98
100
|
/**
|
|
@@ -109,7 +111,7 @@ function sidebarRootAttrs(props) {
|
|
|
109
111
|
* (light: empty + capture into `[data-mono-slot]`; shadow: native `<slot>`), and
|
|
110
112
|
* `renderIcon()` (light: `.mono-icon` UnoCSS icon; shadow: inline SVG).
|
|
111
113
|
*/
|
|
112
|
-
|
|
114
|
+
const MonoSidebarCore = (superClass) => {
|
|
113
115
|
class MonoSidebarCoreClass extends superClass {
|
|
114
116
|
constructor(...args) {
|
|
115
117
|
super(...args);
|
|
@@ -188,8 +190,10 @@ var MonoSidebarCore = (superClass) => {
|
|
|
188
190
|
if (changed.has("mode")) this._recomputeResolvedMode();
|
|
189
191
|
if (changed.has("mode") || changed.has("_resolvedMode") || changed.has("modelValue") || changed.has("rail") || changed.has("expandOnHover")) this._recomputeRailCollapsedAttr();
|
|
190
192
|
if (isServer) return;
|
|
191
|
-
if (changed.has("modelValue") || changed.has("mode"))
|
|
192
|
-
|
|
193
|
+
if (changed.has("modelValue") || changed.has("mode")) {
|
|
194
|
+
if (this._resolvedMode === "temporary" && this.modelValue) this._applyOpenSideEffects();
|
|
195
|
+
else this._releaseSideEffects();
|
|
196
|
+
}
|
|
193
197
|
if (changed.has("mode") || changed.has("width") || changed.has("railWidth") || changed.has("location") || changed.has("modelValue") || changed.has("contained")) this._writeLayoutVar();
|
|
194
198
|
}
|
|
195
199
|
/**
|
|
@@ -264,7 +268,7 @@ var MonoSidebarCore = (superClass) => {
|
|
|
264
268
|
}
|
|
265
269
|
_setupAutoModeListener() {
|
|
266
270
|
if (typeof window === "undefined" || !window.matchMedia) return;
|
|
267
|
-
this._autoMql = window.matchMedia(`(max-width:
|
|
271
|
+
this._autoMql = window.matchMedia(`(max-width: ${768 - 1}px)`);
|
|
268
272
|
this._autoMqlListener = () => {
|
|
269
273
|
if (this.mode === "auto") {
|
|
270
274
|
this._recomputeResolvedMode();
|
|
@@ -577,12 +581,14 @@ var MonoSidebarCore = (superClass) => {
|
|
|
577
581
|
__decorate([state()], MonoSidebarCoreClass.prototype, "_resolvedMode", void 0);
|
|
578
582
|
return MonoSidebarCoreClass;
|
|
579
583
|
};
|
|
584
|
+
|
|
580
585
|
//#endregion
|
|
581
|
-
//#region src
|
|
582
|
-
var sidebar_default = "/* @unocss-include */\r\n\r\n/* =========================================================================\r\n mono-sidebar — a port of Basecoat's `.sidebar` (basecoat-css@1.0.2, vega\r\n style).\r\n\r\n Styled by ATTRIBUTE, like Basecoat — and the attributes mirror the element's\r\n props one for one, so hand-written markup reads like the Lit / Vue tag:\r\n\r\n <mono-sidebar mode=\"rail\" location=\"right\" color=\"primary\" model-value>\r\n <div mono-sidebar mono-mode=\"rail\" mono-effective=\"rail\"\r\n mono-location=\"right\" mono-color=\"primary\" mono-open role=\"navigation\">\r\n <div mono-scrim></div>\r\n <aside mono-panel>\r\n <div mono-topbar>\r\n <div mono-header>…</div>\r\n <div mono-rail><button mono-rail-toggle>…</button></div>\r\n </div>\r\n <div mono-body>…</div>\r\n <div mono-footer>…</div>\r\n </aside>\r\n </div>\r\n\r\n An absent attribute is the prop's default (`:not([mono-density])` =\r\n comfortable, `:not([mono-color])` = surface, `:not([mono-variant])` =\r\n elevated, `:not([mono-location])` = left). `mono-effective` carries the\r\n mode after `auto` resolves, which is what the layout rules key on. The old\r\n classes (`[mono-sidebar][mono-mode=\"auto\"][mono-effective=\"permanent\"][mono-location=\"left\"]…`) are\r\n still emitted as inert hooks until 2.0 but no rule here reads them.\r\n\r\n Selector map (ours ≡ upstream):\r\n [mono-sidebar] ≡ .sidebar (the overlay wrapper)\r\n :where([mono-sidebar]) [mono-panel] ≡ .sidebar nav (fixed inset-y-0 z-50 flex w-… flex-col\r\n transition-transform duration-300 ease-in-out)\r\n :where([mono-sidebar]) [mono-scrim] ≡ .sidebar:not([aria-hidden]) max-md:bg-black/50\r\n :where([mono-sidebar]) [mono-header] / [mono-footer] ≡ .sidebar nav > header, > footer\r\n (flex flex-col, gap-2 p-2)\r\n :where([mono-sidebar]) [mono-body] ≡ .sidebar nav > section (flex min-h-0 flex-1 flex-col\r\n overflow-y-auto, gap-2)\r\n [mono-location=…] ≡ [data-side='left' | 'right'] (border-r / border-l)\r\n :not([mono-open]) ≡ [aria-hidden=true] (translate the panel out)\r\n :where([mono-sidebar]) [mono-rail] / [mono-rail-toggle] / [mono-topbar] ≡ EXTENSION (upstream has\r\n no rail mode)\r\n [mono-mode=…] / [mono-variant=…] / [mono-density=…] / [mono-color=…]\r\n ≡ EXTENSION\r\n\r\n NO GRADIENTS. The painted panel was a two-stop brand gradient with a coloured\r\n halo; it is the flat role fill now, inked in that role's `-foreground` the\r\n way `.btn[data-variant='primary']` is. The scrim is `--mono-mode-backdrop`.\r\n\r\n DARK MODE comes free — every colour resolves through a Basecoat token that\r\n already flips. A selector crosses neither the custom-element host nor the\r\n shadow boundary, so no `[mono-color=\"dark\"]` rule can live in component CSS.\r\n\r\n FLAVORS set `--mono-sidebar-{width,radius,shadow,pad-*,gap,scrim-*}` (+ the\r\n per-density forms); every fallback here is vega's value\r\n (`node scripts/basecoat-styles.mjs --grep \"sidebar\"`).\r\n ========================================================================= */\r\n\r\nmono-sidebar {\r\n display: contents;\r\n}\r\n\r\n[mono-sidebar] {\r\n /* ── the ten roles, each a public knob over a Basecoat token ────────────── */\r\n --_mono-sidebar-primary: var(--mono-sidebar-primary, var(--primary));\r\n --_mono-sidebar-secondary: var(--mono-sidebar-secondary, var(--secondary-foreground));\r\n --_mono-sidebar-success: var(--mono-sidebar-success, var(--success));\r\n --_mono-sidebar-danger: var(--mono-sidebar-danger, var(--destructive));\r\n --_mono-sidebar-warning: var(--mono-sidebar-warning, var(--warning));\r\n --_mono-sidebar-info: var(--mono-sidebar-info, var(--info));\r\n --_mono-sidebar-teal: var(--mono-sidebar-teal, var(--teal));\r\n --_mono-sidebar-purple: var(--mono-sidebar-purple, var(--purple));\r\n --_mono-sidebar-neutral: var(--mono-sidebar-neutral, var(--neutral));\r\n --_mono-sidebar-dark: var(--mono-sidebar-dark, var(--dark));\r\n\r\n /* ── the chrome surface — upstream's own sidebar tokens ──────────────────\r\n basecoat@1.0.2 styles/vega.css .sidebar nav — bg-sidebar text-sidebar-foreground */\r\n --_mono-sidebar-surface: var(--mono-sidebar-surface, var(--_mono-sidebar-surface-preset, var(--sidebar)));\r\n --_mono-sidebar-surface-soft: var(--mono-sidebar-surface-soft, var(--muted));\r\n --_mono-sidebar-text: var(--mono-sidebar-text, var(--_mono-sidebar-text-preset, var(--sidebar-foreground)));\r\n --_mono-sidebar-text-soft: var(--mono-sidebar-text-soft, var(--_mono-sidebar-text-soft-preset, color-mix(in oklab, var(--_mono-sidebar-text) 70%, transparent)));\r\n /* basecoat@1.0.2 styles/vega.css .sidebar nav [role=separator] — border-sidebar-border mx-2 */\r\n --_mono-sidebar-border: var(--mono-sidebar-border, var(--_mono-sidebar-border-preset, var(--sidebar-border)));\r\n --_mono-sidebar-border-lite: var(--mono-sidebar-border-lite, var(--_mono-sidebar-border-lite-preset, var(--_mono-sidebar-border)));\r\n\r\n --_mono-sidebar-accent: var(--mono-sidebar-accent, var(--_mono-sidebar-accent-preset, var(--_mono-sidebar-primary)));\r\n /* Ink for a panel painted in the accent. Each role points this at its own\r\n `-foreground` token, so a light role gets readable ink without a luminance\r\n calculation; a literal colour gets one written inline by the component.\r\n Every softened tint on a painted panel mixes from THIS, never from a\r\n literal white, so the whole treatment flips with the ink. */\r\n --_mono-sidebar-on-accent: var(--mono-sidebar-on-accent, var(--_mono-sidebar-on-accent-preset, var(--primary-foreground)));\r\n\r\n --_mono-sidebar-bg: var(--mono-sidebar-bg, var(--_mono-sidebar-bg-preset, var(--_mono-sidebar-surface)));\r\n /* upstream's `--sidebar-width` / `--sidebar-mobile-width` are the measure */\r\n --_mono-sidebar-width: var(--mono-sidebar-width, var(--sidebar-width));\r\n --_mono-sidebar-rail-width: var(--mono-sidebar-rail-width, calc(var(--mono-spacing) * 16));\r\n --_mono-sidebar-current-width: var(--_mono-sidebar-width);\r\n --_mono-sidebar-z: var(--mono-sidebar-z, 50);\r\n /* basecoat@1.0.2 styles/vega.css .sidebar nav > header, .sidebar nav > footer — gap-2 p-2 */\r\n --_mono-sidebar-pad-x: var(--mono-sidebar-pad-x, var(--_mono-sidebar-pad-x-preset, var(--mono-sidebar-pad-x-comfortable, calc(var(--mono-spacing) * 2))));\r\n --_mono-sidebar-pad-y: var(--mono-sidebar-pad-y, var(--_mono-sidebar-pad-y-preset, var(--mono-sidebar-pad-y-comfortable, calc(var(--mono-spacing) * 2))));\r\n /* basecoat@1.0.2 styles/vega.css .sidebar nav > section — gap-2 */\r\n --_mono-sidebar-gap: var(--mono-sidebar-gap, var(--_mono-sidebar-gap-preset, var(--mono-sidebar-gap-comfortable, calc(var(--mono-spacing) * 2))));\r\n --_mono-sidebar-radius: var(--mono-sidebar-radius, 0);\r\n --_mono-sidebar-shadow: var(--mono-sidebar-shadow, var(--mono-shadow-sm));\r\n --_mono-sidebar-border-width: var(--mono-sidebar-border-width, var(--mono-border-width));\r\n --_mono-sidebar-scrim-bg: var(--mono-sidebar-scrim-bg, var(--mono-mode-backdrop));\r\n --_mono-sidebar-duration: var(--mono-sidebar-duration, var(--mono-duration-slow, 300ms));\r\n\r\n /* Hand the panel's resolved palette to any <mono-menu> in the body. These are\r\n menu's PUBLIC vars, so they inherit in the light build and pierce the shadow\r\n boundary in the shadow one — the same handoff the rail layout uses below.\r\n\r\n Unconditional on purpose. A panel gets painted from three independent places\r\n — the `color` prop, a flavor, or a consumer's own `--mono-sidebar-bg` — and\r\n only the first is visible to a selector here. Deriving from\r\n `--_mono-sidebar-*` means the menu follows the panel whichever one painted\r\n it; before this, a navy panel carried menu labels still inked near-black.\r\n\r\n Only the HUE comes from the sidebar; the soft/faint steps keep menu's own\r\n ratios rather than the sidebar's, which is tuned for chrome and would wash a\r\n menu label out. */\r\n --mono-menu-text: var(--_mono-sidebar-text);\r\n --mono-menu-text-soft: color-mix(in oklab, var(--_mono-sidebar-text) 72%, transparent);\r\n --mono-menu-text-faint: color-mix(in oklab, var(--_mono-sidebar-text) 68%, transparent);\r\n --mono-menu-surface: transparent;\r\n --mono-menu-border: var(--_mono-sidebar-border);\r\n --mono-menu-border-lite: var(--_mono-sidebar-border-lite);\r\n --mono-menu-accent: var(--_mono-sidebar-accent);\r\n --mono-menu-hover-bg: color-mix(in oklab, var(--_mono-sidebar-text) 8%, transparent);\r\n --mono-menu-hover-color: var(--_mono-sidebar-text);\r\n --mono-menu-hover-border-color: color-mix(in oklab, var(--_mono-sidebar-text) 14%, transparent);\r\n /* The pill is a wash of the menu accent over WHATEVER the panel is, so it has\r\n to be mixed with `transparent`, not with the document's `--sidebar-accent`\r\n the way menu's own default is. On a navy panel the accent is white, and\r\n mixing white into the page's near-white chrome painted a white pill under\r\n white ink. */\r\n --mono-menu-active-bg: color-mix(in oklab, var(--_mono-sidebar-accent) 18%, transparent);\r\n --mono-menu-active-color: var(--_mono-sidebar-accent);\r\n --mono-menu-active-shadow: none;\r\n\r\n font-family: inherit;\r\n color: var(--_mono-sidebar-text);\r\n}\r\n\r\n[mono-sidebar],\r\n:where([mono-sidebar]) *,\r\n:where([mono-sidebar]) *::before,\r\n:where([mono-sidebar]) *::after {\r\n box-sizing: border-box;\r\n}\r\n\r\n\r\n/* ─────── DENSITY ─────── */\r\n[mono-sidebar][mono-density=\"compact\"] {\r\n --_mono-sidebar-pad-x-preset: 0.6rem;\r\n --_mono-sidebar-pad-y-preset: 0.6rem;\r\n --_mono-sidebar-gap-preset: 0.3rem;\r\n}\r\n\r\n[mono-sidebar][mono-density=\"comfortable\"] {\r\n --_mono-sidebar-pad-x-preset: 0.85rem;\r\n --_mono-sidebar-pad-y-preset: 0.85rem;\r\n --_mono-sidebar-gap-preset: 0.4rem;\r\n}\r\n\r\n[mono-sidebar][mono-density=\"default\"] {\r\n --_mono-sidebar-pad-x-preset: 1.05rem;\r\n --_mono-sidebar-pad-y-preset: 1.05rem;\r\n --_mono-sidebar-gap-preset: 0.5rem;\r\n}\r\n\r\n/* ─────── COLOR ─────── */\r\n/* EVERY `-preset` here has to sit on `[mono-sidebar]`, the element that DECLARES the\r\n resolvers above — never on the `[mono-panel]` child. A `var()` substitutes on\r\n the element that declares it, so `--_mono-sidebar-bg` is already resolved by the time\r\n a descendant sets `--_mono-sidebar-bg-preset`; the panel just inherits the finished\r\n value and the preset is dead. The painting block below used to be written as\r\n `[mono-sidebar][mono-color=\"primary\"] [mono-panel]`, which is exactly why no color ever\r\n painted. Same trap as the one documented in checkbox.css's border-width block. */\r\n[mono-sidebar][mono-color=\"primary\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-primary);\r\n --_mono-sidebar-on-accent-preset: var(--primary-foreground);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"secondary\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-secondary);\r\n /* the role IS --secondary-foreground, so the ink on it is --secondary */\r\n --_mono-sidebar-on-accent-preset: var(--secondary);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"success\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-success);\r\n --_mono-sidebar-on-accent-preset: var(--success-foreground);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"danger\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-danger);\r\n --_mono-sidebar-on-accent-preset: var(--destructive-foreground);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"warning\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-warning);\r\n --_mono-sidebar-on-accent-preset: var(--warning-foreground);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"info\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-info);\r\n --_mono-sidebar-on-accent-preset: var(--info-foreground);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"teal\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-teal);\r\n --_mono-sidebar-on-accent-preset: var(--teal-foreground);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"purple\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-purple);\r\n --_mono-sidebar-on-accent-preset: var(--purple-foreground);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"neutral\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-neutral);\r\n --_mono-sidebar-on-accent-preset: var(--neutral-foreground);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"dark\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-dark);\r\n --_mono-sidebar-on-accent-preset: var(--dark-foreground);\r\n}\r\n\r\n/* `color` given a literal (`#7c3aed`, `rgb(…)`) instead of a token name. The three\r\n presets are written INLINE on this same element by `_inlineRootStyle`, because a\r\n literal cannot be a class name and cannot be known to a stylesheet; this class only\r\n opts the element into the painting treatment below. */\r\n[mono-sidebar][mono-color=\"custom\"] {\r\n /* deliberately empty — the values arrive inline */\r\n}\r\n\r\n/* surface keeps the white-with-themed-border look — never painted.\r\n It sets NO accent preset on purpose: the resolver's own fallback is already\r\n `--_mono-sidebar-primary`, so declaring it here would add nothing under Mono while\r\n overriding a flavor's accent (ONE sets a white one on <body>) for the default color. */\r\n[mono-sidebar][mono-color=\"surface\"] {\r\n /* deliberately empty — see above */\r\n}\r\n\r\n/* Themed colors paint the panel with the accent, and every foreground on it is mixed\r\n from `--_mono-sidebar-on-accent` so the treatment works with dark ink as well as\r\n white. `color-mix(…, transparent)` rather than `rgba(255,255,255,α)` for the same\r\n reason. `-surface-preset` re-tints the rail toggle, which would otherwise stay a\r\n white chip carrying white glyphs. */\r\n[mono-sidebar][mono-color=\"primary\"],\r\n[mono-sidebar][mono-color=\"secondary\"],\r\n[mono-sidebar][mono-color=\"success\"],\r\n[mono-sidebar][mono-color=\"danger\"],\r\n[mono-sidebar][mono-color=\"warning\"],\r\n[mono-sidebar][mono-color=\"info\"],\r\n[mono-sidebar][mono-color=\"teal\"],\r\n[mono-sidebar][mono-color=\"purple\"],\r\n[mono-sidebar][mono-color=\"neutral\"],\r\n[mono-sidebar][mono-color=\"dark\"],\r\n[mono-sidebar][mono-color=\"custom\"] {\r\n --_mono-sidebar-bg-preset: var(--_mono-sidebar-accent);\r\n --_mono-sidebar-text-preset: var(--_mono-sidebar-on-accent);\r\n --_mono-sidebar-text-soft-preset: color-mix(in oklab, var(--_mono-sidebar-on-accent) 78%, transparent);\r\n --_mono-sidebar-border-preset: color-mix(in oklab, var(--_mono-sidebar-on-accent) 18%, transparent);\r\n --_mono-sidebar-border-lite-preset: color-mix(in oklab, var(--_mono-sidebar-on-accent) 12%, transparent);\r\n --_mono-sidebar-surface-preset: color-mix(in oklab, var(--_mono-sidebar-on-accent) 16%, transparent);\r\n\r\n /* The whole menu palette — pill included — is forwarded unconditionally up in\r\n `[mono-sidebar]` and keys off `--_mono-sidebar-accent`. On a PAINTED panel that\r\n accent IS the panel colour, so the pill would sit invisibly on it. Re-point\r\n the menu's copy at the on-accent ink — and only the menu's copy: the panel's\r\n own `--_mono-sidebar-bg-preset` reads `--_mono-sidebar-accent` in this very\r\n block, so shadowing it here would repaint the panel white. */\r\n --mono-menu-accent: var(--_mono-sidebar-on-accent);\r\n --mono-menu-active-bg: color-mix(in oklab, var(--_mono-sidebar-on-accent) 18%, transparent);\r\n --mono-menu-active-color: var(--_mono-sidebar-on-accent);\r\n}\r\n\r\n/* ─────── PANEL (the visible container) ─────── */\r\n:where([mono-sidebar]) [mono-panel] {\r\n position: fixed;\r\n top: 0;\r\n bottom: 0;\r\n z-index: var(--_mono-sidebar-z);\r\n width: var(--_mono-sidebar-current-width);\r\n /* basecoat@1.0.2 styles/vega.css .sidebar nav > header, .sidebar nav > footer — gap-2 p-2\r\n maia, luma and rhea set [--radius: var(--radius-xl)] on the shell, sera 0 —\r\n the chrome inside a panel follows the flavor, and so does the panel itself\r\n wherever its corner shows (a contained sidebar; a full-height one has none). */\r\n border-radius: var(--_mono-sidebar-radius);\r\n background: var(--_mono-sidebar-bg);\r\n color: var(--_mono-sidebar-text);\r\n display: flex;\r\n flex-direction: column;\r\n overflow: hidden;\r\n pointer-events: auto;\r\n transition:\r\n width 0.22s cubic-bezier(0.4, 0, 0.2, 1),\r\n transform 0.26s cubic-bezier(0.4, 0, 0.2, 1),\r\n visibility 0s linear 0.26s,\r\n background-color var(--mono-duration) var(--mono-ease),\r\n box-shadow var(--mono-duration) var(--mono-ease),\r\n border-color var(--mono-duration) var(--mono-ease);\r\n}\r\n\r\n[mono-sidebar][mono-contained] [mono-panel] {\r\n position: absolute;\r\n}\r\n\r\n/* `contained` scopes the sidebar to its own box, so the page-level z ladder is wrong\r\n for it: at 50 the panel outranked site chrome and painted OVER a sticky header while\r\n the container scrolled past it (VitePress's navbar is z 30). Re-resolving the private\r\n var with a LOCAL default keeps the panel above its own scrim and nothing else; an\r\n explicit --mono-sidebar-z still wins. Not `isolation: isolate` — a stacking context\r\n here would trap a fixed overlay (a modal or drawer opened from inside the sidebar)\r\n in the container, which is the trap DemoPreview.vue's stage comment records. */\r\n[mono-sidebar][mono-contained] {\r\n --_mono-sidebar-z: var(--mono-sidebar-z, 2);\r\n}\r\n\r\n/* Location anchor */\r\n[mono-sidebar][mono-location=\"left\"] [mono-panel] {\r\n left: 0;\r\n}\r\n\r\n[mono-sidebar][mono-location=\"right\"] [mono-panel] {\r\n right: 0;\r\n}\r\n\r\n/* ─────── VARIANT ─────── */\r\n[mono-sidebar][mono-variant=\"elevated\"][mono-location=\"left\"] [mono-panel] {\r\n box-shadow: var(--_mono-sidebar-shadow);\r\n}\r\n\r\n[mono-sidebar][mono-variant=\"elevated\"][mono-location=\"right\"] [mono-panel] {\r\n box-shadow: -4px 0 24px color-mix(in oklab, var(--_mono-sidebar-accent) 8%, transparent);\r\n}\r\n\r\n[mono-sidebar][mono-variant=\"flat\"] [mono-panel] {\r\n box-shadow: none;\r\n}\r\n\r\n[mono-sidebar][mono-variant=\"outlined\"][mono-location=\"left\"] [mono-panel] {\r\n box-shadow: none;\r\n border-right: 1px solid var(--_mono-sidebar-border);\r\n}\r\n\r\n[mono-sidebar][mono-variant=\"outlined\"][mono-location=\"right\"] [mono-panel] {\r\n box-shadow: none;\r\n border-left: 1px solid var(--_mono-sidebar-border);\r\n}\r\n\r\n/* ─────── EFFECTIVE MODE: PERMANENT ─────── */\r\n/* Set --sidebar-current-width on the ROOT (not the panel) so the rail toggle\r\n sibling can read it for its left/right offset. CSS variables only cascade\r\n downward — putting the override on a sibling doesn't help the toggle. */\r\n[mono-sidebar][mono-effective=\"permanent\"] {\r\n --_mono-sidebar-current-width: var(--_mono-sidebar-width);\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"permanent\"] [mono-panel] {\r\n visibility: visible;\r\n transform: none;\r\n}\r\n\r\n/* ─────── EFFECTIVE MODE: RAIL ─────── */\r\n[mono-sidebar][mono-effective=\"rail\"] {\r\n --_mono-sidebar-current-width: var(--_mono-sidebar-rail-width);\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"rail\"] [mono-panel] {\r\n visibility: visible;\r\n transform: none;\r\n}\r\n\r\n/* In rail mode, when modelValue === true, expand to full width. */\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] {\r\n --_mono-sidebar-current-width: var(--_mono-sidebar-width);\r\n}\r\n\r\n/* expand-on-hover only applies when rail is collapsed (not user-toggled open).\r\n Hover is on the root so both panel and toggle pick up the new width. */\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:not([mono-open]):hover {\r\n --_mono-sidebar-current-width: var(--_mono-sidebar-width);\r\n}\r\n\r\n/* ─────── EFFECTIVE MODE: TEMPORARY ─────── */\r\n[mono-sidebar][mono-effective=\"temporary\"] {\r\n --_mono-sidebar-current-width: var(--_mono-sidebar-width);\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"temporary\"] [mono-panel] {\r\n visibility: hidden;\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"temporary\"][mono-location=\"left\"] [mono-panel] {\r\n transform: translateX(-100%);\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"temporary\"][mono-location=\"right\"] [mono-panel] {\r\n transform: translateX(100%);\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"temporary\"][mono-open] [mono-panel] {\r\n visibility: visible;\r\n transform: translateX(0);\r\n transition:\r\n width 0.22s cubic-bezier(0.4, 0, 0.2, 1),\r\n transform 0.26s cubic-bezier(0.4, 0, 0.2, 1),\r\n visibility 0s linear 0s,\r\n background-color var(--mono-duration) var(--mono-ease),\r\n box-shadow var(--mono-duration) var(--mono-ease),\r\n border-color var(--mono-duration) var(--mono-ease);\r\n}\r\n\r\n/* ─────── SCRIM (temporary mode only) ─────── */\r\n:where([mono-sidebar]) [mono-scrim] {\r\n position: fixed;\r\n inset: 0;\r\n z-index: calc(var(--_mono-sidebar-z) - 1);\r\n background: var(--_mono-sidebar-scrim-bg);\r\n opacity: 0;\r\n pointer-events: none;\r\n cursor: pointer;\r\n transition: opacity 0.24s ease;\r\n display: none;\r\n}\r\n\r\n[mono-sidebar][mono-contained] [mono-scrim] {\r\n position: absolute;\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"temporary\"]:not([mono-no-scrim]) [mono-scrim] {\r\n display: block;\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"temporary\"][mono-open] [mono-scrim] {\r\n opacity: 1;\r\n pointer-events: auto;\r\n}\r\n\r\n/* ─────── HEADER / BODY / FOOTER ─────── */\r\n:where([mono-sidebar]) :where([mono-topbar]) > [mono-header] {\r\n flex-shrink: 0;\r\n padding: var(--_mono-sidebar-pad-y) var(--_mono-sidebar-pad-x);\r\n display: flex;\r\n align-items: center;\r\n gap: 0.6rem;\r\n min-height: 0;\r\n}\r\n\r\n:where([mono-sidebar]) :where([mono-topbar]) > [mono-header]:empty {\r\n display: none;\r\n}\r\n\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-body] {\r\n flex: 1;\r\n min-height: 0;\r\n overflow-y: auto;\r\n overflow-x: hidden;\r\n padding: var(--_mono-sidebar-pad-y) var(--_mono-sidebar-pad-x);\r\n}\r\n\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-body]:empty {\r\n padding: 0;\r\n}\r\n\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-footer] {\r\n flex-shrink: 0;\r\n padding: var(--_mono-sidebar-pad-y) var(--_mono-sidebar-pad-x);\r\n border-top: 1px solid var(--_mono-sidebar-border-lite);\r\n}\r\n\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-footer]:empty {\r\n display: none;\r\n}\r\n\r\n/* ─────── TOP BAR (header + rail share one row, justify-between) ─────── */\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-topbar] {\r\n flex-shrink: 0;\r\n display: flex;\r\n align-items: stretch;\r\n min-width: 0;\r\n border-bottom: 1px solid var(--_mono-sidebar-border-lite);\r\n}\r\n\r\n/* Hide the border when the topbar would be visually empty\r\n (header empty AND no rail bar rendered at all). */\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-topbar]:not(:has(> [mono-rail])):has(> [mono-header]:empty) {\r\n border-bottom: none;\r\n}\r\n\r\n/* For right-located sidebar, mirror the row so the rail toggle sits on the\r\n viewport-edge side and the header sits on the interior side. */\r\n[mono-sidebar][mono-location=\"right\"] :where([mono-panel]) > [mono-topbar] {\r\n flex-direction: row-reverse;\r\n}\r\n\r\n/* When the row contains both header and rail, header takes the available\r\n space and rail hugs its content — the visual \"justify-between\" effect. */\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-topbar] > [mono-header] {\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n}\r\n\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-topbar] > [mono-rail] {\r\n flex: 0 0 auto;\r\n}\r\n\r\n/* In collapsed rail (no toggle-open, no hover-expand): show the header (so the\r\n user sees their brand/avatar) and HIDE the rail bar (chevron). The chevron\r\n only reveals when the user hovers the top row (see swap rule below). */\r\n[mono-sidebar][mono-effective=\"rail\"]:not([mono-open]) :where([mono-panel]) > [mono-topbar] > [mono-rail] {\r\n display: none;\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"rail\"]:not([mono-open]) :where([mono-panel]) > [mono-topbar] > [mono-header] {\r\n flex: 1 1 auto;\r\n}\r\n\r\n/* Collapsed rail + topbar hover (no expand-on-hover): swap — hide the header\r\n and reveal the chevron in its place. Hover scope is the whole topbar (not\r\n just the header) so the swap doesn't flicker when the cursor crosses\r\n between the header's slot content and the revealed chevron.\r\n Skipped when `expand-on-hover` is set: that path widens the panel instead\r\n and shows both header + chevron side-by-side via the rules below.\r\n Also gated on `:has(> [mono-rail])` — when the user takes over via\r\n the `rail` boolean prop the default chevron isn't rendered, so there's\r\n nothing to swap to and we should leave the header alone. */\r\n[mono-sidebar][mono-effective=\"rail\"]:not([mono-open]):not([mono-expand-on-hover]) :where([mono-panel]) > [mono-topbar]:has(> [mono-rail]):hover > [mono-header] {\r\n display: none;\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"rail\"]:not([mono-open]):not([mono-expand-on-hover]) :where([mono-panel]) > [mono-topbar]:has(> [mono-rail]):hover > [mono-rail] {\r\n display: flex;\r\n flex: 1 1 auto;\r\n}\r\n\r\n/* Toggled-open or hover-expanded via expand-on-hover: header keeps its space,\r\n rail hugs its content — both visible side-by-side. */\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] :where([mono-panel]) > [mono-topbar] > [mono-rail],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover :where([mono-panel]) > [mono-topbar] > [mono-rail] {\r\n display: flex;\r\n flex: 0 0 auto;\r\n}\r\n\r\n/* ─────── RAIL BAR (slot host for the chevron / user content) ─────── */\r\n:where([mono-sidebar]) [mono-rail] {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.4rem;\r\n min-height: 44px;\r\n padding: var(--_mono-sidebar-pad-y) var(--_mono-sidebar-pad-x);\r\n}\r\n\r\n/* Collapsed rail: zero horizontal padding, center the chevron inside the\r\n full-width rail bar (header is hidden so the bar takes the whole panel). */\r\n[mono-sidebar][mono-effective=\"rail\"]:not([mono-open]) [mono-rail] {\r\n padding-left: 0;\r\n padding-right: 0;\r\n justify-content: center;\r\n}\r\n\r\n/* Expanded (toggled-open or hover-expanded): the rail hugs its content and\r\n sits at the trailing edge of the row, so its inside padding only needs to\r\n provide the gap between the chevron and the header. */\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] [mono-rail],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover [mono-rail] {\r\n padding-left: var(--_mono-sidebar-pad-x);\r\n padding-right: var(--_mono-sidebar-pad-x);\r\n justify-content: center;\r\n}\r\n\r\n/* ─────── DEFAULT RAIL TOGGLE BUTTON ─────── */\r\n:where([mono-sidebar]) [mono-rail-toggle] {\r\n width: 28px;\r\n height: 28px;\r\n border-radius: var(--mono-sidebar-rail-toggle-radius, var(--mono-radius-md));\r\n border: 1px solid var(--_mono-sidebar-border);\r\n background: var(--_mono-sidebar-surface);\r\n color: var(--_mono-sidebar-text-soft);\r\n cursor: pointer;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex-shrink: 0;\r\n transition:\r\n background-color 0.14s ease,\r\n color 0.14s ease,\r\n border-color 0.14s ease;\r\n}\r\n\r\n:where([mono-sidebar]) [mono-rail-toggle]:hover {\r\n background: var(--_mono-sidebar-surface);\r\n color: var(--_mono-sidebar-accent);\r\n border-color: var(--_mono-sidebar-accent);\r\n}\r\n\r\n/* On a painted panel the accent IS the surface behind this button, so the default\r\n hover above would tint the glyph and its border into the background. Keep the\r\n on-accent ink and let only the chip deepen. */\r\n[mono-sidebar][mono-color=\"primary\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"secondary\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"success\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"danger\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"warning\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"info\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"teal\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"purple\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"neutral\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"dark\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"custom\"] [mono-rail-toggle]:hover {\r\n background: color-mix(in oklab, var(--_mono-sidebar-on-accent) 28%, transparent);\r\n color: var(--_mono-sidebar-on-accent);\r\n border-color: color-mix(in oklab, var(--_mono-sidebar-on-accent) 38%, transparent);\r\n}\r\n\r\n:where([mono-sidebar]) [mono-rail-toggle] > .mono-icon {\r\n display: block;\r\n width: var(--mono-icon-md);\r\n height: var(--mono-icon-md);\r\n transition: transform var(--mono-duration) var(--mono-ease);\r\n}\r\n\r\n/* Arrow direction (set directly on the icon via per-state rules so transitions\r\n fire cleanly on every state flip — `var()`-driven transforms have known\r\n quirks where some browsers skip the transition):\r\n - location-left, collapsed → points right (►) to invite expansion\r\n - location-left, expanded → points left (◄) to invite collapse\r\n - location-right is mirrored\r\n \"Expanded\" covers BOTH the toggled-open state (`[mono-open]`, set after click)\r\n AND the hover-expanded state (`[mono-expand-on-hover]:hover`). */\r\n\r\n/* Default for location-right: mirror the icon so the chevron faces the panel. */\r\n[mono-sidebar][mono-location=\"right\"] [mono-rail-toggle] > .mono-icon {\r\n transform: scaleX(-1);\r\n}\r\n\r\n/* Toggled open (after click): rotate to point inward. Active in any mode. */\r\n[mono-sidebar][mono-location=\"left\"][mono-open] [mono-rail-toggle] > .mono-icon {\r\n transform: rotate(180deg);\r\n}\r\n\r\n[mono-sidebar][mono-location=\"right\"][mono-open] [mono-rail-toggle] > .mono-icon {\r\n transform: scaleX(-1) rotate(180deg);\r\n}\r\n\r\n/* Hover-expanded via expand-on-hover (panel widens on hover, no click yet).\r\n Higher specificity than the [mono-open] rule, so when both apply (cursor still\r\n over the panel after a click) the result is identical. */\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover][mono-location=\"left\"]:hover [mono-rail-toggle] > .mono-icon {\r\n transform: rotate(180deg);\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover][mono-location=\"right\"]:hover [mono-rail-toggle] > .mono-icon {\r\n transform: scaleX(-1) rotate(180deg);\r\n}\r\n\r\n/* Opt-in label convention (brand text, footer labels, …): display is read from an\r\n inherited custom property, so the rail-collapse below can hide it across the\r\n shadow boundary (a shadow-scoped descendant selector can't reach a slotted\r\n light-DOM label). Unset → the element's natural display. Mirrors the menu's\r\n `display: var(--mono-menu-label-display, <natural>)` contract. */\r\n.mono-sidebar-label {\r\n display: var(--mono-sidebar-label-display, revert);\r\n}\r\n\r\n/* ─────── RAIL: COLLAPSE MENU + LABELS ─────── */\r\n/* When the rail is collapsed (not toggled-open and not hover-expanded), the\r\n panel is too narrow to fit icon + text — for both menu rows and header/footer\r\n slot content. We:\r\n 1. Hide text-bearing parts of any descendant `<mono-menu>` and shrink each\r\n action to a centered icon-only pill (so the active-state pill hugs the\r\n icon instead of stretching across the full panel).\r\n 2. Zero the header / body / footer horizontal padding so their centered\r\n content lines up on the panel's center column, keeping the header\r\n avatar visually flush with the menu icons below it.\r\n 3. Hide any element opted into the `.mono-sidebar-label` convention —\r\n the typical wrapper for brand text, footer labels, etc. that should\r\n collapse alongside the menu titles.\r\n Every rule unwinds under `[mono-open]` or `[mono-expand-on-hover]:hover`, so labels\r\n reappear in lockstep with the panel widening. */\r\n\r\n/* 1 — the menu interior collapses to icons: text-bearing parts are hidden, the\r\n tree loses its indent and guide, and a group folds shut visually even while\r\n the menu's own `_openGroups` state still has it marked open — the state\r\n survives the round-trip and reappears the moment the panel widens. */\r\n/* Rail-collapse, entirely through inherited custom properties. Set on the body\r\n (the menu's flattened parent) they cross the shadow boundary into a slotted\r\n shadow <mono-menu>, whose rows no descendant selector here can reach; menu.css\r\n consumes every one of them. Restored to `initial` on open / hover-expand\r\n below, so `var(--x, fallback)` falls back to each element's natural value.\r\n Pure CSS → works on the server (no-JS) and syncs with `:hover`.\r\n\r\n This used to run alongside a parallel `.mono-menu-*` descendant path that only\r\n the light build could see, because only it still emits the old classes. Two\r\n paths meant three builds: light centred its rows and closed the tree guide,\r\n shadow and hand-written markup did neither. */\r\n[mono-sidebar][mono-effective=\"rail\"] :where([mono-panel]) > [mono-body] {\r\n --mono-menu-label-display: none;\r\n --mono-menu-row-display: flex;\r\n --mono-menu-row-justify: center;\r\n --mono-menu-action-width: auto;\r\n --mono-menu-action-justify: center;\r\n --mono-menu-action-gap: 0;\r\n --mono-menu-group-children-display: none;\r\n /* a collapsed rail has no room for the tree's indent or its guide */\r\n --mono-menu-indent: 0px;\r\n --mono-menu-guide-width: 0px;\r\n --mono-menu-guide-offset: 0px;\r\n}\r\n\r\n/* 2 — header / body / footer drop horizontal padding and center their content */\r\n[mono-sidebar][mono-effective=\"rail\"] :where([mono-topbar]) > [mono-header],\r\n[mono-sidebar][mono-effective=\"rail\"] :where([mono-panel]) > [mono-footer] {\r\n padding-left: 0;\r\n padding-right: 0;\r\n justify-content: center;\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"rail\"] :where([mono-panel]) > [mono-body] {\r\n padding-left: 0;\r\n padding-right: 0;\r\n}\r\n\r\n/* 3 — opt-in label convention for slot content (brand text, footer labels, …).\r\n Display is driven by an inherited custom property so the rail-collapse reaches\r\n slotted labels ACROSS the shadow boundary — the same contract the menu uses\r\n (see `--mono-menu-label-display`). Set on the rail root so labels in ANY region\r\n (header / body / footer) inherit it; the label consumes it via the base rule\r\n below (`display: var(--mono-sidebar-label-display, revert)`). */\r\n[mono-sidebar][mono-effective=\"rail\"] {\r\n --mono-sidebar-label-display: none;\r\n}\r\n\r\n/* ─── Restore on toggled-open or hover-expanded ─── */\r\n/* When the rail expands, defer to the data-open attribute — open groups\r\n reveal their children, closed groups stay closed. */\r\n/* Restore the cross-shadow rail-collapse vars on toggle-open / hover-expand:\r\n `initial` makes the menu's `var(--x, fallback)` resolve to each element's\r\n natural value, re-expanding the slotted shadow <mono-menu> in lockstep. */\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] :where([mono-panel]) > [mono-body],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover :where([mono-panel]) > [mono-body] {\r\n --mono-menu-label-display: initial;\r\n --mono-menu-row-display: initial;\r\n --mono-menu-row-justify: initial;\r\n --mono-menu-action-width: initial;\r\n --mono-menu-action-justify: initial;\r\n --mono-menu-action-gap: initial;\r\n --mono-menu-group-children-display: initial;\r\n --mono-menu-indent: initial;\r\n --mono-menu-guide-width: initial;\r\n --mono-menu-guide-offset: initial;\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] :where([mono-topbar]) > [mono-header],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] :where([mono-panel]) > [mono-body],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] :where([mono-panel]) > [mono-footer],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover :where([mono-topbar]) > [mono-header],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover :where([mono-panel]) > [mono-body],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover :where([mono-panel]) > [mono-footer] {\r\n padding-left: var(--_mono-sidebar-pad-x);\r\n padding-right: var(--_mono-sidebar-pad-x);\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] :where([mono-topbar]) > [mono-header],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] :where([mono-panel]) > [mono-footer],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover :where([mono-topbar]) > [mono-header],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover :where([mono-panel]) > [mono-footer] {\r\n justify-content: flex-start;\r\n}\r\n\r\n/* Restore the label on toggle-open / hover-expand: `initial` makes the custom\r\n property guaranteed-invalid, so the label's `var(--x, revert)` falls back to\r\n its natural display — re-expanding slotted labels (light + shadow) in lockstep\r\n with the menu (mirrors the `--mono-menu-*` restore above). */\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover {\r\n --mono-sidebar-label-display: initial;\r\n}\r\n\r\n/* ─────── REDUCED MOTION ─────── */\r\n@media (prefers-reduced-motion: reduce) {\r\n :where([mono-sidebar]) [mono-panel],\r\n :where([mono-sidebar]) [mono-scrim],\r\n :where([mono-sidebar]) [mono-rail-toggle] {\r\n transition: none;\r\n }\r\n}\r\n";
|
|
586
|
+
//#region \0raw:C:\Users\VCT-DEV\Desktop\libs\packages\helper\src\components\sidebar\sidebar.css?raw.js
|
|
587
|
+
var sidebar_css_raw_default = "/* @unocss-include */\r\n\r\n/* =========================================================================\r\n mono-sidebar — a port of Basecoat's `.sidebar` (basecoat-css@1.0.2, vega\r\n style).\r\n\r\n Styled by ATTRIBUTE, like Basecoat — and the attributes mirror the element's\r\n props one for one, so hand-written markup reads like the Lit / Vue tag:\r\n\r\n <mono-sidebar mode=\"rail\" location=\"right\" color=\"primary\" model-value>\r\n <div mono-sidebar mono-mode=\"rail\" mono-effective=\"rail\"\r\n mono-location=\"right\" mono-color=\"primary\" mono-open role=\"navigation\">\r\n <div mono-scrim></div>\r\n <aside mono-panel>\r\n <div mono-topbar>\r\n <div mono-header>…</div>\r\n <div mono-rail><button mono-rail-toggle>…</button></div>\r\n </div>\r\n <div mono-body>…</div>\r\n <div mono-footer>…</div>\r\n </aside>\r\n </div>\r\n\r\n An absent attribute is the prop's default (`:not([mono-density])` =\r\n comfortable, `:not([mono-color])` = surface, `:not([mono-variant])` =\r\n elevated, `:not([mono-location])` = left). `mono-effective` carries the\r\n mode after `auto` resolves, which is what the layout rules key on. The old\r\n classes (`[mono-sidebar][mono-mode=\"auto\"][mono-effective=\"permanent\"][mono-location=\"left\"]…`) are\r\n still emitted as inert hooks until 2.0 but no rule here reads them.\r\n\r\n Selector map (ours ≡ upstream):\r\n [mono-sidebar] ≡ .sidebar (the overlay wrapper)\r\n :where([mono-sidebar]) [mono-panel] ≡ .sidebar nav (fixed inset-y-0 z-50 flex w-… flex-col\r\n transition-transform duration-300 ease-in-out)\r\n :where([mono-sidebar]) [mono-scrim] ≡ .sidebar:not([aria-hidden]) max-md:bg-black/50\r\n :where([mono-sidebar]) [mono-header] / [mono-footer] ≡ .sidebar nav > header, > footer\r\n (flex flex-col, gap-2 p-2)\r\n :where([mono-sidebar]) [mono-body] ≡ .sidebar nav > section (flex min-h-0 flex-1 flex-col\r\n overflow-y-auto, gap-2)\r\n [mono-location=…] ≡ [data-side='left' | 'right'] (border-r / border-l)\r\n :not([mono-open]) ≡ [aria-hidden=true] (translate the panel out)\r\n :where([mono-sidebar]) [mono-rail] / [mono-rail-toggle] / [mono-topbar] ≡ EXTENSION (upstream has\r\n no rail mode)\r\n [mono-mode=…] / [mono-variant=…] / [mono-density=…] / [mono-color=…]\r\n ≡ EXTENSION\r\n\r\n NO GRADIENTS. The painted panel was a two-stop brand gradient with a coloured\r\n halo; it is the flat role fill now, inked in that role's `-foreground` the\r\n way `.btn[data-variant='primary']` is. The scrim is `--mono-mode-backdrop`.\r\n\r\n DARK MODE comes free — every colour resolves through a Basecoat token that\r\n already flips. A selector crosses neither the custom-element host nor the\r\n shadow boundary, so no `[mono-color=\"dark\"]` rule can live in component CSS.\r\n\r\n FLAVORS set `--mono-sidebar-{width,radius,shadow,pad-*,gap,scrim-*}` (+ the\r\n per-density forms); every fallback here is vega's value\r\n (`node scripts/basecoat-styles.mjs --grep \"sidebar\"`).\r\n ========================================================================= */\r\n\r\nmono-sidebar {\r\n display: contents;\r\n}\r\n\r\n[mono-sidebar] {\r\n /* ── the ten roles, each a public knob over a Basecoat token ────────────── */\r\n --_mono-sidebar-primary: var(--mono-sidebar-primary, var(--primary));\r\n --_mono-sidebar-secondary: var(--mono-sidebar-secondary, var(--secondary-foreground));\r\n --_mono-sidebar-success: var(--mono-sidebar-success, var(--success));\r\n --_mono-sidebar-danger: var(--mono-sidebar-danger, var(--destructive));\r\n --_mono-sidebar-warning: var(--mono-sidebar-warning, var(--warning));\r\n --_mono-sidebar-info: var(--mono-sidebar-info, var(--info));\r\n --_mono-sidebar-teal: var(--mono-sidebar-teal, var(--teal));\r\n --_mono-sidebar-purple: var(--mono-sidebar-purple, var(--purple));\r\n --_mono-sidebar-neutral: var(--mono-sidebar-neutral, var(--neutral));\r\n --_mono-sidebar-dark: var(--mono-sidebar-dark, var(--dark));\r\n\r\n /* ── the chrome surface — upstream's own sidebar tokens ──────────────────\r\n basecoat@1.0.2 styles/vega.css .sidebar nav — bg-sidebar text-sidebar-foreground */\r\n --_mono-sidebar-surface: var(--mono-sidebar-surface, var(--_mono-sidebar-surface-preset, var(--sidebar)));\r\n --_mono-sidebar-surface-soft: var(--mono-sidebar-surface-soft, var(--muted));\r\n --_mono-sidebar-text: var(--mono-sidebar-text, var(--_mono-sidebar-text-preset, var(--sidebar-foreground)));\r\n --_mono-sidebar-text-soft: var(--mono-sidebar-text-soft, var(--_mono-sidebar-text-soft-preset, color-mix(in oklab, var(--_mono-sidebar-text) 70%, transparent)));\r\n /* basecoat@1.0.2 styles/vega.css .sidebar nav [role=separator] — border-sidebar-border mx-2 */\r\n --_mono-sidebar-border: var(--mono-sidebar-border, var(--_mono-sidebar-border-preset, var(--sidebar-border)));\r\n --_mono-sidebar-border-lite: var(--mono-sidebar-border-lite, var(--_mono-sidebar-border-lite-preset, var(--_mono-sidebar-border)));\r\n\r\n --_mono-sidebar-accent: var(--mono-sidebar-accent, var(--_mono-sidebar-accent-preset, var(--_mono-sidebar-primary)));\r\n /* Ink for a panel painted in the accent. Each role points this at its own\r\n `-foreground` token, so a light role gets readable ink without a luminance\r\n calculation; a literal colour gets one written inline by the component.\r\n Every softened tint on a painted panel mixes from THIS, never from a\r\n literal white, so the whole treatment flips with the ink. */\r\n --_mono-sidebar-on-accent: var(--mono-sidebar-on-accent, var(--_mono-sidebar-on-accent-preset, var(--primary-foreground)));\r\n\r\n --_mono-sidebar-bg: var(--mono-sidebar-bg, var(--_mono-sidebar-bg-preset, var(--_mono-sidebar-surface)));\r\n /* upstream's `--sidebar-width` / `--sidebar-mobile-width` are the measure */\r\n --_mono-sidebar-width: var(--mono-sidebar-width, var(--sidebar-width));\r\n --_mono-sidebar-rail-width: var(--mono-sidebar-rail-width, calc(var(--mono-spacing) * 16));\r\n --_mono-sidebar-current-width: var(--_mono-sidebar-width);\r\n --_mono-sidebar-z: var(--mono-sidebar-z, 50);\r\n /* basecoat@1.0.2 styles/vega.css .sidebar nav > header, .sidebar nav > footer — gap-2 p-2 */\r\n --_mono-sidebar-pad-x: var(--mono-sidebar-pad-x, var(--_mono-sidebar-pad-x-preset, var(--mono-sidebar-pad-x-comfortable, calc(var(--mono-spacing) * 2))));\r\n --_mono-sidebar-pad-y: var(--mono-sidebar-pad-y, var(--_mono-sidebar-pad-y-preset, var(--mono-sidebar-pad-y-comfortable, calc(var(--mono-spacing) * 2))));\r\n /* basecoat@1.0.2 styles/vega.css .sidebar nav > section — gap-2 */\r\n --_mono-sidebar-gap: var(--mono-sidebar-gap, var(--_mono-sidebar-gap-preset, var(--mono-sidebar-gap-comfortable, calc(var(--mono-spacing) * 2))));\r\n --_mono-sidebar-radius: var(--mono-sidebar-radius, 0);\r\n --_mono-sidebar-shadow: var(--mono-sidebar-shadow, var(--mono-shadow-sm));\r\n --_mono-sidebar-border-width: var(--mono-sidebar-border-width, var(--mono-border-width));\r\n --_mono-sidebar-scrim-bg: var(--mono-sidebar-scrim-bg, var(--mono-mode-backdrop));\r\n --_mono-sidebar-duration: var(--mono-sidebar-duration, var(--mono-duration-slow, 300ms));\r\n\r\n /* Hand the panel's resolved palette to any <mono-menu> in the body. These are\r\n menu's PUBLIC vars, so they inherit in the light build and pierce the shadow\r\n boundary in the shadow one — the same handoff the rail layout uses below.\r\n\r\n Unconditional on purpose. A panel gets painted from three independent places\r\n — the `color` prop, a flavor, or a consumer's own `--mono-sidebar-bg` — and\r\n only the first is visible to a selector here. Deriving from\r\n `--_mono-sidebar-*` means the menu follows the panel whichever one painted\r\n it; before this, a navy panel carried menu labels still inked near-black.\r\n\r\n Only the HUE comes from the sidebar; the soft/faint steps keep menu's own\r\n ratios rather than the sidebar's, which is tuned for chrome and would wash a\r\n menu label out. */\r\n --mono-menu-text: var(--_mono-sidebar-text);\r\n --mono-menu-text-soft: color-mix(in oklab, var(--_mono-sidebar-text) 72%, transparent);\r\n --mono-menu-text-faint: color-mix(in oklab, var(--_mono-sidebar-text) 68%, transparent);\r\n --mono-menu-surface: transparent;\r\n --mono-menu-border: var(--_mono-sidebar-border);\r\n --mono-menu-border-lite: var(--_mono-sidebar-border-lite);\r\n --mono-menu-accent: var(--_mono-sidebar-accent);\r\n --mono-menu-hover-bg: color-mix(in oklab, var(--_mono-sidebar-text) 8%, transparent);\r\n --mono-menu-hover-color: var(--_mono-sidebar-text);\r\n --mono-menu-hover-border-color: color-mix(in oklab, var(--_mono-sidebar-text) 14%, transparent);\r\n /* The pill is a wash of the menu accent over WHATEVER the panel is, so it has\r\n to be mixed with `transparent`, not with the document's `--sidebar-accent`\r\n the way menu's own default is. On a navy panel the accent is white, and\r\n mixing white into the page's near-white chrome painted a white pill under\r\n white ink. */\r\n --mono-menu-active-bg: color-mix(in oklab, var(--_mono-sidebar-accent) 18%, transparent);\r\n --mono-menu-active-color: var(--_mono-sidebar-accent);\r\n --mono-menu-active-shadow: none;\r\n\r\n font-family: inherit;\r\n color: var(--_mono-sidebar-text);\r\n}\r\n\r\n[mono-sidebar],\r\n:where([mono-sidebar]) *,\r\n:where([mono-sidebar]) *::before,\r\n:where([mono-sidebar]) *::after {\r\n box-sizing: border-box;\r\n}\r\n\r\n\r\n/* ─────── DENSITY ─────── */\r\n[mono-sidebar][mono-density=\"compact\"] {\r\n --_mono-sidebar-pad-x-preset: 0.6rem;\r\n --_mono-sidebar-pad-y-preset: 0.6rem;\r\n --_mono-sidebar-gap-preset: 0.3rem;\r\n}\r\n\r\n[mono-sidebar][mono-density=\"comfortable\"] {\r\n --_mono-sidebar-pad-x-preset: 0.85rem;\r\n --_mono-sidebar-pad-y-preset: 0.85rem;\r\n --_mono-sidebar-gap-preset: 0.4rem;\r\n}\r\n\r\n[mono-sidebar][mono-density=\"default\"] {\r\n --_mono-sidebar-pad-x-preset: 1.05rem;\r\n --_mono-sidebar-pad-y-preset: 1.05rem;\r\n --_mono-sidebar-gap-preset: 0.5rem;\r\n}\r\n\r\n/* ─────── COLOR ─────── */\r\n/* EVERY `-preset` here has to sit on `[mono-sidebar]`, the element that DECLARES the\r\n resolvers above — never on the `[mono-panel]` child. A `var()` substitutes on\r\n the element that declares it, so `--_mono-sidebar-bg` is already resolved by the time\r\n a descendant sets `--_mono-sidebar-bg-preset`; the panel just inherits the finished\r\n value and the preset is dead. The painting block below used to be written as\r\n `[mono-sidebar][mono-color=\"primary\"] [mono-panel]`, which is exactly why no color ever\r\n painted. Same trap as the one documented in checkbox.css's border-width block. */\r\n[mono-sidebar][mono-color=\"primary\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-primary);\r\n --_mono-sidebar-on-accent-preset: var(--primary-foreground);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"secondary\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-secondary);\r\n /* the role IS --secondary-foreground, so the ink on it is --secondary */\r\n --_mono-sidebar-on-accent-preset: var(--secondary);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"success\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-success);\r\n --_mono-sidebar-on-accent-preset: var(--success-foreground);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"danger\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-danger);\r\n --_mono-sidebar-on-accent-preset: var(--destructive-foreground);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"warning\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-warning);\r\n --_mono-sidebar-on-accent-preset: var(--warning-foreground);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"info\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-info);\r\n --_mono-sidebar-on-accent-preset: var(--info-foreground);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"teal\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-teal);\r\n --_mono-sidebar-on-accent-preset: var(--teal-foreground);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"purple\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-purple);\r\n --_mono-sidebar-on-accent-preset: var(--purple-foreground);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"neutral\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-neutral);\r\n --_mono-sidebar-on-accent-preset: var(--neutral-foreground);\r\n}\r\n\r\n[mono-sidebar][mono-color=\"dark\"] {\r\n --_mono-sidebar-accent-preset: var(--_mono-sidebar-dark);\r\n --_mono-sidebar-on-accent-preset: var(--dark-foreground);\r\n}\r\n\r\n/* `color` given a literal (`#7c3aed`, `rgb(…)`) instead of a token name. The three\r\n presets are written INLINE on this same element by `_inlineRootStyle`, because a\r\n literal cannot be a class name and cannot be known to a stylesheet; this class only\r\n opts the element into the painting treatment below. */\r\n[mono-sidebar][mono-color=\"custom\"] {\r\n /* deliberately empty — the values arrive inline */\r\n}\r\n\r\n/* surface keeps the white-with-themed-border look — never painted.\r\n It sets NO accent preset on purpose: the resolver's own fallback is already\r\n `--_mono-sidebar-primary`, so declaring it here would add nothing under Mono while\r\n overriding a flavor's accent (ONE sets a white one on <body>) for the default color. */\r\n[mono-sidebar][mono-color=\"surface\"] {\r\n /* deliberately empty — see above */\r\n}\r\n\r\n/* Themed colors paint the panel with the accent, and every foreground on it is mixed\r\n from `--_mono-sidebar-on-accent` so the treatment works with dark ink as well as\r\n white. `color-mix(…, transparent)` rather than `rgba(255,255,255,α)` for the same\r\n reason. `-surface-preset` re-tints the rail toggle, which would otherwise stay a\r\n white chip carrying white glyphs. */\r\n[mono-sidebar][mono-color=\"primary\"],\r\n[mono-sidebar][mono-color=\"secondary\"],\r\n[mono-sidebar][mono-color=\"success\"],\r\n[mono-sidebar][mono-color=\"danger\"],\r\n[mono-sidebar][mono-color=\"warning\"],\r\n[mono-sidebar][mono-color=\"info\"],\r\n[mono-sidebar][mono-color=\"teal\"],\r\n[mono-sidebar][mono-color=\"purple\"],\r\n[mono-sidebar][mono-color=\"neutral\"],\r\n[mono-sidebar][mono-color=\"dark\"],\r\n[mono-sidebar][mono-color=\"custom\"] {\r\n --_mono-sidebar-bg-preset: var(--_mono-sidebar-accent);\r\n --_mono-sidebar-text-preset: var(--_mono-sidebar-on-accent);\r\n --_mono-sidebar-text-soft-preset: color-mix(in oklab, var(--_mono-sidebar-on-accent) 78%, transparent);\r\n --_mono-sidebar-border-preset: color-mix(in oklab, var(--_mono-sidebar-on-accent) 18%, transparent);\r\n --_mono-sidebar-border-lite-preset: color-mix(in oklab, var(--_mono-sidebar-on-accent) 12%, transparent);\r\n --_mono-sidebar-surface-preset: color-mix(in oklab, var(--_mono-sidebar-on-accent) 16%, transparent);\r\n\r\n /* The whole menu palette — pill included — is forwarded unconditionally up in\r\n `[mono-sidebar]` and keys off `--_mono-sidebar-accent`. On a PAINTED panel that\r\n accent IS the panel colour, so the pill would sit invisibly on it. Re-point\r\n the menu's copy at the on-accent ink — and only the menu's copy: the panel's\r\n own `--_mono-sidebar-bg-preset` reads `--_mono-sidebar-accent` in this very\r\n block, so shadowing it here would repaint the panel white. */\r\n --mono-menu-accent: var(--_mono-sidebar-on-accent);\r\n --mono-menu-active-bg: color-mix(in oklab, var(--_mono-sidebar-on-accent) 18%, transparent);\r\n --mono-menu-active-color: var(--_mono-sidebar-on-accent);\r\n}\r\n\r\n/* ─────── PANEL (the visible container) ─────── */\r\n:where([mono-sidebar]) [mono-panel] {\r\n position: fixed;\r\n top: 0;\r\n bottom: 0;\r\n z-index: var(--_mono-sidebar-z);\r\n width: var(--_mono-sidebar-current-width);\r\n /* basecoat@1.0.2 styles/vega.css .sidebar nav > header, .sidebar nav > footer — gap-2 p-2\r\n maia, luma and rhea set [--radius: var(--radius-xl)] on the shell, sera 0 —\r\n the chrome inside a panel follows the flavor, and so does the panel itself\r\n wherever its corner shows (a contained sidebar; a full-height one has none). */\r\n border-radius: var(--_mono-sidebar-radius);\r\n background: var(--_mono-sidebar-bg);\r\n color: var(--_mono-sidebar-text);\r\n display: flex;\r\n flex-direction: column;\r\n overflow: hidden;\r\n pointer-events: auto;\r\n transition:\r\n width 0.22s cubic-bezier(0.4, 0, 0.2, 1),\r\n transform 0.26s cubic-bezier(0.4, 0, 0.2, 1),\r\n visibility 0s linear 0.26s,\r\n background-color var(--mono-duration) var(--mono-ease),\r\n box-shadow var(--mono-duration) var(--mono-ease),\r\n border-color var(--mono-duration) var(--mono-ease);\r\n}\r\n\r\n[mono-sidebar][mono-contained] [mono-panel] {\r\n position: absolute;\r\n}\r\n\r\n/* `contained` scopes the sidebar to its own box, so the page-level z ladder is wrong\r\n for it: at 50 the panel outranked site chrome and painted OVER a sticky header while\r\n the container scrolled past it (VitePress's navbar is z 30). Re-resolving the private\r\n var with a LOCAL default keeps the panel above its own scrim and nothing else; an\r\n explicit --mono-sidebar-z still wins. Not `isolation: isolate` — a stacking context\r\n here would trap a fixed overlay (a modal or drawer opened from inside the sidebar)\r\n in the container, which is the trap DemoPreview.vue's stage comment records. */\r\n[mono-sidebar][mono-contained] {\r\n --_mono-sidebar-z: var(--mono-sidebar-z, 2);\r\n}\r\n\r\n/* Location anchor */\r\n[mono-sidebar][mono-location=\"left\"] [mono-panel] {\r\n left: 0;\r\n}\r\n\r\n[mono-sidebar][mono-location=\"right\"] [mono-panel] {\r\n right: 0;\r\n}\r\n\r\n/* ─────── VARIANT ─────── */\r\n[mono-sidebar][mono-variant=\"elevated\"][mono-location=\"left\"] [mono-panel] {\r\n box-shadow: var(--_mono-sidebar-shadow);\r\n}\r\n\r\n[mono-sidebar][mono-variant=\"elevated\"][mono-location=\"right\"] [mono-panel] {\r\n box-shadow: -4px 0 24px color-mix(in oklab, var(--_mono-sidebar-accent) 8%, transparent);\r\n}\r\n\r\n[mono-sidebar][mono-variant=\"flat\"] [mono-panel] {\r\n box-shadow: none;\r\n}\r\n\r\n[mono-sidebar][mono-variant=\"outlined\"][mono-location=\"left\"] [mono-panel] {\r\n box-shadow: none;\r\n border-right: 1px solid var(--_mono-sidebar-border);\r\n}\r\n\r\n[mono-sidebar][mono-variant=\"outlined\"][mono-location=\"right\"] [mono-panel] {\r\n box-shadow: none;\r\n border-left: 1px solid var(--_mono-sidebar-border);\r\n}\r\n\r\n/* ─────── EFFECTIVE MODE: PERMANENT ─────── */\r\n/* Set --sidebar-current-width on the ROOT (not the panel) so the rail toggle\r\n sibling can read it for its left/right offset. CSS variables only cascade\r\n downward — putting the override on a sibling doesn't help the toggle. */\r\n[mono-sidebar][mono-effective=\"permanent\"] {\r\n --_mono-sidebar-current-width: var(--_mono-sidebar-width);\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"permanent\"] [mono-panel] {\r\n visibility: visible;\r\n transform: none;\r\n}\r\n\r\n/* ─────── EFFECTIVE MODE: RAIL ─────── */\r\n[mono-sidebar][mono-effective=\"rail\"] {\r\n --_mono-sidebar-current-width: var(--_mono-sidebar-rail-width);\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"rail\"] [mono-panel] {\r\n visibility: visible;\r\n transform: none;\r\n}\r\n\r\n/* In rail mode, when modelValue === true, expand to full width. */\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] {\r\n --_mono-sidebar-current-width: var(--_mono-sidebar-width);\r\n}\r\n\r\n/* expand-on-hover only applies when rail is collapsed (not user-toggled open).\r\n Hover is on the root so both panel and toggle pick up the new width. */\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:not([mono-open]):hover {\r\n --_mono-sidebar-current-width: var(--_mono-sidebar-width);\r\n}\r\n\r\n/* ─────── EFFECTIVE MODE: TEMPORARY ─────── */\r\n[mono-sidebar][mono-effective=\"temporary\"] {\r\n --_mono-sidebar-current-width: var(--_mono-sidebar-width);\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"temporary\"] [mono-panel] {\r\n visibility: hidden;\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"temporary\"][mono-location=\"left\"] [mono-panel] {\r\n transform: translateX(-100%);\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"temporary\"][mono-location=\"right\"] [mono-panel] {\r\n transform: translateX(100%);\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"temporary\"][mono-open] [mono-panel] {\r\n visibility: visible;\r\n transform: translateX(0);\r\n transition:\r\n width 0.22s cubic-bezier(0.4, 0, 0.2, 1),\r\n transform 0.26s cubic-bezier(0.4, 0, 0.2, 1),\r\n visibility 0s linear 0s,\r\n background-color var(--mono-duration) var(--mono-ease),\r\n box-shadow var(--mono-duration) var(--mono-ease),\r\n border-color var(--mono-duration) var(--mono-ease);\r\n}\r\n\r\n/* ─────── SCRIM (temporary mode only) ─────── */\r\n:where([mono-sidebar]) [mono-scrim] {\r\n position: fixed;\r\n inset: 0;\r\n z-index: calc(var(--_mono-sidebar-z) - 1);\r\n background: var(--_mono-sidebar-scrim-bg);\r\n opacity: 0;\r\n pointer-events: none;\r\n cursor: pointer;\r\n transition: opacity 0.24s ease;\r\n display: none;\r\n}\r\n\r\n[mono-sidebar][mono-contained] [mono-scrim] {\r\n position: absolute;\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"temporary\"]:not([mono-no-scrim]) [mono-scrim] {\r\n display: block;\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"temporary\"][mono-open] [mono-scrim] {\r\n opacity: 1;\r\n pointer-events: auto;\r\n}\r\n\r\n/* ─────── HEADER / BODY / FOOTER ─────── */\r\n:where([mono-sidebar]) :where([mono-topbar]) > [mono-header] {\r\n flex-shrink: 0;\r\n padding: var(--_mono-sidebar-pad-y) var(--_mono-sidebar-pad-x);\r\n display: flex;\r\n align-items: center;\r\n gap: 0.6rem;\r\n min-height: 0;\r\n}\r\n\r\n:where([mono-sidebar]) :where([mono-topbar]) > [mono-header]:empty {\r\n display: none;\r\n}\r\n\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-body] {\r\n flex: 1;\r\n min-height: 0;\r\n overflow-y: auto;\r\n overflow-x: hidden;\r\n padding: var(--_mono-sidebar-pad-y) var(--_mono-sidebar-pad-x);\r\n}\r\n\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-body]:empty {\r\n padding: 0;\r\n}\r\n\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-footer] {\r\n flex-shrink: 0;\r\n padding: var(--_mono-sidebar-pad-y) var(--_mono-sidebar-pad-x);\r\n border-top: 1px solid var(--_mono-sidebar-border-lite);\r\n}\r\n\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-footer]:empty {\r\n display: none;\r\n}\r\n\r\n/* ─────── TOP BAR (header + rail share one row, justify-between) ─────── */\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-topbar] {\r\n flex-shrink: 0;\r\n display: flex;\r\n align-items: stretch;\r\n min-width: 0;\r\n border-bottom: 1px solid var(--_mono-sidebar-border-lite);\r\n}\r\n\r\n/* Hide the border when the topbar would be visually empty\r\n (header empty AND no rail bar rendered at all). */\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-topbar]:not(:has(> [mono-rail])):has(> [mono-header]:empty) {\r\n border-bottom: none;\r\n}\r\n\r\n/* For right-located sidebar, mirror the row so the rail toggle sits on the\r\n viewport-edge side and the header sits on the interior side. */\r\n[mono-sidebar][mono-location=\"right\"] :where([mono-panel]) > [mono-topbar] {\r\n flex-direction: row-reverse;\r\n}\r\n\r\n/* When the row contains both header and rail, header takes the available\r\n space and rail hugs its content — the visual \"justify-between\" effect. */\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-topbar] > [mono-header] {\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n}\r\n\r\n:where([mono-sidebar]) :where([mono-panel]) > [mono-topbar] > [mono-rail] {\r\n flex: 0 0 auto;\r\n}\r\n\r\n/* In collapsed rail (no toggle-open, no hover-expand): show the header (so the\r\n user sees their brand/avatar) and HIDE the rail bar (chevron). The chevron\r\n only reveals when the user hovers the top row (see swap rule below). */\r\n[mono-sidebar][mono-effective=\"rail\"]:not([mono-open]) :where([mono-panel]) > [mono-topbar] > [mono-rail] {\r\n display: none;\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"rail\"]:not([mono-open]) :where([mono-panel]) > [mono-topbar] > [mono-header] {\r\n flex: 1 1 auto;\r\n}\r\n\r\n/* Collapsed rail + topbar hover (no expand-on-hover): swap — hide the header\r\n and reveal the chevron in its place. Hover scope is the whole topbar (not\r\n just the header) so the swap doesn't flicker when the cursor crosses\r\n between the header's slot content and the revealed chevron.\r\n Skipped when `expand-on-hover` is set: that path widens the panel instead\r\n and shows both header + chevron side-by-side via the rules below.\r\n Also gated on `:has(> [mono-rail])` — when the user takes over via\r\n the `rail` boolean prop the default chevron isn't rendered, so there's\r\n nothing to swap to and we should leave the header alone. */\r\n[mono-sidebar][mono-effective=\"rail\"]:not([mono-open]):not([mono-expand-on-hover]) :where([mono-panel]) > [mono-topbar]:has(> [mono-rail]):hover > [mono-header] {\r\n display: none;\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"rail\"]:not([mono-open]):not([mono-expand-on-hover]) :where([mono-panel]) > [mono-topbar]:has(> [mono-rail]):hover > [mono-rail] {\r\n display: flex;\r\n flex: 1 1 auto;\r\n}\r\n\r\n/* Toggled-open or hover-expanded via expand-on-hover: header keeps its space,\r\n rail hugs its content — both visible side-by-side. */\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] :where([mono-panel]) > [mono-topbar] > [mono-rail],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover :where([mono-panel]) > [mono-topbar] > [mono-rail] {\r\n display: flex;\r\n flex: 0 0 auto;\r\n}\r\n\r\n/* ─────── RAIL BAR (slot host for the chevron / user content) ─────── */\r\n:where([mono-sidebar]) [mono-rail] {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.4rem;\r\n min-height: 44px;\r\n padding: var(--_mono-sidebar-pad-y) var(--_mono-sidebar-pad-x);\r\n}\r\n\r\n/* Collapsed rail: zero horizontal padding, center the chevron inside the\r\n full-width rail bar (header is hidden so the bar takes the whole panel). */\r\n[mono-sidebar][mono-effective=\"rail\"]:not([mono-open]) [mono-rail] {\r\n padding-left: 0;\r\n padding-right: 0;\r\n justify-content: center;\r\n}\r\n\r\n/* Expanded (toggled-open or hover-expanded): the rail hugs its content and\r\n sits at the trailing edge of the row, so its inside padding only needs to\r\n provide the gap between the chevron and the header. */\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] [mono-rail],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover [mono-rail] {\r\n padding-left: var(--_mono-sidebar-pad-x);\r\n padding-right: var(--_mono-sidebar-pad-x);\r\n justify-content: center;\r\n}\r\n\r\n/* ─────── DEFAULT RAIL TOGGLE BUTTON ─────── */\r\n:where([mono-sidebar]) [mono-rail-toggle] {\r\n width: 28px;\r\n height: 28px;\r\n border-radius: var(--mono-sidebar-rail-toggle-radius, var(--mono-radius-md));\r\n border: 1px solid var(--_mono-sidebar-border);\r\n background: var(--_mono-sidebar-surface);\r\n color: var(--_mono-sidebar-text-soft);\r\n cursor: pointer;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex-shrink: 0;\r\n transition:\r\n background-color 0.14s ease,\r\n color 0.14s ease,\r\n border-color 0.14s ease;\r\n}\r\n\r\n:where([mono-sidebar]) [mono-rail-toggle]:hover {\r\n background: var(--_mono-sidebar-surface);\r\n color: var(--_mono-sidebar-accent);\r\n border-color: var(--_mono-sidebar-accent);\r\n}\r\n\r\n/* On a painted panel the accent IS the surface behind this button, so the default\r\n hover above would tint the glyph and its border into the background. Keep the\r\n on-accent ink and let only the chip deepen. */\r\n[mono-sidebar][mono-color=\"primary\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"secondary\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"success\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"danger\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"warning\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"info\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"teal\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"purple\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"neutral\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"dark\"] [mono-rail-toggle]:hover,\r\n[mono-sidebar][mono-color=\"custom\"] [mono-rail-toggle]:hover {\r\n background: color-mix(in oklab, var(--_mono-sidebar-on-accent) 28%, transparent);\r\n color: var(--_mono-sidebar-on-accent);\r\n border-color: color-mix(in oklab, var(--_mono-sidebar-on-accent) 38%, transparent);\r\n}\r\n\r\n:where([mono-sidebar]) [mono-rail-toggle] > .mono-icon {\r\n display: block;\r\n width: var(--mono-icon-md);\r\n height: var(--mono-icon-md);\r\n transition: transform var(--mono-duration) var(--mono-ease);\r\n}\r\n\r\n/* Arrow direction (set directly on the icon via per-state rules so transitions\r\n fire cleanly on every state flip — `var()`-driven transforms have known\r\n quirks where some browsers skip the transition):\r\n - location-left, collapsed → points right (►) to invite expansion\r\n - location-left, expanded → points left (◄) to invite collapse\r\n - location-right is mirrored\r\n \"Expanded\" covers BOTH the toggled-open state (`[mono-open]`, set after click)\r\n AND the hover-expanded state (`[mono-expand-on-hover]:hover`). */\r\n\r\n/* Default for location-right: mirror the icon so the chevron faces the panel. */\r\n[mono-sidebar][mono-location=\"right\"] [mono-rail-toggle] > .mono-icon {\r\n transform: scaleX(-1);\r\n}\r\n\r\n/* Toggled open (after click): rotate to point inward. Active in any mode. */\r\n[mono-sidebar][mono-location=\"left\"][mono-open] [mono-rail-toggle] > .mono-icon {\r\n transform: rotate(180deg);\r\n}\r\n\r\n[mono-sidebar][mono-location=\"right\"][mono-open] [mono-rail-toggle] > .mono-icon {\r\n transform: scaleX(-1) rotate(180deg);\r\n}\r\n\r\n/* Hover-expanded via expand-on-hover (panel widens on hover, no click yet).\r\n Higher specificity than the [mono-open] rule, so when both apply (cursor still\r\n over the panel after a click) the result is identical. */\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover][mono-location=\"left\"]:hover [mono-rail-toggle] > .mono-icon {\r\n transform: rotate(180deg);\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover][mono-location=\"right\"]:hover [mono-rail-toggle] > .mono-icon {\r\n transform: scaleX(-1) rotate(180deg);\r\n}\r\n\r\n/* Opt-in label convention (brand text, footer labels, …): display is read from an\r\n inherited custom property, so the rail-collapse below can hide it across the\r\n shadow boundary (a shadow-scoped descendant selector can't reach a slotted\r\n light-DOM label). Unset → the element's natural display. Mirrors the menu's\r\n `display: var(--mono-menu-label-display, <natural>)` contract. */\r\n.mono-sidebar-label {\r\n display: var(--mono-sidebar-label-display, revert);\r\n}\r\n\r\n/* ─────── RAIL: COLLAPSE MENU + LABELS ─────── */\r\n/* When the rail is collapsed (not toggled-open and not hover-expanded), the\r\n panel is too narrow to fit icon + text — for both menu rows and header/footer\r\n slot content. We:\r\n 1. Hide text-bearing parts of any descendant `<mono-menu>` and shrink each\r\n action to a centered icon-only pill (so the active-state pill hugs the\r\n icon instead of stretching across the full panel).\r\n 2. Zero the header / body / footer horizontal padding so their centered\r\n content lines up on the panel's center column, keeping the header\r\n avatar visually flush with the menu icons below it.\r\n 3. Hide any element opted into the `.mono-sidebar-label` convention —\r\n the typical wrapper for brand text, footer labels, etc. that should\r\n collapse alongside the menu titles.\r\n Every rule unwinds under `[mono-open]` or `[mono-expand-on-hover]:hover`, so labels\r\n reappear in lockstep with the panel widening. */\r\n\r\n/* 1 — the menu interior collapses to icons: text-bearing parts are hidden, the\r\n tree loses its indent and guide, and a group folds shut visually even while\r\n the menu's own `_openGroups` state still has it marked open — the state\r\n survives the round-trip and reappears the moment the panel widens. */\r\n/* Rail-collapse, entirely through inherited custom properties. Set on the body\r\n (the menu's flattened parent) they cross the shadow boundary into a slotted\r\n shadow <mono-menu>, whose rows no descendant selector here can reach; menu.css\r\n consumes every one of them. Restored to `initial` on open / hover-expand\r\n below, so `var(--x, fallback)` falls back to each element's natural value.\r\n Pure CSS → works on the server (no-JS) and syncs with `:hover`.\r\n\r\n This used to run alongside a parallel `.mono-menu-*` descendant path that only\r\n the light build could see, because only it still emits the old classes. Two\r\n paths meant three builds: light centred its rows and closed the tree guide,\r\n shadow and hand-written markup did neither. */\r\n[mono-sidebar][mono-effective=\"rail\"] :where([mono-panel]) > [mono-body] {\r\n --mono-menu-label-display: none;\r\n --mono-menu-row-display: flex;\r\n --mono-menu-row-justify: center;\r\n --mono-menu-action-width: auto;\r\n --mono-menu-action-justify: center;\r\n --mono-menu-action-gap: 0;\r\n --mono-menu-group-children-display: none;\r\n /* a collapsed rail has no room for the tree's indent or its guide */\r\n --mono-menu-indent: 0px;\r\n --mono-menu-guide-width: 0px;\r\n --mono-menu-guide-offset: 0px;\r\n}\r\n\r\n/* 2 — header / body / footer drop horizontal padding and center their content */\r\n[mono-sidebar][mono-effective=\"rail\"] :where([mono-topbar]) > [mono-header],\r\n[mono-sidebar][mono-effective=\"rail\"] :where([mono-panel]) > [mono-footer] {\r\n padding-left: 0;\r\n padding-right: 0;\r\n justify-content: center;\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"rail\"] :where([mono-panel]) > [mono-body] {\r\n padding-left: 0;\r\n padding-right: 0;\r\n}\r\n\r\n/* 3 — opt-in label convention for slot content (brand text, footer labels, …).\r\n Display is driven by an inherited custom property so the rail-collapse reaches\r\n slotted labels ACROSS the shadow boundary — the same contract the menu uses\r\n (see `--mono-menu-label-display`). Set on the rail root so labels in ANY region\r\n (header / body / footer) inherit it; the label consumes it via the base rule\r\n below (`display: var(--mono-sidebar-label-display, revert)`). */\r\n[mono-sidebar][mono-effective=\"rail\"] {\r\n --mono-sidebar-label-display: none;\r\n}\r\n\r\n/* ─── Restore on toggled-open or hover-expanded ─── */\r\n/* When the rail expands, defer to the data-open attribute — open groups\r\n reveal their children, closed groups stay closed. */\r\n/* Restore the cross-shadow rail-collapse vars on toggle-open / hover-expand:\r\n `initial` makes the menu's `var(--x, fallback)` resolve to each element's\r\n natural value, re-expanding the slotted shadow <mono-menu> in lockstep. */\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] :where([mono-panel]) > [mono-body],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover :where([mono-panel]) > [mono-body] {\r\n --mono-menu-label-display: initial;\r\n --mono-menu-row-display: initial;\r\n --mono-menu-row-justify: initial;\r\n --mono-menu-action-width: initial;\r\n --mono-menu-action-justify: initial;\r\n --mono-menu-action-gap: initial;\r\n --mono-menu-group-children-display: initial;\r\n --mono-menu-indent: initial;\r\n --mono-menu-guide-width: initial;\r\n --mono-menu-guide-offset: initial;\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] :where([mono-topbar]) > [mono-header],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] :where([mono-panel]) > [mono-body],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] :where([mono-panel]) > [mono-footer],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover :where([mono-topbar]) > [mono-header],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover :where([mono-panel]) > [mono-body],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover :where([mono-panel]) > [mono-footer] {\r\n padding-left: var(--_mono-sidebar-pad-x);\r\n padding-right: var(--_mono-sidebar-pad-x);\r\n}\r\n\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] :where([mono-topbar]) > [mono-header],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open] :where([mono-panel]) > [mono-footer],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover :where([mono-topbar]) > [mono-header],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover :where([mono-panel]) > [mono-footer] {\r\n justify-content: flex-start;\r\n}\r\n\r\n/* Restore the label on toggle-open / hover-expand: `initial` makes the custom\r\n property guaranteed-invalid, so the label's `var(--x, revert)` falls back to\r\n its natural display — re-expanding slotted labels (light + shadow) in lockstep\r\n with the menu (mirrors the `--mono-menu-*` restore above). */\r\n[mono-sidebar][mono-effective=\"rail\"][mono-open],\r\n[mono-sidebar][mono-effective=\"rail\"][mono-expand-on-hover]:hover {\r\n --mono-sidebar-label-display: initial;\r\n}\r\n\r\n/* ─────── REDUCED MOTION ─────── */\r\n@media (prefers-reduced-motion: reduce) {\r\n :where([mono-sidebar]) [mono-panel],\r\n :where([mono-sidebar]) [mono-scrim],\r\n :where([mono-sidebar]) [mono-rail-toggle] {\r\n transition: none;\r\n }\r\n}\r\n";
|
|
588
|
+
|
|
583
589
|
//#endregion
|
|
584
590
|
//#region src/components/sidebar/mono-sidebar.ts
|
|
585
|
-
|
|
591
|
+
let MonoSidebar = class MonoSidebar extends MonoSidebarCore(LitElement) {
|
|
586
592
|
constructor(..._args) {
|
|
587
593
|
super(..._args);
|
|
588
594
|
this._slotsCaptured = false;
|
|
@@ -591,7 +597,7 @@ var MonoSidebar = class MonoSidebar extends MonoSidebarCore(LitElement) {
|
|
|
591
597
|
this._slotFooter = [];
|
|
592
598
|
}
|
|
593
599
|
static {
|
|
594
|
-
this.styles = [unsafeCSS(
|
|
600
|
+
this.styles = [unsafeCSS(sidebar_css_raw_default)];
|
|
595
601
|
}
|
|
596
602
|
createRenderRoot() {
|
|
597
603
|
return this;
|
|
@@ -633,7 +639,7 @@ var MonoSidebar = class MonoSidebar extends MonoSidebarCore(LitElement) {
|
|
|
633
639
|
toRemove.add(node);
|
|
634
640
|
}
|
|
635
641
|
for (const node of toRemove) if (node.parentNode === this) this.removeChild(node);
|
|
636
|
-
guardHostTextContent(this, new Map([
|
|
642
|
+
guardHostTextContent(this, /* @__PURE__ */ new Map([
|
|
637
643
|
["header", this._slotHeader],
|
|
638
644
|
["body", this._slotBody],
|
|
639
645
|
["footer", this._slotFooter]
|
|
@@ -655,5 +661,6 @@ var MonoSidebar = class MonoSidebar extends MonoSidebarCore(LitElement) {
|
|
|
655
661
|
}
|
|
656
662
|
};
|
|
657
663
|
MonoSidebar = __decorate([customElement("mono-sidebar")], MonoSidebar);
|
|
664
|
+
|
|
658
665
|
//#endregion
|
|
659
|
-
export { MonoSidebar, SIDEBAR_AUTO_BREAKPOINT, generateSidebarRootClasses, isAutoTemporary, resolveMode, validateSidebarProps };
|
|
666
|
+
export { MonoSidebar, SIDEBAR_AUTO_BREAKPOINT, generateSidebarRootClasses, isAutoTemporary, resolveMode, validateSidebarProps };
|