@tailng-ui/components 0.16.0 → 0.18.0
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/package.json +17 -6
- package/src/lib/feedback/empty/tng-empty.component.d.ts +16 -1
- package/src/lib/feedback/empty/tng-empty.component.d.ts.map +1 -1
- package/src/lib/feedback/empty/tng-empty.component.js +47 -57
- package/src/lib/feedback/empty/tng-empty.component.js.map +1 -1
- package/src/lib/feedback/index.d.ts +0 -5
- package/src/lib/feedback/index.d.ts.map +1 -1
- package/src/lib/feedback/index.js +4 -5
- package/src/lib/feedback/index.js.map +1 -1
- package/src/lib/feedback/progress-bar/tng-progress-bar.component.d.ts +4 -0
- package/src/lib/feedback/progress-bar/tng-progress-bar.component.d.ts.map +1 -1
- package/src/lib/feedback/progress-bar/tng-progress-bar.component.js +16 -26
- package/src/lib/feedback/progress-bar/tng-progress-bar.component.js.map +1 -1
- package/src/lib/feedback/progress-spinner/tng-progress-spinner.component.d.ts +4 -0
- package/src/lib/feedback/progress-spinner/tng-progress-spinner.component.d.ts.map +1 -1
- package/src/lib/feedback/progress-spinner/tng-progress-spinner.component.js +18 -32
- package/src/lib/feedback/progress-spinner/tng-progress-spinner.component.js.map +1 -1
- package/src/lib/feedback/skeleton/tng-skeleton.component.d.ts +4 -0
- package/src/lib/feedback/skeleton/tng-skeleton.component.d.ts.map +1 -1
- package/src/lib/feedback/skeleton/tng-skeleton.component.js +14 -20
- package/src/lib/feedback/skeleton/tng-skeleton.component.js.map +1 -1
- package/src/lib/feedback/toast/tng-toast.component.d.ts +4 -1
- package/src/lib/feedback/toast/tng-toast.component.d.ts.map +1 -1
- package/src/lib/feedback/toast/tng-toast.component.js +17 -19
- package/src/lib/feedback/toast/tng-toast.component.js.map +1 -1
- package/src/lib/form/autocomplete/tng-autocomplete.component.d.ts +4 -0
- package/src/lib/form/autocomplete/tng-autocomplete.component.d.ts.map +1 -1
- package/src/lib/form/autocomplete/tng-autocomplete.component.js +46 -49
- package/src/lib/form/autocomplete/tng-autocomplete.component.js.map +1 -1
- package/src/lib/form/button-toggle/tng-button-toggle-group.component.d.ts +3 -0
- package/src/lib/form/button-toggle/tng-button-toggle-group.component.d.ts.map +1 -1
- package/src/lib/form/button-toggle/tng-button-toggle-group.component.js +33 -58
- package/src/lib/form/button-toggle/tng-button-toggle-group.component.js.map +1 -1
- package/src/lib/form/button-toggle/tng-button-toggle.component.d.ts +3 -0
- package/src/lib/form/button-toggle/tng-button-toggle.component.d.ts.map +1 -1
- package/src/lib/form/button-toggle/tng-button-toggle.component.js +15 -26
- package/src/lib/form/button-toggle/tng-button-toggle.component.js.map +1 -1
- package/src/lib/form/checkbox/tng-checkbox.component.d.ts +3 -0
- package/src/lib/form/checkbox/tng-checkbox.component.d.ts.map +1 -1
- package/src/lib/form/checkbox/tng-checkbox.component.js +32 -42
- package/src/lib/form/checkbox/tng-checkbox.component.js.map +1 -1
- package/src/lib/form/chips/tng-chips.component.d.ts +3 -0
- package/src/lib/form/chips/tng-chips.component.d.ts.map +1 -1
- package/src/lib/form/chips/tng-chips.component.js +14 -19
- package/src/lib/form/chips/tng-chips.component.js.map +1 -1
- package/src/lib/form/combobox/tng-combobox.component.d.ts +3 -0
- package/src/lib/form/combobox/tng-combobox.component.d.ts.map +1 -1
- package/src/lib/form/combobox/tng-combobox.component.js +10 -13
- package/src/lib/form/combobox/tng-combobox.component.js.map +1 -1
- package/src/lib/form/datepicker/tng-datepicker.component.d.ts +4 -1
- package/src/lib/form/datepicker/tng-datepicker.component.d.ts.map +1 -1
- package/src/lib/form/datepicker/tng-datepicker.component.js +58 -98
- package/src/lib/form/datepicker/tng-datepicker.component.js.map +1 -1
- package/src/lib/form/form-field/tng-form-field.component.d.ts +3 -0
- package/src/lib/form/form-field/tng-form-field.component.d.ts.map +1 -1
- package/src/lib/form/form-field/tng-form-field.component.js +28 -33
- package/src/lib/form/form-field/tng-form-field.component.js.map +1 -1
- package/src/lib/form/index.d.ts +0 -20
- package/src/lib/form/index.d.ts.map +1 -1
- package/src/lib/form/index.js +4 -20
- package/src/lib/form/index.js.map +1 -1
- package/src/lib/form/input/tng-input.component.d.ts +9 -3
- package/src/lib/form/input/tng-input.component.d.ts.map +1 -1
- package/src/lib/form/input/tng-input.component.js +96 -81
- package/src/lib/form/input/tng-input.component.js.map +1 -1
- package/src/lib/form/input-otp/tng-input-otp.component.d.ts +3 -0
- package/src/lib/form/input-otp/tng-input-otp.component.d.ts.map +1 -1
- package/src/lib/form/input-otp/tng-input-otp.component.js +55 -69
- package/src/lib/form/input-otp/tng-input-otp.component.js.map +1 -1
- package/src/lib/form/label/tng-label.component.d.ts +3 -0
- package/src/lib/form/label/tng-label.component.d.ts.map +1 -1
- package/src/lib/form/label/tng-label.component.js +12 -19
- package/src/lib/form/label/tng-label.component.js.map +1 -1
- package/src/lib/form/multi-autocomplete/tng-multi-autocomplete.component.d.ts +4 -0
- package/src/lib/form/multi-autocomplete/tng-multi-autocomplete.component.d.ts.map +1 -1
- package/src/lib/form/multi-autocomplete/tng-multi-autocomplete.component.js +40 -43
- package/src/lib/form/multi-autocomplete/tng-multi-autocomplete.component.js.map +1 -1
- package/src/lib/form/multiselect/tng-multiselect.component.d.ts +4 -0
- package/src/lib/form/multiselect/tng-multiselect.component.d.ts.map +1 -1
- package/src/lib/form/multiselect/tng-multiselect.component.js +49 -52
- package/src/lib/form/multiselect/tng-multiselect.component.js.map +1 -1
- package/src/lib/form/radio/tng-radio.component.d.ts +3 -0
- package/src/lib/form/radio/tng-radio.component.d.ts.map +1 -1
- package/src/lib/form/radio/tng-radio.component.js +18 -33
- package/src/lib/form/radio/tng-radio.component.js.map +1 -1
- package/src/lib/form/select/tng-select.component.d.ts +4 -0
- package/src/lib/form/select/tng-select.component.d.ts.map +1 -1
- package/src/lib/form/select/tng-select.component.js +52 -53
- package/src/lib/form/select/tng-select.component.js.map +1 -1
- package/src/lib/form/select/tng-select.slots.d.ts +5 -0
- package/src/lib/form/select/tng-select.slots.d.ts.map +1 -1
- package/src/lib/form/select/tng-select.slots.js +21 -17
- package/src/lib/form/select/tng-select.slots.js.map +1 -1
- package/src/lib/form/slider/tng-slider.component.d.ts +3 -0
- package/src/lib/form/slider/tng-slider.component.d.ts.map +1 -1
- package/src/lib/form/slider/tng-slider.component.js +14 -27
- package/src/lib/form/slider/tng-slider.component.js.map +1 -1
- package/src/lib/form/switch/tng-switch.component.d.ts +3 -0
- package/src/lib/form/switch/tng-switch.component.d.ts.map +1 -1
- package/src/lib/form/switch/tng-switch.component.js +15 -24
- package/src/lib/form/switch/tng-switch.component.js.map +1 -1
- package/src/lib/form/textarea/tng-textarea.component.d.ts +3 -0
- package/src/lib/form/textarea/tng-textarea.component.d.ts.map +1 -1
- package/src/lib/form/textarea/tng-textarea.component.js +19 -36
- package/src/lib/form/textarea/tng-textarea.component.js.map +1 -1
- package/src/lib/form/toggle/tng-toggle.component.d.ts +3 -0
- package/src/lib/form/toggle/tng-toggle.component.d.ts.map +1 -1
- package/src/lib/form/toggle/tng-toggle.component.js +41 -41
- package/src/lib/form/toggle/tng-toggle.component.js.map +1 -1
- package/src/lib/form/toggle-group/tng-toggle-group.component.d.ts +4 -0
- package/src/lib/form/toggle-group/tng-toggle-group.component.d.ts.map +1 -1
- package/src/lib/form/toggle-group/tng-toggle-group.component.js +28 -31
- package/src/lib/form/toggle-group/tng-toggle-group.component.js.map +1 -1
- package/src/lib/layout/accordion/tng-accordion.component.d.ts +10 -0
- package/src/lib/layout/accordion/tng-accordion.component.d.ts.map +1 -1
- package/src/lib/layout/accordion/tng-accordion.component.js +49 -148
- package/src/lib/layout/accordion/tng-accordion.component.js.map +1 -1
- package/src/lib/layout/bottom-sheet/tng-bottom-sheet.component.d.ts +3 -0
- package/src/lib/layout/bottom-sheet/tng-bottom-sheet.component.d.ts.map +1 -1
- package/src/lib/layout/bottom-sheet/tng-bottom-sheet.component.js +10 -13
- package/src/lib/layout/bottom-sheet/tng-bottom-sheet.component.js.map +1 -1
- package/src/lib/layout/card/tng-card.component.d.ts +21 -0
- package/src/lib/layout/card/tng-card.component.d.ts.map +1 -1
- package/src/lib/layout/card/tng-card.component.js +92 -136
- package/src/lib/layout/card/tng-card.component.js.map +1 -1
- package/src/lib/layout/collapsible/tng-collapsible.component.d.ts +3 -0
- package/src/lib/layout/collapsible/tng-collapsible.component.d.ts.map +1 -1
- package/src/lib/layout/collapsible/tng-collapsible.component.js +17 -24
- package/src/lib/layout/collapsible/tng-collapsible.component.js.map +1 -1
- package/src/lib/layout/drawer/tng-drawer.component.d.ts +4 -0
- package/src/lib/layout/drawer/tng-drawer.component.d.ts.map +1 -1
- package/src/lib/layout/drawer/tng-drawer.component.js +48 -51
- package/src/lib/layout/drawer/tng-drawer.component.js.map +1 -1
- package/src/lib/layout/grid/tng-grid.component.d.ts +8 -0
- package/src/lib/layout/grid/tng-grid.component.d.ts.map +1 -1
- package/src/lib/layout/grid/tng-grid.component.js +48 -110
- package/src/lib/layout/grid/tng-grid.component.js.map +1 -1
- package/src/lib/layout/index.d.ts +1 -8
- package/src/lib/layout/index.d.ts.map +1 -1
- package/src/lib/layout/index.js +5 -8
- package/src/lib/layout/index.js.map +1 -1
- package/src/lib/layout/separator/tng-separator.component.d.ts +3 -0
- package/src/lib/layout/separator/tng-separator.component.d.ts.map +1 -1
- package/src/lib/layout/separator/tng-separator.component.js +11 -16
- package/src/lib/layout/separator/tng-separator.component.js.map +1 -1
- package/src/lib/layout/stepper/tng-stepper.component.d.ts +3 -0
- package/src/lib/layout/stepper/tng-stepper.component.d.ts.map +1 -1
- package/src/lib/layout/stepper/tng-stepper.component.js +10 -13
- package/src/lib/layout/stepper/tng-stepper.component.js.map +1 -1
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-item.component.d.ts +4 -0
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-item.component.d.ts.map +1 -1
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-item.component.js +47 -49
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-item.component.js.map +1 -1
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-link.component.d.ts +4 -0
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-link.component.d.ts.map +1 -1
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-link.component.js +16 -18
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-link.component.js.map +1 -1
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-list.component.d.ts +4 -0
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-list.component.d.ts.map +1 -1
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-list.component.js +10 -12
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-list.component.js.map +1 -1
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-separator-template.directive.d.ts +3 -0
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-separator-template.directive.d.ts.map +1 -1
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-separator-template.directive.js +12 -10
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-separator-template.directive.js.map +1 -1
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-separator.component.d.ts +4 -0
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-separator.component.d.ts.map +1 -1
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-separator.component.js +12 -14
- package/src/lib/navigation/breadcrumb/tng-breadcrumb-separator.component.js.map +1 -1
- package/src/lib/navigation/breadcrumb/tng-breadcrumb.component.d.ts +4 -0
- package/src/lib/navigation/breadcrumb/tng-breadcrumb.component.d.ts.map +1 -1
- package/src/lib/navigation/breadcrumb/tng-breadcrumb.component.js +23 -25
- package/src/lib/navigation/breadcrumb/tng-breadcrumb.component.js.map +1 -1
- package/src/lib/navigation/context-menu/tng-context-menu.component.d.ts +5 -0
- package/src/lib/navigation/context-menu/tng-context-menu.component.d.ts.map +1 -1
- package/src/lib/navigation/context-menu/tng-context-menu.component.js +24 -26
- package/src/lib/navigation/context-menu/tng-context-menu.component.js.map +1 -1
- package/src/lib/navigation/dropdown-menu/tng-dropdown-menu.component.d.ts +4 -0
- package/src/lib/navigation/dropdown-menu/tng-dropdown-menu.component.d.ts.map +1 -1
- package/src/lib/navigation/dropdown-menu/tng-dropdown-menu.component.js +19 -23
- package/src/lib/navigation/dropdown-menu/tng-dropdown-menu.component.js.map +1 -1
- package/src/lib/navigation/index.d.ts +0 -12
- package/src/lib/navigation/index.d.ts.map +1 -1
- package/src/lib/navigation/index.js +4 -12
- package/src/lib/navigation/index.js.map +1 -1
- package/src/lib/navigation/menu/tng-menu-trigger-for.directive.d.ts +3 -0
- package/src/lib/navigation/menu/tng-menu-trigger-for.directive.d.ts.map +1 -1
- package/src/lib/navigation/menu/tng-menu-trigger-for.directive.js +22 -20
- package/src/lib/navigation/menu/tng-menu-trigger-for.directive.js.map +1 -1
- package/src/lib/navigation/menu/tng-menu.component.d.ts +5 -0
- package/src/lib/navigation/menu/tng-menu.component.d.ts.map +1 -1
- package/src/lib/navigation/menu/tng-menu.component.js +21 -23
- package/src/lib/navigation/menu/tng-menu.component.js.map +1 -1
- package/src/lib/navigation/menubar/tng-menubar.component.d.ts +5 -0
- package/src/lib/navigation/menubar/tng-menubar.component.d.ts.map +1 -1
- package/src/lib/navigation/menubar/tng-menubar.component.js +20 -22
- package/src/lib/navigation/menubar/tng-menubar.component.js.map +1 -1
- package/src/lib/navigation/navigation-menu/tng-navigation-menu.component.d.ts +4 -0
- package/src/lib/navigation/navigation-menu/tng-navigation-menu.component.d.ts.map +1 -1
- package/src/lib/navigation/navigation-menu/tng-navigation-menu.component.js +11 -13
- package/src/lib/navigation/navigation-menu/tng-navigation-menu.component.js.map +1 -1
- package/src/lib/navigation/tabs/tng-tabs.component.d.ts +5 -0
- package/src/lib/navigation/tabs/tng-tabs.component.d.ts.map +1 -1
- package/src/lib/navigation/tabs/tng-tabs.component.js +32 -34
- package/src/lib/navigation/tabs/tng-tabs.component.js.map +1 -1
- package/src/lib/navigation/toolbar/tng-toolbar.component.d.ts +4 -0
- package/src/lib/navigation/toolbar/tng-toolbar.component.d.ts.map +1 -1
- package/src/lib/navigation/toolbar/tng-toolbar.component.js +11 -13
- package/src/lib/navigation/toolbar/tng-toolbar.component.js.map +1 -1
- package/src/lib/overlay/dialog/tng-dialog.component.d.ts +4 -0
- package/src/lib/overlay/dialog/tng-dialog.component.d.ts.map +1 -1
- package/src/lib/overlay/dialog/tng-dialog.component.js +18 -25
- package/src/lib/overlay/dialog/tng-dialog.component.js.map +1 -1
- package/src/lib/overlay/index.d.ts +0 -3
- package/src/lib/overlay/index.d.ts.map +1 -1
- package/src/lib/overlay/index.js +4 -3
- package/src/lib/overlay/index.js.map +1 -1
- package/src/lib/overlay/popover/tng-popover.component.d.ts +4 -0
- package/src/lib/overlay/popover/tng-popover.component.d.ts.map +1 -1
- package/src/lib/overlay/popover/tng-popover.component.js +23 -37
- package/src/lib/overlay/popover/tng-popover.component.js.map +1 -1
- package/src/lib/overlay/tooltip/tng-tooltip.component.d.ts +4 -0
- package/src/lib/overlay/tooltip/tng-tooltip.component.d.ts.map +1 -1
- package/src/lib/overlay/tooltip/tng-tooltip.component.js +17 -21
- package/src/lib/overlay/tooltip/tng-tooltip.component.js.map +1 -1
- package/src/lib/utility/avatar/tng-avatar.component.d.ts +4 -1
- package/src/lib/utility/avatar/tng-avatar.component.d.ts.map +1 -1
- package/src/lib/utility/avatar/tng-avatar.component.js +20 -22
- package/src/lib/utility/avatar/tng-avatar.component.js.map +1 -1
- package/src/lib/utility/badge/tng-badge.component.d.ts +4 -0
- package/src/lib/utility/badge/tng-badge.component.d.ts.map +1 -1
- package/src/lib/utility/badge/tng-badge.component.js +13 -10
- package/src/lib/utility/badge/tng-badge.component.js.map +1 -1
- package/src/lib/utility/button/tng-button.component.d.ts +4 -1
- package/src/lib/utility/button/tng-button.component.d.ts.map +1 -1
- package/src/lib/utility/button/tng-button.component.js +19 -29
- package/src/lib/utility/button/tng-button.component.js.map +1 -1
- package/src/lib/utility/code-block/tng-code-block.component.d.ts +4 -0
- package/src/lib/utility/code-block/tng-code-block.component.d.ts.map +1 -1
- package/src/lib/utility/code-block/tng-code-block.component.js +73 -103
- package/src/lib/utility/code-block/tng-code-block.component.js.map +1 -1
- package/src/lib/utility/copy-button/tng-copy-button.component.d.ts +4 -1
- package/src/lib/utility/copy-button/tng-copy-button.component.d.ts.map +1 -1
- package/src/lib/utility/copy-button/tng-copy-button.component.js +28 -36
- package/src/lib/utility/copy-button/tng-copy-button.component.js.map +1 -1
- package/src/lib/utility/index.d.ts +1 -9
- package/src/lib/utility/index.d.ts.map +1 -1
- package/src/lib/utility/index.js +5 -8
- package/src/lib/utility/index.js.map +1 -1
- package/src/lib/utility/tag/tng-tag.component.d.ts +4 -1
- package/src/lib/utility/tag/tng-tag.component.d.ts.map +1 -1
- package/src/lib/utility/tag/tng-tag.component.js +18 -24
- package/src/lib/utility/tag/tng-tag.component.js.map +1 -1
- package/src/lib/utility/tree/tng-tree.component.d.ts +4 -1
- package/src/lib/utility/tree/tng-tree.component.d.ts.map +1 -1
- package/src/lib/utility/tree/tng-tree.component.js +23 -25
- package/src/lib/utility/tree/tng-tree.component.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tng-popover.component.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/overlay/popover/tng-popover.component.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,UAAU,IAAI,mBAAmB,EAGjC,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC
|
|
1
|
+
{"version":3,"file":"tng-popover.component.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/overlay/popover/tng-popover.component.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,UAAU,IAAI,mBAAmB,EAGjC,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;;AAC/B,YAAY,EACV,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,GACf,MAAM,uBAAuB,CAAC;AAE/B,KAAK,oBAAoB,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;AAUhE,qBAMa,mBAAmB;IAC9B,SAAgB,SAAS,8CAA4B;IACrD,SAAgB,YAAY,8DAA2C;IACvE,SAAgB,SAAS,2DAAiD;IAC1E,SAAgB,KAAK,uDAAmC;IACxD,SAAgB,aAAa,8EAE1B;IACH,SAAgB,qBAAqB,8EAElC;IACH,SAAgB,WAAW,8EAExB;IACH,SAAgB,QAAQ,8EAErB;IACH,SAAgB,IAAI,8FAEjB;IACH,SAAgB,SAAS,2DAAwC;IACjE,SAAgB,YAAY,8EAEzB;IACH,SAAgB,IAAI,sDAAmC;IACvD,SAAgB,YAAY,8CAAmC;IAE/D,SAAgB,MAAM,kEAAmC;IACzD,SAAgB,UAAU,oDAAqB;IAE/C,SAAS,CAAC,QAAQ,CAAC,UAAU,sDAAyD;IAE/E,KAAK,IAAI,IAAI;yCAhCT,mBAAmB;2CAAnB,mBAAmB;CAmC/B;AACD,OAAO,EAAE,mBAAmB,IAAI,UAAU,EAAE,CAAC"}
|
|
@@ -1,52 +1,38 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
1
|
import { booleanAttribute, Component, input, output, viewChild, } from '@angular/core';
|
|
3
2
|
import { TngPopover as TngPopoverPrimitive, TngPopoverPanel, TngPopoverTrigger, } from '@tailng-ui/primitives';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
4
|
function normalizeOptionalBooleanInput(value) {
|
|
5
5
|
if (value === null || value === undefined) {
|
|
6
6
|
return undefined;
|
|
7
7
|
}
|
|
8
8
|
return booleanAttribute(value);
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
ariaLabel = input('Popover');
|
|
12
|
-
ariaHasPopup = input('dialog');
|
|
13
|
-
autoFocus = input('first-focusable');
|
|
14
|
-
align = input('start');
|
|
15
|
-
closeOnEscape = input(true, {
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
disabled = input(false, {
|
|
25
|
-
transform: booleanAttribute,
|
|
26
|
-
});
|
|
27
|
-
open = input(undefined, {
|
|
28
|
-
transform: normalizeOptionalBooleanInput,
|
|
29
|
-
});
|
|
30
|
-
panelRole = input('dialog');
|
|
31
|
-
restoreFocus = input(true, {
|
|
32
|
-
transform: booleanAttribute,
|
|
33
|
-
});
|
|
34
|
-
side = input('bottom');
|
|
35
|
-
triggerLabel = input('Toggle Popover');
|
|
10
|
+
export class TngPopoverComponent {
|
|
11
|
+
ariaLabel = input('Popover', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
12
|
+
ariaHasPopup = input('dialog', ...(ngDevMode ? [{ debugName: "ariaHasPopup" }] : []));
|
|
13
|
+
autoFocus = input('first-focusable', ...(ngDevMode ? [{ debugName: "autoFocus" }] : []));
|
|
14
|
+
align = input('start', ...(ngDevMode ? [{ debugName: "align" }] : []));
|
|
15
|
+
closeOnEscape = input(true, { ...(ngDevMode ? { debugName: "closeOnEscape" } : {}), transform: booleanAttribute });
|
|
16
|
+
closeOnOutsidePointer = input(true, { ...(ngDevMode ? { debugName: "closeOnOutsidePointer" } : {}), transform: booleanAttribute });
|
|
17
|
+
defaultOpen = input(false, { ...(ngDevMode ? { debugName: "defaultOpen" } : {}), transform: booleanAttribute });
|
|
18
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
19
|
+
open = input(undefined, { ...(ngDevMode ? { debugName: "open" } : {}), transform: normalizeOptionalBooleanInput });
|
|
20
|
+
panelRole = input('dialog', ...(ngDevMode ? [{ debugName: "panelRole" }] : []));
|
|
21
|
+
restoreFocus = input(true, { ...(ngDevMode ? { debugName: "restoreFocus" } : {}), transform: booleanAttribute });
|
|
22
|
+
side = input('bottom', ...(ngDevMode ? [{ debugName: "side" }] : []));
|
|
23
|
+
triggerLabel = input('Toggle Popover', ...(ngDevMode ? [{ debugName: "triggerLabel" }] : []));
|
|
36
24
|
closed = output();
|
|
37
25
|
openChange = output();
|
|
38
26
|
popoverRef = viewChild.required('popoverRef');
|
|
39
27
|
close() {
|
|
40
28
|
this.popoverRef().closePopover('programmatic');
|
|
41
29
|
}
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
], TngPopoverComponent);
|
|
51
|
-
export { TngPopoverComponent };
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TngPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.1", type: TngPopoverComponent, isStandalone: true, selector: "tng-popover", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaHasPopup: { classPropertyName: "ariaHasPopup", publicName: "ariaHasPopup", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, closeOnOutsidePointer: { classPropertyName: "closeOnOutsidePointer", publicName: "closeOnOutsidePointer", isSignal: true, isRequired: false, transformFunction: null }, defaultOpen: { classPropertyName: "defaultOpen", publicName: "defaultOpen", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, panelRole: { classPropertyName: "panelRole", publicName: "panelRole", isSignal: true, isRequired: false, transformFunction: null }, restoreFocus: { classPropertyName: "restoreFocus", publicName: "restoreFocus", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, triggerLabel: { classPropertyName: "triggerLabel", publicName: "triggerLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", openChange: "openChange" }, viewQueries: [{ propertyName: "popoverRef", first: true, predicate: ["popoverRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n tngPopover\n #popoverRef=\"tngPopover\"\n class=\"tng-popover-root\"\n [open]=\"open()\"\n [defaultOpen]=\"defaultOpen()\"\n [disabled]=\"disabled()\"\n [closeOnEscape]=\"closeOnEscape()\"\n [closeOnOutsidePointer]=\"closeOnOutsidePointer()\"\n [restoreFocus]=\"restoreFocus()\"\n [autoFocus]=\"autoFocus()\"\n [side]=\"side()\"\n [align]=\"align()\"\n [panelRole]=\"panelRole()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaHasPopup]=\"ariaHasPopup()\"\n (openChange)=\"openChange.emit($event)\"\n (closed)=\"closed.emit($event)\"\n>\n <button\n type=\"button\"\n class=\"tng-popover-trigger\"\n [tngPopoverTrigger]=\"popoverRef\"\n >\n {{ triggerLabel() }}\n </button>\n\n <section tngPopoverPanel class=\"tng-popover-panel\">\n <ng-content />\n </section>\n</div>\n", styles: [":host {\n display: inline-flex;\n}\n\n.tng-popover-root {\n display: inline-flex;\n position: relative;\n}\n\n.tng-popover-trigger {\n align-items: center;\n appearance: none;\n background: var(--tng-semantic-background-surface);\n border: 1px solid var(--tng-semantic-border-strong);\n border-radius: 0.6rem;\n color: var(--tng-semantic-foreground-primary);\n cursor: pointer;\n display: inline-flex;\n font-family: inherit;\n font-size: 0.86rem;\n font-weight: 600;\n gap: 0.4rem;\n min-height: 2.35rem;\n padding: 0 0.85rem;\n}\n\n.tng-popover-trigger:focus-visible {\n box-shadow: 0 0 0 3px var(--tng-semantic-focus-ring);\n outline: none;\n}\n\n.tng-popover-panel {\n background: var(--tng-semantic-background-surface);\n border: 1px solid var(--tng-semantic-border-strong);\n border-radius: 0.75rem;\n box-shadow: 0 18px 28px color-mix(in srgb, var(--tng-semantic-foreground-primary) 18%, transparent);\n color: var(--tng-semantic-foreground-primary);\n display: grid;\n gap: 0.75rem;\n left: 0;\n margin-top: 0.45rem;\n min-width: 14rem;\n padding: 0.85rem;\n position: absolute;\n top: 100%;\n z-index: 60;\n}\n\n.tng-popover-panel[hidden] {\n display: none !important;\n}\n\n.tng-popover-panel:focus-visible {\n box-shadow: 0 0 0 3px var(--tng-semantic-focus-ring);\n outline: none;\n}\n"], dependencies: [{ kind: "directive", type: TngPopoverPrimitive, selector: "[tngPopover]", inputs: ["open", "defaultOpen", "disabled", "closeOnEscape", "closeOnOutsidePointer", "restoreFocus", "autoFocus", "side", "align", "panelRole", "ariaHasPopup", "ariaLabel"], outputs: ["openChange", "closed"], exportAs: ["tngPopover"] }, { kind: "directive", type: TngPopoverTrigger, selector: "[tngPopoverTrigger]", inputs: ["tngPopoverTrigger"], exportAs: ["tngPopoverTrigger"] }, { kind: "directive", type: TngPopoverPanel, selector: "[tngPopoverPanel], [tngPopoverContent]", exportAs: ["tngPopoverPanel"] }] });
|
|
32
|
+
}
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TngPopoverComponent, decorators: [{
|
|
34
|
+
type: Component,
|
|
35
|
+
args: [{ selector: 'tng-popover', imports: [TngPopoverPrimitive, TngPopoverTrigger, TngPopoverPanel], template: "<div\n tngPopover\n #popoverRef=\"tngPopover\"\n class=\"tng-popover-root\"\n [open]=\"open()\"\n [defaultOpen]=\"defaultOpen()\"\n [disabled]=\"disabled()\"\n [closeOnEscape]=\"closeOnEscape()\"\n [closeOnOutsidePointer]=\"closeOnOutsidePointer()\"\n [restoreFocus]=\"restoreFocus()\"\n [autoFocus]=\"autoFocus()\"\n [side]=\"side()\"\n [align]=\"align()\"\n [panelRole]=\"panelRole()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaHasPopup]=\"ariaHasPopup()\"\n (openChange)=\"openChange.emit($event)\"\n (closed)=\"closed.emit($event)\"\n>\n <button\n type=\"button\"\n class=\"tng-popover-trigger\"\n [tngPopoverTrigger]=\"popoverRef\"\n >\n {{ triggerLabel() }}\n </button>\n\n <section tngPopoverPanel class=\"tng-popover-panel\">\n <ng-content />\n </section>\n</div>\n", styles: [":host {\n display: inline-flex;\n}\n\n.tng-popover-root {\n display: inline-flex;\n position: relative;\n}\n\n.tng-popover-trigger {\n align-items: center;\n appearance: none;\n background: var(--tng-semantic-background-surface);\n border: 1px solid var(--tng-semantic-border-strong);\n border-radius: 0.6rem;\n color: var(--tng-semantic-foreground-primary);\n cursor: pointer;\n display: inline-flex;\n font-family: inherit;\n font-size: 0.86rem;\n font-weight: 600;\n gap: 0.4rem;\n min-height: 2.35rem;\n padding: 0 0.85rem;\n}\n\n.tng-popover-trigger:focus-visible {\n box-shadow: 0 0 0 3px var(--tng-semantic-focus-ring);\n outline: none;\n}\n\n.tng-popover-panel {\n background: var(--tng-semantic-background-surface);\n border: 1px solid var(--tng-semantic-border-strong);\n border-radius: 0.75rem;\n box-shadow: 0 18px 28px color-mix(in srgb, var(--tng-semantic-foreground-primary) 18%, transparent);\n color: var(--tng-semantic-foreground-primary);\n display: grid;\n gap: 0.75rem;\n left: 0;\n margin-top: 0.45rem;\n min-width: 14rem;\n padding: 0.85rem;\n position: absolute;\n top: 100%;\n z-index: 60;\n}\n\n.tng-popover-panel[hidden] {\n display: none !important;\n}\n\n.tng-popover-panel:focus-visible {\n box-shadow: 0 0 0 3px var(--tng-semantic-focus-ring);\n outline: none;\n}\n"] }]
|
|
36
|
+
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaHasPopup: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaHasPopup", required: false }] }], autoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFocus", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closeOnOutsidePointer: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnOutsidePointer", required: false }] }], defaultOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultOpen", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], panelRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelRole", required: false }] }], restoreFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "restoreFocus", required: false }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], triggerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerLabel", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], openChange: [{ type: i0.Output, args: ["openChange"] }], popoverRef: [{ type: i0.ViewChild, args: ['popoverRef', { isSignal: true }] }] } });
|
|
37
|
+
export { TngPopoverComponent as TngPopover };
|
|
52
38
|
//# sourceMappingURL=tng-popover.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tng-popover.component.js","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/overlay/popover/tng-popover.component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tng-popover.component.js","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/overlay/popover/tng-popover.component.ts","../../../../../../../../libs/tailng-ui/components/src/lib/overlay/popover/tng-popover.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,MAAM,EACN,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,UAAU,IAAI,mBAAmB,EACjC,eAAe,EACf,iBAAiB,GAOlB,MAAM,uBAAuB,CAAC;;AAY/B,SAAS,6BAA6B,CAAC,KAA2B;IAChE,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QAC1C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC;AAQD,MAAM,OAAO,mBAAmB;IACd,SAAS,GAAG,KAAK,CAAS,SAAS,qDAAC,CAAC;IACrC,YAAY,GAAG,KAAK,CAAyB,QAAQ,wDAAC,CAAC;IACvD,SAAS,GAAG,KAAK,CAAsB,iBAAiB,qDAAC,CAAC;IAC1D,KAAK,GAAG,KAAK,CAAkB,OAAO,iDAAC,CAAC;IACxC,aAAa,GAAG,KAAK,CAA4B,IAAI,0DACnE,SAAS,EAAE,gBAAgB,GAC3B,CAAC;IACa,qBAAqB,GAAG,KAAK,CAA4B,IAAI,kEAC3E,SAAS,EAAE,gBAAgB,GAC3B,CAAC;IACa,WAAW,GAAG,KAAK,CAA4B,KAAK,wDAClE,SAAS,EAAE,gBAAgB,GAC3B,CAAC;IACa,QAAQ,GAAG,KAAK,CAA4B,KAAK,qDAC/D,SAAS,EAAE,gBAAgB,GAC3B,CAAC;IACa,IAAI,GAAG,KAAK,CAA4C,SAAS,iDAC/E,SAAS,EAAE,6BAA6B,GACxC,CAAC;IACa,SAAS,GAAG,KAAK,CAAsB,QAAQ,qDAAC,CAAC;IACjD,YAAY,GAAG,KAAK,CAA4B,IAAI,yDAClE,SAAS,EAAE,gBAAgB,GAC3B,CAAC;IACa,IAAI,GAAG,KAAK,CAAiB,QAAQ,gDAAC,CAAC;IACvC,YAAY,GAAG,KAAK,CAAS,gBAAgB,wDAAC,CAAC;IAE/C,MAAM,GAAG,MAAM,EAAyB,CAAC;IACzC,UAAU,GAAG,MAAM,EAAW,CAAC;IAE5B,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAsB,YAAY,CAAC,CAAC;IAE/E,KAAK;QACV,IAAI,CAAC,UAAU,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;IACjD,CAAC;uGAlCU,mBAAmB;2FAAnB,mBAAmB,89DC3ChC,uyBA+BA,82CDQY,mBAAmB,qSAAE,iBAAiB,gIAAE,eAAe;;2FAItD,mBAAmB;kBAN/B,SAAS;+BACE,aAAa,WACd,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,eAAe,CAAC;o8CAkCM,YAAY;AAMtF,OAAO,EAAE,mBAAmB,IAAI,UAAU,EAAE,CAAC","sourcesContent":["import {\n booleanAttribute,\n Component,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport {\n TngPopover as TngPopoverPrimitive,\n TngPopoverPanel,\n TngPopoverTrigger,\n type TngPopoverAlign,\n type TngPopoverAriaHasPopup,\n type TngPopoverAutoFocus,\n type TngPopoverCloseReason,\n type TngPopoverPanelRole,\n type TngPopoverSide,\n} from '@tailng-ui/primitives';\nexport type {\n TngPopoverAlign,\n TngPopoverAriaHasPopup,\n TngPopoverAutoFocus,\n TngPopoverCloseReason,\n TngPopoverPanelRole,\n TngPopoverSide,\n} from '@tailng-ui/primitives';\n\ntype OptionalBooleanInput = boolean | null | string | undefined;\n\nfunction normalizeOptionalBooleanInput(value: OptionalBooleanInput): boolean | undefined {\n if (value === null || value === undefined) {\n return undefined;\n }\n\n return booleanAttribute(value);\n}\n\n@Component({\n selector: 'tng-popover',\n imports: [TngPopoverPrimitive, TngPopoverTrigger, TngPopoverPanel],\n templateUrl: './tng-popover.component.html',\n styleUrl: './tng-popover.component.css',\n})\nexport class TngPopoverComponent {\n public readonly ariaLabel = input<string>('Popover');\n public readonly ariaHasPopup = input<TngPopoverAriaHasPopup>('dialog');\n public readonly autoFocus = input<TngPopoverAutoFocus>('first-focusable');\n public readonly align = input<TngPopoverAlign>('start');\n public readonly closeOnEscape = input<boolean, boolean | string>(true, {\n transform: booleanAttribute,\n });\n public readonly closeOnOutsidePointer = input<boolean, boolean | string>(true, {\n transform: booleanAttribute,\n });\n public readonly defaultOpen = input<boolean, boolean | string>(false, {\n transform: booleanAttribute,\n });\n public readonly disabled = input<boolean, boolean | string>(false, {\n transform: booleanAttribute,\n });\n public readonly open = input<boolean | undefined, OptionalBooleanInput>(undefined, {\n transform: normalizeOptionalBooleanInput,\n });\n public readonly panelRole = input<TngPopoverPanelRole>('dialog');\n public readonly restoreFocus = input<boolean, boolean | string>(true, {\n transform: booleanAttribute,\n });\n public readonly side = input<TngPopoverSide>('bottom');\n public readonly triggerLabel = input<string>('Toggle Popover');\n\n public readonly closed = output<TngPopoverCloseReason>();\n public readonly openChange = output<boolean>();\n\n protected readonly popoverRef = viewChild.required<TngPopoverPrimitive>('popoverRef');\n\n public close(): void {\n this.popoverRef().closePopover('programmatic');\n }\n}\nexport { TngPopoverComponent as TngPopover };\n","<div\n tngPopover\n #popoverRef=\"tngPopover\"\n class=\"tng-popover-root\"\n [open]=\"open()\"\n [defaultOpen]=\"defaultOpen()\"\n [disabled]=\"disabled()\"\n [closeOnEscape]=\"closeOnEscape()\"\n [closeOnOutsidePointer]=\"closeOnOutsidePointer()\"\n [restoreFocus]=\"restoreFocus()\"\n [autoFocus]=\"autoFocus()\"\n [side]=\"side()\"\n [align]=\"align()\"\n [panelRole]=\"panelRole()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaHasPopup]=\"ariaHasPopup()\"\n (openChange)=\"openChange.emit($event)\"\n (closed)=\"closed.emit($event)\"\n>\n <button\n type=\"button\"\n class=\"tng-popover-trigger\"\n [tngPopoverTrigger]=\"popoverRef\"\n >\n {{ triggerLabel() }}\n </button>\n\n <section tngPopoverPanel class=\"tng-popover-panel\">\n <ng-content />\n </section>\n</div>\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type TngTooltipSide } from '@tailng-ui/primitives';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare function normalizeTngTooltipDelay(value: number): number;
|
|
3
4
|
export declare function shouldCloseTngTooltipForKey(key: string): boolean;
|
|
4
5
|
export declare class TngTooltipComponent {
|
|
@@ -10,5 +11,8 @@ export declare class TngTooltipComponent {
|
|
|
10
11
|
readonly text: import("@angular/core").InputSignal<string>;
|
|
11
12
|
readonly triggerLabel: import("@angular/core").InputSignal<string>;
|
|
12
13
|
readonly openChange: import("@angular/core").OutputEmitterRef<boolean>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TngTooltipComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TngTooltipComponent, "tng-tooltip", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "closeDelay": { "alias": "closeDelay"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "openDelay": { "alias": "openDelay"; "required": false; "isSignal": true; }; "side": { "alias": "side"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "triggerLabel": { "alias": "triggerLabel"; "required": false; "isSignal": true; }; }, { "openChange": "openChange"; }, never, ["[trigger]", "*"], true, never>;
|
|
13
16
|
}
|
|
17
|
+
export { TngTooltipComponent as TngTooltip };
|
|
14
18
|
//# sourceMappingURL=tng-tooltip.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tng-tooltip.component.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/overlay/tooltip/tng-tooltip.component.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,cAAc,EAGpB,MAAM,uBAAuB,CAAC
|
|
1
|
+
{"version":3,"file":"tng-tooltip.component.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/overlay/tooltip/tng-tooltip.component.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,cAAc,EAGpB,MAAM,uBAAuB,CAAC;;AAE/B,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEhE;AAED,qBAMa,mBAAmB;IAC9B,SAAgB,SAAS,qDAA8B;IACvD,SAAgB,UAAU,8CAAqB;IAC/C,SAAgB,QAAQ,8EAErB;IACH,SAAgB,SAAS,8CAAsB;IAC/C,SAAgB,IAAI,sDAAgC;IACpD,SAAgB,IAAI,8CAAqC;IACzD,SAAgB,YAAY,8CAAyB;IAErD,SAAgB,UAAU,oDAAqB;yCAXpC,mBAAmB;2CAAnB,mBAAmB;CAY/B;AACD,OAAO,EAAE,mBAAmB,IAAI,UAAU,EAAE,CAAC"}
|
|
@@ -1,31 +1,27 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
1
|
import { booleanAttribute, Component, input, output } from '@angular/core';
|
|
3
2
|
import { TngTooltip as TngTooltipPrimitive, TngTooltipContent as TngTooltipContentPrimitive, TngTooltipTrigger as TngTooltipTriggerPrimitive, normalizeTngTooltipDelay as normalizeTngTooltipDelayPrimitive, shouldCloseTngTooltipForKey as shouldCloseTngTooltipForKeyPrimitive, } from '@tailng-ui/primitives';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
4
|
export function normalizeTngTooltipDelay(value) {
|
|
5
5
|
return normalizeTngTooltipDelayPrimitive(value);
|
|
6
6
|
}
|
|
7
7
|
export function shouldCloseTngTooltipForKey(key) {
|
|
8
8
|
return shouldCloseTngTooltipForKeyPrimitive(key);
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
ariaLabel = input(null);
|
|
12
|
-
closeDelay = input(60);
|
|
13
|
-
disabled = input(false, {
|
|
14
|
-
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
text = input('More information');
|
|
19
|
-
triggerLabel = input('Info');
|
|
10
|
+
export class TngTooltipComponent {
|
|
11
|
+
ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
12
|
+
closeDelay = input(60, ...(ngDevMode ? [{ debugName: "closeDelay" }] : []));
|
|
13
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
14
|
+
openDelay = input(120, ...(ngDevMode ? [{ debugName: "openDelay" }] : []));
|
|
15
|
+
side = input('top', ...(ngDevMode ? [{ debugName: "side" }] : []));
|
|
16
|
+
text = input('More information', ...(ngDevMode ? [{ debugName: "text" }] : []));
|
|
17
|
+
triggerLabel = input('Info', ...(ngDevMode ? [{ debugName: "triggerLabel" }] : []));
|
|
20
18
|
openChange = output();
|
|
21
|
-
};
|
|
22
|
-
TngTooltipComponent =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
], TngTooltipComponent);
|
|
30
|
-
export { TngTooltipComponent };
|
|
19
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TngTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.1", type: TngTooltipComponent, isStandalone: true, selector: "tng-tooltip", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, closeDelay: { classPropertyName: "closeDelay", publicName: "closeDelay", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, openDelay: { classPropertyName: "openDelay", publicName: "openDelay", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, triggerLabel: { classPropertyName: "triggerLabel", publicName: "triggerLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openChange: "openChange" }, ngImport: i0, template: "<span\n tngTooltip\n class=\"tng-tooltip-root\"\n [closeDelay]=\"closeDelay()\"\n [disabled]=\"disabled()\"\n [openDelay]=\"openDelay()\"\n [side]=\"side()\"\n (openChange)=\"openChange.emit($event)\"\n>\n <button\n tngTooltipTrigger\n class=\"tng-tooltip-trigger\"\n type=\"button\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.disabled]=\"disabled() ? '' : null\"\n [disabled]=\"disabled()\"\n >\n <ng-content select=\"[trigger]\">{{ triggerLabel() }}</ng-content>\n </button>\n\n <span\n tngTooltipContent\n class=\"tng-tooltip-content\"\n >\n <ng-content>{{ text() }}</ng-content>\n </span>\n</span>\n", styles: [":host {\n display: inline-flex;\n}\n\n.tng-tooltip-root {\n display: inline-flex;\n}\n\n.tng-tooltip-trigger {\n align-items: center;\n background: var(--tng-semantic-background-surface);\n border: 1px solid var(--tng-semantic-border-default);\n border-radius: 0.5rem;\n color: var(--tng-semantic-foreground-primary);\n cursor: pointer;\n display: inline-flex;\n font-size: 0.75rem;\n font-weight: 600;\n justify-content: center;\n min-height: 2rem;\n min-width: 2rem;\n padding: 0.25rem 0.55rem;\n}\n\n.tng-tooltip-trigger:focus-visible {\n outline: 2px solid var(--tng-semantic-accent-brand);\n outline-offset: 2px;\n}\n\n.tng-tooltip-trigger[data-state='open'] {\n border-color: var(--tng-semantic-accent-brand);\n}\n\n.tng-tooltip-content {\n background: var(--tng-semantic-background-surface);\n border: 1px solid var(--tng-semantic-border-default);\n border-radius: 0.5rem;\n color: var(--tng-semantic-foreground-primary);\n font-size: 0.75rem;\n max-width: 18rem;\n padding: 0.45rem 0.6rem;\n pointer-events: none;\n position: fixed;\n white-space: nowrap;\n z-index: 20;\n}\n\n.tng-tooltip-content[data-state='closed'] {\n opacity: 0;\n}\n"], dependencies: [{ kind: "directive", type: TngTooltipPrimitive, selector: "[tngTooltip]", inputs: ["closeDelay", "defaultOpen", "disabled", "openDelay", "open", "side"], outputs: ["openChange"], exportAs: ["tngTooltip"] }, { kind: "directive", type: TngTooltipTriggerPrimitive, selector: "[tngTooltipTrigger]", inputs: ["describedBy", "disabled", "open"], exportAs: ["tngTooltipTrigger"] }, { kind: "directive", type: TngTooltipContentPrimitive, selector: "[tngTooltipContent]", inputs: ["id", "open", "side"], exportAs: ["tngTooltipContent"] }] });
|
|
21
|
+
}
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TngTooltipComponent, decorators: [{
|
|
23
|
+
type: Component,
|
|
24
|
+
args: [{ selector: 'tng-tooltip', imports: [TngTooltipPrimitive, TngTooltipTriggerPrimitive, TngTooltipContentPrimitive], template: "<span\n tngTooltip\n class=\"tng-tooltip-root\"\n [closeDelay]=\"closeDelay()\"\n [disabled]=\"disabled()\"\n [openDelay]=\"openDelay()\"\n [side]=\"side()\"\n (openChange)=\"openChange.emit($event)\"\n>\n <button\n tngTooltipTrigger\n class=\"tng-tooltip-trigger\"\n type=\"button\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.disabled]=\"disabled() ? '' : null\"\n [disabled]=\"disabled()\"\n >\n <ng-content select=\"[trigger]\">{{ triggerLabel() }}</ng-content>\n </button>\n\n <span\n tngTooltipContent\n class=\"tng-tooltip-content\"\n >\n <ng-content>{{ text() }}</ng-content>\n </span>\n</span>\n", styles: [":host {\n display: inline-flex;\n}\n\n.tng-tooltip-root {\n display: inline-flex;\n}\n\n.tng-tooltip-trigger {\n align-items: center;\n background: var(--tng-semantic-background-surface);\n border: 1px solid var(--tng-semantic-border-default);\n border-radius: 0.5rem;\n color: var(--tng-semantic-foreground-primary);\n cursor: pointer;\n display: inline-flex;\n font-size: 0.75rem;\n font-weight: 600;\n justify-content: center;\n min-height: 2rem;\n min-width: 2rem;\n padding: 0.25rem 0.55rem;\n}\n\n.tng-tooltip-trigger:focus-visible {\n outline: 2px solid var(--tng-semantic-accent-brand);\n outline-offset: 2px;\n}\n\n.tng-tooltip-trigger[data-state='open'] {\n border-color: var(--tng-semantic-accent-brand);\n}\n\n.tng-tooltip-content {\n background: var(--tng-semantic-background-surface);\n border: 1px solid var(--tng-semantic-border-default);\n border-radius: 0.5rem;\n color: var(--tng-semantic-foreground-primary);\n font-size: 0.75rem;\n max-width: 18rem;\n padding: 0.45rem 0.6rem;\n pointer-events: none;\n position: fixed;\n white-space: nowrap;\n z-index: 20;\n}\n\n.tng-tooltip-content[data-state='closed'] {\n opacity: 0;\n}\n"] }]
|
|
25
|
+
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], closeDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeDelay", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], openDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "openDelay", required: false }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], triggerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerLabel", required: false }] }], openChange: [{ type: i0.Output, args: ["openChange"] }] } });
|
|
26
|
+
export { TngTooltipComponent as TngTooltip };
|
|
31
27
|
//# sourceMappingURL=tng-tooltip.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tng-tooltip.component.js","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/overlay/tooltip/tng-tooltip.component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tng-tooltip.component.js","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/overlay/tooltip/tng-tooltip.component.ts","../../../../../../../../libs/tailng-ui/components/src/lib/overlay/tooltip/tng-tooltip.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EACL,UAAU,IAAI,mBAAmB,EACjC,iBAAiB,IAAI,0BAA0B,EAC/C,iBAAiB,IAAI,0BAA0B,EAE/C,wBAAwB,IAAI,iCAAiC,EAC7D,2BAA2B,IAAI,oCAAoC,GACpE,MAAM,uBAAuB,CAAC;;AAE/B,MAAM,UAAU,wBAAwB,CAAC,KAAa;IACpD,OAAO,iCAAiC,CAAC,KAAK,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,GAAW;IACrD,OAAO,oCAAoC,CAAC,GAAG,CAAC,CAAC;AACnD,CAAC;AAQD,MAAM,OAAO,mBAAmB;IACd,SAAS,GAAG,KAAK,CAAgB,IAAI,qDAAC,CAAC;IACvC,UAAU,GAAG,KAAK,CAAS,EAAE,sDAAC,CAAC;IAC/B,QAAQ,GAAG,KAAK,CAA4B,KAAK,qDAC/D,SAAS,EAAE,gBAAgB,GAC3B,CAAC;IACa,SAAS,GAAG,KAAK,CAAS,GAAG,qDAAC,CAAC;IAC/B,IAAI,GAAG,KAAK,CAAiB,KAAK,gDAAC,CAAC;IACpC,IAAI,GAAG,KAAK,CAAS,kBAAkB,gDAAC,CAAC;IACzC,YAAY,GAAG,KAAK,CAAS,MAAM,wDAAC,CAAC;IAErC,UAAU,GAAG,MAAM,EAAW,CAAC;uGAXpC,mBAAmB;2FAAnB,mBAAmB,igCCxBhC,yoBA2BA,mtCDPY,mBAAmB,4LAAE,0BAA0B,8IAAE,0BAA0B;;2FAI1E,mBAAmB;kBAN/B,SAAS;+BACE,aAAa,WACd,CAAC,mBAAmB,EAAE,0BAA0B,EAAE,0BAA0B,CAAC;;AAiBxF,OAAO,EAAE,mBAAmB,IAAI,UAAU,EAAE,CAAC","sourcesContent":["import { booleanAttribute, Component, input, output } from '@angular/core';\nimport {\n TngTooltip as TngTooltipPrimitive,\n TngTooltipContent as TngTooltipContentPrimitive,\n TngTooltipTrigger as TngTooltipTriggerPrimitive,\n type TngTooltipSide,\n normalizeTngTooltipDelay as normalizeTngTooltipDelayPrimitive,\n shouldCloseTngTooltipForKey as shouldCloseTngTooltipForKeyPrimitive,\n} from '@tailng-ui/primitives';\n\nexport function normalizeTngTooltipDelay(value: number): number {\n return normalizeTngTooltipDelayPrimitive(value);\n}\n\nexport function shouldCloseTngTooltipForKey(key: string): boolean {\n return shouldCloseTngTooltipForKeyPrimitive(key);\n}\n\n@Component({\n selector: 'tng-tooltip',\n imports: [TngTooltipPrimitive, TngTooltipTriggerPrimitive, TngTooltipContentPrimitive],\n templateUrl: './tng-tooltip.component.html',\n styleUrl: './tng-tooltip.component.css',\n})\nexport class TngTooltipComponent {\n public readonly ariaLabel = input<string | null>(null);\n public readonly closeDelay = input<number>(60);\n public readonly disabled = input<boolean, boolean | string>(false, {\n transform: booleanAttribute,\n });\n public readonly openDelay = input<number>(120);\n public readonly side = input<TngTooltipSide>('top');\n public readonly text = input<string>('More information');\n public readonly triggerLabel = input<string>('Info');\n\n public readonly openChange = output<boolean>();\n}\nexport { TngTooltipComponent as TngTooltip };\n","<span\n tngTooltip\n class=\"tng-tooltip-root\"\n [closeDelay]=\"closeDelay()\"\n [disabled]=\"disabled()\"\n [openDelay]=\"openDelay()\"\n [side]=\"side()\"\n (openChange)=\"openChange.emit($event)\"\n>\n <button\n tngTooltipTrigger\n class=\"tng-tooltip-trigger\"\n type=\"button\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.disabled]=\"disabled() ? '' : null\"\n [disabled]=\"disabled()\"\n >\n <ng-content select=\"[trigger]\">{{ triggerLabel() }}</ng-content>\n </button>\n\n <span\n tngTooltipContent\n class=\"tng-tooltip-content\"\n >\n <ng-content>{{ text() }}</ng-content>\n </span>\n</span>\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
1
2
|
type TngAvatarShape = 'circle' | 'square';
|
|
2
3
|
type TngAvatarSize = 'lg' | 'md' | 'sm';
|
|
3
4
|
export declare function toTngAvatarFallbackText(value: string | null | undefined): string;
|
|
@@ -14,6 +15,8 @@ export declare class TngAvatarComponent {
|
|
|
14
15
|
protected readonly showFallback: import("@angular/core").Signal<boolean>;
|
|
15
16
|
onImageError(): void;
|
|
16
17
|
onImageLoad(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TngAvatarComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TngAvatarComponent, "tng-avatar", never, { "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "fallback": { "alias": "fallback"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "src": { "alias": "src"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
17
20
|
}
|
|
18
|
-
export {};
|
|
21
|
+
export { TngAvatarComponent as TngAvatar };
|
|
19
22
|
//# sourceMappingURL=tng-avatar.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tng-avatar.component.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/utility/avatar/tng-avatar.component.ts"],"names":[],"mappings":"AAOA,KAAK,cAAc,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC1C,KAAK,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AA2CxC,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAWhF;AAED,qBAMa,kBAAkB;IAC7B,SAAgB,GAAG,qDAAkC;IACrD,SAAgB,QAAQ,qDAA8B;IACtD,SAAgB,KAAK,sDAAmC;IACxD,SAAgB,IAAI,qDAA8B;IAClD,SAAgB,GAAG,qDAA8B;IAEjD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAiB;IACjD,SAAS,CAAC,QAAQ,CAAC,YAAY,yCAE7B;IACF,SAAS,CAAC,QAAQ,CAAC,WAAW,gDAE5B;IACF,SAAS,CAAC,QAAQ,CAAC,WAAW,gDAE5B;IACF,SAAS,CAAC,QAAQ,CAAC,YAAY,0CAE7B;IAEK,YAAY,IAAI,IAAI;IAIpB,WAAW,IAAI,IAAI;
|
|
1
|
+
{"version":3,"file":"tng-avatar.component.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/utility/avatar/tng-avatar.component.ts"],"names":[],"mappings":";AAOA,KAAK,cAAc,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC1C,KAAK,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AA2CxC,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAWhF;AAED,qBAMa,kBAAkB;IAC7B,SAAgB,GAAG,qDAAkC;IACrD,SAAgB,QAAQ,qDAA8B;IACtD,SAAgB,KAAK,sDAAmC;IACxD,SAAgB,IAAI,qDAA8B;IAClD,SAAgB,GAAG,qDAA8B;IAEjD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAiB;IACjD,SAAS,CAAC,QAAQ,CAAC,YAAY,yCAE7B;IACF,SAAS,CAAC,QAAQ,CAAC,WAAW,gDAE5B;IACF,SAAS,CAAC,QAAQ,CAAC,WAAW,gDAE5B;IACF,SAAS,CAAC,QAAQ,CAAC,YAAY,0CAE7B;IAEK,YAAY,IAAI,IAAI;IAIpB,WAAW,IAAI,IAAI;yCAzBf,kBAAkB;2CAAlB,kBAAkB;CA4B9B;AACD,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
1
|
import { Component, computed, input, signal } from '@angular/core';
|
|
3
2
|
import { TngAvatar as TngAvatarPrimitive, TngAvatarFallback as TngAvatarFallbackPrimitive, TngAvatarImage as TngAvatarImagePrimitive, } from '@tailng-ui/primitives';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
4
|
function normalizeOptionalString(value) {
|
|
5
5
|
if (value === undefined || value === null) {
|
|
6
6
|
return null;
|
|
@@ -43,31 +43,29 @@ export function toTngAvatarFallbackText(value) {
|
|
|
43
43
|
}
|
|
44
44
|
return toInitialCode(words);
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
alt = input('Avatar');
|
|
48
|
-
fallback = input(null);
|
|
49
|
-
shape = input('circle');
|
|
50
|
-
size = input('md');
|
|
51
|
-
src = input(null);
|
|
52
|
-
imageLoadFailed = signal(false);
|
|
53
|
-
fallbackText = computed(() => toTngAvatarFallbackText(this.fallback()));
|
|
54
|
-
resolvedAlt = computed(() => normalizeAvatarAlt(this.alt()));
|
|
55
|
-
resolvedSrc = computed(() => normalizeOptionalString(this.src()));
|
|
56
|
-
showFallback = computed(() => this.resolvedSrc() === null || this.imageLoadFailed());
|
|
46
|
+
export class TngAvatarComponent {
|
|
47
|
+
alt = input('Avatar', ...(ngDevMode ? [{ debugName: "alt" }] : []));
|
|
48
|
+
fallback = input(null, ...(ngDevMode ? [{ debugName: "fallback" }] : []));
|
|
49
|
+
shape = input('circle', ...(ngDevMode ? [{ debugName: "shape" }] : []));
|
|
50
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
51
|
+
src = input(null, ...(ngDevMode ? [{ debugName: "src" }] : []));
|
|
52
|
+
imageLoadFailed = signal(false, ...(ngDevMode ? [{ debugName: "imageLoadFailed" }] : []));
|
|
53
|
+
fallbackText = computed(() => toTngAvatarFallbackText(this.fallback()), ...(ngDevMode ? [{ debugName: "fallbackText" }] : []));
|
|
54
|
+
resolvedAlt = computed(() => normalizeAvatarAlt(this.alt()), ...(ngDevMode ? [{ debugName: "resolvedAlt" }] : []));
|
|
55
|
+
resolvedSrc = computed(() => normalizeOptionalString(this.src()), ...(ngDevMode ? [{ debugName: "resolvedSrc" }] : []));
|
|
56
|
+
showFallback = computed(() => this.resolvedSrc() === null || this.imageLoadFailed(), ...(ngDevMode ? [{ debugName: "showFallback" }] : []));
|
|
57
57
|
onImageError() {
|
|
58
58
|
this.imageLoadFailed.set(true);
|
|
59
59
|
}
|
|
60
60
|
onImageLoad() {
|
|
61
61
|
this.imageLoadFailed.set(false);
|
|
62
62
|
}
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
], TngAvatarComponent);
|
|
72
|
-
export { TngAvatarComponent };
|
|
63
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TngAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
64
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.1", type: TngAvatarComponent, isStandalone: true, selector: "tng-avatar", inputs: { alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, fallback: { classPropertyName: "fallback", publicName: "fallback", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span tngAvatar class=\"tng-avatar\" [attr.data-shape]=\"shape()\" [attr.data-size]=\"size()\">\n <img\n tngAvatarImage\n class=\"tng-avatar-image\"\n [attr.alt]=\"resolvedAlt()\"\n [attr.hidden]=\"showFallback() ? '' : null\"\n [attr.src]=\"resolvedSrc()\"\n (error)=\"onImageError()\"\n (load)=\"onImageLoad()\"\n />\n <span tngAvatarFallback class=\"tng-avatar-fallback\" [attr.hidden]=\"showFallback() ? null : ''\">\n {{ fallbackText() }}\n </span>\n</span>\n", styles: [":host {\n display: inline-flex;\n}\n\n.tng-avatar {\n align-items: center;\n background: var(--tng-semantic-background-surface);\n border: 1px solid var(--tng-semantic-border-strong);\n color: var(--tng-semantic-foreground-primary);\n display: inline-flex;\n font-size: 0.75rem;\n font-weight: 700;\n height: 2.5rem;\n justify-content: center;\n overflow: hidden;\n position: relative;\n text-transform: uppercase;\n width: 2.5rem;\n}\n\n.tng-avatar[data-shape='circle'] {\n border-radius: 9999px;\n}\n\n.tng-avatar[data-shape='square'] {\n border-radius: 0.75rem;\n}\n\n.tng-avatar[data-size='sm'] {\n font-size: 0.625rem;\n height: 2rem;\n width: 2rem;\n}\n\n.tng-avatar[data-size='md'] {\n font-size: 0.75rem;\n height: 2.5rem;\n width: 2.5rem;\n}\n\n.tng-avatar[data-size='lg'] {\n font-size: 0.95rem;\n height: 3rem;\n width: 3rem;\n}\n\n.tng-avatar-image,\n.tng-avatar-fallback {\n inset: 0;\n position: absolute;\n}\n\n.tng-avatar-image {\n height: 100%;\n object-fit: cover;\n width: 100%;\n}\n\n.tng-avatar-image[hidden] {\n display: none;\n}\n\n.tng-avatar-fallback {\n align-items: center;\n display: inline-flex;\n justify-content: center;\n letter-spacing: 0.03em;\n width: 100%;\n}\n\n.tng-avatar-fallback[hidden] {\n display: none;\n}\n"], dependencies: [{ kind: "directive", type: TngAvatarPrimitive, selector: "[tngAvatar]", exportAs: ["tngAvatar"] }, { kind: "directive", type: TngAvatarImagePrimitive, selector: "img[tngAvatarImage]", exportAs: ["tngAvatarImage"] }, { kind: "directive", type: TngAvatarFallbackPrimitive, selector: "[tngAvatarFallback]", exportAs: ["tngAvatarFallback"] }] });
|
|
65
|
+
}
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TngAvatarComponent, decorators: [{
|
|
67
|
+
type: Component,
|
|
68
|
+
args: [{ selector: 'tng-avatar', imports: [TngAvatarPrimitive, TngAvatarImagePrimitive, TngAvatarFallbackPrimitive], template: "<span tngAvatar class=\"tng-avatar\" [attr.data-shape]=\"shape()\" [attr.data-size]=\"size()\">\n <img\n tngAvatarImage\n class=\"tng-avatar-image\"\n [attr.alt]=\"resolvedAlt()\"\n [attr.hidden]=\"showFallback() ? '' : null\"\n [attr.src]=\"resolvedSrc()\"\n (error)=\"onImageError()\"\n (load)=\"onImageLoad()\"\n />\n <span tngAvatarFallback class=\"tng-avatar-fallback\" [attr.hidden]=\"showFallback() ? null : ''\">\n {{ fallbackText() }}\n </span>\n</span>\n", styles: [":host {\n display: inline-flex;\n}\n\n.tng-avatar {\n align-items: center;\n background: var(--tng-semantic-background-surface);\n border: 1px solid var(--tng-semantic-border-strong);\n color: var(--tng-semantic-foreground-primary);\n display: inline-flex;\n font-size: 0.75rem;\n font-weight: 700;\n height: 2.5rem;\n justify-content: center;\n overflow: hidden;\n position: relative;\n text-transform: uppercase;\n width: 2.5rem;\n}\n\n.tng-avatar[data-shape='circle'] {\n border-radius: 9999px;\n}\n\n.tng-avatar[data-shape='square'] {\n border-radius: 0.75rem;\n}\n\n.tng-avatar[data-size='sm'] {\n font-size: 0.625rem;\n height: 2rem;\n width: 2rem;\n}\n\n.tng-avatar[data-size='md'] {\n font-size: 0.75rem;\n height: 2.5rem;\n width: 2.5rem;\n}\n\n.tng-avatar[data-size='lg'] {\n font-size: 0.95rem;\n height: 3rem;\n width: 3rem;\n}\n\n.tng-avatar-image,\n.tng-avatar-fallback {\n inset: 0;\n position: absolute;\n}\n\n.tng-avatar-image {\n height: 100%;\n object-fit: cover;\n width: 100%;\n}\n\n.tng-avatar-image[hidden] {\n display: none;\n}\n\n.tng-avatar-fallback {\n align-items: center;\n display: inline-flex;\n justify-content: center;\n letter-spacing: 0.03em;\n width: 100%;\n}\n\n.tng-avatar-fallback[hidden] {\n display: none;\n}\n"] }]
|
|
69
|
+
}], propDecorators: { alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], fallback: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallback", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }] } });
|
|
70
|
+
export { TngAvatarComponent as TngAvatar };
|
|
73
71
|
//# sourceMappingURL=tng-avatar.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tng-avatar.component.js","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/utility/avatar/tng-avatar.component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tng-avatar.component.js","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/utility/avatar/tng-avatar.component.ts","../../../../../../../../libs/tailng-ui/components/src/lib/utility/avatar/tng-avatar.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EACL,SAAS,IAAI,kBAAkB,EAC/B,iBAAiB,IAAI,0BAA0B,EAC/C,cAAc,IAAI,uBAAuB,GAC1C,MAAM,uBAAuB,CAAC;;AAK/B,SAAS,uBAAuB,CAAC,KAAgC;IAC/D,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAChC,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;AACnD,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAgC;IAC1D,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAChC,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;AACjD,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAa;IAC1C,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;AACxC,CAAC;AAED,SAAS,OAAO,CAAC,KAAgC;IAC/C,MAAM,UAAU,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAC;IAClD,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACnE,CAAC;AAED,SAAS,eAAe,CAAC,IAAY;IACnC,OAAO,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAC/D,CAAC;AAED,SAAS,aAAa,CAAC,KAAwB;IAC7C,MAAM,YAAY,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/C,MAAM,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAChD,OAAO,qBAAqB,CAAC,GAAG,YAAY,GAAG,aAAa,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;AAChF,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,KAAgC;IACtE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC7B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,GAAG,CAAC;IACb,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAQD,MAAM,OAAO,kBAAkB;IACb,GAAG,GAAG,KAAK,CAAgB,QAAQ,+CAAC,CAAC;IACrC,QAAQ,GAAG,KAAK,CAAgB,IAAI,oDAAC,CAAC;IACtC,KAAK,GAAG,KAAK,CAAiB,QAAQ,iDAAC,CAAC;IACxC,IAAI,GAAG,KAAK,CAAgB,IAAI,gDAAC,CAAC;IAClC,GAAG,GAAG,KAAK,CAAgB,IAAI,+CAAC,CAAC;IAEhC,eAAe,GAAG,MAAM,CAAC,KAAK,2DAAC,CAAC;IAC9B,YAAY,GAAG,QAAQ,CAAS,GAAG,EAAE,CACtD,uBAAuB,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,wDACzC,CAAC;IACiB,WAAW,GAAG,QAAQ,CAAgB,GAAG,EAAE,CAC5D,kBAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,uDAC/B,CAAC;IACiB,WAAW,GAAG,QAAQ,CAAgB,GAAG,EAAE,CAC5D,uBAAuB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,uDACpC,CAAC;IACiB,YAAY,GAAG,QAAQ,CACxC,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,eAAe,EAAE,wDAC5D,CAAC;IAEK,YAAY;QACjB,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAEM,WAAW;QAChB,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;uGA3BU,kBAAkB;2FAAlB,kBAAkB,oqBCtE/B,8eAcA,k0CDoDY,kBAAkB,iFAAE,uBAAuB,8FAAE,0BAA0B;;2FAItE,kBAAkB;kBAN9B,SAAS;+BACE,YAAY,WACb,CAAC,kBAAkB,EAAE,uBAAuB,EAAE,0BAA0B,CAAC;;AAiCpF,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,CAAC","sourcesContent":["import { Component, computed, input, signal } from '@angular/core';\nimport {\n TngAvatar as TngAvatarPrimitive,\n TngAvatarFallback as TngAvatarFallbackPrimitive,\n TngAvatarImage as TngAvatarImagePrimitive,\n} from '@tailng-ui/primitives';\n\ntype TngAvatarShape = 'circle' | 'square';\ntype TngAvatarSize = 'lg' | 'md' | 'sm';\n\nfunction normalizeOptionalString(value: string | null | undefined): string | null {\n if (value === undefined || value === null) {\n return null;\n }\n\n const normalized = value.trim();\n return normalized.length > 0 ? normalized : null;\n}\n\nfunction normalizeAvatarAlt(value: string | null | undefined): string | null {\n if (value === undefined || value === null) {\n return null;\n }\n\n const normalized = value.trim();\n return normalized.length > 0 ? normalized : '';\n}\n\nfunction normalizeFallbackText(value: string): string {\n return value.length > 0 ? value : '?';\n}\n\nfunction toWords(value: string | null | undefined): readonly string[] {\n const normalized = normalizeOptionalString(value);\n if (normalized === null) {\n return [];\n }\n\n return normalized.split(/\\s+/).filter((part) => part.length > 0);\n}\n\nfunction toTwoLetterCode(word: string): string {\n return normalizeFallbackText(word.slice(0, 2).toUpperCase());\n}\n\nfunction toInitialCode(words: readonly string[]): string {\n const firstInitial = words[0]?.charAt(0) ?? '';\n const secondInitial = words[1]?.charAt(0) ?? '';\n return normalizeFallbackText(`${firstInitial}${secondInitial}`.toUpperCase());\n}\n\nexport function toTngAvatarFallbackText(value: string | null | undefined): string {\n const words = toWords(value);\n if (words.length === 0) {\n return '?';\n }\n\n if (words.length === 1) {\n return toTwoLetterCode(words[0] ?? '');\n }\n\n return toInitialCode(words);\n}\n\n@Component({\n selector: 'tng-avatar',\n imports: [TngAvatarPrimitive, TngAvatarImagePrimitive, TngAvatarFallbackPrimitive],\n templateUrl: './tng-avatar.component.html',\n styleUrl: './tng-avatar.component.css',\n})\nexport class TngAvatarComponent {\n public readonly alt = input<string | null>('Avatar');\n public readonly fallback = input<string | null>(null);\n public readonly shape = input<TngAvatarShape>('circle');\n public readonly size = input<TngAvatarSize>('md');\n public readonly src = input<string | null>(null);\n\n private readonly imageLoadFailed = signal(false);\n protected readonly fallbackText = computed<string>(() =>\n toTngAvatarFallbackText(this.fallback()),\n );\n protected readonly resolvedAlt = computed<string | null>(() =>\n normalizeAvatarAlt(this.alt()),\n );\n protected readonly resolvedSrc = computed<string | null>(() =>\n normalizeOptionalString(this.src()),\n );\n protected readonly showFallback = computed<boolean>(\n () => this.resolvedSrc() === null || this.imageLoadFailed(),\n );\n\n public onImageError(): void {\n this.imageLoadFailed.set(true);\n }\n\n public onImageLoad(): void {\n this.imageLoadFailed.set(false);\n }\n}\nexport { TngAvatarComponent as TngAvatar };\n","<span tngAvatar class=\"tng-avatar\" [attr.data-shape]=\"shape()\" [attr.data-size]=\"size()\">\n <img\n tngAvatarImage\n class=\"tng-avatar-image\"\n [attr.alt]=\"resolvedAlt()\"\n [attr.hidden]=\"showFallback() ? '' : null\"\n [attr.src]=\"resolvedSrc()\"\n (error)=\"onImageError()\"\n (load)=\"onImageLoad()\"\n />\n <span tngAvatarFallback class=\"tng-avatar-fallback\" [attr.hidden]=\"showFallback() ? null : ''\">\n {{ fallbackText() }}\n </span>\n</span>\n"]}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { TngBadge as TngBadgePrimitive } from '@tailng-ui/primitives';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class TngBadgeComponent extends TngBadgePrimitive {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TngBadgeComponent, never>;
|
|
5
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TngBadgeComponent, "[tngBadge]", ["tngBadge"], {}, {}, never, never, true, never>;
|
|
3
6
|
}
|
|
7
|
+
export { TngBadgeComponent as TngBadge };
|
|
4
8
|
//# sourceMappingURL=tng-badge.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tng-badge.component.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/utility/badge/tng-badge.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC
|
|
1
|
+
{"version":3,"file":"tng-badge.component.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/utility/badge/tng-badge.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;;AAEtE,qBAIa,iBAAkB,SAAQ,iBAAiB;yCAA3C,iBAAiB;2CAAjB,iBAAiB;CAA6B;AAC3D,OAAO,EAAE,iBAAiB,IAAI,QAAQ,EAAE,CAAC"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
1
|
import { Directive } from '@angular/core';
|
|
3
2
|
import { TngBadge as TngBadgePrimitive } from '@tailng-ui/primitives';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class TngBadgeComponent extends TngBadgePrimitive {
|
|
5
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TngBadgeComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
6
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.1", type: TngBadgeComponent, isStandalone: true, selector: "[tngBadge]", exportAs: ["tngBadge"], usesInheritance: true, ngImport: i0 });
|
|
7
|
+
}
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TngBadgeComponent, decorators: [{
|
|
9
|
+
type: Directive,
|
|
10
|
+
args: [{
|
|
11
|
+
selector: '[tngBadge]',
|
|
12
|
+
exportAs: 'tngBadge',
|
|
13
|
+
}]
|
|
14
|
+
}] });
|
|
15
|
+
export { TngBadgeComponent as TngBadge };
|
|
13
16
|
//# sourceMappingURL=tng-badge.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tng-badge.component.js","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/utility/badge/tng-badge.component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tng-badge.component.js","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/utility/badge/tng-badge.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;;AAMtE,MAAM,OAAO,iBAAkB,SAAQ,iBAAiB;uGAA3C,iBAAiB;2FAAjB,iBAAiB;;2FAAjB,iBAAiB;kBAJ7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,YAAY;oBACtB,QAAQ,EAAE,UAAU;iBACrB;;AAED,OAAO,EAAE,iBAAiB,IAAI,QAAQ,EAAE,CAAC","sourcesContent":["import { Directive } from '@angular/core';\nimport { TngBadge as TngBadgePrimitive } from '@tailng-ui/primitives';\n\n@Directive({\n selector: '[tngBadge]',\n exportAs: 'tngBadge',\n})\nexport class TngBadgeComponent extends TngBadgePrimitive {}\nexport { TngBadgeComponent as TngBadge };\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TngPressAriaHasPopup, TngPressType } from '@tailng-ui/primitives';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
type NullableBooleanInput = boolean | null | string | undefined;
|
|
3
4
|
export type TngButtonAppearance = 'ghost' | 'outline' | 'solid';
|
|
4
5
|
export type TngButtonSize = 'lg' | 'md' | 'sm';
|
|
@@ -13,6 +14,8 @@ export declare class TngButtonComponent {
|
|
|
13
14
|
readonly size: import("@angular/core").InputSignal<TngButtonSize>;
|
|
14
15
|
readonly tone: import("@angular/core").InputSignal<TngButtonTone>;
|
|
15
16
|
readonly type: import("@angular/core").InputSignal<TngPressType>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TngButtonComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TngButtonComponent, "tng-button", never, { "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "ariaControls": { "alias": "ariaControls"; "required": false; "isSignal": true; }; "ariaExpanded": { "alias": "ariaExpanded"; "required": false; "isSignal": true; }; "ariaHasPopup": { "alias": "ariaHasPopup"; "required": false; "isSignal": true; }; "ariaPressed": { "alias": "ariaPressed"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
16
19
|
}
|
|
17
|
-
export {};
|
|
20
|
+
export { TngButtonComponent as TngButton };
|
|
18
21
|
//# sourceMappingURL=tng-button.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tng-button.component.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/utility/button/tng-button.component.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC
|
|
1
|
+
{"version":3,"file":"tng-button.component.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/utility/button/tng-button.component.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;;AAEhF,KAAK,oBAAoB,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;AAChE,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAChE,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC/C,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAEzE,qBAMa,kBAAkB;IAC7B,SAAgB,UAAU,2DAAuC;IACjE,SAAgB,YAAY,qDAA8B;IAC1D,SAAgB,YAAY,yFAEzB;IACH,SAAgB,YAAY,qHAKzB;IACH,SAAgB,WAAW,yFAExB;IACH,SAAgB,QAAQ,8EAErB;IACH,SAAgB,IAAI,qDAA8B;IAClD,SAAgB,IAAI,qDAAmC;IACvD,SAAgB,IAAI,oDAAiC;yCApB1C,kBAAkB;2CAAlB,kBAAkB;CAqB9B;AACD,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,CAAC"}
|
|
@@ -1,32 +1,22 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
1
|
import { booleanAttribute, Component, input } from '@angular/core';
|
|
3
2
|
import { coerceTngPressAriaHasPopup, coerceTngPressNullableBoolean, TngPress as TngPressPrimitive, } from '@tailng-ui/primitives';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
TngButtonComponent = __decorate([
|
|
24
|
-
Component({
|
|
25
|
-
selector: 'tng-button',
|
|
26
|
-
imports: [TngPressPrimitive],
|
|
27
|
-
templateUrl: './tng-button.component.html',
|
|
28
|
-
styleUrl: './tng-button.component.css',
|
|
29
|
-
})
|
|
30
|
-
], TngButtonComponent);
|
|
31
|
-
export { TngButtonComponent };
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class TngButtonComponent {
|
|
5
|
+
appearance = input('solid', ...(ngDevMode ? [{ debugName: "appearance" }] : []));
|
|
6
|
+
ariaControls = input(null, ...(ngDevMode ? [{ debugName: "ariaControls" }] : []));
|
|
7
|
+
ariaExpanded = input(null, { ...(ngDevMode ? { debugName: "ariaExpanded" } : {}), transform: coerceTngPressNullableBoolean });
|
|
8
|
+
ariaHasPopup = input(null, { ...(ngDevMode ? { debugName: "ariaHasPopup" } : {}), transform: coerceTngPressAriaHasPopup });
|
|
9
|
+
ariaPressed = input(null, { ...(ngDevMode ? { debugName: "ariaPressed" } : {}), transform: coerceTngPressNullableBoolean });
|
|
10
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
11
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
12
|
+
tone = input('primary', ...(ngDevMode ? [{ debugName: "tone" }] : []));
|
|
13
|
+
type = input('button', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
14
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TngButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.1", type: TngButtonComponent, isStandalone: true, selector: "tng-button", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, ariaControls: { classPropertyName: "ariaControls", publicName: "ariaControls", isSignal: true, isRequired: false, transformFunction: null }, ariaExpanded: { classPropertyName: "ariaExpanded", publicName: "ariaExpanded", isSignal: true, isRequired: false, transformFunction: null }, ariaHasPopup: { classPropertyName: "ariaHasPopup", publicName: "ariaHasPopup", isSignal: true, isRequired: false, transformFunction: null }, ariaPressed: { classPropertyName: "ariaPressed", publicName: "ariaPressed", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<button\n tngPress\n class=\"tng-button\"\n [type]=\"type()\"\n [disabled]=\"disabled()\"\n [ariaControls]=\"ariaControls()\"\n [ariaExpanded]=\"ariaExpanded()\"\n [ariaHasPopup]=\"ariaHasPopup()\"\n [ariaPressed]=\"ariaPressed()\"\n [attr.data-appearance]=\"appearance()\"\n [attr.data-size]=\"size()\"\n [attr.data-tone]=\"tone()\"\n>\n <ng-content />\n</button>\n", styles: [":host {\n display: inline-flex;\n}\n\n.tng-button {\n align-items: center;\n appearance: none;\n border: 1px solid transparent;\n border-radius: 0.6rem;\n cursor: pointer;\n display: inline-flex;\n font-family: inherit;\n font-size: 0.875rem;\n font-weight: 600;\n gap: 0.5rem;\n justify-content: center;\n line-height: 1;\n transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, opacity 120ms ease;\n}\n\n.tng-button[data-size='sm'] {\n min-height: 2rem;\n padding: 0 0.75rem;\n}\n\n.tng-button[data-size='md'] {\n min-height: 2.5rem;\n padding: 0 1rem;\n}\n\n.tng-button[data-size='lg'] {\n min-height: 3rem;\n padding: 0 1.25rem;\n}\n\n.tng-button[data-appearance='solid'][data-tone='primary'] {\n background: var(--tng-semantic-accent-brand);\n color: var(--tng-color-white);\n}\n\n.tng-button[data-appearance='solid'][data-tone='danger'] {\n background: var(--tng-semantic-accent-danger);\n color: var(--tng-color-white);\n}\n\n.tng-button[data-appearance='solid'][data-tone='success'] {\n background: var(--tng-semantic-accent-success);\n color: var(--tng-color-white);\n}\n\n.tng-button[data-appearance='solid'][data-tone='neutral'] {\n background: var(--tng-semantic-background-surface);\n color: var(--tng-semantic-foreground-primary);\n}\n\n.tng-button[data-appearance='outline'] {\n background: transparent;\n border-color: var(--tng-semantic-border-strong);\n color: var(--tng-semantic-foreground-primary);\n}\n\n.tng-button[data-appearance='ghost'] {\n background: transparent;\n color: var(--tng-semantic-foreground-primary);\n}\n\n.tng-button:focus-visible {\n box-shadow: 0 0 0 3px var(--tng-semantic-focus-ring);\n outline: none;\n}\n\n.tng-button:disabled,\n.tng-button[data-disabled] {\n cursor: not-allowed;\n opacity: 0.55;\n}\n"], dependencies: [{ kind: "directive", type: TngPressPrimitive, selector: "a[tngPress], button[tngPress]", inputs: ["ariaControls", "ariaExpanded", "ariaHasPopup", "ariaPressed", "disabled", "type"], exportAs: ["tngPress"] }] });
|
|
16
|
+
}
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TngButtonComponent, decorators: [{
|
|
18
|
+
type: Component,
|
|
19
|
+
args: [{ selector: 'tng-button', imports: [TngPressPrimitive], template: "<button\n tngPress\n class=\"tng-button\"\n [type]=\"type()\"\n [disabled]=\"disabled()\"\n [ariaControls]=\"ariaControls()\"\n [ariaExpanded]=\"ariaExpanded()\"\n [ariaHasPopup]=\"ariaHasPopup()\"\n [ariaPressed]=\"ariaPressed()\"\n [attr.data-appearance]=\"appearance()\"\n [attr.data-size]=\"size()\"\n [attr.data-tone]=\"tone()\"\n>\n <ng-content />\n</button>\n", styles: [":host {\n display: inline-flex;\n}\n\n.tng-button {\n align-items: center;\n appearance: none;\n border: 1px solid transparent;\n border-radius: 0.6rem;\n cursor: pointer;\n display: inline-flex;\n font-family: inherit;\n font-size: 0.875rem;\n font-weight: 600;\n gap: 0.5rem;\n justify-content: center;\n line-height: 1;\n transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, opacity 120ms ease;\n}\n\n.tng-button[data-size='sm'] {\n min-height: 2rem;\n padding: 0 0.75rem;\n}\n\n.tng-button[data-size='md'] {\n min-height: 2.5rem;\n padding: 0 1rem;\n}\n\n.tng-button[data-size='lg'] {\n min-height: 3rem;\n padding: 0 1.25rem;\n}\n\n.tng-button[data-appearance='solid'][data-tone='primary'] {\n background: var(--tng-semantic-accent-brand);\n color: var(--tng-color-white);\n}\n\n.tng-button[data-appearance='solid'][data-tone='danger'] {\n background: var(--tng-semantic-accent-danger);\n color: var(--tng-color-white);\n}\n\n.tng-button[data-appearance='solid'][data-tone='success'] {\n background: var(--tng-semantic-accent-success);\n color: var(--tng-color-white);\n}\n\n.tng-button[data-appearance='solid'][data-tone='neutral'] {\n background: var(--tng-semantic-background-surface);\n color: var(--tng-semantic-foreground-primary);\n}\n\n.tng-button[data-appearance='outline'] {\n background: transparent;\n border-color: var(--tng-semantic-border-strong);\n color: var(--tng-semantic-foreground-primary);\n}\n\n.tng-button[data-appearance='ghost'] {\n background: transparent;\n color: var(--tng-semantic-foreground-primary);\n}\n\n.tng-button:focus-visible {\n box-shadow: 0 0 0 3px var(--tng-semantic-focus-ring);\n outline: none;\n}\n\n.tng-button:disabled,\n.tng-button[data-disabled] {\n cursor: not-allowed;\n opacity: 0.55;\n}\n"] }]
|
|
20
|
+
}], propDecorators: { appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], ariaControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaControls", required: false }] }], ariaExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaExpanded", required: false }] }], ariaHasPopup: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaHasPopup", required: false }] }], ariaPressed: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaPressed", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }] } });
|
|
21
|
+
export { TngButtonComponent as TngButton };
|
|
32
22
|
//# sourceMappingURL=tng-button.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tng-button.component.js","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/utility/button/tng-button.component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tng-button.component.js","sourceRoot":"","sources":["../../../../../../../../libs/tailng-ui/components/src/lib/utility/button/tng-button.component.ts","../../../../../../../../libs/tailng-ui/components/src/lib/utility/button/tng-button.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,QAAQ,IAAI,iBAAiB,GAC9B,MAAM,uBAAuB,CAAC;;AAc/B,MAAM,OAAO,kBAAkB;IACb,UAAU,GAAG,KAAK,CAAsB,OAAO,sDAAC,CAAC;IACjD,YAAY,GAAG,KAAK,CAAgB,IAAI,wDAAC,CAAC;IAC1C,YAAY,GAAG,KAAK,CAAuC,IAAI,yDAC7E,SAAS,EAAE,6BAA6B,GACxC,CAAC;IACa,YAAY,GAAG,KAAK,CAGlC,IAAI,yDACJ,SAAS,EAAE,0BAA0B,GACrC,CAAC;IACa,WAAW,GAAG,KAAK,CAAuC,IAAI,wDAC5E,SAAS,EAAE,6BAA6B,GACxC,CAAC;IACa,QAAQ,GAAG,KAAK,CAA4B,KAAK,qDAC/D,SAAS,EAAE,gBAAgB,GAC3B,CAAC;IACa,IAAI,GAAG,KAAK,CAAgB,IAAI,gDAAC,CAAC;IAClC,IAAI,GAAG,KAAK,CAAgB,SAAS,gDAAC,CAAC;IACvC,IAAI,GAAG,KAAK,CAAe,QAAQ,gDAAC,CAAC;uGApB1C,kBAAkB;2FAAlB,kBAAkB,0uCCnB/B,4XAeA,i1DDAY,iBAAiB;;2FAIhB,kBAAkB;kBAN9B,SAAS;+BACE,YAAY,WACb,CAAC,iBAAiB,CAAC;;AA0B9B,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,CAAC","sourcesContent":["import { booleanAttribute, Component, input } from '@angular/core';\nimport {\n coerceTngPressAriaHasPopup,\n coerceTngPressNullableBoolean,\n TngPress as TngPressPrimitive,\n} from '@tailng-ui/primitives';\nimport type { TngPressAriaHasPopup, TngPressType } from '@tailng-ui/primitives';\n\ntype NullableBooleanInput = boolean | null | string | undefined;\nexport type TngButtonAppearance = 'ghost' | 'outline' | 'solid';\nexport type TngButtonSize = 'lg' | 'md' | 'sm';\nexport type TngButtonTone = 'danger' | 'neutral' | 'primary' | 'success';\n\n@Component({\n selector: 'tng-button',\n imports: [TngPressPrimitive],\n templateUrl: './tng-button.component.html',\n styleUrl: './tng-button.component.css',\n})\nexport class TngButtonComponent {\n public readonly appearance = input<TngButtonAppearance>('solid');\n public readonly ariaControls = input<string | null>(null);\n public readonly ariaExpanded = input<boolean | null, NullableBooleanInput>(null, {\n transform: coerceTngPressNullableBoolean,\n });\n public readonly ariaHasPopup = input<\n TngPressAriaHasPopup | null,\n boolean | null | string | undefined\n >(null, {\n transform: coerceTngPressAriaHasPopup,\n });\n public readonly ariaPressed = input<boolean | null, NullableBooleanInput>(null, {\n transform: coerceTngPressNullableBoolean,\n });\n public readonly disabled = input<boolean, boolean | string>(false, {\n transform: booleanAttribute,\n });\n public readonly size = input<TngButtonSize>('md');\n public readonly tone = input<TngButtonTone>('primary');\n public readonly type = input<TngPressType>('button');\n}\nexport { TngButtonComponent as TngButton };\n","<button\n tngPress\n class=\"tng-button\"\n [type]=\"type()\"\n [disabled]=\"disabled()\"\n [ariaControls]=\"ariaControls()\"\n [ariaExpanded]=\"ariaExpanded()\"\n [ariaHasPopup]=\"ariaHasPopup()\"\n [ariaPressed]=\"ariaPressed()\"\n [attr.data-appearance]=\"appearance()\"\n [attr.data-size]=\"size()\"\n [attr.data-tone]=\"tone()\"\n>\n <ng-content />\n</button>\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type OnDestroy } from '@angular/core';
|
|
2
2
|
import { type SafeHtml } from '@angular/platform-browser';
|
|
3
3
|
import type { TngCopyErrorEvent, TngCopyEvent, TngCopySuccessEvent } from '@tailng-ui/primitives';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
4
5
|
export type TngCodeBlockCopyMode = boolean | 'auto';
|
|
5
6
|
export type TngCodeBlockHighlightLineInput = number | readonly [number, number];
|
|
6
7
|
export type TngCodeBlockHighlightMode = 'auto' | 'off' | 'on';
|
|
@@ -114,5 +115,8 @@ export declare class TngCodeBlockComponent implements OnDestroy {
|
|
|
114
115
|
private shouldIncludeLineWrappers;
|
|
115
116
|
private toHighlightRequest;
|
|
116
117
|
private renderRequest;
|
|
118
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TngCodeBlockComponent, never>;
|
|
119
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TngCodeBlockComponent, "tng-code-block", never, { "adapter": { "alias": "adapter"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "code": { "alias": "code"; "required": false; "isSignal": true; }; "copyMode": { "alias": "copy"; "required": false; "isSignal": true; }; "copyLabel": { "alias": "copyLabel"; "required": false; "isSignal": true; }; "copiedLabel": { "alias": "copiedLabel"; "required": false; "isSignal": true; }; "copyResetDuration": { "alias": "copyResetDuration"; "required": false; "isSignal": true; }; "copySuccessDurationMs": { "alias": "copySuccessDurationMs"; "required": false; "isSignal": true; }; "copyText": { "alias": "copyText"; "required": false; "isSignal": true; }; "errorLabel": { "alias": "errorLabel"; "required": false; "isSignal": true; }; "focusLines": { "alias": "focusLines"; "required": false; "isSignal": true; }; "highlight": { "alias": "highlight"; "required": false; "isSignal": true; }; "highlightDebounceMs": { "alias": "highlightDebounceMs"; "required": false; "isSignal": true; }; "highlightLines": { "alias": "highlightLines"; "required": false; "isSignal": true; }; "highlightMode": { "alias": "highlightMode"; "required": false; "isSignal": true; }; "language": { "alias": "language"; "required": false; "isSignal": true; }; "lineNumbersMode": { "alias": "lineNumbers"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "sanitizeHtml": { "alias": "sanitizeHtml"; "required": false; "isSignal": true; }; "showHeader": { "alias": "showHeader"; "required": false; "isSignal": true; }; "showLanguageBadge": { "alias": "showLanguageBadge"; "required": false; "isSignal": true; }; "showLineNumbers": { "alias": "showLineNumbers"; "required": false; "isSignal": true; }; "startingLineNumber": { "alias": "startingLineNumber"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; }, { "copy": "copy"; "copyError": "copyError"; "copySuccess": "copySuccess"; "renderStateChange": "renderStateChange"; "tngCopied": "tngCopied"; "tngCopyError": "tngCopyError"; }, never, never, true, never>;
|
|
117
120
|
}
|
|
121
|
+
export { TngCodeBlockComponent as TngCodeBlock };
|
|
118
122
|
//# sourceMappingURL=tng-code-block.component.d.ts.map
|