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
|
@@ -15,7 +15,6 @@ Existing assets are browsed, previewed, searched and picked.
|
|
|
15
15
|
|
|
16
16
|
```tsx fragment — import-only example
|
|
17
17
|
import { MediaLibrary } from "themelia-ui/features/media-library"
|
|
18
|
-
import "themelia-ui/features/media-library.css"
|
|
19
18
|
```
|
|
20
19
|
|
|
21
20
|
## Composition
|
|
@@ -59,7 +58,7 @@ The asset browser, as a panel. The detail panel is a column beside the grid, not
|
|
|
59
58
|
so several assets can be edited in a row.
|
|
60
59
|
|
|
61
60
|
```text
|
|
62
|
-
({ title, description, confirmLabel, cancelLabel,
|
|
61
|
+
({ title, description, confirmLabel, cancelLabel, size, showMeta, allowUpload, typeFilters, confirmOnSelect, onConfirm, onCancel, onClose, bulkActions, strings, slots, className, collections, selectionMode, ...options }: MediaLibraryProps<TItem>) => import("react").JSX.Element
|
|
63
62
|
```
|
|
64
63
|
|
|
65
64
|
### `MediaLibraryAccessors`
|
|
@@ -107,7 +106,7 @@ Kind: callable.
|
|
|
107
106
|
One asset in the grid, with its preview, name and selection control.
|
|
108
107
|
|
|
109
108
|
```text
|
|
110
|
-
({ item, selected,
|
|
109
|
+
({ item, selected, size, showMeta, accessors, strings, onToggle, onDetails, className, }: MediaLibraryCardProps<TItem>) => import("react").JSX.Element
|
|
111
110
|
```
|
|
112
111
|
|
|
113
112
|
### `MediaLibraryCardProps`
|
|
@@ -118,7 +117,7 @@ Kind: interface.
|
|
|
118
117
|
| --- | :-: | --- | --- |
|
|
119
118
|
| `item` | yes | `TItem` | |
|
|
120
119
|
| `selected` | no | `boolean` | |
|
|
121
|
-
| `
|
|
120
|
+
| `size` | no | `MediaLibrarySize` | Tile size: `sm` fits more tiles in a row. |
|
|
122
121
|
| `showMeta` | no | `boolean` | |
|
|
123
122
|
| `selectionMode` | no | `MediaLibrarySelectionMode` | |
|
|
124
123
|
| `accessors` | yes | `ResolvedMediaLibraryAccessors<TItem>` | |
|
|
@@ -136,14 +135,6 @@ Kind: interface.
|
|
|
136
135
|
| `value` | yes | `string` | |
|
|
137
136
|
| `label` | yes | `ReactNode` | |
|
|
138
137
|
|
|
139
|
-
### `MediaLibraryDensity`
|
|
140
|
-
|
|
141
|
-
Kind: type.
|
|
142
|
-
|
|
143
|
-
```text
|
|
144
|
-
"comfortable" | "compact"
|
|
145
|
-
```
|
|
146
|
-
|
|
147
138
|
### `MediaLibraryDetailPanel`
|
|
148
139
|
|
|
149
140
|
Kind: callable.
|
|
@@ -351,7 +342,7 @@ The composable visual grid. Like the list and the table, it uses the same access
|
|
|
351
342
|
selection callbacks.
|
|
352
343
|
|
|
353
344
|
```text
|
|
354
|
-
({ items, selectedSet, accessors, strings, onToggle, onDetails,
|
|
345
|
+
({ items, selectedSet, accessors, strings, onToggle, onDetails, size, selectionMode, showMeta, renderItem, className }: MediaLibraryGridProps<TItem>) => import("react").JSX.Element
|
|
355
346
|
```
|
|
356
347
|
|
|
357
348
|
### `MediaLibraryGridProps`
|
|
@@ -362,7 +353,7 @@ Extends: `MediaLibraryListProps<TItem>`.
|
|
|
362
353
|
|
|
363
354
|
| member | required | type | description / documented default |
|
|
364
355
|
| --- | :-: | --- | --- |
|
|
365
|
-
| `
|
|
356
|
+
| `size` | no | `MediaLibrarySize` | Tile size: `sm` fits more tiles in a row. |
|
|
366
357
|
| `showMeta` | no | `boolean` | |
|
|
367
358
|
| `renderItem` | no | `MediaLibrarySlots<TItem>["renderItem"]` | |
|
|
368
359
|
| `className` | no | `string` | |
|
|
@@ -463,7 +454,7 @@ Extends: `Omit<ComponentPropsWithoutRef<"section">, "children" | "defaultValue"
|
|
|
463
454
|
| `description` | no | `ReactNode` | |
|
|
464
455
|
| `confirmLabel` | no | `ReactNode` | |
|
|
465
456
|
| `cancelLabel` | no | `ReactNode` | |
|
|
466
|
-
| `
|
|
457
|
+
| `size` | no | `MediaLibrarySize` | Tile size: `sm` fits more tiles in a row. |
|
|
467
458
|
| `showMeta` | no | `boolean` | Shows each asset's size and dimensions under its name. |
|
|
468
459
|
| `allowUpload` | no | `boolean` | |
|
|
469
460
|
| `typeFilters` | no | `readonly MediaLibraryTypeFilter[]` | The type filters the toolbar offers. A single type filter draws no control. |
|
|
@@ -510,6 +501,14 @@ Kind: type.
|
|
|
510
501
|
"single" | "multiple"
|
|
511
502
|
```
|
|
512
503
|
|
|
504
|
+
### `MediaLibrarySize`
|
|
505
|
+
|
|
506
|
+
Kind: type.
|
|
507
|
+
|
|
508
|
+
```text
|
|
509
|
+
"default" | "sm"
|
|
510
|
+
```
|
|
511
|
+
|
|
513
512
|
### `MediaLibrarySlots`
|
|
514
513
|
|
|
515
514
|
Kind: interface.
|
|
@@ -578,13 +577,13 @@ Kind: interface.
|
|
|
578
577
|
| `selectedSet` | yes | `Set<string>` | For a per-row lookup that would otherwise be O(n) inside a map. |
|
|
579
578
|
| `toggleSelection` | yes | `(id: string) => void` | |
|
|
580
579
|
| `clearSelection` | yes | `() => void` | |
|
|
581
|
-
| `selectVisible` |
|
|
582
|
-
| `deselectVisible` |
|
|
580
|
+
| `selectVisible` | yes | `() => void` | Select/deselect only the currently visible records, preserving other selections. |
|
|
581
|
+
| `deselectVisible` | yes | `() => void` | |
|
|
583
582
|
| `clearFilters` | yes | `() => void` | |
|
|
584
583
|
| `loading` | yes | `boolean` | |
|
|
585
584
|
| `error` | yes | `unknown` | Most recent fetch or mutation failure; cleared when an operation starts. |
|
|
586
|
-
| `fetchError` |
|
|
587
|
-
| `refetch` |
|
|
585
|
+
| `fetchError` | yes | `unknown` | Fetch failure, separate from mutation failures. |
|
|
586
|
+
| `refetch` | yes | `() => void` | Stable query reload; a no-op in local mode. |
|
|
588
587
|
| `hasFilters` | yes | `boolean` | |
|
|
589
588
|
| `totalCount` | yes | `number` | |
|
|
590
589
|
| `filteredCount` | yes | `number` | |
|
|
@@ -610,11 +609,11 @@ Kind: interface.
|
|
|
610
609
|
| `title` | yes | `string` | |
|
|
611
610
|
| `description` | yes | `string` | |
|
|
612
611
|
| `tabs` | yes | `{ library: string; upload: string; }` | |
|
|
613
|
-
| `views` | yes | `{ grid: string; table: string; list
|
|
614
|
-
| `selectVisible` |
|
|
615
|
-
| `deselectVisible` |
|
|
616
|
-
| `refreshError` |
|
|
617
|
-
| `table` |
|
|
612
|
+
| `views` | yes | `{ grid: string; table: string; list: string; }` | |
|
|
613
|
+
| `selectVisible` | yes | `string` | |
|
|
614
|
+
| `deselectVisible` | yes | `string` | |
|
|
615
|
+
| `refreshError` | yes | `string` | |
|
|
616
|
+
| `table` | yes | `{ name: string; collection: string; size: string; uploaded: string; usage: string; actions: string; }` | |
|
|
618
617
|
| `searchPlaceholder` | yes | `string` | |
|
|
619
618
|
| `clearSearch` | yes | `string` | |
|
|
620
619
|
| `clearFilters` | yes | `string` | |
|
|
@@ -628,7 +627,7 @@ Kind: interface.
|
|
|
628
627
|
| `activeSearchLabel` | yes | `string` | |
|
|
629
628
|
| `loading` | yes | `string` | |
|
|
630
629
|
| `error` | yes | `string` | |
|
|
631
|
-
| `retry` |
|
|
630
|
+
| `retry` | yes | `string` | |
|
|
632
631
|
| `emptyTitle` | yes | `string` | |
|
|
633
632
|
| `emptyDescription` | yes | `string` | |
|
|
634
633
|
| `emptyFilteredTitle` | yes | `string` | |
|
|
@@ -637,14 +636,14 @@ Kind: interface.
|
|
|
637
636
|
| `showingCount` | yes | `(shown: number, total: number) => string` | |
|
|
638
637
|
| `select` | yes | `string` | |
|
|
639
638
|
| `deselect` | yes | `string` | |
|
|
640
|
-
| `assetAction` |
|
|
639
|
+
| `assetAction` | yes | `(action: string, name: string) => string` | |
|
|
641
640
|
| `details` | yes | `string` | |
|
|
642
641
|
| `close` | yes | `string` | |
|
|
643
642
|
| `confirm` | yes | `string` | |
|
|
644
643
|
| `cancel` | yes | `string` | |
|
|
645
644
|
| `clearSelection` | yes | `string` | |
|
|
646
645
|
| `footer` | yes | `{ pickOne: string; pickMany: string; noFiles: string; stagedSummary: (count: number, size: string) => string; uploadStaged: (count: number) => string; }` | The picker's footer, which changes with the tab it is under. |
|
|
647
|
-
| `detail` | yes | `{ altLabel: string; altPlaceholder: string; collectionLabel: string; tagsLabel: string; tagsPlaceholder: string; publicLabel: string; publicDescription: string; save: string; saving: string; delete: string; deleting: string; saved
|
|
646
|
+
| `detail` | yes | `{ altLabel: string; altPlaceholder: string; collectionLabel: string; tagsLabel: string; tagsPlaceholder: string; publicLabel: string; publicDescription: string; save: string; saving: string; delete: string; deleting: string; saved: string; unsaved: string; saveFailed: string; deleteFailed: string; reset: string; dimensions: string; size: string; uploaded: string; type: string; }` | |
|
|
648
647
|
| `upload` | yes | `{ dropTitle: string; dropDescription: string; browse: string; staged: (count: number) => string; start: string; uploading: string; cancel: string; clear: string; remove: string; failed: string; emptyTitle: string; emptyDescription: string; optionsTitle: string; }` | |
|
|
649
648
|
| `gallery` | yes | `{ title: string; description: string; add: string; remove: string; primary: string; makePrimary: string; moveEarlier: string; moveLater: string; emptyTitle: string; emptyDescription: string; limitReached: (max: number) => string; }` | |
|
|
650
649
|
|
|
@@ -820,7 +819,7 @@ The assets attached to a record, in order — with reorder, cover, and detach. N
|
|
|
820
819
|
works with keyboard, screen reader and touch.
|
|
821
820
|
|
|
822
821
|
```text
|
|
823
|
-
({ items, accessors: accessorsProp, title, description, primaryId, onPrimaryChange, onRemove, onReorder, onAdd, maxItems, layout,
|
|
822
|
+
({ items, accessors: accessorsProp, title, description, primaryId, onPrimaryChange, onRemove, onReorder, onAdd, maxItems, layout, size, readOnly, empty, action, renderItem, strings, className, ...props }: MediaResourceGalleryProps<TItem>) => import("react").JSX.Element
|
|
824
823
|
```
|
|
825
824
|
|
|
826
825
|
### `MediaResourceGalleryItemRenderContext`
|
|
@@ -868,7 +867,7 @@ Extends: `Omit<ComponentPropsWithoutRef<"section">, "children" | "title">`.
|
|
|
868
867
|
| `onAdd` | no | `() => void` | Usually opens the library dialog. |
|
|
869
868
|
| `maxItems` | no | `number` | The add control hides once reached. |
|
|
870
869
|
| `layout` | no | `MediaResourceGalleryLayout` | |
|
|
871
|
-
| `
|
|
870
|
+
| `size` | no | `MediaLibrarySize` | Tile size: `sm` fits more tiles in a row. |
|
|
872
871
|
| `readOnly` | no | `boolean` | |
|
|
873
872
|
| `empty` | no | `ReactNode` | |
|
|
874
873
|
| `action` | no | `ReactNode` | |
|
|
@@ -900,7 +899,7 @@ clearing filters or selection; `fetchError` identifies fetch failures separately
|
|
|
900
899
|
mutation errors.
|
|
901
900
|
|
|
902
901
|
```text
|
|
903
|
-
({ items: itemsProp, fetcher, accessors: accessorsProp, selectionMode, value, defaultValue, onValueChange, onItemUpdate, applyItemPatch, onItemDelete, onUpload, onError, tab: tabProp, defaultTab, onTabChange, view: viewProp, defaultView, onViewChange, query: queryProp, defaultQuery, onQueryChange, type: typeProp, defaultType, onTypeChange, collection: collectionProp, defaultCollection, onCollectionChange, sort: sortProp, defaultSort, onSortChange, uploadOptions: uploadOptionsProp, defaultUploadOptions, onUploadOptionsChange, }: UseMediaLibraryOptions<TItem>) =>
|
|
902
|
+
({ items: itemsProp, fetcher, accessors: accessorsProp, selectionMode, value, defaultValue, onValueChange, onItemUpdate, applyItemPatch, onItemDelete, onUpload, onError, tab: tabProp, defaultTab, onTabChange, view: viewProp, defaultView, onViewChange, query: queryProp, defaultQuery, onQueryChange, type: typeProp, defaultType, onTypeChange, collection: collectionProp, defaultCollection, onCollectionChange, sort: sortProp, defaultSort, onSortChange, uploadOptions: uploadOptionsProp, defaultUploadOptions, onUploadOptionsChange, }: UseMediaLibraryOptions<TItem>) => MediaLibraryState<TItem>
|
|
904
903
|
```
|
|
905
904
|
|
|
906
905
|
### `UseMediaLibraryOptions`
|
|
@@ -948,6 +947,74 @@ Kind: interface.
|
|
|
948
947
|
|
|
949
948
|
Preview route: Media library — `/media-library`
|
|
950
949
|
|
|
950
|
+
### Media picking reference
|
|
951
|
+
|
|
952
|
+
```tsx fragment — excerpt from the live preview; surrounding values are supplied by the application
|
|
953
|
+
import { useEffect, useMemo, useState } from "react"
|
|
954
|
+
import { Button } from "themelia-ui/base/buttons"
|
|
955
|
+
import { Stack } from "themelia-ui/base/structure"
|
|
956
|
+
import { Text } from "themelia-ui/base/typography"
|
|
957
|
+
import { MediaLibraryDialog, type MediaLibraryItem, type MediaLibraryFetcher } from "themelia-ui/features/media-library"
|
|
958
|
+
|
|
959
|
+
import { SAMPLE_MEDIA } from "./reference-data"
|
|
960
|
+
|
|
961
|
+
export default function MediaPickingReference() {
|
|
962
|
+
const [open, setOpen] = useState(false)
|
|
963
|
+
const [scope, setScope] = useState("site")
|
|
964
|
+
const [fail, setFail] = useState(false)
|
|
965
|
+
const [selected, setSelected] = useState<string[]>(["unavailable-id"])
|
|
966
|
+
const [pickerDraft, setPickerDraft] = useState(selected)
|
|
967
|
+
const [resolved, setResolved] = useState<{ scope: string; ids: string[]; items: MediaLibraryItem[] }>()
|
|
968
|
+
const [page, setPage] = useState(0)
|
|
969
|
+
const [query, setQuery] = useState("")
|
|
970
|
+
const [pending, setPending] = useState(true)
|
|
971
|
+
const [hasNext, setHasNext] = useState(false)
|
|
972
|
+
// A saved id is resolved separately from the current browser page, with scope access applied.
|
|
973
|
+
useEffect(() => {
|
|
974
|
+
const controller = new AbortController()
|
|
975
|
+
const timer = setTimeout(() => {
|
|
976
|
+
if (!controller.signal.aborted) setResolved({ scope, ids: selected, items: SAMPLE_MEDIA.filter(item => selected.includes(item.id) && item.collection === scope) })
|
|
977
|
+
}, 150)
|
|
978
|
+
return () => { controller.abort(); clearTimeout(timer) }
|
|
979
|
+
}, [selected, scope])
|
|
980
|
+
const chosen = resolved?.scope === scope && resolved.ids === selected ? resolved.items : []
|
|
981
|
+
const unavailable = resolved?.scope === scope && resolved.ids === selected && chosen.length < selected.length
|
|
982
|
+
const changeOpen = (next: boolean) => {
|
|
983
|
+
if (next) setPickerDraft(selected)
|
|
984
|
+
setOpen(next)
|
|
985
|
+
}
|
|
986
|
+
const fetcher = useMemo<MediaLibraryFetcher>(() => async ({ query: search, signal }) => {
|
|
987
|
+
setPending(true)
|
|
988
|
+
try {
|
|
989
|
+
await new Promise(resolve => setTimeout(resolve, 200))
|
|
990
|
+
if (signal?.aborted) throw new DOMException("Aborted", "AbortError")
|
|
991
|
+
if (fail) throw new Error("Media lookup unavailable")
|
|
992
|
+
const matches = SAMPLE_MEDIA.filter(item => item.collection === scope && item.name.toLowerCase().includes(search.toLowerCase()))
|
|
993
|
+
const window = matches.slice(page, page + 2)
|
|
994
|
+
setHasNext(window.length > 1)
|
|
995
|
+
return { items: window.slice(0, 1) }
|
|
996
|
+
} finally { if (!signal?.aborted) setPending(false) }
|
|
997
|
+
}, [scope, fail, page])
|
|
998
|
+
return <Stack>
|
|
999
|
+
{unavailable && <Text role="alert">The saved asset is unavailable. Choose a replacement; the draft id is retained until then.</Text>}
|
|
1000
|
+
<Stack direction="horizontal" gap="sm" wrap>
|
|
1001
|
+
<MediaLibraryDialog open={open} trigger={<Button>Choose reference media</Button>} onOpenChange={changeOpen} fetcher={fetcher} value={pickerDraft} onValueChange={setPickerDraft} query={query} onQueryChange={next => { setQuery(next); setPage(0); setPending(true) }} selectionMode="single" allowUpload={false}
|
|
1002
|
+
strings={{ showingCount: shown => `${shown} loaded on this page; total unknown` }}
|
|
1003
|
+
slots={{ footer: <Stack direction="horizontal" gap="sm" wrap align="center">
|
|
1004
|
+
<Text>Media page {page + 1}; total unknown</Text>
|
|
1005
|
+
<Button disabled={pending || page === 0} onClick={() => { setPage(value => value - 1); setPending(true) }}>Previous media page</Button>
|
|
1006
|
+
<Button disabled={pending || !hasNext} onClick={() => { setPage(value => value + 1); setPending(true) }}>Next media page</Button>
|
|
1007
|
+
</Stack> }}
|
|
1008
|
+
onConfirm={(items, ids) => { setSelected(ids); setResolved({ scope, ids, items }); setOpen(false) }} />
|
|
1009
|
+
<Button tone="neutral" appearance="outline" onClick={() => setSelected(["image-2"])}>Load saved media draft</Button>
|
|
1010
|
+
<Button tone="neutral" appearance="outline" onClick={() => { setScope(value => value === "site" ? "other" : "site"); setPage(0); setPending(true) }}>Switch media scope</Button>
|
|
1011
|
+
<Button tone="neutral" appearance="outline" onClick={() => { setFail(value => !value); setPending(true) }}>Toggle media failure</Button>
|
|
1012
|
+
</Stack>
|
|
1013
|
+
<Text role="status">{chosen.length ? `Hydrated selection: ${chosen.map(item => `${item.name} — ${item.alt}`).join(", ")}` : `Saved draft ids: ${selected.join(", ")}`}</Text>
|
|
1014
|
+
</Stack>
|
|
1015
|
+
}
|
|
1016
|
+
```
|
|
1017
|
+
|
|
951
1018
|
### Asset manager
|
|
952
1019
|
|
|
953
1020
|
```tsx fragment — excerpt from the live preview; surrounding values are supplied by the application
|
|
@@ -996,7 +1063,7 @@ export default function Library() {
|
|
|
996
1063
|
onConfirm={(items) => setNote(`using ${items.length}`)}
|
|
997
1064
|
/>
|
|
998
1065
|
<Stack direction="horizontal" align="center" gap="sm" wrap>
|
|
999
|
-
<Button tone="neutral"
|
|
1066
|
+
<Button tone="neutral" appearance="outline" onClick={() => { failNext.current = true; setNote("The next save, delete, or upload will fail once.") }}>
|
|
1000
1067
|
Fail next action
|
|
1001
1068
|
</Button>
|
|
1002
1069
|
<Text size="sm" type="secondary">Preview recovery without mixing test controls into the library toolbar.</Text>
|
|
@@ -1064,15 +1131,15 @@ export default function AsyncLibrary() {
|
|
|
1064
1131
|
}, [scenario])
|
|
1065
1132
|
|
|
1066
1133
|
return (
|
|
1067
|
-
<Stack>
|
|
1068
|
-
<Stack direction="horizontal" wrap>
|
|
1069
|
-
<Button type="button" tone="neutral"
|
|
1134
|
+
<Stack gap="sm">
|
|
1135
|
+
<Stack gap="sm" direction="horizontal" wrap>
|
|
1136
|
+
<Button type="button" tone="neutral" appearance="outline" onClick={() => load("assets")}>
|
|
1070
1137
|
Load sample assets
|
|
1071
1138
|
</Button>
|
|
1072
|
-
<Button type="button" tone="neutral"
|
|
1139
|
+
<Button type="button" tone="neutral" appearance="outline" onClick={() => load("failure")}>
|
|
1073
1140
|
Simulate failure
|
|
1074
1141
|
</Button>
|
|
1075
|
-
<Button type="button" tone="neutral"
|
|
1142
|
+
<Button type="button" tone="neutral" appearance="outline" onClick={() => load("empty")}>
|
|
1076
1143
|
Show empty library
|
|
1077
1144
|
</Button>
|
|
1078
1145
|
</Stack>
|
|
@@ -1125,7 +1192,7 @@ export default function BulkActions() {
|
|
|
1125
1192
|
<Button
|
|
1126
1193
|
type="button"
|
|
1127
1194
|
tone="neutral"
|
|
1128
|
-
|
|
1195
|
+
appearance="ghost"
|
|
1129
1196
|
onClick={() => {
|
|
1130
1197
|
setAssets((current) => current.map((asset) => selected.includes(asset.id) ? { ...asset, public: true } : asset))
|
|
1131
1198
|
setNote(`Made ${selectedCount} assets public`)
|
|
@@ -1137,7 +1204,7 @@ export default function BulkActions() {
|
|
|
1137
1204
|
<Button
|
|
1138
1205
|
type="button"
|
|
1139
1206
|
tone="destructive"
|
|
1140
|
-
|
|
1207
|
+
appearance="ghost"
|
|
1141
1208
|
onClick={() => {
|
|
1142
1209
|
setAssets((current) => current.filter((asset) => !selected.includes(asset.id)))
|
|
1143
1210
|
setNote(`Deleted ${selectedCount}`)
|
|
@@ -15,7 +15,6 @@ Typing a trigger character suggests entities and inserts them as chips.
|
|
|
15
15
|
|
|
16
16
|
```tsx fragment — import-only example
|
|
17
17
|
import { MentionChip } from "themelia-ui/features/mentions"
|
|
18
|
-
import "themelia-ui/features/mentions.css"
|
|
19
18
|
```
|
|
20
19
|
|
|
21
20
|
## Composition
|
|
@@ -492,7 +491,7 @@ import { useCallback, useImperativeHandle, useRef, useState, type Ref } from "re
|
|
|
492
491
|
import { Button } from "themelia-ui/base/buttons"
|
|
493
492
|
import { Popover, PopoverTrigger } from "themelia-ui/base/popover"
|
|
494
493
|
import { Stack } from "themelia-ui/base/structure"
|
|
495
|
-
import { Text } from "themelia-ui/base/typography"
|
|
494
|
+
import { Text, textClassName } from "themelia-ui/base/typography"
|
|
496
495
|
import {
|
|
497
496
|
MentionChip, MentionInlineSuggestions, MentionPicker, parseMentionsFromHtml, useMentions,
|
|
498
497
|
type MentionEditorHandle,
|
|
@@ -558,6 +557,7 @@ function MiniEditor({
|
|
|
558
557
|
ref={host}
|
|
559
558
|
contentEditable
|
|
560
559
|
suppressContentEditableWarning
|
|
560
|
+
tabIndex={0}
|
|
561
561
|
role="textbox"
|
|
562
562
|
aria-multiline
|
|
563
563
|
aria-label={placeholder}
|
|
@@ -568,7 +568,7 @@ function MiniEditor({
|
|
|
568
568
|
onInput(event.currentTarget.innerHTML)
|
|
569
569
|
onCaretChange()
|
|
570
570
|
}}
|
|
571
|
-
className={styles.editor}
|
|
571
|
+
className={`${styles.editor} ${textClassName({ lineHeight: "relaxed" })}`}
|
|
572
572
|
/>
|
|
573
573
|
)
|
|
574
574
|
}
|
|
@@ -619,11 +619,11 @@ export default function MentionInline() {
|
|
|
619
619
|
/>
|
|
620
620
|
</div>
|
|
621
621
|
|
|
622
|
-
<Stack direction="horizontal" gap="
|
|
622
|
+
<Stack direction="horizontal" gap="sm" align="center" wrap>
|
|
623
623
|
<Popover open={mentions.pickerOpen && !mentions.triggerActive} onOpenChange={mentions.setPickerOpen}>
|
|
624
624
|
<PopoverTrigger
|
|
625
625
|
render={
|
|
626
|
-
<Button tone="neutral"
|
|
626
|
+
<Button tone="neutral" appearance="outline">
|
|
627
627
|
Insert reference
|
|
628
628
|
</Button>
|
|
629
629
|
}
|
|
@@ -662,7 +662,7 @@ export default function MentionInline() {
|
|
|
662
662
|
)}
|
|
663
663
|
|
|
664
664
|
{!!html && (
|
|
665
|
-
<Text size="xs" type="secondary" className={styles.source}>
|
|
665
|
+
<Text size="xs" type="secondary" mono className={styles.source}>
|
|
666
666
|
{html}
|
|
667
667
|
</Text>
|
|
668
668
|
)}
|
|
@@ -703,7 +703,7 @@ const TONES: NonNullable<MentionResource["tone"]>[] = ["primary", "secondary", "
|
|
|
703
703
|
|
|
704
704
|
export default function MentionTones() {
|
|
705
705
|
return (
|
|
706
|
-
<Stack
|
|
706
|
+
<Stack>
|
|
707
707
|
<Text>
|
|
708
708
|
The same chip in body copy:{" "}
|
|
709
709
|
<MentionChip mention={STORED_MENTIONS[0]!} resource={RESOURCES.user} />{" "}
|
|
@@ -15,7 +15,6 @@ Any application modal — dialog, sheet or confirmation — including its async
|
|
|
15
15
|
|
|
16
16
|
```tsx fragment — import-only example
|
|
17
17
|
import { ActionDialog } from "themelia-ui/features/overlays"
|
|
18
|
-
import "themelia-ui/features/overlays.css"
|
|
19
18
|
```
|
|
20
19
|
|
|
21
20
|
## Composition
|
|
@@ -35,6 +34,16 @@ A dialog with a generated footer: cancel and confirm in a fixed order, an async-
|
|
|
35
34
|
form-aware confirm, and a tone for the glyph and the confirm colour. Use the base Dialog when
|
|
36
35
|
the body owns its actions.
|
|
37
36
|
|
|
37
|
+
**Use when:** A temporary focused task or nested confirmation with explicit completion.
|
|
38
|
+
|
|
39
|
+
**Avoid when:** Persistent route content or application-owned business policy.
|
|
40
|
+
|
|
41
|
+
**Compose:** Use controlled open and closeOnAsyncComplete=false when resolved validation can fail; use formId for a native form with one submit owner. Busy confirmation blocks dismissal.
|
|
42
|
+
|
|
43
|
+
**Capabilities:** nested confirmation; resolved validation failure; async form completion.
|
|
44
|
+
|
|
45
|
+
**Alternatives:** ActionSheet, ConfirmDialog.
|
|
46
|
+
|
|
38
47
|
```text
|
|
39
48
|
({ width, surfaceStyle, ...props }: ActionDialogProps) => import("react").JSX.Element
|
|
40
49
|
```
|
|
@@ -70,9 +79,9 @@ Extends: `OverlayBaseProps`, `OverlayActionProps`, `OverlayEmphasisProps`.
|
|
|
70
79
|
| member | required | type | description / documented default |
|
|
71
80
|
| --- | :-: | --- | --- |
|
|
72
81
|
| `side` | no | `SheetSide` | |
|
|
73
|
-
| `size` | no | `
|
|
74
|
-
| `length` | no | `
|
|
75
|
-
| `inset` | no | `
|
|
82
|
+
| `size` | no | `OverlaySize` | Cross-axis extent: a side panel's width, `default`, `sm`, `full` or a CSS length. |
|
|
83
|
+
| `length` | no | `OverlayLength` | How far it runs along its edge; `inset` sets the gap from the viewport. See base/sheet. |
|
|
84
|
+
| `inset` | no | `OverlayInset` | |
|
|
76
85
|
| `showFooter` | no | `boolean` | |
|
|
77
86
|
| `modality` | no | `"modal" \| "trap-focus" \| "non-modal"` | How much of the page it takes hostage. `modal` traps focus, locks scroll and makes the page<br>inert; `non-modal` sits beside the app (inspectors, filter rails) and leaves the<br>surrounding page interactive; `trap-focus` is in between. A non-modal panel is not<br>announced as a dialog, so never use it for a question that must be answered. |
|
|
78
87
|
| `trigger` | no | `ReactNode` | The element that opens it, which makes the overlay uncontrolled. Supply this OR `open`,<br>not both. |
|
|
@@ -139,7 +148,7 @@ Passing `onConfirm` alongside `onAsyncConfirm` therefore skips the async one.
|
|
|
139
148
|
| `onError` | no | `(error: unknown) => void` | Receives a rejected async confirm, so a consumer can toast or report it. The overlay stays<br>open. |
|
|
140
149
|
| `closeOnAsyncComplete` | no | `boolean` | `false` keeps the overlay open after a resolved async confirm — a multi-step flow. @default true |
|
|
141
150
|
| `confirmTone` | no | `OverlayButtonTone` | |
|
|
142
|
-
| `
|
|
151
|
+
| `confirmAppearance` | no | `OverlayButtonAppearance` | |
|
|
143
152
|
| `loading` | no | `boolean` | Forces the pending presentation, for confirm work owned outside the overlay. |
|
|
144
153
|
| `formId` | no | `string` | The first of the three confirm paths: the confirm button calls `requestSubmit()` on that<br>form, so native validation runs and the form's own `onSubmit` owns the outcome. Neither<br>callback fires. |
|
|
145
154
|
| `footer` | no | `ReactNode` | Replaces the generated footer. Every action prop stops applying. |
|
|
@@ -175,14 +184,14 @@ Kind: interface.
|
|
|
175
184
|
| `contentClassName` | no | `string` | |
|
|
176
185
|
| `strings` | no | `Partial<OverlayActionStrings>` | |
|
|
177
186
|
|
|
178
|
-
### `
|
|
187
|
+
### `OverlayButtonAppearance`
|
|
179
188
|
|
|
180
189
|
Kind: type.
|
|
181
190
|
|
|
182
191
|
Ghost is excluded: a footer's confirm must look like a commitment.
|
|
183
192
|
|
|
184
193
|
```text
|
|
185
|
-
Exclude<
|
|
194
|
+
Exclude<ButtonAppearance, "ghost">
|
|
186
195
|
```
|
|
187
196
|
|
|
188
197
|
### `OverlayButtonTone`
|
|
@@ -363,6 +372,50 @@ Kind: interface.
|
|
|
363
372
|
|
|
364
373
|
Preview route: Action overlays — `/action-overlays`
|
|
365
374
|
|
|
375
|
+
### Nested action flow
|
|
376
|
+
|
|
377
|
+
```tsx fragment — excerpt from the live preview; surrounding values are supplied by the application
|
|
378
|
+
import { useRef, useState } from "react"
|
|
379
|
+
import { Button } from "themelia-ui/base/buttons"
|
|
380
|
+
import { FormField } from "themelia-ui/base/forms"
|
|
381
|
+
import { Stack } from "themelia-ui/base/structure"
|
|
382
|
+
import { Input } from "themelia-ui/base/text-inputs"
|
|
383
|
+
import { Text } from "themelia-ui/base/typography"
|
|
384
|
+
import { ActionDialog } from "themelia-ui/features/overlays"
|
|
385
|
+
|
|
386
|
+
export default function NestedActionReference() {
|
|
387
|
+
const [open, setOpen] = useState(false)
|
|
388
|
+
const [child, setChild] = useState(false)
|
|
389
|
+
const [name, setName] = useState("Draft record")
|
|
390
|
+
const [error, setError] = useState<string>()
|
|
391
|
+
const [saved, setSaved] = useState(0)
|
|
392
|
+
const session = useRef(0)
|
|
393
|
+
const changeOpen = (next: boolean) => { session.current++; setOpen(next); setChild(false) }
|
|
394
|
+
return <Stack>
|
|
395
|
+
<ActionDialog open={open} trigger={<Button>Inspect draft</Button>} onOpenChange={changeOpen} title="Record inspector" description="The draft remains here after cancellation, validation failure or transport failure." showConfirm={false}>
|
|
396
|
+
<Stack>
|
|
397
|
+
<FormField label="Record name" error={error} hint="Use at least three characters. Use offline to simulate a rejected request."><Input value={name} onChange={event => setName(event.target.value)} /></FormField>
|
|
398
|
+
<ActionDialog open={child} trigger={<Button>Review save</Button>} onOpenChange={setChild} title="Save this draft?" description="A resolved response can contain validation errors. Closure follows business success." closeOnAsyncComplete={false}
|
|
399
|
+
alertMessage={error} onError={() => setError("Could not save; your draft is still here.")}
|
|
400
|
+
onAsyncConfirm={async () => {
|
|
401
|
+
const attempt = session.current
|
|
402
|
+
await new Promise(resolve => setTimeout(resolve, 300))
|
|
403
|
+
if (attempt !== session.current) return
|
|
404
|
+
if (name === "offline") throw new Error("Unavailable")
|
|
405
|
+
if (name.trim().length < 3) { setError("Enter at least three characters."); return }
|
|
406
|
+
setError(undefined); setSaved(count => count + 1); changeOpen(false)
|
|
407
|
+
}}>
|
|
408
|
+
<Text>{name}</Text>
|
|
409
|
+
</ActionDialog>
|
|
410
|
+
{/* A native form can instead use formId: its submit handler owns validation and closure. */}
|
|
411
|
+
<Text size="xs" type="secondary">Confirmation {child ? "open" : "closed"}</Text>
|
|
412
|
+
</Stack>
|
|
413
|
+
</ActionDialog>
|
|
414
|
+
<Text role="status">Successful saves {saved}</Text>
|
|
415
|
+
</Stack>
|
|
416
|
+
}
|
|
417
|
+
```
|
|
418
|
+
|
|
366
419
|
### ActionDialog
|
|
367
420
|
|
|
368
421
|
```tsx fragment — excerpt from the live preview; surrounding values are supplied by the application
|
|
@@ -382,12 +435,12 @@ export default function ActionDialogExample() {
|
|
|
382
435
|
const [failure, setFailure] = useState<string | null>(null)
|
|
383
436
|
|
|
384
437
|
return (
|
|
385
|
-
<Stack direction="horizontal"
|
|
386
|
-
<Stack direction="horizontal"
|
|
438
|
+
<Stack direction="horizontal" wrap align="center">
|
|
439
|
+
<Stack direction="horizontal" wrap>
|
|
387
440
|
<ActionDialog
|
|
388
441
|
title="Rename workspace"
|
|
389
442
|
description="The name appears in the sidebar and in invitations."
|
|
390
|
-
trigger={<Button tone="neutral"
|
|
443
|
+
trigger={<Button tone="neutral" appearance="outline">Plain</Button>}
|
|
391
444
|
onConfirm={() => setSaved("renamed")}
|
|
392
445
|
>
|
|
393
446
|
<FormField label="Name">
|
|
@@ -402,14 +455,14 @@ export default function ActionDialogExample() {
|
|
|
402
455
|
emphasis
|
|
403
456
|
showIcon
|
|
404
457
|
alertMessage="Members are notified by email as soon as it publishes."
|
|
405
|
-
trigger={<Button tone="neutral"
|
|
458
|
+
trigger={<Button tone="neutral" appearance="outline">Toned</Button>}
|
|
406
459
|
onConfirm={() => setSaved("published")}
|
|
407
460
|
/>
|
|
408
461
|
|
|
409
462
|
<ActionDialog
|
|
410
463
|
title="Saving takes a moment"
|
|
411
464
|
description="The confirm shows a spinner and both buttons disable until it settles."
|
|
412
|
-
trigger={<Button tone="neutral"
|
|
465
|
+
trigger={<Button tone="neutral" appearance="outline">Async confirm</Button>}
|
|
413
466
|
onAsyncConfirm={async () => {
|
|
414
467
|
await wait(1200)
|
|
415
468
|
setSaved("saved after a delay")
|
|
@@ -422,7 +475,7 @@ export default function ActionDialogExample() {
|
|
|
422
475
|
tone="destructive"
|
|
423
476
|
onOpenChange={() => setFailure(null)}
|
|
424
477
|
description="A rejection leaves the overlay open and reports through onError — closing it would take the form away at the moment you most need to see what went wrong."
|
|
425
|
-
trigger={<Button tone="neutral"
|
|
478
|
+
trigger={<Button tone="neutral" appearance="outline">Async that rejects</Button>}
|
|
426
479
|
onAsyncConfirm={async () => {
|
|
427
480
|
await wait(900)
|
|
428
481
|
throw new Error("Could not reach the server")
|
|
@@ -451,11 +504,11 @@ import { wait } from "./data"
|
|
|
451
504
|
|
|
452
505
|
export default function ConfirmDialogExample() {
|
|
453
506
|
return (
|
|
454
|
-
<Stack direction="horizontal"
|
|
507
|
+
<Stack direction="horizontal" wrap>
|
|
455
508
|
<ConfirmDialog
|
|
456
509
|
title="Discard your changes?"
|
|
457
510
|
description="The draft has unsaved edits."
|
|
458
|
-
trigger={<Button tone="neutral"
|
|
511
|
+
trigger={<Button tone="neutral" appearance="outline">Neutral</Button>}
|
|
459
512
|
/>
|
|
460
513
|
<ConfirmDialog
|
|
461
514
|
destructive
|
|
@@ -484,14 +537,14 @@ import { wait } from "./data"
|
|
|
484
537
|
|
|
485
538
|
export default function ActionSheetExample() {
|
|
486
539
|
return (
|
|
487
|
-
<Stack direction="horizontal"
|
|
540
|
+
<Stack direction="horizontal" wrap>
|
|
488
541
|
<ActionSheet
|
|
489
542
|
title="Edit invoice"
|
|
490
543
|
description="Longer work than a dialog comfortably holds."
|
|
491
|
-
trigger={<Button tone="neutral"
|
|
544
|
+
trigger={<Button tone="neutral" appearance="outline">Modal sheet</Button>}
|
|
492
545
|
onAsyncConfirm={() => wait(700)}
|
|
493
546
|
>
|
|
494
|
-
<Stack gap="
|
|
547
|
+
<Stack gap="sm">
|
|
495
548
|
<FormField label="Reference">
|
|
496
549
|
<Input defaultValue="INV-4417" />
|
|
497
550
|
</FormField>
|
|
@@ -507,7 +560,7 @@ export default function ActionSheetExample() {
|
|
|
507
560
|
modality="non-modal"
|
|
508
561
|
showFooter={false}
|
|
509
562
|
inset
|
|
510
|
-
trigger={<Button tone="neutral"
|
|
563
|
+
trigger={<Button tone="neutral" appearance="outline">Non-modal inspector</Button>}
|
|
511
564
|
>
|
|
512
565
|
<Text size="sm" type="secondary">
|
|
513
566
|
Scroll and click the page behind this panel — it is not inert.
|
|
@@ -534,11 +587,11 @@ export default function OverlayVisibility() {
|
|
|
534
587
|
|
|
535
588
|
return (
|
|
536
589
|
<>
|
|
537
|
-
<Stack direction="horizontal"
|
|
538
|
-
<Button tone="neutral"
|
|
590
|
+
<Stack direction="horizontal" wrap>
|
|
591
|
+
<Button tone="neutral" appearance="outline" onClick={overlays.edit.show}>
|
|
539
592
|
Open edit
|
|
540
593
|
</Button>
|
|
541
|
-
<Button tone="neutral"
|
|
594
|
+
<Button tone="neutral" appearance="outline" onClick={overlays.remove.show}>
|
|
542
595
|
Open remove
|
|
543
596
|
</Button>
|
|
544
597
|
</Stack>
|
|
@@ -8,14 +8,13 @@ Presenting catalogue records — options, readiness, policies and quotes — in
|
|
|
8
8
|
|
|
9
9
|
- **Use when:** Presenting catalogue records — options, readiness, policies and quotes — in the admin profile.
|
|
10
10
|
- **Avoid when:** The record is an order, invoice or shipment.
|
|
11
|
-
- **Consider instead:** `admin/
|
|
11
|
+
- **Consider instead:** `blocks/admin/commerce`, `features/resource`
|
|
12
12
|
- **Stability:** stable.
|
|
13
13
|
|
|
14
14
|
## Import
|
|
15
15
|
|
|
16
16
|
```tsx fragment — import-only example
|
|
17
17
|
import { ProductContractOverview } from "themelia-ui/features/products"
|
|
18
|
-
import "themelia-ui/features/products.css"
|
|
19
18
|
```
|
|
20
19
|
|
|
21
20
|
## Optional peers
|
|
@@ -1505,7 +1504,7 @@ export default function Manager() {
|
|
|
1505
1504
|
{catalogue.variants.length} rows exist
|
|
1506
1505
|
</Text>
|
|
1507
1506
|
|
|
1508
|
-
<Grid
|
|
1507
|
+
<Grid>
|
|
1509
1508
|
<ProductOptionsSummary
|
|
1510
1509
|
options={OPTION_SUMMARY}
|
|
1511
1510
|
onManageOptions={() => note("manage options")}
|
|
@@ -1524,7 +1523,7 @@ export default function Manager() {
|
|
|
1524
1523
|
onDeleteVariant={(variant) => note(`delete ${variant.id}`)}
|
|
1525
1524
|
/>
|
|
1526
1525
|
|
|
1527
|
-
<Stack direction="horizontal" gap="
|
|
1526
|
+
<Stack direction="horizontal" gap="sm" align="center">
|
|
1528
1527
|
<Text size="sm" type="secondary">Group by</Text>
|
|
1529
1528
|
<PillRadioGroup
|
|
1530
1529
|
value={groupBy}
|
|
@@ -1578,7 +1577,7 @@ export default function VariantDetail() {
|
|
|
1578
1577
|
<>
|
|
1579
1578
|
{/* Stacked, not two-up: both of these switch layout on their OWN width, and a
|
|
1580
1579
|
half-column here is narrower than either ever gets in a real rail. */}
|
|
1581
|
-
<Stack
|
|
1580
|
+
<Stack>
|
|
1582
1581
|
<ProductVariantDetails
|
|
1583
1582
|
variant={{
|
|
1584
1583
|
id: "m-trail",
|
|
@@ -1668,7 +1667,7 @@ export default function Empty() {
|
|
|
1668
1667
|
|
|
1669
1668
|
return (
|
|
1670
1669
|
<>
|
|
1671
|
-
<Grid
|
|
1670
|
+
<Grid>
|
|
1672
1671
|
<ProductVariantsBulkTable
|
|
1673
1672
|
variants={[]}
|
|
1674
1673
|
onGenerateVariants={() => note("generate the combinations")}
|
|
@@ -1709,7 +1708,7 @@ export default function Overview() {
|
|
|
1709
1708
|
|
|
1710
1709
|
return (
|
|
1711
1710
|
<>
|
|
1712
|
-
<Grid
|
|
1711
|
+
<Grid>
|
|
1713
1712
|
<ProductOverview
|
|
1714
1713
|
title="Trailhead 29er"
|
|
1715
1714
|
description="Aluminium trail hardtail, sold as a frameset or a complete build."
|
|
@@ -1763,14 +1762,14 @@ export default function Rows() {
|
|
|
1763
1762
|
|
|
1764
1763
|
return (
|
|
1765
1764
|
<>
|
|
1766
|
-
<Grid
|
|
1765
|
+
<Grid>
|
|
1767
1766
|
<ProductReadinessCard
|
|
1768
1767
|
score={72}
|
|
1769
1768
|
items={READINESS}
|
|
1770
1769
|
summary="Two checks left before this can be published."
|
|
1771
1770
|
onSelectReadinessItem={(item) => note(`readiness: ${item.id}`)}
|
|
1772
1771
|
/>
|
|
1773
|
-
<Stack
|
|
1772
|
+
<Stack>
|
|
1774
1773
|
<ProductStructureCard
|
|
1775
1774
|
metrics={STRUCTURE}
|
|
1776
1775
|
onSelectMetric={(metric) => note(`structure: ${metric.id}`)}
|
|
@@ -1814,8 +1813,8 @@ export default function Contract() {
|
|
|
1814
1813
|
|
|
1815
1814
|
return (
|
|
1816
1815
|
<>
|
|
1817
|
-
<Grid
|
|
1818
|
-
<Stack
|
|
1816
|
+
<Grid>
|
|
1817
|
+
<Stack>
|
|
1819
1818
|
<ProductDetailsCard
|
|
1820
1819
|
metadata={DETAILS}
|
|
1821
1820
|
onEditDetails={() => note("edit details")}
|