themelia-ui 3.0.0 → 3.2.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/.agents/skills/themelia-ui/SKILL.md +60 -33
- package/.agents/skills/themelia-ui/manifest.json +23 -0
- package/.agents/skills/themelia-ui/references/api-compatibility.md +5 -4
- package/.agents/skills/themelia-ui/references/blocks.md +123 -0
- package/.agents/skills/themelia-ui/references/composition-ladder.md +8 -8
- package/.agents/skills/themelia-ui/references/composition.md +100 -19
- package/.agents/skills/themelia-ui/references/forms.md +23 -3
- package/.agents/skills/themelia-ui/references/framework-wiring.md +41 -13
- package/.agents/skills/themelia-ui/references/i18n.md +4 -2
- package/.agents/skills/themelia-ui/references/imports.md +104 -104
- package/.agents/skills/themelia-ui/references/installation.md +60 -31
- package/.agents/skills/themelia-ui/references/migration.md +156 -5
- package/.agents/skills/themelia-ui/references/provider-and-scoping.md +37 -25
- package/.agents/skills/themelia-ui/references/reference-workflows.md +43 -0
- package/.agents/skills/themelia-ui/references/structure-and-spacing.md +147 -0
- package/.agents/skills/themelia-ui/references/theming.md +174 -131
- package/.agents/skills/themelia-ui/references/troubleshooting.md +88 -30
- package/.agents/skills/themelia-ui/references/verification.md +60 -5
- package/CHANGELOG.md +212 -0
- package/README.md +48 -60
- package/dist/accordion-CHuzMmWL.js +143 -0
- package/dist/{action-menu-BNLURfMK.js → action-menu-BwiL_F6I.js} +35 -33
- package/dist/{alert-dialog-BMVo6Z-8.js → alert-dialog-Cg2HhuBe.js} +1 -1
- package/dist/avatar-Dc_BNYfB.js +93 -0
- package/dist/badge-VlJVZjdm.js +45 -0
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/alert-dialog.js +1 -1
- package/dist/base/aspect-ratio.js +3 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +2 -2
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +1 -1
- package/dist/base/carousel.js +6 -4
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +1 -1
- package/dist/base/combobox.js +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/context-menu.js +22 -21
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +1 -1
- package/dist/base/dialog.js +1 -1
- package/dist/base/display.js +1 -1
- package/dist/base/dropdown-menu.js +1 -1
- package/dist/base/feedback.js +1 -1
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +1 -1
- package/dist/base/hover-card.js +26 -23
- package/dist/base/input-group.js +1 -1
- package/dist/base/item.js +1 -1
- package/dist/base/label.js +1 -1
- package/dist/base/menubar.js +20 -14
- package/dist/base/navigation-menu.js +47 -38
- package/dist/base/navigation.js +1 -1
- package/dist/base/otp-input.js +36 -30
- package/dist/base/overlay.js +1 -1
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +51 -47
- package/dist/base/repeaters.js +1 -1
- package/dist/base/resizable.js +2 -0
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +1 -1
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +1 -1
- package/dist/base/timeline.js +1 -1
- package/dist/base/toaster.js +1 -1
- package/dist/base/toggle.js +21 -15
- package/dist/base/toolbar.js +1 -1
- package/dist/base/tooltip.js +1 -1
- package/dist/base/typography.js +2 -2
- package/dist/base/upload.js +1 -1
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-BZYNKXdV.js → batch-action-bar-DZVMVW83.js} +11 -8
- package/dist/{admin/patterns → blocks/admin}/access.js +79 -76
- package/dist/blocks/admin/commerce.js +2493 -0
- package/dist/{patterns → blocks}/analytics.js +312 -303
- package/dist/{patterns → blocks}/onboarding.js +27 -23
- package/dist/{patterns → blocks}/timelines.js +1 -1
- package/dist/buttons-BX2JfL5X.js +173 -0
- package/dist/cards-Ddhz43Bz.js +279 -0
- package/dist/chart-BkK3Xm10.js +201 -0
- package/dist/choice-inputs-NwRxvmZN.js +694 -0
- package/dist/combobox-519ubijc.js +292 -0
- package/dist/command-JjApYFds.js +156 -0
- package/dist/comments-CCQ2QRaU.js +1443 -0
- package/dist/components/base/action-menu/action-menu.d.ts +1 -1
- package/dist/components/base/action-menu/action-menu.types.d.ts +2 -2
- package/dist/components/base/avatar/avatar.d.ts +5 -2
- package/dist/components/base/badge/badge.d.ts +10 -10
- package/dist/components/base/badge/badge.variants.d.ts +1 -2
- package/dist/components/base/badge/index.d.ts +1 -2
- package/dist/components/base/buttons/button.d.ts +9 -8
- package/dist/components/base/buttons/button.types.d.ts +2 -2
- package/dist/components/base/buttons/index.d.ts +1 -1
- package/dist/components/base/buttons/text-button.d.ts +1 -1
- package/dist/components/base/cards/card-actions.d.ts +1 -1
- package/dist/components/base/cards/card.d.ts +3 -1
- package/dist/components/base/cards/partials/card-header.d.ts +2 -1
- package/dist/components/base/choice-inputs/choice.types.d.ts +2 -2
- package/dist/components/base/choice-inputs/partials/choice-parts.d.ts +3 -3
- package/dist/components/base/command/command.d.ts +5 -2
- package/dist/components/base/display/icon-badge.d.ts +5 -3
- package/dist/components/base/display/index.d.ts +1 -1
- package/dist/components/base/display/metadata-list.d.ts +6 -6
- package/dist/components/base/display/metadata-value.d.ts +1 -1
- package/dist/components/base/display/separator.d.ts +2 -2
- package/dist/components/base/feedback/alert.d.ts +3 -2
- package/dist/components/base/feedback/empty.d.ts +5 -4
- package/dist/components/base/feedback/progress-circle.d.ts +2 -2
- package/dist/components/base/feedback/progress.d.ts +3 -1
- package/dist/components/base/forms/form-field.d.ts +2 -2
- package/dist/components/base/input-group/input-group.d.ts +8 -10
- package/dist/components/base/item/item.d.ts +2 -2
- package/dist/components/base/overlay/index.d.ts +1 -1
- package/dist/components/base/overlay/overlay.types.d.ts +7 -5
- package/dist/components/base/qr-code/qr-code.d.ts +4 -4
- package/dist/components/base/sheet/sheet.d.ts +1 -1
- package/dist/components/base/sidebar/sidebar.d.ts +9 -13
- package/dist/components/base/spinner/spinner.d.ts +2 -2
- package/dist/components/base/structure/adaptive-grid.d.ts +3 -3
- package/dist/components/base/structure/bleed.d.ts +4 -2
- package/dist/components/base/structure/grid.d.ts +10 -4
- package/dist/components/base/structure/index.d.ts +1 -1
- package/dist/components/base/structure/split.d.ts +4 -3
- package/dist/components/base/structure/stack.d.ts +5 -5
- package/dist/components/base/structure/structure.maps.d.ts +2 -1
- package/dist/components/base/structure/structure.types.d.ts +10 -4
- package/dist/components/base/toggle/toggle.d.ts +2 -2
- package/dist/components/base/toolbar/toolbar.d.ts +3 -3
- package/dist/components/base/typography/index.d.ts +2 -0
- package/dist/components/base/typography/rich-text/rich-text.variants.d.ts +9 -0
- package/dist/components/base/typography/text/index.d.ts +1 -0
- package/dist/components/base/typography/text/text.d.ts +15 -8
- package/dist/components/base/typography/text/text.variants.d.ts +41 -0
- package/dist/components/base/value-inputs/color-input.d.ts +1 -7
- package/dist/components/base/value-inputs/slider.d.ts +2 -7
- package/dist/components/{admin/patterns → blocks/admin}/commerce/vendor-profile.d.ts +2 -1
- package/dist/components/{patterns → blocks}/analytics/analytics.strings.d.ts +2 -5
- package/dist/components/features/actions/action-adapters.d.ts +3 -3
- package/dist/components/features/actions/actions.types.d.ts +3 -5
- package/dist/components/features/actions/index.d.ts +1 -1
- package/dist/components/features/activities/activities-feed.d.ts +1 -1
- package/dist/components/features/activities/activities.types.d.ts +4 -4
- package/dist/components/features/activities/activity-parts.d.ts +3 -3
- package/dist/components/features/activities/activity-row.d.ts +4 -4
- package/dist/components/features/activities/index.d.ts +1 -1
- package/dist/components/features/ai-chat/ai-chat.types.d.ts +10 -3
- package/dist/components/features/ai-chat/ai-message-surfaces.d.ts +1 -1
- package/dist/components/features/ai-chat/ai-work-surfaces.d.ts +1 -1
- package/dist/components/features/combobox/combobox.strings.d.ts +2 -2
- package/dist/components/features/combobox/fetching-combobox.d.ts +2 -1
- package/dist/components/features/combobox/resource-combobox.d.ts +3 -0
- package/dist/components/features/combobox/use-suggestions.d.ts +7 -0
- package/dist/components/features/event-calendar/event-calendar.types.d.ts +3 -0
- package/dist/components/features/media-library/index.d.ts +1 -1
- package/dist/components/features/media-library/media-library-parts.d.ts +4 -3
- package/dist/components/features/media-library/media-library-views.d.ts +4 -3
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +12 -13
- package/dist/components/features/media-library/media-library.types.d.ts +11 -9
- package/dist/components/features/media-library/media-resource-gallery.d.ts +1 -1
- package/dist/components/features/media-library/use-media-library.d.ts +1 -4
- package/dist/components/features/overlays/action-overlay-frame.d.ts +1 -1
- package/dist/components/features/overlays/index.d.ts +1 -1
- package/dist/components/features/overlays/overlay-parts.d.ts +3 -3
- package/dist/components/features/overlays/overlays.types.d.ts +8 -7
- package/dist/components/features/rich-text-editor/index.d.ts +0 -1
- package/dist/components/features/table/data-table-body.d.ts +1 -1
- package/dist/components/features/table/data-table-expanded-row.d.ts +27 -0
- package/dist/components/features/table/data-table-header.d.ts +1 -1
- package/dist/components/features/table/data-table-size.d.ts +1 -1
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/index.d.ts +1 -1
- package/dist/components/features/table/table-helpers.d.ts +9 -3
- package/dist/components/features/table/table.strings.d.ts +11 -0
- package/dist/components/features/table/table.types.d.ts +60 -2
- package/dist/components/features/theme-tweaker/index.d.ts +1 -1
- package/dist/components/features/theme-tweaker/theme-tweaker.strings.d.ts +1 -1
- package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +6 -10
- package/dist/components/features/theme-tweaker/theme-tweaker.utils.d.ts +22 -6
- package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
- package/dist/components/layout/auth/auth.d.ts +1 -1
- package/dist/components/layout/auth/auth.types.d.ts +1 -1
- package/dist/components/primitives/value.d.ts +3 -1
- package/dist/containers-B8d8U9GS.js +2 -0
- package/dist/{copyable-H1TUEY-H.js → copyable-D9Okb1w6.js} +12 -11
- package/dist/core.css +2 -2
- package/dist/css/access.css +2 -1
- package/dist/css/accordion.css +2 -1
- package/dist/css/action-menu.css +2 -1
- package/dist/css/activities.css +2 -1
- package/dist/css/ai-chat.css +2 -1
- package/dist/css/analytics.css +2 -1
- package/dist/css/app-shell.css +2 -1
- package/dist/css/aspect-ratio.css +2 -1
- package/dist/css/async-preview.css +2 -1
- package/dist/css/auth.css +2 -1
- package/dist/css/avatar.css +2 -1
- package/dist/css/badge.css +2 -1
- package/dist/css/batch-action-bar.css +2 -1
- package/dist/css/buttons.css +2 -1
- package/dist/css/cards.css +2 -1
- package/dist/css/carousel.css +2 -1
- package/dist/css/chart.css +2 -1
- package/dist/css/choice-inputs.css +2 -1
- package/dist/css/combobox.css +2 -1
- package/dist/css/combobox2.css +2 -1
- package/dist/css/command.css +2 -1
- package/dist/css/comments.css +2 -1
- package/dist/css/commerce.css +2 -1
- package/dist/css/containers.css +2 -1
- package/dist/css/copyable.css +2 -1
- package/dist/css/data-view.css +2 -1
- package/dist/css/date-pickers.css +2 -1
- package/dist/css/display.css +2 -1
- package/dist/css/dropdown-menu.css +2 -1
- package/dist/css/event-calendar.css +2 -1
- package/dist/css/feedback.css +2 -1
- package/dist/css/filters.css +2 -1
- package/dist/css/forms-numeric.css +2 -1
- package/dist/css/forms.css +2 -1
- package/dist/css/global-search.css +2 -1
- package/dist/css/header.css +2 -1
- package/dist/css/hover-card.css +2 -1
- package/dist/css/input-group.css +2 -1
- package/dist/css/item.css +2 -1
- package/dist/css/kanban.css +2 -1
- package/dist/css/label.css +2 -1
- package/dist/css/map.css +2 -1
- package/dist/css/media-library.css +2 -1
- package/dist/css/mentions.css +2 -1
- package/dist/css/menubar.css +2 -1
- package/dist/css/navigation-menu.css +2 -1
- package/dist/css/navigation.css +2 -1
- package/dist/css/navigation2.css +2 -1
- package/dist/css/onboarding.css +2 -1
- package/dist/css/otp-input.css +2 -1
- package/dist/css/overlay.css +2 -1
- package/dist/css/overlays.css +2 -1
- package/dist/css/page.css +2 -1
- package/dist/css/popover-menu.css +2 -1
- package/dist/css/popover.css +2 -1
- package/dist/css/primitives.css +2 -1
- package/dist/css/products.css +2 -1
- package/dist/css/qr-code.css +2 -1
- package/dist/css/repeaters.css +2 -1
- package/dist/css/resizable.css +2 -1
- package/dist/css/resource-assignment.css +2 -1
- package/dist/css/resource.css +2 -1
- package/dist/css/rich-text-editor.css +2 -1
- package/dist/css/schema-form.css +2 -1
- package/dist/css/sidebar.css +2 -1
- package/dist/css/sidebar2.css +2 -1
- package/dist/css/skeleton.css +2 -1
- package/dist/css/spinner.css +2 -1
- package/dist/css/structure.css +2 -1
- package/dist/css/sync.css +2 -1
- package/dist/css/table.css +2 -1
- package/dist/css/table2.css +2 -1
- package/dist/css/text-inputs.css +2 -1
- package/dist/css/theme-tweaker.css +2 -1
- package/dist/css/timeline.css +2 -1
- package/dist/css/timelines.css +2 -1
- package/dist/css/toaster.css +2 -1
- package/dist/css/toggle.css +2 -1
- package/dist/css/toolbar.css +2 -1
- package/dist/css/tooltip.css +2 -1
- package/dist/css/typography.css +2 -1
- package/dist/css/upload.css +2 -1
- package/dist/css/value-inputs.css +2 -1
- package/dist/css/workspace.css +2 -1
- package/dist/css-graph.json +1027 -0
- package/dist/date-pickers-BwCwKIVM.js +685 -0
- package/dist/{dialog-CtFCuTUF.js → dialog-CAnwRNrm.js} +1 -1
- package/dist/display-a7AoX_u7.js +664 -0
- package/dist/dropdown-menu-Br8kvjrF.js +235 -0
- package/dist/empty.js +0 -0
- package/dist/features/actions.js +6 -6
- package/dist/features/activities.js +219 -216
- package/dist/features/ai-chat.js +593 -565
- package/dist/features/async-preview.js +105 -286
- package/dist/features/combobox.js +328 -314
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +56 -55
- package/dist/features/event-calendar.js +189 -185
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +259 -260
- package/dist/features/kanban.js +39 -37
- package/dist/features/map.js +357 -354
- package/dist/features/media-library.js +931 -931
- package/dist/features/mentions.js +1 -1
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +950 -942
- package/dist/features/resource-assignment.js +39 -37
- package/dist/features/resource.js +70 -71
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +342 -338
- package/dist/features/sync.js +14 -12
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +1002 -962
- package/dist/feedback-D4qVsKlD.js +430 -0
- package/dist/{filters-DOLKRSmb.js → filters-BhsTkWpZ.js} +386 -383
- package/dist/forms-C0WeNPFF.js +250 -0
- package/dist/forms-numeric-IwQ1ltNf.js +582 -0
- package/dist/hooks/use-native-dialog.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/input-group-HS_Z0Ei_.js +119 -0
- package/dist/item-M2pmpWXh.js +150 -0
- package/dist/{label-DumoMDm6.js → label-HOBXAscw.js} +7 -5
- package/dist/layout/app-shell.js +4 -2
- package/dist/layout/auth.js +102 -100
- package/dist/layout/header.js +190 -180
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +18 -16
- package/dist/layout/settings.js +2 -2
- package/dist/layout/sidebar.js +50 -46
- package/dist/layout/workspace.js +71 -69
- package/dist/lib/action-presentation.d.ts +3 -3
- package/dist/lib/component-vocabulary.d.ts +2 -2
- package/dist/lib/css-length.d.ts +2 -0
- package/dist/lib/responsive.d.ts +1 -1
- package/dist/lib/theming/index.d.ts +1 -0
- package/dist/lib/theming/recipes.d.ts +2 -2
- package/dist/lib/theming/themes/dense.d.ts +3 -0
- package/dist/lib/theming/themes/editorial.d.ts +3 -0
- package/dist/lib/theming/themes/index.d.ts +8 -0
- package/dist/lib/theming/themes/pair.d.ts +7 -0
- package/dist/lib/theming/themes/sharp.d.ts +3 -0
- package/dist/lib/theming/themes/soft.d.ts +3 -0
- package/dist/lib/theming/themes/types.d.ts +12 -0
- package/dist/lib/ui-provider/index.d.ts +1 -1
- package/dist/lib/ui-provider/scope.d.ts +5 -8
- package/dist/lib/ui-provider/tokens.d.ts +11 -3
- package/dist/lib/ui-provider/tokens.generated.d.ts +6 -4
- package/dist/lib/ui-provider/types.d.ts +17 -19
- package/dist/lib/ui-provider/ui-scope.d.ts +1 -1
- package/dist/{mentions-BbsEHlcH.js → mentions-BOxbigwp.js} +113 -111
- package/dist/navigation-Bgu7Vc0M.js +622 -0
- package/dist/navigation-DiYACqpE.js +216 -0
- package/dist/overlay-BuQOl8aP.js +356 -0
- package/dist/{overlays-DvVoS3td.js → overlays-1sULyytH.js} +77 -75
- package/dist/popover-CA7SP_iz.js +127 -0
- package/dist/popover-menu-QXgQeWeG.js +192 -0
- package/dist/{primitives-D0bdDozz.js → primitives-BskKlf35.js} +181 -178
- package/dist/primitives.js +1 -1
- package/dist/profiles/admin.json +6 -36
- package/dist/profiles/general.json +6 -96
- package/dist/repeaters-CeH20dvr.js +445 -0
- package/dist/rich-text-editor-D_Ppm8yh.js +491 -0
- package/dist/{sheet-CKcmRbJ9.js → sheet-CJ1-OAla.js} +3 -3
- package/dist/sidebar-D8uGqxio.js +421 -0
- package/dist/skeleton-BTKNKTdj.js +173 -0
- package/dist/spinner-Tc1QCnxM.js +30 -0
- package/dist/{structure-D0WGQAP3.js → structure-CynEZ-OY.js} +15 -23
- package/dist/style.css +1 -1
- package/dist/styles/TOKENS.md +116 -275
- package/dist/styles/animation.css +114 -0
- package/dist/styles/base.css +7 -6
- package/dist/styles/fields.css +45 -63
- package/dist/styles/focus.css +12 -0
- package/dist/styles/forced-colors.css +11 -10
- package/dist/styles/index.css +23 -30
- package/dist/styles/map.css +45 -34
- package/dist/styles/mentions.css +14 -52
- package/dist/styles/overlays.css +7 -7
- package/dist/styles/tailwind.css +76 -127
- package/dist/styles/targets.css +3 -3
- package/dist/styles/theme/colour.css +86 -0
- package/dist/styles/theme/density.css +31 -0
- package/dist/styles/theme/elevation.css +9 -0
- package/dist/styles/theme/layout.css +18 -0
- package/dist/styles/theme/motion.css +18 -0
- package/dist/styles/theme/shape.css +12 -0
- package/dist/styles/theme/size.css +10 -0
- package/dist/styles/theme/spacing.css +11 -0
- package/dist/styles/theme/typography.css +20 -0
- package/dist/styles/tone.css +61 -0
- package/dist/table-B7dtIFUx.js +1262 -0
- package/dist/table-Ds_eO9av.js +191 -0
- package/dist/tailwind.css +76 -127
- package/dist/text-inputs-BboE77nZ.js +395 -0
- package/dist/theming-C5ygF5uf.js +292 -0
- package/dist/theming.js +2 -2
- package/dist/{timeline-BdaGRyj-.js → timeline-BR_jNgvz.js} +57 -49
- package/dist/{timelines-BB7550mz.js → timelines-DXG1BfIN.js} +69 -67
- package/dist/{toaster-bBMgXm8z.js → toaster-CXL8L7Mm.js} +106 -99
- package/dist/tokens.json +1027 -636
- package/dist/toolbar-DBK-c4yy.js +74 -0
- package/dist/tooltip-BPYP-jUm.js +76 -0
- package/dist/{typography-BkxEiwQ1.js → typography-DmeR05Er.js} +87 -53
- package/dist/{ui-provider-Cmoq6i_D.js → ui-provider-DpzLUD12.js} +117 -69
- package/dist/ui-provider.js +1 -1
- package/dist/upload-CYuoJykZ.js +968 -0
- package/dist/use-async-preview-BFwf9ElY.js +188 -0
- package/dist/value-inputs-ng8aVJJZ.js +728 -0
- package/docs/README.md +13 -3
- package/docs/build/browser-composition-fixture.ts +28 -0
- package/docs/build/recipes.md +11484 -10723
- package/docs/generated/component-index.json +9809 -9169
- package/docs/generated/components/INDEX.md +5 -5
- package/docs/generated/components/base--accordion.md +51 -2
- package/docs/generated/components/base--action-menu.md +14 -15
- package/docs/generated/components/base--alert-dialog.md +3 -4
- package/docs/generated/components/base--aspect-ratio.md +3 -4
- package/docs/generated/components/base--avatar.md +7 -7
- package/docs/generated/components/base--badge.md +159 -27
- package/docs/generated/components/base--batch-action-bar.md +6 -7
- package/docs/generated/components/base--buttons.md +151 -47
- package/docs/generated/components/base--cards.md +107 -14
- package/docs/generated/components/base--carousel.md +1 -2
- package/docs/generated/components/base--chart.md +44 -8
- package/docs/generated/components/base--choice-inputs.md +10 -11
- package/docs/generated/components/base--combobox.md +3 -4
- package/docs/generated/components/base--command.md +6 -6
- package/docs/generated/components/base--context-menu.md +1 -2
- package/docs/generated/components/base--copyable.md +6 -7
- package/docs/generated/components/base--date-pickers.md +6 -7
- package/docs/generated/components/base--dialog.md +6 -7
- package/docs/generated/components/base--direction.md +1 -1
- package/docs/generated/components/base--display.md +234 -54
- package/docs/generated/components/base--dropdown-menu.md +6 -7
- package/docs/generated/components/base--feedback.md +71 -18
- package/docs/generated/components/base--forms-numeric.md +6 -7
- package/docs/generated/components/base--forms.md +84 -14
- package/docs/generated/components/base--hover-card.md +3 -4
- package/docs/generated/components/base--input-group.md +27 -30
- package/docs/generated/components/base--item.md +8 -9
- package/docs/generated/components/base--label.md +2 -3
- package/docs/generated/components/base--menubar.md +2 -4
- package/docs/generated/components/base--navigation-menu.md +2 -3
- package/docs/generated/components/base--navigation.md +2 -3
- package/docs/generated/components/base--otp-input.md +3 -4
- package/docs/generated/components/base--overlay.md +56 -47
- package/docs/generated/components/base--popover-menu.md +7 -8
- package/docs/generated/components/base--popover.md +9 -10
- package/docs/generated/components/base--qr-code.md +7 -8
- package/docs/generated/components/base--repeaters.md +6 -7
- package/docs/generated/components/base--resizable.md +2 -3
- package/docs/generated/components/base--sheet.md +12 -13
- package/docs/generated/components/base--sidebar.md +9 -11
- package/docs/generated/components/base--skeleton.md +6 -7
- package/docs/generated/components/base--slot.md +1 -1
- package/docs/generated/components/base--spinner.md +5 -7
- package/docs/generated/components/base--structure.md +320 -70
- package/docs/generated/components/base--table.md +61 -3
- package/docs/generated/components/base--text-inputs.md +17 -18
- package/docs/generated/components/base--timeline.md +45 -4
- package/docs/generated/components/base--toaster.md +43 -12
- package/docs/generated/components/base--toggle.md +11 -12
- package/docs/generated/components/base--toolbar.md +7 -8
- package/docs/generated/components/base--tooltip.md +5 -6
- package/docs/generated/components/base--typography.md +317 -32
- package/docs/generated/components/base--upload.md +8 -9
- package/docs/generated/components/base--value-inputs.md +9 -38
- package/docs/generated/components/{admin--patterns--access.md → blocks--admin--access.md} +15 -6
- package/docs/generated/components/{admin--patterns--commerce.md → blocks--admin--commerce.md} +40 -41
- package/docs/generated/components/{patterns--analytics.md → blocks--analytics.md} +57 -14
- package/docs/generated/components/{patterns--onboarding.md → blocks--onboarding.md} +6 -7
- package/docs/generated/components/{patterns--timelines.md → blocks--timelines.md} +6 -7
- package/docs/generated/components/features--actions.md +8 -18
- package/docs/generated/components/features--activities.md +31 -32
- package/docs/generated/components/features--ai-chat.md +15 -15
- package/docs/generated/components/features--async-preview.md +5 -6
- package/docs/generated/components/features--combobox.md +71 -5
- package/docs/generated/components/features--comments.md +0 -1
- package/docs/generated/components/features--data-view.md +63 -8
- package/docs/generated/components/features--event-calendar.md +1 -2
- package/docs/generated/components/features--filters.md +11 -2
- package/docs/generated/components/features--global-search.md +1 -2
- package/docs/generated/components/features--kanban.md +1 -2
- package/docs/generated/components/features--map.md +1 -2
- package/docs/generated/components/features--media-library.md +105 -38
- package/docs/generated/components/features--mentions.md +7 -7
- package/docs/generated/components/features--overlays.md +75 -22
- package/docs/generated/components/features--products.md +10 -11
- package/docs/generated/components/features--resource-assignment.md +2 -3
- package/docs/generated/components/features--resource.md +3 -4
- package/docs/generated/components/features--rich-text-editor.md +42 -13
- package/docs/generated/components/features--schema-form.md +1 -2
- package/docs/generated/components/features--sync.md +2 -3
- package/docs/generated/components/features--table.md +162 -12
- package/docs/generated/components/features--theme-tweaker.md +30 -15
- package/docs/generated/components/forms.md +2 -2
- package/docs/generated/components/layout--app-shell.md +41 -11
- package/docs/generated/components/layout--auth.md +8 -9
- package/docs/generated/components/layout--containers.md +40 -1
- package/docs/generated/components/layout--header.md +2 -3
- package/docs/generated/components/layout--navigation.md +0 -1
- package/docs/generated/components/layout--page.md +33 -5
- package/docs/generated/components/layout--settings.md +0 -1
- package/docs/generated/components/layout--sidebar.md +47 -7
- package/docs/generated/components/layout--workspace.md +3 -4
- package/docs/generated/components/primitives.md +128 -17
- package/docs/generated/components/theming.md +147 -4
- package/docs/generated/components/ui-provider.md +96 -78
- package/docs/generated/composition-ladder.md +8 -8
- package/docs/generated/consumer-contract.json +5736 -0
- package/docs/generated/imports.md +104 -104
- package/docs/generated/migration-broad-imports.json +267 -90
- package/docs/generated/migration-broad-imports.md +266 -101
- package/docs/generated/migration-codemod.json +365 -70
- package/docs/generated/migration.md +665 -95
- package/docs/generated/profiles.md +27 -27
- package/docs/generated/public-api.md +104 -102
- package/docs/generated/recipes.json +755 -810
- package/docs/generated/workflows/communications-overview/analytics/communications-reference.tsx +19 -0
- package/docs/generated/workflows/index.json +691 -0
- package/docs/generated/workflows/media-picking/media-library/media-picking-reference.tsx +63 -0
- package/docs/generated/workflows/media-picking/media-library/reference-data.ts +3 -0
- package/docs/generated/workflows/multi-section-form/form-workflow/multi-section-reference.tsx +46 -0
- package/docs/generated/workflows/nested-action-flow/action-overlays/nested-action-reference.tsx +39 -0
- package/docs/generated/workflows/record-detail/page-layout/record-detail-reference.tsx +24 -0
- package/docs/generated/workflows/resource-index/data-view/resource-index-reference.tsx +51 -0
- package/docs/generated/workflows/scoped-resource-selection/combobox/scoped-resource-reference.tsx +50 -0
- package/docs/generated/workflows/website-content-editor/media-library/reference-data.ts +3 -0
- package/docs/generated/workflows/website-content-editor/rich-text-editor/website-content-reference.tsx +33 -0
- package/docs/generated/workflows/workspace-navigation/app-shell/workspace-navigation-reference.tsx +26 -0
- package/docs/learn/api-compatibility.md +5 -4
- package/docs/learn/blocks.md +123 -0
- package/docs/learn/composition.md +100 -19
- package/docs/learn/forms.md +23 -3
- package/docs/learn/framework-wiring.md +41 -13
- package/docs/learn/i18n.md +4 -2
- package/docs/learn/installation.md +60 -31
- package/docs/learn/migration.md +156 -5
- package/docs/learn/provider-and-scoping.md +37 -25
- package/docs/learn/reference-workflows.md +43 -0
- package/docs/learn/structure-and-spacing.md +147 -0
- package/docs/learn/theming.md +174 -131
- package/docs/learn/troubleshooting.md +88 -30
- package/docs/learn/verification.md +60 -5
- package/package.json +42 -473
- package/scripts/consumer/codemod.mjs +50 -32
- package/scripts/consumer/contract-reader.mjs +42 -0
- package/scripts/consumer/css-scan.mjs +51 -0
- package/scripts/consumer/diagnose.mjs +136 -0
- package/scripts/consumer/find-component.mjs +30 -17
- package/scripts/consumer/install-skill.mjs +93 -11
- package/src/styles/TOKENS.md +116 -275
- package/dist/accordion-6YPJ9XRO.js +0 -135
- package/dist/admin/patterns/access.css +0 -15
- package/dist/admin/patterns/commerce.css +0 -29
- package/dist/admin/patterns/commerce.js +0 -2493
- package/dist/avatar-CS7zow2q.js +0 -85
- package/dist/badge-CxOuTfVr.js +0 -63
- package/dist/base/accordion.css +0 -3
- package/dist/base/action-menu.css +0 -6
- package/dist/base/alert-dialog.css +0 -4
- package/dist/base/aspect-ratio.css +0 -2
- package/dist/base/avatar.css +0 -4
- package/dist/base/badge.css +0 -2
- package/dist/base/batch-action-bar.css +0 -5
- package/dist/base/buttons.css +0 -4
- package/dist/base/cards.css +0 -13
- package/dist/base/carousel.css +0 -5
- package/dist/base/chart.css +0 -2
- package/dist/base/choice-inputs.css +0 -10
- package/dist/base/combobox.css +0 -3
- package/dist/base/command.css +0 -9
- package/dist/base/context-menu.css +0 -2
- package/dist/base/copyable.css +0 -6
- package/dist/base/date-pickers.css +0 -11
- package/dist/base/dialog.css +0 -4
- package/dist/base/display.css +0 -8
- package/dist/base/dropdown-menu.css +0 -2
- package/dist/base/feedback.css +0 -5
- package/dist/base/forms-numeric.css +0 -12
- package/dist/base/forms.css +0 -14
- package/dist/base/hover-card.css +0 -2
- package/dist/base/input-group.css +0 -6
- package/dist/base/item.css +0 -9
- package/dist/base/label.css +0 -3
- package/dist/base/menubar.css +0 -2
- package/dist/base/navigation-menu.css +0 -2
- package/dist/base/navigation.css +0 -12
- package/dist/base/otp-input.css +0 -9
- package/dist/base/overlay.css +0 -4
- package/dist/base/popover-menu.css +0 -11
- package/dist/base/popover.css +0 -3
- package/dist/base/qr-code.css +0 -2
- package/dist/base/repeaters.css +0 -18
- package/dist/base/resizable.css +0 -2
- package/dist/base/sheet.css +0 -4
- package/dist/base/sidebar.css +0 -12
- package/dist/base/skeleton.css +0 -9
- package/dist/base/spinner.css +0 -2
- package/dist/base/structure.css +0 -2
- package/dist/base/table.css +0 -3
- package/dist/base/text-inputs.css +0 -2
- package/dist/base/timeline.css +0 -9
- package/dist/base/toaster.css +0 -2
- package/dist/base/toggle.css +0 -2
- package/dist/base/toolbar.css +0 -5
- package/dist/base/tooltip.css +0 -2
- package/dist/base/typography.css +0 -2
- package/dist/base/upload.css +0 -10
- package/dist/base/value-inputs.css +0 -14
- package/dist/buttons-CqXKWty3.js +0 -179
- package/dist/cards-C6Ulbkw7.js +0 -271
- package/dist/chart-nomhJ87z.js +0 -193
- package/dist/choice-inputs-OUDn0kQw.js +0 -680
- package/dist/combobox-C8oP92bT.js +0 -266
- package/dist/command-Bp3B6pUu.js +0 -143
- package/dist/comments-CAnDlyXO.js +0 -1438
- package/dist/components/admin/patterns/index.d.ts +0 -2
- package/dist/components/features/rich-text-editor/exec-command-engine.d.ts +0 -2
- package/dist/components/patterns/index.d.ts +0 -3
- package/dist/css/styles.css +0 -1
- package/dist/date-pickers-DOwIT-Nk.js +0 -661
- package/dist/display-B3Q17h5z.js +0 -645
- package/dist/dropdown-menu-TyNLCLML.js +0 -223
- package/dist/features/actions.css +0 -11
- package/dist/features/activities.css +0 -25
- package/dist/features/ai-chat.css +0 -14
- package/dist/features/async-preview.css +0 -10
- package/dist/features/combobox.css +0 -12
- package/dist/features/comments.css +0 -24
- package/dist/features/data-view.css +0 -31
- package/dist/features/event-calendar.css +0 -17
- package/dist/features/filters.css +0 -24
- package/dist/features/global-search.css +0 -19
- package/dist/features/kanban.css +0 -7
- package/dist/features/map.css +0 -15
- package/dist/features/media-library.css +0 -27
- package/dist/features/mentions.css +0 -17
- package/dist/features/overlays.css +0 -11
- package/dist/features/products.css +0 -29
- package/dist/features/resource-assignment.css +0 -14
- package/dist/features/resource.css +0 -15
- package/dist/features/rich-text-editor.css +0 -8
- package/dist/features/schema-form.css +0 -22
- package/dist/features/sync.css +0 -11
- package/dist/features/table.css +0 -20
- package/dist/features/theme-tweaker.css +0 -27
- package/dist/feedback-DRerHGuV.js +0 -469
- package/dist/forms-CPrGGif_.js +0 -242
- package/dist/forms-numeric-CPVsL7Vf.js +0 -569
- package/dist/index.css +0 -3
- package/dist/input-group-BYe0rhoB.js +0 -126
- package/dist/item-B3yQ26as.js +0 -146
- package/dist/layout/app-shell.css +0 -13
- package/dist/layout/auth.css +0 -14
- package/dist/layout/containers.css +0 -2
- package/dist/layout/header.css +0 -20
- package/dist/layout/navigation.css +0 -11
- package/dist/layout/page.css +0 -15
- package/dist/layout/settings.css +0 -16
- package/dist/layout/sidebar.css +0 -16
- package/dist/layout/workspace.css +0 -15
- package/dist/navigation-CsqTA16F.js +0 -614
- package/dist/navigation-DzxzPuwg.js +0 -202
- package/dist/overlay-WQOsLd69.js +0 -345
- package/dist/patterns/analytics.css +0 -15
- package/dist/patterns/onboarding.css +0 -11
- package/dist/patterns/timelines.css +0 -11
- package/dist/popover-DriLnIFc.js +0 -123
- package/dist/popover-menu-C2UCMAe7.js +0 -189
- package/dist/primitives.css +0 -3
- package/dist/repeaters-DuP1N0nw.js +0 -438
- package/dist/rich-text-editor-BQXFe9oN.js +0 -595
- package/dist/sidebar-D0N6ckJL.js +0 -412
- package/dist/skeleton-DGR9df28.js +0 -172
- package/dist/spinner-CUAVFecI.js +0 -52
- package/dist/styles/FACTORS.md +0 -36
- package/dist/styles/SCOPES.md +0 -86
- package/dist/styles/themes/default.css +0 -164
- package/dist/styles/theming/animation.css +0 -143
- package/dist/styles/theming/colors.css +0 -97
- package/dist/styles/theming/feedback.css +0 -17
- package/dist/styles/theming/field.css +0 -21
- package/dist/styles/theming/focus.css +0 -88
- package/dist/styles/theming/layers.css +0 -13
- package/dist/styles/theming/layout.css +0 -21
- package/dist/styles/theming/motion.css +0 -42
- package/dist/styles/theming/overlay.css +0 -52
- package/dist/styles/theming/sizing.css +0 -118
- package/dist/styles/theming/text.css +0 -30
- package/dist/styles/theming/typography.css +0 -26
- package/dist/styles/tokens/components.css +0 -22
- package/dist/styles/tokens/foundation.css +0 -80
- package/dist/styles/tokens/layout.css +0 -19
- package/dist/styles/tokens/palette.css +0 -88
- package/dist/styles/tokens/primitives.css +0 -18
- package/dist/styles/tokens/states.css +0 -77
- package/dist/table-BC4qqsUb.js +0 -180
- package/dist/table-BHDpjajL.js +0 -982
- package/dist/text-inputs-DF_lD7pA.js +0 -385
- package/dist/theming-D6KRU7hO.js +0 -104
- package/dist/toolbar-DWRywF0R.js +0 -68
- package/dist/tooltip-t1VQQ2tZ.js +0 -73
- package/dist/upload-B38YZeFJ.js +0 -938
- package/dist/value-inputs-Q4ymjXlV.js +0 -716
- package/src/styles/FACTORS.md +0 -36
- package/src/styles/SCOPES.md +0 -86
- /package/dist/components/{admin/patterns → blocks/admin}/access/admin.strings.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/access/credential-list.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/access/index.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/access/role-permissions.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/access/sensitive-action.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/account.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/address-lines.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/booking.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/cart.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/commerce.strings.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/commerce.types.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/format-amount.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/index.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/inventory-section.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/invoice.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/loyalty.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-customer.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-detail.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-line-item.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-transactions.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/seo-listing.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/seo-score.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/summary-panel.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/activity-heatmap.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/analytics.types.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/chart-card.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/format-metric-value.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/index.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-bar.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-comparison.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-gradient.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-grid.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-micro-grid.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-skeleton.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-trend-chip.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/time-ruler.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/onboarding/checklist.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/onboarding/index.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/onboarding/onboarding.strings.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/changelog-timeline.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/index.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/milestones-timeline.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/steps.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/timelines.strings.d.ts +0 -0
- /package/dist/styles/{theming/breakpoints.css → breakpoints.css} +0 -0
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
6
|
-
import { i
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { i as
|
|
11
|
-
import { o as
|
|
12
|
-
import {
|
|
2
|
+
import "#core.css";
|
|
3
|
+
import { a as e, s as t } from "../typography-DmeR05Er.js";
|
|
4
|
+
import { t as n } from "../cx--CBrhWH0.js";
|
|
5
|
+
import { c as r } from "../buttons-BX2JfL5X.js";
|
|
6
|
+
import { i, n as a, t as o } from "../tooltip-BPYP-jUm.js";
|
|
7
|
+
import { G as s, K as c, W as l, q as u } from "../primitives-BskKlf35.js";
|
|
8
|
+
import { t as d } from "../badge-VlJVZjdm.js";
|
|
9
|
+
import { s as f } from "../feedback-D4qVsKlD.js";
|
|
10
|
+
import { i as p } from "../cards-Ddhz43Bz.js";
|
|
11
|
+
import { o as m } from "../skeleton-BTKNKTdj.js";
|
|
12
|
+
import { l as h, u as g } from "../display-a7AoX_u7.js";
|
|
13
|
+
import { n as _, t as v } from "../chart-BkK3Xm10.js";
|
|
13
14
|
import { ArrowDownIcon as y, ArrowRightIcon as b, ArrowUpIcon as x, CalendarIcon as S, EqualIcon as C, InfoIcon as w, MinusIcon as T } from "lucide-react";
|
|
14
15
|
import { useId as E } from "react";
|
|
15
16
|
import { jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
16
17
|
import * as k from "recharts";
|
|
17
|
-
|
|
18
|
+
import "#css/analytics.css";
|
|
19
|
+
//#region src/components/blocks/analytics/analytics.strings.ts
|
|
18
20
|
var A = {
|
|
19
21
|
metricErrorLabel: "Unable to load metric",
|
|
20
22
|
metricProgressLabel: (e) => `${e} progress`,
|
|
@@ -60,19 +62,19 @@ var A = {
|
|
|
60
62
|
formatHourTitle: (e, t) => `${e}:00 — ${t}`
|
|
61
63
|
};
|
|
62
64
|
//#endregion
|
|
63
|
-
//#region src/components/
|
|
65
|
+
//#region src/components/blocks/analytics/format-metric-value.ts
|
|
64
66
|
function P(e) {
|
|
65
67
|
if (e.value === null || e.value === void 0) return "—";
|
|
66
68
|
let t = typeof e.value == "number" ? e.value : null;
|
|
67
69
|
if (t === null) return String(e.value);
|
|
68
70
|
switch (e.valueType) {
|
|
69
|
-
case "currency": return
|
|
71
|
+
case "currency": return l(t, {
|
|
70
72
|
currency: e.currency,
|
|
71
73
|
currencyDisplay: "code"
|
|
72
74
|
}).replace(/ /g, " ");
|
|
73
|
-
case "percentage": return
|
|
74
|
-
case "duration": return
|
|
75
|
-
case "number": return
|
|
75
|
+
case "percentage": return u(t);
|
|
76
|
+
case "duration": return s(t);
|
|
77
|
+
case "number": return c(t);
|
|
76
78
|
default: return String(t);
|
|
77
79
|
}
|
|
78
80
|
}
|
|
@@ -80,117 +82,116 @@ function F(e) {
|
|
|
80
82
|
return e.trend ? e.trend : e.change?.direction === "up" ? "positive" : e.change?.direction === "down" ? "negative" : "neutral";
|
|
81
83
|
}
|
|
82
84
|
var I = {
|
|
83
|
-
metric: "
|
|
84
|
-
metricError: "
|
|
85
|
-
metricSpark: "
|
|
86
|
-
metricTile: "
|
|
87
|
-
metricLabelGroup: "
|
|
88
|
-
metricLabelIcon: "
|
|
89
|
-
metricValueRow: "
|
|
90
|
-
metricCard: "
|
|
91
|
-
metricCardBody: "
|
|
92
|
-
metricDelta: "
|
|
93
|
-
metricInfo: "
|
|
94
|
-
metricMinimal: "
|
|
95
|
-
metricCompact: "
|
|
96
|
-
metricCompactBody: "
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
metricAccent: "
|
|
103
|
-
metricAccentBody: "
|
|
104
|
-
trendChip: "
|
|
105
|
-
trendChipIcon: "
|
|
106
|
-
metricSkeleton: "
|
|
107
|
-
skeletonLabel: "
|
|
108
|
-
skeletonValue: "
|
|
109
|
-
skeletonSpark: "
|
|
110
|
-
metricGridRoot: "
|
|
111
|
-
metricGrid: "
|
|
112
|
-
metricBar: "
|
|
113
|
-
metricBarRow: "
|
|
114
|
-
metricBarPeriod: "
|
|
115
|
-
metricBarCells: "
|
|
116
|
-
metricBarCell: "
|
|
117
|
-
metricBarFooter: "
|
|
118
|
-
tileLabel: "
|
|
119
|
-
tileValue: "
|
|
120
|
-
tileChange: "
|
|
121
|
-
tileSubtitle: "
|
|
122
|
-
tileFooter: "
|
|
123
|
-
comparison: "
|
|
124
|
-
comparisonPeriods: "
|
|
125
|
-
comparisonPair: "
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
rulerMarker: "
|
|
151
|
-
rulerTicks: "
|
|
152
|
-
rulerTick: "
|
|
153
|
-
rulerLegend: "
|
|
154
|
-
rulerLegendItem: "
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
gradientPlot: "analytics__gradientPlot___k5Yi_"
|
|
85
|
+
metric: "analytics__metric___UOkDx",
|
|
86
|
+
metricError: "analytics__metricError___5pHze",
|
|
87
|
+
metricSpark: "analytics__metricSpark___s2e_b",
|
|
88
|
+
metricTile: "analytics__metricTile___fY6OD",
|
|
89
|
+
metricLabelGroup: "analytics__metricLabelGroup___2Xegu",
|
|
90
|
+
metricLabelIcon: "analytics__metricLabelIcon___hJFZf",
|
|
91
|
+
metricValueRow: "analytics__metricValueRow___jMFXC",
|
|
92
|
+
metricCard: "analytics__metricCard___tN5GR",
|
|
93
|
+
metricCardBody: "analytics__metricCardBody___l6xx1",
|
|
94
|
+
metricDelta: "analytics__metricDelta___mSlJf",
|
|
95
|
+
metricInfo: "analytics__metricInfo___QJznJ",
|
|
96
|
+
metricMinimal: "analytics__metricMinimal___rgcD6",
|
|
97
|
+
metricCompact: "analytics__metricCompact___IUFoQ",
|
|
98
|
+
metricCompactBody: "analytics__metricCompactBody___h7BrF",
|
|
99
|
+
metricHead: "analytics__metricHead___s8uUE",
|
|
100
|
+
metricDot: "analytics__metricDot___C0fvq",
|
|
101
|
+
metricSegments: "analytics__metricSegments___1AW0c",
|
|
102
|
+
metricSegment: "analytics__metricSegment___FR38j",
|
|
103
|
+
metricPanel: "analytics__metricPanel___5X3dw",
|
|
104
|
+
metricAccent: "analytics__metricAccent___kmVpF",
|
|
105
|
+
metricAccentBody: "analytics__metricAccentBody___aGMge",
|
|
106
|
+
trendChip: "analytics__trendChip___CqCJX",
|
|
107
|
+
trendChipIcon: "analytics__trendChipIcon___wVVHw",
|
|
108
|
+
metricSkeleton: "analytics__metricSkeleton___tVM35",
|
|
109
|
+
skeletonLabel: "analytics__skeletonLabel___hIq4f",
|
|
110
|
+
skeletonValue: "analytics__skeletonValue___Xgw1r",
|
|
111
|
+
skeletonSpark: "analytics__skeletonSpark___yXJID",
|
|
112
|
+
metricGridRoot: "analytics__metricGridRoot___g7xHF",
|
|
113
|
+
metricGrid: "analytics__metricGrid___QZ3Wv",
|
|
114
|
+
metricBar: "analytics__metricBar___qjkCF",
|
|
115
|
+
metricBarRow: "analytics__metricBarRow___u_zCy",
|
|
116
|
+
metricBarPeriod: "analytics__metricBarPeriod___7PC0V",
|
|
117
|
+
metricBarCells: "analytics__metricBarCells___4RGvW",
|
|
118
|
+
metricBarCell: "analytics__metricBarCell___Ag53H",
|
|
119
|
+
metricBarFooter: "analytics__metricBarFooter___z3BpC",
|
|
120
|
+
tileLabel: "analytics__tileLabel___8fDZA",
|
|
121
|
+
tileValue: "analytics__tileValue___egTkI",
|
|
122
|
+
tileChange: "analytics__tileChange___stA9o",
|
|
123
|
+
tileSubtitle: "analytics__tileSubtitle___bROy8",
|
|
124
|
+
tileFooter: "analytics__tileFooter___D5zui",
|
|
125
|
+
comparison: "analytics__comparison___Uc_0U",
|
|
126
|
+
comparisonPeriods: "analytics__comparisonPeriods___MDI3F",
|
|
127
|
+
comparisonPair: "analytics__comparisonPair___FnCbY",
|
|
128
|
+
comparisonBoxPrevious: "analytics__comparisonBoxPrevious___Ahlgg",
|
|
129
|
+
comparisonArrow: "analytics__comparisonArrow___HFpZ3",
|
|
130
|
+
comparisonArrowWide: "analytics__comparisonArrowWide___OGOCe",
|
|
131
|
+
comparisonArrowNarrow: "analytics__comparisonArrowNarrow___B5WxO",
|
|
132
|
+
comparisonDelta: "analytics__comparisonDelta___OmrcE",
|
|
133
|
+
comparisonChip: "analytics__comparisonChip___tbusz",
|
|
134
|
+
comparisonChipIcon: "analytics__comparisonChipIcon___Wmtu6",
|
|
135
|
+
chartCardChart: "analytics__chartCardChart___BaS1R",
|
|
136
|
+
chartCardFooter: "analytics__chartCardFooter___dySMa",
|
|
137
|
+
heatmap: "analytics__heatmap___Mlv8C",
|
|
138
|
+
heatmapScroll: "analytics__heatmapScroll___adsr5",
|
|
139
|
+
heatmapMonths: "analytics__heatmapMonths___rW_nt",
|
|
140
|
+
heatmapMonth: "analytics__heatmapMonth___jG5zd",
|
|
141
|
+
heatmapBody: "analytics__heatmapBody___wQjvY",
|
|
142
|
+
heatmapDays: "analytics__heatmapDays___bkUCY",
|
|
143
|
+
heatmapDay: "analytics__heatmapDay___FgH9F",
|
|
144
|
+
heatmapWeeks: "analytics__heatmapWeeks___uQoI7",
|
|
145
|
+
heatmapWeek: "analytics__heatmapWeek___PT5lj",
|
|
146
|
+
heatmapCell: "analytics__heatmapCell___OTWu2",
|
|
147
|
+
heatmapLegend: "analytics__heatmapLegend___RxYx3",
|
|
148
|
+
ruler: "analytics__ruler___y5TS9",
|
|
149
|
+
rulerBar: "analytics__rulerBar___6_30M",
|
|
150
|
+
rulerHour: "analytics__rulerHour___kdH1x",
|
|
151
|
+
rulerSwatch: "analytics__rulerSwatch___3yGhr",
|
|
152
|
+
rulerMarker: "analytics__rulerMarker___IDbiv",
|
|
153
|
+
rulerTicks: "analytics__rulerTicks___j2zHH",
|
|
154
|
+
rulerTick: "analytics__rulerTick___e6xRJ",
|
|
155
|
+
rulerLegend: "analytics__rulerLegend___c2JPC",
|
|
156
|
+
rulerLegendItem: "analytics__rulerLegendItem___OA0TS",
|
|
157
|
+
rulerMarkerSwatch: "analytics__rulerMarkerSwatch___KitnM",
|
|
158
|
+
microGridRoot: "analytics__microGridRoot___TqWhk",
|
|
159
|
+
microGrid: "analytics__microGrid___-RZQQ",
|
|
160
|
+
microCell: "analytics__microCell___6GN2m",
|
|
161
|
+
microBars: "analytics__microBars___ek3f2",
|
|
162
|
+
microBar: "analytics__microBar___pYrn3",
|
|
163
|
+
microDots: "analytics__microDots___ronJG",
|
|
164
|
+
microDot: "analytics__microDot___oSzNV",
|
|
165
|
+
microProgress: "analytics__microProgress___HVbXo",
|
|
166
|
+
microMarkRow: "analytics__microMarkRow___nnfpu",
|
|
167
|
+
microPie: "analytics__microPie___rpr8z",
|
|
168
|
+
microSvg: "analytics__microSvg___XsOre",
|
|
169
|
+
microLine: "analytics__microLine___cKOIW",
|
|
170
|
+
microArea: "analytics__microArea___p4ZT0",
|
|
171
|
+
gradient: "analytics__gradient____bZ7b",
|
|
172
|
+
gradientHead: "analytics__gradientHead___giugZ",
|
|
173
|
+
gradientHeadText: "analytics__gradientHeadText___MYAUD",
|
|
174
|
+
gradientChip: "analytics__gradientChip___8BdX6",
|
|
175
|
+
gradientPlot: "analytics__gradientPlot___H_Eio"
|
|
175
176
|
};
|
|
176
177
|
//#endregion
|
|
177
|
-
//#region src/components/
|
|
178
|
-
function L({ variant:
|
|
179
|
-
return /* @__PURE__ */ O(
|
|
180
|
-
surface:
|
|
181
|
-
"data-variant":
|
|
178
|
+
//#region src/components/blocks/analytics/metric-skeleton.tsx
|
|
179
|
+
function L({ variant: e = "default", className: t, ...r }) {
|
|
180
|
+
return /* @__PURE__ */ O(h, {
|
|
181
|
+
surface: e === "accent" ? "card" : "plain",
|
|
182
|
+
"data-variant": e,
|
|
182
183
|
"aria-busy": "true",
|
|
183
|
-
className:
|
|
184
|
+
className: n("metric-skeleton--component", I.metricSkeleton, t),
|
|
184
185
|
...r,
|
|
185
186
|
children: [
|
|
186
|
-
/* @__PURE__ */ D(
|
|
187
|
-
/* @__PURE__ */ D(
|
|
188
|
-
|
|
187
|
+
/* @__PURE__ */ D(m, { className: I.skeletonLabel }),
|
|
188
|
+
/* @__PURE__ */ D(m, { className: I.skeletonValue }),
|
|
189
|
+
e !== "minimal" && e !== "compact" && /* @__PURE__ */ D(m, { className: I.skeletonSpark })
|
|
189
190
|
]
|
|
190
191
|
});
|
|
191
192
|
}
|
|
192
193
|
//#endregion
|
|
193
|
-
//#region src/components/
|
|
194
|
+
//#region src/components/blocks/analytics/metric-trend-chip.tsx
|
|
194
195
|
var R = {
|
|
195
196
|
up: x,
|
|
196
197
|
down: y,
|
|
@@ -199,82 +200,87 @@ var R = {
|
|
|
199
200
|
function z(e, t) {
|
|
200
201
|
return e || (t === "up" ? "positive" : t === "down" ? "negative" : "neutral");
|
|
201
202
|
}
|
|
202
|
-
|
|
203
|
-
|
|
203
|
+
var B = {
|
|
204
|
+
positive: "success",
|
|
205
|
+
negative: "destructive",
|
|
206
|
+
neutral: "neutral"
|
|
207
|
+
};
|
|
208
|
+
function V({ change: e, trend: r, variant: i = "default", className: a, ...o }) {
|
|
209
|
+
let s = B[z(r, e.direction)], c = R[e.direction], l = e.direction === "up" ? "+" : "";
|
|
204
210
|
return /* @__PURE__ */ O("span", {
|
|
205
211
|
"data-tone": s,
|
|
206
212
|
"data-variant": i,
|
|
207
|
-
className:
|
|
213
|
+
className: n("metric-trend-chip--component", I.trendChip, a),
|
|
208
214
|
...o,
|
|
209
215
|
children: [
|
|
210
216
|
i !== "inline" && /* @__PURE__ */ D(c, {
|
|
211
217
|
className: I.trendChipIcon,
|
|
212
218
|
"aria-hidden": "true"
|
|
213
219
|
}),
|
|
214
|
-
/* @__PURE__ */ O(
|
|
220
|
+
/* @__PURE__ */ O(t, {
|
|
215
221
|
tag: "span",
|
|
216
222
|
type: "inherit",
|
|
217
223
|
size: "xs",
|
|
218
224
|
weight: "medium",
|
|
219
225
|
numeric: !0,
|
|
220
226
|
className: "metric-trend-chip--value",
|
|
221
|
-
children: [l,
|
|
227
|
+
children: [l, e.value]
|
|
222
228
|
}),
|
|
223
|
-
|
|
229
|
+
e.label != null && /* @__PURE__ */ D(t, {
|
|
224
230
|
tag: "span",
|
|
225
231
|
size: "xs",
|
|
226
232
|
type: "secondary",
|
|
227
233
|
className: "metric-trend-chip--label",
|
|
228
|
-
children:
|
|
234
|
+
children: e.label
|
|
229
235
|
})
|
|
230
236
|
]
|
|
231
237
|
});
|
|
232
238
|
}
|
|
233
239
|
//#endregion
|
|
234
|
-
//#region src/components/
|
|
235
|
-
var
|
|
240
|
+
//#region src/components/blocks/analytics/metric.tsx
|
|
241
|
+
var H = 16, U = {
|
|
236
242
|
positive: "success",
|
|
237
243
|
negative: "destructive",
|
|
238
244
|
neutral: "neutral"
|
|
239
245
|
};
|
|
240
|
-
function
|
|
246
|
+
function W({ data: r, variant: s = "default", tone: c = "neutral", showSparkline: l = !0, showChange: u = !0, showIcon: d = !0, loading: f = !1, error: m = !1, strings: _, progress: y = 0, className: b, ...x }) {
|
|
241
247
|
let S = {
|
|
242
248
|
...A,
|
|
243
249
|
..._
|
|
244
|
-
}, C = P(r), T = F(r), E = r.icon, k =
|
|
245
|
-
if (
|
|
246
|
-
variant:
|
|
250
|
+
}, C = P(r), T = F(r), E = r.icon, k = l && !!r.sparkline?.length, j = u && !!r.change, M = n("metric--component", I.metric, b);
|
|
251
|
+
if (f) return /* @__PURE__ */ D(L, {
|
|
252
|
+
variant: s,
|
|
247
253
|
className: M
|
|
248
254
|
});
|
|
249
|
-
if (
|
|
255
|
+
if (m) return /* @__PURE__ */ D(h, {
|
|
250
256
|
surface: "card",
|
|
251
|
-
"data-variant":
|
|
252
|
-
className:
|
|
257
|
+
"data-variant": s,
|
|
258
|
+
className: n(M, I.metricError),
|
|
253
259
|
...x,
|
|
254
|
-
children: /* @__PURE__ */ D(
|
|
260
|
+
children: /* @__PURE__ */ D(t, {
|
|
255
261
|
type: "secondary",
|
|
256
262
|
children: S.metricErrorLabel
|
|
257
263
|
})
|
|
258
264
|
});
|
|
259
265
|
let N = k ? /* @__PURE__ */ D(v, {
|
|
260
266
|
data: r.sparkline,
|
|
261
|
-
tone:
|
|
262
|
-
className:
|
|
263
|
-
}) : null, R = (e) => j ? /* @__PURE__ */ D(
|
|
267
|
+
tone: U[T],
|
|
268
|
+
className: n("metric--sparkline", I.metricSpark)
|
|
269
|
+
}) : null, R = (e) => j ? /* @__PURE__ */ D(V, {
|
|
264
270
|
change: r.change,
|
|
265
271
|
trend: r.trend,
|
|
266
272
|
variant: e
|
|
267
273
|
}) : null;
|
|
268
|
-
if (
|
|
274
|
+
if (s === "minimal") return /* @__PURE__ */ O("span", {
|
|
269
275
|
"data-variant": "minimal",
|
|
270
|
-
className:
|
|
276
|
+
className: n(M, I.metricMinimal),
|
|
271
277
|
...x,
|
|
272
278
|
children: [
|
|
273
|
-
/* @__PURE__ */ O(
|
|
279
|
+
/* @__PURE__ */ O(e, {
|
|
274
280
|
className: "metric--label",
|
|
275
281
|
children: [r.label, ":"]
|
|
276
282
|
}),
|
|
277
|
-
/* @__PURE__ */ D(
|
|
283
|
+
/* @__PURE__ */ D(t, {
|
|
278
284
|
tag: "span",
|
|
279
285
|
weight: "semibold",
|
|
280
286
|
numeric: !0,
|
|
@@ -284,9 +290,9 @@ function U({ data: r, variant: i = "default", tone: u = "neutral", showSparkline
|
|
|
284
290
|
R("inline")
|
|
285
291
|
]
|
|
286
292
|
});
|
|
287
|
-
if (
|
|
293
|
+
if (s === "card") return /* @__PURE__ */ O(p, {
|
|
288
294
|
"data-variant": "card",
|
|
289
|
-
className:
|
|
295
|
+
className: n(M, I.metricCard),
|
|
290
296
|
onClick: r.onClick,
|
|
291
297
|
...x,
|
|
292
298
|
children: [
|
|
@@ -296,26 +302,26 @@ function U({ data: r, variant: i = "default", tone: u = "neutral", showSparkline
|
|
|
296
302
|
/* @__PURE__ */ O("span", {
|
|
297
303
|
className: I.metricLabelGroup,
|
|
298
304
|
children: [
|
|
299
|
-
|
|
305
|
+
d && E && /* @__PURE__ */ D(E, {
|
|
300
306
|
className: I.metricLabelIcon,
|
|
301
307
|
"aria-hidden": "true"
|
|
302
308
|
}),
|
|
303
|
-
/* @__PURE__ */ D(
|
|
309
|
+
/* @__PURE__ */ D(e, {
|
|
304
310
|
className: "metric--label",
|
|
305
311
|
children: r.label
|
|
306
312
|
}),
|
|
307
|
-
!!r.tooltip && /* @__PURE__ */ O(
|
|
313
|
+
!!r.tooltip && /* @__PURE__ */ O(o, { children: [/* @__PURE__ */ D(i, {
|
|
308
314
|
render: /* @__PURE__ */ D("button", {
|
|
309
315
|
type: "button",
|
|
310
316
|
"data-hit-area": !0,
|
|
311
317
|
className: I.metricInfo,
|
|
312
|
-
"aria-label": S.metricInfoLabel
|
|
318
|
+
"aria-label": S.metricInfoLabel
|
|
313
319
|
}),
|
|
314
320
|
children: /* @__PURE__ */ D(w, { "aria-hidden": "true" })
|
|
315
|
-
}), /* @__PURE__ */ D(
|
|
321
|
+
}), /* @__PURE__ */ D(a, { children: r.tooltip })] })
|
|
316
322
|
]
|
|
317
323
|
}),
|
|
318
|
-
/* @__PURE__ */ D(
|
|
324
|
+
/* @__PURE__ */ D(t, {
|
|
319
325
|
size: "lg",
|
|
320
326
|
weight: "semibold",
|
|
321
327
|
numeric: !0,
|
|
@@ -327,7 +333,7 @@ function U({ data: r, variant: i = "default", tone: u = "neutral", showSparkline
|
|
|
327
333
|
}),
|
|
328
334
|
(j || r.subtitle != null) && /* @__PURE__ */ O("div", {
|
|
329
335
|
className: I.metricDelta,
|
|
330
|
-
children: [R("badge"), r.subtitle != null && /* @__PURE__ */ D(
|
|
336
|
+
children: [R("badge"), r.subtitle != null && /* @__PURE__ */ D(t, {
|
|
331
337
|
tag: "span",
|
|
332
338
|
size: "xs",
|
|
333
339
|
type: "secondary",
|
|
@@ -338,7 +344,7 @@ function U({ data: r, variant: i = "default", tone: u = "neutral", showSparkline
|
|
|
338
344
|
]
|
|
339
345
|
}),
|
|
340
346
|
N,
|
|
341
|
-
r.footer != null && /* @__PURE__ */ D(
|
|
347
|
+
r.footer != null && /* @__PURE__ */ D(t, {
|
|
342
348
|
size: "xs",
|
|
343
349
|
type: "secondary",
|
|
344
350
|
className: "metric--footer",
|
|
@@ -346,21 +352,21 @@ function U({ data: r, variant: i = "default", tone: u = "neutral", showSparkline
|
|
|
346
352
|
})
|
|
347
353
|
]
|
|
348
354
|
});
|
|
349
|
-
if (
|
|
355
|
+
if (s === "compact") return /* @__PURE__ */ O("div", {
|
|
350
356
|
"data-variant": "compact",
|
|
351
|
-
className:
|
|
357
|
+
className: n(M, I.metricCompact),
|
|
352
358
|
...x,
|
|
353
359
|
children: [
|
|
354
|
-
|
|
360
|
+
d && E && /* @__PURE__ */ D(g, {
|
|
355
361
|
icon: E,
|
|
356
362
|
"aria-hidden": "true"
|
|
357
363
|
}),
|
|
358
364
|
/* @__PURE__ */ O("div", {
|
|
359
365
|
className: I.metricCompactBody,
|
|
360
|
-
children: [/* @__PURE__ */ D(
|
|
366
|
+
children: [/* @__PURE__ */ D(e, {
|
|
361
367
|
className: "metric--label",
|
|
362
368
|
children: r.label
|
|
363
|
-
}), /* @__PURE__ */ D(
|
|
369
|
+
}), /* @__PURE__ */ D(t, {
|
|
364
370
|
weight: "semibold",
|
|
365
371
|
numeric: !0,
|
|
366
372
|
lineHeight: "tight",
|
|
@@ -371,27 +377,27 @@ function U({ data: r, variant: i = "default", tone: u = "neutral", showSparkline
|
|
|
371
377
|
R("badge")
|
|
372
378
|
]
|
|
373
379
|
});
|
|
374
|
-
if (
|
|
380
|
+
if (s === "accent") return /* @__PURE__ */ O("div", {
|
|
375
381
|
"data-variant": "accent",
|
|
376
382
|
"data-theme": "dark",
|
|
377
|
-
className:
|
|
383
|
+
className: n(M, I.metricAccent),
|
|
378
384
|
...x,
|
|
379
385
|
children: [/* @__PURE__ */ O("div", {
|
|
380
386
|
className: I.metricAccentBody,
|
|
381
387
|
children: [
|
|
382
388
|
/* @__PURE__ */ O("div", {
|
|
383
389
|
className: I.metricHead,
|
|
384
|
-
children: [/* @__PURE__ */ D(
|
|
390
|
+
children: [/* @__PURE__ */ D(e, {
|
|
385
391
|
className: "metric--label",
|
|
386
392
|
children: r.label
|
|
387
|
-
}),
|
|
393
|
+
}), d && E && /* @__PURE__ */ D(g, {
|
|
388
394
|
icon: E,
|
|
389
395
|
"aria-hidden": "true"
|
|
390
396
|
})]
|
|
391
397
|
}),
|
|
392
398
|
/* @__PURE__ */ O("div", {
|
|
393
399
|
className: I.metricValueRow,
|
|
394
|
-
children: [/* @__PURE__ */ D(
|
|
400
|
+
children: [/* @__PURE__ */ D(t, {
|
|
395
401
|
size: "lg",
|
|
396
402
|
weight: "semibold",
|
|
397
403
|
numeric: !0,
|
|
@@ -400,7 +406,7 @@ function U({ data: r, variant: i = "default", tone: u = "neutral", showSparkline
|
|
|
400
406
|
children: C
|
|
401
407
|
}), R("compact")]
|
|
402
408
|
}),
|
|
403
|
-
r.subtitle != null && /* @__PURE__ */ D(
|
|
409
|
+
r.subtitle != null && /* @__PURE__ */ D(t, {
|
|
404
410
|
size: "xs",
|
|
405
411
|
className: "metric--subtitle",
|
|
406
412
|
children: r.subtitle
|
|
@@ -408,18 +414,18 @@ function U({ data: r, variant: i = "default", tone: u = "neutral", showSparkline
|
|
|
408
414
|
]
|
|
409
415
|
}), N]
|
|
410
416
|
});
|
|
411
|
-
if (
|
|
412
|
-
let i = Math.min(Math.max(y, 0), 100), a = Math.round(i / 100 *
|
|
413
|
-
return /* @__PURE__ */ O(
|
|
417
|
+
if (s === "colored") {
|
|
418
|
+
let i = Math.min(Math.max(y, 0), 100), a = Math.round(i / 100 * H);
|
|
419
|
+
return /* @__PURE__ */ O(h, {
|
|
414
420
|
surface: "card",
|
|
415
421
|
"data-variant": "colored",
|
|
416
|
-
"data-tone":
|
|
417
|
-
className:
|
|
422
|
+
"data-tone": c,
|
|
423
|
+
className: n(M, I.metricPanel),
|
|
418
424
|
...x,
|
|
419
425
|
children: [
|
|
420
426
|
/* @__PURE__ */ O("div", {
|
|
421
427
|
className: I.metricHead,
|
|
422
|
-
children: [/* @__PURE__ */ D(
|
|
428
|
+
children: [/* @__PURE__ */ D(e, {
|
|
423
429
|
className: "metric--label",
|
|
424
430
|
children: r.label
|
|
425
431
|
}), /* @__PURE__ */ D("span", {
|
|
@@ -429,14 +435,14 @@ function U({ data: r, variant: i = "default", tone: u = "neutral", showSparkline
|
|
|
429
435
|
}),
|
|
430
436
|
/* @__PURE__ */ O("div", {
|
|
431
437
|
className: I.metricValueRow,
|
|
432
|
-
children: [/* @__PURE__ */ D(
|
|
438
|
+
children: [/* @__PURE__ */ D(t, {
|
|
433
439
|
size: "lg",
|
|
434
440
|
weight: "semibold",
|
|
435
441
|
numeric: !0,
|
|
436
442
|
lineHeight: "tight",
|
|
437
443
|
className: "metric--value",
|
|
438
444
|
children: C
|
|
439
|
-
}), r.subtitle != null && /* @__PURE__ */ D(
|
|
445
|
+
}), r.subtitle != null && /* @__PURE__ */ D(t, {
|
|
440
446
|
size: "xs",
|
|
441
447
|
type: "secondary",
|
|
442
448
|
className: "metric--subtitle",
|
|
@@ -450,13 +456,13 @@ function U({ data: r, variant: i = "default", tone: u = "neutral", showSparkline
|
|
|
450
456
|
"aria-valuenow": i,
|
|
451
457
|
"aria-valuemin": 0,
|
|
452
458
|
"aria-valuemax": 100,
|
|
453
|
-
children: Array.from({ length:
|
|
459
|
+
children: Array.from({ length: H }, (e, t) => /* @__PURE__ */ D("span", {
|
|
454
460
|
"data-filled": t < a ? "" : void 0,
|
|
455
461
|
className: I.metricSegment
|
|
456
462
|
}, t))
|
|
457
463
|
}),
|
|
458
464
|
R("default"),
|
|
459
|
-
r.footer != null && /* @__PURE__ */ D(
|
|
465
|
+
r.footer != null && /* @__PURE__ */ D(t, {
|
|
460
466
|
size: "xs",
|
|
461
467
|
type: "secondary",
|
|
462
468
|
className: "metric--footer",
|
|
@@ -465,27 +471,27 @@ function U({ data: r, variant: i = "default", tone: u = "neutral", showSparkline
|
|
|
465
471
|
]
|
|
466
472
|
});
|
|
467
473
|
}
|
|
468
|
-
return
|
|
474
|
+
return s === "bordered" ? /* @__PURE__ */ O(h, {
|
|
469
475
|
surface: "card",
|
|
470
476
|
"data-variant": "bordered",
|
|
471
|
-
"data-tone":
|
|
472
|
-
className:
|
|
477
|
+
"data-tone": c,
|
|
478
|
+
className: n(M, I.metricPanel),
|
|
473
479
|
...x,
|
|
474
480
|
children: [
|
|
475
481
|
/* @__PURE__ */ O("div", {
|
|
476
482
|
className: I.metricHead,
|
|
477
483
|
children: [/* @__PURE__ */ O("span", {
|
|
478
484
|
className: I.metricLabelGroup,
|
|
479
|
-
children: [
|
|
485
|
+
children: [d && E && /* @__PURE__ */ D(E, {
|
|
480
486
|
className: I.metricLabelIcon,
|
|
481
487
|
"aria-hidden": "true"
|
|
482
|
-
}), /* @__PURE__ */ D(
|
|
488
|
+
}), /* @__PURE__ */ D(e, {
|
|
483
489
|
className: "metric--label",
|
|
484
490
|
children: r.label
|
|
485
491
|
})]
|
|
486
492
|
}), R("badge")]
|
|
487
493
|
}),
|
|
488
|
-
/* @__PURE__ */ D(
|
|
494
|
+
/* @__PURE__ */ D(t, {
|
|
489
495
|
size: "lg",
|
|
490
496
|
weight: "semibold",
|
|
491
497
|
numeric: !0,
|
|
@@ -493,14 +499,14 @@ function U({ data: r, variant: i = "default", tone: u = "neutral", showSparkline
|
|
|
493
499
|
className: "metric--value",
|
|
494
500
|
children: C
|
|
495
501
|
}),
|
|
496
|
-
r.subtitle != null && /* @__PURE__ */ D(
|
|
502
|
+
r.subtitle != null && /* @__PURE__ */ D(t, {
|
|
497
503
|
size: "xs",
|
|
498
504
|
type: "secondary",
|
|
499
505
|
className: "metric--subtitle",
|
|
500
506
|
children: r.subtitle
|
|
501
507
|
}),
|
|
502
508
|
N,
|
|
503
|
-
r.footer != null && /* @__PURE__ */ D(
|
|
509
|
+
r.footer != null && /* @__PURE__ */ D(t, {
|
|
504
510
|
size: "xs",
|
|
505
511
|
type: "secondary",
|
|
506
512
|
className: "metric--footer",
|
|
@@ -509,74 +515,74 @@ function U({ data: r, variant: i = "default", tone: u = "neutral", showSparkline
|
|
|
509
515
|
]
|
|
510
516
|
}) : /* @__PURE__ */ O("div", {
|
|
511
517
|
"data-variant": "default",
|
|
512
|
-
className:
|
|
518
|
+
className: n(M, I.metricTile),
|
|
513
519
|
...x,
|
|
514
520
|
children: [
|
|
515
521
|
/* @__PURE__ */ O("span", {
|
|
516
|
-
className:
|
|
517
|
-
children: [
|
|
522
|
+
className: n(I.metricLabelGroup, I.tileLabel),
|
|
523
|
+
children: [d && E && /* @__PURE__ */ D(E, {
|
|
518
524
|
className: I.metricLabelIcon,
|
|
519
525
|
"aria-hidden": "true"
|
|
520
|
-
}), /* @__PURE__ */ D(
|
|
526
|
+
}), /* @__PURE__ */ D(e, {
|
|
521
527
|
className: "metric--label",
|
|
522
528
|
children: r.label
|
|
523
529
|
})]
|
|
524
530
|
}),
|
|
525
|
-
/* @__PURE__ */ D(
|
|
531
|
+
/* @__PURE__ */ D(t, {
|
|
526
532
|
size: "lg",
|
|
527
533
|
weight: "semibold",
|
|
528
534
|
numeric: !0,
|
|
529
535
|
lineHeight: "tight",
|
|
530
536
|
truncate: !0,
|
|
531
537
|
title: C,
|
|
532
|
-
className:
|
|
538
|
+
className: n("metric--value", I.tileValue),
|
|
533
539
|
children: C
|
|
534
540
|
}),
|
|
535
|
-
j && /* @__PURE__ */ D(
|
|
541
|
+
j && /* @__PURE__ */ D(V, {
|
|
536
542
|
change: r.change,
|
|
537
543
|
trend: r.trend,
|
|
538
544
|
variant: "compact",
|
|
539
545
|
className: I.tileChange
|
|
540
546
|
}),
|
|
541
|
-
r.subtitle != null && /* @__PURE__ */ D(
|
|
547
|
+
r.subtitle != null && /* @__PURE__ */ D(t, {
|
|
542
548
|
size: "xs",
|
|
543
549
|
type: "secondary",
|
|
544
|
-
className:
|
|
550
|
+
className: n("metric--subtitle", I.tileSubtitle),
|
|
545
551
|
children: r.subtitle
|
|
546
552
|
}),
|
|
547
553
|
N,
|
|
548
|
-
r.footer != null && /* @__PURE__ */ D(
|
|
554
|
+
r.footer != null && /* @__PURE__ */ D(t, {
|
|
549
555
|
size: "xs",
|
|
550
556
|
type: "secondary",
|
|
551
|
-
className:
|
|
557
|
+
className: n("metric--footer", I.tileFooter),
|
|
552
558
|
children: r.footer
|
|
553
559
|
})
|
|
554
560
|
]
|
|
555
561
|
});
|
|
556
562
|
}
|
|
557
563
|
//#endregion
|
|
558
|
-
//#region src/components/
|
|
559
|
-
function
|
|
560
|
-
return /* @__PURE__ */ O(
|
|
564
|
+
//#region src/components/blocks/analytics/metric-bar.tsx
|
|
565
|
+
function ee({ metrics: e, period: i, onPeriodChange: a, showSparklines: o = !0, showChanges: s = !0, footerText: c, className: l, ...u }) {
|
|
566
|
+
return /* @__PURE__ */ O(h, {
|
|
561
567
|
surface: "card",
|
|
562
568
|
flush: !0,
|
|
563
|
-
className:
|
|
564
|
-
...
|
|
569
|
+
className: n("metric-bar--component", I.metricBar, l),
|
|
570
|
+
...u,
|
|
565
571
|
children: [/* @__PURE__ */ O("div", {
|
|
566
572
|
className: I.metricBarRow,
|
|
567
|
-
children: [
|
|
573
|
+
children: [i && /* @__PURE__ */ D("div", {
|
|
568
574
|
className: I.metricBarPeriod,
|
|
569
|
-
children: /* @__PURE__ */ O(
|
|
575
|
+
children: /* @__PURE__ */ O(r, {
|
|
570
576
|
tone: "secondary",
|
|
571
|
-
|
|
572
|
-
onClick: a ? () => a(
|
|
573
|
-
children: [/* @__PURE__ */ D(S, { "aria-hidden": "true" }),
|
|
577
|
+
appearance: "ghost",
|
|
578
|
+
onClick: a ? () => a(i.value) : void 0,
|
|
579
|
+
children: [/* @__PURE__ */ D(S, { "aria-hidden": "true" }), i.label]
|
|
574
580
|
})
|
|
575
581
|
}), /* @__PURE__ */ D("div", {
|
|
576
582
|
className: I.metricBarCells,
|
|
577
|
-
children:
|
|
583
|
+
children: e.map((e) => /* @__PURE__ */ D("div", {
|
|
578
584
|
className: I.metricBarCell,
|
|
579
|
-
children: /* @__PURE__ */ D(
|
|
585
|
+
children: /* @__PURE__ */ D(W, {
|
|
580
586
|
data: e,
|
|
581
587
|
variant: "default",
|
|
582
588
|
showSparkline: o,
|
|
@@ -584,32 +590,32 @@ function W({ metrics: t, period: r, onPeriodChange: a, showSparklines: o = !0, s
|
|
|
584
590
|
})
|
|
585
591
|
}, e.id))
|
|
586
592
|
})]
|
|
587
|
-
}),
|
|
593
|
+
}), c != null && /* @__PURE__ */ D("div", {
|
|
588
594
|
className: I.metricBarFooter,
|
|
589
|
-
children: /* @__PURE__ */ D(
|
|
595
|
+
children: /* @__PURE__ */ D(t, {
|
|
590
596
|
size: "xs",
|
|
591
597
|
type: "secondary",
|
|
592
|
-
children:
|
|
598
|
+
children: c
|
|
593
599
|
})
|
|
594
600
|
})]
|
|
595
601
|
});
|
|
596
602
|
}
|
|
597
603
|
//#endregion
|
|
598
|
-
//#region src/components/
|
|
604
|
+
//#region src/components/blocks/analytics/metric-grid.tsx
|
|
599
605
|
function G(e) {
|
|
600
606
|
return e <= 1 ? 1 : e === 2 ? 2 : e === 3 ? 3 : e === 4 ? 4 : e <= 6 ? 6 : 4;
|
|
601
607
|
}
|
|
602
|
-
function K({ metrics:
|
|
603
|
-
let d = i === "auto" ? G(
|
|
608
|
+
function K({ metrics: e, variant: t = "card", tone: r = "neutral", columns: i = "auto", showSparklines: a = !0, showChanges: o = !0, showIcons: s = !0, loading: c = !1, className: l, ...u }) {
|
|
609
|
+
let d = i === "auto" ? G(e.length) : i;
|
|
604
610
|
return /* @__PURE__ */ D("div", {
|
|
605
|
-
className:
|
|
611
|
+
className: n("metric-grid--component", I.metricGridRoot, l),
|
|
606
612
|
...u,
|
|
607
613
|
children: /* @__PURE__ */ D("div", {
|
|
608
614
|
"data-columns": d,
|
|
609
|
-
className:
|
|
610
|
-
children:
|
|
615
|
+
className: n("metric-grid--grid", I.metricGrid),
|
|
616
|
+
children: e.map((e) => /* @__PURE__ */ D(W, {
|
|
611
617
|
data: e,
|
|
612
|
-
variant:
|
|
618
|
+
variant: t,
|
|
613
619
|
tone: r,
|
|
614
620
|
showSparkline: a,
|
|
615
621
|
showChange: o,
|
|
@@ -620,31 +626,31 @@ function K({ metrics: t, variant: n = "card", tone: r = "neutral", columns: i =
|
|
|
620
626
|
});
|
|
621
627
|
}
|
|
622
628
|
//#endregion
|
|
623
|
-
//#region src/components/
|
|
629
|
+
//#region src/components/blocks/analytics/metric-comparison.tsx
|
|
624
630
|
function q(e) {
|
|
625
631
|
if (e == null) return null;
|
|
626
632
|
if (typeof e == "number") return e;
|
|
627
633
|
let t = Number(e);
|
|
628
634
|
return Number.isFinite(t) ? t : null;
|
|
629
635
|
}
|
|
630
|
-
function J({ current: r, previous: i, currentPeriod: a, previousPeriod: o, strings: s, className:
|
|
631
|
-
let
|
|
636
|
+
function J({ current: r, previous: i, currentPeriod: a, previousPeriod: o, strings: s, className: c, ...l }) {
|
|
637
|
+
let u = {
|
|
632
638
|
...j,
|
|
633
639
|
...s
|
|
634
|
-
}, f = q(r.value), p = q(i.value),
|
|
640
|
+
}, f = q(r.value), p = q(i.value), m = f !== null && p !== null, g = m ? f - p : 0, _ = m && p !== 0 ? Math.round(g / p * 100) : null, v = g === 0, S = g > 0, w = v ? C : S ? x : y, T = v ? "neutral" : S ? "success" : "destructive", E = P({
|
|
635
641
|
...r,
|
|
636
642
|
value: Math.abs(g)
|
|
637
643
|
});
|
|
638
644
|
return /* @__PURE__ */ O("div", {
|
|
639
|
-
className:
|
|
640
|
-
...
|
|
645
|
+
className: n("metric-comparison--component", I.comparison, c),
|
|
646
|
+
...l,
|
|
641
647
|
children: [
|
|
642
648
|
(a != null || o != null) && /* @__PURE__ */ O("div", {
|
|
643
649
|
className: I.comparisonPeriods,
|
|
644
|
-
children: [a != null && /* @__PURE__ */ D(
|
|
650
|
+
children: [a != null && /* @__PURE__ */ D(d, {
|
|
645
651
|
tone: "secondary",
|
|
646
652
|
children: a
|
|
647
|
-
}), o != null && /* @__PURE__ */ D(
|
|
653
|
+
}), o != null && /* @__PURE__ */ D(d, {
|
|
648
654
|
tone: "secondary",
|
|
649
655
|
children: o
|
|
650
656
|
})]
|
|
@@ -652,10 +658,9 @@ function J({ current: r, previous: i, currentPeriod: a, previousPeriod: o, strin
|
|
|
652
658
|
/* @__PURE__ */ O("div", {
|
|
653
659
|
className: I.comparisonPair,
|
|
654
660
|
children: [
|
|
655
|
-
/* @__PURE__ */ O(
|
|
661
|
+
/* @__PURE__ */ O(h, {
|
|
656
662
|
surface: "card",
|
|
657
|
-
|
|
658
|
-
children: [/* @__PURE__ */ D(t, { children: d.currentLabel }), /* @__PURE__ */ D(n, {
|
|
663
|
+
children: [/* @__PURE__ */ D(e, { children: u.currentLabel }), /* @__PURE__ */ D(t, {
|
|
659
664
|
size: "lg",
|
|
660
665
|
weight: "semibold",
|
|
661
666
|
numeric: !0,
|
|
@@ -668,10 +673,10 @@ function J({ current: r, previous: i, currentPeriod: a, previousPeriod: o, strin
|
|
|
668
673
|
"aria-hidden": "true",
|
|
669
674
|
children: [/* @__PURE__ */ D(b, { className: I.comparisonArrowWide }), /* @__PURE__ */ D(y, { className: I.comparisonArrowNarrow })]
|
|
670
675
|
}),
|
|
671
|
-
/* @__PURE__ */ O(
|
|
676
|
+
/* @__PURE__ */ O(h, {
|
|
672
677
|
surface: "card",
|
|
673
|
-
className:
|
|
674
|
-
children: [/* @__PURE__ */ D(
|
|
678
|
+
className: I.comparisonBoxPrevious,
|
|
679
|
+
children: [/* @__PURE__ */ D(e, { children: u.previousLabel }), /* @__PURE__ */ D(t, {
|
|
675
680
|
size: "lg",
|
|
676
681
|
weight: "semibold",
|
|
677
682
|
numeric: !0,
|
|
@@ -682,7 +687,7 @@ function J({ current: r, previous: i, currentPeriod: a, previousPeriod: o, strin
|
|
|
682
687
|
})
|
|
683
688
|
]
|
|
684
689
|
}),
|
|
685
|
-
|
|
690
|
+
m && /* @__PURE__ */ O("div", {
|
|
686
691
|
"data-tone": T,
|
|
687
692
|
className: I.comparisonDelta,
|
|
688
693
|
children: [
|
|
@@ -691,7 +696,7 @@ function J({ current: r, previous: i, currentPeriod: a, previousPeriod: o, strin
|
|
|
691
696
|
children: [/* @__PURE__ */ D(w, {
|
|
692
697
|
className: I.comparisonChipIcon,
|
|
693
698
|
"aria-hidden": "true"
|
|
694
|
-
}), /* @__PURE__ */ O(
|
|
699
|
+
}), /* @__PURE__ */ O(t, {
|
|
695
700
|
tag: "span",
|
|
696
701
|
size: "xs",
|
|
697
702
|
type: "inherit",
|
|
@@ -700,7 +705,7 @@ function J({ current: r, previous: i, currentPeriod: a, previousPeriod: o, strin
|
|
|
700
705
|
children: [S ? "+" : v ? "" : "−", E]
|
|
701
706
|
})]
|
|
702
707
|
}),
|
|
703
|
-
_ !== null && /* @__PURE__ */ O(
|
|
708
|
+
_ !== null && /* @__PURE__ */ O(t, {
|
|
704
709
|
size: "xs",
|
|
705
710
|
type: v ? "secondary" : "inherit",
|
|
706
711
|
numeric: !0,
|
|
@@ -710,10 +715,10 @@ function J({ current: r, previous: i, currentPeriod: a, previousPeriod: o, strin
|
|
|
710
715
|
"%"
|
|
711
716
|
]
|
|
712
717
|
}),
|
|
713
|
-
/* @__PURE__ */ D(
|
|
718
|
+
/* @__PURE__ */ D(t, {
|
|
714
719
|
size: "xs",
|
|
715
720
|
type: "secondary",
|
|
716
|
-
children:
|
|
721
|
+
children: u.suffix
|
|
717
722
|
})
|
|
718
723
|
]
|
|
719
724
|
})
|
|
@@ -721,7 +726,7 @@ function J({ current: r, previous: i, currentPeriod: a, previousPeriod: o, strin
|
|
|
721
726
|
});
|
|
722
727
|
}
|
|
723
728
|
//#endregion
|
|
724
|
-
//#region src/components/
|
|
729
|
+
//#region src/components/blocks/analytics/metric-micro-grid.tsx
|
|
725
730
|
var Y = [
|
|
726
731
|
"bars",
|
|
727
732
|
"line",
|
|
@@ -729,43 +734,47 @@ var Y = [
|
|
|
729
734
|
"progress",
|
|
730
735
|
"area",
|
|
731
736
|
"pie"
|
|
737
|
+
], X = [
|
|
738
|
+
"var(--chart-1)",
|
|
739
|
+
"var(--chart-2)",
|
|
740
|
+
"var(--chart-3)"
|
|
732
741
|
];
|
|
733
|
-
function
|
|
742
|
+
function Z(e) {
|
|
734
743
|
let t = Math.max(...e, 0), n = Math.min(...e, 0), r = t - n || 1;
|
|
735
744
|
return e.map((e) => (e - n) / r);
|
|
736
745
|
}
|
|
737
|
-
function
|
|
738
|
-
let n =
|
|
746
|
+
function Q(e, t) {
|
|
747
|
+
let n = Z(e), r = 60 / Math.max(n.length - 1, 1);
|
|
739
748
|
return n.map((e, n) => `${n * r},${t - e * (t - 2)}`);
|
|
740
749
|
}
|
|
741
|
-
function
|
|
750
|
+
function te({ kind: e, data: t, label: n }) {
|
|
742
751
|
if (e === "bars") {
|
|
743
|
-
let e =
|
|
752
|
+
let e = Z(t.slice(0, 6));
|
|
744
753
|
return /* @__PURE__ */ D("span", {
|
|
745
754
|
className: I.microBars,
|
|
746
755
|
"aria-hidden": "true",
|
|
747
756
|
children: e.map((e, t) => /* @__PURE__ */ D("span", {
|
|
748
757
|
className: I.microBar,
|
|
749
|
-
style: { "--
|
|
758
|
+
style: { "--_micro-bar": `${Math.max(e, .08) * 100}%` }
|
|
750
759
|
}, t))
|
|
751
760
|
});
|
|
752
761
|
}
|
|
753
762
|
if (e === "dots") {
|
|
754
|
-
let e =
|
|
763
|
+
let e = Z(t.slice(0, 5));
|
|
755
764
|
return /* @__PURE__ */ D("span", {
|
|
756
765
|
className: I.microDots,
|
|
757
766
|
"aria-hidden": "true",
|
|
758
767
|
children: e.map((e, t) => /* @__PURE__ */ D("span", {
|
|
759
768
|
className: I.microDot,
|
|
760
|
-
style: { "--
|
|
769
|
+
style: { "--_micro-dot": `${Math.round(e * 12)}px` }
|
|
761
770
|
}, t))
|
|
762
771
|
});
|
|
763
772
|
}
|
|
764
773
|
if (e === "progress") {
|
|
765
|
-
let [e = 0,
|
|
766
|
-
return /* @__PURE__ */ D(
|
|
774
|
+
let [e = 0, r = 100] = t;
|
|
775
|
+
return /* @__PURE__ */ D(f, {
|
|
767
776
|
value: e,
|
|
768
|
-
max:
|
|
777
|
+
max: r,
|
|
769
778
|
label: n,
|
|
770
779
|
className: I.microProgress
|
|
771
780
|
});
|
|
@@ -773,18 +782,18 @@ function Q({ kind: e, data: t, label: n }) {
|
|
|
773
782
|
if (e === "pie") {
|
|
774
783
|
let e = t.reduce((e, t) => e + t, 0) || 1, n = t.slice(0, 3), r = n.map((t, r) => {
|
|
775
784
|
let i = n.slice(0, r).reduce((e, t) => e + t, 0), a = i / e * 100, o = (i + t) / e * 100;
|
|
776
|
-
return
|
|
785
|
+
return `${X[r]} ${a}% ${o}%`;
|
|
777
786
|
});
|
|
778
787
|
return /* @__PURE__ */ D("span", {
|
|
779
788
|
className: I.microMarkRow,
|
|
780
789
|
"aria-hidden": "true",
|
|
781
790
|
children: /* @__PURE__ */ D("span", {
|
|
782
791
|
className: I.microPie,
|
|
783
|
-
style: { "--
|
|
792
|
+
style: { "--_micro-pie": `conic-gradient(${r.join(", ")})` }
|
|
784
793
|
})
|
|
785
794
|
});
|
|
786
795
|
}
|
|
787
|
-
let
|
|
796
|
+
let r = Q(t.slice(0, 8), 16);
|
|
788
797
|
return e === "area" ? /* @__PURE__ */ D("svg", {
|
|
789
798
|
viewBox: "0 0 60 16",
|
|
790
799
|
className: I.microSvg,
|
|
@@ -792,7 +801,7 @@ function Q({ kind: e, data: t, label: n }) {
|
|
|
792
801
|
"aria-hidden": "true",
|
|
793
802
|
children: /* @__PURE__ */ D("polygon", {
|
|
794
803
|
className: I.microArea,
|
|
795
|
-
points: `0,16 ${
|
|
804
|
+
points: `0,16 ${r.join(" ")} 60,16`
|
|
796
805
|
})
|
|
797
806
|
}) : /* @__PURE__ */ D("svg", {
|
|
798
807
|
viewBox: "0 0 60 16",
|
|
@@ -801,32 +810,32 @@ function Q({ kind: e, data: t, label: n }) {
|
|
|
801
810
|
"aria-hidden": "true",
|
|
802
811
|
children: /* @__PURE__ */ D("polyline", {
|
|
803
812
|
className: I.microLine,
|
|
804
|
-
points:
|
|
813
|
+
points: r.join(" ")
|
|
805
814
|
})
|
|
806
815
|
});
|
|
807
816
|
}
|
|
808
|
-
function
|
|
817
|
+
function ne({ cells: r, className: i, ...a }) {
|
|
809
818
|
return /* @__PURE__ */ D("div", {
|
|
810
|
-
className:
|
|
819
|
+
className: n("metric-micro-grid--component", I.microGridRoot, i),
|
|
811
820
|
...a,
|
|
812
|
-
children: /* @__PURE__ */ D(
|
|
821
|
+
children: /* @__PURE__ */ D(h, {
|
|
813
822
|
surface: "bordered",
|
|
814
823
|
flush: !0,
|
|
815
824
|
className: I.microGrid,
|
|
816
825
|
children: r.map((r, i) => {
|
|
817
826
|
let a = r.chart ?? Y[i % Y.length] ?? "bars";
|
|
818
827
|
return /* @__PURE__ */ O("div", {
|
|
819
|
-
className:
|
|
828
|
+
className: n("metric-micro-grid--cell", I.microCell),
|
|
820
829
|
children: [
|
|
821
|
-
/* @__PURE__ */ D(
|
|
822
|
-
/* @__PURE__ */ D(
|
|
830
|
+
/* @__PURE__ */ D(e, { children: r.label }),
|
|
831
|
+
/* @__PURE__ */ D(t, {
|
|
823
832
|
weight: "semibold",
|
|
824
833
|
numeric: !0,
|
|
825
834
|
lineHeight: "tight",
|
|
826
835
|
className: "metric-micro-grid--value",
|
|
827
836
|
children: r.value
|
|
828
837
|
}),
|
|
829
|
-
/* @__PURE__ */ D(
|
|
838
|
+
/* @__PURE__ */ D(te, {
|
|
830
839
|
kind: a,
|
|
831
840
|
data: r.data,
|
|
832
841
|
label: r.label
|
|
@@ -838,33 +847,33 @@ function $({ cells: r, className: i, ...a }) {
|
|
|
838
847
|
});
|
|
839
848
|
}
|
|
840
849
|
//#endregion
|
|
841
|
-
//#region src/components/
|
|
842
|
-
function
|
|
850
|
+
//#region src/components/blocks/analytics/metric-gradient.tsx
|
|
851
|
+
function re({ title: r, value: i, change: a, data: o, theme: s = "cool", subtitle: c, className: l, ...u }) {
|
|
843
852
|
let d = `metric-gradient-${E().replaceAll(":", "")}`;
|
|
844
853
|
return /* @__PURE__ */ O("div", {
|
|
845
|
-
"data-
|
|
854
|
+
"data-ramp": s,
|
|
846
855
|
"data-theme": "dark",
|
|
847
|
-
className:
|
|
856
|
+
className: n("metric-gradient--component", I.gradient, l),
|
|
848
857
|
...u,
|
|
849
858
|
children: [/* @__PURE__ */ O("div", {
|
|
850
859
|
className: I.gradientHead,
|
|
851
860
|
children: [/* @__PURE__ */ O("div", {
|
|
852
861
|
className: I.gradientHeadText,
|
|
853
862
|
children: [
|
|
854
|
-
/* @__PURE__ */ D(
|
|
855
|
-
i != null && /* @__PURE__ */ D(
|
|
863
|
+
/* @__PURE__ */ D(e, { children: r }),
|
|
864
|
+
i != null && /* @__PURE__ */ D(t, {
|
|
856
865
|
size: "lg",
|
|
857
866
|
weight: "semibold",
|
|
858
867
|
numeric: !0,
|
|
859
868
|
lineHeight: "tight",
|
|
860
869
|
children: i
|
|
861
870
|
}),
|
|
862
|
-
c != null && /* @__PURE__ */ D(
|
|
871
|
+
c != null && /* @__PURE__ */ D(t, {
|
|
863
872
|
size: "xs",
|
|
864
873
|
children: c
|
|
865
874
|
})
|
|
866
875
|
]
|
|
867
|
-
}), a && /* @__PURE__ */ D(
|
|
876
|
+
}), a && /* @__PURE__ */ D(V, {
|
|
868
877
|
change: a,
|
|
869
878
|
variant: "badge",
|
|
870
879
|
className: I.gradientChip
|
|
@@ -917,8 +926,8 @@ function ee({ title: r, value: i, change: a, data: o, theme: s = "cool", subtitl
|
|
|
917
926
|
});
|
|
918
927
|
}
|
|
919
928
|
//#endregion
|
|
920
|
-
//#region src/components/
|
|
921
|
-
function
|
|
929
|
+
//#region src/components/blocks/analytics/activity-heatmap.tsx
|
|
930
|
+
function $(e, t) {
|
|
922
931
|
if (e.length === 0) return {
|
|
923
932
|
weeks: [],
|
|
924
933
|
months: []
|
|
@@ -954,49 +963,49 @@ function te(e, t) {
|
|
|
954
963
|
months: d
|
|
955
964
|
};
|
|
956
965
|
}
|
|
957
|
-
var
|
|
966
|
+
var ie = [
|
|
958
967
|
0,
|
|
959
968
|
1,
|
|
960
969
|
2,
|
|
961
970
|
3,
|
|
962
971
|
4
|
|
963
972
|
];
|
|
964
|
-
function
|
|
973
|
+
function ae({ data: e, strings: r, className: i, ...a }) {
|
|
965
974
|
let o = {
|
|
966
975
|
...M,
|
|
967
976
|
...r
|
|
968
|
-
}, { weeks: s, months: c } =
|
|
977
|
+
}, { weeks: s, months: c } = $(e, o.monthNames), l = c.filter((e, t, n) => {
|
|
969
978
|
let r = n[t - 1];
|
|
970
979
|
return !r || e.weekIndex - r.weekIndex >= 3;
|
|
971
980
|
});
|
|
972
981
|
return /* @__PURE__ */ O("div", {
|
|
973
|
-
className:
|
|
982
|
+
className: n("activity-heatmap--component", I.heatmap, i),
|
|
974
983
|
...a,
|
|
975
984
|
children: [/* @__PURE__ */ O("div", {
|
|
976
985
|
className: I.heatmapScroll,
|
|
977
986
|
children: [/* @__PURE__ */ D("div", {
|
|
978
987
|
className: I.heatmapMonths,
|
|
979
|
-
style: { "--
|
|
980
|
-
children: l.map((e) => /* @__PURE__ */ D(
|
|
988
|
+
style: { "--_heatmap-weeks": s.length },
|
|
989
|
+
children: l.map((e) => /* @__PURE__ */ D(t, {
|
|
981
990
|
size: "xs",
|
|
982
991
|
type: "secondary",
|
|
983
992
|
lineHeight: "none",
|
|
984
993
|
className: I.heatmapMonth,
|
|
985
|
-
style: { "--
|
|
994
|
+
style: { "--_heatmap-week": e.weekIndex },
|
|
986
995
|
children: e.label
|
|
987
996
|
}, `${e.label}-${e.weekIndex}`))
|
|
988
997
|
}), /* @__PURE__ */ O("div", {
|
|
989
998
|
className: I.heatmapBody,
|
|
990
999
|
children: [/* @__PURE__ */ D("div", {
|
|
991
1000
|
className: I.heatmapDays,
|
|
992
|
-
children: o.dayLabels.map((e,
|
|
1001
|
+
children: o.dayLabels.map((e, n) => /* @__PURE__ */ D("span", {
|
|
993
1002
|
className: I.heatmapDay,
|
|
994
|
-
children: e ? /* @__PURE__ */ D(
|
|
1003
|
+
children: e ? /* @__PURE__ */ D(t, {
|
|
995
1004
|
size: "xs",
|
|
996
1005
|
type: "secondary",
|
|
997
1006
|
children: e
|
|
998
1007
|
}) : null
|
|
999
|
-
},
|
|
1008
|
+
}, n))
|
|
1000
1009
|
}), /* @__PURE__ */ D("div", {
|
|
1001
1010
|
className: I.heatmapWeeks,
|
|
1002
1011
|
children: s.map((e, t) => /* @__PURE__ */ D("div", {
|
|
@@ -1013,17 +1022,17 @@ function re({ data: t, strings: r, className: i, ...a }) {
|
|
|
1013
1022
|
}), /* @__PURE__ */ O("div", {
|
|
1014
1023
|
className: I.heatmapLegend,
|
|
1015
1024
|
children: [
|
|
1016
|
-
/* @__PURE__ */ D(
|
|
1025
|
+
/* @__PURE__ */ D(t, {
|
|
1017
1026
|
size: "xs",
|
|
1018
1027
|
type: "secondary",
|
|
1019
1028
|
children: o.legendLess
|
|
1020
1029
|
}),
|
|
1021
|
-
|
|
1030
|
+
ie.map((e) => /* @__PURE__ */ D("span", {
|
|
1022
1031
|
"data-level": e,
|
|
1023
1032
|
className: I.heatmapCell,
|
|
1024
1033
|
"aria-hidden": "true"
|
|
1025
1034
|
}, e)),
|
|
1026
|
-
/* @__PURE__ */ D(
|
|
1035
|
+
/* @__PURE__ */ D(t, {
|
|
1027
1036
|
size: "xs",
|
|
1028
1037
|
type: "secondary",
|
|
1029
1038
|
children: o.legendMore
|
|
@@ -1033,16 +1042,16 @@ function re({ data: t, strings: r, className: i, ...a }) {
|
|
|
1033
1042
|
});
|
|
1034
1043
|
}
|
|
1035
1044
|
//#endregion
|
|
1036
|
-
//#region src/components/
|
|
1037
|
-
function
|
|
1038
|
-
return /* @__PURE__ */ O(
|
|
1039
|
-
className:
|
|
1045
|
+
//#region src/components/blocks/analytics/chart-card.tsx
|
|
1046
|
+
function oe({ config: e, children: t, footer: r, className: i, ...a }) {
|
|
1047
|
+
return /* @__PURE__ */ O(h, {
|
|
1048
|
+
className: n("chart-card--component", i),
|
|
1040
1049
|
...a,
|
|
1041
1050
|
children: [/* @__PURE__ */ D(_, {
|
|
1042
|
-
config:
|
|
1051
|
+
config: e,
|
|
1043
1052
|
label: typeof a.title == "string" ? a.title : void 0,
|
|
1044
|
-
className:
|
|
1045
|
-
children:
|
|
1053
|
+
className: n("chart-card--chart", I.chartCardChart),
|
|
1054
|
+
children: t
|
|
1046
1055
|
}), r != null && /* @__PURE__ */ D("div", {
|
|
1047
1056
|
className: I.chartCardFooter,
|
|
1048
1057
|
children: r
|
|
@@ -1050,45 +1059,45 @@ function ie({ config: t, children: n, footer: r, className: i, ...a }) {
|
|
|
1050
1059
|
});
|
|
1051
1060
|
}
|
|
1052
1061
|
//#endregion
|
|
1053
|
-
//#region src/components/
|
|
1054
|
-
function
|
|
1062
|
+
//#region src/components/blocks/analytics/time-ruler.tsx
|
|
1063
|
+
function se(e, t) {
|
|
1055
1064
|
if (e === 0) return 0;
|
|
1056
1065
|
let n = e / t;
|
|
1057
1066
|
return n < 1 / 3 ? 1 : n < 2 / 3 ? 2 : 3;
|
|
1058
1067
|
}
|
|
1059
|
-
function
|
|
1068
|
+
function ce({ hours: e, currentHour: r, strings: i, className: a, ...o }) {
|
|
1060
1069
|
let s = {
|
|
1061
1070
|
...N,
|
|
1062
1071
|
...i
|
|
1063
|
-
}, c = Math.max(...
|
|
1072
|
+
}, c = Math.max(...e, 1), l = e.indexOf(Math.max(...e)), u = r !== void 0 && r >= 0 && r < 24;
|
|
1064
1073
|
return /* @__PURE__ */ O("div", {
|
|
1065
|
-
className:
|
|
1074
|
+
className: n("time-ruler--component", I.ruler, a),
|
|
1066
1075
|
...o,
|
|
1067
1076
|
children: [
|
|
1068
1077
|
/* @__PURE__ */ O("div", {
|
|
1069
1078
|
className: I.rulerBar,
|
|
1070
|
-
children: [
|
|
1071
|
-
"data-band":
|
|
1079
|
+
children: [e.map((e, t) => /* @__PURE__ */ D("span", {
|
|
1080
|
+
"data-band": se(e, c),
|
|
1072
1081
|
"data-peak": t === l ? "" : void 0,
|
|
1073
1082
|
className: I.rulerHour,
|
|
1074
1083
|
title: s.formatHourTitle(s.formatHour(t), e)
|
|
1075
1084
|
}, t)), u && /* @__PURE__ */ D("span", {
|
|
1076
1085
|
"aria-hidden": "true",
|
|
1077
1086
|
className: I.rulerMarker,
|
|
1078
|
-
style: { "--
|
|
1087
|
+
style: { "--_ruler-now": r }
|
|
1079
1088
|
})]
|
|
1080
1089
|
}),
|
|
1081
1090
|
/* @__PURE__ */ D("div", {
|
|
1082
1091
|
className: I.rulerTicks,
|
|
1083
|
-
children:
|
|
1092
|
+
children: e.map((e, n) => /* @__PURE__ */ D("span", {
|
|
1084
1093
|
className: I.rulerTick,
|
|
1085
|
-
children:
|
|
1094
|
+
children: n % 4 == 0 && /* @__PURE__ */ D(t, {
|
|
1086
1095
|
size: "xs",
|
|
1087
1096
|
type: "secondary",
|
|
1088
1097
|
numeric: !0,
|
|
1089
|
-
children: s.formatHour(
|
|
1098
|
+
children: s.formatHour(n)
|
|
1090
1099
|
})
|
|
1091
|
-
},
|
|
1100
|
+
}, n))
|
|
1092
1101
|
}),
|
|
1093
1102
|
/* @__PURE__ */ O("div", {
|
|
1094
1103
|
className: I.rulerLegend,
|
|
@@ -1103,7 +1112,7 @@ function oe({ hours: t, currentHour: r, strings: i, className: a, ...o }) {
|
|
|
1103
1112
|
"data-band": e,
|
|
1104
1113
|
className: I.rulerSwatch,
|
|
1105
1114
|
"aria-hidden": "true"
|
|
1106
|
-
}), /* @__PURE__ */ D(
|
|
1115
|
+
}), /* @__PURE__ */ D(t, {
|
|
1107
1116
|
size: "xs",
|
|
1108
1117
|
type: "secondary",
|
|
1109
1118
|
children: [
|
|
@@ -1118,7 +1127,7 @@ function oe({ hours: t, currentHour: r, strings: i, className: a, ...o }) {
|
|
|
1118
1127
|
children: [/* @__PURE__ */ D("span", {
|
|
1119
1128
|
className: I.rulerMarkerSwatch,
|
|
1120
1129
|
"aria-hidden": "true"
|
|
1121
|
-
}), /* @__PURE__ */ D(
|
|
1130
|
+
}), /* @__PURE__ */ D(t, {
|
|
1122
1131
|
size: "xs",
|
|
1123
1132
|
type: "secondary",
|
|
1124
1133
|
children: s.legendNow
|
|
@@ -1129,4 +1138,4 @@ function oe({ hours: t, currentHour: r, strings: i, className: a, ...o }) {
|
|
|
1129
1138
|
});
|
|
1130
1139
|
}
|
|
1131
1140
|
//#endregion
|
|
1132
|
-
export {
|
|
1141
|
+
export { ae as ActivityHeatmap, oe as ChartCard, W as Metric, ee as MetricBar, J as MetricComparison, re as MetricGradient, K as MetricGrid, ne as MetricMicroGrid, L as MetricSkeleton, V as MetricTrendChip, ce as TimeRuler, M as defaultActivityHeatmapStrings, A as defaultAnalyticsStrings, j as defaultMetricComparisonStrings, N as defaultTimeRulerStrings, P as formatMetricValue, F as resolveTrend };
|