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
|
@@ -0,0 +1,1262 @@
|
|
|
1
|
+
import "#core.css";
|
|
2
|
+
import { c as e, s as t } from "./typography-DmeR05Er.js";
|
|
3
|
+
import { t as n } from "./cx--CBrhWH0.js";
|
|
4
|
+
import { r, y as i } from "./ui-provider-DpzLUD12.js";
|
|
5
|
+
import { c as a } from "./buttons-BX2JfL5X.js";
|
|
6
|
+
import { i as o, n as s, t as c } from "./action-menu-BwiL_F6I.js";
|
|
7
|
+
import { a as l, c as u, r as d } from "./avatar-Dc_BNYfB.js";
|
|
8
|
+
import { t as f } from "./strings-Co9_qArR.js";
|
|
9
|
+
import { B as p, D as m, E as h, H as g, I as _, L as ee, O as te, S as ne, T as re, U as ie, V as ae, f as v, g as oe, h as se, k as ce, m as le, w as ue, z as y } from "./primitives-BskKlf35.js";
|
|
10
|
+
import { t as de } from "./badge-VlJVZjdm.js";
|
|
11
|
+
import { t as fe } from "./batch-action-bar-DZVMVW83.js";
|
|
12
|
+
import { p as pe } from "./feedback-D4qVsKlD.js";
|
|
13
|
+
import { t as me } from "./skeleton-BTKNKTdj.js";
|
|
14
|
+
import { d as b, v as x } from "./display-a7AoX_u7.js";
|
|
15
|
+
import { t as S } from "./scroll-edges-CWjEJktN.js";
|
|
16
|
+
import { x as C } from "./choice-inputs-NwRxvmZN.js";
|
|
17
|
+
import { l as w } from "./text-inputs-BboE77nZ.js";
|
|
18
|
+
import { t as T } from "./use-latest-CF0678ae.js";
|
|
19
|
+
import { s as he } from "./navigation-Bgu7Vc0M.js";
|
|
20
|
+
import { r as ge } from "./navigation-B4eUU9E8.js";
|
|
21
|
+
import { c as _e, i as ve, l as E, n as D, s as O, t as ye } from "./table-Ds_eO9av.js";
|
|
22
|
+
import { n as k, o as A, t as j } from "./toolbar-DBK-c4yy.js";
|
|
23
|
+
import { n as be } from "./use-async-preview-BFwf9ElY.js";
|
|
24
|
+
import { CalendarIcon as xe, ChevronLeftIcon as Se, ChevronRightIcon as M, MailIcon as Ce, Maximize2Icon as N, Minimize2Icon as we, MoreHorizontalIcon as Te, PackageOpenIcon as P, Settings2Icon as Ee } from "lucide-react";
|
|
25
|
+
import { Component as De, Fragment as Oe, Suspense as ke, createContext as Ae, useCallback as F, useContext as I, useEffect as L, useId as je, useLayoutEffect as Me, useMemo as R, useRef as z, useState as B } from "react";
|
|
26
|
+
import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
27
|
+
import { flexRender as W } from "@tanstack/react-table";
|
|
28
|
+
import { getCoreRowModel as Ne, getFilteredRowModel as Pe, getSortedRowModel as Fe, useLegacyTable as Ie } from "@tanstack/react-table/legacy";
|
|
29
|
+
import "#css/table2.css";
|
|
30
|
+
//#region src/components/features/table/table.strings.ts
|
|
31
|
+
function Le(e) {
|
|
32
|
+
let t = e.replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim();
|
|
33
|
+
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : "Column";
|
|
34
|
+
}
|
|
35
|
+
var G = {
|
|
36
|
+
fullscreenEnter: "Enter full screen",
|
|
37
|
+
fullscreenExit: "Exit full screen",
|
|
38
|
+
emptyMessage: "No results found.",
|
|
39
|
+
toolbarLabel: "Table controls",
|
|
40
|
+
actions: {
|
|
41
|
+
triggerLabel: "Actions",
|
|
42
|
+
menuLabel: "Row actions"
|
|
43
|
+
},
|
|
44
|
+
filter: { searchPlaceholder: "Filter…" },
|
|
45
|
+
columnVisibility: {
|
|
46
|
+
title: "Columns",
|
|
47
|
+
triggerLabel: "Toggle columns",
|
|
48
|
+
formatLabel: (e, t) => t && t.trim().length > 0 ? t : Le(e)
|
|
49
|
+
},
|
|
50
|
+
toolbar: {
|
|
51
|
+
scrollLeft: "Scroll left",
|
|
52
|
+
scrollRight: "Scroll right",
|
|
53
|
+
enterFullscreen: "Enter full screen",
|
|
54
|
+
exitFullscreen: "Exit full screen"
|
|
55
|
+
},
|
|
56
|
+
pagination: {
|
|
57
|
+
label: "Pagination",
|
|
58
|
+
previous: "Previous page",
|
|
59
|
+
next: "Next page",
|
|
60
|
+
page: (e) => `Page ${e}`,
|
|
61
|
+
morePages: "More pages",
|
|
62
|
+
summary: (e, t, n) => `${e}–${t} of ${n}`
|
|
63
|
+
},
|
|
64
|
+
selection: {
|
|
65
|
+
summary: (e, t) => `${e} of ${t} row${t === 1 ? "" : "s"} selected.`,
|
|
66
|
+
row: (e) => `Select row ${e + 1}`,
|
|
67
|
+
selectAll: "Select all rows",
|
|
68
|
+
clear: "Clear selection"
|
|
69
|
+
},
|
|
70
|
+
accessibility: {
|
|
71
|
+
scrollRegion: "Table scroll area",
|
|
72
|
+
fullscreenRegion: "Table, full screen"
|
|
73
|
+
},
|
|
74
|
+
expansion: {
|
|
75
|
+
column: "Details",
|
|
76
|
+
show: (e) => `Show details for row ${e + 1}`,
|
|
77
|
+
hide: (e) => `Hide details for row ${e + 1}`,
|
|
78
|
+
loading: "Loading details",
|
|
79
|
+
error: "Couldn't load the details.",
|
|
80
|
+
retry: "Retry",
|
|
81
|
+
empty: "No details."
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
function Re(e) {
|
|
85
|
+
return e ? {
|
|
86
|
+
emptyMessage: e.emptyMessage ?? G.emptyMessage,
|
|
87
|
+
toolbarLabel: e.toolbarLabel ?? G.toolbarLabel,
|
|
88
|
+
fullscreenEnter: e.fullscreenEnter ?? G.fullscreenEnter,
|
|
89
|
+
fullscreenExit: e.fullscreenExit ?? G.fullscreenExit,
|
|
90
|
+
actions: {
|
|
91
|
+
...G.actions,
|
|
92
|
+
...e.actions
|
|
93
|
+
},
|
|
94
|
+
filter: {
|
|
95
|
+
...G.filter,
|
|
96
|
+
...e.filter
|
|
97
|
+
},
|
|
98
|
+
columnVisibility: {
|
|
99
|
+
...G.columnVisibility,
|
|
100
|
+
...e.columnVisibility
|
|
101
|
+
},
|
|
102
|
+
toolbar: {
|
|
103
|
+
...G.toolbar,
|
|
104
|
+
...e.toolbar
|
|
105
|
+
},
|
|
106
|
+
pagination: {
|
|
107
|
+
...G.pagination,
|
|
108
|
+
...e.pagination
|
|
109
|
+
},
|
|
110
|
+
selection: {
|
|
111
|
+
...G.selection,
|
|
112
|
+
...e.selection
|
|
113
|
+
},
|
|
114
|
+
accessibility: {
|
|
115
|
+
...G.accessibility,
|
|
116
|
+
...e.accessibility
|
|
117
|
+
},
|
|
118
|
+
expansion: {
|
|
119
|
+
...G.expansion,
|
|
120
|
+
...e.expansion
|
|
121
|
+
}
|
|
122
|
+
} : G;
|
|
123
|
+
}
|
|
124
|
+
var K = {
|
|
125
|
+
root: "table__root____Bw3-",
|
|
126
|
+
rootFill: "table__rootFill___e1xgp",
|
|
127
|
+
tableArea: "table__tableArea___fzov9",
|
|
128
|
+
table: "table__table___sxewU",
|
|
129
|
+
topbar: "table__topbar___ob1BI",
|
|
130
|
+
topbarSticky: "table__topbarSticky___Z9Avx",
|
|
131
|
+
topbarGrid: "table__topbarGrid___SuPbS",
|
|
132
|
+
topbarStart: "table__topbarStart___zLoO4",
|
|
133
|
+
topbarEnd: "table__topbarEnd___KPp0B",
|
|
134
|
+
filterInput: "table__filterInput___AoxWd",
|
|
135
|
+
toolbar: "table__toolbar___9TsI4",
|
|
136
|
+
tableAreaScrolls: "table__tableAreaScrolls___rmUek",
|
|
137
|
+
tableContainerScrolls: "table__tableContainerScrolls___Vy4nW",
|
|
138
|
+
tableContainerBounded: "table__tableContainerBounded___HcnK2",
|
|
139
|
+
header: "table__header___vKUYJ",
|
|
140
|
+
groupRow: "table__groupRow___DQRvH",
|
|
141
|
+
headerTransparent: "table__headerTransparent___HEgsE",
|
|
142
|
+
groupHead: "table__groupHead____kfTG",
|
|
143
|
+
row: "table__row___C-daw",
|
|
144
|
+
stickyColumn: "table__stickyColumn___lKBKW",
|
|
145
|
+
stickyColumnNext: "table__stickyColumnNext___34Nuq",
|
|
146
|
+
stickyColumnAfterGutter: "table__stickyColumnAfterGutter___vjYhH",
|
|
147
|
+
stickyCorner: "table__stickyCorner___ty0rC",
|
|
148
|
+
emptyRow: "table__emptyRow___G0Xjk",
|
|
149
|
+
emptyCell: "table__emptyCell___wFxoN",
|
|
150
|
+
rowActions: "table__rowActions___4LKuB",
|
|
151
|
+
selectionCell: "table__selectionCell___o5T5I",
|
|
152
|
+
expandCell: "table__expandCell___nvllw",
|
|
153
|
+
expandToggle: "table__expandToggle___4X_7s",
|
|
154
|
+
expandedCell: "table__expandedCell___x4UQP",
|
|
155
|
+
expandedPin: "table__expandedPin___iiouK",
|
|
156
|
+
expandedMotion: "table__expandedMotion___qOHyp",
|
|
157
|
+
expandedRow: "table__expandedRow___EOCNV",
|
|
158
|
+
expandedClip: "table__expandedClip___7O_nS",
|
|
159
|
+
expandedContent: "table__expandedContent___hyQ1e",
|
|
160
|
+
expandedMessage: "table__expandedMessage___y0bUd",
|
|
161
|
+
footer: "table__footer___N5XRy",
|
|
162
|
+
nowrap: "table__nowrap___NhG8N",
|
|
163
|
+
cellStack: "table__cellStack___0me4G",
|
|
164
|
+
cluster: "table__cluster___mZHOQ",
|
|
165
|
+
iconCell: "table__iconCell___rITAE",
|
|
166
|
+
iconCellTop: "table__iconCellTop___2t7aI",
|
|
167
|
+
cellIcon: "table__cellIcon___vm0Kp",
|
|
168
|
+
avatarCell: "table__avatarCell___9Ljrl",
|
|
169
|
+
resourceCell: "table__resourceCell___fj4Nj",
|
|
170
|
+
resourceMedia: "table__resourceMedia___TG4rV",
|
|
171
|
+
resourceBody: "table__resourceBody___oVS8m",
|
|
172
|
+
resourceTitleLine: "table__resourceTitleLine___WqIRI",
|
|
173
|
+
resourceLink: "table__resourceLink___gQLB-",
|
|
174
|
+
resourceFacts: "table__resourceFacts___O-UYi",
|
|
175
|
+
resourceFact: "table__resourceFact___xUn86"
|
|
176
|
+
};
|
|
177
|
+
//#endregion
|
|
178
|
+
//#region src/components/features/table/data-table-actions.tsx
|
|
179
|
+
function ze({ row: e, actions: t, menuLabel: r, displayMode: i = "menu", responsiveBreakpoint: a = 1040, strings: l = G }) {
|
|
180
|
+
let u = z(null), [d, f] = B(!1);
|
|
181
|
+
L(() => {
|
|
182
|
+
if (i !== "auto") return;
|
|
183
|
+
let e = u.current;
|
|
184
|
+
if (!e) return;
|
|
185
|
+
let t = e.closest("table") ?? e, n = new ResizeObserver(([e]) => {
|
|
186
|
+
e && f(e.contentRect.width >= a);
|
|
187
|
+
});
|
|
188
|
+
return n.observe(t), () => n.disconnect();
|
|
189
|
+
}, [i, a]);
|
|
190
|
+
let p = R(() => o(t, e, { stripHref: !0 }), [t, e]);
|
|
191
|
+
if (p.length === 0) return null;
|
|
192
|
+
let m = i === "inline" || i === "auto" && d;
|
|
193
|
+
return /* @__PURE__ */ H("div", {
|
|
194
|
+
ref: u,
|
|
195
|
+
className: n("data-table-actions--component", K.rowActions),
|
|
196
|
+
onClick: (e) => e.stopPropagation(),
|
|
197
|
+
children: m ? /* @__PURE__ */ H(c, { actions: p }) : /* @__PURE__ */ H(s, {
|
|
198
|
+
actions: p,
|
|
199
|
+
icon: Te,
|
|
200
|
+
strings: { trigger: r ?? l.actions.menuLabel },
|
|
201
|
+
align: "end",
|
|
202
|
+
buttonProps: {
|
|
203
|
+
tone: "neutral",
|
|
204
|
+
appearance: "ghost",
|
|
205
|
+
iconOnly: !0
|
|
206
|
+
}
|
|
207
|
+
})
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region src/components/features/table/data-table-expanded-row.tsx
|
|
212
|
+
var Be = () => {};
|
|
213
|
+
function Ve({ row: e, panelId: t, strings: n }) {
|
|
214
|
+
if (!e.getCanExpand()) return null;
|
|
215
|
+
let r = e.getIsExpanded();
|
|
216
|
+
return /* @__PURE__ */ H("button", {
|
|
217
|
+
type: "button",
|
|
218
|
+
id: `${t}-toggle`,
|
|
219
|
+
"aria-expanded": r,
|
|
220
|
+
"aria-controls": r ? t : void 0,
|
|
221
|
+
"aria-label": r ? n.expansion.hide(e.index) : n.expansion.show(e.index),
|
|
222
|
+
"data-hit-area": !0,
|
|
223
|
+
className: K.expandToggle,
|
|
224
|
+
onClick: (t) => {
|
|
225
|
+
t.stopPropagation(), e.toggleExpanded();
|
|
226
|
+
},
|
|
227
|
+
children: /* @__PURE__ */ H(M, { "aria-hidden": !0 })
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
function He({ children: e, action: n, alert: r = !1 }) {
|
|
231
|
+
return /* @__PURE__ */ U("div", {
|
|
232
|
+
role: r ? "alert" : void 0,
|
|
233
|
+
className: K.expandedMessage,
|
|
234
|
+
children: [/* @__PURE__ */ H(t, {
|
|
235
|
+
tag: "span",
|
|
236
|
+
type: "secondary",
|
|
237
|
+
children: e
|
|
238
|
+
}), n]
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
function Ue({ label: e, onRetry: t }) {
|
|
242
|
+
return /* @__PURE__ */ H(a, {
|
|
243
|
+
type: "button",
|
|
244
|
+
tone: "neutral",
|
|
245
|
+
appearance: "outline",
|
|
246
|
+
onClick: t,
|
|
247
|
+
children: e
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
var q = class extends De {
|
|
251
|
+
state = {
|
|
252
|
+
failed: !1,
|
|
253
|
+
attempt: 0
|
|
254
|
+
};
|
|
255
|
+
static getDerivedStateFromError() {
|
|
256
|
+
return { failed: !0 };
|
|
257
|
+
}
|
|
258
|
+
retry = () => this.setState((e) => ({
|
|
259
|
+
failed: !1,
|
|
260
|
+
attempt: e.attempt + 1
|
|
261
|
+
}));
|
|
262
|
+
render() {
|
|
263
|
+
let { strings: e, children: t } = this.props;
|
|
264
|
+
return this.state.failed ? /* @__PURE__ */ H(He, {
|
|
265
|
+
alert: !0,
|
|
266
|
+
action: /* @__PURE__ */ H(Ue, {
|
|
267
|
+
label: e.expansion.retry,
|
|
268
|
+
onRetry: this.retry
|
|
269
|
+
}),
|
|
270
|
+
children: e.expansion.error
|
|
271
|
+
}) : /* @__PURE__ */ H(Oe, { children: t }, this.state.attempt);
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
function We({ row: e, config: t, collapse: n }) {
|
|
275
|
+
return /* @__PURE__ */ H(V, { children: t.render(e, {
|
|
276
|
+
detail: void 0,
|
|
277
|
+
refresh: Be,
|
|
278
|
+
collapse: n
|
|
279
|
+
}) });
|
|
280
|
+
}
|
|
281
|
+
function J({ row: e, config: t, strings: n, collapse: r, open: i, cacheKey: a }) {
|
|
282
|
+
let { onLoad: o, render: s } = t, c = be({
|
|
283
|
+
type: "data-table-row",
|
|
284
|
+
context: e,
|
|
285
|
+
cacheKey: a,
|
|
286
|
+
open: i,
|
|
287
|
+
onShow: ({ signal: t }) => o ? o(e, { signal: t }) : Promise.resolve(void 0)
|
|
288
|
+
});
|
|
289
|
+
if (c.status === "error") return /* @__PURE__ */ H(He, {
|
|
290
|
+
alert: !0,
|
|
291
|
+
action: /* @__PURE__ */ H(Ue, {
|
|
292
|
+
label: n.expansion.retry,
|
|
293
|
+
onRetry: c.refresh
|
|
294
|
+
}),
|
|
295
|
+
children: n.expansion.error
|
|
296
|
+
});
|
|
297
|
+
if (c.status === "empty") return /* @__PURE__ */ H(He, { children: n.expansion.empty });
|
|
298
|
+
if (c.status !== "success") return /* @__PURE__ */ H(me, {
|
|
299
|
+
lines: 3,
|
|
300
|
+
label: n.expansion.loading
|
|
301
|
+
});
|
|
302
|
+
let l = {
|
|
303
|
+
detail: c.data,
|
|
304
|
+
refresh: c.refresh,
|
|
305
|
+
collapse: r
|
|
306
|
+
};
|
|
307
|
+
return /* @__PURE__ */ H(V, { children: s(e, l) });
|
|
308
|
+
}
|
|
309
|
+
function Ge({ row: e, open: t, onExited: n, colSpan: r, panelId: i, cacheKey: a, config: o, strings: s }) {
|
|
310
|
+
let c = z(null), l = z(null), u = `${i}-toggle`, d = e.id, f = F(() => e.toggleExpanded(!1), [e]);
|
|
311
|
+
Me(() => {
|
|
312
|
+
t || c.current?.contains(document.activeElement) && document.getElementById(u)?.focus();
|
|
313
|
+
}, [t, u]), L(() => {
|
|
314
|
+
if (t) return;
|
|
315
|
+
let e = l.current, r = e ? Number.parseFloat(getComputedStyle(e).transitionDuration) : 0;
|
|
316
|
+
if (!r) {
|
|
317
|
+
n(d);
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
let i = window.setTimeout(() => n(d), r * 1e3 + 50);
|
|
321
|
+
return () => window.clearTimeout(i);
|
|
322
|
+
}, [
|
|
323
|
+
t,
|
|
324
|
+
n,
|
|
325
|
+
d
|
|
326
|
+
]);
|
|
327
|
+
let p = o.onLoad ? /* @__PURE__ */ H(J, {
|
|
328
|
+
row: e.original,
|
|
329
|
+
config: o,
|
|
330
|
+
strings: s,
|
|
331
|
+
collapse: f,
|
|
332
|
+
open: t,
|
|
333
|
+
cacheKey: a
|
|
334
|
+
}) : /* @__PURE__ */ H(We, {
|
|
335
|
+
row: e.original,
|
|
336
|
+
config: o,
|
|
337
|
+
strings: s,
|
|
338
|
+
collapse: f
|
|
339
|
+
});
|
|
340
|
+
return /* @__PURE__ */ H(E, {
|
|
341
|
+
ref: c,
|
|
342
|
+
id: i,
|
|
343
|
+
"data-slot": "data-table-expanded-row",
|
|
344
|
+
"data-state": t ? "open" : "closing",
|
|
345
|
+
inert: !t || void 0,
|
|
346
|
+
className: K.expandedRow,
|
|
347
|
+
children: /* @__PURE__ */ H("td", {
|
|
348
|
+
colSpan: r,
|
|
349
|
+
className: K.expandedCell,
|
|
350
|
+
children: /* @__PURE__ */ H("div", {
|
|
351
|
+
className: K.expandedPin,
|
|
352
|
+
children: /* @__PURE__ */ H("div", {
|
|
353
|
+
ref: l,
|
|
354
|
+
className: K.expandedMotion,
|
|
355
|
+
children: /* @__PURE__ */ H("div", {
|
|
356
|
+
className: K.expandedClip,
|
|
357
|
+
children: /* @__PURE__ */ H("div", {
|
|
358
|
+
className: K.expandedContent,
|
|
359
|
+
children: /* @__PURE__ */ H(q, {
|
|
360
|
+
strings: s,
|
|
361
|
+
children: /* @__PURE__ */ H(ke, {
|
|
362
|
+
fallback: /* @__PURE__ */ H(me, {
|
|
363
|
+
lines: 3,
|
|
364
|
+
label: s.expansion.loading
|
|
365
|
+
}),
|
|
366
|
+
children: p
|
|
367
|
+
})
|
|
368
|
+
})
|
|
369
|
+
})
|
|
370
|
+
})
|
|
371
|
+
})
|
|
372
|
+
})
|
|
373
|
+
})
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
//#endregion
|
|
377
|
+
//#region src/components/features/table/table-helpers.tsx
|
|
378
|
+
var Ke = "expand", qe = "selection";
|
|
379
|
+
function Je(e, t, n, r, i, a = !1, o = !1) {
|
|
380
|
+
let s = typeof n == "function" ? n(e, t) : n ?? "", c = e === "expand" ? `${s} ${K.expandCell}` : e === qe ? `${s} ${K.selectionCell}` : s;
|
|
381
|
+
return !r || i > +!!a + +!!o ? c : i === 0 ? `${c} ${K.stickyColumn}` : a && i === 1 ? `${c} ${K.stickyColumnNext}` : `${c} ${K.stickyColumnAfterGutter}`;
|
|
382
|
+
}
|
|
383
|
+
function Ye(e, t) {
|
|
384
|
+
return 1 + +!!e + +!!t;
|
|
385
|
+
}
|
|
386
|
+
function Xe(e) {
|
|
387
|
+
return e.getSelectedRowModel().rows.map((e) => e.original);
|
|
388
|
+
}
|
|
389
|
+
function Ze(e, t = G) {
|
|
390
|
+
return [{
|
|
391
|
+
id: qe,
|
|
392
|
+
header: ({ table: e }) => /* @__PURE__ */ H(C, {
|
|
393
|
+
checked: e.getIsAllPageRowsSelected(),
|
|
394
|
+
indeterminate: e.getIsSomePageRowsSelected() && !e.getIsAllPageRowsSelected(),
|
|
395
|
+
onChange: (t) => e.toggleAllPageRowsSelected(t.target.checked),
|
|
396
|
+
"aria-label": t.selection.selectAll
|
|
397
|
+
}),
|
|
398
|
+
cell: ({ row: e }) => /* @__PURE__ */ H(C, {
|
|
399
|
+
checked: e.getIsSelected(),
|
|
400
|
+
disabled: !e.getCanSelect(),
|
|
401
|
+
onChange: (t) => e.toggleSelected(t.target.checked),
|
|
402
|
+
onClick: (e) => e.stopPropagation(),
|
|
403
|
+
"aria-label": t.selection.row(e.index)
|
|
404
|
+
}),
|
|
405
|
+
enableSorting: !1,
|
|
406
|
+
enableHiding: !1,
|
|
407
|
+
size: 40
|
|
408
|
+
}, ...e];
|
|
409
|
+
}
|
|
410
|
+
function Qe(e, t, n) {
|
|
411
|
+
return [{
|
|
412
|
+
id: Ke,
|
|
413
|
+
header: () => /* @__PURE__ */ H(b, { children: t.expansion.column }),
|
|
414
|
+
cell: ({ row: e }) => /* @__PURE__ */ H(Ve, {
|
|
415
|
+
row: e,
|
|
416
|
+
panelId: n(e.id),
|
|
417
|
+
strings: t
|
|
418
|
+
}),
|
|
419
|
+
enableSorting: !1,
|
|
420
|
+
enableHiding: !1,
|
|
421
|
+
size: 24
|
|
422
|
+
}, ...e];
|
|
423
|
+
}
|
|
424
|
+
//#endregion
|
|
425
|
+
//#region src/components/features/table/data-table-body.tsx
|
|
426
|
+
var $e = [];
|
|
427
|
+
function et(e) {
|
|
428
|
+
let t = e.join("\0"), [n, r] = B(() => ({
|
|
429
|
+
key: t,
|
|
430
|
+
open: e,
|
|
431
|
+
closing: $e
|
|
432
|
+
})), i = n.closing;
|
|
433
|
+
if (n.key !== t) {
|
|
434
|
+
let a = new Set(e);
|
|
435
|
+
i = [.../* @__PURE__ */ new Set([...n.closing, ...n.open])].filter((e) => !a.has(e)), r({
|
|
436
|
+
key: t,
|
|
437
|
+
open: e,
|
|
438
|
+
closing: i
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
let a = F((e) => {
|
|
442
|
+
r((t) => t.closing.includes(e) ? {
|
|
443
|
+
...t,
|
|
444
|
+
closing: t.closing.filter((t) => t !== e)
|
|
445
|
+
} : t);
|
|
446
|
+
}, []);
|
|
447
|
+
return {
|
|
448
|
+
closing: i,
|
|
449
|
+
finish: a
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
function tt({ table: e, onRowClick: t, emptyStateMessage: r, emptyStateAction: i, cellClassName: a, rowClassName: o, stickyFirstColumn: s = !1, hasSelectionColumn: c = !1, hasExpandColumn: l = !1, expandedRow: u, expansionId: d = "", striped: f = !1, strings: p = G }) {
|
|
453
|
+
let m = e.getRowModel().rows, h = e.getVisibleFlatColumns().length, g = u ? m.filter((e) => e.getIsExpanded() && e.getCanExpand()).map((e) => e.id) : $e, { closing: _, finish: ee } = et(g);
|
|
454
|
+
return m.length === 0 ? /* @__PURE__ */ H(D, { children: /* @__PURE__ */ H(E, {
|
|
455
|
+
className: K.emptyRow,
|
|
456
|
+
children: /* @__PURE__ */ H(ve, {
|
|
457
|
+
colSpan: h,
|
|
458
|
+
className: K.emptyCell,
|
|
459
|
+
children: /* @__PURE__ */ H(pe, {
|
|
460
|
+
title: r ?? p.emptyMessage,
|
|
461
|
+
description: !1,
|
|
462
|
+
media: /* @__PURE__ */ H(P, {}),
|
|
463
|
+
mediaVariant: "icon-soft",
|
|
464
|
+
action: i
|
|
465
|
+
})
|
|
466
|
+
})
|
|
467
|
+
}) }) : /* @__PURE__ */ H(D, {
|
|
468
|
+
className: "data-table-body--component",
|
|
469
|
+
"data-striped": f || void 0,
|
|
470
|
+
children: m.map((e, r) => {
|
|
471
|
+
let i = e.getIsSelected(), f = g.includes(e.id), m = !!u && (f || _.includes(e.id)), te = `${d}-panel-${e.id}`;
|
|
472
|
+
return /* @__PURE__ */ U(Oe, { children: [/* @__PURE__ */ H(E, {
|
|
473
|
+
"data-state": i ? "selected" : void 0,
|
|
474
|
+
"data-clickable": t ? "" : void 0,
|
|
475
|
+
"data-expanded": m || void 0,
|
|
476
|
+
className: n(K.row, typeof o == "function" ? o(e, r) : o),
|
|
477
|
+
onClick: t ? () => t(e.original) : void 0,
|
|
478
|
+
children: e.getVisibleCells().map((t, n) => /* @__PURE__ */ H(ve, {
|
|
479
|
+
align: t.column.columnDef.meta?.align,
|
|
480
|
+
className: Je(t.column.id, e, a, s, n, c, l),
|
|
481
|
+
children: W(t.column.columnDef.cell, t.getContext())
|
|
482
|
+
}, t.id))
|
|
483
|
+
}), m && /* @__PURE__ */ H(Ge, {
|
|
484
|
+
row: e,
|
|
485
|
+
open: f,
|
|
486
|
+
onExited: ee,
|
|
487
|
+
colSpan: h,
|
|
488
|
+
panelId: te,
|
|
489
|
+
cacheKey: `${d}:${e.id}`,
|
|
490
|
+
config: u,
|
|
491
|
+
strings: p
|
|
492
|
+
})] }, e.id);
|
|
493
|
+
})
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
//#endregion
|
|
497
|
+
//#region src/components/features/table/data-table-header.tsx
|
|
498
|
+
function nt({ table: e, stickyHeader: r = !1, headerClassName: i, cellClassName: a, stickyFirstColumn: o = !1, hasSelectionColumn: s = !1, hasExpandColumn: c = !1, columnGroups: l, headerTransparent: u = !1 }) {
|
|
499
|
+
let d = e.getHeaderGroups(), f = Ye(s, c), p = (() => {
|
|
500
|
+
if (!l?.length || d.length === 0) return null;
|
|
501
|
+
let e = d[0]?.headers ?? [], n = [], r = null, i = 0, a = () => {
|
|
502
|
+
i !== 0 && n.push(/* @__PURE__ */ H(O, {
|
|
503
|
+
colSpan: i,
|
|
504
|
+
align: "center",
|
|
505
|
+
className: K.groupHead,
|
|
506
|
+
children: !!r && /* @__PURE__ */ H(t, {
|
|
507
|
+
tag: "span",
|
|
508
|
+
size: "inherit",
|
|
509
|
+
weight: "medium",
|
|
510
|
+
type: "secondary",
|
|
511
|
+
children: r
|
|
512
|
+
})
|
|
513
|
+
}, `group-${r ?? "none"}-${n.length}`));
|
|
514
|
+
};
|
|
515
|
+
return e.forEach((t, n) => {
|
|
516
|
+
let o = l.find((e) => e.columns.includes(t.id))?.header ?? "";
|
|
517
|
+
o === r ? i += 1 : (a(), r = o, i = 1), n === e.length - 1 && a();
|
|
518
|
+
}), /* @__PURE__ */ H(E, {
|
|
519
|
+
className: K.groupRow,
|
|
520
|
+
children: n
|
|
521
|
+
});
|
|
522
|
+
})();
|
|
523
|
+
return /* @__PURE__ */ U(_e, {
|
|
524
|
+
className: n("data-table-header--component", K.header, u && K.headerTransparent, i),
|
|
525
|
+
"data-sticky": r || void 0,
|
|
526
|
+
children: [p, d.map((e) => /* @__PURE__ */ H(E, { children: e.headers.map((e, t) => {
|
|
527
|
+
if (e.isPlaceholder) return /* @__PURE__ */ H(O, { "aria-hidden": !0 }, e.id);
|
|
528
|
+
let i = e.column.getIsSorted();
|
|
529
|
+
return /* @__PURE__ */ H(O, {
|
|
530
|
+
align: e.column.columnDef.meta?.align,
|
|
531
|
+
sortable: e.column.getCanSort(),
|
|
532
|
+
sortDirection: i === "asc" ? "ascending" : i === "desc" ? "descending" : null,
|
|
533
|
+
onSort: () => e.column.toggleSorting(),
|
|
534
|
+
className: n(Je(e.id, null, a, o, t, s, c), r && o && t < f && K.stickyCorner),
|
|
535
|
+
children: W(e.column.columnDef.header, e.getContext())
|
|
536
|
+
}, e.id);
|
|
537
|
+
}) }, e.id))]
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
//#endregion
|
|
541
|
+
//#region src/components/features/table/column-visibility-toggle.tsx
|
|
542
|
+
function rt({ table: e, className: t, align: r = "end", labelVisibility: i = "hidden", strings: a = G, buttonProps: o }) {
|
|
543
|
+
let c = e.getAllColumns().filter((e) => e.getCanHide());
|
|
544
|
+
if (c.length === 0) return null;
|
|
545
|
+
let l = c.map((e) => {
|
|
546
|
+
let t = e.columnDef.header;
|
|
547
|
+
return {
|
|
548
|
+
id: e.id,
|
|
549
|
+
type: "checkbox",
|
|
550
|
+
label: a.columnVisibility.formatLabel(e.id, typeof t == "string" ? t : void 0),
|
|
551
|
+
group: a.columnVisibility.title,
|
|
552
|
+
checked: e.getIsVisible(),
|
|
553
|
+
onCheckedChange: (t) => e.toggleVisibility(t)
|
|
554
|
+
};
|
|
555
|
+
});
|
|
556
|
+
return /* @__PURE__ */ H(s, {
|
|
557
|
+
actions: l,
|
|
558
|
+
icon: Ee,
|
|
559
|
+
label: a.columnVisibility.triggerLabel,
|
|
560
|
+
labelVisibility: i,
|
|
561
|
+
align: r,
|
|
562
|
+
preserveOrder: !0,
|
|
563
|
+
buttonProps: {
|
|
564
|
+
tone: "neutral",
|
|
565
|
+
appearance: "ghost",
|
|
566
|
+
iconOnly: i === "hidden",
|
|
567
|
+
...o,
|
|
568
|
+
className: n("column-visibility-toggle--component", o?.className, t)
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
//#endregion
|
|
573
|
+
//#region src/components/features/table/fullscreen-toggle.tsx
|
|
574
|
+
function it({ fullscreen: e, onFullscreenChange: t, enterLabel: r, exitLabel: i, strings: o, className: s, render: c }) {
|
|
575
|
+
let l = f(G, o), u = e ? i ?? l.fullscreenExit : r ?? l.fullscreenEnter;
|
|
576
|
+
return /* @__PURE__ */ H(a, {
|
|
577
|
+
render: c,
|
|
578
|
+
type: "button",
|
|
579
|
+
tone: "neutral",
|
|
580
|
+
appearance: "ghost",
|
|
581
|
+
iconOnly: !0,
|
|
582
|
+
"aria-label": u,
|
|
583
|
+
"aria-pressed": e,
|
|
584
|
+
onClick: () => t(!e),
|
|
585
|
+
className: n("fullscreen-toggle--component", s),
|
|
586
|
+
children: H(e ? we : N, {})
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
//#endregion
|
|
590
|
+
//#region src/components/features/table/use-table-scroll.ts
|
|
591
|
+
var at = 300;
|
|
592
|
+
function Y(e) {
|
|
593
|
+
return e?.querySelector(".table--container") ?? null;
|
|
594
|
+
}
|
|
595
|
+
function ot(e, t = {}) {
|
|
596
|
+
let { stepPx: n = at, deps: r = [] } = t, [i, a] = B(!1), [o, s] = B(!1), c = z(0), l = z(null), u = F(() => {
|
|
597
|
+
let t = Y(e.current);
|
|
598
|
+
if (!t) {
|
|
599
|
+
a(!1), s(!1);
|
|
600
|
+
return;
|
|
601
|
+
}
|
|
602
|
+
let { start: n, end: r } = S(t), i = getComputedStyle(t).direction === "rtl";
|
|
603
|
+
a(i ? r : n), s(i ? n : r);
|
|
604
|
+
}, [e]);
|
|
605
|
+
L(() => {
|
|
606
|
+
let t = window.setTimeout(() => {
|
|
607
|
+
let t = Y(e.current);
|
|
608
|
+
if (!t) return;
|
|
609
|
+
u();
|
|
610
|
+
let n = () => {
|
|
611
|
+
cancelAnimationFrame(c.current), c.current = requestAnimationFrame(u);
|
|
612
|
+
};
|
|
613
|
+
t.addEventListener("scroll", n, { passive: !0 });
|
|
614
|
+
let r = new ResizeObserver(u);
|
|
615
|
+
r.observe(t), t.firstElementChild && r.observe(t.firstElementChild), l.current = () => {
|
|
616
|
+
t.removeEventListener("scroll", n), cancelAnimationFrame(c.current), r.disconnect();
|
|
617
|
+
};
|
|
618
|
+
}, 0);
|
|
619
|
+
return () => {
|
|
620
|
+
window.clearTimeout(t), l.current?.(), l.current = null;
|
|
621
|
+
};
|
|
622
|
+
}, [
|
|
623
|
+
u,
|
|
624
|
+
e,
|
|
625
|
+
...r
|
|
626
|
+
]);
|
|
627
|
+
let d = F((t) => {
|
|
628
|
+
Y(e.current)?.scrollBy({
|
|
629
|
+
left: t,
|
|
630
|
+
behavior: "smooth"
|
|
631
|
+
});
|
|
632
|
+
}, [e]);
|
|
633
|
+
return {
|
|
634
|
+
canScrollLeft: i,
|
|
635
|
+
canScrollRight: o,
|
|
636
|
+
scrollBy: d,
|
|
637
|
+
scrollLeft: F(() => d(-n), [d, n]),
|
|
638
|
+
scrollRight: F(() => d(n), [d, n])
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
//#endregion
|
|
642
|
+
//#region src/components/features/table/data-table-toolbar.tsx
|
|
643
|
+
function st({ table: e, tableAreaRef: t, fullscreen: r, onFullscreenChange: i, showFullscreenToggle: a = !1, enableColumnVisibility: o = !1, labelVisibility: s = "hidden", strings: c = G }) {
|
|
644
|
+
let l = ot(t, { deps: [r] }), u = o ? e.getAllColumns().filter((e) => e.getCanHide()) : [], d = l.canScrollLeft || l.canScrollRight, f = u.length > 0;
|
|
645
|
+
return !d && !f && !a ? null : /* @__PURE__ */ U(j, {
|
|
646
|
+
"aria-label": c.toolbarLabel ?? "Table controls",
|
|
647
|
+
className: n("data-table-toolbar--component", K.toolbar),
|
|
648
|
+
children: [
|
|
649
|
+
d && /* @__PURE__ */ U(V, { children: [
|
|
650
|
+
/* @__PURE__ */ H(k, {
|
|
651
|
+
type: "button",
|
|
652
|
+
tone: "neutral",
|
|
653
|
+
appearance: "ghost",
|
|
654
|
+
iconOnly: !0,
|
|
655
|
+
"aria-label": c.toolbar.scrollLeft,
|
|
656
|
+
disabled: !l.canScrollLeft,
|
|
657
|
+
onClick: l.scrollLeft,
|
|
658
|
+
children: /* @__PURE__ */ H(Se, {})
|
|
659
|
+
}),
|
|
660
|
+
/* @__PURE__ */ H(k, {
|
|
661
|
+
type: "button",
|
|
662
|
+
tone: "neutral",
|
|
663
|
+
appearance: "ghost",
|
|
664
|
+
iconOnly: !0,
|
|
665
|
+
"aria-label": c.toolbar.scrollRight,
|
|
666
|
+
disabled: !l.canScrollRight,
|
|
667
|
+
onClick: l.scrollRight,
|
|
668
|
+
children: /* @__PURE__ */ H(M, {})
|
|
669
|
+
}),
|
|
670
|
+
(f || a) && /* @__PURE__ */ H(A, {})
|
|
671
|
+
] }),
|
|
672
|
+
f && /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(rt, {
|
|
673
|
+
table: e,
|
|
674
|
+
strings: c,
|
|
675
|
+
labelVisibility: s,
|
|
676
|
+
buttonProps: { render: /* @__PURE__ */ H(k, {}) }
|
|
677
|
+
}), a && /* @__PURE__ */ H(A, {})] }),
|
|
678
|
+
a && /* @__PURE__ */ H(it, {
|
|
679
|
+
fullscreen: r,
|
|
680
|
+
onFullscreenChange: i,
|
|
681
|
+
enterLabel: c.toolbar.enterFullscreen,
|
|
682
|
+
exitLabel: c.toolbar.exitFullscreen,
|
|
683
|
+
render: /* @__PURE__ */ H(k, {})
|
|
684
|
+
})
|
|
685
|
+
]
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
//#endregion
|
|
689
|
+
//#region src/components/features/table/use-fullscreen-modality.ts
|
|
690
|
+
var ct = [
|
|
691
|
+
"a[href]",
|
|
692
|
+
"button:not([disabled])",
|
|
693
|
+
"input:not([disabled])",
|
|
694
|
+
"select:not([disabled])",
|
|
695
|
+
"textarea:not([disabled])",
|
|
696
|
+
"[tabindex]:not([tabindex=\"-1\"])"
|
|
697
|
+
].join(",");
|
|
698
|
+
function lt(e, t, n) {
|
|
699
|
+
let r = T(n);
|
|
700
|
+
L(() => {
|
|
701
|
+
if (!e || typeof document > "u") return;
|
|
702
|
+
let n = document.activeElement, i = document.body.style.overflow;
|
|
703
|
+
document.body.style.overflow = "hidden";
|
|
704
|
+
let a = (e) => {
|
|
705
|
+
let n = t.current;
|
|
706
|
+
if (!n) return;
|
|
707
|
+
if (e.key === "Escape") {
|
|
708
|
+
e.preventDefault(), e.stopPropagation(), r.current();
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
if (e.key !== "Tab") return;
|
|
712
|
+
let i = Array.from(n.querySelectorAll(ct)).filter((e) => e.offsetParent !== null || e === document.activeElement);
|
|
713
|
+
if (i.length === 0) return;
|
|
714
|
+
let a = i[0], o = i[i.length - 1], s = document.activeElement, c = s instanceof Node && n.contains(s);
|
|
715
|
+
e.shiftKey && (!c || s === a) ? (e.preventDefault(), o.focus()) : !e.shiftKey && (!c || s === o) && (e.preventDefault(), a.focus());
|
|
716
|
+
}, o = t.current;
|
|
717
|
+
return document.addEventListener("keydown", a, !0), () => {
|
|
718
|
+
document.removeEventListener("keydown", a, !0), document.body.style.overflow = i;
|
|
719
|
+
let e = document.activeElement;
|
|
720
|
+
(o && e instanceof Node && o.contains(e) || e === document.body) && n?.isConnected && n.focus();
|
|
721
|
+
};
|
|
722
|
+
}, [
|
|
723
|
+
e,
|
|
724
|
+
t,
|
|
725
|
+
r
|
|
726
|
+
]);
|
|
727
|
+
}
|
|
728
|
+
//#endregion
|
|
729
|
+
//#region src/components/features/table/data-table-size.ts
|
|
730
|
+
var ut = Ae("default");
|
|
731
|
+
function dt() {
|
|
732
|
+
return I(ut);
|
|
733
|
+
}
|
|
734
|
+
//#endregion
|
|
735
|
+
//#region src/components/features/table/data-table.tsx
|
|
736
|
+
function ft(e) {
|
|
737
|
+
if (e !== void 0) return typeof e == "number" ? `${e}px` : e;
|
|
738
|
+
}
|
|
739
|
+
function X({ size: e, surface: i = "card", headerTransparent: a = !1, columns: o, data: s, columnGroups: c, enableSorting: l = !1, enableFiltering: u = !1, enableRowSelection: d = !1, enableMultiRowSelection: f = !0, enableSubRowSelection: p = !1, enableColumnVisibility: m = !1, manualSorting: h = !1, fullscreen: g, defaultFullscreen: _ = !1, onFullscreenChange: ee, showFullscreenToggle: te = !1, stickyHeader: ne = !1, stickyToolbar: re = !1, stickyFirstColumn: ie = !1, maxBodyHeight: ae, fillAvailableHeight: v = !1, striped: oe = !1, emptyStateMessage: se, emptyStateAction: ce, className: le, rowClassName: ue, cellClassName: y, headerClassName: de, wrapperClassName: pe, tableContainerClassName: me, strings: b, filterColumn: S, filterPlaceholder: C, topbarContent: T, topbarEnd: ge, topbarClassName: _e, toolbarLabelVisibility: ve = "hidden", footerContent: E, selectionToolbar: D, bulkActions: O, selectionToolbarClassName: k, rowActions: A, rowActionsMenuLabel: j, rowActionsDisplayMode: be, rowActionsBreakpoint: xe, pageCount: Se, page: M, onPageChange: Ce, totalRowCount: N, pageSize: we, onRowClick: Te, expandedRow: P, onRowSelectionChange: Ee, onSortingChange: De, onColumnVisibilityChange: Oe, onColumnFiltersChange: ke, getRowId: Ae, rowSelection: I, sorting: L, defaultSorting: Me, columnVisibility: W, defaultColumnVisibility: Le, initialState: G, storageKey: Be, style: Ve }) {
|
|
740
|
+
let { density: He } = r(), Ue = e ?? (He === "compact" ? "sm" : "default"), q = R(() => Re(b), [b]), We = R(() => Array.isArray(o) && o.length === 2 && Array.isArray(o[1]) ? o[0] : o, [o]), J = Be ? `dt.${Be}.columns` : null, Ge = R(() => {
|
|
741
|
+
let e = Le ?? G?.columnVisibility ?? {};
|
|
742
|
+
if (!J || typeof window > "u") return e;
|
|
743
|
+
try {
|
|
744
|
+
let t = window.localStorage.getItem(J);
|
|
745
|
+
return {
|
|
746
|
+
...t ? JSON.parse(t) : {},
|
|
747
|
+
...e
|
|
748
|
+
};
|
|
749
|
+
} catch {
|
|
750
|
+
return e;
|
|
751
|
+
}
|
|
752
|
+
}, [
|
|
753
|
+
Le,
|
|
754
|
+
G?.columnVisibility,
|
|
755
|
+
J
|
|
756
|
+
]), [Ke, qe] = B(Me ?? G?.sorting ?? []), [Je, Ye] = B(Ge), [Xe, $e] = B(G?.rowSelection ?? {}), [et, rt] = B(G?.columnFilters ?? []), [it, at] = B(_), [Y, ot] = B(P?.defaultExpanded ?? {}), ct = L ?? Ke, dt = W ?? Je, X = I ?? Xe, Z = g ?? it, Q = P !== void 0, pt = P?.expanded ?? Y, mt = je(), ht = z(null), gt = z(null), _t = F((e) => {
|
|
757
|
+
let t = typeof e == "function" ? e(ct) : e;
|
|
758
|
+
L === void 0 && qe(t), De?.(t);
|
|
759
|
+
}, [
|
|
760
|
+
L,
|
|
761
|
+
De,
|
|
762
|
+
ct
|
|
763
|
+
]), vt = F((e) => {
|
|
764
|
+
let t = typeof e == "function" ? e(dt) : e;
|
|
765
|
+
if (W === void 0 && Ye(t), J && typeof window < "u") try {
|
|
766
|
+
window.localStorage.setItem(J, JSON.stringify(t));
|
|
767
|
+
} catch {}
|
|
768
|
+
Oe?.(t);
|
|
769
|
+
}, [
|
|
770
|
+
dt,
|
|
771
|
+
W,
|
|
772
|
+
Oe,
|
|
773
|
+
J
|
|
774
|
+
]), yt = F((e) => {
|
|
775
|
+
let t = typeof e == "function" ? e(X) : e;
|
|
776
|
+
I === void 0 && $e(t), Ee?.(t);
|
|
777
|
+
}, [
|
|
778
|
+
I,
|
|
779
|
+
Ee,
|
|
780
|
+
X
|
|
781
|
+
]), bt = F((e) => {
|
|
782
|
+
let t = typeof e == "function" ? e(et) : e;
|
|
783
|
+
rt(t), ke?.(t);
|
|
784
|
+
}, [et, ke]), xt = (e) => {
|
|
785
|
+
let t = typeof e == "function" ? e(pt) : e, n = t === !0 ? {} : t;
|
|
786
|
+
if (P?.multiple === !1) {
|
|
787
|
+
let e = Object.keys(n).filter((e) => n[e] && !pt[e]).at(-1);
|
|
788
|
+
e !== void 0 && (n = { [e]: !0 });
|
|
789
|
+
}
|
|
790
|
+
P?.expanded === void 0 && ot(n), P?.onExpandedChange?.(n);
|
|
791
|
+
}, St = F((e) => {
|
|
792
|
+
g === void 0 && at(e), ee?.(e);
|
|
793
|
+
}, [g, ee]);
|
|
794
|
+
lt(Z, gt, F(() => St(!1), [St]));
|
|
795
|
+
let Ct = F((e) => typeof j == "function" ? j(e) : j ?? q.actions.menuLabel, [j, q.actions.menuLabel]), wt = R(() => {
|
|
796
|
+
let e = Q ? Qe(We, q, (e) => `${mt}-panel-${e}`) : We, t = d ? Ze(e, q) : e;
|
|
797
|
+
return A ? [...t, {
|
|
798
|
+
id: "actions",
|
|
799
|
+
header: q.actions.triggerLabel,
|
|
800
|
+
cell: ({ row: e }) => /* @__PURE__ */ H(ze, {
|
|
801
|
+
row: e.original,
|
|
802
|
+
actions: A,
|
|
803
|
+
menuLabel: Ct(e.original),
|
|
804
|
+
displayMode: be,
|
|
805
|
+
responsiveBreakpoint: xe,
|
|
806
|
+
strings: q
|
|
807
|
+
}),
|
|
808
|
+
enableSorting: !1,
|
|
809
|
+
enableHiding: !1,
|
|
810
|
+
meta: { align: "end" },
|
|
811
|
+
size: 40
|
|
812
|
+
}] : t;
|
|
813
|
+
}, [
|
|
814
|
+
d,
|
|
815
|
+
Q,
|
|
816
|
+
mt,
|
|
817
|
+
Ct,
|
|
818
|
+
We,
|
|
819
|
+
A,
|
|
820
|
+
xe,
|
|
821
|
+
be,
|
|
822
|
+
q
|
|
823
|
+
]), $ = Ie({
|
|
824
|
+
data: s,
|
|
825
|
+
columns: wt,
|
|
826
|
+
state: {
|
|
827
|
+
sorting: ct,
|
|
828
|
+
columnVisibility: dt,
|
|
829
|
+
rowSelection: X,
|
|
830
|
+
columnFilters: et,
|
|
831
|
+
expanded: pt
|
|
832
|
+
},
|
|
833
|
+
enableSorting: l,
|
|
834
|
+
manualSorting: h,
|
|
835
|
+
enableRowSelection: d,
|
|
836
|
+
enableMultiRowSelection: f,
|
|
837
|
+
enableSubRowSelection: p,
|
|
838
|
+
onSortingChange: l ? _t : void 0,
|
|
839
|
+
onRowSelectionChange: d ? yt : void 0,
|
|
840
|
+
onColumnVisibilityChange: vt,
|
|
841
|
+
onColumnFiltersChange: u ? bt : void 0,
|
|
842
|
+
enableExpanding: Q,
|
|
843
|
+
onExpandedChange: Q ? xt : void 0,
|
|
844
|
+
getRowCanExpand: Q ? (e) => P?.canExpand?.(e.original) ?? !0 : void 0,
|
|
845
|
+
getCoreRowModel: Ne(),
|
|
846
|
+
getSortedRowModel: Fe(),
|
|
847
|
+
...u ? { getFilteredRowModel: Pe() } : {},
|
|
848
|
+
getRowId: Ae
|
|
849
|
+
}), Tt = $.getSelectedRowModel().rows.map((e) => e.original), Et = F(() => $.resetRowSelection(), [$]), Dt = {
|
|
850
|
+
table: $,
|
|
851
|
+
selectedRows: Tt,
|
|
852
|
+
selectedRowCount: Tt.length,
|
|
853
|
+
totalRowCount: N ?? s.length,
|
|
854
|
+
rowSelection: X,
|
|
855
|
+
clearSelection: Et
|
|
856
|
+
}, Ot = typeof O == "function" ? O(Dt) : O, kt = !d || Tt.length === 0 || D === null || D === !1 ? null : typeof D == "function" ? D(Dt) : D === void 0 ? /* @__PURE__ */ H(fe, {
|
|
857
|
+
selectedCount: Tt.length,
|
|
858
|
+
totalCount: Dt.totalRowCount,
|
|
859
|
+
onClear: Et,
|
|
860
|
+
className: k,
|
|
861
|
+
strings: {
|
|
862
|
+
summary: (e, t) => q.selection.summary(e, t ?? Dt.totalRowCount),
|
|
863
|
+
clear: q.selection.clear
|
|
864
|
+
},
|
|
865
|
+
children: Ot
|
|
866
|
+
}) : D, At = ft(ae), jt = Z || v || At !== void 0, Mt = !!(T || ge || m || te || u && S), Nt = Se !== void 0 && Se > 1 && /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(x, {}), /* @__PURE__ */ U("div", {
|
|
867
|
+
className: K.footer,
|
|
868
|
+
children: [N !== void 0 && we !== void 0 && M !== void 0 && /* @__PURE__ */ H(t, {
|
|
869
|
+
type: "secondary",
|
|
870
|
+
children: q.pagination.summary(Math.min((M - 1) * we + 1, N), Math.min(M * we, N), N)
|
|
871
|
+
}), /* @__PURE__ */ H(he, {
|
|
872
|
+
page: M ?? 1,
|
|
873
|
+
total: Se,
|
|
874
|
+
onPageChange: (e) => Ce?.(e),
|
|
875
|
+
strings: {
|
|
876
|
+
label: q.pagination.label,
|
|
877
|
+
previous: q.pagination.previous,
|
|
878
|
+
next: q.pagination.next,
|
|
879
|
+
page: q.pagination.page,
|
|
880
|
+
morePages: q.pagination.morePages
|
|
881
|
+
}
|
|
882
|
+
})]
|
|
883
|
+
})] });
|
|
884
|
+
return /* @__PURE__ */ H(ut.Provider, {
|
|
885
|
+
value: Ue,
|
|
886
|
+
children: /* @__PURE__ */ U("div", {
|
|
887
|
+
ref: gt,
|
|
888
|
+
role: Z ? "dialog" : void 0,
|
|
889
|
+
"aria-modal": Z ? !0 : void 0,
|
|
890
|
+
"aria-label": Z ? q.accessibility.fullscreenRegion : void 0,
|
|
891
|
+
"data-slot": "data-table",
|
|
892
|
+
"data-size": Ue,
|
|
893
|
+
"data-surface": i,
|
|
894
|
+
"data-fullscreen": Z || void 0,
|
|
895
|
+
"data-selectable": d || void 0,
|
|
896
|
+
"data-expandable": Q || void 0,
|
|
897
|
+
style: {
|
|
898
|
+
...Ve,
|
|
899
|
+
...At ? { "--_data-table-body-max-height": At } : {}
|
|
900
|
+
},
|
|
901
|
+
className: n("data-table--component", K.root, v && K.rootFill, pe),
|
|
902
|
+
children: [
|
|
903
|
+
Mt && /* @__PURE__ */ U("div", {
|
|
904
|
+
className: n(K.topbar, re && K.topbarSticky),
|
|
905
|
+
children: [/* @__PURE__ */ U("div", {
|
|
906
|
+
className: n(K.topbarGrid, _e),
|
|
907
|
+
children: [/* @__PURE__ */ U("div", {
|
|
908
|
+
className: K.topbarStart,
|
|
909
|
+
children: [u && !!S && /* @__PURE__ */ H(w, {
|
|
910
|
+
value: $.getColumn(S)?.getFilterValue() ?? "",
|
|
911
|
+
onChange: (e) => $.getColumn(S)?.setFilterValue(e.target.value),
|
|
912
|
+
placeholder: C ?? q.filter.searchPlaceholder,
|
|
913
|
+
clearable: !0,
|
|
914
|
+
onClear: () => $.getColumn(S)?.setFilterValue(""),
|
|
915
|
+
className: K.filterInput
|
|
916
|
+
}), T]
|
|
917
|
+
}), /* @__PURE__ */ U("div", {
|
|
918
|
+
className: K.topbarEnd,
|
|
919
|
+
children: [ge, /* @__PURE__ */ H(st, {
|
|
920
|
+
table: $,
|
|
921
|
+
tableAreaRef: ht,
|
|
922
|
+
fullscreen: Z,
|
|
923
|
+
onFullscreenChange: St,
|
|
924
|
+
showFullscreenToggle: te,
|
|
925
|
+
enableColumnVisibility: m,
|
|
926
|
+
labelVisibility: ve,
|
|
927
|
+
strings: q
|
|
928
|
+
})]
|
|
929
|
+
})]
|
|
930
|
+
}), /* @__PURE__ */ H(x, {})]
|
|
931
|
+
}),
|
|
932
|
+
kt,
|
|
933
|
+
/* @__PURE__ */ H("div", {
|
|
934
|
+
ref: ht,
|
|
935
|
+
className: n(K.tableArea, jt && K.tableAreaScrolls),
|
|
936
|
+
children: /* @__PURE__ */ U(ye, {
|
|
937
|
+
strings: { scrollRegion: q.accessibility.scrollRegion },
|
|
938
|
+
stickyHeader: ne,
|
|
939
|
+
className: n(K.table, le),
|
|
940
|
+
containerClassName: n(jt && K.tableContainerScrolls, At !== void 0 && K.tableContainerBounded, me),
|
|
941
|
+
children: [/* @__PURE__ */ H(nt, {
|
|
942
|
+
table: $,
|
|
943
|
+
stickyHeader: ne,
|
|
944
|
+
headerClassName: de,
|
|
945
|
+
cellClassName: y,
|
|
946
|
+
stickyFirstColumn: ie,
|
|
947
|
+
hasSelectionColumn: d,
|
|
948
|
+
hasExpandColumn: Q,
|
|
949
|
+
columnGroups: c,
|
|
950
|
+
headerTransparent: a
|
|
951
|
+
}), /* @__PURE__ */ H(tt, {
|
|
952
|
+
table: $,
|
|
953
|
+
onRowClick: Te,
|
|
954
|
+
emptyStateMessage: se,
|
|
955
|
+
emptyStateAction: ce,
|
|
956
|
+
cellClassName: y,
|
|
957
|
+
rowClassName: ue,
|
|
958
|
+
stickyFirstColumn: ie,
|
|
959
|
+
hasSelectionColumn: d,
|
|
960
|
+
hasExpandColumn: Q,
|
|
961
|
+
expandedRow: P,
|
|
962
|
+
expansionId: mt,
|
|
963
|
+
striped: oe,
|
|
964
|
+
strings: q
|
|
965
|
+
})]
|
|
966
|
+
})
|
|
967
|
+
}),
|
|
968
|
+
Nt,
|
|
969
|
+
!!E && /* @__PURE__ */ H("div", {
|
|
970
|
+
className: K.footer,
|
|
971
|
+
children: E
|
|
972
|
+
})
|
|
973
|
+
]
|
|
974
|
+
})
|
|
975
|
+
});
|
|
976
|
+
}
|
|
977
|
+
//#endregion
|
|
978
|
+
//#region src/components/features/table/cell-value.tsx
|
|
979
|
+
function Z(e) {
|
|
980
|
+
return e == null ? !0 : typeof e == "string" ? e.trim().length === 0 : e instanceof Date && Number.isNaN(e.getTime());
|
|
981
|
+
}
|
|
982
|
+
function Q({ value: e, kind: t = "value", display: r, href: a, currency: o, minimumFractionDigits: s, maximumFractionDigits: c, locale: l, dateLocale: u, pattern: d, from: f, moneyUnit: _, fallback: de, missing: fe, wrap: pe = !1, className: me, children: b }) {
|
|
983
|
+
let x = n("cell-value--component", !pe && K.nowrap, me), S = I(i), C = R(() => u ? {
|
|
984
|
+
...S,
|
|
985
|
+
dates: {
|
|
986
|
+
...S.dates,
|
|
987
|
+
locale: u
|
|
988
|
+
}
|
|
989
|
+
} : null, [S, u]);
|
|
990
|
+
if (b !== void 0) return /* @__PURE__ */ H("span", {
|
|
991
|
+
className: x,
|
|
992
|
+
children: b
|
|
993
|
+
});
|
|
994
|
+
if (r !== void 0) return /* @__PURE__ */ H("span", {
|
|
995
|
+
className: x,
|
|
996
|
+
children: r
|
|
997
|
+
});
|
|
998
|
+
if (fe || Z(e)) return /* @__PURE__ */ H("span", {
|
|
999
|
+
className: x,
|
|
1000
|
+
children: /* @__PURE__ */ H(y, { label: de })
|
|
1001
|
+
});
|
|
1002
|
+
let w = typeof e == "string" || typeof e == "number" ? e : String(e), T = typeof e == "number" ? e : Number(e), he = (() => {
|
|
1003
|
+
switch (t) {
|
|
1004
|
+
case "secondary": return /* @__PURE__ */ H(g, { children: w });
|
|
1005
|
+
case "muted": return /* @__PURE__ */ H(ae, { children: w });
|
|
1006
|
+
case "name": return /* @__PURE__ */ H(ee, { value: String(w) });
|
|
1007
|
+
case "mono": return /* @__PURE__ */ H(p, { children: w });
|
|
1008
|
+
case "link":
|
|
1009
|
+
case "url": return /* @__PURE__ */ H(te, {
|
|
1010
|
+
href: a ?? String(w),
|
|
1011
|
+
children: w
|
|
1012
|
+
});
|
|
1013
|
+
case "email": return /* @__PURE__ */ H(m, { value: String(w) });
|
|
1014
|
+
case "phone": return /* @__PURE__ */ H(ce, { value: String(w) });
|
|
1015
|
+
case "money": return /* @__PURE__ */ H(h, {
|
|
1016
|
+
amount: e,
|
|
1017
|
+
currency: o,
|
|
1018
|
+
unit: _,
|
|
1019
|
+
locale: l
|
|
1020
|
+
});
|
|
1021
|
+
case "number": return /* @__PURE__ */ H(ue, {
|
|
1022
|
+
value: T,
|
|
1023
|
+
locale: l,
|
|
1024
|
+
options: {
|
|
1025
|
+
minimumFractionDigits: s,
|
|
1026
|
+
maximumFractionDigits: c
|
|
1027
|
+
}
|
|
1028
|
+
});
|
|
1029
|
+
case "percent": return /* @__PURE__ */ H(re, {
|
|
1030
|
+
value: T,
|
|
1031
|
+
locale: l,
|
|
1032
|
+
options: {
|
|
1033
|
+
minimumFractionDigits: s,
|
|
1034
|
+
maximumFractionDigits: c
|
|
1035
|
+
}
|
|
1036
|
+
});
|
|
1037
|
+
case "fileSize": return /* @__PURE__ */ H(ne, {
|
|
1038
|
+
value: T,
|
|
1039
|
+
from: f
|
|
1040
|
+
});
|
|
1041
|
+
case "date": return /* @__PURE__ */ H(v, {
|
|
1042
|
+
value: e,
|
|
1043
|
+
pattern: d
|
|
1044
|
+
});
|
|
1045
|
+
case "time": return /* @__PURE__ */ H(oe, {
|
|
1046
|
+
value: e,
|
|
1047
|
+
pattern: d
|
|
1048
|
+
});
|
|
1049
|
+
case "dateTime": return /* @__PURE__ */ H(le, {
|
|
1050
|
+
value: e,
|
|
1051
|
+
pattern: d
|
|
1052
|
+
});
|
|
1053
|
+
case "relativeTime": return /* @__PURE__ */ H(se, { value: e });
|
|
1054
|
+
default: return /* @__PURE__ */ H(ie, { children: w });
|
|
1055
|
+
}
|
|
1056
|
+
})();
|
|
1057
|
+
return /* @__PURE__ */ H("span", {
|
|
1058
|
+
className: x,
|
|
1059
|
+
children: C ? /* @__PURE__ */ H(i.Provider, {
|
|
1060
|
+
value: C,
|
|
1061
|
+
children: he
|
|
1062
|
+
}) : he
|
|
1063
|
+
});
|
|
1064
|
+
}
|
|
1065
|
+
function pt({ values: t, className: r }) {
|
|
1066
|
+
let i = t.filter((e) => e !== !1);
|
|
1067
|
+
return i.length === 0 ? /* @__PURE__ */ H(y, {}) : /* @__PURE__ */ H("span", {
|
|
1068
|
+
className: n("cell-stack--component", K.cellStack, e({
|
|
1069
|
+
size: "inherit",
|
|
1070
|
+
lineHeight: "tight"
|
|
1071
|
+
}), r),
|
|
1072
|
+
children: i.map((e, t) => {
|
|
1073
|
+
let n = `cell-${t}`;
|
|
1074
|
+
if (Array.isArray(e)) {
|
|
1075
|
+
let [t, r, i] = e;
|
|
1076
|
+
return /* @__PURE__ */ H(Q, {
|
|
1077
|
+
value: t,
|
|
1078
|
+
kind: r,
|
|
1079
|
+
...i
|
|
1080
|
+
}, n);
|
|
1081
|
+
}
|
|
1082
|
+
return typeof e == "object" && e && !(e instanceof Date) ? "type" in e ? /* @__PURE__ */ H("span", { children: e }, n) : /* @__PURE__ */ H(Q, { ...e }, n) : /* @__PURE__ */ H(Q, { value: e }, n);
|
|
1083
|
+
})
|
|
1084
|
+
});
|
|
1085
|
+
}
|
|
1086
|
+
//#endregion
|
|
1087
|
+
//#region src/components/features/table/cell-renderers.tsx
|
|
1088
|
+
function mt({ value: e, map: t, emptyLabel: r, className: i }) {
|
|
1089
|
+
let a = e ? t[e] : void 0;
|
|
1090
|
+
return a ? /* @__PURE__ */ U(de, {
|
|
1091
|
+
tone: a.tone ?? "neutral",
|
|
1092
|
+
className: n("status-cell--component", i),
|
|
1093
|
+
children: [a.icon, a.label]
|
|
1094
|
+
}) : /* @__PURE__ */ H(y, { label: r });
|
|
1095
|
+
}
|
|
1096
|
+
function ht({ items: e = [], emptyLabel: t, className: r }) {
|
|
1097
|
+
let i = e.filter((e) => !e.hidden);
|
|
1098
|
+
return i.length === 0 ? /* @__PURE__ */ H(y, { label: t }) : /* @__PURE__ */ H("span", {
|
|
1099
|
+
className: n("status-cluster-cell--component", K.cluster, r),
|
|
1100
|
+
children: i.map((e, t) => /* @__PURE__ */ U(de, {
|
|
1101
|
+
tone: e.tone ?? "neutral",
|
|
1102
|
+
children: [e.icon, e.label]
|
|
1103
|
+
}, e.id ?? t))
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
function gt({ value: e, pattern: t, showIcon: r = !1, icon: i, emptyLabel: a, className: o }) {
|
|
1107
|
+
return e == null || e === "" ? /* @__PURE__ */ H(y, { label: a }) : /* @__PURE__ */ U("span", {
|
|
1108
|
+
className: n("date-cell--component", K.iconCell, o),
|
|
1109
|
+
children: [r && /* @__PURE__ */ H("span", {
|
|
1110
|
+
className: K.cellIcon,
|
|
1111
|
+
children: i ?? /* @__PURE__ */ H(xe, {})
|
|
1112
|
+
}), /* @__PURE__ */ H(v, {
|
|
1113
|
+
value: e,
|
|
1114
|
+
pattern: t,
|
|
1115
|
+
type: "secondary",
|
|
1116
|
+
emptyLabel: a
|
|
1117
|
+
})]
|
|
1118
|
+
});
|
|
1119
|
+
}
|
|
1120
|
+
function _t({ value: r, pattern: i, showIcon: a = !0, icon: o, emptyLabel: s, secondary: c, className: l }) {
|
|
1121
|
+
if (r == null || r === "") return /* @__PURE__ */ H(y, { label: s });
|
|
1122
|
+
let u = r instanceof Date ? r : new Date(r), d = typeof c == "function" ? Number.isNaN(u.getTime()) ? null : c(u) : c;
|
|
1123
|
+
return /* @__PURE__ */ U("span", {
|
|
1124
|
+
className: n("date-meta-cell--component", K.iconCell, K.iconCellTop, l),
|
|
1125
|
+
children: [a && /* @__PURE__ */ H("span", {
|
|
1126
|
+
className: K.cellIcon,
|
|
1127
|
+
children: o ?? /* @__PURE__ */ H(xe, {})
|
|
1128
|
+
}), /* @__PURE__ */ U("span", {
|
|
1129
|
+
className: n(K.cellStack, e({
|
|
1130
|
+
size: "inherit",
|
|
1131
|
+
lineHeight: "tight"
|
|
1132
|
+
})),
|
|
1133
|
+
children: [/* @__PURE__ */ H(v, {
|
|
1134
|
+
value: r,
|
|
1135
|
+
pattern: i,
|
|
1136
|
+
type: "secondary",
|
|
1137
|
+
emptyLabel: s
|
|
1138
|
+
}), !!d && /* @__PURE__ */ H(t, {
|
|
1139
|
+
tag: "span",
|
|
1140
|
+
size: "xs",
|
|
1141
|
+
type: "secondary",
|
|
1142
|
+
children: d
|
|
1143
|
+
})]
|
|
1144
|
+
})]
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
function vt({ value: e, currency: t, locale: r, emptyLabel: i, weight: a = "semibold", className: o }) {
|
|
1148
|
+
return /* @__PURE__ */ H(h, {
|
|
1149
|
+
amount: e,
|
|
1150
|
+
currency: t,
|
|
1151
|
+
locale: r,
|
|
1152
|
+
formatMode: t ? "with-symbol" : "decimal",
|
|
1153
|
+
emptyLabel: i,
|
|
1154
|
+
weight: a,
|
|
1155
|
+
className: n("currency-cell--component", o)
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
function yt({ name: r, imageUrl: i, icon: a, subtitle: o, emptyLabel: s, className: c }) {
|
|
1159
|
+
return !r || r.trim().length === 0 ? /* @__PURE__ */ H(y, { label: s }) : /* @__PURE__ */ U("span", {
|
|
1160
|
+
className: n("avatar-cell--component", K.avatarCell, c),
|
|
1161
|
+
children: [/* @__PURE__ */ U(d, {
|
|
1162
|
+
size: "sm",
|
|
1163
|
+
children: [!!i && /* @__PURE__ */ H(u, {
|
|
1164
|
+
src: i,
|
|
1165
|
+
alt: ""
|
|
1166
|
+
}), /* @__PURE__ */ H(l, { children: _(r, { strategy: "first-words" }) || (a ?? /* @__PURE__ */ H(Ce, {})) })]
|
|
1167
|
+
}), /* @__PURE__ */ U("span", {
|
|
1168
|
+
className: n(K.cellStack, e({
|
|
1169
|
+
size: "inherit",
|
|
1170
|
+
lineHeight: "tight"
|
|
1171
|
+
})),
|
|
1172
|
+
children: [/* @__PURE__ */ H(t, {
|
|
1173
|
+
tag: "span",
|
|
1174
|
+
weight: "medium",
|
|
1175
|
+
truncate: !0,
|
|
1176
|
+
children: r
|
|
1177
|
+
}), !!o && /* @__PURE__ */ H(t, {
|
|
1178
|
+
tag: "span",
|
|
1179
|
+
size: "xs",
|
|
1180
|
+
type: "secondary",
|
|
1181
|
+
truncate: !0,
|
|
1182
|
+
children: o
|
|
1183
|
+
})]
|
|
1184
|
+
})]
|
|
1185
|
+
});
|
|
1186
|
+
}
|
|
1187
|
+
//#endregion
|
|
1188
|
+
//#region src/components/features/table/resource-cell.tsx
|
|
1189
|
+
function bt(e) {
|
|
1190
|
+
return typeof e == "object" && !!e && "label" in e;
|
|
1191
|
+
}
|
|
1192
|
+
function xt({ title: e, subtitle: r, metadata: i, badges: a, imageUrl: o, fallback: s, href: c, renderLink: f, emptyLabel: p, className: m }) {
|
|
1193
|
+
if (e == null || e === "") return /* @__PURE__ */ H(y, { label: p });
|
|
1194
|
+
let h = /* @__PURE__ */ H(t, {
|
|
1195
|
+
tag: "span",
|
|
1196
|
+
weight: "medium",
|
|
1197
|
+
truncate: !0,
|
|
1198
|
+
children: e
|
|
1199
|
+
}), g = c ? ge(f)({
|
|
1200
|
+
href: c,
|
|
1201
|
+
children: h,
|
|
1202
|
+
className: K.resourceLink
|
|
1203
|
+
}) : h, _ = Array.isArray(i) ? i : null;
|
|
1204
|
+
return /* @__PURE__ */ U("span", {
|
|
1205
|
+
className: n("resource-cell--component", K.resourceCell, m),
|
|
1206
|
+
children: [(!!o || !!s) && /* @__PURE__ */ U(d, {
|
|
1207
|
+
size: "sm",
|
|
1208
|
+
className: K.resourceMedia,
|
|
1209
|
+
children: [!!o && /* @__PURE__ */ H(u, {
|
|
1210
|
+
src: o,
|
|
1211
|
+
alt: ""
|
|
1212
|
+
}), /* @__PURE__ */ H(l, { children: s })]
|
|
1213
|
+
}), /* @__PURE__ */ U("span", {
|
|
1214
|
+
className: K.resourceBody,
|
|
1215
|
+
children: [
|
|
1216
|
+
/* @__PURE__ */ U("span", {
|
|
1217
|
+
className: K.resourceTitleLine,
|
|
1218
|
+
children: [g, a?.map((e, t) => bt(e) ? /* @__PURE__ */ U(de, {
|
|
1219
|
+
tone: e.tone ?? "neutral",
|
|
1220
|
+
children: [e.icon, e.label]
|
|
1221
|
+
}, e.id ?? t) : /* @__PURE__ */ H("span", { children: e }, t))]
|
|
1222
|
+
}),
|
|
1223
|
+
!!r && /* @__PURE__ */ H(t, {
|
|
1224
|
+
tag: "span",
|
|
1225
|
+
size: "xs",
|
|
1226
|
+
type: "secondary",
|
|
1227
|
+
truncate: !0,
|
|
1228
|
+
children: r
|
|
1229
|
+
}),
|
|
1230
|
+
_ ? _.length > 0 && /* @__PURE__ */ H("span", {
|
|
1231
|
+
className: K.resourceFacts,
|
|
1232
|
+
children: _.map((e, n) => /* @__PURE__ */ U("span", {
|
|
1233
|
+
className: K.resourceFact,
|
|
1234
|
+
children: [
|
|
1235
|
+
n > 0 && /* @__PURE__ */ H(t, {
|
|
1236
|
+
tag: "span",
|
|
1237
|
+
size: "xs",
|
|
1238
|
+
type: "secondary",
|
|
1239
|
+
"aria-hidden": !0,
|
|
1240
|
+
children: "·"
|
|
1241
|
+
}),
|
|
1242
|
+
!!e.label && /* @__PURE__ */ H(t, {
|
|
1243
|
+
tag: "span",
|
|
1244
|
+
size: "xs",
|
|
1245
|
+
type: "secondary",
|
|
1246
|
+
children: e.label
|
|
1247
|
+
}),
|
|
1248
|
+
/* @__PURE__ */ H(t, {
|
|
1249
|
+
tag: "span",
|
|
1250
|
+
size: "xs",
|
|
1251
|
+
type: "secondary",
|
|
1252
|
+
children: e.value
|
|
1253
|
+
})
|
|
1254
|
+
]
|
|
1255
|
+
}, e.id ?? n))
|
|
1256
|
+
}) : i
|
|
1257
|
+
]
|
|
1258
|
+
})]
|
|
1259
|
+
});
|
|
1260
|
+
}
|
|
1261
|
+
//#endregion
|
|
1262
|
+
export { ze as C, Je as S, Re as T, rt as _, _t as a, Ze as b, pt as c, dt as d, lt as f, it as g, ot as h, gt as i, Q as l, Y as m, yt as n, mt as o, st as p, vt as r, ht as s, xt as t, X as u, nt as v, G as w, Xe as x, tt as y };
|