@datatechsolutions/tympan 0.3.0 → 0.4.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/README.md +22 -4
- package/dist/{Avatar-P14MVkK1.js → Avatar-CU7B1WsX.js} +61 -1
- package/dist/{Avatar-P14MVkK1.js.map → Avatar-CU7B1WsX.js.map} +1 -1
- package/dist/avatars.js +1 -1
- package/dist/elements-DCGBSGS8.js +14699 -0
- package/dist/elements-DCGBSGS8.js.map +1 -0
- package/dist/elements-react.d.ts +1378 -0
- package/dist/elements-react.js +3639 -0
- package/dist/elements-react.js.map +1 -0
- package/dist/elements.bundle.js +5 -0
- package/dist/elements.d.ts +13520 -0
- package/dist/elements.js +3 -0
- package/dist/flow.css +174 -3
- package/dist/flow.d.ts +86 -4
- package/dist/flow.js +200 -11
- package/dist/flow.js.map +1 -1
- package/dist/{index-C3WAwKdm.d.ts → index-J-7EBkCL.d.ts} +175 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/parse-Dq4x3Wet.js +345 -0
- package/dist/parse-Dq4x3Wet.js.map +1 -0
- package/dist/{src-Ds9ArSaP.js → src-uCyIE-Te.js} +859 -668
- package/dist/src-uCyIE-Te.js.map +1 -0
- package/dist/styles.css +6937 -2592
- package/docs/html-contract.md +644 -0
- package/package.json +25 -14
- package/src/avatars/GeneratedAvatar.tsx +41 -0
- package/src/avatars/avatarSvg.ts +252 -0
- package/src/avatars/avatars.test.tsx +268 -0
- package/src/avatars/index.ts +30 -0
- package/src/avatars/styles.ts +80 -0
- package/src/base.css +49 -0
- package/src/components/action-menu/ActionMenu.css +152 -0
- package/src/components/action-menu/ActionMenu.test.tsx +189 -0
- package/src/components/action-menu/ActionMenu.tsx +282 -0
- package/src/components/activity-feed/ActivityFeed.css +91 -0
- package/src/components/activity-feed/ActivityFeed.test.tsx +89 -0
- package/src/components/activity-feed/ActivityFeed.tsx +86 -0
- package/src/components/actor-chip/ActorChip.css +93 -0
- package/src/components/actor-chip/ActorChip.test.tsx +89 -0
- package/src/components/actor-chip/ActorChip.tsx +98 -0
- package/src/components/agent-output-card/AgentOutputCard.css +105 -0
- package/src/components/agent-output-card/AgentOutputCard.rtl.test.tsx +12 -0
- package/src/components/agent-output-card/AgentOutputCard.test.tsx +65 -0
- package/src/components/agent-output-card/AgentOutputCard.tsx +74 -0
- package/src/components/ambient-backdrop/AmbientBackdrop.css +45 -0
- package/src/components/ambient-backdrop/AmbientBackdrop.rtl.test.tsx +12 -0
- package/src/components/ambient-backdrop/AmbientBackdrop.test.tsx +60 -0
- package/src/components/ambient-backdrop/AmbientBackdrop.tsx +11 -0
- package/src/components/app-frame/AppFrame.css +285 -0
- package/src/components/app-frame/AppFrame.test.tsx +127 -0
- package/src/components/app-frame/AppFrame.tsx +231 -0
- package/src/components/app-frame/AppFrameRail.css +321 -0
- package/src/components/app-frame/RailFrame.test.tsx +159 -0
- package/src/components/app-frame/RailFrame.tsx +140 -0
- package/src/components/app-frame/RailNav.tsx +118 -0
- package/src/components/app-frame/frameContext.ts +22 -0
- package/src/components/app-launcher-grid/AppLauncherGrid.css +140 -0
- package/src/components/app-launcher-grid/AppLauncherGrid.test.tsx +103 -0
- package/src/components/app-launcher-grid/AppLauncherGrid.tsx +201 -0
- package/src/components/app-navigation/AppNavigation.css +354 -0
- package/src/components/app-navigation/AppNavigation.test.tsx +129 -0
- package/src/components/app-navigation/AppNavigation.tsx +372 -0
- package/src/components/app-navigation/builders.ts +117 -0
- package/src/components/attention-list/AttentionList.css +90 -0
- package/src/components/attention-list/AttentionList.test.tsx +84 -0
- package/src/components/attention-list/AttentionList.tsx +82 -0
- package/src/components/auth-frame/AuthFrame.css +85 -0
- package/src/components/auth-frame/AuthFrame.rtl.test.tsx +14 -0
- package/src/components/auth-frame/AuthFrame.test.tsx +89 -0
- package/src/components/auth-frame/AuthFrame.tsx +35 -0
- package/src/components/avatar/Avatar.css +134 -0
- package/src/components/avatar/Avatar.test.tsx +98 -0
- package/src/components/avatar/Avatar.tsx +114 -0
- package/src/components/brand-loader/BrandLoader.css +78 -0
- package/src/components/brand-loader/BrandLoader.rtl.test.tsx +13 -0
- package/src/components/brand-loader/BrandLoader.test.tsx +83 -0
- package/src/components/brand-loader/BrandLoader.tsx +34 -0
- package/src/components/brand-mark/BrandMark.css +60 -0
- package/src/components/brand-mark/BrandMark.rtl.test.tsx +16 -0
- package/src/components/brand-mark/BrandMark.test.tsx +60 -0
- package/src/components/brand-mark/BrandMark.tsx +76 -0
- package/src/components/brand-panel/BrandPanel.css +100 -0
- package/src/components/brand-panel/BrandPanel.rtl.test.tsx +13 -0
- package/src/components/brand-panel/BrandPanel.test.tsx +59 -0
- package/src/components/brand-panel/BrandPanel.tsx +61 -0
- package/src/components/brand-wordmark/BrandWordmark.css +37 -0
- package/src/components/breadcrumbs/Breadcrumbs.css +158 -0
- package/src/components/breadcrumbs/Breadcrumbs.test.tsx +104 -0
- package/src/components/breadcrumbs/Breadcrumbs.tsx +130 -0
- package/src/components/button/Button.css +214 -0
- package/src/components/button/Button.test.tsx +177 -0
- package/src/components/button/Button.tsx +205 -0
- package/src/components/calendar/Calendar.css +260 -0
- package/src/components/calendar/Calendar.test.tsx +178 -0
- package/src/components/calendar/Calendar.tsx +341 -0
- package/src/components/cascade-grid/CascadeGrid.css +31 -0
- package/src/components/cascade-grid/CascadeGrid.rtl.test.tsx +20 -0
- package/src/components/cascade-grid/CascadeGrid.test.tsx +126 -0
- package/src/components/cascade-grid/CascadeGrid.tsx +98 -0
- package/src/components/category-tabs/CategoryTabs.css +108 -0
- package/src/components/category-tabs/CategoryTabs.test.tsx +118 -0
- package/src/components/category-tabs/CategoryTabs.tsx +94 -0
- package/src/components/chart/Chart.css +215 -0
- package/src/components/chart/Chart.rtl.test.tsx +42 -0
- package/src/components/chart/Chart.test.tsx +187 -0
- package/src/components/chart/Chart.tsx +502 -0
- package/src/components/chart/chartMath.ts +73 -0
- package/src/components/chart/plot.ts +53 -0
- package/src/components/chart/types.ts +72 -0
- package/src/components/checkbox/Checkbox.css +168 -0
- package/src/components/checkbox/Checkbox.test.tsx +97 -0
- package/src/components/checkbox/Checkbox.tsx +168 -0
- package/src/components/chip-group/ChipGroup.css +182 -0
- package/src/components/chip-group/ChipGroup.test.tsx +135 -0
- package/src/components/chip-group/ChipGroup.tsx +169 -0
- package/src/components/choice-card/ChoiceCard.css +141 -0
- package/src/components/choice-card/ChoiceCard.test.tsx +111 -0
- package/src/components/choice-card/ChoiceCard.tsx +139 -0
- package/src/components/choice-grid/ChoiceGrid.css +110 -0
- package/src/components/choice-grid/ChoiceGrid.test.tsx +85 -0
- package/src/components/choice-grid/ChoiceGrid.tsx +85 -0
- package/src/components/choice-tile/ChoiceTile.css +79 -0
- package/src/components/choice-tile/ChoiceTile.test.tsx +118 -0
- package/src/components/choice-tile/ChoiceTile.tsx +57 -0
- package/src/components/command-palette/CommandPalette.css +296 -0
- package/src/components/command-palette/CommandPalette.test.tsx +190 -0
- package/src/components/command-palette/CommandPalette.tsx +340 -0
- package/src/components/command-palette/model.ts +156 -0
- package/src/components/compact-confirm/CompactConfirm.css +136 -0
- package/src/components/compact-confirm/CompactConfirm.test.tsx +119 -0
- package/src/components/compact-confirm/CompactConfirm.tsx +91 -0
- package/src/components/confirm-service/ConfirmService.test.tsx +121 -0
- package/src/components/confirm-service/ConfirmService.tsx +152 -0
- package/src/components/consent-banner/ConsentBanner.css +73 -0
- package/src/components/consent-banner/ConsentBanner.rtl.test.tsx +12 -0
- package/src/components/consent-banner/ConsentBanner.test.tsx +86 -0
- package/src/components/consent-banner/ConsentBanner.tsx +66 -0
- package/src/components/contact-card/ContactCard.css +105 -0
- package/src/components/contact-card/ContactCard.rtl.test.tsx +17 -0
- package/src/components/contact-card/ContactCard.test.tsx +58 -0
- package/src/components/contact-card/ContactCard.tsx +99 -0
- package/src/components/copy-identifier/CopyIdentifier.css +90 -0
- package/src/components/copy-identifier/CopyIdentifier.test.tsx +103 -0
- package/src/components/copy-identifier/CopyIdentifier.tsx +89 -0
- package/src/components/count-badge/CountBadge.css +54 -0
- package/src/components/count-badge/CountBadge.test.tsx +81 -0
- package/src/components/count-badge/CountBadge.tsx +68 -0
- package/src/components/currency-field/CurrencyField.css +88 -0
- package/src/components/currency-field/CurrencyField.test.tsx +147 -0
- package/src/components/currency-field/CurrencyField.tsx +219 -0
- package/src/components/data-table/DataTable.css +362 -0
- package/src/components/data-table/DataTable.test.tsx +214 -0
- package/src/components/data-table/DataTable.tsx +396 -0
- package/src/components/date-field/DateField.css +126 -0
- package/src/components/date-field/DateField.test.tsx +143 -0
- package/src/components/date-field/DateField.tsx +235 -0
- package/src/components/date-range-field/DateRangeField.css +140 -0
- package/src/components/date-range-field/DateRangeField.test.tsx +187 -0
- package/src/components/date-range-field/DateRangeField.tsx +231 -0
- package/src/components/delta-indicator/DeltaIndicator.css +58 -0
- package/src/components/delta-indicator/DeltaIndicator.rtl.test.tsx +19 -0
- package/src/components/delta-indicator/DeltaIndicator.test.tsx +69 -0
- package/src/components/delta-indicator/DeltaIndicator.tsx +88 -0
- package/src/components/details-popover/DetailsPopover.css +166 -0
- package/src/components/details-popover/DetailsPopover.test.tsx +92 -0
- package/src/components/details-popover/DetailsPopover.tsx +141 -0
- package/src/components/drawer/Drawer.css +188 -0
- package/src/components/drawer/Drawer.test.tsx +152 -0
- package/src/components/drawer/Drawer.tsx +121 -0
- package/src/components/edge-swipe-back/EdgeSwipeBack.css +66 -0
- package/src/components/edge-swipe-back/EdgeSwipeBack.rtl.test.tsx +17 -0
- package/src/components/edge-swipe-back/EdgeSwipeBack.test.tsx +86 -0
- package/src/components/edge-swipe-back/EdgeSwipeBack.tsx +104 -0
- package/src/components/empty-state/EmptyState.css +70 -0
- package/src/components/empty-state/EmptyState.test.tsx +77 -0
- package/src/components/empty-state/EmptyState.tsx +105 -0
- package/src/components/environment-banner/EnvironmentBanner.css +46 -0
- package/src/components/environment-banner/EnvironmentBanner.rtl.test.tsx +13 -0
- package/src/components/environment-banner/EnvironmentBanner.test.tsx +51 -0
- package/src/components/environment-banner/EnvironmentBanner.tsx +75 -0
- package/src/components/error-state/ErrorState.css +113 -0
- package/src/components/error-state/ErrorState.test.tsx +98 -0
- package/src/components/error-state/ErrorState.tsx +145 -0
- package/src/components/evidence-panel/EvidencePanel.css +126 -0
- package/src/components/evidence-panel/EvidencePanel.test.tsx +130 -0
- package/src/components/evidence-panel/EvidencePanel.tsx +120 -0
- package/src/components/feature-showcase-card/FeatureShowcaseCard.css +136 -0
- package/src/components/feature-showcase-card/FeatureShowcaseCard.rtl.test.tsx +13 -0
- package/src/components/feature-showcase-card/FeatureShowcaseCard.test.tsx +91 -0
- package/src/components/feature-showcase-card/FeatureShowcaseCard.tsx +76 -0
- package/src/components/feature-tile/FeatureTile.css +111 -0
- package/src/components/feature-tile/FeatureTile.rtl.test.tsx +14 -0
- package/src/components/feature-tile/FeatureTile.test.tsx +78 -0
- package/src/components/feature-tile/FeatureTile.tsx +52 -0
- package/src/components/federated-sign-in/FederatedSignIn.css +23 -0
- package/src/components/federated-sign-in/FederatedSignIn.rtl.test.tsx +12 -0
- package/src/components/federated-sign-in/FederatedSignIn.test.tsx +74 -0
- package/src/components/federated-sign-in/FederatedSignIn.tsx +68 -0
- package/src/components/field/Field.css +99 -0
- package/src/components/field/Field.test.tsx +134 -0
- package/src/components/field/Field.tsx +228 -0
- package/src/components/filter-chips/FilterChips.css +145 -0
- package/src/components/filter-chips/FilterChips.test.tsx +121 -0
- package/src/components/filter-chips/FilterChips.tsx +134 -0
- package/src/components/filter-field/FilterField.css +11 -0
- package/src/components/filter-field/FilterField.test.tsx +92 -0
- package/src/components/filter-field/FilterField.tsx +43 -0
- package/src/components/filter-tile/FilterTile.css +145 -0
- package/src/components/filter-tile/FilterTile.test.tsx +69 -0
- package/src/components/filter-tile/FilterTile.tsx +87 -0
- package/src/components/flag-set-picker/FlagSetPicker.css +32 -0
- package/src/components/flag-set-picker/FlagSetPicker.test.tsx +75 -0
- package/src/components/flag-set-picker/FlagSetPicker.tsx +92 -0
- package/src/components/floating-action-bar/FloatingActionBar.css +375 -0
- package/src/components/floating-action-bar/FloatingActionBar.test.tsx +309 -0
- package/src/components/floating-action-bar/FloatingActionBar.tsx +655 -0
- package/src/components/floating-action-bar/barModel.ts +147 -0
- package/src/components/floating-action-button/FloatingActionButton.css +54 -0
- package/src/components/floating-action-button/FloatingActionButton.test.tsx +87 -0
- package/src/components/floating-action-button/FloatingActionButton.tsx +87 -0
- package/src/components/form-actions/FormActions.css +34 -0
- package/src/components/form-actions/FormActions.test.tsx +96 -0
- package/src/components/form-actions/FormActions.tsx +83 -0
- package/src/components/form-layout/FormLayout.css +148 -0
- package/src/components/form-layout/FormLayout.test.tsx +137 -0
- package/src/components/form-layout/FormLayout.tsx +177 -0
- package/src/components/glass-check-toggle/GlassCheckToggle.css +92 -0
- package/src/components/glass-check-toggle/GlassCheckToggle.rtl.test.tsx +12 -0
- package/src/components/glass-check-toggle/GlassCheckToggle.test.tsx +70 -0
- package/src/components/glass-check-toggle/GlassCheckToggle.tsx +75 -0
- package/src/components/gradient-mark/GradientMark.css +45 -0
- package/src/components/grouped-disclosure-list/GroupedDisclosureList.css +80 -0
- package/src/components/grouped-disclosure-list/GroupedDisclosureList.test.tsx +92 -0
- package/src/components/grouped-disclosure-list/GroupedDisclosureList.tsx +105 -0
- package/src/components/heading/Heading.css +67 -0
- package/src/components/heading/Heading.test.tsx +93 -0
- package/src/components/heading/Heading.tsx +60 -0
- package/src/components/highlight-stat/HighlightStat.css +50 -0
- package/src/components/highlight-stat/HighlightStat.rtl.test.tsx +13 -0
- package/src/components/highlight-stat/HighlightStat.test.tsx +83 -0
- package/src/components/highlight-stat/HighlightStat.tsx +66 -0
- package/src/components/history-list/HistoryList.css +116 -0
- package/src/components/history-list/HistoryList.test.tsx +88 -0
- package/src/components/history-list/HistoryList.tsx +115 -0
- package/src/components/http-error-page/HttpErrorPage.css +70 -0
- package/src/components/http-error-page/HttpErrorPage.rtl.test.tsx +12 -0
- package/src/components/http-error-page/HttpErrorPage.test.tsx +51 -0
- package/src/components/http-error-page/HttpErrorPage.tsx +70 -0
- package/src/components/image-picker/ImagePicker.css +151 -0
- package/src/components/image-picker/ImagePicker.test.tsx +133 -0
- package/src/components/image-picker/ImagePicker.tsx +167 -0
- package/src/components/inline-notice/InlineNotice.css +101 -0
- package/src/components/inline-notice/InlineNotice.test.tsx +123 -0
- package/src/components/inline-notice/InlineNotice.tsx +98 -0
- package/src/components/insight-card/InsightCard.css +109 -0
- package/src/components/insight-card/InsightCard.rtl.test.tsx +14 -0
- package/src/components/insight-card/InsightCard.test.tsx +102 -0
- package/src/components/insight-card/InsightCard.tsx +185 -0
- package/src/components/legal-document-frame/LegalDocumentFrame.css +163 -0
- package/src/components/legal-document-frame/LegalDocumentFrame.rtl.test.tsx +13 -0
- package/src/components/legal-document-frame/LegalDocumentFrame.test.tsx +123 -0
- package/src/components/legal-document-frame/LegalDocumentFrame.tsx +167 -0
- package/src/components/link/Link.css +76 -0
- package/src/components/link/Link.test.tsx +103 -0
- package/src/components/link/Link.tsx +87 -0
- package/src/components/list-panel/ListPanel.css +95 -0
- package/src/components/list-panel/ListPanel.test.tsx +128 -0
- package/src/components/list-panel/ListPanel.tsx +137 -0
- package/src/components/list-row/ListRow.css +81 -0
- package/src/components/list-row/ListRow.test.tsx +87 -0
- package/src/components/list-row/ListRow.tsx +68 -0
- package/src/components/listbox-select/ListboxSelect.css +263 -0
- package/src/components/listbox-select/ListboxSelect.test.tsx +157 -0
- package/src/components/listbox-select/ListboxSelect.tsx +178 -0
- package/src/components/live-report-view/LiveReportView.css +111 -0
- package/src/components/live-report-view/LiveReportView.rtl.test.tsx +14 -0
- package/src/components/live-report-view/LiveReportView.test.tsx +185 -0
- package/src/components/live-report-view/LiveReportView.tsx +135 -0
- package/src/components/live-report-view/runEvents.ts +103 -0
- package/src/components/live-report-view/useRunEventStream.ts +134 -0
- package/src/components/loader-presets/LoaderPresets.test.tsx +22 -0
- package/src/components/loader-presets/LoaderPresets.tsx +80 -0
- package/src/components/locale-picker/LocalePicker.css +91 -0
- package/src/components/locale-picker/LocalePicker.test.tsx +99 -0
- package/src/components/locale-picker/LocalePicker.tsx +128 -0
- package/src/components/long-press-menu/LongPressMenu.css +97 -0
- package/src/components/long-press-menu/LongPressMenu.test.tsx +106 -0
- package/src/components/long-press-menu/LongPressMenu.tsx +100 -0
- package/src/components/markdown-view/MarkdownView.css +93 -0
- package/src/components/markdown-view/MarkdownView.test.tsx +107 -0
- package/src/components/markdown-view/MarkdownView.tsx +96 -0
- package/src/components/markdown-view/parse.ts +152 -0
- package/src/components/metric-tile/MetricTile.css +104 -0
- package/src/components/metric-tile/MetricTile.rtl.test.tsx +12 -0
- package/src/components/metric-tile/MetricTile.test.tsx +70 -0
- package/src/components/metric-tile/MetricTile.tsx +59 -0
- package/src/components/modal-dialog/ModalDialog.css +165 -0
- package/src/components/modal-dialog/ModalDialog.test.tsx +158 -0
- package/src/components/modal-dialog/ModalDialog.tsx +112 -0
- package/src/components/month-field/MonthField.css +11 -0
- package/src/components/month-field/MonthField.test.tsx +101 -0
- package/src/components/month-field/MonthField.tsx +124 -0
- package/src/components/native-select/NativeSelect.css +246 -0
- package/src/components/native-select/NativeSelect.test.tsx +160 -0
- package/src/components/native-select/NativeSelect.tsx +234 -0
- package/src/components/navigation-flyout/NavigationFlyout.css +181 -0
- package/src/components/navigation-flyout/NavigationFlyout.test.tsx +111 -0
- package/src/components/navigation-flyout/NavigationFlyout.tsx +196 -0
- package/src/components/notification-center/NotificationCenter.css +187 -0
- package/src/components/notification-center/NotificationCenter.test.tsx +140 -0
- package/src/components/notification-center/NotificationCenter.tsx +229 -0
- package/src/components/one-time-code-field/OneTimeCodeField.css +62 -0
- package/src/components/one-time-code-field/OneTimeCodeField.test.tsx +150 -0
- package/src/components/one-time-code-field/OneTimeCodeField.tsx +176 -0
- package/src/components/page-dots/PageDots.css +90 -0
- package/src/components/page-dots/PageDots.test.tsx +87 -0
- package/src/components/page-dots/PageDots.tsx +95 -0
- package/src/components/page-header/PageHeader.css +271 -0
- package/src/components/page-header/PageHeader.test.tsx +185 -0
- package/src/components/page-header/PageHeader.tsx +194 -0
- package/src/components/pagination/Pagination.css +139 -0
- package/src/components/pagination/Pagination.test.tsx +104 -0
- package/src/components/pagination/Pagination.tsx +160 -0
- package/src/components/password-strength/PasswordStrength.css +85 -0
- package/src/components/password-strength/PasswordStrength.test.tsx +90 -0
- package/src/components/password-strength/PasswordStrength.tsx +109 -0
- package/src/components/phase-bar/PhaseBar.css +95 -0
- package/src/components/phase-bar/PhaseBar.test.tsx +67 -0
- package/src/components/phase-bar/PhaseBar.tsx +66 -0
- package/src/components/popover/Popover.css +130 -0
- package/src/components/popover/Popover.test.tsx +153 -0
- package/src/components/popover/Popover.tsx +110 -0
- package/src/components/product-mark/ProductMark.css +24 -0
- package/src/components/product-mark/ProductMark.test.tsx +48 -0
- package/src/components/product-mark/ProductMark.tsx +95 -0
- package/src/components/product-mark/marks.ts +115 -0
- package/src/components/product-mark/plate.ts +42 -0
- package/src/components/profile-avatar/ProfileAvatar.css +51 -0
- package/src/components/profile-avatar/ProfileAvatar.test.tsx +78 -0
- package/src/components/profile-avatar/ProfileAvatar.tsx +58 -0
- package/src/components/profile-summary/ProfileSummary.css +43 -0
- package/src/components/profile-summary/ProfileSummary.rtl.test.tsx +12 -0
- package/src/components/profile-summary/ProfileSummary.test.tsx +52 -0
- package/src/components/profile-summary/ProfileSummary.tsx +52 -0
- package/src/components/progress-bar/ProgressBar.css +100 -0
- package/src/components/progress-bar/ProgressBar.test.tsx +68 -0
- package/src/components/progress-bar/ProgressBar.tsx +76 -0
- package/src/components/proof-badge/ProofBadge.css +178 -0
- package/src/components/proof-badge/ProofBadge.test.tsx +95 -0
- package/src/components/proof-badge/ProofBadge.tsx +113 -0
- package/src/components/pull-to-refresh/PullToRefresh.css +99 -0
- package/src/components/pull-to-refresh/PullToRefresh.rtl.test.tsx +16 -0
- package/src/components/pull-to-refresh/PullToRefresh.test.tsx +117 -0
- package/src/components/pull-to-refresh/PullToRefresh.tsx +181 -0
- package/src/components/record-card/RecordCard.css +151 -0
- package/src/components/record-card/RecordCard.rtl.test.tsx +16 -0
- package/src/components/record-card/RecordCard.test.tsx +105 -0
- package/src/components/record-card/RecordCard.tsx +159 -0
- package/src/components/recovery-code-list/RecoveryCodeList.css +66 -0
- package/src/components/recovery-code-list/RecoveryCodeList.test.tsx +108 -0
- package/src/components/recovery-code-list/RecoveryCodeList.tsx +105 -0
- package/src/components/region-map/RegionMap.css +229 -0
- package/src/components/region-map/RegionMap.test.tsx +200 -0
- package/src/components/region-map/RegionMap.tsx +400 -0
- package/src/components/region-map/useRegionMapState.ts +92 -0
- package/src/components/region-theme/countryProfile.ts +110 -0
- package/src/components/region-theme/data/br-profile.ts +41 -0
- package/src/components/region-theme/data/br.ts +80 -0
- package/src/components/region-theme/format.ts +120 -0
- package/src/components/region-theme/geometry.ts +67 -0
- package/src/components/region-theme/index.ts +7 -0
- package/src/components/region-theme/regionTheme.test.tsx +200 -0
- package/src/components/region-theme/registry.ts +163 -0
- package/src/components/report-view/ReportView.css +323 -0
- package/src/components/report-view/ReportView.rtl.test.tsx +25 -0
- package/src/components/report-view/ReportView.test.tsx +141 -0
- package/src/components/report-view/ReportView.tsx +201 -0
- package/src/components/report-view/sections.tsx +281 -0
- package/src/components/report-view/types.ts +72 -0
- package/src/components/report-view/validateReport.ts +51 -0
- package/src/components/resizable-split/ResizableSplit.css +56 -0
- package/src/components/resizable-split/ResizableSplit.test.tsx +108 -0
- package/src/components/resizable-split/ResizableSplit.tsx +76 -0
- package/src/components/resizable-split/useSplitter.ts +72 -0
- package/src/components/reveal-number/RevealNumber.css +17 -0
- package/src/components/reveal-number/RevealNumber.rtl.test.tsx +13 -0
- package/src/components/reveal-number/RevealNumber.test.tsx +136 -0
- package/src/components/reveal-number/RevealNumber.tsx +115 -0
- package/src/components/route-progress/RouteProgress.css +54 -0
- package/src/components/route-progress/RouteProgress.rtl.test.tsx +16 -0
- package/src/components/route-progress/RouteProgress.test.tsx +62 -0
- package/src/components/route-progress/RouteProgress.tsx +63 -0
- package/src/components/ruled-grid/RuledGrid.css +86 -0
- package/src/components/ruled-grid/RuledGrid.rtl.test.tsx +13 -0
- package/src/components/ruled-grid/RuledGrid.test.tsx +92 -0
- package/src/components/ruled-grid/RuledGrid.tsx +73 -0
- package/src/components/safe-area-inset/SafeAreaInset.css +65 -0
- package/src/components/safe-area-inset/SafeAreaInset.rtl.test.tsx +17 -0
- package/src/components/safe-area-inset/SafeAreaInset.test.tsx +99 -0
- package/src/components/safe-area-inset/SafeAreaInset.tsx +101 -0
- package/src/components/schema-request-form/SchemaRequestForm.css +75 -0
- package/src/components/schema-request-form/SchemaRequestForm.test.tsx +138 -0
- package/src/components/schema-request-form/SchemaRequestForm.tsx +231 -0
- package/src/components/search-bar/SearchBar.css +117 -0
- package/src/components/search-bar/SearchBar.test.tsx +134 -0
- package/src/components/search-bar/SearchBar.tsx +176 -0
- package/src/components/section-heading/SectionHeading.css +68 -0
- package/src/components/section-heading/SectionHeading.test.tsx +65 -0
- package/src/components/section-heading/SectionHeading.tsx +61 -0
- package/src/components/section-panel/SectionPanel.css +207 -0
- package/src/components/section-panel/SectionPanel.test.tsx +122 -0
- package/src/components/section-panel/SectionPanel.tsx +139 -0
- package/src/components/sectioned-modal/SectionedModal.css +325 -0
- package/src/components/sectioned-modal/SectionedModal.test.tsx +138 -0
- package/src/components/sectioned-modal/SectionedModal.tsx +258 -0
- package/src/components/segmented-control/SegmentedControl.css +123 -0
- package/src/components/segmented-control/SegmentedControl.test.tsx +109 -0
- package/src/components/segmented-control/SegmentedControl.tsx +85 -0
- package/src/components/separator/Separator.css +61 -0
- package/src/components/separator/Separator.test.tsx +65 -0
- package/src/components/separator/Separator.tsx +46 -0
- package/src/components/settings-dialog/SettingsDialog.css +151 -0
- package/src/components/settings-dialog/SettingsDialog.test.tsx +155 -0
- package/src/components/settings-dialog/SettingsDialog.tsx +126 -0
- package/src/components/settings-dialog/settingsModel.ts +63 -0
- package/src/components/settings-dialog/settingsParts.tsx +149 -0
- package/src/components/showcase-backdrop/ShowcaseBackdrop.css +78 -0
- package/src/components/showcase-backdrop/ShowcaseBackdrop.rtl.test.tsx +12 -0
- package/src/components/showcase-backdrop/ShowcaseBackdrop.test.tsx +91 -0
- package/src/components/showcase-backdrop/ShowcaseBackdrop.tsx +47 -0
- package/src/components/showcase-heading/ShowcaseHeading.css +65 -0
- package/src/components/showcase-heading/ShowcaseHeading.rtl.test.tsx +13 -0
- package/src/components/showcase-heading/ShowcaseHeading.test.tsx +79 -0
- package/src/components/showcase-heading/ShowcaseHeading.tsx +67 -0
- package/src/components/skeleton/Skeleton.css +120 -0
- package/src/components/skeleton/Skeleton.test.tsx +96 -0
- package/src/components/skeleton/Skeleton.tsx +168 -0
- package/src/components/skeleton-fill/SkeletonFill.css +67 -0
- package/src/components/skeleton-fill/SkeletonFill.rtl.test.tsx +12 -0
- package/src/components/skeleton-fill/SkeletonFill.test.tsx +61 -0
- package/src/components/skeleton-fill/SkeletonFill.tsx +48 -0
- package/src/components/skip-link/SkipLink.css +52 -0
- package/src/components/skip-link/SkipLink.test.tsx +90 -0
- package/src/components/skip-link/SkipLink.tsx +42 -0
- package/src/components/spinner/Spinner.css +134 -0
- package/src/components/spinner/Spinner.test.tsx +99 -0
- package/src/components/spinner/Spinner.tsx +100 -0
- package/src/components/stage-strip/StageStrip.css +126 -0
- package/src/components/stage-strip/StageStrip.test.tsx +82 -0
- package/src/components/stage-strip/StageStrip.tsx +100 -0
- package/src/components/stat-strip/StatStrip.css +90 -0
- package/src/components/stat-strip/StatStrip.test.tsx +75 -0
- package/src/components/stat-strip/StatStrip.tsx +62 -0
- package/src/components/stat-tile/StatTile.css +171 -0
- package/src/components/stat-tile/StatTile.rtl.test.tsx +14 -0
- package/src/components/stat-tile/StatTile.test.tsx +90 -0
- package/src/components/stat-tile/StatTile.tsx +129 -0
- package/src/components/state-switch/StateSwitch.css +113 -0
- package/src/components/state-switch/StateSwitch.test.tsx +102 -0
- package/src/components/state-switch/StateSwitch.tsx +73 -0
- package/src/components/status-pill/StatusPill.css +85 -0
- package/src/components/status-pill/StatusPill.test.tsx +91 -0
- package/src/components/status-pill/StatusPill.tsx +73 -0
- package/src/components/step-list/StepList.css +181 -0
- package/src/components/step-list/StepList.test.tsx +93 -0
- package/src/components/step-list/StepList.tsx +118 -0
- package/src/components/summary-row/SummaryRow.css +85 -0
- package/src/components/summary-row/SummaryRow.test.tsx +77 -0
- package/src/components/summary-row/SummaryRow.tsx +72 -0
- package/src/components/surface/Surface.css +157 -0
- package/src/components/surface/Surface.test.tsx +97 -0
- package/src/components/surface/Surface.tsx +124 -0
- package/src/components/swipe-row/SwipeRow.css +131 -0
- package/src/components/swipe-row/SwipeRow.rtl.test.tsx +31 -0
- package/src/components/swipe-row/SwipeRow.test.tsx +124 -0
- package/src/components/swipe-row/SwipeRow.tsx +219 -0
- package/src/components/switch/Switch.css +182 -0
- package/src/components/switch/Switch.test.tsx +112 -0
- package/src/components/switch/Switch.tsx +125 -0
- package/src/components/tabs/Tabs.css +137 -0
- package/src/components/tabs/Tabs.test.tsx +127 -0
- package/src/components/tabs/Tabs.tsx +94 -0
- package/src/components/tag/Tag.css +146 -0
- package/src/components/tag/Tag.test.tsx +129 -0
- package/src/components/tag/Tag.tsx +168 -0
- package/src/components/tag-field/TagField.css +274 -0
- package/src/components/tag-field/TagField.test.tsx +156 -0
- package/src/components/tag-field/TagField.tsx +270 -0
- package/src/components/text/Text.css +84 -0
- package/src/components/text/Text.test.tsx +91 -0
- package/src/components/text/Text.tsx +84 -0
- package/src/components/text-area/TextArea.css +125 -0
- package/src/components/text-area/TextArea.test.tsx +97 -0
- package/src/components/text-area/TextArea.tsx +145 -0
- package/src/components/text-field/TextField.css +197 -0
- package/src/components/text-field/TextField.test.tsx +136 -0
- package/src/components/text-field/TextField.tsx +208 -0
- package/src/components/theme-palette/ThemePalette.css +262 -0
- package/src/components/theme-palette/ThemePalette.test.tsx +62 -0
- package/src/components/theme-palette/ThemePalette.tsx +377 -0
- package/src/components/theme-switcher/ThemeSwitcher.css +159 -0
- package/src/components/theme-switcher/ThemeSwitcher.test.tsx +71 -0
- package/src/components/theme-switcher/ThemeSwitcher.tsx +72 -0
- package/src/components/third-party-mark-slot/ThirdPartyMarkSlot.css +56 -0
- package/src/components/third-party-mark-slot/ThirdPartyMarkSlot.rtl.test.tsx +13 -0
- package/src/components/third-party-mark-slot/ThirdPartyMarkSlot.test.tsx +100 -0
- package/src/components/third-party-mark-slot/ThirdPartyMarkSlot.tsx +218 -0
- package/src/components/ticker-card/TickerCard.css +147 -0
- package/src/components/ticker-card/TickerCard.rtl.test.tsx +14 -0
- package/src/components/ticker-card/TickerCard.test.tsx +74 -0
- package/src/components/ticker-card/TickerCard.tsx +151 -0
- package/src/components/time-field/TimeField.css +69 -0
- package/src/components/time-field/TimeField.test.tsx +138 -0
- package/src/components/time-field/TimeField.tsx +205 -0
- package/src/components/toast/Toast.css +137 -0
- package/src/components/toast/Toast.test.tsx +269 -0
- package/src/components/toast/Toast.tsx +370 -0
- package/src/components/tone-tint/ToneTint.css +74 -0
- package/src/components/tone-tint/toneTint.test.tsx +74 -0
- package/src/components/tone-tint/toneTint.ts +57 -0
- package/src/components/toolbar-trigger/ToolbarTrigger.css +104 -0
- package/src/components/toolbar-trigger/ToolbarTrigger.test.tsx +75 -0
- package/src/components/toolbar-trigger/ToolbarTrigger.tsx +70 -0
- package/src/components/tooltip/Tooltip.css +70 -0
- package/src/components/tooltip/Tooltip.test.tsx +209 -0
- package/src/components/tooltip/Tooltip.tsx +102 -0
- package/src/components/tweened-number/TweenedNumber.css +7 -0
- package/src/components/tweened-number/TweenedNumber.rtl.test.tsx +19 -0
- package/src/components/tweened-number/TweenedNumber.test.tsx +97 -0
- package/src/components/tweened-number/TweenedNumber.tsx +70 -0
- package/src/components/upgrade-gate/UpgradeGate.css +94 -0
- package/src/components/upgrade-gate/UpgradeGate.rtl.test.tsx +12 -0
- package/src/components/upgrade-gate/UpgradeGate.test.tsx +56 -0
- package/src/components/upgrade-gate/UpgradeGate.tsx +56 -0
- package/src/components/wheel-picker/WheelPicker.css +149 -0
- package/src/components/wheel-picker/WheelPicker.test.tsx +150 -0
- package/src/components/wheel-picker/WheelPicker.tsx +228 -0
- package/src/components/wizard-page/WizardPage.css +114 -0
- package/src/components/wizard-page/WizardPage.test.tsx +117 -0
- package/src/components/wizard-page/WizardPage.tsx +123 -0
- package/src/elements/action-menu/definition.ts +123 -0
- package/src/elements/action-menu/element.ts +604 -0
- package/src/elements/anatomy.ts +55 -0
- package/src/elements/avatar/definition.ts +161 -0
- package/src/elements/avatar/element.ts +112 -0
- package/src/elements/base.ts +244 -0
- package/src/elements/brand-wordmark/definition.ts +37 -0
- package/src/elements/brand-wordmark/element.ts +13 -0
- package/src/elements/breadcrumbs/definition.ts +85 -0
- package/src/elements/breadcrumbs/element.ts +231 -0
- package/src/elements/button/definition.ts +74 -0
- package/src/elements/button/element.ts +25 -0
- package/src/elements/checkbox/definition.ts +132 -0
- package/src/elements/checkbox/element.ts +59 -0
- package/src/elements/command-palette/definition.ts +60 -0
- package/src/elements/command-palette/element.ts +706 -0
- package/src/elements/currency-field/definition.ts +159 -0
- package/src/elements/currency-field/element.ts +265 -0
- package/src/elements/data-table/definition.ts +54 -0
- package/src/elements/data-table/element.ts +440 -0
- package/src/elements/definition.ts +196 -0
- package/src/elements/drawer/definition.ts +156 -0
- package/src/elements/drawer/element.ts +304 -0
- package/src/elements/elements.css +156 -0
- package/src/elements/gradient-mark/definition.ts +41 -0
- package/src/elements/gradient-mark/element.ts +27 -0
- package/src/elements/heading/definition.ts +64 -0
- package/src/elements/heading/element.ts +14 -0
- package/src/elements/index.ts +146 -0
- package/src/elements/inline-notice/definition.ts +167 -0
- package/src/elements/inline-notice/element.ts +36 -0
- package/src/elements/link/definition.ts +70 -0
- package/src/elements/link/element.ts +40 -0
- package/src/elements/markdown-view/definition.ts +35 -0
- package/src/elements/markdown-view/element.ts +183 -0
- package/src/elements/modal/definition.ts +175 -0
- package/src/elements/modal/element.ts +226 -0
- package/src/elements/native-select/definition.ts +143 -0
- package/src/elements/native-select/element.ts +34 -0
- package/src/elements/notification-center/definition.ts +236 -0
- package/src/elements/notification-center/element.ts +527 -0
- package/src/elements/page-header/definition.ts +151 -0
- package/src/elements/page-header/element.ts +37 -0
- package/src/elements/popover/definition.ts +137 -0
- package/src/elements/popover/element.ts +196 -0
- package/src/elements/popover/model.ts +141 -0
- package/src/elements/progress-bar/definition.ts +84 -0
- package/src/elements/progress-bar/element.ts +82 -0
- package/src/elements/react/TyActionMenu.ts +79 -0
- package/src/elements/react/TyAvatar.ts +129 -0
- package/src/elements/react/TyBrandWordmark.ts +51 -0
- package/src/elements/react/TyBreadcrumbs.ts +82 -0
- package/src/elements/react/TyButton.ts +98 -0
- package/src/elements/react/TyCheckbox.ts +92 -0
- package/src/elements/react/TyCommandPalette.ts +120 -0
- package/src/elements/react/TyCurrencyField.ts +126 -0
- package/src/elements/react/TyDataTable.ts +105 -0
- package/src/elements/react/TyDrawer.ts +99 -0
- package/src/elements/react/TyGradientMark.ts +52 -0
- package/src/elements/react/TyHeading.ts +65 -0
- package/src/elements/react/TyInlineNotice.ts +191 -0
- package/src/elements/react/TyLink.ts +65 -0
- package/src/elements/react/TyMarkdownView.ts +46 -0
- package/src/elements/react/TyModal.ts +118 -0
- package/src/elements/react/TyNativeSelect.ts +96 -0
- package/src/elements/react/TyNotificationCenter.ts +153 -0
- package/src/elements/react/TyPageHeader.ts +126 -0
- package/src/elements/react/TyPopover.ts +95 -0
- package/src/elements/react/TyProgressBar.ts +72 -0
- package/src/elements/react/TySectionHeading.ts +78 -0
- package/src/elements/react/TySegmentedControl.ts +64 -0
- package/src/elements/react/TySeparator.ts +51 -0
- package/src/elements/react/TySkeleton.ts +61 -0
- package/src/elements/react/TySkipLink.ts +39 -0
- package/src/elements/react/TySpinner.ts +55 -0
- package/src/elements/react/TyStatusPill.ts +66 -0
- package/src/elements/react/TySurface.ts +104 -0
- package/src/elements/react/TySwitch.ts +77 -0
- package/src/elements/react/TyTabs.ts +66 -0
- package/src/elements/react/TyTag.ts +71 -0
- package/src/elements/react/TyTagField.ts +90 -0
- package/src/elements/react/TyTextArea.ts +124 -0
- package/src/elements/react/TyTextField.ts +186 -0
- package/src/elements/react/TyThemePalette.ts +126 -0
- package/src/elements/react/TyToast.ts +57 -0
- package/src/elements/react/TyWheelPicker.ts +60 -0
- package/src/elements/react/index.ts +39 -0
- package/src/elements/register.ts +7 -0
- package/src/elements/section-heading/definition.ts +81 -0
- package/src/elements/section-heading/element.ts +15 -0
- package/src/elements/segmented-control/definition.ts +72 -0
- package/src/elements/segmented-control/element.ts +253 -0
- package/src/elements/separator/definition.ts +44 -0
- package/src/elements/separator/element.ts +13 -0
- package/src/elements/skeleton/definition.ts +91 -0
- package/src/elements/skeleton/element.ts +175 -0
- package/src/elements/skip-link/definition.ts +26 -0
- package/src/elements/skip-link/element.ts +75 -0
- package/src/elements/spinner/definition.ts +52 -0
- package/src/elements/spinner/element.ts +58 -0
- package/src/elements/status-pill/definition.ts +48 -0
- package/src/elements/status-pill/element.ts +50 -0
- package/src/elements/surface/definition.ts +93 -0
- package/src/elements/surface/element.ts +42 -0
- package/src/elements/switch/definition.ts +72 -0
- package/src/elements/switch/element.ts +65 -0
- package/src/elements/tabs/definition.ts +60 -0
- package/src/elements/tabs/element.ts +319 -0
- package/src/elements/tag/definition.ts +69 -0
- package/src/elements/tag/element.ts +35 -0
- package/src/elements/tag-field/definition.ts +51 -0
- package/src/elements/tag-field/element.ts +461 -0
- package/src/elements/text-area/definition.ts +137 -0
- package/src/elements/text-area/element.ts +113 -0
- package/src/elements/text-field/definition.ts +236 -0
- package/src/elements/text-field/element.ts +151 -0
- package/src/elements/theme-palette/definition.ts +52 -0
- package/src/elements/theme-palette/element.ts +372 -0
- package/src/elements/theme-palette/model.ts +140 -0
- package/src/elements/toast/definition.ts +42 -0
- package/src/elements/toast/element.ts +479 -0
- package/src/elements/wheel-picker/definition.ts +39 -0
- package/src/elements/wheel-picker/element.ts +407 -0
- package/src/flags/Flag.css +58 -0
- package/src/flags/Flag.tsx +70 -0
- package/src/flags/art/1x1/ad.ts +2 -0
- package/src/flags/art/1x1/ae.ts +2 -0
- package/src/flags/art/1x1/af.ts +2 -0
- package/src/flags/art/1x1/ag.ts +2 -0
- package/src/flags/art/1x1/ai.ts +2 -0
- package/src/flags/art/1x1/al.ts +2 -0
- package/src/flags/art/1x1/am.ts +2 -0
- package/src/flags/art/1x1/ao.ts +2 -0
- package/src/flags/art/1x1/aq.ts +2 -0
- package/src/flags/art/1x1/ar.ts +2 -0
- package/src/flags/art/1x1/arab.ts +2 -0
- package/src/flags/art/1x1/as.ts +2 -0
- package/src/flags/art/1x1/asean.ts +2 -0
- package/src/flags/art/1x1/at.ts +2 -0
- package/src/flags/art/1x1/au.ts +2 -0
- package/src/flags/art/1x1/aw.ts +2 -0
- package/src/flags/art/1x1/ax.ts +2 -0
- package/src/flags/art/1x1/az.ts +2 -0
- package/src/flags/art/1x1/ba.ts +2 -0
- package/src/flags/art/1x1/bb.ts +2 -0
- package/src/flags/art/1x1/bd.ts +2 -0
- package/src/flags/art/1x1/be.ts +2 -0
- package/src/flags/art/1x1/bf.ts +2 -0
- package/src/flags/art/1x1/bg.ts +2 -0
- package/src/flags/art/1x1/bh.ts +2 -0
- package/src/flags/art/1x1/bi.ts +2 -0
- package/src/flags/art/1x1/bj.ts +2 -0
- package/src/flags/art/1x1/bl.ts +2 -0
- package/src/flags/art/1x1/bm.ts +2 -0
- package/src/flags/art/1x1/bn.ts +2 -0
- package/src/flags/art/1x1/bo.ts +2 -0
- package/src/flags/art/1x1/bq.ts +2 -0
- package/src/flags/art/1x1/br.ts +2 -0
- package/src/flags/art/1x1/bs.ts +2 -0
- package/src/flags/art/1x1/bt.ts +2 -0
- package/src/flags/art/1x1/bv.ts +2 -0
- package/src/flags/art/1x1/bw.ts +2 -0
- package/src/flags/art/1x1/by.ts +2 -0
- package/src/flags/art/1x1/bz.ts +2 -0
- package/src/flags/art/1x1/ca.ts +2 -0
- package/src/flags/art/1x1/cc.ts +2 -0
- package/src/flags/art/1x1/cd.ts +2 -0
- package/src/flags/art/1x1/cefta.ts +2 -0
- package/src/flags/art/1x1/cf.ts +2 -0
- package/src/flags/art/1x1/cg.ts +2 -0
- package/src/flags/art/1x1/ch.ts +2 -0
- package/src/flags/art/1x1/ci.ts +2 -0
- package/src/flags/art/1x1/ck.ts +2 -0
- package/src/flags/art/1x1/cl.ts +2 -0
- package/src/flags/art/1x1/cm.ts +2 -0
- package/src/flags/art/1x1/cn.ts +2 -0
- package/src/flags/art/1x1/co.ts +2 -0
- package/src/flags/art/1x1/cp.ts +2 -0
- package/src/flags/art/1x1/cr.ts +2 -0
- package/src/flags/art/1x1/cu.ts +2 -0
- package/src/flags/art/1x1/cv.ts +2 -0
- package/src/flags/art/1x1/cw.ts +2 -0
- package/src/flags/art/1x1/cx.ts +2 -0
- package/src/flags/art/1x1/cy.ts +2 -0
- package/src/flags/art/1x1/cz.ts +2 -0
- package/src/flags/art/1x1/de.ts +2 -0
- package/src/flags/art/1x1/dg.ts +2 -0
- package/src/flags/art/1x1/dj.ts +2 -0
- package/src/flags/art/1x1/dk.ts +2 -0
- package/src/flags/art/1x1/dm.ts +2 -0
- package/src/flags/art/1x1/do.ts +2 -0
- package/src/flags/art/1x1/dz.ts +2 -0
- package/src/flags/art/1x1/eac.ts +2 -0
- package/src/flags/art/1x1/ec.ts +2 -0
- package/src/flags/art/1x1/ee.ts +2 -0
- package/src/flags/art/1x1/eg.ts +2 -0
- package/src/flags/art/1x1/eh.ts +2 -0
- package/src/flags/art/1x1/er.ts +2 -0
- package/src/flags/art/1x1/es-ct.ts +2 -0
- package/src/flags/art/1x1/es-ga.ts +2 -0
- package/src/flags/art/1x1/es-pv.ts +2 -0
- package/src/flags/art/1x1/es.ts +2 -0
- package/src/flags/art/1x1/et.ts +2 -0
- package/src/flags/art/1x1/eu.ts +2 -0
- package/src/flags/art/1x1/fi.ts +2 -0
- package/src/flags/art/1x1/fj.ts +2 -0
- package/src/flags/art/1x1/fk.ts +2 -0
- package/src/flags/art/1x1/fm.ts +2 -0
- package/src/flags/art/1x1/fo.ts +2 -0
- package/src/flags/art/1x1/fr.ts +2 -0
- package/src/flags/art/1x1/ga.ts +2 -0
- package/src/flags/art/1x1/gb-eng.ts +2 -0
- package/src/flags/art/1x1/gb-nir.ts +2 -0
- package/src/flags/art/1x1/gb-sct.ts +2 -0
- package/src/flags/art/1x1/gb-wls.ts +2 -0
- package/src/flags/art/1x1/gb.ts +2 -0
- package/src/flags/art/1x1/gd.ts +2 -0
- package/src/flags/art/1x1/ge.ts +2 -0
- package/src/flags/art/1x1/gf.ts +2 -0
- package/src/flags/art/1x1/gg.ts +2 -0
- package/src/flags/art/1x1/gh.ts +2 -0
- package/src/flags/art/1x1/gi.ts +2 -0
- package/src/flags/art/1x1/gl.ts +2 -0
- package/src/flags/art/1x1/gm.ts +2 -0
- package/src/flags/art/1x1/gn.ts +2 -0
- package/src/flags/art/1x1/gp.ts +2 -0
- package/src/flags/art/1x1/gq.ts +2 -0
- package/src/flags/art/1x1/gr.ts +2 -0
- package/src/flags/art/1x1/gs.ts +2 -0
- package/src/flags/art/1x1/gt.ts +2 -0
- package/src/flags/art/1x1/gu.ts +2 -0
- package/src/flags/art/1x1/gw.ts +2 -0
- package/src/flags/art/1x1/gy.ts +2 -0
- package/src/flags/art/1x1/hk.ts +2 -0
- package/src/flags/art/1x1/hm.ts +2 -0
- package/src/flags/art/1x1/hn.ts +2 -0
- package/src/flags/art/1x1/hr.ts +2 -0
- package/src/flags/art/1x1/ht.ts +2 -0
- package/src/flags/art/1x1/hu.ts +2 -0
- package/src/flags/art/1x1/ic.ts +2 -0
- package/src/flags/art/1x1/id.ts +2 -0
- package/src/flags/art/1x1/ie.ts +2 -0
- package/src/flags/art/1x1/il.ts +2 -0
- package/src/flags/art/1x1/im.ts +2 -0
- package/src/flags/art/1x1/in.ts +2 -0
- package/src/flags/art/1x1/io.ts +2 -0
- package/src/flags/art/1x1/iq.ts +2 -0
- package/src/flags/art/1x1/ir.ts +2 -0
- package/src/flags/art/1x1/is.ts +2 -0
- package/src/flags/art/1x1/it.ts +2 -0
- package/src/flags/art/1x1/je.ts +2 -0
- package/src/flags/art/1x1/jm.ts +2 -0
- package/src/flags/art/1x1/jo.ts +2 -0
- package/src/flags/art/1x1/jp.ts +2 -0
- package/src/flags/art/1x1/ke.ts +2 -0
- package/src/flags/art/1x1/kg.ts +2 -0
- package/src/flags/art/1x1/kh.ts +2 -0
- package/src/flags/art/1x1/ki.ts +2 -0
- package/src/flags/art/1x1/km.ts +2 -0
- package/src/flags/art/1x1/kn.ts +2 -0
- package/src/flags/art/1x1/kp.ts +2 -0
- package/src/flags/art/1x1/kr.ts +2 -0
- package/src/flags/art/1x1/kw.ts +2 -0
- package/src/flags/art/1x1/ky.ts +2 -0
- package/src/flags/art/1x1/kz.ts +2 -0
- package/src/flags/art/1x1/la.ts +2 -0
- package/src/flags/art/1x1/lb.ts +2 -0
- package/src/flags/art/1x1/lc.ts +2 -0
- package/src/flags/art/1x1/li.ts +2 -0
- package/src/flags/art/1x1/lk.ts +2 -0
- package/src/flags/art/1x1/lr.ts +2 -0
- package/src/flags/art/1x1/ls.ts +2 -0
- package/src/flags/art/1x1/lt.ts +2 -0
- package/src/flags/art/1x1/lu.ts +2 -0
- package/src/flags/art/1x1/lv.ts +2 -0
- package/src/flags/art/1x1/ly.ts +2 -0
- package/src/flags/art/1x1/ma.ts +2 -0
- package/src/flags/art/1x1/mc.ts +2 -0
- package/src/flags/art/1x1/md.ts +2 -0
- package/src/flags/art/1x1/me.ts +2 -0
- package/src/flags/art/1x1/mf.ts +2 -0
- package/src/flags/art/1x1/mg.ts +2 -0
- package/src/flags/art/1x1/mh.ts +2 -0
- package/src/flags/art/1x1/mk.ts +2 -0
- package/src/flags/art/1x1/ml.ts +2 -0
- package/src/flags/art/1x1/mm.ts +2 -0
- package/src/flags/art/1x1/mn.ts +2 -0
- package/src/flags/art/1x1/mo.ts +2 -0
- package/src/flags/art/1x1/mp.ts +2 -0
- package/src/flags/art/1x1/mq.ts +2 -0
- package/src/flags/art/1x1/mr.ts +2 -0
- package/src/flags/art/1x1/ms.ts +2 -0
- package/src/flags/art/1x1/mt.ts +2 -0
- package/src/flags/art/1x1/mu.ts +2 -0
- package/src/flags/art/1x1/mv.ts +2 -0
- package/src/flags/art/1x1/mw.ts +2 -0
- package/src/flags/art/1x1/mx.ts +2 -0
- package/src/flags/art/1x1/my.ts +2 -0
- package/src/flags/art/1x1/mz.ts +2 -0
- package/src/flags/art/1x1/na.ts +2 -0
- package/src/flags/art/1x1/nc.ts +2 -0
- package/src/flags/art/1x1/ne.ts +2 -0
- package/src/flags/art/1x1/nf.ts +2 -0
- package/src/flags/art/1x1/ng.ts +2 -0
- package/src/flags/art/1x1/ni.ts +2 -0
- package/src/flags/art/1x1/nl.ts +2 -0
- package/src/flags/art/1x1/no.ts +2 -0
- package/src/flags/art/1x1/np.ts +2 -0
- package/src/flags/art/1x1/nr.ts +2 -0
- package/src/flags/art/1x1/nu.ts +2 -0
- package/src/flags/art/1x1/nz.ts +2 -0
- package/src/flags/art/1x1/om.ts +2 -0
- package/src/flags/art/1x1/pa.ts +2 -0
- package/src/flags/art/1x1/pc.ts +2 -0
- package/src/flags/art/1x1/pe.ts +2 -0
- package/src/flags/art/1x1/pf.ts +2 -0
- package/src/flags/art/1x1/pg.ts +2 -0
- package/src/flags/art/1x1/ph.ts +2 -0
- package/src/flags/art/1x1/pk.ts +2 -0
- package/src/flags/art/1x1/pl.ts +2 -0
- package/src/flags/art/1x1/pm.ts +2 -0
- package/src/flags/art/1x1/pn.ts +2 -0
- package/src/flags/art/1x1/pr.ts +2 -0
- package/src/flags/art/1x1/ps.ts +2 -0
- package/src/flags/art/1x1/pt.ts +2 -0
- package/src/flags/art/1x1/pw.ts +2 -0
- package/src/flags/art/1x1/py.ts +2 -0
- package/src/flags/art/1x1/qa.ts +2 -0
- package/src/flags/art/1x1/re.ts +2 -0
- package/src/flags/art/1x1/ro.ts +2 -0
- package/src/flags/art/1x1/rs.ts +2 -0
- package/src/flags/art/1x1/ru.ts +2 -0
- package/src/flags/art/1x1/rw.ts +2 -0
- package/src/flags/art/1x1/sa.ts +2 -0
- package/src/flags/art/1x1/sb.ts +2 -0
- package/src/flags/art/1x1/sc.ts +2 -0
- package/src/flags/art/1x1/sd.ts +2 -0
- package/src/flags/art/1x1/se.ts +2 -0
- package/src/flags/art/1x1/sg.ts +2 -0
- package/src/flags/art/1x1/sh-ac.ts +2 -0
- package/src/flags/art/1x1/sh-hl.ts +2 -0
- package/src/flags/art/1x1/sh-ta.ts +2 -0
- package/src/flags/art/1x1/sh.ts +2 -0
- package/src/flags/art/1x1/si.ts +2 -0
- package/src/flags/art/1x1/sj.ts +2 -0
- package/src/flags/art/1x1/sk.ts +2 -0
- package/src/flags/art/1x1/sl.ts +2 -0
- package/src/flags/art/1x1/sm.ts +2 -0
- package/src/flags/art/1x1/sn.ts +2 -0
- package/src/flags/art/1x1/so.ts +2 -0
- package/src/flags/art/1x1/sr.ts +2 -0
- package/src/flags/art/1x1/ss.ts +2 -0
- package/src/flags/art/1x1/st.ts +2 -0
- package/src/flags/art/1x1/sv.ts +2 -0
- package/src/flags/art/1x1/sx.ts +2 -0
- package/src/flags/art/1x1/sy.ts +2 -0
- package/src/flags/art/1x1/sz.ts +2 -0
- package/src/flags/art/1x1/tc.ts +2 -0
- package/src/flags/art/1x1/td.ts +2 -0
- package/src/flags/art/1x1/tf.ts +2 -0
- package/src/flags/art/1x1/tg.ts +2 -0
- package/src/flags/art/1x1/th.ts +2 -0
- package/src/flags/art/1x1/tj.ts +2 -0
- package/src/flags/art/1x1/tk.ts +2 -0
- package/src/flags/art/1x1/tl.ts +2 -0
- package/src/flags/art/1x1/tm.ts +2 -0
- package/src/flags/art/1x1/tn.ts +2 -0
- package/src/flags/art/1x1/to.ts +2 -0
- package/src/flags/art/1x1/tr.ts +2 -0
- package/src/flags/art/1x1/tt.ts +2 -0
- package/src/flags/art/1x1/tv.ts +2 -0
- package/src/flags/art/1x1/tw.ts +2 -0
- package/src/flags/art/1x1/tz.ts +2 -0
- package/src/flags/art/1x1/ua.ts +2 -0
- package/src/flags/art/1x1/ug.ts +2 -0
- package/src/flags/art/1x1/um.ts +2 -0
- package/src/flags/art/1x1/un.ts +2 -0
- package/src/flags/art/1x1/us.ts +2 -0
- package/src/flags/art/1x1/uy.ts +2 -0
- package/src/flags/art/1x1/uz.ts +2 -0
- package/src/flags/art/1x1/va.ts +2 -0
- package/src/flags/art/1x1/vc.ts +2 -0
- package/src/flags/art/1x1/ve.ts +2 -0
- package/src/flags/art/1x1/vg.ts +2 -0
- package/src/flags/art/1x1/vi.ts +2 -0
- package/src/flags/art/1x1/vn.ts +2 -0
- package/src/flags/art/1x1/vu.ts +2 -0
- package/src/flags/art/1x1/wf.ts +2 -0
- package/src/flags/art/1x1/ws.ts +2 -0
- package/src/flags/art/1x1/xk.ts +2 -0
- package/src/flags/art/1x1/xx.ts +2 -0
- package/src/flags/art/1x1/ye.ts +2 -0
- package/src/flags/art/1x1/yt.ts +2 -0
- package/src/flags/art/1x1/za.ts +2 -0
- package/src/flags/art/1x1/zm.ts +2 -0
- package/src/flags/art/1x1/zw.ts +2 -0
- package/src/flags/art/4x3/ad.ts +2 -0
- package/src/flags/art/4x3/ae.ts +2 -0
- package/src/flags/art/4x3/af.ts +2 -0
- package/src/flags/art/4x3/ag.ts +2 -0
- package/src/flags/art/4x3/ai.ts +2 -0
- package/src/flags/art/4x3/al.ts +2 -0
- package/src/flags/art/4x3/am.ts +2 -0
- package/src/flags/art/4x3/ao.ts +2 -0
- package/src/flags/art/4x3/aq.ts +2 -0
- package/src/flags/art/4x3/ar.ts +2 -0
- package/src/flags/art/4x3/arab.ts +2 -0
- package/src/flags/art/4x3/as.ts +2 -0
- package/src/flags/art/4x3/asean.ts +2 -0
- package/src/flags/art/4x3/at.ts +2 -0
- package/src/flags/art/4x3/au.ts +2 -0
- package/src/flags/art/4x3/aw.ts +2 -0
- package/src/flags/art/4x3/ax.ts +2 -0
- package/src/flags/art/4x3/az.ts +2 -0
- package/src/flags/art/4x3/ba.ts +2 -0
- package/src/flags/art/4x3/bb.ts +2 -0
- package/src/flags/art/4x3/bd.ts +2 -0
- package/src/flags/art/4x3/be.ts +2 -0
- package/src/flags/art/4x3/bf.ts +2 -0
- package/src/flags/art/4x3/bg.ts +2 -0
- package/src/flags/art/4x3/bh.ts +2 -0
- package/src/flags/art/4x3/bi.ts +2 -0
- package/src/flags/art/4x3/bj.ts +2 -0
- package/src/flags/art/4x3/bl.ts +2 -0
- package/src/flags/art/4x3/bm.ts +2 -0
- package/src/flags/art/4x3/bn.ts +2 -0
- package/src/flags/art/4x3/bo.ts +2 -0
- package/src/flags/art/4x3/bq.ts +2 -0
- package/src/flags/art/4x3/br.ts +2 -0
- package/src/flags/art/4x3/bs.ts +2 -0
- package/src/flags/art/4x3/bt.ts +2 -0
- package/src/flags/art/4x3/bv.ts +2 -0
- package/src/flags/art/4x3/bw.ts +2 -0
- package/src/flags/art/4x3/by.ts +2 -0
- package/src/flags/art/4x3/bz.ts +2 -0
- package/src/flags/art/4x3/ca.ts +2 -0
- package/src/flags/art/4x3/cc.ts +2 -0
- package/src/flags/art/4x3/cd.ts +2 -0
- package/src/flags/art/4x3/cefta.ts +2 -0
- package/src/flags/art/4x3/cf.ts +2 -0
- package/src/flags/art/4x3/cg.ts +2 -0
- package/src/flags/art/4x3/ch.ts +2 -0
- package/src/flags/art/4x3/ci.ts +2 -0
- package/src/flags/art/4x3/ck.ts +2 -0
- package/src/flags/art/4x3/cl.ts +2 -0
- package/src/flags/art/4x3/cm.ts +2 -0
- package/src/flags/art/4x3/cn.ts +2 -0
- package/src/flags/art/4x3/co.ts +2 -0
- package/src/flags/art/4x3/cp.ts +2 -0
- package/src/flags/art/4x3/cr.ts +2 -0
- package/src/flags/art/4x3/cu.ts +2 -0
- package/src/flags/art/4x3/cv.ts +2 -0
- package/src/flags/art/4x3/cw.ts +2 -0
- package/src/flags/art/4x3/cx.ts +2 -0
- package/src/flags/art/4x3/cy.ts +2 -0
- package/src/flags/art/4x3/cz.ts +2 -0
- package/src/flags/art/4x3/de.ts +2 -0
- package/src/flags/art/4x3/dg.ts +2 -0
- package/src/flags/art/4x3/dj.ts +2 -0
- package/src/flags/art/4x3/dk.ts +2 -0
- package/src/flags/art/4x3/dm.ts +2 -0
- package/src/flags/art/4x3/do.ts +2 -0
- package/src/flags/art/4x3/dz.ts +2 -0
- package/src/flags/art/4x3/eac.ts +2 -0
- package/src/flags/art/4x3/ec.ts +2 -0
- package/src/flags/art/4x3/ee.ts +2 -0
- package/src/flags/art/4x3/eg.ts +2 -0
- package/src/flags/art/4x3/eh.ts +2 -0
- package/src/flags/art/4x3/er.ts +2 -0
- package/src/flags/art/4x3/es-ct.ts +2 -0
- package/src/flags/art/4x3/es-ga.ts +2 -0
- package/src/flags/art/4x3/es-pv.ts +2 -0
- package/src/flags/art/4x3/es.ts +2 -0
- package/src/flags/art/4x3/et.ts +2 -0
- package/src/flags/art/4x3/eu.ts +2 -0
- package/src/flags/art/4x3/fi.ts +2 -0
- package/src/flags/art/4x3/fj.ts +2 -0
- package/src/flags/art/4x3/fk.ts +2 -0
- package/src/flags/art/4x3/fm.ts +2 -0
- package/src/flags/art/4x3/fo.ts +2 -0
- package/src/flags/art/4x3/fr.ts +2 -0
- package/src/flags/art/4x3/ga.ts +2 -0
- package/src/flags/art/4x3/gb-eng.ts +2 -0
- package/src/flags/art/4x3/gb-nir.ts +2 -0
- package/src/flags/art/4x3/gb-sct.ts +2 -0
- package/src/flags/art/4x3/gb-wls.ts +2 -0
- package/src/flags/art/4x3/gb.ts +2 -0
- package/src/flags/art/4x3/gd.ts +2 -0
- package/src/flags/art/4x3/ge.ts +2 -0
- package/src/flags/art/4x3/gf.ts +2 -0
- package/src/flags/art/4x3/gg.ts +2 -0
- package/src/flags/art/4x3/gh.ts +2 -0
- package/src/flags/art/4x3/gi.ts +2 -0
- package/src/flags/art/4x3/gl.ts +2 -0
- package/src/flags/art/4x3/gm.ts +2 -0
- package/src/flags/art/4x3/gn.ts +2 -0
- package/src/flags/art/4x3/gp.ts +2 -0
- package/src/flags/art/4x3/gq.ts +2 -0
- package/src/flags/art/4x3/gr.ts +2 -0
- package/src/flags/art/4x3/gs.ts +2 -0
- package/src/flags/art/4x3/gt.ts +2 -0
- package/src/flags/art/4x3/gu.ts +2 -0
- package/src/flags/art/4x3/gw.ts +2 -0
- package/src/flags/art/4x3/gy.ts +2 -0
- package/src/flags/art/4x3/hk.ts +2 -0
- package/src/flags/art/4x3/hm.ts +2 -0
- package/src/flags/art/4x3/hn.ts +2 -0
- package/src/flags/art/4x3/hr.ts +2 -0
- package/src/flags/art/4x3/ht.ts +2 -0
- package/src/flags/art/4x3/hu.ts +2 -0
- package/src/flags/art/4x3/ic.ts +2 -0
- package/src/flags/art/4x3/id.ts +2 -0
- package/src/flags/art/4x3/ie.ts +2 -0
- package/src/flags/art/4x3/il.ts +2 -0
- package/src/flags/art/4x3/im.ts +2 -0
- package/src/flags/art/4x3/in.ts +2 -0
- package/src/flags/art/4x3/io.ts +2 -0
- package/src/flags/art/4x3/iq.ts +2 -0
- package/src/flags/art/4x3/ir.ts +2 -0
- package/src/flags/art/4x3/is.ts +2 -0
- package/src/flags/art/4x3/it.ts +2 -0
- package/src/flags/art/4x3/je.ts +2 -0
- package/src/flags/art/4x3/jm.ts +2 -0
- package/src/flags/art/4x3/jo.ts +2 -0
- package/src/flags/art/4x3/jp.ts +2 -0
- package/src/flags/art/4x3/ke.ts +2 -0
- package/src/flags/art/4x3/kg.ts +2 -0
- package/src/flags/art/4x3/kh.ts +2 -0
- package/src/flags/art/4x3/ki.ts +2 -0
- package/src/flags/art/4x3/km.ts +2 -0
- package/src/flags/art/4x3/kn.ts +2 -0
- package/src/flags/art/4x3/kp.ts +2 -0
- package/src/flags/art/4x3/kr.ts +2 -0
- package/src/flags/art/4x3/kw.ts +2 -0
- package/src/flags/art/4x3/ky.ts +2 -0
- package/src/flags/art/4x3/kz.ts +2 -0
- package/src/flags/art/4x3/la.ts +2 -0
- package/src/flags/art/4x3/lb.ts +2 -0
- package/src/flags/art/4x3/lc.ts +2 -0
- package/src/flags/art/4x3/li.ts +2 -0
- package/src/flags/art/4x3/lk.ts +2 -0
- package/src/flags/art/4x3/lr.ts +2 -0
- package/src/flags/art/4x3/ls.ts +2 -0
- package/src/flags/art/4x3/lt.ts +2 -0
- package/src/flags/art/4x3/lu.ts +2 -0
- package/src/flags/art/4x3/lv.ts +2 -0
- package/src/flags/art/4x3/ly.ts +2 -0
- package/src/flags/art/4x3/ma.ts +2 -0
- package/src/flags/art/4x3/mc.ts +2 -0
- package/src/flags/art/4x3/md.ts +2 -0
- package/src/flags/art/4x3/me.ts +2 -0
- package/src/flags/art/4x3/mf.ts +2 -0
- package/src/flags/art/4x3/mg.ts +2 -0
- package/src/flags/art/4x3/mh.ts +2 -0
- package/src/flags/art/4x3/mk.ts +2 -0
- package/src/flags/art/4x3/ml.ts +2 -0
- package/src/flags/art/4x3/mm.ts +2 -0
- package/src/flags/art/4x3/mn.ts +2 -0
- package/src/flags/art/4x3/mo.ts +2 -0
- package/src/flags/art/4x3/mp.ts +2 -0
- package/src/flags/art/4x3/mq.ts +2 -0
- package/src/flags/art/4x3/mr.ts +2 -0
- package/src/flags/art/4x3/ms.ts +2 -0
- package/src/flags/art/4x3/mt.ts +2 -0
- package/src/flags/art/4x3/mu.ts +2 -0
- package/src/flags/art/4x3/mv.ts +2 -0
- package/src/flags/art/4x3/mw.ts +2 -0
- package/src/flags/art/4x3/mx.ts +2 -0
- package/src/flags/art/4x3/my.ts +2 -0
- package/src/flags/art/4x3/mz.ts +2 -0
- package/src/flags/art/4x3/na.ts +2 -0
- package/src/flags/art/4x3/nc.ts +2 -0
- package/src/flags/art/4x3/ne.ts +2 -0
- package/src/flags/art/4x3/nf.ts +2 -0
- package/src/flags/art/4x3/ng.ts +2 -0
- package/src/flags/art/4x3/ni.ts +2 -0
- package/src/flags/art/4x3/nl.ts +2 -0
- package/src/flags/art/4x3/no.ts +2 -0
- package/src/flags/art/4x3/np.ts +2 -0
- package/src/flags/art/4x3/nr.ts +2 -0
- package/src/flags/art/4x3/nu.ts +2 -0
- package/src/flags/art/4x3/nz.ts +2 -0
- package/src/flags/art/4x3/om.ts +2 -0
- package/src/flags/art/4x3/pa.ts +2 -0
- package/src/flags/art/4x3/pc.ts +2 -0
- package/src/flags/art/4x3/pe.ts +2 -0
- package/src/flags/art/4x3/pf.ts +2 -0
- package/src/flags/art/4x3/pg.ts +2 -0
- package/src/flags/art/4x3/ph.ts +2 -0
- package/src/flags/art/4x3/pk.ts +2 -0
- package/src/flags/art/4x3/pl.ts +2 -0
- package/src/flags/art/4x3/pm.ts +2 -0
- package/src/flags/art/4x3/pn.ts +2 -0
- package/src/flags/art/4x3/pr.ts +2 -0
- package/src/flags/art/4x3/ps.ts +2 -0
- package/src/flags/art/4x3/pt.ts +2 -0
- package/src/flags/art/4x3/pw.ts +2 -0
- package/src/flags/art/4x3/py.ts +2 -0
- package/src/flags/art/4x3/qa.ts +2 -0
- package/src/flags/art/4x3/re.ts +2 -0
- package/src/flags/art/4x3/ro.ts +2 -0
- package/src/flags/art/4x3/rs.ts +2 -0
- package/src/flags/art/4x3/ru.ts +2 -0
- package/src/flags/art/4x3/rw.ts +2 -0
- package/src/flags/art/4x3/sa.ts +2 -0
- package/src/flags/art/4x3/sb.ts +2 -0
- package/src/flags/art/4x3/sc.ts +2 -0
- package/src/flags/art/4x3/sd.ts +2 -0
- package/src/flags/art/4x3/se.ts +2 -0
- package/src/flags/art/4x3/sg.ts +2 -0
- package/src/flags/art/4x3/sh-ac.ts +2 -0
- package/src/flags/art/4x3/sh-hl.ts +2 -0
- package/src/flags/art/4x3/sh-ta.ts +2 -0
- package/src/flags/art/4x3/sh.ts +2 -0
- package/src/flags/art/4x3/si.ts +2 -0
- package/src/flags/art/4x3/sj.ts +2 -0
- package/src/flags/art/4x3/sk.ts +2 -0
- package/src/flags/art/4x3/sl.ts +2 -0
- package/src/flags/art/4x3/sm.ts +2 -0
- package/src/flags/art/4x3/sn.ts +2 -0
- package/src/flags/art/4x3/so.ts +2 -0
- package/src/flags/art/4x3/sr.ts +2 -0
- package/src/flags/art/4x3/ss.ts +2 -0
- package/src/flags/art/4x3/st.ts +2 -0
- package/src/flags/art/4x3/sv.ts +2 -0
- package/src/flags/art/4x3/sx.ts +2 -0
- package/src/flags/art/4x3/sy.ts +2 -0
- package/src/flags/art/4x3/sz.ts +2 -0
- package/src/flags/art/4x3/tc.ts +2 -0
- package/src/flags/art/4x3/td.ts +2 -0
- package/src/flags/art/4x3/tf.ts +2 -0
- package/src/flags/art/4x3/tg.ts +2 -0
- package/src/flags/art/4x3/th.ts +2 -0
- package/src/flags/art/4x3/tj.ts +2 -0
- package/src/flags/art/4x3/tk.ts +2 -0
- package/src/flags/art/4x3/tl.ts +2 -0
- package/src/flags/art/4x3/tm.ts +2 -0
- package/src/flags/art/4x3/tn.ts +2 -0
- package/src/flags/art/4x3/to.ts +2 -0
- package/src/flags/art/4x3/tr.ts +2 -0
- package/src/flags/art/4x3/tt.ts +2 -0
- package/src/flags/art/4x3/tv.ts +2 -0
- package/src/flags/art/4x3/tw.ts +2 -0
- package/src/flags/art/4x3/tz.ts +2 -0
- package/src/flags/art/4x3/ua.ts +2 -0
- package/src/flags/art/4x3/ug.ts +2 -0
- package/src/flags/art/4x3/um.ts +2 -0
- package/src/flags/art/4x3/un.ts +2 -0
- package/src/flags/art/4x3/us.ts +2 -0
- package/src/flags/art/4x3/uy.ts +2 -0
- package/src/flags/art/4x3/uz.ts +2 -0
- package/src/flags/art/4x3/va.ts +2 -0
- package/src/flags/art/4x3/vc.ts +2 -0
- package/src/flags/art/4x3/ve.ts +2 -0
- package/src/flags/art/4x3/vg.ts +2 -0
- package/src/flags/art/4x3/vi.ts +2 -0
- package/src/flags/art/4x3/vn.ts +2 -0
- package/src/flags/art/4x3/vu.ts +2 -0
- package/src/flags/art/4x3/wf.ts +2 -0
- package/src/flags/art/4x3/ws.ts +2 -0
- package/src/flags/art/4x3/xk.ts +2 -0
- package/src/flags/art/4x3/xx.ts +2 -0
- package/src/flags/art/4x3/ye.ts +2 -0
- package/src/flags/art/4x3/yt.ts +2 -0
- package/src/flags/art/4x3/za.ts +2 -0
- package/src/flags/art/4x3/zm.ts +2 -0
- package/src/flags/art/4x3/zw.ts +2 -0
- package/src/flags/art/index.ts +552 -0
- package/src/flags/flags.test.tsx +140 -0
- package/src/flags/index.ts +7 -0
- package/src/flags/loadFlag.ts +29 -0
- package/src/flags/names.ts +65 -0
- package/src/flow/CLEAN-ROOM.md +110 -0
- package/src/flow/PROVENANCE.md +169 -0
- package/src/flow/README.md +117 -0
- package/src/flow/agents/AgentCreationWizard.tsx +633 -0
- package/src/flow/agents/AgentEditorDialog.tsx +751 -0
- package/src/flow/agents/agents.css +563 -0
- package/src/flow/agents/agents.test.tsx +207 -0
- package/src/flow/agents/index.ts +4 -0
- package/src/flow/agents/parts.tsx +171 -0
- package/src/flow/assistant/AssistantConversation.tsx +388 -0
- package/src/flow/assistant/AssistantVisualBlock.test.tsx +86 -0
- package/src/flow/assistant/AssistantVisualBlock.tsx +75 -0
- package/src/flow/assistant/ConversationShell.test.tsx +202 -0
- package/src/flow/assistant/ConversationShell.tsx +160 -0
- package/src/flow/assistant/LiveCanvasPanel.tsx +52 -0
- package/src/flow/assistant/MarkdownView.tsx +162 -0
- package/src/flow/assistant/ThreadHistory.tsx +156 -0
- package/src/flow/assistant/assistant.css +567 -0
- package/src/flow/assistant/index.ts +10 -0
- package/src/flow/assistant/threadDays.ts +44 -0
- package/src/flow/assistant/useAssistantSession.test.tsx +172 -0
- package/src/flow/assistant/useAssistantSession.ts +457 -0
- package/src/flow/assistant/visual.ts +205 -0
- package/src/flow/catalog/RenderCatalog.tsx +98 -0
- package/src/flow/catalog/catalog.test.tsx +162 -0
- package/src/flow/catalog/icons.ts +116 -0
- package/src/flow/catalog/kindCatalog.ts +175 -0
- package/src/flow/catalog/nodeState.ts +46 -0
- package/src/flow/catalog/palette.ts +116 -0
- package/src/flow/connectors/ConditionalConnector.css +274 -0
- package/src/flow/connectors/ConditionalConnector.tsx +288 -0
- package/src/flow/connectors/ConnectionPreviewLine.tsx +31 -0
- package/src/flow/connectors/ConnectorInsertMenu.tsx +103 -0
- package/src/flow/connectors/connectors.css +2 -0
- package/src/flow/connectors/connectors.test.tsx +218 -0
- package/src/flow/connectors/index.ts +4 -0
- package/src/flow/decision/DecisionNode.tsx +182 -0
- package/src/flow/decision/decision.css +1 -0
- package/src/flow/decision/index.ts +3 -0
- package/src/flow/decision/types.ts +60 -0
- package/src/flow/dialogs/DefinitionDialogs.test.tsx +177 -0
- package/src/flow/dialogs/DefinitionExportDialog.tsx +234 -0
- package/src/flow/dialogs/DefinitionImportDialog.tsx +303 -0
- package/src/flow/dialogs/FlowSettingsDialog.test.tsx +95 -0
- package/src/flow/dialogs/FlowSettingsDialog.tsx +242 -0
- package/src/flow/dialogs/NodeConfigDialog.test.tsx +151 -0
- package/src/flow/dialogs/NodeConfigDialog.tsx +208 -0
- package/src/flow/dialogs/dialogs.css +134 -0
- package/src/flow/dialogs/index.ts +5 -0
- package/src/flow/editor/AutosaveController.tsx +25 -0
- package/src/flow/editor/CanvasCommandBar.tsx +315 -0
- package/src/flow/editor/CanvasContextMenus.tsx +287 -0
- package/src/flow/editor/FlowEditor.test.tsx +282 -0
- package/src/flow/editor/FlowEditor.tsx +1214 -0
- package/src/flow/editor/FlowOutline.tsx +196 -0
- package/src/flow/editor/FlowPreview.tsx +149 -0
- package/src/flow/editor/FlowSwitcherBar.tsx +141 -0
- package/src/flow/editor/NodePalette.tsx +447 -0
- package/src/flow/editor/RunControls.tsx +85 -0
- package/src/flow/editor/SaveStatus.tsx +45 -0
- package/src/flow/editor/editor.css +573 -0
- package/src/flow/editor/editorTools.ts +135 -0
- package/src/flow/editor/focusOut.ts +23 -0
- package/src/flow/editor/index.ts +16 -0
- package/src/flow/editor/keyMap.ts +93 -0
- package/src/flow/editor/nodeBridge.tsx +66 -0
- package/src/flow/editor/parts.test.tsx +519 -0
- package/src/flow/editor/useEditorShortcuts.ts +122 -0
- package/src/flow/editor/useSelectionArrange.ts +135 -0
- package/src/flow/expressions/ComputeInsertPanel.tsx +123 -0
- package/src/flow/expressions/ComputeNodeForm.tsx +291 -0
- package/src/flow/expressions/ComputeTrial.tsx +105 -0
- package/src/flow/expressions/ExpressionBuilder.test.tsx +161 -0
- package/src/flow/expressions/ExpressionBuilder.tsx +71 -0
- package/src/flow/expressions/ExpressionField.tsx +157 -0
- package/src/flow/expressions/RuleEditor.tsx +645 -0
- package/src/flow/expressions/RuleNodeForm.tsx +165 -0
- package/src/flow/expressions/SimulationNodeForm.tsx +175 -0
- package/src/flow/expressions/TraceTree.test.tsx +120 -0
- package/src/flow/expressions/TraceTree.tsx +210 -0
- package/src/flow/expressions/builder/ItemList.tsx +72 -0
- package/src/flow/expressions/builder/leaves.tsx +94 -0
- package/src/flow/expressions/builder/shared.tsx +55 -0
- package/src/flow/expressions/builder/tree.tsx +221 -0
- package/src/flow/expressions/catalogContext.tsx +21 -0
- package/src/flow/expressions/computeDraft.ts +105 -0
- package/src/flow/expressions/exampleCatalog.ts +42 -0
- package/src/flow/expressions/expressions.css +520 -0
- package/src/flow/expressions/forms.test.tsx +325 -0
- package/src/flow/expressions/index.ts +15 -0
- package/src/flow/expressions/labels.ts +204 -0
- package/src/flow/expressions/model.ts +194 -0
- package/src/flow/expressions/ruleActions.ts +164 -0
- package/src/flow/expressions/ruleCondition.ts +98 -0
- package/src/flow/expressions/trace.ts +98 -0
- package/src/flow/forms/AgentNodeForm.css +29 -0
- package/src/flow/forms/AgentNodeForm.test.tsx +66 -0
- package/src/flow/forms/AgentNodeForm.tsx +177 -0
- package/src/flow/forms/DataSourceNodeForm.test.tsx +121 -0
- package/src/flow/forms/DataSourceNodeForm.tsx +519 -0
- package/src/flow/forms/DecisionNodeForm.test.tsx +72 -0
- package/src/flow/forms/DecisionNodeForm.tsx +302 -0
- package/src/flow/forms/GroupNodeForm.css +72 -0
- package/src/flow/forms/GroupNodeForm.test.tsx +55 -0
- package/src/flow/forms/GroupNodeForm.tsx +148 -0
- package/src/flow/forms/NewForms.css +256 -0
- package/src/flow/forms/NodeFormFooter.tsx +44 -0
- package/src/flow/forms/OutputSchemaBuilder.test.tsx +83 -0
- package/src/flow/forms/OutputSchemaBuilder.tsx +325 -0
- package/src/flow/forms/ReportOutputNodeForm.test.tsx +63 -0
- package/src/flow/forms/ReportOutputNodeForm.tsx +180 -0
- package/src/flow/forms/SchemaConfigForm.css +7 -0
- package/src/flow/forms/SchemaConfigForm.test.tsx +74 -0
- package/src/flow/forms/SchemaConfigForm.tsx +214 -0
- package/src/flow/forms/StartNodeForm.css +29 -0
- package/src/flow/forms/StartNodeForm.test.tsx +66 -0
- package/src/flow/forms/StartNodeForm.tsx +88 -0
- package/src/flow/forms/ToolServerListField.css +58 -0
- package/src/flow/forms/ToolServerListField.test.tsx +73 -0
- package/src/flow/forms/ToolServerListField.tsx +242 -0
- package/src/flow/forms/VariableListEditor.css +82 -0
- package/src/flow/forms/VariableListEditor.test.tsx +79 -0
- package/src/flow/forms/VariableListEditor.tsx +280 -0
- package/src/flow/forms/forms-shared.css +53 -0
- package/src/flow/forms/forms.css +9 -0
- package/src/flow/forms/index.ts +12 -0
- package/src/flow/forms/nameListModel.ts +61 -0
- package/src/flow/geometry/arrange.ts +74 -0
- package/src/flow/geometry/curve.ts +58 -0
- package/src/flow/geometry/geometry.test.ts +97 -0
- package/src/flow/geometry/guides.ts +49 -0
- package/src/flow/geometry/rect.ts +101 -0
- package/src/flow/geometry/viewport.ts +70 -0
- package/src/flow/index.ts +58 -0
- package/src/flow/internal/Announcer.tsx +63 -0
- package/src/flow/internal/DockedPanel.tsx +95 -0
- package/src/flow/internal/SectionedModal.tsx +117 -0
- package/src/flow/internal/builtInLabels.test.ts +16 -0
- package/src/flow/internal/confirm.tsx +73 -0
- package/src/flow/internal/format.ts +47 -0
- package/src/flow/internal/i18n.test.tsx +109 -0
- package/src/flow/internal/ids.ts +9 -0
- package/src/flow/internal/internal.css +152 -0
- package/src/flow/internal/labels.ts +101 -0
- package/src/flow/internal/messageFormat.ts +102 -0
- package/src/flow/internal/useControllable.ts +17 -0
- package/src/flow/layout/autoLayout.test.ts +56 -0
- package/src/flow/layout/autoLayout.ts +93 -0
- package/src/flow/layout/chainLayout.ts +66 -0
- package/src/flow/model/graph.ts +123 -0
- package/src/flow/model/types.ts +83 -0
- package/src/flow/nodes/AgentIdentity.tsx +145 -0
- package/src/flow/nodes/AgentNode.tsx +152 -0
- package/src/flow/nodes/AlignmentGuides.tsx +108 -0
- package/src/flow/nodes/ConnectionPorts.tsx +277 -0
- package/src/flow/nodes/DataSourceNode.tsx +179 -0
- package/src/flow/nodes/GenericNode.tsx +114 -0
- package/src/flow/nodes/GraphNodeCard.css +314 -0
- package/src/flow/nodes/GraphNodeCard.test.tsx +117 -0
- package/src/flow/nodes/GraphNodeCard.tsx +329 -0
- package/src/flow/nodes/GroupNode.tsx +231 -0
- package/src/flow/nodes/NodeRunIndicator.tsx +139 -0
- package/src/flow/nodes/NoteNode.tsx +134 -0
- package/src/flow/nodes/RuleNode.tsx +162 -0
- package/src/flow/nodes/flow-nodes.css +687 -0
- package/src/flow/nodes/groupLayout.ts +66 -0
- package/src/flow/nodes/index.ts +18 -0
- package/src/flow/nodes/nodeChrome.tsx +113 -0
- package/src/flow/nodes/nodes.css +3 -0
- package/src/flow/nodes/nodes.test.tsx +529 -0
- package/src/flow/nodes/ports.ts +127 -0
- package/src/flow/nodes/registry.tsx +262 -0
- package/src/flow/nodes/sourceMarks.tsx +52 -0
- package/src/flow/nodes/types.ts +85 -0
- package/src/flow/provenance/EditionCompare.tsx +292 -0
- package/src/flow/provenance/NumberTrace.tsx +208 -0
- package/src/flow/provenance/ProvenanceCertificate.tsx +263 -0
- package/src/flow/provenance/ProvenanceFilters.tsx +137 -0
- package/src/flow/provenance/ProvenanceGraph.css +1156 -0
- package/src/flow/provenance/ProvenanceGraph.test.tsx +361 -0
- package/src/flow/provenance/ProvenanceGraph.tsx +725 -0
- package/src/flow/provenance/ProvenanceInspector.tsx +201 -0
- package/src/flow/provenance/ProvenanceLegend.tsx +66 -0
- package/src/flow/provenance/ProvenanceNode.tsx +171 -0
- package/src/flow/provenance/ProvenanceShellParts.test.tsx +130 -0
- package/src/flow/provenance/ProvenanceTimeline.tsx +342 -0
- package/src/flow/provenance/ProvenanceTree.tsx +143 -0
- package/src/flow/provenance/ProvenanceViews.css +828 -0
- package/src/flow/provenance/ProvenanceViews.test.tsx +307 -0
- package/src/flow/provenance/index.ts +14 -0
- package/src/flow/provenance/labels.ts +418 -0
- package/src/flow/provenance/model.ts +381 -0
- package/src/flow/provenance/proofTypes.ts +93 -0
- package/src/flow/provenance/provenance.css +3 -0
- package/src/flow/report/ClaimTitle.tsx +15 -0
- package/src/flow/report/ProvenanceTag.test.tsx +37 -0
- package/src/flow/report/ProvenanceTag.tsx +58 -0
- package/src/flow/report/ReportView.test.tsx +59 -0
- package/src/flow/report/ReportView.tsx +359 -0
- package/src/flow/report/index.ts +4 -0
- package/src/flow/report/report.css +267 -0
- package/src/flow/run/ExecutionTimeline.tsx +478 -0
- package/src/flow/run/NumberInput.tsx +59 -0
- package/src/flow/run/RunDrawer.tsx +485 -0
- package/src/flow/run/RunInputDialog.tsx +149 -0
- package/src/flow/run/RunPanel.tsx +136 -0
- package/src/flow/run/RunPreviewPanel.tsx +269 -0
- package/src/flow/run/RunReplayDialog.tsx +278 -0
- package/src/flow/run/RunRewindDialog.tsx +197 -0
- package/src/flow/run/RunStatusMark.tsx +79 -0
- package/src/flow/run/RunTimePanel.test.tsx +55 -0
- package/src/flow/run/RunTimePanel.tsx +143 -0
- package/src/flow/run/RunViews.tsx +170 -0
- package/src/flow/run/ShortId.tsx +15 -0
- package/src/flow/run/VariableInspector.tsx +198 -0
- package/src/flow/run/VersionHistoryPanel.tsx +178 -0
- package/src/flow/run/execution.ts +187 -0
- package/src/flow/run/index.ts +18 -0
- package/src/flow/run/lineage.ts +123 -0
- package/src/flow/run/rewindPlan.ts +79 -0
- package/src/flow/run/run.css +749 -0
- package/src/flow/run/run.test.tsx +533 -0
- package/src/flow/run/runData.ts +124 -0
- package/src/flow/run/types.ts +53 -0
- package/src/flow/state/dialogStack.tsx +90 -0
- package/src/flow/state/editorState.test.tsx +110 -0
- package/src/flow/state/editorState.tsx +296 -0
- package/src/flow/state/graphEdits.ts +107 -0
- package/src/flow/state/store.ts +67 -0
- package/src/flow/steps/AddStepPicker.tsx +108 -0
- package/src/flow/steps/FlowSidePanel.tsx +318 -0
- package/src/flow/steps/IssueBar.tsx +58 -0
- package/src/flow/steps/ShapeChip.tsx +41 -0
- package/src/flow/steps/StepCard.tsx +139 -0
- package/src/flow/steps/StepListView.tsx +152 -0
- package/src/flow/steps/StepPalette.tsx +194 -0
- package/src/flow/steps/StepsContext.tsx +70 -0
- package/src/flow/steps/index.ts +15 -0
- package/src/flow/steps/researchSteps.ts +269 -0
- package/src/flow/steps/shapes.ts +46 -0
- package/src/flow/steps/stepLabels.ts +160 -0
- package/src/flow/steps/stepTools.ts +37 -0
- package/src/flow/steps/steps.css +962 -0
- package/src/flow/steps/steps.test.tsx +351 -0
- package/src/flow/steps/wiring.ts +123 -0
- package/src/flow/styles.css +23 -0
- package/src/flow/surface/CanvasSurface.test.tsx +148 -0
- package/src/flow/surface/CanvasSurface.tsx +674 -0
- package/src/flow/surface/OverviewMap.tsx +50 -0
- package/src/flow/surface/SurfaceContext.tsx +28 -0
- package/src/flow/surface/surface.css +200 -0
- package/src/flow/surface/types.ts +97 -0
- package/src/flow/surface/useElementSize.ts +29 -0
- package/src/flow/surface/useNodeMeasurement.ts +71 -0
- package/src/flow/toolbar/CanvasNodeSearch.tsx +110 -0
- package/src/flow/toolbar/CanvasToolbar.test.tsx +101 -0
- package/src/flow/toolbar/CanvasToolbar.tsx +114 -0
- package/src/flow/toolbar/canvasTools.ts +114 -0
- package/src/flow/toolbar/dockItems.test.tsx +47 -0
- package/src/flow/toolbar/dockItems.tsx +51 -0
- package/src/flow/toolbar/index.ts +5 -0
- package/src/flow/toolbar/toolbar.css +217 -0
- package/src/groups/auth-brand.css +18 -0
- package/src/groups/auth-brand.ts +17 -0
- package/src/groups/charts-geo.css +6 -0
- package/src/groups/charts-geo.ts +98 -0
- package/src/groups/data-a.css +13 -0
- package/src/groups/data-a.ts +14 -0
- package/src/groups/data-b.css +11 -0
- package/src/groups/data-b.ts +11 -0
- package/src/groups/forms-a.css +17 -0
- package/src/groups/forms-a.ts +15 -0
- package/src/groups/forms-b.css +14 -0
- package/src/groups/forms-b.ts +13 -0
- package/src/groups/overlays-nav.css +15 -0
- package/src/groups/overlays-nav.ts +16 -0
- package/src/groups/platform.css +7 -0
- package/src/groups/platform.ts +101 -0
- package/src/groups/shell.css +10 -0
- package/src/groups/shell.ts +10 -0
- package/src/groups/showcase.css +8 -0
- package/src/groups/showcase.ts +9 -0
- package/src/index.ts +68 -0
- package/src/internal/ThemeScope.tsx +28 -0
- package/src/internal/VisuallyHidden.tsx +10 -0
- package/src/internal/cx.ts +4 -0
- package/src/internal/data-a/announce.ts +38 -0
- package/src/internal/data-a/clipboard.ts +11 -0
- package/src/internal/data-b/signed.ts +34 -0
- package/src/internal/data-b/tween.ts +67 -0
- package/src/internal/dev.ts +12 -0
- package/src/internal/dom.ts +42 -0
- package/src/internal/forms-a/LiveNote.tsx +18 -0
- package/src/internal/forms-a/SearchInput.css +125 -0
- package/src/internal/forms-a/SearchInput.tsx +52 -0
- package/src/internal/forms-a/marks.tsx +18 -0
- package/src/internal/forms-a/shared.css +25 -0
- package/src/internal/forms-b/digits.ts +33 -0
- package/src/internal/forms-b/forms-b.css +341 -0
- package/src/internal/forms-b/parts.tsx +151 -0
- package/src/internal/haptics.ts +77 -0
- package/src/internal/icuCatalogue.ts +60 -0
- package/src/internal/inert.ts +15 -0
- package/src/internal/media.ts +35 -0
- package/src/internal/messages/auth-brand.ts +161 -0
- package/src/internal/messages/charts-geo.ts +289 -0
- package/src/internal/messages/core-es.ts +111 -0
- package/src/internal/messages/data-a.ts +199 -0
- package/src/internal/messages/data-b.ts +99 -0
- package/src/internal/messages/forms-a.ts +309 -0
- package/src/internal/messages/forms-b.ts +293 -0
- package/src/internal/messages/overlays-nav.ts +367 -0
- package/src/internal/messages/platform.ts +63 -0
- package/src/internal/messages/plural.ts +24 -0
- package/src/internal/messages/shell.ts +144 -0
- package/src/internal/messages/showcase.ts +12 -0
- package/src/internal/messages.ts +386 -0
- package/src/internal/overlays-nav/fuzzy.ts +115 -0
- package/src/internal/overlays-nav/hold.ts +53 -0
- package/src/internal/overlays-nav/recent.ts +73 -0
- package/src/internal/overlays-nav/state.ts +54 -0
- package/src/internal/platform/touchTrack.ts +49 -0
- package/src/internal/provider.tsx +64 -0
- package/src/internal/speech.ts +24 -0
- package/src/internal/theme.test.tsx +166 -0
- package/src/internal/theme.tsx +181 -0
- package/src/internal/types.ts +4 -0
- package/src/internal/variants.test.ts +14 -0
- package/src/internal/variants.ts +48 -0
- package/src/native-states.css +364 -0
- package/src/styles.css +59 -0
- package/src/utilities/api-error-model/apiErrors.test.ts +74 -0
- package/src/utilities/api-error-model/apiErrors.ts +192 -0
- package/src/utilities/entity-list-loader/useEntityListLoader.test.tsx +72 -0
- package/src/utilities/entity-list-loader/useEntityListLoader.ts +107 -0
- package/src/utilities/formatters/formatters.locales.test.ts +30 -0
- package/src/utilities/formatters/formatters.test.tsx +86 -0
- package/src/utilities/formatters/formatters.ts +190 -0
- package/src/utilities/haptics/haptics.test.tsx +96 -0
- package/src/utilities/haptics/haptics.tsx +79 -0
- package/src/utilities/i18n-adapter/I18nAdapter.test.tsx +70 -0
- package/src/utilities/i18n-adapter/I18nAdapter.tsx +136 -0
- package/src/utilities/i18n-adapter/icu.numeric.test.ts +39 -0
- package/src/utilities/i18n-adapter/icu.ts +207 -0
- package/src/utilities/legacy-alias-map/LEGACY-ALIASES.md +65 -0
- package/src/utilities/legacy-alias-map/legacy-alias-map.test.ts +57 -0
- package/src/utilities/motion-foundation/motion.test.tsx +76 -0
- package/src/utilities/motion-foundation/motion.tsx +119 -0
- package/src/utilities/router-adapter/Routing.test.tsx +68 -0
- package/src/utilities/router-adapter/Routing.tsx +149 -0
- package/src/utilities/view-transition/animatedChange.test.ts +72 -0
- package/src/utilities/view-transition/animatedChange.ts +90 -0
- package/dist/src-Ds9ArSaP.js.map +0 -1
|
@@ -0,0 +1,3639 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as defineTympanElements } from "./elements-DCGBSGS8.js";
|
|
3
|
+
import { createElement, forwardRef, useEffect, useId, useImperativeHandle, useRef } from "react";
|
|
4
|
+
//#region src/elements/react/TyActionMenu.ts
|
|
5
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
6
|
+
const truthy$37 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
7
|
+
const text$37 = (v) => truthy$37(v) ? String(v) : void 0;
|
|
8
|
+
const filled$20 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
9
|
+
const DEFAULTS$36 = {
|
|
10
|
+
mode: "trigger",
|
|
11
|
+
triggerLabel: "More actions"
|
|
12
|
+
};
|
|
13
|
+
const TyActionMenu = forwardRef(function TyActionMenu(props, ref) {
|
|
14
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
15
|
+
const handlers = useRef(props);
|
|
16
|
+
handlers.current = props;
|
|
17
|
+
const host = useRef(null);
|
|
18
|
+
useImperativeHandle(ref, () => host.current);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
const element = host.current;
|
|
21
|
+
if (!element) return;
|
|
22
|
+
const listeners = [["ty-action", (event) => handlers.current.onAction?.(event.detail)], ["ty-open-change", (event) => handlers.current.onOpenChange?.(event.detail)]];
|
|
23
|
+
for (const [type, listener] of listeners) element.addEventListener(type, listener);
|
|
24
|
+
return () => {
|
|
25
|
+
for (const [type, listener] of listeners) element.removeEventListener(type, listener);
|
|
26
|
+
};
|
|
27
|
+
}, []);
|
|
28
|
+
const p = {
|
|
29
|
+
open: props.open,
|
|
30
|
+
mode: props.mode ?? DEFAULTS$36.mode,
|
|
31
|
+
label: props.label,
|
|
32
|
+
triggerLabel: props.triggerLabel ?? DEFAULTS$36.triggerLabel,
|
|
33
|
+
items: props.items,
|
|
34
|
+
position: props.position
|
|
35
|
+
};
|
|
36
|
+
const slots = { "trigger": filled$20(props.trigger) };
|
|
37
|
+
return createElement("ty-action-menu", {
|
|
38
|
+
ref: host,
|
|
39
|
+
id: props.id,
|
|
40
|
+
className: props.className,
|
|
41
|
+
"data-ty-instance": instance,
|
|
42
|
+
"open": truthy$37(p.open) ? true : void 0,
|
|
43
|
+
"mode": text$37(p.mode),
|
|
44
|
+
"label": text$37(p.label),
|
|
45
|
+
"trigger-label": text$37(p.triggerLabel),
|
|
46
|
+
"items": text$37(p.items),
|
|
47
|
+
"position": text$37(p.position)
|
|
48
|
+
}, createElement("span", {
|
|
49
|
+
className: "ty-action-menu__target",
|
|
50
|
+
"data-mode": p.mode
|
|
51
|
+
}, !slots["trigger"] && p.mode === "trigger" ? createElement("button", {
|
|
52
|
+
className: "ty-button ty-action-menu__trigger",
|
|
53
|
+
type: "button",
|
|
54
|
+
"aria-label": p.triggerLabel,
|
|
55
|
+
"aria-haspopup": "menu",
|
|
56
|
+
"data-variant": "quiet",
|
|
57
|
+
"data-icon-only": ""
|
|
58
|
+
}, createElement("span", {
|
|
59
|
+
className: "ty-button__icon",
|
|
60
|
+
"aria-hidden": "true"
|
|
61
|
+
}, createElement("svg", {
|
|
62
|
+
className: "ty-icon",
|
|
63
|
+
viewBox: "0 0 24 24",
|
|
64
|
+
fill: "none",
|
|
65
|
+
stroke: "currentColor",
|
|
66
|
+
strokeWidth: "2",
|
|
67
|
+
strokeLinecap: "round",
|
|
68
|
+
strokeLinejoin: "round",
|
|
69
|
+
"aria-hidden": "true",
|
|
70
|
+
focusable: "false"
|
|
71
|
+
}, createElement("circle", {
|
|
72
|
+
className: "ty-action-menu__glyph",
|
|
73
|
+
cx: "12",
|
|
74
|
+
cy: "12",
|
|
75
|
+
r: "1"
|
|
76
|
+
}), createElement("circle", {
|
|
77
|
+
className: "ty-action-menu__glyph",
|
|
78
|
+
cx: "19",
|
|
79
|
+
cy: "12",
|
|
80
|
+
r: "1"
|
|
81
|
+
}), createElement("circle", {
|
|
82
|
+
className: "ty-action-menu__glyph",
|
|
83
|
+
cx: "5",
|
|
84
|
+
cy: "12",
|
|
85
|
+
r: "1"
|
|
86
|
+
})))) : null, slots["trigger"] ? props.trigger : null, createElement("div", {
|
|
87
|
+
className: "ty-action-menu",
|
|
88
|
+
hidden: !truthy$37(p.open) ? true : void 0,
|
|
89
|
+
"data-mode": p.mode
|
|
90
|
+
}, createElement("div", {
|
|
91
|
+
className: "ty-action-menu__menu",
|
|
92
|
+
id: `${instance}-menu`,
|
|
93
|
+
role: "menu",
|
|
94
|
+
"aria-label": p.label,
|
|
95
|
+
"aria-orientation": "vertical",
|
|
96
|
+
tabIndex: "-1"
|
|
97
|
+
}))));
|
|
98
|
+
});
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region src/elements/react/TyAvatar.ts
|
|
101
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
102
|
+
const truthy$36 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
103
|
+
const text$36 = (v) => truthy$36(v) ? String(v) : void 0;
|
|
104
|
+
const DEFAULTS$35 = {
|
|
105
|
+
actorKind: "person",
|
|
106
|
+
size: "regular",
|
|
107
|
+
tint: "accent",
|
|
108
|
+
actionLabel: "Open profile of {name}"
|
|
109
|
+
};
|
|
110
|
+
const TyAvatar = forwardRef(function TyAvatar(props, ref) {
|
|
111
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
112
|
+
const handlers = useRef(props);
|
|
113
|
+
handlers.current = props;
|
|
114
|
+
const host = useRef(null);
|
|
115
|
+
useImperativeHandle(ref, () => host.current);
|
|
116
|
+
const p = {
|
|
117
|
+
src: props.src,
|
|
118
|
+
fallbackText: props.fallbackText,
|
|
119
|
+
name: props.name,
|
|
120
|
+
decorative: props.decorative,
|
|
121
|
+
actorKind: props.actorKind ?? DEFAULTS$35.actorKind,
|
|
122
|
+
size: props.size ?? DEFAULTS$35.size,
|
|
123
|
+
tint: props.tint ?? DEFAULTS$35.tint,
|
|
124
|
+
pressable: props.pressable,
|
|
125
|
+
href: props.href,
|
|
126
|
+
actionLabel: props.actionLabel ?? DEFAULTS$35.actionLabel
|
|
127
|
+
};
|
|
128
|
+
return createElement("ty-avatar", {
|
|
129
|
+
ref: host,
|
|
130
|
+
id: props.id,
|
|
131
|
+
className: props.className,
|
|
132
|
+
"data-ty-instance": instance,
|
|
133
|
+
"src": text$36(p.src),
|
|
134
|
+
"fallback-text": text$36(p.fallbackText),
|
|
135
|
+
"name": text$36(p.name),
|
|
136
|
+
"decorative": truthy$36(p.decorative) ? true : void 0,
|
|
137
|
+
"actor-kind": text$36(p.actorKind),
|
|
138
|
+
"size": text$36(p.size),
|
|
139
|
+
"tint": text$36(p.tint),
|
|
140
|
+
"pressable": truthy$36(p.pressable) ? true : void 0,
|
|
141
|
+
"href": text$36(p.href),
|
|
142
|
+
"action-label": text$36(p.actionLabel)
|
|
143
|
+
}, createElement("span", { className: "ty-avatar-root" }, !truthy$36(p.pressable) && !truthy$36(p.href) ? createElement("span", {
|
|
144
|
+
className: "ty-avatar",
|
|
145
|
+
"data-kind": p.actorKind,
|
|
146
|
+
"data-size": p.size,
|
|
147
|
+
"data-tint": p.tint,
|
|
148
|
+
"data-image": truthy$36(p.src) ? "" : void 0,
|
|
149
|
+
"aria-hidden": truthy$36(p.decorative) ? "true" : void 0,
|
|
150
|
+
role: !truthy$36(p.decorative) && !truthy$36(p.src) ? "img" : void 0,
|
|
151
|
+
"aria-label": !truthy$36(p.decorative) && !truthy$36(p.src) ? p.name : void 0
|
|
152
|
+
}, truthy$36(p.src) && (truthy$36(p.decorative) || truthy$36(p.pressable) || truthy$36(p.href)) ? createElement("img", {
|
|
153
|
+
className: "ty-avatar__image",
|
|
154
|
+
src: p.src,
|
|
155
|
+
alt: ""
|
|
156
|
+
}) : null, truthy$36(p.src) && !truthy$36(p.decorative) && !truthy$36(p.pressable) && !truthy$36(p.href) ? createElement("img", {
|
|
157
|
+
className: "ty-avatar__image",
|
|
158
|
+
src: p.src,
|
|
159
|
+
alt: p.name
|
|
160
|
+
}) : null, createElement("span", {
|
|
161
|
+
className: "ty-avatar__fallback",
|
|
162
|
+
hidden: truthy$36(p.src) ? true : void 0
|
|
163
|
+
}, p.actorKind === "agent" ? createElement("svg", {
|
|
164
|
+
className: "ty-avatar__icon",
|
|
165
|
+
viewBox: "0 0 24 24",
|
|
166
|
+
fill: "none",
|
|
167
|
+
stroke: "currentColor",
|
|
168
|
+
strokeWidth: "2",
|
|
169
|
+
strokeLinecap: "round",
|
|
170
|
+
strokeLinejoin: "round",
|
|
171
|
+
"aria-hidden": "true",
|
|
172
|
+
focusable: "false"
|
|
173
|
+
}, createElement("path", {
|
|
174
|
+
className: "ty-avatar__glyph",
|
|
175
|
+
d: "M12 8V4H8"
|
|
176
|
+
}), createElement("rect", {
|
|
177
|
+
className: "ty-avatar__glyph",
|
|
178
|
+
width: "16",
|
|
179
|
+
height: "12",
|
|
180
|
+
x: "4",
|
|
181
|
+
y: "8",
|
|
182
|
+
rx: "2"
|
|
183
|
+
}), createElement("path", {
|
|
184
|
+
className: "ty-avatar__glyph",
|
|
185
|
+
d: "M2 14h2"
|
|
186
|
+
}), createElement("path", {
|
|
187
|
+
className: "ty-avatar__glyph",
|
|
188
|
+
d: "M20 14h2"
|
|
189
|
+
}), createElement("path", {
|
|
190
|
+
className: "ty-avatar__glyph",
|
|
191
|
+
d: "M15 13v2"
|
|
192
|
+
}), createElement("path", {
|
|
193
|
+
className: "ty-avatar__glyph",
|
|
194
|
+
d: "M9 13v2"
|
|
195
|
+
})) : null, p.actorKind === "person" && truthy$36(p.fallbackText) ? createElement("span", {
|
|
196
|
+
className: "ty-avatar__initials",
|
|
197
|
+
"aria-hidden": "true"
|
|
198
|
+
}, text$36(p.fallbackText)) : null, p.actorKind === "person" && !truthy$36(p.fallbackText) ? createElement("svg", {
|
|
199
|
+
className: "ty-avatar__icon",
|
|
200
|
+
viewBox: "0 0 24 24",
|
|
201
|
+
fill: "none",
|
|
202
|
+
stroke: "currentColor",
|
|
203
|
+
strokeWidth: "2",
|
|
204
|
+
strokeLinecap: "round",
|
|
205
|
+
strokeLinejoin: "round",
|
|
206
|
+
"aria-hidden": "true",
|
|
207
|
+
focusable: "false"
|
|
208
|
+
}, createElement("path", {
|
|
209
|
+
className: "ty-avatar__glyph",
|
|
210
|
+
d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"
|
|
211
|
+
}), createElement("circle", {
|
|
212
|
+
className: "ty-avatar__glyph",
|
|
213
|
+
cx: "12",
|
|
214
|
+
cy: "7",
|
|
215
|
+
r: "4"
|
|
216
|
+
})) : null)) : null, truthy$36(p.href) ? createElement("a", {
|
|
217
|
+
className: "ty-avatar-control",
|
|
218
|
+
href: p.href,
|
|
219
|
+
"data-size": p.size,
|
|
220
|
+
onPress: (event) => handlers.current.onPress?.(event)
|
|
221
|
+
}, createElement("span", {
|
|
222
|
+
className: "ty-avatar",
|
|
223
|
+
"data-kind": p.actorKind,
|
|
224
|
+
"data-size": p.size,
|
|
225
|
+
"data-tint": p.tint,
|
|
226
|
+
"data-image": truthy$36(p.src) ? "" : void 0,
|
|
227
|
+
"aria-hidden": "true"
|
|
228
|
+
}, truthy$36(p.src) && (truthy$36(p.decorative) || truthy$36(p.pressable) || truthy$36(p.href)) ? createElement("img", {
|
|
229
|
+
className: "ty-avatar__image",
|
|
230
|
+
src: p.src,
|
|
231
|
+
alt: ""
|
|
232
|
+
}) : null, truthy$36(p.src) && !truthy$36(p.decorative) && !truthy$36(p.pressable) && !truthy$36(p.href) ? createElement("img", {
|
|
233
|
+
className: "ty-avatar__image",
|
|
234
|
+
src: p.src,
|
|
235
|
+
alt: p.name
|
|
236
|
+
}) : null, createElement("span", {
|
|
237
|
+
className: "ty-avatar__fallback",
|
|
238
|
+
hidden: truthy$36(p.src) ? true : void 0
|
|
239
|
+
}, p.actorKind === "agent" ? createElement("svg", {
|
|
240
|
+
className: "ty-avatar__icon",
|
|
241
|
+
viewBox: "0 0 24 24",
|
|
242
|
+
fill: "none",
|
|
243
|
+
stroke: "currentColor",
|
|
244
|
+
strokeWidth: "2",
|
|
245
|
+
strokeLinecap: "round",
|
|
246
|
+
strokeLinejoin: "round",
|
|
247
|
+
"aria-hidden": "true",
|
|
248
|
+
focusable: "false"
|
|
249
|
+
}, createElement("path", {
|
|
250
|
+
className: "ty-avatar__glyph",
|
|
251
|
+
d: "M12 8V4H8"
|
|
252
|
+
}), createElement("rect", {
|
|
253
|
+
className: "ty-avatar__glyph",
|
|
254
|
+
width: "16",
|
|
255
|
+
height: "12",
|
|
256
|
+
x: "4",
|
|
257
|
+
y: "8",
|
|
258
|
+
rx: "2"
|
|
259
|
+
}), createElement("path", {
|
|
260
|
+
className: "ty-avatar__glyph",
|
|
261
|
+
d: "M2 14h2"
|
|
262
|
+
}), createElement("path", {
|
|
263
|
+
className: "ty-avatar__glyph",
|
|
264
|
+
d: "M20 14h2"
|
|
265
|
+
}), createElement("path", {
|
|
266
|
+
className: "ty-avatar__glyph",
|
|
267
|
+
d: "M15 13v2"
|
|
268
|
+
}), createElement("path", {
|
|
269
|
+
className: "ty-avatar__glyph",
|
|
270
|
+
d: "M9 13v2"
|
|
271
|
+
})) : null, p.actorKind === "person" && truthy$36(p.fallbackText) ? createElement("span", {
|
|
272
|
+
className: "ty-avatar__initials",
|
|
273
|
+
"aria-hidden": "true"
|
|
274
|
+
}, text$36(p.fallbackText)) : null, p.actorKind === "person" && !truthy$36(p.fallbackText) ? createElement("svg", {
|
|
275
|
+
className: "ty-avatar__icon",
|
|
276
|
+
viewBox: "0 0 24 24",
|
|
277
|
+
fill: "none",
|
|
278
|
+
stroke: "currentColor",
|
|
279
|
+
strokeWidth: "2",
|
|
280
|
+
strokeLinecap: "round",
|
|
281
|
+
strokeLinejoin: "round",
|
|
282
|
+
"aria-hidden": "true",
|
|
283
|
+
focusable: "false"
|
|
284
|
+
}, createElement("path", {
|
|
285
|
+
className: "ty-avatar__glyph",
|
|
286
|
+
d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"
|
|
287
|
+
}), createElement("circle", {
|
|
288
|
+
className: "ty-avatar__glyph",
|
|
289
|
+
cx: "12",
|
|
290
|
+
cy: "7",
|
|
291
|
+
r: "4"
|
|
292
|
+
})) : null))) : null, !truthy$36(p.href) && truthy$36(p.pressable) ? createElement("button", {
|
|
293
|
+
className: "ty-avatar-control",
|
|
294
|
+
type: "button",
|
|
295
|
+
"data-size": p.size,
|
|
296
|
+
onPress: (event) => handlers.current.onPress?.(event)
|
|
297
|
+
}, createElement("span", {
|
|
298
|
+
className: "ty-avatar",
|
|
299
|
+
"data-kind": p.actorKind,
|
|
300
|
+
"data-size": p.size,
|
|
301
|
+
"data-tint": p.tint,
|
|
302
|
+
"data-image": truthy$36(p.src) ? "" : void 0,
|
|
303
|
+
"aria-hidden": "true"
|
|
304
|
+
}, truthy$36(p.src) && (truthy$36(p.decorative) || truthy$36(p.pressable) || truthy$36(p.href)) ? createElement("img", {
|
|
305
|
+
className: "ty-avatar__image",
|
|
306
|
+
src: p.src,
|
|
307
|
+
alt: ""
|
|
308
|
+
}) : null, truthy$36(p.src) && !truthy$36(p.decorative) && !truthy$36(p.pressable) && !truthy$36(p.href) ? createElement("img", {
|
|
309
|
+
className: "ty-avatar__image",
|
|
310
|
+
src: p.src,
|
|
311
|
+
alt: p.name
|
|
312
|
+
}) : null, createElement("span", {
|
|
313
|
+
className: "ty-avatar__fallback",
|
|
314
|
+
hidden: truthy$36(p.src) ? true : void 0
|
|
315
|
+
}, p.actorKind === "agent" ? createElement("svg", {
|
|
316
|
+
className: "ty-avatar__icon",
|
|
317
|
+
viewBox: "0 0 24 24",
|
|
318
|
+
fill: "none",
|
|
319
|
+
stroke: "currentColor",
|
|
320
|
+
strokeWidth: "2",
|
|
321
|
+
strokeLinecap: "round",
|
|
322
|
+
strokeLinejoin: "round",
|
|
323
|
+
"aria-hidden": "true",
|
|
324
|
+
focusable: "false"
|
|
325
|
+
}, createElement("path", {
|
|
326
|
+
className: "ty-avatar__glyph",
|
|
327
|
+
d: "M12 8V4H8"
|
|
328
|
+
}), createElement("rect", {
|
|
329
|
+
className: "ty-avatar__glyph",
|
|
330
|
+
width: "16",
|
|
331
|
+
height: "12",
|
|
332
|
+
x: "4",
|
|
333
|
+
y: "8",
|
|
334
|
+
rx: "2"
|
|
335
|
+
}), createElement("path", {
|
|
336
|
+
className: "ty-avatar__glyph",
|
|
337
|
+
d: "M2 14h2"
|
|
338
|
+
}), createElement("path", {
|
|
339
|
+
className: "ty-avatar__glyph",
|
|
340
|
+
d: "M20 14h2"
|
|
341
|
+
}), createElement("path", {
|
|
342
|
+
className: "ty-avatar__glyph",
|
|
343
|
+
d: "M15 13v2"
|
|
344
|
+
}), createElement("path", {
|
|
345
|
+
className: "ty-avatar__glyph",
|
|
346
|
+
d: "M9 13v2"
|
|
347
|
+
})) : null, p.actorKind === "person" && truthy$36(p.fallbackText) ? createElement("span", {
|
|
348
|
+
className: "ty-avatar__initials",
|
|
349
|
+
"aria-hidden": "true"
|
|
350
|
+
}, text$36(p.fallbackText)) : null, p.actorKind === "person" && !truthy$36(p.fallbackText) ? createElement("svg", {
|
|
351
|
+
className: "ty-avatar__icon",
|
|
352
|
+
viewBox: "0 0 24 24",
|
|
353
|
+
fill: "none",
|
|
354
|
+
stroke: "currentColor",
|
|
355
|
+
strokeWidth: "2",
|
|
356
|
+
strokeLinecap: "round",
|
|
357
|
+
strokeLinejoin: "round",
|
|
358
|
+
"aria-hidden": "true",
|
|
359
|
+
focusable: "false"
|
|
360
|
+
}, createElement("path", {
|
|
361
|
+
className: "ty-avatar__glyph",
|
|
362
|
+
d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"
|
|
363
|
+
}), createElement("circle", {
|
|
364
|
+
className: "ty-avatar__glyph",
|
|
365
|
+
cx: "12",
|
|
366
|
+
cy: "7",
|
|
367
|
+
r: "4"
|
|
368
|
+
})) : null))) : null));
|
|
369
|
+
});
|
|
370
|
+
//#endregion
|
|
371
|
+
//#region src/elements/react/TyBrandWordmark.ts
|
|
372
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
373
|
+
const truthy$35 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
374
|
+
const text$35 = (v) => truthy$35(v) ? String(v) : void 0;
|
|
375
|
+
const DEFAULTS$34 = { size: "medium" };
|
|
376
|
+
const TyBrandWordmark = forwardRef(function TyBrandWordmark(props, ref) {
|
|
377
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
378
|
+
const handlers = useRef(props);
|
|
379
|
+
handlers.current = props;
|
|
380
|
+
const host = useRef(null);
|
|
381
|
+
useImperativeHandle(ref, () => host.current);
|
|
382
|
+
const p = {
|
|
383
|
+
text: props.text,
|
|
384
|
+
accent: props.accent,
|
|
385
|
+
size: props.size ?? DEFAULTS$34.size,
|
|
386
|
+
label: props.label,
|
|
387
|
+
testId: props.testId
|
|
388
|
+
};
|
|
389
|
+
return createElement("ty-brand-wordmark", {
|
|
390
|
+
ref: host,
|
|
391
|
+
id: props.id,
|
|
392
|
+
className: props.className,
|
|
393
|
+
"data-ty-instance": instance,
|
|
394
|
+
"text": text$35(p.text),
|
|
395
|
+
"accent": text$35(p.accent),
|
|
396
|
+
"size": text$35(p.size),
|
|
397
|
+
"label": text$35(p.label),
|
|
398
|
+
"test-id": text$35(p.testId)
|
|
399
|
+
}, createElement("span", {
|
|
400
|
+
className: "ty-brand-wordmark",
|
|
401
|
+
role: truthy$35(p.label) ? "img" : void 0,
|
|
402
|
+
"aria-label": p.label,
|
|
403
|
+
"data-size": p.size,
|
|
404
|
+
"data-testid": p.testId
|
|
405
|
+
}, truthy$35(p.text) ? createElement("span", { className: "ty-brand-wordmark__text" }, text$35(p.text)) : null, truthy$35(p.accent) ? createElement("span", { className: "ty-brand-wordmark__accent" }, text$35(p.accent)) : null));
|
|
406
|
+
});
|
|
407
|
+
//#endregion
|
|
408
|
+
//#region src/elements/react/TyBreadcrumbs.ts
|
|
409
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
410
|
+
const truthy$34 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
411
|
+
const text$34 = (v) => truthy$34(v) ? String(v) : void 0;
|
|
412
|
+
const filled$19 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
413
|
+
const DEFAULTS$33 = {
|
|
414
|
+
label: "Breadcrumb",
|
|
415
|
+
mode: "auto",
|
|
416
|
+
backLabel: "Back to {parent}",
|
|
417
|
+
overflowLabel: "Show hidden levels"
|
|
418
|
+
};
|
|
419
|
+
const TyBreadcrumbs = forwardRef(function TyBreadcrumbs(props, ref) {
|
|
420
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
421
|
+
const handlers = useRef(props);
|
|
422
|
+
handlers.current = props;
|
|
423
|
+
const host = useRef(null);
|
|
424
|
+
useImperativeHandle(ref, () => host.current);
|
|
425
|
+
useEffect(() => {
|
|
426
|
+
const element = host.current;
|
|
427
|
+
if (!element) return;
|
|
428
|
+
const listeners = [["ty-navigate", (event) => handlers.current.onNavigate?.(event.detail)]];
|
|
429
|
+
for (const [type, listener] of listeners) element.addEventListener(type, listener);
|
|
430
|
+
return () => {
|
|
431
|
+
for (const [type, listener] of listeners) element.removeEventListener(type, listener);
|
|
432
|
+
};
|
|
433
|
+
}, []);
|
|
434
|
+
const p = {
|
|
435
|
+
items: props.items,
|
|
436
|
+
label: props.label ?? DEFAULTS$33.label,
|
|
437
|
+
mode: props.mode ?? DEFAULTS$33.mode,
|
|
438
|
+
rootHref: props.rootHref,
|
|
439
|
+
rootLabel: props.rootLabel,
|
|
440
|
+
maxVisible: props.maxVisible,
|
|
441
|
+
backLabel: props.backLabel ?? DEFAULTS$33.backLabel,
|
|
442
|
+
overflowLabel: props.overflowLabel ?? DEFAULTS$33.overflowLabel
|
|
443
|
+
};
|
|
444
|
+
const slots = {
|
|
445
|
+
"center": filled$19(props.center),
|
|
446
|
+
"actions": filled$19(props.actions)
|
|
447
|
+
};
|
|
448
|
+
return createElement("ty-breadcrumbs", {
|
|
449
|
+
ref: host,
|
|
450
|
+
id: props.id,
|
|
451
|
+
className: props.className,
|
|
452
|
+
"data-ty-instance": instance,
|
|
453
|
+
"items": text$34(p.items),
|
|
454
|
+
"label": text$34(p.label),
|
|
455
|
+
"mode": text$34(p.mode),
|
|
456
|
+
"root-href": text$34(p.rootHref),
|
|
457
|
+
"root-label": text$34(p.rootLabel),
|
|
458
|
+
"max-visible": text$34(p.maxVisible),
|
|
459
|
+
"back-label": text$34(p.backLabel),
|
|
460
|
+
"overflow-label": text$34(p.overflowLabel)
|
|
461
|
+
}, createElement("nav", {
|
|
462
|
+
className: "ty-breadcrumbs",
|
|
463
|
+
"aria-label": p.label,
|
|
464
|
+
"data-mode": p.mode
|
|
465
|
+
}, !(p.mode === "compact") ? createElement("ol", { className: "ty-breadcrumbs__list" }) : null, p.mode === "compact" || p.mode === "auto" ? createElement("div", { className: "ty-breadcrumbs__bar" }, createElement("div", { className: "ty-breadcrumbs__back" }), slots["center"] || slots["actions"] ? createElement("div", { className: "ty-breadcrumbs__center" }, slots["center"] ? props.center : null, !slots["center"] ? createElement("span", {
|
|
466
|
+
className: "ty-breadcrumbs__title",
|
|
467
|
+
"aria-current": "page"
|
|
468
|
+
}) : null) : null, slots["actions"] ? createElement("div", { className: "ty-breadcrumbs__actions" }, props.actions) : null) : null));
|
|
469
|
+
});
|
|
470
|
+
//#endregion
|
|
471
|
+
//#region src/elements/react/TyCommandPalette.ts
|
|
472
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
473
|
+
const truthy$33 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
474
|
+
const text$33 = (v) => truthy$33(v) ? String(v) : void 0;
|
|
475
|
+
const DEFAULTS$32 = {
|
|
476
|
+
recentVisible: 5,
|
|
477
|
+
recentKeep: 12,
|
|
478
|
+
label: "Search and commands",
|
|
479
|
+
placeholder: "Search or type a command",
|
|
480
|
+
emptyLabel: "Type to search records, sources and screens.",
|
|
481
|
+
noResultsLabel: "Nothing matches “{query}”.",
|
|
482
|
+
loadingLabel: "Loading results",
|
|
483
|
+
removeScopeLabel: "Remove scope {scope}",
|
|
484
|
+
actionsForLabel: "Actions for {label}",
|
|
485
|
+
recentLabel: "Recent",
|
|
486
|
+
resultsLabel: "{count} results",
|
|
487
|
+
scopesLabel: "Scopes",
|
|
488
|
+
fallbackLabel: "Other actions",
|
|
489
|
+
hintNavigate: "move",
|
|
490
|
+
hintSelect: "open",
|
|
491
|
+
hintActions: "actions",
|
|
492
|
+
hintBack: "back",
|
|
493
|
+
hintClose: "close"
|
|
494
|
+
};
|
|
495
|
+
const TyCommandPalette = forwardRef(function TyCommandPalette(props, ref) {
|
|
496
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
497
|
+
const handlers = useRef(props);
|
|
498
|
+
handlers.current = props;
|
|
499
|
+
const host = useRef(null);
|
|
500
|
+
useImperativeHandle(ref, () => host.current);
|
|
501
|
+
useEffect(() => {
|
|
502
|
+
const element = host.current;
|
|
503
|
+
if (!element) return;
|
|
504
|
+
const listeners = [
|
|
505
|
+
["ty-select", (event) => handlers.current.onSelect?.(event.detail)],
|
|
506
|
+
["ty-scope-change", (event) => handlers.current.onScopeChange?.(event.detail)],
|
|
507
|
+
["ty-close", () => handlers.current.onClose?.()]
|
|
508
|
+
];
|
|
509
|
+
for (const [type, listener] of listeners) element.addEventListener(type, listener);
|
|
510
|
+
return () => {
|
|
511
|
+
for (const [type, listener] of listeners) element.removeEventListener(type, listener);
|
|
512
|
+
};
|
|
513
|
+
}, []);
|
|
514
|
+
const p = {
|
|
515
|
+
open: props.open,
|
|
516
|
+
groups: props.groups,
|
|
517
|
+
scopes: props.scopes,
|
|
518
|
+
activeScope: props.activeScope,
|
|
519
|
+
loading: props.loading,
|
|
520
|
+
fallbackActions: props.fallbackActions,
|
|
521
|
+
recentKey: props.recentKey,
|
|
522
|
+
recentVisible: props.recentVisible ?? DEFAULTS$32.recentVisible,
|
|
523
|
+
recentKeep: props.recentKeep ?? DEFAULTS$32.recentKeep,
|
|
524
|
+
label: props.label ?? DEFAULTS$32.label,
|
|
525
|
+
placeholder: props.placeholder ?? DEFAULTS$32.placeholder,
|
|
526
|
+
emptyLabel: props.emptyLabel ?? DEFAULTS$32.emptyLabel,
|
|
527
|
+
noResultsLabel: props.noResultsLabel ?? DEFAULTS$32.noResultsLabel,
|
|
528
|
+
loadingLabel: props.loadingLabel ?? DEFAULTS$32.loadingLabel,
|
|
529
|
+
removeScopeLabel: props.removeScopeLabel ?? DEFAULTS$32.removeScopeLabel,
|
|
530
|
+
actionsForLabel: props.actionsForLabel ?? DEFAULTS$32.actionsForLabel,
|
|
531
|
+
recentLabel: props.recentLabel ?? DEFAULTS$32.recentLabel,
|
|
532
|
+
resultsLabel: props.resultsLabel ?? DEFAULTS$32.resultsLabel,
|
|
533
|
+
scopesLabel: props.scopesLabel ?? DEFAULTS$32.scopesLabel,
|
|
534
|
+
fallbackLabel: props.fallbackLabel ?? DEFAULTS$32.fallbackLabel,
|
|
535
|
+
hintNavigate: props.hintNavigate ?? DEFAULTS$32.hintNavigate,
|
|
536
|
+
hintSelect: props.hintSelect ?? DEFAULTS$32.hintSelect,
|
|
537
|
+
hintActions: props.hintActions ?? DEFAULTS$32.hintActions,
|
|
538
|
+
hintBack: props.hintBack ?? DEFAULTS$32.hintBack,
|
|
539
|
+
hintClose: props.hintClose ?? DEFAULTS$32.hintClose
|
|
540
|
+
};
|
|
541
|
+
return createElement("ty-command-palette", {
|
|
542
|
+
ref: host,
|
|
543
|
+
id: props.id,
|
|
544
|
+
className: props.className,
|
|
545
|
+
"data-ty-instance": instance,
|
|
546
|
+
"open": truthy$33(p.open) ? true : void 0,
|
|
547
|
+
"groups": text$33(p.groups),
|
|
548
|
+
"scopes": text$33(p.scopes),
|
|
549
|
+
"active-scope": text$33(p.activeScope),
|
|
550
|
+
"loading": truthy$33(p.loading) ? true : void 0,
|
|
551
|
+
"fallback-actions": text$33(p.fallbackActions),
|
|
552
|
+
"recent-key": text$33(p.recentKey),
|
|
553
|
+
"recent-visible": text$33(p.recentVisible),
|
|
554
|
+
"recent-keep": text$33(p.recentKeep),
|
|
555
|
+
"label": text$33(p.label),
|
|
556
|
+
"placeholder": text$33(p.placeholder),
|
|
557
|
+
"empty-label": text$33(p.emptyLabel),
|
|
558
|
+
"no-results-label": text$33(p.noResultsLabel),
|
|
559
|
+
"loading-label": text$33(p.loadingLabel),
|
|
560
|
+
"remove-scope-label": text$33(p.removeScopeLabel),
|
|
561
|
+
"actions-for-label": text$33(p.actionsForLabel),
|
|
562
|
+
"recent-label": text$33(p.recentLabel),
|
|
563
|
+
"results-label": text$33(p.resultsLabel),
|
|
564
|
+
"scopes-label": text$33(p.scopesLabel),
|
|
565
|
+
"fallback-label": text$33(p.fallbackLabel),
|
|
566
|
+
"hint-navigate": text$33(p.hintNavigate),
|
|
567
|
+
"hint-select": text$33(p.hintSelect),
|
|
568
|
+
"hint-actions": text$33(p.hintActions),
|
|
569
|
+
"hint-back": text$33(p.hintBack),
|
|
570
|
+
"hint-close": text$33(p.hintClose)
|
|
571
|
+
});
|
|
572
|
+
});
|
|
573
|
+
//#endregion
|
|
574
|
+
//#region src/elements/react/TyCurrencyField.ts
|
|
575
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
576
|
+
const truthy$32 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
577
|
+
const text$32 = (v) => truthy$32(v) ? String(v) : void 0;
|
|
578
|
+
const filled$18 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
579
|
+
const DEFAULTS$31 = {
|
|
580
|
+
decimals: 2,
|
|
581
|
+
size: "medium",
|
|
582
|
+
currencyLabel: "Currency: {currency}"
|
|
583
|
+
};
|
|
584
|
+
const TyCurrencyField = forwardRef(function TyCurrencyField(props, ref) {
|
|
585
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
586
|
+
const handlers = useRef(props);
|
|
587
|
+
handlers.current = props;
|
|
588
|
+
const host = useRef(null);
|
|
589
|
+
useImperativeHandle(ref, () => host.current);
|
|
590
|
+
useEffect(() => {
|
|
591
|
+
const element = host.current;
|
|
592
|
+
if (!element) return;
|
|
593
|
+
const listeners = [["ty-value-change", (event) => handlers.current.onValueChange?.(event.detail)]];
|
|
594
|
+
for (const [type, listener] of listeners) element.addEventListener(type, listener);
|
|
595
|
+
return () => {
|
|
596
|
+
for (const [type, listener] of listeners) element.removeEventListener(type, listener);
|
|
597
|
+
};
|
|
598
|
+
}, []);
|
|
599
|
+
const p = {
|
|
600
|
+
value: props.value,
|
|
601
|
+
defaultValue: props.defaultValue,
|
|
602
|
+
currency: props.currency,
|
|
603
|
+
decimals: props.decimals ?? DEFAULTS$31.decimals,
|
|
604
|
+
locale: props.locale,
|
|
605
|
+
size: props.size ?? DEFAULTS$31.size,
|
|
606
|
+
currencyLabel: props.currencyLabel ?? DEFAULTS$31.currencyLabel,
|
|
607
|
+
required: props.required,
|
|
608
|
+
disabled: props.disabled,
|
|
609
|
+
readOnly: props.readOnly,
|
|
610
|
+
invalid: props.invalid,
|
|
611
|
+
name: props.name,
|
|
612
|
+
placeholder: props.placeholder,
|
|
613
|
+
accessibleLabel: props.accessibleLabel,
|
|
614
|
+
labelledBy: props.labelledBy,
|
|
615
|
+
describedBy: props.describedBy,
|
|
616
|
+
controlId: props.controlId,
|
|
617
|
+
testId: props.testId
|
|
618
|
+
};
|
|
619
|
+
const slots = {
|
|
620
|
+
"label": filled$18(props.label),
|
|
621
|
+
"hint": filled$18(props.hint),
|
|
622
|
+
"error": filled$18(props.error)
|
|
623
|
+
};
|
|
624
|
+
return createElement("ty-currency-field", {
|
|
625
|
+
ref: host,
|
|
626
|
+
id: props.id,
|
|
627
|
+
className: props.className,
|
|
628
|
+
"data-ty-instance": instance,
|
|
629
|
+
"value": text$32(p.value),
|
|
630
|
+
"default-value": text$32(p.defaultValue),
|
|
631
|
+
"currency": text$32(p.currency),
|
|
632
|
+
"decimals": text$32(p.decimals),
|
|
633
|
+
"locale": text$32(p.locale),
|
|
634
|
+
"size": text$32(p.size),
|
|
635
|
+
"currency-label": text$32(p.currencyLabel),
|
|
636
|
+
"required": truthy$32(p.required) ? true : void 0,
|
|
637
|
+
"disabled": truthy$32(p.disabled) ? true : void 0,
|
|
638
|
+
"read-only": truthy$32(p.readOnly) ? true : void 0,
|
|
639
|
+
"invalid": truthy$32(p.invalid) ? true : void 0,
|
|
640
|
+
"name": text$32(p.name),
|
|
641
|
+
"placeholder": text$32(p.placeholder),
|
|
642
|
+
"accessible-label": text$32(p.accessibleLabel),
|
|
643
|
+
"labelled-by": text$32(p.labelledBy),
|
|
644
|
+
"described-by": text$32(p.describedBy),
|
|
645
|
+
"control-id": text$32(p.controlId),
|
|
646
|
+
"test-id": text$32(p.testId)
|
|
647
|
+
}, createElement("div", {
|
|
648
|
+
className: "ty-currency-field",
|
|
649
|
+
"data-size": p.size,
|
|
650
|
+
"data-invalid": truthy$32(p.invalid) || slots["error"] ? "" : void 0,
|
|
651
|
+
"data-readonly": truthy$32(p.readOnly) ? "" : void 0,
|
|
652
|
+
"data-disabled": truthy$32(p.disabled) ? "" : void 0,
|
|
653
|
+
"data-testid": p.testId
|
|
654
|
+
}, createElement("div", { className: "ty-currency-field__field" }, slots["label"] ? createElement("label", {
|
|
655
|
+
className: "ty-fb-line",
|
|
656
|
+
"data-line": "label",
|
|
657
|
+
htmlFor: text$32(p.controlId) ?? `${instance}-input`
|
|
658
|
+
}, props.label) : null, slots["hint"] ? createElement("p", {
|
|
659
|
+
className: "ty-fb-line",
|
|
660
|
+
"data-line": "hint",
|
|
661
|
+
id: `${instance}-hint`
|
|
662
|
+
}, props.hint) : null, createElement("div", { className: "ty-currency-field__box" }, truthy$32(p.currency) ? createElement("span", {
|
|
663
|
+
className: "ty-currency-field__symbol",
|
|
664
|
+
"aria-hidden": "true"
|
|
665
|
+
}) : null, createElement("input", {
|
|
666
|
+
className: "ty-currency-field__input",
|
|
667
|
+
id: text$32(p.controlId) ?? `${instance}-input`,
|
|
668
|
+
type: "text",
|
|
669
|
+
name: p.name,
|
|
670
|
+
placeholder: p.placeholder,
|
|
671
|
+
autoComplete: "off",
|
|
672
|
+
disabled: truthy$32(p.disabled) || void 0,
|
|
673
|
+
readOnly: truthy$32(p.readOnly) || void 0,
|
|
674
|
+
required: truthy$32(p.required) || void 0,
|
|
675
|
+
"aria-label": !slots["label"] ? p.accessibleLabel : void 0,
|
|
676
|
+
"aria-labelledby": !slots["label"] && !truthy$32(p.accessibleLabel) ? p.labelledBy : void 0,
|
|
677
|
+
"aria-describedby": [
|
|
678
|
+
text$32(p.describedBy) ?? "",
|
|
679
|
+
slots["hint"] ? `${instance}-hint` : "",
|
|
680
|
+
truthy$32(p.currency) ? `${instance}-currency` : "",
|
|
681
|
+
slots["error"] ? `${instance}-error` : ""
|
|
682
|
+
].filter(Boolean).join(" ") || void 0,
|
|
683
|
+
"aria-invalid": truthy$32(p.invalid) || slots["error"] ? "true" : void 0
|
|
684
|
+
})), truthy$32(p.currency) ? createElement("span", {
|
|
685
|
+
className: "ty-visually-hidden ty-currency-field__currency",
|
|
686
|
+
id: `${instance}-currency`
|
|
687
|
+
}) : null, slots["error"] ? createElement("p", {
|
|
688
|
+
className: "ty-fb-line",
|
|
689
|
+
"data-line": "error",
|
|
690
|
+
id: `${instance}-error`
|
|
691
|
+
}, createElement("svg", {
|
|
692
|
+
className: "ty-icon",
|
|
693
|
+
viewBox: "0 0 24 24",
|
|
694
|
+
fill: "none",
|
|
695
|
+
stroke: "currentColor",
|
|
696
|
+
strokeWidth: "2",
|
|
697
|
+
strokeLinecap: "round",
|
|
698
|
+
strokeLinejoin: "round",
|
|
699
|
+
"aria-hidden": "true",
|
|
700
|
+
focusable: "false"
|
|
701
|
+
}, createElement("circle", {
|
|
702
|
+
className: "ty-currency-field__glyph",
|
|
703
|
+
cx: "12",
|
|
704
|
+
cy: "12",
|
|
705
|
+
r: "10"
|
|
706
|
+
}), createElement("line", {
|
|
707
|
+
className: "ty-currency-field__glyph",
|
|
708
|
+
x1: "12",
|
|
709
|
+
y1: "8",
|
|
710
|
+
x2: "12",
|
|
711
|
+
y2: "12"
|
|
712
|
+
}), createElement("line", {
|
|
713
|
+
className: "ty-currency-field__glyph",
|
|
714
|
+
x1: "12",
|
|
715
|
+
y1: "16",
|
|
716
|
+
x2: "12.01",
|
|
717
|
+
y2: "16"
|
|
718
|
+
})), createElement("span", { className: "ty-currency-field__error-text" }, props.error)) : null)));
|
|
719
|
+
});
|
|
720
|
+
//#endregion
|
|
721
|
+
//#region src/elements/react/TyDataTable.ts
|
|
722
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
723
|
+
const truthy$31 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
724
|
+
const text$31 = (v) => truthy$31(v) ? String(v) : void 0;
|
|
725
|
+
const DEFAULTS$30 = {
|
|
726
|
+
density: "standard",
|
|
727
|
+
selectionMode: "none",
|
|
728
|
+
loadingRowCount: 10,
|
|
729
|
+
loadingLabel: "Loading the list",
|
|
730
|
+
emptyLabel: "No rows to show",
|
|
731
|
+
selectAllLabel: "Select all rows",
|
|
732
|
+
selectRowLabel: "Select {label}"
|
|
733
|
+
};
|
|
734
|
+
const TyDataTable = forwardRef(function TyDataTable(props, ref) {
|
|
735
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
736
|
+
const handlers = useRef(props);
|
|
737
|
+
handlers.current = props;
|
|
738
|
+
const host = useRef(null);
|
|
739
|
+
useImperativeHandle(ref, () => host.current);
|
|
740
|
+
useEffect(() => {
|
|
741
|
+
const element = host.current;
|
|
742
|
+
if (!element) return;
|
|
743
|
+
const listeners = [
|
|
744
|
+
["ty-sort-change", (event) => handlers.current.onSortChange?.(event.detail)],
|
|
745
|
+
["ty-selection-change", (event) => handlers.current.onSelectionChange?.(event.detail)],
|
|
746
|
+
["ty-row-action", (event) => handlers.current.onRowAction?.(event.detail)]
|
|
747
|
+
];
|
|
748
|
+
for (const [type, listener] of listeners) element.addEventListener(type, listener);
|
|
749
|
+
return () => {
|
|
750
|
+
for (const [type, listener] of listeners) element.removeEventListener(type, listener);
|
|
751
|
+
};
|
|
752
|
+
}, []);
|
|
753
|
+
const p = {
|
|
754
|
+
caption: props.caption,
|
|
755
|
+
captionVisible: props.captionVisible,
|
|
756
|
+
columns: props.columns,
|
|
757
|
+
rows: props.rows,
|
|
758
|
+
density: props.density ?? DEFAULTS$30.density,
|
|
759
|
+
sortColumn: props.sortColumn,
|
|
760
|
+
sortDirection: props.sortDirection,
|
|
761
|
+
selectionMode: props.selectionMode ?? DEFAULTS$30.selectionMode,
|
|
762
|
+
selectedKeys: props.selectedKeys,
|
|
763
|
+
loading: props.loading,
|
|
764
|
+
loadingRowCount: props.loadingRowCount ?? DEFAULTS$30.loadingRowCount,
|
|
765
|
+
loadingLabel: props.loadingLabel ?? DEFAULTS$30.loadingLabel,
|
|
766
|
+
emptyLabel: props.emptyLabel ?? DEFAULTS$30.emptyLabel,
|
|
767
|
+
emptyDescription: props.emptyDescription,
|
|
768
|
+
selectAllLabel: props.selectAllLabel ?? DEFAULTS$30.selectAllLabel,
|
|
769
|
+
selectRowLabel: props.selectRowLabel ?? DEFAULTS$30.selectRowLabel,
|
|
770
|
+
actionable: props.actionable,
|
|
771
|
+
stickyFirstColumn: props.stickyFirstColumn,
|
|
772
|
+
showColumnLines: props.showColumnLines,
|
|
773
|
+
maxBlockSize: props.maxBlockSize
|
|
774
|
+
};
|
|
775
|
+
return createElement("ty-data-table", {
|
|
776
|
+
ref: host,
|
|
777
|
+
id: props.id,
|
|
778
|
+
className: props.className,
|
|
779
|
+
"data-ty-instance": instance,
|
|
780
|
+
"caption": text$31(p.caption),
|
|
781
|
+
"caption-visible": truthy$31(p.captionVisible) ? true : void 0,
|
|
782
|
+
"columns": text$31(p.columns),
|
|
783
|
+
"rows": text$31(p.rows),
|
|
784
|
+
"density": text$31(p.density),
|
|
785
|
+
"sort-column": text$31(p.sortColumn),
|
|
786
|
+
"sort-direction": text$31(p.sortDirection),
|
|
787
|
+
"selection-mode": text$31(p.selectionMode),
|
|
788
|
+
"selected-keys": text$31(p.selectedKeys),
|
|
789
|
+
"loading": truthy$31(p.loading) ? true : void 0,
|
|
790
|
+
"loading-row-count": text$31(p.loadingRowCount),
|
|
791
|
+
"loading-label": text$31(p.loadingLabel),
|
|
792
|
+
"empty-label": text$31(p.emptyLabel),
|
|
793
|
+
"empty-description": text$31(p.emptyDescription),
|
|
794
|
+
"select-all-label": text$31(p.selectAllLabel),
|
|
795
|
+
"select-row-label": text$31(p.selectRowLabel),
|
|
796
|
+
"actionable": truthy$31(p.actionable) ? true : void 0,
|
|
797
|
+
"sticky-first-column": text$31(p.stickyFirstColumn),
|
|
798
|
+
"show-column-lines": truthy$31(p.showColumnLines) ? true : void 0,
|
|
799
|
+
"max-block-size": text$31(p.maxBlockSize)
|
|
800
|
+
});
|
|
801
|
+
});
|
|
802
|
+
//#endregion
|
|
803
|
+
//#region src/elements/react/TyHeading.ts
|
|
804
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
805
|
+
const truthy$30 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
806
|
+
const text$30 = (v) => truthy$30(v) ? String(v) : void 0;
|
|
807
|
+
const DEFAULTS$29 = { level: "1" };
|
|
808
|
+
const TyHeading = forwardRef(function TyHeading(props, ref) {
|
|
809
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
810
|
+
const handlers = useRef(props);
|
|
811
|
+
handlers.current = props;
|
|
812
|
+
const host = useRef(null);
|
|
813
|
+
useImperativeHandle(ref, () => host.current);
|
|
814
|
+
const p = {
|
|
815
|
+
level: props.level ?? DEFAULTS$29.level,
|
|
816
|
+
appearance: props.appearance,
|
|
817
|
+
eyebrow: props.eyebrow,
|
|
818
|
+
headingId: props.headingId
|
|
819
|
+
};
|
|
820
|
+
return createElement("ty-heading", {
|
|
821
|
+
ref: host,
|
|
822
|
+
id: props.id,
|
|
823
|
+
className: props.className,
|
|
824
|
+
"data-ty-instance": instance,
|
|
825
|
+
"level": text$30(p.level),
|
|
826
|
+
"appearance": text$30(p.appearance),
|
|
827
|
+
"eyebrow": text$30(p.eyebrow),
|
|
828
|
+
"heading-id": text$30(p.headingId)
|
|
829
|
+
}, createElement("div", { className: "ty-heading-group" }, truthy$30(p.eyebrow) ? createElement("p", { className: "ty-heading__eyebrow" }, text$30(p.eyebrow)) : null, p.level === "1" ? createElement("h1", {
|
|
830
|
+
className: "ty-heading",
|
|
831
|
+
id: text$30(p.headingId) ?? `${instance}-heading`,
|
|
832
|
+
"data-appearance": truthy$30(p.appearance) ? {
|
|
833
|
+
"display": "display",
|
|
834
|
+
"h1": "h1",
|
|
835
|
+
"h2": "h2",
|
|
836
|
+
"h3": "h3",
|
|
837
|
+
"label": "label"
|
|
838
|
+
}[String(p.appearance)] : {
|
|
839
|
+
"1": "h1",
|
|
840
|
+
"2": "h2",
|
|
841
|
+
"3": "h3",
|
|
842
|
+
"4": "h3",
|
|
843
|
+
"5": "h3",
|
|
844
|
+
"6": "h3"
|
|
845
|
+
}[String(p.level)]
|
|
846
|
+
}, props.children) : null, p.level === "2" ? createElement("h2", {
|
|
847
|
+
className: "ty-heading",
|
|
848
|
+
id: text$30(p.headingId) ?? `${instance}-heading`,
|
|
849
|
+
"data-appearance": truthy$30(p.appearance) ? {
|
|
850
|
+
"display": "display",
|
|
851
|
+
"h1": "h1",
|
|
852
|
+
"h2": "h2",
|
|
853
|
+
"h3": "h3",
|
|
854
|
+
"label": "label"
|
|
855
|
+
}[String(p.appearance)] : {
|
|
856
|
+
"1": "h1",
|
|
857
|
+
"2": "h2",
|
|
858
|
+
"3": "h3",
|
|
859
|
+
"4": "h3",
|
|
860
|
+
"5": "h3",
|
|
861
|
+
"6": "h3"
|
|
862
|
+
}[String(p.level)]
|
|
863
|
+
}, props.children) : null, p.level === "3" ? createElement("h3", {
|
|
864
|
+
className: "ty-heading",
|
|
865
|
+
id: text$30(p.headingId) ?? `${instance}-heading`,
|
|
866
|
+
"data-appearance": truthy$30(p.appearance) ? {
|
|
867
|
+
"display": "display",
|
|
868
|
+
"h1": "h1",
|
|
869
|
+
"h2": "h2",
|
|
870
|
+
"h3": "h3",
|
|
871
|
+
"label": "label"
|
|
872
|
+
}[String(p.appearance)] : {
|
|
873
|
+
"1": "h1",
|
|
874
|
+
"2": "h2",
|
|
875
|
+
"3": "h3",
|
|
876
|
+
"4": "h3",
|
|
877
|
+
"5": "h3",
|
|
878
|
+
"6": "h3"
|
|
879
|
+
}[String(p.level)]
|
|
880
|
+
}, props.children) : null, p.level === "4" ? createElement("h4", {
|
|
881
|
+
className: "ty-heading",
|
|
882
|
+
id: text$30(p.headingId) ?? `${instance}-heading`,
|
|
883
|
+
"data-appearance": truthy$30(p.appearance) ? {
|
|
884
|
+
"display": "display",
|
|
885
|
+
"h1": "h1",
|
|
886
|
+
"h2": "h2",
|
|
887
|
+
"h3": "h3",
|
|
888
|
+
"label": "label"
|
|
889
|
+
}[String(p.appearance)] : {
|
|
890
|
+
"1": "h1",
|
|
891
|
+
"2": "h2",
|
|
892
|
+
"3": "h3",
|
|
893
|
+
"4": "h3",
|
|
894
|
+
"5": "h3",
|
|
895
|
+
"6": "h3"
|
|
896
|
+
}[String(p.level)]
|
|
897
|
+
}, props.children) : null, p.level === "5" ? createElement("h5", {
|
|
898
|
+
className: "ty-heading",
|
|
899
|
+
id: text$30(p.headingId) ?? `${instance}-heading`,
|
|
900
|
+
"data-appearance": truthy$30(p.appearance) ? {
|
|
901
|
+
"display": "display",
|
|
902
|
+
"h1": "h1",
|
|
903
|
+
"h2": "h2",
|
|
904
|
+
"h3": "h3",
|
|
905
|
+
"label": "label"
|
|
906
|
+
}[String(p.appearance)] : {
|
|
907
|
+
"1": "h1",
|
|
908
|
+
"2": "h2",
|
|
909
|
+
"3": "h3",
|
|
910
|
+
"4": "h3",
|
|
911
|
+
"5": "h3",
|
|
912
|
+
"6": "h3"
|
|
913
|
+
}[String(p.level)]
|
|
914
|
+
}, props.children) : null, p.level === "6" ? createElement("h6", {
|
|
915
|
+
className: "ty-heading",
|
|
916
|
+
id: text$30(p.headingId) ?? `${instance}-heading`,
|
|
917
|
+
"data-appearance": truthy$30(p.appearance) ? {
|
|
918
|
+
"display": "display",
|
|
919
|
+
"h1": "h1",
|
|
920
|
+
"h2": "h2",
|
|
921
|
+
"h3": "h3",
|
|
922
|
+
"label": "label"
|
|
923
|
+
}[String(p.appearance)] : {
|
|
924
|
+
"1": "h1",
|
|
925
|
+
"2": "h2",
|
|
926
|
+
"3": "h3",
|
|
927
|
+
"4": "h3",
|
|
928
|
+
"5": "h3",
|
|
929
|
+
"6": "h3"
|
|
930
|
+
}[String(p.level)]
|
|
931
|
+
}, props.children) : null));
|
|
932
|
+
});
|
|
933
|
+
//#endregion
|
|
934
|
+
//#region src/elements/react/TyMarkdownView.ts
|
|
935
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
936
|
+
const truthy$29 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
937
|
+
const text$29 = (v) => truthy$29(v) ? String(v) : void 0;
|
|
938
|
+
const DEFAULTS$28 = {
|
|
939
|
+
headingBase: 3,
|
|
940
|
+
density: "regular",
|
|
941
|
+
codeBlockLabel: "Code block",
|
|
942
|
+
codeBlockLanguageLabel: "Code block, {language}",
|
|
943
|
+
newTabLabel: "(opens in a new tab)"
|
|
944
|
+
};
|
|
945
|
+
const TyMarkdownView = forwardRef(function TyMarkdownView(props, ref) {
|
|
946
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
947
|
+
const handlers = useRef(props);
|
|
948
|
+
handlers.current = props;
|
|
949
|
+
const host = useRef(null);
|
|
950
|
+
useImperativeHandle(ref, () => host.current);
|
|
951
|
+
const p = {
|
|
952
|
+
text: props.text,
|
|
953
|
+
headingBase: props.headingBase ?? DEFAULTS$28.headingBase,
|
|
954
|
+
density: props.density ?? DEFAULTS$28.density,
|
|
955
|
+
codeBlockLabel: props.codeBlockLabel ?? DEFAULTS$28.codeBlockLabel,
|
|
956
|
+
codeBlockLanguageLabel: props.codeBlockLanguageLabel ?? DEFAULTS$28.codeBlockLanguageLabel,
|
|
957
|
+
newTabLabel: props.newTabLabel ?? DEFAULTS$28.newTabLabel
|
|
958
|
+
};
|
|
959
|
+
return createElement("ty-markdown-view", {
|
|
960
|
+
ref: host,
|
|
961
|
+
id: props.id,
|
|
962
|
+
className: props.className,
|
|
963
|
+
"data-ty-instance": instance,
|
|
964
|
+
"text": text$29(p.text),
|
|
965
|
+
"heading-base": text$29(p.headingBase),
|
|
966
|
+
"density": text$29(p.density),
|
|
967
|
+
"code-block-label": text$29(p.codeBlockLabel),
|
|
968
|
+
"code-block-language-label": text$29(p.codeBlockLanguageLabel),
|
|
969
|
+
"new-tab-label": text$29(p.newTabLabel)
|
|
970
|
+
});
|
|
971
|
+
});
|
|
972
|
+
//#endregion
|
|
973
|
+
//#region src/elements/react/TyNotificationCenter.ts
|
|
974
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
975
|
+
const truthy$28 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
976
|
+
const text$28 = (v) => truthy$28(v) ? String(v) : void 0;
|
|
977
|
+
const DEFAULTS$27 = {
|
|
978
|
+
historyLimit: 50,
|
|
979
|
+
bellLabel: "Notifications",
|
|
980
|
+
unreadLabel: "{count} unread",
|
|
981
|
+
titleLabel: "Notifications",
|
|
982
|
+
clearAllLabel: "Clear all",
|
|
983
|
+
closeLabel: "Close",
|
|
984
|
+
dismissLabel: "Dismiss, {title}",
|
|
985
|
+
emptyLabel: "There are no notifications in this session.",
|
|
986
|
+
clearedLabel: "Notifications cleared",
|
|
987
|
+
toneSuccess: "Success",
|
|
988
|
+
toneError: "Error",
|
|
989
|
+
toneWarning: "Warning",
|
|
990
|
+
toneInfo: "Information",
|
|
991
|
+
timeJustNow: "just now",
|
|
992
|
+
timeMinutesAgo: "{count} minutes ago",
|
|
993
|
+
timeHoursAgo: "{count} hours ago",
|
|
994
|
+
timeDaysAgo: "{count} days ago"
|
|
995
|
+
};
|
|
996
|
+
const TyNotificationCenter = forwardRef(function TyNotificationCenter(props, ref) {
|
|
997
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
998
|
+
const handlers = useRef(props);
|
|
999
|
+
handlers.current = props;
|
|
1000
|
+
const host = useRef(null);
|
|
1001
|
+
useImperativeHandle(ref, () => host.current);
|
|
1002
|
+
useEffect(() => {
|
|
1003
|
+
const element = host.current;
|
|
1004
|
+
if (!element) return;
|
|
1005
|
+
const listeners = [
|
|
1006
|
+
["ty-open-change", (event) => handlers.current.onOpenChange?.(event.detail)],
|
|
1007
|
+
["ty-dismiss", (event) => handlers.current.onDismiss?.(event.detail)],
|
|
1008
|
+
["ty-clear", () => handlers.current.onClear?.()]
|
|
1009
|
+
];
|
|
1010
|
+
for (const [type, listener] of listeners) element.addEventListener(type, listener);
|
|
1011
|
+
return () => {
|
|
1012
|
+
for (const [type, listener] of listeners) element.removeEventListener(type, listener);
|
|
1013
|
+
};
|
|
1014
|
+
}, []);
|
|
1015
|
+
const p = {
|
|
1016
|
+
open: props.open,
|
|
1017
|
+
notices: props.notices,
|
|
1018
|
+
historyLimit: props.historyLimit ?? DEFAULTS$27.historyLimit,
|
|
1019
|
+
bellLabel: props.bellLabel ?? DEFAULTS$27.bellLabel,
|
|
1020
|
+
unreadLabel: props.unreadLabel ?? DEFAULTS$27.unreadLabel,
|
|
1021
|
+
titleLabel: props.titleLabel ?? DEFAULTS$27.titleLabel,
|
|
1022
|
+
clearAllLabel: props.clearAllLabel ?? DEFAULTS$27.clearAllLabel,
|
|
1023
|
+
closeLabel: props.closeLabel ?? DEFAULTS$27.closeLabel,
|
|
1024
|
+
dismissLabel: props.dismissLabel ?? DEFAULTS$27.dismissLabel,
|
|
1025
|
+
emptyLabel: props.emptyLabel ?? DEFAULTS$27.emptyLabel,
|
|
1026
|
+
clearedLabel: props.clearedLabel ?? DEFAULTS$27.clearedLabel,
|
|
1027
|
+
toneSuccess: props.toneSuccess ?? DEFAULTS$27.toneSuccess,
|
|
1028
|
+
toneError: props.toneError ?? DEFAULTS$27.toneError,
|
|
1029
|
+
toneWarning: props.toneWarning ?? DEFAULTS$27.toneWarning,
|
|
1030
|
+
toneInfo: props.toneInfo ?? DEFAULTS$27.toneInfo,
|
|
1031
|
+
timeJustNow: props.timeJustNow ?? DEFAULTS$27.timeJustNow,
|
|
1032
|
+
timeMinutesAgo: props.timeMinutesAgo ?? DEFAULTS$27.timeMinutesAgo,
|
|
1033
|
+
timeHoursAgo: props.timeHoursAgo ?? DEFAULTS$27.timeHoursAgo,
|
|
1034
|
+
timeDaysAgo: props.timeDaysAgo ?? DEFAULTS$27.timeDaysAgo
|
|
1035
|
+
};
|
|
1036
|
+
return createElement("ty-notification-center", {
|
|
1037
|
+
ref: host,
|
|
1038
|
+
id: props.id,
|
|
1039
|
+
className: props.className,
|
|
1040
|
+
"data-ty-instance": instance,
|
|
1041
|
+
"open": truthy$28(p.open) ? true : void 0,
|
|
1042
|
+
"notices": text$28(p.notices),
|
|
1043
|
+
"history-limit": text$28(p.historyLimit),
|
|
1044
|
+
"bell-label": text$28(p.bellLabel),
|
|
1045
|
+
"unread-label": text$28(p.unreadLabel),
|
|
1046
|
+
"title-label": text$28(p.titleLabel),
|
|
1047
|
+
"clear-all-label": text$28(p.clearAllLabel),
|
|
1048
|
+
"close-label": text$28(p.closeLabel),
|
|
1049
|
+
"dismiss-label": text$28(p.dismissLabel),
|
|
1050
|
+
"empty-label": text$28(p.emptyLabel),
|
|
1051
|
+
"cleared-label": text$28(p.clearedLabel),
|
|
1052
|
+
"tone-success": text$28(p.toneSuccess),
|
|
1053
|
+
"tone-error": text$28(p.toneError),
|
|
1054
|
+
"tone-warning": text$28(p.toneWarning),
|
|
1055
|
+
"tone-info": text$28(p.toneInfo),
|
|
1056
|
+
"time-just-now": text$28(p.timeJustNow),
|
|
1057
|
+
"time-minutes-ago": text$28(p.timeMinutesAgo),
|
|
1058
|
+
"time-hours-ago": text$28(p.timeHoursAgo),
|
|
1059
|
+
"time-days-ago": text$28(p.timeDaysAgo)
|
|
1060
|
+
}, createElement("span", { className: "ty-notification-center" }, createElement("span", { className: "ty-notification-center__bell" }, createElement("button", {
|
|
1061
|
+
className: "ty-button ty-notification-center__trigger",
|
|
1062
|
+
type: "button",
|
|
1063
|
+
"aria-label": p.bellLabel,
|
|
1064
|
+
"aria-haspopup": "dialog",
|
|
1065
|
+
"aria-expanded": truthy$28(p.open) ? "true" : void 0,
|
|
1066
|
+
"aria-controls": `${instance}-dialog`,
|
|
1067
|
+
"data-variant": "quiet",
|
|
1068
|
+
"data-icon-only": ""
|
|
1069
|
+
}, createElement("span", {
|
|
1070
|
+
className: "ty-button__icon",
|
|
1071
|
+
"aria-hidden": "true"
|
|
1072
|
+
}, createElement("svg", {
|
|
1073
|
+
className: "ty-icon",
|
|
1074
|
+
viewBox: "0 0 24 24",
|
|
1075
|
+
fill: "none",
|
|
1076
|
+
stroke: "currentColor",
|
|
1077
|
+
strokeWidth: "2",
|
|
1078
|
+
strokeLinecap: "round",
|
|
1079
|
+
strokeLinejoin: "round",
|
|
1080
|
+
"aria-hidden": "true",
|
|
1081
|
+
focusable: "false"
|
|
1082
|
+
}, createElement("path", {
|
|
1083
|
+
className: "ty-notification-center__glyph",
|
|
1084
|
+
d: "M10.268 21a2 2 0 0 0 3.464 0"
|
|
1085
|
+
}), createElement("path", {
|
|
1086
|
+
className: "ty-notification-center__glyph",
|
|
1087
|
+
d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"
|
|
1088
|
+
}))))), createElement("div", {
|
|
1089
|
+
className: "ty-notification-center__backdrop",
|
|
1090
|
+
hidden: !truthy$28(p.open) ? true : void 0
|
|
1091
|
+
}, createElement("div", { className: "ty-notification-center__drawer" }, createElement("div", {
|
|
1092
|
+
className: "ty-notification-center__dialog",
|
|
1093
|
+
role: "dialog",
|
|
1094
|
+
"aria-modal": "true",
|
|
1095
|
+
tabIndex: "-1",
|
|
1096
|
+
id: `${instance}-dialog`,
|
|
1097
|
+
"aria-labelledby": `${instance}-title`
|
|
1098
|
+
}, createElement("header", { className: "ty-notification-center__head" }, createElement("svg", {
|
|
1099
|
+
className: "ty-icon",
|
|
1100
|
+
viewBox: "0 0 24 24",
|
|
1101
|
+
fill: "none",
|
|
1102
|
+
stroke: "currentColor",
|
|
1103
|
+
strokeWidth: "2",
|
|
1104
|
+
strokeLinecap: "round",
|
|
1105
|
+
strokeLinejoin: "round",
|
|
1106
|
+
"aria-hidden": "true",
|
|
1107
|
+
focusable: "false"
|
|
1108
|
+
}, createElement("path", {
|
|
1109
|
+
className: "ty-notification-center__glyph",
|
|
1110
|
+
d: "M10.268 21a2 2 0 0 0 3.464 0"
|
|
1111
|
+
}), createElement("path", {
|
|
1112
|
+
className: "ty-notification-center__glyph",
|
|
1113
|
+
d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"
|
|
1114
|
+
})), createElement("h2", {
|
|
1115
|
+
className: "ty-notification-center__heading",
|
|
1116
|
+
id: `${instance}-title`,
|
|
1117
|
+
tabIndex: "-1"
|
|
1118
|
+
}, text$28(p.titleLabel)), createElement("button", {
|
|
1119
|
+
className: "ty-button ty-notification-center__clear",
|
|
1120
|
+
type: "button",
|
|
1121
|
+
hidden: !truthy$28(p.notices) ? true : void 0,
|
|
1122
|
+
"data-variant": "quiet",
|
|
1123
|
+
"data-size": "compact"
|
|
1124
|
+
}, text$28(p.clearAllLabel)), createElement("button", {
|
|
1125
|
+
className: "ty-button ty-notification-center__close",
|
|
1126
|
+
type: "button",
|
|
1127
|
+
"aria-label": p.closeLabel,
|
|
1128
|
+
title: p.closeLabel,
|
|
1129
|
+
"data-variant": "quiet",
|
|
1130
|
+
"data-size": "compact",
|
|
1131
|
+
"data-shape": "circle",
|
|
1132
|
+
"data-icon-only": ""
|
|
1133
|
+
}, createElement("span", {
|
|
1134
|
+
className: "ty-button__icon",
|
|
1135
|
+
"aria-hidden": "true"
|
|
1136
|
+
}, createElement("svg", {
|
|
1137
|
+
className: "ty-icon",
|
|
1138
|
+
viewBox: "0 0 24 24",
|
|
1139
|
+
fill: "none",
|
|
1140
|
+
stroke: "currentColor",
|
|
1141
|
+
strokeWidth: "2",
|
|
1142
|
+
strokeLinecap: "round",
|
|
1143
|
+
strokeLinejoin: "round",
|
|
1144
|
+
"aria-hidden": "true",
|
|
1145
|
+
focusable: "false"
|
|
1146
|
+
}, createElement("path", {
|
|
1147
|
+
className: "ty-notification-center__glyph",
|
|
1148
|
+
d: "M18 6 6 18"
|
|
1149
|
+
}), createElement("path", {
|
|
1150
|
+
className: "ty-notification-center__glyph",
|
|
1151
|
+
d: "m6 6 12 12"
|
|
1152
|
+
}))))), createElement("div", {
|
|
1153
|
+
className: "ty-notification-center__empty",
|
|
1154
|
+
hidden: truthy$28(p.notices) ? true : void 0
|
|
1155
|
+
}, createElement("svg", {
|
|
1156
|
+
className: "ty-icon",
|
|
1157
|
+
viewBox: "0 0 24 24",
|
|
1158
|
+
fill: "none",
|
|
1159
|
+
stroke: "currentColor",
|
|
1160
|
+
strokeWidth: "2",
|
|
1161
|
+
strokeLinecap: "round",
|
|
1162
|
+
strokeLinejoin: "round",
|
|
1163
|
+
"aria-hidden": "true",
|
|
1164
|
+
focusable: "false"
|
|
1165
|
+
}, createElement("path", {
|
|
1166
|
+
className: "ty-notification-center__glyph",
|
|
1167
|
+
d: "M10.268 21a2 2 0 0 0 3.464 0"
|
|
1168
|
+
}), createElement("path", {
|
|
1169
|
+
className: "ty-notification-center__glyph",
|
|
1170
|
+
d: "M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742"
|
|
1171
|
+
}), createElement("path", {
|
|
1172
|
+
className: "ty-notification-center__glyph",
|
|
1173
|
+
d: "m2 2 20 20"
|
|
1174
|
+
}), createElement("path", {
|
|
1175
|
+
className: "ty-notification-center__glyph",
|
|
1176
|
+
d: "M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05"
|
|
1177
|
+
})), createElement("p", { className: "ty-notification-center__empty-text" }, text$28(p.emptyLabel))), createElement("ul", {
|
|
1178
|
+
className: "ty-notification-center__list",
|
|
1179
|
+
hidden: !truthy$28(p.notices) ? true : void 0
|
|
1180
|
+
})))), createElement("span", {
|
|
1181
|
+
className: "ty-visually-hidden ty-notification-center__status",
|
|
1182
|
+
role: "status"
|
|
1183
|
+
})));
|
|
1184
|
+
});
|
|
1185
|
+
//#endregion
|
|
1186
|
+
//#region src/elements/react/TyPageHeader.ts
|
|
1187
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
1188
|
+
const truthy$27 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
1189
|
+
const text$27 = (v) => truthy$27(v) ? String(v) : void 0;
|
|
1190
|
+
const filled$17 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
1191
|
+
const DEFAULTS$26 = {
|
|
1192
|
+
headingLevel: "1",
|
|
1193
|
+
scale: "page",
|
|
1194
|
+
titleLabel: "Page title"
|
|
1195
|
+
};
|
|
1196
|
+
const TyPageHeader = forwardRef(function TyPageHeader(props, ref) {
|
|
1197
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
1198
|
+
const handlers = useRef(props);
|
|
1199
|
+
handlers.current = props;
|
|
1200
|
+
const host = useRef(null);
|
|
1201
|
+
useImperativeHandle(ref, () => host.current);
|
|
1202
|
+
const p = {
|
|
1203
|
+
title: props.title,
|
|
1204
|
+
headingLevel: props.headingLevel ?? DEFAULTS$26.headingLevel,
|
|
1205
|
+
scale: props.scale ?? DEFAULTS$26.scale,
|
|
1206
|
+
eyebrow: props.eyebrow,
|
|
1207
|
+
summary: props.summary,
|
|
1208
|
+
editable: props.editable,
|
|
1209
|
+
value: props.value,
|
|
1210
|
+
titlePlaceholder: props.titlePlaceholder,
|
|
1211
|
+
titleLabel: props.titleLabel ?? DEFAULTS$26.titleLabel,
|
|
1212
|
+
headingId: props.headingId
|
|
1213
|
+
};
|
|
1214
|
+
const slots = {
|
|
1215
|
+
"breadcrumbs": filled$17(props.breadcrumbs),
|
|
1216
|
+
"icon": filled$17(props.icon),
|
|
1217
|
+
"meta": filled$17(props.meta),
|
|
1218
|
+
"actions": filled$17(props.actions),
|
|
1219
|
+
"error": filled$17(props.error),
|
|
1220
|
+
"default": filled$17(props.children)
|
|
1221
|
+
};
|
|
1222
|
+
return createElement("ty-page-header", {
|
|
1223
|
+
ref: host,
|
|
1224
|
+
id: props.id,
|
|
1225
|
+
className: props.className,
|
|
1226
|
+
"data-ty-instance": instance,
|
|
1227
|
+
"title": text$27(p.title),
|
|
1228
|
+
"heading-level": text$27(p.headingLevel),
|
|
1229
|
+
"scale": text$27(p.scale),
|
|
1230
|
+
"eyebrow": text$27(p.eyebrow),
|
|
1231
|
+
"summary": text$27(p.summary),
|
|
1232
|
+
"editable": truthy$27(p.editable) ? true : void 0,
|
|
1233
|
+
"value": text$27(p.value),
|
|
1234
|
+
"title-placeholder": text$27(p.titlePlaceholder),
|
|
1235
|
+
"title-label": text$27(p.titleLabel),
|
|
1236
|
+
"heading-id": text$27(p.headingId)
|
|
1237
|
+
}, createElement("div", {
|
|
1238
|
+
className: "ty-page-header",
|
|
1239
|
+
"data-scale": p.scale
|
|
1240
|
+
}, slots["breadcrumbs"] ? createElement("div", { className: "ty-page-header__breadcrumbs" }, props.breadcrumbs) : null, createElement("div", { className: "ty-page-header__row" }, slots["icon"] ? createElement("span", {
|
|
1241
|
+
className: "ty-page-header__icon",
|
|
1242
|
+
"aria-hidden": "true"
|
|
1243
|
+
}, props.icon) : null, createElement("div", { className: "ty-page-header__text" }, truthy$27(p.eyebrow) ? createElement("p", { className: "ty-page-header__eyebrow" }, text$27(p.eyebrow)) : null, !truthy$27(p.editable) && p.headingLevel === "1" ? createElement("h1", {
|
|
1244
|
+
className: "ty-page-header__title",
|
|
1245
|
+
id: text$27(p.headingId) ?? `${instance}-title`
|
|
1246
|
+
}, text$27(p.title)) : null, !truthy$27(p.editable) && p.headingLevel === "2" ? createElement("h2", {
|
|
1247
|
+
className: "ty-page-header__title",
|
|
1248
|
+
id: text$27(p.headingId) ?? `${instance}-title`
|
|
1249
|
+
}, text$27(p.title)) : null, !truthy$27(p.editable) && p.headingLevel === "3" ? createElement("h3", {
|
|
1250
|
+
className: "ty-page-header__title",
|
|
1251
|
+
id: text$27(p.headingId) ?? `${instance}-title`
|
|
1252
|
+
}, text$27(p.title)) : null, truthy$27(p.editable) && p.headingLevel === "1" ? createElement("h1", {
|
|
1253
|
+
className: "ty-heading ty-visually-hidden",
|
|
1254
|
+
id: text$27(p.headingId) ?? `${instance}-title`
|
|
1255
|
+
}, truthy$27(p.value) ? text$27(p.value) : null, !truthy$27(p.value) ? text$27(p.titlePlaceholder) : null) : null, truthy$27(p.editable) && p.headingLevel === "2" ? createElement("h2", {
|
|
1256
|
+
className: "ty-heading ty-visually-hidden",
|
|
1257
|
+
id: text$27(p.headingId) ?? `${instance}-title`
|
|
1258
|
+
}, truthy$27(p.value) ? text$27(p.value) : null, !truthy$27(p.value) ? text$27(p.titlePlaceholder) : null) : null, truthy$27(p.editable) && p.headingLevel === "3" ? createElement("h3", {
|
|
1259
|
+
className: "ty-heading ty-visually-hidden",
|
|
1260
|
+
id: text$27(p.headingId) ?? `${instance}-title`
|
|
1261
|
+
}, truthy$27(p.value) ? text$27(p.value) : null, !truthy$27(p.value) ? text$27(p.titlePlaceholder) : null) : null, truthy$27(p.editable) ? createElement("input", {
|
|
1262
|
+
className: "ty-page-header__title-input ty-page-header__title",
|
|
1263
|
+
"aria-label": p.titleLabel,
|
|
1264
|
+
placeholder: p.titlePlaceholder,
|
|
1265
|
+
"aria-invalid": slots["error"] ? "true" : void 0,
|
|
1266
|
+
"aria-describedby": [slots["error"] ? `${instance}-error` : ""].filter(Boolean).join(" ") || void 0,
|
|
1267
|
+
"data-invalid": slots["error"] ? "" : void 0,
|
|
1268
|
+
onTitleChange: (event) => handlers.current.onTitleChange?.({ value: event.currentTarget.value }, event)
|
|
1269
|
+
}) : null, truthy$27(p.editable) && slots["error"] ? createElement("p", {
|
|
1270
|
+
className: "ty-page-header__error",
|
|
1271
|
+
id: `${instance}-error`
|
|
1272
|
+
}, props.error) : null, truthy$27(p.summary) ? createElement("p", { className: "ty-page-header__summary" }, text$27(p.summary)) : null, slots["meta"] ? createElement("ul", { className: "ty-page-header__meta" }, props.meta) : null), slots["actions"] ? createElement("div", { className: "ty-page-header__actions" }, props.actions) : null), slots["default"] ? createElement("div", { className: "ty-page-header__extra" }, props.children) : null));
|
|
1273
|
+
});
|
|
1274
|
+
//#endregion
|
|
1275
|
+
//#region src/elements/react/TyProgressBar.ts
|
|
1276
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
1277
|
+
const truthy$26 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
1278
|
+
const text$26 = (v) => truthy$26(v) ? String(v) : void 0;
|
|
1279
|
+
const DEFAULTS$25 = {
|
|
1280
|
+
value: 0,
|
|
1281
|
+
minValue: 0,
|
|
1282
|
+
maxValue: 100,
|
|
1283
|
+
inProgressLabel: "In progress",
|
|
1284
|
+
tone: "accent",
|
|
1285
|
+
size: "regular"
|
|
1286
|
+
};
|
|
1287
|
+
const TyProgressBar = forwardRef(function TyProgressBar(props, ref) {
|
|
1288
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
1289
|
+
const handlers = useRef(props);
|
|
1290
|
+
handlers.current = props;
|
|
1291
|
+
const host = useRef(null);
|
|
1292
|
+
useImperativeHandle(ref, () => host.current);
|
|
1293
|
+
const p = {
|
|
1294
|
+
value: props.value ?? DEFAULTS$25.value,
|
|
1295
|
+
minValue: props.minValue ?? DEFAULTS$25.minValue,
|
|
1296
|
+
maxValue: props.maxValue ?? DEFAULTS$25.maxValue,
|
|
1297
|
+
label: props.label,
|
|
1298
|
+
accessibleLabel: props.accessibleLabel,
|
|
1299
|
+
valueLabel: props.valueLabel,
|
|
1300
|
+
showValue: props.showValue,
|
|
1301
|
+
indeterminate: props.indeterminate,
|
|
1302
|
+
inProgressLabel: props.inProgressLabel ?? DEFAULTS$25.inProgressLabel,
|
|
1303
|
+
tone: props.tone ?? DEFAULTS$25.tone,
|
|
1304
|
+
size: props.size ?? DEFAULTS$25.size
|
|
1305
|
+
};
|
|
1306
|
+
return createElement("ty-progress-bar", {
|
|
1307
|
+
ref: host,
|
|
1308
|
+
id: props.id,
|
|
1309
|
+
className: props.className,
|
|
1310
|
+
"data-ty-instance": instance,
|
|
1311
|
+
"value": text$26(p.value),
|
|
1312
|
+
"min-value": text$26(p.minValue),
|
|
1313
|
+
"max-value": text$26(p.maxValue),
|
|
1314
|
+
"label": text$26(p.label),
|
|
1315
|
+
"accessible-label": text$26(p.accessibleLabel),
|
|
1316
|
+
"value-label": text$26(p.valueLabel),
|
|
1317
|
+
"show-value": text$26(p.showValue),
|
|
1318
|
+
"indeterminate": truthy$26(p.indeterminate) ? true : void 0,
|
|
1319
|
+
"in-progress-label": text$26(p.inProgressLabel),
|
|
1320
|
+
"tone": text$26(p.tone),
|
|
1321
|
+
"size": text$26(p.size)
|
|
1322
|
+
}, createElement("div", {
|
|
1323
|
+
className: "ty-progress",
|
|
1324
|
+
role: "progressbar",
|
|
1325
|
+
"aria-labelledby": truthy$26(p.label) ? `${instance}-label` : void 0,
|
|
1326
|
+
"aria-label": !truthy$26(p.label) ? p.accessibleLabel : void 0,
|
|
1327
|
+
"aria-valuemin": p.minValue,
|
|
1328
|
+
"aria-valuemax": p.maxValue,
|
|
1329
|
+
"aria-valuenow": !truthy$26(p.indeterminate) ? p.value : void 0,
|
|
1330
|
+
"aria-valuetext": !truthy$26(p.indeterminate) ? p.valueLabel : void 0,
|
|
1331
|
+
"data-tone": p.tone,
|
|
1332
|
+
"data-size": p.size,
|
|
1333
|
+
"data-indeterminate": truthy$26(p.indeterminate) ? "" : void 0
|
|
1334
|
+
}, truthy$26(p.label) || truthy$26(p.indeterminate) || !(p.showValue === "false") ? createElement("div", { className: "ty-progress__header" }, truthy$26(p.label) ? createElement("span", {
|
|
1335
|
+
className: "ty-progress__label",
|
|
1336
|
+
id: `${instance}-label`
|
|
1337
|
+
}, text$26(p.label)) : null, truthy$26(p.indeterminate) || !(p.showValue === "false") ? createElement("span", { className: "ty-progress__value" }) : null) : null, createElement("div", {
|
|
1338
|
+
className: "ty-progress__track",
|
|
1339
|
+
"aria-hidden": "true"
|
|
1340
|
+
}, createElement("div", { className: "ty-progress__fill" }))));
|
|
1341
|
+
});
|
|
1342
|
+
//#endregion
|
|
1343
|
+
//#region src/elements/react/TySectionHeading.ts
|
|
1344
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
1345
|
+
const truthy$25 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
1346
|
+
const text$25 = (v) => truthy$25(v) ? String(v) : void 0;
|
|
1347
|
+
const filled$16 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
1348
|
+
const DEFAULTS$24 = { level: "2" };
|
|
1349
|
+
const TySectionHeading = forwardRef(function TySectionHeading(props, ref) {
|
|
1350
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
1351
|
+
const handlers = useRef(props);
|
|
1352
|
+
handlers.current = props;
|
|
1353
|
+
const host = useRef(null);
|
|
1354
|
+
useImperativeHandle(ref, () => host.current);
|
|
1355
|
+
const p = {
|
|
1356
|
+
title: props.title,
|
|
1357
|
+
level: props.level ?? DEFAULTS$24.level,
|
|
1358
|
+
subtitle: props.subtitle,
|
|
1359
|
+
truncate: props.truncate,
|
|
1360
|
+
headingId: props.headingId
|
|
1361
|
+
};
|
|
1362
|
+
const slots = {
|
|
1363
|
+
"icon": filled$16(props.icon),
|
|
1364
|
+
"trailing": filled$16(props.trailing),
|
|
1365
|
+
"default": filled$16(props.children)
|
|
1366
|
+
};
|
|
1367
|
+
return createElement("ty-section-heading", {
|
|
1368
|
+
ref: host,
|
|
1369
|
+
id: props.id,
|
|
1370
|
+
className: props.className,
|
|
1371
|
+
"data-ty-instance": instance,
|
|
1372
|
+
"title": text$25(p.title),
|
|
1373
|
+
"level": text$25(p.level),
|
|
1374
|
+
"subtitle": text$25(p.subtitle),
|
|
1375
|
+
"truncate": truthy$25(p.truncate) ? true : void 0,
|
|
1376
|
+
"heading-id": text$25(p.headingId)
|
|
1377
|
+
}, createElement("div", {
|
|
1378
|
+
className: "ty-section-heading",
|
|
1379
|
+
"data-level": p.level
|
|
1380
|
+
}, createElement("div", { className: "ty-section-heading__row" }, slots["icon"] ? createElement("span", {
|
|
1381
|
+
className: "ty-section-heading__icon",
|
|
1382
|
+
"aria-hidden": "true"
|
|
1383
|
+
}, props.icon) : null, createElement("div", { className: "ty-section-heading__text" }, p.level === "2" ? createElement("h2", {
|
|
1384
|
+
className: "ty-section-heading__title",
|
|
1385
|
+
id: text$25(p.headingId) ?? `${instance}-heading`,
|
|
1386
|
+
"data-truncate": truthy$25(p.truncate) ? "" : void 0,
|
|
1387
|
+
title: truthy$25(p.truncate) ? p.title : void 0
|
|
1388
|
+
}, text$25(p.title)) : null, p.level === "3" ? createElement("h3", {
|
|
1389
|
+
className: "ty-section-heading__title",
|
|
1390
|
+
id: text$25(p.headingId) ?? `${instance}-heading`,
|
|
1391
|
+
"data-truncate": truthy$25(p.truncate) ? "" : void 0,
|
|
1392
|
+
title: truthy$25(p.truncate) ? p.title : void 0
|
|
1393
|
+
}, text$25(p.title)) : null, p.level === "4" ? createElement("h4", {
|
|
1394
|
+
className: "ty-section-heading__title",
|
|
1395
|
+
id: text$25(p.headingId) ?? `${instance}-heading`,
|
|
1396
|
+
"data-truncate": truthy$25(p.truncate) ? "" : void 0,
|
|
1397
|
+
title: truthy$25(p.truncate) ? p.title : void 0
|
|
1398
|
+
}, text$25(p.title)) : null, truthy$25(p.subtitle) ? createElement("p", { className: "ty-section-heading__subtitle" }, text$25(p.subtitle)) : null), slots["trailing"] ? createElement("div", { className: "ty-section-heading__trailing" }, props.trailing) : null), slots["default"] ? createElement("div", { className: "ty-section-heading__extra" }, props.children) : null));
|
|
1399
|
+
});
|
|
1400
|
+
//#endregion
|
|
1401
|
+
//#region src/elements/react/TySegmentedControl.ts
|
|
1402
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
1403
|
+
const truthy$24 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
1404
|
+
const text$24 = (v) => truthy$24(v) ? String(v) : void 0;
|
|
1405
|
+
const DEFAULTS$23 = { size: "regular" };
|
|
1406
|
+
const TySegmentedControl = forwardRef(function TySegmentedControl(props, ref) {
|
|
1407
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
1408
|
+
const handlers = useRef(props);
|
|
1409
|
+
handlers.current = props;
|
|
1410
|
+
const host = useRef(null);
|
|
1411
|
+
useImperativeHandle(ref, () => host.current);
|
|
1412
|
+
useEffect(() => {
|
|
1413
|
+
const element = host.current;
|
|
1414
|
+
if (!element) return;
|
|
1415
|
+
const listeners = [["ty-change", (event) => handlers.current.onChange?.(event.detail)]];
|
|
1416
|
+
for (const [type, listener] of listeners) element.addEventListener(type, listener);
|
|
1417
|
+
return () => {
|
|
1418
|
+
for (const [type, listener] of listeners) element.removeEventListener(type, listener);
|
|
1419
|
+
};
|
|
1420
|
+
}, []);
|
|
1421
|
+
const p = {
|
|
1422
|
+
options: props.options,
|
|
1423
|
+
value: props.value,
|
|
1424
|
+
defaultValue: props.defaultValue,
|
|
1425
|
+
label: props.label,
|
|
1426
|
+
size: props.size ?? DEFAULTS$23.size,
|
|
1427
|
+
fullWidth: props.fullWidth,
|
|
1428
|
+
disabled: props.disabled,
|
|
1429
|
+
iconOnly: props.iconOnly
|
|
1430
|
+
};
|
|
1431
|
+
return createElement("ty-segmented-control", {
|
|
1432
|
+
ref: host,
|
|
1433
|
+
id: props.id,
|
|
1434
|
+
className: props.className,
|
|
1435
|
+
"data-ty-instance": instance,
|
|
1436
|
+
"options": text$24(p.options),
|
|
1437
|
+
"value": text$24(p.value),
|
|
1438
|
+
"default-value": text$24(p.defaultValue),
|
|
1439
|
+
"label": text$24(p.label),
|
|
1440
|
+
"size": text$24(p.size),
|
|
1441
|
+
"full-width": truthy$24(p.fullWidth) ? true : void 0,
|
|
1442
|
+
"disabled": truthy$24(p.disabled) ? true : void 0,
|
|
1443
|
+
"icon-only": truthy$24(p.iconOnly) ? true : void 0
|
|
1444
|
+
}, createElement("div", {
|
|
1445
|
+
className: "ty-segmented-control",
|
|
1446
|
+
role: "radiogroup",
|
|
1447
|
+
"aria-label": p.label,
|
|
1448
|
+
"aria-disabled": truthy$24(p.disabled) ? "true" : void 0,
|
|
1449
|
+
"data-size": p.size,
|
|
1450
|
+
"data-full-width": truthy$24(p.fullWidth) ? "" : void 0,
|
|
1451
|
+
"data-icon-only": truthy$24(p.iconOnly) ? "" : void 0,
|
|
1452
|
+
"data-disabled": truthy$24(p.disabled) ? "" : void 0
|
|
1453
|
+
}));
|
|
1454
|
+
});
|
|
1455
|
+
//#endregion
|
|
1456
|
+
//#region src/elements/react/TySkipLink.ts
|
|
1457
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
1458
|
+
const truthy$23 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
1459
|
+
const text$23 = (v) => truthy$23(v) ? String(v) : void 0;
|
|
1460
|
+
const DEFAULTS$22 = {
|
|
1461
|
+
targetId: "main-content",
|
|
1462
|
+
label: "Skip to main content"
|
|
1463
|
+
};
|
|
1464
|
+
const TySkipLink = forwardRef(function TySkipLink(props, ref) {
|
|
1465
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
1466
|
+
const handlers = useRef(props);
|
|
1467
|
+
handlers.current = props;
|
|
1468
|
+
const host = useRef(null);
|
|
1469
|
+
useImperativeHandle(ref, () => host.current);
|
|
1470
|
+
const p = {
|
|
1471
|
+
targetId: props.targetId ?? DEFAULTS$22.targetId,
|
|
1472
|
+
label: props.label ?? DEFAULTS$22.label
|
|
1473
|
+
};
|
|
1474
|
+
return createElement("ty-skip-link", {
|
|
1475
|
+
ref: host,
|
|
1476
|
+
id: props.id,
|
|
1477
|
+
className: props.className,
|
|
1478
|
+
"data-ty-instance": instance,
|
|
1479
|
+
"target-id": text$23(p.targetId),
|
|
1480
|
+
"label": text$23(p.label)
|
|
1481
|
+
}, createElement("a", {
|
|
1482
|
+
className: "ty-skip-link",
|
|
1483
|
+
onClick: (event) => handlers.current.onClick?.(event)
|
|
1484
|
+
}, text$23(p.label)));
|
|
1485
|
+
});
|
|
1486
|
+
//#endregion
|
|
1487
|
+
//#region src/elements/react/TyTabs.ts
|
|
1488
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
1489
|
+
const truthy$22 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
1490
|
+
const text$22 = (v) => truthy$22(v) ? String(v) : void 0;
|
|
1491
|
+
const DEFAULTS$21 = {
|
|
1492
|
+
orientation: "horizontal",
|
|
1493
|
+
activation: "automatic"
|
|
1494
|
+
};
|
|
1495
|
+
const TyTabs = forwardRef(function TyTabs(props, ref) {
|
|
1496
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
1497
|
+
const handlers = useRef(props);
|
|
1498
|
+
handlers.current = props;
|
|
1499
|
+
const host = useRef(null);
|
|
1500
|
+
useImperativeHandle(ref, () => host.current);
|
|
1501
|
+
useEffect(() => {
|
|
1502
|
+
const element = host.current;
|
|
1503
|
+
if (!element) return;
|
|
1504
|
+
const listeners = [["ty-selection-change", (event) => handlers.current.onSelectionChange?.(event.detail)]];
|
|
1505
|
+
for (const [type, listener] of listeners) element.addEventListener(type, listener);
|
|
1506
|
+
return () => {
|
|
1507
|
+
for (const [type, listener] of listeners) element.removeEventListener(type, listener);
|
|
1508
|
+
};
|
|
1509
|
+
}, []);
|
|
1510
|
+
const p = {
|
|
1511
|
+
selectedKey: props.selectedKey,
|
|
1512
|
+
defaultSelectedKey: props.defaultSelectedKey,
|
|
1513
|
+
orientation: props.orientation ?? DEFAULTS$21.orientation,
|
|
1514
|
+
activation: props.activation ?? DEFAULTS$21.activation,
|
|
1515
|
+
label: props.label,
|
|
1516
|
+
tabs: props.tabs,
|
|
1517
|
+
keepMounted: props.keepMounted
|
|
1518
|
+
};
|
|
1519
|
+
return createElement("ty-tabs", {
|
|
1520
|
+
ref: host,
|
|
1521
|
+
id: props.id,
|
|
1522
|
+
className: props.className,
|
|
1523
|
+
"data-ty-instance": instance,
|
|
1524
|
+
"selected-key": text$22(p.selectedKey),
|
|
1525
|
+
"default-selected-key": text$22(p.defaultSelectedKey),
|
|
1526
|
+
"orientation": text$22(p.orientation),
|
|
1527
|
+
"activation": text$22(p.activation),
|
|
1528
|
+
"label": text$22(p.label),
|
|
1529
|
+
"tabs": text$22(p.tabs),
|
|
1530
|
+
"keep-mounted": truthy$22(p.keepMounted) ? true : void 0
|
|
1531
|
+
}, createElement("div", {
|
|
1532
|
+
className: "ty-tabs",
|
|
1533
|
+
"data-orientation": p.orientation
|
|
1534
|
+
}, createElement("div", {
|
|
1535
|
+
className: "ty-tabs__list",
|
|
1536
|
+
role: "tablist",
|
|
1537
|
+
"aria-label": p.label,
|
|
1538
|
+
"aria-orientation": p.orientation,
|
|
1539
|
+
"data-orientation": p.orientation
|
|
1540
|
+
}), props.children));
|
|
1541
|
+
});
|
|
1542
|
+
//#endregion
|
|
1543
|
+
//#region src/elements/react/TyTagField.ts
|
|
1544
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
1545
|
+
const truthy$21 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
1546
|
+
const text$21 = (v) => truthy$21(v) ? String(v) : void 0;
|
|
1547
|
+
const DEFAULTS$20 = {
|
|
1548
|
+
tone: "neutral",
|
|
1549
|
+
removeLabel: "Remove {value}",
|
|
1550
|
+
chosenLabel: "{field}: chosen values",
|
|
1551
|
+
suggestionsLabel: "Suggestions"
|
|
1552
|
+
};
|
|
1553
|
+
const TyTagField = forwardRef(function TyTagField(props, ref) {
|
|
1554
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
1555
|
+
const handlers = useRef(props);
|
|
1556
|
+
handlers.current = props;
|
|
1557
|
+
const host = useRef(null);
|
|
1558
|
+
useImperativeHandle(ref, () => host.current);
|
|
1559
|
+
useEffect(() => {
|
|
1560
|
+
const element = host.current;
|
|
1561
|
+
if (!element) return;
|
|
1562
|
+
const listeners = [["ty-change", (event) => handlers.current.onChange?.(event.detail)]];
|
|
1563
|
+
for (const [type, listener] of listeners) element.addEventListener(type, listener);
|
|
1564
|
+
return () => {
|
|
1565
|
+
for (const [type, listener] of listeners) element.removeEventListener(type, listener);
|
|
1566
|
+
};
|
|
1567
|
+
}, []);
|
|
1568
|
+
const p = {
|
|
1569
|
+
value: props.value,
|
|
1570
|
+
suggestions: props.suggestions,
|
|
1571
|
+
suggestionLabels: props.suggestionLabels,
|
|
1572
|
+
allowFreeText: props.allowFreeText,
|
|
1573
|
+
max: props.max,
|
|
1574
|
+
disabled: props.disabled,
|
|
1575
|
+
tone: props.tone ?? DEFAULTS$20.tone,
|
|
1576
|
+
categoryIndex: props.categoryIndex,
|
|
1577
|
+
label: props.label,
|
|
1578
|
+
accessibleLabel: props.accessibleLabel,
|
|
1579
|
+
placeholder: props.placeholder,
|
|
1580
|
+
helperText: props.helperText,
|
|
1581
|
+
errorText: props.errorText,
|
|
1582
|
+
removeLabel: props.removeLabel ?? DEFAULTS$20.removeLabel,
|
|
1583
|
+
chosenLabel: props.chosenLabel ?? DEFAULTS$20.chosenLabel,
|
|
1584
|
+
suggestionsLabel: props.suggestionsLabel ?? DEFAULTS$20.suggestionsLabel,
|
|
1585
|
+
testId: props.testId
|
|
1586
|
+
};
|
|
1587
|
+
return createElement("ty-tag-field", {
|
|
1588
|
+
ref: host,
|
|
1589
|
+
id: props.id,
|
|
1590
|
+
className: props.className,
|
|
1591
|
+
"data-ty-instance": instance,
|
|
1592
|
+
"value": text$21(p.value),
|
|
1593
|
+
"suggestions": text$21(p.suggestions),
|
|
1594
|
+
"suggestion-labels": text$21(p.suggestionLabels),
|
|
1595
|
+
"allow-free-text": text$21(p.allowFreeText),
|
|
1596
|
+
"max": text$21(p.max),
|
|
1597
|
+
"disabled": truthy$21(p.disabled) ? true : void 0,
|
|
1598
|
+
"tone": text$21(p.tone),
|
|
1599
|
+
"category-index": text$21(p.categoryIndex),
|
|
1600
|
+
"label": text$21(p.label),
|
|
1601
|
+
"accessible-label": text$21(p.accessibleLabel),
|
|
1602
|
+
"placeholder": text$21(p.placeholder),
|
|
1603
|
+
"helper-text": text$21(p.helperText),
|
|
1604
|
+
"error-text": text$21(p.errorText),
|
|
1605
|
+
"remove-label": text$21(p.removeLabel),
|
|
1606
|
+
"chosen-label": text$21(p.chosenLabel),
|
|
1607
|
+
"suggestions-label": text$21(p.suggestionsLabel),
|
|
1608
|
+
"test-id": text$21(p.testId)
|
|
1609
|
+
});
|
|
1610
|
+
});
|
|
1611
|
+
//#endregion
|
|
1612
|
+
//#region src/elements/react/TyToast.ts
|
|
1613
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
1614
|
+
const truthy$20 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
1615
|
+
const text$20 = (v) => truthy$20(v) ? String(v) : void 0;
|
|
1616
|
+
const DEFAULTS$19 = {
|
|
1617
|
+
placement: "top-end",
|
|
1618
|
+
maxVisible: 3,
|
|
1619
|
+
historyLimit: 50,
|
|
1620
|
+
regionLabel: "Notifications",
|
|
1621
|
+
dismissLabel: "Dismiss notification"
|
|
1622
|
+
};
|
|
1623
|
+
const TyToast = forwardRef(function TyToast(props, ref) {
|
|
1624
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
1625
|
+
const handlers = useRef(props);
|
|
1626
|
+
handlers.current = props;
|
|
1627
|
+
const host = useRef(null);
|
|
1628
|
+
useImperativeHandle(ref, () => host.current);
|
|
1629
|
+
useEffect(() => {
|
|
1630
|
+
const element = host.current;
|
|
1631
|
+
if (!element) return;
|
|
1632
|
+
const listeners = [["ty-toast-dismiss", (event) => handlers.current.onDismiss?.(event.detail)], ["ty-toast-action", (event) => handlers.current.onAction?.(event.detail)]];
|
|
1633
|
+
for (const [type, listener] of listeners) element.addEventListener(type, listener);
|
|
1634
|
+
return () => {
|
|
1635
|
+
for (const [type, listener] of listeners) element.removeEventListener(type, listener);
|
|
1636
|
+
};
|
|
1637
|
+
}, []);
|
|
1638
|
+
const p = {
|
|
1639
|
+
placement: props.placement ?? DEFAULTS$19.placement,
|
|
1640
|
+
maxVisible: props.maxVisible ?? DEFAULTS$19.maxVisible,
|
|
1641
|
+
historyLimit: props.historyLimit ?? DEFAULTS$19.historyLimit,
|
|
1642
|
+
regionLabel: props.regionLabel ?? DEFAULTS$19.regionLabel,
|
|
1643
|
+
dismissLabel: props.dismissLabel ?? DEFAULTS$19.dismissLabel
|
|
1644
|
+
};
|
|
1645
|
+
return createElement("ty-toast", {
|
|
1646
|
+
ref: host,
|
|
1647
|
+
id: props.id,
|
|
1648
|
+
className: props.className,
|
|
1649
|
+
"data-ty-instance": instance,
|
|
1650
|
+
"placement": text$20(p.placement),
|
|
1651
|
+
"max-visible": text$20(p.maxVisible),
|
|
1652
|
+
"history-limit": text$20(p.historyLimit),
|
|
1653
|
+
"region-label": text$20(p.regionLabel),
|
|
1654
|
+
"dismiss-label": text$20(p.dismissLabel)
|
|
1655
|
+
});
|
|
1656
|
+
});
|
|
1657
|
+
//#endregion
|
|
1658
|
+
//#region src/elements/react/TyWheelPicker.ts
|
|
1659
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
1660
|
+
const truthy$19 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
1661
|
+
const text$19 = (v) => truthy$19(v) ? String(v) : void 0;
|
|
1662
|
+
const DEFAULTS$18 = { visibleRows: 5 };
|
|
1663
|
+
const TyWheelPicker = forwardRef(function TyWheelPicker(props, ref) {
|
|
1664
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
1665
|
+
const handlers = useRef(props);
|
|
1666
|
+
handlers.current = props;
|
|
1667
|
+
const host = useRef(null);
|
|
1668
|
+
useImperativeHandle(ref, () => host.current);
|
|
1669
|
+
useEffect(() => {
|
|
1670
|
+
const element = host.current;
|
|
1671
|
+
if (!element) return;
|
|
1672
|
+
const listeners = [["ty-change", (event) => handlers.current.onChange?.(event.detail)]];
|
|
1673
|
+
for (const [type, listener] of listeners) element.addEventListener(type, listener);
|
|
1674
|
+
return () => {
|
|
1675
|
+
for (const [type, listener] of listeners) element.removeEventListener(type, listener);
|
|
1676
|
+
};
|
|
1677
|
+
}, []);
|
|
1678
|
+
const p = {
|
|
1679
|
+
options: props.options,
|
|
1680
|
+
value: props.value,
|
|
1681
|
+
label: props.label,
|
|
1682
|
+
visibleRows: props.visibleRows ?? DEFAULTS$18.visibleRows,
|
|
1683
|
+
disabled: props.disabled,
|
|
1684
|
+
columns: props.columns,
|
|
1685
|
+
testId: props.testId
|
|
1686
|
+
};
|
|
1687
|
+
return createElement("ty-wheel-picker", {
|
|
1688
|
+
ref: host,
|
|
1689
|
+
id: props.id,
|
|
1690
|
+
className: props.className,
|
|
1691
|
+
"data-ty-instance": instance,
|
|
1692
|
+
"options": text$19(p.options),
|
|
1693
|
+
"value": text$19(p.value),
|
|
1694
|
+
"label": text$19(p.label),
|
|
1695
|
+
"visible-rows": text$19(p.visibleRows),
|
|
1696
|
+
"disabled": truthy$19(p.disabled) ? true : void 0,
|
|
1697
|
+
"columns": text$19(p.columns),
|
|
1698
|
+
"test-id": text$19(p.testId)
|
|
1699
|
+
});
|
|
1700
|
+
});
|
|
1701
|
+
//#endregion
|
|
1702
|
+
//#region src/elements/react/TyButton.ts
|
|
1703
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
1704
|
+
const truthy$18 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
1705
|
+
const text$18 = (v) => truthy$18(v) ? String(v) : void 0;
|
|
1706
|
+
const filled$15 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
1707
|
+
const DEFAULTS$17 = {
|
|
1708
|
+
variant: "secondary",
|
|
1709
|
+
size: "regular",
|
|
1710
|
+
shape: "rounded",
|
|
1711
|
+
type: "button"
|
|
1712
|
+
};
|
|
1713
|
+
const TyButton = forwardRef(function TyButton(props, ref) {
|
|
1714
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
1715
|
+
const handlers = useRef(props);
|
|
1716
|
+
handlers.current = props;
|
|
1717
|
+
const host = useRef(null);
|
|
1718
|
+
useImperativeHandle(ref, () => host.current);
|
|
1719
|
+
const p = {
|
|
1720
|
+
variant: props.variant ?? DEFAULTS$17.variant,
|
|
1721
|
+
size: props.size ?? DEFAULTS$17.size,
|
|
1722
|
+
shape: props.shape ?? DEFAULTS$17.shape,
|
|
1723
|
+
iconOnly: props.iconOnly,
|
|
1724
|
+
fullWidth: props.fullWidth,
|
|
1725
|
+
busy: props.busy,
|
|
1726
|
+
disabled: props.disabled,
|
|
1727
|
+
type: props.type ?? DEFAULTS$17.type,
|
|
1728
|
+
name: props.name,
|
|
1729
|
+
value: props.value,
|
|
1730
|
+
accessibleLabel: props.accessibleLabel,
|
|
1731
|
+
pressed: props.pressed,
|
|
1732
|
+
expanded: props.expanded,
|
|
1733
|
+
controls: props.controls,
|
|
1734
|
+
haspopup: props.haspopup,
|
|
1735
|
+
testId: props.testId
|
|
1736
|
+
};
|
|
1737
|
+
const slots = {
|
|
1738
|
+
"default": filled$15(props.children),
|
|
1739
|
+
"icon": filled$15(props.icon),
|
|
1740
|
+
"trailing-icon": filled$15(props.trailingIcon)
|
|
1741
|
+
};
|
|
1742
|
+
return createElement("ty-button", {
|
|
1743
|
+
ref: host,
|
|
1744
|
+
id: props.id,
|
|
1745
|
+
className: props.className,
|
|
1746
|
+
"data-ty-instance": instance,
|
|
1747
|
+
"variant": text$18(p.variant),
|
|
1748
|
+
"size": text$18(p.size),
|
|
1749
|
+
"shape": text$18(p.shape),
|
|
1750
|
+
"icon-only": truthy$18(p.iconOnly) ? true : void 0,
|
|
1751
|
+
"full-width": truthy$18(p.fullWidth) ? true : void 0,
|
|
1752
|
+
"busy": truthy$18(p.busy) ? true : void 0,
|
|
1753
|
+
"disabled": truthy$18(p.disabled) ? true : void 0,
|
|
1754
|
+
"type": text$18(p.type),
|
|
1755
|
+
"name": text$18(p.name),
|
|
1756
|
+
"value": text$18(p.value),
|
|
1757
|
+
"accessible-label": text$18(p.accessibleLabel),
|
|
1758
|
+
"pressed": text$18(p.pressed),
|
|
1759
|
+
"expanded": text$18(p.expanded),
|
|
1760
|
+
"controls": text$18(p.controls),
|
|
1761
|
+
"haspopup": text$18(p.haspopup),
|
|
1762
|
+
"test-id": text$18(p.testId)
|
|
1763
|
+
}, createElement("button", {
|
|
1764
|
+
className: "ty-button",
|
|
1765
|
+
type: p.type,
|
|
1766
|
+
name: p.name,
|
|
1767
|
+
value: p.value,
|
|
1768
|
+
disabled: truthy$18(p.disabled) || void 0,
|
|
1769
|
+
"aria-busy": truthy$18(p.busy) ? "true" : void 0,
|
|
1770
|
+
"aria-disabled": truthy$18(p.busy) ? "true" : void 0,
|
|
1771
|
+
"aria-label": p.accessibleLabel,
|
|
1772
|
+
"aria-pressed": p.pressed,
|
|
1773
|
+
"aria-expanded": p.expanded,
|
|
1774
|
+
"aria-controls": p.controls,
|
|
1775
|
+
"aria-haspopup": p.haspopup,
|
|
1776
|
+
"data-testid": p.testId,
|
|
1777
|
+
title: truthy$18(p.iconOnly) ? p.accessibleLabel : void 0,
|
|
1778
|
+
"data-variant": p.variant,
|
|
1779
|
+
"data-size": p.size,
|
|
1780
|
+
"data-shape": p.shape,
|
|
1781
|
+
"data-icon-only": truthy$18(p.iconOnly) ? "" : void 0,
|
|
1782
|
+
"data-full-width": truthy$18(p.fullWidth) ? "" : void 0,
|
|
1783
|
+
"data-busy": truthy$18(p.busy) ? "" : void 0,
|
|
1784
|
+
onClick: (event) => handlers.current.onClick?.(event)
|
|
1785
|
+
}, truthy$18(p.busy) ? createElement("span", {
|
|
1786
|
+
className: "ty-button__busy",
|
|
1787
|
+
"aria-hidden": "true"
|
|
1788
|
+
}) : null, !truthy$18(p.busy) && slots["icon"] ? createElement("span", {
|
|
1789
|
+
className: "ty-button__icon",
|
|
1790
|
+
"aria-hidden": "true"
|
|
1791
|
+
}, props.icon) : null, !truthy$18(p.iconOnly) ? createElement("span", { className: "ty-button__label" }, props.children) : null, !truthy$18(p.iconOnly) && slots["trailing-icon"] ? createElement("span", {
|
|
1792
|
+
className: "ty-button__icon",
|
|
1793
|
+
"aria-hidden": "true"
|
|
1794
|
+
}, props.trailingIcon) : null));
|
|
1795
|
+
});
|
|
1796
|
+
//#endregion
|
|
1797
|
+
//#region src/elements/react/TyCheckbox.ts
|
|
1798
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
1799
|
+
const truthy$17 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
1800
|
+
const text$17 = (v) => truthy$17(v) ? String(v) : void 0;
|
|
1801
|
+
const filled$14 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
1802
|
+
const DEFAULTS$16 = { appearance: "tile" };
|
|
1803
|
+
const TyCheckbox = forwardRef(function TyCheckbox(props, ref) {
|
|
1804
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
1805
|
+
const handlers = useRef(props);
|
|
1806
|
+
handlers.current = props;
|
|
1807
|
+
const host = useRef(null);
|
|
1808
|
+
useImperativeHandle(ref, () => host.current);
|
|
1809
|
+
const p = {
|
|
1810
|
+
checked: props.checked,
|
|
1811
|
+
indeterminate: props.indeterminate,
|
|
1812
|
+
disabled: props.disabled,
|
|
1813
|
+
required: props.required,
|
|
1814
|
+
name: props.name,
|
|
1815
|
+
value: props.value,
|
|
1816
|
+
appearance: props.appearance ?? DEFAULTS$16.appearance,
|
|
1817
|
+
accessibleLabel: props.accessibleLabel,
|
|
1818
|
+
testId: props.testId
|
|
1819
|
+
};
|
|
1820
|
+
const slots = {
|
|
1821
|
+
"default": filled$14(props.children),
|
|
1822
|
+
"description": filled$14(props.description),
|
|
1823
|
+
"error": filled$14(props.error)
|
|
1824
|
+
};
|
|
1825
|
+
return createElement("ty-checkbox", {
|
|
1826
|
+
ref: host,
|
|
1827
|
+
id: props.id,
|
|
1828
|
+
className: props.className,
|
|
1829
|
+
"data-ty-instance": instance,
|
|
1830
|
+
"checked": truthy$17(p.checked) ? true : void 0,
|
|
1831
|
+
"indeterminate": truthy$17(p.indeterminate) ? true : void 0,
|
|
1832
|
+
"disabled": truthy$17(p.disabled) ? true : void 0,
|
|
1833
|
+
"required": truthy$17(p.required) ? true : void 0,
|
|
1834
|
+
"name": text$17(p.name),
|
|
1835
|
+
"value": text$17(p.value),
|
|
1836
|
+
"appearance": text$17(p.appearance),
|
|
1837
|
+
"accessible-label": text$17(p.accessibleLabel),
|
|
1838
|
+
"test-id": text$17(p.testId)
|
|
1839
|
+
}, createElement("div", {
|
|
1840
|
+
className: "ty-checkbox",
|
|
1841
|
+
"data-appearance": p.appearance
|
|
1842
|
+
}, createElement("label", {
|
|
1843
|
+
className: "ty-checkbox__row",
|
|
1844
|
+
"data-selected": truthy$17(p.checked) ? "" : void 0,
|
|
1845
|
+
"data-indeterminate": truthy$17(p.indeterminate) ? "" : void 0,
|
|
1846
|
+
"data-disabled": truthy$17(p.disabled) ? "" : void 0
|
|
1847
|
+
}, createElement("input", {
|
|
1848
|
+
className: "ty-visually-hidden",
|
|
1849
|
+
type: "checkbox",
|
|
1850
|
+
name: p.name,
|
|
1851
|
+
value: p.value,
|
|
1852
|
+
checked: Boolean(p.checked),
|
|
1853
|
+
disabled: truthy$17(p.disabled) || void 0,
|
|
1854
|
+
required: truthy$17(p.required) || void 0,
|
|
1855
|
+
"aria-label": !slots["default"] ? p.accessibleLabel : void 0,
|
|
1856
|
+
"aria-labelledby": slots["default"] ? `${instance}-label` : void 0,
|
|
1857
|
+
"aria-describedby": slots["description"] ? `${instance}-description` : void 0,
|
|
1858
|
+
"aria-invalid": slots["error"] ? "true" : void 0,
|
|
1859
|
+
"aria-errormessage": slots["error"] ? `${instance}-error` : void 0,
|
|
1860
|
+
"data-testid": p.testId,
|
|
1861
|
+
onChange: (event) => handlers.current.onChange?.({ checked: event.currentTarget.checked }, event)
|
|
1862
|
+
}), createElement("span", {
|
|
1863
|
+
className: "ty-checkbox__indicator",
|
|
1864
|
+
"aria-hidden": "true"
|
|
1865
|
+
}, createElement("svg", {
|
|
1866
|
+
className: "ty-icon",
|
|
1867
|
+
viewBox: "0 0 24 24",
|
|
1868
|
+
fill: "none",
|
|
1869
|
+
stroke: "currentColor",
|
|
1870
|
+
strokeWidth: "2",
|
|
1871
|
+
strokeLinecap: "round",
|
|
1872
|
+
strokeLinejoin: "round",
|
|
1873
|
+
"aria-hidden": "true",
|
|
1874
|
+
focusable: "false"
|
|
1875
|
+
}, createElement("path", {
|
|
1876
|
+
className: "ty-checkbox__check",
|
|
1877
|
+
d: "M20 6 9 17l-5-5"
|
|
1878
|
+
}), createElement("path", {
|
|
1879
|
+
className: "ty-checkbox__minus",
|
|
1880
|
+
d: "M5 12h14"
|
|
1881
|
+
}))), slots["default"] || slots["description"] ? createElement("span", { className: "ty-checkbox__text" }, slots["default"] ? createElement("span", {
|
|
1882
|
+
className: "ty-checkbox__label",
|
|
1883
|
+
id: `${instance}-label`
|
|
1884
|
+
}, props.children) : null, slots["description"] ? createElement("span", {
|
|
1885
|
+
className: "ty-checkbox__description",
|
|
1886
|
+
id: `${instance}-description`
|
|
1887
|
+
}, props.description) : null) : null), slots["error"] ? createElement("p", {
|
|
1888
|
+
className: "ty-checkbox__error",
|
|
1889
|
+
id: `${instance}-error`,
|
|
1890
|
+
"aria-live": "polite"
|
|
1891
|
+
}, createElement("svg", {
|
|
1892
|
+
className: "ty-icon",
|
|
1893
|
+
viewBox: "0 0 24 24",
|
|
1894
|
+
fill: "none",
|
|
1895
|
+
stroke: "currentColor",
|
|
1896
|
+
strokeWidth: "2",
|
|
1897
|
+
strokeLinecap: "round",
|
|
1898
|
+
strokeLinejoin: "round",
|
|
1899
|
+
"aria-hidden": "true",
|
|
1900
|
+
focusable: "false"
|
|
1901
|
+
}, createElement("path", {
|
|
1902
|
+
className: "ty-checkbox__error-glyph",
|
|
1903
|
+
d: "M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20ZM12 8v4M12 16h.01"
|
|
1904
|
+
})), createElement("span", { className: "ty-checkbox__error-text" }, props.error)) : null));
|
|
1905
|
+
});
|
|
1906
|
+
//#endregion
|
|
1907
|
+
//#region src/elements/react/TyDrawer.ts
|
|
1908
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
1909
|
+
const truthy$16 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
1910
|
+
const text$16 = (v) => truthy$16(v) ? String(v) : void 0;
|
|
1911
|
+
const filled$13 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
1912
|
+
const DEFAULTS$15 = {
|
|
1913
|
+
placement: "bottom",
|
|
1914
|
+
width: "medium",
|
|
1915
|
+
closeLabel: "Close"
|
|
1916
|
+
};
|
|
1917
|
+
const TyDrawer = forwardRef(function TyDrawer(props, ref) {
|
|
1918
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
1919
|
+
const handlers = useRef(props);
|
|
1920
|
+
handlers.current = props;
|
|
1921
|
+
const host = useRef(null);
|
|
1922
|
+
useImperativeHandle(ref, () => host.current);
|
|
1923
|
+
useEffect(() => {
|
|
1924
|
+
const element = host.current;
|
|
1925
|
+
if (!element) return;
|
|
1926
|
+
const listeners = [["ty-open-change", (event) => handlers.current.onOpenChange?.(event.detail)]];
|
|
1927
|
+
for (const [type, listener] of listeners) element.addEventListener(type, listener);
|
|
1928
|
+
return () => {
|
|
1929
|
+
for (const [type, listener] of listeners) element.removeEventListener(type, listener);
|
|
1930
|
+
};
|
|
1931
|
+
}, []);
|
|
1932
|
+
const p = {
|
|
1933
|
+
open: props.open,
|
|
1934
|
+
placement: props.placement ?? DEFAULTS$15.placement,
|
|
1935
|
+
width: props.width ?? DEFAULTS$15.width,
|
|
1936
|
+
maxHeight: props.maxHeight,
|
|
1937
|
+
showHandle: props.showHandle,
|
|
1938
|
+
dismissible: props.dismissible,
|
|
1939
|
+
closeLabel: props.closeLabel ?? DEFAULTS$15.closeLabel,
|
|
1940
|
+
accessibleLabel: props.accessibleLabel,
|
|
1941
|
+
panelTestId: props.panelTestId,
|
|
1942
|
+
backdropTestId: props.backdropTestId
|
|
1943
|
+
};
|
|
1944
|
+
const slots = {
|
|
1945
|
+
"title": filled$13(props.title),
|
|
1946
|
+
"default": filled$13(props.children)
|
|
1947
|
+
};
|
|
1948
|
+
return createElement("ty-drawer", {
|
|
1949
|
+
ref: host,
|
|
1950
|
+
id: props.id,
|
|
1951
|
+
className: props.className,
|
|
1952
|
+
"data-ty-instance": instance,
|
|
1953
|
+
"open": truthy$16(p.open) ? true : void 0,
|
|
1954
|
+
"placement": text$16(p.placement),
|
|
1955
|
+
"width": text$16(p.width),
|
|
1956
|
+
"max-height": text$16(p.maxHeight),
|
|
1957
|
+
"show-handle": text$16(p.showHandle),
|
|
1958
|
+
"dismissible": text$16(p.dismissible),
|
|
1959
|
+
"close-label": text$16(p.closeLabel),
|
|
1960
|
+
"accessible-label": text$16(p.accessibleLabel),
|
|
1961
|
+
"panel-test-id": text$16(p.panelTestId),
|
|
1962
|
+
"backdrop-test-id": text$16(p.backdropTestId)
|
|
1963
|
+
}, createElement("div", {
|
|
1964
|
+
className: "ty-drawer__backdrop",
|
|
1965
|
+
hidden: !truthy$16(p.open) ? true : void 0,
|
|
1966
|
+
"data-placement": p.placement,
|
|
1967
|
+
"data-testid": p.backdropTestId
|
|
1968
|
+
}, createElement("div", {
|
|
1969
|
+
className: "ty-drawer",
|
|
1970
|
+
"data-placement": p.placement,
|
|
1971
|
+
"data-width": p.width
|
|
1972
|
+
}, createElement("div", {
|
|
1973
|
+
className: "ty-drawer__dialog",
|
|
1974
|
+
role: "dialog",
|
|
1975
|
+
"aria-modal": "true",
|
|
1976
|
+
tabIndex: "-1",
|
|
1977
|
+
"aria-labelledby": slots["title"] ? `${instance}-title` : void 0,
|
|
1978
|
+
"aria-label": !slots["title"] ? p.accessibleLabel : void 0,
|
|
1979
|
+
"data-testid": p.panelTestId
|
|
1980
|
+
}, createElement("header", { className: "ty-drawer__header" }, p.placement === "bottom" && !(p.showHandle === "false") ? createElement("span", {
|
|
1981
|
+
className: "ty-drawer__handle",
|
|
1982
|
+
"aria-hidden": "true"
|
|
1983
|
+
}) : null, slots["title"] ? createElement("h2", {
|
|
1984
|
+
className: "ty-drawer__title",
|
|
1985
|
+
id: `${instance}-title`
|
|
1986
|
+
}, props.title) : null, createElement("button", {
|
|
1987
|
+
className: "ty-button ty-drawer__close",
|
|
1988
|
+
type: "button",
|
|
1989
|
+
"aria-label": p.closeLabel,
|
|
1990
|
+
title: p.closeLabel,
|
|
1991
|
+
"data-variant": "quiet",
|
|
1992
|
+
"data-size": "compact",
|
|
1993
|
+
"data-shape": "circle",
|
|
1994
|
+
"data-icon-only": ""
|
|
1995
|
+
}, createElement("span", {
|
|
1996
|
+
className: "ty-button__icon",
|
|
1997
|
+
"aria-hidden": "true"
|
|
1998
|
+
}, createElement("svg", {
|
|
1999
|
+
className: "ty-icon",
|
|
2000
|
+
viewBox: "0 0 24 24",
|
|
2001
|
+
fill: "none",
|
|
2002
|
+
stroke: "currentColor",
|
|
2003
|
+
strokeWidth: "2",
|
|
2004
|
+
strokeLinecap: "round",
|
|
2005
|
+
strokeLinejoin: "round",
|
|
2006
|
+
"aria-hidden": "true",
|
|
2007
|
+
focusable: "false"
|
|
2008
|
+
}, createElement("path", {
|
|
2009
|
+
className: "ty-drawer__glyph",
|
|
2010
|
+
d: "M18 6 6 18"
|
|
2011
|
+
}), createElement("path", {
|
|
2012
|
+
className: "ty-drawer__glyph",
|
|
2013
|
+
d: "m6 6 12 12"
|
|
2014
|
+
}))))), slots["default"] ? createElement("div", { className: "ty-drawer__body" }, props.children) : null, p.placement === "bottom" ? createElement("div", {
|
|
2015
|
+
className: "ty-drawer__inset",
|
|
2016
|
+
"aria-hidden": "true"
|
|
2017
|
+
}) : null))));
|
|
2018
|
+
});
|
|
2019
|
+
//#endregion
|
|
2020
|
+
//#region src/elements/react/TyGradientMark.ts
|
|
2021
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
2022
|
+
const truthy$15 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2023
|
+
const text$15 = (v) => truthy$15(v) ? String(v) : void 0;
|
|
2024
|
+
const filled$12 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2025
|
+
const DEFAULTS$14 = { size: "medium" };
|
|
2026
|
+
const TyGradientMark = forwardRef(function TyGradientMark(props, ref) {
|
|
2027
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
2028
|
+
const handlers = useRef(props);
|
|
2029
|
+
handlers.current = props;
|
|
2030
|
+
const host = useRef(null);
|
|
2031
|
+
useImperativeHandle(ref, () => host.current);
|
|
2032
|
+
const p = {
|
|
2033
|
+
label: props.label,
|
|
2034
|
+
size: props.size ?? DEFAULTS$14.size,
|
|
2035
|
+
gradient: props.gradient,
|
|
2036
|
+
radius: props.radius,
|
|
2037
|
+
testId: props.testId
|
|
2038
|
+
};
|
|
2039
|
+
const slots = { "default": filled$12(props.children) };
|
|
2040
|
+
return createElement("ty-gradient-mark", {
|
|
2041
|
+
ref: host,
|
|
2042
|
+
id: props.id,
|
|
2043
|
+
className: props.className,
|
|
2044
|
+
"data-ty-instance": instance,
|
|
2045
|
+
"label": text$15(p.label),
|
|
2046
|
+
"size": text$15(p.size),
|
|
2047
|
+
"gradient": text$15(p.gradient),
|
|
2048
|
+
"radius": text$15(p.radius),
|
|
2049
|
+
"test-id": text$15(p.testId)
|
|
2050
|
+
}, createElement("span", {
|
|
2051
|
+
className: "ty-gradient-mark",
|
|
2052
|
+
role: truthy$15(p.label) ? "img" : void 0,
|
|
2053
|
+
"aria-label": p.label,
|
|
2054
|
+
"aria-hidden": !truthy$15(p.label) ? "true" : void 0,
|
|
2055
|
+
"data-size": p.size,
|
|
2056
|
+
"data-testid": p.testId
|
|
2057
|
+
}, slots["default"] ? createElement("span", {
|
|
2058
|
+
className: "ty-gradient-mark__glyph",
|
|
2059
|
+
"aria-hidden": "true"
|
|
2060
|
+
}, props.children) : null));
|
|
2061
|
+
});
|
|
2062
|
+
//#endregion
|
|
2063
|
+
//#region src/elements/react/TyInlineNotice.ts
|
|
2064
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
2065
|
+
const truthy$14 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2066
|
+
const text$14 = (v) => truthy$14(v) ? String(v) : void 0;
|
|
2067
|
+
const filled$11 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2068
|
+
const DEFAULTS$13 = {
|
|
2069
|
+
tone: "info",
|
|
2070
|
+
align: "start",
|
|
2071
|
+
titleAs: "p",
|
|
2072
|
+
dismissLabel: "Dismiss",
|
|
2073
|
+
toneWordDanger: "Error: ",
|
|
2074
|
+
toneWordWarning: "Warning: ",
|
|
2075
|
+
toneWordInfo: "Information: ",
|
|
2076
|
+
toneWordSuccess: "Success: "
|
|
2077
|
+
};
|
|
2078
|
+
const TyInlineNotice = forwardRef(function TyInlineNotice(props, ref) {
|
|
2079
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
2080
|
+
const handlers = useRef(props);
|
|
2081
|
+
handlers.current = props;
|
|
2082
|
+
const host = useRef(null);
|
|
2083
|
+
useImperativeHandle(ref, () => host.current);
|
|
2084
|
+
useEffect(() => {
|
|
2085
|
+
const element = host.current;
|
|
2086
|
+
if (!element) return;
|
|
2087
|
+
const listeners = [["ty-dismiss", () => handlers.current.onDismiss?.()]];
|
|
2088
|
+
for (const [type, listener] of listeners) element.addEventListener(type, listener);
|
|
2089
|
+
return () => {
|
|
2090
|
+
for (const [type, listener] of listeners) element.removeEventListener(type, listener);
|
|
2091
|
+
};
|
|
2092
|
+
}, []);
|
|
2093
|
+
const p = {
|
|
2094
|
+
tone: props.tone ?? DEFAULTS$13.tone,
|
|
2095
|
+
align: props.align ?? DEFAULTS$13.align,
|
|
2096
|
+
urgency: props.urgency,
|
|
2097
|
+
titleAs: props.titleAs ?? DEFAULTS$13.titleAs,
|
|
2098
|
+
dismissible: props.dismissible,
|
|
2099
|
+
dismissLabel: props.dismissLabel ?? DEFAULTS$13.dismissLabel,
|
|
2100
|
+
toneWordDanger: props.toneWordDanger ?? DEFAULTS$13.toneWordDanger,
|
|
2101
|
+
toneWordWarning: props.toneWordWarning ?? DEFAULTS$13.toneWordWarning,
|
|
2102
|
+
toneWordInfo: props.toneWordInfo ?? DEFAULTS$13.toneWordInfo,
|
|
2103
|
+
toneWordSuccess: props.toneWordSuccess ?? DEFAULTS$13.toneWordSuccess
|
|
2104
|
+
};
|
|
2105
|
+
const slots = {
|
|
2106
|
+
"default": filled$11(props.children),
|
|
2107
|
+
"title": filled$11(props.title),
|
|
2108
|
+
"icon": filled$11(props.icon),
|
|
2109
|
+
"actions": filled$11(props.actions)
|
|
2110
|
+
};
|
|
2111
|
+
return createElement("ty-inline-notice", {
|
|
2112
|
+
ref: host,
|
|
2113
|
+
id: props.id,
|
|
2114
|
+
className: props.className,
|
|
2115
|
+
"data-ty-instance": instance,
|
|
2116
|
+
"tone": text$14(p.tone),
|
|
2117
|
+
"align": text$14(p.align),
|
|
2118
|
+
"urgency": text$14(p.urgency),
|
|
2119
|
+
"title-as": text$14(p.titleAs),
|
|
2120
|
+
"dismissible": truthy$14(p.dismissible) ? true : void 0,
|
|
2121
|
+
"dismiss-label": text$14(p.dismissLabel),
|
|
2122
|
+
"tone-word-danger": text$14(p.toneWordDanger),
|
|
2123
|
+
"tone-word-warning": text$14(p.toneWordWarning),
|
|
2124
|
+
"tone-word-info": text$14(p.toneWordInfo),
|
|
2125
|
+
"tone-word-success": text$14(p.toneWordSuccess)
|
|
2126
|
+
}, createElement("div", {
|
|
2127
|
+
className: "ty-notice",
|
|
2128
|
+
role: truthy$14(p.urgency) ? {
|
|
2129
|
+
"assertive": "alert",
|
|
2130
|
+
"polite": "status"
|
|
2131
|
+
}[String(p.urgency)] : {
|
|
2132
|
+
"danger": "alert",
|
|
2133
|
+
"warning": "alert",
|
|
2134
|
+
"info": "status",
|
|
2135
|
+
"success": "status"
|
|
2136
|
+
}[String(p.tone)],
|
|
2137
|
+
"data-tone": p.tone,
|
|
2138
|
+
"data-align": p.align
|
|
2139
|
+
}, createElement("span", {
|
|
2140
|
+
className: "ty-notice__icon",
|
|
2141
|
+
"aria-hidden": "true"
|
|
2142
|
+
}, !slots["icon"] && p.tone === "danger" ? createElement("svg", {
|
|
2143
|
+
className: "ty-icon",
|
|
2144
|
+
viewBox: "0 0 24 24",
|
|
2145
|
+
fill: "none",
|
|
2146
|
+
stroke: "currentColor",
|
|
2147
|
+
strokeWidth: "2",
|
|
2148
|
+
strokeLinecap: "round",
|
|
2149
|
+
strokeLinejoin: "round",
|
|
2150
|
+
"aria-hidden": "true",
|
|
2151
|
+
focusable: "false"
|
|
2152
|
+
}, createElement("circle", {
|
|
2153
|
+
className: "ty-notice__glyph",
|
|
2154
|
+
cx: "12",
|
|
2155
|
+
cy: "12",
|
|
2156
|
+
r: "10"
|
|
2157
|
+
}), createElement("line", {
|
|
2158
|
+
className: "ty-notice__glyph",
|
|
2159
|
+
x1: "12",
|
|
2160
|
+
x2: "12",
|
|
2161
|
+
y1: "8",
|
|
2162
|
+
y2: "12"
|
|
2163
|
+
}), createElement("line", {
|
|
2164
|
+
className: "ty-notice__glyph",
|
|
2165
|
+
x1: "12",
|
|
2166
|
+
x2: "12.01",
|
|
2167
|
+
y1: "16",
|
|
2168
|
+
y2: "16"
|
|
2169
|
+
})) : null, !slots["icon"] && p.tone === "warning" ? createElement("svg", {
|
|
2170
|
+
className: "ty-icon",
|
|
2171
|
+
viewBox: "0 0 24 24",
|
|
2172
|
+
fill: "none",
|
|
2173
|
+
stroke: "currentColor",
|
|
2174
|
+
strokeWidth: "2",
|
|
2175
|
+
strokeLinecap: "round",
|
|
2176
|
+
strokeLinejoin: "round",
|
|
2177
|
+
"aria-hidden": "true",
|
|
2178
|
+
focusable: "false"
|
|
2179
|
+
}, createElement("path", {
|
|
2180
|
+
className: "ty-notice__glyph",
|
|
2181
|
+
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"
|
|
2182
|
+
}), createElement("path", {
|
|
2183
|
+
className: "ty-notice__glyph",
|
|
2184
|
+
d: "M12 9v4"
|
|
2185
|
+
}), createElement("path", {
|
|
2186
|
+
className: "ty-notice__glyph",
|
|
2187
|
+
d: "M12 17h.01"
|
|
2188
|
+
})) : null, !slots["icon"] && p.tone === "info" ? createElement("svg", {
|
|
2189
|
+
className: "ty-icon",
|
|
2190
|
+
viewBox: "0 0 24 24",
|
|
2191
|
+
fill: "none",
|
|
2192
|
+
stroke: "currentColor",
|
|
2193
|
+
strokeWidth: "2",
|
|
2194
|
+
strokeLinecap: "round",
|
|
2195
|
+
strokeLinejoin: "round",
|
|
2196
|
+
"aria-hidden": "true",
|
|
2197
|
+
focusable: "false"
|
|
2198
|
+
}, createElement("circle", {
|
|
2199
|
+
className: "ty-notice__glyph",
|
|
2200
|
+
cx: "12",
|
|
2201
|
+
cy: "12",
|
|
2202
|
+
r: "10"
|
|
2203
|
+
}), createElement("path", {
|
|
2204
|
+
className: "ty-notice__glyph",
|
|
2205
|
+
d: "M12 16v-4"
|
|
2206
|
+
}), createElement("path", {
|
|
2207
|
+
className: "ty-notice__glyph",
|
|
2208
|
+
d: "M12 8h.01"
|
|
2209
|
+
})) : null, !slots["icon"] && p.tone === "success" ? createElement("svg", {
|
|
2210
|
+
className: "ty-icon",
|
|
2211
|
+
viewBox: "0 0 24 24",
|
|
2212
|
+
fill: "none",
|
|
2213
|
+
stroke: "currentColor",
|
|
2214
|
+
strokeWidth: "2",
|
|
2215
|
+
strokeLinecap: "round",
|
|
2216
|
+
strokeLinejoin: "round",
|
|
2217
|
+
"aria-hidden": "true",
|
|
2218
|
+
focusable: "false"
|
|
2219
|
+
}, createElement("circle", {
|
|
2220
|
+
className: "ty-notice__glyph",
|
|
2221
|
+
cx: "12",
|
|
2222
|
+
cy: "12",
|
|
2223
|
+
r: "10"
|
|
2224
|
+
}), createElement("path", {
|
|
2225
|
+
className: "ty-notice__glyph",
|
|
2226
|
+
d: "m16 9-5.5 5.5L8 12"
|
|
2227
|
+
})) : null, slots["icon"] ? props.icon : null), createElement("div", { className: "ty-notice__body" }, slots["title"] && p.titleAs === "p" ? createElement("p", { className: "ty-notice__title" }, p.tone === "danger" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordDanger)) : null, p.tone === "warning" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordWarning)) : null, p.tone === "info" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordInfo)) : null, p.tone === "success" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordSuccess)) : null, props.title) : null, slots["title"] && p.titleAs === "h2" ? createElement("h2", { className: "ty-notice__title" }, p.tone === "danger" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordDanger)) : null, p.tone === "warning" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordWarning)) : null, p.tone === "info" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordInfo)) : null, p.tone === "success" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordSuccess)) : null, props.title) : null, slots["title"] && p.titleAs === "h3" ? createElement("h3", { className: "ty-notice__title" }, p.tone === "danger" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordDanger)) : null, p.tone === "warning" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordWarning)) : null, p.tone === "info" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordInfo)) : null, p.tone === "success" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordSuccess)) : null, props.title) : null, slots["title"] && p.titleAs === "h4" ? createElement("h4", { className: "ty-notice__title" }, p.tone === "danger" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordDanger)) : null, p.tone === "warning" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordWarning)) : null, p.tone === "info" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordInfo)) : null, p.tone === "success" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordSuccess)) : null, props.title) : null, createElement("div", { className: "ty-notice__message" }, !slots["title"] && p.tone === "danger" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordDanger)) : null, !slots["title"] && p.tone === "warning" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordWarning)) : null, !slots["title"] && p.tone === "info" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordInfo)) : null, !slots["title"] && p.tone === "success" ? createElement("span", { className: "ty-visually-hidden" }, text$14(p.toneWordSuccess)) : null, props.children), slots["actions"] ? createElement("div", { className: "ty-notice__actions" }, props.actions) : null), truthy$14(p.dismissible) ? createElement("button", {
|
|
2228
|
+
className: "ty-button ty-notice__dismiss",
|
|
2229
|
+
type: "button",
|
|
2230
|
+
"data-variant": "quiet",
|
|
2231
|
+
"data-size": "compact",
|
|
2232
|
+
"data-icon-only": "",
|
|
2233
|
+
"aria-label": p.dismissLabel
|
|
2234
|
+
}, createElement("span", {
|
|
2235
|
+
className: "ty-button__icon",
|
|
2236
|
+
"aria-hidden": "true"
|
|
2237
|
+
}, createElement("svg", {
|
|
2238
|
+
className: "ty-icon",
|
|
2239
|
+
viewBox: "0 0 24 24",
|
|
2240
|
+
fill: "none",
|
|
2241
|
+
stroke: "currentColor",
|
|
2242
|
+
strokeWidth: "2",
|
|
2243
|
+
strokeLinecap: "round",
|
|
2244
|
+
strokeLinejoin: "round",
|
|
2245
|
+
"aria-hidden": "true",
|
|
2246
|
+
focusable: "false"
|
|
2247
|
+
}, createElement("path", {
|
|
2248
|
+
className: "ty-notice__glyph",
|
|
2249
|
+
d: "M18 6 6 18"
|
|
2250
|
+
}), createElement("path", {
|
|
2251
|
+
className: "ty-notice__glyph",
|
|
2252
|
+
d: "m6 6 12 12"
|
|
2253
|
+
})))) : null));
|
|
2254
|
+
});
|
|
2255
|
+
//#endregion
|
|
2256
|
+
//#region src/elements/react/TyLink.ts
|
|
2257
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
2258
|
+
const truthy$13 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2259
|
+
const text$13 = (v) => truthy$13(v) ? String(v) : void 0;
|
|
2260
|
+
const DEFAULTS$12 = {
|
|
2261
|
+
emphasis: "underlined",
|
|
2262
|
+
newTabLabel: "(opens in a new tab)"
|
|
2263
|
+
};
|
|
2264
|
+
const TyLink = forwardRef(function TyLink(props, ref) {
|
|
2265
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
2266
|
+
const handlers = useRef(props);
|
|
2267
|
+
handlers.current = props;
|
|
2268
|
+
const host = useRef(null);
|
|
2269
|
+
useImperativeHandle(ref, () => host.current);
|
|
2270
|
+
const p = {
|
|
2271
|
+
href: props.href,
|
|
2272
|
+
emphasis: props.emphasis ?? DEFAULTS$12.emphasis,
|
|
2273
|
+
external: props.external,
|
|
2274
|
+
current: props.current,
|
|
2275
|
+
standalone: props.standalone,
|
|
2276
|
+
newTabLabel: props.newTabLabel ?? DEFAULTS$12.newTabLabel,
|
|
2277
|
+
accessibleLabel: props.accessibleLabel,
|
|
2278
|
+
describedBy: props.describedBy
|
|
2279
|
+
};
|
|
2280
|
+
return createElement("ty-link", {
|
|
2281
|
+
ref: host,
|
|
2282
|
+
id: props.id,
|
|
2283
|
+
className: props.className,
|
|
2284
|
+
"data-ty-instance": instance,
|
|
2285
|
+
"href": text$13(p.href),
|
|
2286
|
+
"emphasis": text$13(p.emphasis),
|
|
2287
|
+
"external": truthy$13(p.external) ? true : void 0,
|
|
2288
|
+
"current": truthy$13(p.current) ? true : void 0,
|
|
2289
|
+
"standalone": truthy$13(p.standalone) ? true : void 0,
|
|
2290
|
+
"new-tab-label": text$13(p.newTabLabel),
|
|
2291
|
+
"accessible-label": text$13(p.accessibleLabel),
|
|
2292
|
+
"described-by": text$13(p.describedBy)
|
|
2293
|
+
}, createElement("a", {
|
|
2294
|
+
className: "ty-link",
|
|
2295
|
+
href: p.href,
|
|
2296
|
+
target: truthy$13(p.external) ? "_blank" : void 0,
|
|
2297
|
+
rel: truthy$13(p.external) ? "noopener noreferrer" : void 0,
|
|
2298
|
+
"aria-current": truthy$13(p.current) ? "page" : void 0,
|
|
2299
|
+
"aria-label": p.accessibleLabel,
|
|
2300
|
+
"aria-describedby": p.describedBy,
|
|
2301
|
+
"data-emphasis": p.emphasis,
|
|
2302
|
+
"data-standalone": truthy$13(p.standalone) ? "" : void 0,
|
|
2303
|
+
onClick: (event) => handlers.current.onClick?.(event)
|
|
2304
|
+
}, props.children, truthy$13(p.external) ? createElement("svg", {
|
|
2305
|
+
className: "ty-icon ty-mirror-rtl ty-link__external",
|
|
2306
|
+
"aria-hidden": "true",
|
|
2307
|
+
focusable: "false",
|
|
2308
|
+
width: "24",
|
|
2309
|
+
height: "24",
|
|
2310
|
+
viewBox: "0 0 24 24",
|
|
2311
|
+
fill: "none",
|
|
2312
|
+
stroke: "currentColor",
|
|
2313
|
+
strokeWidth: "2",
|
|
2314
|
+
strokeLinecap: "round",
|
|
2315
|
+
strokeLinejoin: "round"
|
|
2316
|
+
}, createElement("path", { d: "M15 3h6v6" }), createElement("path", { d: "M10 14 21 3" }), createElement("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" })) : null, truthy$13(p.external) ? createElement("span", { className: "ty-visually-hidden ty-link__hint" }) : null));
|
|
2317
|
+
});
|
|
2318
|
+
//#endregion
|
|
2319
|
+
//#region src/elements/react/TyModal.ts
|
|
2320
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
2321
|
+
const truthy$12 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2322
|
+
const text$12 = (v) => truthy$12(v) ? String(v) : void 0;
|
|
2323
|
+
const filled$10 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2324
|
+
const DEFAULTS$11 = {
|
|
2325
|
+
width: "regular",
|
|
2326
|
+
role: "dialog",
|
|
2327
|
+
initialFocus: "first",
|
|
2328
|
+
closeLabel: "Close"
|
|
2329
|
+
};
|
|
2330
|
+
const TyModal = forwardRef(function TyModal(props, ref) {
|
|
2331
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
2332
|
+
const handlers = useRef(props);
|
|
2333
|
+
handlers.current = props;
|
|
2334
|
+
const host = useRef(null);
|
|
2335
|
+
useImperativeHandle(ref, () => host.current);
|
|
2336
|
+
useEffect(() => {
|
|
2337
|
+
const element = host.current;
|
|
2338
|
+
if (!element) return;
|
|
2339
|
+
const listeners = [["ty-open-change", (event) => handlers.current.onOpenChange?.(event.detail)]];
|
|
2340
|
+
for (const [type, listener] of listeners) element.addEventListener(type, listener);
|
|
2341
|
+
return () => {
|
|
2342
|
+
for (const [type, listener] of listeners) element.removeEventListener(type, listener);
|
|
2343
|
+
};
|
|
2344
|
+
}, []);
|
|
2345
|
+
const p = {
|
|
2346
|
+
isOpen: props.isOpen,
|
|
2347
|
+
width: props.width ?? DEFAULTS$11.width,
|
|
2348
|
+
role: props.role ?? DEFAULTS$11.role,
|
|
2349
|
+
dismissOnBackdrop: props.dismissOnBackdrop,
|
|
2350
|
+
showCloseButton: props.showCloseButton,
|
|
2351
|
+
initialFocus: props.initialFocus ?? DEFAULTS$11.initialFocus,
|
|
2352
|
+
busy: props.busy,
|
|
2353
|
+
closeLabel: props.closeLabel ?? DEFAULTS$11.closeLabel,
|
|
2354
|
+
accessibleLabel: props.accessibleLabel,
|
|
2355
|
+
labelledBy: props.labelledBy,
|
|
2356
|
+
describedBy: props.describedBy,
|
|
2357
|
+
panelTestId: props.panelTestId,
|
|
2358
|
+
backdropTestId: props.backdropTestId
|
|
2359
|
+
};
|
|
2360
|
+
const slots = {
|
|
2361
|
+
"title": filled$10(props.title),
|
|
2362
|
+
"description": filled$10(props.description),
|
|
2363
|
+
"default": filled$10(props.children),
|
|
2364
|
+
"actions": filled$10(props.actions)
|
|
2365
|
+
};
|
|
2366
|
+
return createElement("ty-modal", {
|
|
2367
|
+
ref: host,
|
|
2368
|
+
id: props.id,
|
|
2369
|
+
className: props.className,
|
|
2370
|
+
"data-ty-instance": instance,
|
|
2371
|
+
"open": truthy$12(p.isOpen) ? true : void 0,
|
|
2372
|
+
"width": text$12(p.width),
|
|
2373
|
+
"dialog-role": text$12(p.role),
|
|
2374
|
+
"dismiss-on-backdrop": text$12(p.dismissOnBackdrop),
|
|
2375
|
+
"show-close-button": text$12(p.showCloseButton),
|
|
2376
|
+
"initial-focus": text$12(p.initialFocus),
|
|
2377
|
+
"busy": truthy$12(p.busy) ? true : void 0,
|
|
2378
|
+
"close-label": text$12(p.closeLabel),
|
|
2379
|
+
"accessible-label": text$12(p.accessibleLabel),
|
|
2380
|
+
"labelled-by": text$12(p.labelledBy),
|
|
2381
|
+
"described-by": text$12(p.describedBy),
|
|
2382
|
+
"panel-test-id": text$12(p.panelTestId),
|
|
2383
|
+
"backdrop-test-id": text$12(p.backdropTestId)
|
|
2384
|
+
}, createElement("div", {
|
|
2385
|
+
className: "ty-modal-dialog__backdrop",
|
|
2386
|
+
hidden: !truthy$12(p.isOpen) ? true : void 0,
|
|
2387
|
+
"data-testid": p.backdropTestId
|
|
2388
|
+
}, createElement("div", {
|
|
2389
|
+
className: "ty-modal-dialog",
|
|
2390
|
+
"data-width": p.width
|
|
2391
|
+
}, createElement("div", {
|
|
2392
|
+
className: "ty-modal-dialog__panel",
|
|
2393
|
+
role: p.role,
|
|
2394
|
+
"aria-modal": "true",
|
|
2395
|
+
tabIndex: "-1",
|
|
2396
|
+
"aria-labelledby": [text$12(p.labelledBy) ?? "", slots["title"] ? `${instance}-title` : ""].filter(Boolean).join(" ") || void 0,
|
|
2397
|
+
"aria-describedby": [text$12(p.describedBy) ?? "", slots["description"] ? `${instance}-description` : ""].filter(Boolean).join(" ") || void 0,
|
|
2398
|
+
"aria-label": !slots["title"] && !truthy$12(p.labelledBy) ? p.accessibleLabel : void 0,
|
|
2399
|
+
"data-busy": truthy$12(p.busy) ? "" : void 0,
|
|
2400
|
+
"data-testid": p.panelTestId
|
|
2401
|
+
}, createElement("div", {
|
|
2402
|
+
className: "ty-modal-dialog__inner",
|
|
2403
|
+
"aria-busy": truthy$12(p.busy) ? "true" : void 0
|
|
2404
|
+
}, (slots["title"] || p.showCloseButton === "true" || !(p.role === "alertdialog")) && (slots["title"] || !(p.showCloseButton === "false")) ? createElement("header", { className: "ty-modal-dialog__header" }, slots["title"] ? createElement("h2", {
|
|
2405
|
+
className: "ty-modal-dialog__title",
|
|
2406
|
+
id: `${instance}-title`,
|
|
2407
|
+
tabIndex: "-1"
|
|
2408
|
+
}, props.title) : null, !(p.showCloseButton === "false") && (p.showCloseButton === "true" || !(p.role === "alertdialog")) ? createElement("button", {
|
|
2409
|
+
className: "ty-button ty-modal-dialog__close",
|
|
2410
|
+
type: "button",
|
|
2411
|
+
"aria-label": p.closeLabel,
|
|
2412
|
+
title: p.closeLabel,
|
|
2413
|
+
disabled: truthy$12(p.busy) || void 0,
|
|
2414
|
+
"data-variant": "quiet",
|
|
2415
|
+
"data-size": "compact",
|
|
2416
|
+
"data-shape": "circle",
|
|
2417
|
+
"data-icon-only": ""
|
|
2418
|
+
}, createElement("span", {
|
|
2419
|
+
className: "ty-button__icon",
|
|
2420
|
+
"aria-hidden": "true"
|
|
2421
|
+
}, createElement("svg", {
|
|
2422
|
+
className: "ty-icon",
|
|
2423
|
+
viewBox: "0 0 24 24",
|
|
2424
|
+
fill: "none",
|
|
2425
|
+
stroke: "currentColor",
|
|
2426
|
+
strokeWidth: "2",
|
|
2427
|
+
strokeLinecap: "round",
|
|
2428
|
+
strokeLinejoin: "round",
|
|
2429
|
+
"aria-hidden": "true",
|
|
2430
|
+
focusable: "false"
|
|
2431
|
+
}, createElement("path", {
|
|
2432
|
+
className: "ty-modal-dialog__glyph",
|
|
2433
|
+
d: "M18 6 6 18"
|
|
2434
|
+
}), createElement("path", {
|
|
2435
|
+
className: "ty-modal-dialog__glyph",
|
|
2436
|
+
d: "m6 6 12 12"
|
|
2437
|
+
})))) : null) : null, slots["description"] ? createElement("p", {
|
|
2438
|
+
className: "ty-modal-dialog__description",
|
|
2439
|
+
id: `${instance}-description`
|
|
2440
|
+
}, props.description) : null, slots["default"] ? createElement("div", { className: "ty-modal-dialog__body" }, props.children) : null, slots["actions"] ? createElement("footer", { className: "ty-modal-dialog__actions" }, props.actions) : null)))));
|
|
2441
|
+
});
|
|
2442
|
+
//#endregion
|
|
2443
|
+
//#region src/elements/react/TyNativeSelect.ts
|
|
2444
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
2445
|
+
const truthy$11 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2446
|
+
const text$11 = (v) => truthy$11(v) ? String(v) : void 0;
|
|
2447
|
+
const filled$9 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2448
|
+
const TyNativeSelect = forwardRef(function TyNativeSelect(props, ref) {
|
|
2449
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
2450
|
+
const handlers = useRef(props);
|
|
2451
|
+
handlers.current = props;
|
|
2452
|
+
const host = useRef(null);
|
|
2453
|
+
useImperativeHandle(ref, () => host.current);
|
|
2454
|
+
const p = {
|
|
2455
|
+
value: props.value,
|
|
2456
|
+
placeholder: props.placeholder,
|
|
2457
|
+
name: props.name,
|
|
2458
|
+
required: props.required,
|
|
2459
|
+
disabled: props.disabled,
|
|
2460
|
+
invalid: props.invalid,
|
|
2461
|
+
accessibleLabel: props.accessibleLabel,
|
|
2462
|
+
labelledBy: props.labelledBy,
|
|
2463
|
+
describedBy: props.describedBy,
|
|
2464
|
+
controlId: props.controlId,
|
|
2465
|
+
testId: props.testId
|
|
2466
|
+
};
|
|
2467
|
+
const slots = {
|
|
2468
|
+
"default": filled$9(props.children),
|
|
2469
|
+
"label": filled$9(props.label),
|
|
2470
|
+
"hint": filled$9(props.hint),
|
|
2471
|
+
"error": filled$9(props.error)
|
|
2472
|
+
};
|
|
2473
|
+
return createElement("ty-native-select", {
|
|
2474
|
+
ref: host,
|
|
2475
|
+
id: props.id,
|
|
2476
|
+
className: props.className,
|
|
2477
|
+
"data-ty-instance": instance,
|
|
2478
|
+
"value": text$11(p.value),
|
|
2479
|
+
"placeholder": text$11(p.placeholder),
|
|
2480
|
+
"name": text$11(p.name),
|
|
2481
|
+
"required": truthy$11(p.required) ? true : void 0,
|
|
2482
|
+
"disabled": truthy$11(p.disabled) ? true : void 0,
|
|
2483
|
+
"invalid": truthy$11(p.invalid) ? true : void 0,
|
|
2484
|
+
"accessible-label": text$11(p.accessibleLabel),
|
|
2485
|
+
"labelled-by": text$11(p.labelledBy),
|
|
2486
|
+
"described-by": text$11(p.describedBy),
|
|
2487
|
+
"control-id": text$11(p.controlId),
|
|
2488
|
+
"test-id": text$11(p.testId)
|
|
2489
|
+
}, createElement("div", {
|
|
2490
|
+
className: "ty-native-select",
|
|
2491
|
+
"data-invalid": truthy$11(p.invalid) || slots["error"] ? "" : void 0,
|
|
2492
|
+
"data-disabled": truthy$11(p.disabled) ? "" : void 0
|
|
2493
|
+
}, slots["label"] ? createElement("label", {
|
|
2494
|
+
className: "ty-native-select__label",
|
|
2495
|
+
htmlFor: text$11(p.controlId) ?? `${instance}-control`
|
|
2496
|
+
}, props.label) : null, slots["hint"] ? createElement("p", {
|
|
2497
|
+
className: "ty-native-select__hint",
|
|
2498
|
+
id: `${instance}-hint`
|
|
2499
|
+
}, props.hint) : null, createElement("div", { className: "ty-native-select__frame" }, createElement("select", {
|
|
2500
|
+
className: "ty-native-select__control",
|
|
2501
|
+
id: text$11(p.controlId) ?? `${instance}-control`,
|
|
2502
|
+
name: p.name,
|
|
2503
|
+
required: truthy$11(p.required) || void 0,
|
|
2504
|
+
disabled: truthy$11(p.disabled) || void 0,
|
|
2505
|
+
"aria-label": !slots["label"] ? p.accessibleLabel : void 0,
|
|
2506
|
+
"aria-labelledby": !slots["label"] && !truthy$11(p.accessibleLabel) ? p.labelledBy : void 0,
|
|
2507
|
+
"aria-describedby": [
|
|
2508
|
+
text$11(p.describedBy) ?? "",
|
|
2509
|
+
slots["hint"] ? `${instance}-hint` : "",
|
|
2510
|
+
slots["error"] ? `${instance}-error` : ""
|
|
2511
|
+
].filter(Boolean).join(" ") || void 0,
|
|
2512
|
+
"aria-invalid": truthy$11(p.invalid) || slots["error"] ? "true" : void 0,
|
|
2513
|
+
"data-testid": p.testId,
|
|
2514
|
+
onChange: (event) => handlers.current.onChange?.({ value: event.currentTarget.value }, event)
|
|
2515
|
+
}, truthy$11(p.placeholder) ? createElement("option", {
|
|
2516
|
+
className: "ty-native-select__placeholder",
|
|
2517
|
+
label: p.placeholder,
|
|
2518
|
+
value: "",
|
|
2519
|
+
disabled: true
|
|
2520
|
+
}) : null, props.children), createElement("svg", {
|
|
2521
|
+
className: "ty-icon ty-native-select__chevron",
|
|
2522
|
+
viewBox: "0 0 24 24",
|
|
2523
|
+
fill: "none",
|
|
2524
|
+
stroke: "currentColor",
|
|
2525
|
+
strokeWidth: "2",
|
|
2526
|
+
strokeLinecap: "round",
|
|
2527
|
+
strokeLinejoin: "round",
|
|
2528
|
+
"aria-hidden": "true",
|
|
2529
|
+
focusable: "false"
|
|
2530
|
+
}, createElement("path", {
|
|
2531
|
+
className: "ty-native-select__chevron-path",
|
|
2532
|
+
d: "m6 9 6 6 6-6"
|
|
2533
|
+
}))), slots["error"] ? createElement("p", {
|
|
2534
|
+
className: "ty-native-select__error",
|
|
2535
|
+
id: `${instance}-error`,
|
|
2536
|
+
role: "alert"
|
|
2537
|
+
}, createElement("svg", {
|
|
2538
|
+
className: "ty-icon",
|
|
2539
|
+
viewBox: "0 0 24 24",
|
|
2540
|
+
fill: "none",
|
|
2541
|
+
stroke: "currentColor",
|
|
2542
|
+
strokeWidth: "2",
|
|
2543
|
+
strokeLinecap: "round",
|
|
2544
|
+
strokeLinejoin: "round",
|
|
2545
|
+
"aria-hidden": "true",
|
|
2546
|
+
focusable: "false"
|
|
2547
|
+
}, createElement("path", {
|
|
2548
|
+
className: "ty-native-select__error-glyph",
|
|
2549
|
+
d: "M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20ZM12 8v4M12 16h.01"
|
|
2550
|
+
})), createElement("span", { className: "ty-native-select__error-text" }, props.error)) : null));
|
|
2551
|
+
});
|
|
2552
|
+
//#endregion
|
|
2553
|
+
//#region src/elements/react/TyPopover.ts
|
|
2554
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
2555
|
+
const truthy$10 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2556
|
+
const text$10 = (v) => truthy$10(v) ? String(v) : void 0;
|
|
2557
|
+
const filled$8 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2558
|
+
const DEFAULTS$10 = {
|
|
2559
|
+
placement: "bottom",
|
|
2560
|
+
align: "center",
|
|
2561
|
+
offset: "2"
|
|
2562
|
+
};
|
|
2563
|
+
const TyPopover = forwardRef(function TyPopover(props, ref) {
|
|
2564
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
2565
|
+
const handlers = useRef(props);
|
|
2566
|
+
handlers.current = props;
|
|
2567
|
+
const host = useRef(null);
|
|
2568
|
+
useImperativeHandle(ref, () => host.current);
|
|
2569
|
+
useEffect(() => {
|
|
2570
|
+
const element = host.current;
|
|
2571
|
+
if (!element) return;
|
|
2572
|
+
const listeners = [["ty-open-change", (event) => handlers.current.onOpenChange?.(event.detail)]];
|
|
2573
|
+
for (const [type, listener] of listeners) element.addEventListener(type, listener);
|
|
2574
|
+
return () => {
|
|
2575
|
+
for (const [type, listener] of listeners) element.removeEventListener(type, listener);
|
|
2576
|
+
};
|
|
2577
|
+
}, []);
|
|
2578
|
+
const p = {
|
|
2579
|
+
open: props.open,
|
|
2580
|
+
triggerLabel: props.triggerLabel,
|
|
2581
|
+
title: props.title,
|
|
2582
|
+
placement: props.placement ?? DEFAULTS$10.placement,
|
|
2583
|
+
align: props.align ?? DEFAULTS$10.align,
|
|
2584
|
+
offset: props.offset ?? DEFAULTS$10.offset,
|
|
2585
|
+
showArrow: props.showArrow,
|
|
2586
|
+
panelTestId: props.panelTestId,
|
|
2587
|
+
accessibleLabel: props.accessibleLabel
|
|
2588
|
+
};
|
|
2589
|
+
const slots = {
|
|
2590
|
+
"trigger": filled$8(props.trigger),
|
|
2591
|
+
"default": filled$8(props.children)
|
|
2592
|
+
};
|
|
2593
|
+
return createElement("ty-popover", {
|
|
2594
|
+
ref: host,
|
|
2595
|
+
id: props.id,
|
|
2596
|
+
className: props.className,
|
|
2597
|
+
"data-ty-instance": instance,
|
|
2598
|
+
"open": truthy$10(p.open) ? true : void 0,
|
|
2599
|
+
"trigger-label": text$10(p.triggerLabel),
|
|
2600
|
+
"title": text$10(p.title),
|
|
2601
|
+
"placement": text$10(p.placement),
|
|
2602
|
+
"align": text$10(p.align),
|
|
2603
|
+
"offset": text$10(p.offset),
|
|
2604
|
+
"show-arrow": text$10(p.showArrow),
|
|
2605
|
+
"panel-test-id": text$10(p.panelTestId),
|
|
2606
|
+
"accessible-label": text$10(p.accessibleLabel)
|
|
2607
|
+
}, createElement("div", { className: "ty-popover__anchor" }, !slots["trigger"] ? createElement("button", {
|
|
2608
|
+
className: "ty-button ty-popover__trigger",
|
|
2609
|
+
type: "button",
|
|
2610
|
+
"aria-label": p.triggerLabel,
|
|
2611
|
+
"aria-haspopup": "dialog",
|
|
2612
|
+
"data-variant": "quiet",
|
|
2613
|
+
"data-size": "compact",
|
|
2614
|
+
"data-shape": "circle",
|
|
2615
|
+
"data-icon-only": ""
|
|
2616
|
+
}, createElement("span", {
|
|
2617
|
+
className: "ty-button__icon",
|
|
2618
|
+
"aria-hidden": "true"
|
|
2619
|
+
}, createElement("svg", {
|
|
2620
|
+
className: "ty-icon",
|
|
2621
|
+
viewBox: "0 0 24 24",
|
|
2622
|
+
fill: "none",
|
|
2623
|
+
stroke: "currentColor",
|
|
2624
|
+
strokeWidth: "2",
|
|
2625
|
+
strokeLinecap: "round",
|
|
2626
|
+
strokeLinejoin: "round",
|
|
2627
|
+
"aria-hidden": "true",
|
|
2628
|
+
focusable: "false"
|
|
2629
|
+
}, createElement("circle", {
|
|
2630
|
+
className: "ty-popover__glyph",
|
|
2631
|
+
cx: "12",
|
|
2632
|
+
cy: "12",
|
|
2633
|
+
r: "10"
|
|
2634
|
+
}), createElement("path", {
|
|
2635
|
+
className: "ty-popover__glyph",
|
|
2636
|
+
d: "M12 16v-4"
|
|
2637
|
+
}), createElement("path", {
|
|
2638
|
+
className: "ty-popover__glyph",
|
|
2639
|
+
d: "M12 8h.01"
|
|
2640
|
+
})))) : null, slots["trigger"] ? props.trigger : null, createElement("div", {
|
|
2641
|
+
className: "ty-popover",
|
|
2642
|
+
hidden: !truthy$10(p.open) ? true : void 0,
|
|
2643
|
+
role: "dialog",
|
|
2644
|
+
"data-placement": p.placement,
|
|
2645
|
+
"data-testid": p.panelTestId
|
|
2646
|
+
}, !(p.showArrow === "false") ? createElement("div", {
|
|
2647
|
+
className: "ty-popover__arrow",
|
|
2648
|
+
"aria-hidden": "true"
|
|
2649
|
+
}) : null, createElement("div", { className: "ty-popover__dialog" }, truthy$10(p.title) ? createElement("h3", { className: "ty-popover__title" }, text$10(p.title)) : null, slots["default"] ? createElement("div", { className: "ty-popover__content" }, props.children) : null))));
|
|
2650
|
+
});
|
|
2651
|
+
//#endregion
|
|
2652
|
+
//#region src/elements/react/TySeparator.ts
|
|
2653
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
2654
|
+
const truthy$9 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2655
|
+
const text$9 = (v) => truthy$9(v) ? String(v) : void 0;
|
|
2656
|
+
const filled$7 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2657
|
+
const DEFAULTS$9 = {
|
|
2658
|
+
orientation: "horizontal",
|
|
2659
|
+
emphasis: "regular",
|
|
2660
|
+
spacing: "regular"
|
|
2661
|
+
};
|
|
2662
|
+
const TySeparator = forwardRef(function TySeparator(props, ref) {
|
|
2663
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
2664
|
+
const handlers = useRef(props);
|
|
2665
|
+
handlers.current = props;
|
|
2666
|
+
const host = useRef(null);
|
|
2667
|
+
useImperativeHandle(ref, () => host.current);
|
|
2668
|
+
const p = {
|
|
2669
|
+
orientation: props.orientation ?? DEFAULTS$9.orientation,
|
|
2670
|
+
emphasis: props.emphasis ?? DEFAULTS$9.emphasis,
|
|
2671
|
+
semantic: props.semantic,
|
|
2672
|
+
spacing: props.spacing ?? DEFAULTS$9.spacing
|
|
2673
|
+
};
|
|
2674
|
+
const slots = { "caption": filled$7(props.caption) };
|
|
2675
|
+
return createElement("ty-separator", {
|
|
2676
|
+
ref: host,
|
|
2677
|
+
id: props.id,
|
|
2678
|
+
className: props.className,
|
|
2679
|
+
"data-ty-instance": instance,
|
|
2680
|
+
"orientation": text$9(p.orientation),
|
|
2681
|
+
"emphasis": text$9(p.emphasis),
|
|
2682
|
+
"semantic": truthy$9(p.semantic) ? true : void 0,
|
|
2683
|
+
"spacing": text$9(p.spacing)
|
|
2684
|
+
}, createElement("div", {
|
|
2685
|
+
className: "ty-separator",
|
|
2686
|
+
role: truthy$9(p.semantic) && !slots["caption"] ? "separator" : void 0,
|
|
2687
|
+
"aria-orientation": truthy$9(p.semantic) && !slots["caption"] ? p.orientation : void 0,
|
|
2688
|
+
"aria-hidden": !truthy$9(p.semantic) && !slots["caption"] ? "true" : void 0,
|
|
2689
|
+
"data-orientation": p.orientation,
|
|
2690
|
+
"data-emphasis": p.emphasis,
|
|
2691
|
+
"data-spacing": p.spacing,
|
|
2692
|
+
"data-captioned": slots["caption"] ? "" : void 0
|
|
2693
|
+
}, slots["caption"] ? createElement("span", {
|
|
2694
|
+
className: "ty-separator__line",
|
|
2695
|
+
"aria-hidden": "true"
|
|
2696
|
+
}) : null, slots["caption"] ? createElement("span", { className: "ty-separator__caption" }, props.caption) : null, slots["caption"] ? createElement("span", {
|
|
2697
|
+
className: "ty-separator__line",
|
|
2698
|
+
"aria-hidden": "true"
|
|
2699
|
+
}) : null));
|
|
2700
|
+
});
|
|
2701
|
+
//#endregion
|
|
2702
|
+
//#region src/elements/react/TySkeleton.ts
|
|
2703
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
2704
|
+
const truthy$8 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2705
|
+
const text$8 = (v) => truthy$8(v) ? String(v) : void 0;
|
|
2706
|
+
const DEFAULTS$8 = {
|
|
2707
|
+
shape: "line",
|
|
2708
|
+
lines: 1
|
|
2709
|
+
};
|
|
2710
|
+
const TySkeleton = forwardRef(function TySkeleton(props, ref) {
|
|
2711
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
2712
|
+
const handlers = useRef(props);
|
|
2713
|
+
handlers.current = props;
|
|
2714
|
+
const host = useRef(null);
|
|
2715
|
+
useImperativeHandle(ref, () => host.current);
|
|
2716
|
+
const p = {
|
|
2717
|
+
shape: props.shape ?? DEFAULTS$8.shape,
|
|
2718
|
+
width: props.width,
|
|
2719
|
+
lines: props.lines ?? DEFAULTS$8.lines,
|
|
2720
|
+
preset: props.preset,
|
|
2721
|
+
count: props.count,
|
|
2722
|
+
columns: props.columns,
|
|
2723
|
+
label: props.label
|
|
2724
|
+
};
|
|
2725
|
+
return createElement("ty-skeleton", {
|
|
2726
|
+
ref: host,
|
|
2727
|
+
id: props.id,
|
|
2728
|
+
className: props.className,
|
|
2729
|
+
"data-ty-instance": instance,
|
|
2730
|
+
"shape": text$8(p.shape),
|
|
2731
|
+
"width": text$8(p.width),
|
|
2732
|
+
"lines": text$8(p.lines),
|
|
2733
|
+
"preset": text$8(p.preset),
|
|
2734
|
+
"count": text$8(p.count),
|
|
2735
|
+
"columns": text$8(p.columns),
|
|
2736
|
+
"label": text$8(p.label)
|
|
2737
|
+
}, createElement("span", {
|
|
2738
|
+
className: "ty-skeleton-root",
|
|
2739
|
+
"aria-busy": truthy$8(p.label) ? "true" : void 0
|
|
2740
|
+
}, createElement("span", {
|
|
2741
|
+
className: "ty-skeleton-content",
|
|
2742
|
+
"aria-hidden": "true"
|
|
2743
|
+
}, !truthy$8(p.preset) && (p.shape === "line" || p.shape === "heading") ? createElement("span", { className: "ty-skeleton-lines" }, createElement("span", {
|
|
2744
|
+
className: "ty-skeleton",
|
|
2745
|
+
"data-shape": p.shape,
|
|
2746
|
+
"data-width": p.width
|
|
2747
|
+
})) : null, !truthy$8(p.preset) && (p.shape === "circle" || p.shape === "rect") ? createElement("span", {
|
|
2748
|
+
className: "ty-skeleton",
|
|
2749
|
+
"data-shape": p.shape,
|
|
2750
|
+
"data-width": p.width
|
|
2751
|
+
}) : null, truthy$8(p.preset) ? createElement("span", {
|
|
2752
|
+
className: "ty-skeleton-preset",
|
|
2753
|
+
"data-preset": p.preset
|
|
2754
|
+
}) : null), truthy$8(p.label) ? createElement("span", {
|
|
2755
|
+
className: "ty-visually-hidden",
|
|
2756
|
+
role: "status"
|
|
2757
|
+
}, text$8(p.label)) : null));
|
|
2758
|
+
});
|
|
2759
|
+
//#endregion
|
|
2760
|
+
//#region src/elements/react/TySpinner.ts
|
|
2761
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
2762
|
+
const truthy$7 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2763
|
+
const text$7 = (v) => truthy$7(v) ? String(v) : void 0;
|
|
2764
|
+
const filled$6 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2765
|
+
const DEFAULTS$7 = {
|
|
2766
|
+
label: "Loading",
|
|
2767
|
+
size: "medium",
|
|
2768
|
+
shape: "ring",
|
|
2769
|
+
tone: "inherit"
|
|
2770
|
+
};
|
|
2771
|
+
const TySpinner = forwardRef(function TySpinner(props, ref) {
|
|
2772
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
2773
|
+
const handlers = useRef(props);
|
|
2774
|
+
handlers.current = props;
|
|
2775
|
+
const host = useRef(null);
|
|
2776
|
+
useImperativeHandle(ref, () => host.current);
|
|
2777
|
+
const p = {
|
|
2778
|
+
label: props.label ?? DEFAULTS$7.label,
|
|
2779
|
+
size: props.size ?? DEFAULTS$7.size,
|
|
2780
|
+
shape: props.shape ?? DEFAULTS$7.shape,
|
|
2781
|
+
tone: props.tone ?? DEFAULTS$7.tone
|
|
2782
|
+
};
|
|
2783
|
+
const slots = { "default": filled$6(props.children) };
|
|
2784
|
+
return createElement("ty-spinner", {
|
|
2785
|
+
ref: host,
|
|
2786
|
+
id: props.id,
|
|
2787
|
+
className: props.className,
|
|
2788
|
+
"data-ty-instance": instance,
|
|
2789
|
+
"label": text$7(p.label),
|
|
2790
|
+
"size": text$7(p.size),
|
|
2791
|
+
"shape": text$7(p.shape),
|
|
2792
|
+
"tone": text$7(p.tone)
|
|
2793
|
+
}, createElement("span", {
|
|
2794
|
+
className: "ty-spinner",
|
|
2795
|
+
role: "progressbar",
|
|
2796
|
+
"aria-label": p.label,
|
|
2797
|
+
"data-size": p.size,
|
|
2798
|
+
"data-shape": p.shape,
|
|
2799
|
+
"data-tone": p.tone
|
|
2800
|
+
}, p.shape === "ring" ? createElement("span", {
|
|
2801
|
+
className: "ty-spinner__ring",
|
|
2802
|
+
"aria-hidden": "true"
|
|
2803
|
+
}) : null, p.shape === "dots" ? createElement("span", {
|
|
2804
|
+
className: "ty-spinner__dots",
|
|
2805
|
+
"aria-hidden": "true"
|
|
2806
|
+
}, createElement("span", { className: "ty-spinner__dot" }), createElement("span", { className: "ty-spinner__dot" }), createElement("span", { className: "ty-spinner__dot" })) : null, slots["default"] ? createElement("span", {
|
|
2807
|
+
className: "ty-spinner__label",
|
|
2808
|
+
"aria-hidden": "true"
|
|
2809
|
+
}, props.children) : null));
|
|
2810
|
+
});
|
|
2811
|
+
//#endregion
|
|
2812
|
+
//#region src/elements/react/TyStatusPill.ts
|
|
2813
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
2814
|
+
const truthy$6 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2815
|
+
const text$6 = (v) => truthy$6(v) ? String(v) : void 0;
|
|
2816
|
+
const filled$5 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2817
|
+
const DEFAULTS$6 = { size: "regular" };
|
|
2818
|
+
const TyStatusPill = forwardRef(function TyStatusPill(props, ref) {
|
|
2819
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
2820
|
+
const handlers = useRef(props);
|
|
2821
|
+
handlers.current = props;
|
|
2822
|
+
const host = useRef(null);
|
|
2823
|
+
useImperativeHandle(ref, () => host.current);
|
|
2824
|
+
const p = {
|
|
2825
|
+
status: props.status,
|
|
2826
|
+
tone: props.tone,
|
|
2827
|
+
size: props.size ?? DEFAULTS$6.size,
|
|
2828
|
+
busy: props.busy,
|
|
2829
|
+
announce: props.announce,
|
|
2830
|
+
label: props.label,
|
|
2831
|
+
accessibleLabel: props.accessibleLabel,
|
|
2832
|
+
testId: props.testId
|
|
2833
|
+
};
|
|
2834
|
+
const slots = {
|
|
2835
|
+
"default": filled$5(props.children),
|
|
2836
|
+
"icon": filled$5(props.icon)
|
|
2837
|
+
};
|
|
2838
|
+
return createElement("ty-status-pill", {
|
|
2839
|
+
ref: host,
|
|
2840
|
+
id: props.id,
|
|
2841
|
+
className: props.className,
|
|
2842
|
+
"data-ty-instance": instance,
|
|
2843
|
+
"status": text$6(p.status),
|
|
2844
|
+
"tone": text$6(p.tone),
|
|
2845
|
+
"size": text$6(p.size),
|
|
2846
|
+
"busy": truthy$6(p.busy) ? true : void 0,
|
|
2847
|
+
"announce": truthy$6(p.announce) ? true : void 0,
|
|
2848
|
+
"label": text$6(p.label),
|
|
2849
|
+
"accessible-label": text$6(p.accessibleLabel),
|
|
2850
|
+
"test-id": text$6(p.testId)
|
|
2851
|
+
}, createElement("span", {
|
|
2852
|
+
className: "ty-status",
|
|
2853
|
+
role: truthy$6(p.announce) ? "status" : void 0,
|
|
2854
|
+
"aria-label": p.accessibleLabel,
|
|
2855
|
+
"data-tone": p.tone,
|
|
2856
|
+
"data-size": p.size,
|
|
2857
|
+
"data-busy": truthy$6(p.busy) ? "" : void 0,
|
|
2858
|
+
"data-status": p.status,
|
|
2859
|
+
"data-testid": p.testId
|
|
2860
|
+
}, slots["icon"] ? createElement("span", {
|
|
2861
|
+
className: "ty-status__icon",
|
|
2862
|
+
"aria-hidden": "true"
|
|
2863
|
+
}, props.icon) : null, createElement("span", { className: "ty-status__label" }, props.children)));
|
|
2864
|
+
});
|
|
2865
|
+
//#endregion
|
|
2866
|
+
//#region src/elements/react/TySurface.ts
|
|
2867
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
2868
|
+
const truthy$5 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2869
|
+
const text$5 = (v) => truthy$5(v) ? String(v) : void 0;
|
|
2870
|
+
const filled$4 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2871
|
+
const DEFAULTS$5 = {
|
|
2872
|
+
elevation: "sheet",
|
|
2873
|
+
padding: "regular",
|
|
2874
|
+
titleLevel: "h3"
|
|
2875
|
+
};
|
|
2876
|
+
const TySurface = forwardRef(function TySurface(props, ref) {
|
|
2877
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
2878
|
+
const handlers = useRef(props);
|
|
2879
|
+
handlers.current = props;
|
|
2880
|
+
const host = useRef(null);
|
|
2881
|
+
useImperativeHandle(ref, () => host.current);
|
|
2882
|
+
const p = {
|
|
2883
|
+
elevation: props.elevation ?? DEFAULTS$5.elevation,
|
|
2884
|
+
padding: props.padding ?? DEFAULTS$5.padding,
|
|
2885
|
+
titleLevel: props.titleLevel ?? DEFAULTS$5.titleLevel,
|
|
2886
|
+
pressable: props.pressable,
|
|
2887
|
+
href: props.href,
|
|
2888
|
+
selected: props.selected,
|
|
2889
|
+
disabled: props.disabled,
|
|
2890
|
+
accessibleLabel: props.accessibleLabel
|
|
2891
|
+
};
|
|
2892
|
+
const slots = {
|
|
2893
|
+
"default": filled$4(props.children),
|
|
2894
|
+
"title": filled$4(props.title),
|
|
2895
|
+
"description": filled$4(props.description),
|
|
2896
|
+
"footer": filled$4(props.footer)
|
|
2897
|
+
};
|
|
2898
|
+
return createElement("ty-surface", {
|
|
2899
|
+
ref: host,
|
|
2900
|
+
id: props.id,
|
|
2901
|
+
className: props.className,
|
|
2902
|
+
"data-ty-instance": instance,
|
|
2903
|
+
"elevation": text$5(p.elevation),
|
|
2904
|
+
"padding": text$5(p.padding),
|
|
2905
|
+
"title-level": text$5(p.titleLevel),
|
|
2906
|
+
"pressable": truthy$5(p.pressable) ? true : void 0,
|
|
2907
|
+
"href": text$5(p.href),
|
|
2908
|
+
"selected": truthy$5(p.selected) ? true : void 0,
|
|
2909
|
+
"disabled": truthy$5(p.disabled) ? true : void 0,
|
|
2910
|
+
"accessible-label": text$5(p.accessibleLabel)
|
|
2911
|
+
}, createElement("section", {
|
|
2912
|
+
className: "ty-surface",
|
|
2913
|
+
"aria-labelledby": slots["title"] ? `${instance}-title` : void 0,
|
|
2914
|
+
"aria-label": !slots["title"] ? p.accessibleLabel : void 0,
|
|
2915
|
+
"data-elevation": p.elevation,
|
|
2916
|
+
"data-padding": p.padding,
|
|
2917
|
+
"data-pressable": truthy$5(p.pressable) || truthy$5(p.href) ? "" : void 0,
|
|
2918
|
+
"data-selected": truthy$5(p.selected) ? "" : void 0,
|
|
2919
|
+
"data-disabled": (truthy$5(p.pressable) || truthy$5(p.href)) && truthy$5(p.disabled) ? "" : void 0
|
|
2920
|
+
}, slots["title"] || slots["description"] ? createElement("header", { className: "ty-surface__header" }, slots["title"] && p.titleLevel === "h2" ? createElement("h2", {
|
|
2921
|
+
className: "ty-surface__title",
|
|
2922
|
+
id: `${instance}-title`
|
|
2923
|
+
}, truthy$5(p.href) ? createElement("a", {
|
|
2924
|
+
className: "ty-surface__primary",
|
|
2925
|
+
href: !truthy$5(p.disabled) ? p.href : void 0,
|
|
2926
|
+
"aria-disabled": truthy$5(p.disabled) ? "true" : void 0,
|
|
2927
|
+
onClick: (event) => handlers.current.onClick?.(event)
|
|
2928
|
+
}, props.title) : null, !truthy$5(p.href) && truthy$5(p.pressable) ? createElement("button", {
|
|
2929
|
+
className: "ty-surface__primary",
|
|
2930
|
+
type: "button",
|
|
2931
|
+
disabled: truthy$5(p.disabled) || void 0,
|
|
2932
|
+
onClick: (event) => handlers.current.onClick?.(event)
|
|
2933
|
+
}, props.title) : null, !truthy$5(p.href) && !truthy$5(p.pressable) ? props.title : null) : null, slots["title"] && p.titleLevel === "h3" ? createElement("h3", {
|
|
2934
|
+
className: "ty-surface__title",
|
|
2935
|
+
id: `${instance}-title`
|
|
2936
|
+
}, truthy$5(p.href) ? createElement("a", {
|
|
2937
|
+
className: "ty-surface__primary",
|
|
2938
|
+
href: !truthy$5(p.disabled) ? p.href : void 0,
|
|
2939
|
+
"aria-disabled": truthy$5(p.disabled) ? "true" : void 0,
|
|
2940
|
+
onClick: (event) => handlers.current.onClick?.(event)
|
|
2941
|
+
}, props.title) : null, !truthy$5(p.href) && truthy$5(p.pressable) ? createElement("button", {
|
|
2942
|
+
className: "ty-surface__primary",
|
|
2943
|
+
type: "button",
|
|
2944
|
+
disabled: truthy$5(p.disabled) || void 0,
|
|
2945
|
+
onClick: (event) => handlers.current.onClick?.(event)
|
|
2946
|
+
}, props.title) : null, !truthy$5(p.href) && !truthy$5(p.pressable) ? props.title : null) : null, slots["title"] && p.titleLevel === "h4" ? createElement("h4", {
|
|
2947
|
+
className: "ty-surface__title",
|
|
2948
|
+
id: `${instance}-title`
|
|
2949
|
+
}, truthy$5(p.href) ? createElement("a", {
|
|
2950
|
+
className: "ty-surface__primary",
|
|
2951
|
+
href: !truthy$5(p.disabled) ? p.href : void 0,
|
|
2952
|
+
"aria-disabled": truthy$5(p.disabled) ? "true" : void 0,
|
|
2953
|
+
onClick: (event) => handlers.current.onClick?.(event)
|
|
2954
|
+
}, props.title) : null, !truthy$5(p.href) && truthy$5(p.pressable) ? createElement("button", {
|
|
2955
|
+
className: "ty-surface__primary",
|
|
2956
|
+
type: "button",
|
|
2957
|
+
disabled: truthy$5(p.disabled) || void 0,
|
|
2958
|
+
onClick: (event) => handlers.current.onClick?.(event)
|
|
2959
|
+
}, props.title) : null, !truthy$5(p.href) && !truthy$5(p.pressable) ? props.title : null) : null, slots["description"] ? createElement("div", { className: "ty-surface__description" }, props.description) : null) : null, slots["default"] ? createElement("div", { className: "ty-surface__body" }, props.children) : null, slots["footer"] ? createElement("footer", { className: "ty-surface__footer" }, props.footer) : null));
|
|
2960
|
+
});
|
|
2961
|
+
//#endregion
|
|
2962
|
+
//#region src/elements/react/TySwitch.ts
|
|
2963
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
2964
|
+
const truthy$4 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2965
|
+
const text$4 = (v) => truthy$4(v) ? String(v) : void 0;
|
|
2966
|
+
const filled$3 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
2967
|
+
const DEFAULTS$4 = {
|
|
2968
|
+
size: "regular",
|
|
2969
|
+
layout: "inline"
|
|
2970
|
+
};
|
|
2971
|
+
const TySwitch = forwardRef(function TySwitch(props, ref) {
|
|
2972
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
2973
|
+
const handlers = useRef(props);
|
|
2974
|
+
handlers.current = props;
|
|
2975
|
+
const host = useRef(null);
|
|
2976
|
+
useImperativeHandle(ref, () => host.current);
|
|
2977
|
+
const p = {
|
|
2978
|
+
checked: props.checked,
|
|
2979
|
+
disabled: props.disabled,
|
|
2980
|
+
readOnly: props.readOnly,
|
|
2981
|
+
name: props.name,
|
|
2982
|
+
value: props.value,
|
|
2983
|
+
size: props.size ?? DEFAULTS$4.size,
|
|
2984
|
+
layout: props.layout ?? DEFAULTS$4.layout,
|
|
2985
|
+
accessibleLabel: props.accessibleLabel,
|
|
2986
|
+
testId: props.testId
|
|
2987
|
+
};
|
|
2988
|
+
const slots = {
|
|
2989
|
+
"default": filled$3(props.children),
|
|
2990
|
+
"description": filled$3(props.description)
|
|
2991
|
+
};
|
|
2992
|
+
return createElement("ty-switch", {
|
|
2993
|
+
ref: host,
|
|
2994
|
+
id: props.id,
|
|
2995
|
+
className: props.className,
|
|
2996
|
+
"data-ty-instance": instance,
|
|
2997
|
+
"checked": truthy$4(p.checked) ? true : void 0,
|
|
2998
|
+
"disabled": truthy$4(p.disabled) ? true : void 0,
|
|
2999
|
+
"read-only": truthy$4(p.readOnly) ? true : void 0,
|
|
3000
|
+
"name": text$4(p.name),
|
|
3001
|
+
"value": text$4(p.value),
|
|
3002
|
+
"size": text$4(p.size),
|
|
3003
|
+
"layout": text$4(p.layout),
|
|
3004
|
+
"accessible-label": text$4(p.accessibleLabel),
|
|
3005
|
+
"test-id": text$4(p.testId)
|
|
3006
|
+
}, createElement("label", {
|
|
3007
|
+
className: "ty-switch",
|
|
3008
|
+
"data-layout": p.layout,
|
|
3009
|
+
"data-size": p.size,
|
|
3010
|
+
"data-selected": truthy$4(p.checked) ? "" : void 0,
|
|
3011
|
+
"data-disabled": truthy$4(p.disabled) ? "" : void 0,
|
|
3012
|
+
"data-readonly": truthy$4(p.readOnly) ? "" : void 0
|
|
3013
|
+
}, createElement("input", {
|
|
3014
|
+
className: "ty-visually-hidden",
|
|
3015
|
+
type: "checkbox",
|
|
3016
|
+
role: "switch",
|
|
3017
|
+
name: p.name,
|
|
3018
|
+
value: p.value,
|
|
3019
|
+
checked: Boolean(p.checked),
|
|
3020
|
+
disabled: truthy$4(p.disabled) || void 0,
|
|
3021
|
+
"aria-readonly": truthy$4(p.readOnly) ? "true" : void 0,
|
|
3022
|
+
"aria-label": !slots["default"] ? p.accessibleLabel : void 0,
|
|
3023
|
+
"aria-labelledby": slots["default"] ? `${instance}-label` : void 0,
|
|
3024
|
+
"aria-describedby": slots["description"] ? `${instance}-description` : void 0,
|
|
3025
|
+
"data-testid": p.testId,
|
|
3026
|
+
onChange: (event) => handlers.current.onChange?.({ checked: event.currentTarget.checked }, event)
|
|
3027
|
+
}), createElement("span", {
|
|
3028
|
+
className: "ty-switch__track",
|
|
3029
|
+
"aria-hidden": "true"
|
|
3030
|
+
}, createElement("span", { className: "ty-switch__thumb" })), slots["default"] || slots["description"] ? createElement("span", { className: "ty-switch__text" }, slots["default"] ? createElement("span", {
|
|
3031
|
+
className: "ty-switch__label",
|
|
3032
|
+
id: `${instance}-label`
|
|
3033
|
+
}, props.children) : null, slots["description"] ? createElement("span", {
|
|
3034
|
+
className: "ty-switch__description",
|
|
3035
|
+
id: `${instance}-description`
|
|
3036
|
+
}, props.description) : null) : null));
|
|
3037
|
+
});
|
|
3038
|
+
//#endregion
|
|
3039
|
+
//#region src/elements/react/TyTag.ts
|
|
3040
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
3041
|
+
const truthy$3 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
3042
|
+
const text$3 = (v) => truthy$3(v) ? String(v) : void 0;
|
|
3043
|
+
const filled$2 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
3044
|
+
const DEFAULTS$3 = {
|
|
3045
|
+
tone: "neutral",
|
|
3046
|
+
size: "regular"
|
|
3047
|
+
};
|
|
3048
|
+
const TyTag = forwardRef(function TyTag(props, ref) {
|
|
3049
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
3050
|
+
const handlers = useRef(props);
|
|
3051
|
+
handlers.current = props;
|
|
3052
|
+
const host = useRef(null);
|
|
3053
|
+
useImperativeHandle(ref, () => host.current);
|
|
3054
|
+
const p = {
|
|
3055
|
+
tone: props.tone ?? DEFAULTS$3.tone,
|
|
3056
|
+
categoryIndex: props.categoryIndex,
|
|
3057
|
+
size: props.size ?? DEFAULTS$3.size,
|
|
3058
|
+
removable: props.removable,
|
|
3059
|
+
removeLabel: props.removeLabel,
|
|
3060
|
+
live: props.live,
|
|
3061
|
+
testId: props.testId
|
|
3062
|
+
};
|
|
3063
|
+
const slots = {
|
|
3064
|
+
"default": filled$2(props.children),
|
|
3065
|
+
"icon": filled$2(props.icon)
|
|
3066
|
+
};
|
|
3067
|
+
return createElement("ty-tag", {
|
|
3068
|
+
ref: host,
|
|
3069
|
+
id: props.id,
|
|
3070
|
+
className: props.className,
|
|
3071
|
+
"data-ty-instance": instance,
|
|
3072
|
+
"tone": text$3(p.tone),
|
|
3073
|
+
"category-index": text$3(p.categoryIndex),
|
|
3074
|
+
"size": text$3(p.size),
|
|
3075
|
+
"removable": truthy$3(p.removable) ? true : void 0,
|
|
3076
|
+
"remove-label": text$3(p.removeLabel),
|
|
3077
|
+
"live": truthy$3(p.live) ? true : void 0,
|
|
3078
|
+
"test-id": text$3(p.testId)
|
|
3079
|
+
}, createElement("span", {
|
|
3080
|
+
className: "ty-tag",
|
|
3081
|
+
role: truthy$3(p.live) ? "status" : void 0,
|
|
3082
|
+
"aria-live": truthy$3(p.live) ? "polite" : void 0,
|
|
3083
|
+
"data-tone": p.tone,
|
|
3084
|
+
"data-size": p.size,
|
|
3085
|
+
"data-removable": truthy$3(p.removable) ? "" : void 0,
|
|
3086
|
+
"data-testid": p.testId
|
|
3087
|
+
}, slots["icon"] ? createElement("span", {
|
|
3088
|
+
className: "ty-tag__icon",
|
|
3089
|
+
"aria-hidden": "true"
|
|
3090
|
+
}, props.icon) : null, !slots["icon"] && truthy$3(p.categoryIndex) ? createElement("span", {
|
|
3091
|
+
className: "ty-tag__swatch",
|
|
3092
|
+
"aria-hidden": "true",
|
|
3093
|
+
"data-category": p.categoryIndex
|
|
3094
|
+
}) : null, createElement("span", { className: "ty-tag__text" }, props.children), truthy$3(p.removable) ? createElement("button", {
|
|
3095
|
+
className: "ty-tag__remove",
|
|
3096
|
+
type: "button",
|
|
3097
|
+
"aria-label": p.removeLabel,
|
|
3098
|
+
onClick: (event) => handlers.current.onClick?.(event)
|
|
3099
|
+
}, createElement("svg", {
|
|
3100
|
+
className: "ty-icon",
|
|
3101
|
+
"aria-hidden": "true",
|
|
3102
|
+
focusable: "false",
|
|
3103
|
+
viewBox: "0 0 12 12",
|
|
3104
|
+
fill: "none",
|
|
3105
|
+
stroke: "currentColor",
|
|
3106
|
+
strokeWidth: "1.5",
|
|
3107
|
+
strokeLinecap: "round"
|
|
3108
|
+
}, createElement("path", { d: "M2.5 2.5l7 7M9.5 2.5l-7 7" }))) : null));
|
|
3109
|
+
});
|
|
3110
|
+
//#endregion
|
|
3111
|
+
//#region src/elements/react/TyTextArea.ts
|
|
3112
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
3113
|
+
const truthy$2 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
3114
|
+
const text$2 = (v) => truthy$2(v) ? String(v) : void 0;
|
|
3115
|
+
const filled$1 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
3116
|
+
const DEFAULTS$2 = {
|
|
3117
|
+
rows: 3,
|
|
3118
|
+
resize: "vertical",
|
|
3119
|
+
counterLabel: "{count} of {max} characters",
|
|
3120
|
+
overLimitLabel: "{count} of {max} characters, {over} over the limit"
|
|
3121
|
+
};
|
|
3122
|
+
const TyTextArea = forwardRef(function TyTextArea(props, ref) {
|
|
3123
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
3124
|
+
const handlers = useRef(props);
|
|
3125
|
+
handlers.current = props;
|
|
3126
|
+
const host = useRef(null);
|
|
3127
|
+
useImperativeHandle(ref, () => host.current);
|
|
3128
|
+
const p = {
|
|
3129
|
+
value: props.value,
|
|
3130
|
+
defaultValue: props.defaultValue,
|
|
3131
|
+
rows: props.rows ?? DEFAULTS$2.rows,
|
|
3132
|
+
autoGrow: props.autoGrow,
|
|
3133
|
+
maxRows: props.maxRows,
|
|
3134
|
+
resize: props.resize ?? DEFAULTS$2.resize,
|
|
3135
|
+
maxLength: props.maxLength,
|
|
3136
|
+
showCounter: props.showCounter,
|
|
3137
|
+
counterLabel: props.counterLabel ?? DEFAULTS$2.counterLabel,
|
|
3138
|
+
overLimitLabel: props.overLimitLabel ?? DEFAULTS$2.overLimitLabel,
|
|
3139
|
+
monospace: props.monospace,
|
|
3140
|
+
required: props.required,
|
|
3141
|
+
disabled: props.disabled,
|
|
3142
|
+
readOnly: props.readOnly,
|
|
3143
|
+
invalid: props.invalid,
|
|
3144
|
+
name: props.name,
|
|
3145
|
+
placeholder: props.placeholder,
|
|
3146
|
+
accessibleLabel: props.accessibleLabel,
|
|
3147
|
+
labelledBy: props.labelledBy,
|
|
3148
|
+
describedBy: props.describedBy,
|
|
3149
|
+
controlId: props.controlId,
|
|
3150
|
+
testId: props.testId
|
|
3151
|
+
};
|
|
3152
|
+
const slots = {
|
|
3153
|
+
"label": filled$1(props.label),
|
|
3154
|
+
"hint": filled$1(props.hint),
|
|
3155
|
+
"error": filled$1(props.error)
|
|
3156
|
+
};
|
|
3157
|
+
return createElement("ty-text-area", {
|
|
3158
|
+
ref: host,
|
|
3159
|
+
id: props.id,
|
|
3160
|
+
className: props.className,
|
|
3161
|
+
"data-ty-instance": instance,
|
|
3162
|
+
"value": text$2(p.value),
|
|
3163
|
+
"default-value": text$2(p.defaultValue),
|
|
3164
|
+
"rows": text$2(p.rows),
|
|
3165
|
+
"auto-grow": truthy$2(p.autoGrow) ? true : void 0,
|
|
3166
|
+
"max-rows": text$2(p.maxRows),
|
|
3167
|
+
"resize": text$2(p.resize),
|
|
3168
|
+
"max-length": text$2(p.maxLength),
|
|
3169
|
+
"show-counter": truthy$2(p.showCounter) ? true : void 0,
|
|
3170
|
+
"counter-label": text$2(p.counterLabel),
|
|
3171
|
+
"over-limit-label": text$2(p.overLimitLabel),
|
|
3172
|
+
"monospace": truthy$2(p.monospace) ? true : void 0,
|
|
3173
|
+
"required": truthy$2(p.required) ? true : void 0,
|
|
3174
|
+
"disabled": truthy$2(p.disabled) ? true : void 0,
|
|
3175
|
+
"read-only": truthy$2(p.readOnly) ? true : void 0,
|
|
3176
|
+
"invalid": truthy$2(p.invalid) ? true : void 0,
|
|
3177
|
+
"name": text$2(p.name),
|
|
3178
|
+
"placeholder": text$2(p.placeholder),
|
|
3179
|
+
"accessible-label": text$2(p.accessibleLabel),
|
|
3180
|
+
"labelled-by": text$2(p.labelledBy),
|
|
3181
|
+
"described-by": text$2(p.describedBy),
|
|
3182
|
+
"control-id": text$2(p.controlId),
|
|
3183
|
+
"test-id": text$2(p.testId)
|
|
3184
|
+
}, createElement("div", {
|
|
3185
|
+
className: "ty-text-area",
|
|
3186
|
+
"data-resize": p.resize,
|
|
3187
|
+
"data-monospace": truthy$2(p.monospace) ? "" : void 0,
|
|
3188
|
+
"data-auto-grow": truthy$2(p.autoGrow) ? "" : void 0,
|
|
3189
|
+
"data-invalid": truthy$2(p.invalid) || slots["error"] ? "" : void 0,
|
|
3190
|
+
"data-readonly": truthy$2(p.readOnly) ? "" : void 0,
|
|
3191
|
+
"data-disabled": truthy$2(p.disabled) ? "" : void 0,
|
|
3192
|
+
"data-testid": p.testId
|
|
3193
|
+
}, slots["label"] ? createElement("label", {
|
|
3194
|
+
className: "ty-text-area__label",
|
|
3195
|
+
htmlFor: text$2(p.controlId) ?? `${instance}-input`
|
|
3196
|
+
}, props.label) : null, slots["hint"] ? createElement("p", {
|
|
3197
|
+
className: "ty-text-area__hint",
|
|
3198
|
+
id: `${instance}-hint`
|
|
3199
|
+
}, props.hint) : null, createElement("textarea", {
|
|
3200
|
+
className: "ty-text-area__input",
|
|
3201
|
+
id: text$2(p.controlId) ?? `${instance}-input`,
|
|
3202
|
+
rows: p.rows,
|
|
3203
|
+
name: p.name,
|
|
3204
|
+
placeholder: p.placeholder,
|
|
3205
|
+
disabled: truthy$2(p.disabled) || void 0,
|
|
3206
|
+
readOnly: truthy$2(p.readOnly) || void 0,
|
|
3207
|
+
required: truthy$2(p.required) || void 0,
|
|
3208
|
+
"aria-label": !slots["label"] ? p.accessibleLabel : void 0,
|
|
3209
|
+
"aria-labelledby": !slots["label"] && !truthy$2(p.accessibleLabel) ? p.labelledBy : void 0,
|
|
3210
|
+
"aria-describedby": [
|
|
3211
|
+
text$2(p.describedBy) ?? "",
|
|
3212
|
+
slots["hint"] ? `${instance}-hint` : "",
|
|
3213
|
+
slots["error"] ? `${instance}-error` : "",
|
|
3214
|
+
truthy$2(p.showCounter) && truthy$2(p.maxLength) ? `${instance}-counter` : ""
|
|
3215
|
+
].filter(Boolean).join(" ") || void 0,
|
|
3216
|
+
"aria-invalid": truthy$2(p.invalid) || slots["error"] ? "true" : void 0,
|
|
3217
|
+
onChange: (event) => handlers.current.onChange?.({ value: event.currentTarget.value }, event)
|
|
3218
|
+
}), slots["error"] ? createElement("p", {
|
|
3219
|
+
className: "ty-text-area__error",
|
|
3220
|
+
id: `${instance}-error`
|
|
3221
|
+
}, createElement("svg", {
|
|
3222
|
+
className: "ty-icon",
|
|
3223
|
+
"aria-hidden": "true",
|
|
3224
|
+
focusable: "false",
|
|
3225
|
+
width: "24",
|
|
3226
|
+
height: "24",
|
|
3227
|
+
viewBox: "0 0 24 24",
|
|
3228
|
+
fill: "none",
|
|
3229
|
+
stroke: "currentColor",
|
|
3230
|
+
strokeWidth: "2",
|
|
3231
|
+
strokeLinecap: "round",
|
|
3232
|
+
strokeLinejoin: "round"
|
|
3233
|
+
}, createElement("circle", {
|
|
3234
|
+
cx: "12",
|
|
3235
|
+
cy: "12",
|
|
3236
|
+
r: "10"
|
|
3237
|
+
}), createElement("line", {
|
|
3238
|
+
x1: "12",
|
|
3239
|
+
y1: "8",
|
|
3240
|
+
x2: "12",
|
|
3241
|
+
y2: "12"
|
|
3242
|
+
}), createElement("line", {
|
|
3243
|
+
x1: "12",
|
|
3244
|
+
y1: "16",
|
|
3245
|
+
x2: "12.01",
|
|
3246
|
+
y2: "16"
|
|
3247
|
+
})), createElement("span", {}, props.error)) : null, truthy$2(p.showCounter) && truthy$2(p.maxLength) ? createElement("p", {
|
|
3248
|
+
className: "ty-text-area__counter",
|
|
3249
|
+
id: `${instance}-counter`
|
|
3250
|
+
}) : null));
|
|
3251
|
+
});
|
|
3252
|
+
//#endregion
|
|
3253
|
+
//#region src/elements/react/TyTextField.ts
|
|
3254
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
3255
|
+
const truthy$1 = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
3256
|
+
const text$1 = (v) => truthy$1(v) ? String(v) : void 0;
|
|
3257
|
+
const filled = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
3258
|
+
const DEFAULTS$1 = {
|
|
3259
|
+
mode: "text",
|
|
3260
|
+
appearance: "outlined",
|
|
3261
|
+
clearLabel: "Clear",
|
|
3262
|
+
showPasswordLabel: "Show password",
|
|
3263
|
+
hidePasswordLabel: "Hide password",
|
|
3264
|
+
counterLabel: "{count} of {max} characters",
|
|
3265
|
+
overLimitLabel: "{count} of {max} characters, {over} over the limit"
|
|
3266
|
+
};
|
|
3267
|
+
const TyTextField = forwardRef(function TyTextField(props, ref) {
|
|
3268
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
3269
|
+
const handlers = useRef(props);
|
|
3270
|
+
handlers.current = props;
|
|
3271
|
+
const host = useRef(null);
|
|
3272
|
+
useImperativeHandle(ref, () => host.current);
|
|
3273
|
+
useEffect(() => {
|
|
3274
|
+
const element = host.current;
|
|
3275
|
+
if (!element) return;
|
|
3276
|
+
const listeners = [["ty-clear", () => handlers.current.onClear?.()]];
|
|
3277
|
+
for (const [type, listener] of listeners) element.addEventListener(type, listener);
|
|
3278
|
+
return () => {
|
|
3279
|
+
for (const [type, listener] of listeners) element.removeEventListener(type, listener);
|
|
3280
|
+
};
|
|
3281
|
+
}, []);
|
|
3282
|
+
const p = {
|
|
3283
|
+
mode: props.mode ?? DEFAULTS$1.mode,
|
|
3284
|
+
inputType: props.inputType,
|
|
3285
|
+
value: props.value,
|
|
3286
|
+
defaultValue: props.defaultValue,
|
|
3287
|
+
appearance: props.appearance ?? DEFAULTS$1.appearance,
|
|
3288
|
+
clearable: props.clearable,
|
|
3289
|
+
clearLabel: props.clearLabel ?? DEFAULTS$1.clearLabel,
|
|
3290
|
+
showPasswordLabel: props.showPasswordLabel ?? DEFAULTS$1.showPasswordLabel,
|
|
3291
|
+
hidePasswordLabel: props.hidePasswordLabel ?? DEFAULTS$1.hidePasswordLabel,
|
|
3292
|
+
maxLength: props.maxLength,
|
|
3293
|
+
showCounter: props.showCounter,
|
|
3294
|
+
counterLabel: props.counterLabel ?? DEFAULTS$1.counterLabel,
|
|
3295
|
+
overLimitLabel: props.overLimitLabel ?? DEFAULTS$1.overLimitLabel,
|
|
3296
|
+
required: props.required,
|
|
3297
|
+
disabled: props.disabled,
|
|
3298
|
+
readOnly: props.readOnly,
|
|
3299
|
+
invalid: props.invalid,
|
|
3300
|
+
name: props.name,
|
|
3301
|
+
placeholder: props.placeholder,
|
|
3302
|
+
autoComplete: props.autoComplete,
|
|
3303
|
+
accessibleLabel: props.accessibleLabel,
|
|
3304
|
+
labelledBy: props.labelledBy,
|
|
3305
|
+
describedBy: props.describedBy,
|
|
3306
|
+
controlId: props.controlId,
|
|
3307
|
+
testId: props.testId
|
|
3308
|
+
};
|
|
3309
|
+
const slots = {
|
|
3310
|
+
"label": filled(props.label),
|
|
3311
|
+
"hint": filled(props.hint),
|
|
3312
|
+
"error": filled(props.error),
|
|
3313
|
+
"success": filled(props.success),
|
|
3314
|
+
"leading": filled(props.leading)
|
|
3315
|
+
};
|
|
3316
|
+
return createElement("ty-text-field", {
|
|
3317
|
+
ref: host,
|
|
3318
|
+
id: props.id,
|
|
3319
|
+
className: props.className,
|
|
3320
|
+
"data-ty-instance": instance,
|
|
3321
|
+
"mode": text$1(p.mode),
|
|
3322
|
+
"input-type": text$1(p.inputType),
|
|
3323
|
+
"value": text$1(p.value),
|
|
3324
|
+
"default-value": text$1(p.defaultValue),
|
|
3325
|
+
"appearance": text$1(p.appearance),
|
|
3326
|
+
"clearable": truthy$1(p.clearable) ? true : void 0,
|
|
3327
|
+
"clear-label": text$1(p.clearLabel),
|
|
3328
|
+
"show-password-label": text$1(p.showPasswordLabel),
|
|
3329
|
+
"hide-password-label": text$1(p.hidePasswordLabel),
|
|
3330
|
+
"max-length": text$1(p.maxLength),
|
|
3331
|
+
"show-counter": truthy$1(p.showCounter) ? true : void 0,
|
|
3332
|
+
"counter-label": text$1(p.counterLabel),
|
|
3333
|
+
"over-limit-label": text$1(p.overLimitLabel),
|
|
3334
|
+
"required": truthy$1(p.required) ? true : void 0,
|
|
3335
|
+
"disabled": truthy$1(p.disabled) ? true : void 0,
|
|
3336
|
+
"read-only": truthy$1(p.readOnly) ? true : void 0,
|
|
3337
|
+
"invalid": truthy$1(p.invalid) ? true : void 0,
|
|
3338
|
+
"name": text$1(p.name),
|
|
3339
|
+
"placeholder": text$1(p.placeholder),
|
|
3340
|
+
"autocomplete": text$1(p.autoComplete),
|
|
3341
|
+
"accessible-label": text$1(p.accessibleLabel),
|
|
3342
|
+
"labelled-by": text$1(p.labelledBy),
|
|
3343
|
+
"described-by": text$1(p.describedBy),
|
|
3344
|
+
"control-id": text$1(p.controlId),
|
|
3345
|
+
"test-id": text$1(p.testId)
|
|
3346
|
+
}, createElement("div", {
|
|
3347
|
+
className: "ty-text-field",
|
|
3348
|
+
"data-appearance": p.appearance,
|
|
3349
|
+
"data-mode": p.mode,
|
|
3350
|
+
"data-invalid": truthy$1(p.invalid) || slots["error"] ? "" : void 0,
|
|
3351
|
+
"data-readonly": truthy$1(p.readOnly) ? "" : void 0,
|
|
3352
|
+
"data-disabled": truthy$1(p.disabled) ? "" : void 0,
|
|
3353
|
+
"data-testid": p.testId
|
|
3354
|
+
}, slots["label"] ? createElement("label", {
|
|
3355
|
+
className: "ty-text-field__label",
|
|
3356
|
+
htmlFor: text$1(p.controlId) ?? `${instance}-input`
|
|
3357
|
+
}, props.label) : null, slots["hint"] ? createElement("p", {
|
|
3358
|
+
className: "ty-text-field__hint",
|
|
3359
|
+
id: `${instance}-hint`
|
|
3360
|
+
}, props.hint) : null, createElement("div", { className: "ty-text-field__group" }, slots["leading"] ? createElement("span", {
|
|
3361
|
+
className: "ty-text-field__leading",
|
|
3362
|
+
"aria-hidden": "true"
|
|
3363
|
+
}, props.leading) : null, p.mode === "search" && !slots["leading"] ? createElement("span", {
|
|
3364
|
+
className: "ty-text-field__leading",
|
|
3365
|
+
"aria-hidden": "true"
|
|
3366
|
+
}, createElement("svg", {
|
|
3367
|
+
className: "ty-icon",
|
|
3368
|
+
viewBox: "0 0 24 24",
|
|
3369
|
+
fill: "none",
|
|
3370
|
+
stroke: "currentColor",
|
|
3371
|
+
strokeWidth: "2",
|
|
3372
|
+
strokeLinecap: "round",
|
|
3373
|
+
strokeLinejoin: "round",
|
|
3374
|
+
"aria-hidden": "true",
|
|
3375
|
+
focusable: "false"
|
|
3376
|
+
}, createElement("circle", {
|
|
3377
|
+
className: "ty-text-field__glyph",
|
|
3378
|
+
cx: "11",
|
|
3379
|
+
cy: "11",
|
|
3380
|
+
r: "8"
|
|
3381
|
+
}), createElement("path", {
|
|
3382
|
+
className: "ty-text-field__glyph",
|
|
3383
|
+
d: "m21 21-4.34-4.34"
|
|
3384
|
+
}))) : null, createElement("input", {
|
|
3385
|
+
className: "ty-text-field__input",
|
|
3386
|
+
id: text$1(p.controlId) ?? `${instance}-input`,
|
|
3387
|
+
type: truthy$1(p.inputType) ? {
|
|
3388
|
+
"text": "text",
|
|
3389
|
+
"email": "email",
|
|
3390
|
+
"url": "url",
|
|
3391
|
+
"tel": "tel",
|
|
3392
|
+
"number": "number"
|
|
3393
|
+
}[String(p.inputType)] : {
|
|
3394
|
+
"text": "text",
|
|
3395
|
+
"search": "search",
|
|
3396
|
+
"password": "password"
|
|
3397
|
+
}[String(p.mode)],
|
|
3398
|
+
name: p.name,
|
|
3399
|
+
placeholder: p.placeholder,
|
|
3400
|
+
autoComplete: p.autoComplete,
|
|
3401
|
+
disabled: truthy$1(p.disabled) || void 0,
|
|
3402
|
+
readOnly: truthy$1(p.readOnly) || void 0,
|
|
3403
|
+
required: truthy$1(p.required) || void 0,
|
|
3404
|
+
"aria-label": !slots["label"] ? p.accessibleLabel : void 0,
|
|
3405
|
+
"aria-labelledby": !slots["label"] && !truthy$1(p.accessibleLabel) ? p.labelledBy : void 0,
|
|
3406
|
+
"aria-describedby": [
|
|
3407
|
+
text$1(p.describedBy) ?? "",
|
|
3408
|
+
slots["hint"] ? `${instance}-hint` : "",
|
|
3409
|
+
slots["error"] ? `${instance}-error` : "",
|
|
3410
|
+
slots["success"] && !slots["error"] ? `${instance}-success` : "",
|
|
3411
|
+
truthy$1(p.showCounter) && truthy$1(p.maxLength) ? `${instance}-counter` : ""
|
|
3412
|
+
].filter(Boolean).join(" ") || void 0,
|
|
3413
|
+
"aria-invalid": truthy$1(p.invalid) || slots["error"] ? "true" : void 0,
|
|
3414
|
+
onChange: (event) => handlers.current.onChange?.({ value: event.currentTarget.value }, event)
|
|
3415
|
+
}), truthy$1(p.clearable) || p.mode === "search" ? createElement("button", {
|
|
3416
|
+
className: "ty-text-field__clear ty-text-field__action",
|
|
3417
|
+
type: "button",
|
|
3418
|
+
"aria-label": p.clearLabel
|
|
3419
|
+
}, createElement("svg", {
|
|
3420
|
+
className: "ty-icon",
|
|
3421
|
+
viewBox: "0 0 24 24",
|
|
3422
|
+
fill: "none",
|
|
3423
|
+
stroke: "currentColor",
|
|
3424
|
+
strokeWidth: "2",
|
|
3425
|
+
strokeLinecap: "round",
|
|
3426
|
+
strokeLinejoin: "round",
|
|
3427
|
+
"aria-hidden": "true",
|
|
3428
|
+
focusable: "false"
|
|
3429
|
+
}, createElement("path", {
|
|
3430
|
+
className: "ty-text-field__glyph",
|
|
3431
|
+
d: "M18 6 6 18"
|
|
3432
|
+
}), createElement("path", {
|
|
3433
|
+
className: "ty-text-field__glyph",
|
|
3434
|
+
d: "m6 6 12 12"
|
|
3435
|
+
}))) : null, p.mode === "password" ? createElement("button", {
|
|
3436
|
+
className: "ty-text-field__reveal ty-text-field__action",
|
|
3437
|
+
type: "button",
|
|
3438
|
+
"aria-label": p.showPasswordLabel,
|
|
3439
|
+
"aria-pressed": "false",
|
|
3440
|
+
disabled: truthy$1(p.disabled) || void 0
|
|
3441
|
+
}, createElement("svg", {
|
|
3442
|
+
className: "ty-icon",
|
|
3443
|
+
viewBox: "0 0 24 24",
|
|
3444
|
+
fill: "none",
|
|
3445
|
+
stroke: "currentColor",
|
|
3446
|
+
strokeWidth: "2",
|
|
3447
|
+
strokeLinecap: "round",
|
|
3448
|
+
strokeLinejoin: "round",
|
|
3449
|
+
"aria-hidden": "true",
|
|
3450
|
+
focusable: "false"
|
|
3451
|
+
}, createElement("g", { className: "ty-text-field__eye" }, createElement("path", {
|
|
3452
|
+
className: "ty-text-field__glyph",
|
|
3453
|
+
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"
|
|
3454
|
+
}), createElement("circle", {
|
|
3455
|
+
className: "ty-text-field__glyph",
|
|
3456
|
+
cx: "12",
|
|
3457
|
+
cy: "12",
|
|
3458
|
+
r: "3"
|
|
3459
|
+
})), createElement("g", { className: "ty-text-field__eye-off" }, createElement("path", {
|
|
3460
|
+
className: "ty-text-field__glyph",
|
|
3461
|
+
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"
|
|
3462
|
+
}), createElement("path", {
|
|
3463
|
+
className: "ty-text-field__glyph",
|
|
3464
|
+
d: "M14.084 14.158a3 3 0 0 1-4.242-4.242"
|
|
3465
|
+
}), createElement("path", {
|
|
3466
|
+
className: "ty-text-field__glyph",
|
|
3467
|
+
d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"
|
|
3468
|
+
}), createElement("path", {
|
|
3469
|
+
className: "ty-text-field__glyph",
|
|
3470
|
+
d: "m2 2 20 20"
|
|
3471
|
+
})))) : null, slots["success"] && !slots["error"] ? createElement("svg", {
|
|
3472
|
+
className: "ty-icon ty-text-field__success-mark",
|
|
3473
|
+
viewBox: "0 0 24 24",
|
|
3474
|
+
fill: "none",
|
|
3475
|
+
stroke: "currentColor",
|
|
3476
|
+
strokeWidth: "2",
|
|
3477
|
+
strokeLinecap: "round",
|
|
3478
|
+
strokeLinejoin: "round",
|
|
3479
|
+
"aria-hidden": "true",
|
|
3480
|
+
focusable: "false"
|
|
3481
|
+
}, createElement("circle", {
|
|
3482
|
+
className: "ty-text-field__glyph",
|
|
3483
|
+
cx: "12",
|
|
3484
|
+
cy: "12",
|
|
3485
|
+
r: "10"
|
|
3486
|
+
}), createElement("path", {
|
|
3487
|
+
className: "ty-text-field__glyph",
|
|
3488
|
+
d: "m16 9-5.5 5.5L8 12"
|
|
3489
|
+
})) : null), slots["error"] ? createElement("p", {
|
|
3490
|
+
className: "ty-text-field__error",
|
|
3491
|
+
id: `${instance}-error`
|
|
3492
|
+
}, createElement("svg", {
|
|
3493
|
+
className: "ty-icon",
|
|
3494
|
+
viewBox: "0 0 24 24",
|
|
3495
|
+
fill: "none",
|
|
3496
|
+
stroke: "currentColor",
|
|
3497
|
+
strokeWidth: "2",
|
|
3498
|
+
strokeLinecap: "round",
|
|
3499
|
+
strokeLinejoin: "round",
|
|
3500
|
+
"aria-hidden": "true",
|
|
3501
|
+
focusable: "false"
|
|
3502
|
+
}, createElement("circle", {
|
|
3503
|
+
className: "ty-text-field__glyph",
|
|
3504
|
+
cx: "12",
|
|
3505
|
+
cy: "12",
|
|
3506
|
+
r: "10"
|
|
3507
|
+
}), createElement("line", {
|
|
3508
|
+
className: "ty-text-field__glyph",
|
|
3509
|
+
x1: "12",
|
|
3510
|
+
y1: "8",
|
|
3511
|
+
x2: "12",
|
|
3512
|
+
y2: "12"
|
|
3513
|
+
}), createElement("line", {
|
|
3514
|
+
className: "ty-text-field__glyph",
|
|
3515
|
+
x1: "12",
|
|
3516
|
+
y1: "16",
|
|
3517
|
+
x2: "12.01",
|
|
3518
|
+
y2: "16"
|
|
3519
|
+
})), createElement("span", { className: "ty-text-field__error-text" }, props.error)) : null, slots["success"] && !slots["error"] ? createElement("p", {
|
|
3520
|
+
className: "ty-text-field__success",
|
|
3521
|
+
id: `${instance}-success`
|
|
3522
|
+
}, props.success) : null, truthy$1(p.showCounter) && truthy$1(p.maxLength) ? createElement("p", {
|
|
3523
|
+
className: "ty-text-field__counter",
|
|
3524
|
+
id: `${instance}-counter`
|
|
3525
|
+
}) : null));
|
|
3526
|
+
});
|
|
3527
|
+
//#endregion
|
|
3528
|
+
//#region src/elements/react/TyThemePalette.ts
|
|
3529
|
+
if (typeof window !== "undefined") defineTympanElements();
|
|
3530
|
+
const truthy = (v) => v !== void 0 && v !== null && v !== false && v !== "";
|
|
3531
|
+
const text = (v) => truthy(v) ? String(v) : void 0;
|
|
3532
|
+
const DEFAULTS = {
|
|
3533
|
+
storageKey: "ty-theme",
|
|
3534
|
+
defaultTheme: "tympan",
|
|
3535
|
+
defaultMode: "system",
|
|
3536
|
+
defaultDensity: "default",
|
|
3537
|
+
label: "Appearance",
|
|
3538
|
+
placeholder: "Search themes, modes and densities",
|
|
3539
|
+
emptyLabel: "No matches",
|
|
3540
|
+
resultsLabel: "{count} results",
|
|
3541
|
+
groupPresets: "Themes",
|
|
3542
|
+
groupPrint: "Print styles",
|
|
3543
|
+
groupMode: "Mode",
|
|
3544
|
+
groupDensity: "Density",
|
|
3545
|
+
modeSystem: "System",
|
|
3546
|
+
modeLight: "Light",
|
|
3547
|
+
modeDark: "Dark",
|
|
3548
|
+
densityCompact: "Compact",
|
|
3549
|
+
densityDefault: "Default",
|
|
3550
|
+
densityComfortable: "Comfortable",
|
|
3551
|
+
currentLabel: "Current",
|
|
3552
|
+
hintNavigate: "move",
|
|
3553
|
+
hintSelect: "choose",
|
|
3554
|
+
hintClose: "close"
|
|
3555
|
+
};
|
|
3556
|
+
const TyThemePalette = forwardRef(function TyThemePalette(props, ref) {
|
|
3557
|
+
const instance = `ty${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
3558
|
+
const handlers = useRef(props);
|
|
3559
|
+
handlers.current = props;
|
|
3560
|
+
const host = useRef(null);
|
|
3561
|
+
useImperativeHandle(ref, () => host.current);
|
|
3562
|
+
useEffect(() => {
|
|
3563
|
+
const element = host.current;
|
|
3564
|
+
if (!element) return;
|
|
3565
|
+
const listeners = [["ty-theme-change", (event) => handlers.current.onThemeChange?.(event.detail)], ["ty-close", () => handlers.current.onClose?.()]];
|
|
3566
|
+
for (const [type, listener] of listeners) element.addEventListener(type, listener);
|
|
3567
|
+
return () => {
|
|
3568
|
+
for (const [type, listener] of listeners) element.removeEventListener(type, listener);
|
|
3569
|
+
};
|
|
3570
|
+
}, []);
|
|
3571
|
+
const p = {
|
|
3572
|
+
open: props.open,
|
|
3573
|
+
apply: props.apply,
|
|
3574
|
+
storageKey: props.storageKey ?? DEFAULTS.storageKey,
|
|
3575
|
+
defaultTheme: props.defaultTheme ?? DEFAULTS.defaultTheme,
|
|
3576
|
+
defaultMode: props.defaultMode ?? DEFAULTS.defaultMode,
|
|
3577
|
+
defaultDensity: props.defaultDensity ?? DEFAULTS.defaultDensity,
|
|
3578
|
+
themes: props.themes,
|
|
3579
|
+
printStylesheet: props.printStylesheet,
|
|
3580
|
+
loadFonts: props.loadFonts,
|
|
3581
|
+
themeLabels: props.themeLabels,
|
|
3582
|
+
label: props.label ?? DEFAULTS.label,
|
|
3583
|
+
placeholder: props.placeholder ?? DEFAULTS.placeholder,
|
|
3584
|
+
emptyLabel: props.emptyLabel ?? DEFAULTS.emptyLabel,
|
|
3585
|
+
resultsLabel: props.resultsLabel ?? DEFAULTS.resultsLabel,
|
|
3586
|
+
groupPresets: props.groupPresets ?? DEFAULTS.groupPresets,
|
|
3587
|
+
groupPrint: props.groupPrint ?? DEFAULTS.groupPrint,
|
|
3588
|
+
groupMode: props.groupMode ?? DEFAULTS.groupMode,
|
|
3589
|
+
groupDensity: props.groupDensity ?? DEFAULTS.groupDensity,
|
|
3590
|
+
modeSystem: props.modeSystem ?? DEFAULTS.modeSystem,
|
|
3591
|
+
modeLight: props.modeLight ?? DEFAULTS.modeLight,
|
|
3592
|
+
modeDark: props.modeDark ?? DEFAULTS.modeDark,
|
|
3593
|
+
densityCompact: props.densityCompact ?? DEFAULTS.densityCompact,
|
|
3594
|
+
densityDefault: props.densityDefault ?? DEFAULTS.densityDefault,
|
|
3595
|
+
densityComfortable: props.densityComfortable ?? DEFAULTS.densityComfortable,
|
|
3596
|
+
currentLabel: props.currentLabel ?? DEFAULTS.currentLabel,
|
|
3597
|
+
hintNavigate: props.hintNavigate ?? DEFAULTS.hintNavigate,
|
|
3598
|
+
hintSelect: props.hintSelect ?? DEFAULTS.hintSelect,
|
|
3599
|
+
hintClose: props.hintClose ?? DEFAULTS.hintClose
|
|
3600
|
+
};
|
|
3601
|
+
return createElement("ty-theme-palette", {
|
|
3602
|
+
ref: host,
|
|
3603
|
+
id: props.id,
|
|
3604
|
+
className: props.className,
|
|
3605
|
+
"data-ty-instance": instance,
|
|
3606
|
+
"open": truthy(p.open) ? true : void 0,
|
|
3607
|
+
"apply": truthy(p.apply) ? true : void 0,
|
|
3608
|
+
"storage-key": text(p.storageKey),
|
|
3609
|
+
"default-theme": text(p.defaultTheme),
|
|
3610
|
+
"default-mode": text(p.defaultMode),
|
|
3611
|
+
"default-density": text(p.defaultDensity),
|
|
3612
|
+
"themes": text(p.themes),
|
|
3613
|
+
"print-stylesheet": text(p.printStylesheet),
|
|
3614
|
+
"load-fonts": truthy(p.loadFonts) ? true : void 0,
|
|
3615
|
+
"theme-labels": text(p.themeLabels),
|
|
3616
|
+
"label": text(p.label),
|
|
3617
|
+
"placeholder": text(p.placeholder),
|
|
3618
|
+
"empty-label": text(p.emptyLabel),
|
|
3619
|
+
"results-label": text(p.resultsLabel),
|
|
3620
|
+
"group-presets": text(p.groupPresets),
|
|
3621
|
+
"group-print": text(p.groupPrint),
|
|
3622
|
+
"group-mode": text(p.groupMode),
|
|
3623
|
+
"group-density": text(p.groupDensity),
|
|
3624
|
+
"mode-system": text(p.modeSystem),
|
|
3625
|
+
"mode-light": text(p.modeLight),
|
|
3626
|
+
"mode-dark": text(p.modeDark),
|
|
3627
|
+
"density-compact": text(p.densityCompact),
|
|
3628
|
+
"density-default": text(p.densityDefault),
|
|
3629
|
+
"density-comfortable": text(p.densityComfortable),
|
|
3630
|
+
"current-label": text(p.currentLabel),
|
|
3631
|
+
"hint-navigate": text(p.hintNavigate),
|
|
3632
|
+
"hint-select": text(p.hintSelect),
|
|
3633
|
+
"hint-close": text(p.hintClose)
|
|
3634
|
+
});
|
|
3635
|
+
});
|
|
3636
|
+
//#endregion
|
|
3637
|
+
export { TyActionMenu, TyAvatar, TyBrandWordmark, TyBreadcrumbs, TyButton, TyCheckbox, TyCommandPalette, TyCurrencyField, TyDataTable, TyDrawer, TyGradientMark, TyHeading, TyInlineNotice, TyLink, TyMarkdownView, TyModal, TyNativeSelect, TyNotificationCenter, TyPageHeader, TyPopover, TyProgressBar, TySectionHeading, TySegmentedControl, TySeparator, TySkeleton, TySkipLink, TySpinner, TyStatusPill, TySurface, TySwitch, TyTabs, TyTag, TyTagField, TyTextArea, TyTextField, TyThemePalette, TyToast, TyWheelPicker };
|
|
3638
|
+
|
|
3639
|
+
//# sourceMappingURL=elements-react.js.map
|