@teranga-ds/components 0.1.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/LICENSE +21 -0
- package/README.md +97 -0
- package/dist/cjs/index-BrBjyHdB.js +2038 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/cjs/teranga-ds.cjs.js +24 -0
- package/dist/cjs/tg-activity-feed.cjs.entry.js +29 -0
- package/dist/cjs/tg-activity-stream.cjs.entry.js +30 -0
- package/dist/cjs/tg-ai-feedback.cjs.entry.js +29 -0
- package/dist/cjs/tg-ai-insight-card.cjs.entry.js +20 -0
- package/dist/cjs/tg-alert.cjs.entry.js +42 -0
- package/dist/cjs/tg-audio-player.cjs.entry.js +46 -0
- package/dist/cjs/tg-autocomplete.cjs.entry.js +54 -0
- package/dist/cjs/tg-avatar.cjs.entry.js +39 -0
- package/dist/cjs/tg-badge.cjs.entry.js +31 -0
- package/dist/cjs/tg-bottom-nav.cjs.entry.js +30 -0
- package/dist/cjs/tg-bottom-sheet.cjs.entry.js +21 -0
- package/dist/cjs/tg-breadcrumb.cjs.entry.js +53 -0
- package/dist/cjs/tg-button.cjs.entry.js +45 -0
- package/dist/cjs/tg-calendar-view.cjs.entry.js +53 -0
- package/dist/cjs/tg-card.cjs.entry.js +31 -0
- package/dist/cjs/tg-chat-message.cjs.entry.js +19 -0
- package/dist/cjs/tg-chat.cjs.entry.js +59 -0
- package/dist/cjs/tg-checkbox.cjs.entry.js +31 -0
- package/dist/cjs/tg-combobox.cjs.entry.js +68 -0
- package/dist/cjs/tg-command-palette.cjs.entry.js +66 -0
- package/dist/cjs/tg-confidence-badge.cjs.entry.js +27 -0
- package/dist/cjs/tg-confirm-dialog.cjs.entry.js +27 -0
- package/dist/cjs/tg-context-menu.cjs.entry.js +35 -0
- package/dist/cjs/tg-data-table.cjs.entry.js +90 -0
- package/dist/cjs/tg-date-picker.cjs.entry.js +56 -0
- package/dist/cjs/tg-empty-state.cjs.entry.js +19 -0
- package/dist/cjs/tg-expandable-row.cjs.entry.js +19 -0
- package/dist/cjs/tg-fab.cjs.entry.js +22 -0
- package/dist/cjs/tg-file-upload.cjs.entry.js +86 -0
- package/dist/cjs/tg-global-loader.cjs.entry.js +24 -0
- package/dist/cjs/tg-heatmap.cjs.entry.js +65 -0
- package/dist/cjs/tg-image-gallery.cjs.entry.js +32 -0
- package/dist/cjs/tg-input.cjs.entry.js +51 -0
- package/dist/cjs/tg-kanban-board.cjs.entry.js +30 -0
- package/dist/cjs/tg-kpi-card.cjs.entry.js +20 -0
- package/dist/cjs/tg-live-badge.cjs.entry.js +20 -0
- package/dist/cjs/tg-login-form.cjs.entry.js +23 -0
- package/dist/cjs/tg-mega-menu.cjs.entry.js +34 -0
- package/dist/cjs/tg-modal.cjs.entry.js +43 -0
- package/dist/cjs/tg-model-selector.cjs.entry.js +34 -0
- package/dist/cjs/tg-multi-select.cjs.entry.js +67 -0
- package/dist/cjs/tg-navbar.cjs.entry.js +43 -0
- package/dist/cjs/tg-otp-input.cjs.entry.js +60 -0
- package/dist/cjs/tg-pagination.cjs.entry.js +53 -0
- package/dist/cjs/tg-presence-indicator.cjs.entry.js +33 -0
- package/dist/cjs/tg-progress.cjs.entry.js +53 -0
- package/dist/cjs/tg-prompt-input.cjs.entry.js +34 -0
- package/dist/cjs/tg-pull-to-refresh.cjs.entry.js +37 -0
- package/dist/cjs/tg-quick-switcher.cjs.entry.js +35 -0
- package/dist/cjs/tg-radio.cjs.entry.js +29 -0
- package/dist/cjs/tg-retry-ui.cjs.entry.js +22 -0
- package/dist/cjs/tg-rich-editor.cjs.entry.js +24 -0
- package/dist/cjs/tg-role-badge.cjs.entry.js +19 -0
- package/dist/cjs/tg-select.cjs.entry.js +69 -0
- package/dist/cjs/tg-session-expired.cjs.entry.js +24 -0
- package/dist/cjs/tg-sidebar.cjs.entry.js +35 -0
- package/dist/cjs/tg-skeleton.cjs.entry.js +30 -0
- package/dist/cjs/tg-slider.cjs.entry.js +26 -0
- package/dist/cjs/tg-source-citation.cjs.entry.js +29 -0
- package/dist/cjs/tg-spinner.cjs.entry.js +27 -0
- package/dist/cjs/tg-stat-widget.cjs.entry.js +19 -0
- package/dist/cjs/tg-status-badge.cjs.entry.js +21 -0
- package/dist/cjs/tg-stepper-input.cjs.entry.js +39 -0
- package/dist/cjs/tg-stepper.cjs.entry.js +31 -0
- package/dist/cjs/tg-streaming-response.cjs.entry.js +19 -0
- package/dist/cjs/tg-switch.cjs.entry.js +31 -0
- package/dist/cjs/tg-table.cjs.entry.js +113 -0
- package/dist/cjs/tg-tabs.cjs.entry.js +47 -0
- package/dist/cjs/tg-tag.cjs.entry.js +28 -0
- package/dist/cjs/tg-textarea.cjs.entry.js +45 -0
- package/dist/cjs/tg-time-picker.cjs.entry.js +37 -0
- package/dist/cjs/tg-timeline.cjs.entry.js +30 -0
- package/dist/cjs/tg-toast.cjs.entry.js +53 -0
- package/dist/cjs/tg-token-usage.cjs.entry.js +23 -0
- package/dist/cjs/tg-tooltip.cjs.entry.js +32 -0
- package/dist/cjs/tg-tree-view.cjs.entry.js +53 -0
- package/dist/cjs/tg-undo-snackbar.cjs.entry.js +30 -0
- package/dist/cjs/tg-video-player.cjs.entry.js +19 -0
- package/dist/cjs/tg-wizard-nav.cjs.entry.js +30 -0
- package/dist/collection/collection-manifest.json +91 -0
- package/dist/collection/components/tg-activity-feed/tg-activity-feed.css +10 -0
- package/dist/collection/components/tg-activity-feed/tg-activity-feed.js +81 -0
- package/dist/collection/components/tg-activity-stream/tg-activity-stream.css +11 -0
- package/dist/collection/components/tg-activity-stream/tg-activity-stream.js +83 -0
- package/dist/collection/components/tg-ai-feedback/tg-ai-feedback.css +12 -0
- package/dist/collection/components/tg-ai-feedback/tg-ai-feedback.js +80 -0
- package/dist/collection/components/tg-ai-insight-card/tg-ai-insight-card.css +10 -0
- package/dist/collection/components/tg-ai-insight-card/tg-ai-insight-card.js +144 -0
- package/dist/collection/components/tg-alert/tg-alert.css +122 -0
- package/dist/collection/components/tg-alert/tg-alert.js +142 -0
- package/dist/collection/components/tg-audio-player/tg-audio-player.css +11 -0
- package/dist/collection/components/tg-audio-player/tg-audio-player.js +118 -0
- package/dist/collection/components/tg-autocomplete/tg-autocomplete.css +15 -0
- package/dist/collection/components/tg-autocomplete/tg-autocomplete.js +285 -0
- package/dist/collection/components/tg-avatar/tg-avatar.css +72 -0
- package/dist/collection/components/tg-avatar/tg-avatar.js +195 -0
- package/dist/collection/components/tg-badge/tg-badge.css +153 -0
- package/dist/collection/components/tg-badge/tg-badge.js +128 -0
- package/dist/collection/components/tg-bottom-nav/tg-bottom-nav.css +7 -0
- package/dist/collection/components/tg-bottom-nav/tg-bottom-nav.js +99 -0
- package/dist/collection/components/tg-bottom-sheet/tg-bottom-sheet.css +8 -0
- package/dist/collection/components/tg-bottom-sheet/tg-bottom-sheet.js +84 -0
- package/dist/collection/components/tg-breadcrumb/tg-breadcrumb.css +82 -0
- package/dist/collection/components/tg-breadcrumb/tg-breadcrumb.js +111 -0
- package/dist/collection/components/tg-button/tg-button.css +245 -0
- package/dist/collection/components/tg-button/tg-button.js +239 -0
- package/dist/collection/components/tg-calendar-view/tg-calendar-view.css +19 -0
- package/dist/collection/components/tg-calendar-view/tg-calendar-view.js +108 -0
- package/dist/collection/components/tg-card/tg-card.css +117 -0
- package/dist/collection/components/tg-card/tg-card.js +134 -0
- package/dist/collection/components/tg-chat/tg-chat.css +207 -0
- package/dist/collection/components/tg-chat/tg-chat.js +194 -0
- package/dist/collection/components/tg-chat-message/tg-chat-message.css +15 -0
- package/dist/collection/components/tg-chat-message/tg-chat-message.js +104 -0
- package/dist/collection/components/tg-checkbox/tg-checkbox.css +94 -0
- package/dist/collection/components/tg-checkbox/tg-checkbox.js +210 -0
- package/dist/collection/components/tg-combobox/tg-combobox.css +22 -0
- package/dist/collection/components/tg-combobox/tg-combobox.js +290 -0
- package/dist/collection/components/tg-command-palette/tg-command-palette.css +16 -0
- package/dist/collection/components/tg-command-palette/tg-command-palette.js +152 -0
- package/dist/collection/components/tg-confidence-badge/tg-confidence-badge.css +12 -0
- package/dist/collection/components/tg-confidence-badge/tg-confidence-badge.js +93 -0
- package/dist/collection/components/tg-confirm-dialog/tg-confirm-dialog.css +19 -0
- package/dist/collection/components/tg-confirm-dialog/tg-confirm-dialog.js +204 -0
- package/dist/collection/components/tg-context-menu/tg-context-menu.css +12 -0
- package/dist/collection/components/tg-context-menu/tg-context-menu.js +107 -0
- package/dist/collection/components/tg-data-table/tg-data-table.css +19 -0
- package/dist/collection/components/tg-data-table/tg-data-table.js +287 -0
- package/dist/collection/components/tg-date-picker/tg-date-picker.css +28 -0
- package/dist/collection/components/tg-date-picker/tg-date-picker.js +251 -0
- package/dist/collection/components/tg-empty-state/tg-empty-state.css +7 -0
- package/dist/collection/components/tg-empty-state/tg-empty-state.js +123 -0
- package/dist/collection/components/tg-expandable-row/tg-expandable-row.css +13 -0
- package/dist/collection/components/tg-expandable-row/tg-expandable-row.js +89 -0
- package/dist/collection/components/tg-fab/tg-fab.css +16 -0
- package/dist/collection/components/tg-fab/tg-fab.js +164 -0
- package/dist/collection/components/tg-file-upload/tg-file-upload.css +172 -0
- package/dist/collection/components/tg-file-upload/tg-file-upload.js +240 -0
- package/dist/collection/components/tg-global-loader/tg-global-loader.css +8 -0
- package/dist/collection/components/tg-global-loader/tg-global-loader.js +90 -0
- package/dist/collection/components/tg-heatmap/tg-heatmap.css +9 -0
- package/dist/collection/components/tg-heatmap/tg-heatmap.js +191 -0
- package/dist/collection/components/tg-image-gallery/tg-image-gallery.css +13 -0
- package/dist/collection/components/tg-image-gallery/tg-image-gallery.js +90 -0
- package/dist/collection/components/tg-input/tg-input.css +164 -0
- package/dist/collection/components/tg-input/tg-input.js +355 -0
- package/dist/collection/components/tg-kanban-board/tg-kanban-board.css +14 -0
- package/dist/collection/components/tg-kanban-board/tg-kanban-board.js +80 -0
- package/dist/collection/components/tg-kpi-card/tg-kpi-card.css +17 -0
- package/dist/collection/components/tg-kpi-card/tg-kpi-card.js +163 -0
- package/dist/collection/components/tg-live-badge/tg-live-badge.css +11 -0
- package/dist/collection/components/tg-live-badge/tg-live-badge.js +87 -0
- package/dist/collection/components/tg-login-form/tg-login-form.css +16 -0
- package/dist/collection/components/tg-login-form/tg-login-form.js +150 -0
- package/dist/collection/components/tg-mega-menu/tg-mega-menu.css +19 -0
- package/dist/collection/components/tg-mega-menu/tg-mega-menu.js +82 -0
- package/dist/collection/components/tg-modal/tg-modal.css +132 -0
- package/dist/collection/components/tg-modal/tg-modal.js +180 -0
- package/dist/collection/components/tg-model-selector/tg-model-selector.css +15 -0
- package/dist/collection/components/tg-model-selector/tg-model-selector.js +117 -0
- package/dist/collection/components/tg-multi-select/tg-multi-select.css +22 -0
- package/dist/collection/components/tg-multi-select/tg-multi-select.js +251 -0
- package/dist/collection/components/tg-navbar/tg-navbar.css +144 -0
- package/dist/collection/components/tg-navbar/tg-navbar.js +159 -0
- package/dist/collection/components/tg-otp-input/tg-otp-input.css +10 -0
- package/dist/collection/components/tg-otp-input/tg-otp-input.js +221 -0
- package/dist/collection/components/tg-pagination/tg-pagination.css +73 -0
- package/dist/collection/components/tg-pagination/tg-pagination.js +137 -0
- package/dist/collection/components/tg-presence-indicator/tg-presence-indicator.css +10 -0
- package/dist/collection/components/tg-presence-indicator/tg-presence-indicator.js +80 -0
- package/dist/collection/components/tg-progress/tg-progress.css +142 -0
- package/dist/collection/components/tg-progress/tg-progress.js +299 -0
- package/dist/collection/components/tg-prompt-input/tg-prompt-input.css +11 -0
- package/dist/collection/components/tg-prompt-input/tg-prompt-input.js +142 -0
- package/dist/collection/components/tg-pull-to-refresh/tg-pull-to-refresh.css +7 -0
- package/dist/collection/components/tg-pull-to-refresh/tg-pull-to-refresh.js +127 -0
- package/dist/collection/components/tg-quick-switcher/tg-quick-switcher.css +12 -0
- package/dist/collection/components/tg-quick-switcher/tg-quick-switcher.js +120 -0
- package/dist/collection/components/tg-radio/tg-radio.css +83 -0
- package/dist/collection/components/tg-radio/tg-radio.js +169 -0
- package/dist/collection/components/tg-retry-ui/tg-retry-ui.css +10 -0
- package/dist/collection/components/tg-retry-ui/tg-retry-ui.js +145 -0
- package/dist/collection/components/tg-rich-editor/tg-rich-editor.css +10 -0
- package/dist/collection/components/tg-rich-editor/tg-rich-editor.js +151 -0
- package/dist/collection/components/tg-role-badge/tg-role-badge.css +7 -0
- package/dist/collection/components/tg-role-badge/tg-role-badge.js +85 -0
- package/dist/collection/components/tg-select/tg-select.css +144 -0
- package/dist/collection/components/tg-select/tg-select.js +329 -0
- package/dist/collection/components/tg-session-expired/tg-session-expired.css +8 -0
- package/dist/collection/components/tg-session-expired/tg-session-expired.js +128 -0
- package/dist/collection/components/tg-sidebar/tg-sidebar.css +188 -0
- package/dist/collection/components/tg-sidebar/tg-sidebar.js +112 -0
- package/dist/collection/components/tg-skeleton/tg-skeleton.css +58 -0
- package/dist/collection/components/tg-skeleton/tg-skeleton.js +135 -0
- package/dist/collection/components/tg-slider/tg-slider.css +10 -0
- package/dist/collection/components/tg-slider/tg-slider.js +208 -0
- package/dist/collection/components/tg-source-citation/tg-source-citation.css +12 -0
- package/dist/collection/components/tg-source-citation/tg-source-citation.js +56 -0
- package/dist/collection/components/tg-spinner/tg-spinner.css +50 -0
- package/dist/collection/components/tg-spinner/tg-spinner.js +101 -0
- package/dist/collection/components/tg-stat-widget/tg-stat-widget.css +12 -0
- package/dist/collection/components/tg-stat-widget/tg-stat-widget.js +142 -0
- package/dist/collection/components/tg-status-badge/tg-status-badge.css +24 -0
- package/dist/collection/components/tg-status-badge/tg-status-badge.js +108 -0
- package/dist/collection/components/tg-stepper/tg-stepper.css +17 -0
- package/dist/collection/components/tg-stepper/tg-stepper.js +104 -0
- package/dist/collection/components/tg-stepper-input/tg-stepper-input.css +15 -0
- package/dist/collection/components/tg-stepper-input/tg-stepper-input.js +200 -0
- package/dist/collection/components/tg-streaming-response/tg-streaming-response.css +12 -0
- package/dist/collection/components/tg-streaming-response/tg-streaming-response.js +104 -0
- package/dist/collection/components/tg-switch/tg-switch.css +89 -0
- package/dist/collection/components/tg-switch/tg-switch.js +172 -0
- package/dist/collection/components/tg-table/tg-table.css +117 -0
- package/dist/collection/components/tg-table/tg-table.js +289 -0
- package/dist/collection/components/tg-tabs/tg-tabs.css +114 -0
- package/dist/collection/components/tg-tabs/tg-tabs.js +141 -0
- package/dist/collection/components/tg-tag/tg-tag.css +76 -0
- package/dist/collection/components/tg-tag/tg-tag.js +152 -0
- package/dist/collection/components/tg-textarea/tg-textarea.css +105 -0
- package/dist/collection/components/tg-textarea/tg-textarea.js +357 -0
- package/dist/collection/components/tg-time-picker/tg-time-picker.css +15 -0
- package/dist/collection/components/tg-time-picker/tg-time-picker.js +213 -0
- package/dist/collection/components/tg-timeline/tg-timeline.css +14 -0
- package/dist/collection/components/tg-timeline/tg-timeline.js +83 -0
- package/dist/collection/components/tg-toast/tg-toast.css +112 -0
- package/dist/collection/components/tg-toast/tg-toast.js +181 -0
- package/dist/collection/components/tg-token-usage/tg-token-usage.css +14 -0
- package/dist/collection/components/tg-token-usage/tg-token-usage.js +129 -0
- package/dist/collection/components/tg-tooltip/tg-tooltip.css +93 -0
- package/dist/collection/components/tg-tooltip/tg-tooltip.js +104 -0
- package/dist/collection/components/tg-tree-view/tg-tree-view.css +10 -0
- package/dist/collection/components/tg-tree-view/tg-tree-view.js +112 -0
- package/dist/collection/components/tg-undo-snackbar/tg-undo-snackbar.css +8 -0
- package/dist/collection/components/tg-undo-snackbar/tg-undo-snackbar.js +148 -0
- package/dist/collection/components/tg-video-player/tg-video-player.css +6 -0
- package/dist/collection/components/tg-video-player/tg-video-player.js +104 -0
- package/dist/collection/components/tg-wizard-nav/tg-wizard-nav.css +14 -0
- package/dist/collection/components/tg-wizard-nav/tg-wizard-nav.js +202 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/teranga-tokens.css +189 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-BWkBF3Ng.js +1 -0
- package/dist/components/p-DcG1qXzH.js +1 -0
- package/dist/components/tg-activity-feed.d.ts +11 -0
- package/dist/components/tg-activity-feed.js +1 -0
- package/dist/components/tg-activity-stream.d.ts +11 -0
- package/dist/components/tg-activity-stream.js +1 -0
- package/dist/components/tg-ai-feedback.d.ts +11 -0
- package/dist/components/tg-ai-feedback.js +1 -0
- package/dist/components/tg-ai-insight-card.d.ts +11 -0
- package/dist/components/tg-ai-insight-card.js +1 -0
- package/dist/components/tg-alert.d.ts +11 -0
- package/dist/components/tg-alert.js +1 -0
- package/dist/components/tg-audio-player.d.ts +11 -0
- package/dist/components/tg-audio-player.js +1 -0
- package/dist/components/tg-autocomplete.d.ts +11 -0
- package/dist/components/tg-autocomplete.js +1 -0
- package/dist/components/tg-avatar.d.ts +11 -0
- package/dist/components/tg-avatar.js +1 -0
- package/dist/components/tg-badge.d.ts +11 -0
- package/dist/components/tg-badge.js +1 -0
- package/dist/components/tg-bottom-nav.d.ts +11 -0
- package/dist/components/tg-bottom-nav.js +1 -0
- package/dist/components/tg-bottom-sheet.d.ts +11 -0
- package/dist/components/tg-bottom-sheet.js +1 -0
- package/dist/components/tg-breadcrumb.d.ts +11 -0
- package/dist/components/tg-breadcrumb.js +1 -0
- package/dist/components/tg-button.d.ts +11 -0
- package/dist/components/tg-button.js +1 -0
- package/dist/components/tg-calendar-view.d.ts +11 -0
- package/dist/components/tg-calendar-view.js +1 -0
- package/dist/components/tg-card.d.ts +11 -0
- package/dist/components/tg-card.js +1 -0
- package/dist/components/tg-chat-message.d.ts +11 -0
- package/dist/components/tg-chat-message.js +1 -0
- package/dist/components/tg-chat.d.ts +11 -0
- package/dist/components/tg-chat.js +1 -0
- package/dist/components/tg-checkbox.d.ts +11 -0
- package/dist/components/tg-checkbox.js +1 -0
- package/dist/components/tg-combobox.d.ts +11 -0
- package/dist/components/tg-combobox.js +1 -0
- package/dist/components/tg-command-palette.d.ts +11 -0
- package/dist/components/tg-command-palette.js +1 -0
- package/dist/components/tg-confidence-badge.d.ts +11 -0
- package/dist/components/tg-confidence-badge.js +1 -0
- package/dist/components/tg-confirm-dialog.d.ts +11 -0
- package/dist/components/tg-confirm-dialog.js +1 -0
- package/dist/components/tg-context-menu.d.ts +11 -0
- package/dist/components/tg-context-menu.js +1 -0
- package/dist/components/tg-data-table.d.ts +11 -0
- package/dist/components/tg-data-table.js +1 -0
- package/dist/components/tg-date-picker.d.ts +11 -0
- package/dist/components/tg-date-picker.js +1 -0
- package/dist/components/tg-empty-state.d.ts +11 -0
- package/dist/components/tg-empty-state.js +1 -0
- package/dist/components/tg-expandable-row.d.ts +11 -0
- package/dist/components/tg-expandable-row.js +1 -0
- package/dist/components/tg-fab.d.ts +11 -0
- package/dist/components/tg-fab.js +1 -0
- package/dist/components/tg-file-upload.d.ts +11 -0
- package/dist/components/tg-file-upload.js +1 -0
- package/dist/components/tg-global-loader.d.ts +11 -0
- package/dist/components/tg-global-loader.js +1 -0
- package/dist/components/tg-heatmap.d.ts +11 -0
- package/dist/components/tg-heatmap.js +1 -0
- package/dist/components/tg-image-gallery.d.ts +11 -0
- package/dist/components/tg-image-gallery.js +1 -0
- package/dist/components/tg-input.d.ts +11 -0
- package/dist/components/tg-input.js +1 -0
- package/dist/components/tg-kanban-board.d.ts +11 -0
- package/dist/components/tg-kanban-board.js +1 -0
- package/dist/components/tg-kpi-card.d.ts +11 -0
- package/dist/components/tg-kpi-card.js +1 -0
- package/dist/components/tg-live-badge.d.ts +11 -0
- package/dist/components/tg-live-badge.js +1 -0
- package/dist/components/tg-login-form.d.ts +11 -0
- package/dist/components/tg-login-form.js +1 -0
- package/dist/components/tg-mega-menu.d.ts +11 -0
- package/dist/components/tg-mega-menu.js +1 -0
- package/dist/components/tg-modal.d.ts +11 -0
- package/dist/components/tg-modal.js +1 -0
- package/dist/components/tg-model-selector.d.ts +11 -0
- package/dist/components/tg-model-selector.js +1 -0
- package/dist/components/tg-multi-select.d.ts +11 -0
- package/dist/components/tg-multi-select.js +1 -0
- package/dist/components/tg-navbar.d.ts +11 -0
- package/dist/components/tg-navbar.js +1 -0
- package/dist/components/tg-otp-input.d.ts +11 -0
- package/dist/components/tg-otp-input.js +1 -0
- package/dist/components/tg-pagination.d.ts +11 -0
- package/dist/components/tg-pagination.js +1 -0
- package/dist/components/tg-presence-indicator.d.ts +11 -0
- package/dist/components/tg-presence-indicator.js +1 -0
- package/dist/components/tg-progress.d.ts +11 -0
- package/dist/components/tg-progress.js +1 -0
- package/dist/components/tg-prompt-input.d.ts +11 -0
- package/dist/components/tg-prompt-input.js +1 -0
- package/dist/components/tg-pull-to-refresh.d.ts +11 -0
- package/dist/components/tg-pull-to-refresh.js +1 -0
- package/dist/components/tg-quick-switcher.d.ts +11 -0
- package/dist/components/tg-quick-switcher.js +1 -0
- package/dist/components/tg-radio.d.ts +11 -0
- package/dist/components/tg-radio.js +1 -0
- package/dist/components/tg-retry-ui.d.ts +11 -0
- package/dist/components/tg-retry-ui.js +1 -0
- package/dist/components/tg-rich-editor.d.ts +11 -0
- package/dist/components/tg-rich-editor.js +1 -0
- package/dist/components/tg-role-badge.d.ts +11 -0
- package/dist/components/tg-role-badge.js +1 -0
- package/dist/components/tg-select.d.ts +11 -0
- package/dist/components/tg-select.js +1 -0
- package/dist/components/tg-session-expired.d.ts +11 -0
- package/dist/components/tg-session-expired.js +1 -0
- package/dist/components/tg-sidebar.d.ts +11 -0
- package/dist/components/tg-sidebar.js +1 -0
- package/dist/components/tg-skeleton.d.ts +11 -0
- package/dist/components/tg-skeleton.js +1 -0
- package/dist/components/tg-slider.d.ts +11 -0
- package/dist/components/tg-slider.js +1 -0
- package/dist/components/tg-source-citation.d.ts +11 -0
- package/dist/components/tg-source-citation.js +1 -0
- package/dist/components/tg-spinner.d.ts +11 -0
- package/dist/components/tg-spinner.js +1 -0
- package/dist/components/tg-stat-widget.d.ts +11 -0
- package/dist/components/tg-stat-widget.js +1 -0
- package/dist/components/tg-status-badge.d.ts +11 -0
- package/dist/components/tg-status-badge.js +1 -0
- package/dist/components/tg-stepper-input.d.ts +11 -0
- package/dist/components/tg-stepper-input.js +1 -0
- package/dist/components/tg-stepper.d.ts +11 -0
- package/dist/components/tg-stepper.js +1 -0
- package/dist/components/tg-streaming-response.d.ts +11 -0
- package/dist/components/tg-streaming-response.js +1 -0
- package/dist/components/tg-switch.d.ts +11 -0
- package/dist/components/tg-switch.js +1 -0
- package/dist/components/tg-table.d.ts +11 -0
- package/dist/components/tg-table.js +1 -0
- package/dist/components/tg-tabs.d.ts +11 -0
- package/dist/components/tg-tabs.js +1 -0
- package/dist/components/tg-tag.d.ts +11 -0
- package/dist/components/tg-tag.js +1 -0
- package/dist/components/tg-textarea.d.ts +11 -0
- package/dist/components/tg-textarea.js +1 -0
- package/dist/components/tg-time-picker.d.ts +11 -0
- package/dist/components/tg-time-picker.js +1 -0
- package/dist/components/tg-timeline.d.ts +11 -0
- package/dist/components/tg-timeline.js +1 -0
- package/dist/components/tg-toast.d.ts +11 -0
- package/dist/components/tg-toast.js +1 -0
- package/dist/components/tg-token-usage.d.ts +11 -0
- package/dist/components/tg-token-usage.js +1 -0
- package/dist/components/tg-tooltip.d.ts +11 -0
- package/dist/components/tg-tooltip.js +1 -0
- package/dist/components/tg-tree-view.d.ts +11 -0
- package/dist/components/tg-tree-view.js +1 -0
- package/dist/components/tg-undo-snackbar.d.ts +11 -0
- package/dist/components/tg-undo-snackbar.js +1 -0
- package/dist/components/tg-video-player.d.ts +11 -0
- package/dist/components/tg-video-player.js +1 -0
- package/dist/components/tg-wizard-nav.d.ts +11 -0
- package/dist/components/tg-wizard-nav.js +1 -0
- package/dist/docs.d.ts +480 -0
- package/dist/docs.json +14240 -0
- package/dist/esm/index-CXqO9vvj.js +2010 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +10 -0
- package/dist/esm/teranga-ds.js +20 -0
- package/dist/esm/tg-activity-feed.entry.js +27 -0
- package/dist/esm/tg-activity-stream.entry.js +28 -0
- package/dist/esm/tg-ai-feedback.entry.js +27 -0
- package/dist/esm/tg-ai-insight-card.entry.js +18 -0
- package/dist/esm/tg-alert.entry.js +40 -0
- package/dist/esm/tg-audio-player.entry.js +44 -0
- package/dist/esm/tg-autocomplete.entry.js +52 -0
- package/dist/esm/tg-avatar.entry.js +37 -0
- package/dist/esm/tg-badge.entry.js +29 -0
- package/dist/esm/tg-bottom-nav.entry.js +28 -0
- package/dist/esm/tg-bottom-sheet.entry.js +19 -0
- package/dist/esm/tg-breadcrumb.entry.js +51 -0
- package/dist/esm/tg-button.entry.js +43 -0
- package/dist/esm/tg-calendar-view.entry.js +51 -0
- package/dist/esm/tg-card.entry.js +29 -0
- package/dist/esm/tg-chat-message.entry.js +17 -0
- package/dist/esm/tg-chat.entry.js +57 -0
- package/dist/esm/tg-checkbox.entry.js +29 -0
- package/dist/esm/tg-combobox.entry.js +66 -0
- package/dist/esm/tg-command-palette.entry.js +64 -0
- package/dist/esm/tg-confidence-badge.entry.js +25 -0
- package/dist/esm/tg-confirm-dialog.entry.js +25 -0
- package/dist/esm/tg-context-menu.entry.js +33 -0
- package/dist/esm/tg-data-table.entry.js +88 -0
- package/dist/esm/tg-date-picker.entry.js +54 -0
- package/dist/esm/tg-empty-state.entry.js +17 -0
- package/dist/esm/tg-expandable-row.entry.js +17 -0
- package/dist/esm/tg-fab.entry.js +20 -0
- package/dist/esm/tg-file-upload.entry.js +84 -0
- package/dist/esm/tg-global-loader.entry.js +22 -0
- package/dist/esm/tg-heatmap.entry.js +63 -0
- package/dist/esm/tg-image-gallery.entry.js +30 -0
- package/dist/esm/tg-input.entry.js +49 -0
- package/dist/esm/tg-kanban-board.entry.js +28 -0
- package/dist/esm/tg-kpi-card.entry.js +18 -0
- package/dist/esm/tg-live-badge.entry.js +18 -0
- package/dist/esm/tg-login-form.entry.js +21 -0
- package/dist/esm/tg-mega-menu.entry.js +32 -0
- package/dist/esm/tg-modal.entry.js +41 -0
- package/dist/esm/tg-model-selector.entry.js +32 -0
- package/dist/esm/tg-multi-select.entry.js +65 -0
- package/dist/esm/tg-navbar.entry.js +41 -0
- package/dist/esm/tg-otp-input.entry.js +58 -0
- package/dist/esm/tg-pagination.entry.js +51 -0
- package/dist/esm/tg-presence-indicator.entry.js +31 -0
- package/dist/esm/tg-progress.entry.js +51 -0
- package/dist/esm/tg-prompt-input.entry.js +32 -0
- package/dist/esm/tg-pull-to-refresh.entry.js +35 -0
- package/dist/esm/tg-quick-switcher.entry.js +33 -0
- package/dist/esm/tg-radio.entry.js +27 -0
- package/dist/esm/tg-retry-ui.entry.js +20 -0
- package/dist/esm/tg-rich-editor.entry.js +22 -0
- package/dist/esm/tg-role-badge.entry.js +17 -0
- package/dist/esm/tg-select.entry.js +67 -0
- package/dist/esm/tg-session-expired.entry.js +22 -0
- package/dist/esm/tg-sidebar.entry.js +33 -0
- package/dist/esm/tg-skeleton.entry.js +28 -0
- package/dist/esm/tg-slider.entry.js +24 -0
- package/dist/esm/tg-source-citation.entry.js +27 -0
- package/dist/esm/tg-spinner.entry.js +25 -0
- package/dist/esm/tg-stat-widget.entry.js +17 -0
- package/dist/esm/tg-status-badge.entry.js +19 -0
- package/dist/esm/tg-stepper-input.entry.js +37 -0
- package/dist/esm/tg-stepper.entry.js +29 -0
- package/dist/esm/tg-streaming-response.entry.js +17 -0
- package/dist/esm/tg-switch.entry.js +29 -0
- package/dist/esm/tg-table.entry.js +111 -0
- package/dist/esm/tg-tabs.entry.js +45 -0
- package/dist/esm/tg-tag.entry.js +26 -0
- package/dist/esm/tg-textarea.entry.js +43 -0
- package/dist/esm/tg-time-picker.entry.js +35 -0
- package/dist/esm/tg-timeline.entry.js +28 -0
- package/dist/esm/tg-toast.entry.js +51 -0
- package/dist/esm/tg-token-usage.entry.js +21 -0
- package/dist/esm/tg-tooltip.entry.js +30 -0
- package/dist/esm/tg-tree-view.entry.js +51 -0
- package/dist/esm/tg-undo-snackbar.entry.js +28 -0
- package/dist/esm/tg-video-player.entry.js +17 -0
- package/dist/esm/tg-wizard-nav.entry.js +28 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/teranga-ds/index.esm.js +0 -0
- package/dist/teranga-ds/p-003a47ca.entry.js +1 -0
- package/dist/teranga-ds/p-017ddeb1.entry.js +1 -0
- package/dist/teranga-ds/p-02c5a12d.entry.js +1 -0
- package/dist/teranga-ds/p-0a42664a.entry.js +1 -0
- package/dist/teranga-ds/p-0b076dde.entry.js +1 -0
- package/dist/teranga-ds/p-0c4d9863.entry.js +1 -0
- package/dist/teranga-ds/p-0e8e624c.entry.js +1 -0
- package/dist/teranga-ds/p-188921a5.entry.js +1 -0
- package/dist/teranga-ds/p-1925d476.entry.js +1 -0
- package/dist/teranga-ds/p-19a4e248.entry.js +1 -0
- package/dist/teranga-ds/p-223af07c.entry.js +1 -0
- package/dist/teranga-ds/p-229331e3.entry.js +1 -0
- package/dist/teranga-ds/p-229a048d.entry.js +1 -0
- package/dist/teranga-ds/p-2537b595.entry.js +1 -0
- package/dist/teranga-ds/p-256c5686.entry.js +1 -0
- package/dist/teranga-ds/p-25af1fe1.entry.js +1 -0
- package/dist/teranga-ds/p-293e42b5.entry.js +1 -0
- package/dist/teranga-ds/p-29ce1cb3.entry.js +1 -0
- package/dist/teranga-ds/p-2bcf5c49.entry.js +1 -0
- package/dist/teranga-ds/p-2e8eb1cd.entry.js +1 -0
- package/dist/teranga-ds/p-321ec5a3.entry.js +1 -0
- package/dist/teranga-ds/p-34c8b3db.entry.js +1 -0
- package/dist/teranga-ds/p-3722c1c8.entry.js +1 -0
- package/dist/teranga-ds/p-386e978e.entry.js +1 -0
- package/dist/teranga-ds/p-45825e6c.entry.js +1 -0
- package/dist/teranga-ds/p-45d69cd2.entry.js +1 -0
- package/dist/teranga-ds/p-4ca63079.entry.js +1 -0
- package/dist/teranga-ds/p-4cdefae6.entry.js +1 -0
- package/dist/teranga-ds/p-4d3e0645.entry.js +1 -0
- package/dist/teranga-ds/p-5179d2e1.entry.js +1 -0
- package/dist/teranga-ds/p-5888f1d1.entry.js +1 -0
- package/dist/teranga-ds/p-58fd7fc1.entry.js +1 -0
- package/dist/teranga-ds/p-5b34ae37.entry.js +1 -0
- package/dist/teranga-ds/p-5cb3cab5.entry.js +1 -0
- package/dist/teranga-ds/p-5f64253e.entry.js +1 -0
- package/dist/teranga-ds/p-61bab799.entry.js +1 -0
- package/dist/teranga-ds/p-63285c1c.entry.js +1 -0
- package/dist/teranga-ds/p-6b40af59.entry.js +1 -0
- package/dist/teranga-ds/p-6c275cd2.entry.js +1 -0
- package/dist/teranga-ds/p-700908a2.entry.js +1 -0
- package/dist/teranga-ds/p-71257d05.entry.js +1 -0
- package/dist/teranga-ds/p-727543e6.entry.js +1 -0
- package/dist/teranga-ds/p-73082aef.entry.js +1 -0
- package/dist/teranga-ds/p-7acaa999.entry.js +1 -0
- package/dist/teranga-ds/p-81041fa8.entry.js +1 -0
- package/dist/teranga-ds/p-816417c6.entry.js +1 -0
- package/dist/teranga-ds/p-82057162.entry.js +1 -0
- package/dist/teranga-ds/p-84506153.entry.js +1 -0
- package/dist/teranga-ds/p-9259b7ad.entry.js +1 -0
- package/dist/teranga-ds/p-968f33cd.entry.js +1 -0
- package/dist/teranga-ds/p-9a86750e.entry.js +1 -0
- package/dist/teranga-ds/p-9b661306.entry.js +1 -0
- package/dist/teranga-ds/p-9ddbbe0b.entry.js +1 -0
- package/dist/teranga-ds/p-9f6a460b.entry.js +1 -0
- package/dist/teranga-ds/p-CXqO9vvj.js +2 -0
- package/dist/teranga-ds/p-a02dc9c0.entry.js +1 -0
- package/dist/teranga-ds/p-a25e8482.entry.js +1 -0
- package/dist/teranga-ds/p-a7ed37b2.entry.js +1 -0
- package/dist/teranga-ds/p-b4b5570e.entry.js +1 -0
- package/dist/teranga-ds/p-b762afff.entry.js +1 -0
- package/dist/teranga-ds/p-ba67b6cb.entry.js +1 -0
- package/dist/teranga-ds/p-bd667d1b.entry.js +1 -0
- package/dist/teranga-ds/p-bd7eefaa.entry.js +1 -0
- package/dist/teranga-ds/p-cd11c0ce.entry.js +1 -0
- package/dist/teranga-ds/p-d783708a.entry.js +1 -0
- package/dist/teranga-ds/p-dab038ae.entry.js +1 -0
- package/dist/teranga-ds/p-dda9a7c3.entry.js +1 -0
- package/dist/teranga-ds/p-deb81958.entry.js +1 -0
- package/dist/teranga-ds/p-dfaff259.entry.js +1 -0
- package/dist/teranga-ds/p-e0c5a144.entry.js +1 -0
- package/dist/teranga-ds/p-e26d2a8d.entry.js +1 -0
- package/dist/teranga-ds/p-e58a4ab8.entry.js +1 -0
- package/dist/teranga-ds/p-e8736bde.entry.js +1 -0
- package/dist/teranga-ds/p-eca93015.entry.js +1 -0
- package/dist/teranga-ds/p-ed2a5ec6.entry.js +1 -0
- package/dist/teranga-ds/p-ed48b855.entry.js +1 -0
- package/dist/teranga-ds/p-ee8c0470.entry.js +1 -0
- package/dist/teranga-ds/p-efff537c.entry.js +1 -0
- package/dist/teranga-ds/p-f5d99e53.entry.js +1 -0
- package/dist/teranga-ds/p-f790b8f4.entry.js +1 -0
- package/dist/teranga-ds/teranga-ds.css +1 -0
- package/dist/teranga-ds/teranga-ds.esm.js +1 -0
- package/dist/teranga-ds/teranga-tokens.css +189 -0
- package/dist/types/components/tg-activity-feed/tg-activity-feed.d.ts +13 -0
- package/dist/types/components/tg-activity-stream/tg-activity-stream.d.ts +14 -0
- package/dist/types/components/tg-ai-feedback/tg-ai-feedback.d.ts +14 -0
- package/dist/types/components/tg-ai-insight-card/tg-ai-insight-card.d.ts +9 -0
- package/dist/types/components/tg-alert/tg-alert.d.ts +28 -0
- package/dist/types/components/tg-audio-player/tg-audio-player.d.ts +15 -0
- package/dist/types/components/tg-autocomplete/tg-autocomplete.d.ts +21 -0
- package/dist/types/components/tg-avatar/tg-avatar.d.ts +27 -0
- package/dist/types/components/tg-badge/tg-badge.d.ts +21 -0
- package/dist/types/components/tg-bottom-nav/tg-bottom-nav.d.ts +14 -0
- package/dist/types/components/tg-bottom-sheet/tg-bottom-sheet.d.ts +7 -0
- package/dist/types/components/tg-breadcrumb/tg-breadcrumb.d.ts +12 -0
- package/dist/types/components/tg-button/tg-button.d.ts +35 -0
- package/dist/types/components/tg-calendar-view/tg-calendar-view.d.ts +18 -0
- package/dist/types/components/tg-card/tg-card.d.ts +27 -0
- package/dist/types/components/tg-chat/tg-chat.d.ts +24 -0
- package/dist/types/components/tg-chat-message/tg-chat-message.d.ts +7 -0
- package/dist/types/components/tg-checkbox/tg-checkbox.d.ts +14 -0
- package/dist/types/components/tg-combobox/tg-combobox.d.ts +30 -0
- package/dist/types/components/tg-command-palette/tg-command-palette.d.ts +20 -0
- package/dist/types/components/tg-confidence-badge/tg-confidence-badge.d.ts +7 -0
- package/dist/types/components/tg-confirm-dialog/tg-confirm-dialog.d.ts +13 -0
- package/dist/types/components/tg-context-menu/tg-context-menu.d.ts +21 -0
- package/dist/types/components/tg-data-table/tg-data-table.d.ts +34 -0
- package/dist/types/components/tg-date-picker/tg-date-picker.d.ts +22 -0
- package/dist/types/components/tg-empty-state/tg-empty-state.d.ts +8 -0
- package/dist/types/components/tg-expandable-row/tg-expandable-row.d.ts +7 -0
- package/dist/types/components/tg-fab/tg-fab.d.ts +11 -0
- package/dist/types/components/tg-file-upload/tg-file-upload.d.ts +28 -0
- package/dist/types/components/tg-global-loader/tg-global-loader.d.ts +6 -0
- package/dist/types/components/tg-heatmap/tg-heatmap.d.ts +14 -0
- package/dist/types/components/tg-image-gallery/tg-image-gallery.d.ts +12 -0
- package/dist/types/components/tg-input/tg-input.d.ts +48 -0
- package/dist/types/components/tg-kanban-board/tg-kanban-board.d.ts +23 -0
- package/dist/types/components/tg-kpi-card/tg-kpi-card.d.ts +10 -0
- package/dist/types/components/tg-live-badge/tg-live-badge.d.ts +6 -0
- package/dist/types/components/tg-login-form/tg-login-form.d.ts +16 -0
- package/dist/types/components/tg-mega-menu/tg-mega-menu.d.ts +21 -0
- package/dist/types/components/tg-modal/tg-modal.d.ts +14 -0
- package/dist/types/components/tg-model-selector/tg-model-selector.d.ts +18 -0
- package/dist/types/components/tg-multi-select/tg-multi-select.d.ts +25 -0
- package/dist/types/components/tg-navbar/tg-navbar.d.ts +16 -0
- package/dist/types/components/tg-otp-input/tg-otp-input.d.ts +18 -0
- package/dist/types/components/tg-pagination/tg-pagination.d.ts +10 -0
- package/dist/types/components/tg-presence-indicator/tg-presence-indicator.d.ts +10 -0
- package/dist/types/components/tg-progress/tg-progress.d.ts +18 -0
- package/dist/types/components/tg-prompt-input/tg-prompt-input.d.ts +12 -0
- package/dist/types/components/tg-pull-to-refresh/tg-pull-to-refresh.d.ts +15 -0
- package/dist/types/components/tg-quick-switcher/tg-quick-switcher.d.ts +18 -0
- package/dist/types/components/tg-radio/tg-radio.d.ts +12 -0
- package/dist/types/components/tg-retry-ui/tg-retry-ui.d.ts +10 -0
- package/dist/types/components/tg-rich-editor/tg-rich-editor.d.ts +13 -0
- package/dist/types/components/tg-role-badge/tg-role-badge.d.ts +6 -0
- package/dist/types/components/tg-select/tg-select.d.ts +27 -0
- package/dist/types/components/tg-session-expired/tg-session-expired.d.ts +9 -0
- package/dist/types/components/tg-sidebar/tg-sidebar.d.ts +20 -0
- package/dist/types/components/tg-skeleton/tg-skeleton.d.ts +8 -0
- package/dist/types/components/tg-slider/tg-slider.d.ts +15 -0
- package/dist/types/components/tg-source-citation/tg-source-citation.d.ts +10 -0
- package/dist/types/components/tg-spinner/tg-spinner.d.ts +16 -0
- package/dist/types/components/tg-stat-widget/tg-stat-widget.d.ts +9 -0
- package/dist/types/components/tg-status-badge/tg-status-badge.d.ts +7 -0
- package/dist/types/components/tg-stepper/tg-stepper.d.ts +11 -0
- package/dist/types/components/tg-stepper-input/tg-stepper-input.d.ts +15 -0
- package/dist/types/components/tg-streaming-response/tg-streaming-response.d.ts +7 -0
- package/dist/types/components/tg-switch/tg-switch.d.ts +12 -0
- package/dist/types/components/tg-table/tg-table.d.ts +30 -0
- package/dist/types/components/tg-tabs/tg-tabs.d.ts +18 -0
- package/dist/types/components/tg-tag/tg-tag.d.ts +10 -0
- package/dist/types/components/tg-textarea/tg-textarea.d.ts +23 -0
- package/dist/types/components/tg-time-picker/tg-time-picker.d.ts +16 -0
- package/dist/types/components/tg-timeline/tg-timeline.d.ts +13 -0
- package/dist/types/components/tg-toast/tg-toast.d.ts +17 -0
- package/dist/types/components/tg-token-usage/tg-token-usage.d.ts +10 -0
- package/dist/types/components/tg-tooltip/tg-tooltip.d.ts +10 -0
- package/dist/types/components/tg-tree-view/tg-tree-view.d.ts +17 -0
- package/dist/types/components/tg-undo-snackbar/tg-undo-snackbar.d.ts +11 -0
- package/dist/types/components/tg-video-player/tg-video-player.d.ts +7 -0
- package/dist/types/components/tg-wizard-nav/tg-wizard-nav.d.ts +15 -0
- package/dist/types/components.d.ts +5028 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +74 -0
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class TgCombobox {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.placeholder = 'Rechercher…';
|
|
5
|
+
this.options = [];
|
|
6
|
+
this.disabled = false;
|
|
7
|
+
this.invalid = false;
|
|
8
|
+
this.size = 'md';
|
|
9
|
+
this.query = '';
|
|
10
|
+
this.open = false;
|
|
11
|
+
this.focusedIndex = -1;
|
|
12
|
+
this.handleInput = (e) => { this.query = e.target.value; this.open = true; };
|
|
13
|
+
this.handleFocus = () => { this.open = true; };
|
|
14
|
+
this.handleKeyDown = (e) => {
|
|
15
|
+
const items = this.filtered;
|
|
16
|
+
if (e.key === 'ArrowDown') {
|
|
17
|
+
e.preventDefault();
|
|
18
|
+
this.focusedIndex = Math.min(this.focusedIndex + 1, items.length - 1);
|
|
19
|
+
}
|
|
20
|
+
else if (e.key === 'ArrowUp') {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
this.focusedIndex = Math.max(this.focusedIndex - 1, 0);
|
|
23
|
+
}
|
|
24
|
+
else if (e.key === 'Enter' && this.focusedIndex >= 0 && items[this.focusedIndex]) {
|
|
25
|
+
e.preventDefault();
|
|
26
|
+
this.select(items[this.focusedIndex]);
|
|
27
|
+
}
|
|
28
|
+
else if (e.key === 'Escape') {
|
|
29
|
+
this.open = false;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
get parsed() {
|
|
34
|
+
if (typeof this.options === 'string') {
|
|
35
|
+
try {
|
|
36
|
+
return JSON.parse(this.options);
|
|
37
|
+
}
|
|
38
|
+
catch (_a) {
|
|
39
|
+
return [];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return this.options;
|
|
43
|
+
}
|
|
44
|
+
get filtered() {
|
|
45
|
+
const q = this.query.toLowerCase();
|
|
46
|
+
return q ? this.parsed.filter(o => o.label.toLowerCase().includes(q)) : this.parsed;
|
|
47
|
+
}
|
|
48
|
+
get selectedLabel() {
|
|
49
|
+
const f = this.parsed.find(o => o.value === this.value);
|
|
50
|
+
return f ? f.label : '';
|
|
51
|
+
}
|
|
52
|
+
handleDocClick() { this.open = false; }
|
|
53
|
+
select(opt) { this.tgChange.emit(opt.value); this.query = opt.label; this.open = false; }
|
|
54
|
+
render() {
|
|
55
|
+
const items = this.filtered;
|
|
56
|
+
return (h(Host, { key: '565f072e24300dd80eec6206a9ee2922b7504589' }, h("div", { key: 'd43ede25747b229bfe8c1c25ae62ca24cedadf5e', class: `tg-combobox tg-combobox--${this.size}`, onClick: (e) => e.stopPropagation() }, this.label && h("label", { key: '04baf228f536e3f93f8b15a5d8a8ec5055d349b7', class: "tg-combobox__label" }, this.label), h("div", { key: '16969267f3ef67da727c5c3b8463146398f910ca', class: { 'tg-combobox__input-wrap': true, 'tg-combobox__input-wrap--invalid': this.invalid, 'tg-combobox__input-wrap--disabled': this.disabled } }, h("input", { key: 'd43dbe66854e5993ecf3de07a37c2b8dca7bb4ac', class: "tg-combobox__input", type: "text", value: this.open ? this.query : this.selectedLabel, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput, onFocus: this.handleFocus, onKeyDown: this.handleKeyDown, role: "combobox", "aria-expanded": String(this.open), "aria-autocomplete": "list" }), h("span", { key: '1848157598a1534516a72c4df74266771e666028', class: { 'tg-combobox__chevron': true, 'tg-combobox__chevron--open': this.open } }, h("svg", { key: '800f1089b123c22cfe2dfdc513fe6632b51b4a5e', viewBox: "0 0 20 20", fill: "currentColor", width: "16", height: "16" }, h("path", { key: '8069e0b3d7f69861b4b9dd0723e6531eaff7e2fd', "fill-rule": "evenodd", d: "M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z" })))), this.open && items.length > 0 && (h("ul", { key: 'c2552593271adbc015fc5b4457cf4225183b571b', class: "tg-combobox__dropdown", role: "listbox" }, items.map((opt, i) => (h("li", { class: { 'tg-combobox__option': true, 'tg-combobox__option--focused': i === this.focusedIndex, 'tg-combobox__option--selected': opt.value === this.value, 'tg-combobox__option--disabled': opt.disabled === true }, role: "option", "aria-selected": String(opt.value === this.value), onClick: () => !opt.disabled && this.select(opt) }, opt.label))))), this.errorText && h("p", { key: '6c3488a6db12f9c4c4f8f4a978526eeb728fd247', class: "tg-combobox__error" }, this.errorText), !this.errorText && this.helperText && h("p", { key: 'b1c7475ea8220f626c18b2ebb5d785a54f76b6ca', class: "tg-combobox__helper" }, this.helperText))));
|
|
57
|
+
}
|
|
58
|
+
static get is() { return "tg-combobox"; }
|
|
59
|
+
static get encapsulation() { return "shadow"; }
|
|
60
|
+
static get originalStyleUrls() {
|
|
61
|
+
return {
|
|
62
|
+
"$": ["tg-combobox.css"]
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
static get styleUrls() {
|
|
66
|
+
return {
|
|
67
|
+
"$": ["tg-combobox.css"]
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
static get properties() {
|
|
71
|
+
return {
|
|
72
|
+
"label": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"mutable": false,
|
|
75
|
+
"complexType": {
|
|
76
|
+
"original": "string",
|
|
77
|
+
"resolved": "string | undefined",
|
|
78
|
+
"references": {}
|
|
79
|
+
},
|
|
80
|
+
"required": false,
|
|
81
|
+
"optional": true,
|
|
82
|
+
"docs": {
|
|
83
|
+
"tags": [],
|
|
84
|
+
"text": ""
|
|
85
|
+
},
|
|
86
|
+
"getter": false,
|
|
87
|
+
"setter": false,
|
|
88
|
+
"reflect": false,
|
|
89
|
+
"attribute": "label"
|
|
90
|
+
},
|
|
91
|
+
"placeholder": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"mutable": false,
|
|
94
|
+
"complexType": {
|
|
95
|
+
"original": "string",
|
|
96
|
+
"resolved": "string",
|
|
97
|
+
"references": {}
|
|
98
|
+
},
|
|
99
|
+
"required": false,
|
|
100
|
+
"optional": false,
|
|
101
|
+
"docs": {
|
|
102
|
+
"tags": [],
|
|
103
|
+
"text": ""
|
|
104
|
+
},
|
|
105
|
+
"getter": false,
|
|
106
|
+
"setter": false,
|
|
107
|
+
"reflect": false,
|
|
108
|
+
"attribute": "placeholder",
|
|
109
|
+
"defaultValue": "'Rechercher\u2026'"
|
|
110
|
+
},
|
|
111
|
+
"options": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"mutable": false,
|
|
114
|
+
"complexType": {
|
|
115
|
+
"original": "string | ComboboxOption[]",
|
|
116
|
+
"resolved": "ComboboxOption[] | string",
|
|
117
|
+
"references": {
|
|
118
|
+
"ComboboxOption": {
|
|
119
|
+
"location": "local",
|
|
120
|
+
"path": "/Users/mahykane/work/Teranga-Design-Systems/packages/components/src/components/tg-combobox/tg-combobox.tsx",
|
|
121
|
+
"id": "src/components/tg-combobox/tg-combobox.tsx::ComboboxOption"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"required": false,
|
|
126
|
+
"optional": false,
|
|
127
|
+
"docs": {
|
|
128
|
+
"tags": [],
|
|
129
|
+
"text": ""
|
|
130
|
+
},
|
|
131
|
+
"getter": false,
|
|
132
|
+
"setter": false,
|
|
133
|
+
"reflect": false,
|
|
134
|
+
"attribute": "options",
|
|
135
|
+
"defaultValue": "[]"
|
|
136
|
+
},
|
|
137
|
+
"value": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"mutable": false,
|
|
140
|
+
"complexType": {
|
|
141
|
+
"original": "string",
|
|
142
|
+
"resolved": "string | undefined",
|
|
143
|
+
"references": {}
|
|
144
|
+
},
|
|
145
|
+
"required": false,
|
|
146
|
+
"optional": true,
|
|
147
|
+
"docs": {
|
|
148
|
+
"tags": [],
|
|
149
|
+
"text": ""
|
|
150
|
+
},
|
|
151
|
+
"getter": false,
|
|
152
|
+
"setter": false,
|
|
153
|
+
"reflect": false,
|
|
154
|
+
"attribute": "value"
|
|
155
|
+
},
|
|
156
|
+
"disabled": {
|
|
157
|
+
"type": "boolean",
|
|
158
|
+
"mutable": false,
|
|
159
|
+
"complexType": {
|
|
160
|
+
"original": "boolean",
|
|
161
|
+
"resolved": "boolean",
|
|
162
|
+
"references": {}
|
|
163
|
+
},
|
|
164
|
+
"required": false,
|
|
165
|
+
"optional": false,
|
|
166
|
+
"docs": {
|
|
167
|
+
"tags": [],
|
|
168
|
+
"text": ""
|
|
169
|
+
},
|
|
170
|
+
"getter": false,
|
|
171
|
+
"setter": false,
|
|
172
|
+
"reflect": false,
|
|
173
|
+
"attribute": "disabled",
|
|
174
|
+
"defaultValue": "false"
|
|
175
|
+
},
|
|
176
|
+
"invalid": {
|
|
177
|
+
"type": "boolean",
|
|
178
|
+
"mutable": false,
|
|
179
|
+
"complexType": {
|
|
180
|
+
"original": "boolean",
|
|
181
|
+
"resolved": "boolean",
|
|
182
|
+
"references": {}
|
|
183
|
+
},
|
|
184
|
+
"required": false,
|
|
185
|
+
"optional": false,
|
|
186
|
+
"docs": {
|
|
187
|
+
"tags": [],
|
|
188
|
+
"text": ""
|
|
189
|
+
},
|
|
190
|
+
"getter": false,
|
|
191
|
+
"setter": false,
|
|
192
|
+
"reflect": false,
|
|
193
|
+
"attribute": "invalid",
|
|
194
|
+
"defaultValue": "false"
|
|
195
|
+
},
|
|
196
|
+
"helperText": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"mutable": false,
|
|
199
|
+
"complexType": {
|
|
200
|
+
"original": "string",
|
|
201
|
+
"resolved": "string | undefined",
|
|
202
|
+
"references": {}
|
|
203
|
+
},
|
|
204
|
+
"required": false,
|
|
205
|
+
"optional": true,
|
|
206
|
+
"docs": {
|
|
207
|
+
"tags": [],
|
|
208
|
+
"text": ""
|
|
209
|
+
},
|
|
210
|
+
"getter": false,
|
|
211
|
+
"setter": false,
|
|
212
|
+
"reflect": false,
|
|
213
|
+
"attribute": "helper-text"
|
|
214
|
+
},
|
|
215
|
+
"errorText": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"mutable": false,
|
|
218
|
+
"complexType": {
|
|
219
|
+
"original": "string",
|
|
220
|
+
"resolved": "string | undefined",
|
|
221
|
+
"references": {}
|
|
222
|
+
},
|
|
223
|
+
"required": false,
|
|
224
|
+
"optional": true,
|
|
225
|
+
"docs": {
|
|
226
|
+
"tags": [],
|
|
227
|
+
"text": ""
|
|
228
|
+
},
|
|
229
|
+
"getter": false,
|
|
230
|
+
"setter": false,
|
|
231
|
+
"reflect": false,
|
|
232
|
+
"attribute": "error-text"
|
|
233
|
+
},
|
|
234
|
+
"size": {
|
|
235
|
+
"type": "string",
|
|
236
|
+
"mutable": false,
|
|
237
|
+
"complexType": {
|
|
238
|
+
"original": "'sm' | 'md' | 'lg'",
|
|
239
|
+
"resolved": "\"lg\" | \"md\" | \"sm\"",
|
|
240
|
+
"references": {}
|
|
241
|
+
},
|
|
242
|
+
"required": false,
|
|
243
|
+
"optional": false,
|
|
244
|
+
"docs": {
|
|
245
|
+
"tags": [],
|
|
246
|
+
"text": ""
|
|
247
|
+
},
|
|
248
|
+
"getter": false,
|
|
249
|
+
"setter": false,
|
|
250
|
+
"reflect": false,
|
|
251
|
+
"attribute": "size",
|
|
252
|
+
"defaultValue": "'md'"
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
static get states() {
|
|
257
|
+
return {
|
|
258
|
+
"query": {},
|
|
259
|
+
"open": {},
|
|
260
|
+
"focusedIndex": {}
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
static get events() {
|
|
264
|
+
return [{
|
|
265
|
+
"method": "tgChange",
|
|
266
|
+
"name": "tgChange",
|
|
267
|
+
"bubbles": true,
|
|
268
|
+
"cancelable": true,
|
|
269
|
+
"composed": true,
|
|
270
|
+
"docs": {
|
|
271
|
+
"tags": [],
|
|
272
|
+
"text": ""
|
|
273
|
+
},
|
|
274
|
+
"complexType": {
|
|
275
|
+
"original": "string",
|
|
276
|
+
"resolved": "string",
|
|
277
|
+
"references": {}
|
|
278
|
+
}
|
|
279
|
+
}];
|
|
280
|
+
}
|
|
281
|
+
static get listeners() {
|
|
282
|
+
return [{
|
|
283
|
+
"name": "click",
|
|
284
|
+
"method": "handleDocClick",
|
|
285
|
+
"target": "document",
|
|
286
|
+
"capture": false,
|
|
287
|
+
"passive": false
|
|
288
|
+
}];
|
|
289
|
+
}
|
|
290
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
:host { display: contents; }
|
|
2
|
+
.tg-cp__overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 9999; display: flex; align-items: flex-start; justify-content: center; padding-top: 20vh; backdrop-filter: blur(4px); animation: tg-cp-fade var(--tg-duration-fast); }
|
|
3
|
+
@keyframes tg-cp-fade { from { opacity: 0; } to { opacity: 1; } }
|
|
4
|
+
.tg-cp { width: 100%; max-width: 32rem; background: var(--tg-color-surface-raised); border-radius: var(--tg-radius-xl); box-shadow: var(--tg-shadow-xl); overflow: hidden; font-family: var(--tg-font-family-sans); animation: tg-cp-slide var(--tg-duration-fast) var(--tg-ease-out); }
|
|
5
|
+
@keyframes tg-cp-slide { from { opacity: 0; transform: translateY(-12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
|
|
6
|
+
.tg-cp__input-wrap { display: flex; align-items: center; gap: var(--tg-spacing-2); padding: var(--tg-spacing-3) var(--tg-spacing-4); border-bottom: 1px solid var(--tg-color-border); }
|
|
7
|
+
.tg-cp__search-icon { color: var(--tg-color-text-secondary); flex-shrink: 0; }
|
|
8
|
+
.tg-cp__input { flex: 1; border: none; outline: none; background: transparent; font-size: var(--tg-font-size-md); color: var(--tg-color-text-primary); font-family: inherit; }
|
|
9
|
+
.tg-cp__input::placeholder { color: var(--tg-color-text-disabled); }
|
|
10
|
+
.tg-cp__list { list-style: none; padding: var(--tg-spacing-1) 0; margin: 0; max-height: 20rem; overflow-y: auto; }
|
|
11
|
+
.tg-cp__item { display: flex; align-items: center; gap: var(--tg-spacing-2); padding: var(--tg-spacing-2) var(--tg-spacing-4); cursor: pointer; transition: background var(--tg-duration-fast); }
|
|
12
|
+
.tg-cp__item:hover, .tg-cp__item--focused { background: var(--tg-color-primary-subtle); }
|
|
13
|
+
.tg-cp__item-icon { font-size: 1rem; color: var(--tg-color-text-secondary); flex-shrink: 0; }
|
|
14
|
+
.tg-cp__item-label { flex: 1; font-size: var(--tg-font-size-sm); color: var(--tg-color-text-primary); }
|
|
15
|
+
.tg-cp__shortcut { font-family: var(--tg-font-family-mono); font-size: var(--tg-font-size-xs); color: var(--tg-color-text-secondary); background: var(--tg-color-surface-sunken); padding: 2px var(--tg-spacing-1-5); border-radius: var(--tg-radius-sm); border: 1px solid var(--tg-color-border); }
|
|
16
|
+
.tg-cp__empty { padding: var(--tg-spacing-4); text-align: center; color: var(--tg-color-text-disabled); font-size: var(--tg-font-size-sm); }
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class TgCommandPalette {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.commands = [];
|
|
5
|
+
this.placeholder = 'Tapez une commande\u2026';
|
|
6
|
+
this.open = false;
|
|
7
|
+
this.query = '';
|
|
8
|
+
this.focusedIndex = 0;
|
|
9
|
+
}
|
|
10
|
+
get parsed() {
|
|
11
|
+
if (typeof this.commands === 'string') {
|
|
12
|
+
try {
|
|
13
|
+
return JSON.parse(this.commands);
|
|
14
|
+
}
|
|
15
|
+
catch (_a) {
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return this.commands;
|
|
20
|
+
}
|
|
21
|
+
get filtered() { const q = this.query.toLowerCase(); return q ? this.parsed.filter(c => c.label.toLowerCase().includes(q)) : this.parsed; }
|
|
22
|
+
onKeyDown(e) {
|
|
23
|
+
if ((e.metaKey || e.ctrlKey) && e.key === 'k') {
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
this.open = !this.open;
|
|
26
|
+
this.query = '';
|
|
27
|
+
this.focusedIndex = 0;
|
|
28
|
+
}
|
|
29
|
+
if (!this.open)
|
|
30
|
+
return;
|
|
31
|
+
if (e.key === 'Escape') {
|
|
32
|
+
this.open = false;
|
|
33
|
+
}
|
|
34
|
+
else if (e.key === 'ArrowDown') {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
this.focusedIndex = Math.min(this.focusedIndex + 1, this.filtered.length - 1);
|
|
37
|
+
}
|
|
38
|
+
else if (e.key === 'ArrowUp') {
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
this.focusedIndex = Math.max(this.focusedIndex - 1, 0);
|
|
41
|
+
}
|
|
42
|
+
else if (e.key === 'Enter') {
|
|
43
|
+
const item = this.filtered[this.focusedIndex];
|
|
44
|
+
if (item) {
|
|
45
|
+
this.tgSelect.emit(item.id);
|
|
46
|
+
this.open = false;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
render() {
|
|
51
|
+
if (!this.open)
|
|
52
|
+
return h(Host, null);
|
|
53
|
+
const items = this.filtered;
|
|
54
|
+
return (h(Host, null, h("div", { class: "tg-cp__overlay", onClick: () => { this.open = false; } }, h("div", { class: "tg-cp", onClick: (e) => e.stopPropagation() }, h("div", { class: "tg-cp__input-wrap" }, h("svg", { class: "tg-cp__search-icon", viewBox: "0 0 20 20", fill: "currentColor", width: "18", height: "18" }, h("path", { "fill-rule": "evenodd", d: "M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" })), h("input", { class: "tg-cp__input", type: "text", placeholder: this.placeholder, value: this.query, onInput: (e) => { this.query = e.target.value; this.focusedIndex = 0; }, autofocus: true })), h("ul", { class: "tg-cp__list" }, items.map((cmd, i) => (h("li", { class: { 'tg-cp__item': true, 'tg-cp__item--focused': i === this.focusedIndex }, onClick: () => { this.tgSelect.emit(cmd.id); this.open = false; } }, cmd.icon && h("span", { class: "tg-cp__item-icon" }, cmd.icon), h("span", { class: "tg-cp__item-label" }, cmd.label), cmd.shortcut && h("kbd", { class: "tg-cp__shortcut" }, cmd.shortcut)))), items.length === 0 && h("li", { class: "tg-cp__empty" }, "Aucun r\\u00e9sultat"))))));
|
|
55
|
+
}
|
|
56
|
+
static get is() { return "tg-command-palette"; }
|
|
57
|
+
static get encapsulation() { return "shadow"; }
|
|
58
|
+
static get originalStyleUrls() {
|
|
59
|
+
return {
|
|
60
|
+
"$": ["tg-command-palette.css"]
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
static get styleUrls() {
|
|
64
|
+
return {
|
|
65
|
+
"$": ["tg-command-palette.css"]
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
static get properties() {
|
|
69
|
+
return {
|
|
70
|
+
"commands": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"mutable": false,
|
|
73
|
+
"complexType": {
|
|
74
|
+
"original": "string | CommandItem[]",
|
|
75
|
+
"resolved": "CommandItem[] | string",
|
|
76
|
+
"references": {
|
|
77
|
+
"CommandItem": {
|
|
78
|
+
"location": "local",
|
|
79
|
+
"path": "/Users/mahykane/work/Teranga-Design-Systems/packages/components/src/components/tg-command-palette/tg-command-palette.tsx",
|
|
80
|
+
"id": "src/components/tg-command-palette/tg-command-palette.tsx::CommandItem"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"required": false,
|
|
85
|
+
"optional": false,
|
|
86
|
+
"docs": {
|
|
87
|
+
"tags": [],
|
|
88
|
+
"text": ""
|
|
89
|
+
},
|
|
90
|
+
"getter": false,
|
|
91
|
+
"setter": false,
|
|
92
|
+
"reflect": false,
|
|
93
|
+
"attribute": "commands",
|
|
94
|
+
"defaultValue": "[]"
|
|
95
|
+
},
|
|
96
|
+
"placeholder": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"mutable": false,
|
|
99
|
+
"complexType": {
|
|
100
|
+
"original": "string",
|
|
101
|
+
"resolved": "string",
|
|
102
|
+
"references": {}
|
|
103
|
+
},
|
|
104
|
+
"required": false,
|
|
105
|
+
"optional": false,
|
|
106
|
+
"docs": {
|
|
107
|
+
"tags": [],
|
|
108
|
+
"text": ""
|
|
109
|
+
},
|
|
110
|
+
"getter": false,
|
|
111
|
+
"setter": false,
|
|
112
|
+
"reflect": false,
|
|
113
|
+
"attribute": "placeholder",
|
|
114
|
+
"defaultValue": "'Tapez une commande\\u2026'"
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
static get states() {
|
|
119
|
+
return {
|
|
120
|
+
"open": {},
|
|
121
|
+
"query": {},
|
|
122
|
+
"focusedIndex": {}
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
static get events() {
|
|
126
|
+
return [{
|
|
127
|
+
"method": "tgSelect",
|
|
128
|
+
"name": "tgSelect",
|
|
129
|
+
"bubbles": true,
|
|
130
|
+
"cancelable": true,
|
|
131
|
+
"composed": true,
|
|
132
|
+
"docs": {
|
|
133
|
+
"tags": [],
|
|
134
|
+
"text": ""
|
|
135
|
+
},
|
|
136
|
+
"complexType": {
|
|
137
|
+
"original": "string",
|
|
138
|
+
"resolved": "string",
|
|
139
|
+
"references": {}
|
|
140
|
+
}
|
|
141
|
+
}];
|
|
142
|
+
}
|
|
143
|
+
static get listeners() {
|
|
144
|
+
return [{
|
|
145
|
+
"name": "keydown",
|
|
146
|
+
"method": "onKeyDown",
|
|
147
|
+
"target": "document",
|
|
148
|
+
"capture": false,
|
|
149
|
+
"passive": false
|
|
150
|
+
}];
|
|
151
|
+
}
|
|
152
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
:host { display: inline-flex; }
|
|
2
|
+
.tg-conf { display: inline-flex; align-items: center; gap: var(--tg-spacing-2); padding: var(--tg-spacing-1) var(--tg-spacing-2-5); border-radius: var(--tg-radius-full); font-family: var(--tg-font-family-sans); }
|
|
3
|
+
.tg-conf--high { background: var(--tg-color-success-subtle); color: var(--tg-color-success); }
|
|
4
|
+
.tg-conf--medium { background: var(--tg-color-warning-subtle); color: var(--tg-color-warning); }
|
|
5
|
+
.tg-conf--low { background: var(--tg-color-danger-subtle); color: var(--tg-color-danger); }
|
|
6
|
+
.tg-conf__pct { font-size: var(--tg-font-size-xs); font-weight: var(--tg-font-weight-bold); font-family: var(--tg-font-family-mono); }
|
|
7
|
+
.tg-conf__label { font-size: var(--tg-font-size-xs); font-weight: var(--tg-font-weight-medium); }
|
|
8
|
+
.tg-conf__bar { width: 3rem; height: 4px; background: rgba(0,0,0,0.1); border-radius: var(--tg-radius-full); overflow: hidden; }
|
|
9
|
+
.tg-conf__fill { height: 100%; border-radius: var(--tg-radius-full); transition: width var(--tg-duration-normal); }
|
|
10
|
+
.tg-conf--high .tg-conf__fill { background: var(--tg-color-success); }
|
|
11
|
+
.tg-conf--medium .tg-conf__fill { background: var(--tg-color-warning); }
|
|
12
|
+
.tg-conf--low .tg-conf__fill { background: var(--tg-color-danger); }
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class TgConfidenceBadge {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.score = 0;
|
|
5
|
+
this.showBar = true;
|
|
6
|
+
}
|
|
7
|
+
get level() {
|
|
8
|
+
if (this.score >= 0.8)
|
|
9
|
+
return 'high';
|
|
10
|
+
if (this.score >= 0.5)
|
|
11
|
+
return 'medium';
|
|
12
|
+
return 'low';
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const pct = Math.round(this.score * 100);
|
|
16
|
+
return (h(Host, { key: 'aecf1b4b43cf40be94ae02979e80ddd296b489e3' }, h("div", { key: '5593278db1c44b8b42bdacf28648a313c045ebc8', class: 'tg-conf tg-conf--' + this.level }, h("span", { key: '01334ff751a99cdb839e0551ef97e121603b3fa6', class: "tg-conf__pct" }, pct, "%"), this.label && h("span", { key: '93b067ed5c3a8a88a62a599cc7a8e71c461f2b0a', class: "tg-conf__label" }, this.label), this.showBar && h("div", { key: '9c3cbf7f8afed63cd3fae1643a0fdf20e78025ea', class: "tg-conf__bar" }, h("div", { key: 'e582e1f3e220ba4e4ad0590b2efe886ab3451bd0', class: "tg-conf__fill", style: { width: pct + '%' } })))));
|
|
17
|
+
}
|
|
18
|
+
static get is() { return "tg-confidence-badge"; }
|
|
19
|
+
static get encapsulation() { return "shadow"; }
|
|
20
|
+
static get originalStyleUrls() {
|
|
21
|
+
return {
|
|
22
|
+
"$": ["tg-confidence-badge.css"]
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
static get styleUrls() {
|
|
26
|
+
return {
|
|
27
|
+
"$": ["tg-confidence-badge.css"]
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
static get properties() {
|
|
31
|
+
return {
|
|
32
|
+
"score": {
|
|
33
|
+
"type": "number",
|
|
34
|
+
"mutable": false,
|
|
35
|
+
"complexType": {
|
|
36
|
+
"original": "number",
|
|
37
|
+
"resolved": "number",
|
|
38
|
+
"references": {}
|
|
39
|
+
},
|
|
40
|
+
"required": false,
|
|
41
|
+
"optional": false,
|
|
42
|
+
"docs": {
|
|
43
|
+
"tags": [],
|
|
44
|
+
"text": ""
|
|
45
|
+
},
|
|
46
|
+
"getter": false,
|
|
47
|
+
"setter": false,
|
|
48
|
+
"reflect": false,
|
|
49
|
+
"attribute": "score",
|
|
50
|
+
"defaultValue": "0"
|
|
51
|
+
},
|
|
52
|
+
"label": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"mutable": false,
|
|
55
|
+
"complexType": {
|
|
56
|
+
"original": "string",
|
|
57
|
+
"resolved": "string | undefined",
|
|
58
|
+
"references": {}
|
|
59
|
+
},
|
|
60
|
+
"required": false,
|
|
61
|
+
"optional": true,
|
|
62
|
+
"docs": {
|
|
63
|
+
"tags": [],
|
|
64
|
+
"text": ""
|
|
65
|
+
},
|
|
66
|
+
"getter": false,
|
|
67
|
+
"setter": false,
|
|
68
|
+
"reflect": false,
|
|
69
|
+
"attribute": "label"
|
|
70
|
+
},
|
|
71
|
+
"showBar": {
|
|
72
|
+
"type": "boolean",
|
|
73
|
+
"mutable": false,
|
|
74
|
+
"complexType": {
|
|
75
|
+
"original": "boolean",
|
|
76
|
+
"resolved": "boolean",
|
|
77
|
+
"references": {}
|
|
78
|
+
},
|
|
79
|
+
"required": false,
|
|
80
|
+
"optional": false,
|
|
81
|
+
"docs": {
|
|
82
|
+
"tags": [],
|
|
83
|
+
"text": ""
|
|
84
|
+
},
|
|
85
|
+
"getter": false,
|
|
86
|
+
"setter": false,
|
|
87
|
+
"reflect": false,
|
|
88
|
+
"attribute": "show-bar",
|
|
89
|
+
"defaultValue": "true"
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
:host { display: contents; }
|
|
2
|
+
.tg-cd__overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10000; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); animation: tg-cd-fade 0.15s; }
|
|
3
|
+
@keyframes tg-cd-fade { from { opacity: 0; } to { opacity: 1; } }
|
|
4
|
+
.tg-cd { background: var(--tg-color-surface-raised); border-radius: var(--tg-radius-xl); padding: var(--tg-spacing-6); max-width: 24rem; width: 90%; font-family: var(--tg-font-family-sans); text-align: center; animation: tg-cd-scale 0.15s var(--tg-ease-out); }
|
|
5
|
+
@keyframes tg-cd-scale { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
|
|
6
|
+
.tg-cd__icon { font-size: 2.5rem; margin-bottom: var(--tg-spacing-3); }
|
|
7
|
+
.tg-cd--danger .tg-cd__icon { color: var(--tg-color-danger); }
|
|
8
|
+
.tg-cd--warning .tg-cd__icon { color: var(--tg-color-warning); }
|
|
9
|
+
.tg-cd__title { margin: 0 0 var(--tg-spacing-2); font-size: var(--tg-font-size-lg); font-weight: var(--tg-font-weight-semibold); color: var(--tg-color-text-primary); }
|
|
10
|
+
.tg-cd__msg { margin: 0 0 var(--tg-spacing-5); font-size: var(--tg-font-size-sm); color: var(--tg-color-text-secondary); line-height: var(--tg-line-height-relaxed); }
|
|
11
|
+
.tg-cd__actions { display: flex; gap: var(--tg-spacing-2); justify-content: center; }
|
|
12
|
+
.tg-cd__btn { padding: var(--tg-spacing-2) var(--tg-spacing-5); border-radius: var(--tg-radius-lg); font-size: var(--tg-font-size-sm); font-weight: var(--tg-font-weight-medium); cursor: pointer; transition: all var(--tg-duration-fast); border: 1px solid transparent; }
|
|
13
|
+
.tg-cd__btn--cancel { background: none; color: var(--tg-color-text-secondary); border-color: var(--tg-color-border); }
|
|
14
|
+
.tg-cd__btn--cancel:hover { background: var(--tg-color-surface-sunken); }
|
|
15
|
+
.tg-cd__btn--confirm { color: white; }
|
|
16
|
+
.tg-cd__btn--default { background: var(--tg-color-primary); }
|
|
17
|
+
.tg-cd__btn--danger { background: var(--tg-color-danger); }
|
|
18
|
+
.tg-cd__btn--warning { background: var(--tg-color-warning); }
|
|
19
|
+
.tg-cd__btn--confirm:hover { filter: brightness(1.1); }
|