UNPKG

primeng

Version:

PrimeNG is an open source UI library for Angular featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeB

1 lines 6.75 kB
{"version":3,"file":"primeng-buttongroup.mjs","sources":["../../src/buttongroup/style/buttongroupstyle.ts","../../src/buttongroup/buttongroup.ts","../../src/buttongroup/primeng-buttongroup.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BaseStyle } from 'primeng/base';\n\nconst theme = ({ dt }) => `\n.p-buttongroup .p-button {\n margin: 0;\n}\n\n.p-buttongroup .p-button:not(:last-child),\n.p-buttongroup .p-button:not(:last-child):hover {\n border-right: 0 none;\n}\n\n.p-buttongroup .p-button:not(:first-of-type):not(:last-of-type) {\n border-radius: 0;\n}\n\n.p-buttongroup .p-button:first-of-type:not(:only-of-type) {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n}\n\n.p-buttongroup .p-button:last-of-type:not(:only-of-type) {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n}\n\n.p-buttongroup .p-button:focus {\n position: relative;\n z-index: 1;\n}\n\n.p-buttongroup {\n display:flex;\n}\n\n.p-buttongroup > .p-button {\n flex: 1;\n}\n\n/* For PrimeNG */\n\n.p-buttongroup .p-button:focus,\n.p-buttongroup p-button:focus .p-button,\n.p-buttonset .p-button:focus,\n.p-buttonset .p-button:focus,\n.p-buttonset p-button:focus .p-button,\n.p-buttonset .p-button:focus {\n position: relative;\n z-index: 1;\n}\n\n.p-buttongroup .p-button:not(:last-child),\n.p-buttongroup .p-button:not(:last-child):hover,\n.p-buttongroup p-button:not(:last-child) .p-button,\n.p-buttongroup p-button:not(:last-child) .p-button:hover,\n.p-buttonset .p-button:not(:last-child),\n.p-buttonset .p-button:not(:last-child):hover,\n.p-buttonset p-button:not(:last-child) .p-button,\n.p-buttonset p-button:not(:last-child) .p-button:hover {\n border-right: 0 none;\n}\n\n.p-buttongroup .p-button:not(:first-of-type):not(:last-of-type),\n.p-buttongroup p-button:not(:first-of-type):not(:last-of-type) .p-button,\n.p-buttonset .p-button:not(:first-of-type):not(:last-of-type),\n.p-buttonset p-button:not(:first-of-type):not(:last-of-type) .p-button {\n border-radius: 0;\n}\n\n.p-buttongroup .p-button:first-of-type:not(:only-of-type),\n.p-buttongroup p-button:first-of-type:not(:only-of-type) .p-button,\n.p-buttonset .p-button:first-of-type:not(:only-of-type),\n.p-buttonset p-button:first-of-type:not(:only-of-type) .p-button {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n}\n\n.p-buttongroup .p-button:last-of-type:not(:only-of-type),\n.p-buttongroup p-button:last-of-type:not(:only-of-type) .p-button,\n.p-buttonset .p-button:last-of-type:not(:only-of-type),\n.p-buttonset p-button:last-of-type:not(:only-of-type) .p-button {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n}\n\np-button[iconpos='right'] spinnericon {\n order: 1;\n}\n`;\n\nconst classes = {\n root: 'p-buttongroup p-component'\n};\n\n@Injectable()\nexport class ButtonGroupStyle extends BaseStyle {\n name = 'buttongroup';\n\n theme = theme;\n\n classes = classes;\n}\n\n/**\n *\n * A set of Buttons can be displayed together using the ButtonGroup component.\n *\n * [Live Demo](https://www.primeng.org/button/)\n *\n * @module buttongroupstyle\n *\n */\nexport enum ButtonGroupClasses {\n /**\n * Class name of the root element\n */\n root = 'p-buttongroup'\n}\n\nexport interface ButtonGroupStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, NgModule, ViewEncapsulation } from '@angular/core';\nimport { BaseComponent } from 'primeng/basecomponent';\nimport { ButtonGroupStyle } from './style/buttongroupstyle';\n\n@Component({\n selector: 'p-buttonGroup, p-buttongroup, p-button-group',\n standalone: true,\n imports: [CommonModule],\n template: `\n <span class=\"p-buttongroup p-component\" role=\"group\">\n <ng-content></ng-content>\n </span>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [ButtonGroupStyle]\n})\nexport class ButtonGroup extends BaseComponent {\n _componentStyle = inject(ButtonGroupStyle);\n}\n\n@NgModule({\n imports: [ButtonGroup],\n exports: [ButtonGroup]\n})\nexport class ButtonGroupModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAGA,MAAM,KAAK,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsFzB;AAED,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE;CACT;AAGK,MAAO,gBAAiB,SAAQ,SAAS,CAAA;IAC3C,IAAI,GAAG,aAAa;IAEpB,KAAK,GAAG,KAAK;IAEb,OAAO,GAAG,OAAO;AALR,IAAA,OAAA,IAAA,iBAAA,CAAA,MAAA,EAAA,IAAA,6BAAA,CAAA,CAAA,OAAA,SAAA,wBAAA,CAAA,iBAAA,EAAA,EAAA,OAAA,CAAA,6BAAA,KAAA,6BAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,gBAAgB,yBAAhB,gBAAgB,CAAA,CAAA,EAAA,CAAA,EAAA,GAAA;AAAhB,IAAA,OAAA,KAAA,iBAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,KAAA,EAAA,gBAAgB,WAAhB,gBAAgB,CAAA,IAAA,EAAA,CAAA;;iFAAhB,gBAAgB,EAAA,CAAA;cAD5B;;AASD;;;;;;;;AAQG;IACS;AAAZ,CAAA,UAAY,kBAAkB,EAAA;AAC1B;;AAEG;AACH,IAAA,kBAAA,CAAA,MAAA,CAAA,GAAA,eAAsB;AAC1B,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,GAK7B,EAAA,CAAA,CAAA;;;ACpGK,MAAO,WAAY,SAAQ,aAAa,CAAA;AAC1C,IAAA,eAAe,GAAG,MAAM,CAAC,gBAAgB,CAAC;AADjC,IAAA,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