@tectra-ng/ui 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +26 -2
- package/amount/README.md +28 -0
- package/autocomplete/README.md +82 -0
- package/avatar/README.md +43 -0
- package/badge/README.md +19 -0
- package/button/README.md +46 -0
- package/button-group/README.md +8 -0
- package/card/README.md +30 -0
- package/cascade-select/README.md +49 -0
- package/checkbox/README.md +64 -0
- package/chip/README.md +38 -0
- package/chips-input/README.md +47 -0
- package/color-picker/README.md +43 -0
- package/confirm/README.md +46 -0
- package/country/README.md +23 -0
- package/country-select/README.md +39 -0
- package/dialog/README.md +84 -0
- package/divider/README.md +24 -0
- package/drawer/README.md +54 -0
- package/email-suggestion/README.md +20 -0
- package/fesm2022/tectra-ng-ui-amount.mjs +415 -0
- package/fesm2022/tectra-ng-ui-amount.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-autocomplete.mjs +730 -0
- package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-avatar.mjs +670 -0
- package/fesm2022/tectra-ng-ui-avatar.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-badge.mjs +191 -0
- package/fesm2022/tectra-ng-ui-badge.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-button-group.mjs +50 -0
- package/fesm2022/tectra-ng-ui-button-group.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-button.mjs +725 -0
- package/fesm2022/tectra-ng-ui-button.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-card.mjs +210 -0
- package/fesm2022/tectra-ng-ui-card.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-cascade-select.mjs +887 -0
- package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-checkbox.mjs +1150 -0
- package/fesm2022/tectra-ng-ui-checkbox.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-chip.mjs +344 -0
- package/fesm2022/tectra-ng-ui-chip.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-chips-input.mjs +649 -0
- package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-color-picker.mjs +828 -0
- package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-confirm.mjs +489 -0
- package/fesm2022/tectra-ng-ui-confirm.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-country-select.mjs +545 -0
- package/fesm2022/tectra-ng-ui-country-select.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-country.mjs +313 -0
- package/fesm2022/tectra-ng-ui-country.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-dialog.mjs +1539 -0
- package/fesm2022/tectra-ng-ui-dialog.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-divider.mjs +194 -0
- package/fesm2022/tectra-ng-ui-divider.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-drawer.mjs +540 -0
- package/fesm2022/tectra-ng-ui-drawer.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-email-suggestion.mjs +341 -0
- package/fesm2022/tectra-ng-ui-email-suggestion.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-field.mjs +492 -0
- package/fesm2022/tectra-ng-ui-field.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-fieldset.mjs +258 -0
- package/fesm2022/tectra-ng-ui-fieldset.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-highlight-text.mjs +246 -0
- package/fesm2022/tectra-ng-ui-highlight-text.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-icon-field.mjs +478 -0
- package/fesm2022/tectra-ng-ui-icon-field.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-input-group.mjs +113 -0
- package/fesm2022/tectra-ng-ui-input-group.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-input-mask.mjs +413 -0
- package/fesm2022/tectra-ng-ui-input-mask.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-input-number.mjs +1045 -0
- package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-input-otp.mjs +553 -0
- package/fesm2022/tectra-ng-ui-input-otp.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-input.mjs +260 -0
- package/fesm2022/tectra-ng-ui-input.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-key-filter.mjs +185 -0
- package/fesm2022/tectra-ng-ui-key-filter.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-knob.mjs +630 -0
- package/fesm2022/tectra-ng-ui-knob.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-label.mjs +271 -0
- package/fesm2022/tectra-ng-ui-label.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-link.mjs +699 -0
- package/fesm2022/tectra-ng-ui-link.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-listbox.mjs +484 -0
- package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-mention-textarea.mjs +717 -0
- package/fesm2022/tectra-ng-ui-mention-textarea.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-menu.mjs +1484 -0
- package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-message.mjs +975 -0
- package/fesm2022/tectra-ng-ui-message.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-multiselect.mjs +569 -0
- package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-overlay-badge.mjs +345 -0
- package/fesm2022/tectra-ng-ui-overlay-badge.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-paginator.mjs +849 -0
- package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-panel.mjs +317 -0
- package/fesm2022/tectra-ng-ui-panel.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-password-generator.mjs +292 -0
- package/fesm2022/tectra-ng-ui-password-generator.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-password.mjs +871 -0
- package/fesm2022/tectra-ng-ui-password.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-pill.mjs +361 -0
- package/fesm2022/tectra-ng-ui-pill.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-popover.mjs +742 -0
- package/fesm2022/tectra-ng-ui-popover.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-progress-bar.mjs +440 -0
- package/fesm2022/tectra-ng-ui-progress-bar.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-progress-spinner.mjs +265 -0
- package/fesm2022/tectra-ng-ui-progress-spinner.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-radio-button.mjs +817 -0
- package/fesm2022/tectra-ng-ui-radio-button.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-rating.mjs +584 -0
- package/fesm2022/tectra-ng-ui-rating.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-select.mjs +2478 -0
- package/fesm2022/tectra-ng-ui-select.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-skeleton.mjs +548 -0
- package/fesm2022/tectra-ng-ui-skeleton.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-slider.mjs +630 -0
- package/fesm2022/tectra-ng-ui-slider.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-speed-dial.mjs +669 -0
- package/fesm2022/tectra-ng-ui-speed-dial.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-split-button.mjs +614 -0
- package/fesm2022/tectra-ng-ui-split-button.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-status-icon.mjs +295 -0
- package/fesm2022/tectra-ng-ui-status-icon.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-table.mjs +5997 -0
- package/fesm2022/tectra-ng-ui-table.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-tag.mjs +422 -0
- package/fesm2022/tectra-ng-ui-tag.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-textarea.mjs +482 -0
- package/fesm2022/tectra-ng-ui-textarea.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-toast.mjs +668 -0
- package/fesm2022/tectra-ng-ui-toast.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-toggle-button.mjs +416 -0
- package/fesm2022/tectra-ng-ui-toggle-button.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-toggle-switch.mjs +560 -0
- package/fesm2022/tectra-ng-ui-toggle-switch.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-tooltip.mjs +835 -0
- package/fesm2022/tectra-ng-ui-tooltip.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-tree-select.mjs +986 -0
- package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui.mjs +4 -0
- package/fesm2022/tectra-ng-ui.mjs.map +1 -0
- package/field/README.md +43 -0
- package/fieldset/README.md +36 -0
- package/highlight-text/README.md +20 -0
- package/icon-field/README.md +30 -0
- package/input/README.md +22 -0
- package/input-group/README.md +21 -0
- package/input-mask/README.md +30 -0
- package/input-number/README.md +61 -0
- package/input-otp/README.md +44 -0
- package/key-filter/README.md +31 -0
- package/knob/README.md +50 -0
- package/label/README.md +29 -0
- package/link/README.md +47 -0
- package/listbox/README.md +68 -0
- package/mention-textarea/README.md +47 -0
- package/menu/README.md +65 -0
- package/message/README.md +58 -0
- package/multiselect/README.md +85 -0
- package/overlay-badge/README.md +30 -0
- package/package.json +301 -3
- package/paginator/README.md +60 -0
- package/panel/README.md +45 -0
- package/password/README.md +60 -0
- package/password-generator/README.md +34 -0
- package/pill/README.md +42 -0
- package/popover/README.md +67 -0
- package/progress-bar/README.md +32 -0
- package/progress-spinner/README.md +22 -0
- package/radio-button/README.md +54 -0
- package/rating/README.md +49 -0
- package/select/README.md +78 -0
- package/skeleton/README.md +27 -0
- package/slider/README.md +48 -0
- package/speed-dial/README.md +49 -0
- package/split-button/README.md +45 -0
- package/status-icon/README.md +22 -0
- package/table/README.md +178 -0
- package/tag/README.md +42 -0
- package/textarea/README.md +37 -0
- package/toast/README.md +52 -0
- package/toggle-button/README.md +34 -0
- package/toggle-switch/README.md +49 -0
- package/tooltip/README.md +60 -0
- package/tree-select/README.md +49 -0
- package/types/tectra-ng-ui-amount.d.ts +135 -0
- package/types/tectra-ng-ui-amount.d.ts.map +1 -0
- package/types/tectra-ng-ui-autocomplete.d.ts +250 -0
- package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -0
- package/types/tectra-ng-ui-avatar.d.ts +289 -0
- package/types/tectra-ng-ui-avatar.d.ts.map +1 -0
- package/types/tectra-ng-ui-badge.d.ts +119 -0
- package/types/tectra-ng-ui-badge.d.ts.map +1 -0
- package/types/tectra-ng-ui-button-group.d.ts +6 -0
- package/types/tectra-ng-ui-button-group.d.ts.map +1 -0
- package/types/tectra-ng-ui-button.d.ts +466 -0
- package/types/tectra-ng-ui-button.d.ts.map +1 -0
- package/types/tectra-ng-ui-card.d.ts +71 -0
- package/types/tectra-ng-ui-card.d.ts.map +1 -0
- package/types/tectra-ng-ui-cascade-select.d.ts +244 -0
- package/types/tectra-ng-ui-cascade-select.d.ts.map +1 -0
- package/types/tectra-ng-ui-checkbox.d.ts +450 -0
- package/types/tectra-ng-ui-checkbox.d.ts.map +1 -0
- package/types/tectra-ng-ui-chip.d.ts +106 -0
- package/types/tectra-ng-ui-chip.d.ts.map +1 -0
- package/types/tectra-ng-ui-chips-input.d.ts +187 -0
- package/types/tectra-ng-ui-chips-input.d.ts.map +1 -0
- package/types/tectra-ng-ui-color-picker.d.ts +237 -0
- package/types/tectra-ng-ui-color-picker.d.ts.map +1 -0
- package/types/tectra-ng-ui-confirm.d.ts +80 -0
- package/types/tectra-ng-ui-confirm.d.ts.map +1 -0
- package/types/tectra-ng-ui-country-select.d.ts +235 -0
- package/types/tectra-ng-ui-country-select.d.ts.map +1 -0
- package/types/tectra-ng-ui-country.d.ts +105 -0
- package/types/tectra-ng-ui-country.d.ts.map +1 -0
- package/types/tectra-ng-ui-dialog.d.ts +453 -0
- package/types/tectra-ng-ui-dialog.d.ts.map +1 -0
- package/types/tectra-ng-ui-divider.d.ts +70 -0
- package/types/tectra-ng-ui-divider.d.ts.map +1 -0
- package/types/tectra-ng-ui-drawer.d.ts +188 -0
- package/types/tectra-ng-ui-drawer.d.ts.map +1 -0
- package/types/tectra-ng-ui-email-suggestion.d.ts +84 -0
- package/types/tectra-ng-ui-email-suggestion.d.ts.map +1 -0
- package/types/tectra-ng-ui-field.d.ts +139 -0
- package/types/tectra-ng-ui-field.d.ts.map +1 -0
- package/types/tectra-ng-ui-fieldset.d.ts +74 -0
- package/types/tectra-ng-ui-fieldset.d.ts.map +1 -0
- package/types/tectra-ng-ui-highlight-text.d.ts +75 -0
- package/types/tectra-ng-ui-highlight-text.d.ts.map +1 -0
- package/types/tectra-ng-ui-icon-field.d.ts +77 -0
- package/types/tectra-ng-ui-icon-field.d.ts.map +1 -0
- package/types/tectra-ng-ui-input-group.d.ts +18 -0
- package/types/tectra-ng-ui-input-group.d.ts.map +1 -0
- package/types/tectra-ng-ui-input-mask.d.ts +91 -0
- package/types/tectra-ng-ui-input-mask.d.ts.map +1 -0
- package/types/tectra-ng-ui-input-number.d.ts +326 -0
- package/types/tectra-ng-ui-input-number.d.ts.map +1 -0
- package/types/tectra-ng-ui-input-otp.d.ts +173 -0
- package/types/tectra-ng-ui-input-otp.d.ts.map +1 -0
- package/types/tectra-ng-ui-input.d.ts +113 -0
- package/types/tectra-ng-ui-input.d.ts.map +1 -0
- package/types/tectra-ng-ui-key-filter.d.ts +43 -0
- package/types/tectra-ng-ui-key-filter.d.ts.map +1 -0
- package/types/tectra-ng-ui-knob.d.ts +207 -0
- package/types/tectra-ng-ui-knob.d.ts.map +1 -0
- package/types/tectra-ng-ui-label.d.ts +53 -0
- package/types/tectra-ng-ui-label.d.ts.map +1 -0
- package/types/tectra-ng-ui-link.d.ts +223 -0
- package/types/tectra-ng-ui-link.d.ts.map +1 -0
- package/types/tectra-ng-ui-listbox.d.ts +131 -0
- package/types/tectra-ng-ui-listbox.d.ts.map +1 -0
- package/types/tectra-ng-ui-mention-textarea.d.ts +169 -0
- package/types/tectra-ng-ui-mention-textarea.d.ts.map +1 -0
- package/types/tectra-ng-ui-menu.d.ts +512 -0
- package/types/tectra-ng-ui-menu.d.ts.map +1 -0
- package/types/tectra-ng-ui-message.d.ts +390 -0
- package/types/tectra-ng-ui-message.d.ts.map +1 -0
- package/types/tectra-ng-ui-multiselect.d.ts +216 -0
- package/types/tectra-ng-ui-multiselect.d.ts.map +1 -0
- package/types/tectra-ng-ui-overlay-badge.d.ts +104 -0
- package/types/tectra-ng-ui-overlay-badge.d.ts.map +1 -0
- package/types/tectra-ng-ui-paginator.d.ts +293 -0
- package/types/tectra-ng-ui-paginator.d.ts.map +1 -0
- package/types/tectra-ng-ui-panel.d.ts +133 -0
- package/types/tectra-ng-ui-panel.d.ts.map +1 -0
- package/types/tectra-ng-ui-password-generator.d.ts +80 -0
- package/types/tectra-ng-ui-password-generator.d.ts.map +1 -0
- package/types/tectra-ng-ui-password.d.ts +271 -0
- package/types/tectra-ng-ui-password.d.ts.map +1 -0
- package/types/tectra-ng-ui-pill.d.ts +167 -0
- package/types/tectra-ng-ui-pill.d.ts.map +1 -0
- package/types/tectra-ng-ui-popover.d.ts +244 -0
- package/types/tectra-ng-ui-popover.d.ts.map +1 -0
- package/types/tectra-ng-ui-progress-bar.d.ts +151 -0
- package/types/tectra-ng-ui-progress-bar.d.ts.map +1 -0
- package/types/tectra-ng-ui-progress-spinner.d.ts +95 -0
- package/types/tectra-ng-ui-progress-spinner.d.ts.map +1 -0
- package/types/tectra-ng-ui-radio-button.d.ts +380 -0
- package/types/tectra-ng-ui-radio-button.d.ts.map +1 -0
- package/types/tectra-ng-ui-rating.d.ts +195 -0
- package/types/tectra-ng-ui-rating.d.ts.map +1 -0
- package/types/tectra-ng-ui-select.d.ts +761 -0
- package/types/tectra-ng-ui-select.d.ts.map +1 -0
- package/types/tectra-ng-ui-skeleton.d.ts +182 -0
- package/types/tectra-ng-ui-skeleton.d.ts.map +1 -0
- package/types/tectra-ng-ui-slider.d.ts +220 -0
- package/types/tectra-ng-ui-slider.d.ts.map +1 -0
- package/types/tectra-ng-ui-speed-dial.d.ts +175 -0
- package/types/tectra-ng-ui-speed-dial.d.ts.map +1 -0
- package/types/tectra-ng-ui-split-button.d.ts +139 -0
- package/types/tectra-ng-ui-split-button.d.ts.map +1 -0
- package/types/tectra-ng-ui-status-icon.d.ts +105 -0
- package/types/tectra-ng-ui-status-icon.d.ts.map +1 -0
- package/types/tectra-ng-ui-table.d.ts +1301 -0
- package/types/tectra-ng-ui-table.d.ts.map +1 -0
- package/types/tectra-ng-ui-tag.d.ts +157 -0
- package/types/tectra-ng-ui-tag.d.ts.map +1 -0
- package/types/tectra-ng-ui-textarea.d.ts +146 -0
- package/types/tectra-ng-ui-textarea.d.ts.map +1 -0
- package/types/tectra-ng-ui-toast.d.ts +268 -0
- package/types/tectra-ng-ui-toast.d.ts.map +1 -0
- package/types/tectra-ng-ui-toggle-button.d.ts +184 -0
- package/types/tectra-ng-ui-toggle-button.d.ts.map +1 -0
- package/types/tectra-ng-ui-toggle-switch.d.ts +226 -0
- package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -0
- package/types/tectra-ng-ui-tooltip.d.ts +275 -0
- package/types/tectra-ng-ui-tooltip.d.ts.map +1 -0
- package/types/tectra-ng-ui-tree-select.d.ts +339 -0
- package/types/tectra-ng-ui-tree-select.d.ts.map +1 -0
- package/types/tectra-ng-ui.d.ts +2 -0
- package/types/tectra-ng-ui.d.ts.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tectra-ng-ui-radio-button.mjs","names":[],"sources":["../../../../packages/ui/radio-button/src/radio-group.token.ts","../../../../packages/ui/radio-button/src/radio-button.component.ts","../../../../packages/ui/radio-button/src/radio-button.component.html","../../../../packages/ui/radio-button/src/radio-group.component.ts"],"sourcesContent":["import { InjectionToken, Signal } from '@angular/core';\nimport { TxRadioButtonSize, TxRadioButtonVariant } from './radio-button.types';\n\nexport interface TxRadioGroupContext {\n readonly name: Signal<string>;\n readonly isDisabled: Signal<boolean>;\n readonly isInvalid: Signal<boolean>;\n readonly isRequired: Signal<boolean>;\n readonly size: Signal<TxRadioButtonSize | undefined>;\n readonly variant: Signal<TxRadioButtonVariant | undefined>;\n isChecked(value: unknown): boolean;\n select(value: unknown, event: Event): void;\n touch(): void;\n}\n\nexport const TX_RADIO_GROUP = new InjectionToken<TxRadioGroupContext>('TX_RADIO_GROUP');\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { uniqueId } from '@tectra-ng/core/a11y';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { TxFormControlBase, injectFieldInvalid } from '@tectra-ng/core/forms';\nimport { optionalBoolean, optionalNumber } from '@tectra-ng/core/utils';\nimport { TectraDeepPartial, TectraRadioButtonTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TX_RADIO_GROUP } from './radio-group.token';\nimport { TxRadioButtonChangeEvent, TxRadioButtonPart, TxRadioButtonSize, TxRadioButtonVariant } from './radio-button.types';\n\n@Component({\n selector: 'tx-radio-button',\n templateUrl: './radio-button.component.html',\n styleUrl: './radio-button.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxRadioButton), multi: true }],\n host: {\n class: 'tx-radio-button',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'resolvedSize()',\n '[attr.data-variant]': 'resolvedVariant()',\n '[class.tx-radio-button--checked]': 'checked()',\n '[class.tx-radio-button--disabled]': 'isDisabled()',\n '[class.tx-radio-button--readonly]': 'readonly()',\n '[class.tx-radio-button--invalid]': 'isInvalid()',\n '[class.tx-radio-button--tile]': 'tile()',\n '(click)': 'onHostClick($event)',\n },\n})\nexport class TxRadioButton extends TxFormControlBase<unknown> {\n private group = inject(TX_RADIO_GROUP, { optional: true });\n private generatedId = uniqueId('tx-radio-button');\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly optionValue = input<unknown>(undefined, { alias: 'value' });\n readonly label = input<string | undefined>(undefined);\n readonly description = input<string | undefined>(undefined);\n readonly size = input<TxRadioButtonSize | undefined>(undefined);\n readonly variant = input<TxRadioButtonVariant | undefined>(undefined);\n readonly tile = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly invalid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input<boolean, unknown>(false, { alias: 'disabled', transform: booleanAttribute });\n readonly readonly = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly required = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly name = input<string | undefined>(undefined);\n readonly inputId = input<string | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly tabindex = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly dt = input<TectraDeepPartial<TectraRadioButtonTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxRadioButtonPart, TxRadioButton> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly changed = output<TxRadioButtonChangeEvent>();\n\n readonly inputRef = viewChild.required<ElementRef<HTMLInputElement>>('input');\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('radioButton', this, this.pt, this.ptOptions);\n private ownInvalid = injectFieldInvalid(this.invalid);\n\n readonly resolvedId = computed(() => this.inputId() ?? this.generatedId);\n readonly descriptionId = `${this.generatedId}-description`;\n readonly resolvedName = computed(() => this.group?.name() ?? this.name());\n readonly resolvedSize = computed(() => this.size() ?? this.group?.size() ?? 'medium');\n readonly resolvedVariant = computed(() => this.variant() ?? this.group?.variant() ?? 'outlined');\n readonly isDisabled = computed(() => this.disabled() || this.disabledInput() || !!this.group?.isDisabled());\n readonly isInvalid = computed(() => this.ownInvalid() || !!this.group?.isInvalid());\n readonly isRequired = computed(() => this.required() || !!this.group?.isRequired());\n readonly checked = computed(() => (this.group ? this.group.isChecked(this.optionValue()) : this.value() === this.optionValue()));\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-radio-button'), ...this.passThrough().root?.style }));\n\n focus(): void {\n this.inputRef().nativeElement.focus();\n }\n\n onInputClick(event: MouseEvent): void {\n if (this.readonly()) {\n event.preventDefault();\n }\n }\n\n onInputChange(event: Event): void {\n if (this.group) {\n this.group.select(this.optionValue(), event);\n } else {\n this.updateValue(this.optionValue());\n }\n this.changed.emit({ value: this.optionValue(), originalEvent: event });\n }\n\n onBlur(): void {\n this.markTouched();\n this.group?.touch();\n }\n\n onHostClick(event: MouseEvent): void {\n if (!this.tile() || this.isDisabled()) {\n return;\n }\n if (!(event.target as HTMLElement).closest('label, input, a, button')) {\n this.inputRef().nativeElement.click();\n }\n }\n}\n","<span class=\"tx-radio-button__box\" [class]=\"passThrough().box?.class\" [style]=\"passThrough().box?.style\">\n <input\n #input\n type=\"radio\"\n class=\"tx-radio-button__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [id]=\"resolvedId()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [required]=\"isRequired()\"\n [attr.name]=\"resolvedName() ?? null\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-describedby]=\"description() ? descriptionId : null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n />\n <span class=\"tx-radio-button__indicator\" aria-hidden=\"true\">\n <span class=\"tx-radio-button__dot\" [class]=\"passThrough().dot?.class\" [style]=\"passThrough().dot?.style\"></span>\n </span>\n</span>\n<span class=\"tx-radio-button__text\">\n <label class=\"tx-radio-button__label\" [for]=\"resolvedId()\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\"\n >{{ label() }}<ng-content\n /></label>\n @if (description()) {\n <span\n class=\"tx-radio-button__description\"\n [id]=\"descriptionId\"\n [class]=\"passThrough().description?.class\"\n [style]=\"passThrough().description?.style\"\n >{{ description() }}</span\n >\n }\n</span>\n","import { ChangeDetectionStrategy, Component, booleanAttribute, computed, forwardRef, inject, input, output } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { uniqueId } from '@tectra-ng/core/a11y';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { TxFormControlBase, injectFieldInvalid } from '@tectra-ng/core/forms';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraDeepPartial, TectraRadioButtonTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TX_RADIO_GROUP, TxRadioGroupContext } from './radio-group.token';\nimport { TxRadioButtonSize, TxRadioButtonVariant, TxRadioGroupOrientation, TxRadioGroupPart } from './radio-button.types';\n\n@Component({\n selector: 'tx-radio-group',\n template: '<ng-content />',\n styles: `\n :host {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n :host([data-styled]) {\n gap: var(--tx-radio-button-group-gap);\n }\n\n :host([data-orientation='horizontal']) {\n flex-direction: row;\n flex-wrap: wrap;\n }\n\n :host([data-styled][data-orientation='horizontal']) {\n column-gap: var(--tx-radio-button-group-horizontal-gap);\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxRadioGroup), multi: true },\n { provide: TX_RADIO_GROUP, useFactory: () => inject(TxRadioGroup).context },\n ],\n host: {\n class: 'tx-radio-group',\n role: 'radiogroup',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-orientation]': 'orientation()',\n '[attr.aria-label]': 'ariaLabel() ?? null',\n '[attr.aria-labelledby]': 'ariaLabelledBy() ?? null',\n '[attr.aria-invalid]': 'isInvalid() || null',\n '[attr.aria-required]': 'required() || null',\n '[attr.aria-disabled]': 'isDisabled() || null',\n },\n})\nexport class TxRadioGroup extends TxFormControlBase<unknown> {\n private generatedName = uniqueId('tx-radio-group');\n\n readonly name = input<string | undefined>(undefined);\n readonly orientation = input<TxRadioGroupOrientation>('vertical');\n readonly size = input<TxRadioButtonSize | undefined>(undefined);\n readonly variant = input<TxRadioButtonVariant | undefined>(undefined);\n readonly invalid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input<boolean, unknown>(false, { alias: 'disabled', transform: booleanAttribute });\n readonly required = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraRadioButtonTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxRadioGroupPart, TxRadioGroup> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly changed = output<unknown>();\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('radioGroup', this, this.pt, this.ptOptions);\n readonly isInvalid = injectFieldInvalid(this.invalid);\n readonly isDisabled = computed(() => this.disabled() || this.disabledInput());\n readonly resolvedName = computed(() => this.name() ?? this.generatedName);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-radio-button'), ...this.passThrough().root?.style }));\n\n readonly context: TxRadioGroupContext = {\n name: this.resolvedName,\n isDisabled: this.isDisabled,\n isInvalid: this.isInvalid,\n isRequired: this.required,\n size: this.size,\n variant: this.variant,\n isChecked: (value) => this.value() === value,\n select: (value) => {\n this.updateValue(value);\n this.changed.emit(value);\n },\n touch: () => this.markTouched(),\n };\n}\n"],"mappings":";;;;;;;;AAeA,MAAa,iBAAiB,IAAI,eAAoC,gBAAgB;AC2BtF,IAAa,gBAAb,MAAa,sBAAsB,kBAA0B;CACnD,QAAQ,OAAO,gBAAgB,EAAE,UAAU,KAAI,CAAE;CACjD,cAAc,SAAS,iBAAiB;CAGvC,cAAc,MAAe,QAAS;EAAA,GAAA,YAAA,EAAA,WAAA,cAAA,+BAAA,CAAA;EAAI,OAAO;CAAO,CAAA;CACxD,QAAQ,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC5C,cAAc,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAClD,OAAO,MAAqC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACtD,UAAU,MAAwC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC5D,OAAO,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,OAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACnE,UAAU,MAAoC,QAAS;EAAA,GAAA,YAAA,EAAA,WAAA,UAAA,+BAAA,CAAA;EAAI,WAAW;CAAe,CAAA;CAErF,gBAAgB,MAAwB,OAAK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AA;EACW,MAAA,CAAA;GAAA,UAAA;GAAgB,UAChB;GAAgB,iBAqBT,wBAAwB;GAAM,WACpC,CACT;IAAE,SAAS;IAAmB,aAAa,iBAAgB,YAAa;IAAG,OAAO;GAAI,GACtF;IAAE,SAAS;IAAgB,kBAAkB,OAAM,YAAA,CAAc,CAAC;GAAO,CAC1E;GAAA,MACK;IACJ,OAAO;IACP,MAAM;IACN,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,2BAA2B;IAC3B,qBAAqB;IACrB,0BAA0B;IAC1B,uBAAuB;IACvB,wBAAwB;IACxB,wBAAwB;GACzB;GAAA,QAAA,CAAA,sTAAA;EAAA,CAAA"}
|
|
@@ -0,0 +1,584 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Directive, TemplateRef, booleanAttribute, computed, contentChild, forwardRef, inject, input, numberAttribute, output, signal } from "@angular/core";
|
|
3
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
4
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
5
|
+
import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
|
|
6
|
+
import { TxFormControlBase, injectFieldInvalid } from "@tectra-ng/core/forms";
|
|
7
|
+
import { TxLocaleService, injectTranslations } from "@tectra-ng/core/i18n";
|
|
8
|
+
import { optionalBoolean, optionalNumber } from "@tectra-ng/core/utils";
|
|
9
|
+
import { TxIcon, TxIconRegistry } from "@tectra-ng/icons";
|
|
10
|
+
import { toStyleObject } from "@tectra-ng/themes";
|
|
11
|
+
var TxRatingOnIconTemplate = class TxRatingOnIconTemplate {
|
|
12
|
+
templateRef = inject(TemplateRef);
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
14
|
+
minVersion: "12.0.0",
|
|
15
|
+
version: "22.2.3",
|
|
16
|
+
ngImport: i0,
|
|
17
|
+
type: TxRatingOnIconTemplate,
|
|
18
|
+
deps: [],
|
|
19
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
20
|
+
});
|
|
21
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
22
|
+
minVersion: "14.0.0",
|
|
23
|
+
version: "22.2.3",
|
|
24
|
+
type: TxRatingOnIconTemplate,
|
|
25
|
+
isStandalone: true,
|
|
26
|
+
selector: "ng-template[txRatingOnIcon]",
|
|
27
|
+
ngImport: i0
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
31
|
+
minVersion: "12.0.0",
|
|
32
|
+
version: "22.2.3",
|
|
33
|
+
ngImport: i0,
|
|
34
|
+
type: TxRatingOnIconTemplate,
|
|
35
|
+
decorators: [{
|
|
36
|
+
type: Directive,
|
|
37
|
+
args: [{ selector: "ng-template[txRatingOnIcon]" }]
|
|
38
|
+
}]
|
|
39
|
+
});
|
|
40
|
+
var TxRatingOffIconTemplate = class TxRatingOffIconTemplate {
|
|
41
|
+
templateRef = inject(TemplateRef);
|
|
42
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
43
|
+
minVersion: "12.0.0",
|
|
44
|
+
version: "22.2.3",
|
|
45
|
+
ngImport: i0,
|
|
46
|
+
type: TxRatingOffIconTemplate,
|
|
47
|
+
deps: [],
|
|
48
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
49
|
+
});
|
|
50
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
51
|
+
minVersion: "14.0.0",
|
|
52
|
+
version: "22.2.3",
|
|
53
|
+
type: TxRatingOffIconTemplate,
|
|
54
|
+
isStandalone: true,
|
|
55
|
+
selector: "ng-template[txRatingOffIcon]",
|
|
56
|
+
ngImport: i0
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
60
|
+
minVersion: "12.0.0",
|
|
61
|
+
version: "22.2.3",
|
|
62
|
+
ngImport: i0,
|
|
63
|
+
type: TxRatingOffIconTemplate,
|
|
64
|
+
decorators: [{
|
|
65
|
+
type: Directive,
|
|
66
|
+
args: [{ selector: "ng-template[txRatingOffIcon]" }]
|
|
67
|
+
}]
|
|
68
|
+
});
|
|
69
|
+
var TxRating = class TxRating extends TxFormControlBase {
|
|
70
|
+
txIconRegistry = inject(TxIconRegistry);
|
|
71
|
+
localeService = inject(TxLocaleService);
|
|
72
|
+
stars = input(5, {
|
|
73
|
+
...ngDevMode ? { debugName: "stars" } : /* istanbul ignore next */ {},
|
|
74
|
+
transform: numberAttribute
|
|
75
|
+
});
|
|
76
|
+
allowHalf = input(false, {
|
|
77
|
+
...ngDevMode ? { debugName: "allowHalf" } : /* istanbul ignore next */ {},
|
|
78
|
+
transform: booleanAttribute
|
|
79
|
+
});
|
|
80
|
+
onIcon = input("star-fill", ...ngDevMode ? [{ debugName: "onIcon" }] : /* istanbul ignore next */ []);
|
|
81
|
+
offIcon = input("star-fill", ...ngDevMode ? [{ debugName: "offIcon" }] : /* istanbul ignore next */ []);
|
|
82
|
+
clearable = input(false, {
|
|
83
|
+
...ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {},
|
|
84
|
+
transform: booleanAttribute
|
|
85
|
+
});
|
|
86
|
+
clearLabel = input(void 0, ...ngDevMode ? [{ debugName: "clearLabel" }] : /* istanbul ignore next */ []);
|
|
87
|
+
size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
88
|
+
invalid = input(void 0, {
|
|
89
|
+
...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
|
|
90
|
+
transform: optionalBoolean
|
|
91
|
+
});
|
|
92
|
+
disabledInput = input(false, {
|
|
93
|
+
...ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {},
|
|
94
|
+
alias: "disabled",
|
|
95
|
+
transform: booleanAttribute
|
|
96
|
+
});
|
|
97
|
+
readonly = input(false, {
|
|
98
|
+
...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
|
|
99
|
+
transform: booleanAttribute
|
|
100
|
+
});
|
|
101
|
+
ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
102
|
+
ariaLabelledBy = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
|
|
103
|
+
tabindex = input(void 0, {
|
|
104
|
+
...ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {},
|
|
105
|
+
transform: optionalNumber
|
|
106
|
+
});
|
|
107
|
+
dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
|
|
108
|
+
pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
109
|
+
ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
|
|
110
|
+
unstyled = input(void 0, {
|
|
111
|
+
...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
|
|
112
|
+
transform: optionalBoolean
|
|
113
|
+
});
|
|
114
|
+
rated = output();
|
|
115
|
+
cleared = output();
|
|
116
|
+
onTemplate = contentChild(TxRatingOnIconTemplate, ...ngDevMode ? [{ debugName: "onTemplate" }] : /* istanbul ignore next */ []);
|
|
117
|
+
offTemplate = contentChild(TxRatingOffIconTemplate, ...ngDevMode ? [{ debugName: "offTemplate" }] : /* istanbul ignore next */ []);
|
|
118
|
+
translations = injectTranslations();
|
|
119
|
+
isUnstyled = injectUnstyled(this.unstyled);
|
|
120
|
+
isInvalid = injectFieldInvalid(this.invalid);
|
|
121
|
+
passThrough = injectPassThrough("rating", this, this.pt, this.ptOptions);
|
|
122
|
+
preview = signal(null, ...ngDevMode ? [{ debugName: "preview" }] : /* istanbul ignore next */ []);
|
|
123
|
+
indexes = computed(() => Array.from({ length: Math.max(1, this.stars()) }, (_, index) => index), ...ngDevMode ? [{ debugName: "indexes" }] : /* istanbul ignore next */ []);
|
|
124
|
+
isDisabled = computed(() => this.disabled() || this.disabledInput(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
|
|
125
|
+
isEditable = computed(() => !this.isDisabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "isEditable" }] : /* istanbul ignore next */ []);
|
|
126
|
+
shown = computed(() => this.preview() ?? this.value() ?? 0, ...ngDevMode ? [{ debugName: "shown" }] : /* istanbul ignore next */ []);
|
|
127
|
+
unit = computed(() => this.allowHalf() ? .5 : 1, ...ngDevMode ? [{ debugName: "unit" }] : /* istanbul ignore next */ []);
|
|
128
|
+
onIconName = computed(() => this.txIconRegistry.has(this.onIcon()) ? this.onIcon() : null, ...ngDevMode ? [{ debugName: "onIconName" }] : /* istanbul ignore next */ []);
|
|
129
|
+
offIconName = computed(() => this.txIconRegistry.has(this.offIcon()) ? this.offIcon() : null, ...ngDevMode ? [{ debugName: "offIconName" }] : /* istanbul ignore next */ []);
|
|
130
|
+
valueText = computed(() => this.translations().ratingValue.replace("{value}", this.localeService.formatNumber(this.value() ?? 0)).replace("{stars}", String(this.stars())), ...ngDevMode ? [{ debugName: "valueText" }] : /* istanbul ignore next */ []);
|
|
131
|
+
hostStyle = computed(() => ({
|
|
132
|
+
...toStyleObject(this.dt(), "--tx-rating"),
|
|
133
|
+
...this.passThrough().root?.style
|
|
134
|
+
}), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
135
|
+
fill(index) {
|
|
136
|
+
return Math.max(0, Math.min(1, this.shown() - index)) * 100;
|
|
137
|
+
}
|
|
138
|
+
onPointerMove(event) {
|
|
139
|
+
const star = this.starAt(event);
|
|
140
|
+
if (this.isEditable() && star) this.preview.set(this.valueAt(event, star));
|
|
141
|
+
}
|
|
142
|
+
onPointerLeave() {
|
|
143
|
+
this.preview.set(null);
|
|
144
|
+
}
|
|
145
|
+
onClick(event) {
|
|
146
|
+
const star = this.starAt(event);
|
|
147
|
+
if (this.isEditable() && star) {
|
|
148
|
+
this.commit(this.valueAt(event, star), event);
|
|
149
|
+
this.preview.set(null);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
onKeydown(event) {
|
|
153
|
+
if (!this.isEditable()) return;
|
|
154
|
+
const current = this.value() ?? 0;
|
|
155
|
+
const step = this.unit();
|
|
156
|
+
const keys = {
|
|
157
|
+
ArrowRight: current + step,
|
|
158
|
+
ArrowUp: current + step,
|
|
159
|
+
ArrowLeft: current - step,
|
|
160
|
+
ArrowDown: current - step,
|
|
161
|
+
Home: step,
|
|
162
|
+
End: this.stars(),
|
|
163
|
+
PageUp: current + 1,
|
|
164
|
+
PageDown: current - 1,
|
|
165
|
+
Delete: null,
|
|
166
|
+
Backspace: null,
|
|
167
|
+
0: null
|
|
168
|
+
};
|
|
169
|
+
if (/^[1-9]$/.test(event.key) && Number(event.key) <= this.stars()) {
|
|
170
|
+
event.preventDefault();
|
|
171
|
+
this.commit(Number(event.key), event);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
if (!(event.key in keys)) return;
|
|
175
|
+
event.preventDefault();
|
|
176
|
+
const next = keys[event.key];
|
|
177
|
+
this.commit(next === null || next <= 0 ? null : Math.min(this.stars(), next), event);
|
|
178
|
+
}
|
|
179
|
+
onBlur() {
|
|
180
|
+
this.markTouched();
|
|
181
|
+
}
|
|
182
|
+
clear(event) {
|
|
183
|
+
this.commit(null, event);
|
|
184
|
+
this.cleared.emit();
|
|
185
|
+
}
|
|
186
|
+
starAt(event) {
|
|
187
|
+
return event.target.closest(".tx-rating__star");
|
|
188
|
+
}
|
|
189
|
+
valueAt(event, star) {
|
|
190
|
+
const index = Number(star.dataset["index"]);
|
|
191
|
+
if (!this.allowHalf()) return index + 1;
|
|
192
|
+
const rect = star.getBoundingClientRect();
|
|
193
|
+
return index + (rect.width > 0 && event.clientX - rect.left < rect.width / 2 ? .5 : 1);
|
|
194
|
+
}
|
|
195
|
+
commit(value, event) {
|
|
196
|
+
if (value !== this.value()) {
|
|
197
|
+
this.updateValue(value);
|
|
198
|
+
this.rated.emit({
|
|
199
|
+
value,
|
|
200
|
+
originalEvent: event
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
205
|
+
minVersion: "12.0.0",
|
|
206
|
+
version: "22.2.3",
|
|
207
|
+
ngImport: i0,
|
|
208
|
+
type: TxRating,
|
|
209
|
+
deps: null,
|
|
210
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
211
|
+
});
|
|
212
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
213
|
+
minVersion: "17.0.0",
|
|
214
|
+
version: "22.2.3",
|
|
215
|
+
type: TxRating,
|
|
216
|
+
isStandalone: true,
|
|
217
|
+
selector: "tx-rating",
|
|
218
|
+
inputs: {
|
|
219
|
+
stars: {
|
|
220
|
+
classPropertyName: "stars",
|
|
221
|
+
publicName: "stars",
|
|
222
|
+
isSignal: true,
|
|
223
|
+
isRequired: false,
|
|
224
|
+
transformFunction: null
|
|
225
|
+
},
|
|
226
|
+
allowHalf: {
|
|
227
|
+
classPropertyName: "allowHalf",
|
|
228
|
+
publicName: "allowHalf",
|
|
229
|
+
isSignal: true,
|
|
230
|
+
isRequired: false,
|
|
231
|
+
transformFunction: null
|
|
232
|
+
},
|
|
233
|
+
onIcon: {
|
|
234
|
+
classPropertyName: "onIcon",
|
|
235
|
+
publicName: "onIcon",
|
|
236
|
+
isSignal: true,
|
|
237
|
+
isRequired: false,
|
|
238
|
+
transformFunction: null
|
|
239
|
+
},
|
|
240
|
+
offIcon: {
|
|
241
|
+
classPropertyName: "offIcon",
|
|
242
|
+
publicName: "offIcon",
|
|
243
|
+
isSignal: true,
|
|
244
|
+
isRequired: false,
|
|
245
|
+
transformFunction: null
|
|
246
|
+
},
|
|
247
|
+
clearable: {
|
|
248
|
+
classPropertyName: "clearable",
|
|
249
|
+
publicName: "clearable",
|
|
250
|
+
isSignal: true,
|
|
251
|
+
isRequired: false,
|
|
252
|
+
transformFunction: null
|
|
253
|
+
},
|
|
254
|
+
clearLabel: {
|
|
255
|
+
classPropertyName: "clearLabel",
|
|
256
|
+
publicName: "clearLabel",
|
|
257
|
+
isSignal: true,
|
|
258
|
+
isRequired: false,
|
|
259
|
+
transformFunction: null
|
|
260
|
+
},
|
|
261
|
+
size: {
|
|
262
|
+
classPropertyName: "size",
|
|
263
|
+
publicName: "size",
|
|
264
|
+
isSignal: true,
|
|
265
|
+
isRequired: false,
|
|
266
|
+
transformFunction: null
|
|
267
|
+
},
|
|
268
|
+
invalid: {
|
|
269
|
+
classPropertyName: "invalid",
|
|
270
|
+
publicName: "invalid",
|
|
271
|
+
isSignal: true,
|
|
272
|
+
isRequired: false,
|
|
273
|
+
transformFunction: null
|
|
274
|
+
},
|
|
275
|
+
disabledInput: {
|
|
276
|
+
classPropertyName: "disabledInput",
|
|
277
|
+
publicName: "disabled",
|
|
278
|
+
isSignal: true,
|
|
279
|
+
isRequired: false,
|
|
280
|
+
transformFunction: null
|
|
281
|
+
},
|
|
282
|
+
readonly: {
|
|
283
|
+
classPropertyName: "readonly",
|
|
284
|
+
publicName: "readonly",
|
|
285
|
+
isSignal: true,
|
|
286
|
+
isRequired: false,
|
|
287
|
+
transformFunction: null
|
|
288
|
+
},
|
|
289
|
+
ariaLabel: {
|
|
290
|
+
classPropertyName: "ariaLabel",
|
|
291
|
+
publicName: "ariaLabel",
|
|
292
|
+
isSignal: true,
|
|
293
|
+
isRequired: false,
|
|
294
|
+
transformFunction: null
|
|
295
|
+
},
|
|
296
|
+
ariaLabelledBy: {
|
|
297
|
+
classPropertyName: "ariaLabelledBy",
|
|
298
|
+
publicName: "ariaLabelledBy",
|
|
299
|
+
isSignal: true,
|
|
300
|
+
isRequired: false,
|
|
301
|
+
transformFunction: null
|
|
302
|
+
},
|
|
303
|
+
tabindex: {
|
|
304
|
+
classPropertyName: "tabindex",
|
|
305
|
+
publicName: "tabindex",
|
|
306
|
+
isSignal: true,
|
|
307
|
+
isRequired: false,
|
|
308
|
+
transformFunction: null
|
|
309
|
+
},
|
|
310
|
+
dt: {
|
|
311
|
+
classPropertyName: "dt",
|
|
312
|
+
publicName: "dt",
|
|
313
|
+
isSignal: true,
|
|
314
|
+
isRequired: false,
|
|
315
|
+
transformFunction: null
|
|
316
|
+
},
|
|
317
|
+
pt: {
|
|
318
|
+
classPropertyName: "pt",
|
|
319
|
+
publicName: "pt",
|
|
320
|
+
isSignal: true,
|
|
321
|
+
isRequired: false,
|
|
322
|
+
transformFunction: null
|
|
323
|
+
},
|
|
324
|
+
ptOptions: {
|
|
325
|
+
classPropertyName: "ptOptions",
|
|
326
|
+
publicName: "ptOptions",
|
|
327
|
+
isSignal: true,
|
|
328
|
+
isRequired: false,
|
|
329
|
+
transformFunction: null
|
|
330
|
+
},
|
|
331
|
+
unstyled: {
|
|
332
|
+
classPropertyName: "unstyled",
|
|
333
|
+
publicName: "unstyled",
|
|
334
|
+
isSignal: true,
|
|
335
|
+
isRequired: false,
|
|
336
|
+
transformFunction: null
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
outputs: {
|
|
340
|
+
rated: "rated",
|
|
341
|
+
cleared: "cleared"
|
|
342
|
+
},
|
|
343
|
+
host: {
|
|
344
|
+
properties: {
|
|
345
|
+
"class": "passThrough().root?.class",
|
|
346
|
+
"style": "hostStyle()",
|
|
347
|
+
"attr.data-styled": "!isUnstyled() || null",
|
|
348
|
+
"attr.data-size": "size()",
|
|
349
|
+
"class.tx-rating--readonly": "readonly()",
|
|
350
|
+
"class.tx-rating--disabled": "isDisabled()",
|
|
351
|
+
"class.tx-rating--invalid": "isInvalid()",
|
|
352
|
+
"class.tx-rating--preview": "preview() !== null"
|
|
353
|
+
},
|
|
354
|
+
classAttribute: "tx-rating"
|
|
355
|
+
},
|
|
356
|
+
providers: [{
|
|
357
|
+
provide: NG_VALUE_ACCESSOR,
|
|
358
|
+
useExisting: forwardRef(() => TxRating),
|
|
359
|
+
multi: true
|
|
360
|
+
}],
|
|
361
|
+
queries: [{
|
|
362
|
+
propertyName: "onTemplate",
|
|
363
|
+
first: true,
|
|
364
|
+
predicate: TxRatingOnIconTemplate,
|
|
365
|
+
descendants: true,
|
|
366
|
+
isSignal: true
|
|
367
|
+
}, {
|
|
368
|
+
propertyName: "offTemplate",
|
|
369
|
+
first: true,
|
|
370
|
+
predicate: TxRatingOffIconTemplate,
|
|
371
|
+
descendants: true,
|
|
372
|
+
isSignal: true
|
|
373
|
+
}],
|
|
374
|
+
usesInheritance: true,
|
|
375
|
+
ngImport: i0,
|
|
376
|
+
template: "<span\n class=\"tx-rating__stars\"\n role=\"slider\"\n [class]=\"passThrough().stars?.class\"\n [style]=\"passThrough().stars?.style\"\n [attr.tabindex]=\"isDisabled() ? -1 : (tabindex() ?? 0)\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"stars()\"\n [attr.aria-valuenow]=\"value() ?? 0\"\n [attr.aria-valuetext]=\"valueText()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n (click)=\"onClick($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerleave)=\"onPointerLeave()\"\n>\n @for (index of indexes(); track index) {\n <span\n class=\"tx-rating__star\"\n [class.tx-rating__star--active]=\"fill(index) > 0\"\n [class]=\"passThrough().star?.class\"\n [style]=\"passThrough().star?.style\"\n [attr.data-index]=\"index\"\n >\n <span class=\"tx-rating__off\" aria-hidden=\"true\">\n @if (offTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: index }\" />\n } @else if (offIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"offIcon()\"></span>\n }\n </span>\n <span class=\"tx-rating__on\" aria-hidden=\"true\" [style.width.%]=\"fill(index)\">\n @if (onTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: index }\" />\n } @else if (onIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"onIcon()\"></span>\n }\n </span>\n </span>\n }\n</span>\n@if (clearable() && isEditable() && value()) {\n <button\n type=\"button\"\n class=\"tx-rating__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"clearLabel() ? null : translations().clear\"\n (click)=\"clear($event)\"\n >\n <tx-icon [name]=\"'times'\" />\n @if (clearLabel()) {\n <span>{{ clearLabel() }}</span>\n }\n </button>\n}\n",
|
|
377
|
+
styles: [":host{display:inline-flex;align-items:center;vertical-align:middle}.tx-rating__stars{display:inline-flex;align-items:center;line-height:0}.tx-rating__star{position:relative;display:block;flex-shrink:0;width:1em;height:1em}.tx-rating__off,.tx-rating__on{position:absolute;top:0;left:0;display:flex;align-items:center;height:1em;overflow:hidden;line-height:1}.tx-rating__off{width:1em}.tx-rating__off>*,.tx-rating__on>*{flex-shrink:0;width:1em;height:1em}:host([data-styled]){--_size: var(--tx-rating-icon-size);--_gap: var(--tx-rating-gap);gap:var(--tx-rating-clear-gap)}:host([data-styled][data-size=small]){--_size: var(--tx-rating-sm-icon-size);--_gap: var(--tx-rating-sm-gap)}:host([data-styled][data-size=large]){--_size: var(--tx-rating-lg-icon-size);--_gap: var(--tx-rating-lg-gap)}:host([data-styled]) .tx-rating__stars{gap:var(--_gap);border-radius:var(--tx-rating-border-radius);outline:none;font-size:var(--_size)}:host([data-styled]) .tx-rating__stars:focus-visible{outline:var(--tx-rating-focus-ring-width) solid var(--tx-rating-focus-ring-color);outline-offset:var(--tx-rating-focus-ring-offset)}:host([data-styled]) .tx-rating__star{color:var(--tx-rating-color);cursor:pointer;transition:transform .25s cubic-bezier(.34,1.56,.64,1)}:host([data-styled]:not(.tx-rating--readonly):not(.tx-rating--disabled)) .tx-rating__star:hover{transform:scale(var(--tx-rating-hover-scale))}:host([data-styled]) .tx-rating__on{color:var(--tx-rating-active-color);transition:color var(--tx-rating-transition-duration)}:host([data-styled].tx-rating--preview) .tx-rating__on{color:var(--tx-rating-hover-color)}:host([data-styled].tx-rating--readonly) .tx-rating__star,:host([data-styled].tx-rating--disabled) .tx-rating__star{cursor:default}:host([data-styled].tx-rating--disabled) .tx-rating__stars{opacity:var(--tx-rating-disabled-opacity)}:host([data-styled].tx-rating--invalid) .tx-rating__star{color:var(--tx-form-field-invalid-border-color)}:host([data-styled]) .tx-rating__clear{display:inline-flex;align-items:center;gap:4px;padding:2px 6px;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-rating-clear-color);font:inherit;font-size:var(--tx-rating-clear-font-size);cursor:pointer;transition:color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-rating__clear:hover{color:var(--tx-rating-clear-hover-color)}:host([data-styled]) .tx-rating__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-rating__on,:host([data-styled]) .tx-rating__star{transition:none}:host([data-styled]:not(.tx-rating--readonly):not(.tx-rating--disabled)) .tx-rating__star:hover{transform:none}}\n"],
|
|
378
|
+
dependencies: [{
|
|
379
|
+
kind: "directive",
|
|
380
|
+
type: NgTemplateOutlet,
|
|
381
|
+
selector: "[ngTemplateOutlet]",
|
|
382
|
+
inputs: [
|
|
383
|
+
"ngTemplateOutletContext",
|
|
384
|
+
"ngTemplateOutlet",
|
|
385
|
+
"ngTemplateOutletInjector"
|
|
386
|
+
]
|
|
387
|
+
}, {
|
|
388
|
+
kind: "component",
|
|
389
|
+
type: TxIcon,
|
|
390
|
+
selector: "tx-icon",
|
|
391
|
+
inputs: ["name"]
|
|
392
|
+
}],
|
|
393
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
394
|
+
});
|
|
395
|
+
};
|
|
396
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
397
|
+
minVersion: "12.0.0",
|
|
398
|
+
version: "22.2.3",
|
|
399
|
+
ngImport: i0,
|
|
400
|
+
type: TxRating,
|
|
401
|
+
decorators: [{
|
|
402
|
+
type: Component,
|
|
403
|
+
args: [{
|
|
404
|
+
selector: "tx-rating",
|
|
405
|
+
imports: [NgTemplateOutlet, TxIcon],
|
|
406
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
407
|
+
providers: [{
|
|
408
|
+
provide: NG_VALUE_ACCESSOR,
|
|
409
|
+
useExisting: forwardRef(() => TxRating),
|
|
410
|
+
multi: true
|
|
411
|
+
}],
|
|
412
|
+
host: {
|
|
413
|
+
class: "tx-rating",
|
|
414
|
+
"[class]": "passThrough().root?.class",
|
|
415
|
+
"[style]": "hostStyle()",
|
|
416
|
+
"[attr.data-styled]": "!isUnstyled() || null",
|
|
417
|
+
"[attr.data-size]": "size()",
|
|
418
|
+
"[class.tx-rating--readonly]": "readonly()",
|
|
419
|
+
"[class.tx-rating--disabled]": "isDisabled()",
|
|
420
|
+
"[class.tx-rating--invalid]": "isInvalid()",
|
|
421
|
+
"[class.tx-rating--preview]": "preview() !== null"
|
|
422
|
+
},
|
|
423
|
+
template: "<span\n class=\"tx-rating__stars\"\n role=\"slider\"\n [class]=\"passThrough().stars?.class\"\n [style]=\"passThrough().stars?.style\"\n [attr.tabindex]=\"isDisabled() ? -1 : (tabindex() ?? 0)\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"stars()\"\n [attr.aria-valuenow]=\"value() ?? 0\"\n [attr.aria-valuetext]=\"valueText()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n (click)=\"onClick($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerleave)=\"onPointerLeave()\"\n>\n @for (index of indexes(); track index) {\n <span\n class=\"tx-rating__star\"\n [class.tx-rating__star--active]=\"fill(index) > 0\"\n [class]=\"passThrough().star?.class\"\n [style]=\"passThrough().star?.style\"\n [attr.data-index]=\"index\"\n >\n <span class=\"tx-rating__off\" aria-hidden=\"true\">\n @if (offTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: index }\" />\n } @else if (offIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"offIcon()\"></span>\n }\n </span>\n <span class=\"tx-rating__on\" aria-hidden=\"true\" [style.width.%]=\"fill(index)\">\n @if (onTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: index }\" />\n } @else if (onIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"onIcon()\"></span>\n }\n </span>\n </span>\n }\n</span>\n@if (clearable() && isEditable() && value()) {\n <button\n type=\"button\"\n class=\"tx-rating__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"clearLabel() ? null : translations().clear\"\n (click)=\"clear($event)\"\n >\n <tx-icon [name]=\"'times'\" />\n @if (clearLabel()) {\n <span>{{ clearLabel() }}</span>\n }\n </button>\n}\n",
|
|
424
|
+
styles: [":host{display:inline-flex;align-items:center;vertical-align:middle}.tx-rating__stars{display:inline-flex;align-items:center;line-height:0}.tx-rating__star{position:relative;display:block;flex-shrink:0;width:1em;height:1em}.tx-rating__off,.tx-rating__on{position:absolute;top:0;left:0;display:flex;align-items:center;height:1em;overflow:hidden;line-height:1}.tx-rating__off{width:1em}.tx-rating__off>*,.tx-rating__on>*{flex-shrink:0;width:1em;height:1em}:host([data-styled]){--_size: var(--tx-rating-icon-size);--_gap: var(--tx-rating-gap);gap:var(--tx-rating-clear-gap)}:host([data-styled][data-size=small]){--_size: var(--tx-rating-sm-icon-size);--_gap: var(--tx-rating-sm-gap)}:host([data-styled][data-size=large]){--_size: var(--tx-rating-lg-icon-size);--_gap: var(--tx-rating-lg-gap)}:host([data-styled]) .tx-rating__stars{gap:var(--_gap);border-radius:var(--tx-rating-border-radius);outline:none;font-size:var(--_size)}:host([data-styled]) .tx-rating__stars:focus-visible{outline:var(--tx-rating-focus-ring-width) solid var(--tx-rating-focus-ring-color);outline-offset:var(--tx-rating-focus-ring-offset)}:host([data-styled]) .tx-rating__star{color:var(--tx-rating-color);cursor:pointer;transition:transform .25s cubic-bezier(.34,1.56,.64,1)}:host([data-styled]:not(.tx-rating--readonly):not(.tx-rating--disabled)) .tx-rating__star:hover{transform:scale(var(--tx-rating-hover-scale))}:host([data-styled]) .tx-rating__on{color:var(--tx-rating-active-color);transition:color var(--tx-rating-transition-duration)}:host([data-styled].tx-rating--preview) .tx-rating__on{color:var(--tx-rating-hover-color)}:host([data-styled].tx-rating--readonly) .tx-rating__star,:host([data-styled].tx-rating--disabled) .tx-rating__star{cursor:default}:host([data-styled].tx-rating--disabled) .tx-rating__stars{opacity:var(--tx-rating-disabled-opacity)}:host([data-styled].tx-rating--invalid) .tx-rating__star{color:var(--tx-form-field-invalid-border-color)}:host([data-styled]) .tx-rating__clear{display:inline-flex;align-items:center;gap:4px;padding:2px 6px;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-rating-clear-color);font:inherit;font-size:var(--tx-rating-clear-font-size);cursor:pointer;transition:color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-rating__clear:hover{color:var(--tx-rating-clear-hover-color)}:host([data-styled]) .tx-rating__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-rating__on,:host([data-styled]) .tx-rating__star{transition:none}:host([data-styled]:not(.tx-rating--readonly):not(.tx-rating--disabled)) .tx-rating__star:hover{transform:none}}\n"]
|
|
425
|
+
}]
|
|
426
|
+
}],
|
|
427
|
+
propDecorators: {
|
|
428
|
+
stars: [{
|
|
429
|
+
type: i0.Input,
|
|
430
|
+
args: [{
|
|
431
|
+
isSignal: true,
|
|
432
|
+
alias: "stars",
|
|
433
|
+
required: false
|
|
434
|
+
}]
|
|
435
|
+
}],
|
|
436
|
+
allowHalf: [{
|
|
437
|
+
type: i0.Input,
|
|
438
|
+
args: [{
|
|
439
|
+
isSignal: true,
|
|
440
|
+
alias: "allowHalf",
|
|
441
|
+
required: false
|
|
442
|
+
}]
|
|
443
|
+
}],
|
|
444
|
+
onIcon: [{
|
|
445
|
+
type: i0.Input,
|
|
446
|
+
args: [{
|
|
447
|
+
isSignal: true,
|
|
448
|
+
alias: "onIcon",
|
|
449
|
+
required: false
|
|
450
|
+
}]
|
|
451
|
+
}],
|
|
452
|
+
offIcon: [{
|
|
453
|
+
type: i0.Input,
|
|
454
|
+
args: [{
|
|
455
|
+
isSignal: true,
|
|
456
|
+
alias: "offIcon",
|
|
457
|
+
required: false
|
|
458
|
+
}]
|
|
459
|
+
}],
|
|
460
|
+
clearable: [{
|
|
461
|
+
type: i0.Input,
|
|
462
|
+
args: [{
|
|
463
|
+
isSignal: true,
|
|
464
|
+
alias: "clearable",
|
|
465
|
+
required: false
|
|
466
|
+
}]
|
|
467
|
+
}],
|
|
468
|
+
clearLabel: [{
|
|
469
|
+
type: i0.Input,
|
|
470
|
+
args: [{
|
|
471
|
+
isSignal: true,
|
|
472
|
+
alias: "clearLabel",
|
|
473
|
+
required: false
|
|
474
|
+
}]
|
|
475
|
+
}],
|
|
476
|
+
size: [{
|
|
477
|
+
type: i0.Input,
|
|
478
|
+
args: [{
|
|
479
|
+
isSignal: true,
|
|
480
|
+
alias: "size",
|
|
481
|
+
required: false
|
|
482
|
+
}]
|
|
483
|
+
}],
|
|
484
|
+
invalid: [{
|
|
485
|
+
type: i0.Input,
|
|
486
|
+
args: [{
|
|
487
|
+
isSignal: true,
|
|
488
|
+
alias: "invalid",
|
|
489
|
+
required: false
|
|
490
|
+
}]
|
|
491
|
+
}],
|
|
492
|
+
disabledInput: [{
|
|
493
|
+
type: i0.Input,
|
|
494
|
+
args: [{
|
|
495
|
+
isSignal: true,
|
|
496
|
+
alias: "disabled",
|
|
497
|
+
required: false
|
|
498
|
+
}]
|
|
499
|
+
}],
|
|
500
|
+
readonly: [{
|
|
501
|
+
type: i0.Input,
|
|
502
|
+
args: [{
|
|
503
|
+
isSignal: true,
|
|
504
|
+
alias: "readonly",
|
|
505
|
+
required: false
|
|
506
|
+
}]
|
|
507
|
+
}],
|
|
508
|
+
ariaLabel: [{
|
|
509
|
+
type: i0.Input,
|
|
510
|
+
args: [{
|
|
511
|
+
isSignal: true,
|
|
512
|
+
alias: "ariaLabel",
|
|
513
|
+
required: false
|
|
514
|
+
}]
|
|
515
|
+
}],
|
|
516
|
+
ariaLabelledBy: [{
|
|
517
|
+
type: i0.Input,
|
|
518
|
+
args: [{
|
|
519
|
+
isSignal: true,
|
|
520
|
+
alias: "ariaLabelledBy",
|
|
521
|
+
required: false
|
|
522
|
+
}]
|
|
523
|
+
}],
|
|
524
|
+
tabindex: [{
|
|
525
|
+
type: i0.Input,
|
|
526
|
+
args: [{
|
|
527
|
+
isSignal: true,
|
|
528
|
+
alias: "tabindex",
|
|
529
|
+
required: false
|
|
530
|
+
}]
|
|
531
|
+
}],
|
|
532
|
+
dt: [{
|
|
533
|
+
type: i0.Input,
|
|
534
|
+
args: [{
|
|
535
|
+
isSignal: true,
|
|
536
|
+
alias: "dt",
|
|
537
|
+
required: false
|
|
538
|
+
}]
|
|
539
|
+
}],
|
|
540
|
+
pt: [{
|
|
541
|
+
type: i0.Input,
|
|
542
|
+
args: [{
|
|
543
|
+
isSignal: true,
|
|
544
|
+
alias: "pt",
|
|
545
|
+
required: false
|
|
546
|
+
}]
|
|
547
|
+
}],
|
|
548
|
+
ptOptions: [{
|
|
549
|
+
type: i0.Input,
|
|
550
|
+
args: [{
|
|
551
|
+
isSignal: true,
|
|
552
|
+
alias: "ptOptions",
|
|
553
|
+
required: false
|
|
554
|
+
}]
|
|
555
|
+
}],
|
|
556
|
+
unstyled: [{
|
|
557
|
+
type: i0.Input,
|
|
558
|
+
args: [{
|
|
559
|
+
isSignal: true,
|
|
560
|
+
alias: "unstyled",
|
|
561
|
+
required: false
|
|
562
|
+
}]
|
|
563
|
+
}],
|
|
564
|
+
rated: [{
|
|
565
|
+
type: i0.Output,
|
|
566
|
+
args: ["rated"]
|
|
567
|
+
}],
|
|
568
|
+
cleared: [{
|
|
569
|
+
type: i0.Output,
|
|
570
|
+
args: ["cleared"]
|
|
571
|
+
}],
|
|
572
|
+
onTemplate: [{
|
|
573
|
+
type: i0.ContentChild,
|
|
574
|
+
args: [i0.forwardRef(() => TxRatingOnIconTemplate), { isSignal: true }]
|
|
575
|
+
}],
|
|
576
|
+
offTemplate: [{
|
|
577
|
+
type: i0.ContentChild,
|
|
578
|
+
args: [i0.forwardRef(() => TxRatingOffIconTemplate), { isSignal: true }]
|
|
579
|
+
}]
|
|
580
|
+
}
|
|
581
|
+
});
|
|
582
|
+
export { TxRating, TxRatingOffIconTemplate, TxRatingOnIconTemplate };
|
|
583
|
+
|
|
584
|
+
//# sourceMappingURL=tectra-ng-ui-rating.mjs.map
|