ngwr 3.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -7
- package/alert/alert-type.d.ts +7 -0
- package/alert/alert.component.d.ts +21 -0
- package/alert/alert.module.d.ts +7 -0
- package/alert/index.d.ts +5 -0
- package/alert/public-api.d.ts +9 -0
- package/alert/styles/_index.scss +58 -0
- package/alert/styles/theming.scss +26 -0
- package/alert/styles/vars.scss +11 -0
- package/avatar/avatar.component.d.ts +27 -0
- package/avatar/avatar.module.d.ts +7 -0
- package/avatar/index.d.ts +5 -0
- package/avatar/public-api.d.ts +8 -0
- package/avatar/styles/_index.scss +39 -0
- package/button/button-group.component.d.ts +12 -0
- package/button/button.component.d.ts +26 -58
- package/button/button.module.d.ts +2 -1
- package/button/index.d.ts +5 -2
- package/button/public-api.d.ts +9 -0
- package/button/styles/_index.scss +187 -0
- package/button/styles/vars.scss +13 -0
- package/{core/abstract/base.d.ts → cdk/base.directive.d.ts} +7 -1
- package/cdk/index.d.ts +5 -0
- package/cdk/public-api.d.ts +7 -0
- package/cdk/rxjs/index.d.ts +5 -0
- package/cdk/rxjs/is-array.d.ts +8 -0
- package/cdk/rxjs/is-defined.d.ts +8 -0
- package/cdk/rxjs/is-not-empty-array.d.ts +8 -0
- package/cdk/rxjs/is-observable.d.ts +9 -0
- package/cdk/rxjs/public-api.d.ts +10 -0
- package/cdk/types/index.d.ts +5 -0
- package/cdk/types/maybe.d.ts +7 -0
- package/cdk/types/public-api.d.ts +9 -0
- package/cdk/types/safe-any.d.ts +7 -0
- package/{core/color/color.d.ts → cdk/types/theme-color.d.ts} +6 -0
- package/cdk/utils/generate-random-id.d.ts +12 -0
- package/cdk/utils/index.d.ts +5 -0
- package/cdk/utils/public-api.d.ts +7 -0
- package/checkbox/checkbox.component.d.ts +24 -45
- package/checkbox/checkbox.module.d.ts +1 -1
- package/checkbox/index.d.ts +5 -2
- package/checkbox/public-api.d.ts +8 -0
- package/checkbox/styles/_index.scss +86 -0
- package/checkbox/styles/vars.scss +16 -0
- package/dialog/dialog-animations.d.ts +7 -1
- package/dialog/{dialog-base.d.ts → dialog-base.directive.d.ts} +13 -7
- package/dialog/dialog-close.directive.d.ts +9 -0
- package/dialog/dialog-content.directive.d.ts +6 -0
- package/dialog/dialog-data.token.d.ts +8 -0
- package/dialog/dialog-footer.directive.d.ts +8 -0
- package/dialog/dialog-options.d.ts +19 -0
- package/dialog/dialog-ref.d.ts +19 -13
- package/dialog/dialog-title.directive.d.ts +6 -0
- package/dialog/dialog.component.d.ts +28 -0
- package/dialog/dialog.module.d.ts +11 -0
- package/dialog/dialog.service.d.ts +28 -0
- package/dialog/index.d.ts +5 -9
- package/dialog/public-api.d.ts +18 -0
- package/dialog/{dialog.scss → styles/_index.scss} +2 -0
- package/dialog/styles/vars.scss +7 -0
- package/divider/divider.component.d.ts +8 -35
- package/divider/divider.module.d.ts +1 -1
- package/divider/index.d.ts +5 -2
- package/divider/public-api.d.ts +8 -0
- package/divider/{divider.scss → styles/_index.scss} +1 -1
- package/esm2022/alert/alert-type.mjs +8 -0
- package/esm2022/alert/alert.component.mjs +54 -0
- package/esm2022/alert/alert.module.mjs +22 -0
- package/esm2022/alert/ngwr-alert.mjs +5 -0
- package/esm2022/alert/public-api.mjs +10 -0
- package/esm2022/avatar/avatar.component.mjs +77 -0
- package/esm2022/avatar/avatar.module.mjs +22 -0
- package/esm2022/avatar/ngwr-avatar.mjs +5 -0
- package/esm2022/avatar/public-api.mjs +9 -0
- package/esm2022/button/button-group.component.mjs +36 -0
- package/esm2022/button/button.component.mjs +55 -163
- package/esm2022/button/button.module.mjs +15 -8
- package/esm2022/button/ngwr-button.mjs +2 -2
- package/esm2022/button/public-api.mjs +10 -0
- package/esm2022/cdk/base.directive.mjs +27 -0
- package/esm2022/cdk/ngwr-cdk.mjs +5 -0
- package/esm2022/cdk/public-api.mjs +8 -0
- package/esm2022/cdk/rxjs/is-array.mjs +10 -0
- package/esm2022/cdk/rxjs/is-defined.mjs +10 -0
- package/esm2022/cdk/rxjs/is-not-empty-array.mjs +10 -0
- package/esm2022/cdk/rxjs/is-observable.mjs +10 -0
- package/esm2022/cdk/rxjs/ngwr-cdk-rxjs.mjs +5 -0
- package/esm2022/cdk/rxjs/public-api.mjs +11 -0
- package/esm2022/cdk/types/maybe.mjs +8 -0
- package/esm2022/cdk/types/ngwr-cdk-types.mjs +5 -0
- package/esm2022/cdk/types/public-api.mjs +10 -0
- package/esm2022/cdk/types/safe-any.mjs +8 -0
- package/esm2022/cdk/types/theme-color.mjs +17 -0
- package/esm2022/cdk/utils/generate-random-id.mjs +17 -0
- package/esm2022/cdk/utils/ngwr-cdk-utils.mjs +5 -0
- package/esm2022/cdk/utils/public-api.mjs +8 -0
- package/esm2022/checkbox/checkbox.component.mjs +54 -120
- package/esm2022/checkbox/checkbox.module.mjs +14 -8
- package/esm2022/checkbox/ngwr-checkbox.mjs +2 -2
- package/esm2022/checkbox/public-api.mjs +9 -0
- package/esm2022/dialog/dialog-animations.mjs +8 -2
- package/esm2022/dialog/dialog-base.directive.mjs +95 -0
- package/esm2022/dialog/dialog-close.directive.mjs +33 -0
- package/esm2022/dialog/dialog-content.directive.mjs +25 -0
- package/esm2022/dialog/dialog-data.token.mjs +9 -0
- package/esm2022/dialog/dialog-footer.directive.mjs +36 -0
- package/esm2022/dialog/dialog-options.mjs +9 -0
- package/esm2022/dialog/dialog-ref.mjs +22 -16
- package/esm2022/dialog/dialog-title.directive.mjs +25 -0
- package/esm2022/dialog/dialog.component.mjs +57 -0
- package/esm2022/dialog/dialog.module.mjs +38 -0
- package/esm2022/dialog/dialog.service.mjs +107 -0
- package/esm2022/dialog/ngwr-dialog.mjs +2 -2
- package/esm2022/dialog/public-api.mjs +19 -0
- package/esm2022/divider/divider.component.mjs +16 -57
- package/esm2022/divider/divider.module.mjs +8 -8
- package/esm2022/divider/ngwr-divider.mjs +2 -2
- package/esm2022/divider/public-api.mjs +9 -0
- package/esm2022/form/form-error.component.mjs +33 -0
- package/esm2022/form/form-item.component.mjs +43 -0
- package/esm2022/form/form.module.mjs +23 -0
- package/esm2022/form/ngwr-form.mjs +2 -2
- package/esm2022/form/public-api.mjs +10 -0
- package/esm2022/icon/icon.component.mjs +82 -0
- package/esm2022/icon/icon.module.mjs +22 -0
- package/esm2022/icon/icon.service.mjs +40 -0
- package/esm2022/icon/icons.mjs +289 -279
- package/esm2022/icon/ngwr-icon.mjs +2 -2
- package/esm2022/icon/provide-wr-icons.mjs +17 -0
- package/esm2022/icon/public-api.mjs +12 -0
- package/esm2022/input/input-types.mjs +1 -1
- package/esm2022/input/input.component.mjs +123 -0
- package/esm2022/input/input.module.mjs +22 -0
- package/esm2022/input/ngwr-input.mjs +2 -2
- package/esm2022/input/public-api.mjs +10 -0
- package/esm2022/ngwr.mjs +2 -2
- package/esm2022/pipes/new-array.pipe.mjs +23 -0
- package/esm2022/pipes/ngwr-pipes.mjs +5 -0
- package/esm2022/pipes/pipes.module.mjs +22 -0
- package/esm2022/pipes/public-api.mjs +9 -0
- package/esm2022/progress/ngwr-progress.mjs +5 -0
- package/esm2022/progress/progress.component.mjs +42 -0
- package/esm2022/progress/progress.module.mjs +22 -0
- package/esm2022/progress/public-api.mjs +9 -0
- package/esm2022/public-api.mjs +3 -0
- package/esm2022/qr/generator.mjs +84 -0
- package/esm2022/qr/ngwr-qr.mjs +5 -0
- package/esm2022/qr/public-api.mjs +9 -0
- package/esm2022/qr/qr.component.mjs +90 -0
- package/esm2022/qr/qr.module.mjs +22 -0
- package/esm2022/qr/qrcodegen.mjs +872 -0
- package/esm2022/skeleton/index.mjs +3 -3
- package/esm2022/skeleton/skeleton.component.mjs +43 -0
- package/esm2022/skeleton/skeleton.module.mjs +16 -0
- package/esm2022/spinner/index.mjs +3 -3
- package/esm2022/spinner/spinner.component.mjs +33 -0
- package/esm2022/spinner/spinner.module.mjs +22 -0
- package/esm2022/tag/ngwr-tag.mjs +2 -2
- package/esm2022/tag/public-api.mjs +9 -0
- package/esm2022/tag/tag.component.mjs +74 -0
- package/esm2022/tag/tag.module.mjs +16 -0
- package/fesm2022/ngwr-alert.mjs +94 -0
- package/fesm2022/ngwr-alert.mjs.map +1 -0
- package/fesm2022/ngwr-avatar.mjs +110 -0
- package/fesm2022/ngwr-avatar.mjs.map +1 -0
- package/fesm2022/ngwr-button.mjs +108 -169
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-cdk-rxjs.mjs +53 -0
- package/fesm2022/ngwr-cdk-rxjs.mjs.map +1 -0
- package/fesm2022/ngwr-cdk-types.mjs +44 -0
- package/fesm2022/ngwr-cdk-types.mjs.map +1 -0
- package/fesm2022/ngwr-cdk-utils.mjs +30 -0
- package/fesm2022/ngwr-cdk-utils.mjs.map +1 -0
- package/fesm2022/ngwr-cdk.mjs +41 -0
- package/fesm2022/ngwr-cdk.mjs.map +1 -0
- package/fesm2022/ngwr-checkbox.mjs +73 -126
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +225 -165
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-divider.mjs +29 -63
- package/fesm2022/ngwr-divider.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +72 -54
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +445 -368
- package/fesm2022/ngwr-icon.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +101 -208
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +56 -0
- package/fesm2022/ngwr-pipes.mjs.map +1 -0
- package/fesm2022/ngwr-progress.mjs +75 -0
- package/fesm2022/ngwr-progress.mjs.map +1 -0
- package/fesm2022/{ngwr-qrcode.mjs → ngwr-qr.mjs} +72 -113
- package/fesm2022/ngwr-qr.mjs.map +1 -0
- package/fesm2022/ngwr-skeleton.mjs +19 -22
- package/fesm2022/ngwr-skeleton.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +35 -19
- package/fesm2022/ngwr-spinner.mjs.map +1 -1
- package/fesm2022/ngwr-tag.mjs +46 -49
- package/fesm2022/ngwr-tag.mjs.map +1 -1
- package/fesm2022/ngwr.mjs +1 -1
- package/fesm2022/ngwr.mjs.map +1 -1
- package/form/form-error.component.d.ts +11 -0
- package/form/form-item.component.d.ts +14 -0
- package/form/form.module.d.ts +8 -0
- package/form/index.d.ts +5 -3
- package/form/public-api.d.ts +9 -0
- package/icon/icon.component.d.ts +19 -0
- package/icon/icon.module.d.ts +7 -0
- package/icon/icon.service.d.ts +23 -0
- package/icon/icons.d.ts +115 -101
- package/icon/index.d.ts +5 -4
- package/icon/provide-wr-icons.d.ts +9 -0
- package/icon/public-api.d.ts +11 -0
- package/icon/{icon.scss → styles/_index.scss} +4 -2
- package/icon/styles/vars.scss +3 -0
- package/index.d.ts +5 -2
- package/input/index.d.ts +5 -2
- package/input/input-types.d.ts +0 -2
- package/input/input.component.d.ts +43 -0
- package/input/input.module.d.ts +7 -0
- package/input/public-api.d.ts +9 -0
- package/input/styles/_index.scss +107 -0
- package/input/styles/vars.scss +16 -0
- package/package.json +110 -57
- package/pipes/index.d.ts +5 -0
- package/pipes/new-array.pipe.d.ts +13 -0
- package/pipes/pipes.module.d.ts +7 -0
- package/pipes/public-api.d.ts +8 -0
- package/progress/index.d.ts +5 -0
- package/progress/progress.component.d.ts +10 -0
- package/progress/progress.module.d.ts +7 -0
- package/progress/public-api.d.ts +8 -0
- package/progress/styles/_index.scss +24 -0
- package/progress/styles/theming.scss +8 -0
- package/progress/styles/vars.scss +6 -0
- package/public-api.d.ts +2 -0
- package/qr/index.d.ts +5 -0
- package/qr/public-api.d.ts +8 -0
- package/qr/qr.component.d.ts +31 -0
- package/qr/qr.module.d.ts +7 -0
- package/skeleton/index.d.ts +2 -2
- package/skeleton/skeleton.component.d.ts +10 -0
- package/skeleton/{skeleton-module.d.ts → skeleton.module.d.ts} +2 -3
- package/skeleton/{skeleton.scss → styles/_index.scss} +1 -1
- package/spinner/index.d.ts +2 -2
- package/spinner/spinner.component.d.ts +11 -0
- package/spinner/{spinner-module.d.ts → spinner.module.d.ts} +2 -2
- package/spinner/{spinner.scss → styles/_index.scss} +2 -1
- package/styles/animations.scss +4 -4
- package/styles/cdk.scss +4 -0
- package/styles/colors.scss +72 -0
- package/styles/grid.scss +1 -2
- package/styles/reset.scss +2 -2
- package/styles/variables.scss +78 -0
- package/styles.scss +23 -0
- package/tag/index.d.ts +5 -2
- package/tag/public-api.d.ts +8 -0
- package/tag/styles/_index.scss +32 -0
- package/tag/styles/theming.scss +21 -0
- package/tag/styles/vars.scss +12 -0
- package/tag/tag.component.d.ts +21 -0
- package/tag/tag.module.d.ts +7 -0
- package/_grid.scss +0 -2
- package/_index.scss +0 -31
- package/backdrop/backdrop.scss +0 -3
- package/button/button.scss +0 -160
- package/checkbox/checkbox.scss +0 -103
- package/core/abstract/index.d.ts +0 -1
- package/core/color/index.d.ts +0 -2
- package/core/color/is-theme-color.d.ts +0 -2
- package/core/decorators/index.d.ts +0 -1
- package/core/decorators/input-boolean.d.ts +0 -1
- package/core/overlay/connected-overlay-directive.d.ts +0 -16
- package/core/overlay/get-placement-name.d.ts +0 -2
- package/core/overlay/index.d.ts +0 -5
- package/core/overlay/overlay-module.d.ts +0 -7
- package/core/overlay/overlay.scss +0 -9
- package/core/overlay/position-map.d.ts +0 -17
- package/core/overlay/position-type.d.ts +0 -2
- package/core/types/index.d.ts +0 -3
- package/core/types/on-change-type.d.ts +0 -2
- package/core/types/on-touched-type.d.ts +0 -2
- package/core/types/safe-any.d.ts +0 -1
- package/dialog/dialog-config.d.ts +0 -11
- package/dialog/dialog-container.d.ts +0 -22
- package/dialog/dialog-content-directives.d.ts +0 -31
- package/dialog/dialog-module.d.ts +0 -12
- package/dialog/dialog-service.d.ts +0 -27
- package/dialog/dialog-tokens.d.ts +0 -2
- package/esm2022/button/index.mjs +0 -3
- package/esm2022/checkbox/index.mjs +0 -3
- package/esm2022/core/abstract/base.mjs +0 -18
- package/esm2022/core/abstract/index.mjs +0 -2
- package/esm2022/core/abstract/ngwr-core-abstract.mjs +0 -5
- package/esm2022/core/color/color.mjs +0 -11
- package/esm2022/core/color/index.mjs +0 -3
- package/esm2022/core/color/is-theme-color.mjs +0 -9
- package/esm2022/core/color/ngwr-core-color.mjs +0 -5
- package/esm2022/core/decorators/index.mjs +0 -2
- package/esm2022/core/decorators/input-boolean.mjs +0 -15
- package/esm2022/core/decorators/ngwr-core-decorators.mjs +0 -5
- package/esm2022/core/overlay/connected-overlay-directive.mjs +0 -98
- package/esm2022/core/overlay/get-placement-name.mjs +0 -13
- package/esm2022/core/overlay/index.mjs +0 -5
- package/esm2022/core/overlay/ngwr-core-overlay.mjs +0 -5
- package/esm2022/core/overlay/overlay-module.mjs +0 -16
- package/esm2022/core/overlay/position-map.mjs +0 -18
- package/esm2022/core/overlay/position-type.mjs +0 -2
- package/esm2022/core/types/index.mjs +0 -4
- package/esm2022/core/types/ngwr-core-types.mjs +0 -5
- package/esm2022/core/types/on-change-type.mjs +0 -2
- package/esm2022/core/types/on-touched-type.mjs +0 -2
- package/esm2022/core/types/safe-any.mjs +0 -2
- package/esm2022/dialog/dialog-base.mjs +0 -92
- package/esm2022/dialog/dialog-config.mjs +0 -3
- package/esm2022/dialog/dialog-container.mjs +0 -58
- package/esm2022/dialog/dialog-content-directives.mjs +0 -98
- package/esm2022/dialog/dialog-module.mjs +0 -24
- package/esm2022/dialog/dialog-service.mjs +0 -109
- package/esm2022/dialog/dialog-tokens.mjs +0 -3
- package/esm2022/dialog/index.mjs +0 -10
- package/esm2022/divider/index.mjs +0 -3
- package/esm2022/form/form-error.mjs +0 -23
- package/esm2022/form/form-item.mjs +0 -46
- package/esm2022/form/form-module.mjs +0 -19
- package/esm2022/form/index.mjs +0 -4
- package/esm2022/icon/icon-module.mjs +0 -21
- package/esm2022/icon/icon-service.mjs +0 -21
- package/esm2022/icon/icon.mjs +0 -60
- package/esm2022/icon/index.mjs +0 -5
- package/esm2022/index.mjs +0 -3
- package/esm2022/input/index.mjs +0 -3
- package/esm2022/input/input-module.mjs +0 -20
- package/esm2022/input/input.mjs +0 -240
- package/esm2022/qrcode/generator.mjs +0 -84
- package/esm2022/qrcode/index.mjs +0 -3
- package/esm2022/qrcode/ngwr-qrcode.mjs +0 -5
- package/esm2022/qrcode/qrcode-module.mjs +0 -19
- package/esm2022/qrcode/qrcode.mjs +0 -142
- package/esm2022/qrcode/qrcodegen.mjs +0 -872
- package/esm2022/skeleton/skeleton-module.mjs +0 -18
- package/esm2022/skeleton/skeleton.mjs +0 -44
- package/esm2022/spinner/spinner-module.mjs +0 -16
- package/esm2022/spinner/spinner.mjs +0 -23
- package/esm2022/tag/index.mjs +0 -3
- package/esm2022/tag/tag-module.mjs +0 -20
- package/esm2022/tag/tag.mjs +0 -80
- package/esm2022/tooltip/index.mjs +0 -5
- package/esm2022/tooltip/ngwr-tooltip.mjs +0 -5
- package/esm2022/tooltip/tooltip-component.mjs +0 -93
- package/esm2022/tooltip/tooltip-default-positions.mjs +0 -8
- package/esm2022/tooltip/tooltip-directive.mjs +0 -85
- package/esm2022/tooltip/tooltip-module.mjs +0 -21
- package/esm2022/tooltip/tooltip-trigger.mjs +0 -2
- package/fesm2022/ngwr-core-abstract.mjs +0 -25
- package/fesm2022/ngwr-core-abstract.mjs.map +0 -1
- package/fesm2022/ngwr-core-color.mjs +0 -25
- package/fesm2022/ngwr-core-color.mjs.map +0 -1
- package/fesm2022/ngwr-core-decorators.mjs +0 -22
- package/fesm2022/ngwr-core-decorators.mjs.map +0 -1
- package/fesm2022/ngwr-core-overlay.mjs +0 -146
- package/fesm2022/ngwr-core-overlay.mjs.map +0 -1
- package/fesm2022/ngwr-core-types.mjs +0 -4
- package/fesm2022/ngwr-core-types.mjs.map +0 -1
- package/fesm2022/ngwr-qrcode.mjs.map +0 -1
- package/fesm2022/ngwr-tooltip.mjs +0 -204
- package/fesm2022/ngwr-tooltip.mjs.map +0 -1
- package/form/form-error.d.ts +0 -6
- package/form/form-item.d.ts +0 -15
- package/form/form-module.d.ts +0 -9
- package/icon/icon-module.d.ts +0 -9
- package/icon/icon-service.d.ts +0 -8
- package/icon/icon.d.ts +0 -20
- package/input/input-module.d.ts +0 -10
- package/input/input.d.ts +0 -65
- package/input/input.scss +0 -163
- package/qrcode/index.d.ts +0 -2
- package/qrcode/qrcode-module.d.ts +0 -9
- package/qrcode/qrcode.d.ts +0 -46
- package/skeleton/skeleton.d.ts +0 -11
- package/spinner/spinner.d.ts +0 -6
- package/styles/root.scss +0 -172
- package/tag/tag-module.d.ts +0 -10
- package/tag/tag.d.ts +0 -18
- package/tag/tag.scss +0 -106
- package/tooltip/index.d.ts +0 -5
- package/tooltip/tooltip-component.d.ts +0 -31
- package/tooltip/tooltip-default-positions.d.ts +0 -1
- package/tooltip/tooltip-directive.d.ts +0 -22
- package/tooltip/tooltip-module.d.ts +0 -11
- package/tooltip/tooltip-trigger.d.ts +0 -1
- package/tooltip/tooltip.scss +0 -67
- /package/form/{form.scss → styles/_index.scss} +0 -0
- /package/{qrcode → qr}/generator.d.ts +0 -0
- /package/{qrcode → qr}/qrcodegen.d.ts +0 -0
- /package/{qrcode/qrcode.scss → qr/styles/_index.scss} +0 -0
package/README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
# <img src="
|
|
1
|
+
# <img src="https://ngwr.dev/assets/images/logo.svg" alt="ngwr logo" height="32px">
|
|
2
2
|
|
|
3
3
|
[](https://github.com/thekhegay/ngwr/actions/workflows/deploy.yml)
|
|
4
4
|
[](https://www.npmjs.com/package/ngwr)
|
|
5
5
|
[](https://www.npmjs.com/package/ngwr)
|
|
6
6
|
[](https://github.com/thekhegay/ngwr/blob/main/LICENSE)
|
|
7
7
|
|
|
8
|
+
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fthekhegay%2Fngwr?ref=badge_large&issueType=license)
|
|
9
|
+
|
|
8
10
|
## Important information
|
|
9
11
|
NGWR is currently in development stage. All components are updating every week. Use it on your own risk. All bugreports and ideas are [welcomed](https://github.com/thekhegay/ngwr/issues/new).
|
|
10
12
|
|
|
@@ -12,7 +14,9 @@ NGWR is currently in development stage. All components are updating every week.
|
|
|
12
14
|
|
|
13
15
|
```shell
|
|
14
16
|
$ npm install ngwr
|
|
15
|
-
# or
|
|
17
|
+
# or
|
|
18
|
+
$ pnpm add ngwr
|
|
19
|
+
# or
|
|
16
20
|
$ yarn add ngwr
|
|
17
21
|
```
|
|
18
22
|
|
|
@@ -25,21 +29,20 @@ Don't forget to add styles:
|
|
|
25
29
|
|
|
26
30
|
## [Components](https://ngwr.dev/docs/components)
|
|
27
31
|
|
|
32
|
+
- [Alert](https://ngwr.dev/docs/components/alert)
|
|
33
|
+
- [Avatar](https://ngwr.dev/docs/components/avatar)
|
|
28
34
|
- [Button](https://ngwr.dev/docs/components/button)
|
|
35
|
+
- [Button Group](https://ngwr.dev/docs/components/button-group)
|
|
29
36
|
- [Checkbox](https://ngwr.dev/docs/components/checkbox)
|
|
30
37
|
- [Dialog](https://ngwr.dev/docs/components/dialog)
|
|
31
38
|
- [Divider](https://ngwr.dev/docs/components/divider)
|
|
32
39
|
- [Form](https://ngwr.dev/docs/components/form)
|
|
33
40
|
- [Icon](https://ngwr.dev/docs/components/icon)
|
|
34
41
|
- [Input](https://ngwr.dev/docs/components/input)
|
|
35
|
-
- [
|
|
42
|
+
- [QR](https://ngwr.dev/docs/components/qr)
|
|
36
43
|
- [Skeleton](https://ngwr.dev/docs/components/skeleton)
|
|
37
44
|
- [Spinner](https://ngwr.dev/docs/components/spinner)
|
|
38
45
|
- [Tag](https://ngwr.dev/docs/components/tag)
|
|
39
|
-
- [Tooltip](https://ngwr.dev/docs/components/tooltip)
|
|
40
|
-
|
|
41
|
-
- [Colors](https://ngwr.dev/docs/core/colors)
|
|
42
|
-
- [Grid](https://ngwr.dev/docs/core/grid)
|
|
43
46
|
|
|
44
47
|
## Authors
|
|
45
48
|
- [Roman Khegay](https://github.com/thekhegay) – code, design
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SafeAny } from 'ngwr/cdk/types';
|
|
2
|
+
import { WrAlertType } from './alert-type';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* NGWR alert component.
|
|
6
|
+
* Closeable component for feedback.
|
|
7
|
+
*
|
|
8
|
+
* {@tutorial} [How to use wr-alert]{@link http://ngwr.dev/docs/components/alert}
|
|
9
|
+
*/
|
|
10
|
+
export declare class WrAlertComponent {
|
|
11
|
+
title: string;
|
|
12
|
+
message?: string;
|
|
13
|
+
type: WrAlertType;
|
|
14
|
+
closeable: boolean;
|
|
15
|
+
protected readonly isClosed: import("@angular/core").WritableSignal<boolean>;
|
|
16
|
+
get elClasses(): SafeAny;
|
|
17
|
+
onClose(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrAlertComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrAlertComponent, "wr-alert", never, { "title": { "alias": "title"; "required": true; }; "message": { "alias": "message"; "required": false; }; "type": { "alias": "type"; "required": false; }; "closeable": { "alias": "closeable"; "required": false; }; }, {}, never, never, true, never>;
|
|
20
|
+
static ngAcceptInputType_closeable: unknown;
|
|
21
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./alert.component";
|
|
3
|
+
export declare class WrAlertModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrAlertModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<WrAlertModule, never, [typeof i1.WrAlertComponent], [typeof i1.WrAlertComponent]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<WrAlertModule>;
|
|
7
|
+
}
|
package/alert/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
5
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
6
|
+
*/
|
|
7
|
+
export * from './alert-type';
|
|
8
|
+
export * from './alert.component';
|
|
9
|
+
export * from './alert.module';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@forward './vars';
|
|
2
|
+
@forward './theming';
|
|
3
|
+
|
|
4
|
+
@forward '../../icon/styles';
|
|
5
|
+
|
|
6
|
+
.wr-alert {
|
|
7
|
+
width: 100%;
|
|
8
|
+
|
|
9
|
+
&__wrapper {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: stretch;
|
|
12
|
+
gap: 1rem;
|
|
13
|
+
|
|
14
|
+
background-color: var(--wr-alert-bg-color);
|
|
15
|
+
border-radius: var(--wr-alert-border-radius);
|
|
16
|
+
border-left: 0.25rem solid var(--wr-alert-border-color);
|
|
17
|
+
padding: var(--wr-alert-padding-y) var(--wr-alert-padding-x);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&__body {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
align-items: flex-start;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
flex: 1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&__title {
|
|
29
|
+
color: var(--wr-alert-title-color);
|
|
30
|
+
font-size: 1rem;
|
|
31
|
+
font-weight: 600;
|
|
32
|
+
line-height: 1.5rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&__message {
|
|
36
|
+
color: var(--wr-alert-message-color);
|
|
37
|
+
font-size: 0.75rem;
|
|
38
|
+
font-weight: 400;
|
|
39
|
+
line-height: 1rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&-close {
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
|
|
48
|
+
min-width: 2rem;
|
|
49
|
+
|
|
50
|
+
color: var(--wr-alert-close-color);
|
|
51
|
+
transition: var(--wr-transition-base);
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
|
|
54
|
+
&:hover {
|
|
55
|
+
color: var(--wr-alert-close-color-hover);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.wr-alert {
|
|
2
|
+
&--success {
|
|
3
|
+
--wr-alert-title-color: var(--wr-color-success-darker);
|
|
4
|
+
--wr-alert-message-color: var(--wr-color-success-darker);
|
|
5
|
+
--wr-alert-bg-color: rgba(var(--wr-color-success-rgb), 0.125);
|
|
6
|
+
--wr-alert-border-color: rgba(var(--wr-color-success-rgb), 0.5);
|
|
7
|
+
--wr-alert-close-color: rgba(var(--wr-color-success-rgb), 0.5);
|
|
8
|
+
--wr-alert-close-color-hover: var(--wr-color-success);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&--warning {
|
|
12
|
+
--wr-alert-title-color: var(--wr-color-warning-darker);
|
|
13
|
+
--wr-alert-bg-color: rgba(var(--wr-color-warning-rgb), 0.125);
|
|
14
|
+
--wr-alert-border-color: rgba(var(--wr-color-warning-rgb), 0.5);
|
|
15
|
+
--wr-alert-close-color: rgba(var(--wr-color-warning-rgb), 0.5);
|
|
16
|
+
--wr-alert-close-color-hover: var(--wr-color-warning);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&--danger {
|
|
20
|
+
--wr-alert-title-color: var(--wr-color-danger-darker);
|
|
21
|
+
--wr-alert-bg-color: rgba(var(--wr-color-danger-rgb), 0.125);
|
|
22
|
+
--wr-alert-border-color: rgba(var(--wr-color-danger-rgb), 0.5);
|
|
23
|
+
--wr-alert-close-color: rgba(var(--wr-color-danger-rgb), 0.5);
|
|
24
|
+
--wr-alert-close-color-hover: var(--wr-color-danger);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--wr-alert-title-color: var(--wr-color-primary-darker);
|
|
3
|
+
--wr-alert-message-color: rgba(var(--wr-color-dark-rgb), 0.5);
|
|
4
|
+
--wr-alert-bg-color: rgba(var(--wr-color-primary-rgb), 0.125);
|
|
5
|
+
--wr-alert-border-color: rgba(var(--wr-color-primary-rgb), 0.5);
|
|
6
|
+
--wr-alert-close-color: rgba(var(--wr-color-primary-rgb), 0.5);
|
|
7
|
+
--wr-alert-close-color-hover: var(--wr-color-primary);
|
|
8
|
+
--wr-alert-border-radius: 0.5rem;
|
|
9
|
+
--wr-alert-padding-x: 0.75rem;
|
|
10
|
+
--wr-alert-padding-y: 0.875rem;
|
|
11
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ChangeDetectorRef, ElementRef } from '@angular/core';
|
|
2
|
+
import { SafeAny } from 'ngwr/cdk/types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class WrAvatarComponent {
|
|
5
|
+
readonly cdr: ChangeDetectorRef;
|
|
6
|
+
readonly elRef: ElementRef<any>;
|
|
7
|
+
readonly remSize: number;
|
|
8
|
+
readonly isImgLoaded: import("@angular/core").WritableSignal<boolean>;
|
|
9
|
+
private calcRemToPx;
|
|
10
|
+
constructor();
|
|
11
|
+
url: string;
|
|
12
|
+
alt: string;
|
|
13
|
+
rounded: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Width and height in rem
|
|
16
|
+
* @example size="6" transforms to 6 * remSize (16 by default)
|
|
17
|
+
*/
|
|
18
|
+
get size(): number;
|
|
19
|
+
set size(value: number | string);
|
|
20
|
+
private _size;
|
|
21
|
+
get elClasses(): SafeAny;
|
|
22
|
+
get elStyles(): SafeAny;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrAvatarComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrAvatarComponent, "wr-avatar", never, { "url": { "alias": "url"; "required": true; }; "alt": { "alias": "alt"; "required": true; }; "rounded": { "alias": "rounded"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
25
|
+
static ngAcceptInputType_rounded: unknown;
|
|
26
|
+
static ngAcceptInputType_size: unknown;
|
|
27
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./avatar.component";
|
|
3
|
+
export declare class WrAvatarModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrAvatarModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<WrAvatarModule, never, [typeof i1.WrAvatarComponent], [typeof i1.WrAvatarComponent]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<WrAvatarModule>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.wr-avatar {
|
|
2
|
+
--wr-avatar-border-radius: 10%;
|
|
3
|
+
--wr-avatar-img-opacity: 0;
|
|
4
|
+
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
|
|
10
|
+
border-radius: var(--wr-avatar-border-radius);
|
|
11
|
+
|
|
12
|
+
position: relative;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
|
|
15
|
+
box-shadow: inset 0 0 0 1px rgba(var(--wr-color-light-rgb), 0.5);
|
|
16
|
+
|
|
17
|
+
&--rounded {
|
|
18
|
+
--wr-avatar-border-radius: 50%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&--loaded {
|
|
22
|
+
--wr-avatar-img-opacity: 1;
|
|
23
|
+
box-shadow: inset 0 0 0 1px rgba(var(--wr-color-light-rgb), 0);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&__img {
|
|
27
|
+
pointer-events: none;
|
|
28
|
+
user-select: none;
|
|
29
|
+
opacity: var(--wr-avatar-img-opacity);
|
|
30
|
+
transition: var(--wr-transition-base);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&__spin {
|
|
34
|
+
color: rgba(var(--wr-color-medium-rgb), 0.5);
|
|
35
|
+
position: absolute;
|
|
36
|
+
width: 40%;
|
|
37
|
+
height: 40%;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SafeAny } from 'ngwr/cdk/types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* NGWR button group.
|
|
5
|
+
*
|
|
6
|
+
* {@tutorial} [How to use wr-btn-group]{@link http://ngwr.dev/docs/components/button-group}
|
|
7
|
+
*/
|
|
8
|
+
export declare class WrButtonGroupComponent {
|
|
9
|
+
get classes(): SafeAny;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrButtonGroupComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrButtonGroupComponent, "wr-btn-group", never, {}, {}, never, ["*"], true, never>;
|
|
12
|
+
}
|
|
@@ -1,63 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ChangeDetectorRef, ElementRef, NgZone, OnDestroy, OnInit } from '@angular/core';
|
|
3
|
-
import { WrAbstractBase } from 'ngwr/core/abstract';
|
|
4
|
-
import { WrThemeColor } from 'ngwr/core/color';
|
|
5
|
-
import { SafeAny } from 'ngwr/core/types';
|
|
1
|
+
import { SafeAny, WrThemeColor } from 'ngwr/cdk/types';
|
|
6
2
|
import { wrIconName } from 'ngwr/icon';
|
|
7
3
|
import * as i0 from "@angular/core";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
get rounded(): boolean;
|
|
26
|
-
set rounded(value: BooleanInput);
|
|
27
|
-
private _rounded;
|
|
28
|
-
/** Set fullwidth state of `wr-btn`; */
|
|
29
|
-
get fullWidth(): boolean;
|
|
30
|
-
set fullWidth(value: BooleanInput);
|
|
31
|
-
/**
|
|
32
|
-
* @deprecated use fullWidth instead
|
|
33
|
-
*/
|
|
34
|
-
get fullwidth(): boolean;
|
|
35
|
-
set fullwidth(value: BooleanInput);
|
|
36
|
-
private _fullWidth;
|
|
37
|
-
/** Set loading state of `wr-btn`; */
|
|
38
|
-
get loading(): boolean;
|
|
39
|
-
set loading(value: BooleanInput);
|
|
40
|
-
private _loading;
|
|
41
|
-
/** Set disabled state of `wr-btn`; */
|
|
42
|
-
get disabled(): boolean;
|
|
43
|
-
set disabled(value: BooleanInput);
|
|
44
|
-
private _disabled;
|
|
45
|
-
/** Set icon of `wr-btn`; */
|
|
46
|
-
get icon(): wrIconName | null;
|
|
47
|
-
set icon(value: wrIconName | null);
|
|
48
|
-
private _icon;
|
|
49
|
-
/** Set icon position of `wr-btn`; */
|
|
50
|
-
get iconPosition(): 'start' | 'end';
|
|
51
|
-
set iconPosition(value: 'start' | 'end');
|
|
52
|
-
private _iconPosition;
|
|
53
|
-
/** Set element disabled attribute */
|
|
4
|
+
/**
|
|
5
|
+
* NGWR button component.
|
|
6
|
+
* Trigger an operation or perform an action.
|
|
7
|
+
*
|
|
8
|
+
* {@tutorial} [How to use wr-btn]{@link http://ngwr.dev/docs/components/button}
|
|
9
|
+
*/
|
|
10
|
+
export declare class WrButtonComponent {
|
|
11
|
+
color?: WrThemeColor | null;
|
|
12
|
+
size: 'default' | 'small';
|
|
13
|
+
icon: wrIconName | null;
|
|
14
|
+
iconPosition: 'start' | 'end';
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
outlined: boolean;
|
|
17
|
+
rounded: boolean;
|
|
18
|
+
block: boolean;
|
|
19
|
+
loading: boolean;
|
|
20
|
+
isDisabledWhenLoading: boolean;
|
|
54
21
|
get nativeDisabled(): '' | null;
|
|
55
|
-
/** Set element classes */
|
|
56
22
|
get elClasses(): SafeAny;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
static
|
|
62
|
-
static
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrButtonComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrButtonComponent, "wr-btn, button[wr-btn], a[wr-btn]", never, { "color": { "alias": "color"; "required": false; }; "size": { "alias": "size"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconPosition": { "alias": "iconPosition"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "outlined": { "alias": "outlined"; "required": false; }; "rounded": { "alias": "rounded"; "required": false; }; "block": { "alias": "block"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "isDisabledWhenLoading": { "alias": "isDisabledWhenLoading"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
25
|
+
static ngAcceptInputType_disabled: unknown;
|
|
26
|
+
static ngAcceptInputType_outlined: unknown;
|
|
27
|
+
static ngAcceptInputType_rounded: unknown;
|
|
28
|
+
static ngAcceptInputType_block: unknown;
|
|
29
|
+
static ngAcceptInputType_loading: unknown;
|
|
30
|
+
static ngAcceptInputType_isDisabledWhenLoading: unknown;
|
|
63
31
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./button.component";
|
|
3
|
+
import * as i2 from "./button-group.component";
|
|
3
4
|
export declare class WrButtonModule {
|
|
4
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrButtonModule, never>;
|
|
5
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<WrButtonModule, never, [typeof i1.
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<WrButtonModule, never, [typeof i1.WrButtonComponent, typeof i2.WrButtonGroupComponent], [typeof i1.WrButtonComponent, typeof i2.WrButtonGroupComponent]>;
|
|
6
7
|
static ɵinj: i0.ɵɵInjectorDeclaration<WrButtonModule>;
|
|
7
8
|
}
|
package/button/index.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
5
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
6
|
+
*/
|
|
7
|
+
export * from './button.component';
|
|
8
|
+
export * from './button-group.component';
|
|
9
|
+
export * from './button.module';
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
@forward './vars';
|
|
2
|
+
|
|
3
|
+
@use '../../styles/maps' as maps;
|
|
4
|
+
@use '../../styles/colors';
|
|
5
|
+
|
|
6
|
+
@forward '../../spinner/styles';
|
|
7
|
+
@forward '../../icon/styles';
|
|
8
|
+
|
|
9
|
+
.wr-btn {
|
|
10
|
+
display: inline-block;
|
|
11
|
+
vertical-align: middle;
|
|
12
|
+
position: relative;
|
|
13
|
+
|
|
14
|
+
text-align: center;
|
|
15
|
+
|
|
16
|
+
appearance: none;
|
|
17
|
+
text-decoration: none;
|
|
18
|
+
list-style: none;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
touch-action: manipulation;
|
|
21
|
+
user-select: none;
|
|
22
|
+
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
word-wrap: break-word;
|
|
25
|
+
|
|
26
|
+
color: var(--wr-btn-color);
|
|
27
|
+
background-color: var(--wr-btn-bg-color);
|
|
28
|
+
|
|
29
|
+
border-radius: var(--wr-btn-border-radius);
|
|
30
|
+
border: 1px solid var(--wr-btn-border-color);
|
|
31
|
+
|
|
32
|
+
font-family: var(--wr-btn-font-family);
|
|
33
|
+
font-size: var(--wr-btn-font-size);
|
|
34
|
+
font-weight: var(--wr-btn-font-weight);
|
|
35
|
+
line-height: var(--wr-btn-line-height);
|
|
36
|
+
|
|
37
|
+
padding: var(--wr-btn-padding-y) var(--wr-btn-padding-x);
|
|
38
|
+
|
|
39
|
+
transition: var(--wr-transition-base);
|
|
40
|
+
|
|
41
|
+
&__spin {
|
|
42
|
+
position: absolute;
|
|
43
|
+
z-index: 3;
|
|
44
|
+
left: 50%;
|
|
45
|
+
top: 50%;
|
|
46
|
+
transform: translate(-50%, -50%);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:hover {
|
|
50
|
+
--wr-btn-bg-color: var(--wr-color-light-lighter);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&[disabled],
|
|
54
|
+
&:disabled {
|
|
55
|
+
cursor: default;
|
|
56
|
+
--wr-btn-color: var(--wr-color-medium);
|
|
57
|
+
--wr-btn-bg-color: var(--wr-color-light-lighter);
|
|
58
|
+
pointer-events: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&:active {
|
|
62
|
+
--wr-btn-bg-color: var(--wr-color-light-shade);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&-group {
|
|
66
|
+
.wr-btn {
|
|
67
|
+
border-radius: 0;
|
|
68
|
+
border-left: none;
|
|
69
|
+
|
|
70
|
+
&:first-child {
|
|
71
|
+
border-top-left-radius: var(--wr-btn-border-radius);
|
|
72
|
+
border-bottom-left-radius: var(--wr-btn-border-radius);
|
|
73
|
+
border-left: 1px solid var(--wr-btn-border-color);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&:last-child {
|
|
77
|
+
border-top-right-radius: var(--wr-btn-border-radius);
|
|
78
|
+
border-bottom-right-radius: var(--wr-btn-border-radius);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&--loading {
|
|
84
|
+
&--disabled {
|
|
85
|
+
pointer-events: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.wr-btn__text,
|
|
89
|
+
.wr-btn__icon,{
|
|
90
|
+
opacity: 0;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&-group {
|
|
95
|
+
.wr-btn {
|
|
96
|
+
border-radius: 0;
|
|
97
|
+
border-left: none;
|
|
98
|
+
|
|
99
|
+
&:first-child {
|
|
100
|
+
border-top-left-radius: var(--wr-btn-border-radius);
|
|
101
|
+
border-bottom-left-radius: var(--wr-btn-border-radius);
|
|
102
|
+
border-left: 1px solid var(--wr-btn-border-color);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&:last-child {
|
|
106
|
+
border-top-right-radius: var(--wr-btn-border-radius);
|
|
107
|
+
border-bottom-right-radius: var(--wr-btn-border-radius);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&--small {
|
|
113
|
+
--wr-btn-icon-size: 0.825rem;
|
|
114
|
+
--wr-btn-font-size: 0.75rem;
|
|
115
|
+
--wr-btn-line-height: 1rem;
|
|
116
|
+
--wr-btn-border-radius: 0.25rem;
|
|
117
|
+
--wr-btn-padding-y: 0.25rem;
|
|
118
|
+
--wr-btn-padding-x: 0.75rem;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&--rounded {
|
|
122
|
+
--wr-btn-border-radius: 50rem;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&--block {
|
|
126
|
+
display: block;
|
|
127
|
+
width: 100%;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&__icon {
|
|
131
|
+
--wr-icon-size: var(--wr-btn-icon-size) !important;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&--icon {
|
|
135
|
+
display: inline-flex;
|
|
136
|
+
align-items: center;
|
|
137
|
+
justify-content: center;
|
|
138
|
+
gap: 0.25rem;
|
|
139
|
+
|
|
140
|
+
&-end {
|
|
141
|
+
flex-direction: row-reverse;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@each $color in maps.$theme-colors-map {
|
|
147
|
+
.wr-btn--color-#{$color} {
|
|
148
|
+
--wr-btn-color: var(--wr-color-#{$color}-contrast);
|
|
149
|
+
--wr-btn-border-color: var(--wr-color-#{$color});
|
|
150
|
+
--wr-btn-bg-color: var(--wr-color-#{$color});
|
|
151
|
+
|
|
152
|
+
&:hover {
|
|
153
|
+
--wr-btn-border-color: var(--wr-color-#{$color}-dark);
|
|
154
|
+
--wr-btn-bg-color: var(--wr-color-#{$color}-dark);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&:active {
|
|
158
|
+
--wr-btn-border-color: var(--wr-color-#{$color}-darker);
|
|
159
|
+
--wr-btn-bg-color: var(--wr-color-#{$color}-darker);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&[disabled],
|
|
163
|
+
&:disabled {
|
|
164
|
+
--wr-btn-color: var(--wr-color-#{$color}-contrast);
|
|
165
|
+
--wr-btn-border-color: var(--wr-color-#{$color}-lighter);
|
|
166
|
+
--wr-btn-bg-color: var(--wr-color-#{$color}-lighter);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&.wr-btn--outlined {
|
|
170
|
+
--wr-btn-color: var(--wr-color-#{$color});
|
|
171
|
+
--wr-btn-border-color: rgba(var(--wr-color-#{$color}-rgb), 0.375);
|
|
172
|
+
--wr-btn-bg-color: transparent;
|
|
173
|
+
|
|
174
|
+
&:hover {
|
|
175
|
+
--wr-btn-color: var(--wr-color-#{$color}-contrast);
|
|
176
|
+
--wr-btn-border-color: var(--wr-color-#{$color}-dark);
|
|
177
|
+
--wr-btn-bg-color: var(--wr-color-#{$color}-dark);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&:active {
|
|
181
|
+
--wr-btn-color: var(--wr-color-#{$color}-contrast);
|
|
182
|
+
--wr-btn-border-color: var(--wr-color-#{$color}-darker);
|
|
183
|
+
--wr-btn-bg-color: var(--wr-color-#{$color}-darker);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--wr-btn-color: var(--wr-color-dark);
|
|
3
|
+
--wr-btn-bg-color: var(--wr-color-white);
|
|
4
|
+
--wr-btn-border-color: var(--wr-color-light-lighter);
|
|
5
|
+
--wr-btn-icon-size: 1rem;
|
|
6
|
+
--wr-btn-font-size: 0.875rem;
|
|
7
|
+
--wr-btn-font-weight: 500;
|
|
8
|
+
--wr-btn-font-family: var(--wr-font-family-base);
|
|
9
|
+
--wr-btn-line-height: 1.25rem;
|
|
10
|
+
--wr-btn-border-radius: 0.375rem;
|
|
11
|
+
--wr-btn-padding-y: 0.375rem;
|
|
12
|
+
--wr-btn-padding-x: 1rem;
|
|
13
|
+
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
5
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
6
|
+
*/
|
|
1
7
|
import { OnDestroy } from '@angular/core';
|
|
2
8
|
import { Subject } from 'rxjs';
|
|
3
9
|
import * as i0 from "@angular/core";
|
|
@@ -5,5 +11,5 @@ export declare abstract class WrAbstractBase implements OnDestroy {
|
|
|
5
11
|
protected readonly destroyed$: Subject<void>;
|
|
6
12
|
ngOnDestroy(): void;
|
|
7
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrAbstractBase, never>;
|
|
8
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<WrAbstractBase, never, never, {}, {}, never, never,
|
|
14
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WrAbstractBase, never, never, {}, {}, never, never, true, never>;
|
|
9
15
|
}
|