@hjmds/react 1.41.1 → 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 +24 -7
- package/dist/choice-row.d.ts.map +1 -1
- package/dist/choice-row.js +11 -6
- 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/steps.js
CHANGED
|
@@ -1,15 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { resolveStepsDescriptor, stepsRecipe, } from "@hjmds/design-contracts/components/steps";
|
|
3
|
-
import { forwardRef, useId } from "react";
|
|
3
|
+
import { resolveStepsDescriptor, stepsDefaults, stepsRecipe, validateStepsPresentation, } from "@hjmds/design-contracts/components/steps";
|
|
4
|
+
import { forwardRef, useId, useState } from "react";
|
|
4
5
|
import { classNames } from "./internal.js";
|
|
5
|
-
/**
|
|
6
|
-
export const Steps = forwardRef(function Steps({ descriptor, statusLabels, composeAccessibleName, renderMark, onStepPress, className, layoutStyle, ...props }, ref) {
|
|
6
|
+
/** Presentation never changes the shared single-cursor state or validation/navigation policy. */
|
|
7
|
+
export const Steps = forwardRef(function Steps({ descriptor, statusLabels, composeAccessibleName, presentation = stepsDefaults.presentation, overviewLabel, renderStepContent, renderMark, onStepPress, className, layoutStyle, ...props }, ref) {
|
|
7
8
|
const steps = resolveStepsDescriptor(descriptor, { statusLabels, composeAccessibleName });
|
|
9
|
+
validateStepsPresentation(presentation, overviewLabel);
|
|
10
|
+
if (renderStepContent && presentation !== "vertical")
|
|
11
|
+
throw new TypeError("Steps renderStepContent requires vertical presentation");
|
|
8
12
|
const statusId = useId();
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
const [expanded, setExpanded] = useState(false);
|
|
14
|
+
const compact = presentation === "compact";
|
|
15
|
+
const vertical = presentation === "vertical" || (compact && expanded);
|
|
16
|
+
const current = steps.find(step => step.id === descriptor.currentStepId);
|
|
17
|
+
const markerSize = renderMark ? stepsRecipe.indicator.customSize : stepsRecipe.indicator.size;
|
|
18
|
+
const list = _jsx("ol", { ...props, ref: ref, id: props.id ?? `${statusId}-list`, "data-presentation": presentation, "data-expanded": compact ? expanded : undefined, "data-custom-mark": renderMark ? true : undefined, style: { ["--hjm-steps-inset"]: `${stepsRecipe.paddingInline}px`, ["--hjm-steps-indicator-size"]: `${markerSize}px`,
|
|
19
|
+
["--hjm-steps-count"]: steps.length, ["--hjm-steps-connector-count"]: steps.length - 1,
|
|
20
|
+
["--hjm-steps-press-target"]: `${stepsRecipe.press.minTouchTarget}px`,
|
|
21
|
+
["--hjm-steps-duration"]: `${stepsRecipe.transitionDuration}ms`,
|
|
22
|
+
["--hjm-steps-segment-height"]: `${stepsRecipe.segmentHeight}px`, ...props.style, ...(!compact ? layoutStyle : {}) }, className: classNames("hjm-steps", className), children: steps.map((step, index) => {
|
|
23
|
+
const cursor = step.id === descriptor.currentStepId;
|
|
24
|
+
const isCurrent = step.status === "current" || step.status === "error";
|
|
25
|
+
const pressable = (!compact || expanded) && (descriptor.navigationMode === "free" || step.revisitable) && onStepPress;
|
|
26
|
+
const content = _jsxs(_Fragment, { children: [_jsxs("div", { className: "hjm-steps__rail", "aria-hidden": "true", children: [!vertical && index === steps.length - 1 ? _jsx("span", { className: "hjm-steps__connector", "data-reached": steps[index - 1]?.status === "complete" || undefined }) : null, _jsx("span", { className: "hjm-steps__indicator", children: renderMark?.(step.status, step.position) ?? (step.status === "complete" ? "✓" : step.status === "error" ? "!" : step.position) }), vertical || index === steps.length - 1 ? null : _jsx("span", { className: "hjm-steps__connector" })] }), _jsxs("div", { className: "hjm-steps__copy", children: [_jsx("span", { className: "hjm-steps__label", children: step.label }), step.description !== undefined && (!vertical || cursor) ? _jsx("span", { className: "hjm-steps__description", children: step.description }) : null, vertical ? _jsx("span", { className: "hjm-steps__status", "aria-hidden": "true", children: step.statusLabel }) : null, _jsx("span", { className: "hjm-visually-hidden", id: `${statusId}-${index}`, children: step.statusLabel })] })] });
|
|
27
|
+
return _jsxs("li", { className: "hjm-steps__step", "data-status": step.status, children: [pressable ? _jsx("button", { type: "button", className: "hjm-steps__press", "aria-label": step.accessibleName, "aria-describedby": `${statusId}-${index}`, "aria-current": isCurrent ? "step" : undefined, onClick: () => onStepPress(step.id), children: content })
|
|
28
|
+
: _jsx("div", { className: "hjm-steps__item", "aria-label": step.accessibleName, "aria-describedby": `${statusId}-${index}`, "aria-current": isCurrent ? "step" : undefined, children: content }), presentation === "vertical" && cursor && renderStepContent ? _jsx("div", { className: "hjm-steps__body", children: renderStepContent(step.id) }) : null] }, step.id);
|
|
29
|
+
}) });
|
|
30
|
+
return compact ? _jsxs("div", { className: "hjm-steps-compact", style: layoutStyle, children: [_jsxs("div", { className: "hjm-steps-compact__header", children: [_jsxs("span", { "aria-hidden": "true", children: [current.position, " / ", current.total, " \u00B7 ", current.label, _jsxs("span", { className: "hjm-steps__status", children: [" \u00B7 ", current.statusLabel] })] }), _jsxs("button", { type: "button", className: "hjm-steps-compact__toggle", "aria-expanded": expanded, "aria-controls": props.id ?? `${statusId}-list`, onClick: () => setExpanded(value => !value), children: [overviewLabel, _jsx("span", { "aria-hidden": "true", children: expanded ? "⌃" : "⌄" })] })] }), list] }) : list;
|
|
14
31
|
});
|
|
15
32
|
//# sourceMappingURL=steps.js.map
|
package/dist/steps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../src/steps.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,sBAAsB,EACtB,WAAW,GAKZ,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,KAAK,EAAuC,MAAM,OAAO,CAAC;AAE/E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAqB3C,kGAAkG;AAClG,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAA+B,SAAS,KAAK,CAC1E,EAAE,UAAU,EAAE,YAAY,EAAE,qBAAqB,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,EAC9G,GAAG;IAEH,MAAM,KAAK,GAAG,sBAAsB,CAAC,UAAU,EAAE,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC,CAAC;IAC1F,MAAM,QAAQ,GAAG,KAAK,EAAE,CA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CAAC;QACJ,CAAC,CAAC,GACC,CACN,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import {\n resolveStepsDescriptor,\n stepsRecipe,\n type ComposeStepsAccessibleName,\n type StepStatus,\n type StepsDescriptor,\n type StepsStatusLabels,\n} from \"@hjmds/design-contracts/components/steps\";\nimport { forwardRef, useId, type HTMLAttributes, type ReactNode } from \"react\";\n\nimport { classNames } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type StepsProps<Id extends string = string> = Omit<\n HTMLAttributes<HTMLOListElement>,\n \"children\"\n> & Readonly<{\n descriptor: StepsDescriptor<Id>;\n statusLabels: StepsStatusLabels;\n composeAccessibleName: ComposeStepsAccessibleName;\n renderMark?: (status: StepStatus, position: number) => ReactNode;\n /**\n * Return to a step before the cursor (2026-10-18, spint compose). Only those steps become buttons; the cursor and\n * later steps stay static in default linear mode. Free reading mode makes every step selectable.\n * Omit the handler while the flow is locked.\n */\n onStepPress?: (id: Id) => void;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\n/** Linear progress steps with one canonical cursor; steps before it can be pressed to go back. */\nexport const Steps = forwardRef<HTMLOListElement, StepsProps>(function Steps(\n { descriptor, statusLabels, composeAccessibleName, renderMark, onStepPress, className, layoutStyle, ...props },\n ref,\n) {\n const steps = resolveStepsDescriptor(descriptor, { statusLabels, composeAccessibleName });\n const statusId = useId();\n return (\n <ol {...props} // The terminal step has no outgoing connector: reserve only its content width.\n style={{ [\"--hjm-steps-inset\" as string]: `${stepsRecipe.paddingInline}px`, [\"--hjm-steps-indicator-size\" as string]: `${stepsRecipe.indicator.size}px`, [\"--hjm-steps-count\" as string]: steps.length, [\"--hjm-steps-connector-count\" as string]: steps.length - 1, [\"--hjm-steps-press-target\" as string]: `${stepsRecipe.press.minTouchTarget}px`, ...props.style, ...layoutStyle }} ref={ref} className={classNames(\"hjm-steps\", className)}>\n {steps.map((step, index) => {\n const content = <>\n <div className=\"hjm-steps__rail\" aria-hidden=\"true\">\n {index === steps.length - 1 ? <span className=\"hjm-steps__connector\" data-reached={steps[index - 1]?.status === \"complete\" || undefined} /> : null}\n <span className=\"hjm-steps__indicator\">\n {renderMark?.(step.status, step.position) ?? (\n step.status === \"complete\" ? \"✓\" : step.status === \"error\" ? \"!\" : step.position\n )}\n </span>\n {index === steps.length - 1 ? null : <span className=\"hjm-steps__connector\" />}\n </div>\n <div className=\"hjm-steps__copy\">\n <span className=\"hjm-steps__label\">{step.label}</span>\n {step.description === undefined ? null : (\n <span className=\"hjm-steps__description\">{step.description}</span>\n )}\n <span className=\"hjm-visually-hidden\" id={`${statusId}-${index}`}>{step.statusLabel}</span>\n </div>\n </>;\n // A pressable step is one named button; its status stays a description so the name keeps order + label.\n return (descriptor.navigationMode === \"free\" || step.revisitable) && onStepPress ? (\n <li className=\"hjm-steps__step\" data-status={step.status} key={step.id}>\n <button type=\"button\" className=\"hjm-steps__press\" aria-label={step.accessibleName} aria-describedby={`${statusId}-${index}`}\n aria-current={step.status === \"current\" || step.status === \"error\" ? \"step\" : undefined}\n onClick={() => onStepPress(step.id)}>{content}</button>\n </li>\n ) : (\n <li\n aria-label={step.accessibleName}\n aria-current={step.status === \"current\" || step.status === \"error\" ? \"step\" : undefined}\n className=\"hjm-steps__step\"\n data-status={step.status}\n key={step.id}\n >{content}</li>\n );\n })}\n </ol>\n );\n});\n"]}
|
|
1
|
+
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../src/steps.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EACL,sBAAsB,EAAE,aAAa,EAAE,WAAW,EAAE,yBAAyB,GAG9E,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAuC,MAAM,OAAO,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAmB3C,iGAAiG;AACjG,MAAM,CA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AG,GAAQ,IAC9D,IACL,EAAC,IAAI,IACP,CAAC,CAAC,CAAC,IAAI,CAAC;AAChB,CAAC,CAAC,CAAC","sourcesContent":["\"use client\";\n\nimport {\n resolveStepsDescriptor, stepsDefaults, stepsRecipe, validateStepsPresentation,\n type ComposeStepsAccessibleName, type StepStatus, type StepsDescriptor,\n type StepsPresentation, type StepsStatusLabels,\n} from \"@hjmds/design-contracts/components/steps\";\nimport { forwardRef, useId, useState, type HTMLAttributes, type ReactNode } from \"react\";\nimport { classNames } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type StepsProps<Id extends string = string> = Omit<HTMLAttributes<HTMLOListElement>, \"children\"> & Readonly<{\n descriptor: StepsDescriptor<Id>;\n statusLabels: StepsStatusLabels;\n composeAccessibleName: ComposeStepsAccessibleName;\n /** Focus rail is the default; compact reveals its overview, vertical expands the cursor's content. */\n presentation?: StepsPresentation;\n /** Required localized toggle label for compact presentation. */\n overviewLabel?: string;\n /** Vertical-only content slot. Products keep drafts outside this unmounted step content. */\n renderStepContent?: (id: Id) => ReactNode;\n renderMark?: (status: StepStatus, position: number) => ReactNode;\n /** Backward-only in linear forms; free reading permits any step. Omit while locked. */\n onStepPress?: (id: Id) => void;\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\n/** Presentation never changes the shared single-cursor state or validation/navigation policy. */\nexport const Steps = forwardRef<HTMLOListElement, StepsProps>(function Steps(\n { descriptor, statusLabels, composeAccessibleName, presentation = stepsDefaults.presentation, overviewLabel,\n renderStepContent, renderMark, onStepPress, className, layoutStyle, ...props }, ref,\n) {\n const steps = resolveStepsDescriptor(descriptor, { statusLabels, composeAccessibleName });\n validateStepsPresentation(presentation, overviewLabel);\n if (renderStepContent && presentation !== \"vertical\") throw new TypeError(\"Steps renderStepContent requires vertical presentation\");\n const statusId = useId();\n const [expanded, setExpanded] = useState(false);\n const compact = presentation === \"compact\";\n const vertical = presentation === \"vertical\" || (compact && expanded);\n const current = steps.find(step => step.id === descriptor.currentStepId)!;\n const markerSize = renderMark ? stepsRecipe.indicator.customSize : stepsRecipe.indicator.size;\n const list = <ol {...props} ref={ref} id={props.id ?? `${statusId}-list`}\n data-presentation={presentation} data-expanded={compact ? expanded : undefined} data-custom-mark={renderMark ? true : undefined}\n style={{ [\"--hjm-steps-inset\" as string]: `${stepsRecipe.paddingInline}px`, [\"--hjm-steps-indicator-size\" as string]: `${markerSize}px`,\n [\"--hjm-steps-count\" as string]: steps.length, [\"--hjm-steps-connector-count\" as string]: steps.length - 1,\n [\"--hjm-steps-press-target\" as string]: `${stepsRecipe.press.minTouchTarget}px`,\n [\"--hjm-steps-duration\" as string]: `${stepsRecipe.transitionDuration}ms`,\n [\"--hjm-steps-segment-height\" as string]: `${stepsRecipe.segmentHeight}px`, ...props.style, ...(!compact ? layoutStyle : {}) }}\n className={classNames(\"hjm-steps\", className)}>\n {steps.map((step, index) => {\n const cursor = step.id === descriptor.currentStepId;\n const isCurrent = step.status === \"current\" || step.status === \"error\";\n const pressable = (!compact || expanded) && (descriptor.navigationMode === \"free\" || step.revisitable) && onStepPress;\n const content = <>\n <div className=\"hjm-steps__rail\" aria-hidden=\"true\">\n {!vertical && index === steps.length - 1 ? <span className=\"hjm-steps__connector\" data-reached={steps[index - 1]?.status === \"complete\" || undefined} /> : null}\n <span className=\"hjm-steps__indicator\">{renderMark?.(step.status, step.position) ?? (step.status === \"complete\" ? \"✓\" : step.status === \"error\" ? \"!\" : step.position)}</span>\n {vertical || index === steps.length - 1 ? null : <span className=\"hjm-steps__connector\" />}\n </div>\n <div className=\"hjm-steps__copy\">\n <span className=\"hjm-steps__label\">{step.label}</span>\n {step.description !== undefined && (!vertical || cursor) ? <span className=\"hjm-steps__description\">{step.description}</span> : null}\n {vertical ? <span className=\"hjm-steps__status\" aria-hidden=\"true\">{step.statusLabel}</span> : null}\n <span className=\"hjm-visually-hidden\" id={`${statusId}-${index}`}>{step.statusLabel}</span>\n </div>\n </>;\n return <li className=\"hjm-steps__step\" data-status={step.status} key={step.id}>\n {pressable ? <button type=\"button\" className=\"hjm-steps__press\" aria-label={step.accessibleName} aria-describedby={`${statusId}-${index}`}\n aria-current={isCurrent ? \"step\" : undefined} onClick={() => onStepPress(step.id)}>{content}</button>\n : <div className=\"hjm-steps__item\" aria-label={step.accessibleName} aria-describedby={`${statusId}-${index}`} aria-current={isCurrent ? \"step\" : undefined}>{content}</div>}\n {presentation === \"vertical\" && cursor && renderStepContent ? <div className=\"hjm-steps__body\">{renderStepContent(step.id)}</div> : null}\n </li>;\n })}\n </ol>;\n return compact ? <div className=\"hjm-steps-compact\" style={layoutStyle}>\n <div className=\"hjm-steps-compact__header\">\n <span aria-hidden=\"true\">{current.position} / {current.total} · {current.label}<span className=\"hjm-steps__status\"> · {current.statusLabel}</span></span>\n <button type=\"button\" className=\"hjm-steps-compact__toggle\" aria-expanded={expanded} aria-controls={props.id ?? `${statusId}-list`} onClick={() => setExpanded(value => !value)}>\n {overviewLabel}<span aria-hidden=\"true\">{expanded ? \"⌃\" : \"⌄\"}</span>\n </button>\n </div>{list}\n </div> : list;\n});\n"]}
|
package/dist/styles.css
CHANGED
|
@@ -88,6 +88,11 @@
|
|
|
88
88
|
opts out because clipping cuts off its own shadow. */
|
|
89
89
|
.hjm-surface[data-clips="true"] { overflow: hidden; }
|
|
90
90
|
.hjm-surface[data-tone="raised"] { background: var(--hjm-color-bg); box-shadow: var(--hjm-surface-raised-shadow, var(--hjm-shadow-raised)); }
|
|
91
|
+
/* Surface `elevation` (shadow token steps, 2026-10-23) overrides the tone's shadow; declared after the tone rule. */
|
|
92
|
+
.hjm-surface[data-elevation="none"] { box-shadow: var(--hjm-surface-inset-shadow, none); }
|
|
93
|
+
.hjm-surface[data-elevation="raised"] { box-shadow: var(--hjm-surface-raised-shadow, var(--hjm-shadow-raised)); }
|
|
94
|
+
.hjm-surface[data-elevation="floating"] { box-shadow: var(--hjm-shadow-floating); }
|
|
95
|
+
.hjm-surface[data-elevation="overlay"] { box-shadow: var(--hjm-shadow-overlay); }
|
|
91
96
|
.hjm-surface[data-tone="accent"] { background: var(--hjm-color-bg); }
|
|
92
97
|
.hjm-surface[data-tone="sunken"] { background: var(--hjm-color-bg); }
|
|
93
98
|
.hjm-surface[data-tone="subtle"] { background: var(--hjm-color-bg); }
|
|
@@ -268,7 +273,8 @@
|
|
|
268
273
|
/* Toggle treatment: aria-pressed already carried the state, so without a paired
|
|
269
274
|
visual every consumer painted the selected background in product styles.
|
|
270
275
|
Selection uses content color without an added border (2026-10-10 user request); focus stays separate. */
|
|
271
|
-
|
|
276
|
+
/* IconButtonLink `current` (aria-current="page") reuses the selected surface: iconButtonRecipe.states.selected. */
|
|
277
|
+
.hjm-button[data-selected="true"], .hjm-icon-button[data-selected="true"], .hjm-icon-button[aria-current="page"] { color: var(--hjm-color-text); background: var(--hjm-color-surface-selected); border-color: transparent; }
|
|
272
278
|
.hjm-button:active:not(:disabled):not([aria-disabled="true"]), .hjm-icon-button:active:not(:disabled):not([aria-disabled="true"]) { opacity: var(--hjm-button-pressed-opacity); }
|
|
273
279
|
/* data-state="disabled" also covers focusable boundaries (aria-disabled, e.g. Carousel previous on the first slide),
|
|
274
280
|
which looked enabled while Native dimmed them (2026-10-17 review E9). */
|
|
@@ -306,6 +312,8 @@
|
|
|
306
312
|
}
|
|
307
313
|
.hjm-icon-button {
|
|
308
314
|
position: relative;
|
|
315
|
+
/* IconButtonLink draws the same frame on an anchor. */
|
|
316
|
+
text-decoration: none;
|
|
309
317
|
inline-size: var(--hjm-control-button-medium);
|
|
310
318
|
block-size: var(--hjm-control-button-medium);
|
|
311
319
|
min-inline-size: var(--hjm-control-min-touch-target);
|
|
@@ -314,6 +322,10 @@
|
|
|
314
322
|
border-radius: var(--hjm-radius-md);
|
|
315
323
|
}
|
|
316
324
|
.hjm-icon-button[data-shape="circle"] { border-radius: var(--hjm-radius-full); }
|
|
325
|
+
/* IconButton `elevation` (iconButtonRecipe.elevation, 2026-10-23): a floating control's lift from the shadow tokens. */
|
|
326
|
+
.hjm-icon-button[data-elevation="raised"] { box-shadow: var(--hjm-shadow-raised); }
|
|
327
|
+
.hjm-icon-button[data-elevation="floating"] { box-shadow: var(--hjm-shadow-floating); }
|
|
328
|
+
.hjm-icon-button[data-elevation="overlay"] { box-shadow: var(--hjm-shadow-overlay); }
|
|
317
329
|
.hjm-icon-button[data-size="small"] { inline-size: var(--hjm-control-button-small); block-size: var(--hjm-control-button-small); min-inline-size: 0; min-block-size: 0; }
|
|
318
330
|
.hjm-icon-button[data-size="small"]::after { content: ""; position: absolute; inset: calc(-1 * var(--hjm-button-hit-slop, var(--hjm-space-xxs))); }
|
|
319
331
|
.hjm-icon-button[data-size="large"] { inline-size: var(--hjm-control-button-large); block-size: var(--hjm-control-button-large); }
|
|
@@ -334,6 +346,9 @@
|
|
|
334
346
|
takes the same overhang and the badge keeps the icon's corner (2026-10-17 1.27.2 adoption: Spint's top-bar bell). */
|
|
335
347
|
.hjm-notification-bell:is([data-edge="start"], [data-edge="both"]) { margin-inline-start: calc(-1 * var(--hjm-icon-button-edge-small)); }
|
|
336
348
|
.hjm-notification-bell:is([data-edge="end"], [data-edge="both"]) { margin-inline-end: calc(-1 * var(--hjm-icon-button-edge-small)); }
|
|
349
|
+
/* Count badge (iconButtonRecipe.badge / resolveIconButtonBadgeOffset, 2026-10-23 web check): on the button's end edge,
|
|
350
|
+
raised above the glyph slot so only the floating ring overlaps the glyph. The bell is always the small IconButton. */
|
|
351
|
+
.hjm-notification-bell__badge { position: absolute; inset-inline-end: var(--hjm-icon-button-badge-inline-end-small); inset-block-start: var(--hjm-icon-button-badge-block-start-small); display: flex; pointer-events: none; }
|
|
337
352
|
.hjm-link { display: inline-flex; align-items: center; gap: var(--hjm-space-xxs); max-inline-size: 100%; min-inline-size: 0; overflow-wrap: anywhere; color: var(--hjm-color-content-brand); text-underline-offset: 0.18em; }
|
|
338
353
|
.hjm-link[data-tone="neutral"] { color: var(--hjm-color-text-body); }
|
|
339
354
|
.hjm-link[data-variant="standalone"] { min-block-size: var(--hjm-control-min-touch-target); min-inline-size: var(--hjm-control-min-touch-target); justify-content: center; text-decoration: none; }
|
|
@@ -389,7 +404,7 @@
|
|
|
389
404
|
the support text fades, so a custom Field control dims without needing a class. A component
|
|
390
405
|
recipe value (Select, NumberField, OtpField, SearchField, PasswordField) arrives as an
|
|
391
406
|
inline --hjm-field-disabled-opacity on the root. */
|
|
392
|
-
.hjm-field[data-state="disabled"] > :not(.hjm-field__description):not(.hjm-field__error):not([data-hjm-field-error]) { opacity: var(--hjm-field-disabled-opacity); }
|
|
407
|
+
.hjm-field[data-state="disabled"] > :not(.hjm-field__description):not(.hjm-field__count):not(.hjm-field__error):not([data-hjm-field-error]) { opacity: var(--hjm-field-disabled-opacity); }
|
|
393
408
|
/* The editable minimum excludes both resolved borders, keeping the field footprint stable in invalid state. */
|
|
394
409
|
.hjm-field__input {
|
|
395
410
|
inline-size: 100%;
|
|
@@ -422,6 +437,14 @@
|
|
|
422
437
|
.hjm-field__affix { display: inline-flex; align-items: center; color: var(--hjm-color-text-muted); }
|
|
423
438
|
.hjm-field__description, .hjm-choice__description { color: var(--hjm-color-text-muted); font-size: var(--hjm-type-label-size); line-height: var(--hjm-type-label-line-height); }
|
|
424
439
|
.hjm-field__error { color: var(--hjm-color-danger); font-size: var(--hjm-type-label-size); line-height: var(--hjm-type-label-line-height); }
|
|
440
|
+
/* characterCountRecipe (2026-10-23): label type, sentence and counter on one row with spacing.sm between, the counter
|
|
441
|
+
at the end in tabular numbers. short/over switch the row to danger and the counter to semibold, so the error is
|
|
442
|
+
not carried by color alone. Support text, so it keeps full contrast in the disabled scope like the description. */
|
|
443
|
+
.hjm-field__count { display: flex; align-items: flex-start; gap: var(--hjm-space-sm); color: var(--hjm-color-text-muted); font-size: var(--hjm-type-label-size); line-height: var(--hjm-type-label-line-height); }
|
|
444
|
+
.hjm-field__count-message { flex: 1 1 auto; min-inline-size: 0; }
|
|
445
|
+
.hjm-field__counter { flex: 0 0 auto; margin-inline-start: auto; font-variant-numeric: tabular-nums; font-weight: var(--hjm-font-weight-regular); }
|
|
446
|
+
.hjm-field__count[data-invalid] { color: var(--hjm-color-danger); }
|
|
447
|
+
.hjm-field__count[data-invalid] .hjm-field__counter { font-weight: var(--hjm-font-weight-semibold); }
|
|
425
448
|
/* searchFieldRecipe.sizes.* (emitted by theme.ts): medium padding 12 · gap 8 · clear 36 + slop 4, large 52 high ·
|
|
426
449
|
padding 16 · gap 12 · clear 44. Size is applied to the input by TextField; size the control from that public attribute. */
|
|
427
450
|
.hjm-search-field .hjm-field__control { padding-inline: var(--hjm-search-field-padding-medium, var(--hjm-space-sm)); gap: var(--hjm-search-field-gap-medium, var(--hjm-space-xs)); }
|
|
@@ -877,6 +900,14 @@
|
|
|
877
900
|
.hjm-choice[data-presentation="chips"][data-size="small"] { min-block-size: 36px; padding-inline: var(--hjm-space-sm); }
|
|
878
901
|
.hjm-choice[data-presentation="chips"][data-size="small"]::after { content: ""; position: absolute; inset: -4px 0; }
|
|
879
902
|
.hjm-choice[data-presentation="chips"].hjm-choice--with-action { padding: 0; }
|
|
903
|
+
/* selectionGroupRecipe.overflow (2026-10-23): CheckboxGroup chips on one scrolling line, the same meaning as
|
|
904
|
+
SegmentedControl overflow="scroll". The scrollport keeps scrollInset (spacing.xxs 4) on every side so the focus ring
|
|
905
|
+
(2 + offset 2) and the small chip hit slop are not clipped and the last chip ends like the first starts; the
|
|
906
|
+
negative margin keeps the chips aligned with the column. The items row sits inside the scroller, so the chip row
|
|
907
|
+
rule above (a direct-child selector) is restated here. */
|
|
908
|
+
.hjm-checkbox-group__scroller { min-inline-size: 0; overflow-x: auto; padding: var(--hjm-space-xxs); margin: calc(-1 * var(--hjm-space-xxs)); }
|
|
909
|
+
.hjm-checkbox-group[data-presentation="chips"][data-overflow="scroll"] .hjm-checkbox-group__items { flex-direction: row; flex-wrap: nowrap; gap: var(--hjm-space-xs); inline-size: max-content; }
|
|
910
|
+
.hjm-checkbox-group[data-presentation="chips"][data-overflow="scroll"] .hjm-choice { flex-shrink: 0; }
|
|
880
911
|
.hjm-choice[data-presentation="chips"] > .hjm-choice__target { padding-block: 0; }
|
|
881
912
|
.hjm-choice[data-presentation="chips"] .hjm-choice__indicator { display: none; }
|
|
882
913
|
.hjm-choice[data-presentation="chips"] .hjm-choice__leading { color: inherit; }
|
|
@@ -980,6 +1011,9 @@
|
|
|
980
1011
|
.hjm-badge[data-variant="outline"][data-tone="warning"] { background: transparent; color: var(--hjm-accent-warning); border-color: color-mix(in srgb, var(--hjm-accent-warning) 30%, transparent); }
|
|
981
1012
|
.hjm-badge[data-tone="attention"] { background: var(--hjm-accent-fill-attention); }
|
|
982
1013
|
.hjm-badge[data-variant="outline"][data-tone="attention"] { background: transparent; color: var(--hjm-accent-attention); border-color: color-mix(in srgb, var(--hjm-accent-attention) 30%, transparent); }
|
|
1014
|
+
/* Product classification color (Badge categoryColor): the renderer resolves fill, ink and stroke per theme and checks AA. */
|
|
1015
|
+
.hjm-badge[data-tone="category"] { color: var(--hjm-badge-category-content); background: var(--hjm-badge-category-background); }
|
|
1016
|
+
.hjm-badge[data-variant="outline"][data-tone="category"] { background: transparent; border-color: var(--hjm-badge-category-border); }
|
|
983
1017
|
.hjm-tag[data-tone="info"] { color: var(--hjm-accent-info); background: color-mix(in srgb, var(--hjm-accent-info) 14%, transparent); border-color: color-mix(in srgb, var(--hjm-accent-info) 30%, transparent); }
|
|
984
1018
|
.hjm-tag[data-tone="success"] { color: var(--hjm-accent-success); background: color-mix(in srgb, var(--hjm-accent-success) 14%, transparent); border-color: color-mix(in srgb, var(--hjm-accent-success) 30%, transparent); }
|
|
985
1019
|
.hjm-tag[data-tone="attention"] { color: var(--hjm-accent-attention); background: color-mix(in srgb, var(--hjm-accent-attention) 14%, transparent); border-color: color-mix(in srgb, var(--hjm-accent-attention) 30%, transparent); }
|
|
@@ -1057,10 +1091,17 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
1057
1091
|
baseline 2–2.5px above the row center (2026-10-17 measured audit); a flex
|
|
1058
1092
|
box centers any trailing node like Native's row-centered View. */
|
|
1059
1093
|
.hjm-list-row__trailing { display: flex; align-items: center; }
|
|
1094
|
+
/* Disclosure mark (listRowRecipe.accessories): decorative content.decorative chevron after any trailing value, inside the
|
|
1095
|
+
row command. The row gap applies before it; a preceding trailing value pulls it to the tighter accessory gap. */
|
|
1096
|
+
.hjm-list-row__accessory { flex: 0 0 auto; display: flex; align-items: center; color: var(--hjm-color-text-weak); }
|
|
1097
|
+
.hjm-list-row__accessory .hjm-icon { color: inherit; }
|
|
1098
|
+
.hjm-list-row__trailing + .hjm-list-row__accessory { margin-inline-start: calc(var(--hjm-list-row-accessory-gap) - var(--hjm-list-row-gap)); }
|
|
1060
1099
|
/* `leadingSize` was declared by the recipe but unbound, so consumers rebuilt
|
|
1061
1100
|
the avatar box in product styles. */
|
|
1062
1101
|
.hjm-list-row__leading { display: flex; align-items: center; justify-content: center; inline-size: var(--hjm-list-row-leading-size); block-size: var(--hjm-list-row-leading-size); overflow: hidden; }
|
|
1063
1102
|
.hjm-list-row__leading[data-shape="circle"] { border-radius: var(--hjm-radius-full); }
|
|
1103
|
+
/* ChoiceRow sheet item picture: the row leading box (choiceRowRecipe.itemLeading), empty for items without one. */
|
|
1104
|
+
.hjm-choice-row__item-leading { display: flex; align-items: center; justify-content: center; inline-size: var(--hjm-choice-row-item-leading-size); block-size: var(--hjm-choice-row-item-leading-size); overflow: hidden; }
|
|
1064
1105
|
/* Photo source peers share ListRow geometry; only their decorative brand plate is specialized. */
|
|
1065
1106
|
.hjm-photo-source__icon { display: grid; place-items: center; inline-size: 100%; block-size: 100%; border-radius: var(--hjm-radius-md); }
|
|
1066
1107
|
.hjm-photo-source__icon svg { inline-size: 24px; block-size: 24px; }
|
|
@@ -1508,7 +1549,8 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
1508
1549
|
font-size: var(--hjm-type-label-size);
|
|
1509
1550
|
line-height: var(--hjm-type-label-line-height);
|
|
1510
1551
|
}
|
|
1511
|
-
.
|
|
1552
|
+
/* chartRecipe.legend.layouts: stack = one row per series; inline = entries flow and wrap (base rule above). */
|
|
1553
|
+
.hjm-chart-legend[data-layout="stack"] { flex-direction: column; flex-wrap: nowrap; }
|
|
1512
1554
|
.hjm-chart-legend__item, .hjm-chart-legend__button { display: flex; align-items: center; gap: var(--hjm-space-xs); }
|
|
1513
1555
|
.hjm-chart-legend__item[data-dimmed] { opacity: 0.5; }
|
|
1514
1556
|
.hjm-chart-legend__button {
|
|
@@ -1527,7 +1569,8 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
1527
1569
|
.hjm-chart-legend__button[aria-pressed="true"] { background: var(--hjm-color-surface); }
|
|
1528
1570
|
.hjm-chart-legend__button:focus-visible { outline: var(--hjm-focus-width) solid var(--hjm-color-focus); outline-offset: var(--hjm-focus-offset); }
|
|
1529
1571
|
.hjm-chart-legend__swatch { flex: none; inline-size: 10px; block-size: 10px; border-radius: 3px; }
|
|
1530
|
-
.hjm-chart-legend[data-
|
|
1572
|
+
.hjm-chart-legend[data-layout="stack"] .hjm-chart-legend__label { flex: 1; }
|
|
1573
|
+
.hjm-chart-legend[data-layout="inline"] .hjm-chart-legend__button { flex: none; }
|
|
1531
1574
|
.hjm-chart-legend__value { font-weight: var(--hjm-text-emphasis-medium); font-variant-numeric: tabular-nums; }
|
|
1532
1575
|
|
|
1533
1576
|
/* Mentions ---------------------------------------------------------------- */
|
|
@@ -2119,6 +2162,7 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
2119
2162
|
font-weight: var(--hjm-top-title-weight);
|
|
2120
2163
|
overflow-wrap: anywhere;
|
|
2121
2164
|
}
|
|
2165
|
+
.hjm-top__title[data-line-breaks="preserve"] { white-space: pre-line; }
|
|
2122
2166
|
.hjm-top__trailing { display: flex; flex: 0 0 auto; align-items: center; gap: var(--hjm-space-xs); }
|
|
2123
2167
|
.hjm-top__description {
|
|
2124
2168
|
margin: var(--hjm-space-xs) 0 0;
|
|
@@ -2798,6 +2842,11 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
2798
2842
|
/* Baseline sharing put the smaller caption 1.5px under the label's center; center it on the label's first line instead. */
|
|
2799
2843
|
.hjm-timeline__timestamp { color: var(--hjm-color-text-muted); font-size: var(--hjm-type-caption-size); line-height: var(--hjm-type-caption-line-height); }
|
|
2800
2844
|
.hjm-timeline__description { color: var(--hjm-color-text-body); white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
2845
|
+
/* Selectable record (timelineRecipe.item.selected): the neutral persistent-selection surface + ring shared with ListRow.
|
|
2846
|
+
Selection outranks passive emphasis; the focus ring stays the shared focus role. */
|
|
2847
|
+
.hjm-timeline[data-selectable] .hjm-timeline__item { cursor: pointer; }
|
|
2848
|
+
.hjm-timeline__item[aria-selected="true"] { background: var(--hjm-color-surface-selected); box-shadow: inset 0 0 0 1px var(--hjm-color-border-control); }
|
|
2849
|
+
.hjm-timeline__item[role="option"]:focus-visible { outline: var(--hjm-focus-width) solid var(--hjm-color-focus); outline-offset: var(--hjm-focus-offset); }
|
|
2801
2850
|
.hjm-accordion { border-block-start: 1px solid var(--hjm-color-border); }
|
|
2802
2851
|
.hjm-accordion__item { border-block-end: 1px solid var(--hjm-color-border); }
|
|
2803
2852
|
.hjm-accordion__header { margin: 0; }
|
|
@@ -2824,28 +2873,44 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
2824
2873
|
.hjm-accordion__indicator { flex: 0 0 auto; color: var(--hjm-color-text-muted); }
|
|
2825
2874
|
.hjm-accordion__panel { padding: 0 var(--hjm-space-xs) var(--hjm-space-md); color: var(--hjm-color-text-body); overflow-wrap: anywhere; }
|
|
2826
2875
|
.hjm-avatar {
|
|
2876
|
+
/* Diameter from avatarRecipe.sizes via --hjm-avatar-size (set inline by Avatar). The frame no longer clips
|
|
2877
|
+
the root so a corner accessory can sit on the edge; the image and fallback clip to the shape themselves. */
|
|
2878
|
+
position: relative;
|
|
2879
|
+
box-sizing: border-box;
|
|
2827
2880
|
display: inline-grid;
|
|
2881
|
+
flex: 0 0 auto;
|
|
2828
2882
|
place-items: center;
|
|
2829
|
-
inline-size: 2.5rem;
|
|
2830
|
-
block-size: 2.5rem;
|
|
2831
|
-
overflow: hidden;
|
|
2883
|
+
inline-size: var(--hjm-avatar-size, 2.5rem);
|
|
2884
|
+
block-size: var(--hjm-avatar-size, 2.5rem);
|
|
2832
2885
|
border: 1px solid var(--hjm-color-border);
|
|
2833
2886
|
border-radius: 50%;
|
|
2834
2887
|
color: var(--hjm-color-text-muted);
|
|
2835
2888
|
background: var(--hjm-color-bg);
|
|
2836
2889
|
font-weight: var(--hjm-text-emphasis-strong);
|
|
2837
2890
|
}
|
|
2838
|
-
.hjm-avatar[data-size="
|
|
2839
|
-
.hjm-avatar[data-size="
|
|
2840
|
-
.hjm-avatar[data-size="xlarge"] { inline-size: 4rem; block-size: 4rem; font-size: var(--hjm-type-title-size); }
|
|
2891
|
+
.hjm-avatar[data-size="xxsmall"], .hjm-avatar[data-size="xsmall"], .hjm-avatar[data-size="small"] { font-size: var(--hjm-type-label-size); }
|
|
2892
|
+
.hjm-avatar[data-size="xlarge"] { font-size: var(--hjm-type-title-size); }
|
|
2841
2893
|
.hjm-avatar[data-shape="rounded"] { border-radius: var(--hjm-radius-md); }
|
|
2842
|
-
.
|
|
2843
|
-
.hjm-
|
|
2894
|
+
/* avatarRecipe.frames: surface drops the border, none drops border and background. */
|
|
2895
|
+
.hjm-avatar[data-frame="surface"] { border-width: 0; }
|
|
2896
|
+
.hjm-avatar[data-frame="none"] { border-width: 0; background: transparent; }
|
|
2897
|
+
.hjm-avatar__image { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; border-radius: inherit; }
|
|
2898
|
+
.hjm-avatar__fallback { display: grid; place-items: center; inline-size: 100%; block-size: 100%; overflow: hidden; border-radius: inherit; }
|
|
2899
|
+
/* avatarRecipe.accessory.offset (outward overhang, 0): the mark sits on the avatar's box corner so the row layout does not move. */
|
|
2900
|
+
.hjm-avatar__accessory { position: absolute; inset-inline-end: var(--hjm-avatar-accessory-inset, 0px); display: inline-flex; line-height: 0; }
|
|
2901
|
+
.hjm-avatar__accessory[data-placement="bottom-end"] { inset-block-end: var(--hjm-avatar-accessory-inset, 0px); }
|
|
2902
|
+
.hjm-avatar__accessory[data-placement="top-end"] { inset-block-start: var(--hjm-avatar-accessory-inset, 0px); }
|
|
2844
2903
|
.hjm-divider { flex: 0 0 auto; margin: 0; border: 0; background: var(--hjm-color-border); }
|
|
2845
2904
|
.hjm-divider[data-orientation="horizontal"] { inline-size: 100%; block-size: 1px; }
|
|
2846
2905
|
.hjm-divider[data-orientation="vertical"] { align-self: stretch; inline-size: 1px; min-block-size: var(--hjm-control-min-touch-target); }
|
|
2847
2906
|
.hjm-divider[data-orientation="horizontal"][data-inset="start"] { margin-inline-start: var(--hjm-space-md); inline-size: calc(100% - var(--hjm-space-md)); }
|
|
2848
2907
|
.hjm-divider[data-orientation="horizontal"][data-inset="both"] { margin-inline: var(--hjm-space-md); inline-size: calc(100% - (2 * var(--hjm-space-md))); }
|
|
2908
|
+
/* lineStyle="dashed" (dividerRecipe.lineStyles.dashed): exact dash/gap from the recipe instead of the browser's own
|
|
2909
|
+
dashed border, so Web and Native draw the same 4/4 rhythm starting with a dash at the line's start edge. */
|
|
2910
|
+
.hjm-divider[data-line-style="dashed"] { --hjm-divider-pattern: var(--hjm-color-border) 0 var(--hjm-divider-dash), transparent var(--hjm-divider-dash) calc(var(--hjm-divider-dash) + var(--hjm-divider-gap)); }
|
|
2911
|
+
.hjm-divider[data-line-style="dashed"][data-orientation="horizontal"] { background: repeating-linear-gradient(to right, var(--hjm-divider-pattern)); }
|
|
2912
|
+
.hjm-divider[data-line-style="dashed"][data-orientation="horizontal"]:dir(rtl) { background: repeating-linear-gradient(to left, var(--hjm-divider-pattern)); }
|
|
2913
|
+
.hjm-divider[data-line-style="dashed"][data-orientation="vertical"] { background: repeating-linear-gradient(to bottom, var(--hjm-divider-pattern)); }
|
|
2849
2914
|
.hjm-description-list { display: grid; grid-template-columns: repeat(var(--hjm-description-columns), minmax(0, 1fr)); gap: var(--hjm-space-sm); margin: 0; }
|
|
2850
2915
|
.hjm-description-list__item { min-inline-size: 0; display: grid; gap: var(--hjm-space-xxs); }
|
|
2851
2916
|
.hjm-description-list__label { color: var(--hjm-color-text-muted); font-size: var(--hjm-type-label-size); font-weight: var(--hjm-text-emphasis-medium); }
|
|
@@ -2899,28 +2964,48 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
2899
2964
|
.hjm-load-more__spinner { inline-size: 1em; block-size: 1em; border: 2px solid var(--hjm-color-content-brand); border-inline-end-color: transparent; border-radius: 50%; animation: hjm-spin 800ms linear infinite; }
|
|
2900
2965
|
|
|
2901
2966
|
/* Expansion renderers --------------------------------------------------- */
|
|
2902
|
-
|
|
2903
|
-
.hjm-
|
|
2904
|
-
.hjm-
|
|
2905
|
-
.hjm-
|
|
2906
|
-
.hjm-
|
|
2907
|
-
.hjm-
|
|
2908
|
-
.hjm-
|
|
2909
|
-
.hjm-steps__step[data-status="
|
|
2910
|
-
|
|
2911
|
-
.hjm-steps__connector[data-reached="true"] { background:
|
|
2912
|
-
.hjm-steps__step[data-status="error"] .hjm-steps__indicator { border:
|
|
2913
|
-
.hjm-steps__copy { min-inline-size:
|
|
2914
|
-
.hjm-steps__label { color:
|
|
2915
|
-
.hjm-steps__step[data-status="
|
|
2916
|
-
.hjm-steps__step[data-status="
|
|
2917
|
-
|
|
2918
|
-
.hjm-steps__step:last-child .hjm-steps__rail { justify-content:
|
|
2919
|
-
.hjm-steps__step:last-child .hjm-steps__copy { padding-inline-end:
|
|
2920
|
-
.hjm-steps__description { color:
|
|
2921
|
-
|
|
2922
|
-
.hjm-steps__press
|
|
2923
|
-
.hjm-steps__press:
|
|
2967
|
+
/* Focus rail is shared by ordinary Steps and the expandable presentations (2026-10-23 user proposal). */
|
|
2968
|
+
.hjm-steps { display:grid; grid-template-columns:repeat(var(--hjm-steps-connector-count),minmax(0,1fr)) fit-content(calc(100% / var(--hjm-steps-count))); gap:0; margin:0; padding:0 var(--hjm-steps-inset); list-style:none; }
|
|
2969
|
+
.hjm-steps__step { min-inline-size:0; position:relative; }
|
|
2970
|
+
.hjm-steps__item,.hjm-steps__press { display:grid; align-content:start; gap:var(--hjm-space-xs); min-inline-size:0; min-block-size:var(--hjm-steps-press-target); }
|
|
2971
|
+
.hjm-steps__rail { display:flex; align-items:center; min-inline-size:0; }
|
|
2972
|
+
.hjm-steps__indicator { flex:0 0 auto; inline-size:var(--hjm-steps-indicator-size); block-size:var(--hjm-steps-indicator-size); display:grid; place-items:center; border:1px solid var(--hjm-color-border); border-radius:50%; color:var(--hjm-color-text-muted); background:var(--hjm-color-bg); font-size:var(--hjm-type-label-size); font-weight:var(--hjm-text-emphasis-medium); transition:background-color var(--hjm-steps-duration),color var(--hjm-steps-duration),border-color var(--hjm-steps-duration),transform var(--hjm-motion-fast); }
|
|
2973
|
+
.hjm-steps__connector { flex:1 1 auto; block-size:1px; background:var(--hjm-color-border); transition:background-color var(--hjm-steps-duration); }
|
|
2974
|
+
.hjm-steps__step[data-status="current"] .hjm-steps__indicator { border-color:var(--hjm-color-text); background:var(--hjm-color-text); color:var(--hjm-color-bg); box-shadow:0 0 0 3px var(--hjm-color-bg),0 0 0 4px var(--hjm-color-border); }
|
|
2975
|
+
.hjm-steps__step[data-status="complete"] .hjm-steps__indicator { border-color:var(--hjm-color-border-control); color:var(--hjm-color-text); }
|
|
2976
|
+
.hjm-steps__step[data-status="complete"] .hjm-steps__connector,.hjm-steps__connector[data-reached="true"] { background:var(--hjm-color-text); }
|
|
2977
|
+
.hjm-steps__step[data-status="error"] .hjm-steps__indicator { border:2px solid var(--hjm-color-danger); color:var(--hjm-color-danger); background:color-mix(in srgb,var(--hjm-color-danger) 12%,var(--hjm-color-bg)); }
|
|
2978
|
+
.hjm-steps__copy { min-inline-size:0; display:grid; gap:var(--hjm-space-xxs); padding-inline-end:var(--hjm-space-sm); }
|
|
2979
|
+
.hjm-steps__label { color:var(--hjm-color-text); font-size:var(--hjm-type-label-size); line-height:var(--hjm-type-label-line-height); overflow-wrap:anywhere; }
|
|
2980
|
+
.hjm-steps__step[data-status="current"] .hjm-steps__label { font-weight:var(--hjm-text-emphasis-medium); }
|
|
2981
|
+
.hjm-steps__step[data-status="pending"] .hjm-steps__label { color:var(--hjm-color-text-muted); }
|
|
2982
|
+
.hjm-steps__step[data-status="error"] .hjm-steps__label { color:var(--hjm-color-danger); }
|
|
2983
|
+
.hjm-steps__step:last-child .hjm-steps__rail { justify-content:flex-end; }
|
|
2984
|
+
.hjm-steps__step:last-child .hjm-steps__copy { padding-inline-end:0; text-align:end; }
|
|
2985
|
+
.hjm-steps__description,.hjm-steps__status { color:var(--hjm-color-text-muted); font-size:var(--hjm-type-caption-size); overflow-wrap:anywhere; }
|
|
2986
|
+
.hjm-steps__press { width:100%; margin:0; padding:0; border:0; background:none; color:inherit; font:inherit; text-align:start; cursor:pointer; }
|
|
2987
|
+
.hjm-steps__press:focus-visible,.hjm-steps-compact__toggle:focus-visible { outline:var(--hjm-focus-width) solid var(--hjm-color-focus); outline-offset:var(--hjm-focus-offset); border-radius:var(--hjm-radius-sm); }
|
|
2988
|
+
@media(hover:hover) { .hjm-steps__press:hover .hjm-steps__indicator { transform:translateY(-2px); } }
|
|
2989
|
+
.hjm-steps__press:active .hjm-steps__indicator { transform:scale(.96); }
|
|
2990
|
+
/* A product illustration keeps its own colors and must not disappear into the current fill. */
|
|
2991
|
+
.hjm-steps[data-custom-mark] .hjm-steps__indicator { background:var(--hjm-color-bg); color:var(--hjm-color-text); }
|
|
2992
|
+
.hjm-steps[data-presentation="vertical"],.hjm-steps[data-presentation="compact"][data-expanded="true"] { display:flex; flex-direction:column; }
|
|
2993
|
+
.hjm-steps:is([data-presentation="vertical"],[data-presentation="compact"][data-expanded="true"]) .hjm-steps__step { padding-block-end:var(--hjm-space-md); }
|
|
2994
|
+
.hjm-steps:is([data-presentation="vertical"],[data-presentation="compact"][data-expanded="true"]) .hjm-steps__step:not(:last-child)::before { content:""; position:absolute; inset-inline-start:calc(var(--hjm-steps-indicator-size) / 2); inset-block-start:var(--hjm-steps-indicator-size); inset-block-end:0; inline-size:1px; background:var(--hjm-color-border); }
|
|
2995
|
+
.hjm-steps:is([data-presentation="vertical"],[data-presentation="compact"][data-expanded="true"]) :is(.hjm-steps__item,.hjm-steps__press) { grid-template-columns:var(--hjm-steps-indicator-size) minmax(0,1fr); align-items:center; column-gap:var(--hjm-space-md); }
|
|
2996
|
+
.hjm-steps:is([data-presentation="vertical"],[data-presentation="compact"][data-expanded="true"]) .hjm-steps__copy { text-align:start; }
|
|
2997
|
+
.hjm-steps__body { margin-inline-start:calc(var(--hjm-steps-indicator-size) + var(--hjm-space-md)); padding-block:var(--hjm-space-sm); }
|
|
2998
|
+
.hjm-steps-compact { min-inline-size:0; }
|
|
2999
|
+
.hjm-steps-compact__header { display:flex; align-items:center; justify-content:space-between; gap:var(--hjm-space-sm); margin-block-end:var(--hjm-space-xs); font-size:var(--hjm-type-label-size); }
|
|
3000
|
+
.hjm-steps-compact__toggle { display:flex; align-items:center; gap:var(--hjm-space-xs); flex-shrink:0; min-block-size:44px; padding:0; border:0; background:none; font:inherit; color:var(--hjm-color-text-muted); cursor:pointer; }
|
|
3001
|
+
.hjm-steps[data-presentation="compact"][data-expanded="false"] { display:flex; gap:var(--hjm-space-xxs); padding:0; }
|
|
3002
|
+
.hjm-steps[data-presentation="compact"][data-expanded="false"] .hjm-steps__step { flex:1; height:var(--hjm-steps-segment-height); background:var(--hjm-color-border); border-radius:var(--hjm-radius-full); }
|
|
3003
|
+
.hjm-steps[data-presentation="compact"][data-expanded="false"] .hjm-steps__step:is([data-status="complete"],[data-status="current"]) { background:var(--hjm-color-text); }
|
|
3004
|
+
.hjm-steps[data-presentation="compact"][data-expanded="false"] .hjm-steps__step[data-status="error"] { background:var(--hjm-color-danger); }
|
|
3005
|
+
.hjm-steps[data-presentation="compact"][data-expanded="false"] .hjm-steps__item { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); min-block-size:0; }
|
|
3006
|
+
@media(prefers-reduced-motion:reduce) { .hjm-steps * { transition:none!important; transform:none!important; } }
|
|
3007
|
+
.hjm-root[data-motion="reduced"] .hjm-steps * { transition:none!important; transform:none!important; }
|
|
3008
|
+
|
|
2924
3009
|
|
|
2925
3010
|
.hjm-file-picker { display: grid; gap: var(--hjm-space-xs); }
|
|
2926
3011
|
.hjm-file-picker__label { color: var(--hjm-color-text); font-weight: var(--hjm-text-emphasis-medium); }
|
|
@@ -3277,7 +3362,11 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
3277
3362
|
.hjm-watermark { position: relative; isolation: isolate; }
|
|
3278
3363
|
.hjm-watermark__content { position: relative; z-index: 0; overflow-wrap: anywhere; }
|
|
3279
3364
|
.hjm-watermark__overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none; user-select: none; overflow: hidden; color: var(--hjm-color-text-sub); font: inherit; }
|
|
3280
|
-
.
|
|
3365
|
+
/* Stacking and fill come from affixRecipe.defaults (layer sticky = --hjm-layer-sticky 100, fill canvas); the box is always
|
|
3366
|
+
positioned (sticky or relative), so z-index applies in both the pinned and the released state. */
|
|
3367
|
+
.hjm-affix { z-index: var(--hjm-layer-sticky); color: var(--hjm-color-text); background: var(--hjm-color-bg); overflow-wrap: anywhere; }
|
|
3368
|
+
.hjm-affix[data-layer="base"] { z-index: var(--hjm-layer-base); }
|
|
3369
|
+
.hjm-affix[data-fill="none"] { background: transparent; }
|
|
3281
3370
|
.hjm-affix__marker { display: block; block-size: 0; pointer-events: none; }
|
|
3282
3371
|
|
|
3283
3372
|
/* Sidebar presentation decorates fixed link boxes; no pointer/focus target is transformed. */
|
|
@@ -3387,6 +3476,12 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
3387
3476
|
/* contentInset="none" hands every inset to the host: no footer rule, as on Native (BottomCTA then draws its own bar). */
|
|
3388
3477
|
.hjm-screen[data-content-inset="none"] > .hjm-screen__footer { border-block-start: 0; }
|
|
3389
3478
|
.hjm-screen__body[data-scroll="screen"] { overflow-y: auto; }
|
|
3479
|
+
/* A screen-scrolled body is a Tab stop for keyboard scrolling, so reaching it by keyboard draws the HJM ring, inset
|
|
3480
|
+
because the body fills the screen and an outer ring would be clipped. Focus that ScreenLayout itself parks on the
|
|
3481
|
+
body after the focused node was removed (data-focus-landing) is a landing, not a control, and draws none, like
|
|
3482
|
+
the search results landing (2026-10-23 web check: the browser default ring outlined the whole body). */
|
|
3483
|
+
.hjm-screen__body:focus { outline: none; }
|
|
3484
|
+
.hjm-screen__body:focus-visible:not([data-focus-landing]) { outline: var(--hjm-focus-width) solid var(--hjm-color-focus); outline-offset: calc(-1 * var(--hjm-focus-width)); }
|
|
3390
3485
|
.hjm-screen__body[data-scroll="content"] { display: flex; flex-direction: column; overflow: hidden; }
|
|
3391
3486
|
.hjm-screen__body[data-content-alignment="center"] { display: flex; flex-direction: column; }
|
|
3392
3487
|
.hjm-screen__centered-content { margin-block: auto; flex-shrink: 0; inline-size: 100%; }
|
|
@@ -3738,6 +3833,10 @@ button.hjm-chat-message__media-item:focus-visible { outline: 2px solid var(--hjm
|
|
|
3738
3833
|
}
|
|
3739
3834
|
|
|
3740
3835
|
.hjm-statistic__leading { display: inline-flex; align-items: center; color: var(--hjm-statistic-value-color, var(--hjm-color-text)); }
|
|
3836
|
+
/* A leading glyph labels its value: keep them on one line and let the value text wrap beside it.
|
|
3837
|
+
Wrapping the row dropped a long value (e.g. "10월 9일 09:40") under a lone icon (2026-10-23). */
|
|
3838
|
+
.hjm-statistic__value-row[data-leading] { flex-wrap: nowrap; }
|
|
3839
|
+
.hjm-statistic__value-row[data-leading] > .hjm-statistic__leading { flex-shrink: 0; }
|
|
3741
3840
|
.hjm-statistic-group[data-arrangement="bar"] { grid-template-columns: repeat(var(--hjm-statistic-columns), minmax(0, 1fr)); gap: 0; }
|
|
3742
3841
|
.hjm-statistic-group[data-arrangement="bar"] > * { min-inline-size: 0; padding-inline: var(--hjm-space-xs); }
|
|
3743
3842
|
.hjm-statistic-group[data-arrangement="bar"] > * + * { border-inline-start: 1px solid var(--hjm-color-border); }
|
|
@@ -3843,6 +3942,12 @@ button.hjm-chat-message__media-item:focus-visible { outline: 2px solid var(--hjm
|
|
|
3843
3942
|
.hjm-segmented[data-selection-tone="brand"][data-presentation="pills"] .hjm-segmented__items[data-highlight-ready="true"] > .hjm-segmented__item[data-state="checked"]::before { background: transparent; }
|
|
3844
3943
|
|
|
3845
3944
|
/* Photo chrome is deliberately independent of the product theme: no card frame or crop. */
|
|
3945
|
+
/* ImageViewerTrigger: imageViewerTriggerRecipe (radius = imageRecipe.radius md so the ring follows the image frame). */
|
|
3946
|
+
.hjm-image-viewer-trigger { display: block; inline-size: 100%; margin: 0; padding: 0; border: 0; border-radius: var(--hjm-radius-md); background: none; color: inherit; font: inherit; text-align: inherit; cursor: var(--hjm-image-viewer-trigger-cursor, zoom-in); }
|
|
3947
|
+
.hjm-image-viewer-trigger > * { display: block; }
|
|
3948
|
+
.hjm-image-viewer-trigger:active:not(:disabled) { opacity: var(--hjm-image-viewer-trigger-pressed-opacity); }
|
|
3949
|
+
.hjm-image-viewer-trigger:disabled { cursor: default; opacity: var(--hjm-image-viewer-trigger-disabled-opacity); }
|
|
3950
|
+
.hjm-image-viewer-trigger:focus-visible { outline: var(--hjm-focus-width) solid var(--hjm-color-focus); outline-offset: var(--hjm-focus-offset); }
|
|
3846
3951
|
.hjm-image-viewer { position: fixed; inset: 0; display: flex; flex-direction: column; min-inline-size: 0; background: #000; color: #fff; padding-block: env(safe-area-inset-top) env(safe-area-inset-bottom); }
|
|
3847
3952
|
.hjm-image-viewer__header, .hjm-image-viewer__footer { display: flex; align-items: center; gap: var(--hjm-space-xs); padding: var(--hjm-space-xs) max(var(--hjm-space-md), env(safe-area-inset-left)) var(--hjm-space-xs) max(var(--hjm-space-md), env(safe-area-inset-right)); }
|
|
3848
3953
|
.hjm-image-viewer__footer > span { flex: 1; text-align: center; }
|