@salesql/sql_components_vue3 3.15.1 → 3.16.1
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/dist/constants/layers.d.ts +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.es.js +1375 -1359
- package/dist/index.es.js.map +1 -1
- package/dist/sql_components_vue3.css +1 -1
- package/dist/ui/DsNotification/DsNotification.types.d.ts +6 -0
- package/dist/ui/DsNotification/DsNotification.vue.d.ts +10 -1
- package/dist/ui/DsPopover/popoverLayers.d.ts +0 -1
- package/llms-full.txt +9 -5
- package/package.json +1 -1
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/ui/DsSpinner/DsSpinner.types.ts","../src/ui/DsSpinner/DsSpinner.vue","../src/constants/events.ts","../src/ui/DsButton/DsButton.types.ts","../src/ui/DsButton/DsButton.vue","../src/ui/DsTag/DsTag.types.ts","../src/ui/DsTag/DsTag.vue","../src/ui/DsBadge/DsBadge.types.ts","../src/ui/DsBadge/DsBadge.vue","../src/ui/DsAvatar/DsAvatar.vue","../src/ui/DsCheckbox/DsCheckbox.vue","../src/ui/DsTable/DsTable.types.ts","../src/ui/DsTable/DsTable.vue","../src/ui/DsInput/DsInput.types.ts","../src/ui/DsInput/DsInput.vue","../src/ui/DsTextarea/DsTextarea.types.ts","../src/ui/DsTextarea/DsTextarea.vue","../src/ui/DsAlert/DsAlert.types.ts","../src/ui/DsAlert/DsAlert.vue","../src/ui/DsNotification/DsNotification.types.ts","../src/ui/DsNotification/notificationStack.ts","../src/ui/DsNotification/DsNotification.vue","../src/ui/DsModal/DsModal.vue","../src/composables/useInputModality.ts","../src/composables/useTeleportAnchor.ts","../src/composables/useViewportClamp.ts","../src/ui/DsTooltip/DsTooltip.types.ts","../src/ui/DsTooltip/DsTooltip.vue","../src/ui/DsVerificationIcon/DsVerificationIcon.types.ts","../src/ui/DsVerificationIcon/DsVerificationIcon.vue","../src/composables/useClipboardCopy.ts","../src/ui/DsContactValue/DsContactValue.vue","../src/ui/DsDataCard/DsDataCard.vue","../src/ui/DsRadio/DsRadio.vue","../src/ui/DsRadioCard/DsRadioCard.vue","../src/ui/DsSwitch/DsSwitch.vue","../src/ui/DsItemSelectorButton/DsItemSelectorButton.vue","../src/ui/DsSelect/DsSelect.types.ts","../src/ui/DsSelect/DsSelect.vue","../src/ui/DsRow/DsRow.vue","../src/ui/DsCell/DsCell.vue","../src/ui/DsCustomTag/DsCustomTag.types.ts","../src/ui/DsCustomTag/DsCustomTag.vue","../src/ui/DsPill/DsPill.types.ts","../src/ui/DsPill/DsPill.vue","../src/ui/DsPillWithBorder/DsPillWithBorder.vue","../src/ui/DsSegmentedProgressBar/DsSegmentedProgressBar.vue","../src/ui/DsEmptyState/DsEmptyState.vue","../src/ui/DsPaginator/DsPaginator.vue","../src/ui/DsMenuItem/DsMenuItem.vue","../src/ui/DsWizardStepper/DsWizardStepper.types.ts","../src/ui/DsWizardStepper/DsWizardStepper.vue","../src/ui/DsDrawer/DsDrawer.types.ts","../src/ui/DsDrawer/DsDrawer.vue","../src/ui/DsPopover/DsPopover.types.ts","../src/ui/DsPopover/popoverLayers.ts","../src/ui/DsPopover/DsPopover.vue","../src/composables/useMenuKeyboard.ts","../src/ui/DsActionMenu/DsActionMenu.types.ts","../src/ui/DsActionMenu/DsActionMenu.vue","../src/ui/DsCompanyLogo/DsCompanyLogo.vue","../src/ui/DsCompanyCard/DsCompanyCard.vue","../src/constants/contact-data.ts","../src/ui/DsMaskedValue/DsMaskedValue.vue","../src/ui/DsDeliverabilityBadge/DsDeliverabilityBadge.vue","../src/ui/DsMoreCountChip/DsMoreCountChip.vue","../src/ui/DsContactList/DsContactList.vue","../src/ui/DsContactCell/DsContactCell.vue","../src/ui/DsProfileCard/DsProfileCard.vue","../src/ui/DsProfileGroupBar/DsProfileGroupBar.vue","../src/ui/DsContactPlaceholder/DsContactPlaceholder.types.ts","../src/ui/DsContactPlaceholder/DsContactPlaceholder.vue","../src/ui/DsClampedText/DsClampedText.types.ts","../src/ui/DsClampedText/DsClampedText.vue","../src/ui/DsProfileCompanyCard/DsProfileCompanyCard.vue","../src/ui/DsProfileHero/DsProfileHero.vue","../src/ui/DsProfileKvRow/DsProfileKvRow.vue","../src/ui/DsProfileTimelineRow/DsProfileTimelineRow.vue","../src/ui/DsProfileLockedCard/DsProfileLockedCard.vue","../src/constants/pickers.ts","../src/ui/DsOrganizerForm/DsOrganizerForm.vue","../src/ui/DsPickerRowActions/DsPickerRowActions.vue","../src/composables/usePickerOrganizer.ts","../src/ui/DsSavedButton/DsSavedButton.types.ts","../src/ui/DsSavedButton/DsSavedButton.vue","../src/ui/DsTagPicker/DsTagPicker.types.ts","../src/ui/DsTagPicker/DsTagPicker.vue","../src/ui/DsAddToSequence/DsAddToSequence.types.ts","../src/ui/DsAddToSequence/DsAddToSequence.vue"],"sourcesContent":["// DsSpinner — the DS \"Spinner\": a rotating border-ring. Tones mirror Spinner.jsx.\n\nexport const DS_SPINNER_TONES = {\n DARK: 'dark', // slate ring — for light surfaces (default)\n LIGHT: 'light', // white ring — for dark surfaces / solid buttons\n ACCENT: 'accent', // accent ring\n} as const;\nexport type DsSpinnerTone = (typeof DS_SPINNER_TONES)[keyof typeof DS_SPINNER_TONES];\n\n// Named sizes (DS `size`: number | \"small\" | \"medium\" | \"large\") — resolved to\n// px by DsSpinner.vue. Numeric sizes still pass straight through; the default\n// (24) is unchanged and doesn't correspond to any of these named steps.\nexport const DS_SPINNER_SIZES = {\n SMALL: 'small', // 20px\n MEDIUM: 'medium', // 32px\n LARGE: 'large', // 48px\n} as const;\nexport type DsSpinnerSize = (typeof DS_SPINNER_SIZES)[keyof typeof DS_SPINNER_SIZES];\n","<template>\n <span\n class=\"ds-spinner\"\n :class=\"`ds-spinner--${tone}`\"\n role=\"status\"\n :style=\"{ width: `${resolvedSize}px`, height: `${resolvedSize}px` }\"\n :aria-label=\"label || undefined\"\n ></span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport {\n DS_SPINNER_TONES,\n DS_SPINNER_SIZES,\n type DsSpinnerTone,\n type DsSpinnerSize,\n} from './DsSpinner.types';\n\n// Named size → px (DS STRING_SIZES). Kept local: only DsSpinner.vue needs the\n// resolved pixel value.\nconst SPINNER_SIZE_PX: Record<DsSpinnerSize, number> = {\n [DS_SPINNER_SIZES.SMALL]: 20,\n [DS_SPINNER_SIZES.MEDIUM]: 32,\n [DS_SPINNER_SIZES.LARGE]: 48,\n};\n\nconst props = defineProps({\n // Diameter in px, or a named size (\"small\" 20 / \"medium\" 32 / \"large\" 48).\n // Default (24) is unchanged and isn't one of the named steps.\n size: { type: [Number, String] as PropType<number | DsSpinnerSize>, default: 24 },\n tone: {\n type: String as PropType<DsSpinnerTone>,\n default: DS_SPINNER_TONES.DARK,\n },\n // Accessible name (DS default \"Loading\"); the consuming app can override for\n // i18n. role=\"status\" + aria-label are always present, never opt-in.\n label: { type: String, default: 'Loading' },\n});\n\nconst resolvedSize = computed(() =>\n typeof props.size === 'string' ? (SPINNER_SIZE_PX[props.size] ?? 24) : props.size\n);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/motion.scss' as m;\n\n@keyframes ds-spinner-rot {\n to {\n transform: rotate(360deg);\n }\n}\n\n.ds-spinner {\n display: inline-block;\n\n border: 2px solid;\n border-radius: 50%;\n\n animation: ds-spinner-rot 1s linear infinite;\n\n @include m.reduce-motion {\n animation: none;\n }\n\n &--dark {\n border-color: colors.$slate-tint;\n border-top-color: colors.$slate-main;\n }\n &--light {\n border-color: rgba(255, 255, 255, 0.4);\n border-top-color: colors.$white;\n }\n &--accent {\n border-color: colors.$accent-mid;\n border-top-color: colors.$accent-main;\n }\n}\n</style>\n","// Generic click event for props/emit.\nexport const CLICK = 'click' as const;\nexport type ClickEventName = typeof CLICK;\n\n// Close event (e.g. DsTag with × / closable) — maps to the DS onClose.\nexport const CLOSE = 'close' as const;\nexport type CloseEventName = typeof CLOSE;\n\n// Focus events for form controls (DsInput / DsTextarea).\nexport const FOCUS = 'focus' as const;\nexport type FocusEventName = typeof FOCUS;\n\nexport const BLUR = 'blur' as const;\nexport type BlurEventName = typeof BLUR;\n\n// Value commit (DsInput): the native `change` event (blur/Enter with a changed\n// value), distinct from update:modelValue (the v-model's continuous input).\nexport const CHANGE = 'change' as const;\nexport type ChangeEventName = typeof CHANGE;\n\n// REAL field-exit focus signal (DsInput): focus left the whole component, not an\n// inner descendant. Unlike BLUR (the native `<input>` `blur`, which does NOT\n// bubble and therefore fires even when focus moves to the component's own\n// password toggle button), FIELD_BLUR uses `focusout` —which does bubble— plus\n// relatedTarget/`currentTarget.contains(next)` to emit only when focus leaves\n// outward. Payload: the FocusEvent.\nexport const FIELD_BLUR = 'field-blur' as const;\nexport type FieldBlurEventName = typeof FIELD_BLUR;\n\n// Data-family events (DsContactValue / DsDataCard).\n// COPY carries the copied value; CORRECT / INCORRECT mark a datum's rating.\nexport const COPY = 'copy' as const;\nexport type CopyEventName = typeof COPY;\n\n// REVEAL: the user asked to unmask a group's values (DsContactCell «Show details»). No payload —\n// the consumer knows which contact and column it is; the cell only reports intent.\nexport const REVEAL = 'reveal' as const;\nexport type RevealEventName = typeof REVEAL;\n\nexport const CORRECT = 'correct' as const;\nexport type CorrectEventName = typeof CORRECT;\n\nexport const INCORRECT = 'incorrect' as const;\nexport type IncorrectEventName = typeof INCORRECT;\n\n// DsDataCard header actions.\nexport const SORT = 'sort' as const;\nexport type SortEventName = typeof SORT;\n\nexport const EDIT = 'edit' as const;\nexport type EditEventName = typeof EDIT;\n\n// DsTable bulk selection — the \"select all\" checkbox column.\n// Payload: the new boolean state.\nexport const SELECT_ALL = 'select-all' as const;\nexport type SelectAllEventName = typeof SELECT_ALL;\n\n// Pagination (DsPaginator). PAGE_CHANGE carries the new page number (1-based);\n// PAGE_SIZE_CHANGE carries the new page size.\nexport const PAGE_CHANGE = 'page-change' as const;\nexport type PageChangeEventName = typeof PAGE_CHANGE;\n\nexport const PAGE_SIZE_CHANGE = 'page-size-change' as const;\nexport type PageSizeChangeEventName = typeof PAGE_SIZE_CHANGE;\n\n// Text typed into DsSelect's embedded search box (prop `filterable`). Emitted on\n// every input change, and with '' when the dropdown closes and clears the filter\n// (so a `remote` consumer restores the full set on reopen; harmless locally). By\n// default DsSelect filters locally; an app wanting remote filtering uses `remote`\n// + listens to `search` to replace `options` (so local filtering isn't duplicated\n// on top of already-filtered results).\nexport const SEARCH = 'search' as const;\nexport type SearchEventName = typeof SEARCH;\n\n// Navigation-family events (DsMenuItem / DsWizardStepper).\n// SELECT: a menu row was chosen (DsMenuItem: the MouseEvent; DsActionMenu: the item id).\n// STEP: the wizard moved to a step (1-based number).\n// FINAL_STEP: the wizard's final action was triggered (no payload).\nexport const SELECT = 'select' as const;\nexport type SelectEventName = typeof SELECT;\n\nexport const STEP = 'step' as const;\nexport type StepEventName = typeof STEP;\n\nexport const FINAL_STEP = 'final-step' as const;\nexport type FinalStepEventName = typeof FINAL_STEP;\n\n// NAVIGATE: se clickeó el link de una notificación (DsNotification). Lleva el\n// MouseEvent (como SELECT), así el consumidor puede hacer preventDefault() y\n// enrutar in-app con el router de su app en vez de la navegación nativa del <a>.\nexport const NAVIGATE = 'navigate' as const;\nexport type NavigateEventName = typeof NAVIGATE;\n\n// Drawer resize (DsDrawer). The component clamps to its min/max props and emits\n// the resulting width in px on every step; PERSISTING that width is the\n// consumer's job (frontend-app's usePersistedWidth), never the component's.\n// RESIZE_START — drag began, carries the width at that moment\n// RESIZE — every move while dragging, carries the already-clamped width\n// RESIZE_END — drag released, carries the final clamped width\n// A consumer that only wants to store the result listens to RESIZE_END alone.\nexport const RESIZE_START = 'resize-start' as const;\nexport type ResizeStartEventName = typeof RESIZE_START;\n\nexport const RESIZE = 'resize' as const;\nexport type ResizeEventName = typeof RESIZE;\n\nexport const RESIZE_END = 'resize-end' as const;\nexport type ResizeEndEventName = typeof RESIZE_END;\n\n// v-model:open (DsPopover). The component never closes itself — it asks the\n// consumer to flip the boolean, same presentational contract as DsModal.\nexport const UPDATE_OPEN = 'update:open' as const;\nexport type UpdateOpenEventName = typeof UPDATE_OPEN;\n\n// Picker family (SALESQL-3535: DsSavedButton / DsTagPicker / DsAddToSequence).\n// PICK: a single option was chosen (payload: the option) — a folder to re-file into.\n// APPLY: a multi-selection was confirmed (payload: the selected options).\n// ADD: the add-to-sequence confirm (payload: `{ channel, campaigns }`).\n// CREATE: the \"create a new one\" affordance was used (payload: the current search text).\nexport const PICK = 'pick' as const;\nexport type PickEventName = typeof PICK;\n\nexport const APPLY = 'apply' as const;\nexport type ApplyEventName = typeof APPLY;\n\nexport const ADD = 'add' as const;\nexport type AddEventName = typeof ADD;\n\nexport const CREATE = 'create' as const;\nexport type CreateEventName = typeof CREATE;\n\n// In-panel create/edit form (DsOrganizerForm, SALESQL-3298).\n// BACK: the title row was used to leave the form (no payload).\n// SUBMIT: the form passed validation (payload: `{ name, color }`, name trimmed).\n// UPDATE_NAME / UPDATE_COLOR: v-model:name / v-model:color — the form is controlled, the\n// parent echoes the value back through the prop.\n// DELETE / CREATE_OPTION / UPDATE_OPTION: row delete and the create / edit submit of the\n// pickers that embed the form.\nexport const BACK = 'back' as const;\nexport type BackEventName = typeof BACK;\n\nexport const SUBMIT = 'submit' as const;\nexport type SubmitEventName = typeof SUBMIT;\n\nexport const DELETE = 'delete' as const;\nexport type DeleteEventName = typeof DELETE;\n\nexport const CREATE_OPTION = 'create-option' as const;\nexport type CreateOptionEventName = typeof CREATE_OPTION;\n\nexport const UPDATE_OPTION = 'update-option' as const;\nexport type UpdateOptionEventName = typeof UPDATE_OPTION;\n\nexport const UPDATE_NAME = 'update:name' as const;\nexport type UpdateNameEventName = typeof UPDATE_NAME;\n\nexport const UPDATE_COLOR = 'update:color' as const;\nexport type UpdateColorEventName = typeof UPDATE_COLOR;\n\n// FORM_CLOSE: the in-panel form was dismissed (back, closeForm() or the panel closing). Clear\n// `formError` here; an error left over from the dismissed session is not shown on reopen.\nexport const FORM_CLOSE = 'form-close' as const;\nexport type FormCloseEventName = typeof FORM_CLOSE;\n","// DsButton — 1:1 with the SalesQL Design System \"Button\" (components/core/Button.jsx).\n// Variants map to the DS `variantStyle`; sizes to the DS control heights.\n\n// Variants (classes: ds-button--<variant>)\nexport const DS_BUTTON_VARIANTS = {\n DEFAULT: 'default', // white surface, dark text (the default value; == tertiary)\n PRIMARY: 'primary', // solid accent fill, white text — the main CTA\n SECONDARY: 'secondary', // slate surface fill, dark text\n TERTIARY: 'tertiary', // white surface, dark text (low-emphasis row action)\n // White surface, dark text, 1px slate-tint ring — the design export's secondary trigger\n // (contact-data `SavedButton` / `tagsLine` / `SequenceButton`, ActionBar `secBtn`).\n OUTLINE: 'outline',\n QUATERNARY: 'quaternary', // accent text + accent-mid border on white (former \"special\")\n QUINARY: 'quinary', // accent text on white, no border (link-style) (former \"special2\")\n SENARY: 'senary', // accent text on accent-tint; hover fills solid accent (former \"special3\")\n DOTTED: 'dotted', // transparent, dashed border, 24px radius — \"add\" affordance\n DANGER: 'danger', // destructive/delete — error text on error-tint (DS tint style)\n AI: 'ai', // AI gradient fill (pink → orange), white text — primary-like action of the AI features\n // Legacy: solid-red fill (white text) kept for back-compat. The DS treats\n // `warning` as a deprecated alias of `danger` (tint), but app consumers already\n // ship this solid look — kept unchanged to avoid a visual regression. Prefer `danger`.\n WARNING: 'warning',\n} as const;\nexport type DsButtonVariant = (typeof DS_BUTTON_VARIANTS)[keyof typeof DS_BUTTON_VARIANTS];\n\n// Sizes = DS control heights (classes: ds-button--<size>)\nexport const DS_BUTTON_SIZES = {\n SMALL: 'small', // 24px\n MEDIUM: 'medium', // 32px\n LARGE: 'large', // 36px\n XLARGE: 'xlarge', // 48px\n} as const;\nexport type DsButtonSize = (typeof DS_BUTTON_SIZES)[keyof typeof DS_BUTTON_SIZES];\n\n// Native <button> type\nexport const DS_BUTTON_NATIVE_TYPES = {\n BUTTON: 'button',\n SUBMIT: 'submit',\n RESET: 'reset',\n} as const;\nexport type DsButtonNativeType =\n (typeof DS_BUTTON_NATIVE_TYPES)[keyof typeof DS_BUTTON_NATIVE_TYPES];\n","<template>\n <button\n class=\"ds-button\"\n :type=\"nativeType\"\n :disabled=\"disabled || loading\"\n :autofocus=\"autofocus\"\n :aria-busy=\"loading || undefined\"\n :aria-disabled=\"disabled || loading || undefined\"\n :aria-pressed=\"selected || undefined\"\n :aria-label=\"ariaLabel || undefined\"\n :class=\"[\n `ds-button--${variant}`,\n `ds-button--${size}`,\n {\n 'is-disabled': disabled || loading,\n 'is-loading': loading,\n 'is-circle': circle,\n 'is-square': square,\n 'is-pill': pill,\n 'is-no-padding': noPadding,\n 'is-selected': selected,\n },\n ]\"\n @click=\"handleClick\"\n >\n <DsSpinner v-if=\"loading\" class=\"ds-button__spinner\" :size=\"iconSize\" :tone=\"spinnerTone\" />\n\n <!-- El contenido queda montado mientras loading (visibility-hidden + aria-hidden)\n para que el botón conserve su ancho: el spinner lo overlea, en vez de\n colapsar al ancho del spinner y volver a saltar al terminar. -->\n <span class=\"ds-button__content\" :aria-hidden=\"loading || undefined\">\n <span v-if=\"leftIcon || $slots.leading\" class=\"ds-button__icon ds-button__icon--leading\">\n <slot name=\"leading\"\n ><i class=\"material-symbols-filled\" aria-hidden=\"true\">{{ leftIcon }}</i></slot\n >\n </span>\n\n <span v-if=\"$slots.default && !circle && !square\" class=\"ds-button__label\"><slot /></span>\n\n <span v-if=\"rightIcon || $slots.trailing\" class=\"ds-button__icon ds-button__icon--trailing\">\n <slot name=\"trailing\"\n ><i class=\"material-symbols-filled\" aria-hidden=\"true\">{{ rightIcon }}</i></slot\n >\n </span>\n </span>\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport { DsSpinner, DS_SPINNER_TONES } from '@shared/ui/DsSpinner';\nimport { CLICK } from '@shared/constants/events';\nimport {\n DS_BUTTON_NATIVE_TYPES,\n DS_BUTTON_SIZES,\n DS_BUTTON_VARIANTS,\n type DsButtonNativeType,\n type DsButtonSize,\n type DsButtonVariant,\n} from './DsButton.types';\n\nconst props = defineProps({\n variant: { type: String as PropType<DsButtonVariant>, default: DS_BUTTON_VARIANTS.DEFAULT },\n size: { type: String as PropType<DsButtonSize>, default: DS_BUTTON_SIZES.MEDIUM },\n nativeType: {\n type: String as PropType<DsButtonNativeType>,\n default: DS_BUTTON_NATIVE_TYPES.BUTTON,\n },\n // Material Icon names (rendered via <i class=\"material-symbols-filled\">); a leading/\n // trailing slot overrides. Icon-only buttons (circle/square) need ariaLabel.\n leftIcon: { type: String, default: '' },\n rightIcon: { type: String, default: '' },\n ariaLabel: { type: String, default: '' },\n disabled: Boolean,\n loading: Boolean,\n // Round icon-only button (width === height, fully circular).\n circle: Boolean,\n // Flat 4px-radius icon-only button (the DS `*-square` sizes): symmetric padding\n // per size, height === width.\n square: Boolean,\n // Zero the square padding for a tight, edge-to-edge glyph (DS `small-square-no-padding`).\n // Only takes effect together with `square`.\n noPadding: Boolean,\n // Fully round ends (radius-full) on a text button — the bulk-bar look next to\n // DsItemSelectorButton. Height and padding are the size's; only the radius changes.\n pill: Boolean,\n // Toggle state: accent outline + fill; sets aria-pressed (DS `selected`).\n selected: Boolean,\n autofocus: Boolean,\n});\n\n// Runtime array (not the type-only form): the SFC compiler can't resolve\n// `typeof CLICK` to a literal, leaving `emits` empty at runtime. With `click`\n// undeclared, the parent's @click both falls through to the native <button>\n// AND is invoked by emit() → the listener fires twice. Declaring it at runtime\n// (via the CLICK constant, per convention) excludes it from fallthrough.\nconst emit = defineEmits([CLICK]);\n\nconst iconSize = computed(() => (props.size === DS_BUTTON_SIZES.SMALL ? 14 : 20));\n// Solid-fill variants (white text) take the light spinner; the rest, dark.\nconst SOLID_FILL_VARIANTS: DsButtonVariant[] = [\n DS_BUTTON_VARIANTS.PRIMARY,\n DS_BUTTON_VARIANTS.WARNING,\n DS_BUTTON_VARIANTS.AI,\n];\nconst spinnerTone = computed(() =>\n SOLID_FILL_VARIANTS.includes(props.variant) ? DS_SPINNER_TONES.LIGHT : DS_SPINNER_TONES.DARK\n);\n\nfunction handleClick(event: MouseEvent) {\n if (props.disabled || props.loading) return;\n emit(CLICK, event);\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/icons.scss' as i;\n\n.ds-button {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n padding: 0;\n\n font-family: t.$font-family;\n font-weight: t.$weight-medium; // 500 (DS); small overrides to 400\n font-size: t.font-size('body');\n line-height: 20px;\n\n border: 1px solid transparent;\n border-radius: r.$radius-control;\n outline: none;\n\n cursor: pointer;\n transition:\n background-color m.$duration-default m.$easing,\n border-color m.$duration-default m.$easing,\n opacity m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &.is-disabled {\n opacity: 0.55;\n cursor: not-allowed;\n }\n\n &__icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n // DS icon size: 20px (small → 14px). Sizing the glyph to fill its box also\n // removes the optical \"gap\" a smaller glyph leaves against the button edge.\n .material-symbols-filled {\n font-size: i.icon-size(20);\n line-height: 1;\n }\n }\n\n // Material glyphs carry a built-in keyline (~2–3px advance bearing). Absorb it\n // on the edge side so a leading/trailing icon sits at the same optical inset as\n // a text-only button. Not for icon-only (circle/square) buttons — those stay centered.\n &:not(.is-circle):not(.is-square) &__icon--leading {\n margin-left: -3px;\n }\n &:not(.is-circle):not(.is-square) &__icon--trailing {\n margin-right: -3px;\n }\n\n // Content wrapper stays in flow while loading (hidden) so the button keeps its\n // width; the spinner is overlaid on top instead of replacing the content.\n &__content {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n }\n &.is-loading &__content {\n visibility: hidden;\n }\n\n // A button labels a single action — it must not wrap. With the height pinned per\n // size (control-height), wrappable text would break the control height; nowrap\n // makes it size to content and overflow horizontally (harmless) instead.\n &__label {\n white-space: nowrap;\n }\n\n // Overlaid over the (hidden) content — centered without a fixed size.\n // Size comes from the :size prop (iconSize).\n &__spinner {\n position: absolute;\n inset: 0;\n margin: auto;\n }\n\n /* ---------- Variants (DS variantStyle) ---------- */\n // `default` and `tertiary` are identical in the DS (white surface, dark text).\n &--default,\n &--tertiary {\n color: colors.$slate-main;\n background-color: colors.$white;\n\n &:hover:not(.is-disabled) {\n background-color: colors.$slate-tint;\n }\n }\n // White surface with a hairline ring (design export: secondary triggers). Hover moves\n // the surface to the app background, the ring stays.\n &--outline {\n color: colors.$slate-main;\n border-color: colors.$slate-tint;\n background-color: colors.$white;\n\n &:hover:not(.is-disabled) {\n background-color: colors.$slate-bg;\n }\n }\n &--primary {\n color: colors.$white;\n background-color: colors.$accent-main;\n\n &:hover:not(.is-disabled) {\n background-color: colors.$accent-shadow;\n }\n }\n // Primary-like with the AI gradient fill (pink → orange); hover darkens the start stop.\n &--ai {\n color: colors.$white;\n background-image: colors.$gradient-ai;\n background-origin: border-box; // the gradient also fills under the 1px transparent border\n\n &:hover:not(.is-disabled) {\n background-image: colors.$gradient-ai-hover;\n }\n }\n &--secondary {\n color: colors.$slate-main;\n background-color: colors.$slate-bg;\n\n &:hover:not(.is-disabled) {\n background-color: colors.$slate-tint;\n }\n }\n &--quaternary {\n color: colors.$accent-main;\n border-color: colors.$accent-mid;\n background-color: colors.$white;\n\n &:hover:not(.is-disabled) {\n border-color: colors.$accent-main;\n }\n }\n &--quinary {\n color: colors.$accent-main;\n background-color: colors.$white;\n\n &:hover:not(.is-disabled) {\n background-color: colors.$accent-bg;\n }\n }\n // Ordinal accent (tint fill) — accent text on accent-tint, weight 400; hover\n // fills solid accent with white text (DS `senary`, former \"special3\").\n &--senary {\n color: colors.$accent-main;\n font-weight: t.$weight-regular; // 400 (DS)\n background-color: colors.$accent-tint;\n\n &:hover:not(.is-disabled) {\n color: colors.$white;\n background-color: colors.$accent-main;\n }\n }\n // Destructive / delete (DS `danger`) — error text on error tint; hover deepens it.\n &--danger {\n color: colors.$error-main;\n background-color: colors.$error-tint;\n\n &:hover:not(.is-disabled) {\n background-color: colors.$error-mid;\n }\n }\n // Legacy solid-red fill (white text). Kept for back-compat; the DS aliases\n // `warning` → `danger` (tint), but consumers ship this solid look. Prefer `danger`.\n &--warning {\n color: colors.$white;\n background-color: colors.$error-main;\n\n &:hover:not(.is-disabled) {\n background-color: colors.$error-shadow;\n }\n }\n // \"Add\" affordance — dashed border, 24px radius, weight 700, no hover (DS).\n &--dotted {\n color: colors.$slate-mid;\n font-weight: t.$weight-bold;\n\n border: 1px dashed colors.$slate-mid;\n border-radius: r.$radius-dashed;\n background-color: transparent;\n }\n\n /* ---------- Selected (toggle) — wins over the variant, incl. hover ---------- */\n &.is-selected,\n &.is-selected:hover:not(.is-disabled) {\n color: colors.$accent-main;\n border-color: colors.$accent-main;\n background-color: colors.$accent-bg;\n background-image: none;\n }\n\n /* ---------- Sizes (DS control heights + paddings) ---------- */\n &--small {\n height: s.control-height('small');\n padding: 0 s.control-padding('small');\n\n font-weight: t.$weight-regular; // 400\n font-size: t.font-size('caption');\n\n .ds-button__content {\n gap: 2px;\n }\n .ds-button__icon .material-symbols-filled {\n font-size: i.icon-size(14);\n }\n }\n &--medium {\n height: s.control-height('medium');\n padding: 0 s.control-padding('medium');\n }\n &--large {\n height: s.control-height('large');\n padding: 0 s.control-padding('large');\n }\n &--xlarge {\n height: s.control-height('xlarge');\n padding: 0 s.control-padding('xlarge');\n }\n\n /* ---------- Pill (text button, fully round ends) ---------- */\n &.is-pill {\n border-radius: r.$radius-full;\n }\n\n /* ---------- Circle (icon-only, true circle) ---------- */\n // width === height (= the size's control height): aspect-ratio alone lets the\n // content stretch the box into an oval, so pin the width to the height per size.\n &.is-circle {\n padding: 0;\n border-radius: r.$radius-full;\n }\n &--small.is-circle {\n width: s.control-height('small');\n }\n &--medium.is-circle {\n width: s.control-height('medium');\n }\n &--large.is-circle {\n width: s.control-height('large');\n }\n &--xlarge.is-circle {\n width: s.control-height('xlarge');\n }\n\n /* ---------- Square (icon-only, flat 4px) ---------- */\n // DS `*-square`: symmetric padding per size on a flat 4px radius, around a\n // centered glyph. Width is pinned to the control height per size (like circle):\n // with box-sizing:border-box the 1px border is baked into the fixed height but\n // NOT into the content-driven width, so padding alone leaves the box 2px wider\n // than tall. Pinning the width forces a true square.\n &.is-square {\n border-radius: r.$radius-control;\n }\n &--small.is-square {\n width: s.control-height('small');\n padding: s.control-square-padding('small');\n }\n &--medium.is-square {\n width: s.control-height('medium');\n padding: s.control-square-padding('medium');\n }\n &--large.is-square {\n width: s.control-height('large');\n padding: s.control-square-padding('large');\n }\n &--xlarge.is-square {\n width: s.control-height('xlarge');\n padding: s.control-square-padding('xlarge');\n }\n\n // Zero-padding square (DS `small-square-no-padding`): tight glyph in a fixed\n // square box. Like circle, pin the width to the size's control height so\n // dropping the padding can't collapse the width below the height — the button\n // stays square (height === width) per this component's invariant.\n &.is-square.is-no-padding {\n padding: 0;\n }\n &--small.is-square.is-no-padding {\n width: s.control-height('small');\n }\n &--medium.is-square.is-no-padding {\n width: s.control-height('medium');\n }\n &--large.is-square.is-no-padding {\n width: s.control-height('large');\n }\n &--xlarge.is-square.is-no-padding {\n width: s.control-height('xlarge');\n }\n}\n</style>\n","// DsTag — the DS \"Tag\": small bordered chip with optional close (×).\n// ⚠️ NOT the solid pill (that is DsBadge). See DESIGN-SYSTEM.md reconciliation.\n// Tones mirror the DS Tag source (Tag.jsx TONES). `rounded` → semicircular sides.\n\nexport const DS_TAG_TONES = {\n DEFAULT: 'default', // white bg, slate-tint border, muted text\n GREY: 'grey', // alias of `default` — the DS app passes tone=\"grey\" (ApiApp.jsx)\n SUCCESS: 'success', // e.g. Verified\n INFO: 'info', // e.g. Work\n WARNING: 'warning', // e.g. Pending\n ERROR: 'error', // e.g. Bounced\n} as const;\nexport type DsTagTone = (typeof DS_TAG_TONES)[keyof typeof DS_TAG_TONES];\n","<template>\n <span\n class=\"ds-tag\"\n :class=\"[\n `ds-tag--${tone}`,\n { 'is-rounded': rounded, 'is-clickable': clickable, 'is-truncate': truncate },\n ]\"\n >\n <!-- Label wrapper: only this clips under is-truncate. The close button is a\n sibling (outside this span), so it is never affected by the ellipsis. -->\n <span class=\"ds-tag__label\"><slot /></span>\n\n <button\n v-if=\"closable\"\n type=\"button\"\n class=\"ds-tag__close\"\n :aria-label=\"closeLabel || undefined\"\n @click.stop=\"emit(CLOSE)\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">close</i>\n </button>\n </span>\n</template>\n\n<script setup lang=\"ts\">\nimport { type PropType } from 'vue';\nimport { CLOSE } from '@shared/constants/events';\nimport { DS_TAG_TONES, type DsTagTone } from './DsTag.types';\n\ndefineProps({\n tone: {\n type: String as PropType<DsTagTone>,\n default: DS_TAG_TONES.DEFAULT,\n },\n // Semicircular sides (DS `rounded`): radius-round vs the default radius-control.\n rounded: Boolean,\n // Show a × close control that emits `close`.\n closable: Boolean,\n // Clickable affordance (DS: presence of `onClick` toggles cursor: pointer).\n // Vue can't cheaply detect an attached native @click listener, so this is an\n // explicit opt-in; it only sets cursor styling and doesn't touch the native\n // @click fallthrough behavior.\n clickable: Boolean,\n // Opt-in single-line truncation for long labels (default off). The consuming\n // app sets the ceiling via the `--ds-tag-max-width` CSS custom property; the\n // label then clips with an ellipsis while the close control stays intact.\n truncate: Boolean,\n // Accessible name for the × control (the app owns the wording / i18n).\n closeLabel: {\n type: String,\n default: '',\n },\n});\n\nconst emit = defineEmits<{\n (e: typeof CLOSE): void;\n}>();\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/icons.scss' as i;\n\n.ds-tag {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n\n padding: 0 10px;\n\n color: colors.$slate-mid;\n font-family: t.$font-family;\n font-weight: t.$weight-regular;\n font-size: t.font-size('caption');\n line-height: 30px;\n\n background-color: colors.$white;\n\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-control;\n\n white-space: nowrap;\n\n // Allow the label to shrink below its content width so the ellipsis can kick\n // in when the chip is capped (no visible effect until is-truncate + a cap).\n min-width: 0;\n\n &.is-rounded {\n border-radius: r.$radius-round;\n }\n\n // Clickable affordance (DS: cursor: pointer when an onClick handler is present).\n &.is-clickable {\n cursor: pointer;\n }\n\n // Opt-in truncation: the app sets the ceiling via `--ds-tag-max-width` (a CSS\n // custom property, not a hardcoded px), defaulting to `none` (uncapped).\n &.is-truncate {\n max-width: var(--ds-tag-max-width, none);\n }\n\n &__label {\n min-width: 0;\n }\n\n // Only the label clips; the close button (a sibling) is untouched.\n &.is-truncate &__label {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n &__close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n // Never shrink or clip the close control, however tight the cap.\n flex-shrink: 0;\n\n padding: 0;\n\n color: inherit;\n\n background: transparent;\n border: 0;\n\n cursor: pointer;\n\n .material-symbols-filled {\n font-size: i.icon-size(12);\n }\n }\n\n /* ---------- Tones (default: white + tint border + muted text) ---------- */\n // `grey` is a DS alias of `default` (the DS app passes tone=\"grey\").\n &--default,\n &--grey {\n color: colors.$slate-mid;\n border-color: colors.$slate-tint;\n background-color: colors.$white;\n }\n &--success {\n color: colors.$success-shadow;\n border-color: colors.$success-mid;\n background-color: colors.$success-tint;\n }\n &--info {\n color: colors.$info-shadow;\n border-color: colors.$info-mid;\n background-color: colors.$info-tint;\n }\n &--warning {\n color: colors.$warning-shadow;\n border-color: colors.$warning-mid;\n background-color: colors.$warning-tint;\n }\n &--error {\n color: colors.$error-shadow;\n border-color: colors.$error-mid;\n background-color: colors.$error-tint;\n }\n}\n</style>\n","// DsBadge — the DS \"Badge\": solid, white-text pill (value types & counts).\n// ⚠️ NOT the tint chip (that is DsTag). See DESIGN-SYSTEM.md reconciliation.\n// Tones mirror the DS Badge source (Badge.jsx TONES).\n\nexport const DS_BADGE_TONES = {\n ACCENT: 'accent', // e.g. Work (purple)\n GREY: 'grey', // e.g. Direct (slate-soft)\n INFO: 'info', // e.g. Mobile (blue)\n SUCCESS: 'success', // e.g. New (green)\n ERROR: 'error', // coral\n WARNING: 'warning', // orange\n} as const;\nexport type DsBadgeTone = (typeof DS_BADGE_TONES)[keyof typeof DS_BADGE_TONES];\n","<template>\n <span class=\"ds-badge\" :class=\"`ds-badge--${tone}`\">\n <slot />\n </span>\n</template>\n\n<script setup lang=\"ts\">\nimport { type PropType } from 'vue';\nimport { DS_BADGE_TONES, type DsBadgeTone } from './DsBadge.types';\n\ndefineProps({\n tone: {\n type: String as PropType<DsBadgeTone>,\n default: DS_BADGE_TONES.ACCENT,\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n\n.ds-badge {\n display: inline-flex;\n align-items: center;\n\n height: 17px;\n padding: 0 8px;\n\n color: colors.$white;\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('caption');\n line-height: 17px;\n\n border-radius: r.$radius-pill;\n\n white-space: nowrap;\n\n /* ---------- Tones (solid fill, white text) ---------- */\n &--accent {\n background-color: colors.$accent-main;\n }\n &--grey {\n background-color: colors.$slate-soft;\n }\n &--info {\n background-color: colors.$info-main;\n }\n &--success {\n background-color: colors.$success-main;\n }\n &--error {\n background-color: colors.$error-main;\n }\n &--warning {\n background-color: colors.$warning-main;\n }\n}\n</style>\n","<template>\n <img\n v-if=\"showsImage\"\n class=\"ds-avatar\"\n :class=\"{ 'is-circular': circular }\"\n :src=\"image\"\n :alt=\"ariaLabel\"\n :style=\"boxStyle\"\n @error=\"onImageError\"\n />\n\n <div\n v-else-if=\"initials\"\n class=\"ds-avatar ds-avatar--initials\"\n :class=\"{ 'is-circular': circular, 'ds-avatar--accent': accent }\"\n role=\"img\"\n :aria-label=\"ariaLabel || undefined\"\n :style=\"[\n boxStyle,\n {\n // The accent tone is fixed (a CSS class), so the hashed background/color\n // is never emitted inline when `accent` is set.\n background: accent ? undefined : hashed.bg,\n color: accent ? undefined : hashed.fg,\n fontSize: `${resolvedTextSize}px`,\n fontWeight: fontWeight,\n },\n ]\"\n >\n {{ initials }}\n </div>\n\n <div\n v-else\n class=\"ds-avatar ds-avatar--placeholder\"\n :class=\"{ 'is-circular': circular }\"\n :style=\"boxStyle\"\n aria-hidden=\"true\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\n\nconst props = defineProps({\n image: { type: String, default: '' },\n firstName: { type: String, default: '' },\n lastName: { type: String, default: '' },\n // Explicit initials (DS `letters`) — overrides the computed firstName+lastName\n // initials when non-empty. Passed through as-is (no uppercase transform),\n // matching the DS: only the firstName+lastName path uppercases.\n letters: { type: String, default: '' },\n uid: { type: String, default: '' },\n size: { type: Number, default: 40 },\n // Explicit width/height (DS parity) — override `size` per-axis when present.\n width: { type: Number, default: undefined },\n height: { type: Number, default: undefined },\n // Initials font-size in px — overrides the computed ~40%-of-box value when present.\n textSize: { type: Number, default: undefined },\n // Initials font-weight — overrides the default token weight (900) when present.\n fontWeight: { type: [Number, String], default: undefined },\n circular: Boolean,\n // Fixed accent tone (background `colors.$accent-bg`, text `colors.$accent-shadow`)\n // instead of the per-person hashed color. Additive: default behavior is unchanged.\n accent: Boolean,\n // Accessible label. Omitted → falls back to the computed name/letters. An explicit\n // value wins — including `alt=\"\"` for a deliberately decorative image (default is\n // `undefined`, so \"\" is distinguishable from \"not provided\").\n alt: { type: String, default: undefined },\n});\n\n// An <img> that fails to load falls back to the initials variant (or the placeholder\n// when there are no initials either) instead of showing a broken-image icon.\nconst imageFailed = ref(false);\nwatch(\n () => props.image,\n () => (imageFailed.value = false)\n);\nfunction onImageError() {\n imageFailed.value = true;\n}\nconst showsImage = computed(() => !!props.image && !imageFailed.value);\n\nconst initials = computed(() => {\n if (props.letters) return props.letters;\n return props.firstName && props.lastName\n ? (props.firstName.charAt(0) + props.lastName.charAt(0)).toUpperCase()\n : '';\n});\n\nconst derivedLabel = computed(() => `${props.firstName} ${props.lastName}`.trim() || props.letters);\n// `??` (not `||`): an explicit \"\" (decorative) is preserved; only a truly absent\n// `alt` (undefined) falls back to the derived name/letters.\nconst ariaLabel = computed(() => props.alt ?? derivedLabel.value);\n\nconst boxWidth = computed(() => props.width ?? props.size);\nconst boxHeight = computed(() => props.height ?? props.size);\nconst boxStyle = computed(() => ({ width: `${boxWidth.value}px`, height: `${boxHeight.value}px` }));\n\nconst resolvedTextSize = computed(\n () => props.textSize ?? Math.round(Math.min(boxWidth.value, boxHeight.value) * 0.4)\n);\n\n// Deterministic color: seed on uid, else the name, else the explicit `letters`\n// (the DS seeds on `uid || initials`, so a letters-only avatar must feed its\n// letters into the hash — otherwise every letters-only avatar hashes the empty\n// string and collapses to the same color). `letters` last keeps existing\n// name-based avatars on their current color (additive, no visual regression).\nconst hashed = computed(() => {\n const seed = props.uid || props.firstName + props.lastName || props.letters;\n let hash = 0;\n for (let i = 0; i < seed.length; i++) {\n hash = seed.charCodeAt(i) + ((hash << 5) - hash);\n hash = hash & hash;\n }\n const rgb = [0, 0, 0];\n for (let i = 0; i < 3; i++) rgb[i] = (hash >> (i * 8)) & 255;\n const light = rgb[0] >= 200 && rgb[1] >= 200 && rgb[2] >= 200;\n return { bg: `rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`, fg: light ? '#323f4b' : '#fff' };\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n\n.ds-avatar {\n display: flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n overflow: hidden;\n object-fit: cover;\n\n border-radius: r.$radius-control;\n\n &.is-circular {\n border-radius: r.$radius-full;\n }\n\n &--initials {\n font-family: t.$font-family;\n font-weight: t.$weight-black;\n line-height: 1;\n user-select: none;\n }\n\n // Fixed accent tone, instead of the per-person hashed color (see the `accent` prop).\n &--accent {\n background: colors.$accent-bg;\n color: colors.$accent-shadow;\n }\n\n &--placeholder {\n // DS placeholder grey — was hardcoded #c0c4cc; the real DS token is\n // --grey-3 (#cbd2d9). Fixed to use the token (SALESQL-3394).\n background-color: colors.$grey-3;\n }\n}\n</style>\n","<template>\n <label class=\"ds-checkbox\" :class=\"{ 'is-disabled': disabled }\">\n <input\n ref=\"inputRef\"\n v-model=\"model\"\n type=\"checkbox\"\n class=\"ds-checkbox__native\"\n :disabled=\"disabled\"\n :name=\"name || undefined\"\n :aria-label=\"ariaLabel || undefined\"\n />\n <span\n class=\"ds-checkbox__box\"\n :class=\"{ 'is-active': model || indeterminate }\"\n aria-hidden=\"true\"\n >\n <svg\n v-if=\"indeterminate\"\n class=\"ds-checkbox__mark\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n >\n <line x1=\"4\" y1=\"8\" x2=\"12\" y2=\"8\" />\n </svg>\n <svg\n v-else-if=\"model\"\n class=\"ds-checkbox__mark\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n >\n <path d=\"M3.5 8.5l3 3 6-6\" />\n </svg>\n </span>\n <span v-if=\"$slots.default || label\" class=\"ds-checkbox__label\"\n ><slot>{{ label }}</slot></span\n >\n </label>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, onMounted, watch } from 'vue';\n\nconst model = defineModel<boolean>({ default: false });\n\nconst props = defineProps({\n indeterminate: Boolean,\n disabled: Boolean,\n name: { type: String, default: '' },\n // Label text (DS `label` prop); a default slot overrides it.\n label: { type: String, default: '' },\n // Accessible name when there is no visible label (e.g. a select-all in a table).\n ariaLabel: { type: String, default: '' },\n});\n\nconst inputRef = ref<HTMLInputElement | null>(null);\n\n// `indeterminate` is a DOM property, not an attribute — keep it in sync for a11y.\nfunction syncIndeterminate() {\n if (inputRef.value) inputRef.value.indeterminate = props.indeterminate;\n}\nonMounted(syncIndeterminate);\nwatch(() => props.indeterminate, syncIndeterminate);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-checkbox {\n display: inline-flex;\n align-items: center;\n gap: s.spacing(1);\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n cursor: pointer;\n\n &.is-disabled {\n cursor: not-allowed;\n opacity: 0.5; // DS Checkbox.jsx: whole label dims to .5 when disabled\n }\n\n /* Native control drives state + focus, visually replaced by the custom box. */\n &__native {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n }\n\n &__box {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n\n width: 18px;\n height: 18px;\n\n color: colors.$white;\n\n background-color: colors.$white;\n\n border: 1px solid colors.$slate-mid;\n border-radius: r.$radius-control;\n\n transition:\n background-color m.$duration-default m.$easing,\n border-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &.is-active {\n background-color: colors.$accent-main;\n border-color: colors.$accent-main;\n }\n }\n\n /* Focus ring on the box when the (hidden) native input is focused. */\n &__native:focus-visible + &__box {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n &__mark {\n width: 14px;\n height: 14px;\n }\n\n &__label {\n line-height: 1.3;\n }\n}\n</style>\n","// DsTable — the DS data table (data-dense density). Column/row API with hairline\n// borders, row hover, and an optional highlighted \"most likely\" row.\n\nexport const DS_TABLE_ALIGN = {\n LEFT: 'left',\n CENTER: 'center',\n RIGHT: 'right',\n} as const;\nexport type DsTableAlign = (typeof DS_TABLE_ALIGN)[keyof typeof DS_TABLE_ALIGN];\n\n// Which edge a column is pinned (sticky) to for horizontal scroll.\nexport const DS_TABLE_PIN = {\n LEFT: 'left',\n RIGHT: 'right',\n} as const;\nexport type DsTablePin = (typeof DS_TABLE_PIN)[keyof typeof DS_TABLE_PIN];\n\n// A column. `key` maps to the row property for default content and names the\n// scoped slot `cell-<key>`.\nexport interface DsTableColumn {\n key: string;\n label: string;\n align?: DsTableAlign;\n width?: string;\n // Pin this column to the left/right edge (position: sticky) so it stays put\n // while the table scrolls horizontally. Opt-in; the default layout is unchanged.\n // Stacking MORE THAN ONE pin on the same side needs a px `width` on each pinned\n // column so cumulative offsets can be derived; a single pin per side needs none.\n pinned?: DsTablePin;\n}\n\n// A header cell for the compound shell. `headers` accepts plain strings (still\n// valid) or this object form when a header needs to be pinned. Mirror the pinned\n// header's `width` on its matching DsCell so the sticky columns line up.\nexport interface DsTableHeader {\n label: string;\n pinned?: DsTablePin;\n width?: string;\n}\n\n// A row: only a stable `id` is required (for :key and highlighting); the rest of\n// the properties are consumed per column via its `key`.\nexport interface DsTableRow {\n id: string | number;\n [key: string]: unknown;\n}\n","<script setup lang=\"ts\">\nimport { computed, nextTick, onBeforeUnmount, ref, watch, type PropType } from 'vue';\nimport { DsCheckbox } from '@shared/ui/DsCheckbox';\nimport { DsSpinner } from '@shared/ui/DsSpinner';\nimport { SELECT_ALL } from '@shared/constants/events';\nimport {\n DS_TABLE_ALIGN,\n DS_TABLE_PIN,\n type DsTableColumn,\n type DsTableHeader,\n type DsTableRow,\n} from './DsTable.types';\n\nconst props = defineProps({\n // --- Declarative API (default): the table builds itself from columns + rows. ---\n columns: {\n type: Array as PropType<DsTableColumn[]>,\n default: () => [],\n },\n rows: {\n type: Array as PropType<DsTableRow[]>,\n default: () => [],\n },\n emptyMessage: {\n type: String,\n default: '',\n },\n // id of the row to highlight (the DS \"most likely\" row → accent surface).\n highlightRowId: {\n type: [String, Number] as PropType<string | number | null>,\n default: null,\n },\n // Optional fixed row height (number → px, or any CSS length). Rows are\n // content-driven by default; when set, this pins the height AND truncates\n // overflowing cell text with an ellipsis.\n rowHeight: {\n type: [String, Number] as PropType<string | number | null>,\n default: null,\n },\n\n // --- Compound API (opt-in): compose DsTableRow + DsTableCell in the default slot. ---\n // When true, the table renders a shell (headers + a sticky thead) and the body\n // comes from the default slot instead of `rows`. Coexists with the declarative API.\n compound: { type: Boolean, default: false },\n // Header labels for the compound shell. Plain strings, or the DsTableHeader\n // object form when a header column needs to be pinned (mirror its `width` on\n // the matching DsCell so the sticky columns line up).\n headers: { type: Array as PropType<(string | DsTableHeader)[]>, default: () => [] },\n // Render a leading select-all checkbox column (compound mode).\n selectable: { type: Boolean, default: false },\n allSelected: { type: Boolean, default: false },\n someSelected: { type: Boolean, default: false },\n // Accessible name for the select-all checkbox (no visible text in a 52px column).\n selectAllLabel: { type: String, default: '' },\n // Fixed height enabling the sticky-header scroll (compound mode).\n height: {\n type: [String, Number] as PropType<string | number | null>,\n default: null,\n },\n\n // --- Loading state (both APIs) ---\n // When true, the body is a single centered spinner row spanning every column,\n // shown INSTEAD of the empty state or the rows/slot (loading wins over both).\n loading: { type: Boolean, default: false },\n // Accessible name for the loading spinner (the app owns i18n); when omitted it\n // falls back to DsSpinner's own default. Overridable per row via the #loading slot.\n loadingLabel: { type: String, default: '' },\n});\n\nconst emit = defineEmits([SELECT_ALL]);\n\n// Column span for the full-width loading row in compound mode: the header\n// columns plus the leading select-all column when selectable. Floor at 1 so an\n// empty `headers` array never emits an invalid colspan=\"0\".\nconst compoundColspan = computed(() =>\n Math.max(1, props.headers.length + (props.selectable ? 1 : 0))\n);\n\nconst rowHeightStyle = computed(() =>\n props.rowHeight == null\n ? undefined\n : {\n '--ds-table-row-height':\n typeof props.rowHeight === 'number' ? `${props.rowHeight}px` : props.rowHeight,\n }\n);\n\nconst heightStyle = computed(() =>\n props.height == null\n ? undefined\n : { height: typeof props.height === 'number' ? `${props.height}px` : props.height }\n);\n\nfunction onSelectAll(checked: boolean) {\n emit(SELECT_ALL, checked);\n}\n\n// --- Pinned (sticky) columns ---------------------------------------------\n// Only a px width contributes to a cumulative pin offset; %/auto/undefined → 0\n// (a single pin per side sits at offset 0 and needs no width).\nfunction pinWidthPx(width?: string): number {\n if (!width) return 0;\n const match = /^(\\d+(?:\\.\\d+)?)px$/.exec(width.trim());\n return match ? parseFloat(match[1]) : 0;\n}\n\ntype PinStyle = { position: 'sticky'; left?: string; right?: string };\n\n// Declarative API: per-column-key sticky side + cumulative offset (left grows\n// left→right; right grows right→left).\nconst columnPinStyles = computed(() => {\n const map: Record<string, PinStyle> = {};\n let left = 0;\n for (const col of props.columns) {\n if (col.pinned === DS_TABLE_PIN.LEFT) {\n map[col.key] = { position: 'sticky', left: `${left}px` };\n left += pinWidthPx(col.width);\n }\n }\n let right = 0;\n for (let i = props.columns.length - 1; i >= 0; i--) {\n const col = props.columns[i];\n if (col.pinned === DS_TABLE_PIN.RIGHT) {\n map[col.key] = { position: 'sticky', right: `${right}px` };\n right += pinWidthPx(col.width);\n }\n }\n return map;\n});\n\n// Outermost pin on each side — the only cell that carries the edge shadow.\nconst pinEdgeKeys = computed(() => {\n const lefts = props.columns.filter((c) => c.pinned === DS_TABLE_PIN.LEFT);\n const rights = props.columns.filter((c) => c.pinned === DS_TABLE_PIN.RIGHT);\n const set = new Set<string>();\n if (lefts.length) set.add(lefts[lefts.length - 1].key);\n if (rights.length) set.add(rights[0].key);\n return set;\n});\n\nfunction columnPinClass(column: DsTableColumn) {\n if (!column.pinned) return undefined;\n return {\n 'ds-table__pin': true,\n [`ds-table__pin--${column.pinned}`]: true,\n 'ds-table__pin--edge': pinEdgeKeys.value.has(column.key),\n };\n}\n\n// th keeps its width always (existing behaviour) merged with the sticky offset.\nfunction columnHeaderStyle(column: DsTableColumn) {\n const pin = columnPinStyles.value[column.key];\n const width = column.width ? { width: column.width } : undefined;\n if (!pin && !width) return undefined;\n return { ...width, ...pin };\n}\n\n// td only gets a style when pinned (non-pinned cells stay unstyled as before);\n// a pinned cell also takes the width so it lines up with its header.\nfunction columnCellStyle(column: DsTableColumn) {\n const pin = columnPinStyles.value[column.key];\n if (!pin) return undefined;\n return column.width ? { ...pin, width: column.width } : pin;\n}\n\n// Compound API: normalize the header union to objects; DsTable owns every header\n// so it computes header offsets centrally (body-cell offsets are the consumer's\n// via DsCell `pinnedOffset`).\nconst normalizedHeaders = computed<DsTableHeader[]>(() =>\n props.headers.map((h) => (typeof h === 'string' ? { label: h } : h))\n);\n\nconst headerPinStyles = computed(() => {\n const map: Record<number, PinStyle> = {};\n const list = normalizedHeaders.value;\n let left = 0;\n list.forEach((h, i) => {\n if (h.pinned === DS_TABLE_PIN.LEFT) {\n map[i] = { position: 'sticky', left: `${left}px` };\n left += pinWidthPx(h.width);\n }\n });\n let right = 0;\n for (let i = list.length - 1; i >= 0; i--) {\n if (list[i].pinned === DS_TABLE_PIN.RIGHT) {\n map[i] = { position: 'sticky', right: `${right}px` };\n right += pinWidthPx(list[i].width);\n }\n }\n return map;\n});\n\nconst headerPinEdges = computed(() => {\n const list = normalizedHeaders.value;\n const lefts = list.map((h, i) => ({ h, i })).filter(({ h }) => h.pinned === DS_TABLE_PIN.LEFT);\n const rights = list.map((h, i) => ({ h, i })).filter(({ h }) => h.pinned === DS_TABLE_PIN.RIGHT);\n const set = new Set<number>();\n if (lefts.length) set.add(lefts[lefts.length - 1].i);\n if (rights.length) set.add(rights[0].i);\n return set;\n});\n\nfunction headerPinClass(header: DsTableHeader, index: number) {\n if (!header.pinned) return undefined;\n return {\n 'ds-table__pin': true,\n [`ds-table__pin--${header.pinned}`]: true,\n 'ds-table__pin--edge': headerPinEdges.value.has(index),\n };\n}\n\nfunction headerStyle(header: DsTableHeader, index: number) {\n const pin = headerPinStyles.value[index];\n const width = header.width ? { width: header.width } : undefined;\n if (!pin && !width) return undefined;\n return { ...width, ...pin };\n}\n\n// --- Horizontal scroll shadow --------------------------------------------\n// The edge pins cast a directional shadow, revealed only while there is content\n// scrolled under them. We toggle two flags from the wrapper's scroll geometry.\nconst wrapperRef = ref<HTMLElement | null>(null);\nconst scrolledStart = ref(false); // content hidden to the left of a left pin\nconst scrolledEnd = ref(false); // content hidden to the right of a right pin\nlet resizeObserver: ResizeObserver | null = null;\n\nfunction updateScrollShadow() {\n const el = wrapperRef.value;\n if (!el) return;\n scrolledStart.value = el.scrollLeft > 0;\n scrolledEnd.value = el.scrollLeft + el.clientWidth < el.scrollWidth - 1;\n}\n\nfunction teardownScroll(el: HTMLElement | null) {\n el?.removeEventListener('scroll', updateScrollShadow);\n resizeObserver?.disconnect();\n resizeObserver = null;\n}\n\n// React to the wrapper element mounting (or swapping when `compound` toggles).\n// `immediate` runs during setup with a null ref (no-op) and again once mounted.\n// ResizeObserver is guarded — jsdom (unit tests) doesn't implement it.\nwatch(\n wrapperRef,\n (el, prev) => {\n teardownScroll(prev ?? null);\n if (!el) return;\n el.addEventListener('scroll', updateScrollShadow, { passive: true });\n if (typeof ResizeObserver !== 'undefined') {\n resizeObserver = new ResizeObserver(updateScrollShadow);\n resizeObserver.observe(el);\n }\n updateScrollShadow();\n },\n { immediate: true }\n);\n\nonBeforeUnmount(() => teardownScroll(wrapperRef.value));\n\n// Structural changes can change scrollWidth → re-evaluate after the DOM updates.\n// Watch cheap length signals, not the arrays deeply: content-driven reflow (a\n// cell value changing width without a count change) is already caught by the\n// ResizeObserver on the wrapper, and a deep watch over `rows` would be costly on\n// the large tables pinned columns target.\nwatch(\n () => [props.columns.length, props.rows.length, props.headers.length, props.compound],\n () => nextTick(updateScrollShadow)\n);\n</script>\n\n<template>\n <!-- Compound (opt-in): the consumer composes DsTableRow / DsTableCell in the slot. -->\n <div\n v-if=\"compound\"\n class=\"ds-table ds-table--compound\"\n :aria-busy=\"loading ? 'true' : undefined\"\n >\n <div\n ref=\"wrapperRef\"\n class=\"ds-table__wrapper\"\n :class=\"{ 'is-scrolled-start': scrolledStart, 'is-scrolled-end': scrolledEnd }\"\n :style=\"heightStyle\"\n >\n <table class=\"ds-table__table\">\n <thead class=\"ds-table__head\">\n <tr>\n <th v-if=\"selectable\" class=\"ds-table__select-all\">\n <DsCheckbox\n :model-value=\"allSelected\"\n :indeterminate=\"!allSelected && someSelected\"\n :aria-label=\"selectAllLabel || undefined\"\n @update:model-value=\"onSelectAll\"\n />\n </th>\n <th\n v-for=\"(header, i) in normalizedHeaders\"\n :key=\"header.label\"\n :class=\"headerPinClass(header, i)\"\n :style=\"headerStyle(header, i)\"\n >\n {{ header.label }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr v-if=\"loading\">\n <td class=\"ds-table__loading\" :colspan=\"compoundColspan\" data-testid=\"ds-table-loading\">\n <slot name=\"loading\"><DsSpinner :label=\"loadingLabel || undefined\" /></slot>\n </td>\n </tr>\n <slot v-else />\n </tbody>\n </table>\n </div>\n </div>\n\n <!-- Declarative (default): columns + rows drive the whole table. -->\n <div v-else class=\"ds-table\" :aria-busy=\"loading ? 'true' : undefined\">\n <div\n ref=\"wrapperRef\"\n class=\"ds-table__wrapper\"\n :class=\"{ 'is-scrolled-start': scrolledStart, 'is-scrolled-end': scrolledEnd }\"\n >\n <table\n class=\"ds-table__table\"\n :class=\"{ 'has-row-height': rowHeight != null }\"\n :style=\"rowHeightStyle\"\n >\n <thead>\n <tr>\n <th\n v-for=\"column in columns\"\n :key=\"column.key\"\n :class=\"[\n `ds-table__th--${column.align ?? DS_TABLE_ALIGN.LEFT}`,\n columnPinClass(column),\n ]\"\n :style=\"columnHeaderStyle(column)\"\n >\n {{ column.label }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr v-if=\"loading\">\n <td\n class=\"ds-table__loading\"\n :colspan=\"Math.max(1, columns.length)\"\n data-testid=\"ds-table-loading\"\n >\n <slot name=\"loading\"><DsSpinner :label=\"loadingLabel || undefined\" /></slot>\n </td>\n </tr>\n <tr v-else-if=\"rows.length === 0\">\n <td\n class=\"ds-table__empty\"\n :colspan=\"Math.max(1, columns.length)\"\n data-testid=\"ds-table-empty\"\n >\n <slot name=\"empty\">{{ emptyMessage }}</slot>\n </td>\n </tr>\n <template v-else>\n <tr\n v-for=\"row in rows\"\n :key=\"row.id\"\n :class=\"{ 'is-highlighted': row.id === highlightRowId }\"\n data-testid=\"ds-table-row\"\n >\n <td\n v-for=\"column in columns\"\n :key=\"column.key\"\n :class=\"[\n `ds-table__td--${column.align ?? DS_TABLE_ALIGN.LEFT}`,\n columnPinClass(column),\n ]\"\n :style=\"columnCellStyle(column)\"\n :title=\"\n rowHeight != null && !$slots[`cell-${column.key}`] && row[column.key] != null\n ? String(row[column.key])\n : undefined\n \"\n >\n <slot :name=\"`cell-${column.key}`\" :row=\"row\">{{ row[column.key] }}</slot>\n </td>\n </tr>\n </template>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/shadow.scss' as sh;\n\n.ds-table {\n &__wrapper {\n overflow-x: auto;\n\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-card-lg;\n }\n\n &__table {\n width: 100%;\n border-collapse: collapse;\n\n // Own every border/height explicitly so host-app global table rules can't\n // leak in; scoped specificity (block + [data-v]) beats them.\n th {\n padding: s.spacing(1) s.spacing(2);\n\n color: colors.$slate-main;\n font-weight: t.$weight-bold;\n font-size: t.font-size('body');\n\n border: 0;\n border-bottom: 1px solid colors.$slate-tint;\n\n background-color: colors.$slate-bg;\n }\n\n td {\n height: auto;\n padding: s.spacing(1) s.spacing(2);\n vertical-align: middle;\n\n color: colors.$slate-main;\n font-size: t.font-size('body');\n\n border: 0;\n }\n\n // Opt-in fixed row height → pin td height and truncate overflowing text.\n &.has-row-height td {\n height: var(--ds-table-row-height);\n\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n tr {\n border: 0;\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n }\n\n // Row separator only BETWEEN adjacent body rows.\n tbody tr + tr {\n border-top: 1px solid colors.$slate-tint;\n }\n\n // Row hover (data-dense affordance).\n tbody tr:hover {\n background-color: colors.$slate-bg;\n }\n\n // The highlighted \"most likely\" row wins over hover.\n tbody tr.is-highlighted {\n background-color: colors.$accent-bg;\n }\n tbody tr.is-highlighted:hover {\n background-color: colors.$accent-tint;\n }\n }\n\n &__th--left,\n &__td--left {\n text-align: left;\n }\n &__th--center,\n &__td--center {\n text-align: center;\n }\n &__th--right,\n &__td--right {\n text-align: right;\n }\n\n // Full-width empty / loading rows. `.ds-table__table td` above is (0,1,1); a\n // bare `.ds-table__empty` / `.ds-table__loading` is only (0,1,0) and loses to\n // it, so the shared td `padding` (and `color`) would win — collapsing the row\n // to 8px and clamping the spinner to the top. Qualify with `td` + the table\n // context (→ 0,2,1) so the generous padding and centering actually apply.\n &__table td#{&}__empty {\n padding: s.spacing(5) s.spacing(3);\n\n color: colors.$slate-soft;\n text-align: center;\n }\n\n // Loading row: same generous padding as the empty state; the inline-block\n // spinner is centered horizontally by text-align and vertically by the td's\n // vertical-align:middle (works for both APIs).\n &__table td#{&}__loading {\n padding: s.spacing(5) s.spacing(3);\n text-align: center;\n }\n\n /* ---------- Pinned (sticky) columns ---------- */\n // Shared by both APIs (declarative th/td; compound header th — compound body\n // cells are DsCell, styled in DsCell.vue). position / left / right + width\n // arrive via the inline style; here we own the opaque background (so scrolling\n // cells never bleed through), the stacking order, and the edge shadow.\n &__pin {\n background-color: colors.$white;\n }\n thead &__pin {\n // Header pins sit on the grey header surface, above sibling header cells.\n z-index: 3;\n background-color: colors.$slate-bg;\n }\n tbody &__pin {\n // Body pins above normal body cells, below the compound sticky header (10).\n z-index: 2;\n }\n // Body pin tracks the declarative row background states (white / hover / accent).\n tbody tr:hover &__pin {\n background-color: colors.$slate-bg;\n }\n tbody tr.is-highlighted &__pin {\n background-color: colors.$accent-bg;\n }\n tbody tr.is-highlighted:hover &__pin {\n background-color: colors.$accent-tint;\n }\n // The outermost pin on each side casts a directional shadow, revealed only when\n // there is content scrolled under it (wrapper toggles the scrolled-* classes).\n &__pin--edge {\n transition: box-shadow m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n }\n &__wrapper.is-scrolled-start &__pin--left#{&}__pin--edge {\n box-shadow: sh.$shadow-pinned-left;\n }\n &__wrapper.is-scrolled-end &__pin--right#{&}__pin--edge {\n box-shadow: sh.$shadow-pinned-right;\n }\n\n /* ---------- Compound shell (opt-in) ---------- */\n &--compound {\n .ds-table__wrapper {\n overflow: auto; // both axes; height (prop) enables the sticky-header scroll\n }\n\n .ds-table__table {\n // Fixed layout + separate borders so the sticky header keeps its hairlines.\n border-collapse: separate;\n border-spacing: 0;\n table-layout: fixed;\n }\n\n // Sticky grey header (DS DsTable.jsx).\n .ds-table__head {\n position: sticky;\n top: 0;\n z-index: 10;\n\n background-color: colors.$slate-bg;\n }\n\n th {\n // DS thStyle: 4px 16px, full hairline border, 30px tall.\n padding: s.spacing(0.5) s.spacing(2);\n height: 30px; // DS DsTable.jsx thStyle\n\n text-align: left;\n\n color: colors.$slate-main;\n font-weight: t.$weight-bold;\n font-size: t.font-size('body');\n\n border: 1px solid colors.$slate-tint;\n\n background-color: colors.$slate-bg;\n }\n\n .ds-table__select-all {\n width: 52px; // DS: leading checkbox column\n text-align: center;\n }\n\n // Compound body pins are DsCell (its own scope) — reach them via :deep to\n // drive the same scroll-toggled edge shadow. A single pin per side is the\n // clean case; stacking multiple pins per side casts a shadow per cell.\n :deep(.ds-cell.is-pinned) {\n transition: box-shadow m.$duration-default m.$easing;\n }\n .ds-table__wrapper.is-scrolled-start :deep(.ds-cell.is-pinned--left) {\n box-shadow: sh.$shadow-pinned-left;\n }\n .ds-table__wrapper.is-scrolled-end :deep(.ds-cell.is-pinned--right) {\n box-shadow: sh.$shadow-pinned-right;\n }\n }\n}\n</style>\n","// DsInput — the DS \"Input\": single-line field. Prop vocabulary mirrors Input.jsx.\n// Border: mid grey at rest, darker on hover, the dark grey focus token on focus, coral on error. The text\n// keeps its weight on focus. Sizes are the DS input heights.\n\nexport const DS_INPUT_TYPES = {\n TEXT: 'text',\n EMAIL: 'email',\n PASSWORD: 'password',\n TEL: 'tel',\n NUMBER: 'number',\n SEARCH: 'search',\n URL: 'url',\n} as const;\nexport type DsInputType = (typeof DS_INPUT_TYPES)[keyof typeof DS_INPUT_TYPES];\n\nexport const DS_INPUT_SIZES = {\n SM: 'sm', // 36px\n MD: 'md', // 48px\n} as const;\nexport type DsInputSize = (typeof DS_INPUT_SIZES)[keyof typeof DS_INPUT_SIZES];\n","<template>\n <div\n class=\"ds-input\"\n :class=\"[\n `ds-input--${size}`,\n { 'is-error': error, 'is-disabled': disabled, 'is-search': isSearch },\n ]\"\n @focusout=\"onFieldFocusOut\"\n >\n <div class=\"ds-input__wrap\">\n <i v-if=\"isSearch\" class=\"material-symbols-filled ds-input__search-icon\" aria-hidden=\"true\"\n >search</i\n >\n\n <input\n :id=\"id || undefined\"\n ref=\"inputEl\"\n v-model=\"model\"\n class=\"ds-input__control\"\n :class=\"{ 'has-suffix': hasSuffix }\"\n :type=\"resolvedType\"\n :placeholder=\"placeholder\"\n :min=\"min\"\n :max=\"max\"\n :step=\"step\"\n :disabled=\"disabled\"\n :name=\"name || undefined\"\n :autocomplete=\"autocomplete || undefined\"\n :aria-invalid=\"error || undefined\"\n :aria-describedby=\"error && errorMessage && id ? `${id}-error` : undefined\"\n @focus=\"emit(FOCUS, $event)\"\n @blur=\"emit(BLUR, $event)\"\n @change=\"emit(CHANGE, $event)\"\n />\n\n <div v-if=\"hasSuffix\" class=\"ds-input__suffix\">\n <slot name=\"suffix\" />\n\n <i\n v-if=\"error && showErrorIcon\"\n class=\"material-symbols-filled ds-input__error-icon\"\n aria-hidden=\"true\"\n >warning</i\n >\n\n <button\n v-else-if=\"hasRevealToggle\"\n type=\"button\"\n class=\"ds-input__toggle\"\n :disabled=\"disabled\"\n :aria-label=\"toggleLabel || undefined\"\n :aria-pressed=\"reveal\"\n @click=\"toggleReveal\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">{{\n reveal ? 'visibility' : 'visibility_off'\n }}</i>\n </button>\n </div>\n </div>\n\n <p v-if=\"error && errorMessage\" :id=\"id ? `${id}-error` : undefined\" class=\"ds-input__error\">\n {{ errorMessage }}\n </p>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref, useSlots, type PropType } from 'vue';\nimport { FOCUS, BLUR, CHANGE, FIELD_BLUR } from '@shared/constants/events';\nimport {\n DS_INPUT_TYPES,\n DS_INPUT_SIZES,\n type DsInputType,\n type DsInputSize,\n} from './DsInput.types';\n\nconst model = defineModel<string>({ default: '' });\n\nconst props = defineProps({\n type: { type: String as PropType<DsInputType>, default: DS_INPUT_TYPES.TEXT },\n size: { type: String as PropType<DsInputSize>, default: DS_INPUT_SIZES.SM },\n placeholder: { type: String, default: '' },\n disabled: Boolean,\n error: Boolean,\n errorMessage: { type: String, default: '' },\n showErrorIcon: Boolean,\n name: { type: String, default: '' },\n id: { type: String, default: '' },\n autocomplete: { type: String, default: '' },\n // Accessible name for the password visibility toggle.\n toggleLabel: { type: String, default: '' },\n // Native number-input constraints — only meaningful for type=\"number\", forwarded\n // to the real <input>. String is allowed so `step=\"any\"` is expressible.\n min: { type: [Number, String], default: undefined },\n max: { type: [Number, String], default: undefined },\n step: { type: [Number, String], default: undefined },\n});\n\nconst emit = defineEmits([FOCUS, BLUR, CHANGE, FIELD_BLUR]);\n\n// Direct handle to the native control for the imperative focus API below.\nconst inputEl = ref<HTMLInputElement>();\n\n// Real \"field exit\": the native @blur above fires on every focus loss —including\n// when focus moves to this component's OWN password toggle— because `blur` does\n// not bubble and can't see the wider context. `focusout` DOES bubble, so on the\n// root we can read where focus went next (relatedTarget) and only emit when it\n// landed OUTSIDE the component. Same pattern as DsTooltip.onFocusOut.\nfunction onFieldFocusOut(e: FocusEvent) {\n const next = e.relatedTarget as Node | null;\n const root = e.currentTarget as HTMLElement | null;\n // Focus moved to a descendant (input ↔ its own toggle): still inside the field.\n if (next && root?.contains(next)) return;\n emit(FIELD_BLUR, e);\n}\n\nconst slots = useSlots();\nconst reveal = ref(false);\n// Guarded so a disabled field's toggle can't flip the reveal state (the native\n// `:disabled` already blocks the click; this is the belt-and-suspenders guard).\nfunction toggleReveal() {\n if (props.disabled) return;\n reveal.value = !reveal.value;\n}\nconst isPassword = computed(() => props.type === DS_INPUT_TYPES.PASSWORD);\nconst isSearch = computed(() => props.type === DS_INPUT_TYPES.SEARCH);\n// DS: password toggles text/password on reveal; search renders as a plain text\n// input (the search affordance is the left icon + styling, not the native type).\nconst resolvedType = computed(() => {\n if (isPassword.value) return reveal.value ? DS_INPUT_TYPES.TEXT : DS_INPUT_TYPES.PASSWORD;\n if (isSearch.value) return DS_INPUT_TYPES.TEXT;\n return props.type;\n});\n// The reveal toggle renders only when a `toggleLabel` is provided: an icon-only\n// button with no accessible name would break the a11y contract, and the library\n// can't hardcode the label (no hardcoded user-facing text). No label → no toggle.\nconst hasRevealToggle = computed(() => isPassword.value && !!props.toggleLabel);\nconst hasSuffix = computed(\n () => !!slots.suffix || (props.error && props.showErrorIcon) || hasRevealToggle.value\n);\n\n// Imperative focus API — pure delegation to the native input's own DOM methods\n// (no store, no side effects beyond focus). The consuming app calls these via a\n// template ref, e.g. to focus the field after opening a panel.\ndefineExpose({\n focus: () => inputEl.value?.focus(),\n focusAtEnd: async () => {\n // Wait a tick so any pending v-model render has flushed before we measure.\n await nextTick();\n const el = inputEl.value;\n if (!el) return;\n el.focus();\n const n = el.value.length;\n // setSelectionRange throws on input types that don't support text selection\n // (email, number, …); focus() alone is the correct behavior for those.\n try {\n el.setSelectionRange(n, n);\n } catch {\n /* type doesn't support selection — focus is enough */\n }\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/border.scss' as b;\n\n.ds-input {\n display: block;\n width: 100%;\n\n &__wrap {\n position: relative;\n width: 100%;\n }\n\n &__control {\n box-sizing: border-box;\n width: 100%;\n padding: 0 16px;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n font-weight: t.$weight-regular;\n line-height: 20px;\n\n background-color: colors.$white;\n\n /* Border: mid grey at rest, darker on hover, dark grey on focus (see precedence below). */\n border: 1px solid b.$border-input;\n border-radius: r.$radius-control;\n outline: none;\n\n transition: border-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &.has-suffix {\n padding-right: 50px;\n }\n\n &:focus {\n border-color: b.$border-input-focus;\n }\n }\n\n &:not(.is-error, .is-disabled, .is-search) &__control:hover:not(:focus) {\n border-color: b.$border-input-hover;\n }\n\n &__suffix {\n position: absolute;\n top: 0;\n right: 0;\n\n display: flex;\n align-items: center;\n gap: 4px;\n\n height: 100%;\n padding: 0 16px;\n\n color: colors.$slate-soft;\n }\n\n &__toggle {\n display: inline-flex;\n padding: 0;\n\n color: inherit;\n\n background: transparent;\n border: 0;\n\n cursor: pointer;\n\n &:disabled {\n cursor: not-allowed;\n }\n }\n\n &__error-icon {\n color: colors.$error-main;\n }\n\n &__error {\n margin-top: 2px;\n\n color: colors.$error-main;\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('caption');\n line-height: 18px;\n }\n\n /* ---------- Sizes (DS input heights + icon sizes) ---------- */\n &--sm {\n .ds-input__control {\n height: 36px;\n }\n .material-symbols-filled {\n font-size: i.icon-size(18); // DS Input.jsx: suffix glyph is 18 at sm (24 at md)\n }\n }\n &--md {\n .ds-input__control {\n height: 48px;\n }\n .material-symbols-filled {\n font-size: i.icon-size(24);\n }\n }\n\n /* ---------- Search type (DS): left magnifier, subtle grey field, borderless\n until focus (then a dark grey border).\n Placed before States so is-error / is-disabled still win. ---------- */\n &.is-search {\n .ds-input__search-icon {\n position: absolute;\n top: 50%;\n left: 16px;\n\n color: colors.$slate-soft;\n font-size: i.icon-size(20);\n\n transform: translateY(-50%);\n pointer-events: none;\n }\n .ds-input__control {\n padding-left: 48px;\n\n background-color: colors.$slate-bg;\n border-color: transparent;\n }\n .ds-input__control:focus {\n border-color: b.$border-input-focus;\n }\n }\n\n /* ---------- States (precedence: rest → focus → disabled → error) ---------- */\n &.is-disabled .ds-input__control {\n color: colors.$slate-mid;\n background-color: colors.$slate-bg;\n border-color: colors.$slate-mid;\n cursor: not-allowed;\n }\n &.is-error .ds-input__control,\n &.is-error .ds-input__control:focus {\n border-color: colors.$error-main;\n }\n}\n</style>\n","// DsTextarea — the DS \"Textarea\": multi-line variant of DsInput, same border\n// treatment (mid grey at rest, darker on hover, darkest on focus, coral on error). Prop\n// vocabulary mirrors Textarea.jsx. No variant enums; this documents the props.\n\n// CSS `resize` keyword the control accepts (default vertical).\nexport const DS_TEXTAREA_RESIZE = {\n NONE: 'none',\n VERTICAL: 'vertical',\n HORIZONTAL: 'horizontal',\n BOTH: 'both',\n} as const;\nexport type DsTextareaResize = (typeof DS_TEXTAREA_RESIZE)[keyof typeof DS_TEXTAREA_RESIZE];\n\n// Appearance. `emphasis` looks exactly like `default`; it only stays so existing callers keep working.\nexport const DS_TEXTAREA_VARIANTS = {\n DEFAULT: 'default',\n /** @deprecated — identical to default; will be removed */\n EMPHASIS: 'emphasis',\n} as const;\nexport type DsTextareaVariant = (typeof DS_TEXTAREA_VARIANTS)[keyof typeof DS_TEXTAREA_VARIANTS];\n\nexport interface DsTextareaProps {\n modelValue?: string;\n placeholder?: string;\n rows?: number;\n error?: boolean;\n errorMessage?: string;\n disabled?: boolean;\n readonly?: boolean;\n autoGrow?: boolean;\n minRows?: number;\n maxRows?: number;\n resize?: DsTextareaResize;\n /** @deprecated — identical to default; will be removed. Leave it unset, `'emphasis'` changes nothing. */\n variant?: DsTextareaVariant;\n}\n","<template>\n <div\n class=\"ds-textarea\"\n :class=\"[\n `ds-textarea--${variant}`,\n `ds-textarea--resize-${resize}`,\n {\n 'ds-textarea--has-leading': $slots.leading,\n 'ds-textarea--auto-grow': autoGrow,\n 'is-error': error,\n 'is-disabled': disabled,\n 'is-readonly': readonly,\n },\n ]\"\n v-bind=\"rootAttrs\"\n >\n <span v-if=\"$slots.leading\" class=\"ds-textarea__leading\" aria-hidden=\"true\">\n <slot name=\"leading\" />\n </span>\n <textarea\n v-bind=\"controlAttrs\"\n :id=\"id || undefined\"\n ref=\"control\"\n v-model=\"value\"\n class=\"ds-textarea__control\"\n :placeholder=\"placeholder\"\n :rows=\"autoGrow ? minRows : rows\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :name=\"name || undefined\"\n :aria-invalid=\"error || undefined\"\n :aria-describedby=\"error && errorMessage && id ? `${id}-error` : undefined\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n />\n <p v-if=\"error && errorMessage\" :id=\"id ? `${id}-error` : undefined\" class=\"ds-textarea__error\">\n {{ errorMessage }}\n </p>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, useAttrs, watch, type PropType } from 'vue';\nimport { FOCUS, BLUR } from '@shared/constants/events';\nimport {\n DS_TEXTAREA_RESIZE,\n DS_TEXTAREA_VARIANTS,\n type DsTextareaResize,\n type DsTextareaVariant,\n} from './DsTextarea.types';\n\n// Split fallthrough attrs: `class`/`style`/`data-*` describe the field wrapper\n// (layout, spacing, test hooks) and stay on the root, exactly as before; native\n// control attrs (maxlength, autocomplete, spellcheck, autofocus, aria-*, listeners…)\n// go to the real <textarea> — where they previously landed uselessly on the div.\ndefineOptions({ inheritAttrs: false });\n\nconst model = defineModel<string>({ default: '' });\n\nconst props = defineProps({\n placeholder: { type: String, default: '' },\n rows: { type: Number, default: 4 },\n disabled: Boolean,\n // Focusable and selectable but not editable (no grey disabled look, no emit).\n readonly: Boolean,\n // Grow with the content between `minRows` and `maxRows`, then scroll.\n autoGrow: Boolean,\n minRows: { type: Number, default: 1 },\n maxRows: { type: Number, default: undefined },\n error: Boolean,\n errorMessage: { type: String, default: '' },\n name: { type: String, default: '' },\n id: { type: String, default: '' },\n // CSS resize behavior of the control (default vertical, mirrors the DS).\n resize: {\n type: String as PropType<DsTextareaResize>,\n default: DS_TEXTAREA_RESIZE.VERTICAL,\n },\n variant: {\n type: String as PropType<DsTextareaVariant>,\n default: DS_TEXTAREA_VARIANTS.DEFAULT,\n },\n});\n\nconst emit = defineEmits([FOCUS, BLUR]);\n\n// Guards the v-model (keeps native IME handling) so a readonly field never emits.\nconst value = computed({\n get: () => model.value,\n set: (v: string) => {\n if (!props.readonly) model.value = v;\n },\n});\n\nconst control = ref<HTMLElement | null>(null);\n// DS control line-height; jsdom has no layout, so it is also the fallback there.\nconst FALLBACK_LINE_HEIGHT = 20;\n\nfunction px(v: string) {\n return parseFloat(v) || 0;\n}\n\nfunction fit() {\n const el = control.value;\n if (!el || !props.autoGrow) return;\n const cs = window.getComputedStyle(el);\n const line = px(cs.lineHeight) || FALLBACK_LINE_HEIGHT;\n const chrome =\n px(cs.paddingTop) + px(cs.paddingBottom) + px(cs.borderTopWidth) + px(cs.borderBottomWidth);\n el.style.height = 'auto';\n const content = el.scrollHeight + px(cs.borderTopWidth) + px(cs.borderBottomWidth);\n const min = line * props.minRows + chrome;\n const max = props.maxRows ? line * props.maxRows + chrome : Infinity;\n el.style.height = `${Math.min(Math.max(content, min), max)}px`;\n el.style.overflowY = content > max ? 'auto' : 'hidden';\n}\n\nfunction onFocus(event: FocusEvent) {\n emit(FOCUS, event);\n}\nfunction onBlur(event: FocusEvent) {\n emit(BLUR, event);\n}\n\n// The text reflows when the box width changes (e.g. a collapsing side panel).\nlet observer: ResizeObserver | undefined;\nlet lastWidth = 0;\n\nonMounted(() => {\n fit();\n if (typeof ResizeObserver === 'undefined' || !control.value) return;\n lastWidth = control.value.clientWidth;\n observer = new ResizeObserver(([entry]) => {\n const width = entry?.contentRect.width ?? 0;\n if (width === lastWidth) return;\n lastWidth = width;\n fit();\n });\n observer.observe(control.value);\n});\nonBeforeUnmount(() => observer?.disconnect());\n\nwatch(() => [model.value, props.autoGrow, props.minRows, props.maxRows], fit, { flush: 'post' });\n\nconst attrs = useAttrs();\nconst isRootAttr = (k: string) => k === 'class' || k === 'style' || k.startsWith('data-');\nconst rootAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([k]) => isRootAttr(k)))\n);\nconst controlAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([k]) => !isRootAttr(k)))\n);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/scrollbar.scss' as sb;\n@use '../../assets/css/border.scss' as b;\n\n.ds-textarea {\n position: relative;\n display: block;\n width: 100%;\n\n // Icon box: top-anchored on the first line (control padding 12/16, line-height 20).\n &__leading {\n position: absolute;\n top: s.spacing(1.5);\n left: s.spacing(2);\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 20px;\n\n pointer-events: none;\n\n :slotted(i) {\n font-size: i.icon-size(20);\n line-height: 1;\n }\n }\n &--has-leading &__control {\n padding-left: calc(#{s.spacing(2)} + #{i.icon-size(20)} + #{s.spacing(1)});\n }\n\n &__control {\n box-sizing: border-box;\n width: 100%;\n padding: 12px 16px;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n font-weight: t.$weight-regular;\n line-height: 20px;\n\n background-color: colors.$white;\n\n border: 1px solid b.$border-input;\n border-radius: r.$radius-control;\n outline: none;\n\n resize: vertical;\n transition: border-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n @include sb.scrollbar;\n\n &:focus {\n border-color: b.$border-input-focus;\n }\n }\n\n &:not(.is-error, .is-disabled) &__control:hover:not(:focus) {\n border-color: b.$border-input-hover;\n }\n\n // Resize behavior — `vertical` is the base rule above; these override it.\n &--resize-none .ds-textarea__control {\n resize: none;\n }\n &--resize-horizontal .ds-textarea__control {\n resize: horizontal;\n }\n &--resize-both .ds-textarea__control {\n resize: both;\n }\n // The height follows the content, so the drag handle is off (wins over resize-*).\n &--auto-grow .ds-textarea__control {\n overflow-y: hidden;\n resize: none;\n }\n\n &__error {\n margin-top: 2px;\n\n color: colors.$error-main;\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('caption');\n line-height: 18px;\n }\n\n &.is-disabled .ds-textarea__control {\n color: colors.$slate-mid;\n background-color: colors.$slate-bg;\n border-color: colors.$slate-mid;\n cursor: not-allowed;\n }\n &.is-readonly .ds-textarea__control {\n cursor: default;\n }\n &.is-error .ds-textarea__control,\n &.is-error .ds-textarea__control:focus {\n border-color: colors.$error-main;\n }\n}\n</style>\n","// DsAlert — the DS inline banner (Alert.jsx). type × effect (light tint / dark solid).\n\nexport const DS_ALERT_TYPES = {\n SUCCESS: 'success',\n INFO: 'info',\n WARNING: 'warning',\n ERROR: 'error',\n} as const;\nexport type DsAlertType = (typeof DS_ALERT_TYPES)[keyof typeof DS_ALERT_TYPES];\n\nexport const DS_ALERT_EFFECTS = {\n LIGHT: 'light', // tinted: family tint bg + mid border + shadow text\n DARK: 'dark', // solid: family shadow bg + white text\n} as const;\nexport type DsAlertEffect = (typeof DS_ALERT_EFFECTS)[keyof typeof DS_ALERT_EFFECTS];\n\n// Material Icon per type (leading icon when showIcon).\nexport const DS_ALERT_ICONS: Record<DsAlertType, string> = {\n success: 'check_circle',\n info: 'info',\n warning: 'warning',\n error: 'error',\n};\n","<template>\n <transition name=\"ds-alert-fade\">\n <div\n v-if=\"visible\"\n class=\"ds-alert\"\n :class=\"[`ds-alert--${type}`, `ds-alert--${effect}`, { 'is-center': center }]\"\n role=\"alert\"\n >\n <i v-if=\"showIcon\" class=\"material-symbols-filled ds-alert__icon\" aria-hidden=\"true\">{{\n icon\n }}</i>\n\n <div class=\"ds-alert__content\">\n <div\n v-if=\"hasTitle\"\n class=\"ds-alert__title\"\n :class=\"{ 'has-body': hasBody, 'is-bold': hasBody || boldTitle }\"\n >\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div v-if=\"hasBody\" class=\"ds-alert__body\">\n <slot>{{ description }}</slot>\n </div>\n </div>\n\n <button\n v-if=\"closable\"\n type=\"button\"\n class=\"ds-alert__close\"\n :aria-label=\"closeLabel || undefined\"\n @click=\"onClose\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">close</i>\n </button>\n </div>\n </transition>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, useSlots, type PropType } from 'vue';\nimport { CLOSE } from '@shared/constants/events';\nimport {\n DS_ALERT_TYPES,\n DS_ALERT_EFFECTS,\n DS_ALERT_ICONS,\n type DsAlertType,\n type DsAlertEffect,\n} from './DsAlert.types';\n\nconst props = defineProps({\n type: { type: String as PropType<DsAlertType>, default: DS_ALERT_TYPES.INFO },\n effect: { type: String as PropType<DsAlertEffect>, default: DS_ALERT_EFFECTS.LIGHT },\n title: { type: String, default: '' },\n description: { type: String, default: '' },\n showIcon: Boolean,\n closable: Boolean,\n center: Boolean,\n // Bold the title even without a body (DS: fontWeight = body || boldTitle ? 700 : 400).\n boldTitle: Boolean,\n closeLabel: { type: String, default: '' },\n});\n\nconst emit = defineEmits([CLOSE]);\n\n// Visibility is opt-in controllable: bind `v-model:visible` to reset/reopen the\n// alert declaratively from the parent. Without a binding it defaults to `true`\n// and behaves as internal state — the X still self-closes and emits `close`.\nconst visible = defineModel('visible', { type: Boolean, default: true });\n\nconst slots = useSlots();\nconst icon = computed(() => DS_ALERT_ICONS[props.type]);\nconst hasBody = computed(() => !!slots.default || props.description.length > 0);\n// Title renders from the #title slot (rich content) or the `title` prop.\nconst hasTitle = computed(() => !!slots.title || props.title.length > 0);\n\nfunction onClose() {\n visible.value = false;\n emit(CLOSE);\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-alert {\n position: relative;\n\n display: flex;\n align-items: center;\n\n padding: 8px 16px;\n\n font-family: t.$font-family;\n\n border: 1px solid transparent;\n border-radius: r.$radius-control;\n\n &.is-center {\n justify-content: center;\n }\n\n &__icon {\n margin-right: 8px;\n // DS Alert.jsx: status glyph is 16 (md-20 class, fontSize:16 override).\n font-size: i.icon-size(16);\n }\n\n &__content {\n flex: 1;\n padding: 0 8px;\n }\n\n &__title {\n font-size: t.font-size('small');\n font-weight: t.$weight-regular;\n line-height: 18px;\n\n // Bold when a body follows OR boldTitle is set. Kept separate from `has-body`\n // (which only drives the body's margin-top sibling selector below).\n &.is-bold {\n font-weight: t.$weight-bold;\n }\n }\n\n &__body {\n font-size: t.font-size('caption');\n }\n\n // DS: body margin-top is 5 only when a title precedes it, 0 otherwise.\n &__title.has-body + .ds-alert__body {\n margin-top: 5px;\n }\n\n &__close {\n position: absolute;\n top: 12px;\n right: 15px;\n\n display: inline-flex;\n padding: 0;\n\n color: inherit;\n\n background: transparent;\n border: 0;\n\n cursor: pointer;\n\n .material-symbols-filled {\n font-size: i.icon-size(16);\n }\n }\n\n /* ---------- light (tinted) — bg tint + mid border + shadow text ---------- */\n &--light {\n &.ds-alert--success {\n color: colors.$success-shadow;\n border-color: colors.$success-mid;\n background-color: colors.$success-tint;\n }\n &.ds-alert--info {\n color: colors.$info-shadow;\n border-color: colors.$info-mid;\n background-color: colors.$info-tint;\n }\n &.ds-alert--warning {\n color: colors.$warning-shadow;\n border-color: colors.$warning-mid;\n background-color: colors.$warning-tint;\n }\n &.ds-alert--error {\n color: colors.$error-shadow;\n border-color: colors.$error-mid;\n background-color: colors.$error-tint;\n }\n }\n\n /* ---------- dark (solid) — bg shadow + white text ---------- */\n &--dark {\n color: colors.$white;\n border-color: transparent;\n\n &.ds-alert--success {\n background-color: colors.$success-shadow;\n }\n &.ds-alert--info {\n background-color: colors.$info-shadow;\n }\n &.ds-alert--warning {\n background-color: colors.$warning-shadow;\n }\n &.ds-alert--error {\n background-color: colors.$error-shadow;\n }\n }\n}\n\n/* Fade on mount/dismiss (the root v-if). Opacity only — no color/spacing literal. */\n.ds-alert-fade-enter-active,\n.ds-alert-fade-leave-active {\n transition: opacity m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n}\n.ds-alert-fade-enter-from,\n.ds-alert-fade-leave-to {\n opacity: 0;\n}\n</style>\n","// DsNotification — the DS toast card (Notification.jsx). Fixed-position, 4 types.\n\nexport const DS_NOTIFICATION_TYPES = {\n SUCCESS: 'success',\n INFO: 'info',\n WARNING: 'warning',\n ERROR: 'error',\n} as const;\nexport type DsNotificationType = (typeof DS_NOTIFICATION_TYPES)[keyof typeof DS_NOTIFICATION_TYPES];\n\nexport const DS_NOTIFICATION_POSITIONS = {\n TOP_LEFT: 'top-left',\n TOP_CENTER: 'top-center',\n TOP_RIGHT: 'top-right',\n BOTTOM_LEFT: 'bottom-left',\n BOTTOM_RIGHT: 'bottom-right',\n} as const;\nexport type DsNotificationPosition =\n (typeof DS_NOTIFICATION_POSITIONS)[keyof typeof DS_NOTIFICATION_POSITIONS];\n\n// Material Icon per type. `error` uses the filled `error` glyph (circle) per the live\n// design prototype (ApiApp.jsx ToastCard) — the older _ds_bundle.js used `warning` here.\nexport const DS_NOTIFICATION_ICONS: Record<DsNotificationType, string> = {\n success: 'check_circle',\n info: 'mode_edit',\n warning: 'warning',\n error: 'error',\n};\n\n// `target` del <a> del link. Default `_blank` (comportamiento histórico, se\n// mantiene para no romper). Usá `_self` para navegar en la misma pestaña; para\n// navegación in-app (SPA, sin recarga) escuchá el evento `navigate` y llamá al\n// router de la app. `rel=\"noopener noreferrer\"` se aplica solo con `_blank`.\nexport const DS_NOTIFICATION_LINK_TARGETS = {\n BLANK: '_blank',\n SELF: '_self',\n PARENT: '_parent',\n TOP: '_top',\n} as const;\nexport type DsNotificationLinkTarget =\n (typeof DS_NOTIFICATION_LINK_TARGETS)[keyof typeof DS_NOTIFICATION_LINK_TARGETS];\n","import { DS_NOTIFICATION_POSITIONS, type DsNotificationPosition } from './DsNotification.types';\n\nconst STACK_CLASS = 'ds-notification-stack';\n\n// `top-center` toasts share one fixed flex column, so several alive at once stack instead of\n// overlapping. Corners keep teleporting straight to <body>, exactly as before.\nexport function notificationTeleportTarget(position: DsNotificationPosition): HTMLElement | 'body' {\n if (position !== DS_NOTIFICATION_POSITIONS.TOP_CENTER || typeof document === 'undefined') {\n return 'body';\n }\n const modifier = `${STACK_CLASS}--${position}`;\n const existing = document.body.querySelector<HTMLElement>(`:scope > .${modifier}`);\n if (existing) return existing;\n\n const host = document.createElement('div');\n host.className = `${STACK_CLASS} ${modifier}`;\n document.body.appendChild(host);\n return host;\n}\n","<template>\n <Teleport :to=\"teleportTarget\">\n <Transition name=\"ds-notification\" appear>\n <div v-if=\"visible\" class=\"ds-notification\" :class=\"`ds-notification--${position}`\">\n <div\n class=\"ds-notification__card\"\n :class=\"`ds-notification__card--${type}`\"\n role=\"alert\"\n @mouseenter=\"pause\"\n @mouseleave=\"resume\"\n >\n <i class=\"material-symbols-filled ds-notification__icon\" aria-hidden=\"true\">{{ icon }}</i>\n\n <div class=\"ds-notification__content\">\n <span v-if=\"title\" class=\"ds-notification__title\">{{ title }}</span>\n <p v-if=\"description\" class=\"ds-notification__desc\">{{ description }}</p>\n <a\n v-if=\"linkTitle\"\n class=\"ds-notification__link\"\n :href=\"link || undefined\"\n :target=\"linkTarget\"\n :rel=\"linkRel\"\n @click=\"onLinkClick\"\n >{{ linkTitle }}</a\n >\n </div>\n\n <button\n v-if=\"showClose\"\n type=\"button\"\n class=\"ds-notification__close\"\n :aria-label=\"closeLabel || undefined\"\n @click=\"onClose\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">close</i>\n </button>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, type PropType } from 'vue';\nimport { CLOSE, NAVIGATE } from '@shared/constants/events';\nimport { notificationTeleportTarget } from './notificationStack';\nimport {\n DS_NOTIFICATION_TYPES,\n DS_NOTIFICATION_POSITIONS,\n DS_NOTIFICATION_ICONS,\n DS_NOTIFICATION_LINK_TARGETS,\n type DsNotificationType,\n type DsNotificationPosition,\n type DsNotificationLinkTarget,\n} from './DsNotification.types';\n\nconst props = defineProps({\n type: { type: String as PropType<DsNotificationType>, default: DS_NOTIFICATION_TYPES.INFO },\n position: {\n type: String as PropType<DsNotificationPosition>,\n default: DS_NOTIFICATION_POSITIONS.BOTTOM_LEFT,\n },\n title: { type: String, default: '' },\n description: { type: String, default: '' },\n linkTitle: { type: String, default: '' },\n link: { type: String, default: '' },\n // `target` del <a> del link. Default `_blank` para no romper el comportamiento\n // histórico. Con `_blank` se emite `rel=\"noopener noreferrer\"` (seguridad). Para\n // navegación in-app (SPA) escuchá `navigate` y enrutá con el router de la app.\n linkTarget: {\n type: String as PropType<DsNotificationLinkTarget>,\n default: DS_NOTIFICATION_LINK_TARGETS.BLANK,\n },\n showClose: { type: Boolean, default: true },\n // Accessible name for the icon-only close button — provide it whenever\n // `showClose` is on, or the button has no name for screen readers (as with any\n // icon-only control, cf. DsButton circle/square requiring `ariaLabel`). The\n // library never hardcodes copy; the consuming app owns i18n.\n closeLabel: { type: String, default: '' },\n // Auto-dismiss delay in ms (DS default 3500). 0 disables it. The timer pauses\n // while the pointer is over the card and resumes with the remaining time.\n duration: { type: Number, default: 3500 },\n});\n\nconst emit = defineEmits([CLOSE, NAVIGATE]);\n\nconst visible = ref(true);\nconst icon = computed(() => DS_NOTIFICATION_ICONS[props.type]);\nconst teleportTarget = notificationTeleportTarget(props.position);\n\n// `noopener noreferrer` solo cuando el link abre en otra pestaña (`_blank`):\n// evita que la página destino acceda a `window.opener` y filtre el referrer.\nconst linkRel = computed(() =>\n props.linkTarget === DS_NOTIFICATION_LINK_TARGETS.BLANK ? 'noopener noreferrer' : undefined\n);\n\nlet timer: ReturnType<typeof setTimeout> | undefined;\nlet startedAt = 0;\nlet remaining = props.duration;\n\nfunction clearTimer() {\n if (timer) {\n clearTimeout(timer);\n timer = undefined;\n }\n}\n\nfunction schedule(ms: number) {\n clearTimer();\n if (props.duration <= 0 || !visible.value) return;\n startedAt = Date.now();\n timer = setTimeout(onClose, ms);\n}\n\nfunction pause() {\n if (!timer) return;\n remaining -= Date.now() - startedAt;\n clearTimer();\n}\n\nfunction resume() {\n schedule(remaining > 0 ? remaining : props.duration);\n}\n\nfunction onClose() {\n clearTimer();\n visible.value = false;\n emit(CLOSE);\n}\n\n// El link es un <a href> real (a11y: focuseable, teclado, fallback sin JS). Emitimos\n// el MouseEvent para que el consumidor pueda `preventDefault()` y enrutar in-app con\n// su router; sin listener, la navegación nativa del <a> sigue funcionando igual.\nfunction onLinkClick(event: MouseEvent) {\n emit(NAVIGATE, event);\n}\n\nonMounted(() => schedule(props.duration));\nonBeforeUnmount(clearTimer);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/shadow.scss' as sh;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-notification {\n position: fixed;\n z-index: 2000;\n\n &--top-left {\n top: 0;\n left: 0;\n }\n &--top-right {\n top: 0;\n right: 0;\n }\n &--bottom-left {\n bottom: 0;\n left: 0;\n }\n &--bottom-right {\n bottom: 0;\n right: 0;\n }\n // Lives inside the shared stack host (see the unscoped block below), which owns the position.\n &--top-center {\n position: static;\n\n .ds-notification__card {\n width: max-content;\n max-width: 480px;\n margin: 0;\n pointer-events: auto;\n }\n }\n\n &__card {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n\n max-width: 331px;\n margin: 24px;\n padding: 16px;\n\n border: 1px solid transparent;\n border-radius: r.$radius-card-lg;\n\n box-shadow: sh.$shadow-soft;\n\n // Success is the DS default/most-used type. Icons use the darker -shadow step\n // for legibility on the tint (warning/error/success). NOTE: the _ds_bundle.js\n // export uses the -main step for icons — this -shadow treatment tracks the\n // live design, pending a visual confirm against claude.ai/design.\n &--success {\n background-color: colors.$success-tint;\n border-color: rgba(colors.$success-main, 0.7);\n\n .ds-notification__icon {\n color: colors.$success-shadow;\n }\n }\n &--info {\n background-color: colors.$info-tint;\n border-color: rgba(colors.$info-main, 0.7);\n\n .ds-notification__icon {\n color: colors.$info-main;\n }\n }\n &--warning {\n background-color: colors.$warning-tint;\n border-color: rgba(colors.$warning-main, 0.7);\n\n .ds-notification__icon {\n color: colors.$warning-shadow;\n }\n }\n &--error {\n background-color: colors.$error-tint;\n border-color: rgba(colors.$error-main, 0.7);\n\n .ds-notification__icon {\n color: colors.$error-shadow;\n }\n }\n }\n\n &__icon {\n font-size: i.icon-size(20);\n }\n\n &__content {\n display: flex;\n flex-direction: column;\n\n color: colors.$slate-shadow;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n line-height: 21px;\n }\n\n &__title {\n font-weight: t.$weight-bold;\n }\n\n &__desc {\n margin: 0;\n padding-top: 8px;\n }\n\n &__link {\n padding-top: 8px;\n\n color: colors.$accent-main;\n text-decoration: underline;\n }\n\n &__close {\n display: inline-flex;\n margin-left: auto;\n padding: 0;\n\n color: colors.$slate-soft;\n\n background: transparent;\n border: 0;\n\n cursor: pointer;\n\n .material-symbols-filled {\n font-size: i.icon-size(20);\n }\n }\n}\n\n/* Enter: the card fades + slides up (~0.24s toast duration); top-center slides down. */\n.ds-notification-enter-active {\n transition: opacity m.$duration-toast m.$easing;\n\n .ds-notification__card {\n transition: transform m.$duration-toast m.$easing;\n }\n\n @include m.reduce-motion {\n transition: none;\n\n .ds-notification__card {\n transition: none;\n }\n }\n}\n.ds-notification-enter-from {\n opacity: 0;\n\n .ds-notification__card {\n transform: translateY(8px);\n }\n}\n\n.ds-notification--top-center {\n &.ds-notification-enter-from .ds-notification__card {\n transform: translateY(-8px);\n }\n}\n</style>\n\n<!-- Unscoped: the host is created outside Vue (notificationStack.ts), so it has no scope id. -->\n<style lang=\"scss\">\n@use '../../assets/css/spacing.scss' as s;\n\n.ds-notification-stack {\n position: fixed;\n z-index: 2000;\n\n display: flex;\n flex-direction: column;\n gap: s.spacing(1);\n\n pointer-events: none;\n\n &--top-center {\n top: 0;\n left: 50%;\n align-items: center;\n max-width: calc(100vw - #{s.spacing(4)});\n padding-top: s.spacing(3);\n transform: translateX(-50%);\n }\n}\n</style>\n","<template>\n <Teleport to=\"body\" :disabled=\"!fixed\">\n <Transition name=\"ds-modal\">\n <div\n v-if=\"open\"\n class=\"ds-modal\"\n :class=\"{ 'is-fixed': fixed }\"\n :style=\"fixed ? { paddingTop: top } : undefined\"\n @click=\"onBackdrop\"\n >\n <div\n ref=\"dialogRef\"\n class=\"ds-modal__dialog\"\n :class=\"{ 'is-center': center }\"\n role=\"dialog\"\n :aria-modal=\"fixed ? 'true' : 'false'\"\n :aria-labelledby=\"title ? titleId : undefined\"\n :aria-label=\"title ? undefined : 'dialog'\"\n tabindex=\"-1\"\n :style=\"dialogStyle\"\n @click.stop\n >\n <div v-if=\"title || showClose\" class=\"ds-modal__header\">\n <span :id=\"titleId\" class=\"ds-modal__title\">{{ title }}</span>\n <DsButton\n v-if=\"showClose\"\n variant=\"tertiary\"\n circle\n left-icon=\"close\"\n :aria-label=\"closeLabel || undefined\"\n @click=\"emit(CLOSE)\"\n />\n </div>\n\n <div class=\"ds-modal__body\"><slot /></div>\n\n <div v-if=\"$slots.footer\" class=\"ds-modal__footer\"><slot name=\"footer\" /></div>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch, nextTick, onBeforeUnmount, useId } from 'vue';\nimport { DsButton } from '@shared/ui/DsButton';\nimport { CLOSE } from '@shared/constants/events';\n\nconst props = defineProps({\n open: Boolean,\n title: { type: String, default: '' },\n showClose: { type: Boolean, default: true },\n width: { type: String, default: '440px' },\n // Explicit dialog height (any CSS length). Unset = content height.\n height: { type: String, default: '' },\n // Top offset of the dialog inside the fixed backdrop.\n top: { type: String, default: '15vh' },\n // Center the body text.\n center: Boolean,\n // false = render in-flow (no backdrop / portal / scroll-lock) for specimen cards.\n fixed: { type: Boolean, default: true },\n closeOnBackdrop: { type: Boolean, default: true },\n // Symmetric with closeOnBackdrop: a non-dismissable flow (closeOnBackdrop=false)\n // can also opt out of Escape-to-close. Default true (Escape closes).\n closeOnEscape: { type: Boolean, default: true },\n // Accessible name for the icon-only close button; English default (app owns i18n),\n // matching DsDataCard so the control is never unnamed.\n closeLabel: { type: String, default: 'Close' },\n});\n\nconst emit = defineEmits([CLOSE]);\n\nconst dialogRef = ref<HTMLElement | null>(null);\nlet lastFocused: HTMLElement | null = null;\n\n// SSR-safe id so the dialog is labelled by its visible title (aria-labelledby) instead of\n// duplicating the string via aria-label.\nconst titleId = useId();\n\nconst dialogStyle = computed(() => ({\n width: props.width,\n ...(props.height ? { height: props.height } : {}),\n}));\n\nfunction onBackdrop() {\n if (props.fixed && props.closeOnBackdrop) emit(CLOSE);\n}\n\nfunction focusables(): HTMLElement[] {\n if (!dialogRef.value) return [];\n const sel =\n 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n return Array.from(dialogRef.value.querySelectorAll<HTMLElement>(sel)).filter(\n (el) => el.offsetParent !== null\n );\n}\n\nfunction onKeydown(e: KeyboardEvent) {\n if (e.key === 'Escape') {\n if (props.closeOnEscape) emit(CLOSE);\n return;\n }\n if (e.key !== 'Tab') return;\n const f = focusables();\n if (f.length === 0) {\n e.preventDefault();\n dialogRef.value?.focus();\n return;\n }\n const first = f[0];\n const last = f[f.length - 1];\n if (e.shiftKey && document.activeElement === first) {\n e.preventDefault();\n last.focus();\n } else if (!e.shiftKey && document.activeElement === last) {\n e.preventDefault();\n first.focus();\n }\n}\n\n// Portal effects (focus trap + scroll lock + Esc listener) apply only while the modal\n// is open AND fixed. Watch the combined condition so flipping EITHER off — even without\n// closing — tears them down (no dangling listener / body scroll-lock).\nfunction activateModal() {\n lastFocused = document.activeElement as HTMLElement;\n document.addEventListener('keydown', onKeydown);\n document.body.style.overflow = 'hidden';\n nextTick(() => (focusables()[0] ?? dialogRef.value)?.focus());\n}\n\nfunction deactivateModal(restoreFocus = true) {\n document.removeEventListener('keydown', onKeydown);\n document.body.style.overflow = '';\n if (restoreFocus) lastFocused?.focus?.();\n}\n\nwatch(\n () => props.open && props.fixed,\n (active, wasActive) => {\n if (typeof document === 'undefined') return;\n if (active) activateModal();\n else if (wasActive) deactivateModal();\n },\n { immediate: true }\n);\n\nonBeforeUnmount(() => {\n if (typeof document === 'undefined') return;\n deactivateModal(false);\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/shadow.scss' as sh;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-modal {\n // In-flow (fixed=false): the wrapper collapses so the dialog joins the parent flow.\n display: contents;\n\n // Portal (fixed=true): full-screen backdrop that centers the dialog. padding-top comes\n // from the `top` prop (inline), so the offset is configurable without hardcoding it here.\n &.is-fixed {\n position: fixed;\n inset: 0;\n z-index: 2001;\n\n display: flex;\n align-items: flex-start;\n justify-content: center;\n\n padding-right: 16px;\n padding-bottom: 50px;\n padding-left: 16px;\n overflow: auto;\n\n background: colors.$backdrop; // grey-10 @ 50%, no blur\n }\n\n &__dialog {\n max-width: 100%;\n\n // Horizontal frame only. Vertical spacing is owned by header/body/footer so their\n // symmetric 8px padding is not doubled by an outer frame (fixes off-center header/footer).\n padding: 0 8px;\n\n background: colors.$white;\n\n border-radius: r.$radius-card-lg; // DS readme: 8px (the MCP/API mockup's 6px reconciles up to 8px)\n box-shadow: sh.$shadow-card;\n\n outline: none;\n\n &.is-center {\n text-align: center; // body inherits; header/footer are flex, so unaffected\n }\n }\n\n &__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n min-height: 36px;\n // 12px inline (like body/footer) → title + close button sit on the shared 20px column.\n padding: 8px 12px;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n font-weight: t.$weight-bold;\n\n border-bottom: 1px solid colors.$slate-tint;\n\n text-align: initial; // never centered, even under .is-center\n }\n\n &__body {\n // 12px inline matches the header's 12px so the body text lines up under the title\n // (both land 20px from the dialog edge). 20px block keeps the vertical breathing room.\n padding: 20px 12px;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n }\n\n &__footer {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n\n // 8px block keeps the footer vertically centered; 12px inline aligns the actions\n // with the body's right edge (the shared 20px column).\n padding: 8px 12px;\n\n border-top: 1px solid colors.$slate-tint;\n }\n}\n\n/* Enter/leave (portal only): backdrop fades, dialog fades + lifts (0.3s dialog duration). */\n.ds-modal-enter-active.is-fixed,\n.ds-modal-leave-active.is-fixed {\n transition: opacity m.$duration-dialog m.$easing;\n\n .ds-modal__dialog {\n transition: transform m.$duration-dialog m.$easing;\n }\n\n @include m.reduce-motion {\n transition: none;\n\n .ds-modal__dialog {\n transition: none;\n }\n }\n}\n.ds-modal-enter-from.is-fixed,\n.ds-modal-leave-to.is-fixed {\n opacity: 0;\n\n .ds-modal__dialog {\n transform: translateY(-8px);\n }\n}\n</style>\n","import { onBeforeUnmount, onMounted } from 'vue';\n\ntype InputModality = 'keyboard' | 'pointer';\n\nconst POINTER_EVENTS = ['pointerdown', 'mousedown'] as const;\n\nlet modality: InputModality | null = null;\nlet consumers = 0;\n\nfunction onKeydown(e: KeyboardEvent) {\n // Cmd/Ctrl/Alt combos (switching apps, shortcuts) aren't focus navigation.\n if (e.metaKey || e.ctrlKey || e.altKey) return;\n modality = 'keyboard';\n}\n\nfunction onPointerDown() {\n modality = 'pointer';\n}\n\nfunction attach() {\n if (consumers++ > 0) return;\n document.addEventListener('keydown', onKeydown, true);\n POINTER_EVENTS.forEach((type) => document.addEventListener(type, onPointerDown, true));\n}\n\nfunction detach() {\n if (--consumers > 0) return;\n document.removeEventListener('keydown', onKeydown, true);\n POINTER_EVENTS.forEach((type) => document.removeEventListener(type, onPointerDown, true));\n modality = null;\n}\n\nfunction isKeyboardFocus(el: Element): boolean {\n if (modality) return modality === 'keyboard';\n // No input seen while listening: the browser's own heuristic still knows.\n try {\n return el.matches(':focus-visible');\n } catch {\n return false;\n }\n}\n\n/** Whether a focus came from the keyboard, as `:focus-visible` decides it. Internal. */\nexport function useInputModality() {\n onMounted(attach);\n onBeforeUnmount(detach);\n return { isKeyboardFocus };\n}\n","import { computed, onBeforeUnmount, ref, type CSSProperties, type Ref } from 'vue';\n\ninterface AnchorRect {\n top: number;\n left: number;\n width: number;\n height: number;\n}\n\nexport interface TeleportAnchorOptions {\n onTriggerHidden?: () => void;\n}\n\nexport function useTeleportAnchor(\n rootRef: Ref<HTMLElement | null>,\n { onTriggerHidden }: TeleportAnchorOptions = {}\n) {\n const anchorRect = ref<AnchorRect | null>(null);\n let tracking = false;\n let triggerVisibility: IntersectionObserver | null = null;\n\n const anchorStyle = computed<CSSProperties>(() => {\n const box: CSSProperties = { position: 'fixed', pointerEvents: 'none' };\n const rect = anchorRect.value;\n if (!rect) return box;\n return {\n ...box,\n top: `${rect.top}px`,\n left: `${rect.left}px`,\n width: `${rect.width}px`,\n height: `${rect.height}px`,\n };\n });\n\n function sync() {\n const rect = rootRef.value?.getBoundingClientRect();\n if (rect) {\n anchorRect.value = { top: rect.top, left: rect.left, width: rect.width, height: rect.height };\n }\n }\n\n // IntersectionObserver, not a viewport check: it accounts for ancestors' `overflow` clipping.\n function watchTriggerVisibility() {\n if (!onTriggerHidden || typeof IntersectionObserver === 'undefined' || !rootRef.value) return;\n triggerVisibility = new IntersectionObserver((entries) => {\n if (entries.some((entry) => !entry.isIntersecting)) onTriggerHidden();\n });\n triggerVisibility.observe(rootRef.value);\n }\n\n // track() before the clamp's activate(): the anchor must move before the clamp measures.\n function track() {\n if (typeof window === 'undefined') return;\n sync();\n if (tracking) return;\n tracking = true;\n window.addEventListener('resize', sync);\n window.addEventListener('scroll', sync, { capture: true, passive: true });\n watchTriggerVisibility();\n }\n\n function untrack() {\n if (!tracking) return;\n tracking = false;\n window.removeEventListener('resize', sync);\n window.removeEventListener('scroll', sync, { capture: true });\n triggerVisibility?.disconnect();\n triggerVisibility = null;\n }\n\n onBeforeUnmount(untrack);\n\n return { anchorStyle, track, untrack };\n}\n","import { computed, nextTick, ref, type Ref } from 'vue';\n\n// Viewport-collision clamp for the overlay family (DsPopover, DsTooltip), plus an OPTIONAL\n// main-axis FLIP (SALESQL-4056, DsPopover and DsTooltip pass it — see `ClampFlipOptions` below).\n//\n// Those components place their floating element in pure CSS — `left: 50%` plus\n// `translateX(-50%)` — which centres it on the trigger with NO awareness of the\n// viewport. A trigger near an edge pushes the element off-screen, where any ancestor\n// with `overflow` clips it and the content is cut (SALESQL-3968).\n//\n// Rather than pull in floating-ui for this one correction, the element is nudged back\n// inside by a single offset. The CSS keeps owning the placement — this only feeds it a\n// number through a custom property, which is `0` whenever the element already fits\n// (the common case, so nothing moves).\n//\n// FLIP (SALESQL-4056): the prospector table's company card (DsPopover, `bottom-start`)\n// doesn't fit below the trigger on the table's last rows, and the viewport's bottom edge\n// cuts it — what Element Plus / floating-ui call `flip`. Passing the optional third\n// argument (`{ trigger, gap }`) turns this on: `measure()` also decides whether the panel\n// fits on the PREFERRED side and, if not, whether the OPPOSITE side has strictly more room;\n// `resolvedPlacement` is the placement to actually render (side swapped, alignment suffix\n// kept). Omitted, nothing changes — `resolvedPlacement` always equals the preferred\n// placement.\n//\n// INTERNAL: not exported from the package barrel. It is an implementation detail of the\n// overlay components, not part of the public API.\n\n/** Custom property the placement CSS reads: `translateX(calc(-50% + var(...)))`. */\nexport const VIEWPORT_SHIFT_VAR = '--ds-overlay-shift';\n\n/** Gap kept between the floating element and the viewport edge, in px. */\nexport const VIEWPORT_MARGIN = 8;\n\n/** The side a floating element opens on. `over` (DsPopover) covers the trigger and aligns on X. */\nexport type ClampSide = 'top' | 'bottom' | 'left' | 'right' | 'over';\n\n/**\n * Placement vocabulary shared by the overlay family: a bare side (centred) or a\n * `side-start` / `side-end` alignment. Only the SIDE matters here — it decides which\n * axis can overflow — so both vocabularies feed the same clamp (DsTooltip is 4-way,\n * DsPopover is 12-way).\n */\nexport type ClampPlacement = ClampSide | `${ClampSide}-start` | `${ClampSide}-end`;\n\n/** Each side's opposite — what a FLIP swaps to. `over` has none: it covers the trigger,\n * there is no \"other side\" to move to, which is why `over-start` / `over-end` never flip. */\nconst OPPOSITE_SIDE: Partial<Record<ClampSide, ClampSide>> = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n};\n\n/**\n * Turns the main-axis FLIP on for `useViewportClamp` (DsPopover and DsTooltip pass it — see\n * the module header). `trigger` is the element the floating panel is placed against: the\n * component's root, whose rect a `teleported` anchor mirrors, so this is the same ref either\n * way. `gap` mirrors the CSS gap between panel and trigger, so the free-space math matches\n * what the CSS actually renders (`PANEL_GAP` in DsPopover, `BUBBLE_GAP` in DsTooltip, each\n * next to the `calc(100% + 6px)` it repeats).\n */\nexport interface ClampFlipOptions {\n trigger: Ref<HTMLElement | null>;\n gap: number;\n}\n\nexport function useViewportClamp(\n elRef: Ref<HTMLElement | null>,\n placement: () => ClampPlacement,\n flip?: ClampFlipOptions\n) {\n const shift = ref(0);\n // Whether the panel is flipped to the opposite side of the preferred placement. Only\n // `measureFlip` (below) sets it to `true`; `deactivate()` is the only place it goes back\n // to `false` — closing must not leave the NEXT opening starting pre-flipped.\n const flipped = ref(false);\n\n /** Style patch to spread onto the floating element; `null` while it already fits. */\n const shiftStyle = computed(() =>\n shift.value ? { [VIEWPORT_SHIFT_VAR]: `${Math.round(shift.value)}px` } : null\n );\n\n /**\n * The placement to actually render: the preferred one, or its OPPOSITE side (alignment\n * suffix kept) once `measureFlip` has flipped it. Always equal to `placement()` when the\n * caller didn't pass `flip` — there is nothing to swap to.\n */\n const resolvedPlacement = computed<ClampPlacement>(() => {\n const preferred = placement();\n if (!flipped.value) return preferred;\n const dash = preferred.indexOf('-');\n const side = (dash === -1 ? preferred : preferred.slice(0, dash)) as ClampSide;\n const opposite = OPPOSITE_SIDE[side];\n if (!opposite) return preferred; // `over-*`: no opposite, never flips\n return (dash === -1 ? opposite : opposite + preferred.slice(dash)) as ClampPlacement;\n });\n\n /**\n * Decides whether the panel fits on the PREFERRED side and, if not, whether the OPPOSITE\n * side has strictly more room — Element Plus / floating-ui's `flip` (SALESQL-4056).\n *\n * Deliberately NOT the reset-then-remeasure dance `measure()` does below for the shift:\n * `offsetHeight` / `offsetWidth` are LAYOUT sizes, and the placement CSS only repositions\n * the panel — it never resizes it — so, unlike the shift, this decision has no feedback\n * loop. Writing the freshly computed value straight to `flipped` avoids an extra render on\n * every scroll/resize and can never oscillate.\n *\n * Viewport-only, like the rest of this composable: a clipping ANCESTOR (a scroller, a\n * table cell) is not accounted for, only the window's edges.\n */\n function measureFlip() {\n if (!flip) return;\n const side = placement().split('-')[0] as ClampSide;\n if (side === 'over') {\n flipped.value = false; // covers the trigger — no opposite side to flip to\n return;\n }\n\n const el = elRef.value;\n const trigger = flip.trigger.value;\n if (!el || !trigger) return;\n\n const t = trigger.getBoundingClientRect();\n const gap = flip.gap;\n\n if (side === 'top' || side === 'bottom') {\n const below = window.innerHeight - t.bottom - gap - VIEWPORT_MARGIN;\n const above = t.top - gap - VIEWPORT_MARGIN;\n const size = el.offsetHeight;\n flipped.value =\n side === 'bottom' ? size > below && above > below : size > above && below > above;\n } else {\n const right = window.innerWidth - t.right - gap - VIEWPORT_MARGIN;\n const left = t.left - gap - VIEWPORT_MARGIN;\n const size = el.offsetWidth;\n flipped.value = side === 'right' ? size > right && left > right : size > left && right > left;\n }\n }\n\n async function measure() {\n if (typeof window === 'undefined') return;\n\n // FLIP first — a plain synchronous read (see `measureFlip`'s own comment for why it\n // skips the reset-and-remeasure dance below), so it lands in the SAME microtask that\n // schedules this call, before paint.\n measureFlip();\n\n // Measure UNSHIFTED, so a re-run corrects from the natural position instead of\n // compounding the previous nudge.\n shift.value = 0;\n await nextTick();\n\n const el = elRef.value;\n if (!el) return;\n\n const r = el.getBoundingClientRect();\n // A top/bottom side varies on the X axis, a left/right side on the Y axis — that is\n // the axis the shift applies to. The alignment suffix is irrelevant to the clamp:\n // `bottom`, `bottom-start` and `bottom-end` all overflow horizontally. `over-*` is\n // aligned on X like a top/bottom side. Flipping top↔bottom (or left↔right) never\n // changes this grouping, so reading the PREFERRED side here (not `resolvedPlacement`)\n // is deliberate, not an oversight.\n const side = placement().split('-')[0] as ClampSide;\n const shiftsHorizontally = side === 'top' || side === 'bottom' || side === 'over';\n const [start, end, limit] = shiftsHorizontally\n ? [r.left, r.right, window.innerWidth]\n : [r.top, r.bottom, window.innerHeight];\n\n // The leading edge wins when the element is larger than the space available: it\n // stays readable from its start rather than being cut at the beginning.\n if (start < VIEWPORT_MARGIN) shift.value = VIEWPORT_MARGIN - start;\n else if (end > limit - VIEWPORT_MARGIN) shift.value = limit - VIEWPORT_MARGIN - end;\n }\n\n // The space available changes while the element is open: `resize` covers window\n // changes, `scroll` (capture, so scrolling containers are caught too, passive because\n // nothing is prevented) covers the trigger moving.\n function activate() {\n if (typeof window === 'undefined') return;\n window.addEventListener('resize', measure);\n window.addEventListener('scroll', measure, { capture: true, passive: true });\n void measure();\n }\n\n /** Also drops the offset and the flip, so neither carries into the next opening. */\n function deactivate() {\n if (typeof window === 'undefined') return;\n window.removeEventListener('resize', measure);\n window.removeEventListener('scroll', measure, { capture: true });\n shift.value = 0;\n flipped.value = false;\n }\n\n return { shift, shiftStyle, resolvedPlacement, measure, activate, deactivate };\n}\n","// DsTooltip — dark slate bubble wrapping a trigger (Tooltip.jsx). 4-way placement.\n// Pure-CSS positioning (zero-dep, no floating-ui). content via `content` prop or #content slot.\n\nexport const DS_TOOLTIP_PLACEMENTS = {\n TOP: 'top',\n BOTTOM: 'bottom',\n LEFT: 'left',\n RIGHT: 'right',\n} as const;\nexport type DsTooltipPlacement = (typeof DS_TOOLTIP_PLACEMENTS)[keyof typeof DS_TOOLTIP_PLACEMENTS];\n","<template>\n <div\n ref=\"rootRef\"\n class=\"ds-tooltip\"\n :class=\"{ 'ds-tooltip--block': block }\"\n @mouseenter=\"scheduleShow\"\n @mouseleave=\"onMouseLeave\"\n @focusin=\"onFocusIn\"\n @focusout=\"onFocusOut\"\n @keydown.esc=\"hide\"\n >\n <!-- A <div> (not a <span>) so the trigger slot may hold block-root components\n without invalid HTML. Inline-flex by default (buttons/icons); pass `block`\n to wrap a full-width/block control (DsInput/DsTextarea) without squashing it. -->\n <slot />\n\n <!-- `teleported`: the bubble lives in <body>, where no ancestor's `overflow` can clip\n it. The anchor is a fixed box that mirrors this wrapper's rect, so the placement\n CSS below resolves against it exactly as it does against the wrapper — same\n approach as DsPopover's `teleported` (SALESQL-4056). -->\n <Teleport v-if=\"teleported\" to=\"body\">\n <Transition name=\"ds-tooltip-fade\">\n <div v-if=\"visible\" class=\"ds-tooltip__anchor\" :style=\"anchorStyle\">\n <div\n :id=\"tooltipId\"\n ref=\"bubbleRef\"\n class=\"ds-tooltip__bubble\"\n :class=\"`ds-tooltip__bubble--${resolvedPlacement}`\"\n role=\"tooltip\"\n :style=\"shiftStyle\"\n >\n <slot name=\"content\">{{ content }}</slot>\n </div>\n </div>\n </Transition>\n </Teleport>\n <Transition v-else name=\"ds-tooltip-fade\">\n <div\n v-if=\"visible\"\n :id=\"tooltipId\"\n ref=\"bubbleRef\"\n class=\"ds-tooltip__bubble\"\n :class=\"`ds-tooltip__bubble--${resolvedPlacement}`\"\n role=\"tooltip\"\n :style=\"shiftStyle\"\n >\n <slot name=\"content\">{{ content }}</slot>\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n ref,\n useId,\n useSlots,\n watch,\n type PropType,\n} from 'vue';\nimport { useInputModality } from '@shared/composables/useInputModality';\nimport { useTeleportAnchor } from '@shared/composables/useTeleportAnchor';\nimport { useViewportClamp } from '@shared/composables/useViewportClamp';\nimport { DS_TOOLTIP_PLACEMENTS, type DsTooltipPlacement } from './DsTooltip.types';\n\nconst props = defineProps({\n // Bubble text. Rich content can be provided via the #content slot instead.\n content: { type: String, default: '' },\n placement: {\n type: String as PropType<DsTooltipPlacement>,\n default: DS_TOOLTIP_PLACEMENTS.TOP,\n },\n // Hover delay before showing, ms. Keyboard focus always shows immediately (no delay).\n delay: { type: Number, default: 300 },\n // Wrap a full-width/block trigger (DsInput/DsTextarea) — the wrapper becomes\n // `display: block` instead of the default inline-flex, so it doesn't squash the control.\n block: { type: Boolean, default: false },\n // Force the tooltip off regardless of content/slot. Lets a consumer show it only\n // under a condition (e.g. only-if-truncated) without emptying the content prop —\n // the #content slot is always truthy, so it's the only way to suppress that path.\n disabled: { type: Boolean, default: false },\n // Render the bubble in <body> so no ancestor's `overflow` can clip it — a drawer's\n // scrollable body, a table cell. Mirrors DsPopover's `teleported` (SALESQL-4056): a\n // fixed box copies the wrapper's rect and the bubble keeps its existing placement CSS\n // against it. Off keeps the bubble inside the wrapper, exactly as before — additive.\n teleported: { type: Boolean, default: false },\n});\n\nconst slots = useSlots();\n\n// SSR-safe unique id (Vue 3.5); the bubble carries it and the focused trigger references it.\nconst tooltipId = useId();\n\nconst rootRef = ref<HTMLElement | null>(null);\nconst visible = ref(false);\nconst bubbleRef = ref<HTMLElement | null>(null);\nconst { isKeyboardFocus } = useInputModality();\n\n// Mirrors the CSS `calc(100% + 6px)` gap in the placement rules below — the flip's\n// free-space math (useViewportClamp) needs the SAME number the CSS renders with.\nconst BUBBLE_GAP = 6;\n\n// Placement is pure CSS and knows nothing about the viewport: a trigger near an edge —\n// an icon in a narrow rail, the first cell of a table — pushed the bubble off-screen,\n// where an ancestor with `overflow` clipped it. Measured with the icon at x=0: the bubble\n// started at -108px. Same clamp DsPopover uses (SALESQL-3968). Passing `trigger`/`gap`\n// also turns on its main-axis flip: a bubble that doesn't fit on the preferred `placement`\n// opens on the opposite side when that one has more room.\nconst {\n shiftStyle,\n resolvedPlacement,\n activate: activateClamp,\n deactivate: deactivateClamp,\n} = useViewportClamp(bubbleRef, () => props.placement, { trigger: rootRef, gap: BUBBLE_GAP });\n\n// Teleported only: the fixed box that mirrors the wrapper's rect (see DsPopover).\nconst { anchorStyle, track: trackAnchor, untrack: untrackAnchor } = useTeleportAnchor(rootRef);\n\n// The clamp only has something to measure once the bubble is in the DOM, so it follows\n// `visible` rather than the show/hide entry points (which are several) — and activates in\n// `nextTick`, after the bubble has rendered: right here `bubbleRef` is still null. The anchor\n// is synced BEFORE the clamp activates, so the clamp always measures the bubble against its\n// final (already-repositioned) anchor, never a stale one.\nwatch(visible, (isVisible) => {\n if (isVisible) {\n if (props.teleported) trackAnchor();\n nextTick(activateClamp);\n } else {\n untrackAnchor();\n deactivateClamp();\n }\n});\n// Don't pop a bubble when disabled or when there is nothing to describe. Both\n// entry points (scheduleShow, onFocusIn) short-circuit on this.\nconst hasContent = computed(() => !props.disabled && (props.content.length > 0 || !!slots.content));\n\n// If it gets disabled while open, close it (hide() clears the timer + aria-describedby).\nwatch(\n () => props.disabled,\n (d) => {\n if (d) hide();\n }\n);\n\n// Hover and keyboard-focus are tracked separately: the tooltip only hides once BOTH\n// are false, so leaving with the mouse while still focused (or vice versa) keeps it open.\nlet hovering = false;\nlet focused = false;\nlet timer: ReturnType<typeof setTimeout> | null = null;\n\n// aria-describedby is set on the actually-focused element (not the wrapper) so a screen\n// reader announces the tooltip for the control it belongs to. We restore any prior value.\nlet describedEl: HTMLElement | null = null;\nlet prevDescribedBy: string | null = null;\n\nfunction clearTimer() {\n if (timer !== null) {\n clearTimeout(timer);\n timer = null;\n }\n}\n\nfunction describe(el: HTMLElement | null) {\n if (!el) return;\n if (describedEl && describedEl !== el) undescribe();\n if (describedEl === el) return;\n describedEl = el;\n prevDescribedBy = el.getAttribute('aria-describedby');\n el.setAttribute(\n 'aria-describedby',\n prevDescribedBy ? `${prevDescribedBy} ${tooltipId}` : tooltipId\n );\n}\n\nfunction undescribe() {\n if (!describedEl) return;\n if (prevDescribedBy !== null) describedEl.setAttribute('aria-describedby', prevDescribedBy);\n else describedEl.removeAttribute('aria-describedby');\n describedEl = null;\n prevDescribedBy = null;\n}\n\n// Hover: show after `delay`.\nfunction scheduleShow() {\n if (!hasContent.value) return;\n hovering = true;\n clearTimer();\n timer = setTimeout(() => {\n visible.value = true;\n }, props.delay);\n}\n\nfunction onMouseLeave() {\n hovering = false;\n clearTimer(); // cancel a still-pending hover show\n if (!focused) hide();\n}\n\n// Keyboard focus: show immediately and wire aria-describedby onto the focused trigger.\nfunction onFocusIn(e: FocusEvent) {\n const target = e.target as HTMLElement;\n // Pointer or scripted focus (e.g. a drawer's focus trap) is left to hover.\n if (!hasContent.value || (!focused && !isKeyboardFocus(target))) return;\n focused = true;\n clearTimer();\n visible.value = true;\n describe(target);\n}\n\nfunction onFocusOut(e: FocusEvent) {\n // Focus moving to another element INSIDE the same wrapper (e.g. an input and its\n // own toggle button) isn't leaving the trigger — keep the tooltip open and let the\n // following focusin move aria-describedby to the new element.\n const next = e.relatedTarget as Node | null;\n const wrapper = e.currentTarget as HTMLElement | null;\n if (next && wrapper?.contains(next)) return;\n focused = false;\n if (!hovering) hide();\n}\n\nfunction hide() {\n clearTimer();\n visible.value = false;\n undescribe();\n}\n\nonBeforeUnmount(() => {\n clearTimer();\n undescribe();\n deactivateClamp();\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-tooltip {\n position: relative;\n display: inline-flex; // inline triggers (buttons/icons) — the DS default\n\n // Full-width/block triggers: don't impose inline layout (see `block` prop).\n &--block {\n display: block;\n }\n\n // Teleported only. The anchor's box is inline (useTeleportAnchor); it carries the bubble's\n // z-index (the fade's opacity makes it a stacking context) and lets the pointer through\n // everywhere but the bubble.\n &__anchor {\n z-index: 10001; // same layer as the non-teleported bubble — above modals/drawers (2001)\n\n .ds-tooltip__bubble {\n pointer-events: auto;\n }\n }\n\n &__bubble {\n position: absolute;\n z-index: 10001; // above modals (2001); DS Tooltip.jsx zIndex 10001\n\n width: max-content;\n // Never wider than the viewport itself: past that, no offset can bring it back in.\n max-width: min(260px, calc(100vw - 16px));\n padding: 2px 8px;\n\n color: colors.$white;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n font-weight: t.$weight-bold;\n line-height: 20px;\n white-space: pre-line;\n\n background: colors.$slate-main; // DS --primary-main\n border-radius: r.$radius-control; // DS --radius-sm\n\n // 4-way placement, 6px gap from the trigger. Pure CSS — no floating-ui.\n &--top {\n bottom: calc(100% + 6px);\n left: 50%;\n transform: translateX(calc(-50% + var(--ds-overlay-shift, 0px)));\n }\n &--bottom {\n top: calc(100% + 6px);\n left: 50%;\n transform: translateX(calc(-50% + var(--ds-overlay-shift, 0px)));\n }\n &--right {\n top: 50%;\n left: calc(100% + 6px);\n transform: translateY(calc(-50% + var(--ds-overlay-shift, 0px)));\n }\n &--left {\n top: 50%;\n right: calc(100% + 6px);\n transform: translateY(calc(-50% + var(--ds-overlay-shift, 0px)));\n }\n }\n}\n\n/* Fade only — the positioning transform must not be animated (it would fight placement). */\n.ds-tooltip-fade-enter-active,\n.ds-tooltip-fade-leave-active {\n transition: opacity m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n}\n.ds-tooltip-fade-enter-from,\n.ds-tooltip-fade-leave-to {\n opacity: 0;\n}\n</style>\n","// DsVerificationIcon — status glyph for a contact data point.\n// 1:1 with the DS source (components/data/VerificationIcon.jsx):\n// verified === true -> \"verified\" (info-main, blue)\n// verified === false + email -> \"dangerous\" (error-main, coral)\n// verified === false + phone -> \"error\" (warning-main, orange)\n// verified == null (new) -> \"new_releases\" (slate-soft, grey)\n// `isContactData` flags emails (coral) vs phones (orange) when unverified.\n\nexport const DS_VERIFICATION_STATES = {\n VERIFIED: 'verified',\n UNVERIFIED: 'unverified',\n NEW: 'new',\n} as const;\nexport type DsVerificationState =\n (typeof DS_VERIFICATION_STATES)[keyof typeof DS_VERIFICATION_STATES];\n","<template>\n <i\n class=\"material-symbols-filled ds-verification-icon\"\n :class=\"[\n `ds-verification-icon--${status.state}`,\n { 'ds-verification-icon--email': isContactData },\n ]\"\n :style=\"{ fontSize: `${size}px` }\"\n role=\"img\"\n :aria-label=\"label || status.label\"\n :title=\"label || status.label\"\n >\n <slot>{{ status.icon }}</slot>\n </i>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport { DS_VERIFICATION_STATES } from './DsVerificationIcon.types';\n\nconst props = defineProps({\n // true = verified · false = not verified · null/undefined = newly found.\n verified: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n // Emails (true) use the coral \"dangerous\" glyph when unverified; phones use orange.\n isContactData: {\n type: Boolean,\n default: false,\n },\n size: {\n type: Number,\n default: 20,\n },\n // Optional override for the accessible label / tooltip (the app owns i18n).\n // Empty → the English default derived from the verification state.\n label: {\n type: String,\n default: '',\n },\n});\n\nconst status = computed(() => {\n if (props.verified === null || props.verified === undefined) {\n return {\n state: DS_VERIFICATION_STATES.NEW,\n icon: 'new_releases',\n label: 'Newly found',\n };\n }\n if (props.verified) {\n return {\n state: DS_VERIFICATION_STATES.VERIFIED,\n icon: 'verified',\n label: 'Verified',\n };\n }\n return {\n state: DS_VERIFICATION_STATES.UNVERIFIED,\n icon: props.isContactData ? 'dangerous' : 'error',\n label: 'Not verified',\n };\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n\n.ds-verification-icon {\n line-height: 1;\n\n // States map DS colors (VerificationIcon.jsx). isContactData splits the\n // unverified color into coral (email) vs orange (phone).\n &--new {\n color: colors.$slate-soft; // --primary-secondary-text\n }\n &--verified {\n color: colors.$info-main;\n }\n &--unverified {\n color: colors.$warning-main; // phone (orange)\n\n &.ds-verification-icon--email {\n color: colors.$error-main; // email (coral \"dangerous\")\n }\n }\n}\n</style>\n","import { onBeforeUnmount } from 'vue';\n\n/**\n * Writes to the system clipboard. `copy` resolves `true` only once the text is on the\n * clipboard and the component is still mounted; it never rejects. Internal.\n */\nexport function useClipboardCopy() {\n let unmounted = false;\n onBeforeUnmount(() => {\n unmounted = true;\n });\n\n async function copy(text: string): Promise<boolean> {\n if (typeof navigator === 'undefined' || typeof navigator.clipboard?.writeText !== 'function') {\n return false;\n }\n try {\n await navigator.clipboard.writeText(text);\n } catch {\n // The browser refused: unfocused document, permissions policy.\n return false;\n }\n return !unmounted;\n }\n\n return { copy };\n}\n","<template>\n <div class=\"ds-contact-value\" :class=\"{ 'ds-contact-value--main': main }\">\n <DsVerificationIcon :verified=\"verified\" :is-contact-data=\"isContactData\" />\n\n <span class=\"ds-contact-value__value\" :title=\"value\">{{ value }}</span>\n\n <!-- Marquee slot: badge and actions share one grid cell and cross-fade/slide\n on hover (or keyboard focus-within). -->\n <span class=\"ds-contact-value__marquee\">\n <!-- Sin aria-hidden: el tipo (Work/Mobile/…) es información real de clasificación\n del dato. El cross-fade del marquee es solo opacity, no lo saca del árbol de\n a11y; con el orden DOM value → badge, el SR lee \"ada@stripe.com, Work\". -->\n <DsBadge\n v-if=\"valueType\"\n class=\"ds-contact-value__badge\"\n :tone=\"main ? DS_BADGE_TONES.ACCENT : DS_BADGE_TONES.GREY\"\n :title=\"valueType\"\n >{{ valueType }}</DsBadge\n >\n\n <span class=\"ds-contact-value__actions\">\n <!-- Locked value: a static lock glyph replaces copy + rating entirely. -->\n <i\n v-if=\"hideValue\"\n class=\"material-symbols-filled ds-contact-value__lock\"\n :role=\"hideValueLabel ? 'img' : undefined\"\n :aria-label=\"hideValueLabel || undefined\"\n :aria-hidden=\"hideValueLabel ? undefined : 'true'\"\n >lock</i\n >\n\n <template v-else>\n <button\n type=\"button\"\n class=\"ds-contact-value__action\"\n :class=\"{ 'is-copied': copied }\"\n :aria-label=\"copied ? copiedLabel : copyLabel\"\n :title=\"copied ? copiedLabel : copyLabel\"\n @click=\"handleCopy\"\n >\n <i class=\"material-symbols-rounded\" aria-hidden=\"true\">{{\n copied ? 'check' : 'content_copy'\n }}</i>\n </button>\n\n <template v-if=\"showRate\">\n <button\n type=\"button\"\n class=\"ds-contact-value__action\"\n :aria-label=\"correctLabel\"\n :aria-pressed=\"correct === true\"\n :title=\"correctLabel\"\n @click=\"handleCorrect\"\n >\n <i\n :class=\"correct === true ? 'material-symbols-filled' : 'material-symbols-rounded'\"\n aria-hidden=\"true\"\n >thumb_up</i\n >\n </button>\n <button\n type=\"button\"\n class=\"ds-contact-value__action\"\n :aria-label=\"incorrectLabel\"\n :aria-pressed=\"correct === false\"\n :title=\"incorrectLabel\"\n @click=\"handleIncorrect\"\n >\n <i\n :class=\"correct === false ? 'material-symbols-filled' : 'material-symbols-rounded'\"\n aria-hidden=\"true\"\n >thumb_down</i\n >\n </button>\n </template>\n </template>\n </span>\n </span>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, onBeforeUnmount, type PropType } from 'vue';\nimport { DsVerificationIcon } from '@shared/ui/DsVerificationIcon';\nimport { DsBadge, DS_BADGE_TONES } from '@shared/ui/DsBadge';\nimport { COPY, CORRECT, INCORRECT } from '@shared/constants/events';\nimport { useClipboardCopy } from '@shared/composables/useClipboardCopy';\n\nconst props = defineProps({\n value: { type: String, required: true },\n valueType: { type: String, default: '' },\n verified: { type: Boolean as PropType<boolean | null>, default: null },\n main: { type: Boolean, default: false },\n isContactData: { type: Boolean, default: false },\n showRate: { type: Boolean, default: false },\n correct: { type: Boolean as PropType<boolean | null>, default: null },\n // Locks the value: on hover a static lock glyph shows instead of copy/rate.\n hideValue: { type: Boolean, default: false },\n // User-facing labels (the app owns i18n); English DS defaults.\n copyLabel: { type: String, default: 'Copy' },\n copiedLabel: { type: String, default: 'Copied!' },\n correctLabel: { type: String, default: 'Correct' },\n incorrectLabel: { type: String, default: 'Incorrect' },\n // Accessible name for the lock glyph (empty → decorative/aria-hidden).\n hideValueLabel: { type: String, default: '' },\n});\n\n// Runtime array so the emit names are registered at runtime (the type-only\n// form with `typeof CONST` compiles to an empty `emits`, which lets listeners\n// fall through as native attrs). Names come from the shared events constants.\nconst emit = defineEmits([COPY, CORRECT, INCORRECT]);\n\nconst copied = ref(false);\nlet copiedTimer: ReturnType<typeof setTimeout> | undefined;\nconst { copy: copyToClipboard } = useClipboardCopy();\n\n// The copied state and `copy` wait for the clipboard: a refused write shows and emits nothing.\nasync function handleCopy() {\n const value = props.value;\n if (!(await copyToClipboard(value))) return;\n copied.value = true;\n clearTimeout(copiedTimer);\n copiedTimer = setTimeout(() => {\n copied.value = false;\n }, 1200);\n emit(COPY, value);\n}\n\nfunction handleCorrect() {\n emit(CORRECT);\n}\nfunction handleIncorrect() {\n emit(INCORRECT);\n}\n\nonBeforeUnmount(() => clearTimeout(copiedTimer));\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/icons.scss' as i;\n\n.ds-contact-value {\n display: flex;\n align-items: center;\n\n padding: 6px; // DS ContactValue.jsx\n border-radius: r.$radius-control;\n\n background: transparent;\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:hover,\n &:focus-within {\n background-color: colors.$slate-bg; // --primary-background\n }\n\n &--main:hover,\n &--main:focus-within {\n background-color: colors.$accent-bg;\n }\n\n // -- value ---------------------------------------------------------------\n &__value {\n flex: 1;\n min-width: 0;\n margin: 0 8px; // DS\n\n color: colors.$slate-main; // --primary-main\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n // -- marquee (badge + actions share one cell) ----------------------------\n &__marquee {\n display: inline-grid;\n align-items: center;\n justify-items: end;\n margin-left: auto;\n }\n\n &__badge,\n &__actions {\n grid-area: 1 / 1;\n transition:\n transform m.$duration-reveal m.$easing,\n opacity m.$duration-reveal m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n }\n\n // At rest: badge in place, actions parked to the right and hidden.\n &__badge {\n transform: translateX(0);\n opacity: 1;\n\n // Cap an arbitrarily long valueType (legacy getPhoneType can return a raw\n // company_name) so it can't squeeze the value span. `ch` is font-relative,\n // not a hardcoded px-scale value. The full label stays available via :title.\n max-width: 12ch;\n overflow: hidden;\n }\n &__actions {\n display: inline-flex;\n align-items: center;\n gap: 8px; // DS\n\n transform: translateX(8px);\n opacity: 0;\n pointer-events: none;\n }\n\n // On hover / keyboard focus: badge slides out, actions slide in.\n &:hover &__badge,\n &:focus-within &__badge {\n transform: translateX(8px);\n opacity: 0;\n }\n &:hover &__actions,\n &:focus-within &__actions {\n transform: translateX(0);\n opacity: 1;\n pointer-events: auto;\n }\n\n // -- action buttons ------------------------------------------------------\n &__action {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n padding: 0;\n border: none;\n background: none;\n cursor: pointer;\n\n color: colors.$slate-soft; // --primary-secondary-text\n\n .material-symbols-filled,\n .material-symbols-rounded {\n font-size: i.icon-size(20);\n line-height: 1;\n }\n\n &.is-copied {\n color: colors.$success-shadow;\n }\n }\n\n // -- lock glyph (hideValue) ----------------------------------------------\n &__lock {\n color: colors.$slate-soft; // --primary-secondary-text (DS ContactValue.jsx)\n font-size: i.icon-size(20);\n line-height: 1;\n }\n}\n</style>\n","<template>\n <section class=\"ds-data-card\" :aria-label=\"title\" :aria-busy=\"loading ? 'true' : undefined\">\n <!-- header -->\n <div\n class=\"ds-data-card__header\"\n :class=\"{ 'is-collapsed': isCollapsed, 'is-collapsible': collapsible }\"\n @click=\"collapsible && toggle()\"\n >\n <div class=\"ds-data-card__heading\">\n <i class=\"material-symbols-filled ds-data-card__icon\" aria-hidden=\"true\">{{ icon }}</i>\n <span class=\"ds-data-card__title\">{{ title }}</span>\n </div>\n\n <div class=\"ds-data-card__actions\" @click.stop>\n <button\n v-if=\"!isCollapsed && showEdit\"\n type=\"button\"\n class=\"ds-data-card__edit\"\n @click=\"onEdit\"\n >\n {{ editLabel }}\n </button>\n\n <DsButton\n v-if=\"!isCollapsed && showSort\"\n variant=\"tertiary\"\n size=\"medium\"\n circle\n left-icon=\"swap_vert\"\n :aria-label=\"sortLabel\"\n @click=\"onSort\"\n />\n\n <DsButton\n v-if=\"collapsible\"\n variant=\"tertiary\"\n size=\"medium\"\n circle\n :left-icon=\"collapsed ? 'keyboard_arrow_down' : 'keyboard_arrow_up'\"\n :aria-label=\"toggleLabel\"\n @click=\"toggle\"\n />\n\n <button\n v-if=\"showClose\"\n type=\"button\"\n class=\"ds-data-card__close\"\n :aria-label=\"closeLabel\"\n @click=\"onClose\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">close</i>\n </button>\n </div>\n </div>\n\n <!-- body -->\n <div v-if=\"!isCollapsed\" class=\"ds-data-card__body\">\n <div v-if=\"loading\" class=\"ds-data-card__loading\">\n <slot name=\"loading\"><DsSpinner :label=\"loadingLabel || undefined\" /></slot>\n </div>\n\n <!-- Locked/upsell: the data is gated (plan/permission). Wins over empty and\n content (you can't know if gated data is empty), but loading still comes\n first. The #locked slot owns the upsell CTA; the default fallback mirrors\n the DS empty pattern (accent badge + bold title) so the state is never\n conveyed by icon alone. -->\n <div v-else-if=\"locked\" class=\"ds-data-card__locked\">\n <slot name=\"locked\">\n <span class=\"ds-data-card__state-badge ds-data-card__state-badge--accent\">\n <i class=\"material-symbols-filled ds-data-card__state-icon\" aria-hidden=\"true\">lock</i>\n </span>\n <div class=\"ds-data-card__state-text\">\n <span class=\"ds-data-card__state-title\">{{ lockedLabel }}</span>\n </div>\n </slot>\n </div>\n\n <!-- Empty: 1:1 with the DS DsDataCard empty state (DsDataCard.jsx) — a\n circular badge, a bold title, and an optional subtitle. -->\n <div v-else-if=\"empty\" class=\"ds-data-card__empty\">\n <span class=\"ds-data-card__state-badge\">\n <i class=\"material-symbols-filled ds-data-card__state-icon\" aria-hidden=\"true\">{{\n icon\n }}</i>\n </span>\n <div class=\"ds-data-card__state-text\">\n <span class=\"ds-data-card__state-title\">{{ emptyLabel }}</span>\n <span v-if=\"emptySubtitle\" class=\"ds-data-card__state-subtitle\">{{ emptySubtitle }}</span>\n </div>\n </div>\n\n <template v-else>\n <div v-if=\"mostLikely\">\n <div v-if=\"showSections\" class=\"ds-data-card__section\">{{ mostLikelyLabel }}</div>\n <DsContactValue\n :value=\"mostLikely.value\"\n :value-type=\"mostLikely.type\"\n :verified=\"mostLikely.verified\"\n :correct=\"mostLikely.correct\"\n :hide-value=\"mostLikely.hideValue\"\n main\n :is-contact-data=\"isContactData\"\n :show-rate=\"showRate\"\n @copy=\"onCopy\"\n @correct=\"onCorrect(mostLikely)\"\n @incorrect=\"onIncorrect(mostLikely)\"\n />\n </div>\n\n <div v-if=\"more.length > 0\">\n <div v-if=\"showSections\" class=\"ds-data-card__section\">{{ moreLabel }}</div>\n <div class=\"ds-data-card__more\">\n <DsContactValue\n v-for=\"datum in more\"\n :key=\"datum.value\"\n :value=\"datum.value\"\n :value-type=\"datum.type\"\n :verified=\"datum.verified\"\n :correct=\"datum.correct\"\n :hide-value=\"datum.hideValue\"\n :is-contact-data=\"isContactData\"\n :show-rate=\"showRate\"\n @copy=\"onCopy\"\n @correct=\"onCorrect(datum)\"\n @incorrect=\"onIncorrect(datum)\"\n />\n </div>\n </div>\n </template>\n </div>\n </section>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, type PropType } from 'vue';\nimport { DsButton } from '@shared/ui/DsButton';\nimport { DsContactValue } from '@shared/ui/DsContactValue';\nimport { DsSpinner } from '@shared/ui/DsSpinner';\nimport { COPY, SORT, EDIT, CLOSE, CORRECT, INCORRECT } from '@shared/constants/events';\nimport type { DsContactDatum } from './DsDataCard.types';\n\nconst props = defineProps({\n title: { type: String, required: true },\n // Material Icon name for the header (e.g. \"email\", \"call\").\n icon: { type: String, default: 'email' },\n // Loading state: swaps the body for a centered spinner (wins over empty/data).\n // Override the spinner (e.g. an i18n'd label) via the #loading slot.\n loading: { type: Boolean, default: false },\n // Accessible name for the loading spinner (the app owns i18n); when omitted it\n // falls back to DsSpinner's own default. Overridable via the #loading slot.\n loadingLabel: { type: String, default: '' },\n // Locked/upsell state: the data is gated (plan/permission), so the body shows a\n // banner instead of the content (wins over empty/data; loading still wins over\n // it). Presentational only — the app decides when to gate and supplies the CTA\n // via the #locked slot. Additive/opt-in. NB: the header actions still render\n // while locked — turn them off yourself (showSort / showEdit) when gating.\n locked: { type: Boolean, default: false },\n mostLikely: { type: Object as PropType<DsContactDatum | null>, default: null },\n more: { type: Array as PropType<DsContactDatum[]>, default: () => [] },\n collapsible: { type: Boolean, default: false },\n showSort: { type: Boolean, default: true },\n showEdit: { type: Boolean, default: false },\n showClose: { type: Boolean, default: false },\n isContactData: { type: Boolean, default: false },\n showRate: { type: Boolean, default: false },\n // User-facing labels (the app owns i18n); English DS defaults.\n editLabel: { type: String, default: 'Edit' },\n emptyLabel: { type: String, default: 'No data found' },\n // Optional muted line under the empty title (DS DsDataCard `emptySubtitle`),\n // e.g. \"We couldn't find any phone numbers for this contact.\"\n emptySubtitle: { type: String, default: '' },\n // Fallback text for the locked banner when no #locked slot is provided.\n lockedLabel: { type: String, default: 'Locked' },\n mostLikelyLabel: { type: String, default: 'MOST LIKELY' },\n moreLabel: { type: String, default: 'MORE' },\n sortLabel: { type: String, default: 'Sort' },\n toggleLabel: { type: String, default: 'Toggle' },\n closeLabel: { type: String, default: 'Close' },\n});\n\n// Runtime array so the emit names are registered at runtime (the type-only\n// form with `typeof CONST` compiles to an empty `emits`, which lets listeners\n// fall through as native attrs). Names come from the shared events constants.\nconst emit = defineEmits([COPY, SORT, EDIT, CLOSE, CORRECT, INCORRECT]);\n\nconst collapsed = ref(false);\n\nconst total = computed(() => props.more.length + (props.mostLikely ? 1 : 0));\nconst showSections = computed(() => total.value > 3);\nconst empty = computed(() => total.value === 0);\nconst isCollapsed = computed(() => props.collapsible && collapsed.value);\n\nfunction toggle() {\n collapsed.value = !collapsed.value;\n}\nfunction onCopy(value: string) {\n emit(COPY, value);\n}\nfunction onSort() {\n emit(SORT);\n}\nfunction onEdit() {\n emit(EDIT);\n}\nfunction onClose() {\n emit(CLOSE);\n}\nfunction onCorrect(datum: DsContactDatum) {\n emit(CORRECT, datum);\n}\nfunction onIncorrect(datum: DsContactDatum) {\n emit(INCORRECT, datum);\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/shadow.scss' as sh;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/scrollbar.scss' as sb;\n\n.ds-data-card {\n display: block;\n\n padding: 8px;\n\n background-color: colors.$white;\n border-radius: r.$radius-card;\n box-shadow: sh.$shadow-card;\n\n // -- header --------------------------------------------------------------\n &__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n padding: 6px 6px 14px; // DS DataCard.jsx\n border-bottom: 1px solid colors.$slate-tint; // --primary-tint\n\n &.is-collapsible {\n cursor: pointer;\n }\n &.is-collapsed {\n border-bottom: none;\n }\n }\n\n &__heading {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n }\n\n &__icon {\n font-size: i.icon-size(20);\n line-height: 1;\n color: colors.$slate-main; // --primary-main\n\n position: relative;\n top: 1px; // the text's optical center sits below its box center\n }\n\n &__title {\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('body');\n color: colors.$slate-main;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n &__actions {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n &__edit {\n padding: 0;\n border: none;\n background: none;\n cursor: pointer;\n\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('caption');\n color: colors.$accent-main;\n }\n\n &__close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n padding: 0;\n border: none;\n background: none;\n cursor: pointer;\n\n color: colors.$slate-soft; // --primary-secondary-text\n\n .material-symbols-filled {\n font-size: i.icon-size(20);\n line-height: 1;\n }\n }\n\n // -- body ----------------------------------------------------------------\n &__body {\n padding-top: 8px;\n }\n\n &__section {\n padding: 6px;\n\n font-family: t.$font-family;\n font-size: t.font-size('micro');\n line-height: 18px;\n letter-spacing: 0.04em;\n color: colors.$slate-main;\n }\n\n &__more {\n display: flex;\n flex-direction: column;\n gap: 8px;\n\n max-height: 132px; // DS: ~3 rows before the \"MORE\" list scrolls\n overflow-y: auto;\n overflow-x: hidden; // the hover actions park 8px right of their row\n\n @include sb.scrollbar;\n }\n\n // Loading: center the spinner in the body area.\n &__loading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: s.spacing(3); // 24\n }\n\n // Empty + locked share the DS DsDataCard \"state\" pattern (DsDataCard.jsx): a\n // centered circular badge, a bold title, and an optional subtitle. Locked tints\n // the badge with the accent to read as an upsell; its #locked slot can replace\n // the whole fallback with a CTA.\n &__empty,\n &__locked {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: s.spacing(1.5); // DS gap: 12\n\n padding: s.spacing(3) s.spacing(2.5); // DS padding: 24px 20px\n\n text-align: center;\n }\n\n &__state-badge {\n display: flex;\n align-items: center;\n justify-content: center;\n\n width: 44px; // DS: 44px badge\n height: 44px;\n\n background-color: colors.$slate-bg; // DS --primary-background\n border-radius: 50%;\n\n &--accent {\n background-color: colors.$accent-bg;\n }\n }\n\n &__state-icon {\n font-size: i.icon-size(22); // DS DsDataCard.jsx: 22px glyph\n line-height: 1;\n color: colors.$slate-soft; // DS --primary-secondary-text\n\n .ds-data-card__state-badge--accent & {\n color: colors.$accent-main;\n }\n }\n\n &__state-text {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: s.spacing(0.5); // DS gap: 3\n }\n\n &__state-title {\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('body');\n color: colors.$slate-main;\n }\n\n &__state-subtitle {\n font-family: t.$font-family;\n font-size: t.font-size('caption');\n line-height: 18px;\n color: colors.$slate-soft;\n }\n}\n</style>\n","<template>\n <label class=\"ds-radio\" :class=\"{ 'is-disabled': disabled }\">\n <input\n type=\"radio\"\n class=\"ds-radio__native\"\n :name=\"name || undefined\"\n :value=\"value || undefined\"\n :checked=\"model\"\n :disabled=\"disabled\"\n @change=\"handleChange\"\n />\n <span class=\"ds-radio__dot\" :class=\"{ 'is-active': model }\" aria-hidden=\"true\"></span>\n <span v-if=\"$slots.default || label\" class=\"ds-radio__label\"\n ><slot>{{ label }}</slot></span\n >\n </label>\n</template>\n\n<script setup lang=\"ts\">\nconst model = defineModel<boolean>({ default: false });\n\nconst props = defineProps({\n disabled: Boolean,\n // Label text (DS `label` prop); a default slot overrides it.\n label: { type: String, default: '' },\n name: { type: String, default: '' },\n value: { type: String, default: '' },\n});\n\n// Native radios never toggle themselves off — the browser only fires\n// `change` when THIS radio becomes checked (click, or keyboard arrow-nav\n// within a shared `name` group). Consumers own exclusivity across a group\n// by driving each instance's `model-value` off one selected value.\nfunction handleChange() {\n if (props.disabled) return;\n model.value = true;\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-radio {\n display: inline-flex;\n align-items: center;\n gap: s.spacing(1);\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n cursor: pointer;\n user-select: none;\n\n &.is-disabled {\n cursor: not-allowed;\n opacity: 0.6; // DS DsRadio.jsx: opacity 0.6 when disabled\n }\n\n /* Native control drives state + focus, visually replaced by the custom dot. */\n &__native {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n }\n\n &__dot {\n box-sizing: border-box;\n flex: none;\n\n width: 16px;\n height: 16px;\n\n background-color: colors.$white;\n\n border: 2px solid colors.$slate-main;\n border-radius: r.$radius-full;\n\n transition: border m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n // Thick accent border on a fixed-size, border-box circle creates the\n // filled-dot illusion (DS DsRadio.jsx: 5px solid accent-main).\n &.is-active {\n border-width: 5px;\n border-color: colors.$accent-main;\n }\n }\n\n // Hover affordance on the unchecked dot: preview the accent so the control\n // reads as selectable (skipped when disabled or already checked).\n &:hover:not(.is-disabled) .ds-radio__dot:not(.is-active) {\n border-color: colors.$accent-main;\n }\n\n /* Focus ring on the dot when the (hidden) native input is focused. */\n &__native:focus-visible + &__dot {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n &__label {\n line-height: 1.3;\n }\n}\n</style>\n","<template>\n <div class=\"ds-radio-card\" :class=\"{ 'is-selected': checked, 'is-disabled': disabled }\">\n <input\n :id=\"inputId\"\n type=\"radio\"\n class=\"ds-radio-card__native\"\n :name=\"name || undefined\"\n :value=\"value\"\n :checked=\"checked\"\n :disabled=\"disabled\"\n :aria-describedby=\"hasDescription ? descriptionId : undefined\"\n @change=\"handleChange\"\n />\n <div class=\"ds-radio-card__header\">\n <div class=\"ds-radio-card__text\">\n <label :for=\"inputId\" class=\"ds-radio-card__title\"\n ><slot name=\"title\">{{ title }}</slot></label\n >\n <div v-if=\"hasDescription\" :id=\"descriptionId\" class=\"ds-radio-card__description\">\n <slot name=\"description\">{{ description }}</slot>\n </div>\n </div>\n <span class=\"ds-radio-card__dot\" :class=\"{ 'is-active': checked }\" aria-hidden=\"true\"></span>\n </div>\n <div v-if=\"$slots.default\" class=\"ds-radio-card__preview\"><slot /></div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, useId, useSlots, type PropType } from 'vue';\nimport type { DsRadioCardValue } from './DsRadioCard.types';\n\nconst model = defineModel<DsRadioCardValue | null>({ default: null });\n\nconst props = defineProps({\n // This card's own value; the card is selected when it equals the v-model.\n value: { type: [String, Number] as PropType<DsRadioCardValue>, required: true },\n // Required: it is the radio's accessible name (the `title` slot overrides how it renders).\n title: { type: String, required: true },\n description: { type: String, default: '' },\n // Share `name` across the cards of a group for native arrow-key navigation.\n name: { type: String, default: '' },\n disabled: Boolean,\n});\n\nconst slots = useSlots();\nconst uid = useId();\nconst inputId = `${uid}-input`;\nconst descriptionId = `${uid}-description`;\n\nconst checked = computed(() => model.value === props.value);\nconst hasDescription = computed(() => !!props.description || !!slots.description);\n\n// The browser only fires `change` when THIS radio becomes checked (click, Space\n// or arrow-nav inside a shared `name` group); it never fires for the one that\n// loses the selection, so exclusivity comes from the shared v-model.\nfunction handleChange() {\n if (props.disabled) return;\n model.value = props.value;\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/border.scss' as b;\n\n.ds-radio-card {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: s.spacing(1.5);\n box-sizing: border-box;\n min-width: 0;\n padding: s.spacing(2);\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n background-color: colors.$white;\n\n border: b.$border-width-strong solid colors.$slate-tint;\n border-radius: r.$radius-card-lg;\n\n cursor: pointer;\n transition:\n border-color m.$duration-default m.$easing,\n background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:hover:not(.is-disabled):not(.is-selected) {\n border-color: colors.$slate-mid;\n }\n\n &.is-selected {\n background-color: colors.$accent-bg;\n border-color: colors.$accent-main;\n }\n\n &.is-disabled {\n cursor: not-allowed;\n opacity: 0.6;\n }\n\n /* The native radio drives state + keyboard; the card and the dot are its visuals. */\n &__native {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n }\n\n &:has(.ds-radio-card__native:focus-visible) {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n &__header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: s.spacing(1);\n }\n\n &__text {\n display: flex;\n flex-direction: column;\n gap: s.spacing(0.5);\n min-width: 0;\n }\n\n &__title {\n font-size: t.font-size('h3');\n font-weight: t.$weight-bold;\n line-height: t.$line-height-body;\n\n /* Stretched label: its hit area covers the whole card, preview included. */\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n }\n }\n\n &__description {\n color: colors.$slate-soft;\n font-size: t.font-size('small');\n line-height: t.$line-height-relaxed;\n }\n\n // Same dot as DsRadio (16px, 2px ring, 5px accent ring when active).\n &__dot {\n box-sizing: border-box;\n flex: none;\n\n width: 16px;\n height: 16px;\n margin-top: 2px;\n\n background-color: colors.$white;\n\n border: b.$border-width-strong solid colors.$slate-main;\n border-radius: r.$radius-full;\n\n transition: border m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &.is-active {\n border-width: 5px;\n border-color: colors.$accent-main;\n }\n }\n\n &:hover:not(.is-disabled) &__dot:not(.is-active) {\n border-color: colors.$accent-main;\n }\n\n &__preview {\n min-width: 0;\n pointer-events: none;\n }\n}\n</style>\n","<template>\n <button\n type=\"button\"\n role=\"switch\"\n class=\"ds-switch\"\n :class=\"{ 'is-disabled': disabled, 'is-loading': loading }\"\n :aria-checked=\"model\"\n :aria-busy=\"loading || undefined\"\n :aria-disabled=\"disabled || loading || undefined\"\n :aria-label=\"ariaLabel || undefined\"\n :disabled=\"disabled || loading\"\n @click=\"toggle\"\n >\n <span class=\"ds-switch__thumb\" aria-hidden=\"true\">\n <!-- Busy indicator lives INSIDE the thumb so it rides the same translateX as\n the knob and stays aligned to the on/off position. Decorative (thumb is\n aria-hidden): the button's aria-busy is the semantic signal for AT. -->\n <DsSpinner\n v-if=\"loading\"\n class=\"ds-switch__spinner\"\n :size=\"12\"\n :tone=\"DS_SPINNER_TONES.DARK\"\n label=\"\"\n />\n </span>\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { DsSpinner, DS_SPINNER_TONES } from '@shared/ui/DsSpinner';\n\nconst model = defineModel<boolean>({ default: false });\n\nconst props = defineProps({\n disabled: Boolean,\n // Async busy state for a toggle whose commit is pending (e.g. a server round-trip\n // that may revert). Blocks interaction and shows a spinner in the thumb while it\n // resolves. Presentational-only: the app owns the optimistic value + revert; the\n // component just reflects the `loading` and `modelValue` it's handed.\n loading: Boolean,\n // Accessible name for the switch (a control with no visible text). See\n // DsSwitch.types.ts for why this stays optional rather than a required prop.\n ariaLabel: { type: String, default: '' },\n});\n\n// Native <button> gives Enter/Space activation for free; this only handles\n// the resulting click (mouse or keyboard-triggered). Loading blocks the toggle\n// the same way disabled does — the pending op must resolve first.\nfunction toggle() {\n if (props.disabled || props.loading) return;\n model.value = !model.value;\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/shadow.scss' as sh;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-switch {\n display: inline-flex;\n align-items: center;\n flex: none;\n\n width: 40px;\n height: 20px;\n padding: 2px;\n\n background-color: colors.$grey-3;\n border: none;\n border-radius: r.$radius-full;\n outline: none;\n\n cursor: pointer;\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n &[aria-checked='true'] {\n background-color: colors.$accent-main;\n }\n\n &.is-disabled {\n cursor: not-allowed;\n opacity: 0.6; // DS DsSwitch.jsx: opacity 0.6 when disabled\n }\n\n // Busy ≠ disabled: keep the track color at full opacity so the on/off state\n // stays readable while the async op resolves — only the spinner signals \"pending\".\n &.is-loading {\n cursor: progress;\n }\n\n &__thumb {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n\n width: 16px;\n height: 16px;\n\n background-color: colors.$white;\n border-radius: r.$radius-full;\n box-shadow: sh.$shadow-thumb;\n\n transition: transform m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n }\n\n // Track inner width (40 - 2*2 padding) minus the thumb (16) = 20px travel.\n &[aria-checked='true'] &__thumb {\n transform: translateX(20px);\n }\n\n // The spinner sits centered in the white thumb; the dark tone reads against it\n // in both the on (accent track) and off (grey track) positions.\n &__spinner {\n flex: none;\n }\n}\n</style>\n","<template>\n <button\n type=\"button\"\n class=\"ds-item-selector-button\"\n :class=\"{ 'is-empty': !item, 'is-disabled': disabled }\"\n aria-haspopup=\"listbox\"\n :aria-label=\"ariaLabel || undefined\"\n :disabled=\"disabled\"\n @click=\"handleClick\"\n >\n <span class=\"ds-item-selector-button__label\">{{ item ? item.name : emptyTitle }}</span>\n <i\n v-if=\"icon\"\n class=\"ds-item-selector-button__icon\"\n :class=\"item ? 'material-symbols-filled' : 'material-symbols-rounded'\"\n :style=\"item?.color ? { color: item.color } : undefined\"\n aria-hidden=\"true\"\n >{{ icon }}</i\n >\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { type PropType } from 'vue';\nimport { CLICK } from '@shared/constants/events';\nimport type { DsSelectorItem } from './DsItemSelectorButton.types';\n\nconst props = defineProps({\n item: { type: Object as PropType<DsSelectorItem | null>, default: null },\n // Material Symbols ligature (e.g. `folder`); omitted entirely when unset.\n icon: { type: String, default: '' },\n emptyTitle: { type: String, default: '' },\n // Accessible name (see .types.ts). Required in the empty state when there's no\n // `emptyTitle`; the visible text (item.name / emptyTitle) names it otherwise.\n ariaLabel: { type: String, default: '' },\n disabled: Boolean,\n});\n\nconst emit = defineEmits([CLICK]);\n\nfunction handleClick(event: MouseEvent) {\n if (props.disabled) return;\n emit(CLICK, event);\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/border.scss' as b;\n\n.ds-item-selector-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px; // DS ItemSelectorButton.jsx literal gap (not on the 8px scale)\n\n height: s.control-height('medium');\n padding: 0 s.control-padding('medium');\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n background-color: colors.$white;\n\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-full;\n outline: none;\n\n cursor: pointer;\n transition: border-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:hover:not(.is-disabled) {\n border-color: b.$border-input-hover;\n }\n\n // After :hover, same specificity, so the focus border wins while the pointer is over it.\n &:focus-visible:not(.is-disabled) {\n border-color: b.$border-input-focus;\n }\n\n &.is-empty {\n color: colors.$slate-mid;\n }\n\n &.is-disabled {\n cursor: not-allowed;\n opacity: 0.6;\n }\n\n &__label {\n max-width: 200px;\n overflow: hidden;\n\n font-weight: t.$weight-bold; // DS: bold regardless of selected/empty\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &__icon {\n flex: none;\n font-size: i.icon-size(16);\n line-height: i.icon-size(16);\n }\n}\n</style>\n","// DsSelect — dropdown select. Visual + interaction port of the DS `Select.jsx`\n// (`GenericSelect`, two visual modes: grey pill \"default\" and the Prospector\n// accent filter chip \"filterSummary\"). The DS source renders a bare\n// `<div onClick>` with zero semantics; this library version keeps the exact\n// same visual API (options / placeholder / multiple / selectType /\n// showCheckbox / width) but adds a real interaction model — native <button>\n// trigger, listbox/option roles, full keyboard support, and focus management\n// — per the WAI-ARIA APG \"Collapsible Dropdown Listbox\" (select-only combobox)\n// pattern. See DsSelect.vue for the implementation notes.\n\nexport interface DsSelectOption {\n value: string | number;\n label: string;\n subLabel?: string;\n /** Material Symbols ligature name. */\n icon?: string;\n /** Icon color (any CSS color value) — mirrors the DS `option.color` pass-through. */\n color?: string;\n /**\n * Optional group name (optgroup-style). Consecutive options that share a\n * `group` are wrapped in a real ARIA group (`role=\"group\"` labelled by a\n * non-selectable header, with a divider); options without a `group` render\n * ungrouped. Grouping follows the order of `options` (like native\n * `<optgroup>`) — the component does not re-sort. Keyboard navigation skips\n * the headers (they are not selectable options).\n */\n group?: string;\n}\n\n// selectType: 'default' — grey pill · 'filterSummary' — accent filter chip\n// (Prospector-style: grey until something is selected, then flips to accent).\nexport const DS_SELECT_TYPES = {\n DEFAULT: 'default',\n FILTER_SUMMARY: 'filterSummary',\n} as const;\nexport type DsSelectType = (typeof DS_SELECT_TYPES)[keyof typeof DS_SELECT_TYPES];\n\n// width — defaults to 'auto' (shrink-to-content, the historical behaviour, so\n// the feature stays non-breaking). Opt into a named step for a STABLE width that\n// no longer resizes with the selected label; 'full' fills the container (like\n// DsInput). Any number (→px) or CSS string (e.g. '18rem') works for a custom width.\nexport const DS_SELECT_WIDTHS = {\n AUTO: 'auto', // shrink to content — resizes with the selected label (default)\n SMALL: 'small', // 128px\n MEDIUM: 'medium', // 200px\n LARGE: 'large', // 280px\n FULL: 'full', // 100% of the container\n} as const;\nexport type DsSelectWidthName = (typeof DS_SELECT_WIDTHS)[keyof typeof DS_SELECT_WIDTHS];\n// The `width` prop accepts a named step above, or a custom width: a number\n// (rendered as px) or any CSS width string.\nexport type DsSelectWidth = DsSelectWidthName | number | string;\n\n// v-model shape — DECIDED (idiomatic Vue, NOT the DS \"value is always an\n// array\" convention):\n// multiple = false → string | number | null (scalar, like a native <select>)\n// multiple = true → (string | number)[] (array of selected values)\n// One generic type covers both; DsSelect.vue narrows it internally based on\n// the `multiple` prop instead of exposing two separate component variants.\nexport type DsSelectModelValue = string | number | (string | number)[] | null;\n","<template>\n <div\n ref=\"rootRef\"\n class=\"ds-select\"\n :class=\"[`ds-select--${selectType}`, widthClass, { 'is-open': open }]\"\n :style=\"rootStyle\"\n >\n <div\n class=\"ds-select__control\"\n :class=\"{ 'is-disabled': disabled, 'is-filter-selected': isFilterSelected }\"\n >\n <button\n ref=\"triggerRef\"\n type=\"button\"\n class=\"ds-select__trigger\"\n :disabled=\"disabled\"\n aria-haspopup=\"listbox\"\n :aria-expanded=\"open\"\n :aria-controls=\"open ? listboxId : undefined\"\n :aria-activedescendant=\"filterable ? undefined : activeOptionId\"\n @click=\"toggleOpen\"\n @keydown=\"onTriggerKeydown\"\n >\n <span class=\"ds-select__summary\" :title=\"summaryText\">{{ summaryText }}</span>\n </button>\n\n <button\n v-if=\"isFilter && hasSelection\"\n type=\"button\"\n class=\"ds-select__clear\"\n :disabled=\"disabled\"\n :aria-label=\"clearLabel || undefined\"\n @click=\"clearSelection\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">close</i>\n </button>\n <i v-else class=\"material-symbols-filled ds-select__chevron\" aria-hidden=\"true\"\n >keyboard_arrow_down</i\n >\n </div>\n\n <div v-if=\"open\" class=\"ds-select__popup\">\n <!-- Type-to-filter (opt-in via `filterable`). The search field is a SIBLING\n of the listbox, never a child: an <input> inside role=\"listbox\" is\n invalid ARIA. It carries the editable-combobox roles/state and owns\n aria-activedescendant while open (focus lives here, not on the trigger). -->\n <div v-if=\"filterable\" class=\"ds-select__search\">\n <i class=\"material-symbols-filled ds-select__search-icon\" aria-hidden=\"true\">search</i>\n <input\n ref=\"searchRef\"\n type=\"text\"\n class=\"ds-select__search-input\"\n role=\"combobox\"\n aria-expanded=\"true\"\n :aria-controls=\"listboxId\"\n :aria-activedescendant=\"activeOptionId\"\n aria-autocomplete=\"list\"\n autocomplete=\"off\"\n :aria-label=\"searchLabel\"\n :placeholder=\"searchPlaceholder\"\n :value=\"query\"\n @input=\"onSearchInput\"\n @keydown=\"onSearchKeydown\"\n />\n </div>\n\n <!-- @mousedown.prevent keeps focus on the trigger/search input when an\n option is clicked (see the option's @click.prevent for the other half). -->\n <ul\n :id=\"listboxId\"\n class=\"ds-select__listbox\"\n role=\"listbox\"\n :aria-multiselectable=\"multiple || undefined\"\n :aria-busy=\"loading || undefined\"\n @mousedown.prevent\n >\n <!-- Loading takes precedence over both options and the empty state\n (async fetch in flight). aria-busy on the listbox + a #loading slot\n for the app to override the default DsSpinner. -->\n <li v-if=\"loading\" class=\"ds-select__loading\" role=\"presentation\">\n <slot name=\"loading\"><DsSpinner size=\"small\" /></slot>\n </li>\n\n <template v-else>\n <!-- One <li> per run. A grouped run is a REAL ARIA group (role=\"group\"\n named by its header). An ungrouped run is a transparent\n role=\"presentation\" wrapper, so its options stay owned by the\n listbox. Options carry role=\"option\" regardless of nesting; the flat\n `it.index` keeps aria-activedescendant / keyboard nav intact. -->\n <li\n v-for=\"run in runs\"\n :key=\"run.key\"\n :role=\"run.kind === 'group' ? 'group' : 'presentation'\"\n :aria-labelledby=\"run.kind === 'group' ? run.headerId : undefined\"\n :class=\"run.kind === 'group' ? 'ds-select__group' : 'ds-select__run'\"\n >\n <span v-if=\"run.kind === 'group'\" :id=\"run.headerId\" class=\"ds-select__group-header\">{{\n run.label\n }}</span>\n\n <!-- @click.prevent is load-bearing: if a consumer wraps DsSelect in a\n <label> (common for form fields), the label's activation behaviour\n re-fires this click onto the labelable trigger <button>, toggling the\n dropdown (multi would close, single would re-open). Cancelling the\n option click's default suppresses that re-fire. -->\n <div\n v-for=\"it in run.items\"\n :id=\"optionId(it.index)\"\n :key=\"it.option.value\"\n class=\"ds-select__option\"\n :class=\"{\n 'is-selected': isSelected(it.option.value),\n 'is-active': it.index === activeIndex,\n 'ds-select__option--checkbox': showCheckbox,\n }\"\n role=\"option\"\n :aria-selected=\"isSelected(it.option.value)\"\n @click.prevent=\"selectOption(it.option.value)\"\n @mouseenter=\"activeIndex = it.index\"\n >\n <DsCheckbox\n v-if=\"showCheckbox\"\n class=\"ds-select__option-check\"\n :model-value=\"isSelected(it.option.value)\"\n disabled\n aria-hidden=\"true\"\n />\n <!-- #option scoped slot (opt-in): custom per-option content (avatar,\n image, arbitrary markup). Falls back to the icon/label\n key-mapping. The decorative checkbox glyph stays OUTSIDE the slot\n so showCheckbox keeps working with custom content. -->\n <slot\n name=\"option\"\n :option=\"it.option\"\n :selected=\"isSelected(it.option.value)\"\n :active=\"it.index === activeIndex\"\n >\n <i\n v-if=\"it.option.icon\"\n class=\"material-symbols-filled ds-select__option-icon\"\n :style=\"it.option.color ? { color: it.option.color } : undefined\"\n aria-hidden=\"true\"\n >{{ it.option.icon }}</i\n >\n <span class=\"ds-select__option-label\"\n >{{ it.option.label\n }}<span v-if=\"it.option.subLabel\" class=\"ds-select__option-sublabel\"\n >, {{ it.option.subLabel }}</span\n ></span\n >\n </slot>\n </div>\n </li>\n\n <!-- Empty state: no options, or a filtered list with no matches.\n role=presentation so keyboard nav / moveActive ignore it\n (moveActive already no-ops on len===0). -->\n <li v-if=\"visibleOptions.length === 0\" class=\"ds-select__empty\" role=\"presentation\">\n <slot name=\"empty\">{{ emptyText }}</slot>\n </li>\n </template>\n </ul>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n reactive,\n ref,\n useId,\n watch,\n type PropType,\n} from 'vue';\nimport { DsCheckbox } from '@shared/ui/DsCheckbox';\nimport { DsSpinner } from '@shared/ui/DsSpinner';\nimport { SEARCH } from '@shared/constants/events';\nimport {\n DS_SELECT_TYPES,\n DS_SELECT_WIDTHS,\n type DsSelectOption,\n type DsSelectType,\n type DsSelectWidth,\n type DsSelectModelValue,\n} from './DsSelect.types';\n\nconst props = defineProps({\n options: { type: Array as PropType<DsSelectOption[]>, required: true },\n placeholder: { type: String, default: 'Select an option' },\n multiple: Boolean,\n selectType: { type: String as PropType<DsSelectType>, default: DS_SELECT_TYPES.DEFAULT },\n showCheckbox: Boolean,\n // Named step ('small'|'medium'|'large'|'full'|'auto') for a STABLE width, or a\n // custom width (number → px, or any CSS string). Defaults to 'auto'\n // (shrink-to-content — the historical behaviour, kept so this stays a\n // non-breaking, opt-in feature); pass a fixed step for a width that doesn't\n // resize with the selected label. See DsSelect.types.ts `DS_SELECT_WIDTHS`.\n width: {\n type: [Number, String] as PropType<DsSelectWidth>,\n default: DS_SELECT_WIDTHS.AUTO,\n },\n disabled: Boolean,\n // Opt-in type-to-filter: renders a search input inside the open dropdown.\n // Off by default, so existing usages keep the plain select-only behaviour.\n filterable: Boolean,\n // Remote filtering: skip the built-in local filter and let the app own it by\n // replacing `options` in response to the `search` event. Prevents a double\n // filter (local re-filtering of already server-filtered results). No effect\n // unless `filterable` is also set.\n remote: Boolean,\n // Async loading state: while true the listbox shows a spinner + aria-busy\n // instead of options/empty. A #loading slot overrides the default DsSpinner.\n loading: Boolean,\n // Accessible name for the filter search input (a placeholder is not a reliable\n // accessible name). English default; the app owns i18n.\n searchLabel: { type: String, default: 'Filter options' },\n // Visible placeholder for the filter search input.\n searchPlaceholder: { type: String, default: 'Search' },\n // Accessible name for the filterSummary clear (×) control. The app can override\n // the wording (e.g. localized), but we default to a non-empty fallback so the\n // icon-only button is never left without an accessible name for screen readers.\n clearLabel: { type: String, default: 'Clear selection' },\n // Shown when the visible list is empty (no options, or a filtered list with no\n // matches). English default (the app owns i18n); a #empty slot overrides it.\n emptyText: { type: String, default: 'No options' },\n});\n\n// `search` carries the typed filter text. update:modelValue is declared\n// implicitly by defineModel below.\nconst emit = defineEmits([SEARCH]);\n\n// v-model — see DsSelect.types.ts `DsSelectModelValue` for the full rationale:\n// !multiple → scalar `string | number | null` (like a native <select>)\n// multiple → `(string | number)[]`\n// This is a deliberate departure from the DS source (which always hands back\n// an array via onChange, even for a single value) in favour of the idiomatic\n// Vue shape a consumer actually expects from v-model.\nconst model = defineModel<DsSelectModelValue>({ default: null });\n\n// useId() gives a per-instance, SSR-safe unique id. A plain `let uid = 0`\n// here would reset per instance (it runs inside setup), so every DsSelect\n// would collide on `ds-select-1-*` and produce duplicate listbox/option ids.\nconst instanceId = `ds-select-${useId()}`;\nconst listboxId = `${instanceId}-listbox`;\nconst optionId = (index: number) => `${instanceId}-option-${index}`;\n\nconst rootRef = ref<HTMLElement | null>(null);\nconst triggerRef = ref<HTMLElement | null>(null);\nconst searchRef = ref<HTMLInputElement | null>(null);\n\nconst open = ref(false);\nconst activeIndex = ref(-1);\nconst query = ref('');\n\nconst isFilter = computed(() => props.selectType === DS_SELECT_TYPES.FILTER_SUMMARY);\n\n// Local filtering runs only when filterable AND not remote. In remote mode the\n// app replaces `options` itself (via the `search` event), so filtering here\n// would double-filter its already-filtered results.\nconst localFilterActive = computed(() => props.filterable && !props.remote);\n\nconst filteredOptions = computed<DsSelectOption[]>(() => {\n if (!localFilterActive.value) return props.options;\n const q = query.value.trim().toLowerCase();\n if (!q) return props.options;\n return props.options.filter(\n (o) =>\n o.label.toLowerCase().includes(q) ||\n (o.subLabel ? o.subLabel.toLowerCase().includes(q) : false)\n );\n});\n\n// The list actually rendered and navigated. While loading, nothing is\n// navigable (the spinner replaces the rows), so keyboard nav / active-descendant\n// stay consistent with what's on screen.\nconst visibleOptions = computed<DsSelectOption[]>(() =>\n props.loading ? [] : filteredOptions.value\n);\n\n// Render is grouped into runs so grouped options are exposed as REAL ARIA groups\n// (role=\"group\" named by their header) — not just visually. Each option keeps its\n// flat index into `visibleOptions`, so keyboard nav / activeIndex / optionId /\n// aria-activedescendant are unchanged and headers are never navigable (they are\n// not in visibleOptions). Consecutive options sharing a `group` form one group\n// run; ungrouped options form a transparent \"plain\" run (its options stay owned\n// by the listbox, since role=\"presentation\" is transparent to assistive tech).\ntype OptionItem = { option: DsSelectOption; index: number };\ntype Run =\n | { kind: 'group'; label: string; headerId: string; key: string; items: OptionItem[] }\n | { kind: 'plain'; key: string; items: OptionItem[] };\n\nconst runs = computed<Run[]>(() => {\n const result: Run[] = [];\n visibleOptions.value.forEach((option, index) => {\n const g = option.group;\n const last = result[result.length - 1];\n if (g) {\n if (last?.kind === 'group' && last.label === g) last.items.push({ option, index });\n else\n result.push({\n kind: 'group',\n label: g,\n headerId: `${instanceId}-group-${index}`,\n key: `g-${index}`,\n items: [{ option, index }],\n });\n } else if (last?.kind === 'plain') {\n last.items.push({ option, index });\n } else {\n result.push({ kind: 'plain', key: `p-${index}`, items: [{ option, index }] });\n }\n });\n return result;\n});\n\nconst selectedValues = computed<(string | number)[]>(() => {\n if (props.multiple) return Array.isArray(model.value) ? model.value : [];\n return model.value !== null && model.value !== undefined ? [model.value as string | number] : [];\n});\nconst hasSelection = computed(() => selectedValues.value.length > 0);\nconst isFilterSelected = computed(() => isFilter.value && hasSelection.value);\n\nfunction isSelected(value: string | number) {\n return selectedValues.value.includes(value);\n}\n\n// Cache of last-known value → label, kept fresh from `options` (deep + immediate\n// so it tracks in-place label edits and push/splice on the same array, not only\n// array-reference swaps). It is ONLY a fallback: labelFor() reads the CURRENT\n// options first — so an in-place label change is reflected reactively — and uses\n// the cache only when the selected value is absent from the current options,\n// which is what `remote` filtering causes when it replaces `options` with a\n// subset. Without the fallback the trigger would degrade to the raw value\n// (e.g. \"ba\" instead of \"Buenos Aires\").\nconst labelCache = reactive(new Map<string | number, string>());\nwatch(\n () => props.options,\n (opts) => opts.forEach((o) => labelCache.set(o.value, o.label)),\n { immediate: true, deep: true }\n);\n\nfunction labelFor(value: string | number) {\n return (\n props.options.find((o) => o.value === value)?.label ?? labelCache.get(value) ?? String(value)\n );\n}\n\nconst summaryText = computed(() => {\n if (isFilter.value) {\n if (hasSelection.value) {\n return props.multiple\n ? `${props.placeholder} (${selectedValues.value.length})`\n : labelFor(selectedValues.value[0]);\n }\n return props.placeholder;\n }\n if (hasSelection.value) {\n return props.multiple\n ? selectedValues.value.map(labelFor).join(', ')\n : labelFor(selectedValues.value[0]);\n }\n return props.placeholder;\n});\n\n// A named width step is applied via a modifier class (so the fixed value comes\n// from the SCSS token); a custom width (number/other string) goes inline.\nconst NAMED_WIDTHS = Object.values(DS_SELECT_WIDTHS) as string[];\nconst widthClass = computed(() =>\n typeof props.width === 'string' && NAMED_WIDTHS.includes(props.width)\n ? `ds-select--w-${props.width}`\n : null\n);\nconst rootStyle = computed(() => {\n if (widthClass.value) return undefined; // handled by the modifier class\n return { width: typeof props.width === 'number' ? `${props.width}px` : props.width };\n});\n\nconst activeOptionId = computed(() =>\n open.value && activeIndex.value >= 0 ? optionId(activeIndex.value) : undefined\n);\n\nfunction findInitialActiveIndex(): number {\n if (visibleOptions.value.length === 0) return -1;\n const firstSelected = visibleOptions.value.findIndex((o) => isSelected(o.value));\n return firstSelected >= 0 ? firstSelected : 0;\n}\n\nfunction openDropdown() {\n if (props.disabled) return;\n open.value = true;\n activeIndex.value = findInitialActiveIndex();\n // Focus goes to the search input when filterable, so the user can type\n // immediately; aria-activedescendant then rides on the input, not the trigger.\n if (props.filterable) nextTick(() => searchRef.value?.focus());\n}\n\n// `refocusTrigger` is false for outside-click / Tab-away closes, where focus is\n// already moving elsewhere and shouldn't be yanked back to the trigger.\nfunction closeDropdown(refocusTrigger = true) {\n open.value = false;\n activeIndex.value = -1;\n // Reset the filter so reopening starts fresh. Assigned after open=false so the\n // visibleOptions watcher (guarded on open) doesn't reset activeIndex here.\n // Emit search('') on the reset too: in `remote` mode the parent owns `options`\n // and otherwise can't know the query was cleared, so it would keep serving the\n // last narrowed result set on reopen (empty input, stale list). Local mode\n // already recomputes the full list from the empty query — the emit is harmless\n // there. Guarded on a non-empty query so a plain open/close doesn't emit.\n if (query.value) {\n query.value = '';\n emit(SEARCH, '');\n }\n if (refocusTrigger) nextTick(() => triggerRef.value?.focus());\n}\n\nfunction toggleOpen() {\n if (props.disabled) return;\n if (open.value) closeDropdown();\n else openDropdown();\n}\n\nfunction selectOption(value: string | number) {\n if (props.disabled) return;\n if (props.multiple) {\n const current = selectedValues.value;\n model.value = current.includes(value)\n ? current.filter((v) => v !== value)\n : [...current, value];\n // Multi-select keeps the dropdown open so users can toggle several options.\n return;\n }\n // DS parity (Select.jsx toggleValue): single-select + showCheckbox lets\n // clicking the already-selected option deselect it.\n const alreadySelected = isSelected(value);\n model.value = alreadySelected && props.showCheckbox ? null : value;\n closeDropdown();\n}\n\nfunction clearSelection() {\n if (props.disabled) return;\n model.value = props.multiple ? [] : null;\n}\n\nfunction moveActive(delta: number) {\n const len = visibleOptions.value.length;\n if (len === 0) return;\n if (activeIndex.value < 0) {\n activeIndex.value = delta > 0 ? 0 : len - 1;\n } else {\n activeIndex.value = (activeIndex.value + delta + len) % len;\n }\n nextTick(() => {\n // Optional-chain the call itself, not just the element: scrollIntoView is\n // unreliable/absent in some DOM test environments (jsdom).\n document.getElementById(optionId(activeIndex.value))?.scrollIntoView?.({ block: 'nearest' });\n });\n}\n\nfunction onTriggerKeydown(event: KeyboardEvent) {\n if (props.disabled) return;\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n if (!open.value) openDropdown();\n else moveActive(1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n if (!open.value) openDropdown();\n else moveActive(-1);\n break;\n case 'Home':\n if (open.value) {\n event.preventDefault();\n activeIndex.value = 0;\n }\n break;\n case 'End':\n if (open.value) {\n event.preventDefault();\n activeIndex.value = visibleOptions.value.length - 1;\n }\n break;\n case 'Enter':\n case ' ':\n case 'Spacebar':\n event.preventDefault();\n if (!open.value) {\n openDropdown();\n } else if (activeIndex.value >= 0) {\n const option = visibleOptions.value[activeIndex.value];\n if (option) selectOption(option.value);\n }\n break;\n case 'Escape':\n if (open.value) {\n event.preventDefault();\n // Stop here so a DsModal (or anything else) listening for Escape on\n // `document` doesn't also close — the dropdown is the innermost layer.\n event.stopPropagation();\n closeDropdown();\n }\n break;\n case 'Tab':\n // Let the browser's default Tab handling move focus; just collapse the\n // popup without stealing focus back.\n if (open.value) closeDropdown(false);\n break;\n default:\n break;\n }\n}\n\n// Keydown on the search input. Only the navigation keys are intercepted; Space,\n// Home, End and printable characters fall through to the browser so text editing\n// (typing a space, jumping the caret) keeps working inside the input.\nfunction onSearchKeydown(event: KeyboardEvent) {\n if (props.disabled) return;\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n moveActive(1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n moveActive(-1);\n break;\n case 'Enter':\n event.preventDefault();\n if (activeIndex.value >= 0) {\n const option = visibleOptions.value[activeIndex.value];\n if (option) selectOption(option.value);\n }\n break;\n case 'Escape':\n event.preventDefault();\n event.stopPropagation();\n closeDropdown();\n break;\n case 'Tab':\n if (open.value) closeDropdown(false);\n break;\n default:\n break;\n }\n}\n\nfunction onSearchInput(event: Event) {\n query.value = (event.target as HTMLInputElement).value;\n // Always emit so a remote consumer can react; local filtering (when not\n // `remote`) happens reactively via `filteredOptions`.\n emit(SEARCH, query.value);\n}\n\n// Keep activeIndex valid whenever the rendered list changes underneath it —\n// local filtering as the user types, remote results arriving, or loading\n// toggling. Not triggered by opening (open is not a dependency of\n// visibleOptions), so it never fights findInitialActiveIndex.\nwatch(visibleOptions, (opts) => {\n if (!open.value) return;\n if (opts.length === 0) activeIndex.value = -1;\n else if (activeIndex.value < 0 || activeIndex.value >= opts.length) activeIndex.value = 0;\n});\n\nfunction onDocumentMousedown(event: MouseEvent) {\n if (rootRef.value && !rootRef.value.contains(event.target as Node)) {\n closeDropdown(false);\n }\n}\n\nwatch(open, (isOpen) => {\n if (typeof document === 'undefined') return;\n if (isOpen) document.addEventListener('mousedown', onDocumentMousedown);\n else document.removeEventListener('mousedown', onDocumentMousedown);\n});\n\nwatch(\n () => props.disabled,\n (isDisabled) => {\n if (isDisabled && open.value) closeDropdown(false);\n }\n);\n\nonBeforeUnmount(() => {\n if (typeof document === 'undefined') return;\n document.removeEventListener('mousedown', onDocumentMousedown);\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/shadow.scss' as sh;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/border.scss' as b;\n\n.ds-select {\n position: relative;\n display: inline-flex; // box width comes from the width step/value (default: auto)\n flex-direction: column;\n\n font-family: t.$font-family;\n\n // Width steps — a stable, fixed box width from the token scale so the control\n // does not resize to the selected label. 'auto' restores shrink-to-content;\n // 'full' fills the container. A custom number/CSS-string width is set inline.\n &--w-small {\n width: s.control-width('small');\n }\n &--w-medium {\n width: s.control-width('medium');\n }\n &--w-large {\n width: s.control-width('large');\n }\n &--w-full {\n width: 100%;\n }\n &--w-auto {\n width: auto;\n }\n\n &__control {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: s.spacing(1);\n\n box-sizing: border-box;\n width: 100%;\n height: s.control-height('medium'); // DS Select.jsx: height 32 (maxHeight 36)\n padding: 0 s.spacing(1.5);\n\n background-color: colors.$slate-bg; // DS --primary-background (grey pill, rest)\n border: 1px solid transparent; // reserved, so the focus border does not move the layout\n border-radius: r.$radius-control;\n\n transition:\n background-color m.$duration-default m.$easing,\n border-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:hover:not(.is-disabled) {\n background-color: colors.$slate-tint; // DS --primary-tint (hover)\n }\n\n &.is-disabled {\n opacity: 0.6; // DS Select.jsx: opacity disabled ? 0.6 : 1\n cursor: not-allowed;\n }\n\n // filterSummary flips grey → accent once something is selected (DS: bg is\n // accent-tint at rest, accent-bg on hover, only when isFilter && hasSelection).\n &.is-filter-selected {\n background-color: colors.$accent-tint;\n\n &:hover:not(.is-disabled) {\n background-color: colors.$accent-bg;\n }\n\n .ds-select__summary {\n color: colors.$accent-main;\n }\n }\n }\n\n &__control:focus-within,\n &.is-open &__control {\n border-color: b.$border-input-focus;\n }\n\n &__trigger {\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n min-width: 0;\n\n height: 100%;\n padding: 0;\n\n font-family: t.$font-family;\n text-align: left;\n\n background: transparent;\n border: 0;\n outline: none;\n\n cursor: pointer;\n\n &:disabled {\n cursor: not-allowed;\n }\n }\n\n &__summary {\n overflow: hidden;\n\n color: colors.$slate-main; // DS --primary-main\n font-weight: t.$weight-medium; // DS: fontWeight 500 (constant)\n font-size: t.font-size('body');\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n &__clear {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n padding: 0;\n\n color: colors.$accent-main;\n\n background: transparent;\n border: 0;\n\n cursor: pointer;\n\n .material-symbols-filled {\n font-size: i.icon-size(20); // DS: close icon fontSize 20\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n }\n\n &__chevron {\n flex: none;\n\n color: colors.$slate-main; // DS --primary-main\n font-size: i.icon-size(18); // DS: chevron fontSize 18\n line-height: 1;\n\n transition: transform m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n }\n\n &.is-open &__chevron {\n transform: rotate(180deg);\n }\n\n // Popup wrapper: holds the (optional) search field pinned above the scrolling\n // listbox. Owns the box chrome that used to live on the listbox itself.\n &__popup {\n position: absolute;\n top: calc(100% + #{s.spacing(0.5)});\n left: 0;\n z-index: 20; // above page content, below DsModal's 2001\n\n display: flex;\n flex-direction: column;\n min-width: 100%;\n overflow: hidden; // clip the listbox / search corners to the radius\n\n background-color: colors.$white;\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-control;\n box-shadow: sh.$shadow-dropdown;\n }\n\n &__search {\n display: flex;\n align-items: center;\n gap: s.spacing(1);\n\n padding: s.spacing(1) s.spacing(1.5);\n\n border-bottom: 1px solid colors.$slate-tint;\n }\n\n &__search-icon {\n flex: none;\n\n color: colors.$slate-soft;\n font-size: i.icon-size(18);\n line-height: 1;\n }\n\n &__search-input {\n flex: 1 1 auto;\n min-width: 0;\n\n padding: 0;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n background: transparent;\n border: 0;\n outline: none;\n\n &::placeholder {\n color: colors.$slate-soft;\n }\n }\n\n &__listbox {\n max-height: 260px; // DS Select.jsx: maxHeight 260\n margin: 0;\n padding: s.spacing(0.5) 0;\n overflow-y: auto;\n\n list-style: none;\n }\n\n &__option {\n display: flex;\n align-items: center;\n gap: s.spacing(1);\n\n padding: s.spacing(1) s.spacing(2);\n\n color: colors.$slate-main; // DS --primary-main\n font-size: t.font-size('body');\n white-space: nowrap;\n\n cursor: pointer;\n\n &:hover,\n &.is-active {\n background-color: colors.$slate-tint;\n }\n\n // Bold + accent text on selection, but only when there's no checkbox glyph\n // doing that job instead (DS SelectOption: `isSelected && !showCheckbox`).\n &.is-selected:not(.ds-select__option--checkbox) {\n color: colors.$accent-main;\n font-weight: t.$weight-bold;\n }\n\n // DsCheckbox's root inherits this scope's data-v-* attribute as a child\n // component root (standard Vue scoped-CSS behaviour), so a plain class\n // selector reaches it — but its own `.is-disabled { opacity: .5 }` rule has\n // the same specificity, making the winner order-dependent on CSS emission.\n // The extra ancestor here breaks the tie deterministically: `disabled`\n // keeps the decorative glyph's native input out of the tab order without\n // letting DsCheckbox's disabled-state opacity mute the selected/unselected look.\n .ds-select__option-check.is-disabled {\n opacity: 1;\n }\n }\n\n &__option-check {\n flex: none;\n pointer-events: none; // decorative only — the <li> owns click/keyboard selection\n }\n\n &__option-icon {\n flex: none;\n font-size: i.icon-size(20);\n }\n\n &__option-label {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n &__option-sublabel {\n color: colors.$slate-soft; // DS --primary-secondary-text\n }\n\n // Group run — a real ARIA group (role=\"group\"). The divider sits on the\n // container so it separates groups (and grouped from ungrouped rows); the very\n // first run never shows a stray line at the top of the popup.\n &__group {\n border-top: 1px solid colors.$slate-tint;\n\n &:first-child {\n border-top: none;\n }\n }\n\n // Group header — the non-selectable label naming the group (referenced by the\n // group's aria-labelledby).\n &__group-header {\n display: block;\n padding: s.spacing(1) s.spacing(2) s.spacing(0.5);\n\n color: colors.$slate-soft;\n font-size: t.font-size('caption');\n font-weight: t.$weight-medium;\n }\n\n // Loading row — centred spinner, distinct from the empty state. Not selectable.\n &__loading {\n display: flex;\n align-items: center;\n justify-content: center;\n\n padding: s.spacing(2);\n }\n\n // Empty state row — not selectable (role=presentation), muted like a sublabel.\n &__empty {\n padding: s.spacing(1) s.spacing(2);\n\n color: colors.$slate-soft;\n font-size: t.font-size('body');\n }\n}\n</style>\n","<template>\n <tr\n class=\"ds-row\"\n :class=\"{ 'is-selected': selected, 'is-clickable': clickable }\"\n :tabindex=\"clickable ? 0 : undefined\"\n @click=\"onClick\"\n @keydown=\"onKeydown\"\n >\n <slot />\n </tr>\n</template>\n\n<script setup lang=\"ts\">\nimport { CLICK } from '@shared/constants/events';\n\nconst props = defineProps({\n selected: { type: Boolean, default: false },\n clickable: { type: Boolean, default: false },\n});\n\nconst emit = defineEmits([CLICK]);\n\n// Only interactive rows emit — a plain row is not a click target.\nfunction onClick() {\n if (props.clickable) emit(CLICK);\n}\n\nfunction onKeydown(e: KeyboardEvent) {\n if (!props.clickable) return;\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n emit(CLICK);\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-row {\n background-color: colors.$white;\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &.is-clickable {\n cursor: pointer;\n }\n\n &:hover {\n background-color: colors.$slate-bg;\n }\n\n // Selected wins over hover.\n &.is-selected,\n &.is-selected:hover {\n background-color: colors.$accent-bg;\n }\n\n &.is-clickable:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: -2px;\n }\n\n // A pinned (sticky) DsCell paints its own opaque background so scrolling cells\n // don't show through — which means it can't inherit the row's hover/selected\n // colour. Mirror the row state onto it here (:deep reaches the slotted DsCell,\n // in its own scope). Selected already tracked by DsCell.is-selected; this adds\n // the hover state the cell can't observe on its own.\n &:hover :deep(.ds-cell.is-pinned) {\n background-color: colors.$slate-bg;\n }\n &.is-selected:hover :deep(.ds-cell.is-pinned) {\n background-color: colors.$accent-bg;\n }\n}\n</style>\n","<template>\n <td\n class=\"ds-cell\"\n :class=\"{\n 'is-accent': first && selected,\n 'is-truncated': truncate,\n 'is-selected': selected,\n 'is-pinned': !!pinned,\n [`is-pinned--${pinned}`]: !!pinned,\n }\"\n :style=\"cellStyle\"\n >\n <slot />\n </td>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport { DS_TABLE_PIN, type DsTablePin } from '../DsTable/DsTable.types';\n\nconst props = defineProps({\n first: { type: Boolean, default: false },\n selected: { type: Boolean, default: false },\n width: { type: [String, Number] as PropType<string | number | null>, default: null },\n // Opt-in single-line ellipsis. Default off preserves the 72px multi-line cell.\n truncate: { type: Boolean, default: false },\n // Pin to the left/right edge (position: sticky) for horizontal scroll.\n pinned: { type: String as PropType<DsTablePin | null>, default: null },\n // Cumulative offset from the pinned edge when stacking multiple pins per side\n // (number → px, or any CSS length). Defaults to 0 (single pin per side).\n pinnedOffset: {\n type: [String, Number] as PropType<string | number | null>,\n default: null,\n },\n});\n\nconst toLength = (v: string | number) => (typeof v === 'number' ? `${v}px` : v);\n\nconst cellStyle = computed(() => {\n const style: Record<string, string> = {};\n if (props.width != null) style.width = toLength(props.width);\n if (props.pinned) {\n style.position = 'sticky';\n const offset = props.pinnedOffset == null ? '0px' : toLength(props.pinnedOffset);\n style[props.pinned === DS_TABLE_PIN.LEFT ? 'left' : 'right'] = offset;\n }\n return Object.keys(style).length ? style : undefined;\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n\n.ds-cell {\n height: 72px; // DS DsTable.jsx DsCell\n padding: s.spacing(1); // 8\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n overflow: hidden;\n\n border-bottom: 1px solid colors.$slate-tint;\n\n // First cell of a selected row draws the 3px accent left rail (DS).\n &.is-accent {\n border-left: 3px solid colors.$accent-main; // DS DsTable.jsx: 3px rail\n }\n\n // Opt-in truncation: reuses the existing `overflow: hidden`. Default (off)\n // keeps the multi-line behavior the 72px cell height implies.\n &.is-truncated {\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n // Pinned (sticky) cell. position/left/right come from the inline style; here we\n // own the opaque background (so scrolling cells never bleed through) and the\n // stacking order — below the compound sticky header (z-index 10), above normal\n // body cells. The row background (white / accent when selected) is mirrored so\n // the frozen column matches its row; row-hover is handled from DsRow via :deep,\n // and the scroll-toggled edge shadow is driven by DsTable (also via :deep).\n &.is-pinned {\n z-index: 5;\n background-color: colors.$white;\n\n &.is-selected {\n background-color: colors.$accent-bg;\n }\n }\n}\n</style>\n","// DsCustomTag — the DS \"CustomTag\": static status chip (non-interactive).\n// Types mirror the DS source (DsCustomTag.jsx TYPES). `danger` maps to the\n// `error-*` token family and `accent` maps to the `info-*` token family —\n// both are intentional DS naming quirks, kept as-is (do not rename the prop\n// values to match the token family names).\n\nexport const DS_CUSTOM_TAG_TYPES = {\n SUCCESS: 'success',\n WARNING: 'warning',\n DANGER: 'danger', // maps to $error-* tokens, not $danger-*\n INFO: 'info',\n DRAFT: 'draft', // the only solid-fill variant\n ACCENT: 'accent', // maps to $info-* tokens, not $accent-*\n} as const;\nexport type DsCustomTagType = (typeof DS_CUSTOM_TAG_TYPES)[keyof typeof DS_CUSTOM_TAG_TYPES];\n","<template>\n <span class=\"ds-custom-tag\" :class=\"[`ds-custom-tag--${type}`, { 'is-round': round }]\">\n <slot />\n </span>\n</template>\n\n<script setup lang=\"ts\">\nimport { type PropType } from 'vue';\nimport { DS_CUSTOM_TAG_TYPES, type DsCustomTagType } from './DsCustomTag.types';\n\ndefineProps({\n type: {\n type: String as PropType<DsCustomTagType>,\n default: DS_CUSTOM_TAG_TYPES.INFO,\n },\n // Fully rounded (radius-full) sides vs the default radius-control.\n round: Boolean,\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n\n.ds-custom-tag {\n display: inline-flex;\n align-items: center;\n\n padding: 3px s.spacing(1); // 3px = literal, DS DsCustomTag.jsx\n\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('caption');\n line-height: 18px; // literal, DS DsCustomTag.jsx\n\n border: 1px solid;\n border-radius: r.$radius-control;\n\n white-space: nowrap;\n\n &.is-round {\n border-radius: r.$radius-full;\n }\n\n /* ---------- Types (tint bg + shadow text, except `draft` = solid fill) ---------- */\n &--success {\n color: colors.$success-shadow;\n border-color: colors.$success-shadow;\n background-color: colors.$success-tint;\n }\n &--warning {\n color: colors.$warning-shadow;\n border-color: colors.$warning-shadow;\n background-color: colors.$warning-tint;\n }\n &--danger {\n // DS prop value is `danger`, wired to the `error-*` token family (kept as-is).\n color: colors.$error-shadow;\n border-color: colors.$error-shadow;\n background-color: colors.$error-tint;\n }\n &--info {\n color: colors.$slate-soft;\n border-color: colors.$slate-soft;\n background-color: colors.$slate-tint;\n }\n &--draft {\n // The only solid-fill variant: white text on a solid slate-soft fill.\n color: colors.$white;\n border-color: colors.$slate-soft;\n background-color: colors.$slate-soft;\n }\n &--accent {\n // DS prop value is `accent`, wired to the `info-*` token family (kept as-is).\n color: colors.$info-shadow;\n border-color: colors.$info-shadow;\n background-color: colors.$info-tint;\n }\n}\n</style>\n","// DsPill — the DS \"Pill\": small solid capsule with white text, an optional\n// trailing icon button, and a free-form background color (dynamic tag/folder\n// colors, e.g. a CRM tag or folder swatch). Source: DS DsPill.jsx.\n\nexport const DS_PILL_TONES = {\n DEFAULT: 'default', // solid grey capsule, white text, no border\n INFO: 'info', // bordered: info tint background, info shadow border and text\n ERROR: 'error', // bordered: error tint background, error shadow border and text\n} as const;\nexport type DsPillTone = (typeof DS_PILL_TONES)[keyof typeof DS_PILL_TONES];\n\nexport interface DsPillProps {\n /** Visual tone; `info` and `error` add a 1px border and a tinted background. */\n tone?: DsPillTone;\n /** Material Symbols ligature name; when set, renders a trailing icon button. */\n icon?: string;\n /**\n * Free-form CSS color (e.g. a dynamic tag/folder color chosen by the user);\n * when empty, falls back to the tone background. When set, it wins over it.\n */\n background?: string;\n /** Accessible name for the trailing icon button (icon-only control). */\n iconLabel?: string;\n}\n","<template>\n <span\n class=\"ds-pill\"\n :class=\"[`ds-pill--${tone}`, { 'ds-pill--has-icon': icon }]\"\n :style=\"background ? { background } : undefined\"\n >\n <span class=\"ds-pill__text\"><slot /></span>\n\n <button\n v-if=\"icon\"\n type=\"button\"\n class=\"ds-pill__icon\"\n :aria-label=\"iconLabel || undefined\"\n @click=\"emit(CLICK)\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">{{ icon }}</i>\n </button>\n </span>\n</template>\n\n<script setup lang=\"ts\">\nimport { type PropType } from 'vue';\nimport { CLICK } from '@shared/constants/events';\nimport { DS_PILL_TONES, type DsPillTone } from './DsPill.types';\n\ndefineProps({\n // `default` is the solid grey capsule; `info` / `error` are bordered and tinted.\n tone: {\n type: String as PropType<DsPillTone>,\n default: DS_PILL_TONES.DEFAULT,\n validator: (value: string) => Object.values<string>(DS_PILL_TONES).includes(value),\n },\n // Material Symbols ligature name; when set, renders a trailing icon button.\n icon: {\n type: String,\n default: '',\n },\n // Free-form CSS color (e.g. a dynamic tag/folder color); when empty, falls\n // back to the tone background. When set, it wins over the tone background.\n background: {\n type: String,\n default: '',\n },\n // Accessible name for the trailing icon button (icon-only control).\n iconLabel: {\n type: String,\n default: '',\n },\n});\n\nconst emit = defineEmits([CLICK]);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/icons.scss' as i;\n\n.ds-pill {\n display: inline-flex;\n align-items: center;\n\n box-sizing: border-box; // the tone border stays inside the 20px\n height: 20px; // DS DsPill.jsx\n padding: 0 s.spacing(1);\n\n color: colors.$white;\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('caption');\n\n border-radius: r.$radius-pill;\n\n background: colors.$slate-soft;\n\n user-select: none;\n\n // Long tag/folder names truncate instead of stretching the pill. `min-width: 0`\n // is the flexbox gotcha — without it a flex child won't shrink below its content\n // size, so the ellipsis never triggers inside the inline-flex pill. The consumer\n // bounds the pill's width (own wrapper/style); the pill just degrades gracefully.\n &__text {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n // The trailing icon button eats into the right inset (DS DsPill.jsx).\n &--has-icon {\n padding: 0 2px 0 s.spacing(1); // 2px: DS DsPill.jsx trailing icon inset\n gap: 2px; // DS DsPill.jsx\n }\n\n /* ---------- Tones (default: solid grey, no border) ---------- */\n &--info {\n color: colors.$info-shadow;\n background: colors.$info-tint;\n border: 1px solid colors.$info-shadow;\n }\n &--error {\n color: colors.$error-shadow;\n background: colors.$error-tint;\n border: 1px solid colors.$error-shadow;\n }\n\n &__icon {\n display: inline-flex;\n align-items: center;\n\n padding: 0;\n\n color: inherit;\n\n background: none;\n border: 0;\n\n cursor: pointer;\n\n .material-symbols-filled {\n font-size: i.icon-size(14);\n }\n }\n}\n</style>\n","<template>\n <button type=\"button\" class=\"ds-pill-with-border\" @click=\"emit(CLICK)\">\n <span v-if=\"$slots.icon\" class=\"ds-pill-with-border__icon\"><slot name=\"icon\" /></span>\n <span class=\"ds-pill-with-border__label\"><slot /></span>\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { CLICK } from '@shared/constants/events';\n\n// No props: content is slot-driven (see DsPillWithBorder.types.ts).\nconst emit = defineEmits([CLICK]);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n\n.ds-pill-with-border {\n display: inline-flex;\n align-items: center;\n gap: s.spacing(1); // 8\n\n // Let a consumer-supplied width cap actually bound the chip (the table cell\n // passes a max-width via attr fallthrough on this single root button).\n max-width: 100%;\n\n // Reset default <button> appearance so it reads as the DS chip, not a native button.\n margin: 0;\n appearance: none;\n -webkit-appearance: none;\n\n padding: 6px 12px 6px 8px; // 6px literal (DS); 12px = s.spacing(1.5); 8px = s.spacing(1)\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n background: colors.$white;\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-full; // DS used a literal 100px; radius-full (9999px) rounds identically on this height-less box\n outline: none;\n\n cursor: pointer;\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n &__icon {\n display: inline-flex;\n }\n\n // Single-line by contract: a width-constrained pill truncates instead of\n // wrapping and breaking the radius-full shape. `min-width: 0` lets the flex\n // item shrink below its content size so the ellipsis can trigger.\n &__label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n</style>\n","<!--\n Root layout note (kept out of the template body: a root-level comment would\n make the SFC multi-root and break attribute fall-through):\n - No legend (default): the track IS the root, byte-for-byte the original\n render. Opting into a legend is purely additive — it never touches this path.\n - Legend on: the same unchanged track wrapped with a color↔name key beneath it.\n Either way, `inheritAttrs` is off and `$attrs` is re-applied to the track, so\n consumer attrs always land on the `role=\"img\"` element, not the wrapper.\n Segments are keyed on `name + index` (not a stable id) on purpose: they are a\n static data-viz snapshot, not a reorderable list, so position is the identity.\n-->\n<template>\n <div\n v-if=\"!hasLegend\"\n v-bind=\"$attrs\"\n class=\"ds-segmented-progress-bar\"\n role=\"img\"\n :aria-label=\"label || undefined\"\n :style=\"{ height: `${height}px` }\"\n >\n <div\n v-for=\"(seg, idx) in segments\"\n :key=\"`${seg.name ?? ''}-${idx}`\"\n class=\"ds-segmented-progress-bar__segment\"\n :style=\"{\n width: `${total > 0 ? (seg.amount * 100) / total : 0}%`,\n backgroundColor: seg.color,\n }\"\n :title=\"seg.name || undefined\"\n />\n </div>\n\n <div v-else class=\"ds-segmented-progress-bar-wrapper\">\n <div\n v-bind=\"$attrs\"\n class=\"ds-segmented-progress-bar\"\n role=\"img\"\n :aria-label=\"label || undefined\"\n :style=\"{ height: `${height}px` }\"\n >\n <div\n v-for=\"(seg, idx) in segments\"\n :key=\"`${seg.name ?? ''}-${idx}`\"\n class=\"ds-segmented-progress-bar__segment\"\n :style=\"{\n width: `${total > 0 ? (seg.amount * 100) / total : 0}%`,\n backgroundColor: seg.color,\n }\"\n :title=\"seg.name || undefined\"\n />\n </div>\n\n <!--\n The auto legend is a VISUAL key: it maps each swatch's color to its name.\n That mapping duplicates what the track's `aria-label` summary already\n conveys, so it is `aria-hidden` — the label stays the single authoritative\n a11y summary and a screen reader never hears the segment names twice\n (which would be the \"confusing duplicate semantics\" this follow-up warns\n against). A custom `#legend` slot owns its own semantics and is NOT forced\n hidden — the consumer decides whether their content is decorative.\n -->\n <slot name=\"legend\">\n <ul class=\"ds-segmented-progress-bar__legend\" aria-hidden=\"true\">\n <li\n v-for=\"(seg, idx) in legendSegments\"\n :key=\"`${seg.name}-${idx}`\"\n class=\"ds-segmented-progress-bar__legend-item\"\n >\n <span\n class=\"ds-segmented-progress-bar__legend-swatch\"\n :style=\"{ backgroundColor: seg.color }\"\n />\n <span class=\"ds-segmented-progress-bar__legend-label\">{{ seg.name }}</span>\n </li>\n </ul>\n </slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, useSlots, type PropType } from 'vue';\nimport type { DsProgressSegment } from './DsSegmentedProgressBar.types';\n\n// Consumer attrs (class, style, id, data-*, listeners, extra aria) must land on\n// the `role=\"img\"` track — the semantic element — and land there consistently\n// whether or not the legend wrapper exists. So we opt out of automatic\n// inheritance and re-apply `$attrs` onto the track in both branches.\ndefineOptions({ inheritAttrs: false });\n\nconst props = defineProps({\n segments: {\n type: Array as PropType<DsProgressSegment[]>,\n default: () => [],\n },\n total: { type: Number, default: 100 },\n height: { type: Number, default: 8 },\n // Accessible name for the whole track — the DS source has zero ARIA on this\n // element, so role=\"img\" + this label are the only a11y surface. Left empty\n // by default: omitted from the DOM until the consumer supplies a meaningful\n // summary (e.g. \"55% verified, 25% risky, 20% invalid\").\n label: { type: String, default: '' },\n // Opt-in: render a legend (color swatch + name) summarising every segment\n // below the track. Off by default so the render stays identical. A `#legend`\n // slot also opts in and replaces the auto legend with custom content.\n showLegend: { type: Boolean, default: false },\n});\n\nconst slots = useSlots();\n\n// Only named segments belong in a color↔name key — a nameless swatch has no\n// mapping to show. Consumers needing full control use the `#legend` slot.\nconst legendSegments = computed(() => props.segments.filter((seg) => !!seg.name));\n\n// The legend region appears when a custom `#legend` slot opts in, or when\n// `showLegend` is on AND there is at least one named segment to key. Guarding on\n// the count means \"showLegend with nothing to show\" degrades to the plain track\n// (no empty list, no dangling wrapper gap) rather than rendering an empty key.\nconst hasLegend = computed(\n () => !!slots.legend || (props.showLegend && legendSegments.value.length > 0)\n);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n\n.ds-segmented-progress-bar {\n display: flex;\n width: 100%;\n overflow: hidden;\n\n background: colors.$slate-tint;\n border-radius: r.$radius-card; // DS --radius-md\n\n &__segment {\n height: 100%;\n }\n\n // Wrapper only exists when a legend is rendered; the track keeps full width.\n &-wrapper {\n display: flex;\n flex-direction: column;\n gap: s.spacing(1); // 8px between the track and its legend\n }\n\n &__legend {\n display: flex;\n flex-wrap: wrap;\n gap: s.spacing(0.5) s.spacing(2); // 4px row · 16px column\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n &__legend-item {\n display: inline-flex;\n align-items: center;\n gap: s.spacing(0.5); // 4px between swatch and label\n }\n\n &__legend-swatch {\n flex-shrink: 0;\n width: s.spacing(1.5); // 12px square, echoing the caption cap-height\n height: s.spacing(1.5);\n border-radius: r.$radius-control; // DS --radius-sm — mirrors the bar's language\n }\n\n &__legend-label {\n font-family: t.$font-family;\n font-size: t.font-size('caption'); // 12px\n font-weight: t.$weight-regular;\n line-height: t.$line-height-tight;\n color: colors.$slate-soft;\n }\n}\n</style>\n","<template>\n <div class=\"ds-empty-state\" :class=\"{ 'is-rounded': roundedBorder }\">\n <div v-if=\"$slots['table-header']\" class=\"ds-empty-state__header\">\n <slot name=\"table-header\" />\n </div>\n\n <div class=\"ds-empty-state__body\">\n <img v-if=\"image\" :src=\"image\" alt=\"\" class=\"ds-empty-state__image\" />\n <p class=\"ds-empty-state__title\">{{ title }}</p>\n <p v-if=\"subtitle\" class=\"ds-empty-state__subtitle\">{{ subtitle }}</p>\n <slot name=\"button\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\ndefineProps({\n // Illustration URL; decorative (rendered with alt=\"\").\n image: { type: String, default: '' },\n title: { type: String, default: '' },\n subtitle: { type: String, default: '' },\n // DS `radius-card-lg` corners instead of the default square edge.\n roundedBorder: { type: Boolean, default: false },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n\n.ds-empty-state {\n display: flex;\n flex-direction: column;\n gap: s.spacing(4); // 32\n\n padding: s.spacing(3); // 24\n\n border: 1px solid colors.$slate-tint;\n border-radius: 0;\n\n &.is-rounded {\n border-radius: r.$radius-card-lg;\n }\n\n &__body {\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n gap: s.spacing(1);\n }\n\n &__image {\n max-height: 200px; // DS literal\n max-width: 100%;\n }\n\n &__title {\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('h1');\n color: colors.$slate-main;\n margin: 0;\n }\n\n &__subtitle {\n font-family: t.$font-family;\n font-size: t.font-size('body');\n line-height: t.$line-height-body;\n // NOTE: subtitle is NOT muted — DS uses primary-main, do not use slate-soft.\n color: colors.$slate-main;\n white-space: pre-line;\n margin: 0;\n\n // Cap the measure so long subtitles don't stretch edge-to-edge. `ch` is\n // relative to the font (not a hardcoded px), giving ~optimal reading width;\n // margin-inline: auto keeps it centered under the (centered) title.\n max-width: 46ch;\n margin-inline: auto;\n }\n}\n</style>\n","<template>\n <nav class=\"ds-paginator\" :aria-label=\"paginationLabel || undefined\">\n <span v-if=\"limitMessage\" class=\"ds-paginator__limit-message\">{{ limitMessage }}</span>\n\n <div class=\"ds-paginator__pager\">\n <DsButton\n variant=\"tertiary\"\n circle\n size=\"medium\"\n left-icon=\"chevron_left\"\n :aria-label=\"prevLabel || undefined\"\n :disabled=\"currentPage <= 1\"\n @click=\"goTo(currentPage - 1)\"\n />\n\n <template v-for=\"item in pages\" :key=\"item\">\n <!-- Sentinel entries ('…l' / '…r') are the only string items in `pages`;\n every real page is a number, so a typeof check both matches the DS\n ellipsis condition and lets vue-tsc narrow `item` to number below. -->\n <span v-if=\"typeof item === 'string'\" class=\"ds-paginator__ellipsis\" aria-hidden=\"true\"\n >…</span\n >\n <button\n v-else\n type=\"button\"\n class=\"ds-paginator__page\"\n :class=\"{ 'is-active': item === currentPage }\"\n :aria-current=\"item === currentPage ? 'page' : undefined\"\n @click=\"goTo(item)\"\n >\n {{ item }}\n </button>\n </template>\n\n <DsButton\n variant=\"tertiary\"\n circle\n size=\"medium\"\n left-icon=\"chevron_right\"\n :aria-label=\"nextLabel || undefined\"\n :disabled=\"currentPage >= pageCount\"\n @click=\"goTo(currentPage + 1)\"\n />\n </div>\n\n <select\n class=\"ds-paginator__page-size\"\n :aria-label=\"pageSizeLabel || undefined\"\n :value=\"pageSize\"\n @change=\"onSizeChange\"\n >\n <option v-for=\"s in pageSizes\" :key=\"s\" :value=\"s\">{{ s }}{{ pageSizeSuffix }}</option>\n </select>\n </nav>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport { DsButton } from '@shared/ui/DsButton';\nimport { PAGE_CHANGE, PAGE_SIZE_CHANGE } from '@shared/constants/events';\n\n// Left/right ellipsis sentinels for the page window (see `pages` below). Typed\n// as literals (`as const`) so `pages` is `(number | '…l' | '…r')[]`, not `string[]`.\nconst ELLIPSIS_LEFT = '…l' as const;\nconst ELLIPSIS_RIGHT = '…r' as const;\n\nconst props = defineProps({\n total: { type: Number, required: true },\n pageSize: { type: Number, default: 25 },\n currentPage: { type: Number, default: 1 },\n pageSizes: { type: Array as PropType<number[]>, default: () => [10, 25, 50, 100] },\n limitMessage: { type: String, default: '' },\n // Appended to each page-size option label (e.g. consumer passes \"/page\").\n pageSizeSuffix: { type: String, default: '' },\n // aria-labels for the icon-only chevron buttons — DS has none; empty unless\n // the consumer supplies one (see the a11y note on `.types.ts`).\n prevLabel: { type: String, default: '' },\n nextLabel: { type: String, default: '' },\n paginationLabel: { type: String, default: '' },\n pageSizeLabel: { type: String, default: '' },\n});\n\n// Runtime array (not the type-only form) — see DsButton's CLICK for the same\n// rationale: the SFC compiler can't resolve `typeof PAGE_CHANGE` to a literal,\n// so declaring these at runtime is what keeps them out of attrs fallthrough.\nconst emit = defineEmits([PAGE_CHANGE, PAGE_SIZE_CHANGE]);\n\nconst pageCount = computed(() => Math.max(1, Math.ceil(props.total / props.pageSize)));\n\n// Page-window algorithm (DS pagination pattern), replicated exactly:\n// ≤7 pages → show them all. Otherwise: always 1; a left ellipsis once\n// currentPage > 4; the pages currentPage-2..currentPage+2 (clamped to\n// [2, pageCount-1]); a right ellipsis while currentPage < pageCount-3;\n// always pageCount.\nconst pages = computed<(number | typeof ELLIPSIS_LEFT | typeof ELLIPSIS_RIGHT)[]>(() => {\n const count = pageCount.value;\n\n if (count <= 7) {\n return Array.from({ length: count }, (_, index) => index + 1);\n }\n\n const current = props.currentPage;\n const items: (number | typeof ELLIPSIS_LEFT | typeof ELLIPSIS_RIGHT)[] = [1];\n\n if (current > 4) items.push(ELLIPSIS_LEFT);\n\n const start = Math.max(2, current - 2);\n const end = Math.min(count - 1, current + 2);\n for (let page = start; page <= end; page++) {\n items.push(page);\n }\n\n if (current < count - 3) items.push(ELLIPSIS_RIGHT);\n\n items.push(count);\n\n return items;\n});\n\nfunction goTo(page: number) {\n if (page < 1 || page > pageCount.value) return;\n emit(PAGE_CHANGE, page);\n}\n\nfunction onSizeChange(event: Event) {\n // `HTMLSelectElement` isn't in this repo's eslint `no-undef` globals allowlist\n // (only `HTMLElement`/`HTMLInputElement` are — see eslint.config.mjs); narrow\n // via an inline `.value` shape instead of adding a new global for one cast.\n const target = event.target as HTMLElement & { value: string };\n emit(PAGE_SIZE_CHANGE, Number(target.value));\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n\n.ds-paginator {\n position: relative;\n display: flex;\n align-items: center;\n gap: s.spacing(2);\n\n font-family: t.$font-family;\n\n &__limit-message {\n color: colors.$slate-soft;\n font-size: t.font-size('body');\n }\n\n &__pager {\n display: flex;\n align-items: center;\n gap: 2px; // DS literal, sub-scale\n }\n\n &__page {\n min-width: s.control-height('medium'); // 32×32\n height: s.control-height('medium'); // 32×32\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n padding: 0;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n background: none;\n border: 0;\n border-radius: r.$radius-control;\n\n cursor: pointer;\n\n &:hover {\n color: colors.$accent-main;\n }\n\n &.is-active {\n color: colors.$accent-main;\n font-weight: t.$weight-bold;\n }\n }\n\n &__ellipsis {\n min-width: s.control-height('medium');\n text-align: center;\n color: colors.$slate-main;\n }\n\n &__page-size {\n height: s.control-height('medium');\n padding: 0 s.spacing(1);\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-control;\n }\n}\n</style>\n","<template>\n <button\n type=\"button\"\n class=\"ds-menu-item\"\n :class=\"{ 'is-active': active, 'is-collapsed': collapsed }\"\n :aria-current=\"active ? 'page' : undefined\"\n :title=\"text || undefined\"\n @click=\"handleClick\"\n >\n <i class=\"ds-menu-item__icon material-symbols-filled\" aria-hidden=\"true\">{{ icon }}</i>\n <span v-if=\"text || $slots.default\" class=\"ds-menu-item__label\">\n <slot>{{ text }}</slot>\n </span>\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { SELECT } from '@shared/constants/events';\n\ndefineProps({\n // Material Symbols ligature name (rendered via <i class=\"material-symbols-filled\">).\n icon: { type: String, required: true },\n // Row label; a default slot overrides it. Hidden (not removed) when collapsed.\n text: { type: String, default: '' },\n // Current row: white surface + tint border, aria-current=\"page\".\n active: Boolean,\n // Icon-only collapsed rail.\n collapsed: Boolean,\n});\n\n// The DS ships this as a <div onClick> with no keyboard/ARIA. We render a real\n// <button> (keyboard-reachable, focus ring) and emit the semantic SELECT — the\n// native @click still falls through for consumers that prefer it.\nconst emit = defineEmits([SELECT]);\n\nfunction handleClick(event: MouseEvent) {\n emit(SELECT, event);\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/icons.scss' as i;\n\n.ds-menu-item {\n display: flex;\n align-items: center;\n gap: s.spacing(1);\n width: 100%;\n min-height: 36px;\n padding: s.spacing(1);\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n line-height: 20px;\n text-align: left;\n\n border: 1px solid transparent;\n border-radius: r.$radius-control;\n background-color: transparent;\n\n cursor: pointer;\n user-select: none;\n\n transition:\n background-color m.$duration-default m.$easing,\n border-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n // active always wins over hover (DS: active bg stays white on hover).\n &:hover:not(.is-active) {\n background-color: colors.$slate-tint;\n }\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n &.is-active {\n border-color: colors.$slate-tint;\n background-color: colors.$white;\n }\n\n &__icon {\n flex: none;\n font-size: i.icon-size(20);\n line-height: 1;\n }\n\n &__label {\n overflow: hidden;\n max-width: 110px;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n // Collapsed rail: keep the label in the DOM for assistive tech, hide visually.\n &.is-collapsed .ds-menu-item__label {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n white-space: nowrap;\n }\n}\n</style>\n","// DsWizardStepper — numbered multi-step flow (step chips + next/final button).\n// 1:1 with the DS \"WizardStepper\" (components/navigation/DsWizardStepper.jsx).\n\nexport interface DsWizardStep {\n // Stable key for v-for; falls back to the 1-based index.\n key?: string | number;\n // Visible step label (consumer-owned text — the library never hardcodes copy).\n label: string;\n // Force the \"completed\" look regardless of position.\n completed?: boolean;\n // Visited but left unfinished → the red \"!\" chip.\n visited?: boolean;\n}\n\n// Derived per-step visual state (class: ds-wizard-step--<state>).\nexport const DS_WIZARD_STEP_STATES = {\n ACTIVE: 'active', // current step — accent-tint chip, filled marker\n COMPLETED: 'completed', // done — filled accent marker\n INCOMPLETE: 'incomplete', // visited but unfinished — red \"!\" chip\n NEUTRAL: 'neutral', // upcoming — outlined marker\n} as const;\nexport type DsWizardStepState = (typeof DS_WIZARD_STEP_STATES)[keyof typeof DS_WIZARD_STEP_STATES];\n","<template>\n <div class=\"ds-wizard-stepper\">\n <ol class=\"ds-wizard-stepper__steps\">\n <li v-for=\"step in resolvedSteps\" :key=\"step.key\" class=\"ds-wizard-stepper__item\">\n <component\n :is=\"clickable ? 'button' : 'div'\"\n :type=\"clickable ? 'button' : undefined\"\n class=\"ds-wizard-step\"\n :class=\"[`ds-wizard-step--${step.state}`, { 'is-clickable': clickable }]\"\n :aria-current=\"step.current ? 'step' : undefined\"\n @click=\"selectStep(step.index)\"\n >\n <span class=\"ds-wizard-step__marker\" aria-hidden=\"true\">{{ step.marker }}</span>\n <span class=\"ds-wizard-step__label\">{{ step.label }}</span>\n </component>\n </li>\n </ol>\n\n <!-- Acción: reusa DsButton (primary/large). Cada botón se gatea por su label:\n sin copy no hay CTA (evita un botón visible sin texto). Dos v-if\n independientes y mutuamente excluyentes (isLast) — no un v-else-if, que\n mostraría el botón final en un paso no-final cuando falta nextLabel. -->\n <DsButton\n v-if=\"!isLast && nextLabel\"\n variant=\"primary\"\n size=\"large\"\n right-icon=\"keyboard_arrow_right\"\n @click=\"next\"\n >\n {{ nextLabel }}\n </DsButton>\n <DsButton v-if=\"isLast && finalStepLabel\" variant=\"primary\" size=\"large\" @click=\"finish\">\n {{ finalStepLabel }}\n </DsButton>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport { DsButton } from '@shared/ui/DsButton';\nimport { STEP, FINAL_STEP } from '@shared/constants/events';\nimport {\n DS_WIZARD_STEP_STATES,\n type DsWizardStep,\n type DsWizardStepState,\n} from './DsWizardStepper.types';\n\nconst props = defineProps({\n steps: { type: Array as PropType<DsWizardStep[]>, default: () => [] },\n // Current step (1-based).\n value: { type: Number, default: 1 },\n // Button labels — consumer-owned copy (no hardcoded text in the library).\n nextLabel: { type: String, default: '' },\n finalStepLabel: { type: String, default: '' },\n // Whether the step chips are interactive (advance buttons are always active).\n clickable: { type: Boolean, default: true },\n});\n\nconst emit = defineEmits([STEP, FINAL_STEP]);\n\nconst isLast = computed(() => props.value === props.steps.length);\n\nconst resolvedSteps = computed(() =>\n props.steps.map((step, i) => {\n const index = i + 1;\n // La precedencia importa: un `visited` explícito (paso dejado sin terminar)\n // tiene que ganarle al default posicional de \"ya pasó\". Si no, un paso\n // visited DETRÁS del actual (index < value) se resolvería como completed y\n // nunca mostraría el \"!\" rojo. Orden: completed explícito → INCOMPLETE\n // (visited) → default posicional.\n let state: DsWizardStepState;\n if (index === props.value) state = DS_WIZARD_STEP_STATES.ACTIVE;\n else if (step.completed) state = DS_WIZARD_STEP_STATES.COMPLETED;\n else if (step.visited) state = DS_WIZARD_STEP_STATES.INCOMPLETE;\n else if (index < props.value) state = DS_WIZARD_STEP_STATES.COMPLETED;\n else state = DS_WIZARD_STEP_STATES.NEUTRAL;\n return {\n key: step.key ?? index,\n index,\n label: step.label,\n state,\n current: state === DS_WIZARD_STEP_STATES.ACTIVE,\n marker: state === DS_WIZARD_STEP_STATES.INCOMPLETE ? '!' : String(index),\n };\n })\n);\n\n// Chip clicks are gated by `clickable`; the advance/final buttons never are.\nfunction selectStep(index: number) {\n if (!props.clickable) return;\n emit(STEP, index);\n}\n\n// Clamp: never emit a step past the last one. In normal use the button is\n// hidden on the last step, but guard against a desynced value > steps.length.\nfunction next() {\n if (props.value < props.steps.length) emit(STEP, props.value + 1);\n}\n\nfunction finish() {\n emit(FINAL_STEP);\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-wizard-stepper {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: s.spacing(2);\n\n &__steps {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: s.spacing(2);\n }\n\n &__item {\n display: flex;\n }\n}\n\n.ds-wizard-step {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: s.spacing(1);\n\n height: s.control-height('large');\n padding: s.spacing(1) s.spacing(1.5);\n\n color: colors.$accent-main;\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('body');\n white-space: nowrap;\n\n border: none;\n border-radius: r.$radius-control;\n background-color: transparent;\n\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &__marker {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: none;\n\n width: 20px;\n height: 20px;\n\n color: colors.$accent-main;\n font-size: t.font-size('caption');\n font-weight: t.$weight-bold;\n line-height: 1;\n\n border: 2px solid colors.$accent-main;\n border-radius: r.$radius-full;\n background-color: transparent;\n }\n\n &__label {\n line-height: 1;\n }\n\n /* ---- States (DS WizardStep) ---- */\n &--active {\n background-color: colors.$accent-tint;\n }\n &--active .ds-wizard-step__marker,\n &--completed .ds-wizard-step__marker {\n color: colors.$white;\n border: none;\n background-color: colors.$accent-main;\n }\n &--incomplete {\n color: colors.$error-main;\n }\n &--incomplete .ds-wizard-step__marker {\n color: colors.$error-main;\n border-color: colors.$error-main;\n }\n\n /* ---- Interactive affordance: hover + focus only when clickable ---- */\n &.is-clickable {\n cursor: pointer;\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n &.ds-wizard-step--neutral:hover,\n &.ds-wizard-step--completed:hover {\n background-color: colors.$accent-bg;\n }\n &.ds-wizard-step--incomplete:hover {\n background-color: colors.$error-mid;\n }\n // active keeps its accent-tint on hover (no override) — mirrors the DS.\n }\n}\n</style>\n","// DsDrawer — side panel over a backdrop, built NATIVE (no element-plus).\n// SALESQL-3968: the Vue 2 twin (@salesql/sql_components, for `front` and\n// `extension-lite`) must be able to replicate this API and markup 1:1, and\n// Element Plus is Vue 3 only — so wrapping `el-drawer` was ruled out.\n//\n// What the native build has to carry on its own (all of it lived in el-drawer):\n// overlay + teleport to body, Escape, body scroll lock, enter/leave transition,\n// focus trap + focus restoration, cancelable before-close, and the resize\n// dragger clamped DURING the drag (Element Plus only clamped to the viewport,\n// which is why frontend-app had to express the bounds in CSS).\n//\n// The component clamps and emits; persisting the width belongs to the consumer.\n\n/** Side the panel opens from. `rtl` = anchored right (the full-profile default). */\nexport const DS_DRAWER_DIRECTIONS = {\n /** Right-to-left: panel pinned to the right edge, ring on its left border. */\n RTL: 'rtl',\n /** Left-to-right: panel pinned to the left edge, ring on its right border. */\n LTR: 'ltr',\n} as const;\nexport type DsDrawerDirection = (typeof DS_DRAWER_DIRECTIONS)[keyof typeof DS_DRAWER_DIRECTIONS];\n\n/**\n * Cancelable close guard. Return `false` (or a promise resolving to `false`) to\n * keep the drawer open; anything else lets the `close` event through. It gates\n * every close path: Escape, overlay click and the header × button.\n */\nexport type DsDrawerBeforeClose = () => boolean | void | Promise<boolean | void>;\n\nexport interface DsDrawerProps {\n open?: boolean;\n title?: string;\n showClose?: boolean;\n closeLabel?: string;\n direction?: DsDrawerDirection;\n /** Panel width in px. Default 440 — the frozen contract's value (SALESQL-3548). */\n width?: number;\n /** Enable the edge dragger. */\n resizable?: boolean;\n /** Lower bound for the drag, in px. Enforced DURING the drag. */\n minWidth?: number;\n /** Upper bound for the drag, in px. Enforced DURING the drag. */\n maxWidth?: number;\n closeOnOverlay?: boolean;\n closeOnEscape?: boolean;\n beforeClose?: DsDrawerBeforeClose | null;\n /** false = render in-flow (no portal / backdrop / scroll-lock) for specimen cards. */\n fixed?: boolean;\n}\n","<template>\n <Teleport to=\"body\" :disabled=\"!fixed\">\n <Transition :name=\"`ds-drawer-${direction}`\">\n <div\n v-if=\"open\"\n class=\"ds-drawer\"\n :class=\"[`ds-drawer--${direction}`, { 'is-fixed': fixed, 'is-resizing': resizing }]\"\n @click.self=\"onOverlay\"\n >\n <aside\n ref=\"panelRef\"\n class=\"ds-drawer__panel\"\n role=\"dialog\"\n :aria-modal=\"fixed ? 'true' : 'false'\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"labelledBy ? undefined : 'drawer'\"\n tabindex=\"-1\"\n :style=\"panelStyle\"\n >\n <!-- Dragger first in the DOM so it paints on the opening edge without a\n stacking hack; it is aria-hidden because resizing is pointer-only\n affordance, not a control a screen reader should land on. -->\n <div\n v-if=\"resizable\"\n class=\"ds-drawer__dragger\"\n aria-hidden=\"true\"\n @pointerdown.stop.prevent=\"onDragStart\"\n />\n\n <header\n v-if=\"title || showClose || $slots.header || $slots.actions\"\n class=\"ds-drawer__header\"\n >\n <slot name=\"header\">\n <h4 :id=\"titleId\" class=\"ds-drawer__title\">{{ title }}</h4>\n </slot>\n\n <!-- Trailing control cluster: consumer actions (share, open-in-new…) sit to\n the LEFT of the close, in a softer grey — per the DS drawer header. -->\n <div v-if=\"showClose || $slots.actions\" class=\"ds-drawer__controls\">\n <div v-if=\"$slots.actions\" class=\"ds-drawer__actions\"><slot name=\"actions\" /></div>\n\n <button\n v-if=\"showClose\"\n type=\"button\"\n class=\"ds-drawer__close\"\n :aria-label=\"closeLabel || undefined\"\n @click=\"requestClose\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">close</i>\n </button>\n </div>\n </header>\n\n <div class=\"ds-drawer__body\"><slot /></div>\n\n <footer v-if=\"$slots.footer\" class=\"ds-drawer__footer\"><slot name=\"footer\" /></footer>\n </aside>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n ref,\n useId,\n useSlots,\n watch,\n type PropType,\n} from 'vue';\nimport { CLOSE, RESIZE, RESIZE_END, RESIZE_START } from '@shared/constants/events';\nimport {\n DS_DRAWER_DIRECTIONS,\n type DsDrawerBeforeClose,\n type DsDrawerDirection,\n} from './DsDrawer.types';\n\nconst props = defineProps({\n open: Boolean,\n title: { type: String, default: '' },\n showClose: { type: Boolean, default: true },\n // Accessible name for the icon-only close button; English default (app owns i18n),\n // matching DsModal so the control is never unnamed.\n closeLabel: { type: String, default: 'Close' },\n direction: {\n type: String as PropType<DsDrawerDirection>,\n default: DS_DRAWER_DIRECTIONS.RTL,\n },\n // Width in px (a number, not a CSS length): the drag math and the min/max bounds\n // are numeric, and the consumer's stored width is a number too.\n width: { type: Number, default: 440 },\n resizable: Boolean,\n minWidth: { type: Number, default: 360 },\n maxWidth: { type: Number, default: 720 },\n closeOnOverlay: { type: Boolean, default: true },\n closeOnEscape: { type: Boolean, default: true },\n // Cancelable close guard: return false to keep the drawer open. Gates Escape,\n // the overlay click and the × button alike.\n beforeClose: { type: Function as PropType<DsDrawerBeforeClose>, default: null },\n // false = render in-flow (no portal / backdrop / scroll-lock) for specimen cards.\n fixed: { type: Boolean, default: true },\n});\n\nconst emit = defineEmits([CLOSE, RESIZE_START, RESIZE, RESIZE_END]);\n\nconst panelRef = ref<HTMLElement | null>(null);\nlet lastFocused: HTMLElement | null = null;\n\n// SSR-safe id so the dialog is labelled by its visible title instead of duplicating it.\n// A custom #header slot replaces that title element, so the id no longer resolves —\n// fall back to the generic aria-label rather than pointing at a missing node.\nconst slots = useSlots();\nconst titleId = useId();\nconst labelledBy = computed(() => (props.title && !slots.header ? titleId : undefined));\n\nconst clamp = (value: number) =>\n Math.min(Math.max(value, props.minWidth), Math.max(props.minWidth, props.maxWidth));\n\n// Live width while dragging. Seeded from the prop and re-seeded whenever the consumer\n// pushes a new one, so a consumer that does NOT write the emitted width back still gets\n// a working drag (and one that does stays in sync).\nconst currentWidth = ref(clamp(props.width));\nwatch(\n () => [props.width, props.minWidth, props.maxWidth] as const,\n () => {\n if (!resizing.value) currentWidth.value = clamp(props.width);\n }\n);\n\nconst panelStyle = computed(() => ({ width: `${currentWidth.value}px` }));\n\n// -- Close -------------------------------------------------------------------\n// Every close path funnels through here so `beforeClose` can veto all of them.\n// Async-aware: a promise resolving to false cancels too.\nasync function requestClose() {\n if (props.beforeClose) {\n const verdict = await props.beforeClose();\n if (verdict === false) return;\n }\n emit(CLOSE);\n}\n\n// A resize drag that is released outside the panel makes the browser fire a `click`\n// on the nearest common ancestor of the pointerdown and pointerup targets — which is the\n// overlay. Without this guard, dragging past a bound (the pointer necessarily ends up\n// over the overlay) would CLOSE the drawer. jsdom never synthesises that click, so it\n// only shows up in a real browser.\nlet swallowOverlayClick = false;\n\nfunction onOverlay() {\n if (swallowOverlayClick) {\n swallowOverlayClick = false;\n return;\n }\n if (props.fixed && props.closeOnOverlay) void requestClose();\n}\n\n// -- Resize ------------------------------------------------------------------\n// Pointer events, so the dragger works with a mouse, a pen AND touch — `el-drawer` was\n// mouse-only, which made the panel un-resizable on a touch screen. `touch-action: none`\n// on the dragger (see the style block) is what stops the browser turning the drag into a\n// scroll gesture before the handler ever sees it.\nconst resizing = ref(false);\nlet startX = 0;\nlet startWidth = 0;\n\nfunction widthFromEvent(e: PointerEvent) {\n const delta = e.clientX - startX;\n // Panel pinned right (rtl): dragging LEFT (negative delta) makes it wider.\n const raw =\n props.direction === DS_DRAWER_DIRECTIONS.RTL ? startWidth - delta : startWidth + delta;\n // Clamped HERE, on every move — not on release. Pushing past a bound simply pins\n // the panel to it, and it comes back on its own as soon as the pointer returns.\n return clamp(raw);\n}\n\nfunction onDragStart(e: PointerEvent) {\n if (!props.resizable) return;\n resizing.value = true;\n startX = e.clientX;\n startWidth = currentWidth.value;\n document.addEventListener('pointermove', onDragMove);\n document.addEventListener('pointerup', onDragEnd);\n // A cancelled pointer (the OS takes over, the finger leaves the digitiser) fires no\n // pointerup, so without this the drag would stay armed for ever.\n document.addEventListener('pointercancel', onDragEnd);\n emit(RESIZE_START, currentWidth.value);\n}\n\nfunction onDragMove(e: PointerEvent) {\n if (!resizing.value) return;\n currentWidth.value = widthFromEvent(e);\n emit(RESIZE, currentWidth.value);\n}\n\nfunction onDragEnd() {\n if (!resizing.value) return;\n stopDragListening();\n resizing.value = false;\n // Arm the guard for the click this pointerup is about to produce, and disarm it on the\n // next task — a drag released INSIDE the panel produces no overlay click, and the flag\n // must not survive to swallow the user's next genuine overlay click.\n swallowOverlayClick = true;\n setTimeout(() => (swallowOverlayClick = false), 0);\n emit(RESIZE_END, currentWidth.value);\n}\n\nfunction stopDragListening() {\n document.removeEventListener('pointermove', onDragMove);\n document.removeEventListener('pointerup', onDragEnd);\n document.removeEventListener('pointercancel', onDragEnd);\n}\n\n// -- Focus trap / scroll lock / Escape ---------------------------------------\nfunction focusables(): HTMLElement[] {\n if (!panelRef.value) return [];\n const sel =\n 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n // Filtered on ATTRIBUTES, not on `offsetParent`. offsetParent is null for a\n // position:fixed element and for anything jsdom renders, so an offsetParent\n // filter silently empties this list — which collapses the trap into its\n // \"nothing focusable\" branch and makes the whole thing unverifiable. The trap\n // is the accessibility guarantee this component exists to keep (SALESQL-3968),\n // so it is filtered in a way that is both correct in a browser and testable.\n return Array.from(panelRef.value.querySelectorAll<HTMLElement>(sel)).filter(\n (el) => !el.closest('[hidden]') && el.getAttribute('aria-hidden') !== 'true'\n );\n}\n\nfunction onKeydown(e: KeyboardEvent) {\n if (e.key === 'Escape') {\n if (props.closeOnEscape) void requestClose();\n return;\n }\n if (e.key !== 'Tab') return;\n const f = focusables();\n // Nothing focusable inside: keep focus parked on the panel rather than letting Tab\n // escape to the page behind the overlay.\n if (f.length === 0) {\n e.preventDefault();\n panelRef.value?.focus();\n return;\n }\n const first = f[0];\n const last = f[f.length - 1];\n if (e.shiftKey && document.activeElement === first) {\n e.preventDefault();\n last.focus();\n } else if (!e.shiftKey && document.activeElement === last) {\n e.preventDefault();\n first.focus();\n }\n}\n\n// Portal effects apply only while the drawer is open AND fixed. Watching the combined\n// condition means flipping EITHER off tears them down — no dangling listener, no body\n// left scroll-locked, no orphan overlay after opening twice.\nfunction activate() {\n lastFocused = document.activeElement as HTMLElement;\n document.addEventListener('keydown', onKeydown);\n document.body.style.overflow = 'hidden';\n nextTick(() => (focusables()[0] ?? panelRef.value)?.focus());\n}\n\nfunction deactivate(restoreFocus = true) {\n document.removeEventListener('keydown', onKeydown);\n document.body.style.overflow = '';\n if (restoreFocus) lastFocused?.focus?.();\n}\n\nwatch(\n () => props.open && props.fixed,\n (active, wasActive) => {\n if (typeof document === 'undefined') return;\n if (active) activate();\n else if (wasActive) deactivate();\n },\n { immediate: true }\n);\n\nonBeforeUnmount(() => {\n if (typeof document === 'undefined') return;\n stopDragListening();\n deactivate(false);\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/radius.scss' as r;\n\n.ds-drawer {\n // In-flow (fixed=false): the wrapper collapses so the panel joins the parent flow.\n display: contents;\n\n // Portal (fixed=true): full-screen backdrop with the panel pinned to one edge.\n &.is-fixed {\n position: fixed;\n inset: 0;\n z-index: 2001; // same layer as DsModal\n\n display: flex;\n\n background: colors.$backdrop; // grey-10 @ 50%, no blur\n }\n\n &--rtl.is-fixed {\n justify-content: flex-end;\n }\n &--ltr.is-fixed {\n justify-content: flex-start;\n }\n\n // While dragging, kill text selection and pointer hit-testing inside the panel so\n // the drag never turns into a text selection or a stray hover.\n &.is-resizing {\n user-select: none;\n cursor: col-resize;\n }\n\n &__panel {\n position: relative;\n\n display: flex;\n flex-direction: column;\n\n max-width: 100%;\n height: 100%;\n\n // The PANEL is the grey surface (DS: `background: C.bg`), and the chrome bars paint\n // white on top of it. The body paints nothing at all, so it simply shows this\n // through — which is why the drawer needs no inner wrapper and no background prop:\n // the DS answers it structurally, and a colour prop would be a style escape hatch\n // the DS never defines.\n background: colors.$slate-bg;\n\n outline: none;\n }\n\n // The 1px grey ring on the OPENING edge. Grey, never the accent — Element Plus\n // painted this chrome with --el-color-primary and that is the bug inherited fixed.\n &--rtl &__panel {\n border-left: 1px solid colors.$slate-tint;\n }\n &--ltr &__panel {\n border-right: 1px solid colors.$slate-tint;\n }\n\n // -- Dragger ---------------------------------------------------------------\n // A wide invisible hit area with a 1px visual rule revealed on hover, so the grab\n // target is comfortable without a permanent 8px stripe in the chrome.\n &__dragger {\n position: absolute;\n top: 0;\n z-index: 1;\n\n width: s.spacing(1);\n height: 100%;\n\n cursor: col-resize;\n // Without this the browser claims the touch gesture as a scroll/pan and fires\n // `pointercancel` before the drag can start — the handler would never see a move.\n touch-action: none;\n\n &::before {\n position: absolute;\n top: 0;\n left: 50%;\n\n width: 1px;\n height: 100%;\n\n background-color: transparent;\n\n transition: background-color m.$duration-default m.$easing;\n\n content: '';\n\n @include m.reduce-motion {\n transition: none;\n }\n }\n\n // Grey on hover AND while dragging. No accent in any state.\n &:hover::before {\n background-color: colors.$slate-mid;\n }\n }\n\n &--rtl &__dragger {\n left: 0;\n }\n &--ltr &__dragger {\n right: 0;\n }\n\n &.is-resizing &__dragger::before {\n background-color: colors.$slate-mid;\n }\n\n // -- Chrome ----------------------------------------------------------------\n // Header per the DS drawer (Full Profile): 48px tall, title LEFT-aligned at body size\n // and bold, truncating with an ellipsis, with the control cluster at the trailing edge.\n //\n // This deliberately does NOT match frontend-app's `el-drawer.scss` override, which had\n // drifted from the DS on five counts (50px, centred, 16px, 24px inset, $slate-shadow).\n // DESIGN-SYSTEM.md makes the DS the only style authority and forbids taking values from\n // a consuming app — so the override loses. The full profile will therefore look\n // different once SALESQL-3536 adopts this; that is the intended outcome, not a\n // regression.\n //\n // Residual deltas, reconciled onto the 8px grid rather than copied off-grid: the DS's\n // `0 14px 0 16px` inset becomes a symmetric 16px, and its 10px gap becomes 12px.\n &__header {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: s.spacing(1.5);\n\n height: s.control-height('xlarge'); // DS: 48\n padding: 0 s.spacing(2);\n\n color: colors.$slate-main; // DS: C.slate #414C58\n font-family: t.$font-family;\n font-size: t.font-size('body'); // DS: 14\n font-weight: t.$weight-bold; // DS: 700\n\n background: colors.$white; // painted ON the grey panel (DS: `background: C.white`)\n border-bottom: 1px solid colors.$slate-tint;\n }\n\n &__title {\n // Takes the free space so the controls land at the trailing edge; `min-width: 0` is\n // what actually lets a long name ellipsis instead of pushing them out of the header.\n flex: 1;\n min-width: 0;\n margin: 0;\n\n overflow: hidden;\n\n font: inherit;\n white-space: nowrap;\n text-overflow: ellipsis;\n cursor: default;\n }\n\n // Trailing cluster. In flow (not absolute): the title takes the free space, so the\n // controls sit at the end on their own and any number of actions fits.\n &__controls {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: s.spacing(1.5); // DS header gap: 10 reconciles to the 12px grid step\n }\n\n // Consumer actions (share, open-in-new…). Softer than the close on purpose — the DS\n // draws them in the secondary-text grey while the close stays body-text slate.\n // Note: the DS bundle still carries #888f97 for that grey; the library deliberately\n // moved to the WCAG-AA value in SALESQL-3394, so the TOKEN wins over the export.\n &__actions {\n display: flex;\n align-items: center;\n gap: s.spacing(1.5);\n\n // `color` reaches the slotted icons on its own (it inherits); `font-size` does not —\n // a scoped descendant selector never matches slot content, so the glyph size needs\n // :deep() or it silently falls back to whatever the Material Symbols font sets.\n color: colors.$slate-soft;\n\n :deep(.material-symbols-filled) {\n font-size: i.icon-size(18); // DS: open_in_new at 18, one step under the close\n }\n }\n\n // A bare icon, NOT a filled/circle button: the DS header draws the close as a plain\n // glyph with `cursor: pointer` and no hover surface. It stays a real <button> (never\n // the DS's <span onClick>) so it is keyboard-reachable and has an accessible name —\n // hence the focus-visible ring, which is a focus affordance, not a hover one.\n &__close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n padding: 0;\n\n color: colors.$slate-main;\n\n background: none;\n border: 0;\n\n cursor: pointer;\n\n .material-symbols-filled {\n font-size: i.icon-size(20); // DS: close at 20\n }\n\n &:focus-visible {\n outline: 2px solid colors.$accent-main;\n outline-offset: 2px;\n border-radius: r.$radius-control;\n }\n }\n\n // No `background`: the body deliberately shows the panel's grey through, exactly as\n // the DS does. The 16px inset is the DS value too — the previous 20px came from the\n // same `el-drawer.scss` override that had drifted on the header.\n &__body {\n flex: 1 1 auto;\n\n padding: s.spacing(2); // DS: 16\n overflow: auto;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n }\n\n // White like the header: both are chrome bars fenced off the scrolling body by a\n // hairline. The DS full profile has no footer, so this is the one inferred value here.\n &__footer {\n display: flex;\n flex: 0 0 auto;\n justify-content: flex-end;\n gap: s.spacing(1);\n\n padding: s.spacing(1) s.spacing(1.5);\n\n background: colors.$white;\n border-top: 1px solid colors.$slate-tint;\n }\n}\n\n/* Enter/leave: backdrop fades, panel slides in from its own edge (0.3s dialog duration). */\n.ds-drawer-rtl-enter-active,\n.ds-drawer-rtl-leave-active,\n.ds-drawer-ltr-enter-active,\n.ds-drawer-ltr-leave-active {\n transition: opacity m.$duration-dialog m.$easing;\n\n .ds-drawer__panel {\n transition: transform m.$duration-dialog m.$easing;\n }\n\n @include m.reduce-motion {\n transition: none;\n\n .ds-drawer__panel {\n transition: none;\n }\n }\n}\n\n.ds-drawer-rtl-enter-from,\n.ds-drawer-rtl-leave-to,\n.ds-drawer-ltr-enter-from,\n.ds-drawer-ltr-leave-to {\n opacity: 0;\n}\n\n.ds-drawer-rtl-enter-from .ds-drawer__panel,\n.ds-drawer-rtl-leave-to .ds-drawer__panel {\n transform: translateX(100%);\n}\n\n.ds-drawer-ltr-enter-from .ds-drawer__panel,\n.ds-drawer-ltr-leave-to .ds-drawer__panel {\n transform: translateX(-100%);\n}\n</style>\n","// DsPopover — click-triggered card panel anchored to a trigger, built NATIVE.\n// SALESQL-3968: replaces frontend-app's `el-popper` override (the company card),\n// which added a 1px grey ring and 8px of padding on top of Element Plus. Native\n// for the same reason as DsDrawer: Element Plus is Vue 3 only and the Vue 2 twin\n// has to replicate this API and markup.\n//\n// Positioning is pure CSS — zero dependencies, no floating-ui.\n\n/**\n * Where the panel PREFERS to open, as `side` or `side-alignment`.\n *\n * The bare side centres the panel on the trigger; `-start` / `-end` align it to the\n * trigger's leading / trailing edge on the cross axis (left/right for a top or bottom\n * side, top/bottom for a left or right one).\n *\n * The aligned forms are not decoration: the DS company card is\n * `{ position: absolute, top: 'calc(100% + 6px)', left: 0 }`\n * (`prospector/ProspectorRedesignApp.jsx`, `CompanyCell`) — i.e. `bottom-start`.\n * Centring it would move the card off its trigger's edge.\n *\n * PREFERRED, not final (SALESQL-4056): `useViewportClamp`'s FLIP re-evaluates it live\n * (on open, scroll and resize) against the trigger's rect and the panel's own size, and\n * opens on the OPPOSITE side instead when the preferred one doesn't fit but the other one\n * has more room — Element Plus / floating-ui's `flip`, kept alignment suffix included\n * (`bottom-start` ↔ `top-start`). `DsPopover.vue`'s panel class reflects that RESOLVED\n * placement, not this prop's raw value.\n *\n * `over-start` / `over-end` (SALESQL-3535) cover the trigger instead of sitting beside it:\n * the panel's top lands 8px above the trigger's top, aligned to its leading / trailing edge —\n * the design export's contact-data `TypedCell` (`top: −8`), which the contract (§3.5) pairs\n * with a ¼ `offset` so the leading quarter of a column stays a free hover lane. They never\n * flip: covering the trigger has no \"opposite side\" to move to.\n */\nexport const DS_POPOVER_PLACEMENTS = {\n TOP: 'top',\n TOP_START: 'top-start',\n TOP_END: 'top-end',\n BOTTOM: 'bottom',\n BOTTOM_START: 'bottom-start',\n BOTTOM_END: 'bottom-end',\n LEFT: 'left',\n LEFT_START: 'left-start',\n LEFT_END: 'left-end',\n RIGHT: 'right',\n RIGHT_START: 'right-start',\n RIGHT_END: 'right-end',\n OVER_START: 'over-start',\n OVER_END: 'over-end',\n} as const;\nexport type DsPopoverPlacement = (typeof DS_POPOVER_PLACEMENTS)[keyof typeof DS_POPOVER_PLACEMENTS];\n\nexport interface DsPopoverProps {\n /** Visibility. Controlled — pair with `v-model:open`. */\n open?: boolean;\n /** Preferred placement — see `DsPopoverPlacement`'s doc for the FLIP that can override it. */\n placement?: DsPopoverPlacement;\n /** Panel width (any CSS length). Empty = fit content. */\n width?: string;\n closeOnEscape?: boolean;\n /** Close when a click lands outside the trigger and the panel. */\n closeOnOutside?: boolean;\n /** Let the trigger slot toggle the panel on click. Off for consumer-driven opening. */\n triggerOnClick?: boolean;\n /**\n * Moves the panel's anchor along the trigger's cross axis — any CSS length; a percentage\n * resolves against the trigger box (`'25%'` = the contact-data cell rule, contract §3.5).\n * Empty keeps the panel flush with the edge. Additive (SALESQL-3535).\n */\n offset?: string;\n /** Drop the 8px card padding for content that brings its own rows and dividers. */\n flush?: boolean;\n /**\n * Render the panel in `<body>` so no ancestor's `overflow` can clip it — a table cell, a\n * scroller. A fixed box mirrors the trigger's rect, so placement, `offset` and the viewport\n * clamp behave the same. Off keeps the panel inside the root. Additive (SALESQL-4056).\n * Teleported, it also asks to close once the trigger is fully out of view (its row\n * scrolled past a clipping container), instead of floating orphaned.\n */\n teleported?: boolean;\n /**\n * Root and trigger fill their container instead of hugging the trigger's content: the\n * whole surface opens the panel (a table cell painted as clickable end to end). SALESQL-4056.\n */\n block?: boolean;\n}\n","import type { InjectionKey } from 'vue';\n\n// A DsPopover inside another one (a row menu inside a picker panel). The inner panel is usually\n// teleported, so the outer one's DOM check would count a press on it as «outside». Provide /\n// inject follows the component tree instead of the DOM: each popover registers with the nearest\n// ancestor, which then treats the child's panel (and its own descendants') as inside.\nexport interface PopoverLayer {\n register(contains: (node: Node) => boolean): () => void;\n}\n\nexport const POPOVER_LAYER: InjectionKey<PopoverLayer> = Symbol('ds-popover-layer');\n\n// Stacking of a teleported popover (it lives in <body>): DsDrawer / DsModal 2001 < this < DsTooltip 10001.\nexport const TELEPORTED_POPOVER_Z_INDEX = 2002;\n","<template>\n <div\n ref=\"rootRef\"\n class=\"ds-popover\"\n :class=\"{ 'ds-popover--block': block }\"\n @keydown.esc=\"onEscape\"\n >\n <!-- A <div> (not a <span>) so the trigger slot may hold block-root components\n without invalid HTML — same rationale as DsTooltip. -->\n <div class=\"ds-popover__trigger\" @click=\"onTriggerClick\">\n <slot name=\"trigger\" />\n </div>\n\n <!-- `teleported`: the panel lives in <body>, where no ancestor's `overflow` can clip it.\n The anchor is a fixed box that mirrors the root's rect, so the placement CSS below\n resolves against it exactly as it does against the root. Esc is caught on the\n anchor because a teleported panel's keydown never reaches the root. -->\n <Teleport v-if=\"teleported\" to=\"body\">\n <Transition name=\"ds-popover-fade\">\n <div v-if=\"open\" class=\"ds-popover__anchor\" :style=\"anchorStyle\" @keydown.esc=\"onEscape\">\n <div\n :id=\"panelId\"\n ref=\"panelRef\"\n class=\"ds-popover__panel\"\n :class=\"[`ds-popover__panel--${resolvedPlacement}`, { 'is-flush': flush }]\"\n role=\"dialog\"\n tabindex=\"-1\"\n :style=\"panelStyle\"\n >\n <slot />\n </div>\n </div>\n </Transition>\n </Teleport>\n <Transition v-else name=\"ds-popover-fade\">\n <div\n v-if=\"open\"\n :id=\"panelId\"\n ref=\"panelRef\"\n class=\"ds-popover__panel\"\n :class=\"[`ds-popover__panel--${resolvedPlacement}`, { 'is-flush': flush }]\"\n role=\"dialog\"\n tabindex=\"-1\"\n :style=\"panelStyle\"\n >\n <slot />\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n inject,\n nextTick,\n onBeforeUnmount,\n provide,\n ref,\n useId,\n watch,\n type PropType,\n} from 'vue';\nimport { UPDATE_OPEN } from '@shared/constants/events';\nimport { useTeleportAnchor } from '@shared/composables/useTeleportAnchor';\nimport { useViewportClamp } from '@shared/composables/useViewportClamp';\nimport { DS_POPOVER_PLACEMENTS, type DsPopoverPlacement } from './DsPopover.types';\nimport { POPOVER_LAYER, TELEPORTED_POPOVER_Z_INDEX, type PopoverLayer } from './popoverLayers';\n\nconst props = defineProps({\n open: Boolean,\n placement: {\n type: String as PropType<DsPopoverPlacement>,\n default: DS_POPOVER_PLACEMENTS.BOTTOM,\n },\n // Panel width (any CSS length). Empty = fit content.\n width: { type: String, default: '' },\n // `width` becomes a minimum: the panel grows with its content up to this length (and never\n // past the viewport). Empty = fixed `width`, as before — additive, nothing existing moves.\n growTo: { type: String, default: '' },\n closeOnEscape: { type: Boolean, default: true },\n closeOnOutside: { type: Boolean, default: true },\n // Let the trigger slot toggle the panel. Off when the consumer drives `open` itself.\n triggerOnClick: { type: Boolean, default: true },\n // Moves the panel's anchor along the trigger's cross axis (any CSS length; a percentage\n // resolves against the trigger box). The contact-data cell opens at `25%` so a column can\n // be swept downward without the panel intercepting the pointer (contract §3.5). Empty =\n // anchored flush to the edge, as before — additive, nothing existing moves.\n offset: { type: String, default: '' },\n // Drop the 8px card padding for content that brings its own rows (a list with dividers).\n flush: { type: Boolean, default: false },\n // Render the panel in <body> (SALESQL-4056). Needed when the trigger sits inside an\n // ancestor with `overflow` other than visible — a table cell, a scroller — which would\n // otherwise clip the panel. Placement, offset and the viewport clamp behave the same.\n // Off = the panel stays inside the root, as before — additive, nothing existing moves.\n teleported: { type: Boolean, default: false },\n // The root and the trigger fill their container instead of hugging the trigger's content\n // (SALESQL-4056): for a trigger that is a whole surface, like a table cell painted as\n // clickable end to end. Off = inline, as before.\n block: { type: Boolean, default: false },\n});\n\nconst emit = defineEmits([UPDATE_OPEN]);\n\nconst rootRef = ref<HTMLElement | null>(null);\nconst panelRef = ref<HTMLElement | null>(null);\n\nconst nestedContains = new Set<(node: Node) => boolean>();\n\nfunction containsNode(node: Node): boolean {\n return (\n !!rootRef.value?.contains(node) ||\n !!panelRef.value?.contains(node) ||\n [...nestedContains].some((contains) => contains(node))\n );\n}\n\nconst layer: PopoverLayer = {\n register(contains) {\n nestedContains.add(contains);\n return () => nestedContains.delete(contains);\n },\n};\nprovide(POPOVER_LAYER, layer);\nconst unregisterFromParent = inject(POPOVER_LAYER, null)?.register(containsNode);\n\n// SSR-safe id; the panel carries it so a consumer can wire aria-controls if it wants.\nconst panelId = useId();\n\n// Mirrors the CSS `calc(100% + 6px)` gap in the placement rules below — the flip's\n// free-space math (useViewportClamp) needs the SAME number the CSS renders with.\nconst PANEL_GAP = 6;\n\n// Placement is pure CSS and knows nothing about the viewport; the clamp nudges the panel\n// back in on the cross axis when a trigger near an edge would push it off-screen (shared\n// with DsTooltip), and — passing `trigger`/`gap` here turns on the main-axis FLIP\n// (SALESQL-4056): when the panel doesn't fit on the PREFERRED side (`placement`) but the\n// OPPOSITE side has more room, it opens there instead (`resolvedPlacement`), re-evaluated\n// live on the same open/scroll/resize the clamp already measures on. DsTooltip passes the\n// same third argument — see useViewportClamp.ts.\nconst {\n shiftStyle,\n resolvedPlacement,\n activate: activateClamp,\n deactivate: deactivateClamp,\n} = useViewportClamp(panelRef, () => props.placement, { trigger: rootRef, gap: PANEL_GAP });\n\nconst panelStyle = computed(() => {\n const grows = !!props.growTo;\n const style: Record<string, string> = {\n ...(grows\n ? {\n width: 'max-content',\n ...(props.width ? { '--ds-popover-min-width': props.width } : {}),\n '--ds-popover-max-width': props.growTo,\n }\n : props.width\n ? { width: props.width }\n : {}),\n ...(props.offset ? { '--ds-popover-offset': props.offset } : {}),\n ...shiftStyle.value,\n };\n return Object.keys(style).length > 0 ? style : undefined;\n});\n\n// Teleported only. Once the trigger is fully out of view (its row scrolled past a clipping\n// container, SALESQL-4056) the panel asks to close: inside the root it would have been clipped\n// along with the trigger; teleported, it would float orphaned over whatever covers that spot.\nconst {\n anchorStyle: anchorBox,\n track: trackAnchor,\n untrack: untrackAnchor,\n} = useTeleportAnchor(rootRef, { onTriggerHidden: close });\n\nconst anchorStyle = computed(() => ({\n zIndex: TELEPORTED_POPOVER_Z_INDEX,\n ...anchorBox.value,\n}));\n\n// The element that had focus when the panel opened — focus returns here on close, so a\n// keyboard user is not dumped at the top of the document after dismissing the card.\nlet lastFocused: HTMLElement | null = null;\n\nfunction close() {\n emit(UPDATE_OPEN, false);\n}\n\nfunction onTriggerClick() {\n if (!props.triggerOnClick) return;\n emit(UPDATE_OPEN, !props.open);\n}\n\nfunction onEscape() {\n if (props.closeOnEscape && props.open) close();\n}\n\n// Outside click: `mousedown` rather than `click`, so a press that starts outside\n// dismisses the panel even if the pointer is released over it.\nfunction onDocumentMouseDown(e: MouseEvent) {\n const target = e.target as Node | null;\n // A teleported panel is not inside the root, so it is checked on its own — and so is the\n // panel of any popover nested in this one.\n if (!target || containsNode(target)) return;\n close();\n}\n\nwatch(\n () => props.open,\n (open, wasOpen) => {\n if (typeof document === 'undefined') return;\n if (open) {\n lastFocused = document.activeElement as HTMLElement;\n if (props.closeOnOutside) document.addEventListener('mousedown', onDocumentMouseDown);\n // Before the panel renders and before the clamp activates, so neither sees a stale anchor.\n if (props.teleported) trackAnchor();\n nextTick(() => {\n // `preventScroll` is NOT optional here: a plain focus() makes the browser\n // scroll the panel into view, which drags the trigger the user just clicked\n // out from under their pointer (measured: the scrolling ancestor jumped 18px\n // and the button visibly moved up). The panel is anchored to the trigger, so\n // it is already where the user is looking — nothing needs scrolling.\n // A control inside the panel may have claimed focus already (a picker's search).\n if (!panelRef.value?.contains(document.activeElement)) {\n panelRef.value?.focus?.({ preventScroll: true });\n }\n activateClamp();\n });\n } else if (wasOpen) {\n document.removeEventListener('mousedown', onDocumentMouseDown);\n untrackAnchor();\n deactivateClamp();\n lastFocused?.focus?.({ preventScroll: true });\n }\n },\n { immediate: true }\n);\n\nonBeforeUnmount(() => {\n unregisterFromParent?.();\n if (typeof document === 'undefined') return;\n document.removeEventListener('mousedown', onDocumentMouseDown);\n deactivateClamp();\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/shadow.scss' as sh;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-popover {\n position: relative;\n display: inline-flex;\n\n &__trigger {\n display: inline-flex;\n }\n\n // `block`: the root fills its container and the trigger fills the root, so the whole\n // surface — not just the content — opens the panel. Height too: a table cell is the\n // container, and a row is taller than its text.\n &--block {\n display: flex;\n\n width: 100%;\n height: 100%;\n\n > .ds-popover__trigger {\n display: flex;\n flex: 1;\n\n min-width: 0;\n }\n }\n\n // Teleported only. The anchor's box and z-index are inline (useTeleportAnchor,\n // TELEPORTED_POPOVER_Z_INDEX); it lets the pointer through everywhere but the panel.\n &__anchor {\n .ds-popover__panel {\n pointer-events: auto;\n }\n }\n\n &__panel {\n position: absolute;\n z-index: 2000; // under DsTooltip (10001), over page chrome\n\n width: max-content;\n // Never wider than the viewport itself: past that, no amount of shifting can bring\n // the panel back inside and the content would still be cut.\n max-width: min(var(--ds-popover-max-width, 320px), calc(100vw - #{s.spacing(2)}));\n min-width: min(var(--ds-popover-min-width, 0px), calc(100vw - #{s.spacing(2)}));\n // 8px — the padding the el-popper override applied to every popover.\n padding: s.spacing(1);\n\n // Content that draws its own rows and dividers (the contact list) sits flush.\n &.is-flush {\n padding: 0;\n }\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n background: colors.$white;\n\n // The 1px grey ring. Grey, never the accent: this is the card chrome carried\n // over verbatim from frontend-app's `.el-popper.card-popover` override.\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-card;\n box-shadow: sh.$shadow-dropdown;\n\n outline: none;\n\n // 12-way placement — 4 sides × {centred, -start, -end} — with a 6px gap from the\n // trigger (the DS company card's `top: calc(100% + 6px)`), plus `over-start` /\n // `over-end` that cover the trigger (below). Pure CSS, no floating-ui.\n //\n // `--ds-overlay-shift` is the viewport-collision nudge (see useViewportClamp); it is\n // 0 whenever the panel already fits, which is the common case. The centred forms fold\n // it into the `-50%` that does the centring; the aligned forms have nothing to centre,\n // so the shift is the whole transform.\n //\n // `--ds-popover-offset` (the `offset` prop, SALESQL-3535) moves the ANCHOR: on the\n // aligned forms it replaces the `0` of the anchored edge, so a percentage resolves\n // against the trigger box; on the centred forms it is added to the translate. Unset,\n // it falls back to 0px and every placement is exactly what it was.\n\n // -- Side: which edge of the trigger the panel sits against ---------------\n &--top,\n &--top-start,\n &--top-end {\n bottom: calc(100% + 6px);\n }\n &--bottom,\n &--bottom-start,\n &--bottom-end {\n top: calc(100% + 6px);\n }\n &--left,\n &--left-start,\n &--left-end {\n right: calc(100% + 6px);\n }\n &--right,\n &--right-start,\n &--right-end {\n left: calc(100% + 6px);\n }\n\n // -- Alignment on the cross axis ------------------------------------------\n // Horizontal sides (top/bottom) align on X…\n &--top,\n &--bottom {\n left: 50%;\n transform: translateX(\n calc(-50% + var(--ds-overlay-shift, 0px) + var(--ds-popover-offset, 0px))\n );\n }\n &--top-start,\n &--bottom-start {\n left: var(--ds-popover-offset, 0px); // DS company card: flush with the leading edge\n transform: translateX(var(--ds-overlay-shift, 0px));\n }\n &--top-end,\n &--bottom-end {\n right: var(--ds-popover-offset, 0px);\n transform: translateX(var(--ds-overlay-shift, 0px));\n }\n\n // …vertical sides (left/right) align on Y.\n &--left,\n &--right {\n top: 50%;\n transform: translateY(\n calc(-50% + var(--ds-overlay-shift, 0px) + var(--ds-popover-offset, 0px))\n );\n }\n &--left-start,\n &--right-start {\n top: var(--ds-popover-offset, 0px);\n transform: translateY(var(--ds-overlay-shift, 0px));\n }\n &--left-end,\n &--right-end {\n bottom: var(--ds-popover-offset, 0px);\n transform: translateY(var(--ds-overlay-shift, 0px));\n }\n\n // -- Over (SALESQL-3535): the panel COVERS the trigger, its top 8px above the trigger's\n // top — the design export's contact-data `TypedCell` (`top: −8`). Aligned on X like a\n // top/bottom side, so the clamp shifts it horizontally; `offset` moves the leading edge\n // (the contract's ¼ keeps the start of the column free to sweep).\n &--over-start,\n &--over-end {\n top: -8px;\n }\n &--over-start {\n left: var(--ds-popover-offset, 0px);\n transform: translateX(var(--ds-overlay-shift, 0px));\n }\n &--over-end {\n right: var(--ds-popover-offset, 0px);\n transform: translateX(var(--ds-overlay-shift, 0px));\n }\n }\n}\n\n/* Fade only — animating the positioning transform would fight placement. */\n.ds-popover-fade-enter-active,\n.ds-popover-fade-leave-active {\n transition: opacity m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n}\n.ds-popover-fade-enter-from,\n.ds-popover-fade-leave-to {\n opacity: 0;\n}\n</style>\n","import { nextTick, type Ref } from 'vue';\n\nconst ENABLED_ITEM = '[role=\"menuitem\"]:not(:disabled):not([aria-disabled=\"true\"])';\n\n// Keyboard of a `role=\"menu\"` of buttons: arrows (wrapping), Home / End, Escape / Tab to close.\n\nexport function useMenuKeyboard(\n menuRef: Ref<HTMLElement | null>,\n options: { onClose: () => void }\n) {\n const items = () => [...(menuRef.value?.querySelectorAll<HTMLElement>(ENABLED_ITEM) ?? [])];\n\n function focusFirst() {\n return nextTick(() => items()[0]?.focus());\n }\n\n function onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape' || event.key === 'Tab') {\n // Keeps a DsDrawer / DsModal behind from also closing.\n if (event.key === 'Escape') event.stopPropagation();\n options.onClose();\n return;\n }\n const list = items();\n if (list.length === 0) return;\n const current = list.indexOf(document.activeElement as HTMLElement);\n let next: number;\n if (event.key === 'ArrowDown') next = (current + 1) % list.length;\n else if (event.key === 'ArrowUp') next = (current - 1 + list.length) % list.length;\n else if (event.key === 'Home') next = 0;\n else if (event.key === 'End') next = list.length - 1;\n else return;\n event.preventDefault();\n list[next]?.focus();\n }\n\n return { focusFirst, onKeydown };\n}\n","import type { DsPopoverPlacement } from '@shared/ui/DsPopover';\n\nexport interface DsActionMenuItem {\n /** Stable key; it is the payload of `select`. */\n id: string;\n icon?: string;\n label: string;\n disabled?: boolean;\n danger?: boolean;\n}\n\n/** Item text weight. `bold` is for menus that sit on a bold surface (a table header). */\nexport const DS_ACTION_MENU_WEIGHTS = {\n REGULAR: 'regular',\n BOLD: 'bold',\n} as const;\nexport type DsActionMenuWeight =\n (typeof DS_ACTION_MENU_WEIGHTS)[keyof typeof DS_ACTION_MENU_WEIGHTS];\n\nexport interface DsActionMenuProps {\n items: DsActionMenuItem[];\n /** Visibility. Omit it and the menu manages itself; bind it with `v-model:open` to control it. */\n open?: boolean;\n placement?: DsPopoverPlacement;\n /** Render the panel in `<body>` so no ancestor's `overflow` clips it (a table header). */\n teleported?: boolean;\n weight?: DsActionMenuWeight;\n menuLabel?: string;\n}\n","<template>\n <DsPopover\n class=\"ds-action-menu\"\n :open=\"isOpen\"\n :placement=\"placement\"\n :teleported=\"teleported\"\n flush\n @update:open=\"setOpen\"\n >\n <template #trigger>\n <span ref=\"triggerRef\" class=\"ds-action-menu__trigger\" @keydown.down.prevent=\"openFromKey\">\n <slot name=\"trigger\" :open=\"isOpen\" />\n </span>\n </template>\n\n <div\n ref=\"menuRef\"\n class=\"ds-action-menu__menu\"\n :class=\"{ 'ds-action-menu__menu--bold': weight === DS_ACTION_MENU_WEIGHTS.BOLD }\"\n role=\"menu\"\n :aria-label=\"menuLabel || undefined\"\n @keydown=\"onMenuKeydown\"\n >\n <button\n v-for=\"item in items\"\n :key=\"item.id\"\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n class=\"ds-action-menu__item\"\n :class=\"{ 'is-danger': item.danger }\"\n :disabled=\"item.disabled\"\n @click=\"choose(item)\"\n >\n <i\n v-if=\"item.icon\"\n class=\"material-symbols-filled ds-action-menu__icon\"\n aria-hidden=\"true\"\n >{{ item.icon }}</i\n >\n <span class=\"ds-action-menu__label\">{{ item.label }}</span>\n </button>\n </div>\n </DsPopover>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref, watch, type PropType } from 'vue';\nimport { useMenuKeyboard } from '@shared/composables/useMenuKeyboard';\nimport { SELECT, UPDATE_OPEN } from '@shared/constants/events';\nimport { DsPopover, DS_POPOVER_PLACEMENTS, type DsPopoverPlacement } from '@shared/ui/DsPopover';\nimport {\n DS_ACTION_MENU_WEIGHTS,\n type DsActionMenuItem,\n type DsActionMenuWeight,\n} from './DsActionMenu.types';\n\nconst props = defineProps({\n items: { type: Array as PropType<DsActionMenuItem[]>, required: true },\n // `undefined` (not `false`) when omitted: that is what tells \"uncontrolled\" from \"closed\".\n open: { type: Boolean, default: undefined },\n placement: {\n type: String as PropType<DsPopoverPlacement>,\n default: DS_POPOVER_PLACEMENTS.BOTTOM_START,\n },\n teleported: { type: Boolean, default: false },\n weight: {\n type: String as PropType<DsActionMenuWeight>,\n default: DS_ACTION_MENU_WEIGHTS.REGULAR,\n },\n menuLabel: { type: String, default: '' },\n});\n\nconst emit = defineEmits([SELECT, UPDATE_OPEN]);\n\nconst innerOpen = ref(false);\nconst triggerRef = ref<HTMLElement | null>(null);\nconst menuRef = ref<HTMLElement | null>(null);\n\nconst isOpen = computed(() => props.open ?? innerOpen.value);\n\nfunction setOpen(next: boolean) {\n if (isOpen.value === next) return;\n if (props.open === undefined) innerOpen.value = next;\n emit(UPDATE_OPEN, next);\n}\n\nfunction openFromKey() {\n setOpen(true);\n}\n\n// After DsPopover's own focus restore, which may land elsewhere (Safari / Firefox on macOS).\nfunction focusTrigger() {\n nextTick(() =>\n triggerRef.value\n ?.querySelector<HTMLElement>('button, a[href], input, [tabindex]:not([tabindex=\"-1\"])')\n ?.focus()\n );\n}\n\nfunction closeAndRefocus() {\n setOpen(false);\n focusTrigger();\n}\n\nfunction choose(item: DsActionMenuItem) {\n if (item.disabled) return;\n closeAndRefocus();\n emit(SELECT, item.id);\n}\n\nconst { focusFirst, onKeydown: onMenuKeydown } = useMenuKeyboard(menuRef, {\n onClose: closeAndRefocus,\n});\n\n// 'post': after DsPopover moves focus to its panel.\nwatch(\n isOpen,\n (opened) => {\n if (opened) focusFirst();\n },\n { flush: 'post' }\n);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-action-menu {\n &__trigger {\n display: contents;\n }\n\n &__menu {\n display: flex;\n flex-direction: column;\n min-width: s.control-width('medium');\n padding: s.spacing(0.5);\n\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n &--bold {\n font-weight: t.$weight-bold;\n }\n }\n\n &__item {\n display: flex;\n align-items: center;\n gap: s.spacing(1);\n width: 100%;\n height: s.control-height('large');\n padding: 0 s.control-padding('medium');\n\n color: colors.$slate-main;\n font: inherit;\n text-align: left;\n\n background: transparent;\n border: 0;\n border-radius: r.$radius-control;\n\n cursor: pointer;\n\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:hover:not(:disabled),\n &:focus-visible {\n background: colors.$slate-bg;\n }\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: -2px;\n }\n\n &.is-danger {\n color: colors.$error-shadow;\n\n &:hover:not(:disabled),\n &:focus-visible {\n background: colors.$error-tint;\n }\n }\n\n &:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n }\n }\n\n &__icon {\n flex: none;\n font-size: i.icon-size(16);\n line-height: 1;\n }\n\n &__label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n</style>\n","<template>\n <span class=\"ds-company-logo\" :style=\"boxStyle\">\n <img\n v-if=\"src && !failed\"\n class=\"ds-company-logo__image\"\n :src=\"src\"\n alt=\"\"\n loading=\"lazy\"\n :style=\"imageStyle\"\n @error=\"failed = true\"\n />\n <span v-else class=\"ds-company-logo__initial\" aria-hidden=\"true\">{{ initial }}</span>\n </span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\n\nconst props = defineProps({\n src: { type: String, default: '' },\n name: { type: String, default: '' },\n size: { type: Number, default: 36 },\n});\n\n// A broken logo is common (a private bucket, a dead CDN): fall back to the initial instead\n// of leaving an empty box. A new URL gets a fresh attempt.\nconst failed = ref(false);\nwatch(\n () => props.src,\n () => (failed.value = false)\n);\n\n// The export writes `(company || \"?\").slice(0, 1)`, kept as is (no case change).\nconst initial = computed(() => (props.name || '?').slice(0, 1));\n\nconst boxStyle = computed(() => ({ width: `${props.size}px`, height: `${props.size}px` }));\n// Export: a 22px glyph in a 34–36px box. Scaled with the box so other sizes keep the margin.\nconst imageStyle = computed(() => {\n const side = `${Math.round(props.size * 0.61)}px`;\n return { width: side, height: side };\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n\n.ds-company-logo {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n box-sizing: border-box;\n overflow: hidden;\n\n background: colors.$white;\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-control; // export: 4\n\n &__image {\n display: block;\n\n object-fit: contain;\n }\n\n &__initial {\n color: colors.$slate-soft; // export #888f97 — the DS value slate-soft replaced (SALESQL-3394)\n font-family: t.$font-family;\n font-size: t.font-size('caption'); // export: 12\n font-weight: 800; // export 800 (no token for it)\n line-height: 1;\n user-select: none;\n }\n}\n</style>\n","<template>\n <div class=\"ds-company-card\">\n <div class=\"ds-company-card__header\">\n <DsCompanyLogo :src=\"logo\" :name=\"name\" :size=\"34\" />\n <span class=\"ds-company-card__name\">{{ name }}</span>\n <DsTooltip\n v-if=\"websiteUrl\"\n :content=\"websiteLabel\"\n :placement=\"DS_TOOLTIP_PLACEMENTS.BOTTOM\"\n >\n <a\n class=\"ds-company-card__website\"\n :href=\"websiteUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n :aria-label=\"websiteLabel || undefined\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">language</i>\n </a>\n </DsTooltip>\n <!-- \"in\" is LinkedIn's mark, not copy: it stays literal in every language. -->\n <a\n v-if=\"linkedinUrl\"\n class=\"ds-company-card__linkedin\"\n :href=\"linkedinUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n :aria-label=\"linkedinLabel || undefined\"\n >in</a\n >\n </div>\n\n <div v-for=\"row in rows\" :key=\"row.id\" class=\"ds-company-card__row\">\n <i class=\"material-symbols-filled ds-company-card__row-icon\" aria-hidden=\"true\">{{\n row.icon\n }}</i>\n <div class=\"ds-company-card__row-text\">\n <div class=\"ds-company-card__row-label\">{{ row.label }}</div>\n <a\n v-if=\"row.href\"\n class=\"ds-company-card__row-value is-link\"\n :href=\"row.href\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >{{ row.value }}</a\n >\n <div v-else class=\"ds-company-card__row-value\">{{ row.value }}</div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport DsCompanyLogo from '../DsCompanyLogo/DsCompanyLogo.vue';\nimport DsTooltip from '../DsTooltip/DsTooltip.vue';\nimport { DS_TOOLTIP_PLACEMENTS } from '../DsTooltip/DsTooltip.types';\nimport type { DsCompanyDetail } from './DsCompanyCard.types';\n\nconst props = defineProps({\n name: { type: String, required: true },\n logo: { type: String, default: '' },\n websiteUrl: { type: String, default: '' },\n websiteLabel: { type: String, default: '' },\n linkedinUrl: { type: String, default: '' },\n linkedinLabel: { type: String, default: '' },\n details: { type: Array as PropType<DsCompanyDetail[]>, default: () => [] },\n});\n\n// A detail without a value is not rendered: a field the API did not send never shows blank.\nconst rows = computed(() => props.details.filter((detail) => detail.value));\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/icons.scss' as i;\n\n// Values from the export's `CompanyDetails`. Off-grid ones are written as the export has\n// them, as the contact-data family does. No `overflow: hidden` on the root: the globe's\n// tooltip has to be able to hang below the header.\n.ds-company-card {\n display: flex;\n flex-direction: column;\n\n min-width: 0;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n\n &__header {\n display: flex;\n gap: 10px; // export\n align-items: center;\n\n padding: 11px 14px; // export\n }\n\n &__name {\n flex: 1;\n\n min-width: 0;\n\n font-size: t.font-size('body'); // export: 14\n font-weight: t.$weight-bold; // export: 700\n white-space: nowrap;\n text-overflow: ellipsis;\n\n overflow: hidden;\n }\n\n &__website {\n display: inline-flex;\n\n color: colors.$slate-soft; // export #888f97 — the DS value slate-soft replaced\n text-decoration: none;\n\n // On the glyph itself: the app's `.material-symbols-filled` object class sets 20px on\n // the <i>, so a size on the link never reached it (3.5.0 rendered 20).\n i {\n font-size: i.icon-size(18); // export: 18\n line-height: 1;\n }\n\n &:hover {\n color: colors.$slate-main;\n }\n }\n\n &__linkedin {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n width: 22px; // export\n height: 22px;\n\n color: colors.$white;\n font-size: 11px; // export 11 (Diego: match the export, 2026-09-23)\n font-weight: 800; // export 800 (no token for it)\n line-height: 1;\n text-decoration: none;\n\n background: colors.$brand-linkedin;\n border-radius: 5px; // export\n }\n\n &__row {\n display: flex;\n gap: 10px; // export\n\n padding: 9px 14px; // export\n\n border-top: 1px solid colors.$slate-tint;\n }\n\n &__row-icon {\n flex: none;\n\n color: colors.$slate-soft; // export #5c6670\n font-size: 17px; // export 17 (not an icon step), under the header's 18\n line-height: 1;\n }\n\n &__row-text {\n min-width: 0;\n }\n\n &__row-label {\n color: colors.$slate-soft; // export #5c6670\n // Export 11, off the DS scale on purpose: snapped to `micro` (10) it read smaller than the\n // design in Diego's review (2026-09-23), so it matches the export instead.\n font-size: 11px;\n font-weight: t.$weight-bold;\n letter-spacing: 0.4px; // export\n text-transform: uppercase;\n }\n\n &__row-value {\n display: block;\n\n margin-top: 1px; // export\n color: colors.$slate-main;\n font-size: t.font-size('small'); // export: 13\n font-weight: t.$weight-semibold; // export: 600\n line-height: t.$line-height-body; // export: 1.4\n white-space: nowrap;\n text-overflow: ellipsis;\n text-decoration: none;\n\n overflow: hidden;\n\n &.is-link {\n color: colors.$accent-main;\n cursor: pointer;\n }\n }\n}\n</style>\n","// Contact-data vocabulary shared by the DsContact* family (SALESQL-3535).\n//\n// The rules here come from the frozen contact-data contract (SALESQL-3548,\n// `contact-data-contract/README.md` §3.5 and §3.7 in the three app repos). This library\n// is not one of the contract's mirrors and never imports its files: strings reach the\n// components through props, the token partial is copied byte-for-byte (see\n// `assets/css/contact-data-tokens.test.ts`), and the two helpers below are the contract's\n// own accepted price — «duplicated helpers, fixtures as the drift detector» (§7). Their\n// tests replay the contract's §4 self-check table so a divergence fails here, not in\n// production.\n\n/** Which group an item came from. It is a property of the LIST, never of the item. */\nexport const DS_CONTACT_KINDS = {\n EMAIL: 'email',\n PHONE: 'phone',\n} as const;\nexport type DsContactKind = (typeof DS_CONTACT_KINDS)[keyof typeof DS_CONTACT_KINDS];\n\n/**\n * The contract's whole type vocabulary (§3.2: Work · Direct · Mobile · HQ · Other), keyed\n * by the view model's own bucket values so a label and a bucket cannot drift apart. The\n * visible LABEL for each is copy and arrives by prop; the type itself is a design key.\n */\nexport const DS_CONTACT_TYPES = {\n WORK: 'work',\n DIRECT: 'direct',\n MOBILE: 'mobile',\n HQ: 'hq',\n OTHER: 'other',\n} as const;\nexport type DsContactType = (typeof DS_CONTACT_TYPES)[keyof typeof DS_CONTACT_TYPES];\n\n/**\n * In a contact-data row the type is an ICON on the left, not text (§3.2). These are the\n * Material Symbols ligatures the design export assigns per type (`TYPE_META`); icons are\n * design, so the mapping is the library's — the app never picks a glyph.\n */\nexport const DS_CONTACT_TYPE_ICONS: Readonly<Record<DsContactType, string>> = {\n [DS_CONTACT_TYPES.WORK]: 'business_center',\n [DS_CONTACT_TYPES.DIRECT]: 'mail',\n [DS_CONTACT_TYPES.MOBILE]: 'call',\n [DS_CONTACT_TYPES.HQ]: 'corporate_fare',\n [DS_CONTACT_TYPES.OTHER]: 'alternate_email',\n};\n\n/**\n * The glyph a row or trigger draws for a type. `direct` reads `mail` on an email and `call`\n * on a phone: the map is email-first (the export's `TYPE_META`), so the list's kind decides.\n */\nexport function contactTypeIcon(type: DsContactType, kind?: DsContactKind): string {\n if (type === DS_CONTACT_TYPES.DIRECT && kind === DS_CONTACT_KINDS.PHONE) return 'call';\n return DS_CONTACT_TYPE_ICONS[type];\n}\n\n/**\n * The one item shape every DsContact* component reads. Deliberately the five facts a\n * row needs and nothing else — the consuming app adapts its own view model to this\n * (one line per field), so the library survives the app's model changing under it:\n *\n * legacy view model (§3.8) typed `contact_data` block (§3.11)\n * id: item.id item.uid\n * value: item.value masked ? item.preview : item.value\n * masked: item.isMasked !item.is_revealed || item.value === null\n * valid: item.status === 'valid' item.verification === 'valid'\n * primary: item.isPrimary item.is_primary\n *\n * A component never classifies, fetches or formats: `value` is rendered verbatim and\n * `masked` decides only the two-tone rendering of a string the SERVER already masked.\n */\nexport interface DsContactItem {\n /** Stable identity for keys and event payloads. `null` when the API sends none. */\n id: string | number | null;\n /** The string to display, already resolved by the consumer. Never re-formatted. */\n value: string;\n /** `true` when `value` is the server's masked preview. Reports; never hides. */\n masked: boolean;\n /** `true` only for a `valid` verdict — the sole state that renders the A+ badge. */\n valid: boolean;\n /** The group's primary. Rendered first; the cell shows it as the single value. */\n primary: boolean;\n /** The user's own rating of this item: correct / incorrect / unrated. */\n rating?: boolean | null;\n /**\n * This row's own type, for lists that mix types (the unified Emails / Phones popovers).\n * Sets the row glyph; a single-type list reads the list's `type` instead.\n */\n type?: DsContactType;\n}\n\n/**\n * One typed band of a unified list (export `DataPopover` subgroups): «WORK (2)» above its\n * rows. The label is copy (the app's `TYPE_LABEL`); the type is the design key for the glyph.\n */\nexport interface DsContactSection {\n type: DsContactType;\n label: string;\n items: DsContactItem[];\n}\n\n/**\n * The three glyphs a server-masked value can be built from (contract §3.7 `MASK`):\n * asterisks on the typed block's email `preview`, BULLET U+2022 on phones, and the\n * ASCII dots the legacy arrays actually ship. Recognised, never produced.\n */\nexport const MASK_GLYPHS: readonly string[] = ['*', '•', '.'];\n\nexport interface DsMaskedSegment {\n text: string;\n /** Rendered in the mask tone (`$contact-data-mask-ink`) when true. */\n masked: boolean;\n}\n\n/**\n * The `+N` chip shows the OVERFLOW, not the group size (§3.5): `counts` in the view model\n * are group sizes, so the consumer subtracts through this and `+0` never renders.\n * Frozen as a function because three surfaces subtracting differently is exactly the\n * divergence the contract exists to prevent.\n */\nexport function overflowFromGroupSize(groupSize: number): number {\n return groupSize > 1 ? groupSize - 1 : 0;\n}\n\nfunction pushSegment(segments: DsMaskedSegment[], text: string, masked: boolean): void {\n const last = segments[segments.length - 1];\n if (last && last.masked === masked) {\n last.text += text;\n return;\n }\n segments.push({ text, masked });\n}\n\n/**\n * Splits a string the server ALREADY masked into segments for the two-tone rendering\n * (§3.7: «splitting an already-masked string leaks nothing»). The caller knows the value\n * is masked — this never decides that, and never touches an unmasked value.\n *\n * - Email: the whole local part is the redaction, the domain stays visible (the quality\n * signal). No `@` means the server masked the whole thing.\n * - Phone: every run of mask glyphs is a redaction; a SINGLE dot is a real separator\n * (`+1.415.555.0100`), so it stays visible. No prefix is assumed: `8008...` was\n * measured with no `+` at all. A hyphen touching a redaction (`•-•`) is the server's\n * grouping and comes out as a space; hyphens between visible digits are kept.\n *\n * Concatenating the segments yields the input — nothing is re-grouped — except for that\n * phone hyphen.\n */\nexport function splitMaskedValue(value: string, kind: DsContactKind): DsMaskedSegment[] {\n if (!value) return [];\n\n if (kind === DS_CONTACT_KINDS.EMAIL) {\n const at = value.indexOf('@');\n if (at <= 0) return [{ text: value, masked: true }];\n return [\n { text: value.slice(0, at), masked: true },\n { text: value.slice(at), masked: false },\n ];\n }\n\n const runs: DsMaskedSegment[] = [];\n let index = 0;\n while (index < value.length) {\n const isGlyph = MASK_GLYPHS.includes(value[index]);\n let end = index;\n while (end < value.length && MASK_GLYPHS.includes(value[end]) === isGlyph) end += 1;\n const run = value.slice(index, end);\n runs.push({ text: run, masked: isGlyph && run !== '.' });\n index = end;\n }\n\n const segments: DsMaskedSegment[] = [];\n runs.forEach((run, i) => {\n let text = run.text;\n if (!run.masked) {\n // Only the hyphen touching a redaction is the server's grouping; `555-0100` stays.\n if (runs[i - 1]?.masked) text = text.replace(/^-/, ' ');\n if (runs[i + 1]?.masked) text = text.replace(/-$/, ' ');\n }\n pushSegment(segments, text, run.masked);\n });\n return segments;\n}\n","<template>\n <span\n class=\"ds-masked-value\"\n :class=\"{ 'is-masked': masked }\"\n :title=\"masked ? undefined : value\"\n >\n <template v-if=\"masked\">\n <!-- Segments are a pure derivation of `value`, rebuilt whole on every change and\n never reordered, so the index IS the stable key here. -->\n <span\n v-for=\"(segment, index) in segments\"\n :key=\"index\"\n :class=\"segment.masked ? 'ds-masked-value__mask' : 'ds-masked-value__clear'\"\n ><template v-if=\"segment.circles\"\n ><span aria-hidden=\"true\">{{ segment.circles }}</span\n ><span v-if=\"index === firstCircleIndex\" class=\"ds-masked-value__sr\">{{\n maskedLabel\n }}</span></template\n ><template v-else>{{ segment.text }}</template></span\n >\n </template>\n <template v-else>{{ value }}</template>\n </span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport {\n DS_CONTACT_KINDS,\n MASK_GLYPHS,\n splitMaskedValue,\n type DsContactKind,\n type DsMaskedSegment,\n} from '@shared/constants/contact-data';\n\n// Export `maskEmail`: five bullets before the domain, whatever the server masked.\nconst EMAIL_MASK_CIRCLES = 5;\nconst MASK_CIRCLE = '•';\n\nconst props = defineProps({\n value: { type: String, required: true },\n kind: { type: String as PropType<DsContactKind>, required: true },\n masked: { type: Boolean, default: false },\n // Spoken once per masked value in place of the circles (the app owns i18n).\n maskedLabel: { type: String, default: 'Hidden' },\n});\n\ninterface Segment extends DsMaskedSegment {\n /** The circles that draw this redaction; empty when the text is shown as it came. */\n circles: string;\n}\n\n// Presentation only: the redaction the server sent is drawn as circles (export `DOTS`).\n// The email's local part is a fixed count — the export's `maskEmail` — because its length\n// says nothing; a phone keeps one circle per character, the server's grouping carries the\n// layout. A local part that still has visible characters is not a pure redaction: it is\n// left as received. The visible segments are never touched.\nfunction circlesFor(segment: DsMaskedSegment): string {\n if (!segment.masked || ![...segment.text].every((char) => MASK_GLYPHS.includes(char))) return '';\n return MASK_CIRCLE.repeat(\n props.kind === DS_CONTACT_KINDS.EMAIL ? EMAIL_MASK_CIRCLES : segment.text.length\n );\n}\n\nconst segments = computed<Segment[]>(() =>\n props.masked\n ? splitMaskedValue(props.value, props.kind).map((segment) => ({\n ...segment,\n circles: circlesFor(segment),\n }))\n : []\n);\n\nconst firstCircleIndex = computed(() => segments.value.findIndex((segment) => segment.circles));\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/contact-data-tokens' as cd;\n\n.ds-masked-value {\n // Font, weight and ink are the parent's: this component owns only the mask tone.\n white-space: nowrap;\n\n &__mask {\n color: cd.$contact-data-mask-ink;\n // Export `DOTS`: the redacted run is bold and letter-spaced, so the circles read as a\n // group instead of a smear glued to the prefix. The U+2022 bullet is centred on the\n // x-height by the typeface — the asterisk it replaces sits at cap height.\n font-weight: cd.$contact-data-value-weight;\n letter-spacing: 1px;\n }\n\n // The spoken replacement for the circles: out of the layout, still in the a11y tree.\n &__sr {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n white-space: nowrap;\n }\n\n // A redaction after a visible prefix (`+1 8...`, `+44 77••`) gets a hair of air, like the\n // export's `{tail} {dots}`. Inserting a character would break \"verbatim\"; a margin does not.\n &__clear + &__mask {\n margin-left: 2px;\n }\n}\n</style>\n","<template>\n <!-- The tooltip root is the element that sits in the parent's flex row, so the\n superscript raise (align-self + negative margin, per the contract) lives on it. -->\n <DsTooltip class=\"ds-deliverability-badge\" :content=\"tooltip\" :placement=\"placement\">\n <span\n class=\"ds-deliverability-badge__glyph\"\n role=\"img\"\n :aria-label=\"tooltip\"\n :tabindex=\"focusable ? 0 : undefined\"\n >{{ label }}</span\n >\n </DsTooltip>\n</template>\n\n<script setup lang=\"ts\">\nimport { type PropType } from 'vue';\nimport { DsTooltip, DS_TOOLTIP_PLACEMENTS, type DsTooltipPlacement } from '@shared/ui/DsTooltip';\n\ndefineProps({\n label: { type: String, required: true },\n tooltip: { type: String, required: true },\n placement: {\n type: String as PropType<DsTooltipPlacement>,\n default: DS_TOOLTIP_PLACEMENTS.TOP,\n },\n // Standing alone the glyph is a tab stop so a keyboard user can reach its meaning.\n // Inside an already-focusable trigger (the cell button) it must NOT be one: nested\n // focusables inside a button are invalid, and the trigger's popover carries the info.\n focusable: { type: Boolean, default: true },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/radius.scss' as r;\n\n// Contract §3.3 render spec: bare glyph, no box, raised as a superscript, `flex: none`\n// after the value. The A+ green exists in no repo palette — it is this badge's own token.\n.ds-deliverability-badge {\n flex: none;\n align-self: flex-start;\n margin-top: -2px;\n\n &__glyph {\n display: inline-block;\n\n color: cd.$contact-data-badge-a-plus-ink;\n font-family: t.$font-family;\n font-size: cd.$contact-data-badge-a-plus-size;\n font-weight: cd.$contact-data-badge-a-plus-weight;\n letter-spacing: cd.$contact-data-badge-a-plus-tracking;\n line-height: 1;\n\n border-radius: r.$radius-control;\n outline: none;\n cursor: default; // an indicator with a tooltip, not a control\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 2px;\n }\n }\n}\n</style>\n","<template>\n <span\n v-if=\"overflow > 0\"\n class=\"ds-more-count-chip\"\n :class=\"{ 'is-active': active }\"\n :aria-label=\"label || undefined\"\n >+{{ overflow }}</span\n >\n</template>\n\n<script setup lang=\"ts\">\ndefineProps({\n overflow: { type: Number, required: true },\n active: { type: Boolean, default: false },\n label: { type: String, default: '' },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n\n// Export `MoreChip`: inline-flex, min-width 22 × height 20, padding 0 6px, fully round,\n// 1px ring, 11px/700. Rest: white surface, tint ring, muted ink. Active: accent trio.\n.ds-more-count-chip {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n\n min-width: 22px; // export MoreChip\n height: 20px; // export MoreChip\n padding: 0 6px; // export MoreChip\n\n color: cd.$contact-data-ink-muted;\n font-family: t.$font-family;\n // Export: 11px. The type scale has no 11 step (caption is 12); caption is the nearest\n // token and the delta is logged in the story docs for the parity pass.\n font-size: t.font-size('caption');\n font-weight: t.$weight-bold;\n line-height: 1;\n white-space: nowrap;\n\n background: colors.$white;\n border: 1px solid cd.$contact-data-ring;\n border-radius: r.$radius-full;\n // An indicator, not a control: the arrow, never the I-beam its text would draw. Inside a\n // clickable trigger (the cell, the tag picker) the parent resets it to `inherit`, so the\n // pointer stays continuous across the whole hit area.\n cursor: default;\n\n transition:\n color m.$duration-default m.$easing,\n background-color m.$duration-default m.$easing,\n border-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &.is-active {\n color: colors.$accent-main;\n background: colors.$accent-bg;\n border-color: colors.$accent-mid;\n }\n}\n</style>\n","<template>\n <div class=\"ds-contact-list\">\n <div v-if=\"title || $slots.actions\" class=\"ds-contact-list__header\">\n <span v-if=\"title\" class=\"ds-contact-list__title\">{{ title }}</span>\n <span v-if=\"title\" class=\"ds-contact-list__count\">({{ total }})</span>\n <span class=\"ds-contact-list__actions\"><slot name=\"actions\" /></span>\n </div>\n\n <p v-if=\"!total && emptyLabel\" class=\"ds-contact-list__empty\">{{ emptyLabel }}</p>\n\n <template v-for=\"group in groups\" :key=\"group.key\">\n <!-- Unified variants only (export DataPopover subgroups): the type's band above its rows -->\n <p v-if=\"group.label\" class=\"ds-contact-list__section\">\n {{ group.label }} ({{ group.items.length }})\n </p>\n\n <ul class=\"ds-contact-list__items\" role=\"list\" :aria-label=\"group.label || undefined\">\n <li\n v-for=\"(item, index) in group.items\"\n :key=\"rowKey(item, group, index)\"\n class=\"ds-contact-list__item\"\n :class=\"{ 'is-primary': item.primary, 'is-masked': item.masked }\"\n >\n <i\n v-if=\"iconFor(item, group)\"\n class=\"material-symbols-filled ds-contact-list__icon\"\n aria-hidden=\"true\"\n >{{ iconFor(item, group) }}</i\n >\n\n <span class=\"ds-contact-list__value-wrap\">\n <DsMaskedValue\n class=\"ds-contact-list__value\"\n :value=\"item.value\"\n :kind=\"kind\"\n :masked=\"item.masked\"\n :masked-label=\"maskedLabel\"\n />\n <DsDeliverabilityBadge\n v-if=\"showsBadge(item)\"\n :label=\"badgeLabel\"\n :tooltip=\"badgeTooltip\"\n :focusable=\"false\"\n />\n </span>\n\n <!-- A masked row has no full value: nothing to copy, nothing to rate. -->\n <span v-if=\"!item.masked\" class=\"ds-contact-list__row-actions\">\n <button\n type=\"button\"\n class=\"ds-contact-list__action\"\n :class=\"{ 'is-copied': copiedKey === rowKey(item, group, index) }\"\n :aria-label=\"copiedKey === rowKey(item, group, index) ? copiedLabel : copyLabel\"\n :title=\"copiedKey === rowKey(item, group, index) ? copiedLabel : copyLabel\"\n @click=\"onCopy(item, rowKey(item, group, index))\"\n >\n <i class=\"material-symbols-rounded\" aria-hidden=\"true\">{{\n copiedKey === rowKey(item, group, index) ? 'check' : 'content_copy'\n }}</i>\n </button>\n\n <template v-if=\"showRate\">\n <button\n type=\"button\"\n class=\"ds-contact-list__action\"\n :class=\"{ 'is-on': item.rating === true }\"\n :aria-label=\"correctLabel\"\n :aria-pressed=\"item.rating === true\"\n :title=\"correctLabel\"\n @click=\"emit(CORRECT, item)\"\n >\n <!-- Unrated = the unfilled Rounded glyph (FILL 0). `material-symbols-rounded` is\n the object class the apps define; there is no `-filled-outlined` anywhere. -->\n <i\n :class=\"\n item.rating === true ? 'material-symbols-filled' : 'material-symbols-rounded'\n \"\n aria-hidden=\"true\"\n >thumb_up</i\n >\n </button>\n <button\n type=\"button\"\n class=\"ds-contact-list__action\"\n :class=\"{ 'is-on': item.rating === false }\"\n :aria-label=\"incorrectLabel\"\n :aria-pressed=\"item.rating === false\"\n :title=\"incorrectLabel\"\n @click=\"emit(INCORRECT, item)\"\n >\n <i\n :class=\"\n item.rating === false ? 'material-symbols-filled' : 'material-symbols-rounded'\n \"\n aria-hidden=\"true\"\n >thumb_down</i\n >\n </button>\n </template>\n </span>\n </li>\n </ul>\n </template>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, ref, type PropType } from 'vue';\nimport { DsMaskedValue } from '@shared/ui/DsMaskedValue';\nimport { DsDeliverabilityBadge } from '@shared/ui/DsDeliverabilityBadge';\nimport { COPY, CORRECT, INCORRECT } from '@shared/constants/events';\nimport { useClipboardCopy } from '@shared/composables/useClipboardCopy';\nimport {\n DS_CONTACT_KINDS,\n contactTypeIcon,\n type DsContactItem,\n type DsContactKind,\n type DsContactSection,\n type DsContactType,\n} from '@shared/constants/contact-data';\n\nconst props = defineProps({\n items: { type: Array as PropType<DsContactItem[]>, default: () => [] },\n // Unified variants (Emails / Phones): one band per type, rows under each. When present,\n // `items` plays no part in the rows — the cell still needs it for the primary and the chip.\n sections: { type: Array as PropType<DsContactSection[]>, default: () => [] },\n kind: { type: String as PropType<DsContactKind>, required: true },\n type: { type: String as PropType<DsContactType | ''>, default: '' },\n title: { type: String, default: '' },\n badgeLabel: { type: String, required: true },\n badgeTooltip: { type: String, required: true },\n showRate: { type: Boolean, default: false },\n emptyLabel: { type: String, default: '' },\n // Accessible labels for the icon-only actions (the app owns i18n); English DS defaults,\n // the same convention DsContactValue follows.\n maskedLabel: { type: String, default: 'Hidden' },\n copyLabel: { type: String, default: 'Copy' },\n copiedLabel: { type: String, default: 'Copied!' },\n correctLabel: { type: String, default: 'Correct' },\n incorrectLabel: { type: String, default: 'Incorrect' },\n});\n\n// Runtime array so the names are registered (the type-only form compiles to an empty\n// `emits` and lets listeners fall through as native attrs). Payload: the item.\nconst emit = defineEmits([COPY, CORRECT, INCORRECT]);\n\ninterface RowGroup {\n key: string;\n label: string;\n type: DsContactType | '';\n items: DsContactItem[];\n}\n\n// One group, one type — unless `sections` arrive: then each non-empty section is a band\n// plus its rows (export DataPopover renders subgroups; an empty type has nothing to band).\nconst groups = computed<RowGroup[]>(() => {\n if (props.sections.length) {\n return props.sections\n .filter((section) => section.items.length > 0)\n .map((section, index) => ({\n key: `${section.type}-${index}`,\n label: section.label,\n type: section.type,\n items: section.items,\n }));\n }\n return props.items.length\n ? [{ key: 'group', label: '', type: props.type, items: props.items }]\n : [];\n});\n\n// The header total spans every band (export: `subgroups.reduce(...)`), not one group.\nconst total = computed(() => groups.value.reduce((sum, group) => sum + group.items.length, 0));\n\n// Contract §3.3 — the whole badge rule, in one place: valid, and an email. Phones never\n// carry verification, whatever their status. Badges do render on masked previews (§3.7).\nfunction showsBadge(item: DsContactItem): boolean {\n return props.kind === DS_CONTACT_KINDS.EMAIL && item.valid;\n}\n\n// The row glyph (§3.2: an icon, never text): the item's own type when rows mix types,\n// else the band's, else the list's. No type, no glyph.\nfunction iconFor(item: DsContactItem, group: RowGroup): string {\n const type = item.type ?? group.type;\n return type ? contactTypeIcon(type, props.kind) : '';\n}\n\n// Unsaved rows arrive with `id: null` and their masked previews can repeat, so the value is\n// no identity: fall back to the position inside the group.\nfunction rowKey(item: DsContactItem, group: RowGroup, index: number): string | number {\n return item.id ?? `${group.key}:${index}`;\n}\n\n// Copy is the one consequence the row owns (the value is right there); it still emits so\n// the app can toast or track — only once the clipboard took the value. `copiedKey` flips the\n// glyph for ~1.2 s, like DsContactValue.\nconst copiedKey = ref<string | number | null>(null);\nlet copiedTimer: ReturnType<typeof setTimeout> | undefined;\nconst { copy: copyToClipboard } = useClipboardCopy();\n\nasync function onCopy(item: DsContactItem, key: string | number) {\n if (!(await copyToClipboard(item.value))) return;\n copiedKey.value = key;\n clearTimeout(copiedTimer);\n copiedTimer = setTimeout(() => {\n copiedKey.value = null;\n }, 1200);\n emit(COPY, item);\n}\n\nonBeforeUnmount(() => clearTimeout(copiedTimer));\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/spacing.scss' as s;\n\n.ds-contact-list {\n font-family: t.$font-family;\n color: cd.$contact-data-value-ink;\n cursor: default;\n\n // -- header: variant name + group size, actions to the right (export DataPopover) ----\n &__header {\n display: flex;\n align-items: center;\n gap: s.spacing(1);\n padding: 9px 12px; // export DataPopover header\n }\n &__title,\n &__count {\n // Export: 12.5px/600 in the section-label grey. `small` (13) is the nearest step.\n font-size: t.font-size('small');\n font-weight: t.$weight-semibold;\n color: cd.$contact-data-header-ink;\n white-space: nowrap;\n }\n &__count {\n margin-left: -4px;\n }\n &__actions {\n display: inline-flex;\n align-items: center;\n margin-left: auto;\n flex: none;\n }\n\n &__empty {\n margin: 0;\n padding: 9px 12px;\n font-size: t.font-size('small');\n color: cd.$contact-data-ink-muted;\n }\n\n // -- type band (export DataPopover subgroups): the quiet uppercase name of a type on the\n // neutral surface, ruled above and below, in a unified list --------------------------\n &__section {\n margin: 0;\n padding: 6px 12px 5px; // export\n border-top: 1px solid cd.$contact-data-ring;\n border-bottom: 1px solid cd.$contact-data-ring;\n background: cd.$contact-data-surface; // export grey1\n color: cd.$contact-data-ink-muted; // export C.grey\n // Export: 10.5px/700, .6px tracking. `micro` (10) is the nearest step.\n font-size: t.font-size('micro');\n font-weight: t.$weight-bold;\n letter-spacing: 0.6px;\n text-transform: uppercase;\n white-space: nowrap;\n }\n\n // -- rows (export PopItem) ---------------------------------------------------------\n &__items {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n &__item {\n position: relative;\n display: flex;\n align-items: center;\n gap: s.spacing(1); // 8\n\n padding: 7px 12px; // export PopItem\n border-top: 1px solid cd.$contact-data-ring;\n\n background: colors.$white;\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n // The header, a band or nothing sits above the first row — no double divider.\n &:first-child {\n border-top: 0;\n }\n\n // Export: rows hover on #FCFCFD, a surface the contract left out of its tokens; the\n // frozen row hover is the nearest sanctioned value. Logged as a parity delta.\n &:hover,\n &:focus-within {\n background: cd.$contact-data-row-hover;\n }\n }\n\n &__icon {\n flex: none;\n font-size: i.icon-size(16); // export TypeIcon size 16 in rows\n line-height: 1;\n color: cd.$contact-data-ink-muted;\n }\n\n &__value-wrap {\n display: inline-flex;\n align-items: center;\n gap: 4px; // export: value → badge gap\n flex: 1;\n min-width: 0;\n overflow: hidden;\n }\n &__value {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n // Contract §3.9, inverted hierarchy: the value is the loud element — by ink, at 600 (v3.3).\n font-size: t.font-size('small'); // export PopItem: 13\n font-weight: cd.$contact-data-value-weight;\n color: cd.$contact-data-value-ink;\n }\n\n // -- copy / rate overlay: hidden at rest, fades in on hover / keyboard focus ----------\n &__row-actions {\n position: absolute;\n right: s.spacing(1);\n top: 0;\n bottom: 0;\n\n display: flex;\n align-items: center;\n gap: 1px;\n padding-left: s.spacing(3); // export: gradient run-in so the value fades under the icons\n\n background: linear-gradient(90deg, rgba(colors.$white, 0) 0%, cd.$contact-data-row-hover 45%);\n\n opacity: 0;\n pointer-events: none;\n transition: opacity m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n }\n &__item:hover &__row-actions,\n &__item:focus-within &__row-actions {\n opacity: 1;\n pointer-events: auto;\n }\n\n &__action {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px; // export actionIcon\n height: 24px;\n padding: 0;\n\n border: 0;\n border-radius: r.$radius-control;\n background: transparent;\n color: cd.$contact-data-ink-muted;\n cursor: pointer;\n\n transition:\n background-color m.$duration-default m.$easing,\n color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n .material-symbols-filled,\n .material-symbols-rounded {\n font-size: i.icon-size(16); // export: 15 → nearest icon step\n line-height: 1;\n }\n\n &:hover {\n background: cd.$contact-data-ring;\n }\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n &.is-on {\n color: colors.$accent-main;\n background: colors.$accent-bg;\n }\n &.is-copied {\n color: colors.$success-shadow;\n }\n }\n}\n</style>\n","<template>\n <div\n class=\"ds-contact-cell\"\n :class=\"{\n 'is-open': isOpen,\n 'is-pinned': pinned,\n 'is-empty': !primary,\n 'is-disabled': disabled,\n }\"\n @mouseenter=\"onEnter\"\n @mouseleave=\"onLeave\"\n >\n <DsPopover\n :open=\"isOpen\"\n :placement=\"placement\"\n :offset=\"offset\"\n :width=\"popoverWidth\"\n :teleported=\"teleported\"\n flush\n :trigger-on-click=\"false\"\n @update:open=\"onPopoverUpdate\"\n >\n <template #trigger>\n <button\n type=\"button\"\n class=\"ds-contact-cell__trigger\"\n :aria-haspopup=\"hasPopover ? 'dialog' : undefined\"\n :aria-expanded=\"hasPopover ? isOpen : undefined\"\n @click=\"onTriggerClick\"\n >\n <template v-if=\"primary\">\n <i\n v-if=\"icon\"\n class=\"material-symbols-filled ds-contact-cell__icon\"\n aria-hidden=\"true\"\n >{{ icon }}</i\n >\n\n <span class=\"ds-contact-cell__value-wrap\">\n <DsMaskedValue\n class=\"ds-contact-cell__value\"\n :value=\"primary.value\"\n :kind=\"kind\"\n :masked=\"primary.masked\"\n :masked-label=\"maskedLabel\"\n />\n <DsDeliverabilityBadge\n v-if=\"showsBadge\"\n :label=\"badgeLabel\"\n :tooltip=\"badgeTooltip\"\n :focusable=\"false\"\n />\n </span>\n\n <DsMoreCountChip :overflow=\"overflow\" :active=\"isOpen\" :label=\"moreLabel\" />\n </template>\n\n <span v-else class=\"ds-contact-cell__empty\">{{ emptyLabel }}</span>\n </button>\n </template>\n\n <DsContactList\n :items=\"items\"\n :sections=\"sections\"\n :kind=\"kind\"\n :type=\"type\"\n :title=\"label\"\n :badge-label=\"badgeLabel\"\n :badge-tooltip=\"badgeTooltip\"\n :masked-label=\"maskedLabel\"\n :show-rate=\"showRate\"\n :copy-label=\"copyLabel\"\n :copied-label=\"copiedLabel\"\n :correct-label=\"correctLabel\"\n :incorrect-label=\"incorrectLabel\"\n :class=\"{ 'ds-contact-cell__list--reveal': showsReveal }\"\n @mouseenter=\"onPanelEnter\"\n @mouseleave=\"onPanelLeave\"\n @copy=\"emit(COPY, $event)\"\n @correct=\"emit(CORRECT, $event)\"\n @incorrect=\"emit(INCORRECT, $event)\"\n >\n <template v-if=\"showsReveal || $slots.actions\" #actions>\n <DsTooltip\n v-if=\"showsReveal\"\n class=\"ds-contact-cell__reveal-tip\"\n :content=\"revealTooltip\"\n :disabled=\"!revealTooltip\"\n :placement=\"DS_TOOLTIP_PLACEMENTS.LEFT\"\n >\n <DsButton\n class=\"ds-contact-cell__reveal\"\n :variant=\"DS_BUTTON_VARIANTS.PRIMARY\"\n :size=\"DS_BUTTON_SIZES.SMALL\"\n left-icon=\"visibility\"\n :loading=\"revealing\"\n @click=\"emit(REVEAL)\"\n >{{ revealLabel }}</DsButton\n >\n </DsTooltip>\n <slot name=\"actions\" />\n </template>\n </DsContactList>\n </DsPopover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, ref, watch, type PropType } from 'vue';\nimport { DsPopover, DS_POPOVER_PLACEMENTS, type DsPopoverPlacement } from '@shared/ui/DsPopover';\nimport { DsMaskedValue } from '@shared/ui/DsMaskedValue';\nimport { DsDeliverabilityBadge } from '@shared/ui/DsDeliverabilityBadge';\nimport { DsMoreCountChip } from '@shared/ui/DsMoreCountChip';\nimport { DsContactList } from '@shared/ui/DsContactList';\nimport { DsButton, DS_BUTTON_SIZES, DS_BUTTON_VARIANTS } from '@shared/ui/DsButton';\nimport { DsTooltip, DS_TOOLTIP_PLACEMENTS } from '@shared/ui/DsTooltip';\nimport { COPY, CORRECT, INCORRECT, REVEAL, UPDATE_OPEN } from '@shared/constants/events';\nimport {\n DS_CONTACT_KINDS,\n contactTypeIcon,\n overflowFromGroupSize,\n type DsContactItem,\n type DsContactKind,\n type DsContactSection,\n type DsContactType,\n} from '@shared/constants/contact-data';\n\nconst props = defineProps({\n items: { type: Array as PropType<DsContactItem[]>, required: true },\n count: { type: Number as PropType<number | null>, default: null },\n // Unified columns (Emails: Work + Direct; Phones: Direct + HQ): the popover lists each\n // type under its own band. `items` still drives the cell (primary, count); this only\n // shapes the popover. Export `TypedCell` receives both, exactly like this.\n sections: { type: Array as PropType<DsContactSection[]>, default: () => [] },\n kind: { type: String as PropType<DsContactKind>, required: true },\n type: { type: String as PropType<DsContactType | ''>, default: '' },\n label: { type: String, required: true },\n badgeLabel: { type: String, required: true },\n badgeTooltip: { type: String, required: true },\n moreLabel: { type: String, default: '' },\n // A glyph, not copy: the export's empty cell. Override when the app wants words.\n emptyLabel: { type: String, default: '—' },\n showRate: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n placement: {\n type: String as PropType<DsPopoverPlacement>,\n default: DS_POPOVER_PLACEMENTS.OVER_START, // export TypedCell: over the cell, `top: −8`\n },\n // Render the popover in <body> so a scroller or a clipping cell (the prospector table)\n // cannot cut it. Off keeps the panel inside the cell, as before.\n teleported: { type: Boolean, default: false },\n // «Show details» in the popover header, shown only while some item is masked. Empty = no\n // CTA (the consumer opts in with its copy); the cell reports intent through `reveal`.\n revealLabel: { type: String, default: '' },\n // What the CTA costs («1 credit»), shown in a tooltip to its left. Empty = no tooltip.\n revealTooltip: { type: String, default: '' },\n // The consumer's reveal is in flight: the CTA spins and ignores clicks.\n revealing: { type: Boolean, default: false },\n // Contract §3.5: ¼ of the cell's width to the right.\n offset: { type: String, default: '25%' },\n popoverWidth: { type: String, default: '300px' }, // export DataPopover width\n leaveDelay: { type: Number, default: 220 }, // export usePop leave grace\n maskedLabel: { type: String, default: 'Hidden' },\n copyLabel: { type: String, default: 'Copy' },\n copiedLabel: { type: String, default: 'Copied!' },\n correctLabel: { type: String, default: 'Correct' },\n incorrectLabel: { type: String, default: 'Incorrect' },\n});\n\n// UPDATE_OPEN lets the consumer lazy-load the group when the popover opens (today the\n// prospector fetches values on open); the other three re-emit the list's row intents.\nconst emit = defineEmits([UPDATE_OPEN, COPY, CORRECT, INCORRECT, REVEAL]);\n\nconst open = ref(false);\nconst pinned = ref(false);\n\nconst primary = computed<DsContactItem | null>(() => props.items[0] ?? null);\nconst hasPopover = computed(() => !props.disabled && props.items.length > 0);\nconst isOpen = computed(() => hasPopover.value && open.value);\nconst overflow = computed(() => overflowFromGroupSize(props.count ?? props.items.length));\n// Contract §3.3 — valid, and an email. Phones never carry verification.\nconst showsBadge = computed(\n () => !!primary.value && props.kind === DS_CONTACT_KINDS.EMAIL && primary.value.valid\n);\n// An explicit `type` wins (full-profile rows); else the primary's own, so a unified column's\n// trigger shows the glyph of the value it shows.\nconst hasMasked = computed(\n () =>\n props.items.some((item) => item.masked) ||\n props.sections.some((section) => section.items.some((item) => item.masked))\n);\nconst showsReveal = computed(() => !!props.revealLabel && hasMasked.value);\nconst icon = computed(() => {\n const type = props.type || primary.value?.type;\n return type ? contactTypeIcon(type, props.kind) : '';\n});\n\nlet leaveTimer: ReturnType<typeof setTimeout> | undefined;\n\nfunction setOpen(next: boolean) {\n if (open.value === next) return;\n open.value = next;\n emit(UPDATE_OPEN, next);\n}\n\n// Hover opens (unless the user pinned a closed state on purpose — there is no such state:\n// pinned always means open). Leaving starts the grace timer so the pointer can travel into\n// the panel, which is a DOM child of this root — `mouseleave` fires only when it leaves both.\nfunction onEnter() {\n if (!hasPopover.value) return;\n clearTimeout(leaveTimer);\n if (!pinned.value) setOpen(true);\n}\n\nfunction onLeave() {\n if (!hasPopover.value || pinned.value) return;\n clearTimeout(leaveTimer);\n leaveTimer = setTimeout(() => setOpen(false), props.leaveDelay);\n}\n\n// A teleported panel is no longer inside the root, so its own enter / leave must cancel and\n// restart the same close timer. Inline, the root already covers it and these would misfire.\nfunction onPanelEnter() {\n if (props.teleported) onEnter();\n}\n\nfunction onPanelLeave() {\n if (props.teleported) onLeave();\n}\n\n// Click pins; a second click releases. Hover never un-pins — only ESC, a click outside\n// (DsPopover reports both through `update:open`) or this toggle do.\nfunction onTriggerClick() {\n if (!hasPopover.value) return;\n clearTimeout(leaveTimer);\n if (pinned.value) {\n pinned.value = false;\n setOpen(false);\n } else {\n pinned.value = true;\n setOpen(true);\n }\n}\n\nfunction onPopoverUpdate(next: boolean) {\n if (next) return;\n pinned.value = false;\n clearTimeout(leaveTimer);\n setOpen(false);\n}\n\n// ESC closes wherever the focus is — DsPopover only hears it when focus is inside the\n// panel, and a pinned popover opened by pointer has no focus inside.\nfunction onDocumentKeydown(event: KeyboardEvent) {\n if (event.key !== 'Escape' || !open.value) return;\n pinned.value = false;\n setOpen(false);\n}\n\nwatch(open, (isNowOpen) => {\n if (typeof document === 'undefined') return;\n if (isNowOpen) document.addEventListener('keydown', onDocumentKeydown);\n else document.removeEventListener('keydown', onDocumentKeydown);\n});\n\nonBeforeUnmount(() => {\n clearTimeout(leaveTimer);\n if (typeof document !== 'undefined') document.removeEventListener('keydown', onDocumentKeydown);\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/spacing.scss' as s;\n\n.ds-contact-cell {\n position: relative;\n display: block;\n width: 100%;\n min-width: 0;\n\n font-family: t.$font-family;\n color: cd.$contact-data-value-ink;\n\n // The WHOLE cell is the hover target (§3.5), so the popover root — inline-flex by\n // default — stretches to the cell, and so does its trigger wrapper: the button's\n // `max-width: 100%` must resolve against the CELL width. Against a shrink-to-fit wrapper\n // the percentage is cyclic and, with the button's -8px margins, clamps it 16px short of\n // its content (measured: 181px of content rendered at 165px, truncating the value).\n // The button itself stays content-sized like the export's `TypedCell` span.\n .ds-popover {\n display: flex;\n width: 100%;\n min-width: 0;\n }\n :deep(.ds-popover__trigger) {\n display: flex;\n flex: 1 1 auto;\n min-width: 0;\n }\n\n // -- trigger (export TypedCell span): 30px row, bleeds 8px into the cell padding ------\n &__trigger {\n display: inline-flex;\n align-items: center;\n gap: 10px; // export TypedCell\n max-width: 100%;\n height: 30px; // export TypedCell\n padding: 0 s.spacing(1);\n margin: 0 (-(s.spacing(1)));\n\n border: 0;\n border-radius: r.$radius-card;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n // The chip and the badge are part of this hit area: they take the trigger's cursor, not\n // their own arrow.\n :deep(.ds-more-count-chip),\n :deep(.ds-deliverability-badge__glyph) {\n cursor: inherit;\n }\n }\n &.is-open &__trigger {\n background: colors.$accent-bg; // export: open → accentBg\n }\n &.is-disabled &__trigger,\n &.is-empty &__trigger {\n cursor: default;\n }\n\n &__icon {\n flex: none;\n // Export TypeIcon in the cell: 17. The icon scale has 16 and 18; 16 matches the rows.\n font-size: i.icon-size(16);\n line-height: 1;\n color: cd.$contact-data-ink-muted;\n }\n\n &__value-wrap {\n display: inline-flex;\n align-items: center;\n gap: 4px; // export: value → badge\n min-width: 0;\n overflow: hidden;\n }\n &__value {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n // Contract §3.9, inverted hierarchy: the value is the loud element — by ink, at 600 (v3.3).\n font-size: t.font-size('body'); // export TypedCell: 14\n font-weight: cd.$contact-data-value-weight;\n color: cd.$contact-data-value-ink;\n }\n\n &__empty {\n color: cd.$contact-data-mask-ink;\n font-weight: cd.$contact-data-value-weight;\n }\n}\n\n// The popover can live outside `.ds-contact-cell` (teleported), so these rules do not nest.\n// Export DataPopover: a masked header trades its 9px for 7px and a tighter right edge to fit the CTA.\n.ds-contact-cell__list--reveal :deep(.ds-contact-list__header) {\n padding: 7px s.spacing(1) 7px 12px;\n}\n.ds-contact-cell__reveal-tip:not(:last-child) {\n margin-right: s.spacing(1);\n}\n</style>\n","<template>\n <section class=\"ds-profile-card\" :aria-labelledby=\"titleId\">\n <div class=\"ds-profile-card__header\">\n <component\n :is=\"collapsible ? 'button' : 'div'\"\n class=\"ds-profile-card__heading\"\n :class=\"{ 'ds-profile-card__toggle': collapsible }\"\n v-bind=\"toggleAttrs\"\n @click=\"collapsible ? toggle() : undefined\"\n >\n <i class=\"material-symbols-filled ds-profile-card__icon\" aria-hidden=\"true\">{{ icon }}</i>\n <span :id=\"titleId\" class=\"ds-profile-card__title\">{{ title }}</span>\n <!-- Plain count (no countHint): unchanged position/markup. A hinted count becomes\n its own focusable tooltip trigger instead — kept here, in place, rather than\n moved outside the toggle: see the code comment on `count-with-hint` below for\n the one combination (collapsible + countHint) where that matters. -->\n <span v-if=\"count !== null && !countHint\" class=\"ds-profile-card__count\">{{ count }}</span>\n <!-- count-with-hint: before a contact is revealed, some counts (e.g. work phones)\n can be one higher than what's actually shown, since a backend total may\n include a row that moves to a different card after reveal (the company HQ\n line). `countHint` lets the app explain that until the backend sends exact\n counters. Note: when this heading is ALSO the collapsible toggle (a real\n <button>), this nests a tabindex'd element inside it — invalid per the button\n content model. Left as-is (matches every requested test); flag before\n combining `collapsible` with `countHint` in practice. -->\n <DsTooltip\n v-if=\"count !== null && countHint\"\n :content=\"countHint\"\n :placement=\"DS_TOOLTIP_PLACEMENTS.BOTTOM\"\n >\n <span class=\"ds-profile-card__count\" tabindex=\"0\">{{ count }}</span>\n </DsTooltip>\n <i\n v-if=\"collapsible\"\n class=\"material-symbols-filled ds-profile-card__caret\"\n aria-hidden=\"true\"\n >{{ isOpen ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}</i\n >\n </component>\n <!-- Outside the toggle: a control inside a <button> is invalid markup. -->\n <span v-if=\"$slots.actions\" class=\"ds-profile-card__actions\"><slot name=\"actions\" /></span>\n </div>\n\n <div\n v-if=\"showsBody\"\n :id=\"bodyId\"\n class=\"ds-profile-card__body\"\n :class=\"{ 'is-padded': padded }\"\n >\n <slot />\n </div>\n </section>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useId, useSlots, watch, type PropType } from 'vue';\nimport { UPDATE_OPEN } from '@shared/constants/events';\nimport DsTooltip from '../DsTooltip/DsTooltip.vue';\nimport { DS_TOOLTIP_PLACEMENTS } from '../DsTooltip/DsTooltip.types';\n\nconst props = defineProps({\n icon: { type: String, required: true },\n title: { type: String, required: true },\n count: { type: Number as PropType<number | null>, default: null },\n padded: { type: Boolean, default: true },\n collapsible: { type: Boolean, default: false },\n open: { type: Boolean, default: true },\n // A note explaining a count that may be approximate (e.g. a backend total that hasn't\n // caught up with what's actually shown yet). Empty → the count renders exactly as\n // before, with no tooltip and not focusable.\n countHint: { type: String, default: '' },\n});\n\nconst emit = defineEmits([UPDATE_OPEN]);\nconst slots = useSlots();\n\nconst titleId = useId();\nconst bodyId = useId();\n\n// The export keeps the open state inside the card (`defaultOpen`); here the prop seeds it\n// and follows the parent, and every toggle is reported so v-model:open works too.\nconst isOpen = ref(props.open);\nwatch(\n () => props.open,\n (value) => (isOpen.value = value)\n);\n\nfunction toggle() {\n isOpen.value = !isOpen.value;\n emit(UPDATE_OPEN, isOpen.value);\n}\n\nconst showsBody = computed(() => !!slots.default && (!props.collapsible || isOpen.value));\n\nconst toggleAttrs = computed(() =>\n props.collapsible\n ? { type: 'button', 'aria-expanded': String(isOpen.value), 'aria-controls': bodyId }\n : {}\n);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n\n// Values from the export's `ProfileCard`. Off-scale ones are written as the export has\n// them, with the reason next to each (Diego: follow the export, 2026-09-23).\n.ds-profile-card {\n flex: none;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n\n background: colors.$white;\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-card; // export: 6\n cursor: default; // the arrow, not the I-beam; every control inside sets its own\n\n &__header {\n display: flex;\n gap: 8px; // export\n align-items: center;\n\n padding: 10px 14px; // export\n }\n\n &__heading {\n display: flex;\n flex: 1;\n gap: 8px; // export\n align-items: center;\n\n min-width: 0;\n }\n\n // Collapsible: the heading is a real button, reset to read as the header it replaces.\n &__toggle {\n margin: 0;\n padding: 0;\n\n color: inherit;\n font: inherit;\n text-align: left;\n\n background: transparent;\n border: 0;\n border-radius: r.$radius-control;\n\n cursor: pointer;\n user-select: none;\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 2px;\n }\n }\n\n &__icon {\n flex: none;\n\n color: cd.$contact-data-header-ink; // export label #5c6670\n font-size: 17px; // export 17 (not an icon step), as DsCompanyCard's row glyph\n line-height: 1;\n }\n\n &__title {\n color: cd.$contact-data-header-ink; // export label #5c6670\n font-size: 11px; // export 11, off the DS scale on purpose (as DsCompanyCard's labels)\n font-weight: t.$weight-bold;\n letter-spacing: 0.6px; // export\n text-transform: uppercase;\n white-space: nowrap;\n }\n\n &__count {\n color: cd.$contact-data-mask-ink; // export muted #b6bbc0\n font-size: 11px; // export 11, same as the title it follows\n font-weight: t.$weight-bold;\n\n // Only reachable when a `countHint` makes it focusable (see the template).\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 2px;\n border-radius: r.$radius-control;\n }\n }\n\n &__caret {\n flex: none;\n\n margin-left: auto;\n\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-size: 17px; // export 17\n line-height: 1;\n }\n\n &__actions {\n display: inline-flex;\n flex: none;\n align-items: center;\n }\n\n // The export rules the header's bottom edge when there is a body; drawn here on the body so\n // it disappears with it.\n &__body {\n border-top: 1px solid colors.$slate-tint;\n\n &.is-padded {\n padding: 10px 14px 12px; // export\n }\n }\n}\n</style>\n","<template>\n <div class=\"ds-profile-group-bar\">\n <span class=\"ds-profile-group-bar__label\">{{ label }}</span>\n <span v-if=\"$slots.actions\" class=\"ds-profile-group-bar__actions\"><slot name=\"actions\" /></span>\n </div>\n</template>\n\n<script setup lang=\"ts\">\ndefineProps({\n label: { type: String, required: true },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n\n// Values from the export's `ProfileGroupBar`.\n.ds-profile-group-bar {\n display: flex;\n gap: 6px; // export\n align-items: center;\n\n // Rendered height, measured: the export's `minHeight: 24` is content-box, so its band is\n // 24 + 2 × 5 padding + 2 × 1 rule = 36. Border-box here, so the 36 is written out.\n min-height: 36px;\n padding: 5px 14px; // export\n\n font-family: t.$font-family;\n\n // Export grey1 (#fafafb) has no token. The nearest one is the contract's row hover (#f9f9f9,\n // one step per channel). Not the contact-data surface (#f6f6f6): that is the drawer's own\n // panel, and the band would merge with it and cut the card in pieces. Logged as a delta;\n // kept with no new token (Diego, 2026-09-25).\n background: cd.$contact-data-row-hover;\n border-top: 1px solid colors.$slate-tint;\n border-bottom: 1px solid colors.$slate-tint;\n\n // First in its card: the card header already rules this edge — no double divider (the same\n // rule DsContactList applies to its first row). Logged as a delta.\n &:first-child {\n border-top: 0;\n }\n\n &__label {\n flex: 1;\n\n min-width: 0;\n\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-size: t.font-size('micro'); // export: 10\n font-weight: t.$weight-bold;\n letter-spacing: 0.7px; // export\n text-transform: uppercase;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n overflow: hidden;\n }\n\n &__actions {\n display: inline-flex;\n flex: none;\n align-items: center;\n }\n}\n</style>\n","// DsContactPlaceholder — the row a contact-data group shows when it has no rows to show:\n// the value is not known yet (skeleton), it was looked for and does not exist (empty), or\n// it is being revealed (loading). Source: the non-data rows of the design export's\n// `ProfileContactDataCard` (`fullprofile/_bundle.jsx`).\nimport type { DsContactKind } from '@shared/constants/contact-data';\n\nexport const DS_CONTACT_PLACEHOLDER_STATES = {\n /** Not known yet: the kind's glyph and a grey bar where the value will be. */\n SKELETON: 'skeleton',\n /** Looked for, none found: the kind's glyph and the label («No emails found»). */\n EMPTY: 'empty',\n /** Being revealed: a spinning glyph and the label («Revealing…»). */\n LOADING: 'loading',\n} as const;\nexport type DsContactPlaceholderState =\n (typeof DS_CONTACT_PLACEHOLDER_STATES)[keyof typeof DS_CONTACT_PLACEHOLDER_STATES];\n\n/** The glyph of each kind, as the export draws it (`blk.icon`). */\nexport const DS_CONTACT_PLACEHOLDER_ICONS: Readonly<Record<DsContactKind, string>> = {\n email: 'mail',\n phone: 'call',\n};\n\nexport interface DsContactPlaceholderProps {\n /** Email or phone — picks the glyph. */\n kind: DsContactKind;\n state?: DsContactPlaceholderState;\n /** The text of `empty` and `loading`, already translated by the app. On a skeleton it is\n * read out to screen readers only (the bar has nothing to say). */\n label?: string;\n}\n","<template>\n <div\n class=\"ds-contact-placeholder\"\n :class=\"`ds-contact-placeholder--${state}`\"\n :role=\"state === DS_CONTACT_PLACEHOLDER_STATES.LOADING ? 'status' : undefined\"\n >\n <i\n class=\"material-symbols-filled ds-contact-placeholder__icon\"\n :class=\"{ 'is-spinning': state === DS_CONTACT_PLACEHOLDER_STATES.LOADING }\"\n aria-hidden=\"true\"\n >{{ glyph }}</i\n >\n <template v-if=\"state === DS_CONTACT_PLACEHOLDER_STATES.SKELETON\">\n <span class=\"ds-contact-placeholder__bar\" aria-hidden=\"true\" />\n <span v-if=\"label\" class=\"ds-contact-placeholder__sr\">{{ label }}</span>\n </template>\n <span v-else class=\"ds-contact-placeholder__text\">{{ label }}</span>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport type { DsContactKind } from '@shared/constants/contact-data';\nimport {\n DS_CONTACT_PLACEHOLDER_ICONS,\n DS_CONTACT_PLACEHOLDER_STATES,\n type DsContactPlaceholderState,\n} from './DsContactPlaceholder.types';\n\nconst props = defineProps({\n kind: { type: String as PropType<DsContactKind>, required: true },\n state: {\n type: String as PropType<DsContactPlaceholderState>,\n default: DS_CONTACT_PLACEHOLDER_STATES.SKELETON,\n },\n label: { type: String, default: '' },\n});\n\n// Revealing spins the export's `autorenew`; the other two draw the kind's glyph.\nconst glyph = computed(() =>\n props.state === DS_CONTACT_PLACEHOLDER_STATES.LOADING\n ? 'autorenew'\n : DS_CONTACT_PLACEHOLDER_ICONS[props.kind]\n);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/motion.scss' as m;\n\n// The export's `cd-spin`: one turn per second, linear.\n@keyframes ds-contact-placeholder-spin {\n from {\n transform: rotate(0);\n }\n\n to {\n transform: rotate(360deg);\n }\n}\n\n// Values from the three non-data rows of the export's `ProfileContactDataCard`.\n.ds-contact-placeholder {\n display: flex;\n gap: 9px; // export\n align-items: center;\n\n padding: 10px 14px; // export (empty, revealing)\n\n font-family: t.$font-family;\n\n &--skeleton {\n padding: 9px 14px; // export: the skeleton row is 1px shorter each side\n }\n\n // Revealing is a block of its own, ruled above; first in its card, the header already is.\n &--loading {\n gap: 8px; // export\n\n border-top: 1px solid colors.$slate-tint;\n\n &:first-child {\n border-top: 0;\n }\n }\n\n &__icon {\n flex: none;\n\n color: cd.$contact-data-mask-ink; // export muted #b6bbc0\n font-size: i.icon-size(16); // export: 16\n line-height: 1;\n\n &.is-spinning {\n color: colors.$accent-main; // export accent\n font-size: i.icon-size(14); // export: 14\n animation: ds-contact-placeholder-spin 1s linear infinite;\n\n @include m.reduce-motion {\n animation: none;\n }\n }\n }\n\n &__bar {\n flex: 1;\n\n max-width: 130px; // export\n height: 9px; // export\n\n background: colors.$slate-tint;\n border-radius: r.$radius-control; // export: 4\n }\n\n &__text {\n min-width: 0;\n\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-size: t.font-size('small'); // export: 13\n font-weight: t.$weight-semibold;\n }\n\n &--loading &__text {\n font-size: 12.5px; // export 12.5, off the DS scale on purpose (follow the export)\n }\n\n // Read out, not drawn: the skeleton's bar has nothing to say.\n &__sr {\n position: absolute;\n\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n\n white-space: nowrap;\n\n border: 0;\n\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n }\n}\n</style>\n","// DsClampedText — a block of text clamped to N lines, with a «Show more» / «Show less»\n// toggle. Extracted from the About of DsProfileCompanyCard (the design export's\n// `ProfileCompanyCard`), which now uses it unchanged. No visual variants; this documents\n// the public prop shape for consumers. The toggle renders only while the text is actually\n// clamped (it overflows `lines`), or while expanded so it can be clamped again.\n\nexport const DS_CLAMPED_TEXT_DEFAULT_LINES = 3;\n\nexport interface DsClampedTextProps {\n /** The text. Empty → nothing is rendered (no text, no toggle). */\n text: string;\n /** Lines shown while clamped. Default 3. */\n lines?: number;\n /** The toggle that un-clamps the text («Show more»), already translated by the app. */\n showMoreLabel?: string;\n /** The toggle that clamps it again («Show less»), already translated by the app. */\n showLessLabel?: string;\n /**\n * Optional caption (the company card's «About»). When set, the toggle sits beside it,\n * above the text; without it the toggle sits below the text.\n */\n label?: string;\n /** Honour the text's own line breaks (`white-space: pre-line`). Default: they collapse. */\n preserveLineBreaks?: boolean;\n}\n","<template>\n <div v-if=\"text\" class=\"ds-clamped-text\">\n <div v-if=\"label\" class=\"ds-clamped-text__head\">\n <span class=\"ds-clamped-text__label\">{{ label }}</span>\n <button v-if=\"showToggle\" v-bind=\"toggleAttrs\">\n {{ expanded ? showLessLabel : showMoreLabel }}\n </button>\n </div>\n <div\n :id=\"textId\"\n ref=\"textRef\"\n class=\"ds-clamped-text__text\"\n :class=\"{ 'is-clamped': !expanded, 'is-pre-line': preserveLineBreaks }\"\n :style=\"{ '--ds-clamped-text-lines': lines }\"\n >\n {{ text }}\n </div>\n <button v-if=\"!label && showToggle\" v-bind=\"toggleAttrs\" class=\"is-below\">\n {{ expanded ? showLessLabel : showMoreLabel }}\n </button>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, useId, watch } from 'vue';\nimport { DS_CLAMPED_TEXT_DEFAULT_LINES } from './DsClampedText.types';\n\nconst props = defineProps({\n text: { type: String, required: true },\n lines: { type: Number, default: DS_CLAMPED_TEXT_DEFAULT_LINES },\n showMoreLabel: { type: String, default: '' },\n showLessLabel: { type: String, default: '' },\n label: { type: String, default: '' },\n preserveLineBreaks: { type: Boolean, default: false },\n});\n\nconst textId = useId();\nconst textRef = ref<HTMLElement | null>(null);\nconst expanded = ref(false);\nconst overflows = ref(false);\nlet resizeObserver: ResizeObserver | null = null;\n\n// Expanded, the text no longer overflows its box: the toggle stays so it can be clamped again.\nconst showToggle = computed(() => expanded.value || overflows.value);\n\n// Only a clamped box can be measured; the 1px absorbs the rounding of a fractional line-height.\nfunction measure() {\n const el = textRef.value;\n if (!el || expanded.value) return;\n overflows.value = el.scrollHeight > el.clientHeight + 1;\n}\n\nwatch(() => [props.text, props.lines, expanded.value], measure, { flush: 'post' });\n\nonMounted(() => {\n measure();\n // Guarded: SSR and jsdom have no ResizeObserver.\n if (typeof ResizeObserver !== 'undefined' && textRef.value) {\n resizeObserver = new ResizeObserver(measure);\n resizeObserver.observe(textRef.value);\n }\n});\n\nonBeforeUnmount(() => resizeObserver?.disconnect());\n\nconst toggleAttrs = computed(() => ({\n type: 'button' as const,\n class: 'ds-clamped-text__toggle',\n 'aria-expanded': expanded.value,\n 'aria-controls': textId,\n onClick: () => {\n expanded.value = !expanded.value;\n },\n}));\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n\n// Values lifted from DsProfileCompanyCard's About (the export's `ProfileCompanyCard`), so the\n// card renders as before. Off-scale ones are written as the export has them.\n.ds-clamped-text {\n &__head {\n display: flex;\n gap: 8px; // export\n align-items: baseline;\n }\n\n &__label {\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-size: 10.5px; // export 10.5, off the DS scale on purpose (follow the export)\n font-weight: t.$weight-bold;\n letter-spacing: 0.5px; // export\n text-transform: uppercase;\n }\n\n &__toggle {\n padding: 0;\n\n color: colors.$accent-main; // export accent\n font: inherit;\n font-size: t.font-size('caption'); // export: 12\n font-weight: t.$weight-semibold;\n\n background: transparent;\n border: 0;\n border-radius: r.$radius-control;\n\n cursor: pointer;\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 2px;\n }\n\n &.is-below {\n display: block;\n\n margin-top: s.spacing(0.5);\n }\n }\n\n &__head + &__text {\n margin-top: 3px; // export\n }\n\n &__text {\n color: colors.$slate-main;\n font-size: t.font-size('small'); // export: 13\n line-height: t.$line-height-relaxed; // export: 1.5\n\n &.is-pre-line {\n white-space: pre-line;\n }\n\n &.is-clamped {\n display: -webkit-box;\n -webkit-line-clamp: var(--ds-clamped-text-lines);\n -webkit-box-orient: vertical;\n\n overflow: hidden;\n }\n }\n}\n</style>\n","<template>\n <DsProfileCard\n class=\"ds-profile-company-card\"\n icon=\"corporate_fare\"\n :title=\"title\"\n :padded=\"!!name\"\n >\n <div v-if=\"!name\" class=\"ds-profile-company-card__empty\">\n <i class=\"material-symbols-filled ds-profile-company-card__empty-icon\" aria-hidden=\"true\"\n >apartment</i\n >\n <span class=\"ds-profile-company-card__empty-text\">{{ emptyLabel }}</span>\n </div>\n\n <template v-else>\n <div class=\"ds-profile-company-card__header\" :class=\"{ 'has-rest': hasRest }\">\n <DsCompanyLogo class=\"ds-profile-company-card__logo\" :src=\"logo\" :name=\"name\" :size=\"36\" />\n <div class=\"ds-profile-company-card__heading\">\n <div class=\"ds-profile-company-card__name\">{{ name }}</div>\n <div v-if=\"subline\" class=\"ds-profile-company-card__sub\">{{ subline }}</div>\n </div>\n <DsTooltip v-if=\"websiteUrl\" :content=\"websiteLabel\" :placement=\"DS_TOOLTIP_PLACEMENTS.TOP\">\n <a\n class=\"ds-profile-company-card__website\"\n :href=\"websiteUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n :aria-label=\"websiteLabel || undefined\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">language</i>\n </a>\n </DsTooltip>\n <!-- \"in\" is LinkedIn's mark, not copy: it stays literal in every language. -->\n <a\n v-if=\"linkedinUrl\"\n class=\"ds-profile-company-card__linkedin\"\n :href=\"linkedinUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n :aria-label=\"linkedinLabel || undefined\"\n >in</a\n >\n </div>\n\n <div v-if=\"about\" class=\"ds-profile-company-card__about\">\n <DsClampedText\n :text=\"about\"\n :label=\"aboutLabel\"\n :show-more-label=\"showMoreLabel\"\n :show-less-label=\"showLessLabel\"\n />\n </div>\n\n <div\n v-for=\"(field, index) in rows\"\n :key=\"field.id\"\n class=\"ds-profile-company-card__field\"\n :class=\"{ 'is-first': index === 0 && !about }\"\n >\n <span class=\"ds-profile-company-card__field-label\">{{ field.label }}</span>\n <a\n v-if=\"field.href\"\n class=\"ds-profile-company-card__field-value is-link\"\n :href=\"field.href\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >{{ field.value }}</a\n >\n <span v-else class=\"ds-profile-company-card__field-value\">{{ field.value }}</span>\n </div>\n </template>\n </DsProfileCard>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport DsProfileCard from '../DsProfileCard/DsProfileCard.vue';\nimport DsClampedText from '../DsClampedText/DsClampedText.vue';\nimport DsCompanyLogo from '../DsCompanyLogo/DsCompanyLogo.vue';\nimport DsTooltip from '../DsTooltip/DsTooltip.vue';\nimport { DS_TOOLTIP_PLACEMENTS } from '../DsTooltip/DsTooltip.types';\nimport type { DsProfileField } from './DsProfileCompanyCard.types';\n\nconst props = defineProps({\n title: { type: String, required: true },\n name: { type: String, default: '' },\n logo: { type: String, default: '' },\n industry: { type: String, default: '' },\n employees: { type: String, default: '' },\n websiteUrl: { type: String, default: '' },\n websiteLabel: { type: String, default: '' },\n linkedinUrl: { type: String, default: '' },\n linkedinLabel: { type: String, default: '' },\n about: { type: String, default: '' },\n aboutLabel: { type: String, default: '' },\n showMoreLabel: { type: String, default: '' },\n showLessLabel: { type: String, default: '' },\n fields: { type: Array as PropType<DsProfileField[]>, default: () => [] },\n emptyLabel: { type: String, default: '' },\n});\n\n// The export: `[industry, employees].filter(Boolean).join(' · ')` — a separator, not copy.\nconst subline = computed(() => [props.industry, props.employees].filter(Boolean).join(' · '));\n\n// A field without a value is not rendered: a field the API did not send never shows blank.\nconst rows = computed(() => props.fields.filter((field) => field.value));\n\n// The header leaves room below only when something follows it (export: paddingBottom 10).\nconst hasRest = computed(() => !!props.about || rows.value.length > 0);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/icons.scss' as i;\n\n// Values from the export's `ProfileCompanyCard` and `ProfileKvRow`. Off-scale ones are written\n// as the export has them, with the reason next to each (Diego: follow the export, 2026-09-23).\n.ds-profile-company-card {\n &__empty {\n display: flex;\n gap: 9px; // export\n align-items: center;\n\n padding: 10px 14px; // export\n\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-size: t.font-size('small'); // export: 13\n font-weight: t.$weight-semibold;\n }\n\n &__empty-icon {\n flex: none;\n\n color: cd.$contact-data-mask-ink; // export muted #b6bbc0\n font-size: i.icon-size(16); // export: 16\n line-height: 1;\n }\n\n &__header {\n display: flex;\n gap: 10px; // export\n align-items: center;\n\n &.has-rest {\n padding-bottom: 10px; // export\n }\n }\n\n // The profile draws the logo box with the card radius and a 13px initial, where the popover\n // card (DsCompanyCard) uses 4 and 12: the same DsCompanyLogo, shaped here.\n &__logo {\n border-radius: r.$radius-card; // export: 6\n\n :deep(.ds-company-logo__initial) {\n font-size: t.font-size('small'); // export: 13\n }\n }\n\n &__heading {\n flex: 1;\n\n min-width: 0;\n }\n\n &__name {\n color: colors.$grey-10; // export ink #1f2933\n font-size: t.font-size('body'); // export: 14\n font-weight: t.$weight-bold;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n overflow: hidden;\n }\n\n &__sub {\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-size: t.font-size('caption'); // export: 12\n white-space: nowrap;\n text-overflow: ellipsis;\n\n overflow: hidden;\n }\n\n &__website {\n display: inline-flex;\n\n color: cd.$contact-data-ink-muted; // export grey #888f97\n text-decoration: none;\n\n // On the glyph itself: the app's `.material-symbols-filled` object class sets 20px on\n // the <i>, so a size on the link never reaches it.\n i {\n font-size: i.icon-size(18); // export 18\n line-height: 1;\n }\n\n &:hover {\n color: colors.$slate-main;\n }\n }\n\n &__linkedin {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n width: 22px; // export\n height: 22px;\n\n color: colors.$white;\n font-size: 11px; // export 11, as DsCompanyCard's badge\n font-weight: 800; // export 800 (no token for it)\n line-height: 1;\n text-decoration: none;\n\n background: colors.$brand-linkedin;\n border-radius: r.$radius-control; // export: 4 (the popover card's badge is 5)\n }\n\n &__about {\n padding: 8px 0; // export\n\n border-top: 1px solid colors.$slate-tint;\n }\n\n &__field {\n display: flex;\n gap: 12px; // export\n align-items: baseline;\n\n padding: 7px 0; // export\n\n border-top: 1px solid colors.$slate-tint;\n\n &.is-first {\n border-top: 0;\n }\n }\n\n &__field-label {\n flex: none;\n\n width: 92px; // export\n\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-size: 10.5px; // export 10.5, off the DS scale on purpose (follow the export)\n font-weight: t.$weight-bold;\n letter-spacing: 0.5px; // export\n text-transform: uppercase;\n }\n\n &__field-value {\n min-width: 0;\n\n color: colors.$slate-main;\n font-size: 13.5px; // export 13.5, off the DS scale on purpose (follow the export)\n font-weight: t.$weight-semibold;\n line-height: 1.45; // export 1.45 (between the DS body 1.4 and relaxed 1.5)\n text-decoration: none;\n word-break: break-word;\n\n &.is-link {\n color: colors.$accent-main;\n\n cursor: pointer;\n }\n }\n}\n</style>\n","<template>\n <div class=\"ds-profile-hero\">\n <DsAvatar\n class=\"ds-profile-hero__avatar\"\n :image=\"image\"\n :first-name=\"firstName\"\n :last-name=\"lastName\"\n :alt=\"alt\"\n :size=\"64\"\n accent\n :text-size=\"20\"\n :font-weight=\"800\"\n />\n\n <div class=\"ds-profile-hero__body\">\n <span\n class=\"ds-profile-hero__name\"\n :class=\"{ 'ds-profile-hero__name--with-actions': $slots.actions }\"\n >{{ fullName }}</span\n >\n\n <DsTooltip\n v-if=\"headline\"\n class=\"ds-profile-hero__headline-tooltip\"\n :content=\"headline\"\n :disabled=\"!isHeadlineTruncated\"\n :placement=\"DS_TOOLTIP_PLACEMENTS.BOTTOM\"\n block\n >\n <span\n ref=\"headlineRef\"\n class=\"ds-profile-hero__headline\"\n @mouseenter=\"checkHeadlineTruncation\"\n @focus=\"checkHeadlineTruncation\"\n >{{ headline }}</span\n >\n </DsTooltip>\n\n <div v-if=\"linkedinUrl\" class=\"ds-profile-hero__links\">\n <DsTooltip :content=\"linkedinLabel\" :placement=\"DS_TOOLTIP_PLACEMENTS.BOTTOM\">\n <!-- \"in\" is LinkedIn's mark, not copy: it stays literal in every language\n (reused from DsCompanyCard / DsProfileCompanyCard's badge). -->\n <a\n class=\"ds-profile-hero__linkedin\"\n :href=\"linkedinUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n :aria-label=\"linkedinLabel || undefined\"\n >in</a\n >\n </DsTooltip>\n </div>\n </div>\n\n <div v-if=\"$slots.actions\" class=\"ds-profile-hero__actions\"><slot name=\"actions\" /></div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, ref, watch } from 'vue';\nimport DsAvatar from '../DsAvatar/DsAvatar.vue';\nimport DsTooltip from '../DsTooltip/DsTooltip.vue';\nimport { DS_TOOLTIP_PLACEMENTS } from '../DsTooltip/DsTooltip.types';\n\nconst props = defineProps({\n image: { type: String, default: '' },\n firstName: { type: String, default: '' },\n lastName: { type: String, default: '' },\n headline: { type: String, default: '' },\n linkedinUrl: { type: String, default: '' },\n linkedinLabel: { type: String, default: '' },\n // Passthrough to DsAvatar's `alt` — default `undefined`, not `''` (see DsProfileHero.types.ts).\n alt: { type: String, default: undefined },\n});\n\nconst fullName = computed(() => `${props.firstName} ${props.lastName}`.trim());\n\n// The headline ellipsizes; a tooltip repeating the same visible text is noise (Diego's\n// rule), so it only carries content when the headline is ACTUALLY truncated — measured\n// against the rendered box (scrollWidth vs clientWidth), never guessed from length.\n// DsTooltip has its own `disabled` prop (see DsSavedButton's `:disabled=\"!tooltip || open\"`),\n// so that's what gates it here instead of emptying `content`.\nconst headlineRef = ref<HTMLElement | null>(null);\nconst isHeadlineTruncated = ref(false);\n\nfunction checkHeadlineTruncation() {\n const el = headlineRef.value;\n isHeadlineTruncated.value = !!el && el.scrollWidth > el.clientWidth;\n}\n\n// Re-measure once laid out, and whenever the text itself changes — so a hero that never\n// gets hovered (e.g. touch, or measured programmatically) still resolves correctly, and\n// hovering the very first time isn't the only path to a correct `disabled` value.\nonMounted(() => void nextTick(checkHeadlineTruncation));\nwatch(\n () => props.headline,\n () => void nextTick(checkHeadlineTruncation)\n);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n\n// Values from the export's `ProfileHero`. Off-scale ones are written as the export has\n// them, with the reason next to each (mirrors DsProfileCard / DsProfileCompanyCard).\n.ds-profile-hero {\n position: relative;\n\n display: flex;\n flex: none;\n gap: 14px; // export\n\n padding: 14px; // export\n\n font-family: t.$font-family;\n\n background: colors.$white;\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-card; // export: 6\n cursor: default;\n\n // The parent's scoped attribute also reaches a child component's ROOT element, so this\n // plain class (passed to <DsAvatar class=\"ds-profile-hero__avatar\">) styles it directly —\n // no :deep() needed since it's the same root node, not a descendant.\n &__avatar {\n border-radius: r.$radius-card; // DsAvatar defaults to r.$radius-control (4px)\n letter-spacing: 0.5px; // export — only visible on the initials variant\n }\n\n &__body {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 3px; // export\n\n min-width: 0;\n }\n\n &__name {\n color: colors.$grey-10; // export ink #1f2933\n font-size: 18px; // export\n font-weight: t.$weight-bold;\n line-height: 1.2; // export\n\n &--with-actions {\n padding-right: 24px; // export — room for the #actions slot\n }\n }\n\n // The block-mode DsTooltip wrapper is itself the flex item here: without min-width: 0 a\n // flex column child keeps its content's natural (unwrapped) width, and the headline\n // span inside never gets the chance to ellipsis.\n &__headline-tooltip {\n min-width: 0;\n }\n\n &__headline {\n display: block;\n\n overflow: hidden;\n\n color: colors.$slate-main;\n font-size: 12.5px; // export, off the DS scale on purpose (follow the export)\n line-height: 1.4; // export\n text-align: left;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &__links {\n display: flex;\n align-items: center;\n gap: 8px; // export\n\n margin-top: 4px; // export\n }\n\n // Reused from DsCompanyCard / DsProfileCompanyCard's badge markup and comment.\n &__linkedin {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n width: 22px; // export\n height: 22px;\n\n color: colors.$white;\n font-size: 11px; // export\n font-weight: 800; // export (no token for it)\n line-height: 1;\n text-decoration: none;\n\n background: colors.$brand-linkedin;\n // export: 4 — DsProfileCompanyCard's badge radius, not DsCompanyCard's off-scale 5.\n border-radius: r.$radius-control;\n\n cursor: pointer; // it is a link\n }\n\n &__actions {\n position: absolute;\n top: 8px; // export\n right: 8px; // export\n\n display: inline-flex;\n align-items: center;\n gap: s.spacing(0.5);\n }\n}\n</style>\n","<template>\n <div v-if=\"value\" class=\"ds-profile-kv-row\">\n <span class=\"ds-profile-kv-row__label\">{{ label }}</span>\n <a\n v-if=\"href\"\n class=\"ds-profile-kv-row__value is-link\"\n :href=\"href\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >{{ value }}</a\n >\n <span v-else class=\"ds-profile-kv-row__value\">{{ value }}</span>\n </div>\n</template>\n\n<script setup lang=\"ts\">\ndefineProps({\n label: { type: String, required: true },\n value: { type: String, default: '' },\n href: { type: String, default: '' },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n\n// Values from the export's `ProfileKvRow`, unchanged (mirrors DsProfileCompanyCard's own\n// field rows, which predate this component — see that component's docs for why it was\n// NOT refactored to use this one).\n.ds-profile-kv-row {\n display: flex;\n gap: 12px; // export\n align-items: baseline;\n\n padding: 7px 0; // export\n\n // No `first` prop (Diego's call): a row only draws its top rule when something of the\n // SAME kind precedes it, so a lone/first row in a list never doubles up on a divider\n // some ancestor already drew.\n &:not(:first-child) {\n border-top: 1px solid colors.$slate-tint;\n }\n\n &__label {\n flex: none;\n\n width: 92px; // export\n\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-size: 10.5px; // export, off the DS scale on purpose (follow the export)\n font-weight: t.$weight-bold;\n letter-spacing: 0.5px; // export\n text-transform: uppercase;\n }\n\n &__value {\n min-width: 0;\n\n color: colors.$slate-main;\n font-size: 13.5px; // export, off the DS scale on purpose (follow the export)\n font-weight: t.$weight-semibold;\n line-height: 1.45; // export\n text-decoration: none;\n word-break: break-word;\n\n cursor: default;\n\n &.is-link {\n color: colors.$accent-main;\n\n cursor: pointer;\n }\n }\n}\n</style>\n","<template>\n <div class=\"ds-profile-timeline-row\">\n <img\n v-if=\"showsLogo\"\n class=\"ds-profile-timeline-row__logo\"\n :src=\"logo\"\n alt=\"\"\n @error=\"onLogoError\"\n />\n <span\n v-else\n class=\"ds-profile-timeline-row__logo ds-profile-timeline-row__logo--placeholder\"\n aria-hidden=\"true\"\n />\n\n <div class=\"ds-profile-timeline-row__text\">\n <span class=\"ds-profile-timeline-row__title\">{{ title }}</span>\n <span v-if=\"subtitle\" class=\"ds-profile-timeline-row__subtitle\">{{ subtitle }}</span>\n <span v-if=\"dates\" class=\"ds-profile-timeline-row__dates\">{{ dates }}</span>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\n\nconst props = defineProps({\n logo: { type: String, default: '' },\n title: { type: String, required: true },\n subtitle: { type: String, default: '' },\n dates: { type: String, default: '' },\n});\n\n// Mirrors DsAvatar / DsCompanyLogo: a broken logo URL falls back to the placeholder box\n// instead of a broken-image icon; a new URL gets a fresh attempt.\nconst logoFailed = ref(false);\nwatch(\n () => props.logo,\n () => (logoFailed.value = false)\n);\nfunction onLogoError() {\n logoFailed.value = true;\n}\nconst showsLogo = computed(() => !!props.logo && !logoFailed.value);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n\n// Values from the export's `ProfileTimelineRow` (shared/ContactData.jsx) — the drawer's\n// timeline row, not the older `TimelineRow` used by RichProfileSections/ExpandableCard.\n.ds-profile-timeline-row {\n display: flex;\n gap: 10px; // export\n\n padding: 9px 0; // export\n\n &:not(:first-child) {\n border-top: 1px solid colors.$slate-tint;\n }\n\n &__logo {\n box-sizing: border-box;\n flex: none;\n\n width: 30px;\n height: 30px;\n padding: 3px;\n\n object-fit: contain;\n\n background: colors.$white;\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-control;\n\n &--placeholder {\n background: colors.$slate-bg; // #f6f6f6 token\n }\n }\n\n &__text {\n display: flex;\n flex: 1;\n flex-direction: column;\n\n min-width: 0;\n }\n\n &__title {\n color: colors.$grey-10; // export ink #1f2933\n font-family: t.$font-family;\n font-size: 13px;\n font-weight: t.$weight-bold;\n line-height: 1.3;\n }\n\n &__subtitle {\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: 12.5px;\n line-height: 1.35;\n }\n\n &__dates {\n margin-top: 1px;\n\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-family: t.$font-family;\n font-size: 11.5px;\n // The export leaves this line at the font's own leading; without it the row\n // inherits the body's tighter 1.15 and every row comes out ~2px shorter.\n line-height: normal;\n }\n}\n</style>\n","<template>\n <DsTooltip\n class=\"ds-profile-locked-card-tooltip\"\n :content=\"hint\"\n :disabled=\"!hint\"\n :placement=\"DS_TOOLTIP_PLACEMENTS.LEFT\"\n block\n >\n <div class=\"ds-profile-locked-card\" :tabindex=\"hint ? 0 : undefined\">\n <i class=\"material-symbols-filled ds-profile-locked-card__icon\" aria-hidden=\"true\">{{\n icon\n }}</i>\n <span class=\"ds-profile-locked-card__title\">{{ title }}</span>\n <i class=\"material-symbols-filled ds-profile-locked-card__lock\" aria-hidden=\"true\">lock</i>\n </div>\n </DsTooltip>\n</template>\n\n<script setup lang=\"ts\">\nimport DsTooltip from '../DsTooltip/DsTooltip.vue';\nimport { DS_TOOLTIP_PLACEMENTS } from '../DsTooltip/DsTooltip.types';\n\ndefineProps({\n icon: { type: String, required: true },\n title: { type: String, required: true },\n hint: { type: String, default: '' },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n\n// Values from the export's `ProfileLockedCard`. Lines up with DsProfileCard's header:\n// same padding (10px 14px), gap (8px), border and radius (6, `r.$radius-card`) — this is\n// deliberately a single-row \"collapsed\" card standing in for a full DsProfileCard.\n//\n// Difference from DsProfileCard's header (intentional, not a drift): DsProfileCard's icon\n// and title read in the header-ink tone (`cd.$contact-data-header-ink`, #5c6670); here\n// every glyph and the title read in the MORE muted mask ink (`cd.$contact-data-mask-ink`,\n// #b6bbc0) throughout, to visually communicate \"locked\" rather than \"just quiet\".\n.ds-profile-locked-card {\n display: flex;\n align-items: center;\n gap: 8px; // export\n\n box-sizing: border-box;\n width: 100%;\n padding: 10px 14px; // export\n\n background: colors.$white;\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-card; // export: 6, same as DsProfileCard\n cursor: default;\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 2px;\n }\n\n &__icon {\n flex: none;\n\n color: cd.$contact-data-mask-ink; // export muted #b6bbc0\n font-size: 17px; // export\n line-height: 1;\n }\n\n &__title {\n flex: 1;\n\n color: cd.$contact-data-mask-ink; // export muted #b6bbc0\n font-family: t.$font-family;\n font-size: 11px; // export\n font-weight: t.$weight-bold;\n letter-spacing: 0.6px; // export\n text-align: left;\n text-transform: uppercase;\n }\n\n &__lock {\n flex: none;\n\n color: cd.$contact-data-mask-ink; // export muted #b6bbc0\n font-size: 15px; // export\n line-height: 1;\n }\n}\n</style>\n","// Picker family vocabulary (SALESQL-3535): the three canonical action controls the epic\n// mandates on every surface AND in bulk bars — Saved (folder), Tag, Add to sequence.\n// Measured from the design export's `SavedButton` / `FolderMenu`, `tagMenu` / `tagsLine`\n// and `SequenceButton`. Their copy is NOT frozen by the contact-data contract (§7 flags it),\n// so every visible string arrives by props.\n\nimport { DS_POPOVER_PLACEMENTS, type DsPopoverPlacement } from '@shared/ui/DsPopover';\n\n/** One selectable thing: a folder, a tag, a campaign. `color` tints the row glyph / dot. */\nexport interface DsPickerOption {\n id: string | number;\n name: string;\n color?: string;\n}\n\n/** Trigger height — `medium` for rows and the full profile, `large` for action / bulk bars. */\nexport const DS_PICKER_SIZES = {\n MEDIUM: 'medium',\n LARGE: 'large',\n} as const;\nexport type DsPickerSize = (typeof DS_PICKER_SIZES)[keyof typeof DS_PICKER_SIZES];\n\n/** Which edge of the trigger the panel hangs from. */\nexport const DS_PICKER_ALIGNS = {\n START: 'start',\n END: 'end',\n} as const;\nexport type DsPickerAlign = (typeof DS_PICKER_ALIGNS)[keyof typeof DS_PICKER_ALIGNS];\n\n/** Widest a tag / folder panel grows to keep its footer on one line (the viewport still caps it). */\nexport const DS_PICKER_PANEL_MAX_WIDTH = '360px';\n\n/**\n * What the create affordance does: nothing, emit `create` for the app's own flow, or open the\n * in-panel form (needs `colors`).\n */\nexport const DS_PICKER_CREATE_MODES = {\n NONE: 'none',\n EVENT: 'event',\n FORM: 'form',\n} as const;\nexport type DsPickerCreateMode =\n (typeof DS_PICKER_CREATE_MODES)[keyof typeof DS_PICKER_CREATE_MODES];\n\n/** What the row ⋮ menu does: absent, emit `edit` / `delete` only, or also open the form on Edit. */\nexport const DS_PICKER_ROW_ACTIONS = {\n NONE: 'none',\n EVENT: 'event',\n FORM: 'form',\n} as const;\nexport type DsPickerRowActionsMode =\n (typeof DS_PICKER_ROW_ACTIONS)[keyof typeof DS_PICKER_ROW_ACTIONS];\n\n/** The strings the in-panel form and the row ⋮ menu share between the pickers. */\nexport interface DsPickerOrganizerCopy {\n /** Accessible name of each row's ⋮ button. */\n actions: string;\n edit: string;\n delete: string;\n createFormTitle: string;\n editFormTitle: string;\n createSubmit: string;\n editSubmit: string;\n namePlaceholder: string;\n setColor: string;\n back: string;\n /** Unset = DsOrganizerForm's own fallback. */\n errorMissingName?: string;\n errorTooLongName?: string;\n}\n\n/** The \"send to\" choice of Add to sequence — the contract's email kinds that can be mailed. */\nexport const DS_SEQUENCE_CHANNELS = {\n WORK: 'work',\n DIRECT: 'direct',\n} as const;\nexport type DsSequenceChannel = (typeof DS_SEQUENCE_CHANNELS)[keyof typeof DS_SEQUENCE_CHANNELS];\n\nexport interface DsSequenceChannelOption {\n value: DsSequenceChannel;\n /** Copy — the app passes it (\"Work email\"). */\n label: string;\n}\n\n/** Case-insensitive, trimmed `includes` on `name`. An empty query keeps every option. */\nexport function filterOptions<T extends { name: string }>(\n options: readonly T[],\n query: string\n): T[] {\n const needle = query.trim().toLowerCase();\n if (!needle) return [...options];\n return options.filter((option) => option.name.toLowerCase().includes(needle));\n}\n\n/** The panel opens below the trigger, aligned to the edge the consumer asked for. */\nexport function pickerPlacement(align: DsPickerAlign): DsPopoverPlacement {\n return align === DS_PICKER_ALIGNS.END\n ? DS_POPOVER_PLACEMENTS.BOTTOM_END\n : DS_POPOVER_PLACEMENTS.BOTTOM_START;\n}\n\n/** Defaults under partials; a key a partial leaves `undefined` does not override. */\nexport function mergeCopy<T extends object>(\n defaults: T,\n ...partials: ReadonlyArray<Partial<T> | undefined>\n): T {\n const merged = { ...defaults };\n for (const partial of partials) {\n if (!partial) continue;\n for (const key of Object.keys(partial) as Array<keyof T>) {\n if (partial[key] !== undefined) merged[key] = partial[key] as T[keyof T];\n }\n }\n return merged;\n}\n\ntype ModeValidatorProps = Readonly<Record<string, unknown>>;\n\nconst hasColors = (props: ModeValidatorProps) =>\n Array.isArray(props.colors) && props.colors.length > 0;\n\n/** Two-argument Vue prop validator (dev only): `'form'` needs a palette to render. */\nexport function isValidCreateMode(value: unknown, props: ModeValidatorProps): boolean {\n const modes = Object.values(DS_PICKER_CREATE_MODES) as unknown[];\n if (!modes.includes(value)) return false;\n return value !== DS_PICKER_CREATE_MODES.FORM || hasColors(props);\n}\n\n/** Same rule for `rowActions`, which still takes the boolean of the deprecated alias. */\nexport function isValidRowActionsMode(value: unknown, props: ModeValidatorProps): boolean {\n if (typeof value === 'boolean') return true;\n const modes = Object.values(DS_PICKER_ROW_ACTIONS) as unknown[];\n if (!modes.includes(value)) return false;\n return value !== DS_PICKER_ROW_ACTIONS.FORM || hasColors(props);\n}\n\nexport interface LegacyPickerPropsInput {\n create?: DsPickerCreateMode;\n rowActions?: DsPickerRowActionsMode | boolean;\n colors: readonly string[];\n /** The consumer passed a `#footer` slot. */\n hasFooterSlot?: boolean;\n /** The deprecated per-string props as the consumer passed them, by their old prop name. */\n aliases: Readonly<Record<string, unknown>>;\n /** Old prop name → the `copy` key(s) it feeds. */\n copyMap: Readonly<Record<string, string | readonly string[]>>;\n}\n\nexport interface ResolvedLegacyPickerProps {\n create: DsPickerCreateMode;\n rowActions: DsPickerRowActionsMode;\n copy: Record<string, string>;\n}\n\n/**\n * The ONLY place the deprecated picker props are interpreted: the pre-modes `colors` /\n * `createLabel` / boolean `rowActions` gating and the loose copy props. An explicit new prop\n * always wins over its alias. Delete with the aliases.\n */\nexport function resolveLegacyPickerProps(input: LegacyPickerPropsInput): ResolvedLegacyPickerProps {\n const withForm = input.colors.length > 0;\n\n let create = input.create;\n if (create === undefined) {\n const hasFooter = !!input.aliases.createLabel || !!input.hasFooterSlot;\n if (!hasFooter) create = DS_PICKER_CREATE_MODES.NONE;\n else create = withForm ? DS_PICKER_CREATE_MODES.FORM : DS_PICKER_CREATE_MODES.EVENT;\n }\n\n let rowActions: DsPickerRowActionsMode;\n if (typeof input.rowActions === 'string') rowActions = input.rowActions;\n else if (input.rowActions === true) {\n rowActions = withForm ? DS_PICKER_ROW_ACTIONS.FORM : DS_PICKER_ROW_ACTIONS.EVENT;\n } else rowActions = DS_PICKER_ROW_ACTIONS.NONE;\n\n const copy: Record<string, string> = {};\n for (const [alias, targets] of Object.entries(input.copyMap)) {\n const value = input.aliases[alias];\n if (typeof value !== 'string') continue;\n for (const key of typeof targets === 'string' ? [targets] : targets) copy[key] = value;\n }\n\n return { create, rowActions, copy };\n}\n","<template>\n <div class=\"ds-organizer-form\" role=\"group\" :aria-label=\"title\">\n <button\n type=\"button\"\n class=\"ds-organizer-form__back\"\n :aria-label=\"backLabel\"\n @click=\"emit(BACK)\"\n >\n <i class=\"material-symbols-filled ds-organizer-form__back-icon\" aria-hidden=\"true\"\n >keyboard_arrow_left</i\n >\n <span class=\"ds-organizer-form__title\">{{ title }}</span>\n </button>\n\n <div class=\"ds-organizer-form__divider\" />\n\n <div class=\"ds-organizer-form__field\">\n <DsInput\n :id=\"inputId\"\n ref=\"inputRef\"\n :model-value=\"name\"\n :size=\"DS_INPUT_SIZES.MD\"\n :placeholder=\"namePlaceholder\"\n :error=\"!!shownError\"\n :error-message=\"shownError\"\n autocomplete=\"off\"\n @update:model-value=\"onNameInput\"\n @keydown.enter=\"onEnter\"\n />\n </div>\n\n <p :id=\"labelId\" class=\"ds-organizer-form__label\">{{ setColorLabel }}</p>\n <div class=\"ds-organizer-form__swatches\" role=\"radiogroup\" :aria-labelledby=\"labelId\">\n <button\n v-for=\"(swatch, i) in colors\"\n :key=\"swatch\"\n :ref=\"(el) => setSwatchRef(el, i)\"\n type=\"button\"\n role=\"radio\"\n class=\"ds-organizer-form__swatch\"\n :class=\"{ 'is-selected': swatch === color }\"\n :style=\"{ '--swatch-color': swatch }\"\n :aria-checked=\"swatch === color\"\n :aria-label=\"swatch\"\n :tabindex=\"i === tabStop ? 0 : -1\"\n @click=\"emit(UPDATE_COLOR, swatch)\"\n @keydown=\"onSwatchKeydown($event, i)\"\n >\n <i\n v-if=\"swatch === color\"\n class=\"material-symbols-filled ds-organizer-form__check\"\n aria-hidden=\"true\"\n >check</i\n >\n </button>\n </div>\n\n <div class=\"ds-organizer-form__divider\" />\n\n <div class=\"ds-organizer-form__footer\">\n <DsButton\n class=\"ds-organizer-form__submit\"\n :variant=\"DS_BUTTON_VARIANTS.PRIMARY\"\n :size=\"DS_BUTTON_SIZES.LARGE\"\n :loading=\"loading\"\n :disabled=\"!canSubmit\"\n @click=\"submit\"\n >{{ submitLabel }}</DsButton\n >\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, ref, useId, type ComponentPublicInstance, type PropType } from 'vue';\nimport { DsInput, DS_INPUT_SIZES } from '@shared/ui/DsInput';\nimport { DsButton, DS_BUTTON_SIZES, DS_BUTTON_VARIANTS } from '@shared/ui/DsButton';\nimport { BACK, SUBMIT, UPDATE_COLOR, UPDATE_NAME } from '@shared/constants/events';\n\nconst props = defineProps({\n title: { type: String, required: true },\n name: { type: String, default: '' },\n color: { type: String, default: '' },\n colors: { type: Array as PropType<string[]>, required: true },\n submitLabel: { type: String, required: true },\n loading: { type: Boolean, default: false },\n setColorLabel: { type: String, default: 'Set Color' },\n namePlaceholder: { type: String, default: 'Name' },\n backLabel: { type: String, default: 'Back' },\n errorMissingName: { type: String, default: 'Name is required' },\n errorTooLongName: { type: String, default: 'Name is too long' },\n maxNameLength: { type: Number, default: 128 },\n errorMessage: { type: String, default: '' },\n originalName: { type: String, default: undefined },\n originalColor: { type: String, default: undefined },\n});\n\nconst emit = defineEmits([BACK, SUBMIT, UPDATE_NAME, UPDATE_COLOR]);\n\nconst inputId = useId();\nconst labelId = useId();\nconst inputRef = ref<InstanceType<typeof DsInput>>();\nconst swatchEls: (HTMLElement | null)[] = [];\n\n// Errors wait for the user: an empty create form must not open already shouting «required».\nconst touched = ref(false);\n\nconst trimmedName = computed(() => props.name.trim());\nconst isValid = computed(\n () => trimmedName.value.length > 0 && trimmedName.value.length <= props.maxNameLength\n);\n// Edit mode is \"the baseline was given\": a controlled form can't recover it from its own props.\nconst isChanged = computed(() => {\n if (props.originalName === undefined) return true;\n return (\n trimmedName.value !== props.originalName.trim() ||\n props.color.toLowerCase() !== (props.originalColor ?? '').toLowerCase()\n );\n});\nconst canSubmit = computed(() => isValid.value && isChanged.value);\nconst validationError = computed(() => {\n if (!touched.value) return '';\n if (!trimmedName.value) return props.errorMissingName;\n if (trimmedName.value.length > props.maxNameLength) return props.errorTooLongName;\n return '';\n});\nconst shownError = computed(() => validationError.value || props.errorMessage);\n\n// Roving tabindex: the group is one tab stop — the selected swatch, or the first.\nconst tabStop = computed(() => Math.max(props.colors.indexOf(props.color), 0));\n\nfunction onNameInput(value: string) {\n touched.value = true;\n emit(UPDATE_NAME, value);\n}\n\nfunction submit() {\n touched.value = true;\n if (props.loading || !canSubmit.value) return;\n emit(SUBMIT, { name: trimmedName.value, color: props.color });\n}\n\nfunction onEnter(event: KeyboardEvent) {\n // Enter that confirms an IME composition is not a submit.\n if (event.isComposing) return;\n event.preventDefault();\n submit();\n}\n\nfunction setSwatchRef(el: Element | ComponentPublicInstance | null, index: number) {\n swatchEls[index] = el as HTMLElement | null;\n}\n\nconst ARROW_STEPS: Record<string, number> = {\n ArrowRight: 1,\n ArrowDown: 1,\n ArrowLeft: -1,\n ArrowUp: -1,\n};\n\nfunction onSwatchKeydown(event: KeyboardEvent, index: number) {\n const step = ARROW_STEPS[event.key];\n if (!step) return;\n event.preventDefault();\n const total = props.colors.length;\n const next = (index + step + total) % total;\n swatchEls[next]?.focus();\n emit(UPDATE_COLOR, props.colors[next]);\n}\n\nconst focus = () => inputRef.value?.focus();\n\nonMounted(focus);\n\ndefineExpose({ focus });\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/radius.scss' as r;\n\n// Prototype value (FolderMenu form): no DS token for a swatch.\n$swatch-size: 28px;\n$ring-gap: 2px;\n$ring-width: 4px;\n\n.ds-organizer-form {\n width: 100%;\n\n &__back {\n display: flex;\n align-items: center;\n width: calc(100% - #{s.spacing(2)});\n margin: s.spacing(1);\n padding: 0;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n text-align: left;\n\n background: transparent;\n border: 0;\n border-radius: r.$radius-control;\n\n cursor: pointer;\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n }\n &__back-icon {\n flex: none;\n font-size: i.icon-size(20);\n line-height: 1;\n }\n &__title {\n min-width: 0;\n margin-left: s.spacing(1);\n overflow: hidden;\n\n font-size: t.font-size('body');\n font-weight: t.$weight-bold;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &__divider {\n height: 1px;\n background: colors.$slate-tint;\n }\n\n &__field {\n padding: s.spacing(2);\n }\n\n &__label {\n margin: 0 0 0 s.spacing(2);\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n }\n\n &__swatches {\n display: flex;\n flex-wrap: wrap;\n gap: s.spacing(1);\n margin: s.spacing(1.5) s.spacing(2) s.spacing(1);\n }\n &__swatch {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: $swatch-size;\n height: $swatch-size;\n padding: 0;\n\n background: var(--swatch-color);\n border: 0;\n border-radius: 50%;\n outline: none;\n\n cursor: pointer;\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n &.is-selected {\n // The ring wears the swatch's own colour.\n box-shadow:\n 0 0 0 $ring-gap colors.$white,\n 0 0 0 $ring-width var(--swatch-color);\n\n &:focus-visible {\n outline-offset: $ring-width + 1px;\n }\n }\n }\n &__check {\n color: colors.$white;\n font-size: i.icon-size(16);\n line-height: 1;\n }\n\n &__footer {\n display: flex;\n justify-content: flex-end;\n padding: s.spacing(1.5);\n }\n}\n</style>\n","<template>\n <DsPopover\n class=\"ds-picker-row-actions\"\n :open=\"open\"\n :placement=\"DS_POPOVER_PLACEMENTS.BOTTOM_END\"\n width=\"150px\"\n teleported\n @update:open=\"setOpen\"\n >\n <template #trigger>\n <button\n ref=\"triggerRef\"\n type=\"button\"\n class=\"ds-picker-row-actions__trigger\"\n :aria-label=\"actionsLabel\"\n aria-haspopup=\"menu\"\n :aria-expanded=\"open\"\n >\n <i class=\"material-symbols-filled ds-picker-row-actions__glyph\" aria-hidden=\"true\"\n >more_vert</i\n >\n </button>\n </template>\n\n <div\n ref=\"menuRef\"\n class=\"ds-picker-row-actions__menu\"\n role=\"menu\"\n :aria-label=\"actionsLabel\"\n @keydown=\"onMenuKeydown\"\n >\n <button\n v-if=\"showEdit\"\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n class=\"ds-picker-row-actions__item\"\n @click=\"choose(EDIT)\"\n >\n <i class=\"material-symbols-filled ds-picker-row-actions__glyph\" aria-hidden=\"true\">edit</i>\n <span class=\"ds-picker-row-actions__item-label\">{{ editLabel }}</span>\n </button>\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n class=\"ds-picker-row-actions__item ds-picker-row-actions__item--danger\"\n @click=\"choose(DELETE)\"\n >\n <i class=\"material-symbols-filled ds-picker-row-actions__glyph\" aria-hidden=\"true\"\n >delete</i\n >\n <span class=\"ds-picker-row-actions__item-label\">{{ deleteLabel }}</span>\n </button>\n </div>\n </DsPopover>\n</template>\n\n<script lang=\"ts\">\nimport { ref } from 'vue';\n\n// Shared by every instance: opening a row's menu closes whichever other one is open.\nconst activeMenu = ref<symbol | null>(null);\n</script>\n\n<script setup lang=\"ts\">\nimport { nextTick, onBeforeUnmount, watch, type PropType } from 'vue';\nimport { useMenuKeyboard } from '@shared/composables/useMenuKeyboard';\nimport { DsPopover, DS_POPOVER_PLACEMENTS } from '@shared/ui/DsPopover';\nimport { DELETE, EDIT } from '@shared/constants/events';\nimport type { DsPickerOption } from '@shared/constants/pickers';\n\nconst props = defineProps({\n option: { type: Object as PropType<DsPickerOption>, required: true },\n actionsLabel: { type: String, default: 'Actions' },\n editLabel: { type: String, default: 'Edit' },\n deleteLabel: { type: String, default: 'Delete' },\n showEdit: { type: Boolean, default: true },\n});\n\nconst emit = defineEmits([EDIT, DELETE]);\n\nconst self = Symbol('ds-picker-row-actions');\nconst open = ref(false);\nconst triggerRef = ref<HTMLElement | null>(null);\nconst menuRef = ref<HTMLElement | null>(null);\n\nfunction setOpen(next: boolean) {\n if (open.value === next) return;\n open.value = next;\n if (next) activeMenu.value = self;\n else if (activeMenu.value === self) activeMenu.value = null;\n}\n\nwatch(activeMenu, (current) => {\n if (current !== self) setOpen(false);\n});\n\nconst { focusFirst, onKeydown: onMenuKeydown } = useMenuKeyboard(menuRef, {\n onClose: closeAndRefocus,\n});\n\n// 'post': DsPopover moves focus to its panel in a nextTick of its own; this runs after it.\nwatch(\n open,\n (isOpen) => {\n if (isOpen) focusFirst();\n },\n { flush: 'post' }\n);\n\n// After the next flush: DsPopover restores focus to whatever was focused when it opened (not\n// always the ⋮ — Safari and Firefox on macOS don't focus a button on click), and that runs first.\nfunction focusTrigger() {\n nextTick(() => triggerRef.value?.focus());\n}\n\nfunction closeAndRefocus() {\n setOpen(false);\n focusTrigger();\n}\n\nfunction choose(event: typeof EDIT | typeof DELETE) {\n setOpen(false);\n if (event === DELETE) focusTrigger();\n emit(event, props.option);\n}\n\nonBeforeUnmount(() => {\n if (activeMenu.value === self) activeMenu.value = null;\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/motion.scss' as m;\n\n// Prototype value (FolderMenu row menu): no spacing token.\n$item-padding: 10px;\n\n.ds-picker-row-actions {\n flex: none;\n\n &__trigger {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: s.control-height('small');\n height: s.control-height('small');\n padding: 0;\n\n color: colors.$slate-main;\n\n background: transparent;\n border: 0;\n border-radius: r.$radius-control;\n\n cursor: pointer;\n\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:hover,\n &[aria-expanded='true'] {\n background: colors.$slate-tint;\n }\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n }\n\n &__glyph {\n flex: none;\n font-size: i.icon-size(18);\n line-height: 1;\n }\n\n &__item {\n display: flex;\n align-items: center;\n gap: s.spacing(1);\n width: 100%;\n height: s.control-height('medium');\n padding: 0 $item-padding;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n text-align: left;\n\n background: transparent;\n border: 0;\n border-radius: r.$radius-control;\n\n cursor: pointer;\n\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:hover,\n &:focus-visible {\n background: colors.$slate-bg;\n }\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: -2px;\n }\n\n // Prototype hover is #FFF7F7; the lightest DS red is error-tint.\n &--danger {\n color: colors.$error-shadow;\n\n &:hover,\n &:focus-visible {\n background: colors.$error-tint;\n }\n }\n }\n\n &__item-label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n</style>\n","import { computed, nextTick, ref } from 'vue';\nimport { CREATE_OPTION, DELETE, EDIT, FORM_CLOSE, UPDATE_OPTION } from '@shared/constants/events';\nimport {\n DS_PICKER_ROW_ACTIONS,\n type DsPickerOption,\n type DsPickerRowActionsMode,\n} from '@shared/constants/pickers';\nimport type { DsOrganizerFormSubmitPayload } from '@shared/ui/DsOrganizerForm';\n\n// The in-panel create / edit form and the row actions that DsSavedButton and DsTagPicker share.\n\ntype PickerOrganizerEvent =\n typeof EDIT | typeof DELETE | typeof CREATE_OPTION | typeof UPDATE_OPTION | typeof FORM_CLOSE;\n\nexport interface PickerOrganizerOptions {\n colors: () => readonly string[];\n rowActions: () => DsPickerRowActionsMode;\n formError: () => string;\n emit: (event: PickerOrganizerEvent, payload?: unknown) => void;\n focusSearch: () => void;\n}\n\nexport function usePickerOrganizer(options: PickerOrganizerOptions) {\n const view = ref<'list' | 'form'>('list');\n const mode = ref<'create' | 'edit'>('create');\n const editing = ref<DsPickerOption | null>(null);\n const formName = ref('');\n const formColor = ref('');\n // The error the consumer still held when the form was dismissed: it belongs to that session.\n const dismissedError = ref('');\n\n const isForm = computed(() => view.value === 'form');\n const firstColor = () => options.colors()[0] ?? '';\n const shownFormError = computed(() => {\n const error = options.formError();\n return error && error === dismissedError.value ? '' : error;\n });\n const editingColor = computed(() => editing.value?.color ?? firstColor());\n\n function resetForm() {\n if (view.value === 'form') {\n dismissedError.value = options.formError();\n options.emit(FORM_CLOSE);\n }\n view.value = 'list';\n mode.value = 'create';\n editing.value = null;\n formName.value = '';\n formColor.value = '';\n }\n\n function openCreateForm(name = '') {\n mode.value = 'create';\n editing.value = null;\n formName.value = name;\n formColor.value = firstColor();\n view.value = 'form';\n }\n\n function onEdit(option: DsPickerOption) {\n options.emit(EDIT, option);\n if (options.rowActions() !== DS_PICKER_ROW_ACTIONS.FORM) return;\n mode.value = 'edit';\n editing.value = option;\n formName.value = option.name;\n formColor.value = option.color ?? firstColor();\n view.value = 'form';\n }\n\n function onDelete(option: DsPickerOption) {\n options.emit(DELETE, option);\n }\n\n // Success is the consumer's to declare: the form stays put until it calls `closeForm()`.\n function onSubmit({ name, color }: DsOrganizerFormSubmitPayload) {\n dismissedError.value = '';\n if (mode.value === 'edit' && editing.value) {\n options.emit(UPDATE_OPTION, { id: editing.value.id, name, color });\n } else {\n options.emit(CREATE_OPTION, { name, color });\n }\n }\n\n function closeForm() {\n resetForm();\n // The form's back button is gone: without this, focus falls to <body> and Esc stops closing.\n nextTick(options.focusSearch);\n }\n\n return {\n view,\n mode,\n editing,\n formName,\n formColor,\n isForm,\n shownFormError,\n editingColor,\n resetForm,\n openCreateForm,\n onEdit,\n onDelete,\n onSubmit,\n closeForm,\n };\n}\n","// DsSavedButton — THE one canonical \"Saved\" control (Ari: identical everywhere). A\n// folder-tinted glyph + a neutral label + a caret; the folder NAME lives in the tooltip,\n// never in the label; click opens the folder picker to re-file. Reused by list rows, bulk\n// bars and drawers so there is exactly one Saved affordance to maintain. Measured from the\n// design export's `SavedButton` / `FolderMenu`.\n//\n// Folder CRUD is opt-in and explicit. `create` says what the footer does (`'event'`: emit\n// `create` with the search text and the app runs its own flow; `'form'`: open the in-panel\n// DsOrganizerForm), `rowActions` adds the ⋮ Edit / Delete menu (`'form'`: Edit also opens the\n// form). `colors` is only the palette of that form. The component only emits intent\n// (`create-option`, `update-option`, `delete`) and the app persists it.\n\nimport type { DsTooltipPlacement } from '@shared/ui/DsTooltip';\nimport type {\n DsPickerAlign,\n DsPickerCreateMode,\n DsPickerOption,\n DsPickerOrganizerCopy,\n DsPickerRowActionsMode,\n DsPickerSize,\n} from '@shared/constants/pickers';\n\n/** Every string of the panel, the ⋮ menu and the form. Pass a partial: it overrides only its keys. */\nexport interface DsSavedButtonCopy extends DsPickerOrganizerCopy {\n searchPlaceholder: string;\n /** Shown when the search matches nothing. Empty = nothing. */\n empty: string;\n /** The footer action. */\n create: string;\n}\n\nexport const DS_SAVED_BUTTON_COPY: DsSavedButtonCopy = {\n searchPlaceholder: 'Search folders',\n empty: 'No folders found',\n create: 'New Folder',\n actions: 'Actions',\n edit: 'Edit',\n delete: 'Delete',\n createFormTitle: 'New Folder',\n editFormTitle: 'Edit Folder',\n createSubmit: 'Create & Select',\n editSubmit: 'Save',\n namePlaceholder: 'Folder name',\n setColor: 'Set Color',\n back: 'Back',\n};\n\nexport interface DsSavedButtonProps {\n /** The neutral label (\"Saved\", or \"Save\" before the first save). App copy. */\n label: string;\n /** \"Saved in {folder} · change folder\". Shown whenever non-empty, and hidden while the panel is open. */\n tooltip?: string;\n /** Side of the trigger the tooltip opens on. */\n tooltipPlacement?: DsTooltipPlacement;\n /** Material Symbols ligature for the folder glyph. */\n icon?: string;\n size?: DsPickerSize;\n /** Fully round trigger (`DsButton pill`) for the bulk bar beside `DsItemSelectorButton`. Off = the design's table / profile trigger. */\n pill?: boolean;\n align?: DsPickerAlign;\n disabled?: boolean;\n /** Render the picker panel in `<body>` so no ancestor's `overflow` clips it and no sibling stacking context paints over it (a sticky table cell). */\n teleported?: boolean;\n /** The folder the contact lives in; tints the glyph. `null` = not saved yet (no glyph). */\n folder?: DsPickerOption | null;\n /** Every folder the user can pick. */\n folders: DsPickerOption[];\n /** What the footer does: nothing (default), emit `create`, or open the in-panel form (needs `colors`). */\n create?: DsPickerCreateMode;\n /** The ⋮ menu on each row: absent (default), `edit` / `delete` events, or Edit also opens the form (needs `colors`). Accepts the deprecated boolean. */\n rowActions?: DsPickerRowActionsMode | boolean;\n /** Swatches (hex) of the in-panel form. Only the palette: it gates nothing by itself. */\n colors?: string[];\n /** The app is saving the form: its submit button shows the spinner and is blocked. */\n formLoading?: boolean;\n /** A failed save, shown under the name field. */\n formError?: string;\n copy?: Partial<DsSavedButtonCopy>;\n\n /** @deprecated Use `copy.searchPlaceholder`. */\n searchPlaceholder?: string;\n /** @deprecated Use `copy.empty`. */\n emptyLabel?: string;\n /** @deprecated Use `create` and `copy.create`. */\n createLabel?: string;\n /** @deprecated Use `copy.actions`. */\n actionsLabel?: string;\n /** @deprecated Use `copy.edit`. */\n editLabel?: string;\n /** @deprecated Use `copy.delete`. */\n deleteLabel?: string;\n /** @deprecated Use `copy.createFormTitle`. */\n createFormTitle?: string;\n /** @deprecated Use `copy.editFormTitle`. */\n editFormTitle?: string;\n /** @deprecated Use `copy.createSubmit`. */\n createSubmitLabel?: string;\n /** @deprecated Use `copy.editSubmit`. */\n editSubmitLabel?: string;\n /** @deprecated Use `copy.namePlaceholder`. */\n formNamePlaceholder?: string;\n /** @deprecated Use `copy.setColor`. */\n setColorLabel?: string;\n /** @deprecated Use `copy.back`. */\n backLabel?: string;\n /** @deprecated Use `copy.errorMissingName`. */\n errorMissingName?: string;\n /** @deprecated Use `copy.errorTooLongName`. */\n errorTooLongName?: string;\n}\n\n/** Deprecated prop name → the `copy` key it feeds (see `resolveLegacyPickerProps`). */\nexport const DS_SAVED_BUTTON_LEGACY_COPY = {\n searchPlaceholder: 'searchPlaceholder',\n emptyLabel: 'empty',\n createLabel: 'create',\n actionsLabel: 'actions',\n editLabel: 'edit',\n deleteLabel: 'delete',\n createFormTitle: 'createFormTitle',\n editFormTitle: 'editFormTitle',\n createSubmitLabel: 'createSubmit',\n editSubmitLabel: 'editSubmit',\n formNamePlaceholder: 'namePlaceholder',\n setColorLabel: 'setColor',\n backLabel: 'back',\n errorMissingName: 'errorMissingName',\n errorTooLongName: 'errorTooLongName',\n} as const;\n\n/** Slot scope of `footer`. */\nexport interface DsSavedButtonFooterSlotProps {\n /** What the user typed in the search. */\n query: string;\n /** Open the in-panel form; the name defaults to the trimmed search text. Needs `colors`. */\n openCreateForm: (name?: string) => void;\n}\n\n/** Payload of `create-option`. */\nexport interface DsSavedButtonCreatePayload {\n name: string;\n color: string;\n}\n\n/** Payload of `update-option`. */\nexport interface DsSavedButtonUpdatePayload extends DsSavedButtonCreatePayload {\n id: string | number;\n}\n","<template>\n <div\n class=\"ds-saved-button\"\n :class=\"[`ds-saved-button--${size}`, { 'is-open': open, 'is-disabled': disabled }]\"\n >\n <DsPopover\n :open=\"open\"\n :placement=\"placement\"\n width=\"300px\"\n :grow-to=\"isForm ? '' : DS_PICKER_PANEL_MAX_WIDTH\"\n :flush=\"isForm\"\n :trigger-on-click=\"false\"\n :teleported=\"teleported\"\n @update:open=\"setOpen\"\n >\n <template #trigger>\n <!-- The tooltip sleeps while the picker is open: two layers on one trigger is noise.\n `teleported`: the trigger lives in scroll containers (a table row, the\n full-profile drawer) whose `overflow` would otherwise clip the bubble. -->\n <DsTooltip\n :content=\"tooltip\"\n :disabled=\"!tooltip || open\"\n :placement=\"tooltipPlacement\"\n teleported\n >\n <!-- The trigger IS a DsButton (compose, don't duplicate): `outline` is the export's\n white + hairline ring; sizes, focus ring, disabled and hover come from the DS.\n Only the glyph carries the folder colour; the label stays neutral and the folder\n name lives in the tooltip (Ari). -->\n <DsButton\n class=\"ds-saved-button__trigger\"\n :variant=\"DS_BUTTON_VARIANTS.OUTLINE\"\n :size=\"buttonSize\"\n :pill=\"pill\"\n :disabled=\"disabled\"\n aria-haspopup=\"listbox\"\n :aria-expanded=\"open\"\n @click=\"toggle\"\n >\n <template v-if=\"folder\" #leading>\n <i\n class=\"material-symbols-filled ds-saved-button__icon\"\n :style=\"{ color: folder.color }\"\n aria-hidden=\"true\"\n >{{ icon }}</i\n >\n </template>\n <span class=\"ds-saved-button__label\">{{ label }}</span>\n <template #trailing>\n <i class=\"material-symbols-filled ds-saved-button__caret\" aria-hidden=\"true\"\n >keyboard_arrow_down</i\n >\n </template>\n </DsButton>\n </DsTooltip>\n </template>\n\n <DsOrganizerForm\n v-if=\"isForm\"\n class=\"ds-saved-button__form\"\n :title=\"mode === 'edit' ? text.editFormTitle : text.createFormTitle\"\n :submit-label=\"mode === 'edit' ? text.editSubmit : text.createSubmit\"\n :name=\"formName\"\n :color=\"formColor\"\n :original-name=\"editing ? editing.name : undefined\"\n :original-color=\"editing ? editingColor : undefined\"\n :colors=\"colors\"\n :loading=\"formLoading\"\n :error-message=\"shownFormError\"\n :name-placeholder=\"text.namePlaceholder\"\n :set-color-label=\"text.setColor\"\n :back-label=\"text.back\"\n :error-missing-name=\"text.errorMissingName\"\n :error-too-long-name=\"text.errorTooLongName\"\n @update:name=\"formName = $event\"\n @update:color=\"formColor = $event\"\n @back=\"closeForm\"\n @submit=\"onSubmit\"\n />\n\n <div v-else class=\"ds-saved-button__menu\">\n <DsInput\n ref=\"searchRef\"\n v-model=\"query\"\n class=\"ds-saved-button__search\"\n type=\"search\"\n size=\"sm\"\n :placeholder=\"text.searchPlaceholder\"\n />\n\n <div class=\"ds-saved-button__divider\" />\n\n <div class=\"ds-saved-button__list\" role=\"radiogroup\" :aria-label=\"label\">\n <div\n v-for=\"option in filtered\"\n :key=\"option.id\"\n class=\"ds-saved-button__option\"\n :class=\"{ 'is-current': isCurrent(option) }\"\n >\n <DsRadio\n :name=\"groupName\"\n :value=\"String(option.id)\"\n :model-value=\"isCurrent(option)\"\n @update:model-value=\"pick(option)\"\n >\n <i\n class=\"material-symbols-filled ds-saved-button__option-icon\"\n :style=\"{ color: option.color }\"\n aria-hidden=\"true\"\n >{{ icon }}</i\n >\n <span class=\"ds-saved-button__option-name\">{{ option.name }}</span>\n </DsRadio>\n <DsPickerRowActions\n v-if=\"rowActionsMode !== DS_PICKER_ROW_ACTIONS.NONE\"\n :option=\"option\"\n :actions-label=\"text.actions\"\n :edit-label=\"text.edit\"\n :delete-label=\"text.delete\"\n @edit=\"onEdit\"\n @delete=\"onDelete\"\n />\n </div>\n\n <p v-if=\"!filtered.length && text.empty\" class=\"ds-saved-button__empty\">\n {{ text.empty }}\n </p>\n </div>\n\n <template v-if=\"createMode !== DS_PICKER_CREATE_MODES.NONE || $slots.footer\">\n <div class=\"ds-saved-button__divider\" />\n <div class=\"ds-saved-button__footer\">\n <slot name=\"footer\" :query=\"query\" :open-create-form=\"openCreateForm\">\n <DsButton\n :variant=\"DS_BUTTON_VARIANTS.TERTIARY\"\n :size=\"DS_BUTTON_SIZES.MEDIUM\"\n left-icon=\"add\"\n @click=\"onCreate\"\n >{{ text.create }}</DsButton\n >\n </slot>\n </div>\n </template>\n </div>\n </DsPopover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref, useId, watch, type PropType } from 'vue';\nimport { DsPopover } from '@shared/ui/DsPopover';\nimport { DsTooltip, DS_TOOLTIP_PLACEMENTS, type DsTooltipPlacement } from '@shared/ui/DsTooltip';\nimport { DsInput } from '@shared/ui/DsInput';\nimport { DsRadio } from '@shared/ui/DsRadio';\nimport { DsOrganizerForm } from '@shared/ui/DsOrganizerForm';\nimport { DsPickerRowActions } from '@shared/ui/DsPickerRowActions';\nimport { DsButton, DS_BUTTON_SIZES, DS_BUTTON_VARIANTS } from '@shared/ui/DsButton';\nimport { usePickerOrganizer } from '@shared/composables/usePickerOrganizer';\nimport {\n CREATE,\n CREATE_OPTION,\n DELETE,\n EDIT,\n FORM_CLOSE,\n PICK,\n SEARCH,\n UPDATE_OPEN,\n UPDATE_OPTION,\n} from '@shared/constants/events';\nimport {\n DS_PICKER_ALIGNS,\n DS_PICKER_CREATE_MODES,\n DS_PICKER_PANEL_MAX_WIDTH,\n DS_PICKER_ROW_ACTIONS,\n DS_PICKER_SIZES,\n filterOptions,\n isValidCreateMode,\n isValidRowActionsMode,\n mergeCopy,\n pickerPlacement,\n resolveLegacyPickerProps,\n type DsPickerAlign,\n type DsPickerCreateMode,\n type DsPickerOption,\n type DsPickerRowActionsMode,\n type DsPickerSize,\n} from '@shared/constants/pickers';\nimport {\n DS_SAVED_BUTTON_COPY,\n DS_SAVED_BUTTON_LEGACY_COPY,\n type DsSavedButtonCopy,\n} from './DsSavedButton.types';\n\nconst props = defineProps({\n label: { type: String, required: true },\n tooltip: { type: String, default: '' },\n tooltipPlacement: {\n type: String as PropType<DsTooltipPlacement>,\n default: DS_TOOLTIP_PLACEMENTS.BOTTOM,\n },\n folder: { type: Object as PropType<DsPickerOption | null>, default: null },\n folders: { type: Array as PropType<DsPickerOption[]>, required: true },\n icon: { type: String, default: 'folder' },\n size: { type: String as PropType<DsPickerSize>, default: DS_PICKER_SIZES.MEDIUM },\n // Shape follows the design per context (Diego, 22/09): squared in table rows and the profile\n // (the export's `SavedButton`), `pill` in the bulk bar beside DsItemSelectorButton.\n pill: { type: Boolean, default: false },\n align: { type: String as PropType<DsPickerAlign>, default: DS_PICKER_ALIGNS.END },\n disabled: { type: Boolean, default: false },\n // The panel in <body>: a sticky table cell is its own stacking context, so inline the rows\n // below paint over it, and a scroll container clips it.\n teleported: { type: Boolean, default: false },\n // Unset (not 'none') so the deprecated props can still decide; resolved below.\n create: {\n type: String as PropType<DsPickerCreateMode>,\n default: undefined,\n // Inline so the published types don't reference the unexported validator.\n validator: (value: unknown, props: Record<string, unknown>) => isValidCreateMode(value, props),\n },\n rowActions: {\n type: [Boolean, String] as PropType<DsPickerRowActionsMode | boolean>,\n default: undefined,\n validator: (value: unknown, props: Record<string, unknown>) =>\n isValidRowActionsMode(value, props),\n },\n // Only the swatches of the in-panel form; the modes above decide what opens it.\n colors: { type: Array as PropType<string[]>, default: () => [] },\n // The consumer is saving the form; it calls `closeForm()` on success.\n formLoading: { type: Boolean, default: false },\n formError: { type: String, default: '' },\n copy: { type: Object as PropType<Partial<DsSavedButtonCopy>>, default: undefined },\n\n // -- Deprecated aliases: resolved in `resolveLegacyPickerProps`, deleted in 4.0 ---------\n searchPlaceholder: { type: String, default: undefined },\n emptyLabel: { type: String, default: undefined },\n createLabel: { type: String, default: undefined },\n actionsLabel: { type: String, default: undefined },\n editLabel: { type: String, default: undefined },\n deleteLabel: { type: String, default: undefined },\n createFormTitle: { type: String, default: undefined },\n editFormTitle: { type: String, default: undefined },\n createSubmitLabel: { type: String, default: undefined },\n editSubmitLabel: { type: String, default: undefined },\n formNamePlaceholder: { type: String, default: undefined },\n setColorLabel: { type: String, default: undefined },\n backLabel: { type: String, default: undefined },\n errorMissingName: { type: String, default: undefined },\n errorTooLongName: { type: String, default: undefined },\n});\n\nconst emit = defineEmits([\n PICK,\n CREATE,\n SEARCH,\n UPDATE_OPEN,\n EDIT,\n DELETE,\n CREATE_OPTION,\n UPDATE_OPTION,\n FORM_CLOSE,\n]);\n\nconst open = ref(false);\nconst query = ref('');\nconst searchRef = ref<InstanceType<typeof DsInput> | null>(null);\n\n// The footer slot always renders when passed, so it needs no inference of its own.\nconst resolved = computed(() =>\n resolveLegacyPickerProps({\n create: props.create,\n rowActions: props.rowActions,\n colors: props.colors,\n aliases: props,\n copyMap: DS_SAVED_BUTTON_LEGACY_COPY,\n })\n);\nconst createMode = computed(() => resolved.value.create);\nconst rowActionsMode = computed(() => resolved.value.rowActions);\nconst text = computed(() =>\n mergeCopy(DS_SAVED_BUTTON_COPY, resolved.value.copy as Partial<DsSavedButtonCopy>, props.copy)\n);\n\nconst {\n mode,\n editing,\n formName,\n formColor,\n isForm,\n shownFormError,\n editingColor,\n resetForm,\n openCreateForm: openForm,\n onEdit,\n onDelete,\n onSubmit,\n closeForm,\n} = usePickerOrganizer({\n colors: () => props.colors,\n rowActions: () => rowActionsMode.value,\n formError: () => props.formError,\n emit,\n focusSearch: () => searchRef.value?.focus(),\n});\n// One native radio group per instance, so two Saved buttons on a page never share state.\nconst groupName = useId();\n\nconst placement = computed(() => pickerPlacement(props.align));\nconst filtered = computed(() => filterOptions(props.folders, query.value));\n// Picker sizes map 1:1 onto DS control heights: medium 32px, large 36px.\nconst buttonSize = computed(() =>\n props.size === DS_PICKER_SIZES.LARGE ? DS_BUTTON_SIZES.LARGE : DS_BUTTON_SIZES.MEDIUM\n);\n\nfunction isCurrent(option: DsPickerOption): boolean {\n return props.folder !== null && props.folder.id === option.id;\n}\n\nfunction setOpen(next: boolean) {\n if (open.value === next) return;\n if (next) query.value = '';\n resetForm();\n open.value = next;\n emit(UPDATE_OPEN, next);\n}\n\nfunction toggle() {\n if (props.disabled) return;\n setOpen(!open.value);\n}\n\nfunction pick(option: DsPickerOption) {\n emit(PICK, option);\n setOpen(false);\n}\n\nfunction openCreateForm(name?: string) {\n openForm(name ?? query.value.trim());\n}\n\n// `event`: the app owns folder creation (its own form / modal) and gets the text typed so far.\nfunction onCreate() {\n if (createMode.value === DS_PICKER_CREATE_MODES.FORM) {\n openCreateForm();\n return;\n }\n emit(CREATE, query.value.trim());\n setOpen(false);\n}\n\ndefineExpose({ closeForm });\n\n// Cursor in the search as the panel opens, so the user can type at once.\nwatch(open, (isOpen) => {\n if (isOpen) nextTick(() => searchRef.value?.focus());\n});\nwatch(query, (value) => emit(SEARCH, value));\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/pickers.scss' as p;\n\n.ds-saved-button {\n display: inline-flex;\n flex: none;\n position: relative;\n\n // Slot content of the DsButton trigger. Only the glyph carries the folder colour (Ari).\n &__icon {\n // Export: 15px in the row Saved, 16 in the action bar. One step: 16.\n font-size: i.icon-size(16);\n line-height: 1;\n }\n &__label {\n white-space: nowrap;\n // A selector, not a CTA: the DS rule is «700 for labels and emphasis», and the DS's own\n // selector (DsItemSelectorButton) is bold. The size stays the `body` token.\n font-weight: t.$weight-bold;\n }\n &__caret {\n font-size: i.icon-size(14); // export: 14, muted\n line-height: 1;\n color: colors.$slate-soft;\n }\n\n // -- menu (export FolderMenu, 300px) -------------------------------------------------\n &__search {\n width: 100%;\n contain: inline-size; // the input's own width must not widen a growing panel\n }\n &__divider {\n @include p.divider;\n }\n &__list {\n @include p.list(216px); // export FolderMenu maxHeight\n }\n &__option {\n @include p.option-row;\n margin-bottom: 1px;\n\n &.is-current {\n background: colors.$accent-bg;\n }\n }\n &__option-icon {\n flex: none;\n font-size: i.icon-size(20); // export: folder glyph 20 in rows\n line-height: 1;\n }\n &__option-name {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n &__empty {\n @include p.empty;\n }\n &__footer {\n @include p.footer;\n justify-content: flex-start; // export: \"New Folder\" sits on the left\n }\n}\n</style>\n","// DsTagPicker — the canonical \"Tag\" control («Tagged as X +N», Lusha style): a trigger\n// that reads as a \"Tag\" button until tags are applied, then as \"Tagged as {first} +N\", and\n// a picker with search, checkbox rows with a colour dot, a \"create\" affordance and an\n// Apply footer. Measured from the design export's `tagBtn` / `tagsLine` / `tagMenu`.\n//\n// Named DsTagPicker, not DsTag: `DsTag` is already the DS outlined chip.\n// Selection is a working copy — nothing reaches the app until Apply.\n//\n// Tag CRUD is opt-in and explicit. `create` says what the create row does (`'event'`: emit\n// `create` with the search text and the app runs its own flow; `'form'`: open the in-panel\n// DsOrganizerForm, which also adds the «+ New» footer button), `rowActions` adds the ⋮ Edit /\n// Delete menu (`'form'`: Edit also opens the form). `colors` is only the palette of that form.\n// The component only emits intent (`create-option`, `update-option`, `delete`) and the app\n// persists it.\n\nimport type {\n DsPickerAlign,\n DsPickerCreateMode,\n DsPickerOption,\n DsPickerOrganizerCopy,\n DsPickerRowActionsMode,\n DsPickerSize,\n} from '@shared/constants/pickers';\n\n/** Every string of the trigger, the panel, the ⋮ menu and the form. Pass a partial: it overrides only its keys. */\nexport interface DsTagPickerCopy extends DsPickerOrganizerCopy {\n /** Prefix once tags exist (\"Tagged as\"); the first tag's name follows it. */\n taggedAs: string;\n /** The footer confirm. */\n apply: string;\n searchPlaceholder: string;\n /** Shown when nothing matches and there is nothing to create. Empty = nothing. */\n empty: string;\n /** Accessible name for the `+N` chip (\"2 more tags\"). */\n more: string;\n /** Prefix of the inline create row («Create “{query}”»). */\n createRow: string;\n /** The footer «+ New» button, only with `create: 'form'`. */\n newButton: string;\n}\n\nexport const DS_TAG_PICKER_COPY: DsTagPickerCopy = {\n taggedAs: 'Tagged as',\n apply: 'Apply',\n searchPlaceholder: 'Search tags',\n empty: 'No tags found',\n more: '',\n createRow: 'Create',\n newButton: 'New Tag',\n actions: 'Actions',\n edit: 'Edit',\n delete: 'Delete',\n createFormTitle: 'New Tag',\n editFormTitle: 'Edit Tag',\n createSubmit: 'Create',\n editSubmit: 'Save',\n namePlaceholder: 'Tag name',\n setColor: 'Set Color',\n back: 'Back',\n};\n\nexport interface DsTagPickerProps {\n /** Trigger label while no tag is applied (\"Tag\"). App copy. */\n label: string;\n /** The tags currently applied to the contact. */\n tags?: DsPickerOption[];\n /** Every tag the user can pick from. */\n options: DsPickerOption[];\n size?: DsPickerSize;\n /** Fully round trigger (`DsButton pill`) for the bulk bar beside `DsItemSelectorButton`. Off = the design's row / profile trigger. */\n pill?: boolean;\n align?: DsPickerAlign;\n disabled?: boolean;\n /** What the create affordance does: nothing (default), emit `create`, or open the in-panel form and show «+ New» (needs `colors`). */\n create?: DsPickerCreateMode;\n /** The ⋮ menu on each row: absent (default), `edit` / `delete` events, or Edit also opens the form (needs `colors`). Accepts the deprecated boolean. */\n rowActions?: DsPickerRowActionsMode | boolean;\n /** Swatches (hex) of the in-panel form. Only the palette: it gates nothing by itself. */\n colors?: string[];\n /** The app is saving the form: its submit button shows the spinner and is blocked. */\n formLoading?: boolean;\n /** A failed save, shown under the name field. */\n formError?: string;\n copy?: Partial<DsTagPickerCopy>;\n\n /** @deprecated Use `copy.taggedAs`. */\n taggedAsLabel?: string;\n /** @deprecated Use `copy.apply`. */\n applyLabel?: string;\n /** @deprecated Use `copy.searchPlaceholder`. */\n searchPlaceholder?: string;\n /** @deprecated Use `copy.empty`. */\n emptyLabel?: string;\n /** @deprecated Use `create`, `copy.createRow` and `copy.newButton`. */\n createLabel?: string;\n /** @deprecated Use `copy.more`. */\n moreLabel?: string;\n /** @deprecated Use `copy.actions`. */\n actionsLabel?: string;\n /** @deprecated Use `copy.edit`. */\n editLabel?: string;\n /** @deprecated Use `copy.delete`. */\n deleteLabel?: string;\n /** @deprecated Use `copy.createFormTitle`. */\n createFormTitle?: string;\n /** @deprecated Use `copy.editFormTitle`. */\n editFormTitle?: string;\n /** @deprecated Use `copy.createSubmit`. */\n createSubmitLabel?: string;\n /** @deprecated Use `copy.editSubmit`. */\n editSubmitLabel?: string;\n /** @deprecated Use `copy.namePlaceholder`. */\n formNamePlaceholder?: string;\n /** @deprecated Use `copy.setColor`. */\n setColorLabel?: string;\n /** @deprecated Use `copy.back`. */\n backLabel?: string;\n /** @deprecated Use `copy.errorMissingName`. */\n errorMissingName?: string;\n /** @deprecated Use `copy.errorTooLongName`. */\n errorTooLongName?: string;\n}\n\n/** Deprecated prop name → the `copy` key(s) it feeds (see `resolveLegacyPickerProps`). */\nexport const DS_TAG_PICKER_LEGACY_COPY = {\n taggedAsLabel: 'taggedAs',\n applyLabel: 'apply',\n searchPlaceholder: 'searchPlaceholder',\n emptyLabel: 'empty',\n // The old `createLabel` was both the inline row prefix and the «+ New» footer text.\n createLabel: ['createRow', 'newButton'],\n moreLabel: 'more',\n actionsLabel: 'actions',\n editLabel: 'edit',\n deleteLabel: 'delete',\n createFormTitle: 'createFormTitle',\n editFormTitle: 'editFormTitle',\n createSubmitLabel: 'createSubmit',\n editSubmitLabel: 'editSubmit',\n formNamePlaceholder: 'namePlaceholder',\n setColorLabel: 'setColor',\n backLabel: 'back',\n errorMissingName: 'errorMissingName',\n errorTooLongName: 'errorTooLongName',\n} as const;\n\n/** Payload of `create-option`. */\nexport interface DsTagPickerCreatePayload {\n name: string;\n color: string;\n}\n\n/** Payload of `update-option`. */\nexport interface DsTagPickerUpdatePayload extends DsTagPickerCreatePayload {\n id: string | number;\n}\n","<template>\n <div\n class=\"ds-tag-picker\"\n :class=\"[\n `ds-tag-picker--${size}`,\n { 'is-open': open, 'is-disabled': disabled, 'has-tags': hasTags },\n ]\"\n >\n <DsPopover\n :open=\"open\"\n :placement=\"placement\"\n width=\"240px\"\n :grow-to=\"isForm ? '' : DS_PICKER_PANEL_MAX_WIDTH\"\n :flush=\"isForm\"\n :trigger-on-click=\"false\"\n @update:open=\"setOpen\"\n >\n <template #trigger>\n <!-- The label ellipsizes when the row is squeezed (see the CSS below); a tooltip\n repeating the same visible text is noise (Diego's rule), so it only carries\n content once the label is ACTUALLY truncated — same pattern as DsProfileHero's\n headline. `teleported`: the trigger lives in scroll containers (a table row,\n the full-profile drawer's action row). -->\n <DsTooltip\n :content=\"triggerLabel\"\n :disabled=\"!isLabelTruncated || open\"\n placement=\"bottom\"\n teleported\n >\n <!-- The trigger IS a DsButton (compose, don't duplicate): `outline` is the export's\n white + hairline ring. `label` glyph while empty; `sell` in the first tag's colour\n once applied, with the overflow chip in the trailing slot. -->\n <DsButton\n class=\"ds-tag-picker__trigger\"\n :variant=\"DS_BUTTON_VARIANTS.OUTLINE\"\n :size=\"buttonSize\"\n :pill=\"pill\"\n :disabled=\"disabled\"\n aria-haspopup=\"dialog\"\n :aria-expanded=\"open\"\n @click=\"toggle\"\n @mouseenter=\"checkLabelTruncation\"\n @focus=\"checkLabelTruncation\"\n >\n <template #leading>\n <i\n class=\"material-symbols-filled ds-tag-picker__icon\"\n :style=\"hasTags ? { color: tags[0].color } : undefined\"\n aria-hidden=\"true\"\n >{{ hasTags ? 'sell' : 'label' }}</i\n >\n </template>\n <span ref=\"labelRef\" class=\"ds-tag-picker__label\">\n <template v-if=\"hasTags\">{{ text.taggedAs }} {{ tags[0].name }}</template>\n <template v-else>{{ label }}</template>\n </span>\n <template v-if=\"hasTags\" #trailing>\n <DsMoreCountChip :overflow=\"tags.length - 1\" :label=\"text.more\" />\n </template>\n </DsButton>\n </DsTooltip>\n </template>\n\n <DsOrganizerForm\n v-if=\"isForm\"\n class=\"ds-tag-picker__form\"\n :title=\"mode === 'edit' ? text.editFormTitle : text.createFormTitle\"\n :submit-label=\"mode === 'edit' ? text.editSubmit : text.createSubmit\"\n :name=\"formName\"\n :color=\"formColor\"\n :original-name=\"editing ? editing.name : undefined\"\n :original-color=\"editing ? editingColor : undefined\"\n :colors=\"colors\"\n :loading=\"formLoading\"\n :error-message=\"shownFormError\"\n :name-placeholder=\"text.namePlaceholder\"\n :set-color-label=\"text.setColor\"\n :back-label=\"text.back\"\n :error-missing-name=\"text.errorMissingName\"\n :error-too-long-name=\"text.errorTooLongName\"\n @update:name=\"formName = $event\"\n @update:color=\"formColor = $event\"\n @back=\"closeForm\"\n @submit=\"onSubmit\"\n />\n\n <div v-else class=\"ds-tag-picker__menu\">\n <DsInput\n ref=\"searchRef\"\n v-model=\"query\"\n class=\"ds-tag-picker__search\"\n type=\"search\"\n size=\"sm\"\n :placeholder=\"text.searchPlaceholder\"\n />\n\n <div class=\"ds-tag-picker__divider\" />\n\n <div class=\"ds-tag-picker__list\" role=\"group\" :aria-label=\"label\">\n <div v-for=\"option in filtered\" :key=\"option.id\" class=\"ds-tag-picker__option\">\n <DsCheckbox\n :model-value=\"selected.has(option.id)\"\n @update:model-value=\"toggleTag(option, $event)\"\n >\n <span\n class=\"ds-tag-picker__dot\"\n :style=\"{ background: option.color }\"\n aria-hidden=\"true\"\n />\n <span class=\"ds-tag-picker__name\">{{ option.name }}</span>\n </DsCheckbox>\n <DsPickerRowActions\n v-if=\"rowActionsMode !== DS_PICKER_ROW_ACTIONS.NONE\"\n :option=\"option\"\n :actions-label=\"text.actions\"\n :edit-label=\"text.edit\"\n :delete-label=\"text.delete\"\n @edit=\"onEdit\"\n @delete=\"onDelete\"\n />\n </div>\n\n <button v-if=\"canCreate\" type=\"button\" class=\"ds-tag-picker__create\" @click=\"onCreate\">\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">add</i>\n <span>{{ text.createRow }}</span>\n <span class=\"ds-tag-picker__create-query\">“{{ trimmedQuery }}”</span>\n </button>\n\n <p v-if=\"!filtered.length && !canCreate && text.empty\" class=\"ds-tag-picker__empty\">\n {{ text.empty }}\n </p>\n </div>\n\n <div class=\"ds-tag-picker__divider\" />\n <div class=\"ds-tag-picker__footer\" :class=\"{ 'is-split': showNew }\">\n <DsButton\n v-if=\"showNew\"\n class=\"ds-tag-picker__new\"\n :variant=\"DS_BUTTON_VARIANTS.TERTIARY\"\n :size=\"DS_BUTTON_SIZES.MEDIUM\"\n left-icon=\"add\"\n @click=\"openCreateForm()\"\n >{{ text.newButton }}</DsButton\n >\n <DsButton\n class=\"ds-tag-picker__apply\"\n :variant=\"DS_BUTTON_VARIANTS.PRIMARY\"\n :size=\"DS_BUTTON_SIZES.MEDIUM\"\n @click=\"apply\"\n >{{ text.apply }}</DsButton\n >\n </div>\n </div>\n </DsPopover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, ref, watch, type PropType } from 'vue';\nimport { DsPopover } from '@shared/ui/DsPopover';\nimport { DsTooltip } from '@shared/ui/DsTooltip';\nimport { DsInput } from '@shared/ui/DsInput';\nimport { DsCheckbox } from '@shared/ui/DsCheckbox';\nimport { DsOrganizerForm } from '@shared/ui/DsOrganizerForm';\nimport { DsPickerRowActions } from '@shared/ui/DsPickerRowActions';\nimport { DsButton, DS_BUTTON_SIZES, DS_BUTTON_VARIANTS } from '@shared/ui/DsButton';\nimport { DsMoreCountChip } from '@shared/ui/DsMoreCountChip';\nimport { usePickerOrganizer } from '@shared/composables/usePickerOrganizer';\nimport {\n APPLY,\n CREATE,\n CREATE_OPTION,\n DELETE,\n EDIT,\n FORM_CLOSE,\n SEARCH,\n UPDATE_OPEN,\n UPDATE_OPTION,\n} from '@shared/constants/events';\nimport {\n DS_PICKER_ALIGNS,\n DS_PICKER_CREATE_MODES,\n DS_PICKER_PANEL_MAX_WIDTH,\n DS_PICKER_ROW_ACTIONS,\n DS_PICKER_SIZES,\n filterOptions,\n isValidCreateMode,\n isValidRowActionsMode,\n mergeCopy,\n pickerPlacement,\n resolveLegacyPickerProps,\n type DsPickerAlign,\n type DsPickerCreateMode,\n type DsPickerOption,\n type DsPickerRowActionsMode,\n type DsPickerSize,\n} from '@shared/constants/pickers';\nimport {\n DS_TAG_PICKER_COPY,\n DS_TAG_PICKER_LEGACY_COPY,\n type DsTagPickerCopy,\n} from './DsTagPicker.types';\n\nconst props = defineProps({\n label: { type: String, required: true },\n tags: { type: Array as PropType<DsPickerOption[]>, default: () => [] },\n options: { type: Array as PropType<DsPickerOption[]>, required: true },\n size: { type: String as PropType<DsPickerSize>, default: DS_PICKER_SIZES.MEDIUM },\n // Shape follows the design per context (Diego, 22/09): squared in rows and the profile (the\n // export's `tagsLine`), `pill` in the bulk bar beside DsItemSelectorButton (\"Tag\").\n pill: { type: Boolean, default: false },\n align: { type: String as PropType<DsPickerAlign>, default: DS_PICKER_ALIGNS.START },\n disabled: { type: Boolean, default: false },\n // Unset (not 'none') so the deprecated props can still decide; resolved below.\n create: {\n type: String as PropType<DsPickerCreateMode>,\n default: undefined,\n // Inline so the published types don't reference the unexported validator.\n validator: (value: unknown, props: Record<string, unknown>) => isValidCreateMode(value, props),\n },\n rowActions: {\n type: [Boolean, String] as PropType<DsPickerRowActionsMode | boolean>,\n default: undefined,\n validator: (value: unknown, props: Record<string, unknown>) =>\n isValidRowActionsMode(value, props),\n },\n // Only the swatches of the in-panel form; the modes above decide what opens it.\n colors: { type: Array as PropType<string[]>, default: () => [] },\n // The consumer is saving the form; it calls `closeForm()` on success.\n formLoading: { type: Boolean, default: false },\n formError: { type: String, default: '' },\n copy: { type: Object as PropType<Partial<DsTagPickerCopy>>, default: undefined },\n\n // -- Deprecated aliases: resolved in `resolveLegacyPickerProps`, deleted in 4.0 ---------\n taggedAsLabel: { type: String, default: undefined },\n applyLabel: { type: String, default: undefined },\n searchPlaceholder: { type: String, default: undefined },\n emptyLabel: { type: String, default: undefined },\n createLabel: { type: String, default: undefined },\n moreLabel: { type: String, default: undefined },\n actionsLabel: { type: String, default: undefined },\n editLabel: { type: String, default: undefined },\n deleteLabel: { type: String, default: undefined },\n createFormTitle: { type: String, default: undefined },\n editFormTitle: { type: String, default: undefined },\n createSubmitLabel: { type: String, default: undefined },\n editSubmitLabel: { type: String, default: undefined },\n formNamePlaceholder: { type: String, default: undefined },\n setColorLabel: { type: String, default: undefined },\n backLabel: { type: String, default: undefined },\n errorMissingName: { type: String, default: undefined },\n errorTooLongName: { type: String, default: undefined },\n});\n\nconst emit = defineEmits([\n APPLY,\n CREATE,\n SEARCH,\n UPDATE_OPEN,\n EDIT,\n DELETE,\n CREATE_OPTION,\n UPDATE_OPTION,\n FORM_CLOSE,\n]);\n\nconst open = ref(false);\nconst query = ref('');\n// Working copy of the applied tags' ids. Seeded on open, thrown away on close without Apply.\nconst selected = ref<Set<string | number>>(new Set());\nconst searchRef = ref<InstanceType<typeof DsInput> | null>(null);\n\nconst resolved = computed(() =>\n resolveLegacyPickerProps({\n create: props.create,\n rowActions: props.rowActions,\n colors: props.colors,\n aliases: props,\n copyMap: DS_TAG_PICKER_LEGACY_COPY,\n })\n);\nconst createMode = computed(() => resolved.value.create);\nconst rowActionsMode = computed(() => resolved.value.rowActions);\nconst text = computed(() =>\n mergeCopy(DS_TAG_PICKER_COPY, resolved.value.copy as Partial<DsTagPickerCopy>, props.copy)\n);\n\nconst {\n mode,\n editing,\n formName,\n formColor,\n isForm,\n shownFormError,\n editingColor,\n resetForm,\n openCreateForm: openForm,\n onEdit,\n onDelete,\n onSubmit,\n closeForm,\n} = usePickerOrganizer({\n colors: () => props.colors,\n rowActions: () => rowActionsMode.value,\n formError: () => props.formError,\n emit,\n focusSearch: () => searchRef.value?.focus(),\n});\nconst showNew = computed(() => createMode.value === DS_PICKER_CREATE_MODES.FORM);\n\nconst hasTags = computed(() => props.tags.length > 0);\n// The exact text the trigger renders (see the template) — also the truncation tooltip's\n// full content.\nconst triggerLabel = computed(() =>\n hasTags.value ? `${text.value.taggedAs} ${props.tags[0].name}` : props.label\n);\nconst placement = computed(() => pickerPlacement(props.align));\nconst filtered = computed(() => filterOptions(props.options, query.value));\nconst trimmedQuery = computed(() => query.value.trim());\nconst canCreate = computed(() => {\n if (createMode.value === DS_PICKER_CREATE_MODES.NONE || !trimmedQuery.value) return false;\n const needle = trimmedQuery.value.toLowerCase();\n return !props.options.some((option) => option.name.toLowerCase() === needle);\n});\n// Picker sizes map 1:1 onto DS control heights: medium 32px, large 36px.\nconst buttonSize = computed(() =>\n props.size === DS_PICKER_SIZES.LARGE ? DS_BUTTON_SIZES.LARGE : DS_BUTTON_SIZES.MEDIUM\n);\n\nfunction setOpen(next: boolean) {\n if (open.value === next) return;\n if (next) {\n query.value = '';\n selected.value = new Set(props.tags.map((tag) => tag.id));\n }\n resetForm();\n open.value = next;\n emit(UPDATE_OPEN, next);\n}\n\nfunction toggle() {\n if (props.disabled) return;\n setOpen(!open.value);\n}\n\n// Measured against the rendered box (scrollWidth vs clientWidth), never guessed from\n// length — same approach as DsProfileHero's headline. Re-measured on mount and whenever\n// the displayed text changes, so a picker that's never hovered (e.g. touch) still resolves\n// correctly, and hovering isn't the only path to a correct `disabled` value.\nconst labelRef = ref<HTMLElement | null>(null);\nconst isLabelTruncated = ref(false);\n\nfunction checkLabelTruncation() {\n const el = labelRef.value;\n isLabelTruncated.value = !!el && el.scrollWidth > el.clientWidth;\n}\n\nonMounted(() => void nextTick(checkLabelTruncation));\nwatch(triggerLabel, () => void nextTick(checkLabelTruncation));\n\nfunction toggleTag(option: DsPickerOption, on: boolean) {\n const next = new Set(selected.value);\n if (on) next.add(option.id);\n else next.delete(option.id);\n selected.value = next;\n}\n\n// Options come back in the order the app listed them; an applied tag the list does not\n// carry (a paginated catalogue) survives at the end instead of being silently dropped.\nfunction apply() {\n const known = new Set(props.options.map((option) => option.id));\n const result = [\n ...props.options.filter((option) => selected.value.has(option.id)),\n ...props.tags.filter((tag) => selected.value.has(tag.id) && !known.has(tag.id)),\n ];\n emit(APPLY, result);\n setOpen(false);\n}\n\nfunction openCreateForm() {\n openForm(trimmedQuery.value);\n}\n\n// `event`: tag creation is the app's, it receives the text and decides (create + apply,\n// modal…). `form`: the create row opens the in-panel form, named after that text.\nfunction onCreate() {\n if (createMode.value === DS_PICKER_CREATE_MODES.FORM) openCreateForm();\n else emit(CREATE, trimmedQuery.value);\n}\n\ndefineExpose({ closeForm });\n\n// Cursor in the search as the panel opens, so the user can type at once.\nwatch(open, (isOpen) => {\n if (isOpen) nextTick(() => searchRef.value?.focus());\n});\nwatch(query, (value) => emit(SEARCH, value));\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/pickers.scss' as p;\n\n.ds-tag-picker {\n display: inline-flex;\n // Shrinks inside a flex row (the drawer's action row, next to DsSavedButton) instead of\n // hugging its content — the picker's own text is the dynamic part that can overflow.\n flex: 0 1 auto;\n min-width: 0;\n position: relative;\n\n // The composed trigger (DsTooltip → DsButton → its content/label spans) is inline-flex\n // end to end; every level defaults to `min-width: auto`, which blocks shrinking below the\n // label's un-wrapped width before it ever reaches the ellipsis below. `:deep()` only\n // reaches the instances rendered as THIS trigger — other DsTooltip / DsButton consumers\n // keep their own default sizing untouched.\n :deep(.ds-tooltip),\n :deep(.ds-popover),\n :deep(.ds-popover__trigger) {\n min-width: 0;\n }\n\n // Slot content of the DsButton trigger.\n &__icon {\n font-size: i.icon-size(16);\n line-height: 1;\n }\n &__label {\n display: block;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n // A selector, not a CTA: the DS rule is «700 for labels and emphasis», and the DS's own\n // selector (DsItemSelectorButton) is bold. The size stays the `body` token.\n font-weight: t.$weight-bold;\n }\n &__trigger {\n min-width: 0;\n\n :deep(.ds-button__content),\n :deep(.ds-button__label) {\n min-width: 0;\n }\n // The glyph and the +N chip are fixed-size content, not text that should ellipsize —\n // the label alone absorbs the row's squeeze.\n :deep(.ds-button__icon) {\n flex-shrink: 0;\n }\n }\n // The +N chip is part of the button's hit area: it takes the pointer, not its own arrow.\n &__trigger :deep(.ds-more-count-chip) {\n cursor: inherit;\n }\n\n // -- picker (export tagMenu, 240px) --------------------------------------------------\n &__search {\n width: 100%;\n contain: inline-size; // the input's own width must not widen a growing panel\n }\n &__divider {\n @include p.divider;\n }\n &__list {\n @include p.list(200px); // export tagMenu maxHeight\n }\n &__option {\n @include p.option-row;\n }\n &__dot {\n flex: none;\n width: 9px; // export\n height: 9px;\n border-radius: r.$radius-full;\n }\n &__name {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: t.$weight-semibold; // export tag rows: 13/600\n font-size: t.font-size('small');\n }\n\n // The create row: accent text, add glyph, the typed text quoted (export).\n &__create {\n display: flex;\n align-items: center;\n gap: 9px;\n width: 100%;\n min-height: 36px;\n padding: 0 10px;\n\n border: 0;\n border-radius: r.$radius-card;\n background: transparent;\n color: colors.$accent-main;\n font-family: t.$font-family;\n font-size: t.font-size('small');\n font-weight: t.$weight-bold;\n text-align: left;\n cursor: pointer;\n\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:hover {\n background: colors.$slate-bg;\n }\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n .material-symbols-filled {\n font-size: i.icon-size(18);\n line-height: 1;\n }\n }\n &__create-query {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n &__empty {\n @include p.empty;\n }\n &__footer {\n @include p.footer;\n align-items: center;\n }\n}\n</style>\n","// DsAddToSequence — the canonical \"Add to sequence\" control: a trigger and a picker with\n// the SEND TO choice (Work / Direct email, stacked radios), a searchable multi-select of\n// campaigns and an Add confirm. Measured from the design export's `SequenceButton` /\n// `sequenceMenu`. One affordance for the full profile and the bulk bars.\n//\n// Nothing here knows what a campaign is: the app passes the list and receives the intent.\n\nimport type {\n DsPickerAlign,\n DsPickerOption,\n DsPickerSize,\n DsSequenceChannel,\n DsSequenceChannelOption,\n} from '@shared/constants/pickers';\n\n/** Trigger look: the export's `secondary` (white + ring → DsButton `outline`) or `primary` (solid accent). */\nexport const DS_ADD_TO_SEQUENCE_VARIANTS = {\n SECONDARY: 'secondary',\n PRIMARY: 'primary',\n} as const;\nexport type DsAddToSequenceVariant =\n (typeof DS_ADD_TO_SEQUENCE_VARIANTS)[keyof typeof DS_ADD_TO_SEQUENCE_VARIANTS];\n\n/** The `add` payload: which email kind to send to, and the chosen campaigns. */\nexport interface DsAddToSequencePayload {\n channel: DsSequenceChannel;\n campaigns: DsPickerOption[];\n}\n\nexport interface DsAddToSequenceProps {\n /** Trigger label (\"Add to sequence\"). App copy. */\n label: string;\n tooltip?: string;\n /** Caption above the channel radios (\"Send to\"). */\n channelsLabel: string;\n /** The stacked radios — the app passes the labels (\"Work email\", \"Direct email\"). */\n channels: DsSequenceChannelOption[];\n defaultChannel?: DsSequenceChannel;\n /** Caption above the campaign list (\"Recent campaigns\"). Empty = none. */\n campaignsLabel?: string;\n campaigns: DsPickerOption[];\n searchPlaceholder?: string;\n emptyLabel?: string;\n /** The confirm (\"Add\"). Disabled until at least one campaign is selected. */\n addLabel: string;\n variant?: DsAddToSequenceVariant;\n size?: DsPickerSize;\n /** Fully round trigger (`DsButton pill`) — the bulk-bar look beside `DsItemSelectorButton`. */\n pill?: boolean;\n align?: DsPickerAlign;\n disabled?: boolean;\n}\n","<template>\n <div\n class=\"ds-add-to-sequence\"\n :class=\"[\n `ds-add-to-sequence--${variant}`,\n `ds-add-to-sequence--${size}`,\n { 'is-open': open, 'is-disabled': disabled },\n ]\"\n >\n <DsPopover\n :open=\"open\"\n :placement=\"placement\"\n width=\"288px\"\n :trigger-on-click=\"false\"\n @update:open=\"setOpen\"\n >\n <template #trigger>\n <!-- The tooltip sleeps while the panel is open: two layers on one trigger is noise. -->\n <DsTooltip :content=\"tooltip\" :disabled=\"!tooltip || open\" placement=\"bottom\">\n <!-- The trigger IS a DsButton (compose, don't duplicate): the export's `secondary`\n (white + hairline ring) is the DS `outline`, its `primary` the DS `primary`. -->\n <DsButton\n class=\"ds-add-to-sequence__trigger\"\n :variant=\"buttonVariant\"\n :size=\"buttonSize\"\n :pill=\"pill\"\n :disabled=\"disabled\"\n aria-haspopup=\"dialog\"\n :aria-expanded=\"open\"\n @click=\"toggle\"\n >\n <template #leading>\n <i class=\"material-symbols-filled ds-add-to-sequence__icon\" aria-hidden=\"true\"\n >send</i\n >\n </template>\n <span class=\"ds-add-to-sequence__label\">{{ label }}</span>\n </DsButton>\n </DsTooltip>\n </template>\n\n <div class=\"ds-add-to-sequence__menu\">\n <p class=\"ds-add-to-sequence__section\">{{ channelsLabel }}</p>\n <div class=\"ds-add-to-sequence__channels\" role=\"radiogroup\" :aria-label=\"channelsLabel\">\n <div\n v-for=\"option in channels\"\n :key=\"option.value\"\n class=\"ds-add-to-sequence__channel\"\n :class=\"{ 'is-on': channel === option.value }\"\n >\n <DsRadio\n :name=\"groupName\"\n :value=\"option.value\"\n :model-value=\"channel === option.value\"\n @update:model-value=\"channel = option.value\"\n >{{ option.label }}</DsRadio\n >\n </div>\n </div>\n\n <DsInput\n ref=\"searchRef\"\n v-model=\"query\"\n class=\"ds-add-to-sequence__search\"\n type=\"search\"\n size=\"sm\"\n :placeholder=\"searchPlaceholder\"\n />\n\n <p v-if=\"campaignsLabel\" class=\"ds-add-to-sequence__section\">{{ campaignsLabel }}</p>\n <div class=\"ds-add-to-sequence__list\" role=\"group\" :aria-label=\"campaignsLabel || label\">\n <div v-for=\"option in filtered\" :key=\"option.id\" class=\"ds-add-to-sequence__option\">\n <DsCheckbox\n :model-value=\"selected.has(option.id)\"\n @update:model-value=\"toggleCampaign(option, $event)\"\n >{{ option.name }}</DsCheckbox\n >\n </div>\n <p v-if=\"!filtered.length && emptyLabel\" class=\"ds-add-to-sequence__empty\">\n {{ emptyLabel }}\n </p>\n </div>\n\n <div class=\"ds-add-to-sequence__divider\" />\n <div class=\"ds-add-to-sequence__footer\">\n <DsButton\n class=\"ds-add-to-sequence__add\"\n :variant=\"DS_BUTTON_VARIANTS.PRIMARY\"\n :size=\"DS_BUTTON_SIZES.MEDIUM\"\n :disabled=\"selected.size === 0\"\n @click=\"add\"\n >{{ addLabel }}</DsButton\n >\n </div>\n </div>\n </DsPopover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref, useId, watch, type PropType } from 'vue';\nimport { DsPopover } from '@shared/ui/DsPopover';\nimport { DsTooltip } from '@shared/ui/DsTooltip';\nimport { DsInput } from '@shared/ui/DsInput';\nimport { DsRadio } from '@shared/ui/DsRadio';\nimport { DsCheckbox } from '@shared/ui/DsCheckbox';\nimport { DsButton, DS_BUTTON_SIZES, DS_BUTTON_VARIANTS } from '@shared/ui/DsButton';\nimport { ADD, SEARCH, UPDATE_OPEN } from '@shared/constants/events';\nimport {\n DS_PICKER_ALIGNS,\n DS_PICKER_SIZES,\n DS_SEQUENCE_CHANNELS,\n filterOptions,\n pickerPlacement,\n type DsPickerAlign,\n type DsPickerOption,\n type DsPickerSize,\n type DsSequenceChannel,\n type DsSequenceChannelOption,\n} from '@shared/constants/pickers';\nimport {\n DS_ADD_TO_SEQUENCE_VARIANTS,\n type DsAddToSequencePayload,\n type DsAddToSequenceVariant,\n} from './DsAddToSequence.types';\n\nconst props = defineProps({\n label: { type: String, required: true },\n tooltip: { type: String, default: '' },\n channelsLabel: { type: String, required: true },\n channels: { type: Array as PropType<DsSequenceChannelOption[]>, required: true },\n defaultChannel: {\n type: String as PropType<DsSequenceChannel>,\n default: DS_SEQUENCE_CHANNELS.WORK,\n },\n campaignsLabel: { type: String, default: '' },\n campaigns: { type: Array as PropType<DsPickerOption[]>, required: true },\n searchPlaceholder: { type: String, default: '' },\n emptyLabel: { type: String, default: '' },\n addLabel: { type: String, required: true },\n variant: {\n type: String as PropType<DsAddToSequenceVariant>,\n default: DS_ADD_TO_SEQUENCE_VARIANTS.SECONDARY,\n },\n size: { type: String as PropType<DsPickerSize>, default: DS_PICKER_SIZES.MEDIUM },\n // Fully round trigger — the bulk-bar look beside DsItemSelectorButton.\n pill: { type: Boolean, default: false },\n align: { type: String as PropType<DsPickerAlign>, default: DS_PICKER_ALIGNS.END },\n disabled: { type: Boolean, default: false },\n});\n\nconst emit = defineEmits([ADD, SEARCH, UPDATE_OPEN]);\n\nconst open = ref(false);\nconst query = ref('');\nconst searchRef = ref<InstanceType<typeof DsInput> | null>(null);\nconst channel = ref<DsSequenceChannel>(props.defaultChannel);\nconst selected = ref<Set<string | number>>(new Set());\nconst groupName = useId();\n\nconst placement = computed(() => pickerPlacement(props.align));\nconst filtered = computed(() => filterOptions(props.campaigns, query.value));\n// The export's two looks map onto DS button variants (secondary = white + ring = `outline`);\n// picker sizes onto DS control heights.\nconst buttonVariant = computed(() =>\n props.variant === DS_ADD_TO_SEQUENCE_VARIANTS.PRIMARY\n ? DS_BUTTON_VARIANTS.PRIMARY\n : DS_BUTTON_VARIANTS.OUTLINE\n);\nconst buttonSize = computed(() =>\n props.size === DS_PICKER_SIZES.LARGE ? DS_BUTTON_SIZES.LARGE : DS_BUTTON_SIZES.MEDIUM\n);\n\nfunction setOpen(next: boolean) {\n if (open.value === next) return;\n if (next) query.value = '';\n open.value = next;\n emit(UPDATE_OPEN, next);\n}\n\nfunction toggle() {\n if (props.disabled) return;\n setOpen(!open.value);\n}\n\nfunction toggleCampaign(option: DsPickerOption, on: boolean) {\n const next = new Set(selected.value);\n if (on) next.add(option.id);\n else next.delete(option.id);\n selected.value = next;\n}\n\nfunction add() {\n if (selected.value.size === 0) return;\n const payload: DsAddToSequencePayload = {\n channel: channel.value,\n campaigns: props.campaigns.filter((option) => selected.value.has(option.id)),\n };\n emit(ADD, payload);\n selected.value = new Set();\n setOpen(false);\n}\n\n// Cursor in the search as the panel opens, so the user can type at once.\nwatch(open, (isOpen) => {\n if (isOpen) nextTick(() => searchRef.value?.focus());\n});\nwatch(query, (value) => emit(SEARCH, value));\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/pickers.scss' as p;\n\n.ds-add-to-sequence {\n display: inline-flex;\n flex: none;\n position: relative;\n\n // Slot content of the DsButton trigger.\n &__icon {\n font-size: i.icon-size(16); // export: send 16\n line-height: 1;\n }\n &__label {\n white-space: nowrap;\n }\n\n // -- panel (export sequenceMenu, 288px) ----------------------------------------------\n &__section {\n @include p.section-label;\n }\n &__channels {\n display: flex;\n flex-direction: column;\n gap: 6px; // export\n padding: 0 6px 10px;\n }\n // Boxed radio card: hairline ring at rest, accent ring + tint when chosen (export).\n &__channel {\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-card;\n background: colors.$white;\n transition:\n border-color m.$duration-default m.$easing,\n background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n :deep(.ds-radio) {\n display: flex;\n align-items: center;\n gap: s.spacing(1);\n padding: s.spacing(1) s.spacing(1.5); // export 8px 12px\n cursor: pointer;\n }\n :deep(.ds-radio__label) {\n color: colors.$slate-main;\n font-size: t.font-size('small');\n font-weight: t.$weight-bold;\n white-space: nowrap;\n }\n\n &.is-on {\n border-color: colors.$accent-main;\n background: colors.$accent-bg;\n\n :deep(.ds-radio__label) {\n color: colors.$accent-main;\n }\n }\n }\n\n &__search {\n width: 100%;\n }\n &__list {\n @include p.list(176px); // export maxHeight\n }\n &__option {\n @include p.option-row;\n\n :deep(.ds-checkbox__label) {\n font-size: t.font-size('small');\n font-weight: t.$weight-semibold; // export campaign rows: 13/600\n }\n }\n &__empty {\n @include p.empty;\n }\n &__divider {\n @include p.divider;\n }\n &__footer {\n @include p.footer;\n }\n}\n</style>\n"],"names":["DS_SPINNER_TONES","DS_SPINNER_SIZES","SPINNER_SIZE_PX","props","__props","resolvedSize","computed","_a","_createElementBlock","_normalizeClass","_normalizeStyle","CLICK","CLOSE","FOCUS","BLUR","CHANGE","FIELD_BLUR","COPY","REVEAL","CORRECT","INCORRECT","SORT","EDIT","SELECT_ALL","PAGE_CHANGE","PAGE_SIZE_CHANGE","SEARCH","SELECT","STEP","FINAL_STEP","NAVIGATE","RESIZE_START","RESIZE","RESIZE_END","UPDATE_OPEN","PICK","APPLY","ADD","CREATE","BACK","SUBMIT","DELETE","CREATE_OPTION","UPDATE_OPTION","UPDATE_NAME","UPDATE_COLOR","FORM_CLOSE","DS_BUTTON_VARIANTS","DS_BUTTON_SIZES","DS_BUTTON_NATIVE_TYPES","emit","__emit","iconSize","SOLID_FILL_VARIANTS","spinnerTone","handleClick","event","_createBlock","_unref","DsSpinner","_createElementVNode","$slots","_openBlock","_hoisted_3","_renderSlot","_ctx","_hoisted_4","_toDisplayString","_hoisted_5","_hoisted_6","_hoisted_7","DS_TAG_TONES","_hoisted_1","_cache","_withModifiers","$event","DS_BADGE_TONES","imageFailed","ref","watch","onImageError","showsImage","initials","derivedLabel","ariaLabel","boxWidth","boxHeight","boxStyle","resolvedTextSize","hashed","seed","hash","i","rgb","light","_hoisted_2","model","_useModel","inputRef","syncIndeterminate","onMounted","DS_TABLE_ALIGN","DS_TABLE_PIN","compoundColspan","rowHeightStyle","heightStyle","onSelectAll","checked","pinWidthPx","width","match","columnPinStyles","map","left","col","right","pinEdgeKeys","lefts","c","rights","set","columnPinClass","column","columnHeaderStyle","pin","columnCellStyle","normalizedHeaders","headerPinStyles","list","h","headerPinEdges","headerPinClass","header","index","headerStyle","wrapperRef","scrolledStart","scrolledEnd","resizeObserver","updateScrollShadow","el","teardownScroll","prev","onBeforeUnmount","nextTick","_createVNode","DsCheckbox","_Fragment","_renderList","_hoisted_8","_hoisted_10","row","DS_INPUT_TYPES","DS_INPUT_SIZES","inputEl","onFieldFocusOut","e","next","root","slots","useSlots","reveal","toggleReveal","isPassword","isSearch","resolvedType","hasRevealToggle","hasSuffix","__expose","n","DS_TEXTAREA_RESIZE","DS_TEXTAREA_VARIANTS","FALLBACK_LINE_HEIGHT","value","v","control","px","fit","cs","line","chrome","content","min","max","onFocus","onBlur","observer","lastWidth","entry","attrs","useAttrs","isRootAttr","k","rootAttrs","controlAttrs","_mergeProps","DS_ALERT_TYPES","DS_ALERT_EFFECTS","DS_ALERT_ICONS","visible","icon","hasBody","hasTitle","onClose","_Transition","DS_NOTIFICATION_TYPES","DS_NOTIFICATION_POSITIONS","DS_NOTIFICATION_ICONS","DS_NOTIFICATION_LINK_TARGETS","STACK_CLASS","notificationTeleportTarget","position","modifier","existing","host","teleportTarget","linkRel","timer","startedAt","remaining","clearTimer","schedule","ms","pause","resume","onLinkClick","_Teleport","dialogRef","lastFocused","titleId","useId","dialogStyle","onBackdrop","focusables","onKeydown","f","first","last","activateModal","_b","deactivateModal","restoreFocus","active","wasActive","DsButton","POINTER_EVENTS","modality","consumers","onPointerDown","attach","type","detach","isKeyboardFocus","useInputModality","useTeleportAnchor","rootRef","onTriggerHidden","anchorRect","tracking","triggerVisibility","anchorStyle","box","rect","sync","watchTriggerVisibility","entries","track","untrack","VIEWPORT_SHIFT_VAR","VIEWPORT_MARGIN","OPPOSITE_SIDE","useViewportClamp","elRef","placement","flip","shift","flipped","shiftStyle","resolvedPlacement","preferred","dash","side","opposite","measureFlip","trigger","t","gap","below","above","size","measure","r","shiftsHorizontally","start","end","limit","activate","deactivate","DS_TOOLTIP_PLACEMENTS","BUBBLE_GAP","tooltipId","bubbleRef","activateClamp","deactivateClamp","trackAnchor","untrackAnchor","isVisible","hasContent","d","hide","hovering","focused","describedEl","prevDescribedBy","describe","undescribe","scheduleShow","onMouseLeave","onFocusIn","target","onFocusOut","wrapper","DS_VERIFICATION_STATES","status","_createTextVNode","useClipboardCopy","unmounted","copy","text","copied","copiedTimer","copyToClipboard","handleCopy","handleCorrect","handleIncorrect","DsVerificationIcon","DsBadge","collapsed","total","showSections","empty","isCollapsed","toggle","onCopy","onSort","onEdit","onCorrect","datum","onIncorrect","_hoisted_9","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","DsContactValue","_hoisted_19","_hoisted_20","_hoisted_21","handleChange","uid","inputId","descriptionId","hasDescription","DS_SELECT_TYPES","DS_SELECT_WIDTHS","instanceId","listboxId","optionId","triggerRef","searchRef","open","activeIndex","query","isFilter","localFilterActive","filteredOptions","q","o","visibleOptions","runs","result","option","g","selectedValues","hasSelection","isFilterSelected","isSelected","labelCache","reactive","opts","labelFor","_c","summaryText","NAMED_WIDTHS","widthClass","rootStyle","activeOptionId","findInitialActiveIndex","firstSelected","openDropdown","closeDropdown","refocusTrigger","toggleOpen","selectOption","current","alreadySelected","clearSelection","moveActive","delta","len","onTriggerKeydown","onSearchKeydown","onSearchInput","onDocumentMousedown","isOpen","isDisabled","run","it","onClick","toLength","cellStyle","style","offset","DS_CUSTOM_TAG_TYPES","DS_PILL_TONES","legendSegments","seg","hasLegend","idx","$attrs","ELLIPSIS_LEFT","ELLIPSIS_RIGHT","pageCount","pages","count","_","items","page","goTo","onSizeChange","item","s","DS_WIZARD_STEP_STATES","isLast","resolvedSteps","step","state","selectStep","finish","_resolveDynamicComponent","DS_DRAWER_DIRECTIONS","panelRef","labelledBy","clamp","currentWidth","resizing","panelStyle","requestClose","swallowOverlayClick","onOverlay","startX","startWidth","widthFromEvent","raw","onDragStart","onDragMove","onDragEnd","stopDragListening","DS_POPOVER_PLACEMENTS","POPOVER_LAYER","TELEPORTED_POPOVER_Z_INDEX","PANEL_GAP","nestedContains","containsNode","node","contains","layer","provide","unregisterFromParent","inject","panelId","anchorBox","close","onTriggerClick","onEscape","onDocumentMouseDown","wasOpen","ENABLED_ITEM","useMenuKeyboard","menuRef","options","focusFirst","DS_ACTION_MENU_WEIGHTS","innerOpen","setOpen","openFromKey","focusTrigger","closeAndRefocus","choose","onMenuKeydown","opened","DsPopover","args","failed","initial","imageStyle","rows","detail","DsCompanyLogo","DsTooltip","DS_CONTACT_KINDS","DS_CONTACT_TYPES","DS_CONTACT_TYPE_ICONS","contactTypeIcon","kind","MASK_GLYPHS","overflowFromGroupSize","groupSize","pushSegment","segments","masked","splitMaskedValue","at","isGlyph","EMAIL_MASK_CIRCLES","MASK_CIRCLE","circlesFor","segment","char","firstCircleIndex","groups","section","sum","group","showsBadge","iconFor","rowKey","copiedKey","key","DsMaskedValue","DsDeliverabilityBadge","pinned","primary","hasPopover","overflow","hasMasked","showsReveal","leaveTimer","onEnter","onLeave","onPanelEnter","onPanelLeave","onPopoverUpdate","onDocumentKeydown","isNowOpen","DsMoreCountChip","DsContactList","bodyId","showsBody","toggleAttrs","DS_CONTACT_PLACEHOLDER_STATES","DS_CONTACT_PLACEHOLDER_ICONS","glyph","DS_CLAMPED_TEXT_DEFAULT_LINES","textId","textRef","expanded","overflows","showToggle","subline","field","hasRest","DsProfileCard","DsClampedText","fullName","headlineRef","isHeadlineTruncated","checkHeadlineTruncation","DsAvatar","logoFailed","onLogoError","showsLogo","DS_PICKER_SIZES","DS_PICKER_ALIGNS","DS_PICKER_PANEL_MAX_WIDTH","DS_PICKER_CREATE_MODES","DS_PICKER_ROW_ACTIONS","DS_SEQUENCE_CHANNELS","filterOptions","needle","pickerPlacement","align","mergeCopy","defaults","partials","merged","partial","hasColors","isValidCreateMode","isValidRowActionsMode","resolveLegacyPickerProps","input","withForm","create","rowActions","alias","targets","labelId","swatchEls","touched","trimmedName","isValid","isChanged","canSubmit","validationError","shownError","tabStop","onNameInput","submit","setSwatchRef","ARROW_STEPS","onSwatchKeydown","focus","DsInput","swatch","activeMenu","self","usePickerOrganizer","view","mode","editing","formName","formColor","dismissedError","isForm","firstColor","shownFormError","error","editingColor","resetForm","openCreateForm","name","onDelete","onSubmit","color","closeForm","DS_SAVED_BUTTON_COPY","DS_SAVED_BUTTON_LEGACY_COPY","resolved","createMode","rowActionsMode","openForm","groupName","filtered","buttonSize","isCurrent","pick","onCreate","DsOrganizerForm","DsRadio","DsPickerRowActions","DS_TAG_PICKER_COPY","DS_TAG_PICKER_LEGACY_COPY","selected","showNew","hasTags","triggerLabel","trimmedQuery","canCreate","tag","labelRef","isLabelTruncated","checkLabelTruncation","toggleTag","on","apply","known","DS_ADD_TO_SEQUENCE_VARIANTS","channel","buttonVariant","toggleCampaign","add","payload"],"mappings":"uGAEaA,GAAmB,CAC9B,KAAM,OACN,MAAO,QACP,OAAQ,QACV,EAMaC,GAAmB,CAC9B,MAAO,QACP,OAAQ,SACR,MAAO,OACT,8LCKA,MAAMC,EAAiD,CACrD,CAACD,GAAiB,KAAK,EAAG,GAC1B,CAACA,GAAiB,MAAM,EAAG,GAC3B,CAACA,GAAiB,KAAK,EAAG,EAAA,EAGtBE,EAAQC,EAaRC,EAAeC,EAAAA,SAAS,WAC5B,cAAOH,EAAM,MAAS,UAAYI,EAAAL,EAAgBC,EAAM,IAAI,IAA1B,KAAAI,EAA+B,GAAMJ,EAAM,KAAA,8BAxC7EK,EAAAA,mBAMQ,OAAA,CALN,MAAKC,EAAAA,eAAA,CAAC,aAAY,eACKL,EAAA,IAAI,EAAA,CAAA,EAC3B,KAAK,SACJ,MAAKM,EAAAA,eAAA,CAAA,MAAA,GAAcL,EAAA,KAAY,KAAA,OAAA,GAAiBA,EAAA,KAAY,KAAA,EAC5D,aAAYD,EAAA,OAAS,MAAA,kICLbO,EAAQ,QAIRC,EAAQ,QAIRC,GAAQ,QAGRC,GAAO,OAKPC,GAAS,SASTC,GAAa,aAKbC,GAAO,OAKPC,GAAS,SAGTC,GAAU,UAGVC,GAAY,YAIZC,GAAO,OAGPC,GAAO,OAKPC,GAAa,aAKbC,GAAc,cAGdC,GAAmB,mBASnBC,GAAS,SAOTC,GAAS,SAGTC,GAAO,OAGPC,GAAa,aAMbC,GAAW,WAUXC,GAAe,eAGfC,GAAS,SAGTC,GAAa,aAKbC,EAAc,cAQdC,GAAO,OAGPC,GAAQ,QAGRC,GAAM,MAGNC,GAAS,SAUTC,GAAO,OAGPC,GAAS,SAGTC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QtT,CAAM,CAAA,qBACjD,IAAiB,CAAdyP,EAAAA,gBAAAjQ,EAAAA,gBAAA8T,EAAO,IAAI,EAAA,CAAA,CAAA,+DAGTgR,EAAA,MAAS,QAAU7oB,EAAA,0BAA7BI,qBAEI,IAFJ8D,GAEIH,EAAAA,gBADC/D,EAAA,UAAU,EAAA,CAAA,kDAIjBwD,EAAAA,mBAA2C,MAAA,CAAtC,MAAM,6BAAA,EAA6B,KAAA,EAAA,GACxCA,EAAAA,mBASM,MATNyF,GASM,CARJJ,cAOCvF,EAAAA,MAAA0L,CAAA,EAAA,CANC,MAAM,0BACL,QAAS1L,EAAAA,MAAAX,CAAA,EAAmB,QAC5B,KAAMW,EAAAA,MAAAV,CAAA,EAAgB,OACtB,SAAU2mB,EAAA,MAAS,OAAI,EACvB,QAAOkB,CAAA,qBACP,IAAc,qCAAXzqB,EAAA,QAAQ,EAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/ui/DsSpinner/DsSpinner.types.ts","../src/ui/DsSpinner/DsSpinner.vue","../src/constants/events.ts","../src/ui/DsButton/DsButton.types.ts","../src/ui/DsButton/DsButton.vue","../src/ui/DsTag/DsTag.types.ts","../src/ui/DsTag/DsTag.vue","../src/ui/DsBadge/DsBadge.types.ts","../src/ui/DsBadge/DsBadge.vue","../src/ui/DsAvatar/DsAvatar.vue","../src/ui/DsCheckbox/DsCheckbox.vue","../src/ui/DsTable/DsTable.types.ts","../src/ui/DsTable/DsTable.vue","../src/ui/DsInput/DsInput.types.ts","../src/ui/DsInput/DsInput.vue","../src/ui/DsTextarea/DsTextarea.types.ts","../src/ui/DsTextarea/DsTextarea.vue","../src/ui/DsAlert/DsAlert.types.ts","../src/ui/DsAlert/DsAlert.vue","../src/constants/layers.ts","../src/ui/DsNotification/DsNotification.types.ts","../src/ui/DsNotification/notificationStack.ts","../src/ui/DsNotification/DsNotification.vue","../src/ui/DsModal/DsModal.vue","../src/composables/useInputModality.ts","../src/composables/useTeleportAnchor.ts","../src/composables/useViewportClamp.ts","../src/ui/DsTooltip/DsTooltip.types.ts","../src/ui/DsTooltip/DsTooltip.vue","../src/ui/DsVerificationIcon/DsVerificationIcon.types.ts","../src/ui/DsVerificationIcon/DsVerificationIcon.vue","../src/composables/useClipboardCopy.ts","../src/ui/DsContactValue/DsContactValue.vue","../src/ui/DsDataCard/DsDataCard.vue","../src/ui/DsRadio/DsRadio.vue","../src/ui/DsRadioCard/DsRadioCard.vue","../src/ui/DsSwitch/DsSwitch.vue","../src/ui/DsItemSelectorButton/DsItemSelectorButton.vue","../src/ui/DsSelect/DsSelect.types.ts","../src/ui/DsSelect/DsSelect.vue","../src/ui/DsRow/DsRow.vue","../src/ui/DsCell/DsCell.vue","../src/ui/DsCustomTag/DsCustomTag.types.ts","../src/ui/DsCustomTag/DsCustomTag.vue","../src/ui/DsPill/DsPill.types.ts","../src/ui/DsPill/DsPill.vue","../src/ui/DsPillWithBorder/DsPillWithBorder.vue","../src/ui/DsSegmentedProgressBar/DsSegmentedProgressBar.vue","../src/ui/DsEmptyState/DsEmptyState.vue","../src/ui/DsPaginator/DsPaginator.vue","../src/ui/DsMenuItem/DsMenuItem.vue","../src/ui/DsWizardStepper/DsWizardStepper.types.ts","../src/ui/DsWizardStepper/DsWizardStepper.vue","../src/ui/DsDrawer/DsDrawer.types.ts","../src/ui/DsDrawer/DsDrawer.vue","../src/ui/DsPopover/DsPopover.types.ts","../src/ui/DsPopover/popoverLayers.ts","../src/ui/DsPopover/DsPopover.vue","../src/composables/useMenuKeyboard.ts","../src/ui/DsActionMenu/DsActionMenu.types.ts","../src/ui/DsActionMenu/DsActionMenu.vue","../src/ui/DsCompanyLogo/DsCompanyLogo.vue","../src/ui/DsCompanyCard/DsCompanyCard.vue","../src/constants/contact-data.ts","../src/ui/DsMaskedValue/DsMaskedValue.vue","../src/ui/DsDeliverabilityBadge/DsDeliverabilityBadge.vue","../src/ui/DsMoreCountChip/DsMoreCountChip.vue","../src/ui/DsContactList/DsContactList.vue","../src/ui/DsContactCell/DsContactCell.vue","../src/ui/DsProfileCard/DsProfileCard.vue","../src/ui/DsProfileGroupBar/DsProfileGroupBar.vue","../src/ui/DsContactPlaceholder/DsContactPlaceholder.types.ts","../src/ui/DsContactPlaceholder/DsContactPlaceholder.vue","../src/ui/DsClampedText/DsClampedText.types.ts","../src/ui/DsClampedText/DsClampedText.vue","../src/ui/DsProfileCompanyCard/DsProfileCompanyCard.vue","../src/ui/DsProfileHero/DsProfileHero.vue","../src/ui/DsProfileKvRow/DsProfileKvRow.vue","../src/ui/DsProfileTimelineRow/DsProfileTimelineRow.vue","../src/ui/DsProfileLockedCard/DsProfileLockedCard.vue","../src/constants/pickers.ts","../src/ui/DsOrganizerForm/DsOrganizerForm.vue","../src/ui/DsPickerRowActions/DsPickerRowActions.vue","../src/composables/usePickerOrganizer.ts","../src/ui/DsSavedButton/DsSavedButton.types.ts","../src/ui/DsSavedButton/DsSavedButton.vue","../src/ui/DsTagPicker/DsTagPicker.types.ts","../src/ui/DsTagPicker/DsTagPicker.vue","../src/ui/DsAddToSequence/DsAddToSequence.types.ts","../src/ui/DsAddToSequence/DsAddToSequence.vue"],"sourcesContent":["// DsSpinner — the DS \"Spinner\": a rotating border-ring. Tones mirror Spinner.jsx.\n\nexport const DS_SPINNER_TONES = {\n DARK: 'dark', // slate ring — for light surfaces (default)\n LIGHT: 'light', // white ring — for dark surfaces / solid buttons\n ACCENT: 'accent', // accent ring\n} as const;\nexport type DsSpinnerTone = (typeof DS_SPINNER_TONES)[keyof typeof DS_SPINNER_TONES];\n\n// Named sizes (DS `size`: number | \"small\" | \"medium\" | \"large\") — resolved to\n// px by DsSpinner.vue. Numeric sizes still pass straight through; the default\n// (24) is unchanged and doesn't correspond to any of these named steps.\nexport const DS_SPINNER_SIZES = {\n SMALL: 'small', // 20px\n MEDIUM: 'medium', // 32px\n LARGE: 'large', // 48px\n} as const;\nexport type DsSpinnerSize = (typeof DS_SPINNER_SIZES)[keyof typeof DS_SPINNER_SIZES];\n","<template>\n <span\n class=\"ds-spinner\"\n :class=\"`ds-spinner--${tone}`\"\n role=\"status\"\n :style=\"{ width: `${resolvedSize}px`, height: `${resolvedSize}px` }\"\n :aria-label=\"label || undefined\"\n ></span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport {\n DS_SPINNER_TONES,\n DS_SPINNER_SIZES,\n type DsSpinnerTone,\n type DsSpinnerSize,\n} from './DsSpinner.types';\n\n// Named size → px (DS STRING_SIZES). Kept local: only DsSpinner.vue needs the\n// resolved pixel value.\nconst SPINNER_SIZE_PX: Record<DsSpinnerSize, number> = {\n [DS_SPINNER_SIZES.SMALL]: 20,\n [DS_SPINNER_SIZES.MEDIUM]: 32,\n [DS_SPINNER_SIZES.LARGE]: 48,\n};\n\nconst props = defineProps({\n // Diameter in px, or a named size (\"small\" 20 / \"medium\" 32 / \"large\" 48).\n // Default (24) is unchanged and isn't one of the named steps.\n size: { type: [Number, String] as PropType<number | DsSpinnerSize>, default: 24 },\n tone: {\n type: String as PropType<DsSpinnerTone>,\n default: DS_SPINNER_TONES.DARK,\n },\n // Accessible name (DS default \"Loading\"); the consuming app can override for\n // i18n. role=\"status\" + aria-label are always present, never opt-in.\n label: { type: String, default: 'Loading' },\n});\n\nconst resolvedSize = computed(() =>\n typeof props.size === 'string' ? (SPINNER_SIZE_PX[props.size] ?? 24) : props.size\n);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/motion.scss' as m;\n\n@keyframes ds-spinner-rot {\n to {\n transform: rotate(360deg);\n }\n}\n\n.ds-spinner {\n display: inline-block;\n\n border: 2px solid;\n border-radius: 50%;\n\n animation: ds-spinner-rot 1s linear infinite;\n\n @include m.reduce-motion {\n animation: none;\n }\n\n &--dark {\n border-color: colors.$slate-tint;\n border-top-color: colors.$slate-main;\n }\n &--light {\n border-color: rgba(255, 255, 255, 0.4);\n border-top-color: colors.$white;\n }\n &--accent {\n border-color: colors.$accent-mid;\n border-top-color: colors.$accent-main;\n }\n}\n</style>\n","// Generic click event for props/emit.\nexport const CLICK = 'click' as const;\nexport type ClickEventName = typeof CLICK;\n\n// Close event (e.g. DsTag with × / closable) — maps to the DS onClose.\nexport const CLOSE = 'close' as const;\nexport type CloseEventName = typeof CLOSE;\n\n// Focus events for form controls (DsInput / DsTextarea).\nexport const FOCUS = 'focus' as const;\nexport type FocusEventName = typeof FOCUS;\n\nexport const BLUR = 'blur' as const;\nexport type BlurEventName = typeof BLUR;\n\n// Value commit (DsInput): the native `change` event (blur/Enter with a changed\n// value), distinct from update:modelValue (the v-model's continuous input).\nexport const CHANGE = 'change' as const;\nexport type ChangeEventName = typeof CHANGE;\n\n// REAL field-exit focus signal (DsInput): focus left the whole component, not an\n// inner descendant. Unlike BLUR (the native `<input>` `blur`, which does NOT\n// bubble and therefore fires even when focus moves to the component's own\n// password toggle button), FIELD_BLUR uses `focusout` —which does bubble— plus\n// relatedTarget/`currentTarget.contains(next)` to emit only when focus leaves\n// outward. Payload: the FocusEvent.\nexport const FIELD_BLUR = 'field-blur' as const;\nexport type FieldBlurEventName = typeof FIELD_BLUR;\n\n// Data-family events (DsContactValue / DsDataCard).\n// COPY carries the copied value; CORRECT / INCORRECT mark a datum's rating.\nexport const COPY = 'copy' as const;\nexport type CopyEventName = typeof COPY;\n\n// REVEAL: the user asked to unmask a group's values (DsContactCell «Show details»). No payload —\n// the consumer knows which contact and column it is; the cell only reports intent.\nexport const REVEAL = 'reveal' as const;\nexport type RevealEventName = typeof REVEAL;\n\nexport const CORRECT = 'correct' as const;\nexport type CorrectEventName = typeof CORRECT;\n\nexport const INCORRECT = 'incorrect' as const;\nexport type IncorrectEventName = typeof INCORRECT;\n\n// DsDataCard header actions.\nexport const SORT = 'sort' as const;\nexport type SortEventName = typeof SORT;\n\nexport const EDIT = 'edit' as const;\nexport type EditEventName = typeof EDIT;\n\n// DsTable bulk selection — the \"select all\" checkbox column.\n// Payload: the new boolean state.\nexport const SELECT_ALL = 'select-all' as const;\nexport type SelectAllEventName = typeof SELECT_ALL;\n\n// Pagination (DsPaginator). PAGE_CHANGE carries the new page number (1-based);\n// PAGE_SIZE_CHANGE carries the new page size.\nexport const PAGE_CHANGE = 'page-change' as const;\nexport type PageChangeEventName = typeof PAGE_CHANGE;\n\nexport const PAGE_SIZE_CHANGE = 'page-size-change' as const;\nexport type PageSizeChangeEventName = typeof PAGE_SIZE_CHANGE;\n\n// Text typed into DsSelect's embedded search box (prop `filterable`). Emitted on\n// every input change, and with '' when the dropdown closes and clears the filter\n// (so a `remote` consumer restores the full set on reopen; harmless locally). By\n// default DsSelect filters locally; an app wanting remote filtering uses `remote`\n// + listens to `search` to replace `options` (so local filtering isn't duplicated\n// on top of already-filtered results).\nexport const SEARCH = 'search' as const;\nexport type SearchEventName = typeof SEARCH;\n\n// Navigation-family events (DsMenuItem / DsWizardStepper).\n// SELECT: a menu row was chosen (DsMenuItem: the MouseEvent; DsActionMenu: the item id).\n// STEP: the wizard moved to a step (1-based number).\n// FINAL_STEP: the wizard's final action was triggered (no payload).\nexport const SELECT = 'select' as const;\nexport type SelectEventName = typeof SELECT;\n\nexport const STEP = 'step' as const;\nexport type StepEventName = typeof STEP;\n\nexport const FINAL_STEP = 'final-step' as const;\nexport type FinalStepEventName = typeof FINAL_STEP;\n\n// NAVIGATE: se clickeó el link de una notificación (DsNotification). Lleva el\n// MouseEvent (como SELECT), así el consumidor puede hacer preventDefault() y\n// enrutar in-app con el router de su app en vez de la navegación nativa del <a>.\nexport const NAVIGATE = 'navigate' as const;\nexport type NavigateEventName = typeof NAVIGATE;\n\n// Drawer resize (DsDrawer). The component clamps to its min/max props and emits\n// the resulting width in px on every step; PERSISTING that width is the\n// consumer's job (frontend-app's usePersistedWidth), never the component's.\n// RESIZE_START — drag began, carries the width at that moment\n// RESIZE — every move while dragging, carries the already-clamped width\n// RESIZE_END — drag released, carries the final clamped width\n// A consumer that only wants to store the result listens to RESIZE_END alone.\nexport const RESIZE_START = 'resize-start' as const;\nexport type ResizeStartEventName = typeof RESIZE_START;\n\nexport const RESIZE = 'resize' as const;\nexport type ResizeEventName = typeof RESIZE;\n\nexport const RESIZE_END = 'resize-end' as const;\nexport type ResizeEndEventName = typeof RESIZE_END;\n\n// v-model:open (DsPopover). The component never closes itself — it asks the\n// consumer to flip the boolean, same presentational contract as DsModal.\nexport const UPDATE_OPEN = 'update:open' as const;\nexport type UpdateOpenEventName = typeof UPDATE_OPEN;\n\n// Picker family (SALESQL-3535: DsSavedButton / DsTagPicker / DsAddToSequence).\n// PICK: a single option was chosen (payload: the option) — a folder to re-file into.\n// APPLY: a multi-selection was confirmed (payload: the selected options).\n// ADD: the add-to-sequence confirm (payload: `{ channel, campaigns }`).\n// CREATE: the \"create a new one\" affordance was used (payload: the current search text).\nexport const PICK = 'pick' as const;\nexport type PickEventName = typeof PICK;\n\nexport const APPLY = 'apply' as const;\nexport type ApplyEventName = typeof APPLY;\n\nexport const ADD = 'add' as const;\nexport type AddEventName = typeof ADD;\n\nexport const CREATE = 'create' as const;\nexport type CreateEventName = typeof CREATE;\n\n// In-panel create/edit form (DsOrganizerForm, SALESQL-3298).\n// BACK: the title row was used to leave the form (no payload).\n// SUBMIT: the form passed validation (payload: `{ name, color }`, name trimmed).\n// UPDATE_NAME / UPDATE_COLOR: v-model:name / v-model:color — the form is controlled, the\n// parent echoes the value back through the prop.\n// DELETE / CREATE_OPTION / UPDATE_OPTION: row delete and the create / edit submit of the\n// pickers that embed the form.\nexport const BACK = 'back' as const;\nexport type BackEventName = typeof BACK;\n\nexport const SUBMIT = 'submit' as const;\nexport type SubmitEventName = typeof SUBMIT;\n\nexport const DELETE = 'delete' as const;\nexport type DeleteEventName = typeof DELETE;\n\nexport const CREATE_OPTION = 'create-option' as const;\nexport type CreateOptionEventName = typeof CREATE_OPTION;\n\nexport const UPDATE_OPTION = 'update-option' as const;\nexport type UpdateOptionEventName = typeof UPDATE_OPTION;\n\nexport const UPDATE_NAME = 'update:name' as const;\nexport type UpdateNameEventName = typeof UPDATE_NAME;\n\nexport const UPDATE_COLOR = 'update:color' as const;\nexport type UpdateColorEventName = typeof UPDATE_COLOR;\n\n// FORM_CLOSE: the in-panel form was dismissed (back, closeForm() or the panel closing). Clear\n// `formError` here; an error left over from the dismissed session is not shown on reopen.\nexport const FORM_CLOSE = 'form-close' as const;\nexport type FormCloseEventName = typeof FORM_CLOSE;\n","// DsButton — 1:1 with the SalesQL Design System \"Button\" (components/core/Button.jsx).\n// Variants map to the DS `variantStyle`; sizes to the DS control heights.\n\n// Variants (classes: ds-button--<variant>)\nexport const DS_BUTTON_VARIANTS = {\n DEFAULT: 'default', // white surface, dark text (the default value; == tertiary)\n PRIMARY: 'primary', // solid accent fill, white text — the main CTA\n SECONDARY: 'secondary', // slate surface fill, dark text\n TERTIARY: 'tertiary', // white surface, dark text (low-emphasis row action)\n // White surface, dark text, 1px slate-tint ring — the design export's secondary trigger\n // (contact-data `SavedButton` / `tagsLine` / `SequenceButton`, ActionBar `secBtn`).\n OUTLINE: 'outline',\n QUATERNARY: 'quaternary', // accent text + accent-mid border on white (former \"special\")\n QUINARY: 'quinary', // accent text on white, no border (link-style) (former \"special2\")\n SENARY: 'senary', // accent text on accent-tint; hover fills solid accent (former \"special3\")\n DOTTED: 'dotted', // transparent, dashed border, 24px radius — \"add\" affordance\n DANGER: 'danger', // destructive/delete — error text on error-tint (DS tint style)\n AI: 'ai', // AI gradient fill (pink → orange), white text — primary-like action of the AI features\n // Legacy: solid-red fill (white text) kept for back-compat. The DS treats\n // `warning` as a deprecated alias of `danger` (tint), but app consumers already\n // ship this solid look — kept unchanged to avoid a visual regression. Prefer `danger`.\n WARNING: 'warning',\n} as const;\nexport type DsButtonVariant = (typeof DS_BUTTON_VARIANTS)[keyof typeof DS_BUTTON_VARIANTS];\n\n// Sizes = DS control heights (classes: ds-button--<size>)\nexport const DS_BUTTON_SIZES = {\n SMALL: 'small', // 24px\n MEDIUM: 'medium', // 32px\n LARGE: 'large', // 36px\n XLARGE: 'xlarge', // 48px\n} as const;\nexport type DsButtonSize = (typeof DS_BUTTON_SIZES)[keyof typeof DS_BUTTON_SIZES];\n\n// Native <button> type\nexport const DS_BUTTON_NATIVE_TYPES = {\n BUTTON: 'button',\n SUBMIT: 'submit',\n RESET: 'reset',\n} as const;\nexport type DsButtonNativeType =\n (typeof DS_BUTTON_NATIVE_TYPES)[keyof typeof DS_BUTTON_NATIVE_TYPES];\n","<template>\n <button\n class=\"ds-button\"\n :type=\"nativeType\"\n :disabled=\"disabled || loading\"\n :autofocus=\"autofocus\"\n :aria-busy=\"loading || undefined\"\n :aria-disabled=\"disabled || loading || undefined\"\n :aria-pressed=\"selected || undefined\"\n :aria-label=\"ariaLabel || undefined\"\n :class=\"[\n `ds-button--${variant}`,\n `ds-button--${size}`,\n {\n 'is-disabled': disabled || loading,\n 'is-loading': loading,\n 'is-circle': circle,\n 'is-square': square,\n 'is-pill': pill,\n 'is-no-padding': noPadding,\n 'is-selected': selected,\n },\n ]\"\n @click=\"handleClick\"\n >\n <DsSpinner v-if=\"loading\" class=\"ds-button__spinner\" :size=\"iconSize\" :tone=\"spinnerTone\" />\n\n <!-- El contenido queda montado mientras loading (visibility-hidden + aria-hidden)\n para que el botón conserve su ancho: el spinner lo overlea, en vez de\n colapsar al ancho del spinner y volver a saltar al terminar. -->\n <span class=\"ds-button__content\" :aria-hidden=\"loading || undefined\">\n <span v-if=\"leftIcon || $slots.leading\" class=\"ds-button__icon ds-button__icon--leading\">\n <slot name=\"leading\"\n ><i class=\"material-symbols-filled\" aria-hidden=\"true\">{{ leftIcon }}</i></slot\n >\n </span>\n\n <span v-if=\"$slots.default && !circle && !square\" class=\"ds-button__label\"><slot /></span>\n\n <span v-if=\"rightIcon || $slots.trailing\" class=\"ds-button__icon ds-button__icon--trailing\">\n <slot name=\"trailing\"\n ><i class=\"material-symbols-filled\" aria-hidden=\"true\">{{ rightIcon }}</i></slot\n >\n </span>\n </span>\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport { DsSpinner, DS_SPINNER_TONES } from '@shared/ui/DsSpinner';\nimport { CLICK } from '@shared/constants/events';\nimport {\n DS_BUTTON_NATIVE_TYPES,\n DS_BUTTON_SIZES,\n DS_BUTTON_VARIANTS,\n type DsButtonNativeType,\n type DsButtonSize,\n type DsButtonVariant,\n} from './DsButton.types';\n\nconst props = defineProps({\n variant: { type: String as PropType<DsButtonVariant>, default: DS_BUTTON_VARIANTS.DEFAULT },\n size: { type: String as PropType<DsButtonSize>, default: DS_BUTTON_SIZES.MEDIUM },\n nativeType: {\n type: String as PropType<DsButtonNativeType>,\n default: DS_BUTTON_NATIVE_TYPES.BUTTON,\n },\n // Material Icon names (rendered via <i class=\"material-symbols-filled\">); a leading/\n // trailing slot overrides. Icon-only buttons (circle/square) need ariaLabel.\n leftIcon: { type: String, default: '' },\n rightIcon: { type: String, default: '' },\n ariaLabel: { type: String, default: '' },\n disabled: Boolean,\n loading: Boolean,\n // Round icon-only button (width === height, fully circular).\n circle: Boolean,\n // Flat 4px-radius icon-only button (the DS `*-square` sizes): symmetric padding\n // per size, height === width.\n square: Boolean,\n // Zero the square padding for a tight, edge-to-edge glyph (DS `small-square-no-padding`).\n // Only takes effect together with `square`.\n noPadding: Boolean,\n // Fully round ends (radius-full) on a text button — the bulk-bar look next to\n // DsItemSelectorButton. Height and padding are the size's; only the radius changes.\n pill: Boolean,\n // Toggle state: accent outline + fill; sets aria-pressed (DS `selected`).\n selected: Boolean,\n autofocus: Boolean,\n});\n\n// Runtime array (not the type-only form): the SFC compiler can't resolve\n// `typeof CLICK` to a literal, leaving `emits` empty at runtime. With `click`\n// undeclared, the parent's @click both falls through to the native <button>\n// AND is invoked by emit() → the listener fires twice. Declaring it at runtime\n// (via the CLICK constant, per convention) excludes it from fallthrough.\nconst emit = defineEmits([CLICK]);\n\nconst iconSize = computed(() => (props.size === DS_BUTTON_SIZES.SMALL ? 14 : 20));\n// Solid-fill variants (white text) take the light spinner; the rest, dark.\nconst SOLID_FILL_VARIANTS: DsButtonVariant[] = [\n DS_BUTTON_VARIANTS.PRIMARY,\n DS_BUTTON_VARIANTS.WARNING,\n DS_BUTTON_VARIANTS.AI,\n];\nconst spinnerTone = computed(() =>\n SOLID_FILL_VARIANTS.includes(props.variant) ? DS_SPINNER_TONES.LIGHT : DS_SPINNER_TONES.DARK\n);\n\nfunction handleClick(event: MouseEvent) {\n if (props.disabled || props.loading) return;\n emit(CLICK, event);\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/icons.scss' as i;\n\n.ds-button {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n padding: 0;\n\n font-family: t.$font-family;\n font-weight: t.$weight-medium; // 500 (DS); small overrides to 400\n font-size: t.font-size('body');\n line-height: 20px;\n\n border: 1px solid transparent;\n border-radius: r.$radius-control;\n outline: none;\n\n cursor: pointer;\n transition:\n background-color m.$duration-default m.$easing,\n border-color m.$duration-default m.$easing,\n opacity m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &.is-disabled {\n opacity: 0.55;\n cursor: not-allowed;\n }\n\n &__icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n // DS icon size: 20px (small → 14px). Sizing the glyph to fill its box also\n // removes the optical \"gap\" a smaller glyph leaves against the button edge.\n .material-symbols-filled {\n font-size: i.icon-size(20);\n line-height: 1;\n }\n }\n\n // Material glyphs carry a built-in keyline (~2–3px advance bearing). Absorb it\n // on the edge side so a leading/trailing icon sits at the same optical inset as\n // a text-only button. Not for icon-only (circle/square) buttons — those stay centered.\n &:not(.is-circle):not(.is-square) &__icon--leading {\n margin-left: -3px;\n }\n &:not(.is-circle):not(.is-square) &__icon--trailing {\n margin-right: -3px;\n }\n\n // Content wrapper stays in flow while loading (hidden) so the button keeps its\n // width; the spinner is overlaid on top instead of replacing the content.\n &__content {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n }\n &.is-loading &__content {\n visibility: hidden;\n }\n\n // A button labels a single action — it must not wrap. With the height pinned per\n // size (control-height), wrappable text would break the control height; nowrap\n // makes it size to content and overflow horizontally (harmless) instead.\n &__label {\n white-space: nowrap;\n }\n\n // Overlaid over the (hidden) content — centered without a fixed size.\n // Size comes from the :size prop (iconSize).\n &__spinner {\n position: absolute;\n inset: 0;\n margin: auto;\n }\n\n /* ---------- Variants (DS variantStyle) ---------- */\n // `default` and `tertiary` are identical in the DS (white surface, dark text).\n &--default,\n &--tertiary {\n color: colors.$slate-main;\n background-color: colors.$white;\n\n &:hover:not(.is-disabled) {\n background-color: colors.$slate-tint;\n }\n }\n // White surface with a hairline ring (design export: secondary triggers). Hover moves\n // the surface to the app background, the ring stays.\n &--outline {\n color: colors.$slate-main;\n border-color: colors.$slate-tint;\n background-color: colors.$white;\n\n &:hover:not(.is-disabled) {\n background-color: colors.$slate-bg;\n }\n }\n &--primary {\n color: colors.$white;\n background-color: colors.$accent-main;\n\n &:hover:not(.is-disabled) {\n background-color: colors.$accent-shadow;\n }\n }\n // Primary-like with the AI gradient fill (pink → orange); hover darkens the start stop.\n &--ai {\n color: colors.$white;\n background-image: colors.$gradient-ai;\n background-origin: border-box; // the gradient also fills under the 1px transparent border\n\n &:hover:not(.is-disabled) {\n background-image: colors.$gradient-ai-hover;\n }\n }\n &--secondary {\n color: colors.$slate-main;\n background-color: colors.$slate-bg;\n\n &:hover:not(.is-disabled) {\n background-color: colors.$slate-tint;\n }\n }\n &--quaternary {\n color: colors.$accent-main;\n border-color: colors.$accent-mid;\n background-color: colors.$white;\n\n &:hover:not(.is-disabled) {\n border-color: colors.$accent-main;\n }\n }\n &--quinary {\n color: colors.$accent-main;\n background-color: colors.$white;\n\n &:hover:not(.is-disabled) {\n background-color: colors.$accent-bg;\n }\n }\n // Ordinal accent (tint fill) — accent text on accent-tint, weight 400; hover\n // fills solid accent with white text (DS `senary`, former \"special3\").\n &--senary {\n color: colors.$accent-main;\n font-weight: t.$weight-regular; // 400 (DS)\n background-color: colors.$accent-tint;\n\n &:hover:not(.is-disabled) {\n color: colors.$white;\n background-color: colors.$accent-main;\n }\n }\n // Destructive / delete (DS `danger`) — error text on error tint; hover deepens it.\n &--danger {\n color: colors.$error-main;\n background-color: colors.$error-tint;\n\n &:hover:not(.is-disabled) {\n background-color: colors.$error-mid;\n }\n }\n // Legacy solid-red fill (white text). Kept for back-compat; the DS aliases\n // `warning` → `danger` (tint), but consumers ship this solid look. Prefer `danger`.\n &--warning {\n color: colors.$white;\n background-color: colors.$error-main;\n\n &:hover:not(.is-disabled) {\n background-color: colors.$error-shadow;\n }\n }\n // \"Add\" affordance — dashed border, 24px radius, weight 700, no hover (DS).\n &--dotted {\n color: colors.$slate-mid;\n font-weight: t.$weight-bold;\n\n border: 1px dashed colors.$slate-mid;\n border-radius: r.$radius-dashed;\n background-color: transparent;\n }\n\n /* ---------- Selected (toggle) — wins over the variant, incl. hover ---------- */\n &.is-selected,\n &.is-selected:hover:not(.is-disabled) {\n color: colors.$accent-main;\n border-color: colors.$accent-main;\n background-color: colors.$accent-bg;\n background-image: none;\n }\n\n /* ---------- Sizes (DS control heights + paddings) ---------- */\n &--small {\n height: s.control-height('small');\n padding: 0 s.control-padding('small');\n\n font-weight: t.$weight-regular; // 400\n font-size: t.font-size('caption');\n\n .ds-button__content {\n gap: 2px;\n }\n .ds-button__icon .material-symbols-filled {\n font-size: i.icon-size(14);\n }\n }\n &--medium {\n height: s.control-height('medium');\n padding: 0 s.control-padding('medium');\n }\n &--large {\n height: s.control-height('large');\n padding: 0 s.control-padding('large');\n }\n &--xlarge {\n height: s.control-height('xlarge');\n padding: 0 s.control-padding('xlarge');\n }\n\n /* ---------- Pill (text button, fully round ends) ---------- */\n &.is-pill {\n border-radius: r.$radius-full;\n }\n\n /* ---------- Circle (icon-only, true circle) ---------- */\n // width === height (= the size's control height): aspect-ratio alone lets the\n // content stretch the box into an oval, so pin the width to the height per size.\n &.is-circle {\n padding: 0;\n border-radius: r.$radius-full;\n }\n &--small.is-circle {\n width: s.control-height('small');\n }\n &--medium.is-circle {\n width: s.control-height('medium');\n }\n &--large.is-circle {\n width: s.control-height('large');\n }\n &--xlarge.is-circle {\n width: s.control-height('xlarge');\n }\n\n /* ---------- Square (icon-only, flat 4px) ---------- */\n // DS `*-square`: symmetric padding per size on a flat 4px radius, around a\n // centered glyph. Width is pinned to the control height per size (like circle):\n // with box-sizing:border-box the 1px border is baked into the fixed height but\n // NOT into the content-driven width, so padding alone leaves the box 2px wider\n // than tall. Pinning the width forces a true square.\n &.is-square {\n border-radius: r.$radius-control;\n }\n &--small.is-square {\n width: s.control-height('small');\n padding: s.control-square-padding('small');\n }\n &--medium.is-square {\n width: s.control-height('medium');\n padding: s.control-square-padding('medium');\n }\n &--large.is-square {\n width: s.control-height('large');\n padding: s.control-square-padding('large');\n }\n &--xlarge.is-square {\n width: s.control-height('xlarge');\n padding: s.control-square-padding('xlarge');\n }\n\n // Zero-padding square (DS `small-square-no-padding`): tight glyph in a fixed\n // square box. Like circle, pin the width to the size's control height so\n // dropping the padding can't collapse the width below the height — the button\n // stays square (height === width) per this component's invariant.\n &.is-square.is-no-padding {\n padding: 0;\n }\n &--small.is-square.is-no-padding {\n width: s.control-height('small');\n }\n &--medium.is-square.is-no-padding {\n width: s.control-height('medium');\n }\n &--large.is-square.is-no-padding {\n width: s.control-height('large');\n }\n &--xlarge.is-square.is-no-padding {\n width: s.control-height('xlarge');\n }\n}\n</style>\n","// DsTag — the DS \"Tag\": small bordered chip with optional close (×).\n// ⚠️ NOT the solid pill (that is DsBadge). See DESIGN-SYSTEM.md reconciliation.\n// Tones mirror the DS Tag source (Tag.jsx TONES). `rounded` → semicircular sides.\n\nexport const DS_TAG_TONES = {\n DEFAULT: 'default', // white bg, slate-tint border, muted text\n GREY: 'grey', // alias of `default` — the DS app passes tone=\"grey\" (ApiApp.jsx)\n SUCCESS: 'success', // e.g. Verified\n INFO: 'info', // e.g. Work\n WARNING: 'warning', // e.g. Pending\n ERROR: 'error', // e.g. Bounced\n} as const;\nexport type DsTagTone = (typeof DS_TAG_TONES)[keyof typeof DS_TAG_TONES];\n","<template>\n <span\n class=\"ds-tag\"\n :class=\"[\n `ds-tag--${tone}`,\n { 'is-rounded': rounded, 'is-clickable': clickable, 'is-truncate': truncate },\n ]\"\n >\n <!-- Label wrapper: only this clips under is-truncate. The close button is a\n sibling (outside this span), so it is never affected by the ellipsis. -->\n <span class=\"ds-tag__label\"><slot /></span>\n\n <button\n v-if=\"closable\"\n type=\"button\"\n class=\"ds-tag__close\"\n :aria-label=\"closeLabel || undefined\"\n @click.stop=\"emit(CLOSE)\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">close</i>\n </button>\n </span>\n</template>\n\n<script setup lang=\"ts\">\nimport { type PropType } from 'vue';\nimport { CLOSE } from '@shared/constants/events';\nimport { DS_TAG_TONES, type DsTagTone } from './DsTag.types';\n\ndefineProps({\n tone: {\n type: String as PropType<DsTagTone>,\n default: DS_TAG_TONES.DEFAULT,\n },\n // Semicircular sides (DS `rounded`): radius-round vs the default radius-control.\n rounded: Boolean,\n // Show a × close control that emits `close`.\n closable: Boolean,\n // Clickable affordance (DS: presence of `onClick` toggles cursor: pointer).\n // Vue can't cheaply detect an attached native @click listener, so this is an\n // explicit opt-in; it only sets cursor styling and doesn't touch the native\n // @click fallthrough behavior.\n clickable: Boolean,\n // Opt-in single-line truncation for long labels (default off). The consuming\n // app sets the ceiling via the `--ds-tag-max-width` CSS custom property; the\n // label then clips with an ellipsis while the close control stays intact.\n truncate: Boolean,\n // Accessible name for the × control (the app owns the wording / i18n).\n closeLabel: {\n type: String,\n default: '',\n },\n});\n\nconst emit = defineEmits<{\n (e: typeof CLOSE): void;\n}>();\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/icons.scss' as i;\n\n.ds-tag {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n\n padding: 0 10px;\n\n color: colors.$slate-mid;\n font-family: t.$font-family;\n font-weight: t.$weight-regular;\n font-size: t.font-size('caption');\n line-height: 30px;\n\n background-color: colors.$white;\n\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-control;\n\n white-space: nowrap;\n\n // Allow the label to shrink below its content width so the ellipsis can kick\n // in when the chip is capped (no visible effect until is-truncate + a cap).\n min-width: 0;\n\n &.is-rounded {\n border-radius: r.$radius-round;\n }\n\n // Clickable affordance (DS: cursor: pointer when an onClick handler is present).\n &.is-clickable {\n cursor: pointer;\n }\n\n // Opt-in truncation: the app sets the ceiling via `--ds-tag-max-width` (a CSS\n // custom property, not a hardcoded px), defaulting to `none` (uncapped).\n &.is-truncate {\n max-width: var(--ds-tag-max-width, none);\n }\n\n &__label {\n min-width: 0;\n }\n\n // Only the label clips; the close button (a sibling) is untouched.\n &.is-truncate &__label {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n &__close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n // Never shrink or clip the close control, however tight the cap.\n flex-shrink: 0;\n\n padding: 0;\n\n color: inherit;\n\n background: transparent;\n border: 0;\n\n cursor: pointer;\n\n .material-symbols-filled {\n font-size: i.icon-size(12);\n }\n }\n\n /* ---------- Tones (default: white + tint border + muted text) ---------- */\n // `grey` is a DS alias of `default` (the DS app passes tone=\"grey\").\n &--default,\n &--grey {\n color: colors.$slate-mid;\n border-color: colors.$slate-tint;\n background-color: colors.$white;\n }\n &--success {\n color: colors.$success-shadow;\n border-color: colors.$success-mid;\n background-color: colors.$success-tint;\n }\n &--info {\n color: colors.$info-shadow;\n border-color: colors.$info-mid;\n background-color: colors.$info-tint;\n }\n &--warning {\n color: colors.$warning-shadow;\n border-color: colors.$warning-mid;\n background-color: colors.$warning-tint;\n }\n &--error {\n color: colors.$error-shadow;\n border-color: colors.$error-mid;\n background-color: colors.$error-tint;\n }\n}\n</style>\n","// DsBadge — the DS \"Badge\": solid, white-text pill (value types & counts).\n// ⚠️ NOT the tint chip (that is DsTag). See DESIGN-SYSTEM.md reconciliation.\n// Tones mirror the DS Badge source (Badge.jsx TONES).\n\nexport const DS_BADGE_TONES = {\n ACCENT: 'accent', // e.g. Work (purple)\n GREY: 'grey', // e.g. Direct (slate-soft)\n INFO: 'info', // e.g. Mobile (blue)\n SUCCESS: 'success', // e.g. New (green)\n ERROR: 'error', // coral\n WARNING: 'warning', // orange\n} as const;\nexport type DsBadgeTone = (typeof DS_BADGE_TONES)[keyof typeof DS_BADGE_TONES];\n","<template>\n <span class=\"ds-badge\" :class=\"`ds-badge--${tone}`\">\n <slot />\n </span>\n</template>\n\n<script setup lang=\"ts\">\nimport { type PropType } from 'vue';\nimport { DS_BADGE_TONES, type DsBadgeTone } from './DsBadge.types';\n\ndefineProps({\n tone: {\n type: String as PropType<DsBadgeTone>,\n default: DS_BADGE_TONES.ACCENT,\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n\n.ds-badge {\n display: inline-flex;\n align-items: center;\n\n height: 17px;\n padding: 0 8px;\n\n color: colors.$white;\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('caption');\n line-height: 17px;\n\n border-radius: r.$radius-pill;\n\n white-space: nowrap;\n\n /* ---------- Tones (solid fill, white text) ---------- */\n &--accent {\n background-color: colors.$accent-main;\n }\n &--grey {\n background-color: colors.$slate-soft;\n }\n &--info {\n background-color: colors.$info-main;\n }\n &--success {\n background-color: colors.$success-main;\n }\n &--error {\n background-color: colors.$error-main;\n }\n &--warning {\n background-color: colors.$warning-main;\n }\n}\n</style>\n","<template>\n <img\n v-if=\"showsImage\"\n class=\"ds-avatar\"\n :class=\"{ 'is-circular': circular }\"\n :src=\"image\"\n :alt=\"ariaLabel\"\n :style=\"boxStyle\"\n @error=\"onImageError\"\n />\n\n <div\n v-else-if=\"initials\"\n class=\"ds-avatar ds-avatar--initials\"\n :class=\"{ 'is-circular': circular, 'ds-avatar--accent': accent }\"\n role=\"img\"\n :aria-label=\"ariaLabel || undefined\"\n :style=\"[\n boxStyle,\n {\n // The accent tone is fixed (a CSS class), so the hashed background/color\n // is never emitted inline when `accent` is set.\n background: accent ? undefined : hashed.bg,\n color: accent ? undefined : hashed.fg,\n fontSize: `${resolvedTextSize}px`,\n fontWeight: fontWeight,\n },\n ]\"\n >\n {{ initials }}\n </div>\n\n <div\n v-else\n class=\"ds-avatar ds-avatar--placeholder\"\n :class=\"{ 'is-circular': circular }\"\n :style=\"boxStyle\"\n aria-hidden=\"true\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\n\nconst props = defineProps({\n image: { type: String, default: '' },\n firstName: { type: String, default: '' },\n lastName: { type: String, default: '' },\n // Explicit initials (DS `letters`) — overrides the computed firstName+lastName\n // initials when non-empty. Passed through as-is (no uppercase transform),\n // matching the DS: only the firstName+lastName path uppercases.\n letters: { type: String, default: '' },\n uid: { type: String, default: '' },\n size: { type: Number, default: 40 },\n // Explicit width/height (DS parity) — override `size` per-axis when present.\n width: { type: Number, default: undefined },\n height: { type: Number, default: undefined },\n // Initials font-size in px — overrides the computed ~40%-of-box value when present.\n textSize: { type: Number, default: undefined },\n // Initials font-weight — overrides the default token weight (900) when present.\n fontWeight: { type: [Number, String], default: undefined },\n circular: Boolean,\n // Fixed accent tone (background `colors.$accent-bg`, text `colors.$accent-shadow`)\n // instead of the per-person hashed color. Additive: default behavior is unchanged.\n accent: Boolean,\n // Accessible label. Omitted → falls back to the computed name/letters. An explicit\n // value wins — including `alt=\"\"` for a deliberately decorative image (default is\n // `undefined`, so \"\" is distinguishable from \"not provided\").\n alt: { type: String, default: undefined },\n});\n\n// An <img> that fails to load falls back to the initials variant (or the placeholder\n// when there are no initials either) instead of showing a broken-image icon.\nconst imageFailed = ref(false);\nwatch(\n () => props.image,\n () => (imageFailed.value = false)\n);\nfunction onImageError() {\n imageFailed.value = true;\n}\nconst showsImage = computed(() => !!props.image && !imageFailed.value);\n\nconst initials = computed(() => {\n if (props.letters) return props.letters;\n return props.firstName && props.lastName\n ? (props.firstName.charAt(0) + props.lastName.charAt(0)).toUpperCase()\n : '';\n});\n\nconst derivedLabel = computed(() => `${props.firstName} ${props.lastName}`.trim() || props.letters);\n// `??` (not `||`): an explicit \"\" (decorative) is preserved; only a truly absent\n// `alt` (undefined) falls back to the derived name/letters.\nconst ariaLabel = computed(() => props.alt ?? derivedLabel.value);\n\nconst boxWidth = computed(() => props.width ?? props.size);\nconst boxHeight = computed(() => props.height ?? props.size);\nconst boxStyle = computed(() => ({ width: `${boxWidth.value}px`, height: `${boxHeight.value}px` }));\n\nconst resolvedTextSize = computed(\n () => props.textSize ?? Math.round(Math.min(boxWidth.value, boxHeight.value) * 0.4)\n);\n\n// Deterministic color: seed on uid, else the name, else the explicit `letters`\n// (the DS seeds on `uid || initials`, so a letters-only avatar must feed its\n// letters into the hash — otherwise every letters-only avatar hashes the empty\n// string and collapses to the same color). `letters` last keeps existing\n// name-based avatars on their current color (additive, no visual regression).\nconst hashed = computed(() => {\n const seed = props.uid || props.firstName + props.lastName || props.letters;\n let hash = 0;\n for (let i = 0; i < seed.length; i++) {\n hash = seed.charCodeAt(i) + ((hash << 5) - hash);\n hash = hash & hash;\n }\n const rgb = [0, 0, 0];\n for (let i = 0; i < 3; i++) rgb[i] = (hash >> (i * 8)) & 255;\n const light = rgb[0] >= 200 && rgb[1] >= 200 && rgb[2] >= 200;\n return { bg: `rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`, fg: light ? '#323f4b' : '#fff' };\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n\n.ds-avatar {\n display: flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n overflow: hidden;\n object-fit: cover;\n\n border-radius: r.$radius-control;\n\n &.is-circular {\n border-radius: r.$radius-full;\n }\n\n &--initials {\n font-family: t.$font-family;\n font-weight: t.$weight-black;\n line-height: 1;\n user-select: none;\n }\n\n // Fixed accent tone, instead of the per-person hashed color (see the `accent` prop).\n &--accent {\n background: colors.$accent-bg;\n color: colors.$accent-shadow;\n }\n\n &--placeholder {\n // DS placeholder grey — was hardcoded #c0c4cc; the real DS token is\n // --grey-3 (#cbd2d9). Fixed to use the token (SALESQL-3394).\n background-color: colors.$grey-3;\n }\n}\n</style>\n","<template>\n <label class=\"ds-checkbox\" :class=\"{ 'is-disabled': disabled }\">\n <input\n ref=\"inputRef\"\n v-model=\"model\"\n type=\"checkbox\"\n class=\"ds-checkbox__native\"\n :disabled=\"disabled\"\n :name=\"name || undefined\"\n :aria-label=\"ariaLabel || undefined\"\n />\n <span\n class=\"ds-checkbox__box\"\n :class=\"{ 'is-active': model || indeterminate }\"\n aria-hidden=\"true\"\n >\n <svg\n v-if=\"indeterminate\"\n class=\"ds-checkbox__mark\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n >\n <line x1=\"4\" y1=\"8\" x2=\"12\" y2=\"8\" />\n </svg>\n <svg\n v-else-if=\"model\"\n class=\"ds-checkbox__mark\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n >\n <path d=\"M3.5 8.5l3 3 6-6\" />\n </svg>\n </span>\n <span v-if=\"$slots.default || label\" class=\"ds-checkbox__label\"\n ><slot>{{ label }}</slot></span\n >\n </label>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, onMounted, watch } from 'vue';\n\nconst model = defineModel<boolean>({ default: false });\n\nconst props = defineProps({\n indeterminate: Boolean,\n disabled: Boolean,\n name: { type: String, default: '' },\n // Label text (DS `label` prop); a default slot overrides it.\n label: { type: String, default: '' },\n // Accessible name when there is no visible label (e.g. a select-all in a table).\n ariaLabel: { type: String, default: '' },\n});\n\nconst inputRef = ref<HTMLInputElement | null>(null);\n\n// `indeterminate` is a DOM property, not an attribute — keep it in sync for a11y.\nfunction syncIndeterminate() {\n if (inputRef.value) inputRef.value.indeterminate = props.indeterminate;\n}\nonMounted(syncIndeterminate);\nwatch(() => props.indeterminate, syncIndeterminate);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-checkbox {\n display: inline-flex;\n align-items: center;\n gap: s.spacing(1);\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n cursor: pointer;\n\n &.is-disabled {\n cursor: not-allowed;\n opacity: 0.5; // DS Checkbox.jsx: whole label dims to .5 when disabled\n }\n\n /* Native control drives state + focus, visually replaced by the custom box. */\n &__native {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n }\n\n &__box {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n\n width: 18px;\n height: 18px;\n\n color: colors.$white;\n\n background-color: colors.$white;\n\n border: 1px solid colors.$slate-mid;\n border-radius: r.$radius-control;\n\n transition:\n background-color m.$duration-default m.$easing,\n border-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &.is-active {\n background-color: colors.$accent-main;\n border-color: colors.$accent-main;\n }\n }\n\n /* Focus ring on the box when the (hidden) native input is focused. */\n &__native:focus-visible + &__box {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n &__mark {\n width: 14px;\n height: 14px;\n }\n\n &__label {\n line-height: 1.3;\n }\n}\n</style>\n","// DsTable — the DS data table (data-dense density). Column/row API with hairline\n// borders, row hover, and an optional highlighted \"most likely\" row.\n\nexport const DS_TABLE_ALIGN = {\n LEFT: 'left',\n CENTER: 'center',\n RIGHT: 'right',\n} as const;\nexport type DsTableAlign = (typeof DS_TABLE_ALIGN)[keyof typeof DS_TABLE_ALIGN];\n\n// Which edge a column is pinned (sticky) to for horizontal scroll.\nexport const DS_TABLE_PIN = {\n LEFT: 'left',\n RIGHT: 'right',\n} as const;\nexport type DsTablePin = (typeof DS_TABLE_PIN)[keyof typeof DS_TABLE_PIN];\n\n// A column. `key` maps to the row property for default content and names the\n// scoped slot `cell-<key>`.\nexport interface DsTableColumn {\n key: string;\n label: string;\n align?: DsTableAlign;\n width?: string;\n // Pin this column to the left/right edge (position: sticky) so it stays put\n // while the table scrolls horizontally. Opt-in; the default layout is unchanged.\n // Stacking MORE THAN ONE pin on the same side needs a px `width` on each pinned\n // column so cumulative offsets can be derived; a single pin per side needs none.\n pinned?: DsTablePin;\n}\n\n// A header cell for the compound shell. `headers` accepts plain strings (still\n// valid) or this object form when a header needs to be pinned. Mirror the pinned\n// header's `width` on its matching DsCell so the sticky columns line up.\nexport interface DsTableHeader {\n label: string;\n pinned?: DsTablePin;\n width?: string;\n}\n\n// A row: only a stable `id` is required (for :key and highlighting); the rest of\n// the properties are consumed per column via its `key`.\nexport interface DsTableRow {\n id: string | number;\n [key: string]: unknown;\n}\n","<script setup lang=\"ts\">\nimport { computed, nextTick, onBeforeUnmount, ref, watch, type PropType } from 'vue';\nimport { DsCheckbox } from '@shared/ui/DsCheckbox';\nimport { DsSpinner } from '@shared/ui/DsSpinner';\nimport { SELECT_ALL } from '@shared/constants/events';\nimport {\n DS_TABLE_ALIGN,\n DS_TABLE_PIN,\n type DsTableColumn,\n type DsTableHeader,\n type DsTableRow,\n} from './DsTable.types';\n\nconst props = defineProps({\n // --- Declarative API (default): the table builds itself from columns + rows. ---\n columns: {\n type: Array as PropType<DsTableColumn[]>,\n default: () => [],\n },\n rows: {\n type: Array as PropType<DsTableRow[]>,\n default: () => [],\n },\n emptyMessage: {\n type: String,\n default: '',\n },\n // id of the row to highlight (the DS \"most likely\" row → accent surface).\n highlightRowId: {\n type: [String, Number] as PropType<string | number | null>,\n default: null,\n },\n // Optional fixed row height (number → px, or any CSS length). Rows are\n // content-driven by default; when set, this pins the height AND truncates\n // overflowing cell text with an ellipsis.\n rowHeight: {\n type: [String, Number] as PropType<string | number | null>,\n default: null,\n },\n\n // --- Compound API (opt-in): compose DsTableRow + DsTableCell in the default slot. ---\n // When true, the table renders a shell (headers + a sticky thead) and the body\n // comes from the default slot instead of `rows`. Coexists with the declarative API.\n compound: { type: Boolean, default: false },\n // Header labels for the compound shell. Plain strings, or the DsTableHeader\n // object form when a header column needs to be pinned (mirror its `width` on\n // the matching DsCell so the sticky columns line up).\n headers: { type: Array as PropType<(string | DsTableHeader)[]>, default: () => [] },\n // Render a leading select-all checkbox column (compound mode).\n selectable: { type: Boolean, default: false },\n allSelected: { type: Boolean, default: false },\n someSelected: { type: Boolean, default: false },\n // Accessible name for the select-all checkbox (no visible text in a 52px column).\n selectAllLabel: { type: String, default: '' },\n // Fixed height enabling the sticky-header scroll (compound mode).\n height: {\n type: [String, Number] as PropType<string | number | null>,\n default: null,\n },\n\n // --- Loading state (both APIs) ---\n // When true, the body is a single centered spinner row spanning every column,\n // shown INSTEAD of the empty state or the rows/slot (loading wins over both).\n loading: { type: Boolean, default: false },\n // Accessible name for the loading spinner (the app owns i18n); when omitted it\n // falls back to DsSpinner's own default. Overridable per row via the #loading slot.\n loadingLabel: { type: String, default: '' },\n});\n\nconst emit = defineEmits([SELECT_ALL]);\n\n// Column span for the full-width loading row in compound mode: the header\n// columns plus the leading select-all column when selectable. Floor at 1 so an\n// empty `headers` array never emits an invalid colspan=\"0\".\nconst compoundColspan = computed(() =>\n Math.max(1, props.headers.length + (props.selectable ? 1 : 0))\n);\n\nconst rowHeightStyle = computed(() =>\n props.rowHeight == null\n ? undefined\n : {\n '--ds-table-row-height':\n typeof props.rowHeight === 'number' ? `${props.rowHeight}px` : props.rowHeight,\n }\n);\n\nconst heightStyle = computed(() =>\n props.height == null\n ? undefined\n : { height: typeof props.height === 'number' ? `${props.height}px` : props.height }\n);\n\nfunction onSelectAll(checked: boolean) {\n emit(SELECT_ALL, checked);\n}\n\n// --- Pinned (sticky) columns ---------------------------------------------\n// Only a px width contributes to a cumulative pin offset; %/auto/undefined → 0\n// (a single pin per side sits at offset 0 and needs no width).\nfunction pinWidthPx(width?: string): number {\n if (!width) return 0;\n const match = /^(\\d+(?:\\.\\d+)?)px$/.exec(width.trim());\n return match ? parseFloat(match[1]) : 0;\n}\n\ntype PinStyle = { position: 'sticky'; left?: string; right?: string };\n\n// Declarative API: per-column-key sticky side + cumulative offset (left grows\n// left→right; right grows right→left).\nconst columnPinStyles = computed(() => {\n const map: Record<string, PinStyle> = {};\n let left = 0;\n for (const col of props.columns) {\n if (col.pinned === DS_TABLE_PIN.LEFT) {\n map[col.key] = { position: 'sticky', left: `${left}px` };\n left += pinWidthPx(col.width);\n }\n }\n let right = 0;\n for (let i = props.columns.length - 1; i >= 0; i--) {\n const col = props.columns[i];\n if (col.pinned === DS_TABLE_PIN.RIGHT) {\n map[col.key] = { position: 'sticky', right: `${right}px` };\n right += pinWidthPx(col.width);\n }\n }\n return map;\n});\n\n// Outermost pin on each side — the only cell that carries the edge shadow.\nconst pinEdgeKeys = computed(() => {\n const lefts = props.columns.filter((c) => c.pinned === DS_TABLE_PIN.LEFT);\n const rights = props.columns.filter((c) => c.pinned === DS_TABLE_PIN.RIGHT);\n const set = new Set<string>();\n if (lefts.length) set.add(lefts[lefts.length - 1].key);\n if (rights.length) set.add(rights[0].key);\n return set;\n});\n\nfunction columnPinClass(column: DsTableColumn) {\n if (!column.pinned) return undefined;\n return {\n 'ds-table__pin': true,\n [`ds-table__pin--${column.pinned}`]: true,\n 'ds-table__pin--edge': pinEdgeKeys.value.has(column.key),\n };\n}\n\n// th keeps its width always (existing behaviour) merged with the sticky offset.\nfunction columnHeaderStyle(column: DsTableColumn) {\n const pin = columnPinStyles.value[column.key];\n const width = column.width ? { width: column.width } : undefined;\n if (!pin && !width) return undefined;\n return { ...width, ...pin };\n}\n\n// td only gets a style when pinned (non-pinned cells stay unstyled as before);\n// a pinned cell also takes the width so it lines up with its header.\nfunction columnCellStyle(column: DsTableColumn) {\n const pin = columnPinStyles.value[column.key];\n if (!pin) return undefined;\n return column.width ? { ...pin, width: column.width } : pin;\n}\n\n// Compound API: normalize the header union to objects; DsTable owns every header\n// so it computes header offsets centrally (body-cell offsets are the consumer's\n// via DsCell `pinnedOffset`).\nconst normalizedHeaders = computed<DsTableHeader[]>(() =>\n props.headers.map((h) => (typeof h === 'string' ? { label: h } : h))\n);\n\nconst headerPinStyles = computed(() => {\n const map: Record<number, PinStyle> = {};\n const list = normalizedHeaders.value;\n let left = 0;\n list.forEach((h, i) => {\n if (h.pinned === DS_TABLE_PIN.LEFT) {\n map[i] = { position: 'sticky', left: `${left}px` };\n left += pinWidthPx(h.width);\n }\n });\n let right = 0;\n for (let i = list.length - 1; i >= 0; i--) {\n if (list[i].pinned === DS_TABLE_PIN.RIGHT) {\n map[i] = { position: 'sticky', right: `${right}px` };\n right += pinWidthPx(list[i].width);\n }\n }\n return map;\n});\n\nconst headerPinEdges = computed(() => {\n const list = normalizedHeaders.value;\n const lefts = list.map((h, i) => ({ h, i })).filter(({ h }) => h.pinned === DS_TABLE_PIN.LEFT);\n const rights = list.map((h, i) => ({ h, i })).filter(({ h }) => h.pinned === DS_TABLE_PIN.RIGHT);\n const set = new Set<number>();\n if (lefts.length) set.add(lefts[lefts.length - 1].i);\n if (rights.length) set.add(rights[0].i);\n return set;\n});\n\nfunction headerPinClass(header: DsTableHeader, index: number) {\n if (!header.pinned) return undefined;\n return {\n 'ds-table__pin': true,\n [`ds-table__pin--${header.pinned}`]: true,\n 'ds-table__pin--edge': headerPinEdges.value.has(index),\n };\n}\n\nfunction headerStyle(header: DsTableHeader, index: number) {\n const pin = headerPinStyles.value[index];\n const width = header.width ? { width: header.width } : undefined;\n if (!pin && !width) return undefined;\n return { ...width, ...pin };\n}\n\n// --- Horizontal scroll shadow --------------------------------------------\n// The edge pins cast a directional shadow, revealed only while there is content\n// scrolled under them. We toggle two flags from the wrapper's scroll geometry.\nconst wrapperRef = ref<HTMLElement | null>(null);\nconst scrolledStart = ref(false); // content hidden to the left of a left pin\nconst scrolledEnd = ref(false); // content hidden to the right of a right pin\nlet resizeObserver: ResizeObserver | null = null;\n\nfunction updateScrollShadow() {\n const el = wrapperRef.value;\n if (!el) return;\n scrolledStart.value = el.scrollLeft > 0;\n scrolledEnd.value = el.scrollLeft + el.clientWidth < el.scrollWidth - 1;\n}\n\nfunction teardownScroll(el: HTMLElement | null) {\n el?.removeEventListener('scroll', updateScrollShadow);\n resizeObserver?.disconnect();\n resizeObserver = null;\n}\n\n// React to the wrapper element mounting (or swapping when `compound` toggles).\n// `immediate` runs during setup with a null ref (no-op) and again once mounted.\n// ResizeObserver is guarded — jsdom (unit tests) doesn't implement it.\nwatch(\n wrapperRef,\n (el, prev) => {\n teardownScroll(prev ?? null);\n if (!el) return;\n el.addEventListener('scroll', updateScrollShadow, { passive: true });\n if (typeof ResizeObserver !== 'undefined') {\n resizeObserver = new ResizeObserver(updateScrollShadow);\n resizeObserver.observe(el);\n }\n updateScrollShadow();\n },\n { immediate: true }\n);\n\nonBeforeUnmount(() => teardownScroll(wrapperRef.value));\n\n// Structural changes can change scrollWidth → re-evaluate after the DOM updates.\n// Watch cheap length signals, not the arrays deeply: content-driven reflow (a\n// cell value changing width without a count change) is already caught by the\n// ResizeObserver on the wrapper, and a deep watch over `rows` would be costly on\n// the large tables pinned columns target.\nwatch(\n () => [props.columns.length, props.rows.length, props.headers.length, props.compound],\n () => nextTick(updateScrollShadow)\n);\n</script>\n\n<template>\n <!-- Compound (opt-in): the consumer composes DsTableRow / DsTableCell in the slot. -->\n <div\n v-if=\"compound\"\n class=\"ds-table ds-table--compound\"\n :aria-busy=\"loading ? 'true' : undefined\"\n >\n <div\n ref=\"wrapperRef\"\n class=\"ds-table__wrapper\"\n :class=\"{ 'is-scrolled-start': scrolledStart, 'is-scrolled-end': scrolledEnd }\"\n :style=\"heightStyle\"\n >\n <table class=\"ds-table__table\">\n <thead class=\"ds-table__head\">\n <tr>\n <th v-if=\"selectable\" class=\"ds-table__select-all\">\n <DsCheckbox\n :model-value=\"allSelected\"\n :indeterminate=\"!allSelected && someSelected\"\n :aria-label=\"selectAllLabel || undefined\"\n @update:model-value=\"onSelectAll\"\n />\n </th>\n <th\n v-for=\"(header, i) in normalizedHeaders\"\n :key=\"header.label\"\n :class=\"headerPinClass(header, i)\"\n :style=\"headerStyle(header, i)\"\n >\n {{ header.label }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr v-if=\"loading\">\n <td class=\"ds-table__loading\" :colspan=\"compoundColspan\" data-testid=\"ds-table-loading\">\n <slot name=\"loading\"><DsSpinner :label=\"loadingLabel || undefined\" /></slot>\n </td>\n </tr>\n <slot v-else />\n </tbody>\n </table>\n </div>\n </div>\n\n <!-- Declarative (default): columns + rows drive the whole table. -->\n <div v-else class=\"ds-table\" :aria-busy=\"loading ? 'true' : undefined\">\n <div\n ref=\"wrapperRef\"\n class=\"ds-table__wrapper\"\n :class=\"{ 'is-scrolled-start': scrolledStart, 'is-scrolled-end': scrolledEnd }\"\n >\n <table\n class=\"ds-table__table\"\n :class=\"{ 'has-row-height': rowHeight != null }\"\n :style=\"rowHeightStyle\"\n >\n <thead>\n <tr>\n <th\n v-for=\"column in columns\"\n :key=\"column.key\"\n :class=\"[\n `ds-table__th--${column.align ?? DS_TABLE_ALIGN.LEFT}`,\n columnPinClass(column),\n ]\"\n :style=\"columnHeaderStyle(column)\"\n >\n {{ column.label }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr v-if=\"loading\">\n <td\n class=\"ds-table__loading\"\n :colspan=\"Math.max(1, columns.length)\"\n data-testid=\"ds-table-loading\"\n >\n <slot name=\"loading\"><DsSpinner :label=\"loadingLabel || undefined\" /></slot>\n </td>\n </tr>\n <tr v-else-if=\"rows.length === 0\">\n <td\n class=\"ds-table__empty\"\n :colspan=\"Math.max(1, columns.length)\"\n data-testid=\"ds-table-empty\"\n >\n <slot name=\"empty\">{{ emptyMessage }}</slot>\n </td>\n </tr>\n <template v-else>\n <tr\n v-for=\"row in rows\"\n :key=\"row.id\"\n :class=\"{ 'is-highlighted': row.id === highlightRowId }\"\n data-testid=\"ds-table-row\"\n >\n <td\n v-for=\"column in columns\"\n :key=\"column.key\"\n :class=\"[\n `ds-table__td--${column.align ?? DS_TABLE_ALIGN.LEFT}`,\n columnPinClass(column),\n ]\"\n :style=\"columnCellStyle(column)\"\n :title=\"\n rowHeight != null && !$slots[`cell-${column.key}`] && row[column.key] != null\n ? String(row[column.key])\n : undefined\n \"\n >\n <slot :name=\"`cell-${column.key}`\" :row=\"row\">{{ row[column.key] }}</slot>\n </td>\n </tr>\n </template>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/shadow.scss' as sh;\n\n.ds-table {\n &__wrapper {\n overflow-x: auto;\n\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-card-lg;\n }\n\n &__table {\n width: 100%;\n border-collapse: collapse;\n\n // Own every border/height explicitly so host-app global table rules can't\n // leak in; scoped specificity (block + [data-v]) beats them.\n th {\n padding: s.spacing(1) s.spacing(2);\n\n color: colors.$slate-main;\n font-weight: t.$weight-bold;\n font-size: t.font-size('body');\n\n border: 0;\n border-bottom: 1px solid colors.$slate-tint;\n\n background-color: colors.$slate-bg;\n }\n\n td {\n height: auto;\n padding: s.spacing(1) s.spacing(2);\n vertical-align: middle;\n\n color: colors.$slate-main;\n font-size: t.font-size('body');\n\n border: 0;\n }\n\n // Opt-in fixed row height → pin td height and truncate overflowing text.\n &.has-row-height td {\n height: var(--ds-table-row-height);\n\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n tr {\n border: 0;\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n }\n\n // Row separator only BETWEEN adjacent body rows.\n tbody tr + tr {\n border-top: 1px solid colors.$slate-tint;\n }\n\n // Row hover (data-dense affordance).\n tbody tr:hover {\n background-color: colors.$slate-bg;\n }\n\n // The highlighted \"most likely\" row wins over hover.\n tbody tr.is-highlighted {\n background-color: colors.$accent-bg;\n }\n tbody tr.is-highlighted:hover {\n background-color: colors.$accent-tint;\n }\n }\n\n &__th--left,\n &__td--left {\n text-align: left;\n }\n &__th--center,\n &__td--center {\n text-align: center;\n }\n &__th--right,\n &__td--right {\n text-align: right;\n }\n\n // Full-width empty / loading rows. `.ds-table__table td` above is (0,1,1); a\n // bare `.ds-table__empty` / `.ds-table__loading` is only (0,1,0) and loses to\n // it, so the shared td `padding` (and `color`) would win — collapsing the row\n // to 8px and clamping the spinner to the top. Qualify with `td` + the table\n // context (→ 0,2,1) so the generous padding and centering actually apply.\n &__table td#{&}__empty {\n padding: s.spacing(5) s.spacing(3);\n\n color: colors.$slate-soft;\n text-align: center;\n }\n\n // Loading row: same generous padding as the empty state; the inline-block\n // spinner is centered horizontally by text-align and vertically by the td's\n // vertical-align:middle (works for both APIs).\n &__table td#{&}__loading {\n padding: s.spacing(5) s.spacing(3);\n text-align: center;\n }\n\n /* ---------- Pinned (sticky) columns ---------- */\n // Shared by both APIs (declarative th/td; compound header th — compound body\n // cells are DsCell, styled in DsCell.vue). position / left / right + width\n // arrive via the inline style; here we own the opaque background (so scrolling\n // cells never bleed through), the stacking order, and the edge shadow.\n &__pin {\n background-color: colors.$white;\n }\n thead &__pin {\n // Header pins sit on the grey header surface, above sibling header cells.\n z-index: 3;\n background-color: colors.$slate-bg;\n }\n tbody &__pin {\n // Body pins above normal body cells, below the compound sticky header (10).\n z-index: 2;\n }\n // Body pin tracks the declarative row background states (white / hover / accent).\n tbody tr:hover &__pin {\n background-color: colors.$slate-bg;\n }\n tbody tr.is-highlighted &__pin {\n background-color: colors.$accent-bg;\n }\n tbody tr.is-highlighted:hover &__pin {\n background-color: colors.$accent-tint;\n }\n // The outermost pin on each side casts a directional shadow, revealed only when\n // there is content scrolled under it (wrapper toggles the scrolled-* classes).\n &__pin--edge {\n transition: box-shadow m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n }\n &__wrapper.is-scrolled-start &__pin--left#{&}__pin--edge {\n box-shadow: sh.$shadow-pinned-left;\n }\n &__wrapper.is-scrolled-end &__pin--right#{&}__pin--edge {\n box-shadow: sh.$shadow-pinned-right;\n }\n\n /* ---------- Compound shell (opt-in) ---------- */\n &--compound {\n .ds-table__wrapper {\n overflow: auto; // both axes; height (prop) enables the sticky-header scroll\n }\n\n .ds-table__table {\n // Fixed layout + separate borders so the sticky header keeps its hairlines.\n border-collapse: separate;\n border-spacing: 0;\n table-layout: fixed;\n }\n\n // Sticky grey header (DS DsTable.jsx).\n .ds-table__head {\n position: sticky;\n top: 0;\n z-index: 10;\n\n background-color: colors.$slate-bg;\n }\n\n th {\n // DS thStyle: 4px 16px, full hairline border, 30px tall.\n padding: s.spacing(0.5) s.spacing(2);\n height: 30px; // DS DsTable.jsx thStyle\n\n text-align: left;\n\n color: colors.$slate-main;\n font-weight: t.$weight-bold;\n font-size: t.font-size('body');\n\n border: 1px solid colors.$slate-tint;\n\n background-color: colors.$slate-bg;\n }\n\n .ds-table__select-all {\n width: 52px; // DS: leading checkbox column\n text-align: center;\n }\n\n // Compound body pins are DsCell (its own scope) — reach them via :deep to\n // drive the same scroll-toggled edge shadow. A single pin per side is the\n // clean case; stacking multiple pins per side casts a shadow per cell.\n :deep(.ds-cell.is-pinned) {\n transition: box-shadow m.$duration-default m.$easing;\n }\n .ds-table__wrapper.is-scrolled-start :deep(.ds-cell.is-pinned--left) {\n box-shadow: sh.$shadow-pinned-left;\n }\n .ds-table__wrapper.is-scrolled-end :deep(.ds-cell.is-pinned--right) {\n box-shadow: sh.$shadow-pinned-right;\n }\n }\n}\n</style>\n","// DsInput — the DS \"Input\": single-line field. Prop vocabulary mirrors Input.jsx.\n// Border: mid grey at rest, darker on hover, the dark grey focus token on focus, coral on error. The text\n// keeps its weight on focus. Sizes are the DS input heights.\n\nexport const DS_INPUT_TYPES = {\n TEXT: 'text',\n EMAIL: 'email',\n PASSWORD: 'password',\n TEL: 'tel',\n NUMBER: 'number',\n SEARCH: 'search',\n URL: 'url',\n} as const;\nexport type DsInputType = (typeof DS_INPUT_TYPES)[keyof typeof DS_INPUT_TYPES];\n\nexport const DS_INPUT_SIZES = {\n SM: 'sm', // 36px\n MD: 'md', // 48px\n} as const;\nexport type DsInputSize = (typeof DS_INPUT_SIZES)[keyof typeof DS_INPUT_SIZES];\n","<template>\n <div\n class=\"ds-input\"\n :class=\"[\n `ds-input--${size}`,\n { 'is-error': error, 'is-disabled': disabled, 'is-search': isSearch },\n ]\"\n @focusout=\"onFieldFocusOut\"\n >\n <div class=\"ds-input__wrap\">\n <i v-if=\"isSearch\" class=\"material-symbols-filled ds-input__search-icon\" aria-hidden=\"true\"\n >search</i\n >\n\n <input\n :id=\"id || undefined\"\n ref=\"inputEl\"\n v-model=\"model\"\n class=\"ds-input__control\"\n :class=\"{ 'has-suffix': hasSuffix }\"\n :type=\"resolvedType\"\n :placeholder=\"placeholder\"\n :min=\"min\"\n :max=\"max\"\n :step=\"step\"\n :disabled=\"disabled\"\n :name=\"name || undefined\"\n :autocomplete=\"autocomplete || undefined\"\n :aria-invalid=\"error || undefined\"\n :aria-describedby=\"error && errorMessage && id ? `${id}-error` : undefined\"\n @focus=\"emit(FOCUS, $event)\"\n @blur=\"emit(BLUR, $event)\"\n @change=\"emit(CHANGE, $event)\"\n />\n\n <div v-if=\"hasSuffix\" class=\"ds-input__suffix\">\n <slot name=\"suffix\" />\n\n <i\n v-if=\"error && showErrorIcon\"\n class=\"material-symbols-filled ds-input__error-icon\"\n aria-hidden=\"true\"\n >warning</i\n >\n\n <button\n v-else-if=\"hasRevealToggle\"\n type=\"button\"\n class=\"ds-input__toggle\"\n :disabled=\"disabled\"\n :aria-label=\"toggleLabel || undefined\"\n :aria-pressed=\"reveal\"\n @click=\"toggleReveal\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">{{\n reveal ? 'visibility' : 'visibility_off'\n }}</i>\n </button>\n </div>\n </div>\n\n <p v-if=\"error && errorMessage\" :id=\"id ? `${id}-error` : undefined\" class=\"ds-input__error\">\n {{ errorMessage }}\n </p>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref, useSlots, type PropType } from 'vue';\nimport { FOCUS, BLUR, CHANGE, FIELD_BLUR } from '@shared/constants/events';\nimport {\n DS_INPUT_TYPES,\n DS_INPUT_SIZES,\n type DsInputType,\n type DsInputSize,\n} from './DsInput.types';\n\nconst model = defineModel<string>({ default: '' });\n\nconst props = defineProps({\n type: { type: String as PropType<DsInputType>, default: DS_INPUT_TYPES.TEXT },\n size: { type: String as PropType<DsInputSize>, default: DS_INPUT_SIZES.SM },\n placeholder: { type: String, default: '' },\n disabled: Boolean,\n error: Boolean,\n errorMessage: { type: String, default: '' },\n showErrorIcon: Boolean,\n name: { type: String, default: '' },\n id: { type: String, default: '' },\n autocomplete: { type: String, default: '' },\n // Accessible name for the password visibility toggle.\n toggleLabel: { type: String, default: '' },\n // Native number-input constraints — only meaningful for type=\"number\", forwarded\n // to the real <input>. String is allowed so `step=\"any\"` is expressible.\n min: { type: [Number, String], default: undefined },\n max: { type: [Number, String], default: undefined },\n step: { type: [Number, String], default: undefined },\n});\n\nconst emit = defineEmits([FOCUS, BLUR, CHANGE, FIELD_BLUR]);\n\n// Direct handle to the native control for the imperative focus API below.\nconst inputEl = ref<HTMLInputElement>();\n\n// Real \"field exit\": the native @blur above fires on every focus loss —including\n// when focus moves to this component's OWN password toggle— because `blur` does\n// not bubble and can't see the wider context. `focusout` DOES bubble, so on the\n// root we can read where focus went next (relatedTarget) and only emit when it\n// landed OUTSIDE the component. Same pattern as DsTooltip.onFocusOut.\nfunction onFieldFocusOut(e: FocusEvent) {\n const next = e.relatedTarget as Node | null;\n const root = e.currentTarget as HTMLElement | null;\n // Focus moved to a descendant (input ↔ its own toggle): still inside the field.\n if (next && root?.contains(next)) return;\n emit(FIELD_BLUR, e);\n}\n\nconst slots = useSlots();\nconst reveal = ref(false);\n// Guarded so a disabled field's toggle can't flip the reveal state (the native\n// `:disabled` already blocks the click; this is the belt-and-suspenders guard).\nfunction toggleReveal() {\n if (props.disabled) return;\n reveal.value = !reveal.value;\n}\nconst isPassword = computed(() => props.type === DS_INPUT_TYPES.PASSWORD);\nconst isSearch = computed(() => props.type === DS_INPUT_TYPES.SEARCH);\n// DS: password toggles text/password on reveal; search renders as a plain text\n// input (the search affordance is the left icon + styling, not the native type).\nconst resolvedType = computed(() => {\n if (isPassword.value) return reveal.value ? DS_INPUT_TYPES.TEXT : DS_INPUT_TYPES.PASSWORD;\n if (isSearch.value) return DS_INPUT_TYPES.TEXT;\n return props.type;\n});\n// The reveal toggle renders only when a `toggleLabel` is provided: an icon-only\n// button with no accessible name would break the a11y contract, and the library\n// can't hardcode the label (no hardcoded user-facing text). No label → no toggle.\nconst hasRevealToggle = computed(() => isPassword.value && !!props.toggleLabel);\nconst hasSuffix = computed(\n () => !!slots.suffix || (props.error && props.showErrorIcon) || hasRevealToggle.value\n);\n\n// Imperative focus API — pure delegation to the native input's own DOM methods\n// (no store, no side effects beyond focus). The consuming app calls these via a\n// template ref, e.g. to focus the field after opening a panel.\ndefineExpose({\n focus: () => inputEl.value?.focus(),\n focusAtEnd: async () => {\n // Wait a tick so any pending v-model render has flushed before we measure.\n await nextTick();\n const el = inputEl.value;\n if (!el) return;\n el.focus();\n const n = el.value.length;\n // setSelectionRange throws on input types that don't support text selection\n // (email, number, …); focus() alone is the correct behavior for those.\n try {\n el.setSelectionRange(n, n);\n } catch {\n /* type doesn't support selection — focus is enough */\n }\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/border.scss' as b;\n\n.ds-input {\n display: block;\n width: 100%;\n\n &__wrap {\n position: relative;\n width: 100%;\n }\n\n &__control {\n box-sizing: border-box;\n width: 100%;\n padding: 0 16px;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n font-weight: t.$weight-regular;\n line-height: 20px;\n\n background-color: colors.$white;\n\n /* Border: mid grey at rest, darker on hover, dark grey on focus (see precedence below). */\n border: 1px solid b.$border-input;\n border-radius: r.$radius-control;\n outline: none;\n\n transition: border-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &.has-suffix {\n padding-right: 50px;\n }\n\n &:focus {\n border-color: b.$border-input-focus;\n }\n }\n\n &:not(.is-error, .is-disabled, .is-search) &__control:hover:not(:focus) {\n border-color: b.$border-input-hover;\n }\n\n &__suffix {\n position: absolute;\n top: 0;\n right: 0;\n\n display: flex;\n align-items: center;\n gap: 4px;\n\n height: 100%;\n padding: 0 16px;\n\n color: colors.$slate-soft;\n }\n\n &__toggle {\n display: inline-flex;\n padding: 0;\n\n color: inherit;\n\n background: transparent;\n border: 0;\n\n cursor: pointer;\n\n &:disabled {\n cursor: not-allowed;\n }\n }\n\n &__error-icon {\n color: colors.$error-main;\n }\n\n &__error {\n margin-top: 2px;\n\n color: colors.$error-main;\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('caption');\n line-height: 18px;\n }\n\n /* ---------- Sizes (DS input heights + icon sizes) ---------- */\n &--sm {\n .ds-input__control {\n height: 36px;\n }\n .material-symbols-filled {\n font-size: i.icon-size(18); // DS Input.jsx: suffix glyph is 18 at sm (24 at md)\n }\n }\n &--md {\n .ds-input__control {\n height: 48px;\n }\n .material-symbols-filled {\n font-size: i.icon-size(24);\n }\n }\n\n /* ---------- Search type (DS): left magnifier, subtle grey field, borderless\n until focus (then a dark grey border).\n Placed before States so is-error / is-disabled still win. ---------- */\n &.is-search {\n .ds-input__search-icon {\n position: absolute;\n top: 50%;\n left: 16px;\n\n color: colors.$slate-soft;\n font-size: i.icon-size(20);\n\n transform: translateY(-50%);\n pointer-events: none;\n }\n .ds-input__control {\n padding-left: 48px;\n\n background-color: colors.$slate-bg;\n border-color: transparent;\n }\n .ds-input__control:focus {\n border-color: b.$border-input-focus;\n }\n }\n\n /* ---------- States (precedence: rest → focus → disabled → error) ---------- */\n &.is-disabled .ds-input__control {\n color: colors.$slate-mid;\n background-color: colors.$slate-bg;\n border-color: colors.$slate-mid;\n cursor: not-allowed;\n }\n &.is-error .ds-input__control,\n &.is-error .ds-input__control:focus {\n border-color: colors.$error-main;\n }\n}\n</style>\n","// DsTextarea — the DS \"Textarea\": multi-line variant of DsInput, same border\n// treatment (mid grey at rest, darker on hover, darkest on focus, coral on error). Prop\n// vocabulary mirrors Textarea.jsx. No variant enums; this documents the props.\n\n// CSS `resize` keyword the control accepts (default vertical).\nexport const DS_TEXTAREA_RESIZE = {\n NONE: 'none',\n VERTICAL: 'vertical',\n HORIZONTAL: 'horizontal',\n BOTH: 'both',\n} as const;\nexport type DsTextareaResize = (typeof DS_TEXTAREA_RESIZE)[keyof typeof DS_TEXTAREA_RESIZE];\n\n// Appearance. `emphasis` looks exactly like `default`; it only stays so existing callers keep working.\nexport const DS_TEXTAREA_VARIANTS = {\n DEFAULT: 'default',\n /** @deprecated — identical to default; will be removed */\n EMPHASIS: 'emphasis',\n} as const;\nexport type DsTextareaVariant = (typeof DS_TEXTAREA_VARIANTS)[keyof typeof DS_TEXTAREA_VARIANTS];\n\nexport interface DsTextareaProps {\n modelValue?: string;\n placeholder?: string;\n rows?: number;\n error?: boolean;\n errorMessage?: string;\n disabled?: boolean;\n readonly?: boolean;\n autoGrow?: boolean;\n minRows?: number;\n maxRows?: number;\n resize?: DsTextareaResize;\n /** @deprecated — identical to default; will be removed. Leave it unset, `'emphasis'` changes nothing. */\n variant?: DsTextareaVariant;\n}\n","<template>\n <div\n class=\"ds-textarea\"\n :class=\"[\n `ds-textarea--${variant}`,\n `ds-textarea--resize-${resize}`,\n {\n 'ds-textarea--has-leading': $slots.leading,\n 'ds-textarea--auto-grow': autoGrow,\n 'is-error': error,\n 'is-disabled': disabled,\n 'is-readonly': readonly,\n },\n ]\"\n v-bind=\"rootAttrs\"\n >\n <span v-if=\"$slots.leading\" class=\"ds-textarea__leading\" aria-hidden=\"true\">\n <slot name=\"leading\" />\n </span>\n <textarea\n v-bind=\"controlAttrs\"\n :id=\"id || undefined\"\n ref=\"control\"\n v-model=\"value\"\n class=\"ds-textarea__control\"\n :placeholder=\"placeholder\"\n :rows=\"autoGrow ? minRows : rows\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :name=\"name || undefined\"\n :aria-invalid=\"error || undefined\"\n :aria-describedby=\"error && errorMessage && id ? `${id}-error` : undefined\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n />\n <p v-if=\"error && errorMessage\" :id=\"id ? `${id}-error` : undefined\" class=\"ds-textarea__error\">\n {{ errorMessage }}\n </p>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, useAttrs, watch, type PropType } from 'vue';\nimport { FOCUS, BLUR } from '@shared/constants/events';\nimport {\n DS_TEXTAREA_RESIZE,\n DS_TEXTAREA_VARIANTS,\n type DsTextareaResize,\n type DsTextareaVariant,\n} from './DsTextarea.types';\n\n// Split fallthrough attrs: `class`/`style`/`data-*` describe the field wrapper\n// (layout, spacing, test hooks) and stay on the root, exactly as before; native\n// control attrs (maxlength, autocomplete, spellcheck, autofocus, aria-*, listeners…)\n// go to the real <textarea> — where they previously landed uselessly on the div.\ndefineOptions({ inheritAttrs: false });\n\nconst model = defineModel<string>({ default: '' });\n\nconst props = defineProps({\n placeholder: { type: String, default: '' },\n rows: { type: Number, default: 4 },\n disabled: Boolean,\n // Focusable and selectable but not editable (no grey disabled look, no emit).\n readonly: Boolean,\n // Grow with the content between `minRows` and `maxRows`, then scroll.\n autoGrow: Boolean,\n minRows: { type: Number, default: 1 },\n maxRows: { type: Number, default: undefined },\n error: Boolean,\n errorMessage: { type: String, default: '' },\n name: { type: String, default: '' },\n id: { type: String, default: '' },\n // CSS resize behavior of the control (default vertical, mirrors the DS).\n resize: {\n type: String as PropType<DsTextareaResize>,\n default: DS_TEXTAREA_RESIZE.VERTICAL,\n },\n variant: {\n type: String as PropType<DsTextareaVariant>,\n default: DS_TEXTAREA_VARIANTS.DEFAULT,\n },\n});\n\nconst emit = defineEmits([FOCUS, BLUR]);\n\n// Guards the v-model (keeps native IME handling) so a readonly field never emits.\nconst value = computed({\n get: () => model.value,\n set: (v: string) => {\n if (!props.readonly) model.value = v;\n },\n});\n\nconst control = ref<HTMLElement | null>(null);\n// DS control line-height; jsdom has no layout, so it is also the fallback there.\nconst FALLBACK_LINE_HEIGHT = 20;\n\nfunction px(v: string) {\n return parseFloat(v) || 0;\n}\n\nfunction fit() {\n const el = control.value;\n if (!el || !props.autoGrow) return;\n const cs = window.getComputedStyle(el);\n const line = px(cs.lineHeight) || FALLBACK_LINE_HEIGHT;\n const chrome =\n px(cs.paddingTop) + px(cs.paddingBottom) + px(cs.borderTopWidth) + px(cs.borderBottomWidth);\n el.style.height = 'auto';\n const content = el.scrollHeight + px(cs.borderTopWidth) + px(cs.borderBottomWidth);\n const min = line * props.minRows + chrome;\n const max = props.maxRows ? line * props.maxRows + chrome : Infinity;\n el.style.height = `${Math.min(Math.max(content, min), max)}px`;\n el.style.overflowY = content > max ? 'auto' : 'hidden';\n}\n\nfunction onFocus(event: FocusEvent) {\n emit(FOCUS, event);\n}\nfunction onBlur(event: FocusEvent) {\n emit(BLUR, event);\n}\n\n// The text reflows when the box width changes (e.g. a collapsing side panel).\nlet observer: ResizeObserver | undefined;\nlet lastWidth = 0;\n\nonMounted(() => {\n fit();\n if (typeof ResizeObserver === 'undefined' || !control.value) return;\n lastWidth = control.value.clientWidth;\n observer = new ResizeObserver(([entry]) => {\n const width = entry?.contentRect.width ?? 0;\n if (width === lastWidth) return;\n lastWidth = width;\n fit();\n });\n observer.observe(control.value);\n});\nonBeforeUnmount(() => observer?.disconnect());\n\nwatch(() => [model.value, props.autoGrow, props.minRows, props.maxRows], fit, { flush: 'post' });\n\nconst attrs = useAttrs();\nconst isRootAttr = (k: string) => k === 'class' || k === 'style' || k.startsWith('data-');\nconst rootAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([k]) => isRootAttr(k)))\n);\nconst controlAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([k]) => !isRootAttr(k)))\n);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/scrollbar.scss' as sb;\n@use '../../assets/css/border.scss' as b;\n\n.ds-textarea {\n position: relative;\n display: block;\n width: 100%;\n\n // Icon box: top-anchored on the first line (control padding 12/16, line-height 20).\n &__leading {\n position: absolute;\n top: s.spacing(1.5);\n left: s.spacing(2);\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 20px;\n\n pointer-events: none;\n\n :slotted(i) {\n font-size: i.icon-size(20);\n line-height: 1;\n }\n }\n &--has-leading &__control {\n padding-left: calc(#{s.spacing(2)} + #{i.icon-size(20)} + #{s.spacing(1)});\n }\n\n &__control {\n box-sizing: border-box;\n width: 100%;\n padding: 12px 16px;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n font-weight: t.$weight-regular;\n line-height: 20px;\n\n background-color: colors.$white;\n\n border: 1px solid b.$border-input;\n border-radius: r.$radius-control;\n outline: none;\n\n resize: vertical;\n transition: border-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n @include sb.scrollbar;\n\n &:focus {\n border-color: b.$border-input-focus;\n }\n }\n\n &:not(.is-error, .is-disabled) &__control:hover:not(:focus) {\n border-color: b.$border-input-hover;\n }\n\n // Resize behavior — `vertical` is the base rule above; these override it.\n &--resize-none .ds-textarea__control {\n resize: none;\n }\n &--resize-horizontal .ds-textarea__control {\n resize: horizontal;\n }\n &--resize-both .ds-textarea__control {\n resize: both;\n }\n // The height follows the content, so the drag handle is off (wins over resize-*).\n &--auto-grow .ds-textarea__control {\n overflow-y: hidden;\n resize: none;\n }\n\n &__error {\n margin-top: 2px;\n\n color: colors.$error-main;\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('caption');\n line-height: 18px;\n }\n\n &.is-disabled .ds-textarea__control {\n color: colors.$slate-mid;\n background-color: colors.$slate-bg;\n border-color: colors.$slate-mid;\n cursor: not-allowed;\n }\n &.is-readonly .ds-textarea__control {\n cursor: default;\n }\n &.is-error .ds-textarea__control,\n &.is-error .ds-textarea__control:focus {\n border-color: colors.$error-main;\n }\n}\n</style>\n","// DsAlert — the DS inline banner (Alert.jsx). type × effect (light tint / dark solid).\n\nexport const DS_ALERT_TYPES = {\n SUCCESS: 'success',\n INFO: 'info',\n WARNING: 'warning',\n ERROR: 'error',\n} as const;\nexport type DsAlertType = (typeof DS_ALERT_TYPES)[keyof typeof DS_ALERT_TYPES];\n\nexport const DS_ALERT_EFFECTS = {\n LIGHT: 'light', // tinted: family tint bg + mid border + shadow text\n DARK: 'dark', // solid: family shadow bg + white text\n} as const;\nexport type DsAlertEffect = (typeof DS_ALERT_EFFECTS)[keyof typeof DS_ALERT_EFFECTS];\n\n// Material Icon per type (leading icon when showIcon).\nexport const DS_ALERT_ICONS: Record<DsAlertType, string> = {\n success: 'check_circle',\n info: 'info',\n warning: 'warning',\n error: 'error',\n};\n","<template>\n <transition name=\"ds-alert-fade\">\n <div\n v-if=\"visible\"\n class=\"ds-alert\"\n :class=\"[`ds-alert--${type}`, `ds-alert--${effect}`, { 'is-center': center }]\"\n role=\"alert\"\n >\n <i v-if=\"showIcon\" class=\"material-symbols-filled ds-alert__icon\" aria-hidden=\"true\">{{\n icon\n }}</i>\n\n <div class=\"ds-alert__content\">\n <div\n v-if=\"hasTitle\"\n class=\"ds-alert__title\"\n :class=\"{ 'has-body': hasBody, 'is-bold': hasBody || boldTitle }\"\n >\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div v-if=\"hasBody\" class=\"ds-alert__body\">\n <slot>{{ description }}</slot>\n </div>\n </div>\n\n <button\n v-if=\"closable\"\n type=\"button\"\n class=\"ds-alert__close\"\n :aria-label=\"closeLabel || undefined\"\n @click=\"onClose\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">close</i>\n </button>\n </div>\n </transition>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, useSlots, type PropType } from 'vue';\nimport { CLOSE } from '@shared/constants/events';\nimport {\n DS_ALERT_TYPES,\n DS_ALERT_EFFECTS,\n DS_ALERT_ICONS,\n type DsAlertType,\n type DsAlertEffect,\n} from './DsAlert.types';\n\nconst props = defineProps({\n type: { type: String as PropType<DsAlertType>, default: DS_ALERT_TYPES.INFO },\n effect: { type: String as PropType<DsAlertEffect>, default: DS_ALERT_EFFECTS.LIGHT },\n title: { type: String, default: '' },\n description: { type: String, default: '' },\n showIcon: Boolean,\n closable: Boolean,\n center: Boolean,\n // Bold the title even without a body (DS: fontWeight = body || boldTitle ? 700 : 400).\n boldTitle: Boolean,\n closeLabel: { type: String, default: '' },\n});\n\nconst emit = defineEmits([CLOSE]);\n\n// Visibility is opt-in controllable: bind `v-model:visible` to reset/reopen the\n// alert declaratively from the parent. Without a binding it defaults to `true`\n// and behaves as internal state — the X still self-closes and emits `close`.\nconst visible = defineModel('visible', { type: Boolean, default: true });\n\nconst slots = useSlots();\nconst icon = computed(() => DS_ALERT_ICONS[props.type]);\nconst hasBody = computed(() => !!slots.default || props.description.length > 0);\n// Title renders from the #title slot (rich content) or the `title` prop.\nconst hasTitle = computed(() => !!slots.title || props.title.length > 0);\n\nfunction onClose() {\n visible.value = false;\n emit(CLOSE);\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-alert {\n position: relative;\n\n display: flex;\n align-items: center;\n\n padding: 8px 16px;\n\n font-family: t.$font-family;\n\n border: 1px solid transparent;\n border-radius: r.$radius-control;\n\n &.is-center {\n justify-content: center;\n }\n\n &__icon {\n margin-right: 8px;\n // DS Alert.jsx: status glyph is 16 (md-20 class, fontSize:16 override).\n font-size: i.icon-size(16);\n }\n\n &__content {\n flex: 1;\n padding: 0 8px;\n }\n\n &__title {\n font-size: t.font-size('small');\n font-weight: t.$weight-regular;\n line-height: 18px;\n\n // Bold when a body follows OR boldTitle is set. Kept separate from `has-body`\n // (which only drives the body's margin-top sibling selector below).\n &.is-bold {\n font-weight: t.$weight-bold;\n }\n }\n\n &__body {\n font-size: t.font-size('caption');\n }\n\n // DS: body margin-top is 5 only when a title precedes it, 0 otherwise.\n &__title.has-body + .ds-alert__body {\n margin-top: 5px;\n }\n\n &__close {\n position: absolute;\n top: 12px;\n right: 15px;\n\n display: inline-flex;\n padding: 0;\n\n color: inherit;\n\n background: transparent;\n border: 0;\n\n cursor: pointer;\n\n .material-symbols-filled {\n font-size: i.icon-size(16);\n }\n }\n\n /* ---------- light (tinted) — bg tint + mid border + shadow text ---------- */\n &--light {\n &.ds-alert--success {\n color: colors.$success-shadow;\n border-color: colors.$success-mid;\n background-color: colors.$success-tint;\n }\n &.ds-alert--info {\n color: colors.$info-shadow;\n border-color: colors.$info-mid;\n background-color: colors.$info-tint;\n }\n &.ds-alert--warning {\n color: colors.$warning-shadow;\n border-color: colors.$warning-mid;\n background-color: colors.$warning-tint;\n }\n &.ds-alert--error {\n color: colors.$error-shadow;\n border-color: colors.$error-mid;\n background-color: colors.$error-tint;\n }\n }\n\n /* ---------- dark (solid) — bg shadow + white text ---------- */\n &--dark {\n color: colors.$white;\n border-color: transparent;\n\n &.ds-alert--success {\n background-color: colors.$success-shadow;\n }\n &.ds-alert--info {\n background-color: colors.$info-shadow;\n }\n &.ds-alert--warning {\n background-color: colors.$warning-shadow;\n }\n &.ds-alert--error {\n background-color: colors.$error-shadow;\n }\n }\n}\n\n/* Fade on mount/dismiss (the root v-if). Opacity only — no color/spacing literal. */\n.ds-alert-fade-enter-active,\n.ds-alert-fade-leave-active {\n transition: opacity m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n}\n.ds-alert-fade-enter-from,\n.ds-alert-fade-leave-to {\n opacity: 0;\n}\n</style>\n","// Stacking of what lives in <body> (teleported popover panels, toasts): above DsDrawer / DsModal\n// (2001, CSS in their SFCs), below DsTooltip (10001).\nexport const TELEPORTED_Z_INDEX = 2002;\n","// DsNotification — the DS toast card (Notification.jsx). Fixed-position, 4 types.\n\nexport const DS_NOTIFICATION_TYPES = {\n SUCCESS: 'success',\n INFO: 'info',\n WARNING: 'warning',\n ERROR: 'error',\n} as const;\nexport type DsNotificationType = (typeof DS_NOTIFICATION_TYPES)[keyof typeof DS_NOTIFICATION_TYPES];\n\nexport const DS_NOTIFICATION_POSITIONS = {\n TOP_LEFT: 'top-left',\n TOP_CENTER: 'top-center',\n TOP_RIGHT: 'top-right',\n BOTTOM_LEFT: 'bottom-left',\n BOTTOM_RIGHT: 'bottom-right',\n} as const;\nexport type DsNotificationPosition =\n (typeof DS_NOTIFICATION_POSITIONS)[keyof typeof DS_NOTIFICATION_POSITIONS];\n\n// Material Icon per type. `error` uses the filled `error` glyph (circle) per the live\n// design prototype (ApiApp.jsx ToastCard) — the older _ds_bundle.js used `warning` here.\nexport const DS_NOTIFICATION_ICONS: Record<DsNotificationType, string> = {\n success: 'check_circle',\n info: 'mode_edit',\n warning: 'warning',\n error: 'error',\n};\n\n// ARIA live role of the card. `status` is announced politely (implicit aria-live=\"polite\"),\n// `alert` interrupts (implicit aria-live=\"assertive\"). Derived from the type unless overridden.\nexport const DS_NOTIFICATION_ROLES = {\n STATUS: 'status',\n ALERT: 'alert',\n} as const;\nexport type DsNotificationRole = (typeof DS_NOTIFICATION_ROLES)[keyof typeof DS_NOTIFICATION_ROLES];\n\n// Confirmations (success/info) are polite; problems (warning/error) are assertive.\nexport const DS_NOTIFICATION_TYPE_ROLES: Record<DsNotificationType, DsNotificationRole> = {\n success: 'status',\n info: 'status',\n warning: 'alert',\n error: 'alert',\n};\n\n// `target` del <a> del link. Default `_blank` (comportamiento histórico, se\n// mantiene para no romper). Usá `_self` para navegar en la misma pestaña; para\n// navegación in-app (SPA, sin recarga) escuchá el evento `navigate` y llamá al\n// router de la app. `rel=\"noopener noreferrer\"` se aplica solo con `_blank`.\nexport const DS_NOTIFICATION_LINK_TARGETS = {\n BLANK: '_blank',\n SELF: '_self',\n PARENT: '_parent',\n TOP: '_top',\n} as const;\nexport type DsNotificationLinkTarget =\n (typeof DS_NOTIFICATION_LINK_TARGETS)[keyof typeof DS_NOTIFICATION_LINK_TARGETS];\n","import { TELEPORTED_Z_INDEX } from '@shared/constants/layers';\nimport { DS_NOTIFICATION_POSITIONS, type DsNotificationPosition } from './DsNotification.types';\n\nconst STACK_CLASS = 'ds-notification-stack';\n\n// `top-center` toasts share one fixed flex column, so several alive at once stack instead of\n// overlapping. Corners keep teleporting straight to <body>, exactly as before.\nexport function notificationTeleportTarget(position: DsNotificationPosition): HTMLElement | 'body' {\n if (position !== DS_NOTIFICATION_POSITIONS.TOP_CENTER || typeof document === 'undefined') {\n return 'body';\n }\n const modifier = `${STACK_CLASS}--${position}`;\n const existing = document.body.querySelector<HTMLElement>(`:scope > .${modifier}`);\n if (existing) return existing;\n\n const host = document.createElement('div');\n host.className = `${STACK_CLASS} ${modifier}`;\n host.style.zIndex = String(TELEPORTED_Z_INDEX);\n document.body.appendChild(host);\n return host;\n}\n","<template>\n <Teleport :to=\"teleportTarget\">\n <Transition name=\"ds-notification\" appear>\n <div\n v-if=\"visible\"\n class=\"ds-notification\"\n :class=\"`ds-notification--${position}`\"\n :style=\"{ zIndex: TELEPORTED_Z_INDEX }\"\n >\n <div\n class=\"ds-notification__card\"\n :class=\"`ds-notification__card--${type}`\"\n :role=\"resolvedRole\"\n @mouseenter=\"pause\"\n @mouseleave=\"resume\"\n >\n <i class=\"material-symbols-filled ds-notification__icon\" aria-hidden=\"true\">{{ icon }}</i>\n\n <div class=\"ds-notification__content\">\n <span v-if=\"title\" class=\"ds-notification__title\">{{ title }}</span>\n <p v-if=\"description\" class=\"ds-notification__desc\">{{ description }}</p>\n <a\n v-if=\"linkTitle\"\n class=\"ds-notification__link\"\n :href=\"link || undefined\"\n :target=\"linkTarget\"\n :rel=\"linkRel\"\n @click=\"onLinkClick\"\n >{{ linkTitle }}</a\n >\n </div>\n\n <button\n v-if=\"showClose\"\n type=\"button\"\n class=\"ds-notification__close\"\n :aria-label=\"closeLabel || undefined\"\n @click=\"onClose\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">close</i>\n </button>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, type PropType } from 'vue';\nimport { CLOSE, NAVIGATE } from '@shared/constants/events';\nimport { TELEPORTED_Z_INDEX } from '@shared/constants/layers';\nimport { notificationTeleportTarget } from './notificationStack';\nimport {\n DS_NOTIFICATION_TYPES,\n DS_NOTIFICATION_POSITIONS,\n DS_NOTIFICATION_ICONS,\n DS_NOTIFICATION_LINK_TARGETS,\n DS_NOTIFICATION_TYPE_ROLES,\n type DsNotificationType,\n type DsNotificationRole,\n type DsNotificationPosition,\n type DsNotificationLinkTarget,\n} from './DsNotification.types';\n\nconst props = defineProps({\n type: { type: String as PropType<DsNotificationType>, default: DS_NOTIFICATION_TYPES.INFO },\n position: {\n type: String as PropType<DsNotificationPosition>,\n default: DS_NOTIFICATION_POSITIONS.BOTTOM_LEFT,\n },\n // ARIA role of the card. Left unset it follows `type`: `status` (polite) for\n // success/info, `alert` (assertive) for warning/error. Pass it to override.\n role: { type: String as PropType<DsNotificationRole>, default: undefined },\n title: { type: String, default: '' },\n description: { type: String, default: '' },\n linkTitle: { type: String, default: '' },\n link: { type: String, default: '' },\n // `target` del <a> del link. Default `_blank` para no romper el comportamiento\n // histórico. Con `_blank` se emite `rel=\"noopener noreferrer\"` (seguridad). Para\n // navegación in-app (SPA) escuchá `navigate` y enrutá con el router de la app.\n linkTarget: {\n type: String as PropType<DsNotificationLinkTarget>,\n default: DS_NOTIFICATION_LINK_TARGETS.BLANK,\n },\n showClose: { type: Boolean, default: true },\n // Accessible name for the icon-only close button — provide it whenever\n // `showClose` is on, or the button has no name for screen readers (as with any\n // icon-only control, cf. DsButton circle/square requiring `ariaLabel`). The\n // library never hardcodes copy; the consuming app owns i18n.\n closeLabel: { type: String, default: '' },\n // Auto-dismiss delay in ms (DS default 3500). 0 disables it. The timer pauses\n // while the pointer is over the card and resumes with the remaining time.\n duration: { type: Number, default: 3500 },\n});\n\nconst emit = defineEmits([CLOSE, NAVIGATE]);\n\nconst visible = ref(true);\nconst icon = computed(() => DS_NOTIFICATION_ICONS[props.type]);\nconst resolvedRole = computed(() => props.role ?? DS_NOTIFICATION_TYPE_ROLES[props.type]);\nconst teleportTarget = notificationTeleportTarget(props.position);\n\n// `noopener noreferrer` solo cuando el link abre en otra pestaña (`_blank`):\n// evita que la página destino acceda a `window.opener` y filtre el referrer.\nconst linkRel = computed(() =>\n props.linkTarget === DS_NOTIFICATION_LINK_TARGETS.BLANK ? 'noopener noreferrer' : undefined\n);\n\nlet timer: ReturnType<typeof setTimeout> | undefined;\nlet startedAt = 0;\nlet remaining = props.duration;\n\nfunction clearTimer() {\n if (timer) {\n clearTimeout(timer);\n timer = undefined;\n }\n}\n\nfunction schedule(ms: number) {\n clearTimer();\n if (props.duration <= 0 || !visible.value) return;\n startedAt = Date.now();\n timer = setTimeout(onClose, ms);\n}\n\nfunction pause() {\n if (!timer) return;\n remaining -= Date.now() - startedAt;\n clearTimer();\n}\n\nfunction resume() {\n schedule(remaining > 0 ? remaining : props.duration);\n}\n\nfunction onClose() {\n clearTimer();\n visible.value = false;\n emit(CLOSE);\n}\n\n// El link es un <a href> real (a11y: focuseable, teclado, fallback sin JS). Emitimos\n// el MouseEvent para que el consumidor pueda `preventDefault()` y enrutar in-app con\n// su router; sin listener, la navegación nativa del <a> sigue funcionando igual.\nfunction onLinkClick(event: MouseEvent) {\n emit(NAVIGATE, event);\n}\n\nonMounted(() => schedule(props.duration));\nonBeforeUnmount(clearTimer);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/shadow.scss' as sh;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-notification {\n position: fixed;\n\n &--top-left {\n top: 0;\n left: 0;\n }\n &--top-right {\n top: 0;\n right: 0;\n }\n &--bottom-left {\n bottom: 0;\n left: 0;\n }\n &--bottom-right {\n bottom: 0;\n right: 0;\n }\n // Lives inside the shared stack host (see the unscoped block below), which owns the position.\n &--top-center {\n position: static;\n\n .ds-notification__card {\n width: max-content;\n max-width: 480px;\n margin: 0;\n pointer-events: auto;\n }\n }\n\n &__card {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n\n max-width: 331px;\n margin: 24px;\n padding: 16px;\n\n border: 1px solid transparent;\n border-radius: r.$radius-card-lg;\n\n box-shadow: sh.$shadow-soft;\n\n // Success is the DS default/most-used type. Icons use the darker -shadow step\n // for legibility on the tint (warning/error/success). NOTE: the _ds_bundle.js\n // export uses the -main step for icons — this -shadow treatment tracks the\n // live design, pending a visual confirm against claude.ai/design.\n &--success {\n background-color: colors.$success-tint;\n border-color: rgba(colors.$success-main, 0.7);\n\n .ds-notification__icon {\n color: colors.$success-shadow;\n }\n }\n &--info {\n background-color: colors.$info-tint;\n border-color: rgba(colors.$info-main, 0.7);\n\n .ds-notification__icon {\n color: colors.$info-main;\n }\n }\n &--warning {\n background-color: colors.$warning-tint;\n border-color: rgba(colors.$warning-main, 0.7);\n\n .ds-notification__icon {\n color: colors.$warning-shadow;\n }\n }\n &--error {\n background-color: colors.$error-tint;\n border-color: rgba(colors.$error-main, 0.7);\n\n .ds-notification__icon {\n color: colors.$error-shadow;\n }\n }\n }\n\n &__icon {\n font-size: i.icon-size(20);\n }\n\n &__content {\n display: flex;\n flex-direction: column;\n\n color: colors.$slate-shadow;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n line-height: 21px;\n }\n\n &__title {\n font-weight: t.$weight-bold;\n }\n\n &__desc {\n margin: 0;\n padding-top: 8px;\n }\n\n &__link {\n padding-top: 8px;\n\n color: colors.$accent-main;\n text-decoration: underline;\n }\n\n &__close {\n display: inline-flex;\n margin-left: auto;\n padding: 0;\n\n color: colors.$slate-soft;\n\n background: transparent;\n border: 0;\n\n cursor: pointer;\n\n .material-symbols-filled {\n font-size: i.icon-size(20);\n }\n }\n}\n\n/* Enter: the card fades + slides up (~0.24s toast duration); top-center slides down. */\n.ds-notification-enter-active {\n transition: opacity m.$duration-toast m.$easing;\n\n .ds-notification__card {\n transition: transform m.$duration-toast m.$easing;\n }\n\n @include m.reduce-motion {\n transition: none;\n\n .ds-notification__card {\n transition: none;\n }\n }\n}\n.ds-notification-enter-from {\n opacity: 0;\n\n .ds-notification__card {\n transform: translateY(8px);\n }\n}\n\n.ds-notification--top-center {\n &.ds-notification-enter-from .ds-notification__card {\n transform: translateY(-8px);\n }\n}\n</style>\n\n<!-- Unscoped: the host is created outside Vue (notificationStack.ts), so it has no scope id. -->\n<style lang=\"scss\">\n@use '../../assets/css/spacing.scss' as s;\n\n.ds-notification-stack {\n position: fixed;\n\n display: flex;\n flex-direction: column;\n gap: s.spacing(1);\n\n pointer-events: none;\n\n &--top-center {\n top: 0;\n left: 50%;\n align-items: center;\n max-width: calc(100vw - #{s.spacing(4)});\n padding-top: s.spacing(3);\n transform: translateX(-50%);\n }\n}\n</style>\n","<template>\n <Teleport to=\"body\" :disabled=\"!fixed\">\n <Transition name=\"ds-modal\">\n <div\n v-if=\"open\"\n class=\"ds-modal\"\n :class=\"{ 'is-fixed': fixed }\"\n :style=\"fixed ? { paddingTop: top } : undefined\"\n @click=\"onBackdrop\"\n >\n <div\n ref=\"dialogRef\"\n class=\"ds-modal__dialog\"\n :class=\"{ 'is-center': center }\"\n role=\"dialog\"\n :aria-modal=\"fixed ? 'true' : 'false'\"\n :aria-labelledby=\"title ? titleId : undefined\"\n :aria-label=\"title ? undefined : 'dialog'\"\n tabindex=\"-1\"\n :style=\"dialogStyle\"\n @click.stop\n >\n <div v-if=\"title || showClose\" class=\"ds-modal__header\">\n <span :id=\"titleId\" class=\"ds-modal__title\">{{ title }}</span>\n <DsButton\n v-if=\"showClose\"\n variant=\"tertiary\"\n circle\n left-icon=\"close\"\n :aria-label=\"closeLabel || undefined\"\n @click=\"emit(CLOSE)\"\n />\n </div>\n\n <div class=\"ds-modal__body\"><slot /></div>\n\n <div v-if=\"$slots.footer\" class=\"ds-modal__footer\"><slot name=\"footer\" /></div>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch, nextTick, onBeforeUnmount, useId } from 'vue';\nimport { DsButton } from '@shared/ui/DsButton';\nimport { CLOSE } from '@shared/constants/events';\n\nconst props = defineProps({\n open: Boolean,\n title: { type: String, default: '' },\n showClose: { type: Boolean, default: true },\n width: { type: String, default: '440px' },\n // Explicit dialog height (any CSS length). Unset = content height.\n height: { type: String, default: '' },\n // Top offset of the dialog inside the fixed backdrop.\n top: { type: String, default: '15vh' },\n // Center the body text.\n center: Boolean,\n // false = render in-flow (no backdrop / portal / scroll-lock) for specimen cards.\n fixed: { type: Boolean, default: true },\n closeOnBackdrop: { type: Boolean, default: true },\n // Symmetric with closeOnBackdrop: a non-dismissable flow (closeOnBackdrop=false)\n // can also opt out of Escape-to-close. Default true (Escape closes).\n closeOnEscape: { type: Boolean, default: true },\n // Accessible name for the icon-only close button; English default (app owns i18n),\n // matching DsDataCard so the control is never unnamed.\n closeLabel: { type: String, default: 'Close' },\n});\n\nconst emit = defineEmits([CLOSE]);\n\nconst dialogRef = ref<HTMLElement | null>(null);\nlet lastFocused: HTMLElement | null = null;\n\n// SSR-safe id so the dialog is labelled by its visible title (aria-labelledby) instead of\n// duplicating the string via aria-label.\nconst titleId = useId();\n\nconst dialogStyle = computed(() => ({\n width: props.width,\n ...(props.height ? { height: props.height } : {}),\n}));\n\nfunction onBackdrop() {\n if (props.fixed && props.closeOnBackdrop) emit(CLOSE);\n}\n\nfunction focusables(): HTMLElement[] {\n if (!dialogRef.value) return [];\n const sel =\n 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n return Array.from(dialogRef.value.querySelectorAll<HTMLElement>(sel)).filter(\n (el) => el.offsetParent !== null\n );\n}\n\nfunction onKeydown(e: KeyboardEvent) {\n if (e.key === 'Escape') {\n if (props.closeOnEscape) emit(CLOSE);\n return;\n }\n if (e.key !== 'Tab') return;\n const f = focusables();\n if (f.length === 0) {\n e.preventDefault();\n dialogRef.value?.focus();\n return;\n }\n const first = f[0];\n const last = f[f.length - 1];\n if (e.shiftKey && document.activeElement === first) {\n e.preventDefault();\n last.focus();\n } else if (!e.shiftKey && document.activeElement === last) {\n e.preventDefault();\n first.focus();\n }\n}\n\n// Portal effects (focus trap + scroll lock + Esc listener) apply only while the modal\n// is open AND fixed. Watch the combined condition so flipping EITHER off — even without\n// closing — tears them down (no dangling listener / body scroll-lock).\nfunction activateModal() {\n lastFocused = document.activeElement as HTMLElement;\n document.addEventListener('keydown', onKeydown);\n document.body.style.overflow = 'hidden';\n nextTick(() => (focusables()[0] ?? dialogRef.value)?.focus());\n}\n\nfunction deactivateModal(restoreFocus = true) {\n document.removeEventListener('keydown', onKeydown);\n document.body.style.overflow = '';\n if (restoreFocus) lastFocused?.focus?.();\n}\n\nwatch(\n () => props.open && props.fixed,\n (active, wasActive) => {\n if (typeof document === 'undefined') return;\n if (active) activateModal();\n else if (wasActive) deactivateModal();\n },\n { immediate: true }\n);\n\nonBeforeUnmount(() => {\n if (typeof document === 'undefined') return;\n deactivateModal(false);\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/shadow.scss' as sh;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-modal {\n // In-flow (fixed=false): the wrapper collapses so the dialog joins the parent flow.\n display: contents;\n\n // Portal (fixed=true): full-screen backdrop that centers the dialog. padding-top comes\n // from the `top` prop (inline), so the offset is configurable without hardcoding it here.\n &.is-fixed {\n position: fixed;\n inset: 0;\n z-index: 2001;\n\n display: flex;\n align-items: flex-start;\n justify-content: center;\n\n padding-right: 16px;\n padding-bottom: 50px;\n padding-left: 16px;\n overflow: auto;\n\n background: colors.$backdrop; // grey-10 @ 50%, no blur\n }\n\n &__dialog {\n max-width: 100%;\n\n // Horizontal frame only. Vertical spacing is owned by header/body/footer so their\n // symmetric 8px padding is not doubled by an outer frame (fixes off-center header/footer).\n padding: 0 8px;\n\n background: colors.$white;\n\n border-radius: r.$radius-card-lg; // DS readme: 8px (the MCP/API mockup's 6px reconciles up to 8px)\n box-shadow: sh.$shadow-card;\n\n outline: none;\n\n &.is-center {\n text-align: center; // body inherits; header/footer are flex, so unaffected\n }\n }\n\n &__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n min-height: 36px;\n // 12px inline (like body/footer) → title + close button sit on the shared 20px column.\n padding: 8px 12px;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n font-weight: t.$weight-bold;\n\n border-bottom: 1px solid colors.$slate-tint;\n\n text-align: initial; // never centered, even under .is-center\n }\n\n &__body {\n // 12px inline matches the header's 12px so the body text lines up under the title\n // (both land 20px from the dialog edge). 20px block keeps the vertical breathing room.\n padding: 20px 12px;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n }\n\n &__footer {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n\n // 8px block keeps the footer vertically centered; 12px inline aligns the actions\n // with the body's right edge (the shared 20px column).\n padding: 8px 12px;\n\n border-top: 1px solid colors.$slate-tint;\n }\n}\n\n/* Enter/leave (portal only): backdrop fades, dialog fades + lifts (0.3s dialog duration). */\n.ds-modal-enter-active.is-fixed,\n.ds-modal-leave-active.is-fixed {\n transition: opacity m.$duration-dialog m.$easing;\n\n .ds-modal__dialog {\n transition: transform m.$duration-dialog m.$easing;\n }\n\n @include m.reduce-motion {\n transition: none;\n\n .ds-modal__dialog {\n transition: none;\n }\n }\n}\n.ds-modal-enter-from.is-fixed,\n.ds-modal-leave-to.is-fixed {\n opacity: 0;\n\n .ds-modal__dialog {\n transform: translateY(-8px);\n }\n}\n</style>\n","import { onBeforeUnmount, onMounted } from 'vue';\n\ntype InputModality = 'keyboard' | 'pointer';\n\nconst POINTER_EVENTS = ['pointerdown', 'mousedown'] as const;\n\nlet modality: InputModality | null = null;\nlet consumers = 0;\n\nfunction onKeydown(e: KeyboardEvent) {\n // Cmd/Ctrl/Alt combos (switching apps, shortcuts) aren't focus navigation.\n if (e.metaKey || e.ctrlKey || e.altKey) return;\n modality = 'keyboard';\n}\n\nfunction onPointerDown() {\n modality = 'pointer';\n}\n\nfunction attach() {\n if (consumers++ > 0) return;\n document.addEventListener('keydown', onKeydown, true);\n POINTER_EVENTS.forEach((type) => document.addEventListener(type, onPointerDown, true));\n}\n\nfunction detach() {\n if (--consumers > 0) return;\n document.removeEventListener('keydown', onKeydown, true);\n POINTER_EVENTS.forEach((type) => document.removeEventListener(type, onPointerDown, true));\n modality = null;\n}\n\nfunction isKeyboardFocus(el: Element): boolean {\n if (modality) return modality === 'keyboard';\n // No input seen while listening: the browser's own heuristic still knows.\n try {\n return el.matches(':focus-visible');\n } catch {\n return false;\n }\n}\n\n/** Whether a focus came from the keyboard, as `:focus-visible` decides it. Internal. */\nexport function useInputModality() {\n onMounted(attach);\n onBeforeUnmount(detach);\n return { isKeyboardFocus };\n}\n","import { computed, onBeforeUnmount, ref, type CSSProperties, type Ref } from 'vue';\n\ninterface AnchorRect {\n top: number;\n left: number;\n width: number;\n height: number;\n}\n\nexport interface TeleportAnchorOptions {\n onTriggerHidden?: () => void;\n}\n\nexport function useTeleportAnchor(\n rootRef: Ref<HTMLElement | null>,\n { onTriggerHidden }: TeleportAnchorOptions = {}\n) {\n const anchorRect = ref<AnchorRect | null>(null);\n let tracking = false;\n let triggerVisibility: IntersectionObserver | null = null;\n\n const anchorStyle = computed<CSSProperties>(() => {\n const box: CSSProperties = { position: 'fixed', pointerEvents: 'none' };\n const rect = anchorRect.value;\n if (!rect) return box;\n return {\n ...box,\n top: `${rect.top}px`,\n left: `${rect.left}px`,\n width: `${rect.width}px`,\n height: `${rect.height}px`,\n };\n });\n\n function sync() {\n const rect = rootRef.value?.getBoundingClientRect();\n if (rect) {\n anchorRect.value = { top: rect.top, left: rect.left, width: rect.width, height: rect.height };\n }\n }\n\n // IntersectionObserver, not a viewport check: it accounts for ancestors' `overflow` clipping.\n function watchTriggerVisibility() {\n if (!onTriggerHidden || typeof IntersectionObserver === 'undefined' || !rootRef.value) return;\n triggerVisibility = new IntersectionObserver((entries) => {\n if (entries.some((entry) => !entry.isIntersecting)) onTriggerHidden();\n });\n triggerVisibility.observe(rootRef.value);\n }\n\n // track() before the clamp's activate(): the anchor must move before the clamp measures.\n function track() {\n if (typeof window === 'undefined') return;\n sync();\n if (tracking) return;\n tracking = true;\n window.addEventListener('resize', sync);\n window.addEventListener('scroll', sync, { capture: true, passive: true });\n watchTriggerVisibility();\n }\n\n function untrack() {\n if (!tracking) return;\n tracking = false;\n window.removeEventListener('resize', sync);\n window.removeEventListener('scroll', sync, { capture: true });\n triggerVisibility?.disconnect();\n triggerVisibility = null;\n }\n\n onBeforeUnmount(untrack);\n\n return { anchorStyle, track, untrack };\n}\n","import { computed, nextTick, ref, type Ref } from 'vue';\n\n// Viewport-collision clamp for the overlay family (DsPopover, DsTooltip), plus an OPTIONAL\n// main-axis FLIP (SALESQL-4056, DsPopover and DsTooltip pass it — see `ClampFlipOptions` below).\n//\n// Those components place their floating element in pure CSS — `left: 50%` plus\n// `translateX(-50%)` — which centres it on the trigger with NO awareness of the\n// viewport. A trigger near an edge pushes the element off-screen, where any ancestor\n// with `overflow` clips it and the content is cut (SALESQL-3968).\n//\n// Rather than pull in floating-ui for this one correction, the element is nudged back\n// inside by a single offset. The CSS keeps owning the placement — this only feeds it a\n// number through a custom property, which is `0` whenever the element already fits\n// (the common case, so nothing moves).\n//\n// FLIP (SALESQL-4056): the prospector table's company card (DsPopover, `bottom-start`)\n// doesn't fit below the trigger on the table's last rows, and the viewport's bottom edge\n// cuts it — what Element Plus / floating-ui call `flip`. Passing the optional third\n// argument (`{ trigger, gap }`) turns this on: `measure()` also decides whether the panel\n// fits on the PREFERRED side and, if not, whether the OPPOSITE side has strictly more room;\n// `resolvedPlacement` is the placement to actually render (side swapped, alignment suffix\n// kept). Omitted, nothing changes — `resolvedPlacement` always equals the preferred\n// placement.\n//\n// INTERNAL: not exported from the package barrel. It is an implementation detail of the\n// overlay components, not part of the public API.\n\n/** Custom property the placement CSS reads: `translateX(calc(-50% + var(...)))`. */\nexport const VIEWPORT_SHIFT_VAR = '--ds-overlay-shift';\n\n/** Gap kept between the floating element and the viewport edge, in px. */\nexport const VIEWPORT_MARGIN = 8;\n\n/** The side a floating element opens on. `over` (DsPopover) covers the trigger and aligns on X. */\nexport type ClampSide = 'top' | 'bottom' | 'left' | 'right' | 'over';\n\n/**\n * Placement vocabulary shared by the overlay family: a bare side (centred) or a\n * `side-start` / `side-end` alignment. Only the SIDE matters here — it decides which\n * axis can overflow — so both vocabularies feed the same clamp (DsTooltip is 4-way,\n * DsPopover is 12-way).\n */\nexport type ClampPlacement = ClampSide | `${ClampSide}-start` | `${ClampSide}-end`;\n\n/** Each side's opposite — what a FLIP swaps to. `over` has none: it covers the trigger,\n * there is no \"other side\" to move to, which is why `over-start` / `over-end` never flip. */\nconst OPPOSITE_SIDE: Partial<Record<ClampSide, ClampSide>> = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n};\n\n/**\n * Turns the main-axis FLIP on for `useViewportClamp` (DsPopover and DsTooltip pass it — see\n * the module header). `trigger` is the element the floating panel is placed against: the\n * component's root, whose rect a `teleported` anchor mirrors, so this is the same ref either\n * way. `gap` mirrors the CSS gap between panel and trigger, so the free-space math matches\n * what the CSS actually renders (`PANEL_GAP` in DsPopover, `BUBBLE_GAP` in DsTooltip, each\n * next to the `calc(100% + 6px)` it repeats).\n */\nexport interface ClampFlipOptions {\n trigger: Ref<HTMLElement | null>;\n gap: number;\n}\n\nexport function useViewportClamp(\n elRef: Ref<HTMLElement | null>,\n placement: () => ClampPlacement,\n flip?: ClampFlipOptions\n) {\n const shift = ref(0);\n // Whether the panel is flipped to the opposite side of the preferred placement. Only\n // `measureFlip` (below) sets it to `true`; `deactivate()` is the only place it goes back\n // to `false` — closing must not leave the NEXT opening starting pre-flipped.\n const flipped = ref(false);\n\n /** Style patch to spread onto the floating element; `null` while it already fits. */\n const shiftStyle = computed(() =>\n shift.value ? { [VIEWPORT_SHIFT_VAR]: `${Math.round(shift.value)}px` } : null\n );\n\n /**\n * The placement to actually render: the preferred one, or its OPPOSITE side (alignment\n * suffix kept) once `measureFlip` has flipped it. Always equal to `placement()` when the\n * caller didn't pass `flip` — there is nothing to swap to.\n */\n const resolvedPlacement = computed<ClampPlacement>(() => {\n const preferred = placement();\n if (!flipped.value) return preferred;\n const dash = preferred.indexOf('-');\n const side = (dash === -1 ? preferred : preferred.slice(0, dash)) as ClampSide;\n const opposite = OPPOSITE_SIDE[side];\n if (!opposite) return preferred; // `over-*`: no opposite, never flips\n return (dash === -1 ? opposite : opposite + preferred.slice(dash)) as ClampPlacement;\n });\n\n /**\n * Decides whether the panel fits on the PREFERRED side and, if not, whether the OPPOSITE\n * side has strictly more room — Element Plus / floating-ui's `flip` (SALESQL-4056).\n *\n * Deliberately NOT the reset-then-remeasure dance `measure()` does below for the shift:\n * `offsetHeight` / `offsetWidth` are LAYOUT sizes, and the placement CSS only repositions\n * the panel — it never resizes it — so, unlike the shift, this decision has no feedback\n * loop. Writing the freshly computed value straight to `flipped` avoids an extra render on\n * every scroll/resize and can never oscillate.\n *\n * Viewport-only, like the rest of this composable: a clipping ANCESTOR (a scroller, a\n * table cell) is not accounted for, only the window's edges.\n */\n function measureFlip() {\n if (!flip) return;\n const side = placement().split('-')[0] as ClampSide;\n if (side === 'over') {\n flipped.value = false; // covers the trigger — no opposite side to flip to\n return;\n }\n\n const el = elRef.value;\n const trigger = flip.trigger.value;\n if (!el || !trigger) return;\n\n const t = trigger.getBoundingClientRect();\n const gap = flip.gap;\n\n if (side === 'top' || side === 'bottom') {\n const below = window.innerHeight - t.bottom - gap - VIEWPORT_MARGIN;\n const above = t.top - gap - VIEWPORT_MARGIN;\n const size = el.offsetHeight;\n flipped.value =\n side === 'bottom' ? size > below && above > below : size > above && below > above;\n } else {\n const right = window.innerWidth - t.right - gap - VIEWPORT_MARGIN;\n const left = t.left - gap - VIEWPORT_MARGIN;\n const size = el.offsetWidth;\n flipped.value = side === 'right' ? size > right && left > right : size > left && right > left;\n }\n }\n\n async function measure() {\n if (typeof window === 'undefined') return;\n\n // FLIP first — a plain synchronous read (see `measureFlip`'s own comment for why it\n // skips the reset-and-remeasure dance below), so it lands in the SAME microtask that\n // schedules this call, before paint.\n measureFlip();\n\n // Measure UNSHIFTED, so a re-run corrects from the natural position instead of\n // compounding the previous nudge.\n shift.value = 0;\n await nextTick();\n\n const el = elRef.value;\n if (!el) return;\n\n const r = el.getBoundingClientRect();\n // A top/bottom side varies on the X axis, a left/right side on the Y axis — that is\n // the axis the shift applies to. The alignment suffix is irrelevant to the clamp:\n // `bottom`, `bottom-start` and `bottom-end` all overflow horizontally. `over-*` is\n // aligned on X like a top/bottom side. Flipping top↔bottom (or left↔right) never\n // changes this grouping, so reading the PREFERRED side here (not `resolvedPlacement`)\n // is deliberate, not an oversight.\n const side = placement().split('-')[0] as ClampSide;\n const shiftsHorizontally = side === 'top' || side === 'bottom' || side === 'over';\n const [start, end, limit] = shiftsHorizontally\n ? [r.left, r.right, window.innerWidth]\n : [r.top, r.bottom, window.innerHeight];\n\n // The leading edge wins when the element is larger than the space available: it\n // stays readable from its start rather than being cut at the beginning.\n if (start < VIEWPORT_MARGIN) shift.value = VIEWPORT_MARGIN - start;\n else if (end > limit - VIEWPORT_MARGIN) shift.value = limit - VIEWPORT_MARGIN - end;\n }\n\n // The space available changes while the element is open: `resize` covers window\n // changes, `scroll` (capture, so scrolling containers are caught too, passive because\n // nothing is prevented) covers the trigger moving.\n function activate() {\n if (typeof window === 'undefined') return;\n window.addEventListener('resize', measure);\n window.addEventListener('scroll', measure, { capture: true, passive: true });\n void measure();\n }\n\n /** Also drops the offset and the flip, so neither carries into the next opening. */\n function deactivate() {\n if (typeof window === 'undefined') return;\n window.removeEventListener('resize', measure);\n window.removeEventListener('scroll', measure, { capture: true });\n shift.value = 0;\n flipped.value = false;\n }\n\n return { shift, shiftStyle, resolvedPlacement, measure, activate, deactivate };\n}\n","// DsTooltip — dark slate bubble wrapping a trigger (Tooltip.jsx). 4-way placement.\n// Pure-CSS positioning (zero-dep, no floating-ui). content via `content` prop or #content slot.\n\nexport const DS_TOOLTIP_PLACEMENTS = {\n TOP: 'top',\n BOTTOM: 'bottom',\n LEFT: 'left',\n RIGHT: 'right',\n} as const;\nexport type DsTooltipPlacement = (typeof DS_TOOLTIP_PLACEMENTS)[keyof typeof DS_TOOLTIP_PLACEMENTS];\n","<template>\n <div\n ref=\"rootRef\"\n class=\"ds-tooltip\"\n :class=\"{ 'ds-tooltip--block': block }\"\n @mouseenter=\"scheduleShow\"\n @mouseleave=\"onMouseLeave\"\n @focusin=\"onFocusIn\"\n @focusout=\"onFocusOut\"\n @keydown.esc=\"hide\"\n >\n <!-- A <div> (not a <span>) so the trigger slot may hold block-root components\n without invalid HTML. Inline-flex by default (buttons/icons); pass `block`\n to wrap a full-width/block control (DsInput/DsTextarea) without squashing it. -->\n <slot />\n\n <!-- `teleported`: the bubble lives in <body>, where no ancestor's `overflow` can clip\n it. The anchor is a fixed box that mirrors this wrapper's rect, so the placement\n CSS below resolves against it exactly as it does against the wrapper — same\n approach as DsPopover's `teleported` (SALESQL-4056). -->\n <Teleport v-if=\"teleported\" to=\"body\">\n <Transition name=\"ds-tooltip-fade\">\n <div v-if=\"visible\" class=\"ds-tooltip__anchor\" :style=\"anchorStyle\">\n <div\n :id=\"tooltipId\"\n ref=\"bubbleRef\"\n class=\"ds-tooltip__bubble\"\n :class=\"`ds-tooltip__bubble--${resolvedPlacement}`\"\n role=\"tooltip\"\n :style=\"shiftStyle\"\n >\n <slot name=\"content\">{{ content }}</slot>\n </div>\n </div>\n </Transition>\n </Teleport>\n <Transition v-else name=\"ds-tooltip-fade\">\n <div\n v-if=\"visible\"\n :id=\"tooltipId\"\n ref=\"bubbleRef\"\n class=\"ds-tooltip__bubble\"\n :class=\"`ds-tooltip__bubble--${resolvedPlacement}`\"\n role=\"tooltip\"\n :style=\"shiftStyle\"\n >\n <slot name=\"content\">{{ content }}</slot>\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n ref,\n useId,\n useSlots,\n watch,\n type PropType,\n} from 'vue';\nimport { useInputModality } from '@shared/composables/useInputModality';\nimport { useTeleportAnchor } from '@shared/composables/useTeleportAnchor';\nimport { useViewportClamp } from '@shared/composables/useViewportClamp';\nimport { DS_TOOLTIP_PLACEMENTS, type DsTooltipPlacement } from './DsTooltip.types';\n\nconst props = defineProps({\n // Bubble text. Rich content can be provided via the #content slot instead.\n content: { type: String, default: '' },\n placement: {\n type: String as PropType<DsTooltipPlacement>,\n default: DS_TOOLTIP_PLACEMENTS.TOP,\n },\n // Hover delay before showing, ms. Keyboard focus always shows immediately (no delay).\n delay: { type: Number, default: 300 },\n // Wrap a full-width/block trigger (DsInput/DsTextarea) — the wrapper becomes\n // `display: block` instead of the default inline-flex, so it doesn't squash the control.\n block: { type: Boolean, default: false },\n // Force the tooltip off regardless of content/slot. Lets a consumer show it only\n // under a condition (e.g. only-if-truncated) without emptying the content prop —\n // the #content slot is always truthy, so it's the only way to suppress that path.\n disabled: { type: Boolean, default: false },\n // Render the bubble in <body> so no ancestor's `overflow` can clip it — a drawer's\n // scrollable body, a table cell. Mirrors DsPopover's `teleported` (SALESQL-4056): a\n // fixed box copies the wrapper's rect and the bubble keeps its existing placement CSS\n // against it. Off keeps the bubble inside the wrapper, exactly as before — additive.\n teleported: { type: Boolean, default: false },\n});\n\nconst slots = useSlots();\n\n// SSR-safe unique id (Vue 3.5); the bubble carries it and the focused trigger references it.\nconst tooltipId = useId();\n\nconst rootRef = ref<HTMLElement | null>(null);\nconst visible = ref(false);\nconst bubbleRef = ref<HTMLElement | null>(null);\nconst { isKeyboardFocus } = useInputModality();\n\n// Mirrors the CSS `calc(100% + 6px)` gap in the placement rules below — the flip's\n// free-space math (useViewportClamp) needs the SAME number the CSS renders with.\nconst BUBBLE_GAP = 6;\n\n// Placement is pure CSS and knows nothing about the viewport: a trigger near an edge —\n// an icon in a narrow rail, the first cell of a table — pushed the bubble off-screen,\n// where an ancestor with `overflow` clipped it. Measured with the icon at x=0: the bubble\n// started at -108px. Same clamp DsPopover uses (SALESQL-3968). Passing `trigger`/`gap`\n// also turns on its main-axis flip: a bubble that doesn't fit on the preferred `placement`\n// opens on the opposite side when that one has more room.\nconst {\n shiftStyle,\n resolvedPlacement,\n activate: activateClamp,\n deactivate: deactivateClamp,\n} = useViewportClamp(bubbleRef, () => props.placement, { trigger: rootRef, gap: BUBBLE_GAP });\n\n// Teleported only: the fixed box that mirrors the wrapper's rect (see DsPopover).\nconst { anchorStyle, track: trackAnchor, untrack: untrackAnchor } = useTeleportAnchor(rootRef);\n\n// The clamp only has something to measure once the bubble is in the DOM, so it follows\n// `visible` rather than the show/hide entry points (which are several) — and activates in\n// `nextTick`, after the bubble has rendered: right here `bubbleRef` is still null. The anchor\n// is synced BEFORE the clamp activates, so the clamp always measures the bubble against its\n// final (already-repositioned) anchor, never a stale one.\nwatch(visible, (isVisible) => {\n if (isVisible) {\n if (props.teleported) trackAnchor();\n nextTick(activateClamp);\n } else {\n untrackAnchor();\n deactivateClamp();\n }\n});\n// Don't pop a bubble when disabled or when there is nothing to describe. Both\n// entry points (scheduleShow, onFocusIn) short-circuit on this.\nconst hasContent = computed(() => !props.disabled && (props.content.length > 0 || !!slots.content));\n\n// If it gets disabled while open, close it (hide() clears the timer + aria-describedby).\nwatch(\n () => props.disabled,\n (d) => {\n if (d) hide();\n }\n);\n\n// Hover and keyboard-focus are tracked separately: the tooltip only hides once BOTH\n// are false, so leaving with the mouse while still focused (or vice versa) keeps it open.\nlet hovering = false;\nlet focused = false;\nlet timer: ReturnType<typeof setTimeout> | null = null;\n\n// aria-describedby is set on the actually-focused element (not the wrapper) so a screen\n// reader announces the tooltip for the control it belongs to. We restore any prior value.\nlet describedEl: HTMLElement | null = null;\nlet prevDescribedBy: string | null = null;\n\nfunction clearTimer() {\n if (timer !== null) {\n clearTimeout(timer);\n timer = null;\n }\n}\n\nfunction describe(el: HTMLElement | null) {\n if (!el) return;\n if (describedEl && describedEl !== el) undescribe();\n if (describedEl === el) return;\n describedEl = el;\n prevDescribedBy = el.getAttribute('aria-describedby');\n el.setAttribute(\n 'aria-describedby',\n prevDescribedBy ? `${prevDescribedBy} ${tooltipId}` : tooltipId\n );\n}\n\nfunction undescribe() {\n if (!describedEl) return;\n if (prevDescribedBy !== null) describedEl.setAttribute('aria-describedby', prevDescribedBy);\n else describedEl.removeAttribute('aria-describedby');\n describedEl = null;\n prevDescribedBy = null;\n}\n\n// Hover: show after `delay`.\nfunction scheduleShow() {\n if (!hasContent.value) return;\n hovering = true;\n clearTimer();\n timer = setTimeout(() => {\n visible.value = true;\n }, props.delay);\n}\n\nfunction onMouseLeave() {\n hovering = false;\n clearTimer(); // cancel a still-pending hover show\n if (!focused) hide();\n}\n\n// Keyboard focus: show immediately and wire aria-describedby onto the focused trigger.\nfunction onFocusIn(e: FocusEvent) {\n const target = e.target as HTMLElement;\n // Pointer or scripted focus (e.g. a drawer's focus trap) is left to hover.\n if (!hasContent.value || (!focused && !isKeyboardFocus(target))) return;\n focused = true;\n clearTimer();\n visible.value = true;\n describe(target);\n}\n\nfunction onFocusOut(e: FocusEvent) {\n // Focus moving to another element INSIDE the same wrapper (e.g. an input and its\n // own toggle button) isn't leaving the trigger — keep the tooltip open and let the\n // following focusin move aria-describedby to the new element.\n const next = e.relatedTarget as Node | null;\n const wrapper = e.currentTarget as HTMLElement | null;\n if (next && wrapper?.contains(next)) return;\n focused = false;\n if (!hovering) hide();\n}\n\nfunction hide() {\n clearTimer();\n visible.value = false;\n undescribe();\n}\n\nonBeforeUnmount(() => {\n clearTimer();\n undescribe();\n deactivateClamp();\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-tooltip {\n position: relative;\n display: inline-flex; // inline triggers (buttons/icons) — the DS default\n\n // Full-width/block triggers: don't impose inline layout (see `block` prop).\n &--block {\n display: block;\n }\n\n // Teleported only. The anchor's box is inline (useTeleportAnchor); it carries the bubble's\n // z-index (the fade's opacity makes it a stacking context) and lets the pointer through\n // everywhere but the bubble.\n &__anchor {\n z-index: 10001; // same layer as the non-teleported bubble — above modals/drawers (2001)\n\n .ds-tooltip__bubble {\n pointer-events: auto;\n }\n }\n\n &__bubble {\n position: absolute;\n z-index: 10001; // above modals (2001); DS Tooltip.jsx zIndex 10001\n\n width: max-content;\n // Never wider than the viewport itself: past that, no offset can bring it back in.\n max-width: min(260px, calc(100vw - 16px));\n padding: 2px 8px;\n\n color: colors.$white;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n font-weight: t.$weight-bold;\n line-height: 20px;\n white-space: pre-line;\n\n background: colors.$slate-main; // DS --primary-main\n border-radius: r.$radius-control; // DS --radius-sm\n\n // 4-way placement, 6px gap from the trigger. Pure CSS — no floating-ui.\n &--top {\n bottom: calc(100% + 6px);\n left: 50%;\n transform: translateX(calc(-50% + var(--ds-overlay-shift, 0px)));\n }\n &--bottom {\n top: calc(100% + 6px);\n left: 50%;\n transform: translateX(calc(-50% + var(--ds-overlay-shift, 0px)));\n }\n &--right {\n top: 50%;\n left: calc(100% + 6px);\n transform: translateY(calc(-50% + var(--ds-overlay-shift, 0px)));\n }\n &--left {\n top: 50%;\n right: calc(100% + 6px);\n transform: translateY(calc(-50% + var(--ds-overlay-shift, 0px)));\n }\n }\n}\n\n/* Fade only — the positioning transform must not be animated (it would fight placement). */\n.ds-tooltip-fade-enter-active,\n.ds-tooltip-fade-leave-active {\n transition: opacity m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n}\n.ds-tooltip-fade-enter-from,\n.ds-tooltip-fade-leave-to {\n opacity: 0;\n}\n</style>\n","// DsVerificationIcon — status glyph for a contact data point.\n// 1:1 with the DS source (components/data/VerificationIcon.jsx):\n// verified === true -> \"verified\" (info-main, blue)\n// verified === false + email -> \"dangerous\" (error-main, coral)\n// verified === false + phone -> \"error\" (warning-main, orange)\n// verified == null (new) -> \"new_releases\" (slate-soft, grey)\n// `isContactData` flags emails (coral) vs phones (orange) when unverified.\n\nexport const DS_VERIFICATION_STATES = {\n VERIFIED: 'verified',\n UNVERIFIED: 'unverified',\n NEW: 'new',\n} as const;\nexport type DsVerificationState =\n (typeof DS_VERIFICATION_STATES)[keyof typeof DS_VERIFICATION_STATES];\n","<template>\n <i\n class=\"material-symbols-filled ds-verification-icon\"\n :class=\"[\n `ds-verification-icon--${status.state}`,\n { 'ds-verification-icon--email': isContactData },\n ]\"\n :style=\"{ fontSize: `${size}px` }\"\n role=\"img\"\n :aria-label=\"label || status.label\"\n :title=\"label || status.label\"\n >\n <slot>{{ status.icon }}</slot>\n </i>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport { DS_VERIFICATION_STATES } from './DsVerificationIcon.types';\n\nconst props = defineProps({\n // true = verified · false = not verified · null/undefined = newly found.\n verified: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n // Emails (true) use the coral \"dangerous\" glyph when unverified; phones use orange.\n isContactData: {\n type: Boolean,\n default: false,\n },\n size: {\n type: Number,\n default: 20,\n },\n // Optional override for the accessible label / tooltip (the app owns i18n).\n // Empty → the English default derived from the verification state.\n label: {\n type: String,\n default: '',\n },\n});\n\nconst status = computed(() => {\n if (props.verified === null || props.verified === undefined) {\n return {\n state: DS_VERIFICATION_STATES.NEW,\n icon: 'new_releases',\n label: 'Newly found',\n };\n }\n if (props.verified) {\n return {\n state: DS_VERIFICATION_STATES.VERIFIED,\n icon: 'verified',\n label: 'Verified',\n };\n }\n return {\n state: DS_VERIFICATION_STATES.UNVERIFIED,\n icon: props.isContactData ? 'dangerous' : 'error',\n label: 'Not verified',\n };\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n\n.ds-verification-icon {\n line-height: 1;\n\n // States map DS colors (VerificationIcon.jsx). isContactData splits the\n // unverified color into coral (email) vs orange (phone).\n &--new {\n color: colors.$slate-soft; // --primary-secondary-text\n }\n &--verified {\n color: colors.$info-main;\n }\n &--unverified {\n color: colors.$warning-main; // phone (orange)\n\n &.ds-verification-icon--email {\n color: colors.$error-main; // email (coral \"dangerous\")\n }\n }\n}\n</style>\n","import { onBeforeUnmount } from 'vue';\n\n/**\n * Writes to the system clipboard. `copy` resolves `true` only once the text is on the\n * clipboard and the component is still mounted; it never rejects. Internal.\n */\nexport function useClipboardCopy() {\n let unmounted = false;\n onBeforeUnmount(() => {\n unmounted = true;\n });\n\n async function copy(text: string): Promise<boolean> {\n if (typeof navigator === 'undefined' || typeof navigator.clipboard?.writeText !== 'function') {\n return false;\n }\n try {\n await navigator.clipboard.writeText(text);\n } catch {\n // The browser refused: unfocused document, permissions policy.\n return false;\n }\n return !unmounted;\n }\n\n return { copy };\n}\n","<template>\n <div class=\"ds-contact-value\" :class=\"{ 'ds-contact-value--main': main }\">\n <DsVerificationIcon :verified=\"verified\" :is-contact-data=\"isContactData\" />\n\n <span class=\"ds-contact-value__value\" :title=\"value\">{{ value }}</span>\n\n <!-- Marquee slot: badge and actions share one grid cell and cross-fade/slide\n on hover (or keyboard focus-within). -->\n <span class=\"ds-contact-value__marquee\">\n <!-- Sin aria-hidden: el tipo (Work/Mobile/…) es información real de clasificación\n del dato. El cross-fade del marquee es solo opacity, no lo saca del árbol de\n a11y; con el orden DOM value → badge, el SR lee \"ada@stripe.com, Work\". -->\n <DsBadge\n v-if=\"valueType\"\n class=\"ds-contact-value__badge\"\n :tone=\"main ? DS_BADGE_TONES.ACCENT : DS_BADGE_TONES.GREY\"\n :title=\"valueType\"\n >{{ valueType }}</DsBadge\n >\n\n <span class=\"ds-contact-value__actions\">\n <!-- Locked value: a static lock glyph replaces copy + rating entirely. -->\n <i\n v-if=\"hideValue\"\n class=\"material-symbols-filled ds-contact-value__lock\"\n :role=\"hideValueLabel ? 'img' : undefined\"\n :aria-label=\"hideValueLabel || undefined\"\n :aria-hidden=\"hideValueLabel ? undefined : 'true'\"\n >lock</i\n >\n\n <template v-else>\n <button\n type=\"button\"\n class=\"ds-contact-value__action\"\n :class=\"{ 'is-copied': copied }\"\n :aria-label=\"copied ? copiedLabel : copyLabel\"\n :title=\"copied ? copiedLabel : copyLabel\"\n @click=\"handleCopy\"\n >\n <i class=\"material-symbols-rounded\" aria-hidden=\"true\">{{\n copied ? 'check' : 'content_copy'\n }}</i>\n </button>\n\n <template v-if=\"showRate\">\n <button\n type=\"button\"\n class=\"ds-contact-value__action\"\n :aria-label=\"correctLabel\"\n :aria-pressed=\"correct === true\"\n :title=\"correctLabel\"\n @click=\"handleCorrect\"\n >\n <i\n :class=\"correct === true ? 'material-symbols-filled' : 'material-symbols-rounded'\"\n aria-hidden=\"true\"\n >thumb_up</i\n >\n </button>\n <button\n type=\"button\"\n class=\"ds-contact-value__action\"\n :aria-label=\"incorrectLabel\"\n :aria-pressed=\"correct === false\"\n :title=\"incorrectLabel\"\n @click=\"handleIncorrect\"\n >\n <i\n :class=\"correct === false ? 'material-symbols-filled' : 'material-symbols-rounded'\"\n aria-hidden=\"true\"\n >thumb_down</i\n >\n </button>\n </template>\n </template>\n </span>\n </span>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, onBeforeUnmount, type PropType } from 'vue';\nimport { DsVerificationIcon } from '@shared/ui/DsVerificationIcon';\nimport { DsBadge, DS_BADGE_TONES } from '@shared/ui/DsBadge';\nimport { COPY, CORRECT, INCORRECT } from '@shared/constants/events';\nimport { useClipboardCopy } from '@shared/composables/useClipboardCopy';\n\nconst props = defineProps({\n value: { type: String, required: true },\n valueType: { type: String, default: '' },\n verified: { type: Boolean as PropType<boolean | null>, default: null },\n main: { type: Boolean, default: false },\n isContactData: { type: Boolean, default: false },\n showRate: { type: Boolean, default: false },\n correct: { type: Boolean as PropType<boolean | null>, default: null },\n // Locks the value: on hover a static lock glyph shows instead of copy/rate.\n hideValue: { type: Boolean, default: false },\n // User-facing labels (the app owns i18n); English DS defaults.\n copyLabel: { type: String, default: 'Copy' },\n copiedLabel: { type: String, default: 'Copied!' },\n correctLabel: { type: String, default: 'Correct' },\n incorrectLabel: { type: String, default: 'Incorrect' },\n // Accessible name for the lock glyph (empty → decorative/aria-hidden).\n hideValueLabel: { type: String, default: '' },\n});\n\n// Runtime array so the emit names are registered at runtime (the type-only\n// form with `typeof CONST` compiles to an empty `emits`, which lets listeners\n// fall through as native attrs). Names come from the shared events constants.\nconst emit = defineEmits([COPY, CORRECT, INCORRECT]);\n\nconst copied = ref(false);\nlet copiedTimer: ReturnType<typeof setTimeout> | undefined;\nconst { copy: copyToClipboard } = useClipboardCopy();\n\n// The copied state and `copy` wait for the clipboard: a refused write shows and emits nothing.\nasync function handleCopy() {\n const value = props.value;\n if (!(await copyToClipboard(value))) return;\n copied.value = true;\n clearTimeout(copiedTimer);\n copiedTimer = setTimeout(() => {\n copied.value = false;\n }, 1200);\n emit(COPY, value);\n}\n\nfunction handleCorrect() {\n emit(CORRECT);\n}\nfunction handleIncorrect() {\n emit(INCORRECT);\n}\n\nonBeforeUnmount(() => clearTimeout(copiedTimer));\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/icons.scss' as i;\n\n.ds-contact-value {\n display: flex;\n align-items: center;\n\n padding: 6px; // DS ContactValue.jsx\n border-radius: r.$radius-control;\n\n background: transparent;\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:hover,\n &:focus-within {\n background-color: colors.$slate-bg; // --primary-background\n }\n\n &--main:hover,\n &--main:focus-within {\n background-color: colors.$accent-bg;\n }\n\n // -- value ---------------------------------------------------------------\n &__value {\n flex: 1;\n min-width: 0;\n margin: 0 8px; // DS\n\n color: colors.$slate-main; // --primary-main\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n // -- marquee (badge + actions share one cell) ----------------------------\n &__marquee {\n display: inline-grid;\n align-items: center;\n justify-items: end;\n margin-left: auto;\n }\n\n &__badge,\n &__actions {\n grid-area: 1 / 1;\n transition:\n transform m.$duration-reveal m.$easing,\n opacity m.$duration-reveal m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n }\n\n // At rest: badge in place, actions parked to the right and hidden.\n &__badge {\n transform: translateX(0);\n opacity: 1;\n\n // Cap an arbitrarily long valueType (legacy getPhoneType can return a raw\n // company_name) so it can't squeeze the value span. `ch` is font-relative,\n // not a hardcoded px-scale value. The full label stays available via :title.\n max-width: 12ch;\n overflow: hidden;\n }\n &__actions {\n display: inline-flex;\n align-items: center;\n gap: 8px; // DS\n\n transform: translateX(8px);\n opacity: 0;\n pointer-events: none;\n }\n\n // On hover / keyboard focus: badge slides out, actions slide in.\n &:hover &__badge,\n &:focus-within &__badge {\n transform: translateX(8px);\n opacity: 0;\n }\n &:hover &__actions,\n &:focus-within &__actions {\n transform: translateX(0);\n opacity: 1;\n pointer-events: auto;\n }\n\n // -- action buttons ------------------------------------------------------\n &__action {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n padding: 0;\n border: none;\n background: none;\n cursor: pointer;\n\n color: colors.$slate-soft; // --primary-secondary-text\n\n .material-symbols-filled,\n .material-symbols-rounded {\n font-size: i.icon-size(20);\n line-height: 1;\n }\n\n &.is-copied {\n color: colors.$success-shadow;\n }\n }\n\n // -- lock glyph (hideValue) ----------------------------------------------\n &__lock {\n color: colors.$slate-soft; // --primary-secondary-text (DS ContactValue.jsx)\n font-size: i.icon-size(20);\n line-height: 1;\n }\n}\n</style>\n","<template>\n <section class=\"ds-data-card\" :aria-label=\"title\" :aria-busy=\"loading ? 'true' : undefined\">\n <!-- header -->\n <div\n class=\"ds-data-card__header\"\n :class=\"{ 'is-collapsed': isCollapsed, 'is-collapsible': collapsible }\"\n @click=\"collapsible && toggle()\"\n >\n <div class=\"ds-data-card__heading\">\n <i class=\"material-symbols-filled ds-data-card__icon\" aria-hidden=\"true\">{{ icon }}</i>\n <span class=\"ds-data-card__title\">{{ title }}</span>\n </div>\n\n <div class=\"ds-data-card__actions\" @click.stop>\n <button\n v-if=\"!isCollapsed && showEdit\"\n type=\"button\"\n class=\"ds-data-card__edit\"\n @click=\"onEdit\"\n >\n {{ editLabel }}\n </button>\n\n <DsButton\n v-if=\"!isCollapsed && showSort\"\n variant=\"tertiary\"\n size=\"medium\"\n circle\n left-icon=\"swap_vert\"\n :aria-label=\"sortLabel\"\n @click=\"onSort\"\n />\n\n <DsButton\n v-if=\"collapsible\"\n variant=\"tertiary\"\n size=\"medium\"\n circle\n :left-icon=\"collapsed ? 'keyboard_arrow_down' : 'keyboard_arrow_up'\"\n :aria-label=\"toggleLabel\"\n @click=\"toggle\"\n />\n\n <button\n v-if=\"showClose\"\n type=\"button\"\n class=\"ds-data-card__close\"\n :aria-label=\"closeLabel\"\n @click=\"onClose\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">close</i>\n </button>\n </div>\n </div>\n\n <!-- body -->\n <div v-if=\"!isCollapsed\" class=\"ds-data-card__body\">\n <div v-if=\"loading\" class=\"ds-data-card__loading\">\n <slot name=\"loading\"><DsSpinner :label=\"loadingLabel || undefined\" /></slot>\n </div>\n\n <!-- Locked/upsell: the data is gated (plan/permission). Wins over empty and\n content (you can't know if gated data is empty), but loading still comes\n first. The #locked slot owns the upsell CTA; the default fallback mirrors\n the DS empty pattern (accent badge + bold title) so the state is never\n conveyed by icon alone. -->\n <div v-else-if=\"locked\" class=\"ds-data-card__locked\">\n <slot name=\"locked\">\n <span class=\"ds-data-card__state-badge ds-data-card__state-badge--accent\">\n <i class=\"material-symbols-filled ds-data-card__state-icon\" aria-hidden=\"true\">lock</i>\n </span>\n <div class=\"ds-data-card__state-text\">\n <span class=\"ds-data-card__state-title\">{{ lockedLabel }}</span>\n </div>\n </slot>\n </div>\n\n <!-- Empty: 1:1 with the DS DsDataCard empty state (DsDataCard.jsx) — a\n circular badge, a bold title, and an optional subtitle. -->\n <div v-else-if=\"empty\" class=\"ds-data-card__empty\">\n <span class=\"ds-data-card__state-badge\">\n <i class=\"material-symbols-filled ds-data-card__state-icon\" aria-hidden=\"true\">{{\n icon\n }}</i>\n </span>\n <div class=\"ds-data-card__state-text\">\n <span class=\"ds-data-card__state-title\">{{ emptyLabel }}</span>\n <span v-if=\"emptySubtitle\" class=\"ds-data-card__state-subtitle\">{{ emptySubtitle }}</span>\n </div>\n </div>\n\n <template v-else>\n <div v-if=\"mostLikely\">\n <div v-if=\"showSections\" class=\"ds-data-card__section\">{{ mostLikelyLabel }}</div>\n <DsContactValue\n :value=\"mostLikely.value\"\n :value-type=\"mostLikely.type\"\n :verified=\"mostLikely.verified\"\n :correct=\"mostLikely.correct\"\n :hide-value=\"mostLikely.hideValue\"\n main\n :is-contact-data=\"isContactData\"\n :show-rate=\"showRate\"\n @copy=\"onCopy\"\n @correct=\"onCorrect(mostLikely)\"\n @incorrect=\"onIncorrect(mostLikely)\"\n />\n </div>\n\n <div v-if=\"more.length > 0\">\n <div v-if=\"showSections\" class=\"ds-data-card__section\">{{ moreLabel }}</div>\n <div class=\"ds-data-card__more\">\n <DsContactValue\n v-for=\"datum in more\"\n :key=\"datum.value\"\n :value=\"datum.value\"\n :value-type=\"datum.type\"\n :verified=\"datum.verified\"\n :correct=\"datum.correct\"\n :hide-value=\"datum.hideValue\"\n :is-contact-data=\"isContactData\"\n :show-rate=\"showRate\"\n @copy=\"onCopy\"\n @correct=\"onCorrect(datum)\"\n @incorrect=\"onIncorrect(datum)\"\n />\n </div>\n </div>\n </template>\n </div>\n </section>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, type PropType } from 'vue';\nimport { DsButton } from '@shared/ui/DsButton';\nimport { DsContactValue } from '@shared/ui/DsContactValue';\nimport { DsSpinner } from '@shared/ui/DsSpinner';\nimport { COPY, SORT, EDIT, CLOSE, CORRECT, INCORRECT } from '@shared/constants/events';\nimport type { DsContactDatum } from './DsDataCard.types';\n\nconst props = defineProps({\n title: { type: String, required: true },\n // Material Icon name for the header (e.g. \"email\", \"call\").\n icon: { type: String, default: 'email' },\n // Loading state: swaps the body for a centered spinner (wins over empty/data).\n // Override the spinner (e.g. an i18n'd label) via the #loading slot.\n loading: { type: Boolean, default: false },\n // Accessible name for the loading spinner (the app owns i18n); when omitted it\n // falls back to DsSpinner's own default. Overridable via the #loading slot.\n loadingLabel: { type: String, default: '' },\n // Locked/upsell state: the data is gated (plan/permission), so the body shows a\n // banner instead of the content (wins over empty/data; loading still wins over\n // it). Presentational only — the app decides when to gate and supplies the CTA\n // via the #locked slot. Additive/opt-in. NB: the header actions still render\n // while locked — turn them off yourself (showSort / showEdit) when gating.\n locked: { type: Boolean, default: false },\n mostLikely: { type: Object as PropType<DsContactDatum | null>, default: null },\n more: { type: Array as PropType<DsContactDatum[]>, default: () => [] },\n collapsible: { type: Boolean, default: false },\n showSort: { type: Boolean, default: true },\n showEdit: { type: Boolean, default: false },\n showClose: { type: Boolean, default: false },\n isContactData: { type: Boolean, default: false },\n showRate: { type: Boolean, default: false },\n // User-facing labels (the app owns i18n); English DS defaults.\n editLabel: { type: String, default: 'Edit' },\n emptyLabel: { type: String, default: 'No data found' },\n // Optional muted line under the empty title (DS DsDataCard `emptySubtitle`),\n // e.g. \"We couldn't find any phone numbers for this contact.\"\n emptySubtitle: { type: String, default: '' },\n // Fallback text for the locked banner when no #locked slot is provided.\n lockedLabel: { type: String, default: 'Locked' },\n mostLikelyLabel: { type: String, default: 'MOST LIKELY' },\n moreLabel: { type: String, default: 'MORE' },\n sortLabel: { type: String, default: 'Sort' },\n toggleLabel: { type: String, default: 'Toggle' },\n closeLabel: { type: String, default: 'Close' },\n});\n\n// Runtime array so the emit names are registered at runtime (the type-only\n// form with `typeof CONST` compiles to an empty `emits`, which lets listeners\n// fall through as native attrs). Names come from the shared events constants.\nconst emit = defineEmits([COPY, SORT, EDIT, CLOSE, CORRECT, INCORRECT]);\n\nconst collapsed = ref(false);\n\nconst total = computed(() => props.more.length + (props.mostLikely ? 1 : 0));\nconst showSections = computed(() => total.value > 3);\nconst empty = computed(() => total.value === 0);\nconst isCollapsed = computed(() => props.collapsible && collapsed.value);\n\nfunction toggle() {\n collapsed.value = !collapsed.value;\n}\nfunction onCopy(value: string) {\n emit(COPY, value);\n}\nfunction onSort() {\n emit(SORT);\n}\nfunction onEdit() {\n emit(EDIT);\n}\nfunction onClose() {\n emit(CLOSE);\n}\nfunction onCorrect(datum: DsContactDatum) {\n emit(CORRECT, datum);\n}\nfunction onIncorrect(datum: DsContactDatum) {\n emit(INCORRECT, datum);\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/shadow.scss' as sh;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/scrollbar.scss' as sb;\n\n.ds-data-card {\n display: block;\n\n padding: 8px;\n\n background-color: colors.$white;\n border-radius: r.$radius-card;\n box-shadow: sh.$shadow-card;\n\n // -- header --------------------------------------------------------------\n &__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n padding: 6px 6px 14px; // DS DataCard.jsx\n border-bottom: 1px solid colors.$slate-tint; // --primary-tint\n\n &.is-collapsible {\n cursor: pointer;\n }\n &.is-collapsed {\n border-bottom: none;\n }\n }\n\n &__heading {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n }\n\n &__icon {\n font-size: i.icon-size(20);\n line-height: 1;\n color: colors.$slate-main; // --primary-main\n\n position: relative;\n top: 1px; // the text's optical center sits below its box center\n }\n\n &__title {\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('body');\n color: colors.$slate-main;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n &__actions {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n &__edit {\n padding: 0;\n border: none;\n background: none;\n cursor: pointer;\n\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('caption');\n color: colors.$accent-main;\n }\n\n &__close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n padding: 0;\n border: none;\n background: none;\n cursor: pointer;\n\n color: colors.$slate-soft; // --primary-secondary-text\n\n .material-symbols-filled {\n font-size: i.icon-size(20);\n line-height: 1;\n }\n }\n\n // -- body ----------------------------------------------------------------\n &__body {\n padding-top: 8px;\n }\n\n &__section {\n padding: 6px;\n\n font-family: t.$font-family;\n font-size: t.font-size('micro');\n line-height: 18px;\n letter-spacing: 0.04em;\n color: colors.$slate-main;\n }\n\n &__more {\n display: flex;\n flex-direction: column;\n gap: 8px;\n\n max-height: 132px; // DS: ~3 rows before the \"MORE\" list scrolls\n overflow-y: auto;\n overflow-x: hidden; // the hover actions park 8px right of their row\n\n @include sb.scrollbar;\n }\n\n // Loading: center the spinner in the body area.\n &__loading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: s.spacing(3); // 24\n }\n\n // Empty + locked share the DS DsDataCard \"state\" pattern (DsDataCard.jsx): a\n // centered circular badge, a bold title, and an optional subtitle. Locked tints\n // the badge with the accent to read as an upsell; its #locked slot can replace\n // the whole fallback with a CTA.\n &__empty,\n &__locked {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: s.spacing(1.5); // DS gap: 12\n\n padding: s.spacing(3) s.spacing(2.5); // DS padding: 24px 20px\n\n text-align: center;\n }\n\n &__state-badge {\n display: flex;\n align-items: center;\n justify-content: center;\n\n width: 44px; // DS: 44px badge\n height: 44px;\n\n background-color: colors.$slate-bg; // DS --primary-background\n border-radius: 50%;\n\n &--accent {\n background-color: colors.$accent-bg;\n }\n }\n\n &__state-icon {\n font-size: i.icon-size(22); // DS DsDataCard.jsx: 22px glyph\n line-height: 1;\n color: colors.$slate-soft; // DS --primary-secondary-text\n\n .ds-data-card__state-badge--accent & {\n color: colors.$accent-main;\n }\n }\n\n &__state-text {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: s.spacing(0.5); // DS gap: 3\n }\n\n &__state-title {\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('body');\n color: colors.$slate-main;\n }\n\n &__state-subtitle {\n font-family: t.$font-family;\n font-size: t.font-size('caption');\n line-height: 18px;\n color: colors.$slate-soft;\n }\n}\n</style>\n","<template>\n <label class=\"ds-radio\" :class=\"{ 'is-disabled': disabled }\">\n <input\n type=\"radio\"\n class=\"ds-radio__native\"\n :name=\"name || undefined\"\n :value=\"value || undefined\"\n :checked=\"model\"\n :disabled=\"disabled\"\n @change=\"handleChange\"\n />\n <span class=\"ds-radio__dot\" :class=\"{ 'is-active': model }\" aria-hidden=\"true\"></span>\n <span v-if=\"$slots.default || label\" class=\"ds-radio__label\"\n ><slot>{{ label }}</slot></span\n >\n </label>\n</template>\n\n<script setup lang=\"ts\">\nconst model = defineModel<boolean>({ default: false });\n\nconst props = defineProps({\n disabled: Boolean,\n // Label text (DS `label` prop); a default slot overrides it.\n label: { type: String, default: '' },\n name: { type: String, default: '' },\n value: { type: String, default: '' },\n});\n\n// Native radios never toggle themselves off — the browser only fires\n// `change` when THIS radio becomes checked (click, or keyboard arrow-nav\n// within a shared `name` group). Consumers own exclusivity across a group\n// by driving each instance's `model-value` off one selected value.\nfunction handleChange() {\n if (props.disabled) return;\n model.value = true;\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-radio {\n display: inline-flex;\n align-items: center;\n gap: s.spacing(1);\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n cursor: pointer;\n user-select: none;\n\n &.is-disabled {\n cursor: not-allowed;\n opacity: 0.6; // DS DsRadio.jsx: opacity 0.6 when disabled\n }\n\n /* Native control drives state + focus, visually replaced by the custom dot. */\n &__native {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n }\n\n &__dot {\n box-sizing: border-box;\n flex: none;\n\n width: 16px;\n height: 16px;\n\n background-color: colors.$white;\n\n border: 2px solid colors.$slate-main;\n border-radius: r.$radius-full;\n\n transition: border m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n // Thick accent border on a fixed-size, border-box circle creates the\n // filled-dot illusion (DS DsRadio.jsx: 5px solid accent-main).\n &.is-active {\n border-width: 5px;\n border-color: colors.$accent-main;\n }\n }\n\n // Hover affordance on the unchecked dot: preview the accent so the control\n // reads as selectable (skipped when disabled or already checked).\n &:hover:not(.is-disabled) .ds-radio__dot:not(.is-active) {\n border-color: colors.$accent-main;\n }\n\n /* Focus ring on the dot when the (hidden) native input is focused. */\n &__native:focus-visible + &__dot {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n &__label {\n line-height: 1.3;\n }\n}\n</style>\n","<template>\n <div class=\"ds-radio-card\" :class=\"{ 'is-selected': checked, 'is-disabled': disabled }\">\n <input\n :id=\"inputId\"\n type=\"radio\"\n class=\"ds-radio-card__native\"\n :name=\"name || undefined\"\n :value=\"value\"\n :checked=\"checked\"\n :disabled=\"disabled\"\n :aria-describedby=\"hasDescription ? descriptionId : undefined\"\n @change=\"handleChange\"\n />\n <div class=\"ds-radio-card__header\">\n <div class=\"ds-radio-card__text\">\n <label :for=\"inputId\" class=\"ds-radio-card__title\"\n ><slot name=\"title\">{{ title }}</slot></label\n >\n <div v-if=\"hasDescription\" :id=\"descriptionId\" class=\"ds-radio-card__description\">\n <slot name=\"description\">{{ description }}</slot>\n </div>\n </div>\n <span class=\"ds-radio-card__dot\" :class=\"{ 'is-active': checked }\" aria-hidden=\"true\"></span>\n </div>\n <div v-if=\"$slots.default\" class=\"ds-radio-card__preview\"><slot /></div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, useId, useSlots, type PropType } from 'vue';\nimport type { DsRadioCardValue } from './DsRadioCard.types';\n\nconst model = defineModel<DsRadioCardValue | null>({ default: null });\n\nconst props = defineProps({\n // This card's own value; the card is selected when it equals the v-model.\n value: { type: [String, Number] as PropType<DsRadioCardValue>, required: true },\n // Required: it is the radio's accessible name (the `title` slot overrides how it renders).\n title: { type: String, required: true },\n description: { type: String, default: '' },\n // Share `name` across the cards of a group for native arrow-key navigation.\n name: { type: String, default: '' },\n disabled: Boolean,\n});\n\nconst slots = useSlots();\nconst uid = useId();\nconst inputId = `${uid}-input`;\nconst descriptionId = `${uid}-description`;\n\nconst checked = computed(() => model.value === props.value);\nconst hasDescription = computed(() => !!props.description || !!slots.description);\n\n// The browser only fires `change` when THIS radio becomes checked (click, Space\n// or arrow-nav inside a shared `name` group); it never fires for the one that\n// loses the selection, so exclusivity comes from the shared v-model.\nfunction handleChange() {\n if (props.disabled) return;\n model.value = props.value;\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/border.scss' as b;\n\n.ds-radio-card {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: s.spacing(1.5);\n box-sizing: border-box;\n min-width: 0;\n padding: s.spacing(2);\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n background-color: colors.$white;\n\n border: b.$border-width-strong solid colors.$slate-tint;\n border-radius: r.$radius-card-lg;\n\n cursor: pointer;\n transition:\n border-color m.$duration-default m.$easing,\n background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:hover:not(.is-disabled):not(.is-selected) {\n border-color: colors.$slate-mid;\n }\n\n &.is-selected {\n background-color: colors.$accent-bg;\n border-color: colors.$accent-main;\n }\n\n &.is-disabled {\n cursor: not-allowed;\n opacity: 0.6;\n }\n\n /* The native radio drives state + keyboard; the card and the dot are its visuals. */\n &__native {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n }\n\n &:has(.ds-radio-card__native:focus-visible) {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n &__header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: s.spacing(1);\n }\n\n &__text {\n display: flex;\n flex-direction: column;\n gap: s.spacing(0.5);\n min-width: 0;\n }\n\n &__title {\n font-size: t.font-size('h3');\n font-weight: t.$weight-bold;\n line-height: t.$line-height-body;\n\n /* Stretched label: its hit area covers the whole card, preview included. */\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n }\n }\n\n &__description {\n color: colors.$slate-soft;\n font-size: t.font-size('small');\n line-height: t.$line-height-relaxed;\n }\n\n // Same dot as DsRadio (16px, 2px ring, 5px accent ring when active).\n &__dot {\n box-sizing: border-box;\n flex: none;\n\n width: 16px;\n height: 16px;\n margin-top: 2px;\n\n background-color: colors.$white;\n\n border: b.$border-width-strong solid colors.$slate-main;\n border-radius: r.$radius-full;\n\n transition: border m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &.is-active {\n border-width: 5px;\n border-color: colors.$accent-main;\n }\n }\n\n &:hover:not(.is-disabled) &__dot:not(.is-active) {\n border-color: colors.$accent-main;\n }\n\n &__preview {\n min-width: 0;\n pointer-events: none;\n }\n}\n</style>\n","<template>\n <button\n type=\"button\"\n role=\"switch\"\n class=\"ds-switch\"\n :class=\"{ 'is-disabled': disabled, 'is-loading': loading }\"\n :aria-checked=\"model\"\n :aria-busy=\"loading || undefined\"\n :aria-disabled=\"disabled || loading || undefined\"\n :aria-label=\"ariaLabel || undefined\"\n :disabled=\"disabled || loading\"\n @click=\"toggle\"\n >\n <span class=\"ds-switch__thumb\" aria-hidden=\"true\">\n <!-- Busy indicator lives INSIDE the thumb so it rides the same translateX as\n the knob and stays aligned to the on/off position. Decorative (thumb is\n aria-hidden): the button's aria-busy is the semantic signal for AT. -->\n <DsSpinner\n v-if=\"loading\"\n class=\"ds-switch__spinner\"\n :size=\"12\"\n :tone=\"DS_SPINNER_TONES.DARK\"\n label=\"\"\n />\n </span>\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { DsSpinner, DS_SPINNER_TONES } from '@shared/ui/DsSpinner';\n\nconst model = defineModel<boolean>({ default: false });\n\nconst props = defineProps({\n disabled: Boolean,\n // Async busy state for a toggle whose commit is pending (e.g. a server round-trip\n // that may revert). Blocks interaction and shows a spinner in the thumb while it\n // resolves. Presentational-only: the app owns the optimistic value + revert; the\n // component just reflects the `loading` and `modelValue` it's handed.\n loading: Boolean,\n // Accessible name for the switch (a control with no visible text). See\n // DsSwitch.types.ts for why this stays optional rather than a required prop.\n ariaLabel: { type: String, default: '' },\n});\n\n// Native <button> gives Enter/Space activation for free; this only handles\n// the resulting click (mouse or keyboard-triggered). Loading blocks the toggle\n// the same way disabled does — the pending op must resolve first.\nfunction toggle() {\n if (props.disabled || props.loading) return;\n model.value = !model.value;\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/shadow.scss' as sh;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-switch {\n display: inline-flex;\n align-items: center;\n flex: none;\n\n width: 40px;\n height: 20px;\n padding: 2px;\n\n background-color: colors.$grey-3;\n border: none;\n border-radius: r.$radius-full;\n outline: none;\n\n cursor: pointer;\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n &[aria-checked='true'] {\n background-color: colors.$accent-main;\n }\n\n &.is-disabled {\n cursor: not-allowed;\n opacity: 0.6; // DS DsSwitch.jsx: opacity 0.6 when disabled\n }\n\n // Busy ≠ disabled: keep the track color at full opacity so the on/off state\n // stays readable while the async op resolves — only the spinner signals \"pending\".\n &.is-loading {\n cursor: progress;\n }\n\n &__thumb {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n\n width: 16px;\n height: 16px;\n\n background-color: colors.$white;\n border-radius: r.$radius-full;\n box-shadow: sh.$shadow-thumb;\n\n transition: transform m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n }\n\n // Track inner width (40 - 2*2 padding) minus the thumb (16) = 20px travel.\n &[aria-checked='true'] &__thumb {\n transform: translateX(20px);\n }\n\n // The spinner sits centered in the white thumb; the dark tone reads against it\n // in both the on (accent track) and off (grey track) positions.\n &__spinner {\n flex: none;\n }\n}\n</style>\n","<template>\n <button\n type=\"button\"\n class=\"ds-item-selector-button\"\n :class=\"{ 'is-empty': !item, 'is-disabled': disabled }\"\n aria-haspopup=\"listbox\"\n :aria-label=\"ariaLabel || undefined\"\n :disabled=\"disabled\"\n @click=\"handleClick\"\n >\n <span class=\"ds-item-selector-button__label\">{{ item ? item.name : emptyTitle }}</span>\n <i\n v-if=\"icon\"\n class=\"ds-item-selector-button__icon\"\n :class=\"item ? 'material-symbols-filled' : 'material-symbols-rounded'\"\n :style=\"item?.color ? { color: item.color } : undefined\"\n aria-hidden=\"true\"\n >{{ icon }}</i\n >\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { type PropType } from 'vue';\nimport { CLICK } from '@shared/constants/events';\nimport type { DsSelectorItem } from './DsItemSelectorButton.types';\n\nconst props = defineProps({\n item: { type: Object as PropType<DsSelectorItem | null>, default: null },\n // Material Symbols ligature (e.g. `folder`); omitted entirely when unset.\n icon: { type: String, default: '' },\n emptyTitle: { type: String, default: '' },\n // Accessible name (see .types.ts). Required in the empty state when there's no\n // `emptyTitle`; the visible text (item.name / emptyTitle) names it otherwise.\n ariaLabel: { type: String, default: '' },\n disabled: Boolean,\n});\n\nconst emit = defineEmits([CLICK]);\n\nfunction handleClick(event: MouseEvent) {\n if (props.disabled) return;\n emit(CLICK, event);\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/border.scss' as b;\n\n.ds-item-selector-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px; // DS ItemSelectorButton.jsx literal gap (not on the 8px scale)\n\n height: s.control-height('medium');\n padding: 0 s.control-padding('medium');\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n background-color: colors.$white;\n\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-full;\n outline: none;\n\n cursor: pointer;\n transition: border-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:hover:not(.is-disabled) {\n border-color: b.$border-input-hover;\n }\n\n // After :hover, same specificity, so the focus border wins while the pointer is over it.\n &:focus-visible:not(.is-disabled) {\n border-color: b.$border-input-focus;\n }\n\n &.is-empty {\n color: colors.$slate-mid;\n }\n\n &.is-disabled {\n cursor: not-allowed;\n opacity: 0.6;\n }\n\n &__label {\n max-width: 200px;\n overflow: hidden;\n\n font-weight: t.$weight-bold; // DS: bold regardless of selected/empty\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &__icon {\n flex: none;\n font-size: i.icon-size(16);\n line-height: i.icon-size(16);\n }\n}\n</style>\n","// DsSelect — dropdown select. Visual + interaction port of the DS `Select.jsx`\n// (`GenericSelect`, two visual modes: grey pill \"default\" and the Prospector\n// accent filter chip \"filterSummary\"). The DS source renders a bare\n// `<div onClick>` with zero semantics; this library version keeps the exact\n// same visual API (options / placeholder / multiple / selectType /\n// showCheckbox / width) but adds a real interaction model — native <button>\n// trigger, listbox/option roles, full keyboard support, and focus management\n// — per the WAI-ARIA APG \"Collapsible Dropdown Listbox\" (select-only combobox)\n// pattern. See DsSelect.vue for the implementation notes.\n\nexport interface DsSelectOption {\n value: string | number;\n label: string;\n subLabel?: string;\n /** Material Symbols ligature name. */\n icon?: string;\n /** Icon color (any CSS color value) — mirrors the DS `option.color` pass-through. */\n color?: string;\n /**\n * Optional group name (optgroup-style). Consecutive options that share a\n * `group` are wrapped in a real ARIA group (`role=\"group\"` labelled by a\n * non-selectable header, with a divider); options without a `group` render\n * ungrouped. Grouping follows the order of `options` (like native\n * `<optgroup>`) — the component does not re-sort. Keyboard navigation skips\n * the headers (they are not selectable options).\n */\n group?: string;\n}\n\n// selectType: 'default' — grey pill · 'filterSummary' — accent filter chip\n// (Prospector-style: grey until something is selected, then flips to accent).\nexport const DS_SELECT_TYPES = {\n DEFAULT: 'default',\n FILTER_SUMMARY: 'filterSummary',\n} as const;\nexport type DsSelectType = (typeof DS_SELECT_TYPES)[keyof typeof DS_SELECT_TYPES];\n\n// width — defaults to 'auto' (shrink-to-content, the historical behaviour, so\n// the feature stays non-breaking). Opt into a named step for a STABLE width that\n// no longer resizes with the selected label; 'full' fills the container (like\n// DsInput). Any number (→px) or CSS string (e.g. '18rem') works for a custom width.\nexport const DS_SELECT_WIDTHS = {\n AUTO: 'auto', // shrink to content — resizes with the selected label (default)\n SMALL: 'small', // 128px\n MEDIUM: 'medium', // 200px\n LARGE: 'large', // 280px\n FULL: 'full', // 100% of the container\n} as const;\nexport type DsSelectWidthName = (typeof DS_SELECT_WIDTHS)[keyof typeof DS_SELECT_WIDTHS];\n// The `width` prop accepts a named step above, or a custom width: a number\n// (rendered as px) or any CSS width string.\nexport type DsSelectWidth = DsSelectWidthName | number | string;\n\n// v-model shape — DECIDED (idiomatic Vue, NOT the DS \"value is always an\n// array\" convention):\n// multiple = false → string | number | null (scalar, like a native <select>)\n// multiple = true → (string | number)[] (array of selected values)\n// One generic type covers both; DsSelect.vue narrows it internally based on\n// the `multiple` prop instead of exposing two separate component variants.\nexport type DsSelectModelValue = string | number | (string | number)[] | null;\n","<template>\n <div\n ref=\"rootRef\"\n class=\"ds-select\"\n :class=\"[`ds-select--${selectType}`, widthClass, { 'is-open': open }]\"\n :style=\"rootStyle\"\n >\n <div\n class=\"ds-select__control\"\n :class=\"{ 'is-disabled': disabled, 'is-filter-selected': isFilterSelected }\"\n >\n <button\n ref=\"triggerRef\"\n type=\"button\"\n class=\"ds-select__trigger\"\n :disabled=\"disabled\"\n aria-haspopup=\"listbox\"\n :aria-expanded=\"open\"\n :aria-controls=\"open ? listboxId : undefined\"\n :aria-activedescendant=\"filterable ? undefined : activeOptionId\"\n @click=\"toggleOpen\"\n @keydown=\"onTriggerKeydown\"\n >\n <span class=\"ds-select__summary\" :title=\"summaryText\">{{ summaryText }}</span>\n </button>\n\n <button\n v-if=\"isFilter && hasSelection\"\n type=\"button\"\n class=\"ds-select__clear\"\n :disabled=\"disabled\"\n :aria-label=\"clearLabel || undefined\"\n @click=\"clearSelection\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">close</i>\n </button>\n <i v-else class=\"material-symbols-filled ds-select__chevron\" aria-hidden=\"true\"\n >keyboard_arrow_down</i\n >\n </div>\n\n <div v-if=\"open\" class=\"ds-select__popup\">\n <!-- Type-to-filter (opt-in via `filterable`). The search field is a SIBLING\n of the listbox, never a child: an <input> inside role=\"listbox\" is\n invalid ARIA. It carries the editable-combobox roles/state and owns\n aria-activedescendant while open (focus lives here, not on the trigger). -->\n <div v-if=\"filterable\" class=\"ds-select__search\">\n <i class=\"material-symbols-filled ds-select__search-icon\" aria-hidden=\"true\">search</i>\n <input\n ref=\"searchRef\"\n type=\"text\"\n class=\"ds-select__search-input\"\n role=\"combobox\"\n aria-expanded=\"true\"\n :aria-controls=\"listboxId\"\n :aria-activedescendant=\"activeOptionId\"\n aria-autocomplete=\"list\"\n autocomplete=\"off\"\n :aria-label=\"searchLabel\"\n :placeholder=\"searchPlaceholder\"\n :value=\"query\"\n @input=\"onSearchInput\"\n @keydown=\"onSearchKeydown\"\n />\n </div>\n\n <!-- @mousedown.prevent keeps focus on the trigger/search input when an\n option is clicked (see the option's @click.prevent for the other half). -->\n <ul\n :id=\"listboxId\"\n class=\"ds-select__listbox\"\n role=\"listbox\"\n :aria-multiselectable=\"multiple || undefined\"\n :aria-busy=\"loading || undefined\"\n @mousedown.prevent\n >\n <!-- Loading takes precedence over both options and the empty state\n (async fetch in flight). aria-busy on the listbox + a #loading slot\n for the app to override the default DsSpinner. -->\n <li v-if=\"loading\" class=\"ds-select__loading\" role=\"presentation\">\n <slot name=\"loading\"><DsSpinner size=\"small\" /></slot>\n </li>\n\n <template v-else>\n <!-- One <li> per run. A grouped run is a REAL ARIA group (role=\"group\"\n named by its header). An ungrouped run is a transparent\n role=\"presentation\" wrapper, so its options stay owned by the\n listbox. Options carry role=\"option\" regardless of nesting; the flat\n `it.index` keeps aria-activedescendant / keyboard nav intact. -->\n <li\n v-for=\"run in runs\"\n :key=\"run.key\"\n :role=\"run.kind === 'group' ? 'group' : 'presentation'\"\n :aria-labelledby=\"run.kind === 'group' ? run.headerId : undefined\"\n :class=\"run.kind === 'group' ? 'ds-select__group' : 'ds-select__run'\"\n >\n <span v-if=\"run.kind === 'group'\" :id=\"run.headerId\" class=\"ds-select__group-header\">{{\n run.label\n }}</span>\n\n <!-- @click.prevent is load-bearing: if a consumer wraps DsSelect in a\n <label> (common for form fields), the label's activation behaviour\n re-fires this click onto the labelable trigger <button>, toggling the\n dropdown (multi would close, single would re-open). Cancelling the\n option click's default suppresses that re-fire. -->\n <div\n v-for=\"it in run.items\"\n :id=\"optionId(it.index)\"\n :key=\"it.option.value\"\n class=\"ds-select__option\"\n :class=\"{\n 'is-selected': isSelected(it.option.value),\n 'is-active': it.index === activeIndex,\n 'ds-select__option--checkbox': showCheckbox,\n }\"\n role=\"option\"\n :aria-selected=\"isSelected(it.option.value)\"\n @click.prevent=\"selectOption(it.option.value)\"\n @mouseenter=\"activeIndex = it.index\"\n >\n <DsCheckbox\n v-if=\"showCheckbox\"\n class=\"ds-select__option-check\"\n :model-value=\"isSelected(it.option.value)\"\n disabled\n aria-hidden=\"true\"\n />\n <!-- #option scoped slot (opt-in): custom per-option content (avatar,\n image, arbitrary markup). Falls back to the icon/label\n key-mapping. The decorative checkbox glyph stays OUTSIDE the slot\n so showCheckbox keeps working with custom content. -->\n <slot\n name=\"option\"\n :option=\"it.option\"\n :selected=\"isSelected(it.option.value)\"\n :active=\"it.index === activeIndex\"\n >\n <i\n v-if=\"it.option.icon\"\n class=\"material-symbols-filled ds-select__option-icon\"\n :style=\"it.option.color ? { color: it.option.color } : undefined\"\n aria-hidden=\"true\"\n >{{ it.option.icon }}</i\n >\n <span class=\"ds-select__option-label\"\n >{{ it.option.label\n }}<span v-if=\"it.option.subLabel\" class=\"ds-select__option-sublabel\"\n >, {{ it.option.subLabel }}</span\n ></span\n >\n </slot>\n </div>\n </li>\n\n <!-- Empty state: no options, or a filtered list with no matches.\n role=presentation so keyboard nav / moveActive ignore it\n (moveActive already no-ops on len===0). -->\n <li v-if=\"visibleOptions.length === 0\" class=\"ds-select__empty\" role=\"presentation\">\n <slot name=\"empty\">{{ emptyText }}</slot>\n </li>\n </template>\n </ul>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n reactive,\n ref,\n useId,\n watch,\n type PropType,\n} from 'vue';\nimport { DsCheckbox } from '@shared/ui/DsCheckbox';\nimport { DsSpinner } from '@shared/ui/DsSpinner';\nimport { SEARCH } from '@shared/constants/events';\nimport {\n DS_SELECT_TYPES,\n DS_SELECT_WIDTHS,\n type DsSelectOption,\n type DsSelectType,\n type DsSelectWidth,\n type DsSelectModelValue,\n} from './DsSelect.types';\n\nconst props = defineProps({\n options: { type: Array as PropType<DsSelectOption[]>, required: true },\n placeholder: { type: String, default: 'Select an option' },\n multiple: Boolean,\n selectType: { type: String as PropType<DsSelectType>, default: DS_SELECT_TYPES.DEFAULT },\n showCheckbox: Boolean,\n // Named step ('small'|'medium'|'large'|'full'|'auto') for a STABLE width, or a\n // custom width (number → px, or any CSS string). Defaults to 'auto'\n // (shrink-to-content — the historical behaviour, kept so this stays a\n // non-breaking, opt-in feature); pass a fixed step for a width that doesn't\n // resize with the selected label. See DsSelect.types.ts `DS_SELECT_WIDTHS`.\n width: {\n type: [Number, String] as PropType<DsSelectWidth>,\n default: DS_SELECT_WIDTHS.AUTO,\n },\n disabled: Boolean,\n // Opt-in type-to-filter: renders a search input inside the open dropdown.\n // Off by default, so existing usages keep the plain select-only behaviour.\n filterable: Boolean,\n // Remote filtering: skip the built-in local filter and let the app own it by\n // replacing `options` in response to the `search` event. Prevents a double\n // filter (local re-filtering of already server-filtered results). No effect\n // unless `filterable` is also set.\n remote: Boolean,\n // Async loading state: while true the listbox shows a spinner + aria-busy\n // instead of options/empty. A #loading slot overrides the default DsSpinner.\n loading: Boolean,\n // Accessible name for the filter search input (a placeholder is not a reliable\n // accessible name). English default; the app owns i18n.\n searchLabel: { type: String, default: 'Filter options' },\n // Visible placeholder for the filter search input.\n searchPlaceholder: { type: String, default: 'Search' },\n // Accessible name for the filterSummary clear (×) control. The app can override\n // the wording (e.g. localized), but we default to a non-empty fallback so the\n // icon-only button is never left without an accessible name for screen readers.\n clearLabel: { type: String, default: 'Clear selection' },\n // Shown when the visible list is empty (no options, or a filtered list with no\n // matches). English default (the app owns i18n); a #empty slot overrides it.\n emptyText: { type: String, default: 'No options' },\n});\n\n// `search` carries the typed filter text. update:modelValue is declared\n// implicitly by defineModel below.\nconst emit = defineEmits([SEARCH]);\n\n// v-model — see DsSelect.types.ts `DsSelectModelValue` for the full rationale:\n// !multiple → scalar `string | number | null` (like a native <select>)\n// multiple → `(string | number)[]`\n// This is a deliberate departure from the DS source (which always hands back\n// an array via onChange, even for a single value) in favour of the idiomatic\n// Vue shape a consumer actually expects from v-model.\nconst model = defineModel<DsSelectModelValue>({ default: null });\n\n// useId() gives a per-instance, SSR-safe unique id. A plain `let uid = 0`\n// here would reset per instance (it runs inside setup), so every DsSelect\n// would collide on `ds-select-1-*` and produce duplicate listbox/option ids.\nconst instanceId = `ds-select-${useId()}`;\nconst listboxId = `${instanceId}-listbox`;\nconst optionId = (index: number) => `${instanceId}-option-${index}`;\n\nconst rootRef = ref<HTMLElement | null>(null);\nconst triggerRef = ref<HTMLElement | null>(null);\nconst searchRef = ref<HTMLInputElement | null>(null);\n\nconst open = ref(false);\nconst activeIndex = ref(-1);\nconst query = ref('');\n\nconst isFilter = computed(() => props.selectType === DS_SELECT_TYPES.FILTER_SUMMARY);\n\n// Local filtering runs only when filterable AND not remote. In remote mode the\n// app replaces `options` itself (via the `search` event), so filtering here\n// would double-filter its already-filtered results.\nconst localFilterActive = computed(() => props.filterable && !props.remote);\n\nconst filteredOptions = computed<DsSelectOption[]>(() => {\n if (!localFilterActive.value) return props.options;\n const q = query.value.trim().toLowerCase();\n if (!q) return props.options;\n return props.options.filter(\n (o) =>\n o.label.toLowerCase().includes(q) ||\n (o.subLabel ? o.subLabel.toLowerCase().includes(q) : false)\n );\n});\n\n// The list actually rendered and navigated. While loading, nothing is\n// navigable (the spinner replaces the rows), so keyboard nav / active-descendant\n// stay consistent with what's on screen.\nconst visibleOptions = computed<DsSelectOption[]>(() =>\n props.loading ? [] : filteredOptions.value\n);\n\n// Render is grouped into runs so grouped options are exposed as REAL ARIA groups\n// (role=\"group\" named by their header) — not just visually. Each option keeps its\n// flat index into `visibleOptions`, so keyboard nav / activeIndex / optionId /\n// aria-activedescendant are unchanged and headers are never navigable (they are\n// not in visibleOptions). Consecutive options sharing a `group` form one group\n// run; ungrouped options form a transparent \"plain\" run (its options stay owned\n// by the listbox, since role=\"presentation\" is transparent to assistive tech).\ntype OptionItem = { option: DsSelectOption; index: number };\ntype Run =\n | { kind: 'group'; label: string; headerId: string; key: string; items: OptionItem[] }\n | { kind: 'plain'; key: string; items: OptionItem[] };\n\nconst runs = computed<Run[]>(() => {\n const result: Run[] = [];\n visibleOptions.value.forEach((option, index) => {\n const g = option.group;\n const last = result[result.length - 1];\n if (g) {\n if (last?.kind === 'group' && last.label === g) last.items.push({ option, index });\n else\n result.push({\n kind: 'group',\n label: g,\n headerId: `${instanceId}-group-${index}`,\n key: `g-${index}`,\n items: [{ option, index }],\n });\n } else if (last?.kind === 'plain') {\n last.items.push({ option, index });\n } else {\n result.push({ kind: 'plain', key: `p-${index}`, items: [{ option, index }] });\n }\n });\n return result;\n});\n\nconst selectedValues = computed<(string | number)[]>(() => {\n if (props.multiple) return Array.isArray(model.value) ? model.value : [];\n return model.value !== null && model.value !== undefined ? [model.value as string | number] : [];\n});\nconst hasSelection = computed(() => selectedValues.value.length > 0);\nconst isFilterSelected = computed(() => isFilter.value && hasSelection.value);\n\nfunction isSelected(value: string | number) {\n return selectedValues.value.includes(value);\n}\n\n// Cache of last-known value → label, kept fresh from `options` (deep + immediate\n// so it tracks in-place label edits and push/splice on the same array, not only\n// array-reference swaps). It is ONLY a fallback: labelFor() reads the CURRENT\n// options first — so an in-place label change is reflected reactively — and uses\n// the cache only when the selected value is absent from the current options,\n// which is what `remote` filtering causes when it replaces `options` with a\n// subset. Without the fallback the trigger would degrade to the raw value\n// (e.g. \"ba\" instead of \"Buenos Aires\").\nconst labelCache = reactive(new Map<string | number, string>());\nwatch(\n () => props.options,\n (opts) => opts.forEach((o) => labelCache.set(o.value, o.label)),\n { immediate: true, deep: true }\n);\n\nfunction labelFor(value: string | number) {\n return (\n props.options.find((o) => o.value === value)?.label ?? labelCache.get(value) ?? String(value)\n );\n}\n\nconst summaryText = computed(() => {\n if (isFilter.value) {\n if (hasSelection.value) {\n return props.multiple\n ? `${props.placeholder} (${selectedValues.value.length})`\n : labelFor(selectedValues.value[0]);\n }\n return props.placeholder;\n }\n if (hasSelection.value) {\n return props.multiple\n ? selectedValues.value.map(labelFor).join(', ')\n : labelFor(selectedValues.value[0]);\n }\n return props.placeholder;\n});\n\n// A named width step is applied via a modifier class (so the fixed value comes\n// from the SCSS token); a custom width (number/other string) goes inline.\nconst NAMED_WIDTHS = Object.values(DS_SELECT_WIDTHS) as string[];\nconst widthClass = computed(() =>\n typeof props.width === 'string' && NAMED_WIDTHS.includes(props.width)\n ? `ds-select--w-${props.width}`\n : null\n);\nconst rootStyle = computed(() => {\n if (widthClass.value) return undefined; // handled by the modifier class\n return { width: typeof props.width === 'number' ? `${props.width}px` : props.width };\n});\n\nconst activeOptionId = computed(() =>\n open.value && activeIndex.value >= 0 ? optionId(activeIndex.value) : undefined\n);\n\nfunction findInitialActiveIndex(): number {\n if (visibleOptions.value.length === 0) return -1;\n const firstSelected = visibleOptions.value.findIndex((o) => isSelected(o.value));\n return firstSelected >= 0 ? firstSelected : 0;\n}\n\nfunction openDropdown() {\n if (props.disabled) return;\n open.value = true;\n activeIndex.value = findInitialActiveIndex();\n // Focus goes to the search input when filterable, so the user can type\n // immediately; aria-activedescendant then rides on the input, not the trigger.\n if (props.filterable) nextTick(() => searchRef.value?.focus());\n}\n\n// `refocusTrigger` is false for outside-click / Tab-away closes, where focus is\n// already moving elsewhere and shouldn't be yanked back to the trigger.\nfunction closeDropdown(refocusTrigger = true) {\n open.value = false;\n activeIndex.value = -1;\n // Reset the filter so reopening starts fresh. Assigned after open=false so the\n // visibleOptions watcher (guarded on open) doesn't reset activeIndex here.\n // Emit search('') on the reset too: in `remote` mode the parent owns `options`\n // and otherwise can't know the query was cleared, so it would keep serving the\n // last narrowed result set on reopen (empty input, stale list). Local mode\n // already recomputes the full list from the empty query — the emit is harmless\n // there. Guarded on a non-empty query so a plain open/close doesn't emit.\n if (query.value) {\n query.value = '';\n emit(SEARCH, '');\n }\n if (refocusTrigger) nextTick(() => triggerRef.value?.focus());\n}\n\nfunction toggleOpen() {\n if (props.disabled) return;\n if (open.value) closeDropdown();\n else openDropdown();\n}\n\nfunction selectOption(value: string | number) {\n if (props.disabled) return;\n if (props.multiple) {\n const current = selectedValues.value;\n model.value = current.includes(value)\n ? current.filter((v) => v !== value)\n : [...current, value];\n // Multi-select keeps the dropdown open so users can toggle several options.\n return;\n }\n // DS parity (Select.jsx toggleValue): single-select + showCheckbox lets\n // clicking the already-selected option deselect it.\n const alreadySelected = isSelected(value);\n model.value = alreadySelected && props.showCheckbox ? null : value;\n closeDropdown();\n}\n\nfunction clearSelection() {\n if (props.disabled) return;\n model.value = props.multiple ? [] : null;\n}\n\nfunction moveActive(delta: number) {\n const len = visibleOptions.value.length;\n if (len === 0) return;\n if (activeIndex.value < 0) {\n activeIndex.value = delta > 0 ? 0 : len - 1;\n } else {\n activeIndex.value = (activeIndex.value + delta + len) % len;\n }\n nextTick(() => {\n // Optional-chain the call itself, not just the element: scrollIntoView is\n // unreliable/absent in some DOM test environments (jsdom).\n document.getElementById(optionId(activeIndex.value))?.scrollIntoView?.({ block: 'nearest' });\n });\n}\n\nfunction onTriggerKeydown(event: KeyboardEvent) {\n if (props.disabled) return;\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n if (!open.value) openDropdown();\n else moveActive(1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n if (!open.value) openDropdown();\n else moveActive(-1);\n break;\n case 'Home':\n if (open.value) {\n event.preventDefault();\n activeIndex.value = 0;\n }\n break;\n case 'End':\n if (open.value) {\n event.preventDefault();\n activeIndex.value = visibleOptions.value.length - 1;\n }\n break;\n case 'Enter':\n case ' ':\n case 'Spacebar':\n event.preventDefault();\n if (!open.value) {\n openDropdown();\n } else if (activeIndex.value >= 0) {\n const option = visibleOptions.value[activeIndex.value];\n if (option) selectOption(option.value);\n }\n break;\n case 'Escape':\n if (open.value) {\n event.preventDefault();\n // Stop here so a DsModal (or anything else) listening for Escape on\n // `document` doesn't also close — the dropdown is the innermost layer.\n event.stopPropagation();\n closeDropdown();\n }\n break;\n case 'Tab':\n // Let the browser's default Tab handling move focus; just collapse the\n // popup without stealing focus back.\n if (open.value) closeDropdown(false);\n break;\n default:\n break;\n }\n}\n\n// Keydown on the search input. Only the navigation keys are intercepted; Space,\n// Home, End and printable characters fall through to the browser so text editing\n// (typing a space, jumping the caret) keeps working inside the input.\nfunction onSearchKeydown(event: KeyboardEvent) {\n if (props.disabled) return;\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n moveActive(1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n moveActive(-1);\n break;\n case 'Enter':\n event.preventDefault();\n if (activeIndex.value >= 0) {\n const option = visibleOptions.value[activeIndex.value];\n if (option) selectOption(option.value);\n }\n break;\n case 'Escape':\n event.preventDefault();\n event.stopPropagation();\n closeDropdown();\n break;\n case 'Tab':\n if (open.value) closeDropdown(false);\n break;\n default:\n break;\n }\n}\n\nfunction onSearchInput(event: Event) {\n query.value = (event.target as HTMLInputElement).value;\n // Always emit so a remote consumer can react; local filtering (when not\n // `remote`) happens reactively via `filteredOptions`.\n emit(SEARCH, query.value);\n}\n\n// Keep activeIndex valid whenever the rendered list changes underneath it —\n// local filtering as the user types, remote results arriving, or loading\n// toggling. Not triggered by opening (open is not a dependency of\n// visibleOptions), so it never fights findInitialActiveIndex.\nwatch(visibleOptions, (opts) => {\n if (!open.value) return;\n if (opts.length === 0) activeIndex.value = -1;\n else if (activeIndex.value < 0 || activeIndex.value >= opts.length) activeIndex.value = 0;\n});\n\nfunction onDocumentMousedown(event: MouseEvent) {\n if (rootRef.value && !rootRef.value.contains(event.target as Node)) {\n closeDropdown(false);\n }\n}\n\nwatch(open, (isOpen) => {\n if (typeof document === 'undefined') return;\n if (isOpen) document.addEventListener('mousedown', onDocumentMousedown);\n else document.removeEventListener('mousedown', onDocumentMousedown);\n});\n\nwatch(\n () => props.disabled,\n (isDisabled) => {\n if (isDisabled && open.value) closeDropdown(false);\n }\n);\n\nonBeforeUnmount(() => {\n if (typeof document === 'undefined') return;\n document.removeEventListener('mousedown', onDocumentMousedown);\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/shadow.scss' as sh;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/border.scss' as b;\n\n.ds-select {\n position: relative;\n display: inline-flex; // box width comes from the width step/value (default: auto)\n flex-direction: column;\n\n font-family: t.$font-family;\n\n // Width steps — a stable, fixed box width from the token scale so the control\n // does not resize to the selected label. 'auto' restores shrink-to-content;\n // 'full' fills the container. A custom number/CSS-string width is set inline.\n &--w-small {\n width: s.control-width('small');\n }\n &--w-medium {\n width: s.control-width('medium');\n }\n &--w-large {\n width: s.control-width('large');\n }\n &--w-full {\n width: 100%;\n }\n &--w-auto {\n width: auto;\n }\n\n &__control {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: s.spacing(1);\n\n box-sizing: border-box;\n width: 100%;\n height: s.control-height('medium'); // DS Select.jsx: height 32 (maxHeight 36)\n padding: 0 s.spacing(1.5);\n\n background-color: colors.$slate-bg; // DS --primary-background (grey pill, rest)\n border: 1px solid transparent; // reserved, so the focus border does not move the layout\n border-radius: r.$radius-control;\n\n transition:\n background-color m.$duration-default m.$easing,\n border-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:hover:not(.is-disabled) {\n background-color: colors.$slate-tint; // DS --primary-tint (hover)\n }\n\n &.is-disabled {\n opacity: 0.6; // DS Select.jsx: opacity disabled ? 0.6 : 1\n cursor: not-allowed;\n }\n\n // filterSummary flips grey → accent once something is selected (DS: bg is\n // accent-tint at rest, accent-bg on hover, only when isFilter && hasSelection).\n &.is-filter-selected {\n background-color: colors.$accent-tint;\n\n &:hover:not(.is-disabled) {\n background-color: colors.$accent-bg;\n }\n\n .ds-select__summary {\n color: colors.$accent-main;\n }\n }\n }\n\n &__control:focus-within,\n &.is-open &__control {\n border-color: b.$border-input-focus;\n }\n\n &__trigger {\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n min-width: 0;\n\n height: 100%;\n padding: 0;\n\n font-family: t.$font-family;\n text-align: left;\n\n background: transparent;\n border: 0;\n outline: none;\n\n cursor: pointer;\n\n &:disabled {\n cursor: not-allowed;\n }\n }\n\n &__summary {\n overflow: hidden;\n\n color: colors.$slate-main; // DS --primary-main\n font-weight: t.$weight-medium; // DS: fontWeight 500 (constant)\n font-size: t.font-size('body');\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n &__clear {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n padding: 0;\n\n color: colors.$accent-main;\n\n background: transparent;\n border: 0;\n\n cursor: pointer;\n\n .material-symbols-filled {\n font-size: i.icon-size(20); // DS: close icon fontSize 20\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n }\n\n &__chevron {\n flex: none;\n\n color: colors.$slate-main; // DS --primary-main\n font-size: i.icon-size(18); // DS: chevron fontSize 18\n line-height: 1;\n\n transition: transform m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n }\n\n &.is-open &__chevron {\n transform: rotate(180deg);\n }\n\n // Popup wrapper: holds the (optional) search field pinned above the scrolling\n // listbox. Owns the box chrome that used to live on the listbox itself.\n &__popup {\n position: absolute;\n top: calc(100% + #{s.spacing(0.5)});\n left: 0;\n z-index: 20; // above page content, below DsModal's 2001\n\n display: flex;\n flex-direction: column;\n min-width: 100%;\n overflow: hidden; // clip the listbox / search corners to the radius\n\n background-color: colors.$white;\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-control;\n box-shadow: sh.$shadow-dropdown;\n }\n\n &__search {\n display: flex;\n align-items: center;\n gap: s.spacing(1);\n\n padding: s.spacing(1) s.spacing(1.5);\n\n border-bottom: 1px solid colors.$slate-tint;\n }\n\n &__search-icon {\n flex: none;\n\n color: colors.$slate-soft;\n font-size: i.icon-size(18);\n line-height: 1;\n }\n\n &__search-input {\n flex: 1 1 auto;\n min-width: 0;\n\n padding: 0;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n background: transparent;\n border: 0;\n outline: none;\n\n &::placeholder {\n color: colors.$slate-soft;\n }\n }\n\n &__listbox {\n max-height: 260px; // DS Select.jsx: maxHeight 260\n margin: 0;\n padding: s.spacing(0.5) 0;\n overflow-y: auto;\n\n list-style: none;\n }\n\n &__option {\n display: flex;\n align-items: center;\n gap: s.spacing(1);\n\n padding: s.spacing(1) s.spacing(2);\n\n color: colors.$slate-main; // DS --primary-main\n font-size: t.font-size('body');\n white-space: nowrap;\n\n cursor: pointer;\n\n &:hover,\n &.is-active {\n background-color: colors.$slate-tint;\n }\n\n // Bold + accent text on selection, but only when there's no checkbox glyph\n // doing that job instead (DS SelectOption: `isSelected && !showCheckbox`).\n &.is-selected:not(.ds-select__option--checkbox) {\n color: colors.$accent-main;\n font-weight: t.$weight-bold;\n }\n\n // DsCheckbox's root inherits this scope's data-v-* attribute as a child\n // component root (standard Vue scoped-CSS behaviour), so a plain class\n // selector reaches it — but its own `.is-disabled { opacity: .5 }` rule has\n // the same specificity, making the winner order-dependent on CSS emission.\n // The extra ancestor here breaks the tie deterministically: `disabled`\n // keeps the decorative glyph's native input out of the tab order without\n // letting DsCheckbox's disabled-state opacity mute the selected/unselected look.\n .ds-select__option-check.is-disabled {\n opacity: 1;\n }\n }\n\n &__option-check {\n flex: none;\n pointer-events: none; // decorative only — the <li> owns click/keyboard selection\n }\n\n &__option-icon {\n flex: none;\n font-size: i.icon-size(20);\n }\n\n &__option-label {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n &__option-sublabel {\n color: colors.$slate-soft; // DS --primary-secondary-text\n }\n\n // Group run — a real ARIA group (role=\"group\"). The divider sits on the\n // container so it separates groups (and grouped from ungrouped rows); the very\n // first run never shows a stray line at the top of the popup.\n &__group {\n border-top: 1px solid colors.$slate-tint;\n\n &:first-child {\n border-top: none;\n }\n }\n\n // Group header — the non-selectable label naming the group (referenced by the\n // group's aria-labelledby).\n &__group-header {\n display: block;\n padding: s.spacing(1) s.spacing(2) s.spacing(0.5);\n\n color: colors.$slate-soft;\n font-size: t.font-size('caption');\n font-weight: t.$weight-medium;\n }\n\n // Loading row — centred spinner, distinct from the empty state. Not selectable.\n &__loading {\n display: flex;\n align-items: center;\n justify-content: center;\n\n padding: s.spacing(2);\n }\n\n // Empty state row — not selectable (role=presentation), muted like a sublabel.\n &__empty {\n padding: s.spacing(1) s.spacing(2);\n\n color: colors.$slate-soft;\n font-size: t.font-size('body');\n }\n}\n</style>\n","<template>\n <tr\n class=\"ds-row\"\n :class=\"{ 'is-selected': selected, 'is-clickable': clickable }\"\n :tabindex=\"clickable ? 0 : undefined\"\n @click=\"onClick\"\n @keydown=\"onKeydown\"\n >\n <slot />\n </tr>\n</template>\n\n<script setup lang=\"ts\">\nimport { CLICK } from '@shared/constants/events';\n\nconst props = defineProps({\n selected: { type: Boolean, default: false },\n clickable: { type: Boolean, default: false },\n});\n\nconst emit = defineEmits([CLICK]);\n\n// Only interactive rows emit — a plain row is not a click target.\nfunction onClick() {\n if (props.clickable) emit(CLICK);\n}\n\nfunction onKeydown(e: KeyboardEvent) {\n if (!props.clickable) return;\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n emit(CLICK);\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-row {\n background-color: colors.$white;\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &.is-clickable {\n cursor: pointer;\n }\n\n &:hover {\n background-color: colors.$slate-bg;\n }\n\n // Selected wins over hover.\n &.is-selected,\n &.is-selected:hover {\n background-color: colors.$accent-bg;\n }\n\n &.is-clickable:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: -2px;\n }\n\n // A pinned (sticky) DsCell paints its own opaque background so scrolling cells\n // don't show through — which means it can't inherit the row's hover/selected\n // colour. Mirror the row state onto it here (:deep reaches the slotted DsCell,\n // in its own scope). Selected already tracked by DsCell.is-selected; this adds\n // the hover state the cell can't observe on its own.\n &:hover :deep(.ds-cell.is-pinned) {\n background-color: colors.$slate-bg;\n }\n &.is-selected:hover :deep(.ds-cell.is-pinned) {\n background-color: colors.$accent-bg;\n }\n}\n</style>\n","<template>\n <td\n class=\"ds-cell\"\n :class=\"{\n 'is-accent': first && selected,\n 'is-truncated': truncate,\n 'is-selected': selected,\n 'is-pinned': !!pinned,\n [`is-pinned--${pinned}`]: !!pinned,\n }\"\n :style=\"cellStyle\"\n >\n <slot />\n </td>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport { DS_TABLE_PIN, type DsTablePin } from '../DsTable/DsTable.types';\n\nconst props = defineProps({\n first: { type: Boolean, default: false },\n selected: { type: Boolean, default: false },\n width: { type: [String, Number] as PropType<string | number | null>, default: null },\n // Opt-in single-line ellipsis. Default off preserves the 72px multi-line cell.\n truncate: { type: Boolean, default: false },\n // Pin to the left/right edge (position: sticky) for horizontal scroll.\n pinned: { type: String as PropType<DsTablePin | null>, default: null },\n // Cumulative offset from the pinned edge when stacking multiple pins per side\n // (number → px, or any CSS length). Defaults to 0 (single pin per side).\n pinnedOffset: {\n type: [String, Number] as PropType<string | number | null>,\n default: null,\n },\n});\n\nconst toLength = (v: string | number) => (typeof v === 'number' ? `${v}px` : v);\n\nconst cellStyle = computed(() => {\n const style: Record<string, string> = {};\n if (props.width != null) style.width = toLength(props.width);\n if (props.pinned) {\n style.position = 'sticky';\n const offset = props.pinnedOffset == null ? '0px' : toLength(props.pinnedOffset);\n style[props.pinned === DS_TABLE_PIN.LEFT ? 'left' : 'right'] = offset;\n }\n return Object.keys(style).length ? style : undefined;\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n\n.ds-cell {\n height: 72px; // DS DsTable.jsx DsCell\n padding: s.spacing(1); // 8\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n overflow: hidden;\n\n border-bottom: 1px solid colors.$slate-tint;\n\n // First cell of a selected row draws the 3px accent left rail (DS).\n &.is-accent {\n border-left: 3px solid colors.$accent-main; // DS DsTable.jsx: 3px rail\n }\n\n // Opt-in truncation: reuses the existing `overflow: hidden`. Default (off)\n // keeps the multi-line behavior the 72px cell height implies.\n &.is-truncated {\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n // Pinned (sticky) cell. position/left/right come from the inline style; here we\n // own the opaque background (so scrolling cells never bleed through) and the\n // stacking order — below the compound sticky header (z-index 10), above normal\n // body cells. The row background (white / accent when selected) is mirrored so\n // the frozen column matches its row; row-hover is handled from DsRow via :deep,\n // and the scroll-toggled edge shadow is driven by DsTable (also via :deep).\n &.is-pinned {\n z-index: 5;\n background-color: colors.$white;\n\n &.is-selected {\n background-color: colors.$accent-bg;\n }\n }\n}\n</style>\n","// DsCustomTag — the DS \"CustomTag\": static status chip (non-interactive).\n// Types mirror the DS source (DsCustomTag.jsx TYPES). `danger` maps to the\n// `error-*` token family and `accent` maps to the `info-*` token family —\n// both are intentional DS naming quirks, kept as-is (do not rename the prop\n// values to match the token family names).\n\nexport const DS_CUSTOM_TAG_TYPES = {\n SUCCESS: 'success',\n WARNING: 'warning',\n DANGER: 'danger', // maps to $error-* tokens, not $danger-*\n INFO: 'info',\n DRAFT: 'draft', // the only solid-fill variant\n ACCENT: 'accent', // maps to $info-* tokens, not $accent-*\n} as const;\nexport type DsCustomTagType = (typeof DS_CUSTOM_TAG_TYPES)[keyof typeof DS_CUSTOM_TAG_TYPES];\n","<template>\n <span class=\"ds-custom-tag\" :class=\"[`ds-custom-tag--${type}`, { 'is-round': round }]\">\n <slot />\n </span>\n</template>\n\n<script setup lang=\"ts\">\nimport { type PropType } from 'vue';\nimport { DS_CUSTOM_TAG_TYPES, type DsCustomTagType } from './DsCustomTag.types';\n\ndefineProps({\n type: {\n type: String as PropType<DsCustomTagType>,\n default: DS_CUSTOM_TAG_TYPES.INFO,\n },\n // Fully rounded (radius-full) sides vs the default radius-control.\n round: Boolean,\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n\n.ds-custom-tag {\n display: inline-flex;\n align-items: center;\n\n padding: 3px s.spacing(1); // 3px = literal, DS DsCustomTag.jsx\n\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('caption');\n line-height: 18px; // literal, DS DsCustomTag.jsx\n\n border: 1px solid;\n border-radius: r.$radius-control;\n\n white-space: nowrap;\n\n &.is-round {\n border-radius: r.$radius-full;\n }\n\n /* ---------- Types (tint bg + shadow text, except `draft` = solid fill) ---------- */\n &--success {\n color: colors.$success-shadow;\n border-color: colors.$success-shadow;\n background-color: colors.$success-tint;\n }\n &--warning {\n color: colors.$warning-shadow;\n border-color: colors.$warning-shadow;\n background-color: colors.$warning-tint;\n }\n &--danger {\n // DS prop value is `danger`, wired to the `error-*` token family (kept as-is).\n color: colors.$error-shadow;\n border-color: colors.$error-shadow;\n background-color: colors.$error-tint;\n }\n &--info {\n color: colors.$slate-soft;\n border-color: colors.$slate-soft;\n background-color: colors.$slate-tint;\n }\n &--draft {\n // The only solid-fill variant: white text on a solid slate-soft fill.\n color: colors.$white;\n border-color: colors.$slate-soft;\n background-color: colors.$slate-soft;\n }\n &--accent {\n // DS prop value is `accent`, wired to the `info-*` token family (kept as-is).\n color: colors.$info-shadow;\n border-color: colors.$info-shadow;\n background-color: colors.$info-tint;\n }\n}\n</style>\n","// DsPill — the DS \"Pill\": small solid capsule with white text, an optional\n// trailing icon button, and a free-form background color (dynamic tag/folder\n// colors, e.g. a CRM tag or folder swatch). Source: DS DsPill.jsx.\n\nexport const DS_PILL_TONES = {\n DEFAULT: 'default', // solid grey capsule, white text, no border\n INFO: 'info', // bordered: info tint background, info shadow border and text\n ERROR: 'error', // bordered: error tint background, error shadow border and text\n} as const;\nexport type DsPillTone = (typeof DS_PILL_TONES)[keyof typeof DS_PILL_TONES];\n\nexport interface DsPillProps {\n /** Visual tone; `info` and `error` add a 1px border and a tinted background. */\n tone?: DsPillTone;\n /** Material Symbols ligature name; when set, renders a trailing icon button. */\n icon?: string;\n /**\n * Free-form CSS color (e.g. a dynamic tag/folder color chosen by the user);\n * when empty, falls back to the tone background. When set, it wins over it.\n */\n background?: string;\n /** Accessible name for the trailing icon button (icon-only control). */\n iconLabel?: string;\n}\n","<template>\n <span\n class=\"ds-pill\"\n :class=\"[`ds-pill--${tone}`, { 'ds-pill--has-icon': icon }]\"\n :style=\"background ? { background } : undefined\"\n >\n <span class=\"ds-pill__text\"><slot /></span>\n\n <button\n v-if=\"icon\"\n type=\"button\"\n class=\"ds-pill__icon\"\n :aria-label=\"iconLabel || undefined\"\n @click=\"emit(CLICK)\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">{{ icon }}</i>\n </button>\n </span>\n</template>\n\n<script setup lang=\"ts\">\nimport { type PropType } from 'vue';\nimport { CLICK } from '@shared/constants/events';\nimport { DS_PILL_TONES, type DsPillTone } from './DsPill.types';\n\ndefineProps({\n // `default` is the solid grey capsule; `info` / `error` are bordered and tinted.\n tone: {\n type: String as PropType<DsPillTone>,\n default: DS_PILL_TONES.DEFAULT,\n validator: (value: string) => Object.values<string>(DS_PILL_TONES).includes(value),\n },\n // Material Symbols ligature name; when set, renders a trailing icon button.\n icon: {\n type: String,\n default: '',\n },\n // Free-form CSS color (e.g. a dynamic tag/folder color); when empty, falls\n // back to the tone background. When set, it wins over the tone background.\n background: {\n type: String,\n default: '',\n },\n // Accessible name for the trailing icon button (icon-only control).\n iconLabel: {\n type: String,\n default: '',\n },\n});\n\nconst emit = defineEmits([CLICK]);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/icons.scss' as i;\n\n.ds-pill {\n display: inline-flex;\n align-items: center;\n\n box-sizing: border-box; // the tone border stays inside the 20px\n height: 20px; // DS DsPill.jsx\n padding: 0 s.spacing(1);\n\n color: colors.$white;\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('caption');\n\n border-radius: r.$radius-pill;\n\n background: colors.$slate-soft;\n\n user-select: none;\n\n // Long tag/folder names truncate instead of stretching the pill. `min-width: 0`\n // is the flexbox gotcha — without it a flex child won't shrink below its content\n // size, so the ellipsis never triggers inside the inline-flex pill. The consumer\n // bounds the pill's width (own wrapper/style); the pill just degrades gracefully.\n &__text {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n // The trailing icon button eats into the right inset (DS DsPill.jsx).\n &--has-icon {\n padding: 0 2px 0 s.spacing(1); // 2px: DS DsPill.jsx trailing icon inset\n gap: 2px; // DS DsPill.jsx\n }\n\n /* ---------- Tones (default: solid grey, no border) ---------- */\n &--info {\n color: colors.$info-shadow;\n background: colors.$info-tint;\n border: 1px solid colors.$info-shadow;\n }\n &--error {\n color: colors.$error-shadow;\n background: colors.$error-tint;\n border: 1px solid colors.$error-shadow;\n }\n\n &__icon {\n display: inline-flex;\n align-items: center;\n\n padding: 0;\n\n color: inherit;\n\n background: none;\n border: 0;\n\n cursor: pointer;\n\n .material-symbols-filled {\n font-size: i.icon-size(14);\n }\n }\n}\n</style>\n","<template>\n <button type=\"button\" class=\"ds-pill-with-border\" @click=\"emit(CLICK)\">\n <span v-if=\"$slots.icon\" class=\"ds-pill-with-border__icon\"><slot name=\"icon\" /></span>\n <span class=\"ds-pill-with-border__label\"><slot /></span>\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { CLICK } from '@shared/constants/events';\n\n// No props: content is slot-driven (see DsPillWithBorder.types.ts).\nconst emit = defineEmits([CLICK]);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n\n.ds-pill-with-border {\n display: inline-flex;\n align-items: center;\n gap: s.spacing(1); // 8\n\n // Let a consumer-supplied width cap actually bound the chip (the table cell\n // passes a max-width via attr fallthrough on this single root button).\n max-width: 100%;\n\n // Reset default <button> appearance so it reads as the DS chip, not a native button.\n margin: 0;\n appearance: none;\n -webkit-appearance: none;\n\n padding: 6px 12px 6px 8px; // 6px literal (DS); 12px = s.spacing(1.5); 8px = s.spacing(1)\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n background: colors.$white;\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-full; // DS used a literal 100px; radius-full (9999px) rounds identically on this height-less box\n outline: none;\n\n cursor: pointer;\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n &__icon {\n display: inline-flex;\n }\n\n // Single-line by contract: a width-constrained pill truncates instead of\n // wrapping and breaking the radius-full shape. `min-width: 0` lets the flex\n // item shrink below its content size so the ellipsis can trigger.\n &__label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n</style>\n","<!--\n Root layout note (kept out of the template body: a root-level comment would\n make the SFC multi-root and break attribute fall-through):\n - No legend (default): the track IS the root, byte-for-byte the original\n render. Opting into a legend is purely additive — it never touches this path.\n - Legend on: the same unchanged track wrapped with a color↔name key beneath it.\n Either way, `inheritAttrs` is off and `$attrs` is re-applied to the track, so\n consumer attrs always land on the `role=\"img\"` element, not the wrapper.\n Segments are keyed on `name + index` (not a stable id) on purpose: they are a\n static data-viz snapshot, not a reorderable list, so position is the identity.\n-->\n<template>\n <div\n v-if=\"!hasLegend\"\n v-bind=\"$attrs\"\n class=\"ds-segmented-progress-bar\"\n role=\"img\"\n :aria-label=\"label || undefined\"\n :style=\"{ height: `${height}px` }\"\n >\n <div\n v-for=\"(seg, idx) in segments\"\n :key=\"`${seg.name ?? ''}-${idx}`\"\n class=\"ds-segmented-progress-bar__segment\"\n :style=\"{\n width: `${total > 0 ? (seg.amount * 100) / total : 0}%`,\n backgroundColor: seg.color,\n }\"\n :title=\"seg.name || undefined\"\n />\n </div>\n\n <div v-else class=\"ds-segmented-progress-bar-wrapper\">\n <div\n v-bind=\"$attrs\"\n class=\"ds-segmented-progress-bar\"\n role=\"img\"\n :aria-label=\"label || undefined\"\n :style=\"{ height: `${height}px` }\"\n >\n <div\n v-for=\"(seg, idx) in segments\"\n :key=\"`${seg.name ?? ''}-${idx}`\"\n class=\"ds-segmented-progress-bar__segment\"\n :style=\"{\n width: `${total > 0 ? (seg.amount * 100) / total : 0}%`,\n backgroundColor: seg.color,\n }\"\n :title=\"seg.name || undefined\"\n />\n </div>\n\n <!--\n The auto legend is a VISUAL key: it maps each swatch's color to its name.\n That mapping duplicates what the track's `aria-label` summary already\n conveys, so it is `aria-hidden` — the label stays the single authoritative\n a11y summary and a screen reader never hears the segment names twice\n (which would be the \"confusing duplicate semantics\" this follow-up warns\n against). A custom `#legend` slot owns its own semantics and is NOT forced\n hidden — the consumer decides whether their content is decorative.\n -->\n <slot name=\"legend\">\n <ul class=\"ds-segmented-progress-bar__legend\" aria-hidden=\"true\">\n <li\n v-for=\"(seg, idx) in legendSegments\"\n :key=\"`${seg.name}-${idx}`\"\n class=\"ds-segmented-progress-bar__legend-item\"\n >\n <span\n class=\"ds-segmented-progress-bar__legend-swatch\"\n :style=\"{ backgroundColor: seg.color }\"\n />\n <span class=\"ds-segmented-progress-bar__legend-label\">{{ seg.name }}</span>\n </li>\n </ul>\n </slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, useSlots, type PropType } from 'vue';\nimport type { DsProgressSegment } from './DsSegmentedProgressBar.types';\n\n// Consumer attrs (class, style, id, data-*, listeners, extra aria) must land on\n// the `role=\"img\"` track — the semantic element — and land there consistently\n// whether or not the legend wrapper exists. So we opt out of automatic\n// inheritance and re-apply `$attrs` onto the track in both branches.\ndefineOptions({ inheritAttrs: false });\n\nconst props = defineProps({\n segments: {\n type: Array as PropType<DsProgressSegment[]>,\n default: () => [],\n },\n total: { type: Number, default: 100 },\n height: { type: Number, default: 8 },\n // Accessible name for the whole track — the DS source has zero ARIA on this\n // element, so role=\"img\" + this label are the only a11y surface. Left empty\n // by default: omitted from the DOM until the consumer supplies a meaningful\n // summary (e.g. \"55% verified, 25% risky, 20% invalid\").\n label: { type: String, default: '' },\n // Opt-in: render a legend (color swatch + name) summarising every segment\n // below the track. Off by default so the render stays identical. A `#legend`\n // slot also opts in and replaces the auto legend with custom content.\n showLegend: { type: Boolean, default: false },\n});\n\nconst slots = useSlots();\n\n// Only named segments belong in a color↔name key — a nameless swatch has no\n// mapping to show. Consumers needing full control use the `#legend` slot.\nconst legendSegments = computed(() => props.segments.filter((seg) => !!seg.name));\n\n// The legend region appears when a custom `#legend` slot opts in, or when\n// `showLegend` is on AND there is at least one named segment to key. Guarding on\n// the count means \"showLegend with nothing to show\" degrades to the plain track\n// (no empty list, no dangling wrapper gap) rather than rendering an empty key.\nconst hasLegend = computed(\n () => !!slots.legend || (props.showLegend && legendSegments.value.length > 0)\n);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n\n.ds-segmented-progress-bar {\n display: flex;\n width: 100%;\n overflow: hidden;\n\n background: colors.$slate-tint;\n border-radius: r.$radius-card; // DS --radius-md\n\n &__segment {\n height: 100%;\n }\n\n // Wrapper only exists when a legend is rendered; the track keeps full width.\n &-wrapper {\n display: flex;\n flex-direction: column;\n gap: s.spacing(1); // 8px between the track and its legend\n }\n\n &__legend {\n display: flex;\n flex-wrap: wrap;\n gap: s.spacing(0.5) s.spacing(2); // 4px row · 16px column\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n &__legend-item {\n display: inline-flex;\n align-items: center;\n gap: s.spacing(0.5); // 4px between swatch and label\n }\n\n &__legend-swatch {\n flex-shrink: 0;\n width: s.spacing(1.5); // 12px square, echoing the caption cap-height\n height: s.spacing(1.5);\n border-radius: r.$radius-control; // DS --radius-sm — mirrors the bar's language\n }\n\n &__legend-label {\n font-family: t.$font-family;\n font-size: t.font-size('caption'); // 12px\n font-weight: t.$weight-regular;\n line-height: t.$line-height-tight;\n color: colors.$slate-soft;\n }\n}\n</style>\n","<template>\n <div class=\"ds-empty-state\" :class=\"{ 'is-rounded': roundedBorder }\">\n <div v-if=\"$slots['table-header']\" class=\"ds-empty-state__header\">\n <slot name=\"table-header\" />\n </div>\n\n <div class=\"ds-empty-state__body\">\n <img v-if=\"image\" :src=\"image\" alt=\"\" class=\"ds-empty-state__image\" />\n <p class=\"ds-empty-state__title\">{{ title }}</p>\n <p v-if=\"subtitle\" class=\"ds-empty-state__subtitle\">{{ subtitle }}</p>\n <slot name=\"button\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\ndefineProps({\n // Illustration URL; decorative (rendered with alt=\"\").\n image: { type: String, default: '' },\n title: { type: String, default: '' },\n subtitle: { type: String, default: '' },\n // DS `radius-card-lg` corners instead of the default square edge.\n roundedBorder: { type: Boolean, default: false },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n\n.ds-empty-state {\n display: flex;\n flex-direction: column;\n gap: s.spacing(4); // 32\n\n padding: s.spacing(3); // 24\n\n border: 1px solid colors.$slate-tint;\n border-radius: 0;\n\n &.is-rounded {\n border-radius: r.$radius-card-lg;\n }\n\n &__body {\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n gap: s.spacing(1);\n }\n\n &__image {\n max-height: 200px; // DS literal\n max-width: 100%;\n }\n\n &__title {\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('h1');\n color: colors.$slate-main;\n margin: 0;\n }\n\n &__subtitle {\n font-family: t.$font-family;\n font-size: t.font-size('body');\n line-height: t.$line-height-body;\n // NOTE: subtitle is NOT muted — DS uses primary-main, do not use slate-soft.\n color: colors.$slate-main;\n white-space: pre-line;\n margin: 0;\n\n // Cap the measure so long subtitles don't stretch edge-to-edge. `ch` is\n // relative to the font (not a hardcoded px), giving ~optimal reading width;\n // margin-inline: auto keeps it centered under the (centered) title.\n max-width: 46ch;\n margin-inline: auto;\n }\n}\n</style>\n","<template>\n <nav class=\"ds-paginator\" :aria-label=\"paginationLabel || undefined\">\n <span v-if=\"limitMessage\" class=\"ds-paginator__limit-message\">{{ limitMessage }}</span>\n\n <div class=\"ds-paginator__pager\">\n <DsButton\n variant=\"tertiary\"\n circle\n size=\"medium\"\n left-icon=\"chevron_left\"\n :aria-label=\"prevLabel || undefined\"\n :disabled=\"currentPage <= 1\"\n @click=\"goTo(currentPage - 1)\"\n />\n\n <template v-for=\"item in pages\" :key=\"item\">\n <!-- Sentinel entries ('…l' / '…r') are the only string items in `pages`;\n every real page is a number, so a typeof check both matches the DS\n ellipsis condition and lets vue-tsc narrow `item` to number below. -->\n <span v-if=\"typeof item === 'string'\" class=\"ds-paginator__ellipsis\" aria-hidden=\"true\"\n >…</span\n >\n <button\n v-else\n type=\"button\"\n class=\"ds-paginator__page\"\n :class=\"{ 'is-active': item === currentPage }\"\n :aria-current=\"item === currentPage ? 'page' : undefined\"\n @click=\"goTo(item)\"\n >\n {{ item }}\n </button>\n </template>\n\n <DsButton\n variant=\"tertiary\"\n circle\n size=\"medium\"\n left-icon=\"chevron_right\"\n :aria-label=\"nextLabel || undefined\"\n :disabled=\"currentPage >= pageCount\"\n @click=\"goTo(currentPage + 1)\"\n />\n </div>\n\n <select\n class=\"ds-paginator__page-size\"\n :aria-label=\"pageSizeLabel || undefined\"\n :value=\"pageSize\"\n @change=\"onSizeChange\"\n >\n <option v-for=\"s in pageSizes\" :key=\"s\" :value=\"s\">{{ s }}{{ pageSizeSuffix }}</option>\n </select>\n </nav>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport { DsButton } from '@shared/ui/DsButton';\nimport { PAGE_CHANGE, PAGE_SIZE_CHANGE } from '@shared/constants/events';\n\n// Left/right ellipsis sentinels for the page window (see `pages` below). Typed\n// as literals (`as const`) so `pages` is `(number | '…l' | '…r')[]`, not `string[]`.\nconst ELLIPSIS_LEFT = '…l' as const;\nconst ELLIPSIS_RIGHT = '…r' as const;\n\nconst props = defineProps({\n total: { type: Number, required: true },\n pageSize: { type: Number, default: 25 },\n currentPage: { type: Number, default: 1 },\n pageSizes: { type: Array as PropType<number[]>, default: () => [10, 25, 50, 100] },\n limitMessage: { type: String, default: '' },\n // Appended to each page-size option label (e.g. consumer passes \"/page\").\n pageSizeSuffix: { type: String, default: '' },\n // aria-labels for the icon-only chevron buttons — DS has none; empty unless\n // the consumer supplies one (see the a11y note on `.types.ts`).\n prevLabel: { type: String, default: '' },\n nextLabel: { type: String, default: '' },\n paginationLabel: { type: String, default: '' },\n pageSizeLabel: { type: String, default: '' },\n});\n\n// Runtime array (not the type-only form) — see DsButton's CLICK for the same\n// rationale: the SFC compiler can't resolve `typeof PAGE_CHANGE` to a literal,\n// so declaring these at runtime is what keeps them out of attrs fallthrough.\nconst emit = defineEmits([PAGE_CHANGE, PAGE_SIZE_CHANGE]);\n\nconst pageCount = computed(() => Math.max(1, Math.ceil(props.total / props.pageSize)));\n\n// Page-window algorithm (DS pagination pattern), replicated exactly:\n// ≤7 pages → show them all. Otherwise: always 1; a left ellipsis once\n// currentPage > 4; the pages currentPage-2..currentPage+2 (clamped to\n// [2, pageCount-1]); a right ellipsis while currentPage < pageCount-3;\n// always pageCount.\nconst pages = computed<(number | typeof ELLIPSIS_LEFT | typeof ELLIPSIS_RIGHT)[]>(() => {\n const count = pageCount.value;\n\n if (count <= 7) {\n return Array.from({ length: count }, (_, index) => index + 1);\n }\n\n const current = props.currentPage;\n const items: (number | typeof ELLIPSIS_LEFT | typeof ELLIPSIS_RIGHT)[] = [1];\n\n if (current > 4) items.push(ELLIPSIS_LEFT);\n\n const start = Math.max(2, current - 2);\n const end = Math.min(count - 1, current + 2);\n for (let page = start; page <= end; page++) {\n items.push(page);\n }\n\n if (current < count - 3) items.push(ELLIPSIS_RIGHT);\n\n items.push(count);\n\n return items;\n});\n\nfunction goTo(page: number) {\n if (page < 1 || page > pageCount.value) return;\n emit(PAGE_CHANGE, page);\n}\n\nfunction onSizeChange(event: Event) {\n // `HTMLSelectElement` isn't in this repo's eslint `no-undef` globals allowlist\n // (only `HTMLElement`/`HTMLInputElement` are — see eslint.config.mjs); narrow\n // via an inline `.value` shape instead of adding a new global for one cast.\n const target = event.target as HTMLElement & { value: string };\n emit(PAGE_SIZE_CHANGE, Number(target.value));\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n\n.ds-paginator {\n position: relative;\n display: flex;\n align-items: center;\n gap: s.spacing(2);\n\n font-family: t.$font-family;\n\n &__limit-message {\n color: colors.$slate-soft;\n font-size: t.font-size('body');\n }\n\n &__pager {\n display: flex;\n align-items: center;\n gap: 2px; // DS literal, sub-scale\n }\n\n &__page {\n min-width: s.control-height('medium'); // 32×32\n height: s.control-height('medium'); // 32×32\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n padding: 0;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n background: none;\n border: 0;\n border-radius: r.$radius-control;\n\n cursor: pointer;\n\n &:hover {\n color: colors.$accent-main;\n }\n\n &.is-active {\n color: colors.$accent-main;\n font-weight: t.$weight-bold;\n }\n }\n\n &__ellipsis {\n min-width: s.control-height('medium');\n text-align: center;\n color: colors.$slate-main;\n }\n\n &__page-size {\n height: s.control-height('medium');\n padding: 0 s.spacing(1);\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-control;\n }\n}\n</style>\n","<template>\n <button\n type=\"button\"\n class=\"ds-menu-item\"\n :class=\"{ 'is-active': active, 'is-collapsed': collapsed }\"\n :aria-current=\"active ? 'page' : undefined\"\n :title=\"text || undefined\"\n @click=\"handleClick\"\n >\n <i class=\"ds-menu-item__icon material-symbols-filled\" aria-hidden=\"true\">{{ icon }}</i>\n <span v-if=\"text || $slots.default\" class=\"ds-menu-item__label\">\n <slot>{{ text }}</slot>\n </span>\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { SELECT } from '@shared/constants/events';\n\ndefineProps({\n // Material Symbols ligature name (rendered via <i class=\"material-symbols-filled\">).\n icon: { type: String, required: true },\n // Row label; a default slot overrides it. Hidden (not removed) when collapsed.\n text: { type: String, default: '' },\n // Current row: white surface + tint border, aria-current=\"page\".\n active: Boolean,\n // Icon-only collapsed rail.\n collapsed: Boolean,\n});\n\n// The DS ships this as a <div onClick> with no keyboard/ARIA. We render a real\n// <button> (keyboard-reachable, focus ring) and emit the semantic SELECT — the\n// native @click still falls through for consumers that prefer it.\nconst emit = defineEmits([SELECT]);\n\nfunction handleClick(event: MouseEvent) {\n emit(SELECT, event);\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/icons.scss' as i;\n\n.ds-menu-item {\n display: flex;\n align-items: center;\n gap: s.spacing(1);\n width: 100%;\n min-height: 36px;\n padding: s.spacing(1);\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n line-height: 20px;\n text-align: left;\n\n border: 1px solid transparent;\n border-radius: r.$radius-control;\n background-color: transparent;\n\n cursor: pointer;\n user-select: none;\n\n transition:\n background-color m.$duration-default m.$easing,\n border-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n // active always wins over hover (DS: active bg stays white on hover).\n &:hover:not(.is-active) {\n background-color: colors.$slate-tint;\n }\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n &.is-active {\n border-color: colors.$slate-tint;\n background-color: colors.$white;\n }\n\n &__icon {\n flex: none;\n font-size: i.icon-size(20);\n line-height: 1;\n }\n\n &__label {\n overflow: hidden;\n max-width: 110px;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n // Collapsed rail: keep the label in the DOM for assistive tech, hide visually.\n &.is-collapsed .ds-menu-item__label {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n white-space: nowrap;\n }\n}\n</style>\n","// DsWizardStepper — numbered multi-step flow (step chips + next/final button).\n// 1:1 with the DS \"WizardStepper\" (components/navigation/DsWizardStepper.jsx).\n\nexport interface DsWizardStep {\n // Stable key for v-for; falls back to the 1-based index.\n key?: string | number;\n // Visible step label (consumer-owned text — the library never hardcodes copy).\n label: string;\n // Force the \"completed\" look regardless of position.\n completed?: boolean;\n // Visited but left unfinished → the red \"!\" chip.\n visited?: boolean;\n}\n\n// Derived per-step visual state (class: ds-wizard-step--<state>).\nexport const DS_WIZARD_STEP_STATES = {\n ACTIVE: 'active', // current step — accent-tint chip, filled marker\n COMPLETED: 'completed', // done — filled accent marker\n INCOMPLETE: 'incomplete', // visited but unfinished — red \"!\" chip\n NEUTRAL: 'neutral', // upcoming — outlined marker\n} as const;\nexport type DsWizardStepState = (typeof DS_WIZARD_STEP_STATES)[keyof typeof DS_WIZARD_STEP_STATES];\n","<template>\n <div class=\"ds-wizard-stepper\">\n <ol class=\"ds-wizard-stepper__steps\">\n <li v-for=\"step in resolvedSteps\" :key=\"step.key\" class=\"ds-wizard-stepper__item\">\n <component\n :is=\"clickable ? 'button' : 'div'\"\n :type=\"clickable ? 'button' : undefined\"\n class=\"ds-wizard-step\"\n :class=\"[`ds-wizard-step--${step.state}`, { 'is-clickable': clickable }]\"\n :aria-current=\"step.current ? 'step' : undefined\"\n @click=\"selectStep(step.index)\"\n >\n <span class=\"ds-wizard-step__marker\" aria-hidden=\"true\">{{ step.marker }}</span>\n <span class=\"ds-wizard-step__label\">{{ step.label }}</span>\n </component>\n </li>\n </ol>\n\n <!-- Acción: reusa DsButton (primary/large). Cada botón se gatea por su label:\n sin copy no hay CTA (evita un botón visible sin texto). Dos v-if\n independientes y mutuamente excluyentes (isLast) — no un v-else-if, que\n mostraría el botón final en un paso no-final cuando falta nextLabel. -->\n <DsButton\n v-if=\"!isLast && nextLabel\"\n variant=\"primary\"\n size=\"large\"\n right-icon=\"keyboard_arrow_right\"\n @click=\"next\"\n >\n {{ nextLabel }}\n </DsButton>\n <DsButton v-if=\"isLast && finalStepLabel\" variant=\"primary\" size=\"large\" @click=\"finish\">\n {{ finalStepLabel }}\n </DsButton>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport { DsButton } from '@shared/ui/DsButton';\nimport { STEP, FINAL_STEP } from '@shared/constants/events';\nimport {\n DS_WIZARD_STEP_STATES,\n type DsWizardStep,\n type DsWizardStepState,\n} from './DsWizardStepper.types';\n\nconst props = defineProps({\n steps: { type: Array as PropType<DsWizardStep[]>, default: () => [] },\n // Current step (1-based).\n value: { type: Number, default: 1 },\n // Button labels — consumer-owned copy (no hardcoded text in the library).\n nextLabel: { type: String, default: '' },\n finalStepLabel: { type: String, default: '' },\n // Whether the step chips are interactive (advance buttons are always active).\n clickable: { type: Boolean, default: true },\n});\n\nconst emit = defineEmits([STEP, FINAL_STEP]);\n\nconst isLast = computed(() => props.value === props.steps.length);\n\nconst resolvedSteps = computed(() =>\n props.steps.map((step, i) => {\n const index = i + 1;\n // La precedencia importa: un `visited` explícito (paso dejado sin terminar)\n // tiene que ganarle al default posicional de \"ya pasó\". Si no, un paso\n // visited DETRÁS del actual (index < value) se resolvería como completed y\n // nunca mostraría el \"!\" rojo. Orden: completed explícito → INCOMPLETE\n // (visited) → default posicional.\n let state: DsWizardStepState;\n if (index === props.value) state = DS_WIZARD_STEP_STATES.ACTIVE;\n else if (step.completed) state = DS_WIZARD_STEP_STATES.COMPLETED;\n else if (step.visited) state = DS_WIZARD_STEP_STATES.INCOMPLETE;\n else if (index < props.value) state = DS_WIZARD_STEP_STATES.COMPLETED;\n else state = DS_WIZARD_STEP_STATES.NEUTRAL;\n return {\n key: step.key ?? index,\n index,\n label: step.label,\n state,\n current: state === DS_WIZARD_STEP_STATES.ACTIVE,\n marker: state === DS_WIZARD_STEP_STATES.INCOMPLETE ? '!' : String(index),\n };\n })\n);\n\n// Chip clicks are gated by `clickable`; the advance/final buttons never are.\nfunction selectStep(index: number) {\n if (!props.clickable) return;\n emit(STEP, index);\n}\n\n// Clamp: never emit a step past the last one. In normal use the button is\n// hidden on the last step, but guard against a desynced value > steps.length.\nfunction next() {\n if (props.value < props.steps.length) emit(STEP, props.value + 1);\n}\n\nfunction finish() {\n emit(FINAL_STEP);\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-wizard-stepper {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: s.spacing(2);\n\n &__steps {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: s.spacing(2);\n }\n\n &__item {\n display: flex;\n }\n}\n\n.ds-wizard-step {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: s.spacing(1);\n\n height: s.control-height('large');\n padding: s.spacing(1) s.spacing(1.5);\n\n color: colors.$accent-main;\n font-family: t.$font-family;\n font-weight: t.$weight-bold;\n font-size: t.font-size('body');\n white-space: nowrap;\n\n border: none;\n border-radius: r.$radius-control;\n background-color: transparent;\n\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &__marker {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: none;\n\n width: 20px;\n height: 20px;\n\n color: colors.$accent-main;\n font-size: t.font-size('caption');\n font-weight: t.$weight-bold;\n line-height: 1;\n\n border: 2px solid colors.$accent-main;\n border-radius: r.$radius-full;\n background-color: transparent;\n }\n\n &__label {\n line-height: 1;\n }\n\n /* ---- States (DS WizardStep) ---- */\n &--active {\n background-color: colors.$accent-tint;\n }\n &--active .ds-wizard-step__marker,\n &--completed .ds-wizard-step__marker {\n color: colors.$white;\n border: none;\n background-color: colors.$accent-main;\n }\n &--incomplete {\n color: colors.$error-main;\n }\n &--incomplete .ds-wizard-step__marker {\n color: colors.$error-main;\n border-color: colors.$error-main;\n }\n\n /* ---- Interactive affordance: hover + focus only when clickable ---- */\n &.is-clickable {\n cursor: pointer;\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n &.ds-wizard-step--neutral:hover,\n &.ds-wizard-step--completed:hover {\n background-color: colors.$accent-bg;\n }\n &.ds-wizard-step--incomplete:hover {\n background-color: colors.$error-mid;\n }\n // active keeps its accent-tint on hover (no override) — mirrors the DS.\n }\n}\n</style>\n","// DsDrawer — side panel over a backdrop, built NATIVE (no element-plus).\n// SALESQL-3968: the Vue 2 twin (@salesql/sql_components, for `front` and\n// `extension-lite`) must be able to replicate this API and markup 1:1, and\n// Element Plus is Vue 3 only — so wrapping `el-drawer` was ruled out.\n//\n// What the native build has to carry on its own (all of it lived in el-drawer):\n// overlay + teleport to body, Escape, body scroll lock, enter/leave transition,\n// focus trap + focus restoration, cancelable before-close, and the resize\n// dragger clamped DURING the drag (Element Plus only clamped to the viewport,\n// which is why frontend-app had to express the bounds in CSS).\n//\n// The component clamps and emits; persisting the width belongs to the consumer.\n\n/** Side the panel opens from. `rtl` = anchored right (the full-profile default). */\nexport const DS_DRAWER_DIRECTIONS = {\n /** Right-to-left: panel pinned to the right edge, ring on its left border. */\n RTL: 'rtl',\n /** Left-to-right: panel pinned to the left edge, ring on its right border. */\n LTR: 'ltr',\n} as const;\nexport type DsDrawerDirection = (typeof DS_DRAWER_DIRECTIONS)[keyof typeof DS_DRAWER_DIRECTIONS];\n\n/**\n * Cancelable close guard. Return `false` (or a promise resolving to `false`) to\n * keep the drawer open; anything else lets the `close` event through. It gates\n * every close path: Escape, overlay click and the header × button.\n */\nexport type DsDrawerBeforeClose = () => boolean | void | Promise<boolean | void>;\n\nexport interface DsDrawerProps {\n open?: boolean;\n title?: string;\n showClose?: boolean;\n closeLabel?: string;\n direction?: DsDrawerDirection;\n /** Panel width in px. Default 440 — the frozen contract's value (SALESQL-3548). */\n width?: number;\n /** Enable the edge dragger. */\n resizable?: boolean;\n /** Lower bound for the drag, in px. Enforced DURING the drag. */\n minWidth?: number;\n /** Upper bound for the drag, in px. Enforced DURING the drag. */\n maxWidth?: number;\n closeOnOverlay?: boolean;\n closeOnEscape?: boolean;\n beforeClose?: DsDrawerBeforeClose | null;\n /** false = render in-flow (no portal / backdrop / scroll-lock) for specimen cards. */\n fixed?: boolean;\n}\n","<template>\n <Teleport to=\"body\" :disabled=\"!fixed\">\n <Transition :name=\"`ds-drawer-${direction}`\">\n <div\n v-if=\"open\"\n class=\"ds-drawer\"\n :class=\"[`ds-drawer--${direction}`, { 'is-fixed': fixed, 'is-resizing': resizing }]\"\n @click.self=\"onOverlay\"\n >\n <aside\n ref=\"panelRef\"\n class=\"ds-drawer__panel\"\n role=\"dialog\"\n :aria-modal=\"fixed ? 'true' : 'false'\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"labelledBy ? undefined : 'drawer'\"\n tabindex=\"-1\"\n :style=\"panelStyle\"\n >\n <!-- Dragger first in the DOM so it paints on the opening edge without a\n stacking hack; it is aria-hidden because resizing is pointer-only\n affordance, not a control a screen reader should land on. -->\n <div\n v-if=\"resizable\"\n class=\"ds-drawer__dragger\"\n aria-hidden=\"true\"\n @pointerdown.stop.prevent=\"onDragStart\"\n />\n\n <header\n v-if=\"title || showClose || $slots.header || $slots.actions\"\n class=\"ds-drawer__header\"\n >\n <slot name=\"header\">\n <h4 :id=\"titleId\" class=\"ds-drawer__title\">{{ title }}</h4>\n </slot>\n\n <!-- Trailing control cluster: consumer actions (share, open-in-new…) sit to\n the LEFT of the close, in a softer grey — per the DS drawer header. -->\n <div v-if=\"showClose || $slots.actions\" class=\"ds-drawer__controls\">\n <div v-if=\"$slots.actions\" class=\"ds-drawer__actions\"><slot name=\"actions\" /></div>\n\n <button\n v-if=\"showClose\"\n type=\"button\"\n class=\"ds-drawer__close\"\n :aria-label=\"closeLabel || undefined\"\n @click=\"requestClose\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">close</i>\n </button>\n </div>\n </header>\n\n <div class=\"ds-drawer__body\"><slot /></div>\n\n <footer v-if=\"$slots.footer\" class=\"ds-drawer__footer\"><slot name=\"footer\" /></footer>\n </aside>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n ref,\n useId,\n useSlots,\n watch,\n type PropType,\n} from 'vue';\nimport { CLOSE, RESIZE, RESIZE_END, RESIZE_START } from '@shared/constants/events';\nimport {\n DS_DRAWER_DIRECTIONS,\n type DsDrawerBeforeClose,\n type DsDrawerDirection,\n} from './DsDrawer.types';\n\nconst props = defineProps({\n open: Boolean,\n title: { type: String, default: '' },\n showClose: { type: Boolean, default: true },\n // Accessible name for the icon-only close button; English default (app owns i18n),\n // matching DsModal so the control is never unnamed.\n closeLabel: { type: String, default: 'Close' },\n direction: {\n type: String as PropType<DsDrawerDirection>,\n default: DS_DRAWER_DIRECTIONS.RTL,\n },\n // Width in px (a number, not a CSS length): the drag math and the min/max bounds\n // are numeric, and the consumer's stored width is a number too.\n width: { type: Number, default: 440 },\n resizable: Boolean,\n minWidth: { type: Number, default: 360 },\n maxWidth: { type: Number, default: 720 },\n closeOnOverlay: { type: Boolean, default: true },\n closeOnEscape: { type: Boolean, default: true },\n // Cancelable close guard: return false to keep the drawer open. Gates Escape,\n // the overlay click and the × button alike.\n beforeClose: { type: Function as PropType<DsDrawerBeforeClose>, default: null },\n // false = render in-flow (no portal / backdrop / scroll-lock) for specimen cards.\n fixed: { type: Boolean, default: true },\n});\n\nconst emit = defineEmits([CLOSE, RESIZE_START, RESIZE, RESIZE_END]);\n\nconst panelRef = ref<HTMLElement | null>(null);\nlet lastFocused: HTMLElement | null = null;\n\n// SSR-safe id so the dialog is labelled by its visible title instead of duplicating it.\n// A custom #header slot replaces that title element, so the id no longer resolves —\n// fall back to the generic aria-label rather than pointing at a missing node.\nconst slots = useSlots();\nconst titleId = useId();\nconst labelledBy = computed(() => (props.title && !slots.header ? titleId : undefined));\n\nconst clamp = (value: number) =>\n Math.min(Math.max(value, props.minWidth), Math.max(props.minWidth, props.maxWidth));\n\n// Live width while dragging. Seeded from the prop and re-seeded whenever the consumer\n// pushes a new one, so a consumer that does NOT write the emitted width back still gets\n// a working drag (and one that does stays in sync).\nconst currentWidth = ref(clamp(props.width));\nwatch(\n () => [props.width, props.minWidth, props.maxWidth] as const,\n () => {\n if (!resizing.value) currentWidth.value = clamp(props.width);\n }\n);\n\nconst panelStyle = computed(() => ({ width: `${currentWidth.value}px` }));\n\n// -- Close -------------------------------------------------------------------\n// Every close path funnels through here so `beforeClose` can veto all of them.\n// Async-aware: a promise resolving to false cancels too.\nasync function requestClose() {\n if (props.beforeClose) {\n const verdict = await props.beforeClose();\n if (verdict === false) return;\n }\n emit(CLOSE);\n}\n\n// A resize drag that is released outside the panel makes the browser fire a `click`\n// on the nearest common ancestor of the pointerdown and pointerup targets — which is the\n// overlay. Without this guard, dragging past a bound (the pointer necessarily ends up\n// over the overlay) would CLOSE the drawer. jsdom never synthesises that click, so it\n// only shows up in a real browser.\nlet swallowOverlayClick = false;\n\nfunction onOverlay() {\n if (swallowOverlayClick) {\n swallowOverlayClick = false;\n return;\n }\n if (props.fixed && props.closeOnOverlay) void requestClose();\n}\n\n// -- Resize ------------------------------------------------------------------\n// Pointer events, so the dragger works with a mouse, a pen AND touch — `el-drawer` was\n// mouse-only, which made the panel un-resizable on a touch screen. `touch-action: none`\n// on the dragger (see the style block) is what stops the browser turning the drag into a\n// scroll gesture before the handler ever sees it.\nconst resizing = ref(false);\nlet startX = 0;\nlet startWidth = 0;\n\nfunction widthFromEvent(e: PointerEvent) {\n const delta = e.clientX - startX;\n // Panel pinned right (rtl): dragging LEFT (negative delta) makes it wider.\n const raw =\n props.direction === DS_DRAWER_DIRECTIONS.RTL ? startWidth - delta : startWidth + delta;\n // Clamped HERE, on every move — not on release. Pushing past a bound simply pins\n // the panel to it, and it comes back on its own as soon as the pointer returns.\n return clamp(raw);\n}\n\nfunction onDragStart(e: PointerEvent) {\n if (!props.resizable) return;\n resizing.value = true;\n startX = e.clientX;\n startWidth = currentWidth.value;\n document.addEventListener('pointermove', onDragMove);\n document.addEventListener('pointerup', onDragEnd);\n // A cancelled pointer (the OS takes over, the finger leaves the digitiser) fires no\n // pointerup, so without this the drag would stay armed for ever.\n document.addEventListener('pointercancel', onDragEnd);\n emit(RESIZE_START, currentWidth.value);\n}\n\nfunction onDragMove(e: PointerEvent) {\n if (!resizing.value) return;\n currentWidth.value = widthFromEvent(e);\n emit(RESIZE, currentWidth.value);\n}\n\nfunction onDragEnd() {\n if (!resizing.value) return;\n stopDragListening();\n resizing.value = false;\n // Arm the guard for the click this pointerup is about to produce, and disarm it on the\n // next task — a drag released INSIDE the panel produces no overlay click, and the flag\n // must not survive to swallow the user's next genuine overlay click.\n swallowOverlayClick = true;\n setTimeout(() => (swallowOverlayClick = false), 0);\n emit(RESIZE_END, currentWidth.value);\n}\n\nfunction stopDragListening() {\n document.removeEventListener('pointermove', onDragMove);\n document.removeEventListener('pointerup', onDragEnd);\n document.removeEventListener('pointercancel', onDragEnd);\n}\n\n// -- Focus trap / scroll lock / Escape ---------------------------------------\nfunction focusables(): HTMLElement[] {\n if (!panelRef.value) return [];\n const sel =\n 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n // Filtered on ATTRIBUTES, not on `offsetParent`. offsetParent is null for a\n // position:fixed element and for anything jsdom renders, so an offsetParent\n // filter silently empties this list — which collapses the trap into its\n // \"nothing focusable\" branch and makes the whole thing unverifiable. The trap\n // is the accessibility guarantee this component exists to keep (SALESQL-3968),\n // so it is filtered in a way that is both correct in a browser and testable.\n return Array.from(panelRef.value.querySelectorAll<HTMLElement>(sel)).filter(\n (el) => !el.closest('[hidden]') && el.getAttribute('aria-hidden') !== 'true'\n );\n}\n\nfunction onKeydown(e: KeyboardEvent) {\n if (e.key === 'Escape') {\n if (props.closeOnEscape) void requestClose();\n return;\n }\n if (e.key !== 'Tab') return;\n const f = focusables();\n // Nothing focusable inside: keep focus parked on the panel rather than letting Tab\n // escape to the page behind the overlay.\n if (f.length === 0) {\n e.preventDefault();\n panelRef.value?.focus();\n return;\n }\n const first = f[0];\n const last = f[f.length - 1];\n if (e.shiftKey && document.activeElement === first) {\n e.preventDefault();\n last.focus();\n } else if (!e.shiftKey && document.activeElement === last) {\n e.preventDefault();\n first.focus();\n }\n}\n\n// Portal effects apply only while the drawer is open AND fixed. Watching the combined\n// condition means flipping EITHER off tears them down — no dangling listener, no body\n// left scroll-locked, no orphan overlay after opening twice.\nfunction activate() {\n lastFocused = document.activeElement as HTMLElement;\n document.addEventListener('keydown', onKeydown);\n document.body.style.overflow = 'hidden';\n nextTick(() => (focusables()[0] ?? panelRef.value)?.focus());\n}\n\nfunction deactivate(restoreFocus = true) {\n document.removeEventListener('keydown', onKeydown);\n document.body.style.overflow = '';\n if (restoreFocus) lastFocused?.focus?.();\n}\n\nwatch(\n () => props.open && props.fixed,\n (active, wasActive) => {\n if (typeof document === 'undefined') return;\n if (active) activate();\n else if (wasActive) deactivate();\n },\n { immediate: true }\n);\n\nonBeforeUnmount(() => {\n if (typeof document === 'undefined') return;\n stopDragListening();\n deactivate(false);\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/radius.scss' as r;\n\n.ds-drawer {\n // In-flow (fixed=false): the wrapper collapses so the panel joins the parent flow.\n display: contents;\n\n // Portal (fixed=true): full-screen backdrop with the panel pinned to one edge.\n &.is-fixed {\n position: fixed;\n inset: 0;\n z-index: 2001; // same layer as DsModal\n\n display: flex;\n\n background: colors.$backdrop; // grey-10 @ 50%, no blur\n }\n\n &--rtl.is-fixed {\n justify-content: flex-end;\n }\n &--ltr.is-fixed {\n justify-content: flex-start;\n }\n\n // While dragging, kill text selection and pointer hit-testing inside the panel so\n // the drag never turns into a text selection or a stray hover.\n &.is-resizing {\n user-select: none;\n cursor: col-resize;\n }\n\n &__panel {\n position: relative;\n\n display: flex;\n flex-direction: column;\n\n max-width: 100%;\n height: 100%;\n\n // The PANEL is the grey surface (DS: `background: C.bg`), and the chrome bars paint\n // white on top of it. The body paints nothing at all, so it simply shows this\n // through — which is why the drawer needs no inner wrapper and no background prop:\n // the DS answers it structurally, and a colour prop would be a style escape hatch\n // the DS never defines.\n background: colors.$slate-bg;\n\n outline: none;\n }\n\n // The 1px grey ring on the OPENING edge. Grey, never the accent — Element Plus\n // painted this chrome with --el-color-primary and that is the bug inherited fixed.\n &--rtl &__panel {\n border-left: 1px solid colors.$slate-tint;\n }\n &--ltr &__panel {\n border-right: 1px solid colors.$slate-tint;\n }\n\n // -- Dragger ---------------------------------------------------------------\n // A wide invisible hit area with a 1px visual rule revealed on hover, so the grab\n // target is comfortable without a permanent 8px stripe in the chrome.\n &__dragger {\n position: absolute;\n top: 0;\n z-index: 1;\n\n width: s.spacing(1);\n height: 100%;\n\n cursor: col-resize;\n // Without this the browser claims the touch gesture as a scroll/pan and fires\n // `pointercancel` before the drag can start — the handler would never see a move.\n touch-action: none;\n\n &::before {\n position: absolute;\n top: 0;\n left: 50%;\n\n width: 1px;\n height: 100%;\n\n background-color: transparent;\n\n transition: background-color m.$duration-default m.$easing;\n\n content: '';\n\n @include m.reduce-motion {\n transition: none;\n }\n }\n\n // Grey on hover AND while dragging. No accent in any state.\n &:hover::before {\n background-color: colors.$slate-mid;\n }\n }\n\n &--rtl &__dragger {\n left: 0;\n }\n &--ltr &__dragger {\n right: 0;\n }\n\n &.is-resizing &__dragger::before {\n background-color: colors.$slate-mid;\n }\n\n // -- Chrome ----------------------------------------------------------------\n // Header per the DS drawer (Full Profile): 48px tall, title LEFT-aligned at body size\n // and bold, truncating with an ellipsis, with the control cluster at the trailing edge.\n //\n // This deliberately does NOT match frontend-app's `el-drawer.scss` override, which had\n // drifted from the DS on five counts (50px, centred, 16px, 24px inset, $slate-shadow).\n // DESIGN-SYSTEM.md makes the DS the only style authority and forbids taking values from\n // a consuming app — so the override loses. The full profile will therefore look\n // different once SALESQL-3536 adopts this; that is the intended outcome, not a\n // regression.\n //\n // Residual deltas, reconciled onto the 8px grid rather than copied off-grid: the DS's\n // `0 14px 0 16px` inset becomes a symmetric 16px, and its 10px gap becomes 12px.\n &__header {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: s.spacing(1.5);\n\n height: s.control-height('xlarge'); // DS: 48\n padding: 0 s.spacing(2);\n\n color: colors.$slate-main; // DS: C.slate #414C58\n font-family: t.$font-family;\n font-size: t.font-size('body'); // DS: 14\n font-weight: t.$weight-bold; // DS: 700\n\n background: colors.$white; // painted ON the grey panel (DS: `background: C.white`)\n border-bottom: 1px solid colors.$slate-tint;\n }\n\n &__title {\n // Takes the free space so the controls land at the trailing edge; `min-width: 0` is\n // what actually lets a long name ellipsis instead of pushing them out of the header.\n flex: 1;\n min-width: 0;\n margin: 0;\n\n overflow: hidden;\n\n font: inherit;\n white-space: nowrap;\n text-overflow: ellipsis;\n cursor: default;\n }\n\n // Trailing cluster. In flow (not absolute): the title takes the free space, so the\n // controls sit at the end on their own and any number of actions fits.\n &__controls {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: s.spacing(1.5); // DS header gap: 10 reconciles to the 12px grid step\n }\n\n // Consumer actions (share, open-in-new…). Softer than the close on purpose — the DS\n // draws them in the secondary-text grey while the close stays body-text slate.\n // Note: the DS bundle still carries #888f97 for that grey; the library deliberately\n // moved to the WCAG-AA value in SALESQL-3394, so the TOKEN wins over the export.\n &__actions {\n display: flex;\n align-items: center;\n gap: s.spacing(1.5);\n\n // `color` reaches the slotted icons on its own (it inherits); `font-size` does not —\n // a scoped descendant selector never matches slot content, so the glyph size needs\n // :deep() or it silently falls back to whatever the Material Symbols font sets.\n color: colors.$slate-soft;\n\n :deep(.material-symbols-filled) {\n font-size: i.icon-size(18); // DS: open_in_new at 18, one step under the close\n }\n }\n\n // A bare icon, NOT a filled/circle button: the DS header draws the close as a plain\n // glyph with `cursor: pointer` and no hover surface. It stays a real <button> (never\n // the DS's <span onClick>) so it is keyboard-reachable and has an accessible name —\n // hence the focus-visible ring, which is a focus affordance, not a hover one.\n &__close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n padding: 0;\n\n color: colors.$slate-main;\n\n background: none;\n border: 0;\n\n cursor: pointer;\n\n .material-symbols-filled {\n font-size: i.icon-size(20); // DS: close at 20\n }\n\n &:focus-visible {\n outline: 2px solid colors.$accent-main;\n outline-offset: 2px;\n border-radius: r.$radius-control;\n }\n }\n\n // No `background`: the body deliberately shows the panel's grey through, exactly as\n // the DS does. The 16px inset is the DS value too — the previous 20px came from the\n // same `el-drawer.scss` override that had drifted on the header.\n &__body {\n flex: 1 1 auto;\n\n padding: s.spacing(2); // DS: 16\n overflow: auto;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n }\n\n // White like the header: both are chrome bars fenced off the scrolling body by a\n // hairline. The DS full profile has no footer, so this is the one inferred value here.\n &__footer {\n display: flex;\n flex: 0 0 auto;\n justify-content: flex-end;\n gap: s.spacing(1);\n\n padding: s.spacing(1) s.spacing(1.5);\n\n background: colors.$white;\n border-top: 1px solid colors.$slate-tint;\n }\n}\n\n/* Enter/leave: backdrop fades, panel slides in from its own edge (0.3s dialog duration). */\n.ds-drawer-rtl-enter-active,\n.ds-drawer-rtl-leave-active,\n.ds-drawer-ltr-enter-active,\n.ds-drawer-ltr-leave-active {\n transition: opacity m.$duration-dialog m.$easing;\n\n .ds-drawer__panel {\n transition: transform m.$duration-dialog m.$easing;\n }\n\n @include m.reduce-motion {\n transition: none;\n\n .ds-drawer__panel {\n transition: none;\n }\n }\n}\n\n.ds-drawer-rtl-enter-from,\n.ds-drawer-rtl-leave-to,\n.ds-drawer-ltr-enter-from,\n.ds-drawer-ltr-leave-to {\n opacity: 0;\n}\n\n.ds-drawer-rtl-enter-from .ds-drawer__panel,\n.ds-drawer-rtl-leave-to .ds-drawer__panel {\n transform: translateX(100%);\n}\n\n.ds-drawer-ltr-enter-from .ds-drawer__panel,\n.ds-drawer-ltr-leave-to .ds-drawer__panel {\n transform: translateX(-100%);\n}\n</style>\n","// DsPopover — click-triggered card panel anchored to a trigger, built NATIVE.\n// SALESQL-3968: replaces frontend-app's `el-popper` override (the company card),\n// which added a 1px grey ring and 8px of padding on top of Element Plus. Native\n// for the same reason as DsDrawer: Element Plus is Vue 3 only and the Vue 2 twin\n// has to replicate this API and markup.\n//\n// Positioning is pure CSS — zero dependencies, no floating-ui.\n\n/**\n * Where the panel PREFERS to open, as `side` or `side-alignment`.\n *\n * The bare side centres the panel on the trigger; `-start` / `-end` align it to the\n * trigger's leading / trailing edge on the cross axis (left/right for a top or bottom\n * side, top/bottom for a left or right one).\n *\n * The aligned forms are not decoration: the DS company card is\n * `{ position: absolute, top: 'calc(100% + 6px)', left: 0 }`\n * (`prospector/ProspectorRedesignApp.jsx`, `CompanyCell`) — i.e. `bottom-start`.\n * Centring it would move the card off its trigger's edge.\n *\n * PREFERRED, not final (SALESQL-4056): `useViewportClamp`'s FLIP re-evaluates it live\n * (on open, scroll and resize) against the trigger's rect and the panel's own size, and\n * opens on the OPPOSITE side instead when the preferred one doesn't fit but the other one\n * has more room — Element Plus / floating-ui's `flip`, kept alignment suffix included\n * (`bottom-start` ↔ `top-start`). `DsPopover.vue`'s panel class reflects that RESOLVED\n * placement, not this prop's raw value.\n *\n * `over-start` / `over-end` (SALESQL-3535) cover the trigger instead of sitting beside it:\n * the panel's top lands 8px above the trigger's top, aligned to its leading / trailing edge —\n * the design export's contact-data `TypedCell` (`top: −8`), which the contract (§3.5) pairs\n * with a ¼ `offset` so the leading quarter of a column stays a free hover lane. They never\n * flip: covering the trigger has no \"opposite side\" to move to.\n */\nexport const DS_POPOVER_PLACEMENTS = {\n TOP: 'top',\n TOP_START: 'top-start',\n TOP_END: 'top-end',\n BOTTOM: 'bottom',\n BOTTOM_START: 'bottom-start',\n BOTTOM_END: 'bottom-end',\n LEFT: 'left',\n LEFT_START: 'left-start',\n LEFT_END: 'left-end',\n RIGHT: 'right',\n RIGHT_START: 'right-start',\n RIGHT_END: 'right-end',\n OVER_START: 'over-start',\n OVER_END: 'over-end',\n} as const;\nexport type DsPopoverPlacement = (typeof DS_POPOVER_PLACEMENTS)[keyof typeof DS_POPOVER_PLACEMENTS];\n\nexport interface DsPopoverProps {\n /** Visibility. Controlled — pair with `v-model:open`. */\n open?: boolean;\n /** Preferred placement — see `DsPopoverPlacement`'s doc for the FLIP that can override it. */\n placement?: DsPopoverPlacement;\n /** Panel width (any CSS length). Empty = fit content. */\n width?: string;\n closeOnEscape?: boolean;\n /** Close when a click lands outside the trigger and the panel. */\n closeOnOutside?: boolean;\n /** Let the trigger slot toggle the panel on click. Off for consumer-driven opening. */\n triggerOnClick?: boolean;\n /**\n * Moves the panel's anchor along the trigger's cross axis — any CSS length; a percentage\n * resolves against the trigger box (`'25%'` = the contact-data cell rule, contract §3.5).\n * Empty keeps the panel flush with the edge. Additive (SALESQL-3535).\n */\n offset?: string;\n /** Drop the 8px card padding for content that brings its own rows and dividers. */\n flush?: boolean;\n /**\n * Render the panel in `<body>` so no ancestor's `overflow` can clip it — a table cell, a\n * scroller. A fixed box mirrors the trigger's rect, so placement, `offset` and the viewport\n * clamp behave the same. Off keeps the panel inside the root. Additive (SALESQL-4056).\n * Teleported, it also asks to close once the trigger is fully out of view (its row\n * scrolled past a clipping container), instead of floating orphaned.\n */\n teleported?: boolean;\n /**\n * Root and trigger fill their container instead of hugging the trigger's content: the\n * whole surface opens the panel (a table cell painted as clickable end to end). SALESQL-4056.\n */\n block?: boolean;\n}\n","import type { InjectionKey } from 'vue';\n\n// A DsPopover inside another one (a row menu inside a picker panel). The inner panel is usually\n// teleported, so the outer one's DOM check would count a press on it as «outside». Provide /\n// inject follows the component tree instead of the DOM: each popover registers with the nearest\n// ancestor, which then treats the child's panel (and its own descendants') as inside.\nexport interface PopoverLayer {\n register(contains: (node: Node) => boolean): () => void;\n}\n\nexport const POPOVER_LAYER: InjectionKey<PopoverLayer> = Symbol('ds-popover-layer');\n","<template>\n <div\n ref=\"rootRef\"\n class=\"ds-popover\"\n :class=\"{ 'ds-popover--block': block }\"\n @keydown.esc=\"onEscape\"\n >\n <!-- A <div> (not a <span>) so the trigger slot may hold block-root components\n without invalid HTML — same rationale as DsTooltip. -->\n <div class=\"ds-popover__trigger\" @click=\"onTriggerClick\">\n <slot name=\"trigger\" />\n </div>\n\n <!-- `teleported`: the panel lives in <body>, where no ancestor's `overflow` can clip it.\n The anchor is a fixed box that mirrors the root's rect, so the placement CSS below\n resolves against it exactly as it does against the root. Esc is caught on the\n anchor because a teleported panel's keydown never reaches the root. -->\n <Teleport v-if=\"teleported\" to=\"body\">\n <Transition name=\"ds-popover-fade\">\n <div v-if=\"open\" class=\"ds-popover__anchor\" :style=\"anchorStyle\" @keydown.esc=\"onEscape\">\n <div\n :id=\"panelId\"\n ref=\"panelRef\"\n class=\"ds-popover__panel\"\n :class=\"[`ds-popover__panel--${resolvedPlacement}`, { 'is-flush': flush }]\"\n role=\"dialog\"\n tabindex=\"-1\"\n :style=\"panelStyle\"\n >\n <slot />\n </div>\n </div>\n </Transition>\n </Teleport>\n <Transition v-else name=\"ds-popover-fade\">\n <div\n v-if=\"open\"\n :id=\"panelId\"\n ref=\"panelRef\"\n class=\"ds-popover__panel\"\n :class=\"[`ds-popover__panel--${resolvedPlacement}`, { 'is-flush': flush }]\"\n role=\"dialog\"\n tabindex=\"-1\"\n :style=\"panelStyle\"\n >\n <slot />\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n inject,\n nextTick,\n onBeforeUnmount,\n provide,\n ref,\n useId,\n watch,\n type PropType,\n} from 'vue';\nimport { UPDATE_OPEN } from '@shared/constants/events';\nimport { useTeleportAnchor } from '@shared/composables/useTeleportAnchor';\nimport { useViewportClamp } from '@shared/composables/useViewportClamp';\nimport { DS_POPOVER_PLACEMENTS, type DsPopoverPlacement } from './DsPopover.types';\nimport { TELEPORTED_Z_INDEX } from '@shared/constants/layers';\nimport { POPOVER_LAYER, type PopoverLayer } from './popoverLayers';\n\nconst props = defineProps({\n open: Boolean,\n placement: {\n type: String as PropType<DsPopoverPlacement>,\n default: DS_POPOVER_PLACEMENTS.BOTTOM,\n },\n // Panel width (any CSS length). Empty = fit content.\n width: { type: String, default: '' },\n // `width` becomes a minimum: the panel grows with its content up to this length (and never\n // past the viewport). Empty = fixed `width`, as before — additive, nothing existing moves.\n growTo: { type: String, default: '' },\n closeOnEscape: { type: Boolean, default: true },\n closeOnOutside: { type: Boolean, default: true },\n // Let the trigger slot toggle the panel. Off when the consumer drives `open` itself.\n triggerOnClick: { type: Boolean, default: true },\n // Moves the panel's anchor along the trigger's cross axis (any CSS length; a percentage\n // resolves against the trigger box). The contact-data cell opens at `25%` so a column can\n // be swept downward without the panel intercepting the pointer (contract §3.5). Empty =\n // anchored flush to the edge, as before — additive, nothing existing moves.\n offset: { type: String, default: '' },\n // Drop the 8px card padding for content that brings its own rows (a list with dividers).\n flush: { type: Boolean, default: false },\n // Render the panel in <body> (SALESQL-4056). Needed when the trigger sits inside an\n // ancestor with `overflow` other than visible — a table cell, a scroller — which would\n // otherwise clip the panel. Placement, offset and the viewport clamp behave the same.\n // Off = the panel stays inside the root, as before — additive, nothing existing moves.\n teleported: { type: Boolean, default: false },\n // The root and the trigger fill their container instead of hugging the trigger's content\n // (SALESQL-4056): for a trigger that is a whole surface, like a table cell painted as\n // clickable end to end. Off = inline, as before.\n block: { type: Boolean, default: false },\n});\n\nconst emit = defineEmits([UPDATE_OPEN]);\n\nconst rootRef = ref<HTMLElement | null>(null);\nconst panelRef = ref<HTMLElement | null>(null);\n\nconst nestedContains = new Set<(node: Node) => boolean>();\n\nfunction containsNode(node: Node): boolean {\n return (\n !!rootRef.value?.contains(node) ||\n !!panelRef.value?.contains(node) ||\n [...nestedContains].some((contains) => contains(node))\n );\n}\n\nconst layer: PopoverLayer = {\n register(contains) {\n nestedContains.add(contains);\n return () => nestedContains.delete(contains);\n },\n};\nprovide(POPOVER_LAYER, layer);\nconst unregisterFromParent = inject(POPOVER_LAYER, null)?.register(containsNode);\n\n// SSR-safe id; the panel carries it so a consumer can wire aria-controls if it wants.\nconst panelId = useId();\n\n// Mirrors the CSS `calc(100% + 6px)` gap in the placement rules below — the flip's\n// free-space math (useViewportClamp) needs the SAME number the CSS renders with.\nconst PANEL_GAP = 6;\n\n// Placement is pure CSS and knows nothing about the viewport; the clamp nudges the panel\n// back in on the cross axis when a trigger near an edge would push it off-screen (shared\n// with DsTooltip), and — passing `trigger`/`gap` here turns on the main-axis FLIP\n// (SALESQL-4056): when the panel doesn't fit on the PREFERRED side (`placement`) but the\n// OPPOSITE side has more room, it opens there instead (`resolvedPlacement`), re-evaluated\n// live on the same open/scroll/resize the clamp already measures on. DsTooltip passes the\n// same third argument — see useViewportClamp.ts.\nconst {\n shiftStyle,\n resolvedPlacement,\n activate: activateClamp,\n deactivate: deactivateClamp,\n} = useViewportClamp(panelRef, () => props.placement, { trigger: rootRef, gap: PANEL_GAP });\n\nconst panelStyle = computed(() => {\n const grows = !!props.growTo;\n const style: Record<string, string> = {\n ...(grows\n ? {\n width: 'max-content',\n ...(props.width ? { '--ds-popover-min-width': props.width } : {}),\n '--ds-popover-max-width': props.growTo,\n }\n : props.width\n ? { width: props.width }\n : {}),\n ...(props.offset ? { '--ds-popover-offset': props.offset } : {}),\n ...shiftStyle.value,\n };\n return Object.keys(style).length > 0 ? style : undefined;\n});\n\n// Teleported only. Once the trigger is fully out of view (its row scrolled past a clipping\n// container, SALESQL-4056) the panel asks to close: inside the root it would have been clipped\n// along with the trigger; teleported, it would float orphaned over whatever covers that spot.\nconst {\n anchorStyle: anchorBox,\n track: trackAnchor,\n untrack: untrackAnchor,\n} = useTeleportAnchor(rootRef, { onTriggerHidden: close });\n\nconst anchorStyle = computed(() => ({\n zIndex: TELEPORTED_Z_INDEX,\n ...anchorBox.value,\n}));\n\n// The element that had focus when the panel opened — focus returns here on close, so a\n// keyboard user is not dumped at the top of the document after dismissing the card.\nlet lastFocused: HTMLElement | null = null;\n\nfunction close() {\n emit(UPDATE_OPEN, false);\n}\n\nfunction onTriggerClick() {\n if (!props.triggerOnClick) return;\n emit(UPDATE_OPEN, !props.open);\n}\n\nfunction onEscape() {\n if (props.closeOnEscape && props.open) close();\n}\n\n// Outside click: `mousedown` rather than `click`, so a press that starts outside\n// dismisses the panel even if the pointer is released over it.\nfunction onDocumentMouseDown(e: MouseEvent) {\n const target = e.target as Node | null;\n // A teleported panel is not inside the root, so it is checked on its own — and so is the\n // panel of any popover nested in this one.\n if (!target || containsNode(target)) return;\n close();\n}\n\nwatch(\n () => props.open,\n (open, wasOpen) => {\n if (typeof document === 'undefined') return;\n if (open) {\n lastFocused = document.activeElement as HTMLElement;\n if (props.closeOnOutside) document.addEventListener('mousedown', onDocumentMouseDown);\n // Before the panel renders and before the clamp activates, so neither sees a stale anchor.\n if (props.teleported) trackAnchor();\n nextTick(() => {\n // `preventScroll` is NOT optional here: a plain focus() makes the browser\n // scroll the panel into view, which drags the trigger the user just clicked\n // out from under their pointer (measured: the scrolling ancestor jumped 18px\n // and the button visibly moved up). The panel is anchored to the trigger, so\n // it is already where the user is looking — nothing needs scrolling.\n // A control inside the panel may have claimed focus already (a picker's search).\n if (!panelRef.value?.contains(document.activeElement)) {\n panelRef.value?.focus?.({ preventScroll: true });\n }\n activateClamp();\n });\n } else if (wasOpen) {\n document.removeEventListener('mousedown', onDocumentMouseDown);\n untrackAnchor();\n deactivateClamp();\n lastFocused?.focus?.({ preventScroll: true });\n }\n },\n { immediate: true }\n);\n\nonBeforeUnmount(() => {\n unregisterFromParent?.();\n if (typeof document === 'undefined') return;\n document.removeEventListener('mousedown', onDocumentMouseDown);\n deactivateClamp();\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/shadow.scss' as sh;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-popover {\n position: relative;\n display: inline-flex;\n\n &__trigger {\n display: inline-flex;\n }\n\n // `block`: the root fills its container and the trigger fills the root, so the whole\n // surface — not just the content — opens the panel. Height too: a table cell is the\n // container, and a row is taller than its text.\n &--block {\n display: flex;\n\n width: 100%;\n height: 100%;\n\n > .ds-popover__trigger {\n display: flex;\n flex: 1;\n\n min-width: 0;\n }\n }\n\n // Teleported only. The anchor's box and z-index are inline (useTeleportAnchor,\n // TELEPORTED_Z_INDEX); it lets the pointer through everywhere but the panel.\n &__anchor {\n .ds-popover__panel {\n pointer-events: auto;\n }\n }\n\n &__panel {\n position: absolute;\n z-index: 2000; // under DsTooltip (10001), over page chrome\n\n width: max-content;\n // Never wider than the viewport itself: past that, no amount of shifting can bring\n // the panel back inside and the content would still be cut.\n max-width: min(var(--ds-popover-max-width, 320px), calc(100vw - #{s.spacing(2)}));\n min-width: min(var(--ds-popover-min-width, 0px), calc(100vw - #{s.spacing(2)}));\n // 8px — the padding the el-popper override applied to every popover.\n padding: s.spacing(1);\n\n // Content that draws its own rows and dividers (the contact list) sits flush.\n &.is-flush {\n padding: 0;\n }\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n background: colors.$white;\n\n // The 1px grey ring. Grey, never the accent: this is the card chrome carried\n // over verbatim from frontend-app's `.el-popper.card-popover` override.\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-card;\n box-shadow: sh.$shadow-dropdown;\n\n outline: none;\n\n // 12-way placement — 4 sides × {centred, -start, -end} — with a 6px gap from the\n // trigger (the DS company card's `top: calc(100% + 6px)`), plus `over-start` /\n // `over-end` that cover the trigger (below). Pure CSS, no floating-ui.\n //\n // `--ds-overlay-shift` is the viewport-collision nudge (see useViewportClamp); it is\n // 0 whenever the panel already fits, which is the common case. The centred forms fold\n // it into the `-50%` that does the centring; the aligned forms have nothing to centre,\n // so the shift is the whole transform.\n //\n // `--ds-popover-offset` (the `offset` prop, SALESQL-3535) moves the ANCHOR: on the\n // aligned forms it replaces the `0` of the anchored edge, so a percentage resolves\n // against the trigger box; on the centred forms it is added to the translate. Unset,\n // it falls back to 0px and every placement is exactly what it was.\n\n // -- Side: which edge of the trigger the panel sits against ---------------\n &--top,\n &--top-start,\n &--top-end {\n bottom: calc(100% + 6px);\n }\n &--bottom,\n &--bottom-start,\n &--bottom-end {\n top: calc(100% + 6px);\n }\n &--left,\n &--left-start,\n &--left-end {\n right: calc(100% + 6px);\n }\n &--right,\n &--right-start,\n &--right-end {\n left: calc(100% + 6px);\n }\n\n // -- Alignment on the cross axis ------------------------------------------\n // Horizontal sides (top/bottom) align on X…\n &--top,\n &--bottom {\n left: 50%;\n transform: translateX(\n calc(-50% + var(--ds-overlay-shift, 0px) + var(--ds-popover-offset, 0px))\n );\n }\n &--top-start,\n &--bottom-start {\n left: var(--ds-popover-offset, 0px); // DS company card: flush with the leading edge\n transform: translateX(var(--ds-overlay-shift, 0px));\n }\n &--top-end,\n &--bottom-end {\n right: var(--ds-popover-offset, 0px);\n transform: translateX(var(--ds-overlay-shift, 0px));\n }\n\n // …vertical sides (left/right) align on Y.\n &--left,\n &--right {\n top: 50%;\n transform: translateY(\n calc(-50% + var(--ds-overlay-shift, 0px) + var(--ds-popover-offset, 0px))\n );\n }\n &--left-start,\n &--right-start {\n top: var(--ds-popover-offset, 0px);\n transform: translateY(var(--ds-overlay-shift, 0px));\n }\n &--left-end,\n &--right-end {\n bottom: var(--ds-popover-offset, 0px);\n transform: translateY(var(--ds-overlay-shift, 0px));\n }\n\n // -- Over (SALESQL-3535): the panel COVERS the trigger, its top 8px above the trigger's\n // top — the design export's contact-data `TypedCell` (`top: −8`). Aligned on X like a\n // top/bottom side, so the clamp shifts it horizontally; `offset` moves the leading edge\n // (the contract's ¼ keeps the start of the column free to sweep).\n &--over-start,\n &--over-end {\n top: -8px;\n }\n &--over-start {\n left: var(--ds-popover-offset, 0px);\n transform: translateX(var(--ds-overlay-shift, 0px));\n }\n &--over-end {\n right: var(--ds-popover-offset, 0px);\n transform: translateX(var(--ds-overlay-shift, 0px));\n }\n }\n}\n\n/* Fade only — animating the positioning transform would fight placement. */\n.ds-popover-fade-enter-active,\n.ds-popover-fade-leave-active {\n transition: opacity m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n}\n.ds-popover-fade-enter-from,\n.ds-popover-fade-leave-to {\n opacity: 0;\n}\n</style>\n","import { nextTick, type Ref } from 'vue';\n\nconst ENABLED_ITEM = '[role=\"menuitem\"]:not(:disabled):not([aria-disabled=\"true\"])';\n\n// Keyboard of a `role=\"menu\"` of buttons: arrows (wrapping), Home / End, Escape / Tab to close.\n\nexport function useMenuKeyboard(\n menuRef: Ref<HTMLElement | null>,\n options: { onClose: () => void }\n) {\n const items = () => [...(menuRef.value?.querySelectorAll<HTMLElement>(ENABLED_ITEM) ?? [])];\n\n function focusFirst() {\n return nextTick(() => items()[0]?.focus());\n }\n\n function onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape' || event.key === 'Tab') {\n // Keeps a DsDrawer / DsModal behind from also closing.\n if (event.key === 'Escape') event.stopPropagation();\n options.onClose();\n return;\n }\n const list = items();\n if (list.length === 0) return;\n const current = list.indexOf(document.activeElement as HTMLElement);\n let next: number;\n if (event.key === 'ArrowDown') next = (current + 1) % list.length;\n else if (event.key === 'ArrowUp') next = (current - 1 + list.length) % list.length;\n else if (event.key === 'Home') next = 0;\n else if (event.key === 'End') next = list.length - 1;\n else return;\n event.preventDefault();\n list[next]?.focus();\n }\n\n return { focusFirst, onKeydown };\n}\n","import type { DsPopoverPlacement } from '@shared/ui/DsPopover';\n\nexport interface DsActionMenuItem {\n /** Stable key; it is the payload of `select`. */\n id: string;\n icon?: string;\n label: string;\n disabled?: boolean;\n danger?: boolean;\n}\n\n/** Item text weight. `bold` is for menus that sit on a bold surface (a table header). */\nexport const DS_ACTION_MENU_WEIGHTS = {\n REGULAR: 'regular',\n BOLD: 'bold',\n} as const;\nexport type DsActionMenuWeight =\n (typeof DS_ACTION_MENU_WEIGHTS)[keyof typeof DS_ACTION_MENU_WEIGHTS];\n\nexport interface DsActionMenuProps {\n items: DsActionMenuItem[];\n /** Visibility. Omit it and the menu manages itself; bind it with `v-model:open` to control it. */\n open?: boolean;\n placement?: DsPopoverPlacement;\n /** Render the panel in `<body>` so no ancestor's `overflow` clips it (a table header). */\n teleported?: boolean;\n weight?: DsActionMenuWeight;\n menuLabel?: string;\n}\n","<template>\n <DsPopover\n class=\"ds-action-menu\"\n :open=\"isOpen\"\n :placement=\"placement\"\n :teleported=\"teleported\"\n flush\n @update:open=\"setOpen\"\n >\n <template #trigger>\n <span ref=\"triggerRef\" class=\"ds-action-menu__trigger\" @keydown.down.prevent=\"openFromKey\">\n <slot name=\"trigger\" :open=\"isOpen\" />\n </span>\n </template>\n\n <div\n ref=\"menuRef\"\n class=\"ds-action-menu__menu\"\n :class=\"{ 'ds-action-menu__menu--bold': weight === DS_ACTION_MENU_WEIGHTS.BOLD }\"\n role=\"menu\"\n :aria-label=\"menuLabel || undefined\"\n @keydown=\"onMenuKeydown\"\n >\n <button\n v-for=\"item in items\"\n :key=\"item.id\"\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n class=\"ds-action-menu__item\"\n :class=\"{ 'is-danger': item.danger }\"\n :disabled=\"item.disabled\"\n @click=\"choose(item)\"\n >\n <i\n v-if=\"item.icon\"\n class=\"material-symbols-filled ds-action-menu__icon\"\n aria-hidden=\"true\"\n >{{ item.icon }}</i\n >\n <span class=\"ds-action-menu__label\">{{ item.label }}</span>\n </button>\n </div>\n </DsPopover>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref, watch, type PropType } from 'vue';\nimport { useMenuKeyboard } from '@shared/composables/useMenuKeyboard';\nimport { SELECT, UPDATE_OPEN } from '@shared/constants/events';\nimport { DsPopover, DS_POPOVER_PLACEMENTS, type DsPopoverPlacement } from '@shared/ui/DsPopover';\nimport {\n DS_ACTION_MENU_WEIGHTS,\n type DsActionMenuItem,\n type DsActionMenuWeight,\n} from './DsActionMenu.types';\n\nconst props = defineProps({\n items: { type: Array as PropType<DsActionMenuItem[]>, required: true },\n // `undefined` (not `false`) when omitted: that is what tells \"uncontrolled\" from \"closed\".\n open: { type: Boolean, default: undefined },\n placement: {\n type: String as PropType<DsPopoverPlacement>,\n default: DS_POPOVER_PLACEMENTS.BOTTOM_START,\n },\n teleported: { type: Boolean, default: false },\n weight: {\n type: String as PropType<DsActionMenuWeight>,\n default: DS_ACTION_MENU_WEIGHTS.REGULAR,\n },\n menuLabel: { type: String, default: '' },\n});\n\nconst emit = defineEmits([SELECT, UPDATE_OPEN]);\n\nconst innerOpen = ref(false);\nconst triggerRef = ref<HTMLElement | null>(null);\nconst menuRef = ref<HTMLElement | null>(null);\n\nconst isOpen = computed(() => props.open ?? innerOpen.value);\n\nfunction setOpen(next: boolean) {\n if (isOpen.value === next) return;\n if (props.open === undefined) innerOpen.value = next;\n emit(UPDATE_OPEN, next);\n}\n\nfunction openFromKey() {\n setOpen(true);\n}\n\n// After DsPopover's own focus restore, which may land elsewhere (Safari / Firefox on macOS).\nfunction focusTrigger() {\n nextTick(() =>\n triggerRef.value\n ?.querySelector<HTMLElement>('button, a[href], input, [tabindex]:not([tabindex=\"-1\"])')\n ?.focus()\n );\n}\n\nfunction closeAndRefocus() {\n setOpen(false);\n focusTrigger();\n}\n\nfunction choose(item: DsActionMenuItem) {\n if (item.disabled) return;\n closeAndRefocus();\n emit(SELECT, item.id);\n}\n\nconst { focusFirst, onKeydown: onMenuKeydown } = useMenuKeyboard(menuRef, {\n onClose: closeAndRefocus,\n});\n\n// 'post': after DsPopover moves focus to its panel.\nwatch(\n isOpen,\n (opened) => {\n if (opened) focusFirst();\n },\n { flush: 'post' }\n);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/motion.scss' as m;\n\n.ds-action-menu {\n &__trigger {\n display: contents;\n }\n\n &__menu {\n display: flex;\n flex-direction: column;\n min-width: s.control-width('medium');\n padding: s.spacing(0.5);\n\n font-family: t.$font-family;\n font-size: t.font-size('body');\n\n &--bold {\n font-weight: t.$weight-bold;\n }\n }\n\n &__item {\n display: flex;\n align-items: center;\n gap: s.spacing(1);\n width: 100%;\n height: s.control-height('large');\n padding: 0 s.control-padding('medium');\n\n color: colors.$slate-main;\n font: inherit;\n text-align: left;\n\n background: transparent;\n border: 0;\n border-radius: r.$radius-control;\n\n cursor: pointer;\n\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:hover:not(:disabled),\n &:focus-visible {\n background: colors.$slate-bg;\n }\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: -2px;\n }\n\n &.is-danger {\n color: colors.$error-shadow;\n\n &:hover:not(:disabled),\n &:focus-visible {\n background: colors.$error-tint;\n }\n }\n\n &:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n }\n }\n\n &__icon {\n flex: none;\n font-size: i.icon-size(16);\n line-height: 1;\n }\n\n &__label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n</style>\n","<template>\n <span class=\"ds-company-logo\" :style=\"boxStyle\">\n <img\n v-if=\"src && !failed\"\n class=\"ds-company-logo__image\"\n :src=\"src\"\n alt=\"\"\n loading=\"lazy\"\n :style=\"imageStyle\"\n @error=\"failed = true\"\n />\n <span v-else class=\"ds-company-logo__initial\" aria-hidden=\"true\">{{ initial }}</span>\n </span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\n\nconst props = defineProps({\n src: { type: String, default: '' },\n name: { type: String, default: '' },\n size: { type: Number, default: 36 },\n});\n\n// A broken logo is common (a private bucket, a dead CDN): fall back to the initial instead\n// of leaving an empty box. A new URL gets a fresh attempt.\nconst failed = ref(false);\nwatch(\n () => props.src,\n () => (failed.value = false)\n);\n\n// The export writes `(company || \"?\").slice(0, 1)`, kept as is (no case change).\nconst initial = computed(() => (props.name || '?').slice(0, 1));\n\nconst boxStyle = computed(() => ({ width: `${props.size}px`, height: `${props.size}px` }));\n// Export: a 22px glyph in a 34–36px box. Scaled with the box so other sizes keep the margin.\nconst imageStyle = computed(() => {\n const side = `${Math.round(props.size * 0.61)}px`;\n return { width: side, height: side };\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n\n.ds-company-logo {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n box-sizing: border-box;\n overflow: hidden;\n\n background: colors.$white;\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-control; // export: 4\n\n &__image {\n display: block;\n\n object-fit: contain;\n }\n\n &__initial {\n color: colors.$slate-soft; // export #888f97 — the DS value slate-soft replaced (SALESQL-3394)\n font-family: t.$font-family;\n font-size: t.font-size('caption'); // export: 12\n font-weight: 800; // export 800 (no token for it)\n line-height: 1;\n user-select: none;\n }\n}\n</style>\n","<template>\n <div class=\"ds-company-card\">\n <div class=\"ds-company-card__header\">\n <DsCompanyLogo :src=\"logo\" :name=\"name\" :size=\"34\" />\n <span class=\"ds-company-card__name\">{{ name }}</span>\n <DsTooltip\n v-if=\"websiteUrl\"\n :content=\"websiteLabel\"\n :placement=\"DS_TOOLTIP_PLACEMENTS.BOTTOM\"\n >\n <a\n class=\"ds-company-card__website\"\n :href=\"websiteUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n :aria-label=\"websiteLabel || undefined\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">language</i>\n </a>\n </DsTooltip>\n <!-- \"in\" is LinkedIn's mark, not copy: it stays literal in every language. -->\n <a\n v-if=\"linkedinUrl\"\n class=\"ds-company-card__linkedin\"\n :href=\"linkedinUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n :aria-label=\"linkedinLabel || undefined\"\n >in</a\n >\n </div>\n\n <div v-for=\"row in rows\" :key=\"row.id\" class=\"ds-company-card__row\">\n <i class=\"material-symbols-filled ds-company-card__row-icon\" aria-hidden=\"true\">{{\n row.icon\n }}</i>\n <div class=\"ds-company-card__row-text\">\n <div class=\"ds-company-card__row-label\">{{ row.label }}</div>\n <a\n v-if=\"row.href\"\n class=\"ds-company-card__row-value is-link\"\n :href=\"row.href\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >{{ row.value }}</a\n >\n <div v-else class=\"ds-company-card__row-value\">{{ row.value }}</div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport DsCompanyLogo from '../DsCompanyLogo/DsCompanyLogo.vue';\nimport DsTooltip from '../DsTooltip/DsTooltip.vue';\nimport { DS_TOOLTIP_PLACEMENTS } from '../DsTooltip/DsTooltip.types';\nimport type { DsCompanyDetail } from './DsCompanyCard.types';\n\nconst props = defineProps({\n name: { type: String, required: true },\n logo: { type: String, default: '' },\n websiteUrl: { type: String, default: '' },\n websiteLabel: { type: String, default: '' },\n linkedinUrl: { type: String, default: '' },\n linkedinLabel: { type: String, default: '' },\n details: { type: Array as PropType<DsCompanyDetail[]>, default: () => [] },\n});\n\n// A detail without a value is not rendered: a field the API did not send never shows blank.\nconst rows = computed(() => props.details.filter((detail) => detail.value));\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/icons.scss' as i;\n\n// Values from the export's `CompanyDetails`. Off-grid ones are written as the export has\n// them, as the contact-data family does. No `overflow: hidden` on the root: the globe's\n// tooltip has to be able to hang below the header.\n.ds-company-card {\n display: flex;\n flex-direction: column;\n\n min-width: 0;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n\n &__header {\n display: flex;\n gap: 10px; // export\n align-items: center;\n\n padding: 11px 14px; // export\n }\n\n &__name {\n flex: 1;\n\n min-width: 0;\n\n font-size: t.font-size('body'); // export: 14\n font-weight: t.$weight-bold; // export: 700\n white-space: nowrap;\n text-overflow: ellipsis;\n\n overflow: hidden;\n }\n\n &__website {\n display: inline-flex;\n\n color: colors.$slate-soft; // export #888f97 — the DS value slate-soft replaced\n text-decoration: none;\n\n // On the glyph itself: the app's `.material-symbols-filled` object class sets 20px on\n // the <i>, so a size on the link never reached it (3.5.0 rendered 20).\n i {\n font-size: i.icon-size(18); // export: 18\n line-height: 1;\n }\n\n &:hover {\n color: colors.$slate-main;\n }\n }\n\n &__linkedin {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n width: 22px; // export\n height: 22px;\n\n color: colors.$white;\n font-size: 11px; // export 11 (Diego: match the export, 2026-09-23)\n font-weight: 800; // export 800 (no token for it)\n line-height: 1;\n text-decoration: none;\n\n background: colors.$brand-linkedin;\n border-radius: 5px; // export\n }\n\n &__row {\n display: flex;\n gap: 10px; // export\n\n padding: 9px 14px; // export\n\n border-top: 1px solid colors.$slate-tint;\n }\n\n &__row-icon {\n flex: none;\n\n color: colors.$slate-soft; // export #5c6670\n font-size: 17px; // export 17 (not an icon step), under the header's 18\n line-height: 1;\n }\n\n &__row-text {\n min-width: 0;\n }\n\n &__row-label {\n color: colors.$slate-soft; // export #5c6670\n // Export 11, off the DS scale on purpose: snapped to `micro` (10) it read smaller than the\n // design in Diego's review (2026-09-23), so it matches the export instead.\n font-size: 11px;\n font-weight: t.$weight-bold;\n letter-spacing: 0.4px; // export\n text-transform: uppercase;\n }\n\n &__row-value {\n display: block;\n\n margin-top: 1px; // export\n color: colors.$slate-main;\n font-size: t.font-size('small'); // export: 13\n font-weight: t.$weight-semibold; // export: 600\n line-height: t.$line-height-body; // export: 1.4\n white-space: nowrap;\n text-overflow: ellipsis;\n text-decoration: none;\n\n overflow: hidden;\n\n &.is-link {\n color: colors.$accent-main;\n cursor: pointer;\n }\n }\n}\n</style>\n","// Contact-data vocabulary shared by the DsContact* family (SALESQL-3535).\n//\n// The rules here come from the frozen contact-data contract (SALESQL-3548,\n// `contact-data-contract/README.md` §3.5 and §3.7 in the three app repos). This library\n// is not one of the contract's mirrors and never imports its files: strings reach the\n// components through props, the token partial is copied byte-for-byte (see\n// `assets/css/contact-data-tokens.test.ts`), and the two helpers below are the contract's\n// own accepted price — «duplicated helpers, fixtures as the drift detector» (§7). Their\n// tests replay the contract's §4 self-check table so a divergence fails here, not in\n// production.\n\n/** Which group an item came from. It is a property of the LIST, never of the item. */\nexport const DS_CONTACT_KINDS = {\n EMAIL: 'email',\n PHONE: 'phone',\n} as const;\nexport type DsContactKind = (typeof DS_CONTACT_KINDS)[keyof typeof DS_CONTACT_KINDS];\n\n/**\n * The contract's whole type vocabulary (§3.2: Work · Direct · Mobile · HQ · Other), keyed\n * by the view model's own bucket values so a label and a bucket cannot drift apart. The\n * visible LABEL for each is copy and arrives by prop; the type itself is a design key.\n */\nexport const DS_CONTACT_TYPES = {\n WORK: 'work',\n DIRECT: 'direct',\n MOBILE: 'mobile',\n HQ: 'hq',\n OTHER: 'other',\n} as const;\nexport type DsContactType = (typeof DS_CONTACT_TYPES)[keyof typeof DS_CONTACT_TYPES];\n\n/**\n * In a contact-data row the type is an ICON on the left, not text (§3.2). These are the\n * Material Symbols ligatures the design export assigns per type (`TYPE_META`); icons are\n * design, so the mapping is the library's — the app never picks a glyph.\n */\nexport const DS_CONTACT_TYPE_ICONS: Readonly<Record<DsContactType, string>> = {\n [DS_CONTACT_TYPES.WORK]: 'business_center',\n [DS_CONTACT_TYPES.DIRECT]: 'mail',\n [DS_CONTACT_TYPES.MOBILE]: 'call',\n [DS_CONTACT_TYPES.HQ]: 'corporate_fare',\n [DS_CONTACT_TYPES.OTHER]: 'alternate_email',\n};\n\n/**\n * The glyph a row or trigger draws for a type. `direct` reads `mail` on an email and `call`\n * on a phone: the map is email-first (the export's `TYPE_META`), so the list's kind decides.\n */\nexport function contactTypeIcon(type: DsContactType, kind?: DsContactKind): string {\n if (type === DS_CONTACT_TYPES.DIRECT && kind === DS_CONTACT_KINDS.PHONE) return 'call';\n return DS_CONTACT_TYPE_ICONS[type];\n}\n\n/**\n * The one item shape every DsContact* component reads. Deliberately the five facts a\n * row needs and nothing else — the consuming app adapts its own view model to this\n * (one line per field), so the library survives the app's model changing under it:\n *\n * legacy view model (§3.8) typed `contact_data` block (§3.11)\n * id: item.id item.uid\n * value: item.value masked ? item.preview : item.value\n * masked: item.isMasked !item.is_revealed || item.value === null\n * valid: item.status === 'valid' item.verification === 'valid'\n * primary: item.isPrimary item.is_primary\n *\n * A component never classifies, fetches or formats: `value` is rendered verbatim and\n * `masked` decides only the two-tone rendering of a string the SERVER already masked.\n */\nexport interface DsContactItem {\n /** Stable identity for keys and event payloads. `null` when the API sends none. */\n id: string | number | null;\n /** The string to display, already resolved by the consumer. Never re-formatted. */\n value: string;\n /** `true` when `value` is the server's masked preview. Reports; never hides. */\n masked: boolean;\n /** `true` only for a `valid` verdict — the sole state that renders the A+ badge. */\n valid: boolean;\n /** The group's primary. Rendered first; the cell shows it as the single value. */\n primary: boolean;\n /** The user's own rating of this item: correct / incorrect / unrated. */\n rating?: boolean | null;\n /**\n * This row's own type, for lists that mix types (the unified Emails / Phones popovers).\n * Sets the row glyph; a single-type list reads the list's `type` instead.\n */\n type?: DsContactType;\n}\n\n/**\n * One typed band of a unified list (export `DataPopover` subgroups): «WORK (2)» above its\n * rows. The label is copy (the app's `TYPE_LABEL`); the type is the design key for the glyph.\n */\nexport interface DsContactSection {\n type: DsContactType;\n label: string;\n items: DsContactItem[];\n}\n\n/**\n * The three glyphs a server-masked value can be built from (contract §3.7 `MASK`):\n * asterisks on the typed block's email `preview`, BULLET U+2022 on phones, and the\n * ASCII dots the legacy arrays actually ship. Recognised, never produced.\n */\nexport const MASK_GLYPHS: readonly string[] = ['*', '•', '.'];\n\nexport interface DsMaskedSegment {\n text: string;\n /** Rendered in the mask tone (`$contact-data-mask-ink`) when true. */\n masked: boolean;\n}\n\n/**\n * The `+N` chip shows the OVERFLOW, not the group size (§3.5): `counts` in the view model\n * are group sizes, so the consumer subtracts through this and `+0` never renders.\n * Frozen as a function because three surfaces subtracting differently is exactly the\n * divergence the contract exists to prevent.\n */\nexport function overflowFromGroupSize(groupSize: number): number {\n return groupSize > 1 ? groupSize - 1 : 0;\n}\n\nfunction pushSegment(segments: DsMaskedSegment[], text: string, masked: boolean): void {\n const last = segments[segments.length - 1];\n if (last && last.masked === masked) {\n last.text += text;\n return;\n }\n segments.push({ text, masked });\n}\n\n/**\n * Splits a string the server ALREADY masked into segments for the two-tone rendering\n * (§3.7: «splitting an already-masked string leaks nothing»). The caller knows the value\n * is masked — this never decides that, and never touches an unmasked value.\n *\n * - Email: the whole local part is the redaction, the domain stays visible (the quality\n * signal). No `@` means the server masked the whole thing.\n * - Phone: every run of mask glyphs is a redaction; a SINGLE dot is a real separator\n * (`+1.415.555.0100`), so it stays visible. No prefix is assumed: `8008...` was\n * measured with no `+` at all. A hyphen touching a redaction (`•-•`) is the server's\n * grouping and comes out as a space; hyphens between visible digits are kept.\n *\n * Concatenating the segments yields the input — nothing is re-grouped — except for that\n * phone hyphen.\n */\nexport function splitMaskedValue(value: string, kind: DsContactKind): DsMaskedSegment[] {\n if (!value) return [];\n\n if (kind === DS_CONTACT_KINDS.EMAIL) {\n const at = value.indexOf('@');\n if (at <= 0) return [{ text: value, masked: true }];\n return [\n { text: value.slice(0, at), masked: true },\n { text: value.slice(at), masked: false },\n ];\n }\n\n const runs: DsMaskedSegment[] = [];\n let index = 0;\n while (index < value.length) {\n const isGlyph = MASK_GLYPHS.includes(value[index]);\n let end = index;\n while (end < value.length && MASK_GLYPHS.includes(value[end]) === isGlyph) end += 1;\n const run = value.slice(index, end);\n runs.push({ text: run, masked: isGlyph && run !== '.' });\n index = end;\n }\n\n const segments: DsMaskedSegment[] = [];\n runs.forEach((run, i) => {\n let text = run.text;\n if (!run.masked) {\n // Only the hyphen touching a redaction is the server's grouping; `555-0100` stays.\n if (runs[i - 1]?.masked) text = text.replace(/^-/, ' ');\n if (runs[i + 1]?.masked) text = text.replace(/-$/, ' ');\n }\n pushSegment(segments, text, run.masked);\n });\n return segments;\n}\n","<template>\n <span\n class=\"ds-masked-value\"\n :class=\"{ 'is-masked': masked }\"\n :title=\"masked ? undefined : value\"\n >\n <template v-if=\"masked\">\n <!-- Segments are a pure derivation of `value`, rebuilt whole on every change and\n never reordered, so the index IS the stable key here. -->\n <span\n v-for=\"(segment, index) in segments\"\n :key=\"index\"\n :class=\"segment.masked ? 'ds-masked-value__mask' : 'ds-masked-value__clear'\"\n ><template v-if=\"segment.circles\"\n ><span aria-hidden=\"true\">{{ segment.circles }}</span\n ><span v-if=\"index === firstCircleIndex\" class=\"ds-masked-value__sr\">{{\n maskedLabel\n }}</span></template\n ><template v-else>{{ segment.text }}</template></span\n >\n </template>\n <template v-else>{{ value }}</template>\n </span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport {\n DS_CONTACT_KINDS,\n MASK_GLYPHS,\n splitMaskedValue,\n type DsContactKind,\n type DsMaskedSegment,\n} from '@shared/constants/contact-data';\n\n// Three bullets before the domain, whatever the server masked.\nconst EMAIL_MASK_CIRCLES = 3;\nconst MASK_CIRCLE = '•';\n\nconst props = defineProps({\n value: { type: String, required: true },\n kind: { type: String as PropType<DsContactKind>, required: true },\n masked: { type: Boolean, default: false },\n // Spoken once per masked value in place of the circles (the app owns i18n).\n maskedLabel: { type: String, default: 'Hidden' },\n});\n\ninterface Segment extends DsMaskedSegment {\n /** The circles that draw this redaction; empty when the text is shown as it came. */\n circles: string;\n}\n\n// Presentation only: the redaction the server sent is drawn as circles (export `DOTS`).\n// The email's local part is a fixed count because its length\n// says nothing; a phone keeps one circle per character, the server's grouping carries the\n// layout. A local part that still has visible characters is not a pure redaction: it is\n// left as received. The visible segments are never touched.\nfunction circlesFor(segment: DsMaskedSegment): string {\n if (!segment.masked || ![...segment.text].every((char) => MASK_GLYPHS.includes(char))) return '';\n return MASK_CIRCLE.repeat(\n props.kind === DS_CONTACT_KINDS.EMAIL ? EMAIL_MASK_CIRCLES : segment.text.length\n );\n}\n\nconst segments = computed<Segment[]>(() =>\n props.masked\n ? splitMaskedValue(props.value, props.kind).map((segment) => ({\n ...segment,\n circles: circlesFor(segment),\n }))\n : []\n);\n\nconst firstCircleIndex = computed(() => segments.value.findIndex((segment) => segment.circles));\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/contact-data-tokens' as cd;\n\n.ds-masked-value {\n // Font, weight and ink are the parent's: this component owns only the mask tone.\n white-space: nowrap;\n\n &__mask {\n color: cd.$contact-data-mask-ink;\n // Export `DOTS`: the redacted run is bold and letter-spaced, so the circles read as a\n // group instead of a smear glued to the prefix. The U+2022 bullet is centred on the\n // x-height by the typeface — the asterisk it replaces sits at cap height.\n font-weight: cd.$contact-data-value-weight;\n letter-spacing: 1px;\n }\n\n // The spoken replacement for the circles: out of the layout, still in the a11y tree.\n &__sr {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n white-space: nowrap;\n }\n\n // A redaction after a visible prefix (`+1 8...`, `+44 77••`) gets a hair of air, like the\n // export's `{tail} {dots}`. Inserting a character would break \"verbatim\"; a margin does not.\n &__clear + &__mask {\n margin-left: 2px;\n }\n}\n</style>\n","<template>\n <!-- The tooltip root is the element that sits in the parent's flex row, so the\n superscript raise (align-self + negative margin, per the contract) lives on it. -->\n <DsTooltip class=\"ds-deliverability-badge\" :content=\"tooltip\" :placement=\"placement\">\n <span\n class=\"ds-deliverability-badge__glyph\"\n role=\"img\"\n :aria-label=\"tooltip\"\n :tabindex=\"focusable ? 0 : undefined\"\n >{{ label }}</span\n >\n </DsTooltip>\n</template>\n\n<script setup lang=\"ts\">\nimport { type PropType } from 'vue';\nimport { DsTooltip, DS_TOOLTIP_PLACEMENTS, type DsTooltipPlacement } from '@shared/ui/DsTooltip';\n\ndefineProps({\n label: { type: String, required: true },\n tooltip: { type: String, required: true },\n placement: {\n type: String as PropType<DsTooltipPlacement>,\n default: DS_TOOLTIP_PLACEMENTS.TOP,\n },\n // Standing alone the glyph is a tab stop so a keyboard user can reach its meaning.\n // Inside an already-focusable trigger (the cell button) it must NOT be one: nested\n // focusables inside a button are invalid, and the trigger's popover carries the info.\n focusable: { type: Boolean, default: true },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/radius.scss' as r;\n\n// Contract §3.3 render spec: bare glyph, no box, raised as a superscript, `flex: none`\n// after the value. The A+ green exists in no repo palette — it is this badge's own token.\n.ds-deliverability-badge {\n flex: none;\n align-self: flex-start;\n margin-top: -2px;\n\n &__glyph {\n display: inline-block;\n\n color: cd.$contact-data-badge-a-plus-ink;\n font-family: t.$font-family;\n font-size: cd.$contact-data-badge-a-plus-size;\n font-weight: cd.$contact-data-badge-a-plus-weight;\n letter-spacing: cd.$contact-data-badge-a-plus-tracking;\n line-height: 1;\n\n border-radius: r.$radius-control;\n outline: none;\n cursor: default; // an indicator with a tooltip, not a control\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 2px;\n }\n }\n}\n</style>\n","<template>\n <span\n v-if=\"overflow > 0\"\n class=\"ds-more-count-chip\"\n :class=\"{ 'is-active': active }\"\n :aria-label=\"label || undefined\"\n >+{{ overflow }}</span\n >\n</template>\n\n<script setup lang=\"ts\">\ndefineProps({\n overflow: { type: Number, required: true },\n active: { type: Boolean, default: false },\n label: { type: String, default: '' },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n\n// Export `MoreChip`: inline-flex, min-width 22 × height 20, padding 0 6px, fully round,\n// 1px ring, 11px/700. Rest: white surface, tint ring, muted ink. Active: accent trio.\n.ds-more-count-chip {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n\n min-width: 22px; // export MoreChip\n height: 20px; // export MoreChip\n padding: 0 6px; // export MoreChip\n\n color: cd.$contact-data-ink-muted;\n font-family: t.$font-family;\n // Export: 11px. The type scale has no 11 step (caption is 12); caption is the nearest\n // token and the delta is logged in the story docs for the parity pass.\n font-size: t.font-size('caption');\n font-weight: t.$weight-bold;\n line-height: 1;\n white-space: nowrap;\n\n background: colors.$white;\n border: 1px solid cd.$contact-data-ring;\n border-radius: r.$radius-full;\n // An indicator, not a control: the arrow, never the I-beam its text would draw. Inside a\n // clickable trigger (the cell, the tag picker) the parent resets it to `inherit`, so the\n // pointer stays continuous across the whole hit area.\n cursor: default;\n\n transition:\n color m.$duration-default m.$easing,\n background-color m.$duration-default m.$easing,\n border-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &.is-active {\n color: colors.$accent-main;\n background: colors.$accent-bg;\n border-color: colors.$accent-mid;\n }\n}\n</style>\n","<template>\n <div class=\"ds-contact-list\">\n <div v-if=\"title || $slots.actions\" class=\"ds-contact-list__header\">\n <span v-if=\"title\" class=\"ds-contact-list__title\">{{ title }}</span>\n <span v-if=\"title\" class=\"ds-contact-list__count\">({{ total }})</span>\n <span class=\"ds-contact-list__actions\"><slot name=\"actions\" /></span>\n </div>\n\n <p v-if=\"!total && emptyLabel\" class=\"ds-contact-list__empty\">{{ emptyLabel }}</p>\n\n <template v-for=\"group in groups\" :key=\"group.key\">\n <!-- Unified variants only (export DataPopover subgroups): the type's band above its rows -->\n <p v-if=\"group.label\" class=\"ds-contact-list__section\">\n {{ group.label }} ({{ group.items.length }})\n </p>\n\n <ul class=\"ds-contact-list__items\" role=\"list\" :aria-label=\"group.label || undefined\">\n <li\n v-for=\"(item, index) in group.items\"\n :key=\"rowKey(item, group, index)\"\n class=\"ds-contact-list__item\"\n :class=\"{ 'is-primary': item.primary, 'is-masked': item.masked }\"\n >\n <i\n v-if=\"iconFor(item, group)\"\n class=\"material-symbols-filled ds-contact-list__icon\"\n aria-hidden=\"true\"\n >{{ iconFor(item, group) }}</i\n >\n\n <span class=\"ds-contact-list__value-wrap\">\n <DsMaskedValue\n class=\"ds-contact-list__value\"\n :value=\"item.value\"\n :kind=\"kind\"\n :masked=\"item.masked\"\n :masked-label=\"maskedLabel\"\n />\n <DsDeliverabilityBadge\n v-if=\"showsBadge(item)\"\n :label=\"badgeLabel\"\n :tooltip=\"badgeTooltip\"\n :focusable=\"false\"\n />\n </span>\n\n <!-- A masked row has no full value: nothing to copy, nothing to rate. -->\n <span v-if=\"!item.masked\" class=\"ds-contact-list__row-actions\">\n <button\n type=\"button\"\n class=\"ds-contact-list__action\"\n :class=\"{ 'is-copied': copiedKey === rowKey(item, group, index) }\"\n :aria-label=\"copiedKey === rowKey(item, group, index) ? copiedLabel : copyLabel\"\n :title=\"copiedKey === rowKey(item, group, index) ? copiedLabel : copyLabel\"\n @click=\"onCopy(item, rowKey(item, group, index))\"\n >\n <i class=\"material-symbols-rounded\" aria-hidden=\"true\">{{\n copiedKey === rowKey(item, group, index) ? 'check' : 'content_copy'\n }}</i>\n </button>\n\n <template v-if=\"showRate\">\n <button\n type=\"button\"\n class=\"ds-contact-list__action\"\n :class=\"{ 'is-on': item.rating === true }\"\n :aria-label=\"correctLabel\"\n :aria-pressed=\"item.rating === true\"\n :title=\"correctLabel\"\n @click=\"emit(CORRECT, item)\"\n >\n <!-- Unrated = the unfilled Rounded glyph (FILL 0). `material-symbols-rounded` is\n the object class the apps define; there is no `-filled-outlined` anywhere. -->\n <i\n :class=\"\n item.rating === true ? 'material-symbols-filled' : 'material-symbols-rounded'\n \"\n aria-hidden=\"true\"\n >thumb_up</i\n >\n </button>\n <button\n type=\"button\"\n class=\"ds-contact-list__action\"\n :class=\"{ 'is-on': item.rating === false }\"\n :aria-label=\"incorrectLabel\"\n :aria-pressed=\"item.rating === false\"\n :title=\"incorrectLabel\"\n @click=\"emit(INCORRECT, item)\"\n >\n <i\n :class=\"\n item.rating === false ? 'material-symbols-filled' : 'material-symbols-rounded'\n \"\n aria-hidden=\"true\"\n >thumb_down</i\n >\n </button>\n </template>\n </span>\n </li>\n </ul>\n </template>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, ref, type PropType } from 'vue';\nimport { DsMaskedValue } from '@shared/ui/DsMaskedValue';\nimport { DsDeliverabilityBadge } from '@shared/ui/DsDeliverabilityBadge';\nimport { COPY, CORRECT, INCORRECT } from '@shared/constants/events';\nimport { useClipboardCopy } from '@shared/composables/useClipboardCopy';\nimport {\n DS_CONTACT_KINDS,\n contactTypeIcon,\n type DsContactItem,\n type DsContactKind,\n type DsContactSection,\n type DsContactType,\n} from '@shared/constants/contact-data';\n\nconst props = defineProps({\n items: { type: Array as PropType<DsContactItem[]>, default: () => [] },\n // Unified variants (Emails / Phones): one band per type, rows under each. When present,\n // `items` plays no part in the rows — the cell still needs it for the primary and the chip.\n sections: { type: Array as PropType<DsContactSection[]>, default: () => [] },\n kind: { type: String as PropType<DsContactKind>, required: true },\n type: { type: String as PropType<DsContactType | ''>, default: '' },\n title: { type: String, default: '' },\n badgeLabel: { type: String, required: true },\n badgeTooltip: { type: String, required: true },\n showRate: { type: Boolean, default: false },\n emptyLabel: { type: String, default: '' },\n // Accessible labels for the icon-only actions (the app owns i18n); English DS defaults,\n // the same convention DsContactValue follows.\n maskedLabel: { type: String, default: 'Hidden' },\n copyLabel: { type: String, default: 'Copy' },\n copiedLabel: { type: String, default: 'Copied!' },\n correctLabel: { type: String, default: 'Correct' },\n incorrectLabel: { type: String, default: 'Incorrect' },\n});\n\n// Runtime array so the names are registered (the type-only form compiles to an empty\n// `emits` and lets listeners fall through as native attrs). Payload: the item.\nconst emit = defineEmits([COPY, CORRECT, INCORRECT]);\n\ninterface RowGroup {\n key: string;\n label: string;\n type: DsContactType | '';\n items: DsContactItem[];\n}\n\n// One group, one type — unless `sections` arrive: then each non-empty section is a band\n// plus its rows (export DataPopover renders subgroups; an empty type has nothing to band).\nconst groups = computed<RowGroup[]>(() => {\n if (props.sections.length) {\n return props.sections\n .filter((section) => section.items.length > 0)\n .map((section, index) => ({\n key: `${section.type}-${index}`,\n label: section.label,\n type: section.type,\n items: section.items,\n }));\n }\n return props.items.length\n ? [{ key: 'group', label: '', type: props.type, items: props.items }]\n : [];\n});\n\n// The header total spans every band (export: `subgroups.reduce(...)`), not one group.\nconst total = computed(() => groups.value.reduce((sum, group) => sum + group.items.length, 0));\n\n// Contract §3.3 — the whole badge rule, in one place: valid, and an email. Phones never\n// carry verification, whatever their status. Badges do render on masked previews (§3.7).\nfunction showsBadge(item: DsContactItem): boolean {\n return props.kind === DS_CONTACT_KINDS.EMAIL && item.valid;\n}\n\n// The row glyph (§3.2: an icon, never text): the item's own type when rows mix types,\n// else the band's, else the list's. No type, no glyph.\nfunction iconFor(item: DsContactItem, group: RowGroup): string {\n const type = item.type ?? group.type;\n return type ? contactTypeIcon(type, props.kind) : '';\n}\n\n// Unsaved rows arrive with `id: null` and their masked previews can repeat, so the value is\n// no identity: fall back to the position inside the group.\nfunction rowKey(item: DsContactItem, group: RowGroup, index: number): string | number {\n return item.id ?? `${group.key}:${index}`;\n}\n\n// Copy is the one consequence the row owns (the value is right there); it still emits so\n// the app can toast or track — only once the clipboard took the value. `copiedKey` flips the\n// glyph for ~1.2 s, like DsContactValue.\nconst copiedKey = ref<string | number | null>(null);\nlet copiedTimer: ReturnType<typeof setTimeout> | undefined;\nconst { copy: copyToClipboard } = useClipboardCopy();\n\nasync function onCopy(item: DsContactItem, key: string | number) {\n if (!(await copyToClipboard(item.value))) return;\n copiedKey.value = key;\n clearTimeout(copiedTimer);\n copiedTimer = setTimeout(() => {\n copiedKey.value = null;\n }, 1200);\n emit(COPY, item);\n}\n\nonBeforeUnmount(() => clearTimeout(copiedTimer));\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/spacing.scss' as s;\n\n.ds-contact-list {\n font-family: t.$font-family;\n color: cd.$contact-data-value-ink;\n cursor: default;\n\n // -- header: variant name + group size, actions to the right (export DataPopover) ----\n &__header {\n display: flex;\n align-items: center;\n gap: s.spacing(1);\n padding: 9px 12px; // export DataPopover header\n }\n &__title,\n &__count {\n // Export: 12.5px/600 in the section-label grey. `small` (13) is the nearest step.\n font-size: t.font-size('small');\n font-weight: t.$weight-semibold;\n color: cd.$contact-data-header-ink;\n white-space: nowrap;\n }\n &__count {\n margin-left: -4px;\n }\n &__actions {\n display: inline-flex;\n align-items: center;\n margin-left: auto;\n flex: none;\n }\n\n &__empty {\n margin: 0;\n padding: 9px 12px;\n font-size: t.font-size('small');\n color: cd.$contact-data-ink-muted;\n }\n\n // -- type band (export DataPopover subgroups): the quiet uppercase name of a type on the\n // neutral surface, ruled above and below, in a unified list --------------------------\n &__section {\n margin: 0;\n padding: 6px 12px 5px; // export\n border-top: 1px solid cd.$contact-data-ring;\n border-bottom: 1px solid cd.$contact-data-ring;\n background: cd.$contact-data-surface; // export grey1\n color: cd.$contact-data-ink-muted; // export C.grey\n // Export: 10.5px/700, .6px tracking. `micro` (10) is the nearest step.\n font-size: t.font-size('micro');\n font-weight: t.$weight-bold;\n letter-spacing: 0.6px;\n text-transform: uppercase;\n white-space: nowrap;\n }\n\n // -- rows (export PopItem) ---------------------------------------------------------\n &__items {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n &__item {\n position: relative;\n display: flex;\n align-items: center;\n gap: s.spacing(1); // 8\n\n padding: 7px 12px; // export PopItem\n border-top: 1px solid cd.$contact-data-ring;\n\n background: colors.$white;\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n // The header, a band or nothing sits above the first row — no double divider.\n &:first-child {\n border-top: 0;\n }\n\n // Export: rows hover on #FCFCFD, a surface the contract left out of its tokens; the\n // frozen row hover is the nearest sanctioned value. Logged as a parity delta.\n &:hover,\n &:focus-within {\n background: cd.$contact-data-row-hover;\n }\n }\n\n &__icon {\n flex: none;\n font-size: i.icon-size(16); // export TypeIcon size 16 in rows\n line-height: 1;\n color: cd.$contact-data-ink-muted;\n }\n\n &__value-wrap {\n display: inline-flex;\n align-items: center;\n gap: 4px; // export: value → badge gap\n flex: 1;\n min-width: 0;\n overflow: hidden;\n }\n &__value {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n // Contract §3.9, inverted hierarchy: the value is the loud element — by ink, at 600 (v3.3).\n font-size: t.font-size('small'); // export PopItem: 13\n font-weight: cd.$contact-data-value-weight;\n color: cd.$contact-data-value-ink;\n }\n\n // -- copy / rate overlay: hidden at rest, fades in on hover / keyboard focus ----------\n &__row-actions {\n position: absolute;\n right: s.spacing(1);\n top: 0;\n bottom: 0;\n\n display: flex;\n align-items: center;\n gap: 1px;\n padding-left: s.spacing(3); // export: gradient run-in so the value fades under the icons\n\n background: linear-gradient(90deg, rgba(colors.$white, 0) 0%, cd.$contact-data-row-hover 45%);\n\n opacity: 0;\n pointer-events: none;\n transition: opacity m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n }\n &__item:hover &__row-actions,\n &__item:focus-within &__row-actions {\n opacity: 1;\n pointer-events: auto;\n }\n\n &__action {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px; // export actionIcon\n height: 24px;\n padding: 0;\n\n border: 0;\n border-radius: r.$radius-control;\n background: transparent;\n color: cd.$contact-data-ink-muted;\n cursor: pointer;\n\n transition:\n background-color m.$duration-default m.$easing,\n color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n .material-symbols-filled,\n .material-symbols-rounded {\n font-size: i.icon-size(16); // export: 15 → nearest icon step\n line-height: 1;\n }\n\n &:hover {\n background: cd.$contact-data-ring;\n }\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n &.is-on {\n color: colors.$accent-main;\n background: colors.$accent-bg;\n }\n &.is-copied {\n color: colors.$success-shadow;\n }\n }\n}\n</style>\n","<template>\n <div\n class=\"ds-contact-cell\"\n :class=\"{\n 'is-open': isOpen,\n 'is-pinned': pinned,\n 'is-empty': !primary,\n 'is-disabled': disabled,\n }\"\n @mouseenter=\"onEnter\"\n @mouseleave=\"onLeave\"\n >\n <DsPopover\n :open=\"isOpen\"\n :placement=\"placement\"\n :offset=\"offset\"\n :width=\"popoverWidth\"\n :teleported=\"teleported\"\n flush\n :trigger-on-click=\"false\"\n @update:open=\"onPopoverUpdate\"\n >\n <template #trigger>\n <button\n type=\"button\"\n class=\"ds-contact-cell__trigger\"\n :aria-haspopup=\"hasPopover ? 'dialog' : undefined\"\n :aria-expanded=\"hasPopover ? isOpen : undefined\"\n @click=\"onTriggerClick\"\n >\n <template v-if=\"primary\">\n <i\n v-if=\"icon\"\n class=\"material-symbols-filled ds-contact-cell__icon\"\n aria-hidden=\"true\"\n >{{ icon }}</i\n >\n\n <span class=\"ds-contact-cell__value-wrap\">\n <DsMaskedValue\n class=\"ds-contact-cell__value\"\n :value=\"primary.value\"\n :kind=\"kind\"\n :masked=\"primary.masked\"\n :masked-label=\"maskedLabel\"\n />\n <DsDeliverabilityBadge\n v-if=\"showsBadge\"\n :label=\"badgeLabel\"\n :tooltip=\"badgeTooltip\"\n :focusable=\"false\"\n />\n </span>\n\n <DsMoreCountChip :overflow=\"overflow\" :active=\"isOpen\" :label=\"moreLabel\" />\n </template>\n\n <span v-else class=\"ds-contact-cell__empty\">{{ emptyLabel }}</span>\n </button>\n </template>\n\n <DsContactList\n :items=\"items\"\n :sections=\"sections\"\n :kind=\"kind\"\n :type=\"type\"\n :title=\"label\"\n :badge-label=\"badgeLabel\"\n :badge-tooltip=\"badgeTooltip\"\n :masked-label=\"maskedLabel\"\n :show-rate=\"showRate\"\n :copy-label=\"copyLabel\"\n :copied-label=\"copiedLabel\"\n :correct-label=\"correctLabel\"\n :incorrect-label=\"incorrectLabel\"\n :class=\"{ 'ds-contact-cell__list--reveal': showsReveal }\"\n @mouseenter=\"onPanelEnter\"\n @mouseleave=\"onPanelLeave\"\n @copy=\"emit(COPY, $event)\"\n @correct=\"emit(CORRECT, $event)\"\n @incorrect=\"emit(INCORRECT, $event)\"\n >\n <template v-if=\"showsReveal || $slots.actions\" #actions>\n <DsTooltip\n v-if=\"showsReveal\"\n class=\"ds-contact-cell__reveal-tip\"\n :content=\"revealTooltip\"\n :disabled=\"!revealTooltip\"\n :placement=\"DS_TOOLTIP_PLACEMENTS.LEFT\"\n >\n <DsButton\n class=\"ds-contact-cell__reveal\"\n :variant=\"DS_BUTTON_VARIANTS.PRIMARY\"\n :size=\"DS_BUTTON_SIZES.SMALL\"\n left-icon=\"visibility\"\n :loading=\"revealing\"\n @click=\"emit(REVEAL)\"\n >{{ revealLabel }}</DsButton\n >\n </DsTooltip>\n <slot name=\"actions\" />\n </template>\n </DsContactList>\n </DsPopover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, ref, watch, type PropType } from 'vue';\nimport { DsPopover, DS_POPOVER_PLACEMENTS, type DsPopoverPlacement } from '@shared/ui/DsPopover';\nimport { DsMaskedValue } from '@shared/ui/DsMaskedValue';\nimport { DsDeliverabilityBadge } from '@shared/ui/DsDeliverabilityBadge';\nimport { DsMoreCountChip } from '@shared/ui/DsMoreCountChip';\nimport { DsContactList } from '@shared/ui/DsContactList';\nimport { DsButton, DS_BUTTON_SIZES, DS_BUTTON_VARIANTS } from '@shared/ui/DsButton';\nimport { DsTooltip, DS_TOOLTIP_PLACEMENTS } from '@shared/ui/DsTooltip';\nimport { COPY, CORRECT, INCORRECT, REVEAL, UPDATE_OPEN } from '@shared/constants/events';\nimport {\n DS_CONTACT_KINDS,\n contactTypeIcon,\n overflowFromGroupSize,\n type DsContactItem,\n type DsContactKind,\n type DsContactSection,\n type DsContactType,\n} from '@shared/constants/contact-data';\n\nconst props = defineProps({\n items: { type: Array as PropType<DsContactItem[]>, required: true },\n count: { type: Number as PropType<number | null>, default: null },\n // Unified columns (Emails: Work + Direct; Phones: Direct + HQ): the popover lists each\n // type under its own band. `items` still drives the cell (primary, count); this only\n // shapes the popover. Export `TypedCell` receives both, exactly like this.\n sections: { type: Array as PropType<DsContactSection[]>, default: () => [] },\n kind: { type: String as PropType<DsContactKind>, required: true },\n type: { type: String as PropType<DsContactType | ''>, default: '' },\n label: { type: String, required: true },\n badgeLabel: { type: String, required: true },\n badgeTooltip: { type: String, required: true },\n moreLabel: { type: String, default: '' },\n // A glyph, not copy: the export's empty cell. Override when the app wants words.\n emptyLabel: { type: String, default: '—' },\n showRate: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n placement: {\n type: String as PropType<DsPopoverPlacement>,\n default: DS_POPOVER_PLACEMENTS.OVER_START, // export TypedCell: over the cell, `top: −8`\n },\n // Render the popover in <body> so a scroller or a clipping cell (the prospector table)\n // cannot cut it. Off keeps the panel inside the cell, as before.\n teleported: { type: Boolean, default: false },\n // «Show details» in the popover header, shown only while some item is masked. Empty = no\n // CTA (the consumer opts in with its copy); the cell reports intent through `reveal`.\n revealLabel: { type: String, default: '' },\n // What the CTA costs («1 credit»), shown in a tooltip to its left. Empty = no tooltip.\n revealTooltip: { type: String, default: '' },\n // The consumer's reveal is in flight: the CTA spins and ignores clicks.\n revealing: { type: Boolean, default: false },\n // Contract §3.5: ¼ of the cell's width to the right.\n offset: { type: String, default: '25%' },\n popoverWidth: { type: String, default: '300px' }, // export DataPopover width\n leaveDelay: { type: Number, default: 220 }, // export usePop leave grace\n maskedLabel: { type: String, default: 'Hidden' },\n copyLabel: { type: String, default: 'Copy' },\n copiedLabel: { type: String, default: 'Copied!' },\n correctLabel: { type: String, default: 'Correct' },\n incorrectLabel: { type: String, default: 'Incorrect' },\n});\n\n// UPDATE_OPEN lets the consumer lazy-load the group when the popover opens (today the\n// prospector fetches values on open); the other three re-emit the list's row intents.\nconst emit = defineEmits([UPDATE_OPEN, COPY, CORRECT, INCORRECT, REVEAL]);\n\nconst open = ref(false);\nconst pinned = ref(false);\n\nconst primary = computed<DsContactItem | null>(() => props.items[0] ?? null);\nconst hasPopover = computed(() => !props.disabled && props.items.length > 0);\nconst isOpen = computed(() => hasPopover.value && open.value);\nconst overflow = computed(() => overflowFromGroupSize(props.count ?? props.items.length));\n// Contract §3.3 — valid, and an email. Phones never carry verification.\nconst showsBadge = computed(\n () => !!primary.value && props.kind === DS_CONTACT_KINDS.EMAIL && primary.value.valid\n);\n// An explicit `type` wins (full-profile rows); else the primary's own, so a unified column's\n// trigger shows the glyph of the value it shows.\nconst hasMasked = computed(\n () =>\n props.items.some((item) => item.masked) ||\n props.sections.some((section) => section.items.some((item) => item.masked))\n);\nconst showsReveal = computed(() => !!props.revealLabel && hasMasked.value);\nconst icon = computed(() => {\n const type = props.type || primary.value?.type;\n return type ? contactTypeIcon(type, props.kind) : '';\n});\n\nlet leaveTimer: ReturnType<typeof setTimeout> | undefined;\n\nfunction setOpen(next: boolean) {\n if (open.value === next) return;\n open.value = next;\n emit(UPDATE_OPEN, next);\n}\n\n// Hover opens (unless the user pinned a closed state on purpose — there is no such state:\n// pinned always means open). Leaving starts the grace timer so the pointer can travel into\n// the panel, which is a DOM child of this root — `mouseleave` fires only when it leaves both.\nfunction onEnter() {\n if (!hasPopover.value) return;\n clearTimeout(leaveTimer);\n if (!pinned.value) setOpen(true);\n}\n\nfunction onLeave() {\n if (!hasPopover.value || pinned.value) return;\n clearTimeout(leaveTimer);\n leaveTimer = setTimeout(() => setOpen(false), props.leaveDelay);\n}\n\n// A teleported panel is no longer inside the root, so its own enter / leave must cancel and\n// restart the same close timer. Inline, the root already covers it and these would misfire.\nfunction onPanelEnter() {\n if (props.teleported) onEnter();\n}\n\nfunction onPanelLeave() {\n if (props.teleported) onLeave();\n}\n\n// Click pins; a second click releases. Hover never un-pins — only ESC, a click outside\n// (DsPopover reports both through `update:open`) or this toggle do.\nfunction onTriggerClick() {\n if (!hasPopover.value) return;\n clearTimeout(leaveTimer);\n if (pinned.value) {\n pinned.value = false;\n setOpen(false);\n } else {\n pinned.value = true;\n setOpen(true);\n }\n}\n\nfunction onPopoverUpdate(next: boolean) {\n if (next) return;\n pinned.value = false;\n clearTimeout(leaveTimer);\n setOpen(false);\n}\n\n// ESC closes wherever the focus is — DsPopover only hears it when focus is inside the\n// panel, and a pinned popover opened by pointer has no focus inside.\nfunction onDocumentKeydown(event: KeyboardEvent) {\n if (event.key !== 'Escape' || !open.value) return;\n pinned.value = false;\n setOpen(false);\n}\n\nwatch(open, (isNowOpen) => {\n if (typeof document === 'undefined') return;\n if (isNowOpen) document.addEventListener('keydown', onDocumentKeydown);\n else document.removeEventListener('keydown', onDocumentKeydown);\n});\n\nonBeforeUnmount(() => {\n clearTimeout(leaveTimer);\n if (typeof document !== 'undefined') document.removeEventListener('keydown', onDocumentKeydown);\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/spacing.scss' as s;\n\n.ds-contact-cell {\n position: relative;\n display: block;\n width: 100%;\n min-width: 0;\n\n font-family: t.$font-family;\n color: cd.$contact-data-value-ink;\n\n // The WHOLE cell is the hover target (§3.5), so the popover root — inline-flex by\n // default — stretches to the cell, and so does its trigger wrapper: the button's\n // `max-width: 100%` must resolve against the CELL width. Against a shrink-to-fit wrapper\n // the percentage is cyclic and, with the button's -8px margins, clamps it 16px short of\n // its content (measured: 181px of content rendered at 165px, truncating the value).\n // The button itself stays content-sized like the export's `TypedCell` span.\n .ds-popover {\n display: flex;\n width: 100%;\n min-width: 0;\n }\n :deep(.ds-popover__trigger) {\n display: flex;\n flex: 1 1 auto;\n min-width: 0;\n }\n\n // -- trigger (export TypedCell span): 30px row, bleeds 8px into the cell padding ------\n &__trigger {\n display: inline-flex;\n align-items: center;\n gap: 10px; // export TypedCell\n max-width: 100%;\n height: 30px; // export TypedCell\n padding: 0 s.spacing(1);\n margin: 0 (-(s.spacing(1)));\n\n border: 0;\n border-radius: r.$radius-card;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n // The chip and the badge are part of this hit area: they take the trigger's cursor, not\n // their own arrow.\n :deep(.ds-more-count-chip),\n :deep(.ds-deliverability-badge__glyph) {\n cursor: inherit;\n }\n }\n &.is-open &__trigger {\n background: colors.$accent-bg; // export: open → accentBg\n }\n &.is-disabled &__trigger,\n &.is-empty &__trigger {\n cursor: default;\n }\n\n &__icon {\n flex: none;\n // Export TypeIcon in the cell: 17. The icon scale has 16 and 18; 16 matches the rows.\n font-size: i.icon-size(16);\n line-height: 1;\n color: cd.$contact-data-ink-muted;\n }\n\n &__value-wrap {\n display: inline-flex;\n align-items: center;\n gap: 4px; // export: value → badge\n min-width: 0;\n overflow: hidden;\n }\n &__value {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n // Contract §3.9, inverted hierarchy: the value is the loud element — by ink, at 600 (v3.3).\n font-size: t.font-size('body'); // export TypedCell: 14\n font-weight: cd.$contact-data-value-weight;\n color: cd.$contact-data-value-ink;\n }\n\n &__empty {\n color: cd.$contact-data-mask-ink;\n font-weight: cd.$contact-data-value-weight;\n }\n}\n\n// The popover can live outside `.ds-contact-cell` (teleported), so these rules do not nest.\n// Export DataPopover: a masked header trades its 9px for 7px and a tighter right edge to fit the CTA.\n.ds-contact-cell__list--reveal :deep(.ds-contact-list__header) {\n padding: 7px s.spacing(1) 7px 12px;\n}\n.ds-contact-cell__reveal-tip:not(:last-child) {\n margin-right: s.spacing(1);\n}\n</style>\n","<template>\n <section class=\"ds-profile-card\" :aria-labelledby=\"titleId\">\n <div class=\"ds-profile-card__header\">\n <component\n :is=\"collapsible ? 'button' : 'div'\"\n class=\"ds-profile-card__heading\"\n :class=\"{ 'ds-profile-card__toggle': collapsible }\"\n v-bind=\"toggleAttrs\"\n @click=\"collapsible ? toggle() : undefined\"\n >\n <i class=\"material-symbols-filled ds-profile-card__icon\" aria-hidden=\"true\">{{ icon }}</i>\n <span :id=\"titleId\" class=\"ds-profile-card__title\">{{ title }}</span>\n <!-- Plain count (no countHint): unchanged position/markup. A hinted count becomes\n its own focusable tooltip trigger instead — kept here, in place, rather than\n moved outside the toggle: see the code comment on `count-with-hint` below for\n the one combination (collapsible + countHint) where that matters. -->\n <span v-if=\"count !== null && !countHint\" class=\"ds-profile-card__count\">{{ count }}</span>\n <!-- count-with-hint: before a contact is revealed, some counts (e.g. work phones)\n can be one higher than what's actually shown, since a backend total may\n include a row that moves to a different card after reveal (the company HQ\n line). `countHint` lets the app explain that until the backend sends exact\n counters. Note: when this heading is ALSO the collapsible toggle (a real\n <button>), this nests a tabindex'd element inside it — invalid per the button\n content model. Left as-is (matches every requested test); flag before\n combining `collapsible` with `countHint` in practice. -->\n <DsTooltip\n v-if=\"count !== null && countHint\"\n :content=\"countHint\"\n :placement=\"DS_TOOLTIP_PLACEMENTS.BOTTOM\"\n >\n <span class=\"ds-profile-card__count\" tabindex=\"0\">{{ count }}</span>\n </DsTooltip>\n <i\n v-if=\"collapsible\"\n class=\"material-symbols-filled ds-profile-card__caret\"\n aria-hidden=\"true\"\n >{{ isOpen ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}</i\n >\n </component>\n <!-- Outside the toggle: a control inside a <button> is invalid markup. -->\n <span v-if=\"$slots.actions\" class=\"ds-profile-card__actions\"><slot name=\"actions\" /></span>\n </div>\n\n <div\n v-if=\"showsBody\"\n :id=\"bodyId\"\n class=\"ds-profile-card__body\"\n :class=\"{ 'is-padded': padded }\"\n >\n <slot />\n </div>\n </section>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useId, useSlots, watch, type PropType } from 'vue';\nimport { UPDATE_OPEN } from '@shared/constants/events';\nimport DsTooltip from '../DsTooltip/DsTooltip.vue';\nimport { DS_TOOLTIP_PLACEMENTS } from '../DsTooltip/DsTooltip.types';\n\nconst props = defineProps({\n icon: { type: String, required: true },\n title: { type: String, required: true },\n count: { type: Number as PropType<number | null>, default: null },\n padded: { type: Boolean, default: true },\n collapsible: { type: Boolean, default: false },\n open: { type: Boolean, default: true },\n // A note explaining a count that may be approximate (e.g. a backend total that hasn't\n // caught up with what's actually shown yet). Empty → the count renders exactly as\n // before, with no tooltip and not focusable.\n countHint: { type: String, default: '' },\n});\n\nconst emit = defineEmits([UPDATE_OPEN]);\nconst slots = useSlots();\n\nconst titleId = useId();\nconst bodyId = useId();\n\n// The export keeps the open state inside the card (`defaultOpen`); here the prop seeds it\n// and follows the parent, and every toggle is reported so v-model:open works too.\nconst isOpen = ref(props.open);\nwatch(\n () => props.open,\n (value) => (isOpen.value = value)\n);\n\nfunction toggle() {\n isOpen.value = !isOpen.value;\n emit(UPDATE_OPEN, isOpen.value);\n}\n\nconst showsBody = computed(() => !!slots.default && (!props.collapsible || isOpen.value));\n\nconst toggleAttrs = computed(() =>\n props.collapsible\n ? { type: 'button', 'aria-expanded': String(isOpen.value), 'aria-controls': bodyId }\n : {}\n);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n\n// Values from the export's `ProfileCard`. Off-scale ones are written as the export has\n// them, with the reason next to each (Diego: follow the export, 2026-09-23).\n.ds-profile-card {\n flex: none;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n\n background: colors.$white;\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-card; // export: 6\n cursor: default; // the arrow, not the I-beam; every control inside sets its own\n\n &__header {\n display: flex;\n gap: 8px; // export\n align-items: center;\n\n padding: 10px 14px; // export\n }\n\n &__heading {\n display: flex;\n flex: 1;\n gap: 8px; // export\n align-items: center;\n\n min-width: 0;\n }\n\n // Collapsible: the heading is a real button, reset to read as the header it replaces.\n &__toggle {\n margin: 0;\n padding: 0;\n\n color: inherit;\n font: inherit;\n text-align: left;\n\n background: transparent;\n border: 0;\n border-radius: r.$radius-control;\n\n cursor: pointer;\n user-select: none;\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 2px;\n }\n }\n\n &__icon {\n flex: none;\n\n color: cd.$contact-data-header-ink; // export label #5c6670\n font-size: 17px; // export 17 (not an icon step), as DsCompanyCard's row glyph\n line-height: 1;\n }\n\n &__title {\n color: cd.$contact-data-header-ink; // export label #5c6670\n font-size: 11px; // export 11, off the DS scale on purpose (as DsCompanyCard's labels)\n font-weight: t.$weight-bold;\n letter-spacing: 0.6px; // export\n text-transform: uppercase;\n white-space: nowrap;\n }\n\n &__count {\n color: cd.$contact-data-mask-ink; // export muted #b6bbc0\n font-size: 11px; // export 11, same as the title it follows\n font-weight: t.$weight-bold;\n\n // Only reachable when a `countHint` makes it focusable (see the template).\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 2px;\n border-radius: r.$radius-control;\n }\n }\n\n &__caret {\n flex: none;\n\n margin-left: auto;\n\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-size: 17px; // export 17\n line-height: 1;\n }\n\n &__actions {\n display: inline-flex;\n flex: none;\n align-items: center;\n }\n\n // The export rules the header's bottom edge when there is a body; drawn here on the body so\n // it disappears with it.\n &__body {\n border-top: 1px solid colors.$slate-tint;\n\n &.is-padded {\n padding: 10px 14px 12px; // export\n }\n }\n}\n</style>\n","<template>\n <div class=\"ds-profile-group-bar\">\n <span class=\"ds-profile-group-bar__label\">{{ label }}</span>\n <span v-if=\"$slots.actions\" class=\"ds-profile-group-bar__actions\"><slot name=\"actions\" /></span>\n </div>\n</template>\n\n<script setup lang=\"ts\">\ndefineProps({\n label: { type: String, required: true },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n\n// Values from the export's `ProfileGroupBar`.\n.ds-profile-group-bar {\n display: flex;\n gap: 6px; // export\n align-items: center;\n\n // Rendered height, measured: the export's `minHeight: 24` is content-box, so its band is\n // 24 + 2 × 5 padding + 2 × 1 rule = 36. Border-box here, so the 36 is written out.\n min-height: 36px;\n padding: 5px 14px; // export\n\n font-family: t.$font-family;\n\n // Export grey1 (#fafafb) has no token. The nearest one is the contract's row hover (#f9f9f9,\n // one step per channel). Not the contact-data surface (#f6f6f6): that is the drawer's own\n // panel, and the band would merge with it and cut the card in pieces. Logged as a delta;\n // kept with no new token (Diego, 2026-09-25).\n background: cd.$contact-data-row-hover;\n border-top: 1px solid colors.$slate-tint;\n border-bottom: 1px solid colors.$slate-tint;\n\n // First in its card: the card header already rules this edge — no double divider (the same\n // rule DsContactList applies to its first row). Logged as a delta.\n &:first-child {\n border-top: 0;\n }\n\n &__label {\n flex: 1;\n\n min-width: 0;\n\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-size: t.font-size('micro'); // export: 10\n font-weight: t.$weight-bold;\n letter-spacing: 0.7px; // export\n text-transform: uppercase;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n overflow: hidden;\n }\n\n &__actions {\n display: inline-flex;\n flex: none;\n align-items: center;\n }\n}\n</style>\n","// DsContactPlaceholder — the row a contact-data group shows when it has no rows to show:\n// the value is not known yet (skeleton), it was looked for and does not exist (empty), or\n// it is being revealed (loading). Source: the non-data rows of the design export's\n// `ProfileContactDataCard` (`fullprofile/_bundle.jsx`).\nimport type { DsContactKind } from '@shared/constants/contact-data';\n\nexport const DS_CONTACT_PLACEHOLDER_STATES = {\n /** Not known yet: the kind's glyph and a grey bar where the value will be. */\n SKELETON: 'skeleton',\n /** Looked for, none found: the kind's glyph and the label («No emails found»). */\n EMPTY: 'empty',\n /** Being revealed: a spinning glyph and the label («Revealing…»). */\n LOADING: 'loading',\n} as const;\nexport type DsContactPlaceholderState =\n (typeof DS_CONTACT_PLACEHOLDER_STATES)[keyof typeof DS_CONTACT_PLACEHOLDER_STATES];\n\n/** The glyph of each kind, as the export draws it (`blk.icon`). */\nexport const DS_CONTACT_PLACEHOLDER_ICONS: Readonly<Record<DsContactKind, string>> = {\n email: 'mail',\n phone: 'call',\n};\n\nexport interface DsContactPlaceholderProps {\n /** Email or phone — picks the glyph. */\n kind: DsContactKind;\n state?: DsContactPlaceholderState;\n /** The text of `empty` and `loading`, already translated by the app. On a skeleton it is\n * read out to screen readers only (the bar has nothing to say). */\n label?: string;\n}\n","<template>\n <div\n class=\"ds-contact-placeholder\"\n :class=\"`ds-contact-placeholder--${state}`\"\n :role=\"state === DS_CONTACT_PLACEHOLDER_STATES.LOADING ? 'status' : undefined\"\n >\n <i\n class=\"material-symbols-filled ds-contact-placeholder__icon\"\n :class=\"{ 'is-spinning': state === DS_CONTACT_PLACEHOLDER_STATES.LOADING }\"\n aria-hidden=\"true\"\n >{{ glyph }}</i\n >\n <template v-if=\"state === DS_CONTACT_PLACEHOLDER_STATES.SKELETON\">\n <span class=\"ds-contact-placeholder__bar\" aria-hidden=\"true\" />\n <span v-if=\"label\" class=\"ds-contact-placeholder__sr\">{{ label }}</span>\n </template>\n <span v-else class=\"ds-contact-placeholder__text\">{{ label }}</span>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport type { DsContactKind } from '@shared/constants/contact-data';\nimport {\n DS_CONTACT_PLACEHOLDER_ICONS,\n DS_CONTACT_PLACEHOLDER_STATES,\n type DsContactPlaceholderState,\n} from './DsContactPlaceholder.types';\n\nconst props = defineProps({\n kind: { type: String as PropType<DsContactKind>, required: true },\n state: {\n type: String as PropType<DsContactPlaceholderState>,\n default: DS_CONTACT_PLACEHOLDER_STATES.SKELETON,\n },\n label: { type: String, default: '' },\n});\n\n// Revealing spins the export's `autorenew`; the other two draw the kind's glyph.\nconst glyph = computed(() =>\n props.state === DS_CONTACT_PLACEHOLDER_STATES.LOADING\n ? 'autorenew'\n : DS_CONTACT_PLACEHOLDER_ICONS[props.kind]\n);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/motion.scss' as m;\n\n// The export's `cd-spin`: one turn per second, linear.\n@keyframes ds-contact-placeholder-spin {\n from {\n transform: rotate(0);\n }\n\n to {\n transform: rotate(360deg);\n }\n}\n\n// Values from the three non-data rows of the export's `ProfileContactDataCard`.\n.ds-contact-placeholder {\n display: flex;\n gap: 9px; // export\n align-items: center;\n\n padding: 10px 14px; // export (empty, revealing)\n\n font-family: t.$font-family;\n\n &--skeleton {\n padding: 9px 14px; // export: the skeleton row is 1px shorter each side\n }\n\n // Revealing is a block of its own, ruled above; first in its card, the header already is.\n &--loading {\n gap: 8px; // export\n\n border-top: 1px solid colors.$slate-tint;\n\n &:first-child {\n border-top: 0;\n }\n }\n\n &__icon {\n flex: none;\n\n color: cd.$contact-data-mask-ink; // export muted #b6bbc0\n font-size: i.icon-size(16); // export: 16\n line-height: 1;\n\n &.is-spinning {\n color: colors.$accent-main; // export accent\n font-size: i.icon-size(14); // export: 14\n animation: ds-contact-placeholder-spin 1s linear infinite;\n\n @include m.reduce-motion {\n animation: none;\n }\n }\n }\n\n &__bar {\n flex: 1;\n\n max-width: 130px; // export\n height: 9px; // export\n\n background: colors.$slate-tint;\n border-radius: r.$radius-control; // export: 4\n }\n\n &__text {\n min-width: 0;\n\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-size: t.font-size('small'); // export: 13\n font-weight: t.$weight-semibold;\n }\n\n &--loading &__text {\n font-size: 12.5px; // export 12.5, off the DS scale on purpose (follow the export)\n }\n\n // Read out, not drawn: the skeleton's bar has nothing to say.\n &__sr {\n position: absolute;\n\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n\n white-space: nowrap;\n\n border: 0;\n\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n }\n}\n</style>\n","// DsClampedText — a block of text clamped to N lines, with a «Show more» / «Show less»\n// toggle. Extracted from the About of DsProfileCompanyCard (the design export's\n// `ProfileCompanyCard`), which now uses it unchanged. No visual variants; this documents\n// the public prop shape for consumers. The toggle renders only while the text is actually\n// clamped (it overflows `lines`), or while expanded so it can be clamped again.\n\nexport const DS_CLAMPED_TEXT_DEFAULT_LINES = 3;\n\nexport interface DsClampedTextProps {\n /** The text. Empty → nothing is rendered (no text, no toggle). */\n text: string;\n /** Lines shown while clamped. Default 3. */\n lines?: number;\n /** The toggle that un-clamps the text («Show more»), already translated by the app. */\n showMoreLabel?: string;\n /** The toggle that clamps it again («Show less»), already translated by the app. */\n showLessLabel?: string;\n /**\n * Optional caption (the company card's «About»). When set, the toggle sits beside it,\n * above the text; without it the toggle sits below the text.\n */\n label?: string;\n /** Honour the text's own line breaks (`white-space: pre-line`). Default: they collapse. */\n preserveLineBreaks?: boolean;\n}\n","<template>\n <div v-if=\"text\" class=\"ds-clamped-text\">\n <div v-if=\"label\" class=\"ds-clamped-text__head\">\n <span class=\"ds-clamped-text__label\">{{ label }}</span>\n <button v-if=\"showToggle\" v-bind=\"toggleAttrs\">\n {{ expanded ? showLessLabel : showMoreLabel }}\n </button>\n </div>\n <div\n :id=\"textId\"\n ref=\"textRef\"\n class=\"ds-clamped-text__text\"\n :class=\"{ 'is-clamped': !expanded, 'is-pre-line': preserveLineBreaks }\"\n :style=\"{ '--ds-clamped-text-lines': lines }\"\n >\n {{ text }}\n </div>\n <button v-if=\"!label && showToggle\" v-bind=\"toggleAttrs\" class=\"is-below\">\n {{ expanded ? showLessLabel : showMoreLabel }}\n </button>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, useId, watch } from 'vue';\nimport { DS_CLAMPED_TEXT_DEFAULT_LINES } from './DsClampedText.types';\n\nconst props = defineProps({\n text: { type: String, required: true },\n lines: { type: Number, default: DS_CLAMPED_TEXT_DEFAULT_LINES },\n showMoreLabel: { type: String, default: '' },\n showLessLabel: { type: String, default: '' },\n label: { type: String, default: '' },\n preserveLineBreaks: { type: Boolean, default: false },\n});\n\nconst textId = useId();\nconst textRef = ref<HTMLElement | null>(null);\nconst expanded = ref(false);\nconst overflows = ref(false);\nlet resizeObserver: ResizeObserver | null = null;\n\n// Expanded, the text no longer overflows its box: the toggle stays so it can be clamped again.\nconst showToggle = computed(() => expanded.value || overflows.value);\n\n// Only a clamped box can be measured; the 1px absorbs the rounding of a fractional line-height.\nfunction measure() {\n const el = textRef.value;\n if (!el || expanded.value) return;\n overflows.value = el.scrollHeight > el.clientHeight + 1;\n}\n\nwatch(() => [props.text, props.lines, expanded.value], measure, { flush: 'post' });\n\nonMounted(() => {\n measure();\n // Guarded: SSR and jsdom have no ResizeObserver.\n if (typeof ResizeObserver !== 'undefined' && textRef.value) {\n resizeObserver = new ResizeObserver(measure);\n resizeObserver.observe(textRef.value);\n }\n});\n\nonBeforeUnmount(() => resizeObserver?.disconnect());\n\nconst toggleAttrs = computed(() => ({\n type: 'button' as const,\n class: 'ds-clamped-text__toggle',\n 'aria-expanded': expanded.value,\n 'aria-controls': textId,\n onClick: () => {\n expanded.value = !expanded.value;\n },\n}));\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n\n// Values lifted from DsProfileCompanyCard's About (the export's `ProfileCompanyCard`), so the\n// card renders as before. Off-scale ones are written as the export has them.\n.ds-clamped-text {\n &__head {\n display: flex;\n gap: 8px; // export\n align-items: baseline;\n }\n\n &__label {\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-size: 10.5px; // export 10.5, off the DS scale on purpose (follow the export)\n font-weight: t.$weight-bold;\n letter-spacing: 0.5px; // export\n text-transform: uppercase;\n }\n\n &__toggle {\n padding: 0;\n\n color: colors.$accent-main; // export accent\n font: inherit;\n font-size: t.font-size('caption'); // export: 12\n font-weight: t.$weight-semibold;\n\n background: transparent;\n border: 0;\n border-radius: r.$radius-control;\n\n cursor: pointer;\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 2px;\n }\n\n &.is-below {\n display: block;\n\n margin-top: s.spacing(0.5);\n }\n }\n\n &__head + &__text {\n margin-top: 3px; // export\n }\n\n &__text {\n color: colors.$slate-main;\n font-size: t.font-size('small'); // export: 13\n line-height: t.$line-height-relaxed; // export: 1.5\n\n &.is-pre-line {\n white-space: pre-line;\n }\n\n &.is-clamped {\n display: -webkit-box;\n -webkit-line-clamp: var(--ds-clamped-text-lines);\n -webkit-box-orient: vertical;\n\n overflow: hidden;\n }\n }\n}\n</style>\n","<template>\n <DsProfileCard\n class=\"ds-profile-company-card\"\n icon=\"corporate_fare\"\n :title=\"title\"\n :padded=\"!!name\"\n >\n <div v-if=\"!name\" class=\"ds-profile-company-card__empty\">\n <i class=\"material-symbols-filled ds-profile-company-card__empty-icon\" aria-hidden=\"true\"\n >apartment</i\n >\n <span class=\"ds-profile-company-card__empty-text\">{{ emptyLabel }}</span>\n </div>\n\n <template v-else>\n <div class=\"ds-profile-company-card__header\" :class=\"{ 'has-rest': hasRest }\">\n <DsCompanyLogo class=\"ds-profile-company-card__logo\" :src=\"logo\" :name=\"name\" :size=\"36\" />\n <div class=\"ds-profile-company-card__heading\">\n <div class=\"ds-profile-company-card__name\">{{ name }}</div>\n <div v-if=\"subline\" class=\"ds-profile-company-card__sub\">{{ subline }}</div>\n </div>\n <DsTooltip v-if=\"websiteUrl\" :content=\"websiteLabel\" :placement=\"DS_TOOLTIP_PLACEMENTS.TOP\">\n <a\n class=\"ds-profile-company-card__website\"\n :href=\"websiteUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n :aria-label=\"websiteLabel || undefined\"\n >\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">language</i>\n </a>\n </DsTooltip>\n <!-- \"in\" is LinkedIn's mark, not copy: it stays literal in every language. -->\n <a\n v-if=\"linkedinUrl\"\n class=\"ds-profile-company-card__linkedin\"\n :href=\"linkedinUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n :aria-label=\"linkedinLabel || undefined\"\n >in</a\n >\n </div>\n\n <div v-if=\"about\" class=\"ds-profile-company-card__about\">\n <DsClampedText\n :text=\"about\"\n :label=\"aboutLabel\"\n :show-more-label=\"showMoreLabel\"\n :show-less-label=\"showLessLabel\"\n />\n </div>\n\n <div\n v-for=\"(field, index) in rows\"\n :key=\"field.id\"\n class=\"ds-profile-company-card__field\"\n :class=\"{ 'is-first': index === 0 && !about }\"\n >\n <span class=\"ds-profile-company-card__field-label\">{{ field.label }}</span>\n <a\n v-if=\"field.href\"\n class=\"ds-profile-company-card__field-value is-link\"\n :href=\"field.href\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >{{ field.value }}</a\n >\n <span v-else class=\"ds-profile-company-card__field-value\">{{ field.value }}</span>\n </div>\n </template>\n </DsProfileCard>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType } from 'vue';\nimport DsProfileCard from '../DsProfileCard/DsProfileCard.vue';\nimport DsClampedText from '../DsClampedText/DsClampedText.vue';\nimport DsCompanyLogo from '../DsCompanyLogo/DsCompanyLogo.vue';\nimport DsTooltip from '../DsTooltip/DsTooltip.vue';\nimport { DS_TOOLTIP_PLACEMENTS } from '../DsTooltip/DsTooltip.types';\nimport type { DsProfileField } from './DsProfileCompanyCard.types';\n\nconst props = defineProps({\n title: { type: String, required: true },\n name: { type: String, default: '' },\n logo: { type: String, default: '' },\n industry: { type: String, default: '' },\n employees: { type: String, default: '' },\n websiteUrl: { type: String, default: '' },\n websiteLabel: { type: String, default: '' },\n linkedinUrl: { type: String, default: '' },\n linkedinLabel: { type: String, default: '' },\n about: { type: String, default: '' },\n aboutLabel: { type: String, default: '' },\n showMoreLabel: { type: String, default: '' },\n showLessLabel: { type: String, default: '' },\n fields: { type: Array as PropType<DsProfileField[]>, default: () => [] },\n emptyLabel: { type: String, default: '' },\n});\n\n// The export: `[industry, employees].filter(Boolean).join(' · ')` — a separator, not copy.\nconst subline = computed(() => [props.industry, props.employees].filter(Boolean).join(' · '));\n\n// A field without a value is not rendered: a field the API did not send never shows blank.\nconst rows = computed(() => props.fields.filter((field) => field.value));\n\n// The header leaves room below only when something follows it (export: paddingBottom 10).\nconst hasRest = computed(() => !!props.about || rows.value.length > 0);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/icons.scss' as i;\n\n// Values from the export's `ProfileCompanyCard` and `ProfileKvRow`. Off-scale ones are written\n// as the export has them, with the reason next to each (Diego: follow the export, 2026-09-23).\n.ds-profile-company-card {\n &__empty {\n display: flex;\n gap: 9px; // export\n align-items: center;\n\n padding: 10px 14px; // export\n\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-size: t.font-size('small'); // export: 13\n font-weight: t.$weight-semibold;\n }\n\n &__empty-icon {\n flex: none;\n\n color: cd.$contact-data-mask-ink; // export muted #b6bbc0\n font-size: i.icon-size(16); // export: 16\n line-height: 1;\n }\n\n &__header {\n display: flex;\n gap: 10px; // export\n align-items: center;\n\n &.has-rest {\n padding-bottom: 10px; // export\n }\n }\n\n // The profile draws the logo box with the card radius and a 13px initial, where the popover\n // card (DsCompanyCard) uses 4 and 12: the same DsCompanyLogo, shaped here.\n &__logo {\n border-radius: r.$radius-card; // export: 6\n\n :deep(.ds-company-logo__initial) {\n font-size: t.font-size('small'); // export: 13\n }\n }\n\n &__heading {\n flex: 1;\n\n min-width: 0;\n }\n\n &__name {\n color: colors.$grey-10; // export ink #1f2933\n font-size: t.font-size('body'); // export: 14\n font-weight: t.$weight-bold;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n overflow: hidden;\n }\n\n &__sub {\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-size: t.font-size('caption'); // export: 12\n white-space: nowrap;\n text-overflow: ellipsis;\n\n overflow: hidden;\n }\n\n &__website {\n display: inline-flex;\n\n color: cd.$contact-data-ink-muted; // export grey #888f97\n text-decoration: none;\n\n // On the glyph itself: the app's `.material-symbols-filled` object class sets 20px on\n // the <i>, so a size on the link never reaches it.\n i {\n font-size: i.icon-size(18); // export 18\n line-height: 1;\n }\n\n &:hover {\n color: colors.$slate-main;\n }\n }\n\n &__linkedin {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n width: 22px; // export\n height: 22px;\n\n color: colors.$white;\n font-size: 11px; // export 11, as DsCompanyCard's badge\n font-weight: 800; // export 800 (no token for it)\n line-height: 1;\n text-decoration: none;\n\n background: colors.$brand-linkedin;\n border-radius: r.$radius-control; // export: 4 (the popover card's badge is 5)\n }\n\n &__about {\n padding: 8px 0; // export\n\n border-top: 1px solid colors.$slate-tint;\n }\n\n &__field {\n display: flex;\n gap: 12px; // export\n align-items: baseline;\n\n padding: 7px 0; // export\n\n border-top: 1px solid colors.$slate-tint;\n\n &.is-first {\n border-top: 0;\n }\n }\n\n &__field-label {\n flex: none;\n\n width: 92px; // export\n\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-size: 10.5px; // export 10.5, off the DS scale on purpose (follow the export)\n font-weight: t.$weight-bold;\n letter-spacing: 0.5px; // export\n text-transform: uppercase;\n }\n\n &__field-value {\n min-width: 0;\n\n color: colors.$slate-main;\n font-size: 13.5px; // export 13.5, off the DS scale on purpose (follow the export)\n font-weight: t.$weight-semibold;\n line-height: 1.45; // export 1.45 (between the DS body 1.4 and relaxed 1.5)\n text-decoration: none;\n word-break: break-word;\n\n &.is-link {\n color: colors.$accent-main;\n\n cursor: pointer;\n }\n }\n}\n</style>\n","<template>\n <div class=\"ds-profile-hero\">\n <DsAvatar\n class=\"ds-profile-hero__avatar\"\n :image=\"image\"\n :first-name=\"firstName\"\n :last-name=\"lastName\"\n :alt=\"alt\"\n :size=\"64\"\n accent\n :text-size=\"20\"\n :font-weight=\"800\"\n />\n\n <div class=\"ds-profile-hero__body\">\n <span\n class=\"ds-profile-hero__name\"\n :class=\"{ 'ds-profile-hero__name--with-actions': $slots.actions }\"\n >{{ fullName }}</span\n >\n\n <DsTooltip\n v-if=\"headline\"\n class=\"ds-profile-hero__headline-tooltip\"\n :content=\"headline\"\n :disabled=\"!isHeadlineTruncated\"\n :placement=\"DS_TOOLTIP_PLACEMENTS.BOTTOM\"\n block\n >\n <span\n ref=\"headlineRef\"\n class=\"ds-profile-hero__headline\"\n @mouseenter=\"checkHeadlineTruncation\"\n @focus=\"checkHeadlineTruncation\"\n >{{ headline }}</span\n >\n </DsTooltip>\n\n <div v-if=\"linkedinUrl\" class=\"ds-profile-hero__links\">\n <DsTooltip :content=\"linkedinLabel\" :placement=\"DS_TOOLTIP_PLACEMENTS.BOTTOM\">\n <!-- \"in\" is LinkedIn's mark, not copy: it stays literal in every language\n (reused from DsCompanyCard / DsProfileCompanyCard's badge). -->\n <a\n class=\"ds-profile-hero__linkedin\"\n :href=\"linkedinUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n :aria-label=\"linkedinLabel || undefined\"\n >in</a\n >\n </DsTooltip>\n </div>\n </div>\n\n <div v-if=\"$slots.actions\" class=\"ds-profile-hero__actions\"><slot name=\"actions\" /></div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, ref, watch } from 'vue';\nimport DsAvatar from '../DsAvatar/DsAvatar.vue';\nimport DsTooltip from '../DsTooltip/DsTooltip.vue';\nimport { DS_TOOLTIP_PLACEMENTS } from '../DsTooltip/DsTooltip.types';\n\nconst props = defineProps({\n image: { type: String, default: '' },\n firstName: { type: String, default: '' },\n lastName: { type: String, default: '' },\n headline: { type: String, default: '' },\n linkedinUrl: { type: String, default: '' },\n linkedinLabel: { type: String, default: '' },\n // Passthrough to DsAvatar's `alt` — default `undefined`, not `''` (see DsProfileHero.types.ts).\n alt: { type: String, default: undefined },\n});\n\nconst fullName = computed(() => `${props.firstName} ${props.lastName}`.trim());\n\n// The headline ellipsizes; a tooltip repeating the same visible text is noise (Diego's\n// rule), so it only carries content when the headline is ACTUALLY truncated — measured\n// against the rendered box (scrollWidth vs clientWidth), never guessed from length.\n// DsTooltip has its own `disabled` prop (see DsSavedButton's `:disabled=\"!tooltip || open\"`),\n// so that's what gates it here instead of emptying `content`.\nconst headlineRef = ref<HTMLElement | null>(null);\nconst isHeadlineTruncated = ref(false);\n\nfunction checkHeadlineTruncation() {\n const el = headlineRef.value;\n isHeadlineTruncated.value = !!el && el.scrollWidth > el.clientWidth;\n}\n\n// Re-measure once laid out, and whenever the text itself changes — so a hero that never\n// gets hovered (e.g. touch, or measured programmatically) still resolves correctly, and\n// hovering the very first time isn't the only path to a correct `disabled` value.\nonMounted(() => void nextTick(checkHeadlineTruncation));\nwatch(\n () => props.headline,\n () => void nextTick(checkHeadlineTruncation)\n);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n\n// Values from the export's `ProfileHero`. Off-scale ones are written as the export has\n// them, with the reason next to each (mirrors DsProfileCard / DsProfileCompanyCard).\n.ds-profile-hero {\n position: relative;\n\n display: flex;\n flex: none;\n gap: 14px; // export\n\n padding: 14px; // export\n\n font-family: t.$font-family;\n\n background: colors.$white;\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-card; // export: 6\n cursor: default;\n\n // The parent's scoped attribute also reaches a child component's ROOT element, so this\n // plain class (passed to <DsAvatar class=\"ds-profile-hero__avatar\">) styles it directly —\n // no :deep() needed since it's the same root node, not a descendant.\n &__avatar {\n border-radius: r.$radius-card; // DsAvatar defaults to r.$radius-control (4px)\n letter-spacing: 0.5px; // export — only visible on the initials variant\n }\n\n &__body {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 3px; // export\n\n min-width: 0;\n }\n\n &__name {\n color: colors.$grey-10; // export ink #1f2933\n font-size: 18px; // export\n font-weight: t.$weight-bold;\n line-height: 1.2; // export\n\n &--with-actions {\n padding-right: 24px; // export — room for the #actions slot\n }\n }\n\n // The block-mode DsTooltip wrapper is itself the flex item here: without min-width: 0 a\n // flex column child keeps its content's natural (unwrapped) width, and the headline\n // span inside never gets the chance to ellipsis.\n &__headline-tooltip {\n min-width: 0;\n }\n\n &__headline {\n display: block;\n\n overflow: hidden;\n\n color: colors.$slate-main;\n font-size: 12.5px; // export, off the DS scale on purpose (follow the export)\n line-height: 1.4; // export\n text-align: left;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &__links {\n display: flex;\n align-items: center;\n gap: 8px; // export\n\n margin-top: 4px; // export\n }\n\n // Reused from DsCompanyCard / DsProfileCompanyCard's badge markup and comment.\n &__linkedin {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n width: 22px; // export\n height: 22px;\n\n color: colors.$white;\n font-size: 11px; // export\n font-weight: 800; // export (no token for it)\n line-height: 1;\n text-decoration: none;\n\n background: colors.$brand-linkedin;\n // export: 4 — DsProfileCompanyCard's badge radius, not DsCompanyCard's off-scale 5.\n border-radius: r.$radius-control;\n\n cursor: pointer; // it is a link\n }\n\n &__actions {\n position: absolute;\n top: 8px; // export\n right: 8px; // export\n\n display: inline-flex;\n align-items: center;\n gap: s.spacing(0.5);\n }\n}\n</style>\n","<template>\n <div v-if=\"value\" class=\"ds-profile-kv-row\">\n <span class=\"ds-profile-kv-row__label\">{{ label }}</span>\n <a\n v-if=\"href\"\n class=\"ds-profile-kv-row__value is-link\"\n :href=\"href\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >{{ value }}</a\n >\n <span v-else class=\"ds-profile-kv-row__value\">{{ value }}</span>\n </div>\n</template>\n\n<script setup lang=\"ts\">\ndefineProps({\n label: { type: String, required: true },\n value: { type: String, default: '' },\n href: { type: String, default: '' },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n\n// Values from the export's `ProfileKvRow`, unchanged (mirrors DsProfileCompanyCard's own\n// field rows, which predate this component — see that component's docs for why it was\n// NOT refactored to use this one).\n.ds-profile-kv-row {\n display: flex;\n gap: 12px; // export\n align-items: baseline;\n\n padding: 7px 0; // export\n\n // No `first` prop (Diego's call): a row only draws its top rule when something of the\n // SAME kind precedes it, so a lone/first row in a list never doubles up on a divider\n // some ancestor already drew.\n &:not(:first-child) {\n border-top: 1px solid colors.$slate-tint;\n }\n\n &__label {\n flex: none;\n\n width: 92px; // export\n\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-size: 10.5px; // export, off the DS scale on purpose (follow the export)\n font-weight: t.$weight-bold;\n letter-spacing: 0.5px; // export\n text-transform: uppercase;\n }\n\n &__value {\n min-width: 0;\n\n color: colors.$slate-main;\n font-size: 13.5px; // export, off the DS scale on purpose (follow the export)\n font-weight: t.$weight-semibold;\n line-height: 1.45; // export\n text-decoration: none;\n word-break: break-word;\n\n cursor: default;\n\n &.is-link {\n color: colors.$accent-main;\n\n cursor: pointer;\n }\n }\n}\n</style>\n","<template>\n <div class=\"ds-profile-timeline-row\">\n <img\n v-if=\"showsLogo\"\n class=\"ds-profile-timeline-row__logo\"\n :src=\"logo\"\n alt=\"\"\n @error=\"onLogoError\"\n />\n <span\n v-else\n class=\"ds-profile-timeline-row__logo ds-profile-timeline-row__logo--placeholder\"\n aria-hidden=\"true\"\n />\n\n <div class=\"ds-profile-timeline-row__text\">\n <span class=\"ds-profile-timeline-row__title\">{{ title }}</span>\n <span v-if=\"subtitle\" class=\"ds-profile-timeline-row__subtitle\">{{ subtitle }}</span>\n <span v-if=\"dates\" class=\"ds-profile-timeline-row__dates\">{{ dates }}</span>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\n\nconst props = defineProps({\n logo: { type: String, default: '' },\n title: { type: String, required: true },\n subtitle: { type: String, default: '' },\n dates: { type: String, default: '' },\n});\n\n// Mirrors DsAvatar / DsCompanyLogo: a broken logo URL falls back to the placeholder box\n// instead of a broken-image icon; a new URL gets a fresh attempt.\nconst logoFailed = ref(false);\nwatch(\n () => props.logo,\n () => (logoFailed.value = false)\n);\nfunction onLogoError() {\n logoFailed.value = true;\n}\nconst showsLogo = computed(() => !!props.logo && !logoFailed.value);\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n\n// Values from the export's `ProfileTimelineRow` (shared/ContactData.jsx) — the drawer's\n// timeline row, not the older `TimelineRow` used by RichProfileSections/ExpandableCard.\n.ds-profile-timeline-row {\n display: flex;\n gap: 10px; // export\n\n padding: 9px 0; // export\n\n &:not(:first-child) {\n border-top: 1px solid colors.$slate-tint;\n }\n\n &__logo {\n box-sizing: border-box;\n flex: none;\n\n width: 30px;\n height: 30px;\n padding: 3px;\n\n object-fit: contain;\n\n background: colors.$white;\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-control;\n\n &--placeholder {\n background: colors.$slate-bg; // #f6f6f6 token\n }\n }\n\n &__text {\n display: flex;\n flex: 1;\n flex-direction: column;\n\n min-width: 0;\n }\n\n &__title {\n color: colors.$grey-10; // export ink #1f2933\n font-family: t.$font-family;\n font-size: 13px;\n font-weight: t.$weight-bold;\n line-height: 1.3;\n }\n\n &__subtitle {\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: 12.5px;\n line-height: 1.35;\n }\n\n &__dates {\n margin-top: 1px;\n\n color: cd.$contact-data-ink-muted; // export grey #888f97\n font-family: t.$font-family;\n font-size: 11.5px;\n // The export leaves this line at the font's own leading; without it the row\n // inherits the body's tighter 1.15 and every row comes out ~2px shorter.\n line-height: normal;\n }\n}\n</style>\n","<template>\n <DsTooltip\n class=\"ds-profile-locked-card-tooltip\"\n :content=\"hint\"\n :disabled=\"!hint\"\n :placement=\"DS_TOOLTIP_PLACEMENTS.LEFT\"\n block\n >\n <div class=\"ds-profile-locked-card\" :tabindex=\"hint ? 0 : undefined\">\n <i class=\"material-symbols-filled ds-profile-locked-card__icon\" aria-hidden=\"true\">{{\n icon\n }}</i>\n <span class=\"ds-profile-locked-card__title\">{{ title }}</span>\n <i class=\"material-symbols-filled ds-profile-locked-card__lock\" aria-hidden=\"true\">lock</i>\n </div>\n </DsTooltip>\n</template>\n\n<script setup lang=\"ts\">\nimport DsTooltip from '../DsTooltip/DsTooltip.vue';\nimport { DS_TOOLTIP_PLACEMENTS } from '../DsTooltip/DsTooltip.types';\n\ndefineProps({\n icon: { type: String, required: true },\n title: { type: String, required: true },\n hint: { type: String, default: '' },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/contact-data-tokens' as cd;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n\n// Values from the export's `ProfileLockedCard`. Lines up with DsProfileCard's header:\n// same padding (10px 14px), gap (8px), border and radius (6, `r.$radius-card`) — this is\n// deliberately a single-row \"collapsed\" card standing in for a full DsProfileCard.\n//\n// Difference from DsProfileCard's header (intentional, not a drift): DsProfileCard's icon\n// and title read in the header-ink tone (`cd.$contact-data-header-ink`, #5c6670); here\n// every glyph and the title read in the MORE muted mask ink (`cd.$contact-data-mask-ink`,\n// #b6bbc0) throughout, to visually communicate \"locked\" rather than \"just quiet\".\n.ds-profile-locked-card {\n display: flex;\n align-items: center;\n gap: 8px; // export\n\n box-sizing: border-box;\n width: 100%;\n padding: 10px 14px; // export\n\n background: colors.$white;\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-card; // export: 6, same as DsProfileCard\n cursor: default;\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 2px;\n }\n\n &__icon {\n flex: none;\n\n color: cd.$contact-data-mask-ink; // export muted #b6bbc0\n font-size: 17px; // export\n line-height: 1;\n }\n\n &__title {\n flex: 1;\n\n color: cd.$contact-data-mask-ink; // export muted #b6bbc0\n font-family: t.$font-family;\n font-size: 11px; // export\n font-weight: t.$weight-bold;\n letter-spacing: 0.6px; // export\n text-align: left;\n text-transform: uppercase;\n }\n\n &__lock {\n flex: none;\n\n color: cd.$contact-data-mask-ink; // export muted #b6bbc0\n font-size: 15px; // export\n line-height: 1;\n }\n}\n</style>\n","// Picker family vocabulary (SALESQL-3535): the three canonical action controls the epic\n// mandates on every surface AND in bulk bars — Saved (folder), Tag, Add to sequence.\n// Measured from the design export's `SavedButton` / `FolderMenu`, `tagMenu` / `tagsLine`\n// and `SequenceButton`. Their copy is NOT frozen by the contact-data contract (§7 flags it),\n// so every visible string arrives by props.\n\nimport { DS_POPOVER_PLACEMENTS, type DsPopoverPlacement } from '@shared/ui/DsPopover';\n\n/** One selectable thing: a folder, a tag, a campaign. `color` tints the row glyph / dot. */\nexport interface DsPickerOption {\n id: string | number;\n name: string;\n color?: string;\n}\n\n/** Trigger height — `medium` for rows and the full profile, `large` for action / bulk bars. */\nexport const DS_PICKER_SIZES = {\n MEDIUM: 'medium',\n LARGE: 'large',\n} as const;\nexport type DsPickerSize = (typeof DS_PICKER_SIZES)[keyof typeof DS_PICKER_SIZES];\n\n/** Which edge of the trigger the panel hangs from. */\nexport const DS_PICKER_ALIGNS = {\n START: 'start',\n END: 'end',\n} as const;\nexport type DsPickerAlign = (typeof DS_PICKER_ALIGNS)[keyof typeof DS_PICKER_ALIGNS];\n\n/** Widest a tag / folder panel grows to keep its footer on one line (the viewport still caps it). */\nexport const DS_PICKER_PANEL_MAX_WIDTH = '360px';\n\n/**\n * What the create affordance does: nothing, emit `create` for the app's own flow, or open the\n * in-panel form (needs `colors`).\n */\nexport const DS_PICKER_CREATE_MODES = {\n NONE: 'none',\n EVENT: 'event',\n FORM: 'form',\n} as const;\nexport type DsPickerCreateMode =\n (typeof DS_PICKER_CREATE_MODES)[keyof typeof DS_PICKER_CREATE_MODES];\n\n/** What the row ⋮ menu does: absent, emit `edit` / `delete` only, or also open the form on Edit. */\nexport const DS_PICKER_ROW_ACTIONS = {\n NONE: 'none',\n EVENT: 'event',\n FORM: 'form',\n} as const;\nexport type DsPickerRowActionsMode =\n (typeof DS_PICKER_ROW_ACTIONS)[keyof typeof DS_PICKER_ROW_ACTIONS];\n\n/** The strings the in-panel form and the row ⋮ menu share between the pickers. */\nexport interface DsPickerOrganizerCopy {\n /** Accessible name of each row's ⋮ button. */\n actions: string;\n edit: string;\n delete: string;\n createFormTitle: string;\n editFormTitle: string;\n createSubmit: string;\n editSubmit: string;\n namePlaceholder: string;\n setColor: string;\n back: string;\n /** Unset = DsOrganizerForm's own fallback. */\n errorMissingName?: string;\n errorTooLongName?: string;\n}\n\n/** The \"send to\" choice of Add to sequence — the contract's email kinds that can be mailed. */\nexport const DS_SEQUENCE_CHANNELS = {\n WORK: 'work',\n DIRECT: 'direct',\n} as const;\nexport type DsSequenceChannel = (typeof DS_SEQUENCE_CHANNELS)[keyof typeof DS_SEQUENCE_CHANNELS];\n\nexport interface DsSequenceChannelOption {\n value: DsSequenceChannel;\n /** Copy — the app passes it (\"Work email\"). */\n label: string;\n}\n\n/** Case-insensitive, trimmed `includes` on `name`. An empty query keeps every option. */\nexport function filterOptions<T extends { name: string }>(\n options: readonly T[],\n query: string\n): T[] {\n const needle = query.trim().toLowerCase();\n if (!needle) return [...options];\n return options.filter((option) => option.name.toLowerCase().includes(needle));\n}\n\n/** The panel opens below the trigger, aligned to the edge the consumer asked for. */\nexport function pickerPlacement(align: DsPickerAlign): DsPopoverPlacement {\n return align === DS_PICKER_ALIGNS.END\n ? DS_POPOVER_PLACEMENTS.BOTTOM_END\n : DS_POPOVER_PLACEMENTS.BOTTOM_START;\n}\n\n/** Defaults under partials; a key a partial leaves `undefined` does not override. */\nexport function mergeCopy<T extends object>(\n defaults: T,\n ...partials: ReadonlyArray<Partial<T> | undefined>\n): T {\n const merged = { ...defaults };\n for (const partial of partials) {\n if (!partial) continue;\n for (const key of Object.keys(partial) as Array<keyof T>) {\n if (partial[key] !== undefined) merged[key] = partial[key] as T[keyof T];\n }\n }\n return merged;\n}\n\ntype ModeValidatorProps = Readonly<Record<string, unknown>>;\n\nconst hasColors = (props: ModeValidatorProps) =>\n Array.isArray(props.colors) && props.colors.length > 0;\n\n/** Two-argument Vue prop validator (dev only): `'form'` needs a palette to render. */\nexport function isValidCreateMode(value: unknown, props: ModeValidatorProps): boolean {\n const modes = Object.values(DS_PICKER_CREATE_MODES) as unknown[];\n if (!modes.includes(value)) return false;\n return value !== DS_PICKER_CREATE_MODES.FORM || hasColors(props);\n}\n\n/** Same rule for `rowActions`, which still takes the boolean of the deprecated alias. */\nexport function isValidRowActionsMode(value: unknown, props: ModeValidatorProps): boolean {\n if (typeof value === 'boolean') return true;\n const modes = Object.values(DS_PICKER_ROW_ACTIONS) as unknown[];\n if (!modes.includes(value)) return false;\n return value !== DS_PICKER_ROW_ACTIONS.FORM || hasColors(props);\n}\n\nexport interface LegacyPickerPropsInput {\n create?: DsPickerCreateMode;\n rowActions?: DsPickerRowActionsMode | boolean;\n colors: readonly string[];\n /** The consumer passed a `#footer` slot. */\n hasFooterSlot?: boolean;\n /** The deprecated per-string props as the consumer passed them, by their old prop name. */\n aliases: Readonly<Record<string, unknown>>;\n /** Old prop name → the `copy` key(s) it feeds. */\n copyMap: Readonly<Record<string, string | readonly string[]>>;\n}\n\nexport interface ResolvedLegacyPickerProps {\n create: DsPickerCreateMode;\n rowActions: DsPickerRowActionsMode;\n copy: Record<string, string>;\n}\n\n/**\n * The ONLY place the deprecated picker props are interpreted: the pre-modes `colors` /\n * `createLabel` / boolean `rowActions` gating and the loose copy props. An explicit new prop\n * always wins over its alias. Delete with the aliases.\n */\nexport function resolveLegacyPickerProps(input: LegacyPickerPropsInput): ResolvedLegacyPickerProps {\n const withForm = input.colors.length > 0;\n\n let create = input.create;\n if (create === undefined) {\n const hasFooter = !!input.aliases.createLabel || !!input.hasFooterSlot;\n if (!hasFooter) create = DS_PICKER_CREATE_MODES.NONE;\n else create = withForm ? DS_PICKER_CREATE_MODES.FORM : DS_PICKER_CREATE_MODES.EVENT;\n }\n\n let rowActions: DsPickerRowActionsMode;\n if (typeof input.rowActions === 'string') rowActions = input.rowActions;\n else if (input.rowActions === true) {\n rowActions = withForm ? DS_PICKER_ROW_ACTIONS.FORM : DS_PICKER_ROW_ACTIONS.EVENT;\n } else rowActions = DS_PICKER_ROW_ACTIONS.NONE;\n\n const copy: Record<string, string> = {};\n for (const [alias, targets] of Object.entries(input.copyMap)) {\n const value = input.aliases[alias];\n if (typeof value !== 'string') continue;\n for (const key of typeof targets === 'string' ? [targets] : targets) copy[key] = value;\n }\n\n return { create, rowActions, copy };\n}\n","<template>\n <div class=\"ds-organizer-form\" role=\"group\" :aria-label=\"title\">\n <button\n type=\"button\"\n class=\"ds-organizer-form__back\"\n :aria-label=\"backLabel\"\n @click=\"emit(BACK)\"\n >\n <i class=\"material-symbols-filled ds-organizer-form__back-icon\" aria-hidden=\"true\"\n >keyboard_arrow_left</i\n >\n <span class=\"ds-organizer-form__title\">{{ title }}</span>\n </button>\n\n <div class=\"ds-organizer-form__divider\" />\n\n <div class=\"ds-organizer-form__field\">\n <DsInput\n :id=\"inputId\"\n ref=\"inputRef\"\n :model-value=\"name\"\n :size=\"DS_INPUT_SIZES.MD\"\n :placeholder=\"namePlaceholder\"\n :error=\"!!shownError\"\n :error-message=\"shownError\"\n autocomplete=\"off\"\n @update:model-value=\"onNameInput\"\n @keydown.enter=\"onEnter\"\n />\n </div>\n\n <p :id=\"labelId\" class=\"ds-organizer-form__label\">{{ setColorLabel }}</p>\n <div class=\"ds-organizer-form__swatches\" role=\"radiogroup\" :aria-labelledby=\"labelId\">\n <button\n v-for=\"(swatch, i) in colors\"\n :key=\"swatch\"\n :ref=\"(el) => setSwatchRef(el, i)\"\n type=\"button\"\n role=\"radio\"\n class=\"ds-organizer-form__swatch\"\n :class=\"{ 'is-selected': swatch === color }\"\n :style=\"{ '--swatch-color': swatch }\"\n :aria-checked=\"swatch === color\"\n :aria-label=\"swatch\"\n :tabindex=\"i === tabStop ? 0 : -1\"\n @click=\"emit(UPDATE_COLOR, swatch)\"\n @keydown=\"onSwatchKeydown($event, i)\"\n >\n <i\n v-if=\"swatch === color\"\n class=\"material-symbols-filled ds-organizer-form__check\"\n aria-hidden=\"true\"\n >check</i\n >\n </button>\n </div>\n\n <div class=\"ds-organizer-form__divider\" />\n\n <div class=\"ds-organizer-form__footer\">\n <DsButton\n class=\"ds-organizer-form__submit\"\n :variant=\"DS_BUTTON_VARIANTS.PRIMARY\"\n :size=\"DS_BUTTON_SIZES.LARGE\"\n :loading=\"loading\"\n :disabled=\"!canSubmit\"\n @click=\"submit\"\n >{{ submitLabel }}</DsButton\n >\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, ref, useId, type ComponentPublicInstance, type PropType } from 'vue';\nimport { DsInput, DS_INPUT_SIZES } from '@shared/ui/DsInput';\nimport { DsButton, DS_BUTTON_SIZES, DS_BUTTON_VARIANTS } from '@shared/ui/DsButton';\nimport { BACK, SUBMIT, UPDATE_COLOR, UPDATE_NAME } from '@shared/constants/events';\n\nconst props = defineProps({\n title: { type: String, required: true },\n name: { type: String, default: '' },\n color: { type: String, default: '' },\n colors: { type: Array as PropType<string[]>, required: true },\n submitLabel: { type: String, required: true },\n loading: { type: Boolean, default: false },\n setColorLabel: { type: String, default: 'Set Color' },\n namePlaceholder: { type: String, default: 'Name' },\n backLabel: { type: String, default: 'Back' },\n errorMissingName: { type: String, default: 'Name is required' },\n errorTooLongName: { type: String, default: 'Name is too long' },\n maxNameLength: { type: Number, default: 128 },\n errorMessage: { type: String, default: '' },\n originalName: { type: String, default: undefined },\n originalColor: { type: String, default: undefined },\n});\n\nconst emit = defineEmits([BACK, SUBMIT, UPDATE_NAME, UPDATE_COLOR]);\n\nconst inputId = useId();\nconst labelId = useId();\nconst inputRef = ref<InstanceType<typeof DsInput>>();\nconst swatchEls: (HTMLElement | null)[] = [];\n\n// Errors wait for the user: an empty create form must not open already shouting «required».\nconst touched = ref(false);\n\nconst trimmedName = computed(() => props.name.trim());\nconst isValid = computed(\n () => trimmedName.value.length > 0 && trimmedName.value.length <= props.maxNameLength\n);\n// Edit mode is \"the baseline was given\": a controlled form can't recover it from its own props.\nconst isChanged = computed(() => {\n if (props.originalName === undefined) return true;\n return (\n trimmedName.value !== props.originalName.trim() ||\n props.color.toLowerCase() !== (props.originalColor ?? '').toLowerCase()\n );\n});\nconst canSubmit = computed(() => isValid.value && isChanged.value);\nconst validationError = computed(() => {\n if (!touched.value) return '';\n if (!trimmedName.value) return props.errorMissingName;\n if (trimmedName.value.length > props.maxNameLength) return props.errorTooLongName;\n return '';\n});\nconst shownError = computed(() => validationError.value || props.errorMessage);\n\n// Roving tabindex: the group is one tab stop — the selected swatch, or the first.\nconst tabStop = computed(() => Math.max(props.colors.indexOf(props.color), 0));\n\nfunction onNameInput(value: string) {\n touched.value = true;\n emit(UPDATE_NAME, value);\n}\n\nfunction submit() {\n touched.value = true;\n if (props.loading || !canSubmit.value) return;\n emit(SUBMIT, { name: trimmedName.value, color: props.color });\n}\n\nfunction onEnter(event: KeyboardEvent) {\n // Enter that confirms an IME composition is not a submit.\n if (event.isComposing) return;\n event.preventDefault();\n submit();\n}\n\nfunction setSwatchRef(el: Element | ComponentPublicInstance | null, index: number) {\n swatchEls[index] = el as HTMLElement | null;\n}\n\nconst ARROW_STEPS: Record<string, number> = {\n ArrowRight: 1,\n ArrowDown: 1,\n ArrowLeft: -1,\n ArrowUp: -1,\n};\n\nfunction onSwatchKeydown(event: KeyboardEvent, index: number) {\n const step = ARROW_STEPS[event.key];\n if (!step) return;\n event.preventDefault();\n const total = props.colors.length;\n const next = (index + step + total) % total;\n swatchEls[next]?.focus();\n emit(UPDATE_COLOR, props.colors[next]);\n}\n\nconst focus = () => inputRef.value?.focus();\n\nonMounted(focus);\n\ndefineExpose({ focus });\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/radius.scss' as r;\n\n// Prototype value (FolderMenu form): no DS token for a swatch.\n$swatch-size: 28px;\n$ring-gap: 2px;\n$ring-width: 4px;\n\n.ds-organizer-form {\n width: 100%;\n\n &__back {\n display: flex;\n align-items: center;\n width: calc(100% - #{s.spacing(2)});\n margin: s.spacing(1);\n padding: 0;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n text-align: left;\n\n background: transparent;\n border: 0;\n border-radius: r.$radius-control;\n\n cursor: pointer;\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n }\n &__back-icon {\n flex: none;\n font-size: i.icon-size(20);\n line-height: 1;\n }\n &__title {\n min-width: 0;\n margin-left: s.spacing(1);\n overflow: hidden;\n\n font-size: t.font-size('body');\n font-weight: t.$weight-bold;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &__divider {\n height: 1px;\n background: colors.$slate-tint;\n }\n\n &__field {\n padding: s.spacing(2);\n }\n\n &__label {\n margin: 0 0 0 s.spacing(2);\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n }\n\n &__swatches {\n display: flex;\n flex-wrap: wrap;\n gap: s.spacing(1);\n margin: s.spacing(1.5) s.spacing(2) s.spacing(1);\n }\n &__swatch {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: $swatch-size;\n height: $swatch-size;\n padding: 0;\n\n background: var(--swatch-color);\n border: 0;\n border-radius: 50%;\n outline: none;\n\n cursor: pointer;\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n &.is-selected {\n // The ring wears the swatch's own colour.\n box-shadow:\n 0 0 0 $ring-gap colors.$white,\n 0 0 0 $ring-width var(--swatch-color);\n\n &:focus-visible {\n outline-offset: $ring-width + 1px;\n }\n }\n }\n &__check {\n color: colors.$white;\n font-size: i.icon-size(16);\n line-height: 1;\n }\n\n &__footer {\n display: flex;\n justify-content: flex-end;\n padding: s.spacing(1.5);\n }\n}\n</style>\n","<template>\n <DsPopover\n class=\"ds-picker-row-actions\"\n :open=\"open\"\n :placement=\"DS_POPOVER_PLACEMENTS.BOTTOM_END\"\n width=\"150px\"\n teleported\n @update:open=\"setOpen\"\n >\n <template #trigger>\n <button\n ref=\"triggerRef\"\n type=\"button\"\n class=\"ds-picker-row-actions__trigger\"\n :aria-label=\"actionsLabel\"\n aria-haspopup=\"menu\"\n :aria-expanded=\"open\"\n >\n <i class=\"material-symbols-filled ds-picker-row-actions__glyph\" aria-hidden=\"true\"\n >more_vert</i\n >\n </button>\n </template>\n\n <div\n ref=\"menuRef\"\n class=\"ds-picker-row-actions__menu\"\n role=\"menu\"\n :aria-label=\"actionsLabel\"\n @keydown=\"onMenuKeydown\"\n >\n <button\n v-if=\"showEdit\"\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n class=\"ds-picker-row-actions__item\"\n @click=\"choose(EDIT)\"\n >\n <i class=\"material-symbols-filled ds-picker-row-actions__glyph\" aria-hidden=\"true\">edit</i>\n <span class=\"ds-picker-row-actions__item-label\">{{ editLabel }}</span>\n </button>\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n class=\"ds-picker-row-actions__item ds-picker-row-actions__item--danger\"\n @click=\"choose(DELETE)\"\n >\n <i class=\"material-symbols-filled ds-picker-row-actions__glyph\" aria-hidden=\"true\"\n >delete</i\n >\n <span class=\"ds-picker-row-actions__item-label\">{{ deleteLabel }}</span>\n </button>\n </div>\n </DsPopover>\n</template>\n\n<script lang=\"ts\">\nimport { ref } from 'vue';\n\n// Shared by every instance: opening a row's menu closes whichever other one is open.\nconst activeMenu = ref<symbol | null>(null);\n</script>\n\n<script setup lang=\"ts\">\nimport { nextTick, onBeforeUnmount, watch, type PropType } from 'vue';\nimport { useMenuKeyboard } from '@shared/composables/useMenuKeyboard';\nimport { DsPopover, DS_POPOVER_PLACEMENTS } from '@shared/ui/DsPopover';\nimport { DELETE, EDIT } from '@shared/constants/events';\nimport type { DsPickerOption } from '@shared/constants/pickers';\n\nconst props = defineProps({\n option: { type: Object as PropType<DsPickerOption>, required: true },\n actionsLabel: { type: String, default: 'Actions' },\n editLabel: { type: String, default: 'Edit' },\n deleteLabel: { type: String, default: 'Delete' },\n showEdit: { type: Boolean, default: true },\n});\n\nconst emit = defineEmits([EDIT, DELETE]);\n\nconst self = Symbol('ds-picker-row-actions');\nconst open = ref(false);\nconst triggerRef = ref<HTMLElement | null>(null);\nconst menuRef = ref<HTMLElement | null>(null);\n\nfunction setOpen(next: boolean) {\n if (open.value === next) return;\n open.value = next;\n if (next) activeMenu.value = self;\n else if (activeMenu.value === self) activeMenu.value = null;\n}\n\nwatch(activeMenu, (current) => {\n if (current !== self) setOpen(false);\n});\n\nconst { focusFirst, onKeydown: onMenuKeydown } = useMenuKeyboard(menuRef, {\n onClose: closeAndRefocus,\n});\n\n// 'post': DsPopover moves focus to its panel in a nextTick of its own; this runs after it.\nwatch(\n open,\n (isOpen) => {\n if (isOpen) focusFirst();\n },\n { flush: 'post' }\n);\n\n// After the next flush: DsPopover restores focus to whatever was focused when it opened (not\n// always the ⋮ — Safari and Firefox on macOS don't focus a button on click), and that runs first.\nfunction focusTrigger() {\n nextTick(() => triggerRef.value?.focus());\n}\n\nfunction closeAndRefocus() {\n setOpen(false);\n focusTrigger();\n}\n\nfunction choose(event: typeof EDIT | typeof DELETE) {\n setOpen(false);\n if (event === DELETE) focusTrigger();\n emit(event, props.option);\n}\n\nonBeforeUnmount(() => {\n if (activeMenu.value === self) activeMenu.value = null;\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/motion.scss' as m;\n\n// Prototype value (FolderMenu row menu): no spacing token.\n$item-padding: 10px;\n\n.ds-picker-row-actions {\n flex: none;\n\n &__trigger {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: s.control-height('small');\n height: s.control-height('small');\n padding: 0;\n\n color: colors.$slate-main;\n\n background: transparent;\n border: 0;\n border-radius: r.$radius-control;\n\n cursor: pointer;\n\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:hover,\n &[aria-expanded='true'] {\n background: colors.$slate-tint;\n }\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n }\n\n &__glyph {\n flex: none;\n font-size: i.icon-size(18);\n line-height: 1;\n }\n\n &__item {\n display: flex;\n align-items: center;\n gap: s.spacing(1);\n width: 100%;\n height: s.control-height('medium');\n padding: 0 $item-padding;\n\n color: colors.$slate-main;\n font-family: t.$font-family;\n font-size: t.font-size('body');\n text-align: left;\n\n background: transparent;\n border: 0;\n border-radius: r.$radius-control;\n\n cursor: pointer;\n\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:hover,\n &:focus-visible {\n background: colors.$slate-bg;\n }\n\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: -2px;\n }\n\n // Prototype hover is #FFF7F7; the lightest DS red is error-tint.\n &--danger {\n color: colors.$error-shadow;\n\n &:hover,\n &:focus-visible {\n background: colors.$error-tint;\n }\n }\n }\n\n &__item-label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n</style>\n","import { computed, nextTick, ref } from 'vue';\nimport { CREATE_OPTION, DELETE, EDIT, FORM_CLOSE, UPDATE_OPTION } from '@shared/constants/events';\nimport {\n DS_PICKER_ROW_ACTIONS,\n type DsPickerOption,\n type DsPickerRowActionsMode,\n} from '@shared/constants/pickers';\nimport type { DsOrganizerFormSubmitPayload } from '@shared/ui/DsOrganizerForm';\n\n// The in-panel create / edit form and the row actions that DsSavedButton and DsTagPicker share.\n\ntype PickerOrganizerEvent =\n typeof EDIT | typeof DELETE | typeof CREATE_OPTION | typeof UPDATE_OPTION | typeof FORM_CLOSE;\n\nexport interface PickerOrganizerOptions {\n colors: () => readonly string[];\n rowActions: () => DsPickerRowActionsMode;\n formError: () => string;\n emit: (event: PickerOrganizerEvent, payload?: unknown) => void;\n focusSearch: () => void;\n}\n\nexport function usePickerOrganizer(options: PickerOrganizerOptions) {\n const view = ref<'list' | 'form'>('list');\n const mode = ref<'create' | 'edit'>('create');\n const editing = ref<DsPickerOption | null>(null);\n const formName = ref('');\n const formColor = ref('');\n // The error the consumer still held when the form was dismissed: it belongs to that session.\n const dismissedError = ref('');\n\n const isForm = computed(() => view.value === 'form');\n const firstColor = () => options.colors()[0] ?? '';\n const shownFormError = computed(() => {\n const error = options.formError();\n return error && error === dismissedError.value ? '' : error;\n });\n const editingColor = computed(() => editing.value?.color ?? firstColor());\n\n function resetForm() {\n if (view.value === 'form') {\n dismissedError.value = options.formError();\n options.emit(FORM_CLOSE);\n }\n view.value = 'list';\n mode.value = 'create';\n editing.value = null;\n formName.value = '';\n formColor.value = '';\n }\n\n function openCreateForm(name = '') {\n mode.value = 'create';\n editing.value = null;\n formName.value = name;\n formColor.value = firstColor();\n view.value = 'form';\n }\n\n function onEdit(option: DsPickerOption) {\n options.emit(EDIT, option);\n if (options.rowActions() !== DS_PICKER_ROW_ACTIONS.FORM) return;\n mode.value = 'edit';\n editing.value = option;\n formName.value = option.name;\n formColor.value = option.color ?? firstColor();\n view.value = 'form';\n }\n\n function onDelete(option: DsPickerOption) {\n options.emit(DELETE, option);\n }\n\n // Success is the consumer's to declare: the form stays put until it calls `closeForm()`.\n function onSubmit({ name, color }: DsOrganizerFormSubmitPayload) {\n dismissedError.value = '';\n if (mode.value === 'edit' && editing.value) {\n options.emit(UPDATE_OPTION, { id: editing.value.id, name, color });\n } else {\n options.emit(CREATE_OPTION, { name, color });\n }\n }\n\n function closeForm() {\n resetForm();\n // The form's back button is gone: without this, focus falls to <body> and Esc stops closing.\n nextTick(options.focusSearch);\n }\n\n return {\n view,\n mode,\n editing,\n formName,\n formColor,\n isForm,\n shownFormError,\n editingColor,\n resetForm,\n openCreateForm,\n onEdit,\n onDelete,\n onSubmit,\n closeForm,\n };\n}\n","// DsSavedButton — THE one canonical \"Saved\" control (Ari: identical everywhere). A\n// folder-tinted glyph + a neutral label + a caret; the folder NAME lives in the tooltip,\n// never in the label; click opens the folder picker to re-file. Reused by list rows, bulk\n// bars and drawers so there is exactly one Saved affordance to maintain. Measured from the\n// design export's `SavedButton` / `FolderMenu`.\n//\n// Folder CRUD is opt-in and explicit. `create` says what the footer does (`'event'`: emit\n// `create` with the search text and the app runs its own flow; `'form'`: open the in-panel\n// DsOrganizerForm), `rowActions` adds the ⋮ Edit / Delete menu (`'form'`: Edit also opens the\n// form). `colors` is only the palette of that form. The component only emits intent\n// (`create-option`, `update-option`, `delete`) and the app persists it.\n\nimport type { DsTooltipPlacement } from '@shared/ui/DsTooltip';\nimport type {\n DsPickerAlign,\n DsPickerCreateMode,\n DsPickerOption,\n DsPickerOrganizerCopy,\n DsPickerRowActionsMode,\n DsPickerSize,\n} from '@shared/constants/pickers';\n\n/** Every string of the panel, the ⋮ menu and the form. Pass a partial: it overrides only its keys. */\nexport interface DsSavedButtonCopy extends DsPickerOrganizerCopy {\n searchPlaceholder: string;\n /** Shown when the search matches nothing. Empty = nothing. */\n empty: string;\n /** The footer action. */\n create: string;\n}\n\nexport const DS_SAVED_BUTTON_COPY: DsSavedButtonCopy = {\n searchPlaceholder: 'Search folders',\n empty: 'No folders found',\n create: 'New Folder',\n actions: 'Actions',\n edit: 'Edit',\n delete: 'Delete',\n createFormTitle: 'New Folder',\n editFormTitle: 'Edit Folder',\n createSubmit: 'Create & Select',\n editSubmit: 'Save',\n namePlaceholder: 'Folder name',\n setColor: 'Set Color',\n back: 'Back',\n};\n\nexport interface DsSavedButtonProps {\n /** The neutral label (\"Saved\", or \"Save\" before the first save). App copy. */\n label: string;\n /** \"Saved in {folder} · change folder\". Shown whenever non-empty, and hidden while the panel is open. */\n tooltip?: string;\n /** Side of the trigger the tooltip opens on. */\n tooltipPlacement?: DsTooltipPlacement;\n /** Material Symbols ligature for the folder glyph. */\n icon?: string;\n size?: DsPickerSize;\n /** Fully round trigger (`DsButton pill`) for the bulk bar beside `DsItemSelectorButton`. Off = the design's table / profile trigger. */\n pill?: boolean;\n align?: DsPickerAlign;\n disabled?: boolean;\n /** Render the picker panel in `<body>` so no ancestor's `overflow` clips it and no sibling stacking context paints over it (a sticky table cell). */\n teleported?: boolean;\n /** The folder the contact lives in; tints the glyph. `null` = not saved yet (no glyph). */\n folder?: DsPickerOption | null;\n /** Every folder the user can pick. */\n folders: DsPickerOption[];\n /** What the footer does: nothing (default), emit `create`, or open the in-panel form (needs `colors`). */\n create?: DsPickerCreateMode;\n /** The ⋮ menu on each row: absent (default), `edit` / `delete` events, or Edit also opens the form (needs `colors`). Accepts the deprecated boolean. */\n rowActions?: DsPickerRowActionsMode | boolean;\n /** Swatches (hex) of the in-panel form. Only the palette: it gates nothing by itself. */\n colors?: string[];\n /** The app is saving the form: its submit button shows the spinner and is blocked. */\n formLoading?: boolean;\n /** A failed save, shown under the name field. */\n formError?: string;\n copy?: Partial<DsSavedButtonCopy>;\n\n /** @deprecated Use `copy.searchPlaceholder`. */\n searchPlaceholder?: string;\n /** @deprecated Use `copy.empty`. */\n emptyLabel?: string;\n /** @deprecated Use `create` and `copy.create`. */\n createLabel?: string;\n /** @deprecated Use `copy.actions`. */\n actionsLabel?: string;\n /** @deprecated Use `copy.edit`. */\n editLabel?: string;\n /** @deprecated Use `copy.delete`. */\n deleteLabel?: string;\n /** @deprecated Use `copy.createFormTitle`. */\n createFormTitle?: string;\n /** @deprecated Use `copy.editFormTitle`. */\n editFormTitle?: string;\n /** @deprecated Use `copy.createSubmit`. */\n createSubmitLabel?: string;\n /** @deprecated Use `copy.editSubmit`. */\n editSubmitLabel?: string;\n /** @deprecated Use `copy.namePlaceholder`. */\n formNamePlaceholder?: string;\n /** @deprecated Use `copy.setColor`. */\n setColorLabel?: string;\n /** @deprecated Use `copy.back`. */\n backLabel?: string;\n /** @deprecated Use `copy.errorMissingName`. */\n errorMissingName?: string;\n /** @deprecated Use `copy.errorTooLongName`. */\n errorTooLongName?: string;\n}\n\n/** Deprecated prop name → the `copy` key it feeds (see `resolveLegacyPickerProps`). */\nexport const DS_SAVED_BUTTON_LEGACY_COPY = {\n searchPlaceholder: 'searchPlaceholder',\n emptyLabel: 'empty',\n createLabel: 'create',\n actionsLabel: 'actions',\n editLabel: 'edit',\n deleteLabel: 'delete',\n createFormTitle: 'createFormTitle',\n editFormTitle: 'editFormTitle',\n createSubmitLabel: 'createSubmit',\n editSubmitLabel: 'editSubmit',\n formNamePlaceholder: 'namePlaceholder',\n setColorLabel: 'setColor',\n backLabel: 'back',\n errorMissingName: 'errorMissingName',\n errorTooLongName: 'errorTooLongName',\n} as const;\n\n/** Slot scope of `footer`. */\nexport interface DsSavedButtonFooterSlotProps {\n /** What the user typed in the search. */\n query: string;\n /** Open the in-panel form; the name defaults to the trimmed search text. Needs `colors`. */\n openCreateForm: (name?: string) => void;\n}\n\n/** Payload of `create-option`. */\nexport interface DsSavedButtonCreatePayload {\n name: string;\n color: string;\n}\n\n/** Payload of `update-option`. */\nexport interface DsSavedButtonUpdatePayload extends DsSavedButtonCreatePayload {\n id: string | number;\n}\n","<template>\n <div\n class=\"ds-saved-button\"\n :class=\"[`ds-saved-button--${size}`, { 'is-open': open, 'is-disabled': disabled }]\"\n >\n <DsPopover\n :open=\"open\"\n :placement=\"placement\"\n width=\"300px\"\n :grow-to=\"isForm ? '' : DS_PICKER_PANEL_MAX_WIDTH\"\n :flush=\"isForm\"\n :trigger-on-click=\"false\"\n :teleported=\"teleported\"\n @update:open=\"setOpen\"\n >\n <template #trigger>\n <!-- The tooltip sleeps while the picker is open: two layers on one trigger is noise.\n `teleported`: the trigger lives in scroll containers (a table row, the\n full-profile drawer) whose `overflow` would otherwise clip the bubble. -->\n <DsTooltip\n :content=\"tooltip\"\n :disabled=\"!tooltip || open\"\n :placement=\"tooltipPlacement\"\n teleported\n >\n <!-- The trigger IS a DsButton (compose, don't duplicate): `outline` is the export's\n white + hairline ring; sizes, focus ring, disabled and hover come from the DS.\n Only the glyph carries the folder colour; the label stays neutral and the folder\n name lives in the tooltip (Ari). -->\n <DsButton\n class=\"ds-saved-button__trigger\"\n :variant=\"DS_BUTTON_VARIANTS.OUTLINE\"\n :size=\"buttonSize\"\n :pill=\"pill\"\n :disabled=\"disabled\"\n aria-haspopup=\"listbox\"\n :aria-expanded=\"open\"\n @click=\"toggle\"\n >\n <template v-if=\"folder\" #leading>\n <i\n class=\"material-symbols-filled ds-saved-button__icon\"\n :style=\"{ color: folder.color }\"\n aria-hidden=\"true\"\n >{{ icon }}</i\n >\n </template>\n <span class=\"ds-saved-button__label\">{{ label }}</span>\n <template #trailing>\n <i class=\"material-symbols-filled ds-saved-button__caret\" aria-hidden=\"true\"\n >keyboard_arrow_down</i\n >\n </template>\n </DsButton>\n </DsTooltip>\n </template>\n\n <DsOrganizerForm\n v-if=\"isForm\"\n class=\"ds-saved-button__form\"\n :title=\"mode === 'edit' ? text.editFormTitle : text.createFormTitle\"\n :submit-label=\"mode === 'edit' ? text.editSubmit : text.createSubmit\"\n :name=\"formName\"\n :color=\"formColor\"\n :original-name=\"editing ? editing.name : undefined\"\n :original-color=\"editing ? editingColor : undefined\"\n :colors=\"colors\"\n :loading=\"formLoading\"\n :error-message=\"shownFormError\"\n :name-placeholder=\"text.namePlaceholder\"\n :set-color-label=\"text.setColor\"\n :back-label=\"text.back\"\n :error-missing-name=\"text.errorMissingName\"\n :error-too-long-name=\"text.errorTooLongName\"\n @update:name=\"formName = $event\"\n @update:color=\"formColor = $event\"\n @back=\"closeForm\"\n @submit=\"onSubmit\"\n />\n\n <div v-else class=\"ds-saved-button__menu\">\n <DsInput\n ref=\"searchRef\"\n v-model=\"query\"\n class=\"ds-saved-button__search\"\n type=\"search\"\n size=\"sm\"\n :placeholder=\"text.searchPlaceholder\"\n />\n\n <div class=\"ds-saved-button__divider\" />\n\n <div class=\"ds-saved-button__list\" role=\"radiogroup\" :aria-label=\"label\">\n <div\n v-for=\"option in filtered\"\n :key=\"option.id\"\n class=\"ds-saved-button__option\"\n :class=\"{ 'is-current': isCurrent(option) }\"\n >\n <DsRadio\n :name=\"groupName\"\n :value=\"String(option.id)\"\n :model-value=\"isCurrent(option)\"\n @update:model-value=\"pick(option)\"\n >\n <i\n class=\"material-symbols-filled ds-saved-button__option-icon\"\n :style=\"{ color: option.color }\"\n aria-hidden=\"true\"\n >{{ icon }}</i\n >\n <span class=\"ds-saved-button__option-name\">{{ option.name }}</span>\n </DsRadio>\n <DsPickerRowActions\n v-if=\"rowActionsMode !== DS_PICKER_ROW_ACTIONS.NONE\"\n :option=\"option\"\n :actions-label=\"text.actions\"\n :edit-label=\"text.edit\"\n :delete-label=\"text.delete\"\n @edit=\"onEdit\"\n @delete=\"onDelete\"\n />\n </div>\n\n <p v-if=\"!filtered.length && text.empty\" class=\"ds-saved-button__empty\">\n {{ text.empty }}\n </p>\n </div>\n\n <template v-if=\"createMode !== DS_PICKER_CREATE_MODES.NONE || $slots.footer\">\n <div class=\"ds-saved-button__divider\" />\n <div class=\"ds-saved-button__footer\">\n <slot name=\"footer\" :query=\"query\" :open-create-form=\"openCreateForm\">\n <DsButton\n :variant=\"DS_BUTTON_VARIANTS.TERTIARY\"\n :size=\"DS_BUTTON_SIZES.MEDIUM\"\n left-icon=\"add\"\n @click=\"onCreate\"\n >{{ text.create }}</DsButton\n >\n </slot>\n </div>\n </template>\n </div>\n </DsPopover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref, useId, watch, type PropType } from 'vue';\nimport { DsPopover } from '@shared/ui/DsPopover';\nimport { DsTooltip, DS_TOOLTIP_PLACEMENTS, type DsTooltipPlacement } from '@shared/ui/DsTooltip';\nimport { DsInput } from '@shared/ui/DsInput';\nimport { DsRadio } from '@shared/ui/DsRadio';\nimport { DsOrganizerForm } from '@shared/ui/DsOrganizerForm';\nimport { DsPickerRowActions } from '@shared/ui/DsPickerRowActions';\nimport { DsButton, DS_BUTTON_SIZES, DS_BUTTON_VARIANTS } from '@shared/ui/DsButton';\nimport { usePickerOrganizer } from '@shared/composables/usePickerOrganizer';\nimport {\n CREATE,\n CREATE_OPTION,\n DELETE,\n EDIT,\n FORM_CLOSE,\n PICK,\n SEARCH,\n UPDATE_OPEN,\n UPDATE_OPTION,\n} from '@shared/constants/events';\nimport {\n DS_PICKER_ALIGNS,\n DS_PICKER_CREATE_MODES,\n DS_PICKER_PANEL_MAX_WIDTH,\n DS_PICKER_ROW_ACTIONS,\n DS_PICKER_SIZES,\n filterOptions,\n isValidCreateMode,\n isValidRowActionsMode,\n mergeCopy,\n pickerPlacement,\n resolveLegacyPickerProps,\n type DsPickerAlign,\n type DsPickerCreateMode,\n type DsPickerOption,\n type DsPickerRowActionsMode,\n type DsPickerSize,\n} from '@shared/constants/pickers';\nimport {\n DS_SAVED_BUTTON_COPY,\n DS_SAVED_BUTTON_LEGACY_COPY,\n type DsSavedButtonCopy,\n} from './DsSavedButton.types';\n\nconst props = defineProps({\n label: { type: String, required: true },\n tooltip: { type: String, default: '' },\n tooltipPlacement: {\n type: String as PropType<DsTooltipPlacement>,\n default: DS_TOOLTIP_PLACEMENTS.BOTTOM,\n },\n folder: { type: Object as PropType<DsPickerOption | null>, default: null },\n folders: { type: Array as PropType<DsPickerOption[]>, required: true },\n icon: { type: String, default: 'folder' },\n size: { type: String as PropType<DsPickerSize>, default: DS_PICKER_SIZES.MEDIUM },\n // Shape follows the design per context (Diego, 22/09): squared in table rows and the profile\n // (the export's `SavedButton`), `pill` in the bulk bar beside DsItemSelectorButton.\n pill: { type: Boolean, default: false },\n align: { type: String as PropType<DsPickerAlign>, default: DS_PICKER_ALIGNS.END },\n disabled: { type: Boolean, default: false },\n // The panel in <body>: a sticky table cell is its own stacking context, so inline the rows\n // below paint over it, and a scroll container clips it.\n teleported: { type: Boolean, default: false },\n // Unset (not 'none') so the deprecated props can still decide; resolved below.\n create: {\n type: String as PropType<DsPickerCreateMode>,\n default: undefined,\n // Inline so the published types don't reference the unexported validator.\n validator: (value: unknown, props: Record<string, unknown>) => isValidCreateMode(value, props),\n },\n rowActions: {\n type: [Boolean, String] as PropType<DsPickerRowActionsMode | boolean>,\n default: undefined,\n validator: (value: unknown, props: Record<string, unknown>) =>\n isValidRowActionsMode(value, props),\n },\n // Only the swatches of the in-panel form; the modes above decide what opens it.\n colors: { type: Array as PropType<string[]>, default: () => [] },\n // The consumer is saving the form; it calls `closeForm()` on success.\n formLoading: { type: Boolean, default: false },\n formError: { type: String, default: '' },\n copy: { type: Object as PropType<Partial<DsSavedButtonCopy>>, default: undefined },\n\n // -- Deprecated aliases: resolved in `resolveLegacyPickerProps`, deleted in 4.0 ---------\n searchPlaceholder: { type: String, default: undefined },\n emptyLabel: { type: String, default: undefined },\n createLabel: { type: String, default: undefined },\n actionsLabel: { type: String, default: undefined },\n editLabel: { type: String, default: undefined },\n deleteLabel: { type: String, default: undefined },\n createFormTitle: { type: String, default: undefined },\n editFormTitle: { type: String, default: undefined },\n createSubmitLabel: { type: String, default: undefined },\n editSubmitLabel: { type: String, default: undefined },\n formNamePlaceholder: { type: String, default: undefined },\n setColorLabel: { type: String, default: undefined },\n backLabel: { type: String, default: undefined },\n errorMissingName: { type: String, default: undefined },\n errorTooLongName: { type: String, default: undefined },\n});\n\nconst emit = defineEmits([\n PICK,\n CREATE,\n SEARCH,\n UPDATE_OPEN,\n EDIT,\n DELETE,\n CREATE_OPTION,\n UPDATE_OPTION,\n FORM_CLOSE,\n]);\n\nconst open = ref(false);\nconst query = ref('');\nconst searchRef = ref<InstanceType<typeof DsInput> | null>(null);\n\n// The footer slot always renders when passed, so it needs no inference of its own.\nconst resolved = computed(() =>\n resolveLegacyPickerProps({\n create: props.create,\n rowActions: props.rowActions,\n colors: props.colors,\n aliases: props,\n copyMap: DS_SAVED_BUTTON_LEGACY_COPY,\n })\n);\nconst createMode = computed(() => resolved.value.create);\nconst rowActionsMode = computed(() => resolved.value.rowActions);\nconst text = computed(() =>\n mergeCopy(DS_SAVED_BUTTON_COPY, resolved.value.copy as Partial<DsSavedButtonCopy>, props.copy)\n);\n\nconst {\n mode,\n editing,\n formName,\n formColor,\n isForm,\n shownFormError,\n editingColor,\n resetForm,\n openCreateForm: openForm,\n onEdit,\n onDelete,\n onSubmit,\n closeForm,\n} = usePickerOrganizer({\n colors: () => props.colors,\n rowActions: () => rowActionsMode.value,\n formError: () => props.formError,\n emit,\n focusSearch: () => searchRef.value?.focus(),\n});\n// One native radio group per instance, so two Saved buttons on a page never share state.\nconst groupName = useId();\n\nconst placement = computed(() => pickerPlacement(props.align));\nconst filtered = computed(() => filterOptions(props.folders, query.value));\n// Picker sizes map 1:1 onto DS control heights: medium 32px, large 36px.\nconst buttonSize = computed(() =>\n props.size === DS_PICKER_SIZES.LARGE ? DS_BUTTON_SIZES.LARGE : DS_BUTTON_SIZES.MEDIUM\n);\n\nfunction isCurrent(option: DsPickerOption): boolean {\n return props.folder !== null && props.folder.id === option.id;\n}\n\nfunction setOpen(next: boolean) {\n if (open.value === next) return;\n if (next) query.value = '';\n resetForm();\n open.value = next;\n emit(UPDATE_OPEN, next);\n}\n\nfunction toggle() {\n if (props.disabled) return;\n setOpen(!open.value);\n}\n\nfunction pick(option: DsPickerOption) {\n emit(PICK, option);\n setOpen(false);\n}\n\nfunction openCreateForm(name?: string) {\n openForm(name ?? query.value.trim());\n}\n\n// `event`: the app owns folder creation (its own form / modal) and gets the text typed so far.\nfunction onCreate() {\n if (createMode.value === DS_PICKER_CREATE_MODES.FORM) {\n openCreateForm();\n return;\n }\n emit(CREATE, query.value.trim());\n setOpen(false);\n}\n\ndefineExpose({ closeForm });\n\n// Cursor in the search as the panel opens, so the user can type at once.\nwatch(open, (isOpen) => {\n if (isOpen) nextTick(() => searchRef.value?.focus());\n});\nwatch(query, (value) => emit(SEARCH, value));\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/pickers.scss' as p;\n\n.ds-saved-button {\n display: inline-flex;\n flex: none;\n position: relative;\n\n // Slot content of the DsButton trigger. Only the glyph carries the folder colour (Ari).\n &__icon {\n // Export: 15px in the row Saved, 16 in the action bar. One step: 16.\n font-size: i.icon-size(16);\n line-height: 1;\n }\n &__label {\n white-space: nowrap;\n // A selector, not a CTA: the DS rule is «700 for labels and emphasis», and the DS's own\n // selector (DsItemSelectorButton) is bold. The size stays the `body` token.\n font-weight: t.$weight-bold;\n }\n &__caret {\n font-size: i.icon-size(14); // export: 14, muted\n line-height: 1;\n color: colors.$slate-soft;\n }\n\n // -- menu (export FolderMenu, 300px) -------------------------------------------------\n &__search {\n width: 100%;\n contain: inline-size; // the input's own width must not widen a growing panel\n }\n &__divider {\n @include p.divider;\n }\n &__list {\n @include p.list(216px); // export FolderMenu maxHeight\n }\n &__option {\n @include p.option-row;\n margin-bottom: 1px;\n\n &.is-current {\n background: colors.$accent-bg;\n }\n }\n &__option-icon {\n flex: none;\n font-size: i.icon-size(20); // export: folder glyph 20 in rows\n line-height: 1;\n }\n &__option-name {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n &__empty {\n @include p.empty;\n }\n &__footer {\n @include p.footer;\n justify-content: flex-start; // export: \"New Folder\" sits on the left\n }\n}\n</style>\n","// DsTagPicker — the canonical \"Tag\" control («Tagged as X +N», Lusha style): a trigger\n// that reads as a \"Tag\" button until tags are applied, then as \"Tagged as {first} +N\", and\n// a picker with search, checkbox rows with a colour dot, a \"create\" affordance and an\n// Apply footer. Measured from the design export's `tagBtn` / `tagsLine` / `tagMenu`.\n//\n// Named DsTagPicker, not DsTag: `DsTag` is already the DS outlined chip.\n// Selection is a working copy — nothing reaches the app until Apply.\n//\n// Tag CRUD is opt-in and explicit. `create` says what the create row does (`'event'`: emit\n// `create` with the search text and the app runs its own flow; `'form'`: open the in-panel\n// DsOrganizerForm, which also adds the «+ New» footer button), `rowActions` adds the ⋮ Edit /\n// Delete menu (`'form'`: Edit also opens the form). `colors` is only the palette of that form.\n// The component only emits intent (`create-option`, `update-option`, `delete`) and the app\n// persists it.\n\nimport type {\n DsPickerAlign,\n DsPickerCreateMode,\n DsPickerOption,\n DsPickerOrganizerCopy,\n DsPickerRowActionsMode,\n DsPickerSize,\n} from '@shared/constants/pickers';\n\n/** Every string of the trigger, the panel, the ⋮ menu and the form. Pass a partial: it overrides only its keys. */\nexport interface DsTagPickerCopy extends DsPickerOrganizerCopy {\n /** Prefix once tags exist (\"Tagged as\"); the first tag's name follows it. */\n taggedAs: string;\n /** The footer confirm. */\n apply: string;\n searchPlaceholder: string;\n /** Shown when nothing matches and there is nothing to create. Empty = nothing. */\n empty: string;\n /** Accessible name for the `+N` chip (\"2 more tags\"). */\n more: string;\n /** Prefix of the inline create row («Create “{query}”»). */\n createRow: string;\n /** The footer «+ New» button, only with `create: 'form'`. */\n newButton: string;\n}\n\nexport const DS_TAG_PICKER_COPY: DsTagPickerCopy = {\n taggedAs: 'Tagged as',\n apply: 'Apply',\n searchPlaceholder: 'Search tags',\n empty: 'No tags found',\n more: '',\n createRow: 'Create',\n newButton: 'New Tag',\n actions: 'Actions',\n edit: 'Edit',\n delete: 'Delete',\n createFormTitle: 'New Tag',\n editFormTitle: 'Edit Tag',\n createSubmit: 'Create',\n editSubmit: 'Save',\n namePlaceholder: 'Tag name',\n setColor: 'Set Color',\n back: 'Back',\n};\n\nexport interface DsTagPickerProps {\n /** Trigger label while no tag is applied (\"Tag\"). App copy. */\n label: string;\n /** The tags currently applied to the contact. */\n tags?: DsPickerOption[];\n /** Every tag the user can pick from. */\n options: DsPickerOption[];\n size?: DsPickerSize;\n /** Fully round trigger (`DsButton pill`) for the bulk bar beside `DsItemSelectorButton`. Off = the design's row / profile trigger. */\n pill?: boolean;\n align?: DsPickerAlign;\n disabled?: boolean;\n /** What the create affordance does: nothing (default), emit `create`, or open the in-panel form and show «+ New» (needs `colors`). */\n create?: DsPickerCreateMode;\n /** The ⋮ menu on each row: absent (default), `edit` / `delete` events, or Edit also opens the form (needs `colors`). Accepts the deprecated boolean. */\n rowActions?: DsPickerRowActionsMode | boolean;\n /** Swatches (hex) of the in-panel form. Only the palette: it gates nothing by itself. */\n colors?: string[];\n /** The app is saving the form: its submit button shows the spinner and is blocked. */\n formLoading?: boolean;\n /** A failed save, shown under the name field. */\n formError?: string;\n copy?: Partial<DsTagPickerCopy>;\n\n /** @deprecated Use `copy.taggedAs`. */\n taggedAsLabel?: string;\n /** @deprecated Use `copy.apply`. */\n applyLabel?: string;\n /** @deprecated Use `copy.searchPlaceholder`. */\n searchPlaceholder?: string;\n /** @deprecated Use `copy.empty`. */\n emptyLabel?: string;\n /** @deprecated Use `create`, `copy.createRow` and `copy.newButton`. */\n createLabel?: string;\n /** @deprecated Use `copy.more`. */\n moreLabel?: string;\n /** @deprecated Use `copy.actions`. */\n actionsLabel?: string;\n /** @deprecated Use `copy.edit`. */\n editLabel?: string;\n /** @deprecated Use `copy.delete`. */\n deleteLabel?: string;\n /** @deprecated Use `copy.createFormTitle`. */\n createFormTitle?: string;\n /** @deprecated Use `copy.editFormTitle`. */\n editFormTitle?: string;\n /** @deprecated Use `copy.createSubmit`. */\n createSubmitLabel?: string;\n /** @deprecated Use `copy.editSubmit`. */\n editSubmitLabel?: string;\n /** @deprecated Use `copy.namePlaceholder`. */\n formNamePlaceholder?: string;\n /** @deprecated Use `copy.setColor`. */\n setColorLabel?: string;\n /** @deprecated Use `copy.back`. */\n backLabel?: string;\n /** @deprecated Use `copy.errorMissingName`. */\n errorMissingName?: string;\n /** @deprecated Use `copy.errorTooLongName`. */\n errorTooLongName?: string;\n}\n\n/** Deprecated prop name → the `copy` key(s) it feeds (see `resolveLegacyPickerProps`). */\nexport const DS_TAG_PICKER_LEGACY_COPY = {\n taggedAsLabel: 'taggedAs',\n applyLabel: 'apply',\n searchPlaceholder: 'searchPlaceholder',\n emptyLabel: 'empty',\n // The old `createLabel` was both the inline row prefix and the «+ New» footer text.\n createLabel: ['createRow', 'newButton'],\n moreLabel: 'more',\n actionsLabel: 'actions',\n editLabel: 'edit',\n deleteLabel: 'delete',\n createFormTitle: 'createFormTitle',\n editFormTitle: 'editFormTitle',\n createSubmitLabel: 'createSubmit',\n editSubmitLabel: 'editSubmit',\n formNamePlaceholder: 'namePlaceholder',\n setColorLabel: 'setColor',\n backLabel: 'back',\n errorMissingName: 'errorMissingName',\n errorTooLongName: 'errorTooLongName',\n} as const;\n\n/** Payload of `create-option`. */\nexport interface DsTagPickerCreatePayload {\n name: string;\n color: string;\n}\n\n/** Payload of `update-option`. */\nexport interface DsTagPickerUpdatePayload extends DsTagPickerCreatePayload {\n id: string | number;\n}\n","<template>\n <div\n class=\"ds-tag-picker\"\n :class=\"[\n `ds-tag-picker--${size}`,\n { 'is-open': open, 'is-disabled': disabled, 'has-tags': hasTags },\n ]\"\n >\n <DsPopover\n :open=\"open\"\n :placement=\"placement\"\n width=\"240px\"\n :grow-to=\"isForm ? '' : DS_PICKER_PANEL_MAX_WIDTH\"\n :flush=\"isForm\"\n :trigger-on-click=\"false\"\n @update:open=\"setOpen\"\n >\n <template #trigger>\n <!-- The label ellipsizes when the row is squeezed (see the CSS below); a tooltip\n repeating the same visible text is noise (Diego's rule), so it only carries\n content once the label is ACTUALLY truncated — same pattern as DsProfileHero's\n headline. `teleported`: the trigger lives in scroll containers (a table row,\n the full-profile drawer's action row). -->\n <DsTooltip\n :content=\"triggerLabel\"\n :disabled=\"!isLabelTruncated || open\"\n placement=\"bottom\"\n teleported\n >\n <!-- The trigger IS a DsButton (compose, don't duplicate): `outline` is the export's\n white + hairline ring. `label` glyph while empty; `sell` in the first tag's colour\n once applied, with the overflow chip in the trailing slot. -->\n <DsButton\n class=\"ds-tag-picker__trigger\"\n :variant=\"DS_BUTTON_VARIANTS.OUTLINE\"\n :size=\"buttonSize\"\n :pill=\"pill\"\n :disabled=\"disabled\"\n aria-haspopup=\"dialog\"\n :aria-expanded=\"open\"\n @click=\"toggle\"\n @mouseenter=\"checkLabelTruncation\"\n @focus=\"checkLabelTruncation\"\n >\n <template #leading>\n <i\n class=\"material-symbols-filled ds-tag-picker__icon\"\n :style=\"hasTags ? { color: tags[0].color } : undefined\"\n aria-hidden=\"true\"\n >{{ hasTags ? 'sell' : 'label' }}</i\n >\n </template>\n <span ref=\"labelRef\" class=\"ds-tag-picker__label\">\n <template v-if=\"hasTags\">{{ text.taggedAs }} {{ tags[0].name }}</template>\n <template v-else>{{ label }}</template>\n </span>\n <template v-if=\"hasTags\" #trailing>\n <DsMoreCountChip :overflow=\"tags.length - 1\" :label=\"text.more\" />\n </template>\n </DsButton>\n </DsTooltip>\n </template>\n\n <DsOrganizerForm\n v-if=\"isForm\"\n class=\"ds-tag-picker__form\"\n :title=\"mode === 'edit' ? text.editFormTitle : text.createFormTitle\"\n :submit-label=\"mode === 'edit' ? text.editSubmit : text.createSubmit\"\n :name=\"formName\"\n :color=\"formColor\"\n :original-name=\"editing ? editing.name : undefined\"\n :original-color=\"editing ? editingColor : undefined\"\n :colors=\"colors\"\n :loading=\"formLoading\"\n :error-message=\"shownFormError\"\n :name-placeholder=\"text.namePlaceholder\"\n :set-color-label=\"text.setColor\"\n :back-label=\"text.back\"\n :error-missing-name=\"text.errorMissingName\"\n :error-too-long-name=\"text.errorTooLongName\"\n @update:name=\"formName = $event\"\n @update:color=\"formColor = $event\"\n @back=\"closeForm\"\n @submit=\"onSubmit\"\n />\n\n <div v-else class=\"ds-tag-picker__menu\">\n <DsInput\n ref=\"searchRef\"\n v-model=\"query\"\n class=\"ds-tag-picker__search\"\n type=\"search\"\n size=\"sm\"\n :placeholder=\"text.searchPlaceholder\"\n />\n\n <div class=\"ds-tag-picker__divider\" />\n\n <div class=\"ds-tag-picker__list\" role=\"group\" :aria-label=\"label\">\n <div v-for=\"option in filtered\" :key=\"option.id\" class=\"ds-tag-picker__option\">\n <DsCheckbox\n :model-value=\"selected.has(option.id)\"\n @update:model-value=\"toggleTag(option, $event)\"\n >\n <span\n class=\"ds-tag-picker__dot\"\n :style=\"{ background: option.color }\"\n aria-hidden=\"true\"\n />\n <span class=\"ds-tag-picker__name\">{{ option.name }}</span>\n </DsCheckbox>\n <DsPickerRowActions\n v-if=\"rowActionsMode !== DS_PICKER_ROW_ACTIONS.NONE\"\n :option=\"option\"\n :actions-label=\"text.actions\"\n :edit-label=\"text.edit\"\n :delete-label=\"text.delete\"\n @edit=\"onEdit\"\n @delete=\"onDelete\"\n />\n </div>\n\n <button v-if=\"canCreate\" type=\"button\" class=\"ds-tag-picker__create\" @click=\"onCreate\">\n <i class=\"material-symbols-filled\" aria-hidden=\"true\">add</i>\n <span>{{ text.createRow }}</span>\n <span class=\"ds-tag-picker__create-query\">“{{ trimmedQuery }}”</span>\n </button>\n\n <p v-if=\"!filtered.length && !canCreate && text.empty\" class=\"ds-tag-picker__empty\">\n {{ text.empty }}\n </p>\n </div>\n\n <div class=\"ds-tag-picker__divider\" />\n <div class=\"ds-tag-picker__footer\" :class=\"{ 'is-split': showNew }\">\n <DsButton\n v-if=\"showNew\"\n class=\"ds-tag-picker__new\"\n :variant=\"DS_BUTTON_VARIANTS.TERTIARY\"\n :size=\"DS_BUTTON_SIZES.MEDIUM\"\n left-icon=\"add\"\n @click=\"openCreateForm()\"\n >{{ text.newButton }}</DsButton\n >\n <DsButton\n class=\"ds-tag-picker__apply\"\n :variant=\"DS_BUTTON_VARIANTS.PRIMARY\"\n :size=\"DS_BUTTON_SIZES.MEDIUM\"\n @click=\"apply\"\n >{{ text.apply }}</DsButton\n >\n </div>\n </div>\n </DsPopover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, ref, watch, type PropType } from 'vue';\nimport { DsPopover } from '@shared/ui/DsPopover';\nimport { DsTooltip } from '@shared/ui/DsTooltip';\nimport { DsInput } from '@shared/ui/DsInput';\nimport { DsCheckbox } from '@shared/ui/DsCheckbox';\nimport { DsOrganizerForm } from '@shared/ui/DsOrganizerForm';\nimport { DsPickerRowActions } from '@shared/ui/DsPickerRowActions';\nimport { DsButton, DS_BUTTON_SIZES, DS_BUTTON_VARIANTS } from '@shared/ui/DsButton';\nimport { DsMoreCountChip } from '@shared/ui/DsMoreCountChip';\nimport { usePickerOrganizer } from '@shared/composables/usePickerOrganizer';\nimport {\n APPLY,\n CREATE,\n CREATE_OPTION,\n DELETE,\n EDIT,\n FORM_CLOSE,\n SEARCH,\n UPDATE_OPEN,\n UPDATE_OPTION,\n} from '@shared/constants/events';\nimport {\n DS_PICKER_ALIGNS,\n DS_PICKER_CREATE_MODES,\n DS_PICKER_PANEL_MAX_WIDTH,\n DS_PICKER_ROW_ACTIONS,\n DS_PICKER_SIZES,\n filterOptions,\n isValidCreateMode,\n isValidRowActionsMode,\n mergeCopy,\n pickerPlacement,\n resolveLegacyPickerProps,\n type DsPickerAlign,\n type DsPickerCreateMode,\n type DsPickerOption,\n type DsPickerRowActionsMode,\n type DsPickerSize,\n} from '@shared/constants/pickers';\nimport {\n DS_TAG_PICKER_COPY,\n DS_TAG_PICKER_LEGACY_COPY,\n type DsTagPickerCopy,\n} from './DsTagPicker.types';\n\nconst props = defineProps({\n label: { type: String, required: true },\n tags: { type: Array as PropType<DsPickerOption[]>, default: () => [] },\n options: { type: Array as PropType<DsPickerOption[]>, required: true },\n size: { type: String as PropType<DsPickerSize>, default: DS_PICKER_SIZES.MEDIUM },\n // Shape follows the design per context (Diego, 22/09): squared in rows and the profile (the\n // export's `tagsLine`), `pill` in the bulk bar beside DsItemSelectorButton (\"Tag\").\n pill: { type: Boolean, default: false },\n align: { type: String as PropType<DsPickerAlign>, default: DS_PICKER_ALIGNS.START },\n disabled: { type: Boolean, default: false },\n // Unset (not 'none') so the deprecated props can still decide; resolved below.\n create: {\n type: String as PropType<DsPickerCreateMode>,\n default: undefined,\n // Inline so the published types don't reference the unexported validator.\n validator: (value: unknown, props: Record<string, unknown>) => isValidCreateMode(value, props),\n },\n rowActions: {\n type: [Boolean, String] as PropType<DsPickerRowActionsMode | boolean>,\n default: undefined,\n validator: (value: unknown, props: Record<string, unknown>) =>\n isValidRowActionsMode(value, props),\n },\n // Only the swatches of the in-panel form; the modes above decide what opens it.\n colors: { type: Array as PropType<string[]>, default: () => [] },\n // The consumer is saving the form; it calls `closeForm()` on success.\n formLoading: { type: Boolean, default: false },\n formError: { type: String, default: '' },\n copy: { type: Object as PropType<Partial<DsTagPickerCopy>>, default: undefined },\n\n // -- Deprecated aliases: resolved in `resolveLegacyPickerProps`, deleted in 4.0 ---------\n taggedAsLabel: { type: String, default: undefined },\n applyLabel: { type: String, default: undefined },\n searchPlaceholder: { type: String, default: undefined },\n emptyLabel: { type: String, default: undefined },\n createLabel: { type: String, default: undefined },\n moreLabel: { type: String, default: undefined },\n actionsLabel: { type: String, default: undefined },\n editLabel: { type: String, default: undefined },\n deleteLabel: { type: String, default: undefined },\n createFormTitle: { type: String, default: undefined },\n editFormTitle: { type: String, default: undefined },\n createSubmitLabel: { type: String, default: undefined },\n editSubmitLabel: { type: String, default: undefined },\n formNamePlaceholder: { type: String, default: undefined },\n setColorLabel: { type: String, default: undefined },\n backLabel: { type: String, default: undefined },\n errorMissingName: { type: String, default: undefined },\n errorTooLongName: { type: String, default: undefined },\n});\n\nconst emit = defineEmits([\n APPLY,\n CREATE,\n SEARCH,\n UPDATE_OPEN,\n EDIT,\n DELETE,\n CREATE_OPTION,\n UPDATE_OPTION,\n FORM_CLOSE,\n]);\n\nconst open = ref(false);\nconst query = ref('');\n// Working copy of the applied tags' ids. Seeded on open, thrown away on close without Apply.\nconst selected = ref<Set<string | number>>(new Set());\nconst searchRef = ref<InstanceType<typeof DsInput> | null>(null);\n\nconst resolved = computed(() =>\n resolveLegacyPickerProps({\n create: props.create,\n rowActions: props.rowActions,\n colors: props.colors,\n aliases: props,\n copyMap: DS_TAG_PICKER_LEGACY_COPY,\n })\n);\nconst createMode = computed(() => resolved.value.create);\nconst rowActionsMode = computed(() => resolved.value.rowActions);\nconst text = computed(() =>\n mergeCopy(DS_TAG_PICKER_COPY, resolved.value.copy as Partial<DsTagPickerCopy>, props.copy)\n);\n\nconst {\n mode,\n editing,\n formName,\n formColor,\n isForm,\n shownFormError,\n editingColor,\n resetForm,\n openCreateForm: openForm,\n onEdit,\n onDelete,\n onSubmit,\n closeForm,\n} = usePickerOrganizer({\n colors: () => props.colors,\n rowActions: () => rowActionsMode.value,\n formError: () => props.formError,\n emit,\n focusSearch: () => searchRef.value?.focus(),\n});\nconst showNew = computed(() => createMode.value === DS_PICKER_CREATE_MODES.FORM);\n\nconst hasTags = computed(() => props.tags.length > 0);\n// The exact text the trigger renders (see the template) — also the truncation tooltip's\n// full content.\nconst triggerLabel = computed(() =>\n hasTags.value ? `${text.value.taggedAs} ${props.tags[0].name}` : props.label\n);\nconst placement = computed(() => pickerPlacement(props.align));\nconst filtered = computed(() => filterOptions(props.options, query.value));\nconst trimmedQuery = computed(() => query.value.trim());\nconst canCreate = computed(() => {\n if (createMode.value === DS_PICKER_CREATE_MODES.NONE || !trimmedQuery.value) return false;\n const needle = trimmedQuery.value.toLowerCase();\n return !props.options.some((option) => option.name.toLowerCase() === needle);\n});\n// Picker sizes map 1:1 onto DS control heights: medium 32px, large 36px.\nconst buttonSize = computed(() =>\n props.size === DS_PICKER_SIZES.LARGE ? DS_BUTTON_SIZES.LARGE : DS_BUTTON_SIZES.MEDIUM\n);\n\nfunction setOpen(next: boolean) {\n if (open.value === next) return;\n if (next) {\n query.value = '';\n selected.value = new Set(props.tags.map((tag) => tag.id));\n }\n resetForm();\n open.value = next;\n emit(UPDATE_OPEN, next);\n}\n\nfunction toggle() {\n if (props.disabled) return;\n setOpen(!open.value);\n}\n\n// Measured against the rendered box (scrollWidth vs clientWidth), never guessed from\n// length — same approach as DsProfileHero's headline. Re-measured on mount and whenever\n// the displayed text changes, so a picker that's never hovered (e.g. touch) still resolves\n// correctly, and hovering isn't the only path to a correct `disabled` value.\nconst labelRef = ref<HTMLElement | null>(null);\nconst isLabelTruncated = ref(false);\n\nfunction checkLabelTruncation() {\n const el = labelRef.value;\n isLabelTruncated.value = !!el && el.scrollWidth > el.clientWidth;\n}\n\nonMounted(() => void nextTick(checkLabelTruncation));\nwatch(triggerLabel, () => void nextTick(checkLabelTruncation));\n\nfunction toggleTag(option: DsPickerOption, on: boolean) {\n const next = new Set(selected.value);\n if (on) next.add(option.id);\n else next.delete(option.id);\n selected.value = next;\n}\n\n// Options come back in the order the app listed them; an applied tag the list does not\n// carry (a paginated catalogue) survives at the end instead of being silently dropped.\nfunction apply() {\n const known = new Set(props.options.map((option) => option.id));\n const result = [\n ...props.options.filter((option) => selected.value.has(option.id)),\n ...props.tags.filter((tag) => selected.value.has(tag.id) && !known.has(tag.id)),\n ];\n emit(APPLY, result);\n setOpen(false);\n}\n\nfunction openCreateForm() {\n openForm(trimmedQuery.value);\n}\n\n// `event`: tag creation is the app's, it receives the text and decides (create + apply,\n// modal…). `form`: the create row opens the in-panel form, named after that text.\nfunction onCreate() {\n if (createMode.value === DS_PICKER_CREATE_MODES.FORM) openCreateForm();\n else emit(CREATE, trimmedQuery.value);\n}\n\ndefineExpose({ closeForm });\n\n// Cursor in the search as the panel opens, so the user can type at once.\nwatch(open, (isOpen) => {\n if (isOpen) nextTick(() => searchRef.value?.focus());\n});\nwatch(query, (value) => emit(SEARCH, value));\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/pickers.scss' as p;\n\n.ds-tag-picker {\n display: inline-flex;\n // Shrinks inside a flex row (the drawer's action row, next to DsSavedButton) instead of\n // hugging its content — the picker's own text is the dynamic part that can overflow.\n flex: 0 1 auto;\n min-width: 0;\n position: relative;\n\n // The composed trigger (DsTooltip → DsButton → its content/label spans) is inline-flex\n // end to end; every level defaults to `min-width: auto`, which blocks shrinking below the\n // label's un-wrapped width before it ever reaches the ellipsis below. `:deep()` only\n // reaches the instances rendered as THIS trigger — other DsTooltip / DsButton consumers\n // keep their own default sizing untouched.\n :deep(.ds-tooltip),\n :deep(.ds-popover),\n :deep(.ds-popover__trigger) {\n min-width: 0;\n }\n\n // Slot content of the DsButton trigger.\n &__icon {\n font-size: i.icon-size(16);\n line-height: 1;\n }\n &__label {\n display: block;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n // A selector, not a CTA: the DS rule is «700 for labels and emphasis», and the DS's own\n // selector (DsItemSelectorButton) is bold. The size stays the `body` token.\n font-weight: t.$weight-bold;\n }\n &__trigger {\n min-width: 0;\n\n :deep(.ds-button__content),\n :deep(.ds-button__label) {\n min-width: 0;\n }\n // The glyph and the +N chip are fixed-size content, not text that should ellipsize —\n // the label alone absorbs the row's squeeze.\n :deep(.ds-button__icon) {\n flex-shrink: 0;\n }\n }\n // The +N chip is part of the button's hit area: it takes the pointer, not its own arrow.\n &__trigger :deep(.ds-more-count-chip) {\n cursor: inherit;\n }\n\n // -- picker (export tagMenu, 240px) --------------------------------------------------\n &__search {\n width: 100%;\n contain: inline-size; // the input's own width must not widen a growing panel\n }\n &__divider {\n @include p.divider;\n }\n &__list {\n @include p.list(200px); // export tagMenu maxHeight\n }\n &__option {\n @include p.option-row;\n }\n &__dot {\n flex: none;\n width: 9px; // export\n height: 9px;\n border-radius: r.$radius-full;\n }\n &__name {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: t.$weight-semibold; // export tag rows: 13/600\n font-size: t.font-size('small');\n }\n\n // The create row: accent text, add glyph, the typed text quoted (export).\n &__create {\n display: flex;\n align-items: center;\n gap: 9px;\n width: 100%;\n min-height: 36px;\n padding: 0 10px;\n\n border: 0;\n border-radius: r.$radius-card;\n background: transparent;\n color: colors.$accent-main;\n font-family: t.$font-family;\n font-size: t.font-size('small');\n font-weight: t.$weight-bold;\n text-align: left;\n cursor: pointer;\n\n transition: background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n &:hover {\n background: colors.$slate-bg;\n }\n &:focus-visible {\n outline: 2px solid colors.$accent-mid;\n outline-offset: 1px;\n }\n\n .material-symbols-filled {\n font-size: i.icon-size(18);\n line-height: 1;\n }\n }\n &__create-query {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n &__empty {\n @include p.empty;\n }\n &__footer {\n @include p.footer;\n align-items: center;\n }\n}\n</style>\n","// DsAddToSequence — the canonical \"Add to sequence\" control: a trigger and a picker with\n// the SEND TO choice (Work / Direct email, stacked radios), a searchable multi-select of\n// campaigns and an Add confirm. Measured from the design export's `SequenceButton` /\n// `sequenceMenu`. One affordance for the full profile and the bulk bars.\n//\n// Nothing here knows what a campaign is: the app passes the list and receives the intent.\n\nimport type {\n DsPickerAlign,\n DsPickerOption,\n DsPickerSize,\n DsSequenceChannel,\n DsSequenceChannelOption,\n} from '@shared/constants/pickers';\n\n/** Trigger look: the export's `secondary` (white + ring → DsButton `outline`) or `primary` (solid accent). */\nexport const DS_ADD_TO_SEQUENCE_VARIANTS = {\n SECONDARY: 'secondary',\n PRIMARY: 'primary',\n} as const;\nexport type DsAddToSequenceVariant =\n (typeof DS_ADD_TO_SEQUENCE_VARIANTS)[keyof typeof DS_ADD_TO_SEQUENCE_VARIANTS];\n\n/** The `add` payload: which email kind to send to, and the chosen campaigns. */\nexport interface DsAddToSequencePayload {\n channel: DsSequenceChannel;\n campaigns: DsPickerOption[];\n}\n\nexport interface DsAddToSequenceProps {\n /** Trigger label (\"Add to sequence\"). App copy. */\n label: string;\n tooltip?: string;\n /** Caption above the channel radios (\"Send to\"). */\n channelsLabel: string;\n /** The stacked radios — the app passes the labels (\"Work email\", \"Direct email\"). */\n channels: DsSequenceChannelOption[];\n defaultChannel?: DsSequenceChannel;\n /** Caption above the campaign list (\"Recent campaigns\"). Empty = none. */\n campaignsLabel?: string;\n campaigns: DsPickerOption[];\n searchPlaceholder?: string;\n emptyLabel?: string;\n /** The confirm (\"Add\"). Disabled until at least one campaign is selected. */\n addLabel: string;\n variant?: DsAddToSequenceVariant;\n size?: DsPickerSize;\n /** Fully round trigger (`DsButton pill`) — the bulk-bar look beside `DsItemSelectorButton`. */\n pill?: boolean;\n align?: DsPickerAlign;\n disabled?: boolean;\n}\n","<template>\n <div\n class=\"ds-add-to-sequence\"\n :class=\"[\n `ds-add-to-sequence--${variant}`,\n `ds-add-to-sequence--${size}`,\n { 'is-open': open, 'is-disabled': disabled },\n ]\"\n >\n <DsPopover\n :open=\"open\"\n :placement=\"placement\"\n width=\"288px\"\n :trigger-on-click=\"false\"\n @update:open=\"setOpen\"\n >\n <template #trigger>\n <!-- The tooltip sleeps while the panel is open: two layers on one trigger is noise. -->\n <DsTooltip :content=\"tooltip\" :disabled=\"!tooltip || open\" placement=\"bottom\">\n <!-- The trigger IS a DsButton (compose, don't duplicate): the export's `secondary`\n (white + hairline ring) is the DS `outline`, its `primary` the DS `primary`. -->\n <DsButton\n class=\"ds-add-to-sequence__trigger\"\n :variant=\"buttonVariant\"\n :size=\"buttonSize\"\n :pill=\"pill\"\n :disabled=\"disabled\"\n aria-haspopup=\"dialog\"\n :aria-expanded=\"open\"\n @click=\"toggle\"\n >\n <template #leading>\n <i class=\"material-symbols-filled ds-add-to-sequence__icon\" aria-hidden=\"true\"\n >send</i\n >\n </template>\n <span class=\"ds-add-to-sequence__label\">{{ label }}</span>\n </DsButton>\n </DsTooltip>\n </template>\n\n <div class=\"ds-add-to-sequence__menu\">\n <p class=\"ds-add-to-sequence__section\">{{ channelsLabel }}</p>\n <div class=\"ds-add-to-sequence__channels\" role=\"radiogroup\" :aria-label=\"channelsLabel\">\n <div\n v-for=\"option in channels\"\n :key=\"option.value\"\n class=\"ds-add-to-sequence__channel\"\n :class=\"{ 'is-on': channel === option.value }\"\n >\n <DsRadio\n :name=\"groupName\"\n :value=\"option.value\"\n :model-value=\"channel === option.value\"\n @update:model-value=\"channel = option.value\"\n >{{ option.label }}</DsRadio\n >\n </div>\n </div>\n\n <DsInput\n ref=\"searchRef\"\n v-model=\"query\"\n class=\"ds-add-to-sequence__search\"\n type=\"search\"\n size=\"sm\"\n :placeholder=\"searchPlaceholder\"\n />\n\n <p v-if=\"campaignsLabel\" class=\"ds-add-to-sequence__section\">{{ campaignsLabel }}</p>\n <div class=\"ds-add-to-sequence__list\" role=\"group\" :aria-label=\"campaignsLabel || label\">\n <div v-for=\"option in filtered\" :key=\"option.id\" class=\"ds-add-to-sequence__option\">\n <DsCheckbox\n :model-value=\"selected.has(option.id)\"\n @update:model-value=\"toggleCampaign(option, $event)\"\n >{{ option.name }}</DsCheckbox\n >\n </div>\n <p v-if=\"!filtered.length && emptyLabel\" class=\"ds-add-to-sequence__empty\">\n {{ emptyLabel }}\n </p>\n </div>\n\n <div class=\"ds-add-to-sequence__divider\" />\n <div class=\"ds-add-to-sequence__footer\">\n <DsButton\n class=\"ds-add-to-sequence__add\"\n :variant=\"DS_BUTTON_VARIANTS.PRIMARY\"\n :size=\"DS_BUTTON_SIZES.MEDIUM\"\n :disabled=\"selected.size === 0\"\n @click=\"add\"\n >{{ addLabel }}</DsButton\n >\n </div>\n </div>\n </DsPopover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref, useId, watch, type PropType } from 'vue';\nimport { DsPopover } from '@shared/ui/DsPopover';\nimport { DsTooltip } from '@shared/ui/DsTooltip';\nimport { DsInput } from '@shared/ui/DsInput';\nimport { DsRadio } from '@shared/ui/DsRadio';\nimport { DsCheckbox } from '@shared/ui/DsCheckbox';\nimport { DsButton, DS_BUTTON_SIZES, DS_BUTTON_VARIANTS } from '@shared/ui/DsButton';\nimport { ADD, SEARCH, UPDATE_OPEN } from '@shared/constants/events';\nimport {\n DS_PICKER_ALIGNS,\n DS_PICKER_SIZES,\n DS_SEQUENCE_CHANNELS,\n filterOptions,\n pickerPlacement,\n type DsPickerAlign,\n type DsPickerOption,\n type DsPickerSize,\n type DsSequenceChannel,\n type DsSequenceChannelOption,\n} from '@shared/constants/pickers';\nimport {\n DS_ADD_TO_SEQUENCE_VARIANTS,\n type DsAddToSequencePayload,\n type DsAddToSequenceVariant,\n} from './DsAddToSequence.types';\n\nconst props = defineProps({\n label: { type: String, required: true },\n tooltip: { type: String, default: '' },\n channelsLabel: { type: String, required: true },\n channels: { type: Array as PropType<DsSequenceChannelOption[]>, required: true },\n defaultChannel: {\n type: String as PropType<DsSequenceChannel>,\n default: DS_SEQUENCE_CHANNELS.WORK,\n },\n campaignsLabel: { type: String, default: '' },\n campaigns: { type: Array as PropType<DsPickerOption[]>, required: true },\n searchPlaceholder: { type: String, default: '' },\n emptyLabel: { type: String, default: '' },\n addLabel: { type: String, required: true },\n variant: {\n type: String as PropType<DsAddToSequenceVariant>,\n default: DS_ADD_TO_SEQUENCE_VARIANTS.SECONDARY,\n },\n size: { type: String as PropType<DsPickerSize>, default: DS_PICKER_SIZES.MEDIUM },\n // Fully round trigger — the bulk-bar look beside DsItemSelectorButton.\n pill: { type: Boolean, default: false },\n align: { type: String as PropType<DsPickerAlign>, default: DS_PICKER_ALIGNS.END },\n disabled: { type: Boolean, default: false },\n});\n\nconst emit = defineEmits([ADD, SEARCH, UPDATE_OPEN]);\n\nconst open = ref(false);\nconst query = ref('');\nconst searchRef = ref<InstanceType<typeof DsInput> | null>(null);\nconst channel = ref<DsSequenceChannel>(props.defaultChannel);\nconst selected = ref<Set<string | number>>(new Set());\nconst groupName = useId();\n\nconst placement = computed(() => pickerPlacement(props.align));\nconst filtered = computed(() => filterOptions(props.campaigns, query.value));\n// The export's two looks map onto DS button variants (secondary = white + ring = `outline`);\n// picker sizes onto DS control heights.\nconst buttonVariant = computed(() =>\n props.variant === DS_ADD_TO_SEQUENCE_VARIANTS.PRIMARY\n ? DS_BUTTON_VARIANTS.PRIMARY\n : DS_BUTTON_VARIANTS.OUTLINE\n);\nconst buttonSize = computed(() =>\n props.size === DS_PICKER_SIZES.LARGE ? DS_BUTTON_SIZES.LARGE : DS_BUTTON_SIZES.MEDIUM\n);\n\nfunction setOpen(next: boolean) {\n if (open.value === next) return;\n if (next) query.value = '';\n open.value = next;\n emit(UPDATE_OPEN, next);\n}\n\nfunction toggle() {\n if (props.disabled) return;\n setOpen(!open.value);\n}\n\nfunction toggleCampaign(option: DsPickerOption, on: boolean) {\n const next = new Set(selected.value);\n if (on) next.add(option.id);\n else next.delete(option.id);\n selected.value = next;\n}\n\nfunction add() {\n if (selected.value.size === 0) return;\n const payload: DsAddToSequencePayload = {\n channel: channel.value,\n campaigns: props.campaigns.filter((option) => selected.value.has(option.id)),\n };\n emit(ADD, payload);\n selected.value = new Set();\n setOpen(false);\n}\n\n// Cursor in the search as the panel opens, so the user can type at once.\nwatch(open, (isOpen) => {\n if (isOpen) nextTick(() => searchRef.value?.focus());\n});\nwatch(query, (value) => emit(SEARCH, value));\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/css/colors.scss' as colors;\n@use '../../assets/css/typography.scss' as t;\n@use '../../assets/css/spacing.scss' as s;\n@use '../../assets/css/radius.scss' as r;\n@use '../../assets/css/icons.scss' as i;\n@use '../../assets/css/motion.scss' as m;\n@use '../../assets/css/pickers.scss' as p;\n\n.ds-add-to-sequence {\n display: inline-flex;\n flex: none;\n position: relative;\n\n // Slot content of the DsButton trigger.\n &__icon {\n font-size: i.icon-size(16); // export: send 16\n line-height: 1;\n }\n &__label {\n white-space: nowrap;\n }\n\n // -- panel (export sequenceMenu, 288px) ----------------------------------------------\n &__section {\n @include p.section-label;\n }\n &__channels {\n display: flex;\n flex-direction: column;\n gap: 6px; // export\n padding: 0 6px 10px;\n }\n // Boxed radio card: hairline ring at rest, accent ring + tint when chosen (export).\n &__channel {\n border: 1px solid colors.$slate-tint;\n border-radius: r.$radius-card;\n background: colors.$white;\n transition:\n border-color m.$duration-default m.$easing,\n background-color m.$duration-default m.$easing;\n\n @include m.reduce-motion {\n transition: none;\n }\n\n :deep(.ds-radio) {\n display: flex;\n align-items: center;\n gap: s.spacing(1);\n padding: s.spacing(1) s.spacing(1.5); // export 8px 12px\n cursor: pointer;\n }\n :deep(.ds-radio__label) {\n color: colors.$slate-main;\n font-size: t.font-size('small');\n font-weight: t.$weight-bold;\n white-space: nowrap;\n }\n\n &.is-on {\n border-color: colors.$accent-main;\n background: colors.$accent-bg;\n\n :deep(.ds-radio__label) {\n color: colors.$accent-main;\n }\n }\n }\n\n &__search {\n width: 100%;\n }\n &__list {\n @include p.list(176px); // export maxHeight\n }\n &__option {\n @include p.option-row;\n\n :deep(.ds-checkbox__label) {\n font-size: t.font-size('small');\n font-weight: t.$weight-semibold; // export campaign rows: 13/600\n }\n }\n &__empty {\n @include p.empty;\n }\n &__divider {\n @include p.divider;\n }\n &__footer {\n @include p.footer;\n }\n}\n</style>\n"],"names":["DS_SPINNER_TONES","DS_SPINNER_SIZES","SPINNER_SIZE_PX","props","__props","resolvedSize","computed","_a","_createElementBlock","_normalizeClass","_normalizeStyle","CLICK","CLOSE","FOCUS","BLUR","CHANGE","FIELD_BLUR","COPY","REVEAL","CORRECT","INCORRECT","SORT","EDIT","SELECT_ALL","PAGE_CHANGE","PAGE_SIZE_CHANGE","SEARCH","SELECT","STEP","FINAL_STEP","NAVIGATE","RESIZE_START","RESIZE","RESIZE_END","UPDATE_OPEN","PICK","APPLY","ADD","CREATE","BACK","SUBMIT","DELETE","CREATE_OPTION","UPDATE_OPTION","UPDATE_NAME","UPDATE_COLOR","FORM_CLOSE","DS_BUTTON_VARIANTS","DS_BUTTON_SIZES","DS_BUTTON_NATIVE_TYPES","emit","__emit","iconSize","SOLID_FILL_VARIANTS","spinnerTone","handleClick","event","_createBlock","_unref","DsSpinner","_createElementVNode","$slots","_openBlock","_hoisted_3","_renderSlot","_ctx","_hoisted_4","_toDisplayString","_hoisted_5","_hoisted_6","_hoisted_7","DS_TAG_TONES","_hoisted_1","_cache","_withModifiers","$event","DS_BADGE_TONES","imageFailed","ref","watch","onImageError","showsImage","initials","derivedLabel","ariaLabel","boxWidth","boxHeight","boxStyle","resolvedTextSize","hashed","seed","hash","i","rgb","light","_hoisted_2","model","_useModel","inputRef","syncIndeterminate","onMounted","DS_TABLE_ALIGN","DS_TABLE_PIN","compoundColspan","rowHeightStyle","heightStyle","onSelectAll","checked","pinWidthPx","width","match","columnPinStyles","map","left","col","right","pinEdgeKeys","lefts","c","rights","set","columnPinClass","column","columnHeaderStyle","pin","columnCellStyle","normalizedHeaders","h","headerPinStyles","list","headerPinEdges","headerPinClass","header","index","headerStyle","wrapperRef","scrolledStart","scrolledEnd","resizeObserver","updateScrollShadow","el","teardownScroll","prev","onBeforeUnmount","nextTick","_createVNode","DsCheckbox","_Fragment","_renderList","_hoisted_8","_hoisted_10","row","DS_INPUT_TYPES","DS_INPUT_SIZES","inputEl","onFieldFocusOut","e","next","root","slots","useSlots","reveal","toggleReveal","isPassword","isSearch","resolvedType","hasRevealToggle","hasSuffix","__expose","n","DS_TEXTAREA_RESIZE","DS_TEXTAREA_VARIANTS","FALLBACK_LINE_HEIGHT","value","v","control","px","fit","cs","line","chrome","content","min","max","onFocus","onBlur","observer","lastWidth","entry","attrs","useAttrs","isRootAttr","k","rootAttrs","controlAttrs","_mergeProps","DS_ALERT_TYPES","DS_ALERT_EFFECTS","DS_ALERT_ICONS","visible","icon","hasBody","hasTitle","onClose","_Transition","TELEPORTED_Z_INDEX","DS_NOTIFICATION_TYPES","DS_NOTIFICATION_POSITIONS","DS_NOTIFICATION_ICONS","DS_NOTIFICATION_ROLES","DS_NOTIFICATION_TYPE_ROLES","DS_NOTIFICATION_LINK_TARGETS","STACK_CLASS","notificationTeleportTarget","position","modifier","existing","host","resolvedRole","teleportTarget","linkRel","timer","startedAt","remaining","clearTimer","schedule","ms","pause","resume","onLinkClick","_Teleport","dialogRef","lastFocused","titleId","useId","dialogStyle","onBackdrop","focusables","onKeydown","f","first","last","activateModal","_b","deactivateModal","restoreFocus","active","wasActive","DsButton","POINTER_EVENTS","modality","consumers","onPointerDown","attach","type","detach","isKeyboardFocus","useInputModality","useTeleportAnchor","rootRef","onTriggerHidden","anchorRect","tracking","triggerVisibility","anchorStyle","box","rect","sync","watchTriggerVisibility","entries","track","untrack","VIEWPORT_SHIFT_VAR","VIEWPORT_MARGIN","OPPOSITE_SIDE","useViewportClamp","elRef","placement","flip","shift","flipped","shiftStyle","resolvedPlacement","preferred","dash","side","opposite","measureFlip","trigger","t","gap","below","above","size","measure","r","shiftsHorizontally","start","end","limit","activate","deactivate","DS_TOOLTIP_PLACEMENTS","BUBBLE_GAP","tooltipId","bubbleRef","activateClamp","deactivateClamp","trackAnchor","untrackAnchor","isVisible","hasContent","d","hide","hovering","focused","describedEl","prevDescribedBy","describe","undescribe","scheduleShow","onMouseLeave","onFocusIn","target","onFocusOut","wrapper","DS_VERIFICATION_STATES","status","_createTextVNode","useClipboardCopy","unmounted","copy","text","copied","copiedTimer","copyToClipboard","handleCopy","handleCorrect","handleIncorrect","DsVerificationIcon","DsBadge","collapsed","total","showSections","empty","isCollapsed","toggle","onCopy","onSort","onEdit","onCorrect","datum","onIncorrect","_hoisted_9","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","DsContactValue","_hoisted_19","_hoisted_20","_hoisted_21","handleChange","uid","inputId","descriptionId","hasDescription","DS_SELECT_TYPES","DS_SELECT_WIDTHS","instanceId","listboxId","optionId","triggerRef","searchRef","open","activeIndex","query","isFilter","localFilterActive","filteredOptions","q","o","visibleOptions","runs","result","option","g","selectedValues","hasSelection","isFilterSelected","isSelected","labelCache","reactive","opts","labelFor","_c","summaryText","NAMED_WIDTHS","widthClass","rootStyle","activeOptionId","findInitialActiveIndex","firstSelected","openDropdown","closeDropdown","refocusTrigger","toggleOpen","selectOption","current","alreadySelected","clearSelection","moveActive","delta","len","onTriggerKeydown","onSearchKeydown","onSearchInput","onDocumentMousedown","isOpen","isDisabled","run","it","onClick","toLength","cellStyle","style","offset","DS_CUSTOM_TAG_TYPES","DS_PILL_TONES","legendSegments","seg","hasLegend","idx","$attrs","ELLIPSIS_LEFT","ELLIPSIS_RIGHT","pageCount","pages","count","_","items","page","goTo","onSizeChange","item","s","DS_WIZARD_STEP_STATES","isLast","resolvedSteps","step","state","selectStep","finish","_resolveDynamicComponent","DS_DRAWER_DIRECTIONS","panelRef","labelledBy","clamp","currentWidth","resizing","panelStyle","requestClose","swallowOverlayClick","onOverlay","startX","startWidth","widthFromEvent","raw","onDragStart","onDragMove","onDragEnd","stopDragListening","DS_POPOVER_PLACEMENTS","POPOVER_LAYER","PANEL_GAP","nestedContains","containsNode","node","contains","layer","provide","unregisterFromParent","inject","panelId","anchorBox","close","onTriggerClick","onEscape","onDocumentMouseDown","wasOpen","ENABLED_ITEM","useMenuKeyboard","menuRef","options","focusFirst","DS_ACTION_MENU_WEIGHTS","innerOpen","setOpen","openFromKey","focusTrigger","closeAndRefocus","choose","onMenuKeydown","opened","DsPopover","args","failed","initial","imageStyle","rows","detail","DsCompanyLogo","DsTooltip","DS_CONTACT_KINDS","DS_CONTACT_TYPES","DS_CONTACT_TYPE_ICONS","contactTypeIcon","kind","MASK_GLYPHS","overflowFromGroupSize","groupSize","pushSegment","segments","masked","splitMaskedValue","at","isGlyph","EMAIL_MASK_CIRCLES","MASK_CIRCLE","circlesFor","segment","char","firstCircleIndex","groups","section","sum","group","showsBadge","iconFor","rowKey","copiedKey","key","DsMaskedValue","DsDeliverabilityBadge","pinned","primary","hasPopover","overflow","hasMasked","showsReveal","leaveTimer","onEnter","onLeave","onPanelEnter","onPanelLeave","onPopoverUpdate","onDocumentKeydown","isNowOpen","DsMoreCountChip","DsContactList","bodyId","showsBody","toggleAttrs","DS_CONTACT_PLACEHOLDER_STATES","DS_CONTACT_PLACEHOLDER_ICONS","glyph","DS_CLAMPED_TEXT_DEFAULT_LINES","textId","textRef","expanded","overflows","showToggle","subline","field","hasRest","DsProfileCard","DsClampedText","fullName","headlineRef","isHeadlineTruncated","checkHeadlineTruncation","DsAvatar","logoFailed","onLogoError","showsLogo","DS_PICKER_SIZES","DS_PICKER_ALIGNS","DS_PICKER_PANEL_MAX_WIDTH","DS_PICKER_CREATE_MODES","DS_PICKER_ROW_ACTIONS","DS_SEQUENCE_CHANNELS","filterOptions","needle","pickerPlacement","align","mergeCopy","defaults","partials","merged","partial","hasColors","isValidCreateMode","isValidRowActionsMode","resolveLegacyPickerProps","input","withForm","create","rowActions","alias","targets","labelId","swatchEls","touched","trimmedName","isValid","isChanged","canSubmit","validationError","shownError","tabStop","onNameInput","submit","setSwatchRef","ARROW_STEPS","onSwatchKeydown","focus","DsInput","swatch","activeMenu","self","usePickerOrganizer","view","mode","editing","formName","formColor","dismissedError","isForm","firstColor","shownFormError","error","editingColor","resetForm","openCreateForm","name","onDelete","onSubmit","color","closeForm","DS_SAVED_BUTTON_COPY","DS_SAVED_BUTTON_LEGACY_COPY","resolved","createMode","rowActionsMode","openForm","groupName","filtered","buttonSize","isCurrent","pick","onCreate","DsOrganizerForm","DsRadio","DsPickerRowActions","DS_TAG_PICKER_COPY","DS_TAG_PICKER_LEGACY_COPY","selected","showNew","hasTags","triggerLabel","trimmedQuery","canCreate","tag","labelRef","isLabelTruncated","checkLabelTruncation","toggleTag","on","apply","known","DS_ADD_TO_SEQUENCE_VARIANTS","channel","buttonVariant","toggleCampaign","add","payload"],"mappings":"uGAEaA,GAAmB,CAC9B,KAAM,OACN,MAAO,QACP,OAAQ,QACV,EAMaC,GAAmB,CAC9B,MAAO,QACP,OAAQ,SACR,MAAO,OACT,8LCKA,MAAMC,EAAiD,CACrD,CAACD,GAAiB,KAAK,EAAG,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