Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
41476f2
chore: figma connect Button
ilhan007 Jul 22, 2026
8794221
chore: figma connect 7 more components + MessageStrip colorScheme
ilhan007 Aug 10, 2026
f8826ce
chore: figma connect Switch, Link, Avatar
ilhan007 Aug 10, 2026
4ebe1da
fix(figma): Avatar add disabled mapping, document shape←Content
ilhan007 Aug 10, 2026
b7fe3b9
docs(figma): add API↔Figma findings audit; fix Switch design misalign…
ilhan007 Aug 11, 2026
89f6680
docs(figma): screenshot-verify all 11 component mappings
ilhan007 Aug 11, 2026
4e910c1
feat(figma): map Input valueStateMessage text from nested popover
ilhan007 Aug 11, 2026
0bb1f43
docs(figma): mark Input valueStateMessage as mapped in findings
ilhan007 Aug 11, 2026
f88a5eb
fix(figma): Button badge mapping bugs
ilhan007 Aug 11, 2026
1a5b585
docs(figma): make Button badge text=72 hardcoding explicit
ilhan007 Aug 11, 2026
ff03df8
feat(figma): Button badge design from Form Factor (Compact/Cozy)
ilhan007 Aug 11, 2026
b6e7ce8
revert(figma): remove Input valueStateMessage mapping (broken output)
ilhan007 Aug 11, 2026
2cbbd7e
feat(figma): map Input valueStateMessage (correct top-level-prop patt…
ilhan007 Aug 11, 2026
19fb79d
feat(figma): map valueStateMessage for StepInput + Select
ilhan007 Aug 12, 2026
995351e
fix(figma): Switch design mapping restored; SegmentedButton Type→text…
ilhan007 Aug 12, 2026
6ba1573
docs(figma): focus findings on Figma→code gaps, drop WC-only-prop noise
ilhan007 Aug 12, 2026
7b40a06
feat(figma): Link map icon/endIcon from Icon Position
ilhan007 Aug 12, 2026
29491c8
docs(figma): Avatar initials verified (Type-conditional in Figma)
ilhan007 Aug 12, 2026
aea6753
feat(figma): Avatar icon mapping; consolidate to single findings doc
ilhan007 Aug 12, 2026
592a66b
docs(figma): slim findings to gaps only (doesnt-work + assumed)
ilhan007 Aug 12, 2026
eac5e42
feat(figma): Avatar emit placeholder image + badge
ilhan007 Aug 12, 2026
93f484b
feat(figma): MessageStrip read message text; finalize (undeferred)
ilhan007 Aug 12, 2026
51bc140
feat(figma): MessageStrip emit icon slot placeholder on Icon=True
ilhan007 Aug 12, 2026
3b3910a
docs(figma): proposal to make icon names readable in Code Connect
ilhan007 Aug 13, 2026
4520be8
fix(figma): revert Button badge design to hardcoded; add runbook + ic…
ilhan007 Aug 13, 2026
fb684e7
docs(figma): correct the icon global note with tested nuance
ilhan007 Aug 13, 2026
30d1cb2
docs(figma): expand runbook into full setup + per-component guide
ilhan007 Aug 13, 2026
f0edcae
docs(figma): make runbook accurate for a clean clone
ilhan007 Aug 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ npm-debug.log
# Ignore Mac files
.DS_Store

.claude/playwright-*
# Ignore Visual Studio project and settings files
*.sln
*.suo
Expand Down
155 changes: 155 additions & 0 deletions packages/main/FIGMA_CODE_CONNECT_FINDINGS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# Figma Code Connect — what doesn't work / what's assumed

## How to connect a component (setup + runbook)

**Figma file:** SAP Web UI Kit — fileKey `SILcWzK5uFghKun9jx6D7c`.
**Everything below runs from `packages/main`.**

### One-time setup

**1. Clone the repo and install** (from the repo root):
```
git clone https://github.com/UI5/webcomponents.git
cd webcomponents
yarn # installs all workspace deps
```
> On the branch that carries this Code Connect work, `@figma/code-connect` and the
> config files are already present (skip steps 2–3). On a clean `main` checkout
> they are **not** — do steps 2–3 first.

**2. Add the Code Connect dependency** to `packages/main` (only if not already there):
```
cd packages/main
yarn add -D @figma/code-connect # this repo uses ^1.4.9
```

**3. Create the two config files** in `packages/main`, one per label:

`figma.config.json` (Web Components):
```jsonc
{ "codeConnect": {
"include": ["src/**/*.figma.ts"], "exclude": ["node_modules/**", "dist/**"],
"parser": "html", "label": "Web Components" } }
```
`figma.config.react.json` (React):
```jsonc
{ "codeConnect": {
"include": ["src/**/*.figma.tsx"], "exclude": ["node_modules/**", "dist/**"],
"parser": "react", "label": "React" } }
```

**4. Generate a Figma token:** figma.com → **profile → Settings → Security →
Personal access tokens → Generate**. Scope: file content read/write for Code
Connect. Keep it out of git; pass it inline (`FIGMA_ACCESS_TOKEN=…`) or export it.

### Per component

**5. Create the two mapping files** in `packages/main/src/`:
- `src/<Name>.figma.ts` (Web Components) and `src/<Name>.figma.tsx` (React) —
each a single `figma.connect(<node-url>, { props, example })`.
- Get the node id from the Figma URL (`?node-id=1-2` → `1:2`). To scaffold a
starter pre-filled with the node's readable props:
```
FIGMA_ACCESS_TOKEN=<token> npx figma connect create "<node-url>" --outDir /tmp/cc
```

**6. Dry-run** (no token — catches parser errors):
```
npx figma connect publish --dry-run -c figma.config.json
npx figma connect publish --dry-run -c figma.config.react.json
```

**7. Publish** (needs the token; run from `packages/main`):
```
FIGMA_ACCESS_TOKEN=<token> npx figma connect publish -c figma.config.json --force
FIGMA_ACCESS_TOKEN=<token> npx figma connect publish -c figma.config.react.json --force
```
- `--force` overwrites any pre-existing (UI-created) mapping on the node.
- ⚠️ MUST run from `packages/main` — from the repo root the CLI can't find the
config and silently falls back to the html parser. Always confirm the output
says `Using label "React"` (not "Web Components") for the React publish.

**8. Verify in Figma Dev Mode** — parsing/upload success ≠ correct output. Open
the node, check the real snippet under each framework label.

**Connected so far (11, both WC + React):**
Button `91702:11733` · Input `148569:1004` · CheckBox `154589:905` ·
RadioButton `154597:1967` · StepInput `148569:1727` · MessageStrip `910:2517` ·
Select `181557:7507` · SegmentedButton `91702:11986` · Switch `24087:10369` ·
Link `187:305` · Avatar `573:3623`.
(Icon `983:5876` is unpublishable — a plain frame, not a component set.)

## ⚠️ Global: reading the swapped icon (nuanced — tested)
In Figma an icon is an **INSTANCE_SWAP** property — the designer swaps in an icon
*component* from the library. What Code Connect can and can't do with it:

- **As a name STRING → NO.** `figma.string`/`figma.enum` cannot read which
component was swapped in. So attribute-style icons (`icon="globe"`, `endIcon=`,
`fallback-icon=`) can't be made dynamic this way and stay **hardcoded**
placeholders (`"globe"`, `"inspect"`, `"home"`, `"employee"`); consumer edits.
- **As an ELEMENT via `figma.instance()` → YES, conditionally.** If the icon
library is **Code-Connected** (each icon emits `<ui5-icon name="…">`) AND the
host's icon instance carries a `mainComponent` link, `figma.instance("Icon")`
resolves the **selected** icon's element. **Tested:** ✅ worked on Button
(`<ui5-icon name="globe">` resolved); ❌ empty on MessageStrip (its instance
had no `mainComponent` link). Only fits **slot/child** placements — its output
is an element, not a bare string, so it still can't feed an `icon=` attribute.

**Owner fixes:** (a) add an `Icon Name` **text property** alongside the swap →
`figma.string` reads it → works for the attribute cases; (b) **Code-Connect the
icon library** (generated, ~1400 entries) → `figma.instance` resolves the
element for slot cases on link-carrying hosts.


## 1. Button — ui5-button (node 91702:11733)
**Doesn't work:**
- badge `text` — **HARDCODED `"72"`, NOT read from Figma.** The count is in an unexposed nested layer; the snippet always emits `text="72"` and won't track the Figma number. *Owner fix: expose the count as a readable text prop.*


**Assumed (design rule):**
- badge `design` ← Form Factor: Compact → InlineText, Cozy → OverlayText (per kit owners). *Confirm by toggling Form Factor with a counter badge on.*


## 2. Input — ui5-input (node 148569:1004)
**Doesn't work:**
- `Content` (Placeholder vs Typed Text) — Figma-only display toggle; can't gate which text emits, so both `value` and `placeholder` are always emitted.

## 3. Select — ui5-select (node 181557:7507)
**Doesn't work:**

-`options` → placeholder options

What: The generated <ui5-select> always shows generic <ui5-option>Option 1/2/3</ui5-option>,
never the real dropdown choices from the design.

Why: Options are slotted children (same as SegmentedButton labels). In Figma the Select is
drawn as a closed control — it's essentially an embedded Input showing the selected text,
with no readable list of the option values behind it. So there's nothing to read → fixed
placeholders.

- `Drop-Down` (True/False) → Figma-only runtime open state

Figma has a Drop-Down variant (closed vs open-showing-the-list). But "open/closed" is a
runtime interaction state, not a component property in code — you don't write <ui5-select
open> as a design intent. So there's nothing meaningful to emit from it; it's a Figma-only
concept.


## 4. SegmentedButton — ui5-segmented-button (node 91702:11986)

**Doesn't work:**

- segment `labels` — the item text ("Option 1"…) lives in Figma slots (⿻ Text Segments),
which are light-DOM projection, not a readable property. So real labels can't be read →
placeholders. (Different from the icon issue: this is slotted content, not instance-swap.)
- selected `segment` — which segment is pressed isn't exposed as a readable prop at all, so I
just mark item 1 selected as a stand-in — it won't match the actually-selected one in the
design.


## 5. Avatar — ui5-avatar (node 573:3623)
**Doesn't work:**
- `image` slot — slotted image, not readable.
- `badge` slot ← Badge boolean — presence only, not content.


86 changes: 86 additions & 0 deletions packages/main/FIGMA_ICON_NAME_PROPOSAL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Proposal: make icon names readable in Code Connect (SAP Web UI Kit)

**Audience:** SAP Web UI Kit Figma owners + webcomponents/tooling team
**File:** SAP Web UI Kit, `SILcWzK5uFghKun9jx6D7c`
**Date:** 2026-08-13

## The problem

Several components' Code Connect mappings (Button, Link, StepInput, Avatar,
SegmentedButton, MessageStrip) can detect that an icon is **present** — and often
**where** it sits (Link's Icon Position, Avatar's Type=Icon) — but they **cannot
emit which icon it is**. Every `icon=` / `endIcon=` / `fallback-icon=` in the
generated snippets is a **hardcoded placeholder** (`"globe"`, `"inspect"`,
`"home"`, `"employee"`, `"information"`) that the consumer must edit by hand.

### Why (root cause)

In Figma an icon is an **INSTANCE_SWAP** property — the designer swaps in an icon
*component* from the icon library. Code Connect's mapping primitives are:

`figma.string` (reads a **text** property) · `figma.boolean` · `figma.enum`
(fixed lookup over known variant options) · `figma.instance` · `figma.children`
· `figma.textContent` · `figma.nestedProps`.

**None of them return "the name of the component currently swapped into an
instance-swap slot" as a string.** The name is visible in Figma's UI and exists
as instance metadata (`mainComponentName`), but it is not exposed to the mapping
author through any `figma.*` call. `figma.string` only reads text fields, and the
icon is not a text field. So the mapping can toggle the attribute on/off but must
hardcode the value.

## Two fixes (complementary)

### Option A — add an `Icon Name` text property → **Figma owner, quick win**

On each component that has an icon instance-swap, add a plain **text property**
(e.g. `Icon Name`) holding the icon's registry name. The mapping then reads it:

```ts
icon: figma.string("Icon Name") // → icon="employee" dynamically
```

- **Pro:** trivial, pure Figma-side, unlocks dynamic icon names immediately.
- **Con:** duplicated data — the designer must keep the typed name in sync with
the icon actually swapped in, so it can drift.

### Option B — Code-Connect the icon library → **webcomponents/tooling team, durable**

Give **each icon component** in the kit its own tiny Code Connect entry whose only
output is its own registry name. Then, on any host component:

```ts
icon: figma.instance("Icon") // resolves to the SELECTED icon's name
```

because `figma.instance` resolves a swapped instance **through that instance's own
Code Connect entry**.

- **This is generated, not hand-written.** The kit already names each icon
instance by its icon (`mainComponentName: "information"`), and the icons package
already has the full name registry. A script iterates the icon set and emits one
`figma.connect()` per icon (each outputting its name), using the icon library's
Figma node IDs (from the Figma API).
- **Pro:** correct forever, zero designer effort, no drift.
- **Con:** ~1400 published connections (one-time), needs the icon library node IDs,
re-run the generator when the icon set changes.

**Can we drive this from our own `@ui5/webcomponents-icons` package?** Yes — that
package is the source of truth for icon names, so it's the natural input to the
generator in Option B. The only Figma-side dependency is the mapping from each
icon name to its Figma component node ID, which the Figma API provides.

## Recommendation

- **Option A now** — one text property per component, immediate dynamic icons.
- **Option B as the durable solution** — generated from `@ui5/webcomponents-icons`,
owned by the webcomponents team, no drift.

Until either lands, icon **presence/position** is mapped but the **name** is a
placeholder the consumer edits.

## Same class of issue (for context)

The badge **count** on Button (`text="72"`) is hardcoded for the same reason — it
lives in an unexposed nested layer, not a readable property. Exposing it as a
`Badge Count` text property (like Option A) would make it dynamic too.
8 changes: 8 additions & 0 deletions packages/main/figma.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"codeConnect": {
"include": ["src/**/*.figma.ts"],
"exclude": ["node_modules/**", "dist/**"],
"parser": "html",
"label": "Web Components"
}
}
8 changes: 8 additions & 0 deletions packages/main/figma.config.react.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"codeConnect": {
"include": ["src/**/*.figma.tsx"],
"exclude": ["node_modules/**", "dist/**"],
"parser": "react",
"label": "React"
}
}
1 change: 1 addition & 0 deletions packages/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.10.10",
"@figma/code-connect": "^1.4.9",
"@ui5/cypress-internal": "0.1.0",
"@ui5/webcomponents-tools": "2.25.0-rc.0",
"cypress": "15.18.1",
Expand Down
84 changes: 84 additions & 0 deletions packages/main/src/Avatar.figma.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/**
* Web Components Code Connect mapping for the SAP Web UI Kit "Avatar".
* Node: 573:3623. Emits <ui5-avatar>.
*
* See FIGMA_CODE_CONNECT_FINDINGS.md § Avatar. Pseudo-states ignored.
*/
import figma, { html } from "@figma/code-connect/html";

Check failure on line 7 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Missing file extension for "@figma/code-connect/html"

figma.connect(

Check failure on line 9 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (fiori)

Property 'connect' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 9 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (base)

Property 'connect' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 9 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Property 'connect' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 9 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-2)

Property 'connect' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 9 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-4)

Property 'connect' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 9 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / deploy-preview

Property 'connect' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 9 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-1)

Property 'connect' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 9 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-3)

Property 'connect' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 9 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (ai)

Property 'connect' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 9 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (compat)

Property 'connect' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.
"https://www.figma.com/design/SILcWzK5uFghKun9jx6D7c/SAP-Web-UI-Kit?node-id=573-3623",

Check failure on line 10 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Expected indentation of 1 tab but found 2 spaces
{

Check failure on line 11 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Expected indentation of 1 tab but found 2 spaces
props: {

Check failure on line 12 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Expected indentation of 2 tabs but found 4 spaces
// Size → size (1:1).

Check failure on line 13 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Expected indentation of 3 tabs but found 6 spaces
size: figma.enum("Size", {

Check failure on line 14 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (fiori)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 14 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (base)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 14 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 14 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-2)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 14 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-4)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 14 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / deploy-preview

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 14 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-1)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 14 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-3)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 14 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (ai)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 14 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (compat)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 14 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Expected indentation of 3 tabs but found 6 spaces
XS: 'size="XS"',

Check failure on line 15 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Strings must use doublequote

Check failure on line 15 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Expected indentation of 4 tabs but found 8 spaces
S: 'size="S"',

Check failure on line 16 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Strings must use doublequote

Check failure on line 16 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Expected indentation of 4 tabs but found 8 spaces
M: 'size="M"',
L: 'size="L"',
XL: 'size="XL"',
}),
// Color axis → color-scheme. 1..10 → Accent1..Accent10; Transparent/
// Placeholder map 1:1; Image/Tile have no color-scheme equivalent.
colorScheme: figma.enum("Color", {

Check failure on line 23 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (fiori)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 23 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (base)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 23 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 23 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-2)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 23 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-4)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 23 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / deploy-preview

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 23 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-1)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 23 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-3)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 23 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (ai)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 23 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (compat)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.
"1": 'color-scheme="Accent1"',
"2": 'color-scheme="Accent2"',
"3": 'color-scheme="Accent3"',
"4": 'color-scheme="Accent4"',
"5": 'color-scheme="Accent5"',
"6": 'color-scheme="Accent6"',
"7": 'color-scheme="Accent7"',
"8": 'color-scheme="Accent8"',
"9": 'color-scheme="Accent9"',
"10": 'color-scheme="Accent10"',
Transparent: 'color-scheme="Transparent"',
Placeholder: 'color-scheme="Placeholder"',
Image: "",
Tile: "",
}),
// Content → shape. Person → Circle, Object → Square.
// VERIFIED by screenshot of node 573:3623: Person column renders circles,
// Object column renders squares. NOTE misalignment: in Figma shape is
// COUPLED to Content (content source), but in the WC `shape` is an
// INDEPENDENT prop — Figma can't express e.g. a square person avatar.
shape: figma.enum("Content", {

Check failure on line 44 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (fiori)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 44 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (base)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 44 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 44 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-2)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 44 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-4)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 44 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / deploy-preview

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 44 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-1)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 44 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-3)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 44 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (ai)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 44 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (compat)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.
Person: 'shape="Circle"',
Object: 'shape="Square"',
}),
// Interaction State = Disabled → disabled.
disabled: figma.enum("Interaction State", {

Check failure on line 49 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (fiori)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 49 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (base)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 49 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 49 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-2)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 49 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-4)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 49 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / deploy-preview

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 49 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-1)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 49 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-3)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 49 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (ai)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 49 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (compat)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.
Disabled: "disabled",
Regular: "",
Hover: "",
Active: "",
"Toggled Hover": "",
}),
// Initials text — the Figma Initials layer only exists on Type=Initials
// variants, so this resolves empty (attribute omitted) on Image/Icon.
initials: figma.string("✏️ Initials"),

Check failure on line 58 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (fiori)

Property 'string' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 58 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (base)

Property 'string' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 58 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Property 'string' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 58 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-2)

Property 'string' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 58 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-4)

Property 'string' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 58 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / deploy-preview

Property 'string' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 58 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-1)

Property 'string' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 58 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-3)

Property 'string' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 58 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (ai)

Property 'string' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 58 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (compat)

Property 'string' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.
// Type=Icon → icon="employee" (WC default). Icon NAME is a placeholder —
// Person/Object Icon are instance-swaps, not readable. Emitted only for
// the Icon type.
icon: figma.enum("Type", {

Check failure on line 62 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (fiori)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 62 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (base)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 62 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 62 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-2)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 62 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-4)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 62 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / deploy-preview

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 62 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-1)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 62 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-3)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 62 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (ai)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 62 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (compat)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.
Icon: 'icon="employee"',
Image: "",
Initials: "",
}),
// Type=Image → slotted <img> with a placeholder URL (the actual image
// fill isn't readable). Consumer swaps the src.
image: figma.enum("Type", {

Check failure on line 69 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (fiori)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 69 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (base)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 69 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 69 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-2)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 69 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-4)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 69 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / deploy-preview

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 69 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-1)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 69 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-3)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 69 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (ai)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 69 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (compat)

Property 'enum' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.
Image: html`<img src="https://via.placeholder.com/48" />`,
Icon: "",
Initials: "",
}),
// Badge boolean → slotted <ui5-avatar-badge> with placeholder icon="edit"
// (badge content isn't readable — presence only).
badge: figma.boolean("Badge", {

Check failure on line 76 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (fiori)

Property 'boolean' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 76 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (base)

Property 'boolean' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 76 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Property 'boolean' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 76 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-2)

Property 'boolean' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 76 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-4)

Property 'boolean' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 76 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / deploy-preview

Property 'boolean' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 76 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-1)

Property 'boolean' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 76 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-3)

Property 'boolean' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 76 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (ai)

Property 'boolean' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.

Check failure on line 76 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (compat)

Property 'boolean' does not exist on type 'typeof import("/home/runner/work/webcomponents/webcomponents/node_modules/@figma/code-connect/dist/html/index_html")'.
true: html`<ui5-avatar-badge slot="badge" icon="edit"></ui5-avatar-badge>`,
false: "",
}),
},
example: ({ size, colorScheme, shape, disabled, initials, icon, image, badge }) =>

Check failure on line 81 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (fiori)

Binding element 'size' implicitly has an 'any' type.

Check failure on line 81 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (base)

Binding element 'size' implicitly has an 'any' type.

Check failure on line 81 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check

Binding element 'size' implicitly has an 'any' type.

Check failure on line 81 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-2)

Binding element 'size' implicitly has an 'any' type.

Check failure on line 81 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-4)

Binding element 'size' implicitly has an 'any' type.

Check failure on line 81 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / deploy-preview

Binding element 'size' implicitly has an 'any' type.

Check failure on line 81 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-1)

Binding element 'size' implicitly has an 'any' type.

Check failure on line 81 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (main:cy:suite-3)

Binding element 'size' implicitly has an 'any' type.

Check failure on line 81 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (ai)

Binding element 'size' implicitly has an 'any' type.

Check failure on line 81 in packages/main/src/Avatar.figma.ts

View workflow job for this annotation

GitHub Actions / check (compat)

Binding element 'size' implicitly has an 'any' type.
html`<ui5-avatar ${size} ${shape} ${colorScheme} ${disabled} ${icon} initials="${initials}">${image}${badge}</ui5-avatar>`,
}
);
Loading
Loading