@m3e/web 2.1.3 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dist/all.js +2916 -391
- package/dist/all.js.map +1 -1
- package/dist/all.min.js +77 -41
- package/dist/all.min.js.map +1 -1
- package/dist/app-bar.js +14 -7
- package/dist/app-bar.js.map +1 -1
- package/dist/app-bar.min.js +1 -1
- package/dist/app-bar.min.js.map +1 -1
- package/dist/autocomplete.js +59 -23
- package/dist/autocomplete.js.map +1 -1
- package/dist/autocomplete.min.js +1 -1
- package/dist/autocomplete.min.js.map +1 -1
- package/dist/bottom-sheet.js +8 -27
- package/dist/bottom-sheet.js.map +1 -1
- package/dist/bottom-sheet.min.js +1 -1
- package/dist/bottom-sheet.min.js.map +1 -1
- package/dist/calendar.js +1082 -0
- package/dist/calendar.js.map +1 -0
- package/dist/calendar.min.js +43 -0
- package/dist/calendar.min.js.map +1 -0
- package/dist/chips.js +2 -6
- package/dist/chips.js.map +1 -1
- package/dist/chips.min.js +1 -1
- package/dist/chips.min.js.map +1 -1
- package/dist/core-a11y.js +23 -9
- package/dist/core-a11y.js.map +1 -1
- package/dist/core-a11y.min.js +4 -4
- package/dist/core-a11y.min.js.map +1 -1
- package/dist/core-anchoring.js +135 -15
- package/dist/core-anchoring.js.map +1 -1
- package/dist/core-anchoring.min.js +1 -1
- package/dist/core-anchoring.min.js.map +1 -1
- package/dist/core.js +101 -1
- package/dist/core.js.map +1 -1
- package/dist/core.min.js +1 -1
- package/dist/core.min.js.map +1 -1
- package/dist/css-custom-data.json +1146 -646
- package/dist/custom-elements.json +31433 -26898
- package/dist/datepicker.js +573 -0
- package/dist/datepicker.js.map +1 -0
- package/dist/datepicker.min.js +7 -0
- package/dist/datepicker.min.js.map +1 -0
- package/dist/drawer-container.js +10 -4
- package/dist/drawer-container.js.map +1 -1
- package/dist/drawer-container.min.js +1 -1
- package/dist/drawer-container.min.js.map +1 -1
- package/dist/fab-menu.js +1 -1
- package/dist/fab-menu.js.map +1 -1
- package/dist/fab-menu.min.js +1 -1
- package/dist/fab-menu.min.js.map +1 -1
- package/dist/form-field.js +2 -6
- package/dist/form-field.js.map +1 -1
- package/dist/form-field.min.js +3 -3
- package/dist/form-field.min.js.map +1 -1
- package/dist/html-custom-data.json +553 -187
- package/dist/menu.js +3 -7
- package/dist/menu.js.map +1 -1
- package/dist/menu.min.js +1 -1
- package/dist/menu.min.js.map +1 -1
- package/dist/nav-bar.js +17 -7
- package/dist/nav-bar.js.map +1 -1
- package/dist/nav-bar.min.js +1 -1
- package/dist/nav-bar.min.js.map +1 -1
- package/dist/nav-menu.js +3 -11
- package/dist/nav-menu.js.map +1 -1
- package/dist/nav-menu.min.js +1 -1
- package/dist/nav-menu.min.js.map +1 -1
- package/dist/nav-rail.js +2 -6
- package/dist/nav-rail.js.map +1 -1
- package/dist/nav-rail.min.js +1 -1
- package/dist/nav-rail.min.js.map +1 -1
- package/dist/option.js +4 -8
- package/dist/option.js.map +1 -1
- package/dist/option.min.js +1 -1
- package/dist/option.min.js.map +1 -1
- package/dist/paginator.js.map +1 -1
- package/dist/paginator.min.js.map +1 -1
- package/dist/search.js +821 -0
- package/dist/search.js.map +1 -0
- package/dist/search.min.js +7 -0
- package/dist/search.min.js.map +1 -0
- package/dist/segmented-button.js +2 -2
- package/dist/segmented-button.js.map +1 -1
- package/dist/segmented-button.min.js.map +1 -1
- package/dist/select.js +4 -15
- package/dist/select.js.map +1 -1
- package/dist/select.min.js +1 -1
- package/dist/select.min.js.map +1 -1
- package/dist/snackbar.js +2 -6
- package/dist/snackbar.js.map +1 -1
- package/dist/snackbar.min.js +1 -1
- package/dist/snackbar.min.js.map +1 -1
- package/dist/split-button.js +1 -1
- package/dist/split-button.js.map +1 -1
- package/dist/split-button.min.js.map +1 -1
- package/dist/src/all.d.ts +3 -0
- package/dist/src/all.d.ts.map +1 -1
- package/dist/src/app-bar/AppBarElement.d.ts +6 -4
- package/dist/src/app-bar/AppBarElement.d.ts.map +1 -1
- package/dist/src/autocomplete/AutocompleteElement.d.ts +7 -2
- package/dist/src/autocomplete/AutocompleteElement.d.ts.map +1 -1
- package/dist/src/autocomplete/AutocompleteQueryEventDetail.d.ts +12 -0
- package/dist/src/autocomplete/AutocompleteQueryEventDetail.d.ts.map +1 -0
- package/dist/src/autocomplete/QueryEventDetail.d.ts +3 -8
- package/dist/src/autocomplete/QueryEventDetail.d.ts.map +1 -1
- package/dist/src/autocomplete/index.d.ts +1 -0
- package/dist/src/autocomplete/index.d.ts.map +1 -1
- package/dist/src/bottom-sheet/BottomSheetElement.d.ts.map +1 -1
- package/dist/src/calendar/CalendarElement.d.ts +213 -0
- package/dist/src/calendar/CalendarElement.d.ts.map +1 -0
- package/dist/src/calendar/CalendarView.d.ts +3 -0
- package/dist/src/calendar/CalendarView.d.ts.map +1 -0
- package/dist/src/calendar/CalendarViewElementBase.d.ts +28 -0
- package/dist/src/calendar/CalendarViewElementBase.d.ts.map +1 -0
- package/dist/src/calendar/MonthViewElement.d.ts +36 -0
- package/dist/src/calendar/MonthViewElement.d.ts.map +1 -0
- package/dist/src/calendar/MultiYearViewElement.d.ts +27 -0
- package/dist/src/calendar/MultiYearViewElement.d.ts.map +1 -0
- package/dist/src/calendar/YearViewElement.d.ts +27 -0
- package/dist/src/calendar/YearViewElement.d.ts.map +1 -0
- package/dist/src/calendar/index.d.ts +7 -0
- package/dist/src/calendar/index.d.ts.map +1 -0
- package/dist/src/calendar/utils.d.ts +24 -0
- package/dist/src/calendar/utils.d.ts.map +1 -0
- package/dist/src/chips/InputChipSetElement.d.ts.map +1 -1
- package/dist/src/core/a11y/FocusTrapElement.d.ts.map +1 -1
- package/dist/src/core/a11y/InteractivityChecker.d.ts.map +1 -1
- package/dist/src/core/anchoring/AnchorOptions.d.ts +1 -1
- package/dist/src/core/anchoring/AnchorOptions.d.ts.map +1 -1
- package/dist/src/core/anchoring/FloatingPanelElement.d.ts +18 -3
- package/dist/src/core/anchoring/FloatingPanelElement.d.ts.map +1 -1
- package/dist/src/core/anchoring/positionAnchor.d.ts.map +1 -1
- package/dist/src/core/shared/controllers/InertController.d.ts +19 -0
- package/dist/src/core/shared/controllers/InertController.d.ts.map +1 -0
- package/dist/src/core/shared/controllers/index.d.ts +1 -0
- package/dist/src/core/shared/controllers/index.d.ts.map +1 -1
- package/dist/src/core/shared/converters/dateConverter.d.ts +4 -0
- package/dist/src/core/shared/converters/dateConverter.d.ts.map +1 -0
- package/dist/src/core/shared/converters/index.d.ts +1 -0
- package/dist/src/core/shared/converters/index.d.ts.map +1 -1
- package/dist/src/core/shared/utils/index.d.ts +1 -0
- package/dist/src/core/shared/utils/index.d.ts.map +1 -1
- package/dist/src/core/shared/utils/registerStyleSheet.d.ts +7 -0
- package/dist/src/core/shared/utils/registerStyleSheet.d.ts.map +1 -0
- package/dist/src/datepicker/DatepickerElement.d.ts +239 -0
- package/dist/src/datepicker/DatepickerElement.d.ts.map +1 -0
- package/dist/src/datepicker/DatepickerToggleElement.d.ts +21 -0
- package/dist/src/datepicker/DatepickerToggleElement.d.ts.map +1 -0
- package/dist/src/datepicker/DatepickerVariant.d.ts +3 -0
- package/dist/src/datepicker/DatepickerVariant.d.ts.map +1 -0
- package/dist/src/datepicker/index.d.ts +4 -0
- package/dist/src/datepicker/index.d.ts.map +1 -0
- package/dist/src/drawer-container/DrawerContainerElement.d.ts +2 -2
- package/dist/src/drawer-container/DrawerContainerElement.d.ts.map +1 -1
- package/dist/src/form-field/FormFieldElement.d.ts.map +1 -1
- package/dist/src/menu/MenuElement.d.ts.map +1 -1
- package/dist/src/nav-bar/NavBarElement.d.ts +3 -1
- package/dist/src/nav-bar/NavBarElement.d.ts.map +1 -1
- package/dist/src/nav-menu/NavMenuElement.d.ts.map +1 -1
- package/dist/src/nav-menu/NavMenuItemElement.d.ts.map +1 -1
- package/dist/src/nav-rail/NavRailElement.d.ts.map +1 -1
- package/dist/src/option/OptionPanelElement.d.ts.map +1 -1
- package/dist/src/paginator/PageEventDetail.d.ts +6 -11
- package/dist/src/paginator/PageEventDetail.d.ts.map +1 -1
- package/dist/src/paginator/PaginatorElement.d.ts +2 -2
- package/dist/src/paginator/PaginatorElement.d.ts.map +1 -1
- package/dist/src/paginator/PaginatorPageEventDetail.d.ts +12 -0
- package/dist/src/paginator/PaginatorPageEventDetail.d.ts.map +1 -0
- package/dist/src/paginator/index.d.ts +1 -0
- package/dist/src/paginator/index.d.ts.map +1 -1
- package/dist/src/search/SearchBarElement.d.ts +92 -0
- package/dist/src/search/SearchBarElement.d.ts.map +1 -0
- package/dist/src/search/SearchViewElement.d.ts +150 -0
- package/dist/src/search/SearchViewElement.d.ts.map +1 -0
- package/dist/src/search/SearchViewMode.d.ts +3 -0
- package/dist/src/search/SearchViewMode.d.ts.map +1 -0
- package/dist/src/search/SearchViewQueryEventDetail.d.ts +12 -0
- package/dist/src/search/SearchViewQueryEventDetail.d.ts.map +1 -0
- package/dist/src/search/index.d.ts +5 -0
- package/dist/src/search/index.d.ts.map +1 -0
- package/dist/src/search/styles/SearchBarStyle.d.ts +12 -0
- package/dist/src/search/styles/SearchBarStyle.d.ts.map +1 -0
- package/dist/src/search/styles/SearchBarToken.d.ts +27 -0
- package/dist/src/search/styles/SearchBarToken.d.ts.map +1 -0
- package/dist/src/search/styles/SearchViewStyle.d.ts +12 -0
- package/dist/src/search/styles/SearchViewStyle.d.ts.map +1 -0
- package/dist/src/search/styles/SearchViewToken.d.ts +26 -0
- package/dist/src/search/styles/SearchViewToken.d.ts.map +1 -0
- package/dist/src/search/styles/index.d.ts +3 -0
- package/dist/src/search/styles/index.d.ts.map +1 -0
- package/dist/src/segmented-button/ButtonSegmentElement.d.ts +2 -2
- package/dist/src/select/SelectElement.d.ts.map +1 -1
- package/dist/src/snackbar/SnackbarElement.d.ts.map +1 -1
- package/dist/src/split-button/SplitButtonElement.d.ts +1 -1
- package/dist/src/stepper/StepperElement.d.ts +3 -1
- package/dist/src/stepper/StepperElement.d.ts.map +1 -1
- package/dist/src/switch/SwitchElement.d.ts +2 -2
- package/dist/stepper.js +18 -12
- package/dist/stepper.js.map +1 -1
- package/dist/stepper.min.js +1 -1
- package/dist/stepper.min.js.map +1 -1
- package/dist/switch.js +2 -2
- package/dist/switch.js.map +1 -1
- package/dist/switch.min.js.map +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/tooltip.js.map +1 -1
- package/dist/tooltip.min.js +1 -1
- package/dist/tooltip.min.js.map +1 -1
- package/package.json +16 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-button.min.js","sources":["../../src/split-button/SplitButtonElement.ts"],"sourcesContent":["import { css, CSSResultGroup, html, LitElement, PropertyValues } from \"lit\";\r\nimport { property, query } from \"lit/decorators.js\";\r\n\r\nimport { customElement, DesignToken, HoverController, PressedController, Role } from \"@m3e/web/core\";\r\nimport { M3eButtonElement, ButtonSize } from \"@m3e/web/button\";\r\nimport { M3eIconButtonElement } from \"@m3e/web/icon-button\";\r\n\r\nimport \"@m3e/web/button-group\";\r\n\r\nimport { SplitButtonVariant } from \"./SplitButtonVariant\";\r\n\r\n/**\r\n * A button used to show an action with a menu of related actions.\r\n *\r\n * @description\r\n * The `m3e-split-button` component presents a primary action alongside a menu of related actions,\r\n * uniting two buttons in a single expressive surface. Designed for Material 3, it supports `elevated`,\r\n * `filled`, `tonal`, and `outlined` variants, and adapts to all button sizes. The leading button triggers\r\n * the main action, while the trailing icon button reveals additional options, enabling efficient workflows\r\n * and clear visual hierarchy. The split button ensures accessible, adaptive, and visually harmonious\r\n * interactions, reflecting Material 3’s principles of clarity, flexibility, and expressive design.\r\n *\r\n * @example\r\n * The following example illustrates use of the `m3e-split-button` to combine the `m3e-button`,\r\n * `m3e-icon-button`, and `m3e-menu` components into a split button.\r\n *\r\n * ```html\r\n * <m3e-split-button>\r\n * <m3e-button slot=\"leading-button\">\r\n * <m3e-icon slot=\"icon\" name=\"edit\"></m3e-icon>Edit\r\n * </m3e-button>\r\n * <m3e-icon-button slot=\"trailing-button\">\r\n * <m3e-icon name=\"keyboard_arrow_down\"></m3e-icon>\r\n * <m3e-menu-trigger for=\"menu1\"></m3e-menu-trigger>\r\n * </m3e-icon-button>\r\n * ```\r\n *\r\n * @tag m3e-split-button\r\n *\r\n * @slot leading-button - The leading button used to perform the primary action.\r\n * @slot trailing-button - The trailing icon button used to open a menu of related actions.\r\n *\r\n * @attr variant - The appearance variant of the button.\r\n * @attr size - The size of the button.\r\n *\r\n * @cssprop --m3e-split-button-extra-small-trailing-button-unselected-leading-space - Leading space for the trailing button (extra-small, unselected).\r\n * @cssprop --m3e-split-button-extra-small-trailing-button-unselected-trailing-space - Trailing space for the trailing button (extra-small, unselected).\r\n * @cssprop --m3e-split-button-small-trailing-button-unselected-leading-space - Leading space for the trailing button (small, unselected).\r\n * @cssprop --m3e-split-button-small-trailing-button-unselected-trailing-space - Trailing space for the trailing button (small, unselected).\r\n * @cssprop --m3e-split-button-medium-trailing-button-unselected-leading-space - Leading space for the trailing button (medium, unselected).\r\n * @cssprop --m3e-split-button-medium-trailing-button-unselected-trailing-space - Trailing space for the trailing button (medium, unselected).\r\n * @cssprop --m3e-split-button-large-trailing-button-unselected-leading-space - Leading space for the trailing button (large, unselected).\r\n * @cssprop --m3e-split-button-large-trailing-button-unselected-trailing-space - Trailing space for the trailing button (large, unselected).\r\n * @cssprop --m3e-split-button-extra-large-trailing-button-unselected-leading-space - Leading space for the trailing button (extra-large, unselected).\r\n * @cssprop --m3e-split-button-extra-large-trailing-button-unselected-trailing-space - Trailing space for the trailing button (extra-large, unselected).\r\n * @cssprop --m3e-split-button-extra-small-trailing-button-selected-leading-space - Leading space for the trailing button (extra-small, selected).\r\n * @cssprop --m3e-split-button-extra-small-trailing-button-selected-trailing-space - Trailing space for the trailing button (extra-small, selected).\r\n * @cssprop --m3e-split-button-small-trailing-button-selected-leading-space - Leading space for the trailing button (small, selected).\r\n * @cssprop --m3e-split-button-small-trailing-button-selected-trailing-space - Trailing space for the trailing button (small, selected).\r\n * @cssprop --m3e-split-button-medium-trailing-button-selected-leading-space - Leading space for the trailing button (medium, selected).\r\n * @cssprop --m3e-split-button-medium-trailing-button-selected-trailing-space - Trailing space for the trailing button (medium, selected).\r\n * @cssprop --m3e-split-button-large-trailing-button-selected-leading-space - Leading space for the trailing button (large, selected).\r\n * @cssprop --m3e-split-button-large-trailing-button-selected-trailing-space - Trailing space for the trailing button (large, selected).\r\n * @cssprop --m3e-split-button-extra-large-trailing-button-selected-leading-space - Leading space for the trailing button (extra-large, selected).\r\n * @cssprop --m3e-split-button-extra-large-trailing-button-selected-trailing-space - Trailing space for the trailing button (extra-large, selected).\r\n * @cssprop --m3e-split-button-extra-small-inner-corner-size - Inner corner size for the leading/trailing button (extra-small).\r\n * @cssprop --m3e-split-button-small-inner-corner-size - Inner corner size for the leading/trailing button (small).\r\n * @cssprop --m3e-split-button-medium-inner-corner-size - Inner corner size for the leading/trailing button (medium).\r\n * @cssprop --m3e-split-button-large-inner-corner-size - Inner corner size for the leading/trailing button (large).\r\n * @cssprop --m3e-split-button-extra-large-inner-corner-size - Inner corner size for the leading/trailing button (extra-large).\r\n * @cssprop --m3e-split-button-extra-small-inner-corner-hover-size - Inner corner size on hover (extra-small).\r\n * @cssprop --m3e-split-button-small-inner-corner-hover-size - Inner corner size on hover (small).\r\n * @cssprop --m3e-split-button-medium-inner-corner-hover-size - Inner corner size on hover (medium).\r\n * @cssprop --m3e-split-button-large-inner-corner-hover-size - Inner corner size on hover (large).\r\n * @cssprop --m3e-split-button-extra-large-inner-corner-hover-size - Inner corner size on hover (extra-large).\r\n * @cssprop --m3e-split-button-extra-small-inner-corner-pressed-size - Inner corner size on press (extra-small).\r\n * @cssprop --m3e-split-button-small-inner-corner-pressed-size - Inner corner size on press (small).\r\n * @cssprop --m3e-split-button-medium-inner-corner-pressed-size - Inner corner size on press (medium).\r\n * @cssprop --m3e-split-button-large-inner-corner-pressed-size - Inner corner size on press (large).\r\n * @cssprop --m3e-split-button-extra-large-inner-corner-pressed-size - Inner corner size on press (extra-large).\r\n * @cssprop --m3e-split-button-extra-small-between-spacing - Spacing between leading and trailing buttons (extra-small).\r\n * @cssprop --m3e-split-button-small-between-spacing - Spacing between leading and trailing buttons (small).\r\n * @cssprop --m3e-split-button-medium-between-spacing - Spacing between leading and trailing buttons (medium).\r\n * @cssprop --m3e-split-button-large-between-spacing - Spacing between leading and trailing buttons (large).\r\n * @cssprop --m3e-split-button-extra-large-between-spacing - Spacing between leading and trailing buttons (extra-large).\r\n */\r\n@customElement(\"m3e-split-button\")\r\nexport class M3eSplitButtonElement extends Role(LitElement, \"group\") {\r\n /** The styles of the element. */\r\n static override styles: CSSResultGroup = css`\r\n :host {\r\n display: inline-flex;\r\n vertical-align: middle;\r\n }\r\n ::slotted([slot=\"leading-button\"]) {\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n --_button-start-shape-pressed-morph: var(--_leading-button-shape, ${DesignToken.shape.corner.full});\r\n }\r\n\r\n ::slotted([slot=\"trailing-button\"]:not([aria-expanded=\"true\"])) {\r\n --m3e-icon-button-extra-small-default-leading-space: var(\r\n --m3e-split-button-extra-small-trailing-button-unselected-leading-space,\r\n 0.75rem\r\n );\r\n --m3e-icon-button-extra-small-default-trailing-space: var(\r\n --m3e-split-button-extra-small-trailing-button-unselected-trailing-space,\r\n 0.875rem\r\n );\r\n --m3e-icon-button-small-default-leading-space: var(\r\n --m3e-split-button-small-trailing-button-unselected-leading-space,\r\n 0.75rem\r\n );\r\n --m3e-icon-button-small-default-trailing-space: var(\r\n --m3e-split-button-small-trailing-button-unselected-trailing-space,\r\n 0.875rem\r\n );\r\n --m3e-icon-button-medium-default-leading-space: var(\r\n --m3e-split-button-medium-trailing-button-unselected-leading-space,\r\n 0.8125rem\r\n );\r\n --m3e-icon-button-medium-default-trailing-space: var(\r\n --m3e-split-button-medium-trailing-button-unselected-trailing-space,\r\n 1.0625rem\r\n );\r\n --m3e-icon-button-large-default-leading-space: var(\r\n --m3e-split-button-large-trailing-button-unselected-leading-space,\r\n 1.625rem\r\n );\r\n --m3e-icon-button-large-default-trailing-space: var(\r\n --m3e-split-button-large-trailing-button-unselected-trailing-space,\r\n 2rem\r\n );\r\n --m3e-icon-button-extra-large-default-leading-space: var(\r\n --m3e-split-button-extra-large-trailing-button-unselected-leading-space,\r\n 2.3125rem\r\n );\r\n --m3e-icon-button-extra-large-default-trailing-space: var(\r\n --m3e-split-button-extra-large-trailing-button-unselected-trailing-space,\r\n 3.0625rem\r\n );\r\n }\r\n\r\n ::slotted([slot=\"trailing-button\"][aria-expanded=\"true\"]) {\r\n --m3e-icon-button-extra-small-default-leading-space: var(\r\n --m3e-split-button-extra-small-trailing-button-selected-leading-space,\r\n 0.8125rem\r\n );\r\n --m3e-icon-button-extra-small-default-trailing-space: var(\r\n --m3e-split-button-extra-small-trailing-button-selected-trailing-space,\r\n 0.8125rem\r\n );\r\n --m3e-icon-button-small-default-leading-space: var(\r\n --m3e-split-button-small-trailing-button-selected-leading-space,\r\n 0.8125rem\r\n );\r\n --m3e-icon-button-small-default-trailing-space: var(\r\n --m3e-split-button-small-trailing-button-selected-trailing-space,\r\n 0.8125rem\r\n );\r\n --m3e-icon-button-medium-default-leading-space: var(\r\n --m3e-split-button-medium-trailing-button-selected-leading-space,\r\n 0.9375rem\r\n );\r\n --m3e-icon-button-medium-default-trailing-space: var(\r\n --m3e-split-button-medium-trailing-button-selected-trailing-space,\r\n 0.9375rem\r\n );\r\n --m3e-icon-button-large-default-leading-space: var(\r\n --m3e-split-button-large-trailing-button-selected-leading-space,\r\n 1.8125rem\r\n );\r\n --m3e-icon-button-large-default-trailing-space: var(\r\n --m3e-split-button-large-trailing-button-selected-trailing-space,\r\n 1.8125rem\r\n );\r\n --m3e-icon-button-extra-large-default-leading-space: var(\r\n --m3e-split-button-extra-large-trailing-button-selected-leading-space,\r\n 2.6875rem\r\n );\r\n --m3e-icon-button-extra-large-default-trailing-space: var(\r\n --m3e-split-button-extra-large-trailing-button-selected-trailing-space,\r\n 2.6875rem\r\n );\r\n }\r\n\r\n ::slotted([slot=\"leading-button\"]:not(:hover)),\r\n ::slotted([slot=\"leading-button\"]:disabled),\r\n ::slotted([slot=\"leading-button\"][disabled-interactive]) {\r\n --m3e-connected-button-group-extra-small-inner-shape: var(\r\n --m3e-split-button-extra-small-inner-corner-size,\r\n ${DesignToken.shape.corner.extraSmall}\r\n );\r\n --m3e-connected-button-group-small-inner-shape: var(\r\n --m3e-split-button-small-inner-corner-size,\r\n ${DesignToken.shape.corner.extraSmall}\r\n );\r\n --m3e-connected-button-group-medium-inner-shape: var(\r\n --m3e-split-button-medium-inner-corner-size,\r\n ${DesignToken.shape.corner.extraSmall}\r\n );\r\n --m3e-connected-button-group-large-inner-shape: var(\r\n --m3e-split-button-large-inner-corner-size,\r\n ${DesignToken.shape.corner.small}\r\n );\r\n --m3e-connected-button-group-extra-large-inner-shape: var(\r\n --m3e-split-button-extra-large-inner-corner-size,\r\n ${DesignToken.shape.corner.medium}\r\n );\r\n }\r\n ::slotted([slot=\"leading-button\"]:hover:not(:disabled):not([disabled-interactive])),\r\n ::slotted([slot=\"trailing-button\"]:not([aria-expanded=\"true\"]):hover:not(:disabled):not([disabled-interactive])) {\r\n --m3e-connected-button-group-extra-small-inner-shape: var(\r\n --m3e-split-button-extra-small-inner-corner-hover-size,\r\n ${DesignToken.shape.corner.small}\r\n );\r\n --m3e-connected-button-group-small-inner-shape: var(\r\n --m3e-split-button-small-inner-corner-hover-size,\r\n ${DesignToken.shape.corner.medium}\r\n );\r\n --m3e-connected-button-group-medium-inner-shape: var(\r\n --m3e-split-button-medium-inner-corner-hover-size,\r\n ${DesignToken.shape.corner.medium}\r\n );\r\n --m3e-connected-button-group-large-inner-shape: var(\r\n --m3e-split-button-large-inner-corner-hover-size,\r\n ${DesignToken.shape.corner.largeIncreased}\r\n );\r\n --m3e-connected-button-group-extra-large-inner-shape: var(\r\n --m3e-split-button-extra-large-inner-corner-hover-size,\r\n ${DesignToken.shape.corner.largeIncreased}\r\n );\r\n }\r\n\r\n ::slotted([slot=\"leading-button\"]),\r\n ::slotted([slot=\"trailing-button\"]) {\r\n --m3e-connected-button-group-extra-small-inner-pressed-shape: var(\r\n --m3e-split-button-extra-small-inner-corner-pressed-size,\r\n ${DesignToken.shape.corner.small}\r\n );\r\n --m3e-connected-button-group-small-inner-pressed-shape: var(\r\n --m3e-split-button-small-inner-corner-pressed-size,\r\n ${DesignToken.shape.corner.medium}\r\n );\r\n --m3e-connected-button-group-medium-inner-pressed-shape: var(\r\n --m3e-split-button-medium-inner-corner-pressed-size,\r\n ${DesignToken.shape.corner.medium}\r\n );\r\n --m3e-connected-button-group-large-inner-pressed-shape: var(\r\n --m3e-split-button-large-inner-corner-pressed-size,\r\n ${DesignToken.shape.corner.largeIncreased}\r\n );\r\n --m3e-connected-button-group-extra-large-inner-pressed-shape: var(\r\n --m3e-split-button-extra-large-inner-corner-pressed-size,\r\n ${DesignToken.shape.corner.largeIncreased}\r\n );\r\n }\r\n\r\n ::slotted([slot=\"trailing-button\"]:not([aria-expanded=\"true\"]):not(:hover)),\r\n ::slotted([slot=\"trailing-button\"]:disabled),\r\n ::slotted([slot=\"trailing-button\"][disabled-interactive]) {\r\n --m3e-connected-button-group-extra-small-inner-shape: var(\r\n --m3e-split-button-extra-small-inner-corner-size,\r\n ${DesignToken.shape.corner.extraSmall}\r\n );\r\n --m3e-connected-button-group-small-inner-shape: var(\r\n --m3e-split-button-small-inner-corner-size,\r\n ${DesignToken.shape.corner.extraSmall}\r\n );\r\n --m3e-connected-button-group-medium-inner-shape: var(\r\n --m3e-split-button-medium-inner-corner-size,\r\n ${DesignToken.shape.corner.extraSmall}\r\n );\r\n --m3e-connected-button-group-large-inner-shape: var(\r\n --m3e-split-button-large-inner-corner-size,\r\n ${DesignToken.shape.corner.small}\r\n );\r\n --m3e-connected-button-group-extra-large-inner-shape: var(\r\n --m3e-split-button-extra-large-inner-corner-size,\r\n ${DesignToken.shape.corner.medium}\r\n );\r\n }\r\n\r\n ::slotted([slot=\"trailing-button\"][aria-expanded=\"true\"]) {\r\n --_icon-button-icon-transform: rotate(180deg);\r\n --_button-rounded-start-shape: var(--_trailing-button-shape, ${DesignToken.shape.corner.full});\r\n --_button-rounded-end-shape: var(--_trailing-button-shape, ${DesignToken.shape.corner.full});\r\n }\r\n ::slotted([slot=\"trailing-button\"]) {\r\n --_button-end-shape-pressed-morph: var(--_trailing-button-shape, ${DesignToken.shape.corner.full});\r\n }\r\n .base {\r\n --m3e-icon-button-extra-small-icon-size: calc(\r\n var(--m3e-spit-button-extra-small-trailing-button-icon-size, 1.375rem) + ${DesignToken.density.calc(0)}\r\n );\r\n --m3e-button-extra-small-icon-size: calc(\r\n var(--m3e-spit-button-extra-small-trailing-button-icon-size, 1.375rem) + ${DesignToken.density.calc(0)}\r\n );\r\n --m3e-icon-button-small-icon-size: calc(\r\n var(--m3e-spit-button-small-trailing-button-icon-size, 1.375rem) + ${DesignToken.density.calc(-1)}\r\n );\r\n --m3e-button-small-icon-size: calc(\r\n var(--m3e-spit-button-small-trailing-button-icon-size, 1.375rem) + ${DesignToken.density.calc(-1)}\r\n );\r\n --m3e-icon-button-medium-icon-size: calc(\r\n var(--m3e-spit-button-medium-trailing-button-icon-size, 1.625rem) + ${DesignToken.density.calc(-2)}\r\n );\r\n --m3e-button-medium-icon-size: calc(\r\n var(--m3e-spit-button-medium-trailing-button-icon-size, 1.625rem) + ${DesignToken.density.calc(-2)}\r\n );\r\n --m3e-icon-button-large-icon-size: calc(\r\n var(--m3e-spit-button-large-trailing-button-icon-size, 2.375rem) + ${DesignToken.density.calc(-3)}\r\n );\r\n --m3e-button-large-icon-size: calc(\r\n var(--m3e-spit-button-large-trailing-button-icon-size, 2.375rem) + ${DesignToken.density.calc(-3)}\r\n );\r\n --m3e-icon-button-extra-large-icon-size: calc(\r\n var(--m3e-spit-button-extra-large-trailing-button-icon-size, 3.125rem) + ${DesignToken.density.calc(-3)}\r\n );\r\n --m3e-button-extra-large-icon-size: calc(\r\n var(--m3e-spit-button-extra-large-trailing-button-icon-size, 3.125rem) + ${DesignToken.density.calc(-3)}\r\n );\r\n }\r\n :host([size=\"extra-small\"]) .base {\r\n --m3e-connected-button-group-spacing: var(--m3e-split-button-extra-small-between-spacing, 0.125rem);\r\n }\r\n :host([size=\"small\"]) .base {\r\n --m3e-connected-button-group-spacing: var(--m3e-split-button-small-between-spacing, 0.125rem);\r\n }\r\n :host([size=\"medium\"]).base {\r\n --m3e-connected-button-group-spacing: var(--m3e-split-button-medium-between-spacing, 0.125rem);\r\n }\r\n :host([size=\"large\"]) .base {\r\n --m3e-connected-button-group-spacing: var(--m3e-split-button-large-between-spacing, 0.125rem);\r\n }\r\n :host([size=\"extra-large\"]) .base {\r\n --m3e-connected-button-group-spacing: var(--m3e-split-button-extra-large-between-spacing, 0.125rem);\r\n }\r\n `;\r\n\r\n @query(\".base\") private readonly _base?: HTMLElement;\r\n\r\n /** @private */ #leadingButton?: M3eButtonElement;\r\n /** @private */ #trailingButton?: M3eIconButtonElement;\r\n /** @private */ #trailingButtonHover = false;\r\n\r\n /** @private */ readonly #pressedController = new PressedController(this, {\r\n target: null,\r\n capture: true,\r\n minPressedDuration: 150,\r\n isPressedKey: (key) => key === \" \",\r\n callback: (pressed, _, target) => {\r\n switch (target) {\r\n case this.#leadingButton:\r\n this.#updateLeadingButtonShape(pressed);\r\n break;\r\n case this.#trailingButton:\r\n this.#updateTrailingButtonShape(pressed || this.#trailingButtonHover);\r\n break;\r\n }\r\n },\r\n });\r\n\r\n /** @private */ readonly #hoverController = new HoverController(this, {\r\n target: null,\r\n callback: (hovering, target) => {\r\n switch (target) {\r\n case this.#trailingButton:\r\n if (!this.#trailingButton?.disabled && !this.#trailingButton?.disabledInteractive) {\r\n this.#trailingButtonHover = hovering;\r\n this.#updateTrailingButtonShape(hovering);\r\n }\r\n break;\r\n }\r\n },\r\n });\r\n\r\n /**\r\n * The appearance variant of the button.\r\n * @default \"filled\"\r\n */\r\n @property({ reflect: true }) variant: SplitButtonVariant = \"filled\";\r\n\r\n /**\r\n * The size of the button.\r\n * @default \"small\"\r\n */\r\n @property({ reflect: true }) size: ButtonSize = \"small\";\r\n\r\n /** @inheritdoc */\r\n protected override update(changedProperties: PropertyValues<this>): void {\r\n super.update(changedProperties);\r\n\r\n if (changedProperties.has(\"variant\")) {\r\n this.#updateButtons();\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override render(): unknown {\r\n return html`<m3e-button-group class=\"base\" disable-role variant=\"connected\" size=\"${this.size}\">\r\n <slot name=\"leading-button\" @slotchange=\"${this.#handleLeadingSlotChange}\"></slot>\r\n <slot name=\"trailing-button\" @slotchange=\"${this.#handleTrailingSlotChange}\"></slot>\r\n </m3e-button-group>`;\r\n }\r\n\r\n /** @private */\r\n #handleLeadingSlotChange(e: Event): void {\r\n if (this.#leadingButton) {\r\n this.#pressedController.unobserve(this.#leadingButton);\r\n }\r\n\r\n this.#leadingButton = (<HTMLSlotElement>e.target)\r\n .assignedElements({ flatten: true })\r\n .find((x) => x instanceof M3eButtonElement);\r\n\r\n if (this.#leadingButton) {\r\n this.#pressedController.observe(this.#leadingButton);\r\n }\r\n\r\n this.#updateButtons();\r\n }\r\n\r\n /** @private */\r\n #handleTrailingSlotChange(e: Event): void {\r\n if (this.#trailingButton) {\r\n this.#pressedController.unobserve(this.#trailingButton);\r\n this.#hoverController.unobserve(this.#trailingButton);\r\n }\r\n\r\n this.#trailingButton = (<HTMLSlotElement>e.target)\r\n .assignedElements({ flatten: true })\r\n .find((x) => x instanceof M3eIconButtonElement);\r\n\r\n if (this.#trailingButton) {\r\n this.#pressedController.observe(this.#trailingButton);\r\n this.#hoverController.observe(this.#trailingButton);\r\n }\r\n\r\n this.#updateButtons();\r\n }\r\n\r\n /** @private */\r\n #updateButtons(): void {\r\n if (this.#leadingButton) {\r\n this.#leadingButton.variant = this.variant;\r\n this.#leadingButton.size = this.size;\r\n this.#leadingButton.shape = \"rounded\";\r\n }\r\n\r\n if (this.#trailingButton) {\r\n this.#trailingButton.width = \"default\";\r\n this.#trailingButton.shape = \"rounded\";\r\n this.#trailingButton.setAttribute(\"variant\", this.variant);\r\n this.#trailingButton.size = this.size;\r\n }\r\n }\r\n\r\n /** @private */\r\n #updateLeadingButtonShape(update: boolean): void {\r\n if (update && this.#leadingButton) {\r\n this.#updateButtonShape(this.#leadingButton, \"--_leading-button-shape\");\r\n } else {\r\n this._base?.style.removeProperty(\"--_leading-button-shape\");\r\n }\r\n }\r\n\r\n /** @private */\r\n #updateTrailingButtonShape(update: boolean): void {\r\n if (update && this.#trailingButton) {\r\n this.#updateButtonShape(this.#trailingButton, \"--_trailing-button-shape\");\r\n } else {\r\n this._base?.style.removeProperty(\"--_trailing-button-shape\");\r\n }\r\n }\r\n\r\n /** @private */\r\n #updateButtonShape(button: HTMLElement, property: string): void {\r\n const adjustedShape = button.clientHeight / 2;\r\n if (adjustedShape) {\r\n this._base?.style.setProperty(property, `${adjustedShape}px`);\r\n }\r\n }\r\n}\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n \"m3e-split-button\": M3eSplitButtonElement;\r\n }\r\n}\r\n"],"names":["M3eSplitButtonElement","Role","LitElement","constructor","_M3eSplitButtonElement_leadingButton","set","this","_M3eSplitButtonElement_trailingButton","_M3eSplitButtonElement_trailingButtonHover","_M3eSplitButtonElement_pressedController","PressedController","target","capture","minPressedDuration","isPressedKey","key","callback","pressed","_","__classPrivateFieldGet","_M3eSplitButtonElement_instances","_M3eSplitButtonElement_updateLeadingButtonShape","call","_M3eSplitButtonElement_updateTrailingButtonShape","_M3eSplitButtonElement_hoverController","HoverController","hovering","disabled","disabledInteractive","__classPrivateFieldSet","variant","size","update","changedProperties","super","has","_M3eSplitButtonElement_updateButtons","render","html","_M3eSplitButtonElement_handleLeadingSlotChange","_M3eSplitButtonElement_handleTrailingSlotChange","e","unobserve","assignedElements","flatten","find","x","M3eButtonElement","observe","M3eIconButtonElement","shape","width","setAttribute","_M3eSplitButtonElement_updateButtonShape","_base","style","removeProperty","button","property","adjustedShape","clientHeight","setProperty","styles","css","DesignToken","corner","full","extraSmall","small","medium","largeIncreased","density","calc","__decorate","query","prototype","reflect","customElement"],"mappings":";;;;;qeAuFO,IAAMA,EAAN,cAAoCC,EAAKC,EAAY,UAArDC,WAAAA,mCA+PWC,EAAAC,IAAAC,aACAC,EAAAF,IAAAC,aACAE,EAAAH,IAAAC,MAAuB,GAEdG,EAAAJ,IAAAC,KAAqB,IAAII,EAAkBJ,KAAM,CACxEK,OAAQ,KACRC,SAAS,EACTC,mBAAoB,IACpBC,aAAeC,GAAgB,MAARA,EACvBC,SAAUA,CAACC,EAASC,EAAGP,KACrB,OAAQA,GACN,KAAKQ,EAAAb,KAAIF,EAAA,KACPe,EAAAb,KAAIc,EAAA,IAAAC,GAA0BC,KAA9BhB,KAA+BW,GAC/B,MACF,KAAKE,EAAAb,KAAIC,EAAA,KACPY,EAAAb,KAAIc,EAAA,IAAAG,GAA2BD,KAA/BhB,KAAgCW,GAAWE,EAAAb,KAAIE,EAAA,WAM9BgB,EAAAnB,IAAAC,KAAmB,IAAImB,EAAgBnB,KAAM,CACpEK,OAAQ,KACRK,SAAUA,CAACU,EAAUf,KACnB,GAAQA,IACDQ,EAAAb,KAAIC,EAAA,KACFY,EAAAb,KAAIC,EAAA,MAAkBoB,UAAaR,EAAAb,KAAIC,EAAA,MAAkBqB,sBAC5DC,EAAAvB,KAAIE,EAAwBkB,EAAQ,KACpCP,EAAAb,KAAIc,EAAA,IAAAG,GAA2BD,KAA/BhB,KAAgCoB,QAWbpB,KAAAwB,QAA8B,SAM9BxB,KAAAyB,KAAmB,OAgGlD,CA7FqBC,MAAAA,CAAOC,GACxBC,MAAMF,OAAOC,GAETA,EAAkBE,IAAI,YACxBhB,EAAAb,KAAIc,EAAA,IAAAgB,GAAed,KAAnBhB,KAEJ,CAGmB+B,MAAAA,GACjB,OAAOC,CAAI,yEAAyEhC,KAAKyB,kDAC5CZ,EAAAb,KAAIc,E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AYd,MAAMe,OAAOC,mHAGnBF,EAAYd,MAAMe,OAAOC,4IAIfF,EAAYO,QAAQC,KAAK,4HAGzBR,EAAYO,QAAQC,KAAK,qHAG/BR,EAAYO,QAAQC,MAAK,gHAGzBR,EAAYO,QAAQC,MAAK,uHAGxBR,EAAYO,QAAQC,MAAK,kHAGzBR,EAAYO,QAAQC,MAAK,qHAG1BR,EAAYO,QAAQC,MAAK,gHAGzBR,EAAYO,QAAQC,MAAK,iIAGnBR,EAAYO,QAAQC,MAAK,4HAGzBR,EAAYO,QAAQC,oqBAoBpEC,EAAA,CAAhCC,EAAM,UAA8C1E,EAAA2E,UAAA,gBAyCxBF,EAAA,CAA5Bf,EAAS,CAAEkB,SAAS,KAA+C5E,EAAA2E,UAAA,eAAA,GAMvCF,EAAA,CAA5Bf,EAAS,CAAEkB,SAAS,KAAmC5E,EAAA2E,UAAA,YAAA,GA5S7C3E,EAAqByE,EAAA,CADjCI,EAAc,qBACF7E"}
|
|
1
|
+
{"version":3,"file":"split-button.min.js","sources":["../../src/split-button/SplitButtonElement.ts"],"sourcesContent":["import { css, CSSResultGroup, html, LitElement, PropertyValues } from \"lit\";\r\nimport { property, query } from \"lit/decorators.js\";\r\n\r\nimport { customElement, DesignToken, HoverController, PressedController, Role } from \"@m3e/web/core\";\r\nimport { M3eButtonElement, ButtonSize } from \"@m3e/web/button\";\r\nimport { M3eIconButtonElement } from \"@m3e/web/icon-button\";\r\n\r\nimport \"@m3e/web/button-group\";\r\n\r\nimport { SplitButtonVariant } from \"./SplitButtonVariant\";\r\n\r\n/**\r\n * A button used to show an action with a menu of related actions.\r\n *\r\n * @description\r\n * The `m3e-split-button` component presents a primary action alongside a menu of related actions,\r\n * uniting two buttons in a single expressive surface. Designed for Material 3, it supports `elevated`,\r\n * `filled`, `tonal`, and `outlined` variants, and adapts to all button sizes. The leading button triggers\r\n * the main action, while the trailing icon button reveals additional options, enabling efficient workflows\r\n * and clear visual hierarchy. The split button ensures accessible, adaptive, and visually harmonious\r\n * interactions, reflecting Material 3's principles of clarity, flexibility, and expressive design.\r\n *\r\n * @example\r\n * The following example illustrates use of the `m3e-split-button` to combine the `m3e-button`,\r\n * `m3e-icon-button`, and `m3e-menu` components into a split button.\r\n *\r\n * ```html\r\n * <m3e-split-button>\r\n * <m3e-button slot=\"leading-button\">\r\n * <m3e-icon slot=\"icon\" name=\"edit\"></m3e-icon>Edit\r\n * </m3e-button>\r\n * <m3e-icon-button slot=\"trailing-button\">\r\n * <m3e-icon name=\"keyboard_arrow_down\"></m3e-icon>\r\n * <m3e-menu-trigger for=\"menu1\"></m3e-menu-trigger>\r\n * </m3e-icon-button>\r\n * ```\r\n *\r\n * @tag m3e-split-button\r\n *\r\n * @slot leading-button - The leading button used to perform the primary action.\r\n * @slot trailing-button - The trailing icon button used to open a menu of related actions.\r\n *\r\n * @attr variant - The appearance variant of the button.\r\n * @attr size - The size of the button.\r\n *\r\n * @cssprop --m3e-split-button-extra-small-trailing-button-unselected-leading-space - Leading space for the trailing button (extra-small, unselected).\r\n * @cssprop --m3e-split-button-extra-small-trailing-button-unselected-trailing-space - Trailing space for the trailing button (extra-small, unselected).\r\n * @cssprop --m3e-split-button-small-trailing-button-unselected-leading-space - Leading space for the trailing button (small, unselected).\r\n * @cssprop --m3e-split-button-small-trailing-button-unselected-trailing-space - Trailing space for the trailing button (small, unselected).\r\n * @cssprop --m3e-split-button-medium-trailing-button-unselected-leading-space - Leading space for the trailing button (medium, unselected).\r\n * @cssprop --m3e-split-button-medium-trailing-button-unselected-trailing-space - Trailing space for the trailing button (medium, unselected).\r\n * @cssprop --m3e-split-button-large-trailing-button-unselected-leading-space - Leading space for the trailing button (large, unselected).\r\n * @cssprop --m3e-split-button-large-trailing-button-unselected-trailing-space - Trailing space for the trailing button (large, unselected).\r\n * @cssprop --m3e-split-button-extra-large-trailing-button-unselected-leading-space - Leading space for the trailing button (extra-large, unselected).\r\n * @cssprop --m3e-split-button-extra-large-trailing-button-unselected-trailing-space - Trailing space for the trailing button (extra-large, unselected).\r\n * @cssprop --m3e-split-button-extra-small-trailing-button-selected-leading-space - Leading space for the trailing button (extra-small, selected).\r\n * @cssprop --m3e-split-button-extra-small-trailing-button-selected-trailing-space - Trailing space for the trailing button (extra-small, selected).\r\n * @cssprop --m3e-split-button-small-trailing-button-selected-leading-space - Leading space for the trailing button (small, selected).\r\n * @cssprop --m3e-split-button-small-trailing-button-selected-trailing-space - Trailing space for the trailing button (small, selected).\r\n * @cssprop --m3e-split-button-medium-trailing-button-selected-leading-space - Leading space for the trailing button (medium, selected).\r\n * @cssprop --m3e-split-button-medium-trailing-button-selected-trailing-space - Trailing space for the trailing button (medium, selected).\r\n * @cssprop --m3e-split-button-large-trailing-button-selected-leading-space - Leading space for the trailing button (large, selected).\r\n * @cssprop --m3e-split-button-large-trailing-button-selected-trailing-space - Trailing space for the trailing button (large, selected).\r\n * @cssprop --m3e-split-button-extra-large-trailing-button-selected-leading-space - Leading space for the trailing button (extra-large, selected).\r\n * @cssprop --m3e-split-button-extra-large-trailing-button-selected-trailing-space - Trailing space for the trailing button (extra-large, selected).\r\n * @cssprop --m3e-split-button-extra-small-inner-corner-size - Inner corner size for the leading/trailing button (extra-small).\r\n * @cssprop --m3e-split-button-small-inner-corner-size - Inner corner size for the leading/trailing button (small).\r\n * @cssprop --m3e-split-button-medium-inner-corner-size - Inner corner size for the leading/trailing button (medium).\r\n * @cssprop --m3e-split-button-large-inner-corner-size - Inner corner size for the leading/trailing button (large).\r\n * @cssprop --m3e-split-button-extra-large-inner-corner-size - Inner corner size for the leading/trailing button (extra-large).\r\n * @cssprop --m3e-split-button-extra-small-inner-corner-hover-size - Inner corner size on hover (extra-small).\r\n * @cssprop --m3e-split-button-small-inner-corner-hover-size - Inner corner size on hover (small).\r\n * @cssprop --m3e-split-button-medium-inner-corner-hover-size - Inner corner size on hover (medium).\r\n * @cssprop --m3e-split-button-large-inner-corner-hover-size - Inner corner size on hover (large).\r\n * @cssprop --m3e-split-button-extra-large-inner-corner-hover-size - Inner corner size on hover (extra-large).\r\n * @cssprop --m3e-split-button-extra-small-inner-corner-pressed-size - Inner corner size on press (extra-small).\r\n * @cssprop --m3e-split-button-small-inner-corner-pressed-size - Inner corner size on press (small).\r\n * @cssprop --m3e-split-button-medium-inner-corner-pressed-size - Inner corner size on press (medium).\r\n * @cssprop --m3e-split-button-large-inner-corner-pressed-size - Inner corner size on press (large).\r\n * @cssprop --m3e-split-button-extra-large-inner-corner-pressed-size - Inner corner size on press (extra-large).\r\n * @cssprop --m3e-split-button-extra-small-between-spacing - Spacing between leading and trailing buttons (extra-small).\r\n * @cssprop --m3e-split-button-small-between-spacing - Spacing between leading and trailing buttons (small).\r\n * @cssprop --m3e-split-button-medium-between-spacing - Spacing between leading and trailing buttons (medium).\r\n * @cssprop --m3e-split-button-large-between-spacing - Spacing between leading and trailing buttons (large).\r\n * @cssprop --m3e-split-button-extra-large-between-spacing - Spacing between leading and trailing buttons (extra-large).\r\n */\r\n@customElement(\"m3e-split-button\")\r\nexport class M3eSplitButtonElement extends Role(LitElement, \"group\") {\r\n /** The styles of the element. */\r\n static override styles: CSSResultGroup = css`\r\n :host {\r\n display: inline-flex;\r\n vertical-align: middle;\r\n }\r\n ::slotted([slot=\"leading-button\"]) {\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n --_button-start-shape-pressed-morph: var(--_leading-button-shape, ${DesignToken.shape.corner.full});\r\n }\r\n\r\n ::slotted([slot=\"trailing-button\"]:not([aria-expanded=\"true\"])) {\r\n --m3e-icon-button-extra-small-default-leading-space: var(\r\n --m3e-split-button-extra-small-trailing-button-unselected-leading-space,\r\n 0.75rem\r\n );\r\n --m3e-icon-button-extra-small-default-trailing-space: var(\r\n --m3e-split-button-extra-small-trailing-button-unselected-trailing-space,\r\n 0.875rem\r\n );\r\n --m3e-icon-button-small-default-leading-space: var(\r\n --m3e-split-button-small-trailing-button-unselected-leading-space,\r\n 0.75rem\r\n );\r\n --m3e-icon-button-small-default-trailing-space: var(\r\n --m3e-split-button-small-trailing-button-unselected-trailing-space,\r\n 0.875rem\r\n );\r\n --m3e-icon-button-medium-default-leading-space: var(\r\n --m3e-split-button-medium-trailing-button-unselected-leading-space,\r\n 0.8125rem\r\n );\r\n --m3e-icon-button-medium-default-trailing-space: var(\r\n --m3e-split-button-medium-trailing-button-unselected-trailing-space,\r\n 1.0625rem\r\n );\r\n --m3e-icon-button-large-default-leading-space: var(\r\n --m3e-split-button-large-trailing-button-unselected-leading-space,\r\n 1.625rem\r\n );\r\n --m3e-icon-button-large-default-trailing-space: var(\r\n --m3e-split-button-large-trailing-button-unselected-trailing-space,\r\n 2rem\r\n );\r\n --m3e-icon-button-extra-large-default-leading-space: var(\r\n --m3e-split-button-extra-large-trailing-button-unselected-leading-space,\r\n 2.3125rem\r\n );\r\n --m3e-icon-button-extra-large-default-trailing-space: var(\r\n --m3e-split-button-extra-large-trailing-button-unselected-trailing-space,\r\n 3.0625rem\r\n );\r\n }\r\n\r\n ::slotted([slot=\"trailing-button\"][aria-expanded=\"true\"]) {\r\n --m3e-icon-button-extra-small-default-leading-space: var(\r\n --m3e-split-button-extra-small-trailing-button-selected-leading-space,\r\n 0.8125rem\r\n );\r\n --m3e-icon-button-extra-small-default-trailing-space: var(\r\n --m3e-split-button-extra-small-trailing-button-selected-trailing-space,\r\n 0.8125rem\r\n );\r\n --m3e-icon-button-small-default-leading-space: var(\r\n --m3e-split-button-small-trailing-button-selected-leading-space,\r\n 0.8125rem\r\n );\r\n --m3e-icon-button-small-default-trailing-space: var(\r\n --m3e-split-button-small-trailing-button-selected-trailing-space,\r\n 0.8125rem\r\n );\r\n --m3e-icon-button-medium-default-leading-space: var(\r\n --m3e-split-button-medium-trailing-button-selected-leading-space,\r\n 0.9375rem\r\n );\r\n --m3e-icon-button-medium-default-trailing-space: var(\r\n --m3e-split-button-medium-trailing-button-selected-trailing-space,\r\n 0.9375rem\r\n );\r\n --m3e-icon-button-large-default-leading-space: var(\r\n --m3e-split-button-large-trailing-button-selected-leading-space,\r\n 1.8125rem\r\n );\r\n --m3e-icon-button-large-default-trailing-space: var(\r\n --m3e-split-button-large-trailing-button-selected-trailing-space,\r\n 1.8125rem\r\n );\r\n --m3e-icon-button-extra-large-default-leading-space: var(\r\n --m3e-split-button-extra-large-trailing-button-selected-leading-space,\r\n 2.6875rem\r\n );\r\n --m3e-icon-button-extra-large-default-trailing-space: var(\r\n --m3e-split-button-extra-large-trailing-button-selected-trailing-space,\r\n 2.6875rem\r\n );\r\n }\r\n\r\n ::slotted([slot=\"leading-button\"]:not(:hover)),\r\n ::slotted([slot=\"leading-button\"]:disabled),\r\n ::slotted([slot=\"leading-button\"][disabled-interactive]) {\r\n --m3e-connected-button-group-extra-small-inner-shape: var(\r\n --m3e-split-button-extra-small-inner-corner-size,\r\n ${DesignToken.shape.corner.extraSmall}\r\n );\r\n --m3e-connected-button-group-small-inner-shape: var(\r\n --m3e-split-button-small-inner-corner-size,\r\n ${DesignToken.shape.corner.extraSmall}\r\n );\r\n --m3e-connected-button-group-medium-inner-shape: var(\r\n --m3e-split-button-medium-inner-corner-size,\r\n ${DesignToken.shape.corner.extraSmall}\r\n );\r\n --m3e-connected-button-group-large-inner-shape: var(\r\n --m3e-split-button-large-inner-corner-size,\r\n ${DesignToken.shape.corner.small}\r\n );\r\n --m3e-connected-button-group-extra-large-inner-shape: var(\r\n --m3e-split-button-extra-large-inner-corner-size,\r\n ${DesignToken.shape.corner.medium}\r\n );\r\n }\r\n ::slotted([slot=\"leading-button\"]:hover:not(:disabled):not([disabled-interactive])),\r\n ::slotted([slot=\"trailing-button\"]:not([aria-expanded=\"true\"]):hover:not(:disabled):not([disabled-interactive])) {\r\n --m3e-connected-button-group-extra-small-inner-shape: var(\r\n --m3e-split-button-extra-small-inner-corner-hover-size,\r\n ${DesignToken.shape.corner.small}\r\n );\r\n --m3e-connected-button-group-small-inner-shape: var(\r\n --m3e-split-button-small-inner-corner-hover-size,\r\n ${DesignToken.shape.corner.medium}\r\n );\r\n --m3e-connected-button-group-medium-inner-shape: var(\r\n --m3e-split-button-medium-inner-corner-hover-size,\r\n ${DesignToken.shape.corner.medium}\r\n );\r\n --m3e-connected-button-group-large-inner-shape: var(\r\n --m3e-split-button-large-inner-corner-hover-size,\r\n ${DesignToken.shape.corner.largeIncreased}\r\n );\r\n --m3e-connected-button-group-extra-large-inner-shape: var(\r\n --m3e-split-button-extra-large-inner-corner-hover-size,\r\n ${DesignToken.shape.corner.largeIncreased}\r\n );\r\n }\r\n\r\n ::slotted([slot=\"leading-button\"]),\r\n ::slotted([slot=\"trailing-button\"]) {\r\n --m3e-connected-button-group-extra-small-inner-pressed-shape: var(\r\n --m3e-split-button-extra-small-inner-corner-pressed-size,\r\n ${DesignToken.shape.corner.small}\r\n );\r\n --m3e-connected-button-group-small-inner-pressed-shape: var(\r\n --m3e-split-button-small-inner-corner-pressed-size,\r\n ${DesignToken.shape.corner.medium}\r\n );\r\n --m3e-connected-button-group-medium-inner-pressed-shape: var(\r\n --m3e-split-button-medium-inner-corner-pressed-size,\r\n ${DesignToken.shape.corner.medium}\r\n );\r\n --m3e-connected-button-group-large-inner-pressed-shape: var(\r\n --m3e-split-button-large-inner-corner-pressed-size,\r\n ${DesignToken.shape.corner.largeIncreased}\r\n );\r\n --m3e-connected-button-group-extra-large-inner-pressed-shape: var(\r\n --m3e-split-button-extra-large-inner-corner-pressed-size,\r\n ${DesignToken.shape.corner.largeIncreased}\r\n );\r\n }\r\n\r\n ::slotted([slot=\"trailing-button\"]:not([aria-expanded=\"true\"]):not(:hover)),\r\n ::slotted([slot=\"trailing-button\"]:disabled),\r\n ::slotted([slot=\"trailing-button\"][disabled-interactive]) {\r\n --m3e-connected-button-group-extra-small-inner-shape: var(\r\n --m3e-split-button-extra-small-inner-corner-size,\r\n ${DesignToken.shape.corner.extraSmall}\r\n );\r\n --m3e-connected-button-group-small-inner-shape: var(\r\n --m3e-split-button-small-inner-corner-size,\r\n ${DesignToken.shape.corner.extraSmall}\r\n );\r\n --m3e-connected-button-group-medium-inner-shape: var(\r\n --m3e-split-button-medium-inner-corner-size,\r\n ${DesignToken.shape.corner.extraSmall}\r\n );\r\n --m3e-connected-button-group-large-inner-shape: var(\r\n --m3e-split-button-large-inner-corner-size,\r\n ${DesignToken.shape.corner.small}\r\n );\r\n --m3e-connected-button-group-extra-large-inner-shape: var(\r\n --m3e-split-button-extra-large-inner-corner-size,\r\n ${DesignToken.shape.corner.medium}\r\n );\r\n }\r\n\r\n ::slotted([slot=\"trailing-button\"][aria-expanded=\"true\"]) {\r\n --_icon-button-icon-transform: rotate(180deg);\r\n --_button-rounded-start-shape: var(--_trailing-button-shape, ${DesignToken.shape.corner.full});\r\n --_button-rounded-end-shape: var(--_trailing-button-shape, ${DesignToken.shape.corner.full});\r\n }\r\n ::slotted([slot=\"trailing-button\"]) {\r\n --_button-end-shape-pressed-morph: var(--_trailing-button-shape, ${DesignToken.shape.corner.full});\r\n }\r\n .base {\r\n --m3e-icon-button-extra-small-icon-size: calc(\r\n var(--m3e-spit-button-extra-small-trailing-button-icon-size, 1.375rem) + ${DesignToken.density.calc(0)}\r\n );\r\n --m3e-button-extra-small-icon-size: calc(\r\n var(--m3e-spit-button-extra-small-trailing-button-icon-size, 1.375rem) + ${DesignToken.density.calc(0)}\r\n );\r\n --m3e-icon-button-small-icon-size: calc(\r\n var(--m3e-spit-button-small-trailing-button-icon-size, 1.375rem) + ${DesignToken.density.calc(-1)}\r\n );\r\n --m3e-button-small-icon-size: calc(\r\n var(--m3e-spit-button-small-trailing-button-icon-size, 1.375rem) + ${DesignToken.density.calc(-1)}\r\n );\r\n --m3e-icon-button-medium-icon-size: calc(\r\n var(--m3e-spit-button-medium-trailing-button-icon-size, 1.625rem) + ${DesignToken.density.calc(-2)}\r\n );\r\n --m3e-button-medium-icon-size: calc(\r\n var(--m3e-spit-button-medium-trailing-button-icon-size, 1.625rem) + ${DesignToken.density.calc(-2)}\r\n );\r\n --m3e-icon-button-large-icon-size: calc(\r\n var(--m3e-spit-button-large-trailing-button-icon-size, 2.375rem) + ${DesignToken.density.calc(-3)}\r\n );\r\n --m3e-button-large-icon-size: calc(\r\n var(--m3e-spit-button-large-trailing-button-icon-size, 2.375rem) + ${DesignToken.density.calc(-3)}\r\n );\r\n --m3e-icon-button-extra-large-icon-size: calc(\r\n var(--m3e-spit-button-extra-large-trailing-button-icon-size, 3.125rem) + ${DesignToken.density.calc(-3)}\r\n );\r\n --m3e-button-extra-large-icon-size: calc(\r\n var(--m3e-spit-button-extra-large-trailing-button-icon-size, 3.125rem) + ${DesignToken.density.calc(-3)}\r\n );\r\n }\r\n :host([size=\"extra-small\"]) .base {\r\n --m3e-connected-button-group-spacing: var(--m3e-split-button-extra-small-between-spacing, 0.125rem);\r\n }\r\n :host([size=\"small\"]) .base {\r\n --m3e-connected-button-group-spacing: var(--m3e-split-button-small-between-spacing, 0.125rem);\r\n }\r\n :host([size=\"medium\"]).base {\r\n --m3e-connected-button-group-spacing: var(--m3e-split-button-medium-between-spacing, 0.125rem);\r\n }\r\n :host([size=\"large\"]) .base {\r\n --m3e-connected-button-group-spacing: var(--m3e-split-button-large-between-spacing, 0.125rem);\r\n }\r\n :host([size=\"extra-large\"]) .base {\r\n --m3e-connected-button-group-spacing: var(--m3e-split-button-extra-large-between-spacing, 0.125rem);\r\n }\r\n `;\r\n\r\n @query(\".base\") private readonly _base?: HTMLElement;\r\n\r\n /** @private */ #leadingButton?: M3eButtonElement;\r\n /** @private */ #trailingButton?: M3eIconButtonElement;\r\n /** @private */ #trailingButtonHover = false;\r\n\r\n /** @private */ readonly #pressedController = new PressedController(this, {\r\n target: null,\r\n capture: true,\r\n minPressedDuration: 150,\r\n isPressedKey: (key) => key === \" \",\r\n callback: (pressed, _, target) => {\r\n switch (target) {\r\n case this.#leadingButton:\r\n this.#updateLeadingButtonShape(pressed);\r\n break;\r\n case this.#trailingButton:\r\n this.#updateTrailingButtonShape(pressed || this.#trailingButtonHover);\r\n break;\r\n }\r\n },\r\n });\r\n\r\n /** @private */ readonly #hoverController = new HoverController(this, {\r\n target: null,\r\n callback: (hovering, target) => {\r\n switch (target) {\r\n case this.#trailingButton:\r\n if (!this.#trailingButton?.disabled && !this.#trailingButton?.disabledInteractive) {\r\n this.#trailingButtonHover = hovering;\r\n this.#updateTrailingButtonShape(hovering);\r\n }\r\n break;\r\n }\r\n },\r\n });\r\n\r\n /**\r\n * The appearance variant of the button.\r\n * @default \"filled\"\r\n */\r\n @property({ reflect: true }) variant: SplitButtonVariant = \"filled\";\r\n\r\n /**\r\n * The size of the button.\r\n * @default \"small\"\r\n */\r\n @property({ reflect: true }) size: ButtonSize = \"small\";\r\n\r\n /** @inheritdoc */\r\n protected override update(changedProperties: PropertyValues<this>): void {\r\n super.update(changedProperties);\r\n\r\n if (changedProperties.has(\"variant\")) {\r\n this.#updateButtons();\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override render(): unknown {\r\n return html`<m3e-button-group class=\"base\" disable-role variant=\"connected\" size=\"${this.size}\">\r\n <slot name=\"leading-button\" @slotchange=\"${this.#handleLeadingSlotChange}\"></slot>\r\n <slot name=\"trailing-button\" @slotchange=\"${this.#handleTrailingSlotChange}\"></slot>\r\n </m3e-button-group>`;\r\n }\r\n\r\n /** @private */\r\n #handleLeadingSlotChange(e: Event): void {\r\n if (this.#leadingButton) {\r\n this.#pressedController.unobserve(this.#leadingButton);\r\n }\r\n\r\n this.#leadingButton = (<HTMLSlotElement>e.target)\r\n .assignedElements({ flatten: true })\r\n .find((x) => x instanceof M3eButtonElement);\r\n\r\n if (this.#leadingButton) {\r\n this.#pressedController.observe(this.#leadingButton);\r\n }\r\n\r\n this.#updateButtons();\r\n }\r\n\r\n /** @private */\r\n #handleTrailingSlotChange(e: Event): void {\r\n if (this.#trailingButton) {\r\n this.#pressedController.unobserve(this.#trailingButton);\r\n this.#hoverController.unobserve(this.#trailingButton);\r\n }\r\n\r\n this.#trailingButton = (<HTMLSlotElement>e.target)\r\n .assignedElements({ flatten: true })\r\n .find((x) => x instanceof M3eIconButtonElement);\r\n\r\n if (this.#trailingButton) {\r\n this.#pressedController.observe(this.#trailingButton);\r\n this.#hoverController.observe(this.#trailingButton);\r\n }\r\n\r\n this.#updateButtons();\r\n }\r\n\r\n /** @private */\r\n #updateButtons(): void {\r\n if (this.#leadingButton) {\r\n this.#leadingButton.variant = this.variant;\r\n this.#leadingButton.size = this.size;\r\n this.#leadingButton.shape = \"rounded\";\r\n }\r\n\r\n if (this.#trailingButton) {\r\n this.#trailingButton.width = \"default\";\r\n this.#trailingButton.shape = \"rounded\";\r\n this.#trailingButton.setAttribute(\"variant\", this.variant);\r\n this.#trailingButton.size = this.size;\r\n }\r\n }\r\n\r\n /** @private */\r\n #updateLeadingButtonShape(update: boolean): void {\r\n if (update && this.#leadingButton) {\r\n this.#updateButtonShape(this.#leadingButton, \"--_leading-button-shape\");\r\n } else {\r\n this._base?.style.removeProperty(\"--_leading-button-shape\");\r\n }\r\n }\r\n\r\n /** @private */\r\n #updateTrailingButtonShape(update: boolean): void {\r\n if (update && this.#trailingButton) {\r\n this.#updateButtonShape(this.#trailingButton, \"--_trailing-button-shape\");\r\n } else {\r\n this._base?.style.removeProperty(\"--_trailing-button-shape\");\r\n }\r\n }\r\n\r\n /** @private */\r\n #updateButtonShape(button: HTMLElement, property: string): void {\r\n const adjustedShape = button.clientHeight / 2;\r\n if (adjustedShape) {\r\n this._base?.style.setProperty(property, `${adjustedShape}px`);\r\n }\r\n }\r\n}\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n \"m3e-split-button\": M3eSplitButtonElement;\r\n }\r\n}\r\n"],"names":["M3eSplitButtonElement","Role","LitElement","constructor","_M3eSplitButtonElement_leadingButton","set","this","_M3eSplitButtonElement_trailingButton","_M3eSplitButtonElement_trailingButtonHover","_M3eSplitButtonElement_pressedController","PressedController","target","capture","minPressedDuration","isPressedKey","key","callback","pressed","_","__classPrivateFieldGet","_M3eSplitButtonElement_instances","_M3eSplitButtonElement_updateLeadingButtonShape","call","_M3eSplitButtonElement_updateTrailingButtonShape","_M3eSplitButtonElement_hoverController","HoverController","hovering","disabled","disabledInteractive","__classPrivateFieldSet","variant","size","update","changedProperties","super","has","_M3eSplitButtonElement_updateButtons","render","html","_M3eSplitButtonElement_handleLeadingSlotChange","_M3eSplitButtonElement_handleTrailingSlotChange","e","unobserve","assignedElements","flatten","find","x","M3eButtonElement","observe","M3eIconButtonElement","shape","width","setAttribute","_M3eSplitButtonElement_updateButtonShape","_base","style","removeProperty","button","property","adjustedShape","clientHeight","setProperty","styles","css","DesignToken","corner","full","extraSmall","small","medium","largeIncreased","density","calc","__decorate","query","prototype","reflect","customElement"],"mappings":";;;;;qeAuFO,IAAMA,EAAN,cAAoCC,EAAKC,EAAY,UAArDC,WAAAA,mCA+PWC,EAAAC,IAAAC,aACAC,EAAAF,IAAAC,aACAE,EAAAH,IAAAC,MAAuB,GAEdG,EAAAJ,IAAAC,KAAqB,IAAII,EAAkBJ,KAAM,CACxEK,OAAQ,KACRC,SAAS,EACTC,mBAAoB,IACpBC,aAAeC,GAAgB,MAARA,EACvBC,SAAUA,CAACC,EAASC,EAAGP,KACrB,OAAQA,GACN,KAAKQ,EAAAb,KAAIF,EAAA,KACPe,EAAAb,KAAIc,EAAA,IAAAC,GAA0BC,KAA9BhB,KAA+BW,GAC/B,MACF,KAAKE,EAAAb,KAAIC,EAAA,KACPY,EAAAb,KAAIc,EAAA,IAAAG,GAA2BD,KAA/BhB,KAAgCW,GAAWE,EAAAb,KAAIE,EAAA,WAM9BgB,EAAAnB,IAAAC,KAAmB,IAAImB,EAAgBnB,KAAM,CACpEK,OAAQ,KACRK,SAAUA,CAACU,EAAUf,KACnB,GAAQA,IACDQ,EAAAb,KAAIC,EAAA,KACFY,EAAAb,KAAIC,EAAA,MAAkBoB,UAAaR,EAAAb,KAAIC,EAAA,MAAkBqB,sBAC5DC,EAAAvB,KAAIE,EAAwBkB,EAAQ,KACpCP,EAAAb,KAAIc,EAAA,IAAAG,GAA2BD,KAA/BhB,K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AMe,OAAOI,8HAIzBL,EAAYd,MAAMe,OAAOK,kJAIzBN,EAAYd,MAAMe,OAAOK,2TASzBN,EAAYd,MAAMe,OAAOE,kHAIzBH,EAAYd,MAAMe,OAAOE,oHAIzBH,EAAYd,MAAMe,OAAOE,kHAIzBH,EAAYd,MAAMe,OAAOG,yHAIzBJ,EAAYd,MAAMe,OAAOI,uLAMkCL,EAAYd,MAAMe,OAAOC,qEAC3BF,EAAYd,MAAMe,OAAOC,mHAGnBF,EAAYd,MAAMe,OAAOC,4IAIfF,EAAYO,QAAQC,KAAK,4HAGzBR,EAAYO,QAAQC,KAAK,qHAG/BR,EAAYO,QAAQC,MAAK,gHAGzBR,EAAYO,QAAQC,MAAK,uHAGxBR,EAAYO,QAAQC,MAAK,kHAGzBR,EAAYO,QAAQC,MAAK,qHAG1BR,EAAYO,QAAQC,MAAK,gHAGzBR,EAAYO,QAAQC,MAAK,iIAGnBR,EAAYO,QAAQC,MAAK,4HAGzBR,EAAYO,QAAQC,oqBAoBpEC,EAAA,CAAhCC,EAAM,UAA8C1E,EAAA2E,UAAA,gBAyCxBF,EAAA,CAA5Bf,EAAS,CAAEkB,SAAS,KAA+C5E,EAAA2E,UAAA,eAAA,GAMvCF,EAAA,CAA5Bf,EAAS,CAAEkB,SAAS,KAAmC5E,EAAA2E,UAAA,YAAA,GA5S7C3E,EAAqByE,EAAA,CADjCI,EAAc,qBACF7E"}
|
package/dist/src/all.d.ts
CHANGED
|
@@ -5,10 +5,12 @@ export * from "./badge";
|
|
|
5
5
|
export * from "./bottom-sheet";
|
|
6
6
|
export * from "./button";
|
|
7
7
|
export * from "./button-group";
|
|
8
|
+
export * from "./calendar";
|
|
8
9
|
export * from "./card";
|
|
9
10
|
export * from "./checkbox";
|
|
10
11
|
export * from "./chips";
|
|
11
12
|
export * from "./core";
|
|
13
|
+
export * from "./datepicker";
|
|
12
14
|
export * from "./dialog";
|
|
13
15
|
export * from "./divider";
|
|
14
16
|
export * from "./drawer-container";
|
|
@@ -29,6 +31,7 @@ export * from "./option";
|
|
|
29
31
|
export * from "./paginator";
|
|
30
32
|
export * from "./progress-indicator";
|
|
31
33
|
export * from "./radio-group";
|
|
34
|
+
export * from "./search";
|
|
32
35
|
export * from "./segmented-button";
|
|
33
36
|
export * from "./select";
|
|
34
37
|
export * from "./shape";
|
package/dist/src/all.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all.d.ts","sourceRoot":"","sources":["../../src/all.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;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,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
|
@@ -41,10 +41,12 @@ declare const M3eAppBarElement_base: import("../core/shared/mixins/Constructor")
|
|
|
41
41
|
*
|
|
42
42
|
* @tag m3e-app-bar
|
|
43
43
|
*
|
|
44
|
-
* @slot leading
|
|
45
|
-
* @slot subtitle - Renders the subtitle.
|
|
46
|
-
* @slot title - Renders the title.
|
|
47
|
-
* @slot trailing
|
|
44
|
+
* @slot leading - Renders content positioned at the start of the bar.
|
|
45
|
+
* @slot subtitle - Renders the subtitle of the bar.
|
|
46
|
+
* @slot title - Renders the title of the bar.
|
|
47
|
+
* @slot trailing - Renders one or more action buttons aligned to the end of the bar.
|
|
48
|
+
* @slot leading-icon - Deprecated: use the `leading` slot.
|
|
49
|
+
* @slot trailing-icon - Deprecated: use the `trailing` slot.
|
|
48
50
|
*
|
|
49
51
|
* @attr centered - Whether the title and subtitle are centered.
|
|
50
52
|
* @attr for - The identifier of the interactive control to which this element is attached.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppBarElement.d.ts","sourceRoot":"","sources":["../../../src/app-bar/AppBarElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAKvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;;AAI1C
|
|
1
|
+
{"version":3,"file":"AppBarElement.d.ts","sourceRoot":"","sources":["../../../src/app-bar/AppBarElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAKvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;;AAI1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsGG;AACH,qBACa,gBAAiB,SAAQ,qBAAmC;;IACvE,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CAAkC;IAIxE,eAAe,CAAiB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAc;IACrE,eAAe,CAAyB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAc;IACpF,eAAe,CAA0B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAc;IAEtF;;;OAGG;IACyC,QAAQ,UAAS;IAE7D;;;OAGG;IAC0B,IAAI,EAAE,UAAU,CAAW;IAExD,kBAAkB;IACT,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAW3C,kBAAkB;IACT,MAAM,IAAI,IAAI;IAWvB,kBAAkB;cACC,OAAO,CAAC,kBAAkB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAY1E,kBAAkB;cACC,MAAM,IAAI,OAAO;IA8GpC,eAAe;IAEf,OAAO,CAAC,aAAa;CA4BtB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,gBAAgB,CAAC;KACjC;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSResultGroup, LitElement, PropertyValues } from "lit";
|
|
2
2
|
import { M3eOptionElement } from "@m3e/web/option";
|
|
3
3
|
import { AutocompleteFilterMode } from "./AutocompleteFilterMode";
|
|
4
|
-
import {
|
|
4
|
+
import { AutocompleteQueryEventDetail } from "./AutocompleteQueryEventDetail";
|
|
5
5
|
declare const M3eAutocompleteElement_base: import("../core/shared/mixins/Constructor").Constructor<import("@m3e/web/core").HtmlForMixin> & typeof LitElement;
|
|
6
6
|
/**
|
|
7
7
|
* Enhances a text input with suggested options.
|
|
@@ -48,6 +48,7 @@ declare const M3eAutocompleteElement_base: import("../core/shared/mixins/Constru
|
|
|
48
48
|
*
|
|
49
49
|
* @fires toggle - Emitted when the options menu opens or closes.
|
|
50
50
|
* @fires query - Emitted when the input is focused or when the user modifies its value.
|
|
51
|
+
* @fires change - Emitted when the committed value changes due to selecting an option or clearing the input.
|
|
51
52
|
*/
|
|
52
53
|
export declare class M3eAutocompleteElement extends M3eAutocompleteElement_base {
|
|
53
54
|
#private;
|
|
@@ -119,6 +120,10 @@ export declare class M3eAutocompleteElement extends M3eAutocompleteElement_base
|
|
|
119
120
|
panelClass: string;
|
|
120
121
|
/** The options that can be selected. */
|
|
121
122
|
get options(): readonly M3eOptionElement[];
|
|
123
|
+
/** The selected option. */
|
|
124
|
+
get selected(): M3eOptionElement | null;
|
|
125
|
+
/** The selected (enabled) value. */
|
|
126
|
+
get value(): string | null;
|
|
122
127
|
/** @inheritdoc */
|
|
123
128
|
attach(control: HTMLElement): void;
|
|
124
129
|
/** @inheritdoc */
|
|
@@ -137,7 +142,7 @@ export declare class M3eAutocompleteElement extends M3eAutocompleteElement_base
|
|
|
137
142
|
}
|
|
138
143
|
interface M3eAutocompleteElementEventMap extends HTMLElementEventMap {
|
|
139
144
|
toggle: ToggleEvent;
|
|
140
|
-
query: CustomEvent<
|
|
145
|
+
query: CustomEvent<AutocompleteQueryEventDetail>;
|
|
141
146
|
}
|
|
142
147
|
export interface M3eAutocompleteElement {
|
|
143
148
|
addEventListener<K extends keyof M3eAutocompleteElementEventMap>(type: K, listener: (this: M3eAutocompleteElement, ev: M3eAutocompleteElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteElement.d.ts","sourceRoot":"","sources":["../../../src/autocomplete/AutocompleteElement.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"AutocompleteElement.d.ts","sourceRoot":"","sources":["../../../src/autocomplete/AutocompleteElement.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAiB5E,OAAO,EAAsB,gBAAgB,EAAyB,MAAM,iBAAiB,CAAC;AAG9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,qBACa,sBAAuB,SAAQ,2BAA4C;;IACtF,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CAOpC;IAEF,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAK;IAI5C,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAiC;IAmBjE,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAU3C;;IAcL;;;OAGG;IACiE,sBAAsB,UAAS;IAEnG;;;OAGG;IACyC,QAAQ,UAAS;IAE7D;;;OAGG;IACsD,YAAY,UAAS;IAE9E;;;OAGG;IACuD,aAAa,UAAS;IAEhF;;;OAGG;IAYH,MAAM,EAAE,sBAAsB,GAAG,CAAC,CAAC,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAc;IAEpG;;;OAGG;IAC0B,OAAO,UAAS;IAE7C;;;OAGG;IACqD,UAAU,UAAS;IAE3E;;;OAGG;IACqD,WAAW,UAAS;IAE5E;;;OAGG;IACuC,YAAY,SAAgB;IAEtE;;;OAGG;IACuC,WAAW,SAAgB;IAErE;;;OA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C,EACP,QAAQ,EAAE,CAAC,IAAI,EAAE,sBAAsB,EAAE,EAAE,EAAE,8BAA8B,CAAC,CAAC,CAAC,KAAK,IAAI,EACvF,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,GACvC,IAAI,CAAC;IAER,mBAAmB,CACjB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,kCAAkC,EAC5C,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,GACvC,IAAI,CAAC;CACT;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,sBAAsB,CAAC;KAC5C;CACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Emitted when the autocomplete needs option data for the current term.
|
|
3
|
+
*
|
|
4
|
+
* This event fires in two situations:
|
|
5
|
+
* - When the input receives focus and no options are available yet
|
|
6
|
+
* - When the user changes the input value (the term)
|
|
7
|
+
*/
|
|
8
|
+
export interface AutocompleteQueryEventDetail {
|
|
9
|
+
/** The term for which the component is requesting option data. */
|
|
10
|
+
term: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=AutocompleteQueryEventDetail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutocompleteQueryEventDetail.d.ts","sourceRoot":"","sources":["../../../src/autocomplete/AutocompleteQueryEventDetail.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4B;IAC3C,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
+
import { AutocompleteQueryEventDetail } from "./AutocompleteQueryEventDetail";
|
|
1
2
|
/**
|
|
2
3
|
* Emitted when the autocomplete needs option data for the current term.
|
|
3
|
-
*
|
|
4
|
-
* This event fires in two situations:
|
|
5
|
-
* - When the input receives focus and no options are available yet
|
|
6
|
-
* - When the user changes the input value (the term)
|
|
4
|
+
* @deprecated Use `AutocompleteQueryEventDetail`.
|
|
7
5
|
*/
|
|
8
|
-
export
|
|
9
|
-
/** The term for which the component is requesting option data. */
|
|
10
|
-
term: string;
|
|
11
|
-
}
|
|
6
|
+
export type QueryEventDetail = AutocompleteQueryEventDetail;
|
|
12
7
|
//# sourceMappingURL=QueryEventDetail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryEventDetail.d.ts","sourceRoot":"","sources":["../../../src/autocomplete/QueryEventDetail.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"QueryEventDetail.d.ts","sourceRoot":"","sources":["../../../src/autocomplete/QueryEventDetail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,4BAA4B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/autocomplete/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/autocomplete/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetElement.d.ts","sourceRoot":"","sources":["../../../src/bottom-sheet/BottomSheetElement.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAW,cAAc,EAAa,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"BottomSheetElement.d.ts","sourceRoot":"","sources":["../../../src/bottom-sheet/BottomSheetElement.ts"],"names":[],"mappings":"A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,EAAE,KAAK,CAAC;IACf,MAAM,EAAE,KAAK,CAAC;IACd,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE,KAAK,CAAC;IACd,MAAM,EAAE,KAAK,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,CAAC,CAAC,SAAS,MAAM,6BAA6B,EAC5D,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,CAAC,IAAI,EAAE,qBAAqB,EAAE,EAAE,EAAE,6BAA6B,CAAC,CAAC,CAAC,KAAK,IAAI,EACrF,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAC;IAER,gBAAgB,CACd,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,kCAAkC,EAC5C,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAC;IAER,mBAAmB,CAAC,CAAC,SAAS,MAAM,6BAA6B,EAC/D,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,CAAC,IAAI,EAAE,qBAAqB,EAAE,EAAE,EAAE,6BAA6B,CAAC,CAAC,CAAC,KAAK,IAAI,EACrF,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,GACvC,IAAI,CAAC;IAER,mBAAmB,CACjB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,kCAAkC,EAC5C,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,GACvC,IAAI,CAAC;CACT;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,qBAAqB,CAAC;KAC3C;CACF"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapted from Angular Material Datepicker
|
|
3
|
+
* Source: https://github.com/angular/components/blob/main/src/material/datepicker/calendar.ts
|
|
4
|
+
*
|
|
5
|
+
* @license MIT
|
|
6
|
+
* Copyright (c) 2025 Google LLC
|
|
7
|
+
* See LICENSE file in the project root for full license text.
|
|
8
|
+
*/
|
|
9
|
+
import { CSSResultGroup, LitElement, PropertyValues } from "lit";
|
|
10
|
+
import "@m3e/web/button";
|
|
11
|
+
import "@m3e/web/icon-button";
|
|
12
|
+
import "@m3e/web/tooltip";
|
|
13
|
+
import { CalendarView } from "./CalendarView";
|
|
14
|
+
import "./MonthViewElement";
|
|
15
|
+
import "./MultiYearViewElement";
|
|
16
|
+
import "./YearViewElement";
|
|
17
|
+
/**
|
|
18
|
+
* A calendar used to select a date.
|
|
19
|
+
*
|
|
20
|
+
* @description
|
|
21
|
+
* The `m3e-calendar` component provides structured navigation and selection across
|
|
22
|
+
* month, year, and multi‑year views. It supports single‑date and range selection,
|
|
23
|
+
* applies disabled rules including minimum, maximum, and blackout constraints, and
|
|
24
|
+
* provides styling hooks for special date states.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* The following example illustrates use of the `m3e-calendar`. In this example, a calendar is displayed
|
|
28
|
+
* with a selected date.
|
|
29
|
+
*
|
|
30
|
+
* ```html
|
|
31
|
+
* <m3e-calendar date="2025-12-13"></m3e-calendar>
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @tag m3e-calendar
|
|
35
|
+
*
|
|
36
|
+
* @slot header - Renders the header of the calendar.
|
|
37
|
+
*
|
|
38
|
+
* @attr date - The selected date.
|
|
39
|
+
* @attr max-date - The maximum date that can be selected.
|
|
40
|
+
* @attr min-date - The minimum date that can be selected.
|
|
41
|
+
* @attr range-end - End of a date range.
|
|
42
|
+
* @attr range-start - Start of a date range.
|
|
43
|
+
* @attr start-at - A date specifying the period (month or year) to start the calendar in.
|
|
44
|
+
* @attr start-view - The initial view used to select a date.
|
|
45
|
+
* @attr previous-month-label - The accessible label given to the button used to move to the previous month.
|
|
46
|
+
* @attr next-month-label - The accessible label given to the button used to move to the next month.
|
|
47
|
+
* @attr previous-year-label - The accessible label given to the button used to move to the previous year.
|
|
48
|
+
* @attr next-year-label - The accessible label given to the button used to move to the next year.
|
|
49
|
+
* @attr previous-multi-year-label - The accessible label given to the button used to move to the previous 24 years.
|
|
50
|
+
* @attr next-multi-year-label - The accessible label given to the button used to move to the next 24 years.
|
|
51
|
+
*
|
|
52
|
+
* @fires change - Emitted when the selected date changes.
|
|
53
|
+
*
|
|
54
|
+
* @cssprop --m3e-calendar-container-color - Background color of the container surface.
|
|
55
|
+
* @cssprop --m3e-calendar-container-elevation - Elevation shadow applied to the container surface.
|
|
56
|
+
* @cssprop --m3e-calendar-container-shape - Corner radius of the container surface.
|
|
57
|
+
* @cssprop --m3e-calendar-padding - Padding applied to the calendar header and body.
|
|
58
|
+
* @cssprop --m3e-calendar-period-button-text-color - Text color used for the period‑navigation buttons in the header.
|
|
59
|
+
* @cssprop --m3e-calendar-weekday-font-size - Font size of weekday labels in month view.
|
|
60
|
+
* @cssprop --m3e-calendar-weekday-font-weight - Font weight of weekday labels in month view.
|
|
61
|
+
* @cssprop --m3e-calendar-weekday-line-height - Line height of weekday labels in month view.
|
|
62
|
+
* @cssprop --m3e-calendar-weekday-tracking - Letter spacing of weekday labels in month view.
|
|
63
|
+
* @cssprop --m3e-calendar-date-font-size - Font size of date cells in month view.
|
|
64
|
+
* @cssprop --m3e-calendar-date-font-weight - Font weight of date cells in month view.
|
|
65
|
+
* @cssprop --m3e-calendar-date-line-height - Line height of date cells in month view.
|
|
66
|
+
* @cssprop --m3e-calendar-date-tracking - Letter spacing of date cells in month view.
|
|
67
|
+
* @cssprop --m3e-calendar-item-font-size - Font size of items in year and multi‑year views.
|
|
68
|
+
* @cssprop --m3e-calendar-item-font-weight - Font weight of items in year and multi‑year views.
|
|
69
|
+
* @cssprop --m3e-calendar-item-line-height - Line height of items in year and multi‑year views.
|
|
70
|
+
* @cssprop --m3e-calendar-item-tracking - Letter spacing of items in year and multi‑year views.
|
|
71
|
+
* @cssprop --m3e-calendar-item-selected-color - Text color for selected date items.
|
|
72
|
+
* @cssprop --m3e-calendar-item-selected-container-color - Background color for selected date items.
|
|
73
|
+
* @cssprop --m3e-calendar-item-selected-ripple-color - Ripple color used when interacting with selected date items.
|
|
74
|
+
* @cssprop --m3e-calendar-item-selected-hover-color - Hover color used when interacting with selected date items.
|
|
75
|
+
* @cssprop --m3e-calendar-item-selected-focus-color - Focus color used when interacting with selected date items.
|
|
76
|
+
* @cssprop --m3e-calendar-item-current-outline-thickness - Outline thickness used to indicate the current date.
|
|
77
|
+
* @cssprop --m3e-calendar-item-current-outline-color - Outline color used to indicate the current date.
|
|
78
|
+
* @cssprop --m3e-calendar-item-special-color - Text color for dates marked as special.
|
|
79
|
+
* @cssprop --m3e-calendar-item-special-container-color - Background color for dates marked as special.
|
|
80
|
+
* @cssprop --m3e-calendar-item-special-ripple-color - Ripple color used when interacting with dates marked as special.
|
|
81
|
+
* @cssprop --m3e-calendar-item-special-hover-color - Hover color used when interacting with dates marked as special.
|
|
82
|
+
* @cssprop --m3e-calendar-item-special-focus-color - Focus color used when interacting with dates marked as special.
|
|
83
|
+
* @cssprop --m3e-calendar-range-container-color - Background color applied to the selected date range.
|
|
84
|
+
* @cssprop --m3e-calendar-range-color - Text color for dates within a selected range.
|
|
85
|
+
* @cssprop --m3e-calendar-item-disabled-color - Color used for disabled date items.
|
|
86
|
+
* @cssprop --m3e-calendar-item-disabled-color-opacity - Opacity applied to the disabled item color.
|
|
87
|
+
* @cssprop --m3e-calendar-slide-animation-duration - Duration of slide transitions between calendar views.
|
|
88
|
+
*/
|
|
89
|
+
export declare class M3eCalendarElement extends LitElement {
|
|
90
|
+
#private;
|
|
91
|
+
/** The styles of the element. */
|
|
92
|
+
static styles: CSSResultGroup;
|
|
93
|
+
/** @private */ private _today;
|
|
94
|
+
/** @private */ private _activeView;
|
|
95
|
+
/** @private */ private _activeDate;
|
|
96
|
+
/** @private */ private readonly _view?;
|
|
97
|
+
/** @private */ private readonly _body;
|
|
98
|
+
/**
|
|
99
|
+
* The initial view used to select a date.
|
|
100
|
+
* @default "month"
|
|
101
|
+
*/
|
|
102
|
+
startView: CalendarView;
|
|
103
|
+
/**
|
|
104
|
+
* The selected date.
|
|
105
|
+
* @default null
|
|
106
|
+
*/
|
|
107
|
+
date: Date | null;
|
|
108
|
+
/**
|
|
109
|
+
* A date specifying the period (month or year) to start the calendar in.
|
|
110
|
+
* @default null
|
|
111
|
+
*/
|
|
112
|
+
startAt: Date | null;
|
|
113
|
+
/**
|
|
114
|
+
* The minimum date that can be selected.
|
|
115
|
+
* @default null
|
|
116
|
+
*/
|
|
117
|
+
minDate: Date | null;
|
|
118
|
+
/**
|
|
119
|
+
* The maximum date that can be selected.
|
|
120
|
+
* @default null
|
|
121
|
+
*/
|
|
122
|
+
maxDate: Date | null;
|
|
123
|
+
/**
|
|
124
|
+
* Start of a date range.
|
|
125
|
+
* @default null
|
|
126
|
+
*/
|
|
127
|
+
rangeStart: Date | null;
|
|
128
|
+
/**
|
|
129
|
+
* End of a date range.
|
|
130
|
+
* @default null
|
|
131
|
+
*/
|
|
132
|
+
rangeEnd: Date | null;
|
|
133
|
+
/**
|
|
134
|
+
* A function used to determine whether a date cannot be selected.
|
|
135
|
+
* @default null
|
|
136
|
+
*/
|
|
137
|
+
blackoutDates: ((date: Date) => boolean) | null;
|
|
138
|
+
/**
|
|
139
|
+
* A function used to determine whether a date is special.
|
|
140
|
+
* @default null
|
|
141
|
+
*/
|
|
142
|
+
specialDates: ((date: Date) => boolean) | null;
|
|
143
|
+
/**
|
|
144
|
+
* The accessible label given to the button used to move to the previous month.
|
|
145
|
+
* @default "Previous month"
|
|
146
|
+
*/
|
|
147
|
+
previousMonthLabel: string;
|
|
148
|
+
/**
|
|
149
|
+
* The accessible label given to the button used to move to the previous year.
|
|
150
|
+
* @default "Previous year"
|
|
151
|
+
*/
|
|
152
|
+
previousYearLabel: string;
|
|
153
|
+
/**
|
|
154
|
+
* The accessible label given to the button used to move to the previous 24 years.
|
|
155
|
+
* @default "Previous 24 years"
|
|
156
|
+
*/
|
|
157
|
+
previousMultiYearLabel: string;
|
|
158
|
+
/**
|
|
159
|
+
* The accessible label given to the button used to move to the next month.
|
|
160
|
+
* @default "Next month"
|
|
161
|
+
*/
|
|
162
|
+
nextMonthLabel: string;
|
|
163
|
+
/**
|
|
164
|
+
* The accessible label given to the button used to move to the next year.
|
|
165
|
+
* @default "Next year"
|
|
166
|
+
*/
|
|
167
|
+
nextYearLabel: string;
|
|
168
|
+
/**
|
|
169
|
+
* The accessible label given to the button used to move to the next 24 years.
|
|
170
|
+
* @default "Next 24 years"
|
|
171
|
+
*/
|
|
172
|
+
nextMultiYearLabel: string;
|
|
173
|
+
/** The label to present for the current period. */
|
|
174
|
+
get periodLabel(): string;
|
|
175
|
+
/** Whether the calendar can move to the previous period. */
|
|
176
|
+
get canMovePreviousPeriod(): boolean;
|
|
177
|
+
/** Whether the calendar can move to the next period. */
|
|
178
|
+
get canMoveNextPeriod(): boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Asynchronously focuses the active date.
|
|
181
|
+
* @returns {Promise<void>} A promise that resolves after the active date has been focused.
|
|
182
|
+
*/
|
|
183
|
+
focusActiveCell(): Promise<void>;
|
|
184
|
+
/** Updates today's date. */
|
|
185
|
+
updateTodayDate(): void;
|
|
186
|
+
/**
|
|
187
|
+
* Moves the calendar to the previous period.
|
|
188
|
+
* @returns {Promise<void>} A promise that resolves when the operation is complete.
|
|
189
|
+
*/
|
|
190
|
+
movePreviousPeriod(): Promise<void>;
|
|
191
|
+
/**
|
|
192
|
+
* Moves the calendar to the next period.
|
|
193
|
+
* @returns {Promise<void>} A promise that resolves when the operation is complete.
|
|
194
|
+
*/
|
|
195
|
+
moveNextPeriod(): Promise<void>;
|
|
196
|
+
/**
|
|
197
|
+
* Toggles the current period.
|
|
198
|
+
* @returns {Promise<void>} A promise that resolves when the operation is complete.
|
|
199
|
+
*/
|
|
200
|
+
togglePeriod(): Promise<void>;
|
|
201
|
+
/** @inheritdoc */
|
|
202
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
203
|
+
/** @inheritdoc */
|
|
204
|
+
protected updated(_changedProperties: PropertyValues<this>): void;
|
|
205
|
+
/** @inheritdoc */
|
|
206
|
+
protected render(): unknown;
|
|
207
|
+
}
|
|
208
|
+
declare global {
|
|
209
|
+
interface HTMLElementTagNameMap {
|
|
210
|
+
"m3e-calendar": M3eCalendarElement;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
//# sourceMappingURL=CalendarElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalendarElement.d.ts","sourceRoot":"","sources":["../../../src/calendar/CalendarElement.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAa,MAAM,KAAK,CAAC;AAQvF,OAAO,iBAAiB,CAAC;AACzB,OAAO,sBAAsB,CAAC;AAC9B,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAK9C,OAAO,oBAAoB,CAAC;AAC5B,OAAO,wBAAwB,CAAC;AAChC,OAAO,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;AACH,qBACa,kBAAmB,SAAQ,UAAU;;IAChD,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CA8GpC;IAGF,eAAe,CAAU,OAAO,CAAC,MAAM,CAAc;IACrD,eAAe,CAAU,OAAO,CAAC,WAAW,CAAyB;IACrE,eAAe,CAAU,OAAO,CAAC,WAAW,CAAoB;IAChE,eAAe,CAAmB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAA0B;IACnF,eAAe,CAAiB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAe;IAErE;;;OAGG;IACoC,SAAS,EAAE,YAAY,CAAW;IAEzE;;;OAGG;IACqC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAQ;IAEjE;;;OAGG;I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kBAAkB;cACC,OAAO,CAAC,kBAAkB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAa1E,kBAAkB;cACC,MAAM,IAAI,OAAO;CAwNrC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,kBAAkB,CAAC;KACpC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalendarView.d.ts","sourceRoot":"","sources":["../../../src/calendar/CalendarView.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CSSResultGroup, LitElement } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* A base implementation for a view in a calendar. This class must be inherited.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class CalendarViewElementBase extends LitElement {
|
|
7
|
+
/** The styles of the element. */
|
|
8
|
+
static styles: CSSResultGroup;
|
|
9
|
+
/** @private */ private readonly _activeItem?;
|
|
10
|
+
/** Today's date. */
|
|
11
|
+
today: Date;
|
|
12
|
+
/** The selected date. */
|
|
13
|
+
date: Date | null;
|
|
14
|
+
/** The active date. */
|
|
15
|
+
activeDate: Date;
|
|
16
|
+
/** The minimum date that can be selected. */
|
|
17
|
+
minDate: Date | null;
|
|
18
|
+
/** The maximum date that can be selected. */
|
|
19
|
+
maxDate: Date | null;
|
|
20
|
+
/**
|
|
21
|
+
* Asynchronously focuses the active date.
|
|
22
|
+
* @returns {Promise<void>} A promise that resolves after the active date has been focused.
|
|
23
|
+
*/
|
|
24
|
+
focusActiveCell(): Promise<void>;
|
|
25
|
+
/** @internal */
|
|
26
|
+
protected _changeActiveDate(activeDate: Date): void;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=CalendarViewElementBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalendarViewElementBase.d.ts","sourceRoot":"","sources":["../../../src/calendar/CalendarViewElementBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAOtD;;;GAGG;AACH,8BAAsB,uBAAwB,SAAQ,UAAU;IAC9D,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CAyGpC;IAEF,eAAe,CAA2B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAc;IAErF,oBAAoB;IACoB,KAAK,EAAE,IAAI,CAAc;IAEjE,yBAAyB;IACe,IAAI,EAAE,IAAI,GAAG,IAAI,CAAQ;IAEjE,uBAAuB;IAC2C,UAAU,EAAE,IAAI,CAAc;IAEhG,6CAA6C;IACkB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAQ;IAE3F,6CAA6C;IACkB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAQ;IAE3F;;;OAGG;IACG,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAUtC,gBAAgB;IAChB,SAAS,CAAC,iBAAiB,CAAC,UAAU,EAAE,IAAI,GAAG,IAAI;CAWpD"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapted from Angular Material Datepicker
|
|
3
|
+
* Source: https://github.com/angular/components/blob/main/src/material/datepicker/month-view.ts
|
|
4
|
+
*
|
|
5
|
+
* @license MIT
|
|
6
|
+
* Copyright (c) 2025 Google LLC
|
|
7
|
+
* See LICENSE file in the project root for full license text.
|
|
8
|
+
*/
|
|
9
|
+
import { CSSResultGroup } from "lit";
|
|
10
|
+
import { CalendarViewElementBase } from "./CalendarViewElementBase";
|
|
11
|
+
/**
|
|
12
|
+
* An internal component used to display a single month in a calendar.
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare class M3eMonthViewElement extends CalendarViewElementBase {
|
|
16
|
+
#private;
|
|
17
|
+
/** The styles of the element. */
|
|
18
|
+
static styles: CSSResultGroup;
|
|
19
|
+
/** @internal */ _suppressFocusHighlight: boolean;
|
|
20
|
+
/** Start of a date range. */
|
|
21
|
+
rangeStart: Date | null;
|
|
22
|
+
/** End of a date range. */
|
|
23
|
+
rangeEnd: Date | null;
|
|
24
|
+
/** A function used to determine whether a date cannot be selected. */
|
|
25
|
+
blackoutDates: ((date: Date) => boolean) | null;
|
|
26
|
+
/** A function used to determine whether a date is special. */
|
|
27
|
+
specialDates: ((date: Date) => boolean) | null;
|
|
28
|
+
/** @inheritdoc */
|
|
29
|
+
protected render(): unknown;
|
|
30
|
+
}
|
|
31
|
+
declare global {
|
|
32
|
+
interface HTMLElementTagNameMap {
|
|
33
|
+
"m3e-month-view": M3eMonthViewElement;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=MonthViewElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MonthViewElement.d.ts","sourceRoot":"","sources":["../../../src/calendar/MonthViewElement.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAO,cAAc,EAAiB,MAAM,KAAK,CAAC;AAQzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAWpE;;;GAGG;AACH,qBACa,mBAAoB,SAAQ,uBAAuB;;IAC9D,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CAwHpC;IAEF,gBAAgB,CAAC,uBAAuB,UAAQ;IAEhD,6BAA6B;IACqC,UAAU,EAAE,IAAI,GAAG,IAAI,CAAQ;IAEjG,2BAA2B;IACqC,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAQ;IAE7F,sEAAsE;IACtC,aAAa,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,GAAG,IAAI,CAAQ;IAEvF,8DAA8D;IAC9B,YAAY,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,GAAG,IAAI,CAAQ;IAEtF,kBAAkB;cACC,MAAM,IAAI,OAAO;CAiQrC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,mBAAmB,CAAC;KACvC;CACF"}
|