@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,117 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.tg-table-wrapper {
|
|
7
|
+
border: 1px solid var(--tg-color-neutral-200, #e5e7eb);
|
|
8
|
+
border-radius: var(--tg-radius-lg, 12px);
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.tg-table-scroll {
|
|
13
|
+
overflow-x: auto;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.tg-table {
|
|
17
|
+
width: 100%;
|
|
18
|
+
border-collapse: collapse;
|
|
19
|
+
font-family: var(--tg-font-family, sans-serif);
|
|
20
|
+
font-size: var(--tg-font-size-sm, 0.8125rem);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Header */
|
|
24
|
+
.tg-table thead {
|
|
25
|
+
background: var(--tg-color-neutral-50, #f9fafb);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.tg-table th {
|
|
29
|
+
text-align: left;
|
|
30
|
+
padding: var(--tg-spacing-sm, 12px) var(--tg-spacing-md, 16px);
|
|
31
|
+
font-weight: var(--tg-font-weight-semibold, 600);
|
|
32
|
+
color: var(--tg-color-text-secondary, #6b7280);
|
|
33
|
+
font-size: 0.75rem;
|
|
34
|
+
text-transform: uppercase;
|
|
35
|
+
letter-spacing: 0.04em;
|
|
36
|
+
border-bottom: 1px solid var(--tg-color-neutral-200, #e5e7eb);
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
user-select: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.tg-table th--sortable {
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
transition: color var(--tg-duration-fast, 150ms);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.tg-table th--sortable:hover {
|
|
47
|
+
color: var(--tg-color-text, #111827);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.tg-table__sort-icon {
|
|
51
|
+
display: inline-flex;
|
|
52
|
+
margin-left: var(--tg-spacing-2xs, 4px);
|
|
53
|
+
opacity: 0.4;
|
|
54
|
+
vertical-align: middle;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.tg-table__sort-icon--active {
|
|
58
|
+
opacity: 1;
|
|
59
|
+
color: var(--tg-color-primary, #00853F);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.tg-table__sort-icon svg {
|
|
63
|
+
width: 14px;
|
|
64
|
+
height: 14px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Body */
|
|
68
|
+
.tg-table td {
|
|
69
|
+
padding: var(--tg-spacing-sm, 12px) var(--tg-spacing-md, 16px);
|
|
70
|
+
color: var(--tg-color-text, #111827);
|
|
71
|
+
border-bottom: 1px solid var(--tg-color-neutral-100, #f3f4f6);
|
|
72
|
+
vertical-align: middle;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.tg-table tbody tr {
|
|
76
|
+
transition: background var(--tg-duration-fast, 150ms);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.tg-table tbody tr:hover {
|
|
80
|
+
background: var(--tg-color-neutral-50, #f9fafb);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.tg-table tbody tr:last-child td {
|
|
84
|
+
border-bottom: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Striped */
|
|
88
|
+
.tg-table--striped tbody tr:nth-child(even) {
|
|
89
|
+
background: var(--tg-color-neutral-50, #f9fafb);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Compact */
|
|
93
|
+
.tg-table--compact th,
|
|
94
|
+
.tg-table--compact td {
|
|
95
|
+
padding: var(--tg-spacing-xs, 8px) var(--tg-spacing-sm, 12px);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Selectable */
|
|
99
|
+
.tg-table__checkbox {
|
|
100
|
+
width: 18px;
|
|
101
|
+
height: 18px;
|
|
102
|
+
accent-color: var(--tg-color-primary, #00853F);
|
|
103
|
+
cursor: pointer;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* Empty */
|
|
107
|
+
.tg-table__empty {
|
|
108
|
+
text-align: center;
|
|
109
|
+
padding: var(--tg-spacing-2xl, 48px) var(--tg-spacing-lg, 24px);
|
|
110
|
+
color: var(--tg-color-text-secondary, #6b7280);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.tg-table__empty-icon {
|
|
114
|
+
font-size: 2rem;
|
|
115
|
+
margin-bottom: var(--tg-spacing-sm, 12px);
|
|
116
|
+
opacity: 0.4;
|
|
117
|
+
}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class TgTable {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.columns = [];
|
|
5
|
+
this.data = [];
|
|
6
|
+
this.striped = false;
|
|
7
|
+
this.compact = false;
|
|
8
|
+
this.selectable = false;
|
|
9
|
+
this.emptyText = 'Aucune donnée';
|
|
10
|
+
this.sortKey = null;
|
|
11
|
+
this.sortDir = 'asc';
|
|
12
|
+
this.selectedRows = new Set();
|
|
13
|
+
this.handleSort = (col) => {
|
|
14
|
+
if (!col.sortable)
|
|
15
|
+
return;
|
|
16
|
+
if (this.sortKey === col.key) {
|
|
17
|
+
this.sortDir = this.sortDir === 'asc' ? 'desc' : 'asc';
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
this.sortKey = col.key;
|
|
21
|
+
this.sortDir = 'asc';
|
|
22
|
+
}
|
|
23
|
+
this.tgSort.emit({ key: col.key, direction: this.sortDir });
|
|
24
|
+
};
|
|
25
|
+
this.toggleRow = (index) => {
|
|
26
|
+
const next = new Set(this.selectedRows);
|
|
27
|
+
if (next.has(index))
|
|
28
|
+
next.delete(index);
|
|
29
|
+
else
|
|
30
|
+
next.add(index);
|
|
31
|
+
this.selectedRows = next;
|
|
32
|
+
this.tgSelect.emit([...next]);
|
|
33
|
+
};
|
|
34
|
+
this.toggleAll = () => {
|
|
35
|
+
const rows = this.sortedData;
|
|
36
|
+
if (this.selectedRows.size === rows.length) {
|
|
37
|
+
this.selectedRows = new Set();
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this.selectedRows = new Set(rows.map((_, i) => i));
|
|
41
|
+
}
|
|
42
|
+
this.tgSelect.emit([...this.selectedRows]);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
get parsedColumns() {
|
|
46
|
+
if (typeof this.columns === 'string') {
|
|
47
|
+
try {
|
|
48
|
+
return JSON.parse(this.columns);
|
|
49
|
+
}
|
|
50
|
+
catch (_a) {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return this.columns;
|
|
55
|
+
}
|
|
56
|
+
get parsedData() {
|
|
57
|
+
if (typeof this.data === 'string') {
|
|
58
|
+
try {
|
|
59
|
+
return JSON.parse(this.data);
|
|
60
|
+
}
|
|
61
|
+
catch (_a) {
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return this.data;
|
|
66
|
+
}
|
|
67
|
+
get sortedData() {
|
|
68
|
+
const rows = [...this.parsedData];
|
|
69
|
+
if (!this.sortKey)
|
|
70
|
+
return rows;
|
|
71
|
+
const key = this.sortKey;
|
|
72
|
+
const dir = this.sortDir === 'asc' ? 1 : -1;
|
|
73
|
+
return rows.sort((a, b) => {
|
|
74
|
+
const va = a[key];
|
|
75
|
+
const vb = b[key];
|
|
76
|
+
if (va == null)
|
|
77
|
+
return 1;
|
|
78
|
+
if (vb == null)
|
|
79
|
+
return -1;
|
|
80
|
+
if (typeof va === 'number' && typeof vb === 'number')
|
|
81
|
+
return (va - vb) * dir;
|
|
82
|
+
return String(va).localeCompare(String(vb)) * dir;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
render() {
|
|
86
|
+
const cols = this.parsedColumns;
|
|
87
|
+
const rows = this.sortedData;
|
|
88
|
+
const ascending = `<svg viewBox="0 0 14 14" fill="currentColor"><path d="M7 3l4 5H3l4-5z"/></svg>`;
|
|
89
|
+
const descending = `<svg viewBox="0 0 14 14" fill="currentColor"><path d="M7 11l-4-5h8l-4 5z"/></svg>`;
|
|
90
|
+
return (h(Host, { key: '99c2d954442f43a51e1ba7d74f5dbee0ea761d74' }, h("div", { key: '9e7809c0d913e4e9102dc9b2833cc60747c5f209', class: "tg-table-wrapper" }, h("div", { key: 'a5c20b050f99d52887bcda2ddd61fb252e055764', class: "tg-table-scroll" }, h("table", { key: 'ef7ad43c02aac35b5e49a8128e8eb327a9921773', class: {
|
|
91
|
+
'tg-table': true,
|
|
92
|
+
'tg-table--striped': this.striped,
|
|
93
|
+
'tg-table--compact': this.compact,
|
|
94
|
+
} }, h("thead", { key: 'f7157def8d8f5701826eafd802edfb5e98d60c97' }, h("tr", { key: '34c77c7712b0de495292ceb67440690f3ecee561' }, this.selectable && (h("th", { key: '37fd83351f092b4c73f31db57ef8f8a115d91489', style: { width: '40px' } }, h("input", { key: 'f18e847bad40bc3e0960c683c5978ff0759f1eec', class: "tg-table__checkbox", type: "checkbox", checked: rows.length > 0 && this.selectedRows.size === rows.length, onChange: () => this.toggleAll(), "aria-label": "S\u00E9lectionner tout" }))), cols.map(col => (h("th", { class: { 'th--sortable': !!col.sortable }, style: col.width ? { width: col.width } : {}, onClick: () => this.handleSort(col) }, col.label, col.sortable && (h("span", { class: {
|
|
95
|
+
'tg-table__sort-icon': true,
|
|
96
|
+
'tg-table__sort-icon--active': this.sortKey === col.key,
|
|
97
|
+
}, innerHTML: this.sortKey === col.key && this.sortDir === 'desc' ? descending : ascending }))))))), h("tbody", { key: 'a9e19da69c43d3d7fdf40e5a52a6a2259d3009e7' }, rows.length === 0 ? (h("tr", null, h("td", { colSpan: cols.length + (this.selectable ? 1 : 0) }, h("div", { class: "tg-table__empty" }, h("div", { class: "tg-table__empty-icon" }, "\uD83D\uDCCB"), this.emptyText)))) : (rows.map((row, i) => (h("tr", null, this.selectable && (h("td", null, h("input", { class: "tg-table__checkbox", type: "checkbox", checked: this.selectedRows.has(i), onChange: () => this.toggleRow(i), "aria-label": `Sélectionner la ligne ${i + 1}` }))), cols.map(col => {
|
|
98
|
+
var _a;
|
|
99
|
+
return (h("td", null, String((_a = row[col.key]) !== null && _a !== void 0 ? _a : '')));
|
|
100
|
+
})))))))))));
|
|
101
|
+
}
|
|
102
|
+
static get is() { return "tg-table"; }
|
|
103
|
+
static get encapsulation() { return "shadow"; }
|
|
104
|
+
static get originalStyleUrls() {
|
|
105
|
+
return {
|
|
106
|
+
"$": ["tg-table.css"]
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
static get styleUrls() {
|
|
110
|
+
return {
|
|
111
|
+
"$": ["tg-table.css"]
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
static get properties() {
|
|
115
|
+
return {
|
|
116
|
+
"columns": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"mutable": false,
|
|
119
|
+
"complexType": {
|
|
120
|
+
"original": "string | TgTableColumn[]",
|
|
121
|
+
"resolved": "TgTableColumn[] | string",
|
|
122
|
+
"references": {
|
|
123
|
+
"TgTableColumn": {
|
|
124
|
+
"location": "local",
|
|
125
|
+
"path": "/Users/mahykane/work/Teranga-Design-Systems/packages/components/src/components/tg-table/tg-table.tsx",
|
|
126
|
+
"id": "src/components/tg-table/tg-table.tsx::TgTableColumn"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"required": false,
|
|
131
|
+
"optional": false,
|
|
132
|
+
"docs": {
|
|
133
|
+
"tags": [],
|
|
134
|
+
"text": ""
|
|
135
|
+
},
|
|
136
|
+
"getter": false,
|
|
137
|
+
"setter": false,
|
|
138
|
+
"reflect": false,
|
|
139
|
+
"attribute": "columns",
|
|
140
|
+
"defaultValue": "[]"
|
|
141
|
+
},
|
|
142
|
+
"data": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"mutable": false,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "string | Record<string, unknown>[]",
|
|
147
|
+
"resolved": "Record<string, unknown>[] | string",
|
|
148
|
+
"references": {
|
|
149
|
+
"Record": {
|
|
150
|
+
"location": "global",
|
|
151
|
+
"id": "global::Record"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"required": false,
|
|
156
|
+
"optional": false,
|
|
157
|
+
"docs": {
|
|
158
|
+
"tags": [],
|
|
159
|
+
"text": ""
|
|
160
|
+
},
|
|
161
|
+
"getter": false,
|
|
162
|
+
"setter": false,
|
|
163
|
+
"reflect": false,
|
|
164
|
+
"attribute": "data",
|
|
165
|
+
"defaultValue": "[]"
|
|
166
|
+
},
|
|
167
|
+
"striped": {
|
|
168
|
+
"type": "boolean",
|
|
169
|
+
"mutable": false,
|
|
170
|
+
"complexType": {
|
|
171
|
+
"original": "boolean",
|
|
172
|
+
"resolved": "boolean",
|
|
173
|
+
"references": {}
|
|
174
|
+
},
|
|
175
|
+
"required": false,
|
|
176
|
+
"optional": false,
|
|
177
|
+
"docs": {
|
|
178
|
+
"tags": [],
|
|
179
|
+
"text": ""
|
|
180
|
+
},
|
|
181
|
+
"getter": false,
|
|
182
|
+
"setter": false,
|
|
183
|
+
"reflect": false,
|
|
184
|
+
"attribute": "striped",
|
|
185
|
+
"defaultValue": "false"
|
|
186
|
+
},
|
|
187
|
+
"compact": {
|
|
188
|
+
"type": "boolean",
|
|
189
|
+
"mutable": false,
|
|
190
|
+
"complexType": {
|
|
191
|
+
"original": "boolean",
|
|
192
|
+
"resolved": "boolean",
|
|
193
|
+
"references": {}
|
|
194
|
+
},
|
|
195
|
+
"required": false,
|
|
196
|
+
"optional": false,
|
|
197
|
+
"docs": {
|
|
198
|
+
"tags": [],
|
|
199
|
+
"text": ""
|
|
200
|
+
},
|
|
201
|
+
"getter": false,
|
|
202
|
+
"setter": false,
|
|
203
|
+
"reflect": false,
|
|
204
|
+
"attribute": "compact",
|
|
205
|
+
"defaultValue": "false"
|
|
206
|
+
},
|
|
207
|
+
"selectable": {
|
|
208
|
+
"type": "boolean",
|
|
209
|
+
"mutable": false,
|
|
210
|
+
"complexType": {
|
|
211
|
+
"original": "boolean",
|
|
212
|
+
"resolved": "boolean",
|
|
213
|
+
"references": {}
|
|
214
|
+
},
|
|
215
|
+
"required": false,
|
|
216
|
+
"optional": false,
|
|
217
|
+
"docs": {
|
|
218
|
+
"tags": [],
|
|
219
|
+
"text": ""
|
|
220
|
+
},
|
|
221
|
+
"getter": false,
|
|
222
|
+
"setter": false,
|
|
223
|
+
"reflect": false,
|
|
224
|
+
"attribute": "selectable",
|
|
225
|
+
"defaultValue": "false"
|
|
226
|
+
},
|
|
227
|
+
"emptyText": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"mutable": false,
|
|
230
|
+
"complexType": {
|
|
231
|
+
"original": "string",
|
|
232
|
+
"resolved": "string",
|
|
233
|
+
"references": {}
|
|
234
|
+
},
|
|
235
|
+
"required": false,
|
|
236
|
+
"optional": false,
|
|
237
|
+
"docs": {
|
|
238
|
+
"tags": [],
|
|
239
|
+
"text": ""
|
|
240
|
+
},
|
|
241
|
+
"getter": false,
|
|
242
|
+
"setter": false,
|
|
243
|
+
"reflect": false,
|
|
244
|
+
"attribute": "empty-text",
|
|
245
|
+
"defaultValue": "'Aucune donn\u00E9e'"
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
static get states() {
|
|
250
|
+
return {
|
|
251
|
+
"sortKey": {},
|
|
252
|
+
"sortDir": {},
|
|
253
|
+
"selectedRows": {}
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
static get events() {
|
|
257
|
+
return [{
|
|
258
|
+
"method": "tgSort",
|
|
259
|
+
"name": "tgSort",
|
|
260
|
+
"bubbles": true,
|
|
261
|
+
"cancelable": true,
|
|
262
|
+
"composed": true,
|
|
263
|
+
"docs": {
|
|
264
|
+
"tags": [],
|
|
265
|
+
"text": ""
|
|
266
|
+
},
|
|
267
|
+
"complexType": {
|
|
268
|
+
"original": "{ key: string; direction: string }",
|
|
269
|
+
"resolved": "{ key: string; direction: string; }",
|
|
270
|
+
"references": {}
|
|
271
|
+
}
|
|
272
|
+
}, {
|
|
273
|
+
"method": "tgSelect",
|
|
274
|
+
"name": "tgSelect",
|
|
275
|
+
"bubbles": true,
|
|
276
|
+
"cancelable": true,
|
|
277
|
+
"composed": true,
|
|
278
|
+
"docs": {
|
|
279
|
+
"tags": [],
|
|
280
|
+
"text": ""
|
|
281
|
+
},
|
|
282
|
+
"complexType": {
|
|
283
|
+
"original": "number[]",
|
|
284
|
+
"resolved": "number[]",
|
|
285
|
+
"references": {}
|
|
286
|
+
}
|
|
287
|
+
}];
|
|
288
|
+
}
|
|
289
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.tg-tabs {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* Tab list */
|
|
11
|
+
.tg-tabs__list {
|
|
12
|
+
display: flex;
|
|
13
|
+
gap: var(--tg-spacing-2xs, 4px);
|
|
14
|
+
border-bottom: 2px solid var(--tg-color-neutral-100, #f3f4f6);
|
|
15
|
+
padding: 0;
|
|
16
|
+
margin: 0;
|
|
17
|
+
list-style: none;
|
|
18
|
+
overflow-x: auto;
|
|
19
|
+
scrollbar-width: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.tg-tabs__list::-webkit-scrollbar { display: none; }
|
|
23
|
+
|
|
24
|
+
.tg-tabs__list--pills {
|
|
25
|
+
border-bottom: none;
|
|
26
|
+
background: var(--tg-color-neutral-50, #f9fafb);
|
|
27
|
+
border-radius: var(--tg-radius-lg, 12px);
|
|
28
|
+
padding: var(--tg-spacing-2xs, 4px);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Tab trigger */
|
|
32
|
+
.tg-tabs__tab {
|
|
33
|
+
appearance: none;
|
|
34
|
+
border: none;
|
|
35
|
+
background: transparent;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
font-family: var(--tg-font-family, sans-serif);
|
|
38
|
+
font-size: var(--tg-font-size-sm, 0.8125rem);
|
|
39
|
+
font-weight: var(--tg-font-weight-medium, 500);
|
|
40
|
+
color: var(--tg-color-text-secondary, #6b7280);
|
|
41
|
+
padding: var(--tg-spacing-sm, 12px) var(--tg-spacing-md, 16px);
|
|
42
|
+
white-space: nowrap;
|
|
43
|
+
position: relative;
|
|
44
|
+
transition: color var(--tg-duration-fast, 150ms), background var(--tg-duration-fast, 150ms);
|
|
45
|
+
border-radius: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.tg-tabs__tab::after {
|
|
49
|
+
content: '';
|
|
50
|
+
position: absolute;
|
|
51
|
+
left: 0;
|
|
52
|
+
right: 0;
|
|
53
|
+
bottom: -2px;
|
|
54
|
+
height: 2px;
|
|
55
|
+
background: transparent;
|
|
56
|
+
transition: background var(--tg-duration-fast, 150ms);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.tg-tabs__tab:hover {
|
|
60
|
+
color: var(--tg-color-text, #111827);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.tg-tabs__tab--active {
|
|
64
|
+
color: var(--tg-color-primary, #00853F);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.tg-tabs__tab--active::after {
|
|
68
|
+
background: var(--tg-color-primary, #00853F);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.tg-tabs__tab:focus-visible {
|
|
72
|
+
outline: none;
|
|
73
|
+
box-shadow: var(--tg-focus-ring);
|
|
74
|
+
border-radius: var(--tg-radius-sm, 4px);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Pill variant */
|
|
78
|
+
.tg-tabs__list--pills .tg-tabs__tab {
|
|
79
|
+
border-radius: var(--tg-radius-md, 8px);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.tg-tabs__list--pills .tg-tabs__tab::after { display: none; }
|
|
83
|
+
|
|
84
|
+
.tg-tabs__list--pills .tg-tabs__tab--active {
|
|
85
|
+
background: var(--tg-color-surface, #fff);
|
|
86
|
+
box-shadow: var(--tg-shadow-sm, 0 1px 3px rgba(0,0,0,0.1));
|
|
87
|
+
color: var(--tg-color-primary, #00853F);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Badge */
|
|
91
|
+
.tg-tabs__badge {
|
|
92
|
+
display: inline-flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
font-size: 0.6875rem;
|
|
96
|
+
font-weight: var(--tg-font-weight-semibold, 600);
|
|
97
|
+
background: var(--tg-color-neutral-100, #f3f4f6);
|
|
98
|
+
color: var(--tg-color-text-secondary, #6b7280);
|
|
99
|
+
border-radius: 9999px;
|
|
100
|
+
padding: 0 6px;
|
|
101
|
+
min-width: 18px;
|
|
102
|
+
height: 18px;
|
|
103
|
+
margin-left: var(--tg-spacing-2xs, 4px);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.tg-tabs__tab--active .tg-tabs__badge {
|
|
107
|
+
background: var(--tg-color-primary-50, #ecfdf5);
|
|
108
|
+
color: var(--tg-color-primary, #00853F);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* Panel */
|
|
112
|
+
.tg-tabs__panel {
|
|
113
|
+
padding: var(--tg-spacing-md, 16px) 0;
|
|
114
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class TgTabs {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.tabs = [];
|
|
5
|
+
this.variant = 'underline';
|
|
6
|
+
this.selectTab = (tab) => {
|
|
7
|
+
if (tab.disabled)
|
|
8
|
+
return;
|
|
9
|
+
this.internalActive = tab.id;
|
|
10
|
+
this.activeTab = tab.id;
|
|
11
|
+
this.tgTabChange.emit(tab.id);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
get parsedTabs() {
|
|
15
|
+
if (typeof this.tabs === 'string') {
|
|
16
|
+
try {
|
|
17
|
+
return JSON.parse(this.tabs);
|
|
18
|
+
}
|
|
19
|
+
catch (_a) {
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return this.tabs;
|
|
24
|
+
}
|
|
25
|
+
componentWillLoad() {
|
|
26
|
+
var _a;
|
|
27
|
+
const items = this.parsedTabs;
|
|
28
|
+
this.internalActive = (_a = this.activeTab) !== null && _a !== void 0 ? _a : (items.length > 0 ? items[0].id : '');
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
const items = this.parsedTabs;
|
|
32
|
+
return (h(Host, { key: 'c68ffca94fcc42f99cde35f88f37677e4b85e8e3' }, h("div", { key: 'f4303416e3144410bc3cce2d71dbd8b9ef9e0def', class: "tg-tabs" }, h("div", { key: '4da9fbb011b839a3400e07ca34968f7dc6df5d86', class: { 'tg-tabs__list': true, 'tg-tabs__list--pills': this.variant === 'pills' }, role: "tablist" }, items.map(tab => (h("button", { class: {
|
|
33
|
+
'tg-tabs__tab': true,
|
|
34
|
+
'tg-tabs__tab--active': this.internalActive === tab.id,
|
|
35
|
+
}, role: "tab", "aria-selected": this.internalActive === tab.id ? 'true' : 'false', "aria-disabled": tab.disabled ? 'true' : undefined, onClick: () => this.selectTab(tab), tabindex: tab.disabled ? -1 : 0 }, tab.label, tab.badge && h("span", { class: "tg-tabs__badge" }, tab.badge))))), h("div", { key: 'ec6ced09c19b7e257706592a01a7e6457833113f', class: "tg-tabs__panel", role: "tabpanel" }, h("slot", { key: 'a7ecf6c0045e9b3245decfec424b1f0cb2b642fc' })))));
|
|
36
|
+
}
|
|
37
|
+
static get is() { return "tg-tabs"; }
|
|
38
|
+
static get encapsulation() { return "shadow"; }
|
|
39
|
+
static get originalStyleUrls() {
|
|
40
|
+
return {
|
|
41
|
+
"$": ["tg-tabs.css"]
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
static get styleUrls() {
|
|
45
|
+
return {
|
|
46
|
+
"$": ["tg-tabs.css"]
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
static get properties() {
|
|
50
|
+
return {
|
|
51
|
+
"tabs": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"mutable": false,
|
|
54
|
+
"complexType": {
|
|
55
|
+
"original": "string | TgTabItem[]",
|
|
56
|
+
"resolved": "TgTabItem[] | string",
|
|
57
|
+
"references": {
|
|
58
|
+
"TgTabItem": {
|
|
59
|
+
"location": "local",
|
|
60
|
+
"path": "/Users/mahykane/work/Teranga-Design-Systems/packages/components/src/components/tg-tabs/tg-tabs.tsx",
|
|
61
|
+
"id": "src/components/tg-tabs/tg-tabs.tsx::TgTabItem"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"required": false,
|
|
66
|
+
"optional": false,
|
|
67
|
+
"docs": {
|
|
68
|
+
"tags": [],
|
|
69
|
+
"text": ""
|
|
70
|
+
},
|
|
71
|
+
"getter": false,
|
|
72
|
+
"setter": false,
|
|
73
|
+
"reflect": false,
|
|
74
|
+
"attribute": "tabs",
|
|
75
|
+
"defaultValue": "[]"
|
|
76
|
+
},
|
|
77
|
+
"activeTab": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"mutable": true,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "string",
|
|
82
|
+
"resolved": "string | undefined",
|
|
83
|
+
"references": {}
|
|
84
|
+
},
|
|
85
|
+
"required": false,
|
|
86
|
+
"optional": true,
|
|
87
|
+
"docs": {
|
|
88
|
+
"tags": [],
|
|
89
|
+
"text": ""
|
|
90
|
+
},
|
|
91
|
+
"getter": false,
|
|
92
|
+
"setter": false,
|
|
93
|
+
"reflect": false,
|
|
94
|
+
"attribute": "active-tab"
|
|
95
|
+
},
|
|
96
|
+
"variant": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"mutable": false,
|
|
99
|
+
"complexType": {
|
|
100
|
+
"original": "'underline' | 'pills'",
|
|
101
|
+
"resolved": "\"pills\" | \"underline\"",
|
|
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": "variant",
|
|
114
|
+
"defaultValue": "'underline'"
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
static get states() {
|
|
119
|
+
return {
|
|
120
|
+
"internalActive": {}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
static get events() {
|
|
124
|
+
return [{
|
|
125
|
+
"method": "tgTabChange",
|
|
126
|
+
"name": "tgTabChange",
|
|
127
|
+
"bubbles": true,
|
|
128
|
+
"cancelable": true,
|
|
129
|
+
"composed": true,
|
|
130
|
+
"docs": {
|
|
131
|
+
"tags": [],
|
|
132
|
+
"text": ""
|
|
133
|
+
},
|
|
134
|
+
"complexType": {
|
|
135
|
+
"original": "string",
|
|
136
|
+
"resolved": "string",
|
|
137
|
+
"references": {}
|
|
138
|
+
}
|
|
139
|
+
}];
|
|
140
|
+
}
|
|
141
|
+
}
|