@hjmds/react 1.41.2 → 1.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/actions.d.ts +41 -0
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +40 -3
- package/dist/actions.js.map +1 -1
- package/dist/activity-chip.d.ts.map +1 -1
- package/dist/activity-chip.js +1 -0
- package/dist/activity-chip.js.map +1 -1
- package/dist/advanced-display.d.ts +47 -14
- package/dist/advanced-display.d.ts.map +1 -1
- package/dist/advanced-display.js +72 -17
- package/dist/advanced-display.js.map +1 -1
- package/dist/advanced-forms.d.ts.map +1 -1
- package/dist/advanced-forms.js +1 -0
- package/dist/advanced-forms.js.map +1 -1
- package/dist/affix.d.ts +6 -1
- package/dist/affix.d.ts.map +1 -1
- package/dist/affix.js +5 -3
- package/dist/affix.js.map +1 -1
- package/dist/agreement.d.ts.map +1 -1
- package/dist/agreement.js +1 -0
- package/dist/agreement.js.map +1 -1
- package/dist/alert-dialog-queue.d.ts +24 -0
- package/dist/alert-dialog-queue.d.ts.map +1 -0
- package/dist/alert-dialog-queue.js +44 -0
- package/dist/alert-dialog-queue.js.map +1 -0
- package/dist/anchor.d.ts.map +1 -1
- package/dist/anchor.js +1 -0
- package/dist/anchor.js.map +1 -1
- package/dist/asset.d.ts.map +1 -1
- package/dist/asset.js +1 -0
- package/dist/asset.js.map +1 -1
- package/dist/auth-screen.d.ts.map +1 -1
- package/dist/auth-screen.js +1 -0
- package/dist/auth-screen.js.map +1 -1
- package/dist/avatar-blobatar-motion.d.ts.map +1 -1
- package/dist/avatar-blobatar-motion.js +1 -0
- package/dist/avatar-blobatar-motion.js.map +1 -1
- package/dist/avatar-blobatar.d.ts.map +1 -1
- package/dist/avatar-blobatar.js +1 -0
- package/dist/avatar-blobatar.js.map +1 -1
- package/dist/bottom-cta.d.ts.map +1 -1
- package/dist/bottom-cta.js +1 -0
- package/dist/bottom-cta.js.map +1 -1
- package/dist/bottom-info.d.ts.map +1 -1
- package/dist/bottom-info.js +1 -0
- package/dist/bottom-info.js.map +1 -1
- package/dist/bottom-navigation.d.ts.map +1 -1
- package/dist/bottom-navigation.js +1 -0
- package/dist/bottom-navigation.js.map +1 -1
- package/dist/breadcrumb.d.ts.map +1 -1
- package/dist/breadcrumb.js +1 -0
- package/dist/breadcrumb.js.map +1 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +1 -0
- package/dist/calendar.js.map +1 -1
- package/dist/carousel-motion.d.ts.map +1 -1
- package/dist/carousel-motion.js +1 -0
- package/dist/carousel-motion.js.map +1 -1
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +1 -0
- package/dist/carousel.js.map +1 -1
- package/dist/celebration.d.ts.map +1 -1
- package/dist/celebration.js +1 -0
- package/dist/celebration.js.map +1 -1
- package/dist/chart.d.ts +7 -2
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +6 -3
- package/dist/chart.js.map +1 -1
- package/dist/choice-row.d.ts +10 -2
- package/dist/choice-row.d.ts.map +1 -1
- package/dist/choice-row.js +7 -3
- package/dist/choice-row.js.map +1 -1
- package/dist/clipboard.d.ts.map +1 -1
- package/dist/clipboard.js +1 -0
- package/dist/clipboard.js.map +1 -1
- package/dist/collapsible.d.ts.map +1 -1
- package/dist/collapsible.js +1 -0
- package/dist/collapsible.js.map +1 -1
- package/dist/collection-rail.d.ts.map +1 -1
- package/dist/collection-rail.js +3 -1
- package/dist/collection-rail.js.map +1 -1
- package/dist/color-picker.d.ts.map +1 -1
- package/dist/color-picker.js +1 -0
- package/dist/color-picker.js.map +1 -1
- package/dist/command-palette.d.ts.map +1 -1
- package/dist/command-palette.js +1 -0
- package/dist/command-palette.js.map +1 -1
- package/dist/content-transition.d.ts.map +1 -1
- package/dist/content-transition.js +1 -0
- package/dist/content-transition.js.map +1 -1
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.js +1 -0
- package/dist/context-menu.js.map +1 -1
- package/dist/conversation-row.d.ts.map +1 -1
- package/dist/conversation-row.js +1 -0
- package/dist/conversation-row.js.map +1 -1
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +1 -0
- package/dist/data-table.js.map +1 -1
- package/dist/date-entry.d.ts.map +1 -1
- package/dist/date-entry.js +1 -0
- package/dist/date-entry.js.map +1 -1
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +1 -0
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range.d.ts.map +1 -1
- package/dist/date-range.js +1 -0
- package/dist/date-range.js.map +1 -1
- package/dist/design-profile.d.ts.map +1 -1
- package/dist/design-profile.js +1 -0
- package/dist/design-profile.js.map +1 -1
- package/dist/display.d.ts +21 -1
- package/dist/display.d.ts.map +1 -1
- package/dist/display.js +34 -8
- package/dist/display.js.map +1 -1
- package/dist/duration-field.d.ts.map +1 -1
- package/dist/duration-field.js +1 -0
- package/dist/duration-field.js.map +1 -1
- package/dist/effect-surface.d.ts.map +1 -1
- package/dist/effect-surface.js +1 -0
- package/dist/effect-surface.js.map +1 -1
- package/dist/evidence.d.ts +1 -1
- package/dist/evidence.js +1 -1
- package/dist/evidence.js.map +1 -1
- package/dist/feedback.d.ts.map +1 -1
- package/dist/feedback.js +1 -0
- package/dist/feedback.js.map +1 -1
- package/dist/field-group.d.ts.map +1 -1
- package/dist/field-group.js +1 -0
- package/dist/field-group.js.map +1 -1
- package/dist/file-picker.d.ts.map +1 -1
- package/dist/file-picker.js +1 -0
- package/dist/file-picker.js.map +1 -1
- package/dist/floating-action-button.d.ts.map +1 -1
- package/dist/floating-action-button.js +1 -0
- package/dist/floating-action-button.js.map +1 -1
- package/dist/folder-preview.d.ts.map +1 -1
- package/dist/folder-preview.js +1 -0
- package/dist/folder-preview.js.map +1 -1
- package/dist/forms.d.ts +30 -6
- package/dist/forms.d.ts.map +1 -1
- package/dist/forms.js +56 -14
- package/dist/forms.js.map +1 -1
- package/dist/gravity-letters.d.ts.map +1 -1
- package/dist/gravity-letters.js +1 -0
- package/dist/gravity-letters.js.map +1 -1
- package/dist/grid-reveal.d.ts.map +1 -1
- package/dist/grid-reveal.js +1 -0
- package/dist/grid-reveal.js.map +1 -1
- package/dist/heading.d.ts.map +1 -1
- package/dist/heading.js +1 -0
- package/dist/heading.js.map +1 -1
- package/dist/image-choice.d.ts.map +1 -1
- package/dist/image-choice.js +1 -0
- package/dist/image-choice.js.map +1 -1
- package/dist/image-comparison.d.ts.map +1 -1
- package/dist/image-comparison.js +1 -0
- package/dist/image-comparison.js.map +1 -1
- package/dist/image-viewer.d.ts +22 -1
- package/dist/image-viewer.d.ts.map +1 -1
- package/dist/image-viewer.js +14 -1
- package/dist/image-viewer.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/inline-confirm.d.ts.map +1 -1
- package/dist/inline-confirm.js +1 -0
- package/dist/inline-confirm.js.map +1 -1
- package/dist/internal/document-resource.d.ts.map +1 -1
- package/dist/internal/document-resource.js +1 -0
- package/dist/internal/document-resource.js.map +1 -1
- package/dist/internal/initial-focus.d.ts.map +1 -1
- package/dist/internal/initial-focus.js +1 -0
- package/dist/internal/initial-focus.js.map +1 -1
- package/dist/internal/media-album.d.ts.map +1 -1
- package/dist/internal/media-album.js +1 -0
- package/dist/internal/media-album.js.map +1 -1
- package/dist/internal/message-reactions.d.ts.map +1 -1
- package/dist/internal/message-reactions.js +1 -0
- package/dist/internal/message-reactions.js.map +1 -1
- package/dist/internal/overlay-origin-motion.d.ts.map +1 -1
- package/dist/internal/overlay-origin-motion.js +1 -0
- package/dist/internal/overlay-origin-motion.js.map +1 -1
- package/dist/internal/pending-content.d.ts.map +1 -1
- package/dist/internal/pending-content.js +1 -0
- package/dist/internal/pending-content.js.map +1 -1
- package/dist/internal/photo-source-icon.d.ts.map +1 -1
- package/dist/internal/photo-source-icon.js +1 -0
- package/dist/internal/photo-source-icon.js.map +1 -1
- package/dist/internal/screen-exit.d.ts.map +1 -1
- package/dist/internal/screen-exit.js +1 -0
- package/dist/internal/screen-exit.js.map +1 -1
- package/dist/internal/screen-footer.d.ts.map +1 -1
- package/dist/internal/screen-footer.js +1 -0
- package/dist/internal/screen-footer.js.map +1 -1
- package/dist/internal/spinner.d.ts.map +1 -1
- package/dist/internal/spinner.js +1 -0
- package/dist/internal/spinner.js.map +1 -1
- package/dist/internal/use-composition-action.d.ts.map +1 -1
- package/dist/internal/use-composition-action.js +1 -0
- package/dist/internal/use-composition-action.js.map +1 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +1 -0
- package/dist/internal.js.map +1 -1
- package/dist/layout.d.ts +11 -1
- package/dist/layout.d.ts.map +1 -1
- package/dist/layout.js +8 -4
- package/dist/layout.js.map +1 -1
- package/dist/mentions.d.ts.map +1 -1
- package/dist/mentions.js +1 -0
- package/dist/mentions.js.map +1 -1
- package/dist/menu-morph.d.ts.map +1 -1
- package/dist/menu-morph.js +1 -0
- package/dist/menu-morph.js.map +1 -1
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +1 -0
- package/dist/menubar.js.map +1 -1
- package/dist/modal.d.ts.map +1 -1
- package/dist/modal.js +1 -0
- package/dist/modal.js.map +1 -1
- package/dist/navigation-bar.d.ts.map +1 -1
- package/dist/navigation-bar.js +1 -0
- package/dist/navigation-bar.js.map +1 -1
- package/dist/navigation.d.ts.map +1 -1
- package/dist/navigation.js +1 -0
- package/dist/navigation.js.map +1 -1
- package/dist/notification-bell.d.ts +1 -1
- package/dist/notification-bell.d.ts.map +1 -1
- package/dist/notification-bell.js +5 -1
- package/dist/notification-bell.js.map +1 -1
- package/dist/number-field.d.ts.map +1 -1
- package/dist/number-field.js +1 -0
- package/dist/number-field.js.map +1 -1
- package/dist/overlay-stack.d.ts.map +1 -1
- package/dist/overlay-stack.js +1 -0
- package/dist/overlay-stack.js.map +1 -1
- package/dist/overlays.d.ts.map +1 -1
- package/dist/overlays.js +11 -2
- package/dist/overlays.js.map +1 -1
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +1 -0
- package/dist/pagination.js.map +1 -1
- package/dist/popover.d.ts.map +1 -1
- package/dist/popover.js +1 -0
- package/dist/popover.js.map +1 -1
- package/dist/portal.d.ts.map +1 -1
- package/dist/portal.js +1 -0
- package/dist/portal.js.map +1 -1
- package/dist/progressive-blur.d.ts.map +1 -1
- package/dist/progressive-blur.js +1 -0
- package/dist/progressive-blur.js.map +1 -1
- package/dist/provider-button.d.ts.map +1 -1
- package/dist/provider-button.js +1 -0
- package/dist/provider-button.js.map +1 -1
- package/dist/provider.d.ts +9 -1
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +2 -2
- package/dist/provider.js.map +1 -1
- package/dist/public-exports.generated.d.ts +3 -0
- package/dist/public-exports.generated.d.ts.map +1 -1
- package/dist/public-exports.generated.js +9 -0
- package/dist/public-exports.generated.js.map +1 -1
- package/dist/rating.d.ts.map +1 -1
- package/dist/rating.js +1 -0
- package/dist/rating.js.map +1 -1
- package/dist/reaction-picker.d.ts.map +1 -1
- package/dist/reaction-picker.js +1 -0
- package/dist/reaction-picker.js.map +1 -1
- package/dist/saved-items.d.ts.map +1 -1
- package/dist/saved-items.js +1 -0
- package/dist/saved-items.js.map +1 -1
- package/dist/screen-flows.d.ts +5 -1
- package/dist/screen-flows.d.ts.map +1 -1
- package/dist/screen-flows.js +13 -4
- package/dist/screen-flows.js.map +1 -1
- package/dist/screens.d.ts +24 -4
- package/dist/screens.d.ts.map +1 -1
- package/dist/screens.js +38 -11
- package/dist/screens.js.map +1 -1
- package/dist/scroll-progress.d.ts.map +1 -1
- package/dist/scroll-progress.js +1 -0
- package/dist/scroll-progress.js.map +1 -1
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +1 -0
- package/dist/select.js.map +1 -1
- package/dist/selection.d.ts +7 -1
- package/dist/selection.d.ts.map +1 -1
- package/dist/selection.js +33 -10
- package/dist/selection.js.map +1 -1
- package/dist/side-panel.d.ts.map +1 -1
- package/dist/side-panel.js +1 -0
- package/dist/side-panel.js.map +1 -1
- package/dist/sidebar.d.ts +21 -2
- package/dist/sidebar.d.ts.map +1 -1
- package/dist/sidebar.js +40 -20
- package/dist/sidebar.js.map +1 -1
- package/dist/skip-nav.d.ts.map +1 -1
- package/dist/skip-nav.js +1 -0
- package/dist/skip-nav.js.map +1 -1
- package/dist/slider.d.ts.map +1 -1
- package/dist/slider.js +1 -0
- package/dist/slider.js.map +1 -1
- package/dist/sortable.d.ts.map +1 -1
- package/dist/sortable.js +1 -0
- package/dist/sortable.js.map +1 -1
- package/dist/splitter.d.ts.map +1 -1
- package/dist/splitter.js +1 -0
- package/dist/splitter.js.map +1 -1
- package/dist/statistic-motion.d.ts.map +1 -1
- package/dist/statistic-motion.js +1 -0
- package/dist/statistic-motion.js.map +1 -1
- package/dist/status-text.d.ts.map +1 -1
- package/dist/status-text.js +1 -0
- package/dist/status-text.js.map +1 -1
- package/dist/step-player.d.ts.map +1 -1
- package/dist/step-player.js +1 -0
- package/dist/step-player.js.map +1 -1
- package/dist/steps.d.ts +16 -14
- package/dist/steps.d.ts.map +1 -1
- package/dist/steps.js +26 -9
- package/dist/steps.js.map +1 -1
- package/dist/styles.css +140 -35
- package/dist/styles.layered.css +140 -35
- package/dist/supplemental-display.d.ts.map +1 -1
- package/dist/supplemental-display.js +1 -0
- package/dist/supplemental-display.js.map +1 -1
- package/dist/supplemental-navigation.d.ts.map +1 -1
- package/dist/supplemental-navigation.js +1 -0
- package/dist/supplemental-navigation.js.map +1 -1
- package/dist/swipe-actions.d.ts.map +1 -1
- package/dist/swipe-actions.js +1 -0
- package/dist/swipe-actions.js.map +1 -1
- package/dist/table-family.d.ts.map +1 -1
- package/dist/table-family.js +1 -0
- package/dist/table-family.js.map +1 -1
- package/dist/table-sort-button.d.ts.map +1 -1
- package/dist/table-sort-button.js +1 -0
- package/dist/table-sort-button.js.map +1 -1
- package/dist/tags-input.d.ts.map +1 -1
- package/dist/tags-input.js +1 -0
- package/dist/tags-input.js.map +1 -1
- package/dist/task-list.d.ts.map +1 -1
- package/dist/task-list.js +1 -0
- package/dist/task-list.js.map +1 -1
- package/dist/text-annotation.d.ts.map +1 -1
- package/dist/text-annotation.js +1 -0
- package/dist/text-annotation.js.map +1 -1
- package/dist/text-formats.d.ts.map +1 -1
- package/dist/text-formats.js +1 -0
- package/dist/text-formats.js.map +1 -1
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +12 -1
- package/dist/theme.js.map +1 -1
- package/dist/thinking-orb.d.ts.map +1 -1
- package/dist/thinking-orb.js +1 -0
- package/dist/thinking-orb.js.map +1 -1
- package/dist/toast.d.ts.map +1 -1
- package/dist/toast.js +1 -0
- package/dist/toast.js.map +1 -1
- package/dist/toggle-group.d.ts.map +1 -1
- package/dist/toggle-group.js +1 -0
- package/dist/toggle-group.js.map +1 -1
- package/dist/top-bar.d.ts.map +1 -1
- package/dist/top-bar.js +1 -0
- package/dist/top-bar.js.map +1 -1
- package/dist/top.d.ts.map +1 -1
- package/dist/top.js +4 -3
- package/dist/top.js.map +1 -1
- package/dist/tour.d.ts.map +1 -1
- package/dist/tour.js +1 -0
- package/dist/tour.js.map +1 -1
- package/dist/transfer-list.d.ts.map +1 -1
- package/dist/transfer-list.js +1 -0
- package/dist/transfer-list.js.map +1 -1
- package/dist/tree.d.ts.map +1 -1
- package/dist/tree.js +1 -0
- package/dist/tree.js.map +1 -1
- package/dist/upload-item.d.ts.map +1 -1
- package/dist/upload-item.js +1 -0
- package/dist/upload-item.js.map +1 -1
- package/dist/virtual-list.d.ts.map +1 -1
- package/dist/virtual-list.js +1 -0
- package/dist/virtual-list.js.map +1 -1
- package/dist/voice-note.d.ts.map +1 -1
- package/dist/voice-note.js +1 -0
- package/dist/voice-note.js.map +1 -1
- package/package.json +8 -3
package/dist/date-range.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-range.js","sourceRoot":"","sources":["../src/date-range.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"date-range.js","sourceRoot":"","sources":["../src/date-range.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,EACzB,iBAAiB,GAElB,MAAM,+CAA+C,CAAC;AAKvD,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,QAAQ,EAA4B,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAoBjE,MAAM,UAAU,eAAe,CAAoB,EACjD,UAAU,EACV,qBAAqB,EACrB,KAAK,EAAE,eAAe,EACtB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,WAAW,GACmB;IAC9B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,oBAAoB,CAAiB;QAC7D,GAAG,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;QACpE,YAAY,EAAE,YAAY,IAAI,cAAc;QAC5C,GAAG,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;KACpE,CAAC,CAAC;IACH,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACzB,4EAA4E;IAC5E,2CAA2C;IAC3C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAE5D,OAAO,CACL,cACE,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,SAAS,CAAC,oBAClC,KAAK,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,C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AAI,CAAC,YAExC,iBAAiB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,GAClC,CACR,GACD,GACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport {\n emptyDateRange,\n isCompleteDateRange,\n resolveDateRangeCellState,\n resolveDateRangeSelection,\n validateDateRange,\n type DateRangeValue,\n} from \"@hjmds/design-contracts/components/date-range\";\nimport type {\n CalendarDescriptor,\n ComposeCalendarAccessibleName,\n} from \"@hjmds/design-contracts/components/calendar\";\nimport { useState, type ReactNode } from \"react\";\nimport { Calendar, type CalendarMonthAction } from \"./calendar.js\";\nimport { classNames, useControllableState } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type DateRangePickerProps<Content = unknown> = Readonly<{\n /** The same grid Calendar renders; the product still owns month data. */\n descriptor: Omit<CalendarDescriptor<Content>, \"selectedDate\" | \"defaultSelectedDate\" | \"onSelectionChange\">;\n composeAccessibleName: ComposeCalendarAccessibleName<Content>;\n value?: DateRangeValue;\n defaultValue?: DateRangeValue;\n onValueChange?: (value: DateRangeValue) => void;\n previousMonth?: CalendarMonthAction;\n nextMonth?: CalendarMonthAction;\n /** Localized suffixes appended to a day's name when it is a range edge. */\n rangeLabels: Readonly<{ start: string; end: string; between: string }>;\n renderCellContent?: (date: string) => ReactNode;\n className?: string;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport function DateRangePicker<Content = unknown>({\n descriptor,\n composeAccessibleName,\n value: controlledValue,\n defaultValue,\n onValueChange,\n previousMonth,\n nextMonth,\n rangeLabels,\n renderCellContent,\n className,\n layoutStyle,\n}: DateRangePickerProps<Content>) {\n const [value, setValue] = useControllableState<DateRangeValue>({\n ...(controlledValue === undefined ? {} : { value: controlledValue }),\n defaultValue: defaultValue ?? emptyDateRange,\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n validateDateRange(value);\n // The hovered date previews the not-yet-committed end through the same cell\n // state function the committed range uses.\n const [hovered, setHovered] = useState<string | null>(null);\n\n return (\n <div\n style={layoutStyle}\n className={classNames(\"hjm-date-range\", className)}\n data-selecting={value.start !== null && value.end === null ? \"\" : undefined}\n data-complete={isCompleteDateRange(value) || undefined}\n onMouseLeave={() => setHovered(null)}\n >\n <Calendar<Content>\n descriptor={{\n ...descriptor,\n // Calendar keeps single selection: the range's own edges are painted\n // through cell content and data attributes, not by lying to it.\n selectedDate: value.end ?? value.start,\n onSelectionChange: (date) => { if (date !== null) setValue(resolveDateRangeSelection(value, date)); },\n } as CalendarDescriptor<Content>}\n composeAccessibleName={(info) => {\n const state = resolveDateRangeCellState(value, info.date, hovered);\n const base = composeAccessibleName(info);\n return state === \"none\" ? base : `${base}, ${rangeLabels[state]}`;\n }}\n {...(previousMonth === undefined ? {} : { previousMonth })}\n {...(nextMonth === undefined ? {} : { nextMonth })}\n renderCellContent={(cell) => (\n <span\n className=\"hjm-date-range__cell\"\n data-range={resolveDateRangeCellState(value, cell.date, hovered)}\n onMouseEnter={() => setHovered(cell.date)}\n >\n {renderCellContent?.(cell.date) ?? null}\n </span>\n )}\n />\n </div>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design-profile.d.ts","sourceRoot":"","sources":["../src/design-profile.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"design-profile.d.ts","sourceRoot":"","sources":["../src/design-profile.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAOpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE/E,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC;IAC/E,KAAK,EAAE,SAAS,QAAQ,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,SAAS,CAAA;KAAE,CAAC,EAAE,CAAC;IAChE,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC,YAAY,CAAC,CAAC;IAC5D,mBAAmB,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC;CACnE,CAAC,CAAC;AAEH;;sFAEsF;AACtF,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,GAAG,MAAM,EAAE,EAAE,mBAAmB,+BA8BhL"}
|
package/dist/design-profile.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design-profile.js","sourceRoot":"","sources":["../src/design-profile.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"design-profile.js","sourceRoot":"","sources":["../src/design-profile.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,YAAY,EAA0B,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,8BAA8B,EAAE,kCAAkC,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAC1J,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAWhD;;sFAEsF;AACtF,MAAM,UAAU,cAAc,CAA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ScreenLayoutProps } from \"./screens.js\";\nimport { Collapsible } from \"./collapsible.js\";\nimport { EffectSurface } from \"./effect-surface.js\";\nimport { Grid, Stack, Surface } from \"./layout.js\";\nimport { useHjmTheme } from \"./provider.js\";\nimport { resolveDesignProfileCollection, resolveDesignProfileCollectionItem, overviewContentLayout } from \"@hjmds/design-contracts/design-profile-layout\";\nimport { Divider } from \"./advanced-display.js\";\nimport type { HjmDesignProfile } from \"@hjmds/design-contracts/design-profile\";\n\nexport type OverviewScreenProps = Omit<ScreenLayoutProps, \"children\"> & Readonly<{\n items: readonly Readonly<{ id: string; children: ReactNode }>[];\n toolbar?: ReactNode;\n toolbarLabel: string;\n collection?: HjmDesignProfile[\"compositions\"][\"collection\"];\n toolbarPresentation?: HjmDesignProfile[\"compositions\"][\"toolbar\"];\n}>;\n\n/** Optional collection screen; ScreenLayout still owns loading/error/scrolling.\n * Unlike settings/inbox it owns a profile-selected collection and persistent tools.\n * It never owns product mutations or chooses a different component for each theme. */\nexport function OverviewScreen({ items, toolbar, toolbarLabel, collection: suppliedCollection, toolbarPresentation: suppliedToolbarPresentation, ...screen }: OverviewScreenProps) {\n const { designProfile } = useHjmTheme();\n const collection = suppliedCollection ?? designProfile?.compositions.collection ?? \"rows\";\n const toolbarPresentation = suppliedToolbarPresentation ?? designProfile?.compositions.toolbar ?? \"inline\";\n const [toolsOpen, setToolsOpen] = useState(true);\n if (!toolbarLabel.trim()) throw new TypeError(\"Overview tools need a localized label\");\n const ids = new Set(items.map(item => item.id));\n if (ids.size !== items.length || items.some(item => !item.id.trim())) throw new TypeError(\"Overview items need unique stable ids\");\n // Retain the same effect/grid/surface subtree when the profile changes: optional\n // decoration can disappear without remounting fields, focus or local state.\n const itemLayout = resolveDesignProfileCollectionItem(collection);\n const canvas = designProfile?.material.canvas ?? { layers: [\"mesh\"] as const, intensity: 0, active: false };\n return <EffectSurface descriptor={canvas} radius=\"none\" layoutStyle={{ width: \"100%\" }}>\n <ScreenLayout {...screen}>\n {/* Tools and collection share one bounded column, so card edges line up with the field above them. The screen\n body is a block box on Web (scroll=\"screen\"), where alignSelf has no effect, so auto inline margins center it. */}\n <Stack gap=\"xl\" layoutStyle={{ ...overviewContentLayout, marginInline: \"auto\" }}>\n {toolbar ? <Collapsible trigger={toolbarLabel} open={toolsOpen} onOpenChange={setToolsOpen} presentation={toolbarPresentation === \"inline\" ? \"inline\" : \"disclosure\"} keepMounted>{toolbar}</Collapsible> : null}\n <Grid {...resolveDesignProfileCollection(collection)}>\n {/* The card Surface owns the rounded frame; the material layer sits in its padded content box, so a rounded\n effect clipped the first glyph of edge-aligned text (clay/glass, 2026-10-17 after EffectSurface radius default lg).\n The rule slot stays in place (null when unused) so switching collections never remounts item content. */}\n {items.map((item, index) => <Surface key={item.id} padding={itemLayout.padding} tone={itemLayout.tone} bordered={itemLayout.bordered} radius=\"lg\">\n {itemLayout.ruled && index > 0 ? <Divider decorative layoutStyle={{ marginBottom: itemLayout.ruleGap }} /> : null}\n <EffectSurface radius=\"none\" descriptor={designProfile?.material.card ?? { layers: [\"mesh\"], intensity: 0, active: false }} className=\"hjm-profile-card-effect\">{item.children}</EffectSurface>\n </Surface>)}\n </Grid>\n </Stack>\n </ScreenLayout>\n </EffectSurface>;\n}\n"]}
|
package/dist/display.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { listRowRecipe, type BadgeAdornmentContext, type BadgeSize, type BadgeTone, type BadgeVariant as ContractBadgeVariant, type ListRowDensity, type ListRowLeadingShape } from "@hjmds/design-contracts/recipes";
|
|
1
|
+
import { listRowRecipe, type BadgeAdornmentContext, type BadgeSize, type BadgeTone, type BadgeVariant as ContractBadgeVariant, type BadgeCategoryColor, type ListRowDensity, type ListRowLeadingShape, type ListRowTrailingAccessory } from "@hjmds/design-contracts/recipes";
|
|
2
2
|
import { type TagTone } from "@hjmds/design-contracts/components/tag";
|
|
3
3
|
import { type CardHeadingLevel } from "@hjmds/design-contracts/components/card";
|
|
4
4
|
import { type SurfacePadding, type SurfaceRadius, type SurfaceTone } from "@hjmds/design-contracts/recipes/base";
|
|
@@ -9,6 +9,11 @@ export type { TagTone } from "@hjmds/design-contracts/components/tag";
|
|
|
9
9
|
export type BadgeVariant = ContractBadgeVariant;
|
|
10
10
|
export type BadgeProps = HTMLAttributes<HTMLSpanElement> & Readonly<{
|
|
11
11
|
tone?: BadgeTone;
|
|
12
|
+
/**
|
|
13
|
+
* Product classification color per theme (series, grade…) in place of `tone`. HJM keeps the frame and picks the
|
|
14
|
+
* label ink; a color whose label cannot reach AA 4.5 throws instead of rendering unreadable.
|
|
15
|
+
*/
|
|
16
|
+
categoryColor?: BadgeCategoryColor;
|
|
12
17
|
size?: BadgeSize;
|
|
13
18
|
variant?: BadgeVariant;
|
|
14
19
|
leading?: ReactNode | ((context: BadgeAdornmentContext) => ReactNode);
|
|
@@ -18,6 +23,11 @@ export type BadgeProps = HTMLAttributes<HTMLSpanElement> & Readonly<{
|
|
|
18
23
|
}>;
|
|
19
24
|
export declare const Badge: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & Readonly<{
|
|
20
25
|
tone?: BadgeTone;
|
|
26
|
+
/**
|
|
27
|
+
* Product classification color per theme (series, grade…) in place of `tone`. HJM keeps the frame and picks the
|
|
28
|
+
* label ink; a color whose label cannot reach AA 4.5 throws instead of rendering unreadable.
|
|
29
|
+
*/
|
|
30
|
+
categoryColor?: BadgeCategoryColor;
|
|
21
31
|
size?: BadgeSize;
|
|
22
32
|
variant?: BadgeVariant;
|
|
23
33
|
leading?: ReactNode | ((context: BadgeAdornmentContext) => ReactNode);
|
|
@@ -143,6 +153,11 @@ export type ListRowProps = Omit<HTMLAttributes<HTMLElement>, "title" | "onClick"
|
|
|
143
153
|
description?: ReactNode;
|
|
144
154
|
leading?: ReactNode;
|
|
145
155
|
trailing?: ReactNode;
|
|
156
|
+
/**
|
|
157
|
+
* `disclosure`: the row opens another screen. HJM draws the decorative chevron after `trailing`, inside the row
|
|
158
|
+
* command (before any `trailingAction`), mirrored in RTL; size and color come from `listRowRecipe.accessories`.
|
|
159
|
+
*/
|
|
160
|
+
trailingAccessory?: ListRowTrailingAccessory;
|
|
146
161
|
/** Independent command outside the row's navigation target. */
|
|
147
162
|
trailingAction?: ReactNode;
|
|
148
163
|
/** Supply a framework Link without replacing the shared row layout. */
|
|
@@ -172,6 +187,11 @@ export declare const ListRow: import("react").ForwardRefExoticComponent<Omit<HTM
|
|
|
172
187
|
description?: ReactNode;
|
|
173
188
|
leading?: ReactNode;
|
|
174
189
|
trailing?: ReactNode;
|
|
190
|
+
/**
|
|
191
|
+
* `disclosure`: the row opens another screen. HJM draws the decorative chevron after `trailing`, inside the row
|
|
192
|
+
* command (before any `trailingAction`), mirrored in RTL; size and color come from `listRowRecipe.accessories`.
|
|
193
|
+
*/
|
|
194
|
+
trailingAccessory?: ListRowTrailingAccessory;
|
|
175
195
|
/** Independent command outside the row's navigation target. */
|
|
176
196
|
trailingAction?: ReactNode;
|
|
177
197
|
/** Supply a framework Link without replacing the shared row layout. */
|
package/dist/display.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../src/display.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../src/display.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,aAAa,EACb,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,YAAY,IAAI,oBAAoB,EAGzC,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC9B,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAEL,KAAK,OAAO,EACb,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,K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AAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;IACvC,4EAA4E;IAC9E,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACzC,CAAC,CAAC;AAEH,eAAO,MAAM,OAAO;WAlCT,SAAS;kBACF,SAAS;cACb,SAAS;eACR,SAAS;IACpB;;;OAGG;wBACiB,wBAAwB;IAC5C,+DAA+D;qBAC9C,SAAS;IAC1B,uEAAuE;iBAC1D,CAAC,KAAK,EAAE,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,KAAK,SAAS;cACzD,cAAc;IACxB,mFAAmF;WAC5E,MAAM,OAAO,aAAa,CAAC,KAAK;IACvC,2EAA2E;mBAC5D,mBAAmB;eACvB,OAAO;eACP,OAAO;IAClB;;;;OAIG;cACO,OAAO;IACjB,uDAAuD;mBACxC,MAAM;WACd,MAAM;cACH,iBAAiB,CAAC,WAAW,CAAC;IACtC,4EAA4E;kBAChE,uBAAuB;gDAgIvC,CAAC"}
|
package/dist/display.js
CHANGED
|
@@ -1,15 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { badgeRecipe, listRowRecipe, } from "@hjmds/design-contracts/recipes";
|
|
3
|
+
import { badgeRecipe, listRowRecipe, resolveBadgeCategoryColor, validateListRowTrailingAccessory, } from "@hjmds/design-contracts/recipes";
|
|
4
|
+
import { THEMES } from "@hjmds/design-contracts/colors";
|
|
5
|
+
import { glyph } from "@hjmds/design-contracts/foundations";
|
|
3
6
|
import { resolveTagDescriptor, } from "@hjmds/design-contracts/components/tag";
|
|
4
7
|
import { cardRecipe, } from "@hjmds/design-contracts/components/card";
|
|
5
8
|
import { surfaceGeometry, } from "@hjmds/design-contracts/recipes/base";
|
|
6
9
|
import { createElement, forwardRef, } from "react";
|
|
7
10
|
import { classNames } from "./internal.js";
|
|
8
|
-
import { useHjmDensityDefault } from "./provider.js";
|
|
11
|
+
import { useHjmDensityDefault, useOptionalHjmTheme } from "./provider.js";
|
|
9
12
|
import { Surface, Text } from "./layout.js";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
import { Icon } from "./supplemental-display.js";
|
|
14
|
+
export const Badge = forwardRef(function Badge({ tone: toneProp, categoryColor, size = badgeRecipe.defaults.size, variant = badgeRecipe.defaults.variant, leading, trailing, className, children, layoutStyle, style, ...props }, ref) {
|
|
15
|
+
if (categoryColor !== undefined && toneProp !== undefined)
|
|
16
|
+
throw new TypeError("Badge takes either tone or categoryColor, not both");
|
|
17
|
+
const tone = toneProp ?? badgeRecipe.defaults.tone;
|
|
18
|
+
// Outside a provider the stylesheet paints the light palette, so the category resolves against it too.
|
|
19
|
+
const theme = useOptionalHjmTheme();
|
|
20
|
+
const category = categoryColor === undefined ? null : resolveBadgeCategoryColor(categoryColor, {
|
|
21
|
+
theme: theme?.environment.theme ?? "light",
|
|
22
|
+
variant,
|
|
23
|
+
palette: theme?.palette.theme ?? THEMES.light,
|
|
24
|
+
});
|
|
25
|
+
const iconContext = { color: "currentColor", size: badgeRecipe.sizes[size].iconSize, strokeWidth: badgeRecipe.iconStrokeWidth };
|
|
26
|
+
return (_jsxs("span", { ...props, style: {
|
|
27
|
+
...style,
|
|
28
|
+
...(category ? {
|
|
29
|
+
"--hjm-badge-category-content": category.content,
|
|
30
|
+
"--hjm-badge-category-background": category.background ?? "transparent",
|
|
31
|
+
"--hjm-badge-category-border": category.border ?? "transparent",
|
|
32
|
+
} : {}),
|
|
33
|
+
...layoutStyle,
|
|
34
|
+
}, ref: ref, className: classNames("hjm-badge", className), "data-tone": category ? "category" : tone, "data-size": size, "data-variant": variant, children: [leading === undefined ? null : (_jsx("span", { "aria-hidden": "true", className: "hjm-badge__icon", children: typeof leading === "function" ? leading(iconContext) : leading })), _jsx("span", { className: "hjm-badge__label", children: children }), trailing === undefined ? null : (_jsx("span", { "aria-hidden": "true", className: "hjm-badge__icon", children: typeof trailing === "function" ? trailing(iconContext) : trailing }))] }));
|
|
13
35
|
});
|
|
14
36
|
export const Tag = forwardRef(function Tag({ children, tone, className, layoutStyle, style, ...props }, ref) {
|
|
15
37
|
const descriptor = resolveTagDescriptor({
|
|
@@ -59,7 +81,7 @@ selected, onActivate, href, renderLink, disabled = false, tone = cardRecipe.defa
|
|
|
59
81
|
export function QuoteCard({ children, attribution, renderMark, ...props }) {
|
|
60
82
|
return _jsx(Card, { ...props, leading: _jsx("span", { className: "hjm-quote-card__mark", "aria-hidden": "true", children: renderMark?.({ color: "currentColor", size: cardRecipe.quotation.markSize }) ?? "“" }), children: _jsxs("blockquote", { className: "hjm-quote-card__body", children: [children, attribution === undefined ? null : _jsx("footer", { children: _jsx(Text, { variant: "caption", tone: "muted", children: attribution }) })] }) });
|
|
61
83
|
}
|
|
62
|
-
export const ListRow = forwardRef(function ListRow({ title, description, leading, trailing, trailingAction, renderLink, density: densityProp, tone = listRowRecipe.defaults.tone, leadingShape = "square", selected, disabled = false, loading = false, loadingLabel, href, onClick, className, layoutStyle, style, ...props }, ref) {
|
|
84
|
+
export const ListRow = forwardRef(function ListRow({ title, description, leading, trailing, trailingAccessory = listRowRecipe.defaults.trailingAccessory, trailingAction, renderLink, density: densityProp, tone = listRowRecipe.defaults.tone, leadingShape = "square", selected, disabled = false, loading = false, loadingLabel, href, onClick, className, layoutStyle, style, ...props }, ref) {
|
|
63
85
|
// The hook runs unconditionally — `??` would short-circuit it and break the
|
|
64
86
|
// rules of hooks on the very first row that passes `density`.
|
|
65
87
|
const densityDefault = useHjmDensityDefault({
|
|
@@ -67,9 +89,11 @@ export const ListRow = forwardRef(function ListRow({ title, description, leading
|
|
|
67
89
|
compact: "compact",
|
|
68
90
|
});
|
|
69
91
|
const density = densityProp ?? densityDefault;
|
|
92
|
+
validateListRowTrailingAccessory(trailingAccessory);
|
|
93
|
+
const accessory = trailingAccessory === "none" ? null : listRowRecipe.accessories[trailingAccessory];
|
|
70
94
|
if (loading) {
|
|
71
95
|
// A loading row is never interactive: there is nothing to activate yet.
|
|
72
|
-
return (_jsxs("div", { ...props, ref: ref, role: loadingLabel ? "status" : undefined, "aria-busy": loadingLabel ? true : undefined, "aria-hidden": loadingLabel ? undefined : true, "aria-label": loadingLabel, className: classNames("hjm-list-row", "hjm-list-row--loading", className), "data-density": density, "data-leading": leading ? "" : undefined, "data-lines": description ? "two" : "one", "data-state": "loading", style: { ...style, ...layoutStyle }, children: [leading ? _jsx("span", { className: "hjm-list-row__leading", "data-shape": leadingShape, "data-placeholder": "" }) : null, _jsxs("span", { className: "hjm-list-row__content", children: [_jsx("span", { className: "hjm-list-row__title", "data-placeholder": "", style: { width: `${listRowRecipe.loading.titleWidthPercent}%` } }), description ? _jsx("span", { className: "hjm-list-row__description", "data-placeholder": "", style: { width: `${listRowRecipe.loading.descriptionWidthPercent}%` } }) : null] }), trailing ? _jsx("span", { className: "hjm-list-row__trailing", "data-placeholder": "", style: { width: listRowRecipe.loading.trailingWidth } }) : null] }));
|
|
96
|
+
return (_jsxs("div", { ...props, ref: ref, role: loadingLabel ? "status" : undefined, "aria-busy": loadingLabel ? true : undefined, "aria-hidden": loadingLabel ? undefined : true, "aria-label": loadingLabel, className: classNames("hjm-list-row", "hjm-list-row--loading", className), "data-density": density, "data-leading": leading ? "" : undefined, "data-lines": description ? "two" : "one", "data-state": "loading", style: { ...style, ...layoutStyle }, children: [leading ? _jsx("span", { className: "hjm-list-row__leading", "data-shape": leadingShape, "data-placeholder": "" }) : null, _jsxs("span", { className: "hjm-list-row__content", children: [_jsx("span", { className: "hjm-list-row__title", "data-placeholder": "", style: { width: `${listRowRecipe.loading.titleWidthPercent}%` } }), description ? _jsx("span", { className: "hjm-list-row__description", "data-placeholder": "", style: { width: `${listRowRecipe.loading.descriptionWidthPercent}%` } }) : null] }), trailing ? _jsx("span", { className: "hjm-list-row__trailing", "data-placeholder": "", style: { width: listRowRecipe.loading.trailingWidth } }) : null, accessory ? _jsx("span", { className: "hjm-list-row__accessory", "data-accessory": trailingAccessory, style: { inlineSize: glyph[accessory.glyph], blockSize: glyph[accessory.glyph] } }) : null] }));
|
|
73
97
|
}
|
|
74
98
|
const element = href ? "a" : onClick ? "button" : "div";
|
|
75
99
|
const interactiveProps = href
|
|
@@ -106,7 +130,9 @@ export const ListRow = forwardRef(function ListRow({ title, description, leading
|
|
|
106
130
|
style: trailingAction ? style : { ...style, ...layoutStyle },
|
|
107
131
|
}, leading
|
|
108
132
|
? _jsx("span", { className: "hjm-list-row__leading", "data-shape": leadingShape, children: leading })
|
|
109
|
-
: null, _jsxs("span", { className: "hjm-list-row__content", children: [_jsx("span", { className: "hjm-list-row__title", children: title }), description ? (_jsx("span", { className: "hjm-list-row__description", children: description })) : null] }), trailing ? _jsx("span", { className: "hjm-list-row__trailing", children: trailing }) : null
|
|
133
|
+
: null, _jsxs("span", { className: "hjm-list-row__content", children: [_jsx("span", { className: "hjm-list-row__title", children: title }), description ? (_jsx("span", { className: "hjm-list-row__description", children: description })) : null] }), trailing ? _jsx("span", { className: "hjm-list-row__trailing", children: trailing }) : null, accessory
|
|
134
|
+
? _jsx("span", { className: "hjm-list-row__accessory", "data-accessory": trailingAccessory, "aria-hidden": "true", children: _jsx(Icon, { name: accessory.icon, size: accessory.glyph, weight: accessory.weight }) })
|
|
135
|
+
: null);
|
|
110
136
|
const linked = href && renderLink ? renderLink(row.props) : row;
|
|
111
137
|
// The frame owns the row surface and its bleed so the command and the separate action share one fill, as Native;
|
|
112
138
|
// the action stays outside the link/button (styles.css `.hjm-list-row-frame`).
|
package/dist/display.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.js","sourceRoot":"","sources":["../src/display.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,WAAW,EACX,aAAa,GAOd,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,oBAAoB,GAErB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,U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AA4E;QAC5E,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,GAAG,WAAW,EAAE;KAC7D,EACD,OAAO;QACL,CAAC,CAAC,eAAM,SAAS,EAAC,uBAAuB,gBAAa,YAAY,YAAG,OAAO,GAAQ;QACpF,CAAC,CAAC,IAAI,EACR,gBAAM,SAAS,EAAC,uBAAuB,aACrC,eAAM,SAAS,EAAC,qBAAqB,YAAE,KAAK,GAAQ,EACnD,WAAW,CAAC,CAAC,CAAC,CACb,eAAM,SAAS,EAAC,2BAA2B,YAAE,WAAW,GAAQ,CACjE,CAAC,CAAC,CAAC,IAAI,IACH,EACP,QAAQ,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,wBAAwB,YAAE,QAAQ,GAAQ,CAAC,CAAC,CAAC,IAAI,CAC7E,CAAC;IACF,MAAM,MAAM,GAAG,IAAI,IAAI,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,KAAyC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IACpG,iHAAiH;IACjH,+EAA+E;IAC/E,OAAO,cAAc,CAAC,CAAC,CAAC,CACtB,eAAK,SAAS,EAAC,oBAAoB,kBAAe,OAAO,kBAAgB,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,gBACnF,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,WAAW,aACrF,MAAM,EACP,cAAK,SAAS,EAAC,sBAAsB,YAAE,cAAc,GAAO,IACxD,CACP,CAAC,CAAC,CAAC,MAAM,CAAC;AACb,CAAC,CAAC,CAAC","sourcesContent":["import {\n badgeRecipe,\n listRowRecipe,\n type BadgeAdornmentContext,\n type BadgeSize,\n type BadgeTone,\n type BadgeVariant as ContractBadgeVariant,\n type ListRowDensity,\n type ListRowLeadingShape,\n} from \"@hjmds/design-contracts/recipes\";\nimport {\n resolveTagDescriptor,\n type TagTone,\n} from \"@hjmds/design-contracts/components/tag\";\nimport {\n cardRecipe,\n type CardHeadingLevel,\n} from \"@hjmds/design-contracts/components/card\";\nimport {\n surfaceGeometry,\n type SurfacePadding,\n type SurfaceRadius,\n type SurfaceTone,\n} from \"@hjmds/design-contracts/recipes/base\";\nimport {\n createElement,\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type MouseEventHandler,\n type ReactNode,\n} from \"react\";\nimport { classNames } from \"./internal.js\";\nimport { useHjmDensityDefault } from \"./provider.js\";\nimport { Surface, Text } from \"./layout.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type { CardHeadingLevel } from \"@hjmds/design-contracts/components/card\";\nexport type { TagTone } from \"@hjmds/design-contracts/components/tag\";\nexport type BadgeVariant = ContractBadgeVariant;\n\nexport type BadgeProps = HTMLAttributes<HTMLSpanElement> &\n Readonly<{\n tone?: BadgeTone;\n size?: BadgeSize;\n variant?: BadgeVariant;\n leading?: ReactNode | ((context: BadgeAdornmentContext) => ReactNode);\n trailing?: ReactNode | ((context: BadgeAdornmentContext) => ReactNode);\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\n {\n tone = badgeRecipe.defaults.tone,\n size = badgeRecipe.defaults.size,\n variant = badgeRecipe.defaults.variant,\n leading,\n trailing,\n className,\n children,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n const iconContext = { color: \"currentColor\", size: badgeRecipe.sizes[size].iconSize };\n return (\n <span\n {...props}\n style={{ ...style, ...layoutStyle }}\n ref={ref}\n className={classNames(\"hjm-badge\", className)}\n data-tone={tone}\n data-size={size}\n data-variant={variant}\n >\n {leading === undefined ? null : (\n <span aria-hidden=\"true\" className=\"hjm-badge__icon\">\n {typeof leading === \"function\" ? leading(iconContext) : leading}\n </span>\n )}\n <span className=\"hjm-badge__label\">{children}</span>\n {trailing === undefined ? null : (\n <span aria-hidden=\"true\" className=\"hjm-badge__icon\">{typeof trailing === \"function\" ? trailing(iconContext) : trailing}</span>\n )}\n </span>\n );\n});\n\nexport type TagProps = Omit<HTMLAttributes<HTMLSpanElement>, \"children\"> &\n Readonly<{\n children: string;\n tone?: TagTone;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Tag = forwardRef<HTMLSpanElement, TagProps>(function Tag(\n { children, tone, className, layoutStyle, style, ...props },\n ref,\n) {\n const descriptor = resolveTagDescriptor({\n label: children,\n ...(tone === undefined ? {} : { tone }),\n });\n return (\n <span\n {...props}\n style={{ ...style, ...layoutStyle }}\n ref={ref}\n className={classNames(\"hjm-tag\", className)}\n data-tone={descriptor.tone}\n >\n <span className=\"hjm-tag__label\">{descriptor.label}</span>\n </span>\n );\n});\n\nexport type CardProps = Omit<HTMLAttributes<HTMLElement>, \"title\"> &\n Readonly<{\n title?: ReactNode;\n description?: ReactNode;\n leading?: ReactNode;\n media?: ReactNode;\n /** Decorative artwork behind the shared body/actions; its host determines the available height. */\n backgroundMedia?: ReactNode;\n /** Platform gesture/accessibility host behind content. Requires backgroundMedia; never put metadata/actions here. */\n backgroundInteraction?: ReactNode;\n /** Non-interactive cover classification at the shared top/end inset. Requires backgroundMedia. */\n mediaBadges?: ReactNode;\n badges?: ReactNode;\n /** Centre short metadata beneath artwork without product-owned badge layout. */\n badgesAlign?: \"start\" | \"center\";\n /** Activate only the passive cover; other card content/actions keep independent targets. */\n mediaAction?: Readonly<{ label: string; onActivate(): void; icon?: (context: Readonly<{ color: string; size: number }>) => ReactNode }>;\n actions?: ReactNode;\n /** Independent commands at the header end; never nested in whole-card activation. */\n headerActions?: ReactNode;\n headingLevel?: CardHeadingLevel;\n selected?: boolean;\n /**\n * Whole-card activation. With `actions`, the card stays an article and a separate full-card button sits under the\n * action region, so actions remain independent buttons (never a button inside a button). Keep other children passive.\n */\n onActivate?: () => void;\n /** A native anchor preserves new-tab, copy-link and browser previews; it is exclusive with onActivate. */\n href?: string;\n /** Framework routing and product effects can wrap the shared anchor without replacing its placement. */\n renderLink?: (props: React.ComponentPropsWithRef<\"a\">) => ReactNode;\n disabled?: boolean;\n tone?: SurfaceTone;\n bordered?: boolean;\n padding?: SurfacePadding;\n radius?: SurfaceRadius;\n /** Canonical layout-only placement; forwarded to the root Surface, which applies it. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\nexport const Card = forwardRef<HTMLElement, CardProps>(function Card(\n {\n title,\n description,\n leading,\n media,\n backgroundMedia,\n backgroundInteraction,\n mediaBadges,\n badges,\n badgesAlign = cardRecipe.defaults.badgesAlign,\n mediaAction,\n actions,\n headerActions,\n headingLevel = cardRecipe.defaults.headingLevel,\n // An omitted selection is an ordinary action, not an unpressed toggle.\n selected,\n onActivate, href, renderLink,\n disabled = false,\n tone = cardRecipe.defaults.tone,\n bordered = cardRecipe.defaults.bordered,\n padding = cardRecipe.defaults.padding,\n radius,\n className,\n children,\n ...props\n },\n ref,\n) {\n if (href !== undefined && (!href.trim() || onActivate)) throw new TypeError(\"Card href requires a destination and cannot combine with onActivate\");\n if (renderLink && href === undefined) throw new TypeError(\"Card renderLink requires href\");\n if ((onActivate || href !== undefined) && !props[\"aria-label\"]?.trim()) {\n throw new TypeError(\"Interactive Card requires aria-label\");\n }\n if (mediaAction && (onActivate || href !== undefined || !media || !mediaAction.label.trim())) throw new TypeError(\"Card mediaAction requires passive media, a label, and no whole-card activation\");\n if (backgroundMedia && (media || mediaAction || onActivate || href !== undefined)) throw new TypeError(\"Card backgroundMedia is decorative and cannot combine with media, mediaAction, onActivate or href\");\n if ((backgroundInteraction !== undefined || mediaBadges !== undefined) && !backgroundMedia) throw new TypeError(\"Card backgroundInteraction/mediaBadges require backgroundMedia\");\n const hasHeader =\n leading !== undefined || title !== undefined || description !== undefined || headerActions !== undefined;\n // Whole-card open plus separate commands (2026-10-18 unairplane journey card: open + delete). A root button cannot\n // contain the action buttons, so the root stays an article and an overlay button carries the card's name and state.\n const overlay = href !== undefined || (onActivate !== undefined && Boolean(actions || headerActions));\n const { \"aria-label\": activationLabel, ...rootProps } = props;\n const activate = () => { if (!disabled) onActivate?.(); };\n\n const linkProps: React.ComponentPropsWithRef<\"a\"> = {\n href: disabled ? undefined : href, role: \"link\", className: \"hjm-card__activator\",\n \"aria-label\": activationLabel, \"aria-disabled\": disabled || undefined, tabIndex: disabled ? -1 : undefined,\n };\n // Link activation belongs to the shared card; a product-owned stretched link was its own second layout (Diairy).\n const destination = href === undefined ? null : !disabled && renderLink ? renderLink(linkProps) : <a {...linkProps} />;\n return (\n <Surface\n {...(overlay ? rootProps : props)}\n ref={ref}\n as={onActivate && !overlay ? \"button\" : \"article\"}\n {...(onActivate && !overlay ? {\n type: \"button\" as const, disabled, \"aria-pressed\": selected,\n \"data-interactive\": true, onClick: activate,\n } : {})}\n {...(overlay ? { \"data-activation\": \"overlay\" } : {})}\n tone={selected ? cardRecipe.selectedTone : tone}\n bordered={bordered}\n {...(radius === undefined ? {} : { radius })}\n className={classNames(\"hjm-card\", className)}\n data-background-media={backgroundMedia ? true : undefined}\n data-state={(onActivate || href !== undefined || mediaAction) && disabled ? \"disabled\" : selected ? \"selected\" : \"idle\"}\n style={{ \"--hjm-card-background-scrim\": cardRecipe.backgroundMedia.scrim, \"--hjm-card-background-foreground\": cardRecipe.backgroundMedia.foreground, \"--hjm-card-disabled-opacity\": cardRecipe.interaction.disabledOpacity,\n \"--hjm-card-pressed-opacity\": cardRecipe.interaction.pressedOpacity, ...props.style } as CSSProperties}\n >\n {backgroundMedia ? <div className=\"hjm-card__background\" aria-hidden=\"true\">{backgroundMedia}<span className=\"hjm-card__scrim\" /></div> : null}\n {backgroundInteraction === undefined ? null : <div className=\"hjm-card__background-interaction\" data-slot=\"background-interaction\">{backgroundInteraction}</div>}\n {mediaBadges === undefined ? null : <div className=\"hjm-card__media-badges\" data-slot=\"media-badges\">{mediaBadges}</div>}\n {media ? <div className=\"hjm-card__media\" data-slot=\"media\">{mediaAction ? <button type=\"button\" className=\"hjm-card__media-action\" aria-label={mediaAction.label} disabled={disabled} onClick={() => { if (!disabled) mediaAction.onActivate(); }}>\n {media}\n {mediaAction.icon ? <span className=\"hjm-card__media-icon\" aria-hidden=\"true\" style={{ insetInlineEnd: cardRecipe.mediaAction.inset, insetBlockEnd: cardRecipe.mediaAction.inset, width: cardRecipe.mediaAction.diameter, height: cardRecipe.mediaAction.diameter }}>{mediaAction.icon({ color: \"currentColor\", size: cardRecipe.mediaAction.iconSize })}</span> : null}\n </button> : media}</div> : null}\n <div\n className=\"hjm-card__body\"\n data-slot=\"body\"\n style={{ padding: surfaceGeometry.paddings[padding] }}\n >\n {badges === undefined ? null : <div className=\"hjm-card__badges\" data-slot=\"badges\" data-align={badgesAlign}>{badges}</div>}\n {hasHeader ? (\n <div className=\"hjm-card__header\" data-slot=\"header\">\n {leading === undefined ? null : (\n <span className=\"hjm-card__leading\" data-slot=\"leading\">\n {leading}\n </span>\n )}\n <div className=\"hjm-card__copy\">\n {title === undefined\n ? null\n : createElement(\n `h${headingLevel}`,\n { className: \"hjm-card__title\", \"data-slot\": \"title\" },\n title,\n )}\n {description === undefined ? null : (\n <Text\n as=\"p\"\n tone=\"muted\"\n className=\"hjm-card__description\"\n data-slot=\"description\"\n >\n {description}\n </Text>\n )}\n </div>\n {headerActions === undefined ? null : <div className=\"hjm-card__header-actions\" data-slot=\"header-actions\">{headerActions}</div>}\n </div>\n ) : null}\n {children === undefined ? null : (\n <div className=\"hjm-card__content\" data-slot=\"content\">{children}</div>\n )}\n </div>\n {destination}\n {overlay && href === undefined ? (\n <button\n type=\"button\"\n className=\"hjm-card__activator\"\n data-slot=\"activator\"\n aria-label={activationLabel}\n aria-pressed={selected}\n disabled={disabled}\n onClick={activate}\n />\n ) : null}\n {actions ? <div className=\"hjm-card__actions\" data-slot=\"actions\">{actions}</div> : null}\n </Surface>\n );\n});\n\n/** An attributed quotation reuses Card material while keeping quotation semantics and its caption together. */\nexport type QuoteCardProps = Omit<HTMLAttributes<HTMLElement>, \"children\" | \"title\"> & Readonly<{\n children: ReactNode;\n attribution?: string;\n renderMark?: (context: { color: string; size: number }) => ReactNode;\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport function QuoteCard({ children, attribution, renderMark, ...props }: QuoteCardProps) {\n return <Card {...props} leading={<span className=\"hjm-quote-card__mark\" aria-hidden=\"true\">{renderMark?.({ color: \"currentColor\", size: cardRecipe.quotation.markSize }) ?? \"“\"}</span>}>\n <blockquote className=\"hjm-quote-card__body\">\n {children}\n {attribution === undefined ? null : <footer><Text variant=\"caption\" tone=\"muted\">{attribution}</Text></footer>}\n </blockquote>\n </Card>;\n}\n\nexport type ListRowProps = Omit<HTMLAttributes<HTMLElement>, \"title\" | \"onClick\"> &\n Readonly<{\n title: ReactNode;\n description?: ReactNode;\n leading?: ReactNode;\n trailing?: ReactNode;\n /** Independent command outside the row's navigation target. */\n trailingAction?: ReactNode;\n /** Supply a framework Link without replacing the shared row layout. */\n renderLink?: (props: React.ComponentPropsWithRef<\"a\">) => ReactNode;\n density?: ListRowDensity;\n /** Semantic emphasis for destructive destinations; selection stays independent. */\n tone?: keyof typeof listRowRecipe.tones;\n /** Frame the ListRow paints around `leading`; the recipe owns its size. */\n leadingShape?: ListRowLeadingShape;\n selected?: boolean;\n disabled?: boolean;\n /**\n * Placeholder row while the real one loads. It keeps the row's own height\n * and slot geometry, so a list does not jump when the content arrives —\n * which is exactly what a product-owned skeleton next to the list cannot do.\n */\n loading?: boolean;\n /** Localized status text announced while `loading`. */\n loadingLabel?: string;\n href?: string;\n onClick?: MouseEventHandler<HTMLElement>;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const ListRow = forwardRef<HTMLElement, ListRowProps>(function ListRow(\n {\n title,\n description,\n leading,\n trailing,\n trailingAction,\n renderLink,\n density: densityProp,\n tone = listRowRecipe.defaults.tone,\n leadingShape = \"square\",\n selected,\n disabled = false,\n loading = false,\n loadingLabel,\n href,\n onClick,\n className,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n // The hook runs unconditionally — `??` would short-circuit it and break the\n // rules of hooks on the very first row that passes `density`.\n const densityDefault = useHjmDensityDefault({\n comfortable: listRowRecipe.defaults.density,\n compact: \"compact\",\n });\n const density = densityProp ?? densityDefault;\n if (loading) {\n // A loading row is never interactive: there is nothing to activate yet.\n return (\n <div\n {...props}\n ref={ref as React.Ref<HTMLDivElement>}\n role={loadingLabel ? \"status\" : undefined}\n aria-busy={loadingLabel ? true : undefined}\n aria-hidden={loadingLabel ? undefined : true}\n aria-label={loadingLabel}\n className={classNames(\"hjm-list-row\", \"hjm-list-row--loading\", className)}\n data-density={density}\n data-leading={leading ? \"\" : undefined}\n data-lines={description ? \"two\" : \"one\"}\n data-state=\"loading\"\n style={{ ...style, ...layoutStyle }}\n >\n {leading ? <span className=\"hjm-list-row__leading\" data-shape={leadingShape} data-placeholder=\"\" /> : null}\n <span className=\"hjm-list-row__content\">\n <span className=\"hjm-list-row__title\" data-placeholder=\"\" style={{ width: `${listRowRecipe.loading.titleWidthPercent}%` }} />\n {description ? <span className=\"hjm-list-row__description\" data-placeholder=\"\" style={{ width: `${listRowRecipe.loading.descriptionWidthPercent}%` }} /> : null}\n </span>\n {trailing ? <span className=\"hjm-list-row__trailing\" data-placeholder=\"\" style={{ width: listRowRecipe.loading.trailingWidth }} /> : null}\n </div>\n );\n }\n const element = href ? \"a\" : onClick ? \"button\" : \"div\";\n const interactiveProps = href\n ? {\n href: disabled ? undefined : href,\n \"aria-current\": selected ? (\"page\" as const) : undefined,\n \"aria-disabled\": disabled || undefined,\n tabIndex: disabled ? -1 : undefined,\n }\n : onClick\n ? {\n type: \"button\" as const,\n onClick: disabled ? undefined : onClick,\n disabled,\n \"aria-pressed\": selected,\n }\n : {};\n\n const row = createElement(\n element,\n {\n ...props,\n ...interactiveProps,\n ref,\n className: classNames(\"hjm-list-row\", className),\n \"data-density\": density,\n // Exposes the text column to the enclosing List: its indented separator starts after the leading frame\n // (listRecipe.separators.indented.leadingInsetStart) only when this row has one.\n \"data-leading\": leading ? \"\" : undefined,\n \"data-tone\": tone,\n // One- and two-line rows have different minimum heights in the recipe;\n // the web renderer used a single hardcoded value until now.\n \"data-lines\": description ? \"two\" : \"one\",\n \"data-state\": disabled ? \"disabled\" : selected ? \"selected\" : \"idle\",\n // Placement wins over the legacy `style`, matching Surface's ordering.\n // With trailingAction the frame is the placed root, as Native's outer View.\n style: trailingAction ? style : { ...style, ...layoutStyle },\n },\n leading\n ? <span className=\"hjm-list-row__leading\" data-shape={leadingShape}>{leading}</span>\n : null,\n <span className=\"hjm-list-row__content\">\n <span className=\"hjm-list-row__title\">{title}</span>\n {description ? (\n <span className=\"hjm-list-row__description\">{description}</span>\n ) : null}\n </span>,\n trailing ? <span className=\"hjm-list-row__trailing\">{trailing}</span> : null,\n );\n const linked = href && renderLink ? renderLink(row.props as React.ComponentPropsWithRef<\"a\">) : row;\n // The frame owns the row surface and its bleed so the command and the separate action share one fill, as Native;\n // the action stays outside the link/button (styles.css `.hjm-list-row-frame`).\n return trailingAction ? (\n <div className=\"hjm-list-row-frame\" data-density={density} data-leading={leading ? \"\" : undefined}\n data-state={disabled ? \"disabled\" : selected ? \"selected\" : \"idle\"} style={layoutStyle}>\n {linked}\n <div className=\"hjm-list-row__action\">{trailingAction}</div>\n </div>\n ) : linked;\n});\n"]}
|
|
1
|
+
{"version":3,"file":"display.js","sourceRoot":"","sources":["../src/display.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EACL,WAAW,EACX,aAAa,EAKb,yBAAyB,EACzB,gCAAgC,GAKjC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,KA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Ae,OAAO,kBAAgB,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,gBACnF,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,WAAW,aACrF,MAAM,EACP,cAAK,SAAS,EAAC,sBAAsB,YAAE,cAAc,GAAO,IACxD,CACP,CAAC,CAAC,CAAC,MAAM,CAAC;AACb,CAAC,CAAC,CAAC","sourcesContent":["\"use client\";\n\nimport {\n badgeRecipe,\n listRowRecipe,\n type BadgeAdornmentContext,\n type BadgeSize,\n type BadgeTone,\n type BadgeVariant as ContractBadgeVariant,\n resolveBadgeCategoryColor,\n validateListRowTrailingAccessory,\n type BadgeCategoryColor,\n type ListRowDensity,\n type ListRowLeadingShape,\n type ListRowTrailingAccessory,\n} from \"@hjmds/design-contracts/recipes\";\nimport { THEMES } from \"@hjmds/design-contracts/colors\";\nimport { glyph } from \"@hjmds/design-contracts/foundations\";\nimport {\n resolveTagDescriptor,\n type TagTone,\n} from \"@hjmds/design-contracts/components/tag\";\nimport {\n cardRecipe,\n type CardHeadingLevel,\n} from \"@hjmds/design-contracts/components/card\";\nimport {\n surfaceGeometry,\n type SurfacePadding,\n type SurfaceRadius,\n type SurfaceTone,\n} from \"@hjmds/design-contracts/recipes/base\";\nimport {\n createElement,\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type MouseEventHandler,\n type ReactNode,\n} from \"react\";\nimport { classNames } from \"./internal.js\";\nimport { useHjmDensityDefault, useOptionalHjmTheme } from \"./provider.js\";\nimport { Surface, Text } from \"./layout.js\";\nimport { Icon } from \"./supplemental-display.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type { CardHeadingLevel } from \"@hjmds/design-contracts/components/card\";\nexport type { TagTone } from \"@hjmds/design-contracts/components/tag\";\nexport type BadgeVariant = ContractBadgeVariant;\n\nexport type BadgeProps = HTMLAttributes<HTMLSpanElement> &\n Readonly<{\n tone?: BadgeTone;\n /**\n * Product classification color per theme (series, grade…) in place of `tone`. HJM keeps the frame and picks the\n * label ink; a color whose label cannot reach AA 4.5 throws instead of rendering unreadable.\n */\n categoryColor?: BadgeCategoryColor;\n size?: BadgeSize;\n variant?: BadgeVariant;\n leading?: ReactNode | ((context: BadgeAdornmentContext) => ReactNode);\n trailing?: ReactNode | ((context: BadgeAdornmentContext) => ReactNode);\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\n {\n tone: toneProp,\n categoryColor,\n size = badgeRecipe.defaults.size,\n variant = badgeRecipe.defaults.variant,\n leading,\n trailing,\n className,\n children,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n if (categoryColor !== undefined && toneProp !== undefined) throw new TypeError(\"Badge takes either tone or categoryColor, not both\");\n const tone = toneProp ?? badgeRecipe.defaults.tone;\n // Outside a provider the stylesheet paints the light palette, so the category resolves against it too.\n const theme = useOptionalHjmTheme();\n const category = categoryColor === undefined ? null : resolveBadgeCategoryColor(categoryColor, {\n theme: theme?.environment.theme ?? \"light\",\n variant,\n palette: theme?.palette.theme ?? THEMES.light,\n });\n const iconContext = { color: \"currentColor\", size: badgeRecipe.sizes[size].iconSize, strokeWidth: badgeRecipe.iconStrokeWidth };\n return (\n <span\n {...props}\n style={{\n ...style,\n ...(category ? {\n \"--hjm-badge-category-content\": category.content,\n \"--hjm-badge-category-background\": category.background ?? \"transparent\",\n \"--hjm-badge-category-border\": category.border ?? \"transparent\",\n } as CSSProperties : {}),\n ...layoutStyle,\n }}\n ref={ref}\n className={classNames(\"hjm-badge\", className)}\n data-tone={category ? \"category\" : tone}\n data-size={size}\n data-variant={variant}\n >\n {leading === undefined ? null : (\n <span aria-hidden=\"true\" className=\"hjm-badge__icon\">\n {typeof leading === \"function\" ? leading(iconContext) : leading}\n </span>\n )}\n <span className=\"hjm-badge__label\">{children}</span>\n {trailing === undefined ? null : (\n <span aria-hidden=\"true\" className=\"hjm-badge__icon\">{typeof trailing === \"function\" ? trailing(iconContext) : trailing}</span>\n )}\n </span>\n );\n});\n\nexport type TagProps = Omit<HTMLAttributes<HTMLSpanElement>, \"children\"> &\n Readonly<{\n children: string;\n tone?: TagTone;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Tag = forwardRef<HTMLSpanElement, TagProps>(function Tag(\n { children, tone, className, layoutStyle, style, ...props },\n ref,\n) {\n const descriptor = resolveTagDescriptor({\n label: children,\n ...(tone === undefined ? {} : { tone }),\n });\n return (\n <span\n {...props}\n style={{ ...style, ...layoutStyle }}\n ref={ref}\n className={classNames(\"hjm-tag\", className)}\n data-tone={descriptor.tone}\n >\n <span className=\"hjm-tag__label\">{descriptor.label}</span>\n </span>\n );\n});\n\nexport type CardProps = Omit<HTMLAttributes<HTMLElement>, \"title\"> &\n Readonly<{\n title?: ReactNode;\n description?: ReactNode;\n leading?: ReactNode;\n media?: ReactNode;\n /** Decorative artwork behind the shared body/actions; its host determines the available height. */\n backgroundMedia?: ReactNode;\n /** Platform gesture/accessibility host behind content. Requires backgroundMedia; never put metadata/actions here. */\n backgroundInteraction?: ReactNode;\n /** Non-interactive cover classification at the shared top/end inset. Requires backgroundMedia. */\n mediaBadges?: ReactNode;\n badges?: ReactNode;\n /** Centre short metadata beneath artwork without product-owned badge layout. */\n badgesAlign?: \"start\" | \"center\";\n /** Activate only the passive cover; other card content/actions keep independent targets. */\n mediaAction?: Readonly<{ label: string; onActivate(): void; icon?: (context: Readonly<{ color: string; size: number }>) => ReactNode }>;\n actions?: ReactNode;\n /** Independent commands at the header end; never nested in whole-card activation. */\n headerActions?: ReactNode;\n headingLevel?: CardHeadingLevel;\n selected?: boolean;\n /**\n * Whole-card activation. With `actions`, the card stays an article and a separate full-card button sits under the\n * action region, so actions remain independent buttons (never a button inside a button). Keep other children passive.\n */\n onActivate?: () => void;\n /** A native anchor preserves new-tab, copy-link and browser previews; it is exclusive with onActivate. */\n href?: string;\n /** Framework routing and product effects can wrap the shared anchor without replacing its placement. */\n renderLink?: (props: React.ComponentPropsWithRef<\"a\">) => ReactNode;\n disabled?: boolean;\n tone?: SurfaceTone;\n bordered?: boolean;\n padding?: SurfacePadding;\n radius?: SurfaceRadius;\n /** Canonical layout-only placement; forwarded to the root Surface, which applies it. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\nexport const Card = forwardRef<HTMLElement, CardProps>(function Card(\n {\n title,\n description,\n leading,\n media,\n backgroundMedia,\n backgroundInteraction,\n mediaBadges,\n badges,\n badgesAlign = cardRecipe.defaults.badgesAlign,\n mediaAction,\n actions,\n headerActions,\n headingLevel = cardRecipe.defaults.headingLevel,\n // An omitted selection is an ordinary action, not an unpressed toggle.\n selected,\n onActivate, href, renderLink,\n disabled = false,\n tone = cardRecipe.defaults.tone,\n bordered = cardRecipe.defaults.bordered,\n padding = cardRecipe.defaults.padding,\n radius,\n className,\n children,\n ...props\n },\n ref,\n) {\n if (href !== undefined && (!href.trim() || onActivate)) throw new TypeError(\"Card href requires a destination and cannot combine with onActivate\");\n if (renderLink && href === undefined) throw new TypeError(\"Card renderLink requires href\");\n if ((onActivate || href !== undefined) && !props[\"aria-label\"]?.trim()) {\n throw new TypeError(\"Interactive Card requires aria-label\");\n }\n if (mediaAction && (onActivate || href !== undefined || !media || !mediaAction.label.trim())) throw new TypeError(\"Card mediaAction requires passive media, a label, and no whole-card activation\");\n if (backgroundMedia && (media || mediaAction || onActivate || href !== undefined)) throw new TypeError(\"Card backgroundMedia is decorative and cannot combine with media, mediaAction, onActivate or href\");\n if ((backgroundInteraction !== undefined || mediaBadges !== undefined) && !backgroundMedia) throw new TypeError(\"Card backgroundInteraction/mediaBadges require backgroundMedia\");\n const hasHeader =\n leading !== undefined || title !== undefined || description !== undefined || headerActions !== undefined;\n // Whole-card open plus separate commands (2026-10-18 unairplane journey card: open + delete). A root button cannot\n // contain the action buttons, so the root stays an article and an overlay button carries the card's name and state.\n const overlay = href !== undefined || (onActivate !== undefined && Boolean(actions || headerActions));\n const { \"aria-label\": activationLabel, ...rootProps } = props;\n const activate = () => { if (!disabled) onActivate?.(); };\n\n const linkProps: React.ComponentPropsWithRef<\"a\"> = {\n href: disabled ? undefined : href, role: \"link\", className: \"hjm-card__activator\",\n \"aria-label\": activationLabel, \"aria-disabled\": disabled || undefined, tabIndex: disabled ? -1 : undefined,\n };\n // Link activation belongs to the shared card; a product-owned stretched link was its own second layout (Diairy).\n const destination = href === undefined ? null : !disabled && renderLink ? renderLink(linkProps) : <a {...linkProps} />;\n return (\n <Surface\n {...(overlay ? rootProps : props)}\n ref={ref}\n as={onActivate && !overlay ? \"button\" : \"article\"}\n {...(onActivate && !overlay ? {\n type: \"button\" as const, disabled, \"aria-pressed\": selected,\n \"data-interactive\": true, onClick: activate,\n } : {})}\n {...(overlay ? { \"data-activation\": \"overlay\" } : {})}\n tone={selected ? cardRecipe.selectedTone : tone}\n bordered={bordered}\n {...(radius === undefined ? {} : { radius })}\n className={classNames(\"hjm-card\", className)}\n data-background-media={backgroundMedia ? true : undefined}\n data-state={(onActivate || href !== undefined || mediaAction) && disabled ? \"disabled\" : selected ? \"selected\" : \"idle\"}\n style={{ \"--hjm-card-background-scrim\": cardRecipe.backgroundMedia.scrim, \"--hjm-card-background-foreground\": cardRecipe.backgroundMedia.foreground, \"--hjm-card-disabled-opacity\": cardRecipe.interaction.disabledOpacity,\n \"--hjm-card-pressed-opacity\": cardRecipe.interaction.pressedOpacity, ...props.style } as CSSProperties}\n >\n {backgroundMedia ? <div className=\"hjm-card__background\" aria-hidden=\"true\">{backgroundMedia}<span className=\"hjm-card__scrim\" /></div> : null}\n {backgroundInteraction === undefined ? null : <div className=\"hjm-card__background-interaction\" data-slot=\"background-interaction\">{backgroundInteraction}</div>}\n {mediaBadges === undefined ? null : <div className=\"hjm-card__media-badges\" data-slot=\"media-badges\">{mediaBadges}</div>}\n {media ? <div className=\"hjm-card__media\" data-slot=\"media\">{mediaAction ? <button type=\"button\" className=\"hjm-card__media-action\" aria-label={mediaAction.label} disabled={disabled} onClick={() => { if (!disabled) mediaAction.onActivate(); }}>\n {media}\n {mediaAction.icon ? <span className=\"hjm-card__media-icon\" aria-hidden=\"true\" style={{ insetInlineEnd: cardRecipe.mediaAction.inset, insetBlockEnd: cardRecipe.mediaAction.inset, width: cardRecipe.mediaAction.diameter, height: cardRecipe.mediaAction.diameter }}>{mediaAction.icon({ color: \"currentColor\", size: cardRecipe.mediaAction.iconSize })}</span> : null}\n </button> : media}</div> : null}\n <div\n className=\"hjm-card__body\"\n data-slot=\"body\"\n style={{ padding: surfaceGeometry.paddings[padding] }}\n >\n {badges === undefined ? null : <div className=\"hjm-card__badges\" data-slot=\"badges\" data-align={badgesAlign}>{badges}</div>}\n {hasHeader ? (\n <div className=\"hjm-card__header\" data-slot=\"header\">\n {leading === undefined ? null : (\n <span className=\"hjm-card__leading\" data-slot=\"leading\">\n {leading}\n </span>\n )}\n <div className=\"hjm-card__copy\">\n {title === undefined\n ? null\n : createElement(\n `h${headingLevel}`,\n { className: \"hjm-card__title\", \"data-slot\": \"title\" },\n title,\n )}\n {description === undefined ? null : (\n <Text\n as=\"p\"\n tone=\"muted\"\n className=\"hjm-card__description\"\n data-slot=\"description\"\n >\n {description}\n </Text>\n )}\n </div>\n {headerActions === undefined ? null : <div className=\"hjm-card__header-actions\" data-slot=\"header-actions\">{headerActions}</div>}\n </div>\n ) : null}\n {children === undefined ? null : (\n <div className=\"hjm-card__content\" data-slot=\"content\">{children}</div>\n )}\n </div>\n {destination}\n {overlay && href === undefined ? (\n <button\n type=\"button\"\n className=\"hjm-card__activator\"\n data-slot=\"activator\"\n aria-label={activationLabel}\n aria-pressed={selected}\n disabled={disabled}\n onClick={activate}\n />\n ) : null}\n {actions ? <div className=\"hjm-card__actions\" data-slot=\"actions\">{actions}</div> : null}\n </Surface>\n );\n});\n\n/** An attributed quotation reuses Card material while keeping quotation semantics and its caption together. */\nexport type QuoteCardProps = Omit<HTMLAttributes<HTMLElement>, \"children\" | \"title\"> & Readonly<{\n children: ReactNode;\n attribution?: string;\n renderMark?: (context: { color: string; size: number }) => ReactNode;\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport function QuoteCard({ children, attribution, renderMark, ...props }: QuoteCardProps) {\n return <Card {...props} leading={<span className=\"hjm-quote-card__mark\" aria-hidden=\"true\">{renderMark?.({ color: \"currentColor\", size: cardRecipe.quotation.markSize }) ?? \"“\"}</span>}>\n <blockquote className=\"hjm-quote-card__body\">\n {children}\n {attribution === undefined ? null : <footer><Text variant=\"caption\" tone=\"muted\">{attribution}</Text></footer>}\n </blockquote>\n </Card>;\n}\n\nexport type ListRowProps = Omit<HTMLAttributes<HTMLElement>, \"title\" | \"onClick\"> &\n Readonly<{\n title: ReactNode;\n description?: ReactNode;\n leading?: ReactNode;\n trailing?: ReactNode;\n /**\n * `disclosure`: the row opens another screen. HJM draws the decorative chevron after `trailing`, inside the row\n * command (before any `trailingAction`), mirrored in RTL; size and color come from `listRowRecipe.accessories`.\n */\n trailingAccessory?: ListRowTrailingAccessory;\n /** Independent command outside the row's navigation target. */\n trailingAction?: ReactNode;\n /** Supply a framework Link without replacing the shared row layout. */\n renderLink?: (props: React.ComponentPropsWithRef<\"a\">) => ReactNode;\n density?: ListRowDensity;\n /** Semantic emphasis for destructive destinations; selection stays independent. */\n tone?: keyof typeof listRowRecipe.tones;\n /** Frame the ListRow paints around `leading`; the recipe owns its size. */\n leadingShape?: ListRowLeadingShape;\n selected?: boolean;\n disabled?: boolean;\n /**\n * Placeholder row while the real one loads. It keeps the row's own height\n * and slot geometry, so a list does not jump when the content arrives —\n * which is exactly what a product-owned skeleton next to the list cannot do.\n */\n loading?: boolean;\n /** Localized status text announced while `loading`. */\n loadingLabel?: string;\n href?: string;\n onClick?: MouseEventHandler<HTMLElement>;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const ListRow = forwardRef<HTMLElement, ListRowProps>(function ListRow(\n {\n title,\n description,\n leading,\n trailing,\n trailingAccessory = listRowRecipe.defaults.trailingAccessory,\n trailingAction,\n renderLink,\n density: densityProp,\n tone = listRowRecipe.defaults.tone,\n leadingShape = \"square\",\n selected,\n disabled = false,\n loading = false,\n loadingLabel,\n href,\n onClick,\n className,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n // The hook runs unconditionally — `??` would short-circuit it and break the\n // rules of hooks on the very first row that passes `density`.\n const densityDefault = useHjmDensityDefault({\n comfortable: listRowRecipe.defaults.density,\n compact: \"compact\",\n });\n const density = densityProp ?? densityDefault;\n validateListRowTrailingAccessory(trailingAccessory);\n const accessory = trailingAccessory === \"none\" ? null : listRowRecipe.accessories[trailingAccessory];\n if (loading) {\n // A loading row is never interactive: there is nothing to activate yet.\n return (\n <div\n {...props}\n ref={ref as React.Ref<HTMLDivElement>}\n role={loadingLabel ? \"status\" : undefined}\n aria-busy={loadingLabel ? true : undefined}\n aria-hidden={loadingLabel ? undefined : true}\n aria-label={loadingLabel}\n className={classNames(\"hjm-list-row\", \"hjm-list-row--loading\", className)}\n data-density={density}\n data-leading={leading ? \"\" : undefined}\n data-lines={description ? \"two\" : \"one\"}\n data-state=\"loading\"\n style={{ ...style, ...layoutStyle }}\n >\n {leading ? <span className=\"hjm-list-row__leading\" data-shape={leadingShape} data-placeholder=\"\" /> : null}\n <span className=\"hjm-list-row__content\">\n <span className=\"hjm-list-row__title\" data-placeholder=\"\" style={{ width: `${listRowRecipe.loading.titleWidthPercent}%` }} />\n {description ? <span className=\"hjm-list-row__description\" data-placeholder=\"\" style={{ width: `${listRowRecipe.loading.descriptionWidthPercent}%` }} /> : null}\n </span>\n {trailing ? <span className=\"hjm-list-row__trailing\" data-placeholder=\"\" style={{ width: listRowRecipe.loading.trailingWidth }} /> : null}\n {/* Keep the accessory's box so the text column does not shift when the real row arrives. */}\n {accessory ? <span className=\"hjm-list-row__accessory\" data-accessory={trailingAccessory} style={{ inlineSize: glyph[accessory.glyph], blockSize: glyph[accessory.glyph] }} /> : null}\n </div>\n );\n }\n const element = href ? \"a\" : onClick ? \"button\" : \"div\";\n const interactiveProps = href\n ? {\n href: disabled ? undefined : href,\n \"aria-current\": selected ? (\"page\" as const) : undefined,\n \"aria-disabled\": disabled || undefined,\n tabIndex: disabled ? -1 : undefined,\n }\n : onClick\n ? {\n type: \"button\" as const,\n onClick: disabled ? undefined : onClick,\n disabled,\n \"aria-pressed\": selected,\n }\n : {};\n\n const row = createElement(\n element,\n {\n ...props,\n ...interactiveProps,\n ref,\n className: classNames(\"hjm-list-row\", className),\n \"data-density\": density,\n // Exposes the text column to the enclosing List: its indented separator starts after the leading frame\n // (listRecipe.separators.indented.leadingInsetStart) only when this row has one.\n \"data-leading\": leading ? \"\" : undefined,\n \"data-tone\": tone,\n // One- and two-line rows have different minimum heights in the recipe;\n // the web renderer used a single hardcoded value until now.\n \"data-lines\": description ? \"two\" : \"one\",\n \"data-state\": disabled ? \"disabled\" : selected ? \"selected\" : \"idle\",\n // Placement wins over the legacy `style`, matching Surface's ordering.\n // With trailingAction the frame is the placed root, as Native's outer View.\n style: trailingAction ? style : { ...style, ...layoutStyle },\n },\n leading\n ? <span className=\"hjm-list-row__leading\" data-shape={leadingShape}>{leading}</span>\n : null,\n <span className=\"hjm-list-row__content\">\n <span className=\"hjm-list-row__title\">{title}</span>\n {description ? (\n <span className=\"hjm-list-row__description\">{description}</span>\n ) : null}\n </span>,\n trailing ? <span className=\"hjm-list-row__trailing\">{trailing}</span> : null,\n accessory\n ? <span className=\"hjm-list-row__accessory\" data-accessory={trailingAccessory} aria-hidden=\"true\">\n <Icon name={accessory.icon} size={accessory.glyph} weight={accessory.weight} />\n </span>\n : null,\n );\n const linked = href && renderLink ? renderLink(row.props as React.ComponentPropsWithRef<\"a\">) : row;\n // The frame owns the row surface and its bleed so the command and the separate action share one fill, as Native;\n // the action stays outside the link/button (styles.css `.hjm-list-row-frame`).\n return trailingAction ? (\n <div className=\"hjm-list-row-frame\" data-density={density} data-leading={leading ? \"\" : undefined}\n data-state={disabled ? \"disabled\" : selected ? \"selected\" : \"idle\"} style={layoutStyle}>\n {linked}\n <div className=\"hjm-list-row__action\">{trailingAction}</div>\n </div>\n ) : linked;\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"duration-field.d.ts","sourceRoot":"","sources":["../src/duration-field.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"duration-field.d.ts","sourceRoot":"","sources":["../src/duration-field.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAuC,KAAK,mBAAmB,EAAE,KAAK,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAG3I,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,QAAQ,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,MAAM,EAAE,mBAAmB,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,uBAAuB,CAAA;CAAE,CAAC,CAAC;AAEnO,sFAAsF;AACtF,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,GAAO,EAAE,GAAG,EAAE,QAAgB,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,kBAAkB,+BAazI"}
|
package/dist/duration-field.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"duration-field.js","sourceRoot":"","sources":["../src/duration-field.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"duration-field.js","sourceRoot":"","sources":["../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CAAC,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;YAC7C,IAAI,CAAC,IAAI;gBAAE,OAAO,IAAI,CAAC;YACvB,OAAO,KAAC,WAAW,OAAK,YAAY,EAClC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,EACrG,cAAc,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,cAAc,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,EAC9E,aAAa,EAAE,WAAW,CAAC,CAAC,IAAmB,EAAE,EAAE,CAAC,aAAa,CAAC,kBAAkB,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,GAAI,CAAC;QAChI,CAAC,GAAI,CAAC;AACV,CAAC","sourcesContent":["\"use client\";\n\nimport { changeDurationUnit, resolveDuration, type DurationFieldLabels, type DurationRange } from \"@hjmds/design-contracts/duration-field\";\nimport { NumberField } from \"./number-field.js\";\nimport { FieldGroup } from \"./field-group.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\nexport type DurationFieldProps = DurationRange & Readonly<{ value: number; onValueChange: (seconds: number) => void; labels: DurationFieldLabels; disabled?: boolean; className?: string; layoutStyle?: HjmCompositionStyleProp }>;\nconst units = [\"hours\", \"minutes\", \"seconds\"] as const;\n/** Units and limits remain in seconds; FieldGroup owns grouping and edit lifetime. */\nexport function DurationField({ value, onValueChange, labels, min = 0, max, disabled = false, className, layoutStyle }: DurationFieldProps) {\n const parts = resolveDuration(value, { min, max });\n return <FieldGroup layout=\"inline\" {...(className === undefined ? {} : { className })} {...(layoutStyle === undefined ? {} : { layoutStyle: layoutStyle })}\n descriptor={{ label: labels.label, disabled,\n fields: units.map(unit => ({ id: unit, label: labels[unit], disabled: unit === \"hours\" && max < 3600 })) }}\n renderField={({ id, controlProps, guardChange }) => {\n const unit = units.find(unit => unit === id);\n if (!unit) return null;\n return <NumberField {...controlProps}\n min={0} max={unit === \"hours\" ? Math.max(1, Math.floor(max / 3600)) : 59} value={parts[unit]} step={1}\n incrementLabel={labels.increment(unit)} decrementLabel={labels.decrement(unit)}\n onValueChange={guardChange((next: number | null) => onValueChange(changeDurationUnit(value, unit, next, { min, max })))} />;\n }} />;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effect-surface.d.ts","sourceRoot":"","sources":["../src/effect-surface.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"effect-surface.d.ts","sourceRoot":"","sources":["../src/effect-surface.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAwB,KAAK,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAE5G,OAAO,EAAoC,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACjI,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IAAE,UAAU,CAAC,EAAE,uBAAuB,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IACxH,oIAAoI;IACpI,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB;oGACgG;IAChG,MAAM,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;IAChC,gGAAgG,CAAC,WAAW,CAAC,EAAE,uBAAuB,CAAC;CAAE,CAAC,CAAC;AAC7I,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,EAAE,UAAe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EL,MAAM,CAAC,KAAK,IAAI,wCAA2B,OAAO,iBAAa,MAAM,EAAC,SAAS,EAAC,OAAO,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,SAAS,EAAE,aACjN,yBAAM,kBAAS,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,YAAY,EAAC,gBAAgB,YAAC,eAAM,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,EAAC,MAAM,EAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,GAAI,GAAU,GAAO,EAC1P,eAAM,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,GAAI,IAC1D,EACN,cAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,YAAG,QAAQ,GAAO,IAC9F,CAAC;AACT,CAAC","sourcesContent":["import { useEffect, useId, useRef, useState, type ReactNode } from \"react\";\nimport { resolveEffectSurface, type EffectSurfaceDescriptor } from \"@hjmds/design-contracts/effect-surface\";\nimport { resolveColorReference } from \"@hjmds/design-contracts/color-references\";\nimport { surfaceDefaults, surfaceGeometry, type SurfacePadding, type SurfaceRadius } from \"@hjmds/design-contracts/recipes/base\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\nimport { useHjmTheme } from \"./provider.js\";\nexport type EffectSurfaceProps = Readonly<{ descriptor?: EffectSurfaceDescriptor; children: ReactNode; className?: string;\n /** Content inset inside the decorated area (Surface padding scale). Consumers otherwise wrapped children in raw padded elements. */\n padding?: SurfacePadding;\n /** Corner radius of the decorated area. Defaults to the Surface radius so a framed hero clips its\n * decoration to the same corners as the Surface it wraps; full-bleed canvases pass `\"none\"`. */\n radius?: SurfaceRadius | \"none\";\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */ layoutStyle?: HjmCompositionStyleProp; }>;\n/** Decorative layers never receive pointer events or own the content's name. */\nexport function EffectSurface({ descriptor = {}, children, className, padding = \"none\", radius = surfaceDefaults.radius, layoutStyle }: EffectSurfaceProps) {\n const { palette, environment } = useHjmTheme();\n const effect = resolveEffectSurface(descriptor);\n const id = useId().replace(/:/g, \"\");\n const host = useRef<HTMLDivElement>(null);\n const layer = useRef<SVGSVGElement>(null);\n const [visible, setVisible] = useState(false);\n const hasAtmosphere = effect.layers.some(value => value !== \"ruled\");\n useEffect(() => {\n if (!host.current) return;\n if (typeof IntersectionObserver === \"undefined\") { setVisible(true); return; }\n const observer = new IntersectionObserver(([entry]) => setVisible(entry?.isIntersecting ?? false));\n observer.observe(host.current); return () => observer.disconnect();\n }, []);\n useEffect(() => {\n const node = layer.current;\n if (!node || !hasAtmosphere || !effect.active || environment.reducedMotion || !visible || typeof node.animate !== \"function\") return;\n // WAAPI stays outside React renders; visibility changes cancel the loop and\n // expose its static composition rather than scheduling invisible frames.\n let animation: Animation | undefined;\n let failed = false;\n const sync = () => { animation?.cancel(); if (document.hidden || failed) return;\n // A host may expose WAAPI but reject animation creation. Keep the static SVG\n // and content instead of propagating a decorative failure to the application.\n try { animation = node.animate([\n { transform: \"scale(1.08) translate(-1%, 0%)\" },\n { transform: \"scale(1.12) translate(1%, 1%)\" },\n { transform: \"scale(1.08) translate(-1%, 0%)\" },\n ], { duration: effect.period * 1000, iterations: Infinity, easing: \"ease-in-out\" }); } catch { failed = true; } };\n sync(); document.addEventListener(\"visibilitychange\", sync);\n return () => { animation?.cancel(); document.removeEventListener(\"visibilitychange\", sync); };\n }, [hasAtmosphere, effect.active, effect.period, environment.reducedMotion, visible]);\n const colors = effect.colors.map(color => resolveColorReference(color, palette));\n return <div ref={host} className={className} data-hjm-effect-surface=\"\" style={{ ...layoutStyle, position: \"relative\", isolation: \"isolate\", overflow: \"hidden\", borderRadius: radius === \"none\" ? 0 : `var(--hjm-radius-${radius})`, background: palette.theme.bg }}>\n <svg ref={layer} aria-hidden=\"true\" focusable=\"false\" style={{ position: \"absolute\", inset: 0, width: \"100%\", height: \"100%\", pointerEvents: \"none\", opacity: effect.intensity }}>\n {/* Keep noise in CSS-pixel units; the existing geometric layers retain their viewBox. */}\n <defs>{effect.noise && <><pattern id={`${id}-noise-tile`} width={effect.noise.size} height={effect.noise.size} x={effect.noise.offset} patternUnits=\"userSpaceOnUse\"><image href={effect.noise.uri} width={effect.noise.size} height={effect.noise.size} /></pattern><mask id={`${id}-noise-mask`} x={0} y={0} width=\"100%\" height=\"100%\" maskUnits=\"userSpaceOnUse\"><rect width=\"100%\" height=\"100%\" fill={`url(#${id}-noise-tile)`} /></mask></>}</defs>\n {effect.noise && <rect width=\"100%\" height=\"100%\" fill={palette.theme.text} mask={`url(#${id}-noise-mask)`} />}\n <svg width=\"100%\" height=\"100%\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\">\n <defs>{colors.map((color, index) => <radialGradient id={`${id}-${index}`} key={index}><stop offset=\"0%\" stopColor={color} /><stop offset=\"100%\" stopColor={color} stopOpacity={0} /></radialGradient>)}\n <pattern id={`${id}-grain`} width={4} height={4} patternUnits=\"userSpaceOnUse\">{effect.points.map((point, index) => <circle key={index} cx={point.x / 25} cy={point.y / 25} r={point.radius / 10} fill={palette.theme.text} opacity={0.28} />)}</pattern>\n </defs>\n {effect.layers.includes(\"mesh\") && effect.anchors.map((anchor, index) => <ellipse key={index} cx={anchor.x} cy={anchor.y} rx={65} ry={70} fill={`url(#${id}-${index})`} />)}\n {effect.layers.includes(\"glow\") && <ellipse cx={50} cy={10} rx={70} ry={95} fill={`url(#${id}-0)`} />}\n {effect.layers.includes(\"grain\") && <rect width={100} height={100} fill={`url(#${id}-grain)`} />}\n </svg>\n </svg>\n {/* Notebook ruling must not stretch or drift with the atmospheric layers. */}\n {effect.ruled && <svg data-hjm-effect-layer=\"ruled\" aria-hidden=\"true\" focusable=\"false\" style={{ position: \"absolute\", inset: 0, width: \"100%\", height: \"100%\", pointerEvents: \"none\", opacity: effect.intensity }}>\n <defs><pattern id={`${id}-ruled`} width={1} height={effect.ruled.spacing} patternUnits=\"userSpaceOnUse\"><rect y={effect.ruled.spacing - effect.ruled.thickness} width=\"100%\" height={effect.ruled.thickness} fill={palette.theme.text} /></pattern></defs>\n <rect width=\"100%\" height=\"100%\" fill={`url(#${id}-ruled)`} />\n </svg>}\n <div style={{ position: \"relative\", padding: surfaceGeometry.paddings[padding] }}>{children}</div>\n </div>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"effect-surface.js","sourceRoot":"","sources":["../src/effect-surface.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAgC,MAAM,wCAAwC,CAAC;AAC5G,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,eAAe,EAA2C,MAAM,sCAAsC,CAAC;AAEjI,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAQ5C,gFAAgF;AAChF,MAAM,UAAU,aAAa,CAAC,EAAE,UAAU,GAAG,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,GAAG,MAAM,EAAE,MAAM,GAAG,eAAe,CAAC,MAAM,EAAE,WAAW,EAAsB;IACxJ,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,CAAC;IAC/C,MAAM,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UAAU,EAAE,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,YAAG,QAAQ,GAAO,IAC9F,CAAC;AACT,CAAC","sourcesContent":["\"use client\";\n\nimport { useEffect, useId, useRef, useState, type ReactNode } from \"react\";\nimport { resolveEffectSurface, type EffectSurfaceDescriptor } from \"@hjmds/design-contracts/effect-surface\";\nimport { resolveColorReference } from \"@hjmds/design-contracts/color-references\";\nimport { surfaceDefaults, surfaceGeometry, type SurfacePadding, type SurfaceRadius } from \"@hjmds/design-contracts/recipes/base\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\nimport { useHjmTheme } from \"./provider.js\";\nexport type EffectSurfaceProps = Readonly<{ descriptor?: EffectSurfaceDescriptor; children: ReactNode; className?: string;\n /** Content inset inside the decorated area (Surface padding scale). Consumers otherwise wrapped children in raw padded elements. */\n padding?: SurfacePadding;\n /** Corner radius of the decorated area. Defaults to the Surface radius so a framed hero clips its\n * decoration to the same corners as the Surface it wraps; full-bleed canvases pass `\"none\"`. */\n radius?: SurfaceRadius | \"none\";\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */ layoutStyle?: HjmCompositionStyleProp; }>;\n/** Decorative layers never receive pointer events or own the content's name. */\nexport function EffectSurface({ descriptor = {}, children, className, padding = \"none\", radius = surfaceDefaults.radius, layoutStyle }: EffectSurfaceProps) {\n const { palette, environment } = useHjmTheme();\n const effect = resolveEffectSurface(descriptor);\n const id = useId().replace(/:/g, \"\");\n const host = useRef<HTMLDivElement>(null);\n const layer = useRef<SVGSVGElement>(null);\n const [visible, setVisible] = useState(false);\n const hasAtmosphere = effect.layers.some(value => value !== \"ruled\");\n useEffect(() => {\n if (!host.current) return;\n if (typeof IntersectionObserver === \"undefined\") { setVisible(true); return; }\n const observer = new IntersectionObserver(([entry]) => setVisible(entry?.isIntersecting ?? false));\n observer.observe(host.current); return () => observer.disconnect();\n }, []);\n useEffect(() => {\n const node = layer.current;\n if (!node || !hasAtmosphere || !effect.active || environment.reducedMotion || !visible || typeof node.animate !== \"function\") return;\n // WAAPI stays outside React renders; visibility changes cancel the loop and\n // expose its static composition rather than scheduling invisible frames.\n let animation: Animation | undefined;\n let failed = false;\n const sync = () => { animation?.cancel(); if (document.hidden || failed) return;\n // A host may expose WAAPI but reject animation creation. Keep the static SVG\n // and content instead of propagating a decorative failure to the application.\n try { animation = node.animate([\n { transform: \"scale(1.08) translate(-1%, 0%)\" },\n { transform: \"scale(1.12) translate(1%, 1%)\" },\n { transform: \"scale(1.08) translate(-1%, 0%)\" },\n ], { duration: effect.period * 1000, iterations: Infinity, easing: \"ease-in-out\" }); } catch { failed = true; } };\n sync(); document.addEventListener(\"visibilitychange\", sync);\n return () => { animation?.cancel(); document.removeEventListener(\"visibilitychange\", sync); };\n }, [hasAtmosphere, effect.active, effect.period, environment.reducedMotion, visible]);\n const colors = effect.colors.map(color => resolveColorReference(color, palette));\n return <div ref={host} className={className} data-hjm-effect-surface=\"\" style={{ ...layoutStyle, position: \"relative\", isolation: \"isolate\", overflow: \"hidden\", borderRadius: radius === \"none\" ? 0 : `var(--hjm-radius-${radius})`, background: palette.theme.bg }}>\n <svg ref={layer} aria-hidden=\"true\" focusable=\"false\" style={{ position: \"absolute\", inset: 0, width: \"100%\", height: \"100%\", pointerEvents: \"none\", opacity: effect.intensity }}>\n {/* Keep noise in CSS-pixel units; the existing geometric layers retain their viewBox. */}\n <defs>{effect.noise && <><pattern id={`${id}-noise-tile`} width={effect.noise.size} height={effect.noise.size} x={effect.noise.offset} patternUnits=\"userSpaceOnUse\"><image href={effect.noise.uri} width={effect.noise.size} height={effect.noise.size} /></pattern><mask id={`${id}-noise-mask`} x={0} y={0} width=\"100%\" height=\"100%\" maskUnits=\"userSpaceOnUse\"><rect width=\"100%\" height=\"100%\" fill={`url(#${id}-noise-tile)`} /></mask></>}</defs>\n {effect.noise && <rect width=\"100%\" height=\"100%\" fill={palette.theme.text} mask={`url(#${id}-noise-mask)`} />}\n <svg width=\"100%\" height=\"100%\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\">\n <defs>{colors.map((color, index) => <radialGradient id={`${id}-${index}`} key={index}><stop offset=\"0%\" stopColor={color} /><stop offset=\"100%\" stopColor={color} stopOpacity={0} /></radialGradient>)}\n <pattern id={`${id}-grain`} width={4} height={4} patternUnits=\"userSpaceOnUse\">{effect.points.map((point, index) => <circle key={index} cx={point.x / 25} cy={point.y / 25} r={point.radius / 10} fill={palette.theme.text} opacity={0.28} />)}</pattern>\n </defs>\n {effect.layers.includes(\"mesh\") && effect.anchors.map((anchor, index) => <ellipse key={index} cx={anchor.x} cy={anchor.y} rx={65} ry={70} fill={`url(#${id}-${index})`} />)}\n {effect.layers.includes(\"glow\") && <ellipse cx={50} cy={10} rx={70} ry={95} fill={`url(#${id}-0)`} />}\n {effect.layers.includes(\"grain\") && <rect width={100} height={100} fill={`url(#${id}-grain)`} />}\n </svg>\n </svg>\n {/* Notebook ruling must not stretch or drift with the atmospheric layers. */}\n {effect.ruled && <svg data-hjm-effect-layer=\"ruled\" aria-hidden=\"true\" focusable=\"false\" style={{ position: \"absolute\", inset: 0, width: \"100%\", height: \"100%\", pointerEvents: \"none\", opacity: effect.intensity }}>\n <defs><pattern id={`${id}-ruled`} width={1} height={effect.ruled.spacing} patternUnits=\"userSpaceOnUse\"><rect y={effect.ruled.spacing - effect.ruled.thickness} width=\"100%\" height={effect.ruled.thickness} fill={palette.theme.text} /></pattern></defs>\n <rect width=\"100%\" height=\"100%\" fill={`url(#${id}-ruled)`} />\n </svg>}\n <div style={{ position: \"relative\", padding: surfaceGeometry.paddings[padding] }}>{children}</div>\n </div>;\n}\n"]}
|
package/dist/evidence.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export type ReactRendererEvidenceManifest = Readonly<{
|
|
|
34
34
|
export declare const reactRendererEvidence: {
|
|
35
35
|
readonly schemaVersion: 2;
|
|
36
36
|
readonly packageName: "@hjmds/react";
|
|
37
|
-
readonly packageVersion: "1.
|
|
37
|
+
readonly packageVersion: "1.42.0";
|
|
38
38
|
readonly surface: "web";
|
|
39
39
|
readonly components: Readonly<{
|
|
40
40
|
/** Canonical component id from the design-contracts catalog. */
|
package/dist/evidence.js
CHANGED
|
@@ -135,7 +135,7 @@ const activeWebEntries = componentCatalog.filter((entry) => {
|
|
|
135
135
|
export const reactRendererEvidence = {
|
|
136
136
|
schemaVersion: reactRendererEvidenceSchemaVersion,
|
|
137
137
|
packageName: "@hjmds/react",
|
|
138
|
-
packageVersion: "1.
|
|
138
|
+
packageVersion: "1.42.0",
|
|
139
139
|
surface: "web",
|
|
140
140
|
components: activeWebEntries.map(derivedClaim),
|
|
141
141
|
};
|