carbon-components-angular 6.0.0-rc.1 → 6.0.0-rc.2
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 +1 -1
- package/button/icon-button.component.d.ts +5 -1
- package/combobox/combobox.component.d.ts +7 -2
- package/docs/documentation/components/Accordion.html +2 -2
- package/docs/documentation/components/AccordionItem.html +2 -2
- package/docs/documentation/components/ActionableNotification.html +2 -2
- package/docs/documentation/components/AlertModal.html +2 -2
- package/docs/documentation/components/BaseIconButton.html +2 -2
- package/docs/documentation/components/BaseNotification.html +2 -2
- package/docs/documentation/components/BaseTabHeader.html +2 -2
- package/docs/documentation/components/Breadcrumb.html +2 -2
- package/docs/documentation/components/BreadcrumbItemComponent.html +2 -2
- package/docs/documentation/components/ButtonSet.html +2 -2
- package/docs/documentation/components/Checkbox.html +2 -2
- package/docs/documentation/components/ClickableTile.html +2 -2
- package/docs/documentation/components/CodeSnippet.html +2 -2
- package/docs/documentation/components/ComboBox.html +305 -214
- package/docs/documentation/components/ContainedList.html +2 -2
- package/docs/documentation/components/ContainedListItem.html +2 -2
- package/docs/documentation/components/ContentSwitcher.html +2 -2
- package/docs/documentation/components/ContextMenuComponent.html +2 -2
- package/docs/documentation/components/ContextMenuDividerComponent.html +2 -2
- package/docs/documentation/components/ContextMenuGroupComponent.html +2 -2
- package/docs/documentation/components/ContextMenuItemComponent.html +2 -2
- package/docs/documentation/components/DatePicker.html +2 -2
- package/docs/documentation/components/DatePickerInput.html +2 -2
- package/docs/documentation/components/Dialog.html +2 -2
- package/docs/documentation/components/Documentation.html +2 -2
- package/docs/documentation/components/Dropdown.html +506 -154
- package/docs/documentation/components/DropdownList.html +2 -2
- package/docs/documentation/components/ExpandableTile.html +2 -2
- package/docs/documentation/components/FileComponent.html +2 -2
- package/docs/documentation/components/FileUploader.html +2 -2
- package/docs/documentation/components/Hamburger.html +2 -2
- package/docs/documentation/components/Header.html +2 -2
- package/docs/documentation/components/HeaderAction.html +2 -2
- package/docs/documentation/components/HeaderGlobal.html +2 -2
- package/docs/documentation/components/HeaderItem.html +2 -2
- package/docs/documentation/components/HeaderMenu.html +2 -2
- package/docs/documentation/components/HeaderNavigation.html +2 -2
- package/docs/documentation/components/IconButton.html +55 -16
- package/docs/documentation/components/InlineLoading.html +2 -2
- package/docs/documentation/components/Label.html +2 -2
- package/docs/documentation/components/ListColumn.html +2 -2
- package/docs/documentation/components/ListHeader.html +2 -2
- package/docs/documentation/components/ListRow.html +2 -2
- package/docs/documentation/components/Loading.html +2 -2
- package/docs/documentation/components/Modal.html +2 -2
- package/docs/documentation/components/ModalFooter.html +2 -2
- package/docs/documentation/components/ModalHeader.html +2 -2
- package/docs/documentation/components/Notification.html +2 -2
- package/docs/documentation/components/NumberComponent.html +2 -2
- package/docs/documentation/components/OverflowMenu.html +2 -2
- package/docs/documentation/components/OverflowMenuCustomPane.html +2 -2
- package/docs/documentation/components/OverflowMenuOption.html +2 -2
- package/docs/documentation/components/OverflowMenuPane.html +2 -2
- package/docs/documentation/components/Overlay.html +2 -2
- package/docs/documentation/components/Pagination.html +2 -2
- package/docs/documentation/components/PaginationNav.html +2 -2
- package/docs/documentation/components/PaginationNavItem.html +2 -2
- package/docs/documentation/components/PaginationOverflow.html +2 -2
- package/docs/documentation/components/Panel.html +2 -2
- package/docs/documentation/components/PasswordInputLabelComponent.html +2 -2
- package/docs/documentation/components/Placeholder.html +2 -2
- package/docs/documentation/components/PopoverContent.html +2 -2
- package/docs/documentation/components/ProgressBar.html +2 -2
- package/docs/documentation/components/ProgressIndicator.html +2 -2
- package/docs/documentation/components/Radio.html +2 -2
- package/docs/documentation/components/RadioGroup.html +2 -2
- package/docs/documentation/components/Search.html +2 -2
- package/docs/documentation/components/Select.html +2 -2
- package/docs/documentation/components/SelectionTile.html +2 -2
- package/docs/documentation/components/SideNav.html +2 -2
- package/docs/documentation/components/SideNavItem.html +2 -2
- package/docs/documentation/components/SideNavMenu.html +2 -2
- package/docs/documentation/components/SkeletonPlaceholder.html +2 -2
- package/docs/documentation/components/SkeletonText.html +2 -2
- package/docs/documentation/components/Slider.html +2 -2
- package/docs/documentation/components/StructuredList.html +2 -2
- package/docs/documentation/components/SwitcherList.html +2 -2
- package/docs/documentation/components/SwitcherListItem.html +2 -2
- package/docs/documentation/components/Tab.html +2 -2
- package/docs/documentation/components/TabHeaderGroup.html +2 -2
- package/docs/documentation/components/TabHeaders.html +2 -2
- package/docs/documentation/components/TabSkeleton.html +2 -2
- package/docs/documentation/components/Table.html +2 -2
- package/docs/documentation/components/TableBody.html +2 -2
- package/docs/documentation/components/TableCheckbox.html +2 -2
- package/docs/documentation/components/TableContainer.html +2 -2
- package/docs/documentation/components/TableData.html +2 -2
- package/docs/documentation/components/TableExpandButton.html +2 -2
- package/docs/documentation/components/TableExpandedRow.html +2 -2
- package/docs/documentation/components/TableHead.html +2 -2
- package/docs/documentation/components/TableHeadCell.html +2 -2
- package/docs/documentation/components/TableHeadCheckbox.html +2 -2
- package/docs/documentation/components/TableHeadExpand.html +2 -2
- package/docs/documentation/components/TableHeader.html +2 -2
- package/docs/documentation/components/TableRadio.html +2 -2
- package/docs/documentation/components/TableRowComponent.html +2 -2
- package/docs/documentation/components/TableToolbar.html +2 -2
- package/docs/documentation/components/TableToolbarActions.html +2 -2
- package/docs/documentation/components/TableToolbarContent.html +2 -2
- package/docs/documentation/components/TableToolbarSearch.html +2 -2
- package/docs/documentation/components/Tabs.html +2 -2
- package/docs/documentation/components/Tag.html +73 -13
- package/docs/documentation/components/TagFilter.html +116 -51
- package/docs/documentation/components/TagOperationalComponent.html +919 -0
- package/docs/documentation/components/TagSelectableComponent.html +1084 -0
- package/docs/documentation/components/TextInputLabelComponent.html +78 -32
- package/docs/documentation/components/TextareaLabelComponent.html +2 -2
- package/docs/documentation/components/Tile.html +2 -2
- package/docs/documentation/components/TileGroup.html +2 -2
- package/docs/documentation/components/TimePicker.html +2 -2
- package/docs/documentation/components/TimePickerSelect.html +2 -2
- package/docs/documentation/components/Toast.html +2 -2
- package/docs/documentation/components/Toggle.html +81 -67
- package/docs/documentation/components/Toggletip.html +2 -2
- package/docs/documentation/components/Tooltip.html +2 -2
- package/docs/documentation/components/TooltipDefinition.html +2 -2
- package/docs/documentation/components/TreeNodeComponent.html +2 -2
- package/docs/documentation/components/TreeViewComponent.html +2 -2
- package/docs/documentation/coverage.html +86 -26
- package/docs/documentation/directives/ClickableTileIconDirective.html +367 -0
- package/docs/documentation/directives/IconDirective.html +6 -5
- package/docs/documentation/directives/LinkIconDirective.html +367 -0
- package/docs/documentation/directives/List.html +66 -8
- package/docs/documentation/directives/TagIconDirective.html +367 -0
- package/docs/documentation/graph/dependencies.svg +2767 -2647
- package/docs/documentation/index.html +1 -1
- package/docs/documentation/js/menu-wc.js +38 -12
- package/docs/documentation/js/menu-wc_es5.js +1 -1
- package/docs/documentation/js/search/search_index.js +2 -2
- package/docs/documentation/miscellaneous/enumerations.html +8 -8
- package/docs/documentation/modules/CodeSnippetModule/dependencies.svg +4 -4
- package/docs/documentation/modules/CodeSnippetModule.html +4 -4
- package/docs/documentation/modules/ComboBoxModule/dependencies.svg +6 -6
- package/docs/documentation/modules/ComboBoxModule.html +6 -6
- package/docs/documentation/modules/DatePickerInputModule/dependencies.svg +8 -8
- package/docs/documentation/modules/DatePickerInputModule.html +8 -8
- package/docs/documentation/modules/DatePickerModule/dependencies.svg +49 -53
- package/docs/documentation/modules/DatePickerModule.html +49 -53
- package/docs/documentation/modules/FileUploaderModule/dependencies.svg +34 -34
- package/docs/documentation/modules/FileUploaderModule.html +34 -34
- package/docs/documentation/modules/GridModule/dependencies.svg +60 -60
- package/docs/documentation/modules/GridModule.html +60 -60
- package/docs/documentation/modules/LinkModule/dependencies.svg +41 -17
- package/docs/documentation/modules/LinkModule.html +52 -19
- package/docs/documentation/modules/LoadingModule/dependencies.svg +4 -4
- package/docs/documentation/modules/LoadingModule.html +4 -4
- package/docs/documentation/modules/RadioModule/dependencies.svg +35 -35
- package/docs/documentation/modules/RadioModule.html +35 -35
- package/docs/documentation/modules/SliderModule/dependencies.svg +4 -4
- package/docs/documentation/modules/SliderModule.html +4 -4
- package/docs/documentation/modules/StructuredListModule/dependencies.svg +66 -66
- package/docs/documentation/modules/StructuredListModule.html +66 -66
- package/docs/documentation/modules/TableModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TableModule.html +4 -4
- package/docs/documentation/modules/TabsModule/dependencies.svg +68 -68
- package/docs/documentation/modules/TabsModule.html +68 -68
- package/docs/documentation/modules/TagModule/dependencies.svg +123 -51
- package/docs/documentation/modules/TagModule.html +160 -55
- package/docs/documentation/modules/ThemeModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ThemeModule.html +4 -4
- package/docs/documentation/modules/TilesModule/dependencies.svg +149 -125
- package/docs/documentation/modules/TilesModule.html +158 -125
- package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +44 -40
- package/docs/documentation/modules/TimePickerSelectModule.html +44 -40
- package/docs/documentation/modules/ToggleModule/dependencies.svg +17 -17
- package/docs/documentation/modules/ToggleModule.html +17 -17
- package/docs/documentation/modules/ToggletipModule/dependencies.svg +37 -37
- package/docs/documentation/modules/ToggletipModule.html +37 -37
- package/docs/documentation/modules/TooltipModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TooltipModule.html +4 -4
- package/docs/documentation/modules/TreeviewModule/dependencies.svg +26 -26
- package/docs/documentation/modules/TreeviewModule.html +26 -26
- package/docs/documentation/overview.html +2769 -2649
- package/docs/documentation.json +1723 -455
- package/docs/storybook/117.d138a78b.iframe.bundle.js +1 -0
- package/docs/storybook/1490.92c45b08.iframe.bundle.js +1 -0
- package/docs/storybook/3419.806be468.iframe.bundle.js +1 -0
- package/docs/storybook/{4333.3306b291.iframe.bundle.js → 4333.ee67f563.iframe.bundle.js} +1 -1
- package/docs/storybook/{4637.2867ca6f.iframe.bundle.js → 4637.1182aca8.iframe.bundle.js} +1 -1
- package/docs/storybook/5351.dfea6a5b.iframe.bundle.js +1 -0
- package/docs/storybook/8383.74dc30c9.iframe.bundle.js +1 -0
- package/docs/storybook/accordion-accordion-stories.92f0aea9.iframe.bundle.js +1 -0
- package/docs/storybook/button-button-set-stories.78832e6c.iframe.bundle.js +1 -0
- package/docs/storybook/button-button-stories.ea38b069.iframe.bundle.js +1 -0
- package/docs/storybook/button-icon-button-stories.e9bbdeae.iframe.bundle.js +1 -0
- package/docs/storybook/code-snippet-code-snippet-stories.845d66ed.iframe.bundle.js +1 -0
- package/docs/storybook/combobox-combobox-stories.707e1802.iframe.bundle.js +1 -0
- package/docs/storybook/contained-list-contained-list-stories.92c680b8.iframe.bundle.js +1 -0
- package/docs/storybook/context-menu-context-menu-stories.59d5cac4.iframe.bundle.js +1 -0
- package/docs/storybook/datepicker-datepicker-stories.e7b62202.iframe.bundle.js +1 -0
- package/docs/storybook/dropdown-dropdown-stories.0d63845a.iframe.bundle.js +1 -0
- package/docs/storybook/icon-icon-stories.8d4654b2.iframe.bundle.js +1 -0
- package/docs/storybook/iframe.html +2 -2
- package/docs/storybook/index-stories.66f86530.iframe.bundle.js +1 -0
- package/docs/storybook/index.json +1 -1
- package/docs/storybook/inline-loading-inline-loading-stories.b3477958.iframe.bundle.js +1 -0
- package/docs/storybook/input-input-stories.6eca9c7d.iframe.bundle.js +1 -0
- package/docs/storybook/input-password-stories.2826ff49.iframe.bundle.js +1 -0
- package/docs/storybook/input-textarea-stories.4f5775b4.iframe.bundle.js +1 -0
- package/docs/storybook/link-link-stories.e07fa679.iframe.bundle.js +1 -0
- package/docs/storybook/{list-list-stories.56e9e562.iframe.bundle.js → list-list-stories.957efb51.iframe.bundle.js} +1 -1
- package/docs/storybook/main.45a88baf.iframe.bundle.js +1 -0
- package/docs/storybook/main.css +912 -189
- package/docs/storybook/number-input-number-stories.c8a0e58c.iframe.bundle.js +1 -0
- package/docs/storybook/patterns-dialogs-modal-with-table-stories.44f68be6.iframe.bundle.js +1 -0
- package/docs/storybook/patterns-filtering-multiple-categories-stories.2f66407e.iframe.bundle.js +1 -0
- package/docs/storybook/patterns-loading-large-loading-stories.8333afb1.iframe.bundle.js +1 -0
- package/docs/storybook/progress-bar-progress-bar-stories.645f83b4.iframe.bundle.js +1 -0
- package/docs/storybook/progress-indicator-progress-indicator-stories.4205d95b.iframe.bundle.js +1 -0
- package/docs/storybook/project.json +1 -1
- package/docs/storybook/radio-radio-stories.5dc425e5.iframe.bundle.js +1 -0
- package/docs/storybook/{runtime~main.e516577a.iframe.bundle.js → runtime~main.b822f6e3.iframe.bundle.js} +1 -1
- package/docs/storybook/search-search-stories.69ac59e9.iframe.bundle.js +1 -0
- package/docs/storybook/stories.json +1 -1
- package/docs/storybook/structured-list-structured-list-stories.8c6c973c.iframe.bundle.js +1 -0
- package/docs/storybook/tag-tag-stories.f8ad24e6.iframe.bundle.js +1 -0
- package/docs/storybook/tiles-clickable-tile-stories.c2639981.iframe.bundle.js +1 -0
- package/docs/storybook/tiles-expandable-tile-stories.9aefae5c.iframe.bundle.js +1 -0
- package/docs/storybook/{toggle-toggle-stories.d4666f95.iframe.bundle.js → toggle-toggle-stories.37f7153e.iframe.bundle.js} +1 -1
- package/docs/storybook/toggletip-toggletip-stories.895fd677.iframe.bundle.js +1 -0
- package/docs/storybook/treeview-treeview-stories.ac4bcee5.iframe.bundle.js +1 -0
- package/docs/storybook/ui-shell-ui-shell-stories.9b5a8c7f.iframe.bundle.js +1 -0
- package/dropdown/dropdown.component.d.ts +12 -3
- package/esm2022/button/icon-button.component.mjs +10 -4
- package/esm2022/code-snippet/code-snippet.component.mjs +1 -1
- package/esm2022/combobox/combobox.component.mjs +46 -15
- package/esm2022/dropdown/dropdown.component.mjs +79 -37
- package/esm2022/icon/icon.directive.mjs +3 -2
- package/esm2022/input/text-input-label.component.mjs +4 -1
- package/esm2022/link/index.mjs +2 -1
- package/esm2022/link/link-icon.directive.mjs +19 -0
- package/esm2022/link/link.module.mjs +9 -4
- package/esm2022/list/list.directive.mjs +12 -3
- package/esm2022/modal/modal-header.component.mjs +1 -1
- package/esm2022/pagination/pagination-nav/pagination-nav.component.mjs +1 -1
- package/esm2022/tag/index.mjs +4 -1
- package/esm2022/tag/tag-filter.component.mjs +47 -32
- package/esm2022/tag/tag-icon.directive.mjs +19 -0
- package/esm2022/tag/tag-operational.component.mjs +62 -0
- package/esm2022/tag/tag-selectable.component.mjs +89 -0
- package/esm2022/tag/tag.component.mjs +28 -4
- package/esm2022/tag/tag.module.mjs +27 -4
- package/esm2022/tiles/clickable-tile-icon.directive.mjs +19 -0
- package/esm2022/tiles/index.mjs +2 -1
- package/esm2022/tiles/tiles.module.mjs +6 -1
- package/esm2022/toggle/toggle.component.mjs +9 -4
- package/esm2022/ui-shell/header/header-action.component.mjs +1 -1
- package/fesm2022/carbon-components-angular-button.mjs +9 -3
- package/fesm2022/carbon-components-angular-button.mjs.map +1 -1
- package/fesm2022/carbon-components-angular-code-snippet.mjs +1 -1
- package/fesm2022/carbon-components-angular-code-snippet.mjs.map +1 -1
- package/fesm2022/carbon-components-angular-combobox.mjs +45 -14
- package/fesm2022/carbon-components-angular-combobox.mjs.map +1 -1
- package/fesm2022/carbon-components-angular-dropdown.mjs +79 -37
- package/fesm2022/carbon-components-angular-dropdown.mjs.map +1 -1
- package/fesm2022/carbon-components-angular-icon.mjs +2 -1
- package/fesm2022/carbon-components-angular-icon.mjs.map +1 -1
- package/fesm2022/carbon-components-angular-input.mjs +3 -0
- package/fesm2022/carbon-components-angular-input.mjs.map +1 -1
- package/fesm2022/carbon-components-angular-link.mjs +25 -4
- package/fesm2022/carbon-components-angular-link.mjs.map +1 -1
- package/fesm2022/carbon-components-angular-list.mjs +11 -2
- package/fesm2022/carbon-components-angular-list.mjs.map +1 -1
- package/fesm2022/carbon-components-angular-modal.mjs +1 -1
- package/fesm2022/carbon-components-angular-modal.mjs.map +1 -1
- package/fesm2022/carbon-components-angular-pagination.mjs +1 -1
- package/fesm2022/carbon-components-angular-pagination.mjs.map +1 -1
- package/fesm2022/carbon-components-angular-tag.mjs +259 -40
- package/fesm2022/carbon-components-angular-tag.mjs.map +1 -1
- package/fesm2022/carbon-components-angular-tiles.mjs +23 -2
- package/fesm2022/carbon-components-angular-tiles.mjs.map +1 -1
- package/fesm2022/carbon-components-angular-toggle.mjs +8 -3
- package/fesm2022/carbon-components-angular-toggle.mjs.map +1 -1
- package/fesm2022/carbon-components-angular-ui-shell.mjs +1 -1
- package/fesm2022/carbon-components-angular-ui-shell.mjs.map +1 -1
- package/input/text-input-label.component.d.ts +3 -2
- package/link/index.d.ts +1 -0
- package/link/link-icon.directive.d.ts +26 -0
- package/link/link.module.d.ts +3 -2
- package/list/list.directive.d.ts +5 -1
- package/package.json +1 -1
- package/tag/index.d.ts +3 -0
- package/tag/tag-filter.component.d.ts +5 -1
- package/tag/tag-icon.directive.d.ts +26 -0
- package/tag/tag-operational.component.d.ts +35 -0
- package/tag/tag-selectable.component.d.ts +42 -0
- package/tag/tag.component.d.ts +7 -2
- package/tag/tag.module.d.ts +6 -3
- package/tiles/clickable-tile-icon.directive.d.ts +26 -0
- package/tiles/index.d.ts +1 -0
- package/tiles/tiles.module.d.ts +11 -10
- package/toggle/toggle.component.d.ts +6 -1
- package/docs/storybook/117.5d56f728.iframe.bundle.js +0 -1
- package/docs/storybook/1490.c09c967b.iframe.bundle.js +0 -1
- package/docs/storybook/2641.22111a5a.iframe.bundle.js +0 -1
- package/docs/storybook/5351.afa38aa0.iframe.bundle.js +0 -1
- package/docs/storybook/8383.348fbbdd.iframe.bundle.js +0 -1
- package/docs/storybook/IBMPlexMono-Italic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-Italic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-Italic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-Italic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-Italic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexMono-Light-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-Light-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-Light-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-Light-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-Light-Pi.woff +0 -0
- package/docs/storybook/IBMPlexMono-LightItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-LightItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-LightItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-LightItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-LightItalic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexMono-Regular-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-Regular-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-Regular-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-Regular-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-Regular-Pi.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBold-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBold-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBold-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBold-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBold-Pi.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBoldItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBoldItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBoldItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBoldItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBoldItalic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-Italic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-Italic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-Italic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-Italic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-Italic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-Light-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-Light-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-Light-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-Light-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-Light-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-LightItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-LightItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-LightItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-LightItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-LightItalic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-Regular-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-Regular-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-Regular-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-Regular-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-Regular-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBold-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBold-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBold-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBold-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBold-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBoldItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBoldItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBoldItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBoldItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBoldItalic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Italic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Italic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Italic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Italic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Italic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Light-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Light-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Light-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Light-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Light-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-LightItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-LightItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-LightItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-LightItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-LightItalic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Regular-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Regular-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Regular-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Regular-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Regular-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBold-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBold-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBold-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBold-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBold-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBoldItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBoldItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBoldItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBoldItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBoldItalic-Pi.woff +0 -0
- package/docs/storybook/accordion-accordion-stories.7468f099.iframe.bundle.js +0 -1
- package/docs/storybook/button-button-set-stories.c7adac6a.iframe.bundle.js +0 -1
- package/docs/storybook/button-button-stories.1c45cf01.iframe.bundle.js +0 -1
- package/docs/storybook/button-icon-button-stories.63c78bd5.iframe.bundle.js +0 -1
- package/docs/storybook/code-snippet-code-snippet-stories.e00add3a.iframe.bundle.js +0 -1
- package/docs/storybook/combobox-combobox-stories.216aef5a.iframe.bundle.js +0 -1
- package/docs/storybook/contained-list-contained-list-stories.69aa72f2.iframe.bundle.js +0 -1
- package/docs/storybook/context-menu-context-menu-stories.6d7f479b.iframe.bundle.js +0 -1
- package/docs/storybook/datepicker-datepicker-stories.3cd783d9.iframe.bundle.js +0 -1
- package/docs/storybook/dropdown-dropdown-stories.d648035e.iframe.bundle.js +0 -1
- package/docs/storybook/icon-icon-stories.2e2ba0d1.iframe.bundle.js +0 -1
- package/docs/storybook/index-stories.a7ef7d5f.iframe.bundle.js +0 -1
- package/docs/storybook/inline-loading-inline-loading-stories.524edaf4.iframe.bundle.js +0 -1
- package/docs/storybook/input-input-stories.ee8c4e49.iframe.bundle.js +0 -1
- package/docs/storybook/input-password-stories.6baa3dd4.iframe.bundle.js +0 -1
- package/docs/storybook/input-textarea-stories.fb36d3da.iframe.bundle.js +0 -1
- package/docs/storybook/link-link-stories.b5dd0484.iframe.bundle.js +0 -1
- package/docs/storybook/main.f0db303d.iframe.bundle.js +0 -1
- package/docs/storybook/number-input-number-stories.0b7dd344.iframe.bundle.js +0 -1
- package/docs/storybook/patterns-dialogs-modal-with-table-stories.692bd7e3.iframe.bundle.js +0 -1
- package/docs/storybook/patterns-filtering-multiple-categories-stories.d3558915.iframe.bundle.js +0 -1
- package/docs/storybook/patterns-loading-large-loading-stories.09691e11.iframe.bundle.js +0 -1
- package/docs/storybook/progress-bar-progress-bar-stories.6d536423.iframe.bundle.js +0 -1
- package/docs/storybook/progress-indicator-progress-indicator-stories.f3b0ece7.iframe.bundle.js +0 -1
- package/docs/storybook/radio-radio-stories.35ae8c9f.iframe.bundle.js +0 -1
- package/docs/storybook/search-search-stories.fecf118a.iframe.bundle.js +0 -1
- package/docs/storybook/structured-list-structured-list-stories.a118d424.iframe.bundle.js +0 -1
- package/docs/storybook/tag-tag-stories.102bd470.iframe.bundle.js +0 -1
- package/docs/storybook/tiles-clickable-tile-stories.e3639902.iframe.bundle.js +0 -1
- package/docs/storybook/tiles-expandable-tile-stories.b319601f.iframe.bundle.js +0 -1
- package/docs/storybook/toggletip-toggletip-stories.0e5e2d69.iframe.bundle.js +0 -1
- package/docs/storybook/treeview-treeview-stories.ec11e861.iframe.bundle.js +0 -1
- package/docs/storybook/ui-shell-ui-shell-stories.522593d6.iframe.bundle.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[8383],{"./src/dropdown/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Jn:()=>AbstractDropdownView,ms:()=>Dropdown,kr:()=>DropdownModule,LA:()=>DropdownService});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),Subscription=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/Subscription.js"),of=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js");let AbstractDropdownView=class AbstractDropdownView{constructor(){this.type="single",this.size="md"}set items(value){}get items(){}getNextItem(){}hasNextElement(){}getNextElement(){}getPrevItem(){}hasPrevElement(){}getPrevElement(){}getSelected(){}getCurrentItem(){}getCurrentElement(){}getListItems(){}propagateSelected(value){}filterBy(value){}initFocus(){}onItemsReady(subcription){}reorderSelected(moveFocus){}static{this.propDecorators={items:[{type:core.Input}],select:[{type:core.Output}],blurIntent:[{type:core.Output}]}}};AbstractDropdownView=(0,tslib_es6.Cg)([(0,core.Directive)({selector:"[cdsAbstractDropdownView], [ibmAbstractDropdownView]"})],AbstractDropdownView);var i18n=__webpack_require__("./src/i18n/index.ts"),placeholder=__webpack_require__("./src/placeholder/index.ts"),utils_position=__webpack_require__("./node_modules/@carbon/utils-position/index.js"),utils=__webpack_require__("./src/utils/index.ts");const defaultOffset={top:0,left:0};let DropdownService=class DropdownService{set offset(value){this._offset=Object.assign({},defaultOffset,value)}get offset(){return this._offset}constructor(placeholderService,animationFrameService){this.placeholderService=placeholderService,this.animationFrameService=animationFrameService,this.animationFrameSubscription=new Subscription.yU,this._offset=defaultOffset}appendToBody(parentRef,menuRef,classList){menuRef.style.display="block";const dropdownWrapper=document.createElement("div");return dropdownWrapper.className=`dropdown ${classList}`,dropdownWrapper.style.width=parentRef.offsetWidth+"px",dropdownWrapper.style.position="absolute",dropdownWrapper.appendChild(menuRef),this.placeholderService.hasPlaceholderRef()?this.placeholderService.appendElement(dropdownWrapper):document.body.appendChild(dropdownWrapper),this.menuInstance=dropdownWrapper,this.animationFrameSubscription=this.animationFrameService.tick.subscribe((()=>{this.positionDropdown(parentRef,dropdownWrapper)})),this.positionDropdown(parentRef,dropdownWrapper),dropdownWrapper}appendToDropdown(hostRef){if(!this.menuInstance)return;const instance=this.menuInstance,menu=instance.firstElementChild;return this.menuInstance=null,menu.style.display="none",hostRef.appendChild(menu),this.animationFrameSubscription.unsubscribe(),this.placeholderService.hasPlaceholderRef()&&this.placeholderService.hasElement(instance)?this.placeholderService.removeElement(instance):document.body.contains(instance)&&document.body.removeChild(instance),instance}updatePosition(parentRef){this.positionDropdown(parentRef,this.menuInstance)}ngOnDestroy(){this.animationFrameSubscription.unsubscribe()}positionDropdown(parentRef,menuRef){if(!menuRef)return;let leftOffset=0;const boxMenu=menuRef.querySelector(".cds--list-box__menu");if(boxMenu)if(parentRef.getBoundingClientRect().left!==boxMenu.getBoundingClientRect().left){parentRef.getBoundingClientRect().left-boxMenu.getBoundingClientRect().left+boxMenu.getBoundingClientRect().right>(window.innerWidth||document.documentElement.clientWidth)&&(leftOffset=parentRef.offsetWidth-boxMenu.offsetWidth)}else boxMenu.getBoundingClientRect().right>(window.innerWidth||document.documentElement.clientWidth)&&(leftOffset=parentRef.offsetWidth-boxMenu.offsetWidth);const closestMenuWithPos=(0,utils.NX)("position",["relative","fixed","absolute"],menuRef.parentElement),topPos=closestMenuWithPos?-1*closestMenuWithPos.getBoundingClientRect().top:this.offset.top,leftPos=closestMenuWithPos?-1*closestMenuWithPos.getBoundingClientRect().left:this.offset.left+leftOffset;let pos=utils_position.G1.findAbsolute(parentRef,menuRef,"bottom");pos=utils_position.G1.addOffset(pos,topPos,leftPos),utils_position.G1.setElement(menuRef,pos)}static{this.ctorParameters=()=>[{type:placeholder.F2},{type:utils.hK}]}};var Dropdown_1;DropdownService=(0,tslib_es6.Cg)([(0,core.Injectable)()],DropdownService);let Dropdown=class Dropdown{static{Dropdown_1=this}static{this.dropdownCount=0}get fluidInvalidClass(){return this.invalid&&this.fluid}get fluidFocusClass(){return this.fluid&&this._isFocused&&this.menuIsClosed}get writtenValue(){return this._writtenValue}set writtenValue(val){val&&0===val.length&&this.clearSelected(),this._writtenValue=val}constructor(elementRef,i18n,dropdownService,elementService){this.elementRef=elementRef,this.i18n=i18n,this.dropdownService=dropdownService,this.elementService=elementService,this.id="dropdown-"+Dropdown_1.dropdownCount++,this.hideLabel=!1,this.placeholder="",this.displayValue="",this.clearText=this.i18n.get().DROPDOWN.CLEAR,this.size="md",this.type="single",this.theme="dark",this.disabled=!1,this.readonly=!1,this.skeleton=!1,this.inline=!1,this.disableArrowKeys=!1,this.invalid=!1,this.warn=!1,this.appendInline=null,this.selectionFeedback="top-after-reopen",this.menuButtonLabel=this.i18n.get().DROPDOWN.OPEN,this.selectedLabel=this.i18n.get().DROPDOWN.SELECTED,this.selected=new core.EventEmitter,this.onClose=new core.EventEmitter,this.close=new core.EventEmitter,this.hostClass=!0,this.hostWrapperClass=!0,this.fluid=!1,this.menuIsClosed=!0,this._dropUp=!1,this.noop=this._noop.bind(this),this.outsideClick=this._outsideClick.bind(this),this.outsideKey=this._outsideKey.bind(this),this.keyboardNav=this._keyboardNav.bind(this),this.visibilitySubscription=new Subscription.yU,this.onTouchedCallback=this._noop,this._isFocused=!1,this._writtenValue=[],this.propagateChange=_=>{}}ngOnInit(){this.view&&(this.view.type=this.type)}ngAfterContentInit(){if(!this.view)return;(this.writtenValue&&this.writtenValue.length||"number"==typeof this.writtenValue)&&this.writeValue(this.writtenValue),this.view.type=this.type,this.view.size=this.size;const isUpdate=event=>event&&event.isUpdate;this.view.select.subscribe((event=>{if("single"!==this.type||isUpdate(event)||Array.isArray(event)||(this.closeMenu(),event.item&&event.item.selected?this.itemValueKey?this.propagateChange(event.item[this.itemValueKey]):this.propagateChange(event.item):this.propagateChange(null)),"multi"===this.type&&!isUpdate(event))if(this.itemValueKey&&this.view.getSelected()){const values=this.view.getSelected().map((item=>item[this.itemValueKey]));this.propagateChange(values)}else this.propagateChange(this.view.getSelected());isUpdate(event)||(this.checkForReorder(),this.selected.emit(event))}))}ngAfterViewInit(){null===this.appendInline&&(0,utils.fy)(this.elementRef.nativeElement)?this.appendInline=!1:null===this.appendInline&&(this.appendInline=!0),this.checkForReorder()}ngOnDestroy(){this.appendInline||this._appendToDropdown()}writeValue(value){this.writtenValue=value,this.view.onItemsReady((()=>{if(value)if("single"===this.type)if(this.itemValueKey){const newValue=Object.assign({},this.view.getListItems().find((item=>item[this.itemValueKey]===value)));newValue.selected=!0,this.view.propagateSelected([newValue])}else this.view.propagateSelected([value]);else if(this.itemValueKey){let newValues=[];for(const v of value)for(const item of this.view.getListItems())item[this.itemValueKey]===v&&newValues.push(Object.assign({},item,{selected:!0}));this.view.propagateSelected(newValues)}else this.view.propagateSelected(value);else this.view.propagateSelected([value]);this.checkForReorder()}))}onBlur(){this.onTouchedCallback()}registerOnChange(fn){this.propagateChange=fn}registerOnTouched(fn){this.onTouchedCallback=fn}setDisabledState(isDisabled){this.disabled=isDisabled}onKeyDown(event){if(!this.readonly){if("Escape"!==event.key||this.menuIsClosed||event.stopImmediatePropagation(),"Escape"===event.key)event.preventDefault(),this.closeMenu(),this.dropdownButton.nativeElement.focus();else if(this.menuIsClosed&&(" "===event.key||"ArrowDown"===event.key||"ArrowUp"===event.key)){if(this.disableArrowKeys&&("ArrowDown"===event.key||"ArrowUp"===event.key))return;event.preventDefault(),this.openMenu()}!this.menuIsClosed&&"Tab"===event.key&&this.dropdownMenu.nativeElement.contains(event.target)&&this.closeMenu(),!this.menuIsClosed&&"Tab"===event.key&&event.shiftKey&&this.closeMenu(),"multi"!==this.type&&this.menuIsClosed&&this.closedDropdownNavigation(event)}}closedDropdownNavigation(event){if("ArrowDown"===event.key){event.preventDefault(),this.view.getCurrentItem().selected=!1;let item=this.view.getNextItem();item&&(item.selected=!0)}else if("ArrowUp"===event.key){event.preventDefault(),this.view.getCurrentItem().selected=!1;let item=this.view.getPrevItem();item&&(item.selected=!0)}}getDisplayStringValue(){if(!this.view||this.skeleton)return;let selected=this.view.getSelected();return!selected.length||this.displayValue&&this.isRenderString()?selected.length&&this.isRenderString()?(0,of.of)(this.displayValue):(0,of.of)(this.placeholder):"multi"===this.type?(0,of.of)(this.placeholder):(0,of.of)(selected[0].content)}isRenderString(){return"string"==typeof this.displayValue}getRenderTemplateContext(){if(!this.view)return;let selected=this.view.getSelected();return"multi"===this.type?{items:selected}:selected&&selected.length>0?{item:selected[0]}:{}}getSelectedCount(){if(this.view.getSelected())return this.view.getSelected().length}clearSelected(){if(!this.disabled&&0!==this.getSelectedCount()){for(const item of this.view.getListItems())item.selected=!1;this.selected.emit([]),this.propagateChange([])}}valueSelected(){return!!this.view.getSelected()}_noop(){}_outsideClick(event){this.elementRef.nativeElement.contains(event.target)||this.dropdownMenu.nativeElement.contains(event.target)||this.closeMenu()}_outsideKey(event){!this.menuIsClosed&&"Tab"===event.key&&this.dropdownMenu.nativeElement.contains(event.target)&&this.closeMenu()}_keyboardNav(event){"Escape"!==event.key||this.menuIsClosed||event.stopImmediatePropagation(),"Escape"===event.key?(event.preventDefault(),this.closeMenu(),this.dropdownButton.nativeElement.focus()):this.menuIsClosed||"Tab"!==event.key||(this.dropdownButton.nativeElement.focus(),this.dropdownButton.nativeElement.dispatchEvent(new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,key:"Tab"})),this.closeMenu())}_appendToDropdown(){this.dropdownService.appendToDropdown(this.elementRef.nativeElement),this.dropdownMenu.nativeElement.removeEventListener("keydown",this.keyboardNav,!0)}_appendToBody(){const lightClass="light"===this.theme?" cds--list-box--light":"",expandedClass=this.menuIsClosed?"":" cds--list-box--expanded";this.dropdownService.appendToBody(this.dropdownButton.nativeElement,this.dropdownMenu.nativeElement,`${this.elementRef.nativeElement.className}${lightClass}${expandedClass}`),this.dropdownMenu.nativeElement.addEventListener("keydown",this.keyboardNav,!0)}_shouldDropUp(){const menu=this.dropdownMenu&&this.dropdownMenu.nativeElement.querySelector(".cds--list-box__menu"),menuRect=menu&&menu.getBoundingClientRect();if(menu&&menuRect){return(0,utils.db)(menu).reduce(((shouldDropUp,parent)=>{const parentRect=parent.getBoundingClientRect(),isBelowParent=!(menuRect.bottom<=parentRect.bottom);return shouldDropUp||isBelowParent}),!1)}return!1}openMenu(){if(0!==this.view.getListItems().length){if(this._dropUp=!1,this.menuIsClosed=!1,!this.appendInline){const target=this.dropdownButton.nativeElement,parent=this.elementRef.nativeElement;this.visibilitySubscription=this.elementService.visibility(target,parent).subscribe((value=>{value.visible||this.closeMenu()})),this._appendToBody()}setTimeout((()=>{null!==this.dropUp&&void 0!==this.dropUp||(this._dropUp=this._shouldDropUp())}),0),document.body.firstElementChild.addEventListener("click",this.noop,!0),document.body.firstElementChild.addEventListener("keydown",this.noop,!0),document.addEventListener("click",this.outsideClick,!0),document.addEventListener("keydown",this.outsideKey,!0),setTimeout((()=>this.view.initFocus()),0)}}closeMenu(){this.menuIsClosed||(this.menuIsClosed=!0,this.checkForReorder(),this.onClose.emit(),this.close.emit(),this.dropdownButton.nativeElement.focus(),this.view.disableScroll&&this.view.disableScroll(),this.appendInline||(this.visibilitySubscription.unsubscribe(),this._appendToDropdown()),document.body.firstElementChild.removeEventListener("click",this.noop,!0),document.body.firstElementChild.removeEventListener("keydown",this.noop,!0),document.removeEventListener("click",this.outsideClick,!0),document.removeEventListener("keydown",this.outsideKey,!0))}toggleMenu(){this.menuIsClosed?this.openMenu():this.closeMenu()}isTemplate(value){return value instanceof core.TemplateRef}handleFocus(event){this._isFocused="focus"===event.type,"blur"===event.type&&this.onBlur()}checkForReorder(){const topAfterReopen=this.menuIsClosed&&"top-after-reopen"===this.selectionFeedback;"multi"!==this.type||!topAfterReopen&&"top"!==this.selectionFeedback||this.view.reorderSelected()}static{this.ctorParameters=()=>[{type:core.ElementRef},{type:i18n.F2},{type:DropdownService},{type:utils.GT}]}static{this.propDecorators={fluidInvalidClass:[{type:core.HostBinding,args:["class.cds--list-box__wrapper--fluid--invalid"]}],fluidFocusClass:[{type:core.HostBinding,args:["class.cds--list-box__wrapper--fluid--focus"]}],id:[{type:core.Input}],label:[{type:core.Input}],hideLabel:[{type:core.Input}],helperText:[{type:core.Input}],placeholder:[{type:core.Input}],displayValue:[{type:core.Input}],clearText:[{type:core.Input}],size:[{type:core.Input}],type:[{type:core.Input}],theme:[{type:core.Input}],disabled:[{type:core.Input}],readonly:[{type:core.Input}],skeleton:[{type:core.Input}],inline:[{type:core.Input}],disableArrowKeys:[{type:core.Input}],invalid:[{type:core.Input}],invalidText:[{type:core.Input}],warn:[{type:core.Input}],warnText:[{type:core.Input}],appendInline:[{type:core.Input}],scrollableContainer:[{type:core.Input}],itemValueKey:[{type:core.Input}],selectionFeedback:[{type:core.Input}],menuButtonLabel:[{type:core.Input}],selectedLabel:[{type:core.Input}],dropUp:[{type:core.Input}],selected:[{type:core.Output}],onClose:[{type:core.Output}],close:[{type:core.Output}],view:[{type:core.ContentChild,args:[AbstractDropdownView,{static:!0}]}],dropdownButton:[{type:core.ViewChild,args:["dropdownButton",{static:!0}]}],dropdownMenu:[{type:core.ViewChild,args:["dropdownMenu",{static:!0}]}],hostClass:[{type:core.HostBinding,args:["class.cds--dropdown__wrapper"]}],hostWrapperClass:[{type:core.HostBinding,args:["class.cds--list-box__wrapper"]}],fluid:[{type:core.HostBinding,args:["class.cds--list-box__wrapper--fluid"]},{type:core.Input}],onKeyDown:[{type:core.HostListener,args:["keydown",["$event"]]}]}}};Dropdown=Dropdown_1=(0,tslib_es6.Cg)([(0,core.Component)({selector:"cds-dropdown, ibm-dropdown",template:'\n\t<label\n\t\t*ngIf="label && !skeleton"\n\t\t[for]="id"\n\t\tclass="cds--label"\n\t\t[ngClass]="{\n\t\t\t\'cds--label--disabled\': disabled,\n\t\t\t\'cds--visually-hidden\': hideLabel\n\t\t}">\n\t\t<ng-container *ngIf="!isTemplate(label)">{{label}}</ng-container>\n\t\t<ng-template *ngIf="isTemplate(label)" [ngTemplateOutlet]="label"></ng-template>\n\t</label>\n\t<div\n\t\tclass="cds--list-box"\n\t\t[ngClass]="{\n\t\t\t\'cds--dropdown\': type !== \'multi\' && !(skeleton && fluid),\n\t\t\t\'cds--multiselect\': type === \'multi\',\n\t\t\t\'cds--multi-select--selected\': type === \'multi\' && getSelectedCount() > 0,\n\t\t\t\'cds--dropdown--light\': theme === \'light\',\n\t\t\t\'cds--list-box--light\': theme === \'light\',\n\t\t\t\'cds--list-box--inline\': inline,\n\t\t\t\'cds--skeleton\': skeleton,\n\t\t\t\'cds--dropdown--disabled cds--list-box--disabled\': disabled,\n\t\t\t\'cds--dropdown--readonly\': readonly,\n\t\t\t\'cds--dropdown--invalid\': invalid,\n\t\t\t\'cds--dropdown--warning cds--list-box--warning\': warn,\n\t\t\t\'cds--dropdown--sm cds--list-box--sm\': size === \'sm\',\n\t\t\t\'cds--dropdown--md cds--list-box--md\': size === \'md\',\n\t\t\t\'cds--dropdown--lg cds--list-box--lg\': size === \'lg\',\n\t\t\t\'cds--list-box--expanded\': !menuIsClosed,\n\t\t\t\'cds--list-box--invalid\': invalid\n\t\t}"\n\t\t[attr.data-invalid]="invalid ? true : null">\n\t\t<div *ngIf="skeleton && fluid" class="cds--list-box__label"></div>\n\t\t<button\n\t\t\t#dropdownButton\n\t\t\t[id]="id"\n\t\t\ttype="button"\n\t\t\tclass="cds--list-box__field"\n\t\t\t[ngClass]="{\'a\': !menuIsClosed}"\n\t\t\t[attr.aria-expanded]="!menuIsClosed"\n\t\t\t[attr.aria-disabled]="disabled"\n\t\t\t[attr.aria-readonly]="readonly"\n\t\t\taria-haspopup="listbox"\n\t\t\t(click)="disabled || readonly ? $event.stopPropagation() : toggleMenu()"\n\t\t\t(focus)="fluid ? handleFocus($event) : null"\n\t\t\t(blur)="fluid ? handleFocus($event) : onBlur()"\n\t\t\t[attr.disabled]="disabled ? true : null">\n\t\t\t<div\n\t\t\t\t(click)="clearSelected()"\n\t\t\t\t(keydown.enter)="clearSelected()"\n\t\t\t\t*ngIf="type === \'multi\' && getSelectedCount() > 0"\n\t\t\t\tclass="cds--list-box__selection cds--tag--filter cds--list-box__selection--multi"\n\t\t\t\ttabindex="0"\n\t\t\t\t[title]="clearText">\n\t\t\t\t{{getSelectedCount()}}\n\t\t\t\t<svg\n\t\t\t\t\tfocusable="false"\n\t\t\t\t\tpreserveAspectRatio="xMidYMid meet"\n\t\t\t\t\tstyle="will-change: transform;"\n\t\t\t\t\trole="img"\n\t\t\t\t\txmlns="http://www.w3.org/2000/svg"\n\t\t\t\t\twidth="16"\n\t\t\t\t\theight="16"\n\t\t\t\t\tviewBox="0 0 16 16"\n\t\t\t\t\taria-hidden="true">\n\t\t\t\t\t<path d="M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<span *ngIf="isRenderString()" class="cds--list-box__label">{{getDisplayStringValue() | async}}</span>\n\t\t\t<ng-template\n\t\t\t\t*ngIf="!isRenderString()"\n\t\t\t\t[ngTemplateOutletContext]="getRenderTemplateContext()"\n\t\t\t\t[ngTemplateOutlet]="displayValue">\n\t\t\t</ng-template>\n\t\t\t<span class="cds--list-box__menu-icon">\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf="!skeleton"\n\t\t\t\t\tcdsIcon="chevron--down"\n\t\t\t\t\tsize="16"\n\t\t\t\t\t[attr.aria-label]="menuButtonLabel"\n\t\t\t\t\t[ngClass]="{\'cds--list-box__menu-icon--open\': !menuIsClosed }">\n\t\t\t\t</svg>\n\t\t\t</span>\n\t\t</button>\n\t\t<svg\n\t\t\t*ngIf="invalid"\n\t\t\tclass="cds--list-box__invalid-icon"\n\t\t\tcdsIcon="warning--filled"\n\t\t\tsize="16">\n\t\t</svg>\n\t\t<svg\n\t\t\t*ngIf="!invalid && warn"\n\t\t\tcdsIcon="warning--alt--filled"\n\t\t\tsize="16"\n\t\t\tclass="cds--list-box__invalid-icon cds--list-box__invalid-icon--warning">\n\t\t</svg>\n\t\t<div\n\t\t\t#dropdownMenu\n\t\t\t[ngClass]="{\n\t\t\t\t\'cds--list-box--up\': this.dropUp !== null && this.dropUp !== undefined ? dropUp : _dropUp\n\t\t\t}">\n\t\t\t<ng-content *ngIf="!menuIsClosed"></ng-content>\n\t\t</div>\n\t</div>\n\t<hr *ngIf="fluid" class="cds--list-box__divider" />\n\t<div\n\t\t*ngIf="helperText && !invalid && !warn && !skeleton && !fluid"\n\t\tclass="cds--form__helper-text"\n\t\t[ngClass]="{\n\t\t\t\'cds--form__helper-text--disabled\': disabled\n\t\t}">\n\t\t<ng-container *ngIf="!isTemplate(helperText)">{{helperText}}</ng-container>\n\t\t<ng-template *ngIf="isTemplate(helperText)" [ngTemplateOutlet]="helperText"></ng-template>\n\t</div>\n\t<div *ngIf="invalid" class="cds--form-requirement">\n\t\t<ng-container *ngIf="!isTemplate(invalidText)">{{ invalidText }}</ng-container>\n\t\t<ng-template *ngIf="isTemplate(invalidText)" [ngTemplateOutlet]="invalidText"></ng-template>\n\t</div>\n\t<div *ngIf="!invalid && warn" class="cds--form-requirement">\n\t\t<ng-container *ngIf="!isTemplate(warnText)">{{warnText}}</ng-container>\n\t\t<ng-template *ngIf="isTemplate(warnText)" [ngTemplateOutlet]="warnText"></ng-template>\n\t</div>\n\t',providers:[{provide:fesm2022_forms.kq,useExisting:Dropdown,multi:!0}]})],Dropdown);var isObservable=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/isObservable.js"),Observable=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/Observable.js"),first=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/first.js"),fromEvent=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js"),debounceTime=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),filter=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/filter.js");var DropdownList_1;let DropdownList=class DropdownList{static{DropdownList_1=this}static{this.listCount=0}set items(value){(0,isObservable.A)(value)?(this._itemsSubscription&&this._itemsSubscription.unsubscribe(),this._itemsReady=new Observable.c((observer=>{this._itemsSubscription=value.subscribe((v=>{this.updateList(v),observer.next(!0),observer.complete()}))})),this.onItemsReady(null)):this.updateList(value),this._originalItems=value}get items(){return this._originalItems}constructor(elementRef,i18n,appRef){this.elementRef=elementRef,this.i18n=i18n,this.appRef=appRef,this.ariaLabel=this.i18n.get().DROPDOWN_LIST.LABEL,this.listTpl=null,this.select=new core.EventEmitter,this.scroll=new core.EventEmitter,this.blurIntent=new core.EventEmitter,this.type="single",this.showTitles=!0,this.size="md",this.listId="listbox-"+DropdownList_1.listCount++,this.highlightedItem=null,this.displayItems=[],this.index=-1,this._items=[]}ngAfterViewInit(){this.index=this.getListItems().findIndex((item=>item.selected)),this.setupFocusObservable(),setTimeout((()=>{this.doEmitSelect(!0)}))}ngOnDestroy(){this.focusJump&&this.focusJump.unsubscribe(),this._itemsSubscription&&this._itemsSubscription.unsubscribe()}doEmitSelect(isUpdate=!0){if("single"===this.type)this.select.emit({item:this._items.find((item=>item.selected)),isUpdate});else{const selected=this.getSelected()||[];selected.isUpdate=isUpdate,this.select.emit(selected)}}getItemId(index){return`${this.listId}-${index}`}updateList(items){this._items=items.map((item=>Object.assign({},item))),this.displayItems=this._items,this.updateIndex(),this.setupFocusObservable(),this.doEmitSelect()}filterBy(query=""){query?(this.displayItems=this.getListItems().filter((item=>item.content.toLowerCase().includes(query.toLowerCase()))),this.displayItems&&(this.index=0)):this.displayItems=this.getListItems(),this.updateIndex()}setupFocusObservable(){if(!this.list)return;this.focusJump&&this.focusJump.unsubscribe();let elList=Array.from(this.list.nativeElement.querySelectorAll("li"));this.focusJump=function watchFocusJump(target,elements){return(0,fromEvent.R)(target,"keydown").pipe((0,debounceTime.B)(150),(0,map.T)((ev=>{let el=elements.find((itemEl=>itemEl.textContent.trim().toLowerCase().startsWith(ev.key)));if(el)return el})),(0,filter.p)((el=>!!el)))}(this.list.nativeElement,elList).subscribe((el=>{el.focus()}))}getNextItem(){return this.index<this.displayItems.length-1&&this.index++,this.displayItems[this.index]}hasNextElement(){return this.index<this.displayItems.length-1&&(!(this.index===this.displayItems.length-2)||!this.displayItems[this.index+1].disabled)}getNextElement(){const elemList=this.listElementList?this.listElementList.toArray():[];if(!elemList.length)return null;for(let i=this.index+1;i<elemList.length;i++)if(!this.displayItems[i].disabled)return this.index=i,elemList[i].nativeElement;return elemList[this.index]?.nativeElement}getPrevItem(){return this.index>0&&this.index--,this.displayItems[this.index]}hasPrevElement(){return this.index>0&&(!(1===this.index)||!this.displayItems[0].disabled)}getPrevElement(){const elemList=this.listElementList?this.listElementList.toArray():[];if(!elemList.length)return null;for(let i=this.index-1;i<this.index&&i>=0;i--)if(!this.displayItems[i].disabled)return this.index=i,elemList[i].nativeElement;return elemList[this.index].nativeElement}getCurrentItem(){return this.index<0?this.displayItems[0]:this.displayItems[this.index]}getCurrentElement(){return this.index<0?this.listElementList.first.nativeElement:this.listElementList.toArray()[this.index].nativeElement}getListItems(){return this._items}getSelected(){let selected=this.getListItems().filter((item=>item.selected));return 0===selected.length?[]:selected}propagateSelected(value){Array.isArray(value)||console.error(`${this.constructor.name}.propagateSelected expects an Array<ListItem>, got ${JSON.stringify(value)}`),this.onItemsReady((()=>{const selectedNewItems=[];for(let newItem of value)if(newItem&&newItem.selected){let tempNewItem=Object.assign({},newItem);delete tempNewItem.selected,tempNewItem=JSON.stringify(tempNewItem),selectedNewItems.push(tempNewItem)}for(let oldItem of this.getListItems()){if(0===selectedNewItems.length){oldItem.selected=!1;continue}let tempOldItem=Object.assign({},oldItem);delete tempOldItem.selected,tempOldItem=JSON.stringify(tempOldItem);for(let selectedNewItem of selectedNewItems){if(tempOldItem.includes(selectedNewItem)){oldItem.selected=!0;break}oldItem.selected=!1}}}))}initFocus(){this.index<0&&this.updateIndex(),this.list.nativeElement.focus(),setTimeout((()=>{this.highlightedItem=this.getItemId(this.index)}))}updateIndex(){const selected=this.getSelected();selected.length?this.index=this.displayItems.indexOf(selected[0]):this.hasNextElement()&&this.getNextElement()}navigateList(event){"Enter"===event.key||" "===event.key?(this.listElementList.some((option=>option.nativeElement===event.target))&&event.preventDefault(),"Enter"===event.key&&this.doClick(event,this.getCurrentItem())):"ArrowDown"!==event.key&&"ArrowUp"!==event.key||(event.preventDefault(),"ArrowDown"===event.key?this.hasNextElement()?this.getNextElement()?.scrollIntoView({block:"end"}):this.blurIntent.emit("bottom"):"ArrowUp"===event.key&&(this.hasPrevElement()?this.getPrevElement().scrollIntoView({block:"nearest"}):this.blurIntent.emit("top")),setTimeout((()=>{this.highlightedItem=this.getItemId(this.index)})))}doClick(event,item){if(event.preventDefault(),item&&!item.disabled){if(this.list.nativeElement.focus(),"single"===this.type){item.selected=!0;for(let otherItem of this.getListItems())item!==otherItem&&(otherItem.selected=!1)}else item.selected=!item.selected;this.index=this.displayItems.indexOf(item),this.highlightedItem=this.getItemId(this.index),this.doEmitSelect(!1),this.appRef.tick()}}onItemFocus(index){const element=this.listElementList.toArray()[index].nativeElement;element.classList.add("cds--list-box__menu-item--highlighted"),element.tabIndex=0}onItemBlur(index){const element=this.listElementList.toArray()[index].nativeElement;element.classList.remove("cds--list-box__menu-item--highlighted"),element.tabIndex=-1}emitScroll(event){const customScrollEvent={atTop:0===event.srcElement.scrollTop,atBottom:event.srcElement.scrollHeight-event.srcElement.scrollTop===event.srcElement.clientHeight,event};this.scroll.emit(customScrollEvent)}onItemsReady(subcription){(this._itemsReady||(0,of.of)(!0)).pipe((0,first.$)()).subscribe(subcription)}reorderSelected(moveFocus=!0){this.displayItems=[...this.getSelected(),...this.getListItems().filter((item=>!item.selected))],moveFocus&&setTimeout((()=>{this.updateIndex(),this.highlightedItem=this.getItemId(this.index)}))}static{this.ctorParameters=()=>[{type:core.ElementRef},{type:i18n.F2},{type:core.ApplicationRef}]}static{this.propDecorators={ariaLabel:[{type:core.Input}],items:[{type:core.Input}],listTpl:[{type:core.Input}],select:[{type:core.Output}],scroll:[{type:core.Output}],blurIntent:[{type:core.Output}],list:[{type:core.ViewChild,args:["list",{static:!0}]}],type:[{type:core.Input}],showTitles:[{type:core.Input}],listElementList:[{type:core.ViewChildren,args:["listItem"]}]}}};DropdownList=DropdownList_1=(0,tslib_es6.Cg)([(0,core.Component)({selector:"cds-dropdown-list, ibm-dropdown-list",template:'\n\t\t<ul\n\t\t\t#list\n\t\t\t[id]="listId"\n\t\t\trole="listbox"\n\t\t\tclass="cds--list-box__menu cds--multi-select"\n\t\t\t(scroll)="emitScroll($event)"\n\t\t\t(keydown)="navigateList($event)"\n\t\t\ttabindex="-1"\n\t\t\t[attr.aria-label]="ariaLabel"\n\t\t\t[attr.aria-activedescendant]="highlightedItem">\n\t\t\t<li\n\t\t\t\trole="option"\n\t\t\t\t*ngFor="let item of displayItems; let i = index"\n\t\t\t\t(click)="doClick($event, item)"\n\t\t\t\tclass="cds--list-box__menu-item"\n\t\t\t\t[attr.aria-selected]="item.selected"\n\t\t\t\t[id]="getItemId(i)"\n\t\t\t\t[attr.title]=" showTitles ? item.content : null"\n\t\t\t\t[attr.disabled]="item.disabled ? true : null"\n\t\t\t\t[ngClass]="{\n\t\t\t\t\t\'cds--list-box__menu-item--active\': item.selected,\n\t\t\t\t\t\'cds--list-box__menu-item--highlighted\': highlightedItem === getItemId(i)\n\t\t\t\t}">\n\t\t\t\t<div\n\t\t\t\t\t#listItem\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tclass="cds--list-box__menu-item__option">\n\t\t\t\t\t<div\n\t\t\t\t\t\t*ngIf="!listTpl && type === \'multi\'"\n\t\t\t\t\t\tclass="cds--form-item cds--checkbox-wrapper">\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t[attr.data-contained-checkbox-state]="item.selected"\n\t\t\t\t\t\t\tclass="cds--checkbox-label">\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tclass="cds--checkbox"\n\t\t\t\t\t\t\t\ttype="checkbox"\n\t\t\t\t\t\t\t\t[checked]="item.selected"\n\t\t\t\t\t\t\t\t[disabled]="item.disabled"\n\t\t\t\t\t\t\t\ttabindex="-1">\n\t\t\t\t\t\t\t<span class="cds--checkbox-appearance"></span>\n\t\t\t\t\t\t\t<span class="cds--checkbox-label-text">{{item.content}}</span>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<ng-container *ngIf="!listTpl && type === \'single\'">{{item.content}}</ng-container>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf="!listTpl && type === \'single\'"\n\t\t\t\t\t\tcdsIcon="checkmark"\n\t\t\t\t\t\tsize="16"\n\t\t\t\t\t\tclass="cds--list-box__menu-item__selected-icon">\n\t\t\t\t\t</svg>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t*ngIf="listTpl"\n\t\t\t\t\t\t[ngTemplateOutletContext]="{item: item}"\n\t\t\t\t\t\t[ngTemplateOutlet]="listTpl">\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t</ul>',providers:[{provide:AbstractDropdownView,useExisting:DropdownList}]})],DropdownList);let ScrollableList=class ScrollableList{constructor(elementRef){this.elementRef=elementRef,this.nScrollableList=null,this.scrollEnabled=!0,this.scrollBy=10,this.canScrollUp=!1,this.canScrollDown=!1,this.list=this.elementRef.nativeElement}ngOnChanges(changes){changes.scrollEnabled&&(changes.scrollEnabled.currentValue?(this.list.style.overflow="hidden",this.scrollUpTarget.style.display="flex",this.scrollDownTarget.style.display="flex",this.canScrollUp=!0,this.canScrollDown=!0,this.updateScrollHeight(),this.checkScrollArrows(),setTimeout((()=>{this.checkScrollArrows()}))):(this.scrollUpTarget.style.display="none",this.scrollDownTarget.style.display="none",this.canScrollUp=!1,this.canScrollDown=!1,this.list.style.height=null,this.list.style.overflow=null,clearInterval(this.hoverScrollInterval)))}ngAfterViewInit(){this.nScrollableList&&(this.list=this.elementRef.nativeElement.querySelector(this.nScrollableList)),this.scrollUpTarget.addEventListener("mouseover",(()=>this.onHoverUp(!0))),this.scrollUpTarget.addEventListener("mouseout",(()=>this.onHoverUp(!1))),this.scrollDownTarget.addEventListener("mouseover",(()=>this.onHoverDown(!0))),this.scrollDownTarget.addEventListener("mouseout",(()=>this.onHoverDown(!1)))}updateScrollHeight(){if(this.scrollEnabled){const containerRect=this.elementRef.nativeElement.parentElement.getBoundingClientRect(),innerHeightDiff=this.list.getBoundingClientRect().top-containerRect.top,height=containerRect.height-(containerRect.bottom-window.innerHeight)-innerHeightDiff-40;this.list.style.height=`${height}px`}}checkScrollArrows(){const scrollUpHeight=this.scrollUpTarget.offsetHeight,scrollDownHeight=this.scrollDownTarget.offsetHeight;0===this.list.scrollTop?(this.canScrollUp&&(this.list.style.height=`${parseInt(this.list.style.height,10)+scrollUpHeight}px`),this.scrollUpTarget.style.display="none",this.canScrollUp=!1):this.list.scrollTop===this.list.scrollTopMax?(this.canScrollDown&&(this.list.style.height=`${parseInt(this.list.style.height,10)+scrollDownHeight}px`),this.scrollDownTarget.style.display="none",this.canScrollDown=!1):(this.canScrollUp||(this.list.style.height=parseInt(this.list.style.height,10)-scrollUpHeight+"px"),this.canScrollDown||(this.list.style.height=parseInt(this.list.style.height,10)-scrollDownHeight+"px"),this.scrollUpTarget.style.display="flex",this.scrollDownTarget.style.display="flex",this.canScrollUp=!0,this.canScrollDown=!0)}onWheel(event){event.deltaY<0?this.list.scrollTop-=this.scrollBy:this.list.scrollTop+=this.scrollBy,this.list.scrollTop!==this.list.scrollTopMax&&0!==this.list.scrollTop&&(event.preventDefault(),event.stopPropagation()),this.checkScrollArrows()}onTouchStart(event){event.touches[0]&&(this.lastTouch=event.touches[0].clientY)}onTouchMove(event){if(event.preventDefault(),event.stopPropagation(),event.touches[0]){const touch=event.touches[0];this.list.scrollTop+=this.lastTouch-touch.clientY,this.lastTouch=touch.clientY,this.checkScrollArrows()}}hoverScrollBy(hovering,amount){hovering?this.hoverScrollInterval=setInterval((()=>{this.list.scrollTop+=amount,this.checkScrollArrows()}),1):clearInterval(this.hoverScrollInterval)}onHoverUp(hovering){this.hoverScrollBy(hovering,-3)}onHoverDown(hovering){this.hoverScrollBy(hovering,3)}onKeyDown(event){"ArrowDown"!==event.key&&"ArrowUp"!==event.key||this.checkScrollArrows()}static{this.ctorParameters=()=>[{type:core.ElementRef}]}static{this.propDecorators={nScrollableList:[{type:core.Input}],scrollEnabled:[{type:core.Input}],scrollUpTarget:[{type:core.Input}],scrollDownTarget:[{type:core.Input}],scrollBy:[{type:core.Input}],onWheel:[{type:core.HostListener,args:["wheel",["$event"]]}],onTouchStart:[{type:core.HostListener,args:["touchstart",["$event"]]}],onTouchMove:[{type:core.HostListener,args:["touchmove",["$event"]]}],onKeyDown:[{type:core.HostListener,args:["keydown",["$event"]]}]}}};ScrollableList=(0,tslib_es6.Cg)([(0,core.Directive)({selector:"[cdsScrollableList], [ibmScrollableList]",exportAs:"scrollable-list"})],ScrollableList);var common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),icon=__webpack_require__("./src/icon/index.ts");let DropdownModule=class DropdownModule{};DropdownModule=(0,tslib_es6.Cg)([(0,core.NgModule)({declarations:[Dropdown,DropdownList,ScrollableList,AbstractDropdownView],exports:[Dropdown,DropdownList,ScrollableList,AbstractDropdownView],imports:[common.CommonModule,fesm2022_forms.YN,i18n.LP,placeholder.UU,utils.uh,icon.op],providers:[DropdownService]})],DropdownModule)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[6050],{"./src/icon/icon.directive.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L:()=>IconDirective});var IconDirective_1,tslib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_icon_service__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/icon/icon.service.ts"),_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@carbon/icon-helpers/es/index.js");let IconDirective=class IconDirective{static{IconDirective_1=this}set ibmIcon(iconName){this.cdsIcon=iconName}static{this.titleIdCounter=0}constructor(elementRef,iconService){this.elementRef=elementRef,this.iconService=iconService,this.cdsIcon="",this.size="16",this.title="",this.ariaLabel="",this.ariaLabelledBy="",this.ariaHidden="",this.isFocusable=!1}renderIcon(iconName){const root=this.elementRef.nativeElement;let icon;try{icon=this.iconService.get(iconName,this.size.toString())}catch(error){return void console.warn(error)}const domParser=new DOMParser,rawSVG=icon.svg,svgElement=domParser.parseFromString(rawSVG,"image/svg+xml").documentElement;let node="SVG"!==root.tagName.toUpperCase()?svgElement:svgElement.firstChild;for(root.innerHTML="";node;)root.appendChild(root.ownerDocument.importNode(node,!0)),node=node.nextSibling;const svg="SVG"!==root.tagName.toUpperCase()?svgElement:root;svg.setAttribute("xmlns","http://www.w3.org/2000/svg");const attributes=(0,_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_1__.gu)({width:icon.attrs.width,height:icon.attrs.height,viewBox:icon.attrs.viewBox,title:this.title,"aria-label":this.ariaLabel,"aria-labelledby":this.ariaLabelledBy,"aria-hidden":this.ariaHidden,focusable:this.isFocusable.toString(),fill:icon.attrs.fill}),attrKeys=Object.keys(attributes);for(let i=0;i<attrKeys.length;i++){const key=attrKeys[i],value=attributes[key];"title"!==key&&(value&&svg.setAttribute(key,value))}if(attributes.title){const title=document.createElement("title");title.textContent=attributes.title,IconDirective_1.titleIdCounter++,title.setAttribute("id",`${icon.name}-title-${IconDirective_1.titleIdCounter}`),svg.insertBefore(title,svg.firstElementChild),svg.setAttribute("aria-labelledby",`${icon.name}-title-${IconDirective_1.titleIdCounter}`)}}ngAfterViewInit(){this.renderIcon(this.cdsIcon)}ngOnChanges({cdsIcon}){cdsIcon&&!cdsIcon.isFirstChange()&&this.renderIcon(this.cdsIcon)}static{this.ctorParameters=()=>[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.ElementRef},{type:_icon_service__WEBPACK_IMPORTED_MODULE_0__.fM}]}static{this.propDecorators={ibmIcon:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],cdsIcon:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],size:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],title:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaLabel:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaLabelledBy:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaHidden:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],isFocusable:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}]}}};IconDirective=IconDirective_1=(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Directive)({selector:"[cdsIcon], [ibmIcon]"})],IconDirective)},"./src/icon/icon.module.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{op:()=>IconModule});var tslib__WEBPACK_IMPORTED_MODULE_56__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_55__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_angular_common__WEBPACK_IMPORTED_MODULE_57__=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),_icon_directive__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/icon/icon.directive.ts"),_icon_service__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/icon/icon.service.ts"),_carbon_icons_es_add_16__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@carbon/icons/es/add/16.js"),_carbon_icons_es_add_20__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@carbon/icons/es/add/20.js"),_carbon_icons_es_bee_16__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@carbon/icons/es/bee/16.js"),_carbon_icons_es_bee_20__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@carbon/icons/es/bee/20.js"),_carbon_icons_es_calendar_16__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@carbon/icons/es/calendar/16.js"),_carbon_icons_es_carbon_16__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@carbon/icons/es/carbon/16.js"),_carbon_icons_es_carbon_20__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/@carbon/icons/es/carbon/20.js"),_carbon_icons_es_caret_down_16__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/@carbon/icons/es/caret--down/16.js"),_carbon_icons_es_caret_left_16__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/@carbon/icons/es/caret--left/16.js"),_carbon_icons_es_caret_right_16__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/@carbon/icons/es/caret--right/16.js"),_carbon_icons_es_caret_up_16__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/@carbon/icons/es/caret--up/16.js"),_carbon_icons_es_checkmark_16__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark/16.js"),_carbon_icons_es_checkmark_filled_16__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--filled/16.js"),_carbon_icons_es_checkmark_filled_20__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--filled/20.js"),_carbon_icons_es_checkmark_outline_16__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--outline/16.js"),_carbon_icons_es_chevron_down_16__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/@carbon/icons/es/chevron--down/16.js"),_carbon_icons_es_chevron_right_16__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/@carbon/icons/es/chevron--right/16.js"),_carbon_icons_es_circle_dash_16__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@carbon/icons/es/circle-dash/16.js"),_carbon_icons_es_close_16__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/@carbon/icons/es/close/16.js"),_carbon_icons_es_close_20__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@carbon/icons/es/close/20.js"),_carbon_icons_es_copy_16__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@carbon/icons/es/copy/16.js"),_carbon_icons_es_copy_20__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@carbon/icons/es/copy/20.js"),_carbon_icons_es_data_2_16__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/@carbon/icons/es/data--2/16.js"),_carbon_icons_es_data_2_20__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/@carbon/icons/es/data--2/20.js"),_carbon_icons_es_document_16__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/@carbon/icons/es/document/16.js"),_carbon_icons_es_document_20__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/@carbon/icons/es/document/20.js"),_carbon_icons_es_download_16__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/@carbon/icons/es/download/16.js"),_carbon_icons_es_error_filled_16__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./node_modules/@carbon/icons/es/error--filled/16.js"),_carbon_icons_es_error_filled_20__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./node_modules/@carbon/icons/es/error--filled/20.js"),_carbon_icons_es_fade_16__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./node_modules/@carbon/icons/es/fade/16.js"),_carbon_icons_es_fade_20__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("./node_modules/@carbon/icons/es/fade/20.js"),_carbon_icons_es_folder_16__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("./node_modules/@carbon/icons/es/folder/16.js"),_carbon_icons_es_incomplete_16__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__("./node_modules/@carbon/icons/es/incomplete/16.js"),_carbon_icons_es_information_filled_16__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__("./node_modules/@carbon/icons/es/information--filled/16.js"),_carbon_icons_es_information_filled_20__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__("./node_modules/@carbon/icons/es/information--filled/20.js"),_carbon_icons_es_information_square_filled_20__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__("./node_modules/@carbon/icons/es/information--square--filled/20.js"),_carbon_icons_es_menu_16__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__("./node_modules/@carbon/icons/es/menu/16.js"),_carbon_icons_es_menu_20__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__("./node_modules/@carbon/icons/es/menu/20.js"),_carbon_icons_es_overflow_menu_vertical_16__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__("./node_modules/@carbon/icons/es/overflow-menu--vertical/16.js"),_carbon_icons_es_overflow_menu_horizontal_16__WEBPACK_IMPORTED_MODULE_41__=__webpack_require__("./node_modules/@carbon/icons/es/overflow-menu--horizontal/16.js"),_carbon_icons_es_save_16__WEBPACK_IMPORTED_MODULE_42__=__webpack_require__("./node_modules/@carbon/icons/es/save/16.js"),_carbon_icons_es_search_16__WEBPACK_IMPORTED_MODULE_43__=__webpack_require__("./node_modules/@carbon/icons/es/search/16.js"),_carbon_icons_es_settings_16__WEBPACK_IMPORTED_MODULE_44__=__webpack_require__("./node_modules/@carbon/icons/es/settings/16.js"),_carbon_icons_es_settings_adjust_16__WEBPACK_IMPORTED_MODULE_45__=__webpack_require__("./node_modules/@carbon/icons/es/settings--adjust/16.js"),_carbon_icons_es_subtract_16__WEBPACK_IMPORTED_MODULE_46__=__webpack_require__("./node_modules/@carbon/icons/es/subtract/16.js"),_carbon_icons_es_trash_can_16__WEBPACK_IMPORTED_MODULE_47__=__webpack_require__("./node_modules/@carbon/icons/es/trash-can/16.js"),_carbon_icons_es_warning_16__WEBPACK_IMPORTED_MODULE_48__=__webpack_require__("./node_modules/@carbon/icons/es/warning/16.js"),_carbon_icons_es_warning_filled_16__WEBPACK_IMPORTED_MODULE_49__=__webpack_require__("./node_modules/@carbon/icons/es/warning--filled/16.js"),_carbon_icons_es_warning_filled_20__WEBPACK_IMPORTED_MODULE_50__=__webpack_require__("./node_modules/@carbon/icons/es/warning--filled/20.js"),_carbon_icons_es_warning_alt_filled_16__WEBPACK_IMPORTED_MODULE_51__=__webpack_require__("./node_modules/@carbon/icons/es/warning--alt--filled/16.js"),_carbon_icons_es_warning_alt_filled_20__WEBPACK_IMPORTED_MODULE_52__=__webpack_require__("./node_modules/@carbon/icons/es/warning--alt--filled/20.js"),_carbon_icons_es_view_16__WEBPACK_IMPORTED_MODULE_53__=__webpack_require__("./node_modules/@carbon/icons/es/view/16.js"),_carbon_icons_es_view_off_16__WEBPACK_IMPORTED_MODULE_54__=__webpack_require__("./node_modules/@carbon/icons/es/view--off/16.js");const ICON_SERVICE_PROVIDER={provide:_icon_service__WEBPACK_IMPORTED_MODULE_1__.fM,deps:[[new _angular_core__WEBPACK_IMPORTED_MODULE_55__.Optional,new _angular_core__WEBPACK_IMPORTED_MODULE_55__.SkipSelf,_icon_service__WEBPACK_IMPORTED_MODULE_1__.fM]],useFactory:function ICON_SERVICE_PROVIDER_FACTORY(parentService){return parentService||new _icon_service__WEBPACK_IMPORTED_MODULE_1__.fM}};let IconModule=class IconModule{constructor(iconService){this.iconService=iconService,iconService.registerAll([_carbon_icons_es_add_16__WEBPACK_IMPORTED_MODULE_2__.A,_carbon_icons_es_add_20__WEBPACK_IMPORTED_MODULE_3__.A,_carbon_icons_es_bee_16__WEBPACK_IMPORTED_MODULE_4__.A,_carbon_icons_es_bee_20__WEBPACK_IMPORTED_MODULE_5__.A,_carbon_icons_es_calendar_16__WEBPACK_IMPORTED_MODULE_6__.A,_carbon_icons_es_carbon_16__WEBPACK_IMPORTED_MODULE_7__.A,_carbon_icons_es_carbon_20__WEBPACK_IMPORTED_MODULE_8__.A,_carbon_icons_es_caret_down_16__WEBPACK_IMPORTED_MODULE_9__.A,_carbon_icons_es_caret_left_16__WEBPACK_IMPORTED_MODULE_10__.A,_carbon_icons_es_caret_right_16__WEBPACK_IMPORTED_MODULE_11__.A,_carbon_icons_es_caret_up_16__WEBPACK_IMPORTED_MODULE_12__.A,_carbon_icons_es_checkmark_16__WEBPACK_IMPORTED_MODULE_13__.A,_carbon_icons_es_checkmark_filled_16__WEBPACK_IMPORTED_MODULE_14__.A,_carbon_icons_es_checkmark_filled_20__WEBPACK_IMPORTED_MODULE_15__.A,_carbon_icons_es_checkmark_outline_16__WEBPACK_IMPORTED_MODULE_16__.A,_carbon_icons_es_chevron_down_16__WEBPACK_IMPORTED_MODULE_17__.A,_carbon_icons_es_chevron_right_16__WEBPACK_IMPORTED_MODULE_18__.A,_carbon_icons_es_circle_dash_16__WEBPACK_IMPORTED_MODULE_19__.A,_carbon_icons_es_close_16__WEBPACK_IMPORTED_MODULE_20__.A,_carbon_icons_es_close_20__WEBPACK_IMPORTED_MODULE_21__.A,_carbon_icons_es_copy_16__WEBPACK_IMPORTED_MODULE_22__.A,_carbon_icons_es_copy_20__WEBPACK_IMPORTED_MODULE_23__.A,_carbon_icons_es_data_2_16__WEBPACK_IMPORTED_MODULE_24__.A,_carbon_icons_es_data_2_20__WEBPACK_IMPORTED_MODULE_25__.A,_carbon_icons_es_document_16__WEBPACK_IMPORTED_MODULE_26__.A,_carbon_icons_es_document_20__WEBPACK_IMPORTED_MODULE_27__.A,_carbon_icons_es_download_16__WEBPACK_IMPORTED_MODULE_28__.A,_carbon_icons_es_error_filled_16__WEBPACK_IMPORTED_MODULE_29__.A,_carbon_icons_es_error_filled_20__WEBPACK_IMPORTED_MODULE_30__.A,_carbon_icons_es_fade_16__WEBPACK_IMPORTED_MODULE_31__.A,_carbon_icons_es_fade_20__WEBPACK_IMPORTED_MODULE_32__.A,_carbon_icons_es_folder_16__WEBPACK_IMPORTED_MODULE_33__.A,_carbon_icons_es_incomplete_16__WEBPACK_IMPORTED_MODULE_34__.A,_carbon_icons_es_information_filled_16__WEBPACK_IMPORTED_MODULE_35__.A,_carbon_icons_es_information_filled_20__WEBPACK_IMPORTED_MODULE_36__.A,_carbon_icons_es_information_square_filled_20__WEBPACK_IMPORTED_MODULE_37__.A,_carbon_icons_es_menu_16__WEBPACK_IMPORTED_MODULE_38__.A,_carbon_icons_es_menu_20__WEBPACK_IMPORTED_MODULE_39__.A,_carbon_icons_es_overflow_menu_vertical_16__WEBPACK_IMPORTED_MODULE_40__.A,_carbon_icons_es_overflow_menu_horizontal_16__WEBPACK_IMPORTED_MODULE_41__.A,_carbon_icons_es_save_16__WEBPACK_IMPORTED_MODULE_42__.A,_carbon_icons_es_search_16__WEBPACK_IMPORTED_MODULE_43__.A,_carbon_icons_es_settings_16__WEBPACK_IMPORTED_MODULE_44__.A,_carbon_icons_es_settings_adjust_16__WEBPACK_IMPORTED_MODULE_45__.A,_carbon_icons_es_subtract_16__WEBPACK_IMPORTED_MODULE_46__.A,_carbon_icons_es_trash_can_16__WEBPACK_IMPORTED_MODULE_47__.A,_carbon_icons_es_view_16__WEBPACK_IMPORTED_MODULE_53__.A,_carbon_icons_es_view_off_16__WEBPACK_IMPORTED_MODULE_54__.A,_carbon_icons_es_warning_16__WEBPACK_IMPORTED_MODULE_48__.A,_carbon_icons_es_warning_filled_16__WEBPACK_IMPORTED_MODULE_49__.A,_carbon_icons_es_warning_filled_20__WEBPACK_IMPORTED_MODULE_50__.A,_carbon_icons_es_warning_alt_filled_16__WEBPACK_IMPORTED_MODULE_51__.A,_carbon_icons_es_warning_alt_filled_20__WEBPACK_IMPORTED_MODULE_52__.A])}static{this.ctorParameters=()=>[{type:_icon_service__WEBPACK_IMPORTED_MODULE_1__.fM}]}};IconModule=(0,tslib__WEBPACK_IMPORTED_MODULE_56__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_55__.NgModule)({declarations:[_icon_directive__WEBPACK_IMPORTED_MODULE_0__.L],exports:[_icon_directive__WEBPACK_IMPORTED_MODULE_0__.L],imports:[_angular_common__WEBPACK_IMPORTED_MODULE_57__.CommonModule],providers:[ICON_SERVICE_PROVIDER]})],IconModule)},"./src/icon/icon.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{fM:()=>IconService});var tslib__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@carbon/icon-helpers/es/index.js");class IconCache{}class IconNameNotFoundError extends Error{constructor(name){super(`Icon ${name} not found`)}}class IconSizeNotFoundError extends Error{constructor(size,name){super("Size ${size} for ${name} not found")}}class IconMemoryCache extends IconCache{constructor(){super(...arguments),this.iconMap=new Map}get(name,size){if(!this.iconMap.has(name))throw new IconNameNotFoundError(name);const sizeMap=this.iconMap.get(name);if(!sizeMap.has(size))throw new IconSizeNotFoundError(size,name);return sizeMap.get(size)}set(name,size,descriptor){this.iconMap.has(name)||this.iconMap.set(name,new Map);this.iconMap.get(name).set(size,descriptor)}}let IconService=class IconService{constructor(){this.iconCache=new IconMemoryCache}registerAll(descriptors){descriptors.forEach((icon=>this.register(icon)))}register(descriptor){const{name}=descriptor;this.registerAs(name,descriptor)}registerAs(name,descriptor){const{size}=descriptor;this.iconCache.set(name,size.toString(),descriptor)}get(name,size){try{const icon=this.iconCache.get(name,size.toString());return icon.svg||(icon.svg=(0,_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_0__.dI)(icon)),icon}catch(e){throw e}}configure(options){this.iconCache=options.cache}};IconService=(0,tslib__WEBPACK_IMPORTED_MODULE_1__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Injectable)()],IconService)},"./src/icon/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{LJ:()=>icon_directive.L,op:()=>icon_module.op,fM:()=>icon_service.fM});var icon_directive=__webpack_require__("./src/icon/icon.directive.ts"),icon_module=__webpack_require__("./src/icon/icon.module.ts"),icon_service=__webpack_require__("./src/icon/icon.service.ts")},"./node_modules/css-loader/dist/runtime/api.js":module=>{"use strict";module.exports=function(cssWithMappingToString){var list=[];return list.toString=function toString(){return this.map((function(item){var content="",needLayer=void 0!==item[5];return item[4]&&(content+="@supports (".concat(item[4],") {")),item[2]&&(content+="@media ".concat(item[2]," {")),needLayer&&(content+="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {")),content+=cssWithMappingToString(item),needLayer&&(content+="}"),item[2]&&(content+="}"),item[4]&&(content+="}"),content})).join("")},list.i=function i(modules,media,dedupe,supports,layer){"string"==typeof modules&&(modules=[[null,modules,void 0]]);var alreadyImportedModules={};if(dedupe)for(var k=0;k<this.length;k++){var id=this[k][0];null!=id&&(alreadyImportedModules[id]=!0)}for(var _k=0;_k<modules.length;_k++){var item=[].concat(modules[_k]);dedupe&&alreadyImportedModules[item[0]]||(void 0!==layer&&(void 0===item[5]||(item[1]="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {").concat(item[1],"}")),item[5]=layer),media&&(item[2]?(item[1]="@media ".concat(item[2]," {").concat(item[1],"}"),item[2]=media):item[2]=media),supports&&(item[4]?(item[1]="@supports (".concat(item[4],") {").concat(item[1],"}"),item[4]=supports):item[4]="".concat(supports)),list.push(item))}},list}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js":module=>{"use strict";module.exports=function(i){return i[1]}},"./src/accordion/accordion.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,Skeleton:()=>Skeleton,WithTitle:()=>WithTitle,__namedExportsOrder:()=>__namedExportsOrder,default:()=>accordion_stories});var dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),platform_browser=__webpack_require__("./node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs");let Documentation=class Documentation{set src(src){this._src=this.sanitizer.bypassSecurityTrustResourceUrl(src)}get src(){return this._src}constructor(elementRef,sanitizer){this.elementRef=elementRef,this.sanitizer=sanitizer}ngOnInit(){document.querySelector("html").style.overflow="hidden",document.querySelector(".sb-show-main").classList.add("full-page")}ngOnDestroy(){document.querySelector("html").style.overflow="auto",document.querySelector(".sb-show-main").classList.remove("full-page")}onLoad(){const docsIframe=this.elementRef.nativeElement.querySelector("#docsIframe"),docsBody=(docsIframe.contentDocument||docsIframe.contentWindow.document).querySelector("body"),mainContent=docsBody.querySelector(".content");mainContent.style.width="100%",mainContent.style.left=0;docsBody.querySelector(".hidden-xs.menu").style.display="none"}static{this.ctorParameters=()=>[{type:core.ElementRef},{type:platform_browser.DomSanitizer}]}static{this.propDecorators={src:[{type:core.Input}]}}};Documentation=(0,tslib_es6.Cg)([(0,core.Component)({selector:"cds-documentation",template:'\n\t\t<iframe\n\t\t\tid="docsIframe"\n\t\t\tstyle="width: 100vw; height: 100vh;"\n\t\t\t(load)="onLoad()"\n\t\t\t[src]="src">\n\t\t</iframe>\n\t'})],Documentation);let DocumentationModule=class DocumentationModule{};DocumentationModule=(0,tslib_es6.Cg)([(0,core.NgModule)({declarations:[Documentation],exports:[Documentation],imports:[common.CommonModule]})],DocumentationModule);var AccordionItem_1,accordion_item_component=__webpack_require__("./src/accordion/accordion-item.component.ts.css?ngResource!=!./node_modules/@ngtools/webpack/src/loaders/inline-resource.js?data=CgkJOmhvc3QgewoJCQlkaXNwbGF5OiBsaXN0LWl0ZW07CgkJfQoJ!./src/accordion/accordion-item.component.ts"),accordion_item_component_default=__webpack_require__.n(accordion_item_component);let AccordionItem=class AccordionItem{constructor(){this.context=null,this.id="accordion-item-"+AccordionItem_1.accordionItemCount++,this.skeleton=!1,this.selected=new core.EventEmitter,this.itemClass=!0,this.expanded=!1,this.disabled=!1,this.role="listitem"}static{AccordionItem_1=this}static{this.accordionItemCount=0}toggleExpanded(){this.skeleton||(this.expanded=!this.expanded,this.selected.emit({id:this.id,expanded:this.expanded}))}isTemplate(value){return value instanceof core.TemplateRef}static{this.propDecorators={title:[{type:core.Input}],context:[{type:core.Input}],id:[{type:core.Input}],skeleton:[{type:core.Input}],selected:[{type:core.Output}],itemClass:[{type:core.HostBinding,args:["class.cds--accordion__item"]}],expanded:[{type:core.HostBinding,args:["class.cds--accordion__item--active"]},{type:core.Input}],disabled:[{type:core.HostBinding,args:["class.cds--accordion__item--disabled"]},{type:core.Input}],role:[{type:core.HostBinding,args:["attr.role"]}]}}};AccordionItem=AccordionItem_1=(0,tslib_es6.Cg)([(0,core.Component)({selector:"cds-accordion-item, ibm-accordion-item",template:'\n\t\t<button\n\t\t\ttype="button"\n\t\t\t[disabled]="disabled"\n\t\t\t[attr.aria-expanded]="expanded"\n\t\t\t[attr.aria-controls]="id"\n\t\t\t(click)="toggleExpanded()"\n\t\t\tclass="cds--accordion__heading">\n\t\t\t<svg cdsIcon="chevron--right" size="16" class="cds--accordion__arrow"></svg>\n\t\t\t<p *ngIf="!isTemplate(title)"\n\t\t\t\tclass="cds--accordion__title"\n\t\t\t\t[ngClass]="{\n\t\t\t\t\t\'cds--skeleton__text\': skeleton\n\t\t\t\t}">\n\t\t\t\t{{!skeleton ? title : null}}\n\t\t\t</p>\n\t\t\t<ng-template\n\t\t\t\t*ngIf="isTemplate(title)"\n\t\t\t\t[ngTemplateOutlet]="title"\n\t\t\t\t[ngTemplateOutletContext]="context">\n\t\t\t</ng-template>\n\t\t</button>\n\t\t<div class="cds--accordion__wrapper">\n\t\t\t<div [id]="id" class="cds--accordion__content">\n\t\t\t\t<ng-content *ngIf="!skeleton; else skeletonTemplate"></ng-content>\n\t\t\t\t<ng-template #skeletonTemplate>\n\t\t\t\t\t<p class="cds--skeleton__text" style="width: 90%"></p>\n\t\t\t\t\t<p class="cds--skeleton__text" style="width: 80%"></p>\n\t\t\t\t\t<p class="cds--skeleton__text" style="width: 95%"></p>\n\t\t\t\t</ng-template>\n\t\t\t</div>\n\t\t</div>\n\t',styles:[accordion_item_component_default()]})],AccordionItem);let Accordion=class Accordion{constructor(){this.align="end",this.size="md",this._skeleton=!1}set skeleton(value){this._skeleton=value,this.updateChildren()}get skeleton(){return this._skeleton}ngAfterContentInit(){this.updateChildren()}updateChildren(){this.children&&this.children.toArray().forEach((child=>child.skeleton=this.skeleton))}static{this.propDecorators={align:[{type:core.Input}],size:[{type:core.Input}],children:[{type:core.ContentChildren,args:[AccordionItem]}],skeleton:[{type:core.Input}]}}};Accordion=(0,tslib_es6.Cg)([(0,core.Component)({selector:"cds-accordion, ibm-accordion",template:"\n\t\t<div class=\"cds--accordion\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--accordion--end': align === 'end',\n\t\t\t\t'cds--accordion--start': align === 'start',\n\t\t\t\t'cds--accordion--sm': size === 'sm',\n\t\t\t\t'cds--accordion--md': size ==='md',\n\t\t\t\t'cds--accordion--lg': size === 'lg',\n\t\t\t\t'cds--layout--size-sm': size === 'sm',\n\t\t\t\t'cds--layout--size-md': size === 'md',\n\t\t\t\t'cds--layout--size-lg': size === 'lg'\n\t\t\t}\"\n\t\t\trole=\"list\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t"})],Accordion);var icon=__webpack_require__("./src/icon/index.ts");let AccordionModule=class AccordionModule{};AccordionModule=(0,tslib_es6.Cg)([(0,core.NgModule)({declarations:[Accordion,AccordionItem],exports:[Accordion,AccordionItem],imports:[common.CommonModule,icon.op]})],AccordionModule);const accordion_stories={title:"Components/Accordion",decorators:[(0,dist.moduleMetadata)({imports:[AccordionModule,DocumentationModule]})],component:Accordion},Basic=(args=>({props:args,template:'\n <cds-accordion [align]="align" [size]="size">\n <cds-accordion-item title="Section 1 title" (selected)="selected($event)">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n </cds-accordion-item>\n <cds-accordion-item title="Section 2 title" (selected)="selected($event)">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n </cds-accordion-item>\n <cds-accordion-item title="Section 3 title" (selected)="selected($event)">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n </cds-accordion-item>\n </cds-accordion>\n '})).bind({});Basic.argTypes={align:{options:["start","end"],control:{type:"radio"}},size:{options:["sm","md","lg"],control:{type:"radio"}},selected:{action:"Selected"}};const WithTitle=(args=>({props:args,template:'\n <div style="width: 500px">\n <cds-accordion>\n <cds-accordion-item [title]="title" (selected)="selected($event)">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n </cds-accordion-item>\n <cds-accordion-item [title]="titleWithContext" [context]="{ index: 2 }" (selected)="selected($event)">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n </cds-accordion-item>\n </cds-accordion>\n </div>\n <ng-template #title>\n <p class="cds--accordion__title">Section 1 title</p>\n </ng-template>\n <ng-template #titleWithContext let-index="index">\n <p class="cds--accordion__title">Section {{ index }} title</p>\n </ng-template>\n '})).bind({});WithTitle.parameters={controls:{disable:!0}};const Skeleton=(args=>({props:args,template:'\n <div style="width: 500px">\n <cds-accordion skeleton="true">\n <cds-accordion-item expanded="true"></cds-accordion-item>\n <cds-accordion-item></cds-accordion-item>\n <cds-accordion-item></cds-accordion-item>\n <cds-accordion-item></cds-accordion-item>\n </cds-accordion>\n </div>\n '})).bind({});Skeleton.parameters={controls:{disable:!0}},Basic.parameters={...Basic.parameters,docs:{...Basic.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <cds-accordion [align]="align" [size]="size">\n <cds-accordion-item title="Section 1 title" (selected)="selected($event)">\n Lorem ipsum dolor sit amet, \\\n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore \\\n et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation \\\n ullamco laboris nisi ut aliquip ex ea commodo consequat.\n </cds-accordion-item>\n <cds-accordion-item title="Section 2 title" (selected)="selected($event)">\n Lorem ipsum dolor sit amet, \\\n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore \\\n et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation \\\n ullamco laboris nisi ut aliquip ex ea commodo consequat.\n </cds-accordion-item>\n <cds-accordion-item title="Section 3 title" (selected)="selected($event)">\n Lorem ipsum dolor sit amet, \\\n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore \\\n et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation \\\n ullamco laboris nisi ut aliquip ex ea commodo consequat.\n </cds-accordion-item>\n </cds-accordion>\n `\n})',...Basic.parameters?.docs?.source}}},WithTitle.parameters={...WithTitle.parameters,docs:{...WithTitle.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <div style="width: 500px">\n <cds-accordion>\n <cds-accordion-item [title]="title" (selected)="selected($event)">\n Lorem ipsum dolor sit amet, \\\n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore \\\n et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation \\\n ullamco laboris nisi ut aliquip ex ea commodo consequat.\n </cds-accordion-item>\n <cds-accordion-item [title]="titleWithContext" [context]="{ index: 2 }" (selected)="selected($event)">\n Lorem ipsum dolor sit amet, \\\n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore \\\n et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation \\\n ullamco laboris nisi ut aliquip ex ea commodo consequat.\n </cds-accordion-item>\n </cds-accordion>\n </div>\n <ng-template #title>\n <p class="cds--accordion__title">Section 1 title</p>\n </ng-template>\n <ng-template #titleWithContext let-index="index">\n <p class="cds--accordion__title">Section {{ index }} title</p>\n </ng-template>\n `\n})',...WithTitle.parameters?.docs?.source}}},Skeleton.parameters={...Skeleton.parameters,docs:{...Skeleton.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <div style="width: 500px">\n <cds-accordion skeleton="true">\n <cds-accordion-item expanded="true"></cds-accordion-item>\n <cds-accordion-item></cds-accordion-item>\n <cds-accordion-item></cds-accordion-item>\n <cds-accordion-item></cds-accordion-item>\n </cds-accordion>\n </div>\n `\n})',...Skeleton.parameters?.docs?.source}}};const __namedExportsOrder=["Basic","WithTitle","Skeleton"]},"./src/accordion/accordion-item.component.ts.css?ngResource!=!./node_modules/@ngtools/webpack/src/loaders/inline-resource.js?data=CgkJOmhvc3QgewoJCQlkaXNwbGF5OiBsaXN0LWl0ZW07CgkJfQoJ!./src/accordion/accordion-item.component.ts":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"\n\t\t:host {\n\t\t\tdisplay: list-item;\n\t\t}\n\t",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[3035],{"./src/button/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{TV:()=>BaseIconButton,$n:()=>Button,tm:()=>ButtonModule,Te:()=>ButtonSet,K0:()=>IconButton});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let Button=class Button{constructor(){this.cdsButton="primary",this.skeleton=!1,this.iconOnly=!1,this.isExpressive=!1,this.baseClass=!0}set ibmButton(type){this.cdsButton=type}get primaryButton(){return"primary"===this.cdsButton||!this.cdsButton}get secondaryButton(){return"secondary"===this.cdsButton}get tertiaryButton(){return"tertiary"===this.cdsButton}get ghostButton(){return"ghost"===this.cdsButton}get dangerButton(){return"danger"===this.cdsButton||"danger--primary"===this.cdsButton}get dangerTertiary(){return"danger--tertiary"===this.cdsButton}get dangerGhost(){return"danger--ghost"===this.cdsButton}get smallSize(){return"sm"===this.size&&!this.isExpressive}get mediumSize(){return"md"===this.size&&!this.isExpressive}get largeSize(){return"lg"===this.size}get extraLargeSize(){return"xl"===this.size}get twoExtraLargeSize(){return"2xl"===this.size}get smallLayoutSize(){return"sm"===this.size&&!this.isExpressive}get mediumLayoutSize(){return"md"===this.size&&!this.isExpressive}get largeLayoutSize(){return"lg"===this.size}get extraLargeLayoutSize(){return"xl"===this.size}get twoExtraLargeLayoutSize(){return"2xl"===this.size}static{this.propDecorators={ibmButton:[{type:core.Input}],cdsButton:[{type:core.Input}],size:[{type:core.Input}],skeleton:[{type:core.HostBinding,args:["class.cds--skeleton"]},{type:core.Input}],iconOnly:[{type:core.HostBinding,args:["class.cds--btn--icon-only"]},{type:core.Input}],isExpressive:[{type:core.HostBinding,args:["class.cds--btn--expressive"]},{type:core.Input}],baseClass:[{type:core.HostBinding,args:["class.cds--btn"]}],primaryButton:[{type:core.HostBinding,args:["class.cds--btn--primary"]}],secondaryButton:[{type:core.HostBinding,args:["class.cds--btn--secondary"]}],tertiaryButton:[{type:core.HostBinding,args:["class.cds--btn--tertiary"]}],ghostButton:[{type:core.HostBinding,args:["class.cds--btn--ghost"]}],dangerButton:[{type:core.HostBinding,args:["class.cds--btn--danger"]}],dangerTertiary:[{type:core.HostBinding,args:["class.cds--btn--danger--tertiary"]}],dangerGhost:[{type:core.HostBinding,args:["class.cds--btn--danger--ghost"]}],smallSize:[{type:core.HostBinding,args:["class.cds--btn--sm"]}],mediumSize:[{type:core.HostBinding,args:["class.cds--btn--md"]}],largeSize:[{type:core.HostBinding,args:["class.cds--btn--lg"]}],extraLargeSize:[{type:core.HostBinding,args:["class.cds--btn--xl"]}],twoExtraLargeSize:[{type:core.HostBinding,args:["class.cds--btn--2xl"]}],smallLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-sm"]}],mediumLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-md"]}],largeLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-lg"]}],extraLargeLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-xl"]}],twoExtraLargeLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-2xl"]}]}}};Button=(0,tslib_es6.Cg)([(0,core.Directive)({selector:"[cdsButton], [ibmButton]"})],Button);let ButtonSet=class ButtonSet{constructor(){this.buttonSetClass=!0}static{this.propDecorators={buttonSetClass:[{type:core.HostBinding,args:["class.cds--btn-set"]}]}}};ButtonSet=(0,tslib_es6.Cg)([(0,core.Component)({selector:"cds-button-set, ibm-button-set",template:"<ng-content></ng-content>"})],ButtonSet);let BaseIconButton=class BaseIconButton{constructor(){this.caret=!0,this.dropShadow=!0,this.highContrast=!0,this.isOpen=!1,this.align="bottom",this.autoAlign=!1,this.enterDelayMs=100,this.leaveDelayMs=300}static{this.propDecorators={caret:[{type:core.Input}],dropShadow:[{type:core.Input}],highContrast:[{type:core.Input}],isOpen:[{type:core.Input}],align:[{type:core.Input}],autoAlign:[{type:core.Input}],enterDelayMs:[{type:core.Input}],leaveDelayMs:[{type:core.Input}]}}};var IconButton_1;BaseIconButton=(0,tslib_es6.Cg)([(0,core.Component)({template:""})],BaseIconButton);let IconButton=class IconButton extends BaseIconButton{static{IconButton_1=this}set buttonNgClass(obj){this.classList=Object.assign({"cds--btn--disabled":this.disabled},obj)}get buttonNgClass(){return this.classList}set buttonAttributes(obj){this.button&&(Object.keys(this.attributeList).forEach((key=>{this.renderer.removeAttribute(this.button.nativeElement,key)})),Object.keys(obj).forEach((key=>{this.renderer.setAttribute(this.button.nativeElement,key,obj[key])}))),this.attributeList=obj}get buttonAttributes(){return this.buttonAttributes}static{this.iconButtonCounter=0}constructor(renderer){super(),this.renderer=renderer,this.buttonId="icon-btn-"+IconButton_1.iconButtonCounter++,this.kind="primary",this.size="lg",this.type="button",this.isExpressive=!1,this.disabled=!1,this.showTooltipWhenDisabled=!1,this.click=new core.EventEmitter,this.focus=new core.EventEmitter,this.blur=new core.EventEmitter,this.tooltipClick=new core.EventEmitter,this.classList={},this.attributeList={}}ngAfterViewInit(){this.buttonAttributes=this.attributeList}emitClickEvent(event,element="button"){event.preventDefault(),event.stopPropagation(),"tooltip"!==element?this.click.emit(event):this.tooltipClick.emit(event)}static{this.ctorParameters=()=>[{type:core.Renderer2}]}static{this.propDecorators={buttonNgClass:[{type:core.Input}],buttonAttributes:[{type:core.Input}],button:[{type:core.ViewChild,args:["button"]}],buttonId:[{type:core.Input}],kind:[{type:core.Input}],size:[{type:core.Input}],type:[{type:core.Input}],isExpressive:[{type:core.Input}],disabled:[{type:core.Input}],description:[{type:core.Input}],showTooltipWhenDisabled:[{type:core.Input}],click:[{type:core.Output}],focus:[{type:core.Output}],blur:[{type:core.Output}],tooltipClick:[{type:core.Output}]}}};IconButton=IconButton_1=(0,tslib_es6.Cg)([(0,core.Component)({selector:"cds-icon-button, ibm-icon-button",template:'\n\t<cds-tooltip\n\t\tclass="cds--icon-tooltip"\n\t\t[description]="description"\n\t\t[disabled]="showTooltipWhenDisabled ? false : disabled"\n\t\t[caret]="caret"\n\t\t[dropShadow]="dropShadow"\n\t\t[highContrast]="highContrast"\n\t\t[isOpen]="isOpen"\n\t\t[align]="align"\n\t\t[autoAlign]="autoAlign"\n\t\t[enterDelayMs]="enterDelayMs"\n\t\t[leaveDelayMs]="leaveDelayMs"\n\t\t(click)="emitClickEvent($event, \'tooltip\')">\n\t\t<button\n\t\t\t#button\n\t\t\t[id]="buttonId"\n\t\t\t[disabled]="disabled"\n\t\t\t[attr.type]="type"\n\t\t\t[iconOnly]="true"\n\t\t\t[ngClass]="buttonNgClass"\n\t\t\t[cdsButton]="kind"\n\t\t\t[size]="size"\n\t\t\t[isExpressive]="isExpressive"\n\t\t\t(click)="emitClickEvent($event)"\n\t\t\t(focus)="focus.emit($event)"\n\t\t\t(blur)="blur.emit($event)">\n\t\t\t<ng-content></ng-content>\n\t\t</button>\n\t</cds-tooltip>\n\t'})],IconButton);var common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),tooltip=__webpack_require__("./src/tooltip/index.ts");let ButtonModule=class ButtonModule{};ButtonModule=(0,tslib_es6.Cg)([(0,core.NgModule)({declarations:[Button,ButtonSet,BaseIconButton,IconButton],exports:[Button,ButtonSet,IconButton],imports:[common.CommonModule,tooltip.Ss]})],ButtonModule)},"./src/icon/icon.directive.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{L:()=>IconDirective});var IconDirective_1,tslib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_icon_service__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/icon/icon.service.ts"),_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@carbon/icon-helpers/es/index.js");let IconDirective=class IconDirective{static{IconDirective_1=this}set ibmIcon(iconName){this.cdsIcon=iconName}static{this.titleIdCounter=0}constructor(elementRef,iconService){this.elementRef=elementRef,this.iconService=iconService,this.cdsIcon="",this.size="16",this.title="",this.ariaLabel="",this.ariaLabelledBy="",this.ariaHidden="",this.isFocusable=!1}renderIcon(iconName){const root=this.elementRef.nativeElement;let icon;try{icon=this.iconService.get(iconName,this.size.toString())}catch(error){return void console.warn(error)}const domParser=new DOMParser,rawSVG=icon.svg,svgElement=domParser.parseFromString(rawSVG,"image/svg+xml").documentElement;let node="SVG"!==root.tagName.toUpperCase()?svgElement:svgElement.firstChild;for(root.innerHTML="";node;)root.appendChild(root.ownerDocument.importNode(node,!0)),node=node.nextSibling;const svg="SVG"!==root.tagName.toUpperCase()?svgElement:root;svg.setAttribute("xmlns","http://www.w3.org/2000/svg");const attributes=(0,_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_1__.gu)({width:icon.attrs.width,height:icon.attrs.height,viewBox:icon.attrs.viewBox,title:this.title,"aria-label":this.ariaLabel,"aria-labelledby":this.ariaLabelledBy,"aria-hidden":this.ariaHidden,focusable:this.isFocusable.toString(),fill:icon.attrs.fill}),attrKeys=Object.keys(attributes);for(let i=0;i<attrKeys.length;i++){const key=attrKeys[i],value=attributes[key];"title"!==key&&(value&&svg.setAttribute(key,value))}if(attributes.title){const title=document.createElement("title");title.textContent=attributes.title,IconDirective_1.titleIdCounter++,title.setAttribute("id",`${icon.name}-title-${IconDirective_1.titleIdCounter}`),svg.insertBefore(title,svg.firstElementChild),svg.setAttribute("aria-labelledby",`${icon.name}-title-${IconDirective_1.titleIdCounter}`)}}ngAfterViewInit(){this.renderIcon(this.cdsIcon)}ngOnChanges({cdsIcon}){cdsIcon&&!cdsIcon.isFirstChange()&&this.renderIcon(this.cdsIcon)}static{this.ctorParameters=()=>[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.ElementRef},{type:_icon_service__WEBPACK_IMPORTED_MODULE_0__.fM}]}static{this.propDecorators={ibmIcon:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],cdsIcon:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],size:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],title:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaLabel:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaLabelledBy:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaHidden:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],isFocusable:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}]}}};IconDirective=IconDirective_1=(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Directive)({selector:"[cdsIcon], [ibmIcon]"})],IconDirective)},"./src/icon/icon.module.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{op:()=>IconModule});var tslib__WEBPACK_IMPORTED_MODULE_56__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_55__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_angular_common__WEBPACK_IMPORTED_MODULE_57__=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),_icon_directive__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/icon/icon.directive.ts"),_icon_service__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/icon/icon.service.ts"),_carbon_icons_es_add_16__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@carbon/icons/es/add/16.js"),_carbon_icons_es_add_20__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@carbon/icons/es/add/20.js"),_carbon_icons_es_bee_16__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@carbon/icons/es/bee/16.js"),_carbon_icons_es_bee_20__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@carbon/icons/es/bee/20.js"),_carbon_icons_es_calendar_16__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@carbon/icons/es/calendar/16.js"),_carbon_icons_es_carbon_16__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@carbon/icons/es/carbon/16.js"),_carbon_icons_es_carbon_20__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/@carbon/icons/es/carbon/20.js"),_carbon_icons_es_caret_down_16__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/@carbon/icons/es/caret--down/16.js"),_carbon_icons_es_caret_left_16__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/@carbon/icons/es/caret--left/16.js"),_carbon_icons_es_caret_right_16__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/@carbon/icons/es/caret--right/16.js"),_carbon_icons_es_caret_up_16__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/@carbon/icons/es/caret--up/16.js"),_carbon_icons_es_checkmark_16__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark/16.js"),_carbon_icons_es_checkmark_filled_16__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--filled/16.js"),_carbon_icons_es_checkmark_filled_20__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--filled/20.js"),_carbon_icons_es_checkmark_outline_16__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--outline/16.js"),_carbon_icons_es_chevron_down_16__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/@carbon/icons/es/chevron--down/16.js"),_carbon_icons_es_chevron_right_16__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/@carbon/icons/es/chevron--right/16.js"),_carbon_icons_es_circle_dash_16__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@carbon/icons/es/circle-dash/16.js"),_carbon_icons_es_close_16__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/@carbon/icons/es/close/16.js"),_carbon_icons_es_close_20__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@carbon/icons/es/close/20.js"),_carbon_icons_es_copy_16__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@carbon/icons/es/copy/16.js"),_carbon_icons_es_copy_20__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@carbon/icons/es/copy/20.js"),_carbon_icons_es_data_2_16__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/@carbon/icons/es/data--2/16.js"),_carbon_icons_es_data_2_20__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/@carbon/icons/es/data--2/20.js"),_carbon_icons_es_document_16__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/@carbon/icons/es/document/16.js"),_carbon_icons_es_document_20__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/@carbon/icons/es/document/20.js"),_carbon_icons_es_download_16__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/@carbon/icons/es/download/16.js"),_carbon_icons_es_error_filled_16__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./node_modules/@carbon/icons/es/error--filled/16.js"),_carbon_icons_es_error_filled_20__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./node_modules/@carbon/icons/es/error--filled/20.js"),_carbon_icons_es_fade_16__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./node_modules/@carbon/icons/es/fade/16.js"),_carbon_icons_es_fade_20__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("./node_modules/@carbon/icons/es/fade/20.js"),_carbon_icons_es_folder_16__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("./node_modules/@carbon/icons/es/folder/16.js"),_carbon_icons_es_incomplete_16__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__("./node_modules/@carbon/icons/es/incomplete/16.js"),_carbon_icons_es_information_filled_16__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__("./node_modules/@carbon/icons/es/information--filled/16.js"),_carbon_icons_es_information_filled_20__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__("./node_modules/@carbon/icons/es/information--filled/20.js"),_carbon_icons_es_information_square_filled_20__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__("./node_modules/@carbon/icons/es/information--square--filled/20.js"),_carbon_icons_es_menu_16__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__("./node_modules/@carbon/icons/es/menu/16.js"),_carbon_icons_es_menu_20__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__("./node_modules/@carbon/icons/es/menu/20.js"),_carbon_icons_es_overflow_menu_vertical_16__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__("./node_modules/@carbon/icons/es/overflow-menu--vertical/16.js"),_carbon_icons_es_overflow_menu_horizontal_16__WEBPACK_IMPORTED_MODULE_41__=__webpack_require__("./node_modules/@carbon/icons/es/overflow-menu--horizontal/16.js"),_carbon_icons_es_save_16__WEBPACK_IMPORTED_MODULE_42__=__webpack_require__("./node_modules/@carbon/icons/es/save/16.js"),_carbon_icons_es_search_16__WEBPACK_IMPORTED_MODULE_43__=__webpack_require__("./node_modules/@carbon/icons/es/search/16.js"),_carbon_icons_es_settings_16__WEBPACK_IMPORTED_MODULE_44__=__webpack_require__("./node_modules/@carbon/icons/es/settings/16.js"),_carbon_icons_es_settings_adjust_16__WEBPACK_IMPORTED_MODULE_45__=__webpack_require__("./node_modules/@carbon/icons/es/settings--adjust/16.js"),_carbon_icons_es_subtract_16__WEBPACK_IMPORTED_MODULE_46__=__webpack_require__("./node_modules/@carbon/icons/es/subtract/16.js"),_carbon_icons_es_trash_can_16__WEBPACK_IMPORTED_MODULE_47__=__webpack_require__("./node_modules/@carbon/icons/es/trash-can/16.js"),_carbon_icons_es_warning_16__WEBPACK_IMPORTED_MODULE_48__=__webpack_require__("./node_modules/@carbon/icons/es/warning/16.js"),_carbon_icons_es_warning_filled_16__WEBPACK_IMPORTED_MODULE_49__=__webpack_require__("./node_modules/@carbon/icons/es/warning--filled/16.js"),_carbon_icons_es_warning_filled_20__WEBPACK_IMPORTED_MODULE_50__=__webpack_require__("./node_modules/@carbon/icons/es/warning--filled/20.js"),_carbon_icons_es_warning_alt_filled_16__WEBPACK_IMPORTED_MODULE_51__=__webpack_require__("./node_modules/@carbon/icons/es/warning--alt--filled/16.js"),_carbon_icons_es_warning_alt_filled_20__WEBPACK_IMPORTED_MODULE_52__=__webpack_require__("./node_modules/@carbon/icons/es/warning--alt--filled/20.js"),_carbon_icons_es_view_16__WEBPACK_IMPORTED_MODULE_53__=__webpack_require__("./node_modules/@carbon/icons/es/view/16.js"),_carbon_icons_es_view_off_16__WEBPACK_IMPORTED_MODULE_54__=__webpack_require__("./node_modules/@carbon/icons/es/view--off/16.js");const ICON_SERVICE_PROVIDER={provide:_icon_service__WEBPACK_IMPORTED_MODULE_1__.fM,deps:[[new _angular_core__WEBPACK_IMPORTED_MODULE_55__.Optional,new _angular_core__WEBPACK_IMPORTED_MODULE_55__.SkipSelf,_icon_service__WEBPACK_IMPORTED_MODULE_1__.fM]],useFactory:function ICON_SERVICE_PROVIDER_FACTORY(parentService){return parentService||new _icon_service__WEBPACK_IMPORTED_MODULE_1__.fM}};let IconModule=class IconModule{constructor(iconService){this.iconService=iconService,iconService.registerAll([_carbon_icons_es_add_16__WEBPACK_IMPORTED_MODULE_2__.A,_carbon_icons_es_add_20__WEBPACK_IMPORTED_MODULE_3__.A,_carbon_icons_es_bee_16__WEBPACK_IMPORTED_MODULE_4__.A,_carbon_icons_es_bee_20__WEBPACK_IMPORTED_MODULE_5__.A,_carbon_icons_es_calendar_16__WEBPACK_IMPORTED_MODULE_6__.A,_carbon_icons_es_carbon_16__WEBPACK_IMPORTED_MODULE_7__.A,_carbon_icons_es_carbon_20__WEBPACK_IMPORTED_MODULE_8__.A,_carbon_icons_es_caret_down_16__WEBPACK_IMPORTED_MODULE_9__.A,_carbon_icons_es_caret_left_16__WEBPACK_IMPORTED_MODULE_10__.A,_carbon_icons_es_caret_right_16__WEBPACK_IMPORTED_MODULE_11__.A,_carbon_icons_es_caret_up_16__WEBPACK_IMPORTED_MODULE_12__.A,_carbon_icons_es_checkmark_16__WEBPACK_IMPORTED_MODULE_13__.A,_carbon_icons_es_checkmark_filled_16__WEBPACK_IMPORTED_MODULE_14__.A,_carbon_icons_es_checkmark_filled_20__WEBPACK_IMPORTED_MODULE_15__.A,_carbon_icons_es_checkmark_outline_16__WEBPACK_IMPORTED_MODULE_16__.A,_carbon_icons_es_chevron_down_16__WEBPACK_IMPORTED_MODULE_17__.A,_carbon_icons_es_chevron_right_16__WEBPACK_IMPORTED_MODULE_18__.A,_carbon_icons_es_circle_dash_16__WEBPACK_IMPORTED_MODULE_19__.A,_carbon_icons_es_close_16__WEBPACK_IMPORTED_MODULE_20__.A,_carbon_icons_es_close_20__WEBPACK_IMPORTED_MODULE_21__.A,_carbon_icons_es_copy_16__WEBPACK_IMPORTED_MODULE_22__.A,_carbon_icons_es_copy_20__WEBPACK_IMPORTED_MODULE_23__.A,_carbon_icons_es_data_2_16__WEBPACK_IMPORTED_MODULE_24__.A,_carbon_icons_es_data_2_20__WEBPACK_IMPORTED_MODULE_25__.A,_carbon_icons_es_document_16__WEBPACK_IMPORTED_MODULE_26__.A,_carbon_icons_es_document_20__WEBPACK_IMPORTED_MODULE_27__.A,_carbon_icons_es_download_16__WEBPACK_IMPORTED_MODULE_28__.A,_carbon_icons_es_error_filled_16__WEBPACK_IMPORTED_MODULE_29__.A,_carbon_icons_es_error_filled_20__WEBPACK_IMPORTED_MODULE_30__.A,_carbon_icons_es_fade_16__WEBPACK_IMPORTED_MODULE_31__.A,_carbon_icons_es_fade_20__WEBPACK_IMPORTED_MODULE_32__.A,_carbon_icons_es_folder_16__WEBPACK_IMPORTED_MODULE_33__.A,_carbon_icons_es_incomplete_16__WEBPACK_IMPORTED_MODULE_34__.A,_carbon_icons_es_information_filled_16__WEBPACK_IMPORTED_MODULE_35__.A,_carbon_icons_es_information_filled_20__WEBPACK_IMPORTED_MODULE_36__.A,_carbon_icons_es_information_square_filled_20__WEBPACK_IMPORTED_MODULE_37__.A,_carbon_icons_es_menu_16__WEBPACK_IMPORTED_MODULE_38__.A,_carbon_icons_es_menu_20__WEBPACK_IMPORTED_MODULE_39__.A,_carbon_icons_es_overflow_menu_vertical_16__WEBPACK_IMPORTED_MODULE_40__.A,_carbon_icons_es_overflow_menu_horizontal_16__WEBPACK_IMPORTED_MODULE_41__.A,_carbon_icons_es_save_16__WEBPACK_IMPORTED_MODULE_42__.A,_carbon_icons_es_search_16__WEBPACK_IMPORTED_MODULE_43__.A,_carbon_icons_es_settings_16__WEBPACK_IMPORTED_MODULE_44__.A,_carbon_icons_es_settings_adjust_16__WEBPACK_IMPORTED_MODULE_45__.A,_carbon_icons_es_subtract_16__WEBPACK_IMPORTED_MODULE_46__.A,_carbon_icons_es_trash_can_16__WEBPACK_IMPORTED_MODULE_47__.A,_carbon_icons_es_view_16__WEBPACK_IMPORTED_MODULE_53__.A,_carbon_icons_es_view_off_16__WEBPACK_IMPORTED_MODULE_54__.A,_carbon_icons_es_warning_16__WEBPACK_IMPORTED_MODULE_48__.A,_carbon_icons_es_warning_filled_16__WEBPACK_IMPORTED_MODULE_49__.A,_carbon_icons_es_warning_filled_20__WEBPACK_IMPORTED_MODULE_50__.A,_carbon_icons_es_warning_alt_filled_16__WEBPACK_IMPORTED_MODULE_51__.A,_carbon_icons_es_warning_alt_filled_20__WEBPACK_IMPORTED_MODULE_52__.A])}static{this.ctorParameters=()=>[{type:_icon_service__WEBPACK_IMPORTED_MODULE_1__.fM}]}};IconModule=(0,tslib__WEBPACK_IMPORTED_MODULE_56__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_55__.NgModule)({declarations:[_icon_directive__WEBPACK_IMPORTED_MODULE_0__.L],exports:[_icon_directive__WEBPACK_IMPORTED_MODULE_0__.L],imports:[_angular_common__WEBPACK_IMPORTED_MODULE_57__.CommonModule],providers:[ICON_SERVICE_PROVIDER]})],IconModule)},"./src/icon/icon.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{fM:()=>IconService});var tslib__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@carbon/icon-helpers/es/index.js");class IconCache{}class IconNameNotFoundError extends Error{constructor(name){super(`Icon ${name} not found`)}}class IconSizeNotFoundError extends Error{constructor(size,name){super("Size ${size} for ${name} not found")}}class IconMemoryCache extends IconCache{constructor(){super(...arguments),this.iconMap=new Map}get(name,size){if(!this.iconMap.has(name))throw new IconNameNotFoundError(name);const sizeMap=this.iconMap.get(name);if(!sizeMap.has(size))throw new IconSizeNotFoundError(size,name);return sizeMap.get(size)}set(name,size,descriptor){this.iconMap.has(name)||this.iconMap.set(name,new Map);this.iconMap.get(name).set(size,descriptor)}}let IconService=class IconService{constructor(){this.iconCache=new IconMemoryCache}registerAll(descriptors){descriptors.forEach((icon=>this.register(icon)))}register(descriptor){const{name}=descriptor;this.registerAs(name,descriptor)}registerAs(name,descriptor){const{size}=descriptor;this.iconCache.set(name,size.toString(),descriptor)}get(name,size){try{const icon=this.iconCache.get(name,size.toString());return icon.svg||(icon.svg=(0,_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_0__.dI)(icon)),icon}catch(e){throw e}}configure(options){this.iconCache=options.cache}};IconService=(0,tslib__WEBPACK_IMPORTED_MODULE_1__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Injectable)()],IconService)},"./src/icon/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{LJ:()=>icon_directive.L,op:()=>icon_module.op,fM:()=>icon_service.fM});var icon_directive=__webpack_require__("./src/icon/icon.directive.ts"),icon_module=__webpack_require__("./src/icon/icon.module.ts"),icon_service=__webpack_require__("./src/icon/icon.service.ts")},"./src/button/button-set.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),_icon__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/icon/index.ts"),___WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/button/index.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Components/Button/Button Set",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.moduleMetadata)({imports:[___WEBPACK_IMPORTED_MODULE_2__.tm,_icon__WEBPACK_IMPORTED_MODULE_1__.op]})],parameters:{layout:"centered"},component:___WEBPACK_IMPORTED_MODULE_2__.Te},Basic=(args=>({props:args,template:'\n <cds-button-set>\n <button cdsButton="secondary" [size]="size" [isExpressive]="isExpressive">Button</button>\n <button cdsButton [size]="size" [isExpressive]="isExpressive">Button</button>\n </cds-button-set>\n '})).bind({});Basic.parameters={...Basic.parameters,docs:{...Basic.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <cds-button-set>\n <button cdsButton="secondary" [size]="size" [isExpressive]="isExpressive">Button</button>\n <button cdsButton [size]="size" [isExpressive]="isExpressive">Button</button>\n </cds-button-set>\n `\n})',...Basic.parameters?.docs?.source}}};const __namedExportsOrder=["Basic"]}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[8016],{"./src/button/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{TV:()=>BaseIconButton,$n:()=>Button,tm:()=>ButtonModule,Te:()=>ButtonSet,K0:()=>IconButton});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let Button=class Button{constructor(){this.cdsButton="primary",this.skeleton=!1,this.iconOnly=!1,this.isExpressive=!1,this.baseClass=!0}set ibmButton(type){this.cdsButton=type}get primaryButton(){return"primary"===this.cdsButton||!this.cdsButton}get secondaryButton(){return"secondary"===this.cdsButton}get tertiaryButton(){return"tertiary"===this.cdsButton}get ghostButton(){return"ghost"===this.cdsButton}get dangerButton(){return"danger"===this.cdsButton||"danger--primary"===this.cdsButton}get dangerTertiary(){return"danger--tertiary"===this.cdsButton}get dangerGhost(){return"danger--ghost"===this.cdsButton}get smallSize(){return"sm"===this.size&&!this.isExpressive}get mediumSize(){return"md"===this.size&&!this.isExpressive}get largeSize(){return"lg"===this.size}get extraLargeSize(){return"xl"===this.size}get twoExtraLargeSize(){return"2xl"===this.size}get smallLayoutSize(){return"sm"===this.size&&!this.isExpressive}get mediumLayoutSize(){return"md"===this.size&&!this.isExpressive}get largeLayoutSize(){return"lg"===this.size}get extraLargeLayoutSize(){return"xl"===this.size}get twoExtraLargeLayoutSize(){return"2xl"===this.size}static{this.propDecorators={ibmButton:[{type:core.Input}],cdsButton:[{type:core.Input}],size:[{type:core.Input}],skeleton:[{type:core.HostBinding,args:["class.cds--skeleton"]},{type:core.Input}],iconOnly:[{type:core.HostBinding,args:["class.cds--btn--icon-only"]},{type:core.Input}],isExpressive:[{type:core.HostBinding,args:["class.cds--btn--expressive"]},{type:core.Input}],baseClass:[{type:core.HostBinding,args:["class.cds--btn"]}],primaryButton:[{type:core.HostBinding,args:["class.cds--btn--primary"]}],secondaryButton:[{type:core.HostBinding,args:["class.cds--btn--secondary"]}],tertiaryButton:[{type:core.HostBinding,args:["class.cds--btn--tertiary"]}],ghostButton:[{type:core.HostBinding,args:["class.cds--btn--ghost"]}],dangerButton:[{type:core.HostBinding,args:["class.cds--btn--danger"]}],dangerTertiary:[{type:core.HostBinding,args:["class.cds--btn--danger--tertiary"]}],dangerGhost:[{type:core.HostBinding,args:["class.cds--btn--danger--ghost"]}],smallSize:[{type:core.HostBinding,args:["class.cds--btn--sm"]}],mediumSize:[{type:core.HostBinding,args:["class.cds--btn--md"]}],largeSize:[{type:core.HostBinding,args:["class.cds--btn--lg"]}],extraLargeSize:[{type:core.HostBinding,args:["class.cds--btn--xl"]}],twoExtraLargeSize:[{type:core.HostBinding,args:["class.cds--btn--2xl"]}],smallLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-sm"]}],mediumLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-md"]}],largeLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-lg"]}],extraLargeLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-xl"]}],twoExtraLargeLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-2xl"]}]}}};Button=(0,tslib_es6.Cg)([(0,core.Directive)({selector:"[cdsButton], [ibmButton]"})],Button);let ButtonSet=class ButtonSet{constructor(){this.buttonSetClass=!0}static{this.propDecorators={buttonSetClass:[{type:core.HostBinding,args:["class.cds--btn-set"]}]}}};ButtonSet=(0,tslib_es6.Cg)([(0,core.Component)({selector:"cds-button-set, ibm-button-set",template:"<ng-content></ng-content>"})],ButtonSet);let BaseIconButton=class BaseIconButton{constructor(){this.caret=!0,this.dropShadow=!0,this.highContrast=!0,this.isOpen=!1,this.align="bottom",this.autoAlign=!1,this.enterDelayMs=100,this.leaveDelayMs=300}static{this.propDecorators={caret:[{type:core.Input}],dropShadow:[{type:core.Input}],highContrast:[{type:core.Input}],isOpen:[{type:core.Input}],align:[{type:core.Input}],autoAlign:[{type:core.Input}],enterDelayMs:[{type:core.Input}],leaveDelayMs:[{type:core.Input}]}}};var IconButton_1;BaseIconButton=(0,tslib_es6.Cg)([(0,core.Component)({template:""})],BaseIconButton);let IconButton=class IconButton extends BaseIconButton{static{IconButton_1=this}set buttonNgClass(obj){this.classList=Object.assign({"cds--btn--disabled":this.disabled},obj)}get buttonNgClass(){return this.classList}set buttonAttributes(obj){this.button&&(Object.keys(this.attributeList).forEach((key=>{this.renderer.removeAttribute(this.button.nativeElement,key)})),Object.keys(obj).forEach((key=>{this.renderer.setAttribute(this.button.nativeElement,key,obj[key])}))),this.attributeList=obj}get buttonAttributes(){return this.buttonAttributes}static{this.iconButtonCounter=0}constructor(renderer){super(),this.renderer=renderer,this.buttonId="icon-btn-"+IconButton_1.iconButtonCounter++,this.kind="primary",this.size="lg",this.type="button",this.isExpressive=!1,this.disabled=!1,this.showTooltipWhenDisabled=!1,this.click=new core.EventEmitter,this.focus=new core.EventEmitter,this.blur=new core.EventEmitter,this.tooltipClick=new core.EventEmitter,this.classList={},this.attributeList={}}ngAfterViewInit(){this.buttonAttributes=this.attributeList}emitClickEvent(event,element="button"){event.preventDefault(),event.stopPropagation(),"tooltip"!==element?this.click.emit(event):this.tooltipClick.emit(event)}static{this.ctorParameters=()=>[{type:core.Renderer2}]}static{this.propDecorators={buttonNgClass:[{type:core.Input}],buttonAttributes:[{type:core.Input}],button:[{type:core.ViewChild,args:["button"]}],buttonId:[{type:core.Input}],kind:[{type:core.Input}],size:[{type:core.Input}],type:[{type:core.Input}],isExpressive:[{type:core.Input}],disabled:[{type:core.Input}],description:[{type:core.Input}],showTooltipWhenDisabled:[{type:core.Input}],click:[{type:core.Output}],focus:[{type:core.Output}],blur:[{type:core.Output}],tooltipClick:[{type:core.Output}]}}};IconButton=IconButton_1=(0,tslib_es6.Cg)([(0,core.Component)({selector:"cds-icon-button, ibm-icon-button",template:'\n\t<cds-tooltip\n\t\tclass="cds--icon-tooltip"\n\t\t[description]="description"\n\t\t[disabled]="showTooltipWhenDisabled ? false : disabled"\n\t\t[caret]="caret"\n\t\t[dropShadow]="dropShadow"\n\t\t[highContrast]="highContrast"\n\t\t[isOpen]="isOpen"\n\t\t[align]="align"\n\t\t[autoAlign]="autoAlign"\n\t\t[enterDelayMs]="enterDelayMs"\n\t\t[leaveDelayMs]="leaveDelayMs"\n\t\t(click)="emitClickEvent($event, \'tooltip\')">\n\t\t<button\n\t\t\t#button\n\t\t\t[id]="buttonId"\n\t\t\t[disabled]="disabled"\n\t\t\t[attr.type]="type"\n\t\t\t[iconOnly]="true"\n\t\t\t[ngClass]="buttonNgClass"\n\t\t\t[cdsButton]="kind"\n\t\t\t[size]="size"\n\t\t\t[isExpressive]="isExpressive"\n\t\t\t(click)="emitClickEvent($event)"\n\t\t\t(focus)="focus.emit($event)"\n\t\t\t(blur)="blur.emit($event)">\n\t\t\t<ng-content></ng-content>\n\t\t</button>\n\t</cds-tooltip>\n\t'})],IconButton);var common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),tooltip=__webpack_require__("./src/tooltip/index.ts");let ButtonModule=class ButtonModule{};ButtonModule=(0,tslib_es6.Cg)([(0,core.NgModule)({declarations:[Button,ButtonSet,BaseIconButton,IconButton],exports:[Button,ButtonSet,IconButton],imports:[common.CommonModule,tooltip.Ss]})],ButtonModule)},"./src/icon/icon.directive.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{L:()=>IconDirective});var IconDirective_1,tslib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_icon_service__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/icon/icon.service.ts"),_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@carbon/icon-helpers/es/index.js");let IconDirective=class IconDirective{static{IconDirective_1=this}set ibmIcon(iconName){this.cdsIcon=iconName}static{this.titleIdCounter=0}constructor(elementRef,iconService){this.elementRef=elementRef,this.iconService=iconService,this.cdsIcon="",this.size="16",this.title="",this.ariaLabel="",this.ariaLabelledBy="",this.ariaHidden="",this.isFocusable=!1}renderIcon(iconName){const root=this.elementRef.nativeElement;let icon;try{icon=this.iconService.get(iconName,this.size.toString())}catch(error){return void console.warn(error)}const domParser=new DOMParser,rawSVG=icon.svg,svgElement=domParser.parseFromString(rawSVG,"image/svg+xml").documentElement;let node="SVG"!==root.tagName.toUpperCase()?svgElement:svgElement.firstChild;for(root.innerHTML="";node;)root.appendChild(root.ownerDocument.importNode(node,!0)),node=node.nextSibling;const svg="SVG"!==root.tagName.toUpperCase()?svgElement:root;svg.setAttribute("xmlns","http://www.w3.org/2000/svg");const attributes=(0,_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_1__.gu)({width:icon.attrs.width,height:icon.attrs.height,viewBox:icon.attrs.viewBox,title:this.title,"aria-label":this.ariaLabel,"aria-labelledby":this.ariaLabelledBy,"aria-hidden":this.ariaHidden,focusable:this.isFocusable.toString(),fill:icon.attrs.fill}),attrKeys=Object.keys(attributes);for(let i=0;i<attrKeys.length;i++){const key=attrKeys[i],value=attributes[key];"title"!==key&&(value&&svg.setAttribute(key,value))}if(attributes.title){const title=document.createElement("title");title.textContent=attributes.title,IconDirective_1.titleIdCounter++,title.setAttribute("id",`${icon.name}-title-${IconDirective_1.titleIdCounter}`),svg.insertBefore(title,svg.firstElementChild),svg.setAttribute("aria-labelledby",`${icon.name}-title-${IconDirective_1.titleIdCounter}`)}}ngAfterViewInit(){this.renderIcon(this.cdsIcon)}ngOnChanges({cdsIcon}){cdsIcon&&!cdsIcon.isFirstChange()&&this.renderIcon(this.cdsIcon)}static{this.ctorParameters=()=>[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.ElementRef},{type:_icon_service__WEBPACK_IMPORTED_MODULE_0__.fM}]}static{this.propDecorators={ibmIcon:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],cdsIcon:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],size:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],title:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaLabel:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaLabelledBy:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaHidden:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],isFocusable:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}]}}};IconDirective=IconDirective_1=(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Directive)({selector:"[cdsIcon], [ibmIcon]"})],IconDirective)},"./src/icon/icon.module.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{op:()=>IconModule});var tslib__WEBPACK_IMPORTED_MODULE_56__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_55__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_angular_common__WEBPACK_IMPORTED_MODULE_57__=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),_icon_directive__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/icon/icon.directive.ts"),_icon_service__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/icon/icon.service.ts"),_carbon_icons_es_add_16__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@carbon/icons/es/add/16.js"),_carbon_icons_es_add_20__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@carbon/icons/es/add/20.js"),_carbon_icons_es_bee_16__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@carbon/icons/es/bee/16.js"),_carbon_icons_es_bee_20__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@carbon/icons/es/bee/20.js"),_carbon_icons_es_calendar_16__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@carbon/icons/es/calendar/16.js"),_carbon_icons_es_carbon_16__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@carbon/icons/es/carbon/16.js"),_carbon_icons_es_carbon_20__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/@carbon/icons/es/carbon/20.js"),_carbon_icons_es_caret_down_16__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/@carbon/icons/es/caret--down/16.js"),_carbon_icons_es_caret_left_16__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/@carbon/icons/es/caret--left/16.js"),_carbon_icons_es_caret_right_16__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/@carbon/icons/es/caret--right/16.js"),_carbon_icons_es_caret_up_16__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/@carbon/icons/es/caret--up/16.js"),_carbon_icons_es_checkmark_16__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark/16.js"),_carbon_icons_es_checkmark_filled_16__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--filled/16.js"),_carbon_icons_es_checkmark_filled_20__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--filled/20.js"),_carbon_icons_es_checkmark_outline_16__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--outline/16.js"),_carbon_icons_es_chevron_down_16__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/@carbon/icons/es/chevron--down/16.js"),_carbon_icons_es_chevron_right_16__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/@carbon/icons/es/chevron--right/16.js"),_carbon_icons_es_circle_dash_16__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@carbon/icons/es/circle-dash/16.js"),_carbon_icons_es_close_16__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/@carbon/icons/es/close/16.js"),_carbon_icons_es_close_20__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@carbon/icons/es/close/20.js"),_carbon_icons_es_copy_16__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@carbon/icons/es/copy/16.js"),_carbon_icons_es_copy_20__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@carbon/icons/es/copy/20.js"),_carbon_icons_es_data_2_16__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/@carbon/icons/es/data--2/16.js"),_carbon_icons_es_data_2_20__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/@carbon/icons/es/data--2/20.js"),_carbon_icons_es_document_16__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/@carbon/icons/es/document/16.js"),_carbon_icons_es_document_20__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/@carbon/icons/es/document/20.js"),_carbon_icons_es_download_16__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/@carbon/icons/es/download/16.js"),_carbon_icons_es_error_filled_16__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./node_modules/@carbon/icons/es/error--filled/16.js"),_carbon_icons_es_error_filled_20__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./node_modules/@carbon/icons/es/error--filled/20.js"),_carbon_icons_es_fade_16__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./node_modules/@carbon/icons/es/fade/16.js"),_carbon_icons_es_fade_20__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("./node_modules/@carbon/icons/es/fade/20.js"),_carbon_icons_es_folder_16__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("./node_modules/@carbon/icons/es/folder/16.js"),_carbon_icons_es_incomplete_16__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__("./node_modules/@carbon/icons/es/incomplete/16.js"),_carbon_icons_es_information_filled_16__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__("./node_modules/@carbon/icons/es/information--filled/16.js"),_carbon_icons_es_information_filled_20__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__("./node_modules/@carbon/icons/es/information--filled/20.js"),_carbon_icons_es_information_square_filled_20__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__("./node_modules/@carbon/icons/es/information--square--filled/20.js"),_carbon_icons_es_menu_16__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__("./node_modules/@carbon/icons/es/menu/16.js"),_carbon_icons_es_menu_20__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__("./node_modules/@carbon/icons/es/menu/20.js"),_carbon_icons_es_overflow_menu_vertical_16__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__("./node_modules/@carbon/icons/es/overflow-menu--vertical/16.js"),_carbon_icons_es_overflow_menu_horizontal_16__WEBPACK_IMPORTED_MODULE_41__=__webpack_require__("./node_modules/@carbon/icons/es/overflow-menu--horizontal/16.js"),_carbon_icons_es_save_16__WEBPACK_IMPORTED_MODULE_42__=__webpack_require__("./node_modules/@carbon/icons/es/save/16.js"),_carbon_icons_es_search_16__WEBPACK_IMPORTED_MODULE_43__=__webpack_require__("./node_modules/@carbon/icons/es/search/16.js"),_carbon_icons_es_settings_16__WEBPACK_IMPORTED_MODULE_44__=__webpack_require__("./node_modules/@carbon/icons/es/settings/16.js"),_carbon_icons_es_settings_adjust_16__WEBPACK_IMPORTED_MODULE_45__=__webpack_require__("./node_modules/@carbon/icons/es/settings--adjust/16.js"),_carbon_icons_es_subtract_16__WEBPACK_IMPORTED_MODULE_46__=__webpack_require__("./node_modules/@carbon/icons/es/subtract/16.js"),_carbon_icons_es_trash_can_16__WEBPACK_IMPORTED_MODULE_47__=__webpack_require__("./node_modules/@carbon/icons/es/trash-can/16.js"),_carbon_icons_es_warning_16__WEBPACK_IMPORTED_MODULE_48__=__webpack_require__("./node_modules/@carbon/icons/es/warning/16.js"),_carbon_icons_es_warning_filled_16__WEBPACK_IMPORTED_MODULE_49__=__webpack_require__("./node_modules/@carbon/icons/es/warning--filled/16.js"),_carbon_icons_es_warning_filled_20__WEBPACK_IMPORTED_MODULE_50__=__webpack_require__("./node_modules/@carbon/icons/es/warning--filled/20.js"),_carbon_icons_es_warning_alt_filled_16__WEBPACK_IMPORTED_MODULE_51__=__webpack_require__("./node_modules/@carbon/icons/es/warning--alt--filled/16.js"),_carbon_icons_es_warning_alt_filled_20__WEBPACK_IMPORTED_MODULE_52__=__webpack_require__("./node_modules/@carbon/icons/es/warning--alt--filled/20.js"),_carbon_icons_es_view_16__WEBPACK_IMPORTED_MODULE_53__=__webpack_require__("./node_modules/@carbon/icons/es/view/16.js"),_carbon_icons_es_view_off_16__WEBPACK_IMPORTED_MODULE_54__=__webpack_require__("./node_modules/@carbon/icons/es/view--off/16.js");const ICON_SERVICE_PROVIDER={provide:_icon_service__WEBPACK_IMPORTED_MODULE_1__.fM,deps:[[new _angular_core__WEBPACK_IMPORTED_MODULE_55__.Optional,new _angular_core__WEBPACK_IMPORTED_MODULE_55__.SkipSelf,_icon_service__WEBPACK_IMPORTED_MODULE_1__.fM]],useFactory:function ICON_SERVICE_PROVIDER_FACTORY(parentService){return parentService||new _icon_service__WEBPACK_IMPORTED_MODULE_1__.fM}};let IconModule=class IconModule{constructor(iconService){this.iconService=iconService,iconService.registerAll([_carbon_icons_es_add_16__WEBPACK_IMPORTED_MODULE_2__.A,_carbon_icons_es_add_20__WEBPACK_IMPORTED_MODULE_3__.A,_carbon_icons_es_bee_16__WEBPACK_IMPORTED_MODULE_4__.A,_carbon_icons_es_bee_20__WEBPACK_IMPORTED_MODULE_5__.A,_carbon_icons_es_calendar_16__WEBPACK_IMPORTED_MODULE_6__.A,_carbon_icons_es_carbon_16__WEBPACK_IMPORTED_MODULE_7__.A,_carbon_icons_es_carbon_20__WEBPACK_IMPORTED_MODULE_8__.A,_carbon_icons_es_caret_down_16__WEBPACK_IMPORTED_MODULE_9__.A,_carbon_icons_es_caret_left_16__WEBPACK_IMPORTED_MODULE_10__.A,_carbon_icons_es_caret_right_16__WEBPACK_IMPORTED_MODULE_11__.A,_carbon_icons_es_caret_up_16__WEBPACK_IMPORTED_MODULE_12__.A,_carbon_icons_es_checkmark_16__WEBPACK_IMPORTED_MODULE_13__.A,_carbon_icons_es_checkmark_filled_16__WEBPACK_IMPORTED_MODULE_14__.A,_carbon_icons_es_checkmark_filled_20__WEBPACK_IMPORTED_MODULE_15__.A,_carbon_icons_es_checkmark_outline_16__WEBPACK_IMPORTED_MODULE_16__.A,_carbon_icons_es_chevron_down_16__WEBPACK_IMPORTED_MODULE_17__.A,_carbon_icons_es_chevron_right_16__WEBPACK_IMPORTED_MODULE_18__.A,_carbon_icons_es_circle_dash_16__WEBPACK_IMPORTED_MODULE_19__.A,_carbon_icons_es_close_16__WEBPACK_IMPORTED_MODULE_20__.A,_carbon_icons_es_close_20__WEBPACK_IMPORTED_MODULE_21__.A,_carbon_icons_es_copy_16__WEBPACK_IMPORTED_MODULE_22__.A,_carbon_icons_es_copy_20__WEBPACK_IMPORTED_MODULE_23__.A,_carbon_icons_es_data_2_16__WEBPACK_IMPORTED_MODULE_24__.A,_carbon_icons_es_data_2_20__WEBPACK_IMPORTED_MODULE_25__.A,_carbon_icons_es_document_16__WEBPACK_IMPORTED_MODULE_26__.A,_carbon_icons_es_document_20__WEBPACK_IMPORTED_MODULE_27__.A,_carbon_icons_es_download_16__WEBPACK_IMPORTED_MODULE_28__.A,_carbon_icons_es_error_filled_16__WEBPACK_IMPORTED_MODULE_29__.A,_carbon_icons_es_error_filled_20__WEBPACK_IMPORTED_MODULE_30__.A,_carbon_icons_es_fade_16__WEBPACK_IMPORTED_MODULE_31__.A,_carbon_icons_es_fade_20__WEBPACK_IMPORTED_MODULE_32__.A,_carbon_icons_es_folder_16__WEBPACK_IMPORTED_MODULE_33__.A,_carbon_icons_es_incomplete_16__WEBPACK_IMPORTED_MODULE_34__.A,_carbon_icons_es_information_filled_16__WEBPACK_IMPORTED_MODULE_35__.A,_carbon_icons_es_information_filled_20__WEBPACK_IMPORTED_MODULE_36__.A,_carbon_icons_es_information_square_filled_20__WEBPACK_IMPORTED_MODULE_37__.A,_carbon_icons_es_menu_16__WEBPACK_IMPORTED_MODULE_38__.A,_carbon_icons_es_menu_20__WEBPACK_IMPORTED_MODULE_39__.A,_carbon_icons_es_overflow_menu_vertical_16__WEBPACK_IMPORTED_MODULE_40__.A,_carbon_icons_es_overflow_menu_horizontal_16__WEBPACK_IMPORTED_MODULE_41__.A,_carbon_icons_es_save_16__WEBPACK_IMPORTED_MODULE_42__.A,_carbon_icons_es_search_16__WEBPACK_IMPORTED_MODULE_43__.A,_carbon_icons_es_settings_16__WEBPACK_IMPORTED_MODULE_44__.A,_carbon_icons_es_settings_adjust_16__WEBPACK_IMPORTED_MODULE_45__.A,_carbon_icons_es_subtract_16__WEBPACK_IMPORTED_MODULE_46__.A,_carbon_icons_es_trash_can_16__WEBPACK_IMPORTED_MODULE_47__.A,_carbon_icons_es_view_16__WEBPACK_IMPORTED_MODULE_53__.A,_carbon_icons_es_view_off_16__WEBPACK_IMPORTED_MODULE_54__.A,_carbon_icons_es_warning_16__WEBPACK_IMPORTED_MODULE_48__.A,_carbon_icons_es_warning_filled_16__WEBPACK_IMPORTED_MODULE_49__.A,_carbon_icons_es_warning_filled_20__WEBPACK_IMPORTED_MODULE_50__.A,_carbon_icons_es_warning_alt_filled_16__WEBPACK_IMPORTED_MODULE_51__.A,_carbon_icons_es_warning_alt_filled_20__WEBPACK_IMPORTED_MODULE_52__.A])}static{this.ctorParameters=()=>[{type:_icon_service__WEBPACK_IMPORTED_MODULE_1__.fM}]}};IconModule=(0,tslib__WEBPACK_IMPORTED_MODULE_56__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_55__.NgModule)({declarations:[_icon_directive__WEBPACK_IMPORTED_MODULE_0__.L],exports:[_icon_directive__WEBPACK_IMPORTED_MODULE_0__.L],imports:[_angular_common__WEBPACK_IMPORTED_MODULE_57__.CommonModule],providers:[ICON_SERVICE_PROVIDER]})],IconModule)},"./src/icon/icon.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{fM:()=>IconService});var tslib__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@carbon/icon-helpers/es/index.js");class IconCache{}class IconNameNotFoundError extends Error{constructor(name){super(`Icon ${name} not found`)}}class IconSizeNotFoundError extends Error{constructor(size,name){super("Size ${size} for ${name} not found")}}class IconMemoryCache extends IconCache{constructor(){super(...arguments),this.iconMap=new Map}get(name,size){if(!this.iconMap.has(name))throw new IconNameNotFoundError(name);const sizeMap=this.iconMap.get(name);if(!sizeMap.has(size))throw new IconSizeNotFoundError(size,name);return sizeMap.get(size)}set(name,size,descriptor){this.iconMap.has(name)||this.iconMap.set(name,new Map);this.iconMap.get(name).set(size,descriptor)}}let IconService=class IconService{constructor(){this.iconCache=new IconMemoryCache}registerAll(descriptors){descriptors.forEach((icon=>this.register(icon)))}register(descriptor){const{name}=descriptor;this.registerAs(name,descriptor)}registerAs(name,descriptor){const{size}=descriptor;this.iconCache.set(name,size.toString(),descriptor)}get(name,size){try{const icon=this.iconCache.get(name,size.toString());return icon.svg||(icon.svg=(0,_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_0__.dI)(icon)),icon}catch(e){throw e}}configure(options){this.iconCache=options.cache}};IconService=(0,tslib__WEBPACK_IMPORTED_MODULE_1__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Injectable)()],IconService)},"./src/icon/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{LJ:()=>icon_directive.L,op:()=>icon_module.op,fM:()=>icon_service.fM});var icon_directive=__webpack_require__("./src/icon/icon.directive.ts"),icon_module=__webpack_require__("./src/icon/icon.module.ts"),icon_service=__webpack_require__("./src/icon/icon.service.ts")},"./src/button/button.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,WithIcon:()=>WithIcon,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),_icon__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/icon/index.ts"),___WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/button/index.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Components/Button",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.moduleMetadata)({imports:[___WEBPACK_IMPORTED_MODULE_2__.tm,_icon__WEBPACK_IMPORTED_MODULE_1__.op]})],args:{kind:"primary",size:"md",isExpressive:"false",disabled:!1},argTypes:{kind:{options:["primary","secondary","tertiary","ghost","danger","danger--primary","danger--tertiary","danger--ghost"],control:{type:"select"},name:"cdsButton"},size:{options:["sm","md","lg","xl","2xl"],control:{type:"select"}},isExpressive:{type:"boolean"},disabled:{type:"boolean"},onClick:{action:"clicked"},onMouseEnter:{action:"mouseenter"},onMouseLeave:{action:"mouseleave"},onFocus:{action:"focus"},onBlur:{action:"blur"}},parameters:{layout:"centered"},component:___WEBPACK_IMPORTED_MODULE_2__.$n},Basic=(args=>({props:args,template:'\n <button\n [cdsButton]="kind"\n [size]="size"\n [isExpressive]="isExpressive"\n [disabled]="disabled"\n (click)="onClick($event)"\n (mouseenter)="onMouseEnter($event)"\n (mouseleave)="onMouseLeave($event)"\n (focus)="onFocus($event)"\n (blur)="onBlur($event)">\n Button\n </button>\n '})).bind({}),WithIcon=(args=>({props:args,template:'\n <button\n [cdsButton]="kind"\n [size]="size"\n [isExpressive]="isExpressive"\n [disabled]="disabled"\n (click)="onClick($event)"\n (mouseenter)="onMouseEnter($event)"\n (mouseleave)="onMouseleave($event)"\n (focus)="onFocus($event)"\n (blur)="onBlur($event)">\n With icon\n <svg class="cds--btn__icon" cdsIcon="add" size="16"></svg>\n </button>\n '})).bind({});Basic.parameters={...Basic.parameters,docs:{...Basic.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <button\n [cdsButton]="kind"\n [size]="size"\n [isExpressive]="isExpressive"\n [disabled]="disabled"\n (click)="onClick($event)"\n (mouseenter)="onMouseEnter($event)"\n (mouseleave)="onMouseLeave($event)"\n (focus)="onFocus($event)"\n (blur)="onBlur($event)">\n Button\n </button>\n `\n})',...Basic.parameters?.docs?.source}}},WithIcon.parameters={...WithIcon.parameters,docs:{...WithIcon.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <button\n [cdsButton]="kind"\n [size]="size"\n [isExpressive]="isExpressive"\n [disabled]="disabled"\n (click)="onClick($event)"\n (mouseenter)="onMouseEnter($event)"\n (mouseleave)="onMouseleave($event)"\n (focus)="onFocus($event)"\n (blur)="onBlur($event)">\n With icon\n <svg class="cds--btn__icon" cdsIcon="add" size="16"></svg>\n </button>\n `\n})',...WithIcon.parameters?.docs?.source}}};const __namedExportsOrder=["Basic","WithIcon"]}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[9476],{"./src/button/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{TV:()=>BaseIconButton,$n:()=>Button,tm:()=>ButtonModule,Te:()=>ButtonSet,K0:()=>IconButton});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let Button=class Button{constructor(){this.cdsButton="primary",this.skeleton=!1,this.iconOnly=!1,this.isExpressive=!1,this.baseClass=!0}set ibmButton(type){this.cdsButton=type}get primaryButton(){return"primary"===this.cdsButton||!this.cdsButton}get secondaryButton(){return"secondary"===this.cdsButton}get tertiaryButton(){return"tertiary"===this.cdsButton}get ghostButton(){return"ghost"===this.cdsButton}get dangerButton(){return"danger"===this.cdsButton||"danger--primary"===this.cdsButton}get dangerTertiary(){return"danger--tertiary"===this.cdsButton}get dangerGhost(){return"danger--ghost"===this.cdsButton}get smallSize(){return"sm"===this.size&&!this.isExpressive}get mediumSize(){return"md"===this.size&&!this.isExpressive}get largeSize(){return"lg"===this.size}get extraLargeSize(){return"xl"===this.size}get twoExtraLargeSize(){return"2xl"===this.size}get smallLayoutSize(){return"sm"===this.size&&!this.isExpressive}get mediumLayoutSize(){return"md"===this.size&&!this.isExpressive}get largeLayoutSize(){return"lg"===this.size}get extraLargeLayoutSize(){return"xl"===this.size}get twoExtraLargeLayoutSize(){return"2xl"===this.size}static{this.propDecorators={ibmButton:[{type:core.Input}],cdsButton:[{type:core.Input}],size:[{type:core.Input}],skeleton:[{type:core.HostBinding,args:["class.cds--skeleton"]},{type:core.Input}],iconOnly:[{type:core.HostBinding,args:["class.cds--btn--icon-only"]},{type:core.Input}],isExpressive:[{type:core.HostBinding,args:["class.cds--btn--expressive"]},{type:core.Input}],baseClass:[{type:core.HostBinding,args:["class.cds--btn"]}],primaryButton:[{type:core.HostBinding,args:["class.cds--btn--primary"]}],secondaryButton:[{type:core.HostBinding,args:["class.cds--btn--secondary"]}],tertiaryButton:[{type:core.HostBinding,args:["class.cds--btn--tertiary"]}],ghostButton:[{type:core.HostBinding,args:["class.cds--btn--ghost"]}],dangerButton:[{type:core.HostBinding,args:["class.cds--btn--danger"]}],dangerTertiary:[{type:core.HostBinding,args:["class.cds--btn--danger--tertiary"]}],dangerGhost:[{type:core.HostBinding,args:["class.cds--btn--danger--ghost"]}],smallSize:[{type:core.HostBinding,args:["class.cds--btn--sm"]}],mediumSize:[{type:core.HostBinding,args:["class.cds--btn--md"]}],largeSize:[{type:core.HostBinding,args:["class.cds--btn--lg"]}],extraLargeSize:[{type:core.HostBinding,args:["class.cds--btn--xl"]}],twoExtraLargeSize:[{type:core.HostBinding,args:["class.cds--btn--2xl"]}],smallLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-sm"]}],mediumLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-md"]}],largeLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-lg"]}],extraLargeLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-xl"]}],twoExtraLargeLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-2xl"]}]}}};Button=(0,tslib_es6.Cg)([(0,core.Directive)({selector:"[cdsButton], [ibmButton]"})],Button);let ButtonSet=class ButtonSet{constructor(){this.buttonSetClass=!0}static{this.propDecorators={buttonSetClass:[{type:core.HostBinding,args:["class.cds--btn-set"]}]}}};ButtonSet=(0,tslib_es6.Cg)([(0,core.Component)({selector:"cds-button-set, ibm-button-set",template:"<ng-content></ng-content>"})],ButtonSet);let BaseIconButton=class BaseIconButton{constructor(){this.caret=!0,this.dropShadow=!0,this.highContrast=!0,this.isOpen=!1,this.align="bottom",this.autoAlign=!1,this.enterDelayMs=100,this.leaveDelayMs=300}static{this.propDecorators={caret:[{type:core.Input}],dropShadow:[{type:core.Input}],highContrast:[{type:core.Input}],isOpen:[{type:core.Input}],align:[{type:core.Input}],autoAlign:[{type:core.Input}],enterDelayMs:[{type:core.Input}],leaveDelayMs:[{type:core.Input}]}}};var IconButton_1;BaseIconButton=(0,tslib_es6.Cg)([(0,core.Component)({template:""})],BaseIconButton);let IconButton=class IconButton extends BaseIconButton{static{IconButton_1=this}set buttonNgClass(obj){this.classList=Object.assign({"cds--btn--disabled":this.disabled},obj)}get buttonNgClass(){return this.classList}set buttonAttributes(obj){this.button&&(Object.keys(this.attributeList).forEach((key=>{this.renderer.removeAttribute(this.button.nativeElement,key)})),Object.keys(obj).forEach((key=>{this.renderer.setAttribute(this.button.nativeElement,key,obj[key])}))),this.attributeList=obj}get buttonAttributes(){return this.buttonAttributes}static{this.iconButtonCounter=0}constructor(renderer){super(),this.renderer=renderer,this.buttonId="icon-btn-"+IconButton_1.iconButtonCounter++,this.kind="primary",this.size="lg",this.type="button",this.isExpressive=!1,this.disabled=!1,this.showTooltipWhenDisabled=!1,this.click=new core.EventEmitter,this.focus=new core.EventEmitter,this.blur=new core.EventEmitter,this.tooltipClick=new core.EventEmitter,this.classList={},this.attributeList={}}ngAfterViewInit(){this.buttonAttributes=this.attributeList}emitClickEvent(event,element="button"){event.preventDefault(),event.stopPropagation(),"tooltip"!==element?this.click.emit(event):this.tooltipClick.emit(event)}static{this.ctorParameters=()=>[{type:core.Renderer2}]}static{this.propDecorators={buttonNgClass:[{type:core.Input}],buttonAttributes:[{type:core.Input}],button:[{type:core.ViewChild,args:["button"]}],buttonId:[{type:core.Input}],kind:[{type:core.Input}],size:[{type:core.Input}],type:[{type:core.Input}],isExpressive:[{type:core.Input}],disabled:[{type:core.Input}],description:[{type:core.Input}],showTooltipWhenDisabled:[{type:core.Input}],click:[{type:core.Output}],focus:[{type:core.Output}],blur:[{type:core.Output}],tooltipClick:[{type:core.Output}]}}};IconButton=IconButton_1=(0,tslib_es6.Cg)([(0,core.Component)({selector:"cds-icon-button, ibm-icon-button",template:'\n\t<cds-tooltip\n\t\tclass="cds--icon-tooltip"\n\t\t[description]="description"\n\t\t[disabled]="showTooltipWhenDisabled ? false : disabled"\n\t\t[caret]="caret"\n\t\t[dropShadow]="dropShadow"\n\t\t[highContrast]="highContrast"\n\t\t[isOpen]="isOpen"\n\t\t[align]="align"\n\t\t[autoAlign]="autoAlign"\n\t\t[enterDelayMs]="enterDelayMs"\n\t\t[leaveDelayMs]="leaveDelayMs"\n\t\t(click)="emitClickEvent($event, \'tooltip\')">\n\t\t<button\n\t\t\t#button\n\t\t\t[id]="buttonId"\n\t\t\t[disabled]="disabled"\n\t\t\t[attr.type]="type"\n\t\t\t[iconOnly]="true"\n\t\t\t[ngClass]="buttonNgClass"\n\t\t\t[cdsButton]="kind"\n\t\t\t[size]="size"\n\t\t\t[isExpressive]="isExpressive"\n\t\t\t(click)="emitClickEvent($event)"\n\t\t\t(focus)="focus.emit($event)"\n\t\t\t(blur)="blur.emit($event)">\n\t\t\t<ng-content></ng-content>\n\t\t</button>\n\t</cds-tooltip>\n\t'})],IconButton);var common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),tooltip=__webpack_require__("./src/tooltip/index.ts");let ButtonModule=class ButtonModule{};ButtonModule=(0,tslib_es6.Cg)([(0,core.NgModule)({declarations:[Button,ButtonSet,BaseIconButton,IconButton],exports:[Button,ButtonSet,IconButton],imports:[common.CommonModule,tooltip.Ss]})],ButtonModule)},"./src/icon/icon.directive.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{L:()=>IconDirective});var IconDirective_1,tslib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_icon_service__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/icon/icon.service.ts"),_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@carbon/icon-helpers/es/index.js");let IconDirective=class IconDirective{static{IconDirective_1=this}set ibmIcon(iconName){this.cdsIcon=iconName}static{this.titleIdCounter=0}constructor(elementRef,iconService){this.elementRef=elementRef,this.iconService=iconService,this.cdsIcon="",this.size="16",this.title="",this.ariaLabel="",this.ariaLabelledBy="",this.ariaHidden="",this.isFocusable=!1}renderIcon(iconName){const root=this.elementRef.nativeElement;let icon;try{icon=this.iconService.get(iconName,this.size.toString())}catch(error){return void console.warn(error)}const domParser=new DOMParser,rawSVG=icon.svg,svgElement=domParser.parseFromString(rawSVG,"image/svg+xml").documentElement;let node="SVG"!==root.tagName.toUpperCase()?svgElement:svgElement.firstChild;for(root.innerHTML="";node;)root.appendChild(root.ownerDocument.importNode(node,!0)),node=node.nextSibling;const svg="SVG"!==root.tagName.toUpperCase()?svgElement:root;svg.setAttribute("xmlns","http://www.w3.org/2000/svg");const attributes=(0,_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_1__.gu)({width:icon.attrs.width,height:icon.attrs.height,viewBox:icon.attrs.viewBox,title:this.title,"aria-label":this.ariaLabel,"aria-labelledby":this.ariaLabelledBy,"aria-hidden":this.ariaHidden,focusable:this.isFocusable.toString(),fill:icon.attrs.fill}),attrKeys=Object.keys(attributes);for(let i=0;i<attrKeys.length;i++){const key=attrKeys[i],value=attributes[key];"title"!==key&&(value&&svg.setAttribute(key,value))}if(attributes.title){const title=document.createElement("title");title.textContent=attributes.title,IconDirective_1.titleIdCounter++,title.setAttribute("id",`${icon.name}-title-${IconDirective_1.titleIdCounter}`),svg.insertBefore(title,svg.firstElementChild),svg.setAttribute("aria-labelledby",`${icon.name}-title-${IconDirective_1.titleIdCounter}`)}}ngAfterViewInit(){this.renderIcon(this.cdsIcon)}ngOnChanges({cdsIcon}){cdsIcon&&!cdsIcon.isFirstChange()&&this.renderIcon(this.cdsIcon)}static{this.ctorParameters=()=>[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.ElementRef},{type:_icon_service__WEBPACK_IMPORTED_MODULE_0__.fM}]}static{this.propDecorators={ibmIcon:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],cdsIcon:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],size:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],title:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaLabel:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaLabelledBy:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaHidden:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],isFocusable:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}]}}};IconDirective=IconDirective_1=(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Directive)({selector:"[cdsIcon], [ibmIcon]"})],IconDirective)},"./src/icon/icon.module.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{op:()=>IconModule});var tslib__WEBPACK_IMPORTED_MODULE_56__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_55__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_angular_common__WEBPACK_IMPORTED_MODULE_57__=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),_icon_directive__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/icon/icon.directive.ts"),_icon_service__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/icon/icon.service.ts"),_carbon_icons_es_add_16__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@carbon/icons/es/add/16.js"),_carbon_icons_es_add_20__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@carbon/icons/es/add/20.js"),_carbon_icons_es_bee_16__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@carbon/icons/es/bee/16.js"),_carbon_icons_es_bee_20__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@carbon/icons/es/bee/20.js"),_carbon_icons_es_calendar_16__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@carbon/icons/es/calendar/16.js"),_carbon_icons_es_carbon_16__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@carbon/icons/es/carbon/16.js"),_carbon_icons_es_carbon_20__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/@carbon/icons/es/carbon/20.js"),_carbon_icons_es_caret_down_16__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/@carbon/icons/es/caret--down/16.js"),_carbon_icons_es_caret_left_16__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/@carbon/icons/es/caret--left/16.js"),_carbon_icons_es_caret_right_16__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/@carbon/icons/es/caret--right/16.js"),_carbon_icons_es_caret_up_16__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/@carbon/icons/es/caret--up/16.js"),_carbon_icons_es_checkmark_16__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark/16.js"),_carbon_icons_es_checkmark_filled_16__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--filled/16.js"),_carbon_icons_es_checkmark_filled_20__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--filled/20.js"),_carbon_icons_es_checkmark_outline_16__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--outline/16.js"),_carbon_icons_es_chevron_down_16__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/@carbon/icons/es/chevron--down/16.js"),_carbon_icons_es_chevron_right_16__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/@carbon/icons/es/chevron--right/16.js"),_carbon_icons_es_circle_dash_16__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@carbon/icons/es/circle-dash/16.js"),_carbon_icons_es_close_16__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/@carbon/icons/es/close/16.js"),_carbon_icons_es_close_20__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@carbon/icons/es/close/20.js"),_carbon_icons_es_copy_16__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@carbon/icons/es/copy/16.js"),_carbon_icons_es_copy_20__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@carbon/icons/es/copy/20.js"),_carbon_icons_es_data_2_16__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/@carbon/icons/es/data--2/16.js"),_carbon_icons_es_data_2_20__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/@carbon/icons/es/data--2/20.js"),_carbon_icons_es_document_16__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/@carbon/icons/es/document/16.js"),_carbon_icons_es_document_20__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/@carbon/icons/es/document/20.js"),_carbon_icons_es_download_16__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/@carbon/icons/es/download/16.js"),_carbon_icons_es_error_filled_16__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./node_modules/@carbon/icons/es/error--filled/16.js"),_carbon_icons_es_error_filled_20__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./node_modules/@carbon/icons/es/error--filled/20.js"),_carbon_icons_es_fade_16__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./node_modules/@carbon/icons/es/fade/16.js"),_carbon_icons_es_fade_20__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("./node_modules/@carbon/icons/es/fade/20.js"),_carbon_icons_es_folder_16__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("./node_modules/@carbon/icons/es/folder/16.js"),_carbon_icons_es_incomplete_16__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__("./node_modules/@carbon/icons/es/incomplete/16.js"),_carbon_icons_es_information_filled_16__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__("./node_modules/@carbon/icons/es/information--filled/16.js"),_carbon_icons_es_information_filled_20__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__("./node_modules/@carbon/icons/es/information--filled/20.js"),_carbon_icons_es_information_square_filled_20__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__("./node_modules/@carbon/icons/es/information--square--filled/20.js"),_carbon_icons_es_menu_16__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__("./node_modules/@carbon/icons/es/menu/16.js"),_carbon_icons_es_menu_20__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__("./node_modules/@carbon/icons/es/menu/20.js"),_carbon_icons_es_overflow_menu_vertical_16__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__("./node_modules/@carbon/icons/es/overflow-menu--vertical/16.js"),_carbon_icons_es_overflow_menu_horizontal_16__WEBPACK_IMPORTED_MODULE_41__=__webpack_require__("./node_modules/@carbon/icons/es/overflow-menu--horizontal/16.js"),_carbon_icons_es_save_16__WEBPACK_IMPORTED_MODULE_42__=__webpack_require__("./node_modules/@carbon/icons/es/save/16.js"),_carbon_icons_es_search_16__WEBPACK_IMPORTED_MODULE_43__=__webpack_require__("./node_modules/@carbon/icons/es/search/16.js"),_carbon_icons_es_settings_16__WEBPACK_IMPORTED_MODULE_44__=__webpack_require__("./node_modules/@carbon/icons/es/settings/16.js"),_carbon_icons_es_settings_adjust_16__WEBPACK_IMPORTED_MODULE_45__=__webpack_require__("./node_modules/@carbon/icons/es/settings--adjust/16.js"),_carbon_icons_es_subtract_16__WEBPACK_IMPORTED_MODULE_46__=__webpack_require__("./node_modules/@carbon/icons/es/subtract/16.js"),_carbon_icons_es_trash_can_16__WEBPACK_IMPORTED_MODULE_47__=__webpack_require__("./node_modules/@carbon/icons/es/trash-can/16.js"),_carbon_icons_es_warning_16__WEBPACK_IMPORTED_MODULE_48__=__webpack_require__("./node_modules/@carbon/icons/es/warning/16.js"),_carbon_icons_es_warning_filled_16__WEBPACK_IMPORTED_MODULE_49__=__webpack_require__("./node_modules/@carbon/icons/es/warning--filled/16.js"),_carbon_icons_es_warning_filled_20__WEBPACK_IMPORTED_MODULE_50__=__webpack_require__("./node_modules/@carbon/icons/es/warning--filled/20.js"),_carbon_icons_es_warning_alt_filled_16__WEBPACK_IMPORTED_MODULE_51__=__webpack_require__("./node_modules/@carbon/icons/es/warning--alt--filled/16.js"),_carbon_icons_es_warning_alt_filled_20__WEBPACK_IMPORTED_MODULE_52__=__webpack_require__("./node_modules/@carbon/icons/es/warning--alt--filled/20.js"),_carbon_icons_es_view_16__WEBPACK_IMPORTED_MODULE_53__=__webpack_require__("./node_modules/@carbon/icons/es/view/16.js"),_carbon_icons_es_view_off_16__WEBPACK_IMPORTED_MODULE_54__=__webpack_require__("./node_modules/@carbon/icons/es/view--off/16.js");const ICON_SERVICE_PROVIDER={provide:_icon_service__WEBPACK_IMPORTED_MODULE_1__.fM,deps:[[new _angular_core__WEBPACK_IMPORTED_MODULE_55__.Optional,new _angular_core__WEBPACK_IMPORTED_MODULE_55__.SkipSelf,_icon_service__WEBPACK_IMPORTED_MODULE_1__.fM]],useFactory:function ICON_SERVICE_PROVIDER_FACTORY(parentService){return parentService||new _icon_service__WEBPACK_IMPORTED_MODULE_1__.fM}};let IconModule=class IconModule{constructor(iconService){this.iconService=iconService,iconService.registerAll([_carbon_icons_es_add_16__WEBPACK_IMPORTED_MODULE_2__.A,_carbon_icons_es_add_20__WEBPACK_IMPORTED_MODULE_3__.A,_carbon_icons_es_bee_16__WEBPACK_IMPORTED_MODULE_4__.A,_carbon_icons_es_bee_20__WEBPACK_IMPORTED_MODULE_5__.A,_carbon_icons_es_calendar_16__WEBPACK_IMPORTED_MODULE_6__.A,_carbon_icons_es_carbon_16__WEBPACK_IMPORTED_MODULE_7__.A,_carbon_icons_es_carbon_20__WEBPACK_IMPORTED_MODULE_8__.A,_carbon_icons_es_caret_down_16__WEBPACK_IMPORTED_MODULE_9__.A,_carbon_icons_es_caret_left_16__WEBPACK_IMPORTED_MODULE_10__.A,_carbon_icons_es_caret_right_16__WEBPACK_IMPORTED_MODULE_11__.A,_carbon_icons_es_caret_up_16__WEBPACK_IMPORTED_MODULE_12__.A,_carbon_icons_es_checkmark_16__WEBPACK_IMPORTED_MODULE_13__.A,_carbon_icons_es_checkmark_filled_16__WEBPACK_IMPORTED_MODULE_14__.A,_carbon_icons_es_checkmark_filled_20__WEBPACK_IMPORTED_MODULE_15__.A,_carbon_icons_es_checkmark_outline_16__WEBPACK_IMPORTED_MODULE_16__.A,_carbon_icons_es_chevron_down_16__WEBPACK_IMPORTED_MODULE_17__.A,_carbon_icons_es_chevron_right_16__WEBPACK_IMPORTED_MODULE_18__.A,_carbon_icons_es_circle_dash_16__WEBPACK_IMPORTED_MODULE_19__.A,_carbon_icons_es_close_16__WEBPACK_IMPORTED_MODULE_20__.A,_carbon_icons_es_close_20__WEBPACK_IMPORTED_MODULE_21__.A,_carbon_icons_es_copy_16__WEBPACK_IMPORTED_MODULE_22__.A,_carbon_icons_es_copy_20__WEBPACK_IMPORTED_MODULE_23__.A,_carbon_icons_es_data_2_16__WEBPACK_IMPORTED_MODULE_24__.A,_carbon_icons_es_data_2_20__WEBPACK_IMPORTED_MODULE_25__.A,_carbon_icons_es_document_16__WEBPACK_IMPORTED_MODULE_26__.A,_carbon_icons_es_document_20__WEBPACK_IMPORTED_MODULE_27__.A,_carbon_icons_es_download_16__WEBPACK_IMPORTED_MODULE_28__.A,_carbon_icons_es_error_filled_16__WEBPACK_IMPORTED_MODULE_29__.A,_carbon_icons_es_error_filled_20__WEBPACK_IMPORTED_MODULE_30__.A,_carbon_icons_es_fade_16__WEBPACK_IMPORTED_MODULE_31__.A,_carbon_icons_es_fade_20__WEBPACK_IMPORTED_MODULE_32__.A,_carbon_icons_es_folder_16__WEBPACK_IMPORTED_MODULE_33__.A,_carbon_icons_es_incomplete_16__WEBPACK_IMPORTED_MODULE_34__.A,_carbon_icons_es_information_filled_16__WEBPACK_IMPORTED_MODULE_35__.A,_carbon_icons_es_information_filled_20__WEBPACK_IMPORTED_MODULE_36__.A,_carbon_icons_es_information_square_filled_20__WEBPACK_IMPORTED_MODULE_37__.A,_carbon_icons_es_menu_16__WEBPACK_IMPORTED_MODULE_38__.A,_carbon_icons_es_menu_20__WEBPACK_IMPORTED_MODULE_39__.A,_carbon_icons_es_overflow_menu_vertical_16__WEBPACK_IMPORTED_MODULE_40__.A,_carbon_icons_es_overflow_menu_horizontal_16__WEBPACK_IMPORTED_MODULE_41__.A,_carbon_icons_es_save_16__WEBPACK_IMPORTED_MODULE_42__.A,_carbon_icons_es_search_16__WEBPACK_IMPORTED_MODULE_43__.A,_carbon_icons_es_settings_16__WEBPACK_IMPORTED_MODULE_44__.A,_carbon_icons_es_settings_adjust_16__WEBPACK_IMPORTED_MODULE_45__.A,_carbon_icons_es_subtract_16__WEBPACK_IMPORTED_MODULE_46__.A,_carbon_icons_es_trash_can_16__WEBPACK_IMPORTED_MODULE_47__.A,_carbon_icons_es_view_16__WEBPACK_IMPORTED_MODULE_53__.A,_carbon_icons_es_view_off_16__WEBPACK_IMPORTED_MODULE_54__.A,_carbon_icons_es_warning_16__WEBPACK_IMPORTED_MODULE_48__.A,_carbon_icons_es_warning_filled_16__WEBPACK_IMPORTED_MODULE_49__.A,_carbon_icons_es_warning_filled_20__WEBPACK_IMPORTED_MODULE_50__.A,_carbon_icons_es_warning_alt_filled_16__WEBPACK_IMPORTED_MODULE_51__.A,_carbon_icons_es_warning_alt_filled_20__WEBPACK_IMPORTED_MODULE_52__.A])}static{this.ctorParameters=()=>[{type:_icon_service__WEBPACK_IMPORTED_MODULE_1__.fM}]}};IconModule=(0,tslib__WEBPACK_IMPORTED_MODULE_56__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_55__.NgModule)({declarations:[_icon_directive__WEBPACK_IMPORTED_MODULE_0__.L],exports:[_icon_directive__WEBPACK_IMPORTED_MODULE_0__.L],imports:[_angular_common__WEBPACK_IMPORTED_MODULE_57__.CommonModule],providers:[ICON_SERVICE_PROVIDER]})],IconModule)},"./src/icon/icon.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{fM:()=>IconService});var tslib__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@carbon/icon-helpers/es/index.js");class IconCache{}class IconNameNotFoundError extends Error{constructor(name){super(`Icon ${name} not found`)}}class IconSizeNotFoundError extends Error{constructor(size,name){super("Size ${size} for ${name} not found")}}class IconMemoryCache extends IconCache{constructor(){super(...arguments),this.iconMap=new Map}get(name,size){if(!this.iconMap.has(name))throw new IconNameNotFoundError(name);const sizeMap=this.iconMap.get(name);if(!sizeMap.has(size))throw new IconSizeNotFoundError(size,name);return sizeMap.get(size)}set(name,size,descriptor){this.iconMap.has(name)||this.iconMap.set(name,new Map);this.iconMap.get(name).set(size,descriptor)}}let IconService=class IconService{constructor(){this.iconCache=new IconMemoryCache}registerAll(descriptors){descriptors.forEach((icon=>this.register(icon)))}register(descriptor){const{name}=descriptor;this.registerAs(name,descriptor)}registerAs(name,descriptor){const{size}=descriptor;this.iconCache.set(name,size.toString(),descriptor)}get(name,size){try{const icon=this.iconCache.get(name,size.toString());return icon.svg||(icon.svg=(0,_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_0__.dI)(icon)),icon}catch(e){throw e}}configure(options){this.iconCache=options.cache}};IconService=(0,tslib__WEBPACK_IMPORTED_MODULE_1__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Injectable)()],IconService)},"./src/icon/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{LJ:()=>icon_directive.L,op:()=>icon_module.op,fM:()=>icon_service.fM});var icon_directive=__webpack_require__("./src/icon/icon.directive.ts"),icon_module=__webpack_require__("./src/icon/icon.module.ts"),icon_service=__webpack_require__("./src/icon/icon.service.ts")},"./src/button/icon-button.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,WithAutoAlign:()=>WithAutoAlign,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),_icon__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/icon/index.ts"),___WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/button/index.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Components/Button/Icon Button",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.moduleMetadata)({imports:[___WEBPACK_IMPORTED_MODULE_2__.tm,_icon__WEBPACK_IMPORTED_MODULE_1__.op]})],args:{align:"bottom",kind:"primary",size:"md",isExpressive:"false",disabled:!1,autoAlign:!1,showTooltipWhenDisabled:!1},argTypes:{align:{options:["top","left","bottom","right"],control:{type:"select"}},kind:{options:["primary","secondary","tertiary","ghost","danger","danger--primary","danger--tertiary","danger--ghost"],control:{type:"select"},name:"kind"},size:{options:["sm","md","lg","xl","2xl"],control:{type:"select"}},isExpressive:{type:"boolean"},disabled:{type:"boolean"},showTooltipWhenDisabled:{type:"boolean"},onClick:{action:"clicked"},onMouseEnter:{action:"mouseenter"},onMouseLeave:{action:"mouseleave"},onFocus:{action:"focus"},onBlur:{action:"blur"}},parameters:{layout:"centered"},component:___WEBPACK_IMPORTED_MODULE_2__.K0},Basic=(args=>({props:args,template:'\n <cds-icon-button\n buttonId="icon-btn1"\n type="button"\n [kind]="kind"\n [size]="size"\n [align]="align"\n [buttonNgClass]="buttonNgClass"\n [buttonAttributes]="buttonAttributes"\n [disabled]="disabled"\n [showTooltipWhenDisabled]="showTooltipWhenDisabled"\n description="Icon Description"\n (click)="onClick($event)"\n (mouseenter)="onMouseEnter($event)"\n (mouseleave)="onMouseLeave($event)"\n (focus)="onFocus($event)"\n (blur)="onBlur($event)">\n <svg class="cds--btn__icon" cdsIcon="copy" size="16"></svg>\n </cds-icon-button>\n '})).bind({});Basic.args={buttonAttributes:{"aria-label":"Example button aria-label"},buttonNgClass:{"example-global-class":!0}};const WithAutoAlign=(args=>({props:args,template:'\n <div style="height:3000px">\n Scrolling will update the position of the tooltip:\n <div style="position: absolute; top: 500px; left: 500px;">\n <cds-icon-button\n buttonId="icon-btn1"\n type="button"\n [kind]="kind"\n [size]="size"\n [align]="align"\n [autoAlign]="autoAlign"\n [isOpen]="isOpen"\n [buttonNgClass]="buttonNgClass"\n [disabled]="disabled"\n [showTooltipWhenDisabled]="showTooltipWhenDisabled"\n [description]="description"\n (click)="onClick($event)"\n (mouseenter)="onMouseEnter($event)"\n (mouseleave)="onMouseLeave($event)"\n (focus)="onFocus($event)"\n (blur)="onBlur($event)">\n <svg class="cds--btn__icon" cdsIcon="copy" size="16"></svg>\n </cds-icon-button>\n </div>\n </div>\n '})).bind({});WithAutoAlign.args={autoAlign:!0,description:"Icon Description",align:"top",isOpen:!0},Basic.parameters={...Basic.parameters,docs:{...Basic.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <cds-icon-button\n buttonId="icon-btn1"\n type="button"\n [kind]="kind"\n [size]="size"\n [align]="align"\n [buttonNgClass]="buttonNgClass"\n [buttonAttributes]="buttonAttributes"\n [disabled]="disabled"\n [showTooltipWhenDisabled]="showTooltipWhenDisabled"\n description="Icon Description"\n (click)="onClick($event)"\n (mouseenter)="onMouseEnter($event)"\n (mouseleave)="onMouseLeave($event)"\n (focus)="onFocus($event)"\n (blur)="onBlur($event)">\n <svg class="cds--btn__icon" cdsIcon="copy" size="16"></svg>\n </cds-icon-button>\n `\n})',...Basic.parameters?.docs?.source}}},WithAutoAlign.parameters={...WithAutoAlign.parameters,docs:{...WithAutoAlign.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <div style="height:3000px">\n Scrolling will update the position of the tooltip:\n <div style="position: absolute; top: 500px; left: 500px;">\n <cds-icon-button\n buttonId="icon-btn1"\n type="button"\n [kind]="kind"\n [size]="size"\n [align]="align"\n [autoAlign]="autoAlign"\n [isOpen]="isOpen"\n [buttonNgClass]="buttonNgClass"\n [disabled]="disabled"\n [showTooltipWhenDisabled]="showTooltipWhenDisabled"\n [description]="description"\n (click)="onClick($event)"\n (mouseenter)="onMouseEnter($event)"\n (mouseleave)="onMouseLeave($event)"\n (focus)="onFocus($event)"\n (blur)="onBlur($event)">\n <svg class="cds--btn__icon" cdsIcon="copy" size="16"></svg>\n </cds-icon-button>\n </div>\n </div>\n `\n})',...WithAutoAlign.parameters?.docs?.source}}};const __namedExportsOrder=["Basic","WithAutoAlign"]}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[9238],{"./node_modules/@carbon/utils-position/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{var _a,PLACEMENTS;__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,G1:()=>position}),function(PLACEMENTS){PLACEMENTS.LEFT="left",PLACEMENTS.RIGHT="right",PLACEMENTS.TOP="top",PLACEMENTS.BOTTOM="bottom"}(PLACEMENTS||(PLACEMENTS={}));var defaultPositions=((_a={})[PLACEMENTS.LEFT]=function(referenceOffset,target,referenceRect){return{top:referenceOffset.top-Math.round(target.offsetHeight/2)+Math.round(referenceRect.height/2),left:Math.round(referenceOffset.left-target.offsetWidth)}},_a[PLACEMENTS.RIGHT]=function(referenceOffset,target,referenceRect){return{top:referenceOffset.top-Math.round(target.offsetHeight/2)+Math.round(referenceRect.height/2),left:Math.round(referenceOffset.left+referenceRect.width)}},_a[PLACEMENTS.TOP]=function(referenceOffset,target,referenceRect){return{top:Math.round(referenceOffset.top-target.offsetHeight),left:referenceOffset.left-Math.round(target.offsetWidth/2)+Math.round(referenceRect.width/2)}},_a[PLACEMENTS.BOTTOM]=function(referenceOffset,target,referenceRect){return{top:Math.round(referenceOffset.top+referenceRect.height),left:referenceOffset.left-Math.round(target.offsetWidth/2)+Math.round(referenceRect.width/2)}},_a),windowRef="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Position=function(){function Position(positions){void 0===positions&&(positions={}),this.positions=defaultPositions,this.positions=Object.assign({},defaultPositions,positions)}return Position.prototype.getRelativeOffset=function(target){for(var offsets={left:target.offsetLeft,top:target.offsetTop};target.offsetParent&&"static"===getComputedStyle(target.offsetParent).position;)offsets.left+=target.offsetLeft,offsets.top+=target.offsetTop,target=target.offsetParent;return offsets},Position.prototype.getAbsoluteOffset=function(target){for(var currentNode=target,margins={top:0,left:0};currentNode.offsetParent;){var computed=getComputedStyle(currentNode.offsetParent);"static"===computed.position&&computed.marginLeft&&computed.marginTop&&(parseInt(computed.marginTop,10)&&(margins.top+=parseInt(computed.marginTop,10)),parseInt(computed.marginLeft,10)&&(margins.left+=parseInt(computed.marginLeft,10))),currentNode=currentNode.offsetParent}var targetRect=target.getBoundingClientRect(),relativeRect=document.body.getBoundingClientRect();return{top:targetRect.top-relativeRect.top+margins.top,left:targetRect.left-relativeRect.left+margins.left}},Position.prototype.findRelative=function(reference,target,placement){var referenceOffset=this.getRelativeOffset(reference),referenceRect=reference.getBoundingClientRect();return this.calculatePosition(referenceOffset,referenceRect,target,placement)},Position.prototype.findAbsolute=function(reference,target,placement){var referenceOffset=this.getAbsoluteOffset(reference),referenceRect=reference.getBoundingClientRect();return this.calculatePosition(referenceOffset,referenceRect,target,placement)},Position.prototype.findPosition=function(reference,target,placement,offsetFunction){void 0===offsetFunction&&(offsetFunction=this.getAbsoluteOffset.bind(this));var referenceOffset=offsetFunction(reference),referenceRect=reference.getBoundingClientRect();return this.calculatePosition(referenceOffset,referenceRect,target,placement)},Position.prototype.findPositionAt=function(offset,target,placement){return this.calculatePosition(offset,{top:0,left:0,height:0,width:0},target,placement)},Position.prototype.getPlacementBox=function(target,position){var targetBottom=target.offsetHeight+position.top,targetRight=target.offsetWidth+position.left;return{top:position.top,bottom:targetBottom,left:position.left,right:targetRight}},Position.prototype.addOffset=function(position,top,left){return void 0===top&&(top=0),void 0===left&&(left=0),Object.assign({},position,{top:position.top+top,left:position.left+left})},Position.prototype.setElement=function(element,position){element.style.top=position.top+"px",element.style.left=position.left+"px"},Position.prototype.findBestPlacement=function(reference,target,placements,containerFunction,positionFunction){var _this=this;void 0===containerFunction&&(containerFunction=this.defaultContainerFunction.bind(this)),void 0===positionFunction&&(positionFunction=this.findPosition.bind(this));var weightedPlacements=placements.map((function(placement){var pos=positionFunction(reference,target,placement),box=_this.getPlacementBox(target,pos),hiddenHeight=0,hiddenWidth=0,container=containerFunction();box.top<container.top?hiddenHeight=container.top-box.top:box.bottom>container.height&&(hiddenHeight=box.bottom-container.height),box.left<container.left?hiddenWidth=container.left-box.left:box.right>container.width&&(hiddenWidth=box.right-container.width),hiddenHeight&&!hiddenWidth?hiddenWidth=1:hiddenWidth&&!hiddenHeight&&(hiddenHeight=1);var area=target.offsetHeight*target.offsetWidth;return{placement,weight:(area-hiddenHeight*hiddenWidth)/area}}));return weightedPlacements.sort((function(a,b){return b.weight-a.weight})),weightedPlacements[0].placement},Position.prototype.findBestPlacementAt=function(offset,target,placements,containerFunction){var _this=this;void 0===containerFunction&&(containerFunction=this.defaultContainerFunction.bind(this));return this.findBestPlacement(null,target,placements,containerFunction,(function(_,target,placement){return _this.findPositionAt(offset,target,placement)}))},Position.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:windowRef.innerHeight,width:windowRef.innerWidth}},Position.prototype.calculatePosition=function(referenceOffset,referenceRect,target,placement){return this.positions[placement]?this.positions[placement](referenceOffset,target,referenceRect):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},Position}(),position=new Position;const __WEBPACK_DEFAULT_EXPORT__=Position},"./src/button/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{TV:()=>BaseIconButton,$n:()=>Button,tm:()=>ButtonModule,Te:()=>ButtonSet,K0:()=>IconButton});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let Button=class Button{constructor(){this.cdsButton="primary",this.skeleton=!1,this.iconOnly=!1,this.isExpressive=!1,this.baseClass=!0}set ibmButton(type){this.cdsButton=type}get primaryButton(){return"primary"===this.cdsButton||!this.cdsButton}get secondaryButton(){return"secondary"===this.cdsButton}get tertiaryButton(){return"tertiary"===this.cdsButton}get ghostButton(){return"ghost"===this.cdsButton}get dangerButton(){return"danger"===this.cdsButton||"danger--primary"===this.cdsButton}get dangerTertiary(){return"danger--tertiary"===this.cdsButton}get dangerGhost(){return"danger--ghost"===this.cdsButton}get smallSize(){return"sm"===this.size&&!this.isExpressive}get mediumSize(){return"md"===this.size&&!this.isExpressive}get largeSize(){return"lg"===this.size}get extraLargeSize(){return"xl"===this.size}get twoExtraLargeSize(){return"2xl"===this.size}get smallLayoutSize(){return"sm"===this.size&&!this.isExpressive}get mediumLayoutSize(){return"md"===this.size&&!this.isExpressive}get largeLayoutSize(){return"lg"===this.size}get extraLargeLayoutSize(){return"xl"===this.size}get twoExtraLargeLayoutSize(){return"2xl"===this.size}static{this.propDecorators={ibmButton:[{type:core.Input}],cdsButton:[{type:core.Input}],size:[{type:core.Input}],skeleton:[{type:core.HostBinding,args:["class.cds--skeleton"]},{type:core.Input}],iconOnly:[{type:core.HostBinding,args:["class.cds--btn--icon-only"]},{type:core.Input}],isExpressive:[{type:core.HostBinding,args:["class.cds--btn--expressive"]},{type:core.Input}],baseClass:[{type:core.HostBinding,args:["class.cds--btn"]}],primaryButton:[{type:core.HostBinding,args:["class.cds--btn--primary"]}],secondaryButton:[{type:core.HostBinding,args:["class.cds--btn--secondary"]}],tertiaryButton:[{type:core.HostBinding,args:["class.cds--btn--tertiary"]}],ghostButton:[{type:core.HostBinding,args:["class.cds--btn--ghost"]}],dangerButton:[{type:core.HostBinding,args:["class.cds--btn--danger"]}],dangerTertiary:[{type:core.HostBinding,args:["class.cds--btn--danger--tertiary"]}],dangerGhost:[{type:core.HostBinding,args:["class.cds--btn--danger--ghost"]}],smallSize:[{type:core.HostBinding,args:["class.cds--btn--sm"]}],mediumSize:[{type:core.HostBinding,args:["class.cds--btn--md"]}],largeSize:[{type:core.HostBinding,args:["class.cds--btn--lg"]}],extraLargeSize:[{type:core.HostBinding,args:["class.cds--btn--xl"]}],twoExtraLargeSize:[{type:core.HostBinding,args:["class.cds--btn--2xl"]}],smallLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-sm"]}],mediumLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-md"]}],largeLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-lg"]}],extraLargeLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-xl"]}],twoExtraLargeLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-2xl"]}]}}};Button=(0,tslib_es6.Cg)([(0,core.Directive)({selector:"[cdsButton], [ibmButton]"})],Button);let ButtonSet=class ButtonSet{constructor(){this.buttonSetClass=!0}static{this.propDecorators={buttonSetClass:[{type:core.HostBinding,args:["class.cds--btn-set"]}]}}};ButtonSet=(0,tslib_es6.Cg)([(0,core.Component)({selector:"cds-button-set, ibm-button-set",template:"<ng-content></ng-content>"})],ButtonSet);let BaseIconButton=class BaseIconButton{constructor(){this.caret=!0,this.dropShadow=!0,this.highContrast=!0,this.isOpen=!1,this.align="bottom",this.autoAlign=!1,this.enterDelayMs=100,this.leaveDelayMs=300}static{this.propDecorators={caret:[{type:core.Input}],dropShadow:[{type:core.Input}],highContrast:[{type:core.Input}],isOpen:[{type:core.Input}],align:[{type:core.Input}],autoAlign:[{type:core.Input}],enterDelayMs:[{type:core.Input}],leaveDelayMs:[{type:core.Input}]}}};var IconButton_1;BaseIconButton=(0,tslib_es6.Cg)([(0,core.Component)({template:""})],BaseIconButton);let IconButton=class IconButton extends BaseIconButton{static{IconButton_1=this}set buttonNgClass(obj){this.classList=Object.assign({"cds--btn--disabled":this.disabled},obj)}get buttonNgClass(){return this.classList}set buttonAttributes(obj){this.button&&(Object.keys(this.attributeList).forEach((key=>{this.renderer.removeAttribute(this.button.nativeElement,key)})),Object.keys(obj).forEach((key=>{this.renderer.setAttribute(this.button.nativeElement,key,obj[key])}))),this.attributeList=obj}get buttonAttributes(){return this.buttonAttributes}static{this.iconButtonCounter=0}constructor(renderer){super(),this.renderer=renderer,this.buttonId="icon-btn-"+IconButton_1.iconButtonCounter++,this.kind="primary",this.size="lg",this.type="button",this.isExpressive=!1,this.disabled=!1,this.showTooltipWhenDisabled=!1,this.click=new core.EventEmitter,this.focus=new core.EventEmitter,this.blur=new core.EventEmitter,this.tooltipClick=new core.EventEmitter,this.classList={},this.attributeList={}}ngAfterViewInit(){this.buttonAttributes=this.attributeList}emitClickEvent(event,element="button"){event.preventDefault(),event.stopPropagation(),"tooltip"!==element?this.click.emit(event):this.tooltipClick.emit(event)}static{this.ctorParameters=()=>[{type:core.Renderer2}]}static{this.propDecorators={buttonNgClass:[{type:core.Input}],buttonAttributes:[{type:core.Input}],button:[{type:core.ViewChild,args:["button"]}],buttonId:[{type:core.Input}],kind:[{type:core.Input}],size:[{type:core.Input}],type:[{type:core.Input}],isExpressive:[{type:core.Input}],disabled:[{type:core.Input}],description:[{type:core.Input}],showTooltipWhenDisabled:[{type:core.Input}],click:[{type:core.Output}],focus:[{type:core.Output}],blur:[{type:core.Output}],tooltipClick:[{type:core.Output}]}}};IconButton=IconButton_1=(0,tslib_es6.Cg)([(0,core.Component)({selector:"cds-icon-button, ibm-icon-button",template:'\n\t<cds-tooltip\n\t\tclass="cds--icon-tooltip"\n\t\t[description]="description"\n\t\t[disabled]="showTooltipWhenDisabled ? false : disabled"\n\t\t[caret]="caret"\n\t\t[dropShadow]="dropShadow"\n\t\t[highContrast]="highContrast"\n\t\t[isOpen]="isOpen"\n\t\t[align]="align"\n\t\t[autoAlign]="autoAlign"\n\t\t[enterDelayMs]="enterDelayMs"\n\t\t[leaveDelayMs]="leaveDelayMs"\n\t\t(click)="emitClickEvent($event, \'tooltip\')">\n\t\t<button\n\t\t\t#button\n\t\t\t[id]="buttonId"\n\t\t\t[disabled]="disabled"\n\t\t\t[attr.type]="type"\n\t\t\t[iconOnly]="true"\n\t\t\t[ngClass]="buttonNgClass"\n\t\t\t[cdsButton]="kind"\n\t\t\t[size]="size"\n\t\t\t[isExpressive]="isExpressive"\n\t\t\t(click)="emitClickEvent($event)"\n\t\t\t(focus)="focus.emit($event)"\n\t\t\t(blur)="blur.emit($event)">\n\t\t\t<ng-content></ng-content>\n\t\t</button>\n\t</cds-tooltip>\n\t'})],IconButton);var common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),tooltip=__webpack_require__("./src/tooltip/index.ts");let ButtonModule=class ButtonModule{};ButtonModule=(0,tslib_es6.Cg)([(0,core.NgModule)({declarations:[Button,ButtonSet,BaseIconButton,IconButton],exports:[Button,ButtonSet,IconButton],imports:[common.CommonModule,tooltip.Ss]})],ButtonModule)},"./src/icon/icon.directive.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{L:()=>IconDirective});var IconDirective_1,tslib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_icon_service__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/icon/icon.service.ts"),_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@carbon/icon-helpers/es/index.js");let IconDirective=class IconDirective{static{IconDirective_1=this}set ibmIcon(iconName){this.cdsIcon=iconName}static{this.titleIdCounter=0}constructor(elementRef,iconService){this.elementRef=elementRef,this.iconService=iconService,this.cdsIcon="",this.size="16",this.title="",this.ariaLabel="",this.ariaLabelledBy="",this.ariaHidden="",this.isFocusable=!1}renderIcon(iconName){const root=this.elementRef.nativeElement;let icon;try{icon=this.iconService.get(iconName,this.size.toString())}catch(error){return void console.warn(error)}const domParser=new DOMParser,rawSVG=icon.svg,svgElement=domParser.parseFromString(rawSVG,"image/svg+xml").documentElement;let node="SVG"!==root.tagName.toUpperCase()?svgElement:svgElement.firstChild;for(root.innerHTML="";node;)root.appendChild(root.ownerDocument.importNode(node,!0)),node=node.nextSibling;const svg="SVG"!==root.tagName.toUpperCase()?svgElement:root;svg.setAttribute("xmlns","http://www.w3.org/2000/svg");const attributes=(0,_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_1__.gu)({width:icon.attrs.width,height:icon.attrs.height,viewBox:icon.attrs.viewBox,title:this.title,"aria-label":this.ariaLabel,"aria-labelledby":this.ariaLabelledBy,"aria-hidden":this.ariaHidden,focusable:this.isFocusable.toString(),fill:icon.attrs.fill}),attrKeys=Object.keys(attributes);for(let i=0;i<attrKeys.length;i++){const key=attrKeys[i],value=attributes[key];"title"!==key&&(value&&svg.setAttribute(key,value))}if(attributes.title){const title=document.createElement("title");title.textContent=attributes.title,IconDirective_1.titleIdCounter++,title.setAttribute("id",`${icon.name}-title-${IconDirective_1.titleIdCounter}`),svg.insertBefore(title,svg.firstElementChild),svg.setAttribute("aria-labelledby",`${icon.name}-title-${IconDirective_1.titleIdCounter}`)}}ngAfterViewInit(){this.renderIcon(this.cdsIcon)}ngOnChanges({cdsIcon}){cdsIcon&&!cdsIcon.isFirstChange()&&this.renderIcon(this.cdsIcon)}static{this.ctorParameters=()=>[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.ElementRef},{type:_icon_service__WEBPACK_IMPORTED_MODULE_0__.fM}]}static{this.propDecorators={ibmIcon:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],cdsIcon:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],size:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],title:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaLabel:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaLabelledBy:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],ariaHidden:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}],isFocusable:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_2__.Input}]}}};IconDirective=IconDirective_1=(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Directive)({selector:"[cdsIcon], [ibmIcon]"})],IconDirective)},"./src/icon/icon.module.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{op:()=>IconModule});var tslib__WEBPACK_IMPORTED_MODULE_56__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_55__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_angular_common__WEBPACK_IMPORTED_MODULE_57__=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),_icon_directive__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/icon/icon.directive.ts"),_icon_service__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/icon/icon.service.ts"),_carbon_icons_es_add_16__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@carbon/icons/es/add/16.js"),_carbon_icons_es_add_20__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@carbon/icons/es/add/20.js"),_carbon_icons_es_bee_16__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@carbon/icons/es/bee/16.js"),_carbon_icons_es_bee_20__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@carbon/icons/es/bee/20.js"),_carbon_icons_es_calendar_16__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@carbon/icons/es/calendar/16.js"),_carbon_icons_es_carbon_16__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@carbon/icons/es/carbon/16.js"),_carbon_icons_es_carbon_20__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/@carbon/icons/es/carbon/20.js"),_carbon_icons_es_caret_down_16__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/@carbon/icons/es/caret--down/16.js"),_carbon_icons_es_caret_left_16__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/@carbon/icons/es/caret--left/16.js"),_carbon_icons_es_caret_right_16__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/@carbon/icons/es/caret--right/16.js"),_carbon_icons_es_caret_up_16__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/@carbon/icons/es/caret--up/16.js"),_carbon_icons_es_checkmark_16__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark/16.js"),_carbon_icons_es_checkmark_filled_16__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--filled/16.js"),_carbon_icons_es_checkmark_filled_20__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--filled/20.js"),_carbon_icons_es_checkmark_outline_16__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./node_modules/@carbon/icons/es/checkmark--outline/16.js"),_carbon_icons_es_chevron_down_16__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/@carbon/icons/es/chevron--down/16.js"),_carbon_icons_es_chevron_right_16__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/@carbon/icons/es/chevron--right/16.js"),_carbon_icons_es_circle_dash_16__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@carbon/icons/es/circle-dash/16.js"),_carbon_icons_es_close_16__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/@carbon/icons/es/close/16.js"),_carbon_icons_es_close_20__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@carbon/icons/es/close/20.js"),_carbon_icons_es_copy_16__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@carbon/icons/es/copy/16.js"),_carbon_icons_es_copy_20__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@carbon/icons/es/copy/20.js"),_carbon_icons_es_data_2_16__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/@carbon/icons/es/data--2/16.js"),_carbon_icons_es_data_2_20__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/@carbon/icons/es/data--2/20.js"),_carbon_icons_es_document_16__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/@carbon/icons/es/document/16.js"),_carbon_icons_es_document_20__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/@carbon/icons/es/document/20.js"),_carbon_icons_es_download_16__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/@carbon/icons/es/download/16.js"),_carbon_icons_es_error_filled_16__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./node_modules/@carbon/icons/es/error--filled/16.js"),_carbon_icons_es_error_filled_20__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./node_modules/@carbon/icons/es/error--filled/20.js"),_carbon_icons_es_fade_16__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./node_modules/@carbon/icons/es/fade/16.js"),_carbon_icons_es_fade_20__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("./node_modules/@carbon/icons/es/fade/20.js"),_carbon_icons_es_folder_16__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("./node_modules/@carbon/icons/es/folder/16.js"),_carbon_icons_es_incomplete_16__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__("./node_modules/@carbon/icons/es/incomplete/16.js"),_carbon_icons_es_information_filled_16__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__("./node_modules/@carbon/icons/es/information--filled/16.js"),_carbon_icons_es_information_filled_20__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__("./node_modules/@carbon/icons/es/information--filled/20.js"),_carbon_icons_es_information_square_filled_20__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__("./node_modules/@carbon/icons/es/information--square--filled/20.js"),_carbon_icons_es_menu_16__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__("./node_modules/@carbon/icons/es/menu/16.js"),_carbon_icons_es_menu_20__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__("./node_modules/@carbon/icons/es/menu/20.js"),_carbon_icons_es_overflow_menu_vertical_16__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__("./node_modules/@carbon/icons/es/overflow-menu--vertical/16.js"),_carbon_icons_es_overflow_menu_horizontal_16__WEBPACK_IMPORTED_MODULE_41__=__webpack_require__("./node_modules/@carbon/icons/es/overflow-menu--horizontal/16.js"),_carbon_icons_es_save_16__WEBPACK_IMPORTED_MODULE_42__=__webpack_require__("./node_modules/@carbon/icons/es/save/16.js"),_carbon_icons_es_search_16__WEBPACK_IMPORTED_MODULE_43__=__webpack_require__("./node_modules/@carbon/icons/es/search/16.js"),_carbon_icons_es_settings_16__WEBPACK_IMPORTED_MODULE_44__=__webpack_require__("./node_modules/@carbon/icons/es/settings/16.js"),_carbon_icons_es_settings_adjust_16__WEBPACK_IMPORTED_MODULE_45__=__webpack_require__("./node_modules/@carbon/icons/es/settings--adjust/16.js"),_carbon_icons_es_subtract_16__WEBPACK_IMPORTED_MODULE_46__=__webpack_require__("./node_modules/@carbon/icons/es/subtract/16.js"),_carbon_icons_es_trash_can_16__WEBPACK_IMPORTED_MODULE_47__=__webpack_require__("./node_modules/@carbon/icons/es/trash-can/16.js"),_carbon_icons_es_warning_16__WEBPACK_IMPORTED_MODULE_48__=__webpack_require__("./node_modules/@carbon/icons/es/warning/16.js"),_carbon_icons_es_warning_filled_16__WEBPACK_IMPORTED_MODULE_49__=__webpack_require__("./node_modules/@carbon/icons/es/warning--filled/16.js"),_carbon_icons_es_warning_filled_20__WEBPACK_IMPORTED_MODULE_50__=__webpack_require__("./node_modules/@carbon/icons/es/warning--filled/20.js"),_carbon_icons_es_warning_alt_filled_16__WEBPACK_IMPORTED_MODULE_51__=__webpack_require__("./node_modules/@carbon/icons/es/warning--alt--filled/16.js"),_carbon_icons_es_warning_alt_filled_20__WEBPACK_IMPORTED_MODULE_52__=__webpack_require__("./node_modules/@carbon/icons/es/warning--alt--filled/20.js"),_carbon_icons_es_view_16__WEBPACK_IMPORTED_MODULE_53__=__webpack_require__("./node_modules/@carbon/icons/es/view/16.js"),_carbon_icons_es_view_off_16__WEBPACK_IMPORTED_MODULE_54__=__webpack_require__("./node_modules/@carbon/icons/es/view--off/16.js");const ICON_SERVICE_PROVIDER={provide:_icon_service__WEBPACK_IMPORTED_MODULE_1__.fM,deps:[[new _angular_core__WEBPACK_IMPORTED_MODULE_55__.Optional,new _angular_core__WEBPACK_IMPORTED_MODULE_55__.SkipSelf,_icon_service__WEBPACK_IMPORTED_MODULE_1__.fM]],useFactory:function ICON_SERVICE_PROVIDER_FACTORY(parentService){return parentService||new _icon_service__WEBPACK_IMPORTED_MODULE_1__.fM}};let IconModule=class IconModule{constructor(iconService){this.iconService=iconService,iconService.registerAll([_carbon_icons_es_add_16__WEBPACK_IMPORTED_MODULE_2__.A,_carbon_icons_es_add_20__WEBPACK_IMPORTED_MODULE_3__.A,_carbon_icons_es_bee_16__WEBPACK_IMPORTED_MODULE_4__.A,_carbon_icons_es_bee_20__WEBPACK_IMPORTED_MODULE_5__.A,_carbon_icons_es_calendar_16__WEBPACK_IMPORTED_MODULE_6__.A,_carbon_icons_es_carbon_16__WEBPACK_IMPORTED_MODULE_7__.A,_carbon_icons_es_carbon_20__WEBPACK_IMPORTED_MODULE_8__.A,_carbon_icons_es_caret_down_16__WEBPACK_IMPORTED_MODULE_9__.A,_carbon_icons_es_caret_left_16__WEBPACK_IMPORTED_MODULE_10__.A,_carbon_icons_es_caret_right_16__WEBPACK_IMPORTED_MODULE_11__.A,_carbon_icons_es_caret_up_16__WEBPACK_IMPORTED_MODULE_12__.A,_carbon_icons_es_checkmark_16__WEBPACK_IMPORTED_MODULE_13__.A,_carbon_icons_es_checkmark_filled_16__WEBPACK_IMPORTED_MODULE_14__.A,_carbon_icons_es_checkmark_filled_20__WEBPACK_IMPORTED_MODULE_15__.A,_carbon_icons_es_checkmark_outline_16__WEBPACK_IMPORTED_MODULE_16__.A,_carbon_icons_es_chevron_down_16__WEBPACK_IMPORTED_MODULE_17__.A,_carbon_icons_es_chevron_right_16__WEBPACK_IMPORTED_MODULE_18__.A,_carbon_icons_es_circle_dash_16__WEBPACK_IMPORTED_MODULE_19__.A,_carbon_icons_es_close_16__WEBPACK_IMPORTED_MODULE_20__.A,_carbon_icons_es_close_20__WEBPACK_IMPORTED_MODULE_21__.A,_carbon_icons_es_copy_16__WEBPACK_IMPORTED_MODULE_22__.A,_carbon_icons_es_copy_20__WEBPACK_IMPORTED_MODULE_23__.A,_carbon_icons_es_data_2_16__WEBPACK_IMPORTED_MODULE_24__.A,_carbon_icons_es_data_2_20__WEBPACK_IMPORTED_MODULE_25__.A,_carbon_icons_es_document_16__WEBPACK_IMPORTED_MODULE_26__.A,_carbon_icons_es_document_20__WEBPACK_IMPORTED_MODULE_27__.A,_carbon_icons_es_download_16__WEBPACK_IMPORTED_MODULE_28__.A,_carbon_icons_es_error_filled_16__WEBPACK_IMPORTED_MODULE_29__.A,_carbon_icons_es_error_filled_20__WEBPACK_IMPORTED_MODULE_30__.A,_carbon_icons_es_fade_16__WEBPACK_IMPORTED_MODULE_31__.A,_carbon_icons_es_fade_20__WEBPACK_IMPORTED_MODULE_32__.A,_carbon_icons_es_folder_16__WEBPACK_IMPORTED_MODULE_33__.A,_carbon_icons_es_incomplete_16__WEBPACK_IMPORTED_MODULE_34__.A,_carbon_icons_es_information_filled_16__WEBPACK_IMPORTED_MODULE_35__.A,_carbon_icons_es_information_filled_20__WEBPACK_IMPORTED_MODULE_36__.A,_carbon_icons_es_information_square_filled_20__WEBPACK_IMPORTED_MODULE_37__.A,_carbon_icons_es_menu_16__WEBPACK_IMPORTED_MODULE_38__.A,_carbon_icons_es_menu_20__WEBPACK_IMPORTED_MODULE_39__.A,_carbon_icons_es_overflow_menu_vertical_16__WEBPACK_IMPORTED_MODULE_40__.A,_carbon_icons_es_overflow_menu_horizontal_16__WEBPACK_IMPORTED_MODULE_41__.A,_carbon_icons_es_save_16__WEBPACK_IMPORTED_MODULE_42__.A,_carbon_icons_es_search_16__WEBPACK_IMPORTED_MODULE_43__.A,_carbon_icons_es_settings_16__WEBPACK_IMPORTED_MODULE_44__.A,_carbon_icons_es_settings_adjust_16__WEBPACK_IMPORTED_MODULE_45__.A,_carbon_icons_es_subtract_16__WEBPACK_IMPORTED_MODULE_46__.A,_carbon_icons_es_trash_can_16__WEBPACK_IMPORTED_MODULE_47__.A,_carbon_icons_es_view_16__WEBPACK_IMPORTED_MODULE_53__.A,_carbon_icons_es_view_off_16__WEBPACK_IMPORTED_MODULE_54__.A,_carbon_icons_es_warning_16__WEBPACK_IMPORTED_MODULE_48__.A,_carbon_icons_es_warning_filled_16__WEBPACK_IMPORTED_MODULE_49__.A,_carbon_icons_es_warning_filled_20__WEBPACK_IMPORTED_MODULE_50__.A,_carbon_icons_es_warning_alt_filled_16__WEBPACK_IMPORTED_MODULE_51__.A,_carbon_icons_es_warning_alt_filled_20__WEBPACK_IMPORTED_MODULE_52__.A])}static{this.ctorParameters=()=>[{type:_icon_service__WEBPACK_IMPORTED_MODULE_1__.fM}]}};IconModule=(0,tslib__WEBPACK_IMPORTED_MODULE_56__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_55__.NgModule)({declarations:[_icon_directive__WEBPACK_IMPORTED_MODULE_0__.L],exports:[_icon_directive__WEBPACK_IMPORTED_MODULE_0__.L],imports:[_angular_common__WEBPACK_IMPORTED_MODULE_57__.CommonModule],providers:[ICON_SERVICE_PROVIDER]})],IconModule)},"./src/icon/icon.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{fM:()=>IconService});var tslib__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@carbon/icon-helpers/es/index.js");class IconCache{}class IconNameNotFoundError extends Error{constructor(name){super(`Icon ${name} not found`)}}class IconSizeNotFoundError extends Error{constructor(size,name){super("Size ${size} for ${name} not found")}}class IconMemoryCache extends IconCache{constructor(){super(...arguments),this.iconMap=new Map}get(name,size){if(!this.iconMap.has(name))throw new IconNameNotFoundError(name);const sizeMap=this.iconMap.get(name);if(!sizeMap.has(size))throw new IconSizeNotFoundError(size,name);return sizeMap.get(size)}set(name,size,descriptor){this.iconMap.has(name)||this.iconMap.set(name,new Map);this.iconMap.get(name).set(size,descriptor)}}let IconService=class IconService{constructor(){this.iconCache=new IconMemoryCache}registerAll(descriptors){descriptors.forEach((icon=>this.register(icon)))}register(descriptor){const{name}=descriptor;this.registerAs(name,descriptor)}registerAs(name,descriptor){const{size}=descriptor;this.iconCache.set(name,size.toString(),descriptor)}get(name,size){try{const icon=this.iconCache.get(name,size.toString());return icon.svg||(icon.svg=(0,_carbon_icon_helpers__WEBPACK_IMPORTED_MODULE_0__.dI)(icon)),icon}catch(e){throw e}}configure(options){this.iconCache=options.cache}};IconService=(0,tslib__WEBPACK_IMPORTED_MODULE_1__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Injectable)()],IconService)},"./src/icon/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{LJ:()=>icon_directive.L,op:()=>icon_module.op,fM:()=>icon_service.fM});var icon_directive=__webpack_require__("./src/icon/icon.directive.ts"),icon_module=__webpack_require__("./src/icon/icon.module.ts"),icon_service=__webpack_require__("./src/icon/icon.service.ts")},"./src/code-snippet/code-snippet.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,Inline:()=>Inline,Multi:()=>Multi,Skeleton:()=>Skeleton,__namedExportsOrder:()=>__namedExportsOrder,default:()=>code_snippet_stories});var SnippetType,dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),i18n=__webpack_require__("./src/i18n/index.ts"),utils=__webpack_require__("./src/utils/index.ts"),src_button=__webpack_require__("./src/button/index.ts");!function(SnippetType){SnippetType.single="single",SnippetType.multi="multi",SnippetType.inline="inline"}(SnippetType||(SnippetType={}));let CodeSnippet=class CodeSnippet extends src_button.TV{get snippetClass(){return this.display!==SnippetType.inline}get snippetSingleClass(){return this.display===SnippetType.single}get snippetMultiClass(){return this.display===SnippetType.multi}get snippetDisabledClass(){return"inline"!==this.display&&this.disabled}get snippetInlineLightClass(){return"light"===this.theme}constructor(i18n,eventService){super(),this.i18n=i18n,this.eventService=eventService,this.rowHeightInPixel=16,this.display=SnippetType.single,this.translations=this.i18n.get().CODE_SNIPPET,this.hideCopyButton=!1,this.disabled=!1,this.maxCollapsedNumberOfRows=15,this.minCollapsedNumberOfRows=3,this.maxExpandedNumberOfRows=0,this.minExpandedNumberOfRows=16,this.wrapText=!1,this.theme="dark",this.feedbackText=this.translations.COPIED,this.feedbackTimeout=2e3,this.expanded=!1,this.skeleton=!1,this.styles={},this.showFeedback=!1,this.animating=!1,this.hasExpandButton=null,this.isExpandable=!1,this.hasRightOverflow=!1,this.hasRight=!1,this.hasLeft=!1,this.dropShadow=!1}handleScroll(){if(this.skeleton)return;let ref;switch(this.display){case"multi":ref=this.codeContent.nativeElement;break;case"single":ref=this.codeContainer.nativeElement;break;default:return}if(ref){const{scrollWidth,clientWidth,scrollLeft}=ref,horizontalOverflow=scrollWidth>clientWidth;this.hasLeft=horizontalOverflow&&!!scrollLeft,this.hasRight=horizontalOverflow&&scrollLeft+clientWidth!==scrollWidth}}toggleSnippetExpansion(){this.expanded=!this.expanded,this.calculateContainerHeight()}onCopyButtonClicked(){this.disabled||window.navigator.clipboard.writeText(this.code.nativeElement.innerText||this.code.nativeElement.textContent).then((()=>{this.showFeedback=!0,this.animating=!0,setTimeout((()=>{this.showFeedback=!1,this.animating=!1}),this.feedbackTimeout)}))}ngOnInit(){this.calculateContainerHeight()}ngAfterViewInit(){this.canExpand(),this.handleScroll(),window&&this.eventService.on(window,"resize",(()=>{this.canExpand(),this.handleScroll()}))}calculateContainerHeight(){"multi"!==this.display||this.skeleton||(this.styles={},this.expanded?(this.maxExpandedNumberOfRows>0&&(this.styles["max-height"]=this.maxExpandedNumberOfRows*this.rowHeightInPixel+"px"),this.minExpandedNumberOfRows>0&&(this.styles["min-height"]=this.minExpandedNumberOfRows*this.rowHeightInPixel+"px")):(this.maxCollapsedNumberOfRows>0&&(this.styles["max-height"]=this.maxCollapsedNumberOfRows*this.rowHeightInPixel+"px"),this.minCollapsedNumberOfRows>0&&(this.styles["min-height"]=this.minCollapsedNumberOfRows*this.rowHeightInPixel+"px")))}canExpand(){if("multi"===this.display&&!this.skeleton){const height=this.codeContent.nativeElement.getBoundingClientRect().height;this.maxCollapsedNumberOfRows>0&&(this.maxExpandedNumberOfRows<=0||this.maxExpandedNumberOfRows>this.maxCollapsedNumberOfRows)&&height>this.maxCollapsedNumberOfRows*this.rowHeightInPixel?this.isExpandable=!0:this.isExpandable=!1,this.expanded&&this.minExpandedNumberOfRows>0&&height<=this.minExpandedNumberOfRows*this.rowHeightInPixel&&(this.isExpandable=!1)}}static{this.ctorParameters=()=>[{type:i18n.F2},{type:utils.US}]}static{this.propDecorators={snippetClass:[{type:core.HostBinding,args:["class.cds--snippet"]}],snippetSingleClass:[{type:core.HostBinding,args:["class.cds--snippet--single"]}],snippetMultiClass:[{type:core.HostBinding,args:["class.cds--snippet--multi"]}],snippetDisabledClass:[{type:core.HostBinding,args:["class.cds--snippet--disabled"]}],snippetInlineLightClass:[{type:core.HostBinding,args:["class.cds--snippet--light"]}],display:[{type:core.Input}],translations:[{type:core.Input}],copyButtonDescription:[{type:core.Input}],hideCopyButton:[{type:core.Input}],disabled:[{type:core.Input}],maxCollapsedNumberOfRows:[{type:core.Input}],minCollapsedNumberOfRows:[{type:core.Input}],maxExpandedNumberOfRows:[{type:core.Input}],minExpandedNumberOfRows:[{type:core.Input}],wrapText:[{type:core.HostBinding,args:["class.cds--snippet--wraptext"]},{type:core.Input}],theme:[{type:core.Input}],feedbackText:[{type:core.Input}],feedbackTimeout:[{type:core.Input}],expanded:[{type:core.HostBinding,args:["class.cds--snippet--expand"]},{type:core.Input}],skeleton:[{type:core.HostBinding,args:["class.cds--skeleton"]},{type:core.Input}],code:[{type:core.ViewChild,args:["code"]}],codeContent:[{type:core.ViewChild,args:["codeContent"]}],codeContainer:[{type:core.ViewChild,args:["codeContainer"]}]}}};CodeSnippet=(0,tslib_es6.Cg)([(0,core.Component)({selector:"cds-code-snippet, ibm-code-snippet",template:'\n\t\t<ng-container *ngIf="display === \'inline\'; else notInline">\n\t\t\t<ng-container *ngIf="!hideCopyButton; else noBtnInline">\n\t\t\t\t<ng-container *ngTemplateOutlet="buttonTemplate"></ng-container>\n\t\t\t</ng-container>\n\t\t\t<ng-template #noBtnInline>\n\t\t\t\t<span\n\t\t\t\t\tclass="cds--snippet cds--snippet--inline cds--snippet--no-copy"\n\t\t\t\t\t[ngClass]="{\n\t\t\t\t\t\t\'cds--snippet--light\': theme === \'light\'\n\t\t\t\t\t}">\n\t\t\t\t\t<code #code>\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet="codeTemplate"></ng-container>\n\t\t\t\t\t</code>\n\t\t\t\t</span>\n\t\t\t</ng-template>\n\t\t</ng-container>\n\n\t\t<ng-template #notInline>\n\t\t\t<div\n\t\t\t\t#codeContainer\n\t\t\t\tclass="cds--snippet-container"\n\t\t\t\t[attr.aria-label]="translations.CODE_SNIPPET_TEXT"\n\t\t\t\t[attr.tabindex]="display === \'single\' && !disabled ? \'0\' : null"\n\t\t\t\t[attr.role]="display===\'single\' ? \'textarea\' : null"\n\t\t\t\t[ngStyle]="styles"\n\t\t\t\t(scroll)="(display === \'single\' ? handleScroll() : null)">\n\t\t\t\t<ng-container *ngIf="skeleton">\n\t\t\t\t\t<span *ngIf="display === \'single\'; else multiSkeleton"></span>\n\t\t\t\t\t<ng-template #multiSkeleton>\n\t\t\t\t\t\t<span></span>\n\t\t\t\t\t\t<span></span>\n\t\t\t\t\t\t<span></span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t</ng-container>\n\t\t\t\t<pre\n\t\t\t\t\t#codeContent\n\t\t\t\t\t*ngIf="!skeleton"\n\t\t\t\t\t(scroll)="(display === \'multi\' ? handleScroll() : null)"><code #code><ng-container *ngTemplateOutlet="codeTemplate"></ng-container></code></pre>\n\t\t\t</div>\n\t\t\t<div *ngIf="hasLeft" class="cds--snippet__overflow-indicator--left"></div>\n\t\t\t<div *ngIf="hasRight" class="cds--snippet__overflow-indicator--right"></div>\n\t\t\t<ng-container *ngIf="!hideCopyButton;">\n\t\t\t\t<ng-container *ngTemplateOutlet="buttonTemplate"></ng-container>\n\t\t\t</ng-container>\n\t\t\t<button\n\t\t\t\t*ngIf="isExpandable"\n\t\t\t\tclass="cds--btn cds--btn--ghost cds--btn--sm cds--snippet-btn--expand"\n\t\t\t\t(click)="toggleSnippetExpansion()"\n\t\t\t\ttype="button">\n\t\t\t\t<span class="cds--snippet-btn--text">{{expanded ? translations.SHOW_LESS : translations.SHOW_MORE}}</span>\n\t\t\t\t<svg cdsIcon="chevron--down" size="16" class="cds--icon-chevron--down" [attr.aria-label]="translations.SHOW_MORE_ICON"></svg>\n\t\t\t</button>\n\t\t</ng-template>\n\n\t\t<ng-template #buttonTemplate>\n\t\t\t<cds-icon-button\n\t\t\t\t*ngIf="!skeleton"\n\t\t\t\t[description]="showFeedback ? feedbackText : copyButtonDescription"\n\t\t\t\t[align]="align"\n\t\t\t\t[dropShadow]="dropShadow"\n\t\t\t\t[caret]="caret"\n\t\t\t\t[highContrast]="highContrast"\n\t\t\t\t[isOpen]="isOpen"\n\t\t\t\t[enterDelayMs]="enterDelayMs"\n\t\t\t\t[leaveDelayMs]="leaveDelayMs"\n\t\t\t\ttype="button"\n\t\t\t\tkind="primary"\n\t\t\t\tsize="md"\n\t\t\t\t(click)="onCopyButtonClicked($event)"\n\t\t\t\t[buttonNgClass]="{\n\t\t\t\t\t\'cds--snippet--light\': theme === \'light\',\n\t\t\t\t\t\'cds--snippet--inline\': display === \'inline\',\n\t\t\t\t\t\'cds--btn--icon-only\': display !== \'inline\',\n\t\t\t\t\t\'cds--copy-btn\': display !== \'inline\',\n\t\t\t\t\t\'cds--copy-btn--animating\': animating,\n\t\t\t\t\t\'cds--copy-btn--fade-in\': showFeedback,\n\t\t\t\t\t\'cds--copy-btn--fade-out\': !showFeedback && animating,\n\t\t\t\t\t\'cds--snippet cds--copy\': true\n\t\t\t\t}"\n\t\t\t\t[buttonAttributes]="{\n\t\t\t\t\t\'aria-label\': translations.COPY_CODE,\n\t\t\t\t\t\'aria-live\': \'polite\',\n\t\t\t\t\t\'tabindex\': \'0\'\n\t\t\t\t}">\n\t\t\t\t<ng-container *ngIf="display === \'inline\'">\n\t\t\t\t\t<code #code>\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet="codeTemplate"></ng-container>\n\t\t\t\t\t</code>\n\t\t\t\t</ng-container>\n\t\t\t\t<ng-container *ngIf="display !== \'inline\'">\n\t\t\t\t\t<svg cdsIcon="copy" size="16" class="cds--snippet__icon"></svg>\n\t\t\t\t</ng-container>\n\t\t\t</cds-icon-button>\n\t\t</ng-template>\n\n\t\t<ng-template #codeTemplate>\n\t\t\t<ng-content></ng-content>\n\t\t</ng-template>\n\t'})],CodeSnippet);var common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),icon=__webpack_require__("./src/icon/index.ts");let CodeSnippetModule=class CodeSnippetModule{};CodeSnippetModule=(0,tslib_es6.Cg)([(0,core.NgModule)({declarations:[CodeSnippet],exports:[CodeSnippet],imports:[common.CommonModule,src_button.tm,i18n.LP,utils.uh,icon.op]})],CodeSnippetModule);const code_snippet_stories={title:"Components/Code Snippet",decorators:[(0,dist.moduleMetadata)({imports:[CodeSnippetModule]})],argTypes:{snippet:{control:!1},display:{control:!1},feedbackText:{control:!1},maxCollapsedNumberOfRows:{controls:!1},maxExpandedNumberOfRows:{controls:!1},minCollapsedNumberOfRows:{controls:!1},minExpandedNumberOfRows:{controls:!1},expanded:{control:!1}},component:CodeSnippet},Basic=(args=>({props:args,template:'\n <cds-code-snippet display="single">{{snippet}}</cds-code-snippet>\n '})).bind({});Basic.args={snippet:"import { UIShellModule } from 'carbon-components-angular'; // Single line of code"};const Inline=(args=>({props:args,template:'\n Here is some <cds-code-snippet display="inline" [theme]="theme">{{snippet}}</cds-code-snippet> for you.\n '})).bind({});Inline.args={snippet:"<inline code>"};const Multi=(args=>({props:args,template:'\n <cds-code-snippet display="multi">{{snippet}}</cds-code-snippet>\n '})).bind({});Multi.args={snippet:'{\n "name": "carbon-components-angular",\n "version": "0.0.0",\n "description": "Next generation components",\n "main": "index.js",\n "scripts": {\n "build": "bash scripts/build.sh",\n "storybook": "start-storybook -s .storybook/public -p 6006",\n "docs:build": "typedoc",\n "lint": "tslint \'src/**/*.ts\'",\n "lint:fix": "tslint --fix \'src/**/*.ts\'",\n "test": "ng test --no-watch",\n "test:watch": "ng test --watch",\n "build-storybook": "build-storybook -c .storybook -s .storybook/public -o dist/docs/storybook",\n "semantic-release": "semantic-release",\n "commit": "git-cz",\n "ng": "ng",\n "ng:build": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build"\n },\n "repository": {\n "type": "git",\n "url": "git@github.com:IBM/carbon-components-angular.git"\n },\n "license": "Apache-2.0",\n "author": "IBM",\n "peerDependencies": {\n "@angular/common": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0",\n "@angular/core": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0",\n "@angular/forms": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0",\n "rxjs": "^6.0.0",\n "zone.js": "^0.8.26 || ^0.9.0 || ^0.10.0",\n "@carbon/styles": "^1.2.0"\n }\n }'},Multi.argTypes={maxCollapsedNumberOfRows:{controls:!0},maxExpandedNumberOfRows:{controls:!0},minCollapsedNumberOfRows:{controls:!0},minExpandedNumberOfRows:{controls:!0},expanded:{control:!0}};const Skeleton=(args=>({props:args,template:'\n <cds-code-snippet display="single" skeleton="true"></cds-code-snippet>\n <br>\n <cds-code-snippet display="multi" skeleton="true"></cds-code-snippet>\n '})).bind({});Basic.parameters={...Basic.parameters,docs:{...Basic.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <cds-code-snippet display="single">{{snippet}}</cds-code-snippet>\n `\n})',...Basic.parameters?.docs?.source}}},Inline.parameters={...Inline.parameters,docs:{...Inline.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n Here is some <cds-code-snippet display="inline" [theme]="theme">{{snippet}}</cds-code-snippet> for you.\n `\n})',...Inline.parameters?.docs?.source}}},Multi.parameters={...Multi.parameters,docs:{...Multi.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <cds-code-snippet display="multi">{{snippet}}</cds-code-snippet>\n `\n})',...Multi.parameters?.docs?.source}}},Skeleton.parameters={...Skeleton.parameters,docs:{...Skeleton.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <cds-code-snippet display="single" skeleton="true"></cds-code-snippet>\n <br>\n <cds-code-snippet display="multi" skeleton="true"></cds-code-snippet>\n `\n})',...Skeleton.parameters?.docs?.source}}};const __namedExportsOrder=["Basic","Inline","Multi","Skeleton"]}}]);
|