@oicl/openbridge-webcomponents-full-bundle 2.0.0-next.144 → 2.0.0-next.145

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.
Files changed (30) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +4736 -4470
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +206 -21
  4. package/dist/components/checkbox-item/checkbox-item.css.js +137 -12
  5. package/dist/components/checkbox-item/checkbox-item.css.js.map +1 -1
  6. package/dist/components/checkbox-item/checkbox-item.d.ts +68 -39
  7. package/dist/components/checkbox-item/checkbox-item.d.ts.map +1 -1
  8. package/dist/components/checkbox-item/checkbox-item.js +66 -25
  9. package/dist/components/checkbox-item/checkbox-item.js.map +1 -1
  10. package/dist/components/checkbox-list/checkbox-list-visibility.d.ts +16 -0
  11. package/dist/components/checkbox-list/checkbox-list-visibility.d.ts.map +1 -0
  12. package/dist/components/checkbox-list/checkbox-list-visibility.js +12 -0
  13. package/dist/components/checkbox-list/checkbox-list-visibility.js.map +1 -0
  14. package/dist/components/checkbox-list/checkbox-list.css.js +23 -0
  15. package/dist/components/checkbox-list/checkbox-list.css.js.map +1 -0
  16. package/dist/components/checkbox-list/checkbox-list.d.ts +66 -0
  17. package/dist/components/checkbox-list/checkbox-list.d.ts.map +1 -0
  18. package/dist/components/checkbox-list/checkbox-list.js +81 -0
  19. package/dist/components/checkbox-list/checkbox-list.js.map +1 -0
  20. package/package.json +1 -1
  21. package/src/components/checkbox-item/checkbox-item.css +63 -17
  22. package/src/components/checkbox-item/checkbox-item.spec.ts +115 -0
  23. package/src/components/checkbox-item/checkbox-item.stories.ts +82 -97
  24. package/src/components/checkbox-item/checkbox-item.ts +118 -64
  25. package/src/components/checkbox-list/checkbox-list-visibility.spec.ts +68 -0
  26. package/src/components/checkbox-list/checkbox-list-visibility.ts +23 -0
  27. package/src/components/checkbox-list/checkbox-list.css +13 -0
  28. package/src/components/checkbox-list/checkbox-list.spec.ts +93 -0
  29. package/src/components/checkbox-list/checkbox-list.stories.ts +161 -0
  30. package/src/components/checkbox-list/checkbox-list.ts +130 -0
@@ -5518,7 +5518,7 @@
5518
5518
  {
5519
5519
  "kind": "variable",
5520
5520
  "name": "ObcCheckboxItem",
5521
- "default": "class extends LitElement { constructor() { super(...arguments); this.status = CheckboxStatus.unchecked; this.state = \"enabled\"; this.disabled = false; this.label = \"\"; this.isNested = false; this.isLevel1 = false; this.isLevel2 = false; this.hoverStyle = \"touch-target\"; this.ariaDescribedBy = \"\"; } toggleStatusFromItem() { const isDisabled = this.disabled || this.state === \"disabled\"; if (this.status === CheckboxStatus.checked) { this.status = CheckboxStatus.unchecked; } else { this.status = CheckboxStatus.checked; } this.dispatchEvent( new CustomEvent(\"change\", { detail: { status: this.status, disabled: isDisabled } }) ); } handleItemClick(event) { if (this.disabled || this.state === \"disabled\") return; const path = event.composedPath(); const checkboxElement = this.checkboxElement; if (checkboxElement && path.includes(checkboxElement)) return; this.toggleStatusFromItem(); } handleCheckboxChange(event) { const checkboxEvent = event; this.status = checkboxEvent.detail.status; this.dispatchEvent( new CustomEvent(\"change\", { detail: checkboxEvent.detail }) ); } focus(options) { this.checkboxElement?.focus(options); } render() { const isDisabled = this.disabled || this.state === \"disabled\"; const hasCheckboxHoverEffects = !(this.hoverStyle === \"touch-target\" && !isDisabled); const shouldRenderNestedSpacer = this.isNested && this.isLevel2; const shouldRenderChevronContainer = this.isNested; const shouldRenderChevronIcon = this.isNested && this.isLevel1; const checkboxAriaLabel = this.label.trim().length > 0 ? this.label : void 0; return html` <div class=${classMap({ \"checkbox-item-container\": true, [`status-${this.status}`]: true, [`hover-style-${this.hoverStyle}`]: true, \"is-nested\": this.isNested, \"is-level-1\": this.isLevel1, \"is-level-2\": this.isLevel2, disabled: isDisabled })} @click=${this.handleItemClick} > ${shouldRenderChevronContainer ? html`<div class=\"chevron-container\" aria-hidden=\"true\"> ${shouldRenderChevronIcon ? html`<obi-chevron-right-google class=\"chevron-icon\" ></obi-chevron-right-google>` : nothing} </div>` : nothing} ${shouldRenderNestedSpacer ? html`<div class=\"nested-spacer\" aria-hidden=\"true\"></div>` : nothing} <div class=\"content-container\"> <obc-checkbox .status=${this.status} .state=${CheckboxState.enabled} .disabled=${isDisabled} .hasHoverEffects=${hasCheckboxHoverEffects} aria-label=${ifDefined(checkboxAriaLabel)} aria-describedby=${ifDefined(this.ariaDescribedBy || void 0)} @change=${this.handleCheckboxChange} ></obc-checkbox> <div class=\"checkbox-label-container\"> <span class=\"checkbox-label\">${this.label}</span> </div> </div> </div> `; } }"
5521
+ "default": "class extends LitElement { constructor() { super(...arguments); this.status = CheckboxStatus.unchecked; this.state = \"enabled\"; this.disabled = false; this.label = \"\"; this.description = \"\"; this.level = 0; this.expandable = false; this.expanded = false; this.hoverStyle = \"touch-target\"; this.ariaDescribedBy = \"\"; } get isDisabled() { return this.disabled || this.state === \"disabled\"; } toggleStatusFromItem() { if (this.status === CheckboxStatus.checked) { this.status = CheckboxStatus.unchecked; } else { this.status = CheckboxStatus.checked; } this.dispatchEvent( new CustomEvent(\"change\", { detail: { status: this.status, disabled: this.isDisabled } }) ); } handleItemClick(event) { if (this.isDisabled) return; const path = event.composedPath(); if (this.checkboxElement && path.includes(this.checkboxElement)) return; if (this.chevronButton && path.includes(this.chevronButton)) return; this.toggleStatusFromItem(); } handleChevronClick(event) { event.stopPropagation(); this.dispatchEvent( new CustomEvent(\"expand-toggle\", { detail: !this.expanded, bubbles: true, composed: true }) ); } handleCheckboxChange(event) { const checkboxEvent = event; this.status = checkboxEvent.detail.status; this.dispatchEvent( new CustomEvent(\"change\", { detail: checkboxEvent.detail }) ); } focus(options) { this.checkboxElement?.focus(options); } renderChevron() { if (!this.expandable) return nothing; return html`<button type=\"button\" class=\"chevron-button\" aria-expanded=${this.expanded ? \"true\" : \"false\"} aria-label=${ifDefined(this.label.trim() || void 0)} ?disabled=${this.isDisabled} @click=${this.handleChevronClick} > <span class=\"chevron-visible\"> ${this.expanded ? html`<obi-chevron-down-google class=\"chevron-icon\" ></obi-chevron-down-google>` : html`<obi-chevron-right-google class=\"chevron-icon\" ></obi-chevron-right-google>`} </span> </button>`; } render() { const isDisabled = this.isDisabled; const hasCheckboxHoverEffects = !(this.hoverStyle === \"touch-target\" && !isDisabled); const depth = Math.max(0, Math.floor(this.level) - 1); const hasChevronSlot = this.level >= 1 || this.expandable; const checkboxAriaLabel = this.label.trim().length > 0 ? this.label : void 0; return html` <div class=${classMap({ \"checkbox-item-container\": true, [`status-${this.status}`]: true, [`hover-style-${this.hoverStyle}`]: true, \"is-nested\": hasChevronSlot, \"has-description\": this.description !== \"\", disabled: isDisabled })} @click=${this.handleItemClick} > ${depth > 0 ? html`<div class=\"nested-spacer\" aria-hidden=\"true\" style=${styleMap({ \"--checkbox-item-depth\": String(depth) })} ></div>` : nothing} ${hasChevronSlot ? html`<div class=\"chevron-container\">${this.renderChevron()}</div>` : nothing} <div class=\"content-container\"> <obc-checkbox .status=${this.status} .state=${CheckboxState.enabled} .disabled=${isDisabled} .hasHoverEffects=${hasCheckboxHoverEffects} aria-label=${ifDefined(checkboxAriaLabel)} aria-describedby=${ifDefined(this.ariaDescribedBy || void 0)} @change=${this.handleCheckboxChange} ></obc-checkbox> <div class=\"checkbox-label-container\"> <span class=\"checkbox-label\">${this.label}</span> ${this.description ? html`<span class=\"checkbox-description\" >${this.description}</span >` : nothing} </div> </div> </div> `; } }"
5522
5522
  }
5523
5523
  ],
5524
5524
  "exports": [
@@ -5548,6 +5548,27 @@
5548
5548
  }
5549
5549
  ]
5550
5550
  },
5551
+ {
5552
+ "kind": "javascript-module",
5553
+ "path": "dist/components/checkbox-list/checkbox-list.js",
5554
+ "declarations": [
5555
+ {
5556
+ "kind": "variable",
5557
+ "name": "ObcCheckboxList",
5558
+ "default": "class extends LitElement { constructor() { super(...arguments); this.hoverStyle = ObcCheckboxItemHoverStyle.touchTarget; this.onExpandToggle = (event) => { const row = event.target; if (!(row instanceof ObcCheckboxItem)) return; row.expanded = event.detail; this.sync(); }; } connectedCallback() { super.connectedCallback(); if (!this.hasAttribute(\"role\")) this.setAttribute(\"role\", \"group\"); this.mutationObserver = new MutationObserver(() => this.sync()); this.mutationObserver.observe(this, { childList: true, attributes: true, attributeFilter: [\"expandable\", \"expanded\", \"level\"], subtree: true }); this.addEventListener(\"expand-toggle\", this.onExpandToggle); } disconnectedCallback() { super.disconnectedCallback(); this.mutationObserver?.disconnect(); this.mutationObserver = void 0; this.removeEventListener(\"expand-toggle\", this.onExpandToggle); } firstUpdated() { this.sync(); } updated(changed) { if (changed.has(\"hoverStyle\")) this.sync(); } rows() { return Array.from(this.children).filter( (el) => el instanceof ObcCheckboxItem ); } sync() { const rows = this.rows(); const hidden = computeHiddenRows(rows); rows.forEach((row, i) => { row.hoverStyle = this.hoverStyle; row.hidden = hidden[i]; }); } render() { return html`<div class=\"list\"> <slot @slotchange=${() => this.sync()}></slot> </div>`; } }"
5559
+ }
5560
+ ],
5561
+ "exports": [
5562
+ {
5563
+ "kind": "js",
5564
+ "name": "ObcCheckboxList",
5565
+ "declaration": {
5566
+ "name": "ObcCheckboxList",
5567
+ "module": "dist/components/checkbox-list/checkbox-list.js"
5568
+ }
5569
+ }
5570
+ ]
5571
+ },
5551
5572
  {
5552
5573
  "kind": "javascript-module",
5553
5574
  "path": "dist/components/checkbox/checkbox.js",
@@ -51560,28 +51581,24 @@
51560
51581
  "declarations": [
51561
51582
  {
51562
51583
  "kind": "class",
51563
- "description": "`<obc-checkbox-item>` – A list-item wrapper for `<obc-checkbox>` with label\nand optional nested indentation affordances.\n\n### Overview\nCombines checkbox interaction with a row-like container used in menus and\nhierarchical selection lists. The component proxies checkbox state changes,\nsupports touch-target or visual-target interaction behavior, and can render\nnested structure indicators.\n\n### Features\n- Three checkbox statuses: `unchecked`, `checked`, `mixed`.\n- Item state control: `enabled` or `disabled`.\n- Two hover/focus interaction modes: `touch-target` and `visual-target`.\n- Optional nested layout controls via `isNested`, `isLevel1`, `isLevel2`.\n- Forwards `aria-describedby` to the inner checkbox for assistive context.\n\n### Variants\n- **Nested level 1:** Chevron icon is shown.\n- **Nested level 2:** Chevron slot is reserved and nested spacer is shown.\n\n### Usage Guidelines\n- Use for checkbox rows that require text labels and optional hierarchy.\n- Keep `status` as the source of truth for checked/mixed/unchecked value.\n- Use `state=\"disabled\"` or `disabled` to lock interaction.\n- Prefer `hoverStyle=\"touch-target\"` for standard list behavior.\n\n### Slots / Content\n- No named slots. Label content is provided through the `label` property.\n\n### Events\n- `change` Fired when status changes (from row click or inner checkbox).\n **detail:** `{ status, disabled }`\n\n### Best Practices\n- Provide non-empty `label` for accessible naming.\n- Use `aria-describedby` when additional contextual text exists outside.\n- For deep hierarchies, use `isNested` with `isLevel1` / `isLevel2`\n consistently to preserve spacing and alignment.\n\n### Example\n```html\n<obc-checkbox-item\n status=\"mixed\"\n label=\"Include archived items\"\n hoverStyle=\"touch-target\"\n></obc-checkbox-item>\n```",
51584
+ "description": "`<obc-checkbox-item>` – A list row that pairs `<obc-checkbox>` with a label,\nan optional description, and hierarchy affordances for nested lists.\n\n### Overview\nThe row is the touch target: clicking anywhere on it toggles the checkbox,\nexcept on the chevron button, which only asks to expand or collapse. Depth\nis a number (`level`); the row indents itself so a flat sequence of rows\nreads as a tree. `<obc-checkbox-list>` builds on this to hide the rows\nunder a collapsed parent.\n\n### Features\n- Three statuses: `unchecked`, `checked`, `mixed`.\n- `touch-target` or `visual-target` hover treatment.\n- `level` indentation: level 1 reserves the chevron slot, each further\n level adds a spacer.\n- `expandable` rows show a chevron button that fires `expand-toggle`; the\n host owns `expanded`.\n- Optional `description` line under the label.\n- Forwards `aria-describedby` to the inner checkbox.\n\n### Usage Guidelines\n- Keep `status` as the source of truth; update it from the `change` event.\n- Set `expanded` in response to `expand-toggle` the row never flips it\n itself, so a parent (or `<obc-checkbox-list>`) can veto or persist it.\n- Use `level` 0 for a plain list; start at 1 when any row in the list is\n expandable so chevrons and checkboxes line up.\n- Prefer `hoverStyle=\"touch-target\"` for standard list behaviour.\n\n### Accessibility\nThe checkbox and the chevron are separate controls in the natural tab\norder. The chevron is a native button named by the row's label, with the\nstate in `aria-expanded`, following the WAI-ARIA checkbox and disclosure\nbutton patterns.\n\n### Example\n```html\n<obc-checkbox-item\n level=\"1\"\n expandable\n expanded\n status=\"mixed\"\n label=\"Reports\"\n></obc-checkbox-item>\n<obc-checkbox-item\n level=\"2\"\n status=\"checked\"\n label=\"Monthly\"\n description=\"Sent on the 1st\"\n></obc-checkbox-item>\n```",
51564
51585
  "name": "ObcCheckboxItem",
51565
- "slots": [
51566
- {
51567
- "description": "No named slots.",
51568
- "name": ""
51569
- }
51570
- ],
51571
51586
  "members": [
51572
51587
  {
51573
51588
  "kind": "field",
51574
51589
  "name": "status",
51575
51590
  "type": {
51576
51591
  "text": "CheckboxStatus"
51577
- }
51592
+ },
51593
+ "description": "Checkbox status: `unchecked`, `checked` or `mixed`."
51578
51594
  },
51579
51595
  {
51580
51596
  "kind": "field",
51581
51597
  "name": "state",
51582
51598
  "type": {
51583
51599
  "text": "ObcCheckboxItemState"
51584
- }
51600
+ },
51601
+ "description": "Item state: `enabled` or `disabled`."
51585
51602
  },
51586
51603
  {
51587
51604
  "kind": "field",
@@ -51589,7 +51606,8 @@
51589
51606
  "type": {
51590
51607
  "text": "boolean"
51591
51608
  },
51592
- "default": "false"
51609
+ "default": "false",
51610
+ "description": "Disables the row and the inner checkbox."
51593
51611
  },
51594
51612
  {
51595
51613
  "kind": "field",
@@ -51597,38 +51615,52 @@
51597
51615
  "type": {
51598
51616
  "text": "string"
51599
51617
  },
51600
- "default": "''"
51618
+ "default": "''",
51619
+ "description": "Text label; also the checkbox's accessible name."
51601
51620
  },
51602
51621
  {
51603
51622
  "kind": "field",
51604
- "name": "isNested",
51623
+ "name": "description",
51605
51624
  "type": {
51606
- "text": "boolean"
51625
+ "text": "string"
51607
51626
  },
51608
- "default": "false"
51627
+ "default": "''",
51628
+ "description": "Secondary line under the label; hidden when empty."
51609
51629
  },
51610
51630
  {
51611
51631
  "kind": "field",
51612
- "name": "isLevel1",
51632
+ "name": "level",
51633
+ "type": {
51634
+ "text": "number"
51635
+ },
51636
+ "default": "0",
51637
+ "description": "Depth in a nested list. 0 is a plain row; 1 reserves the chevron slot; each level above 1 adds a spacer."
51638
+ },
51639
+ {
51640
+ "kind": "field",
51641
+ "name": "expandable",
51613
51642
  "type": {
51614
51643
  "text": "boolean"
51615
51644
  },
51616
- "default": "false"
51645
+ "default": "false",
51646
+ "description": "Shows the chevron button that fires `expand-toggle`."
51617
51647
  },
51618
51648
  {
51619
51649
  "kind": "field",
51620
- "name": "isLevel2",
51650
+ "name": "expanded",
51621
51651
  "type": {
51622
51652
  "text": "boolean"
51623
51653
  },
51624
- "default": "false"
51654
+ "default": "false",
51655
+ "description": "Whether the row's children are shown; drives the chevron direction and `aria-expanded`."
51625
51656
  },
51626
51657
  {
51627
51658
  "kind": "field",
51628
51659
  "name": "hoverStyle",
51629
51660
  "type": {
51630
51661
  "text": "ObcCheckboxItemHoverStyle"
51631
- }
51662
+ },
51663
+ "description": "Which box shows hover and focus: the whole row (`touch-target`) or the checkbox (`visual-target`)."
51632
51664
  },
51633
51665
  {
51634
51666
  "kind": "field",
@@ -51636,7 +51668,8 @@
51636
51668
  "type": {
51637
51669
  "text": "string"
51638
51670
  },
51639
- "default": "''"
51671
+ "default": "''",
51672
+ "description": "Forwarded to the inner checkbox as `aria-describedby`."
51640
51673
  },
51641
51674
  {
51642
51675
  "kind": "field",
@@ -51646,6 +51679,23 @@
51646
51679
  },
51647
51680
  "privacy": "private"
51648
51681
  },
51682
+ {
51683
+ "kind": "field",
51684
+ "name": "chevronButton",
51685
+ "type": {
51686
+ "text": "HTMLElement | undefined"
51687
+ },
51688
+ "privacy": "private"
51689
+ },
51690
+ {
51691
+ "kind": "field",
51692
+ "name": "isDisabled",
51693
+ "type": {
51694
+ "text": "boolean"
51695
+ },
51696
+ "privacy": "private",
51697
+ "readonly": true
51698
+ },
51649
51699
  {
51650
51700
  "kind": "method",
51651
51701
  "name": "toggleStatusFromItem",
@@ -51664,6 +51714,19 @@
51664
51714
  }
51665
51715
  ]
51666
51716
  },
51717
+ {
51718
+ "kind": "method",
51719
+ "name": "handleChevronClick",
51720
+ "privacy": "private",
51721
+ "parameters": [
51722
+ {
51723
+ "name": "event",
51724
+ "type": {
51725
+ "text": "MouseEvent"
51726
+ }
51727
+ }
51728
+ ]
51729
+ },
51667
51730
  {
51668
51731
  "kind": "method",
51669
51732
  "name": "handleCheckboxChange",
@@ -51696,6 +51759,11 @@
51696
51759
  }
51697
51760
  ]
51698
51761
  },
51762
+ {
51763
+ "kind": "method",
51764
+ "name": "renderChevron",
51765
+ "privacy": "private"
51766
+ },
51699
51767
  {
51700
51768
  "kind": "method",
51701
51769
  "name": "render"
@@ -51713,6 +51781,13 @@
51713
51781
  "text": "ObcCheckboxChangeEvent"
51714
51782
  },
51715
51783
  "description": "Emitted when status changes."
51784
+ },
51785
+ {
51786
+ "name": "expand-toggle",
51787
+ "type": {
51788
+ "text": "ObcCheckboxItemExpandToggleEvent"
51789
+ },
51790
+ "description": "Emitted when the chevron is activated; detail is the next `expanded` value. Bubbles and is composed."
51716
51791
  }
51717
51792
  ],
51718
51793
  "superclass": {
@@ -51733,6 +51808,116 @@
51733
51808
  }
51734
51809
  ]
51735
51810
  },
51811
+ {
51812
+ "kind": "javascript-module",
51813
+ "path": "src/components/checkbox-list/checkbox-list.ts",
51814
+ "declarations": [
51815
+ {
51816
+ "kind": "class",
51817
+ "description": "`<obc-checkbox-list>` – A vertical list of `<obc-checkbox-item>` rows that\ncollapses the rows under a closed parent.\n\n### Overview\nRows are slotted flat, in document order; the tree is read from each row's\n`level`. When an expandable row is collapsed, the list sets `hidden` on\nevery following row with a greater level until a row of equal or smaller\nlevel. The list also applies its `hoverStyle` to every row so a list reads\nas one surface.\n\n### Features\n- Flat markup, level-driven hierarchy — no nesting of elements required.\n- Handles `expand-toggle`: sets the row's `expanded` and recomputes.\n- Reacts to `expandable`, `expanded` and `level` changes made from outside.\n- `hoverStyle` forwarded to slotted rows, including rows added later.\n\n### Usage Guidelines\n- Start levels at 1 when any row is expandable so chevrons and checkboxes\n align; use level 0 for a plain list.\n- The list owns the `hidden` attribute of its rows; do not bind it yourself.\n- Selection stays per row: listen to each row's `change`.\n\n### Accessibility\nThe host is the `role=\"group\"`; rows are ordinary checkboxes and buttons in\nthe natural tab order and hidden rows leave it. This is a group of\ncheckboxes with disclosure buttons, not a tree widget, so there is no\nroving tabindex. Name the group with `aria-label` or `aria-labelledby` on\nthe host.\n\n### Example\n```html\n<obc-checkbox-list aria-label=\"Report types\">\n <obc-checkbox-item level=\"1\" expandable expanded status=\"mixed\" label=\"Reports\"></obc-checkbox-item>\n <obc-checkbox-item level=\"2\" status=\"checked\" label=\"Monthly\"></obc-checkbox-item>\n <obc-checkbox-item level=\"2\" label=\"Quarterly\"></obc-checkbox-item>\n <obc-checkbox-item level=\"1\" expandable label=\"Archive\"></obc-checkbox-item>\n</obc-checkbox-list>\n```",
51818
+ "name": "ObcCheckboxList",
51819
+ "slots": [
51820
+ {
51821
+ "description": "`obc-checkbox-item` rows in document order; hierarchy comes from each row's `level`.",
51822
+ "name": ""
51823
+ }
51824
+ ],
51825
+ "members": [
51826
+ {
51827
+ "kind": "field",
51828
+ "name": "hoverStyle",
51829
+ "type": {
51830
+ "text": "ObcCheckboxItemHoverStyle"
51831
+ },
51832
+ "description": "Hover treatment applied to every slotted row: `touch-target` or `visual-target`."
51833
+ },
51834
+ {
51835
+ "kind": "field",
51836
+ "name": "mutationObserver",
51837
+ "type": {
51838
+ "text": "MutationObserver | undefined"
51839
+ },
51840
+ "privacy": "private"
51841
+ },
51842
+ {
51843
+ "kind": "method",
51844
+ "name": "firstUpdated",
51845
+ "return": {
51846
+ "type": {
51847
+ "text": "void"
51848
+ }
51849
+ }
51850
+ },
51851
+ {
51852
+ "kind": "method",
51853
+ "name": "updated",
51854
+ "return": {
51855
+ "type": {
51856
+ "text": "void"
51857
+ }
51858
+ },
51859
+ "parameters": [
51860
+ {
51861
+ "name": "changed",
51862
+ "type": {
51863
+ "text": "PropertyValues<this>"
51864
+ }
51865
+ }
51866
+ ]
51867
+ },
51868
+ {
51869
+ "kind": "field",
51870
+ "name": "onExpandToggle",
51871
+ "privacy": "private"
51872
+ },
51873
+ {
51874
+ "kind": "method",
51875
+ "name": "rows",
51876
+ "privacy": "private",
51877
+ "return": {
51878
+ "type": {
51879
+ "text": "ObcCheckboxItem[]"
51880
+ }
51881
+ }
51882
+ },
51883
+ {
51884
+ "kind": "method",
51885
+ "name": "sync",
51886
+ "privacy": "private",
51887
+ "return": {
51888
+ "type": {
51889
+ "text": "void"
51890
+ }
51891
+ }
51892
+ },
51893
+ {
51894
+ "kind": "method",
51895
+ "name": "render"
51896
+ },
51897
+ {
51898
+ "kind": "field",
51899
+ "name": "styles",
51900
+ "static": true
51901
+ }
51902
+ ],
51903
+ "superclass": {
51904
+ "name": "LitElement",
51905
+ "package": "lit"
51906
+ },
51907
+ "customElement": true
51908
+ }
51909
+ ],
51910
+ "exports": [
51911
+ {
51912
+ "kind": "js",
51913
+ "name": "ObcCheckboxList",
51914
+ "declaration": {
51915
+ "name": "ObcCheckboxList",
51916
+ "module": "src/components/checkbox-list/checkbox-list.ts"
51917
+ }
51918
+ }
51919
+ ]
51920
+ },
51736
51921
  {
51737
51922
  "kind": "javascript-module",
51738
51923
  "path": "src/components/checkbox/checkbox.ts",
@@ -22,35 +22,146 @@ const componentStyle = css`* {
22
22
  cursor: pointer;
23
23
  }
24
24
 
25
+ .checkbox-item-container.has-description {
26
+ /* a second text line outgrows the fixed row; the hover surface follows */
27
+ height: auto;
28
+ min-height: var(--ui-components-checkbox-touch-target-size);
29
+ }
30
+
25
31
  .checkbox-item-container.disabled {
26
32
  cursor: not-allowed;
27
33
  }
28
34
 
29
- .checkbox-item-container .chevron-container,.checkbox-item-container .nested-spacer {
35
+ .checkbox-item-container .chevron-container {
30
36
  display: flex;
31
37
  width: var(--global-size-spacing-touch-target-min);
32
- height: var(--global-size-spacing-touch-target-min);
33
38
  min-width: var(--global-size-spacing-touch-target-min);
34
- min-height: var(--global-size-spacing-touch-target-min);
35
- padding: 0px;
39
+ height: var(--global-size-spacing-touch-target-min);
36
40
  align-items: center;
37
41
  justify-content: center;
38
42
  flex-shrink: 0;
39
43
  }
40
44
 
45
+ .checkbox-item-container .nested-spacer {
46
+ /* one indent step per level above 1; --checkbox-item-depth is set inline */
47
+ width: calc(
48
+ var(--checkbox-item-depth, 0) *
49
+ var(--ui-components-checkbox-nested-item-padding-left)
50
+ );
51
+ flex-shrink: 0;
52
+ align-self: stretch;
53
+ }
54
+
55
+ :is(.checkbox-item-container .chevron-button) {
56
+ cursor: pointer;
57
+ }
58
+
59
+ :is(.checkbox-item-container .chevron-button):focus {
60
+ outline: none;
61
+ }
62
+
63
+ :is(.checkbox-item-container .chevron-button) .chevron-visible {
64
+ border-color: var(--flat-enabled-border-color);
65
+ background-color: var(--flat-enabled-background-color);
66
+ border-width: 1px;
67
+ border-style: solid;
68
+ cursor: pointer;
69
+ --base-border-color: var(--flat-enabled-border-color);
70
+ --base-background-color: var(--flat-enabled-background-color);
71
+ }
72
+
73
+ .activated:is(.checkbox-item-container .chevron-button) .chevron-visible {
74
+ border-color: var(--flat-activated-border-color);
75
+ background-color: var(--flat-activated-background-color);
76
+ --base-border-color: var(--flat-activated-border-color);
77
+ --base-background-color: var(--flat-activated-background-color);
78
+ }
79
+
80
+ @media (hover:hover) {
81
+
82
+ :is(.checkbox-item-container .chevron-button):hover .chevron-visible {
83
+ border-color: color-mix(in srgb, var(--flat-hover-border-color) calc(var(--obc-can-hover) * 100%), var(--base-border-color));
84
+ background-color: color-mix(in srgb, var(--flat-hover-background-color) calc(var(--obc-can-hover) * 100%), var(--base-background-color));
85
+ }
86
+ }
87
+
88
+ :is(.checkbox-item-container .chevron-button):active .chevron-visible {
89
+ border-color: var(--flat-pressed-border-color);
90
+ background-color: var(--flat-pressed-background-color);
91
+ }
92
+
93
+ :is(.checkbox-item-container .chevron-button):focus-visible .chevron-visible {
94
+ outline-color: var(--border-focus-color);
95
+ outline-width: var(--global-size-spacing-border-weight-focusframe);
96
+ outline-style: solid;
97
+ border-color: var(--container-global-color);
98
+ z-index: 1;
99
+ }
100
+
101
+ :is(.checkbox-item-container .chevron-button):disabled .chevron-visible {
102
+ border-color: var(--flat-disabled-border-color);
103
+ background-color: var(--flat-disabled-background-color);
104
+ cursor: not-allowed;
105
+ color: var(--on-flat-disabled-color) !important;
106
+ }
107
+
108
+ .disabled:is(.checkbox-item-container .chevron-button) .chevron-visible {
109
+ border-color: var(--flat-disabled-border-color);
110
+ background-color: var(--flat-disabled-background-color);
111
+ cursor: not-allowed;
112
+ color: var(--on-flat-disabled-color) !important;
113
+ }
114
+
115
+ :is(.checkbox-item-container .chevron-button):disabled {
116
+ cursor: not-allowed;
117
+ }
118
+
119
+ .disabled:is(.checkbox-item-container .chevron-button) {
120
+ cursor: not-allowed;
121
+ }
122
+
123
+ .checkbox-item-container .chevron-button {
124
+ appearance: none;
125
+ border: none;
126
+ background: transparent;
127
+ padding: 0;
128
+ width: 100%;
129
+ height: 100%;
130
+ display: flex;
131
+ align-items: center;
132
+ justify-content: center;
133
+ cursor: pointer;
134
+ color: var(--on-flat-neutral-color);
135
+ }
136
+
137
+ :is(.checkbox-item-container .chevron-button):disabled {
138
+ cursor: not-allowed;
139
+ }
140
+
141
+ .checkbox-item-container .chevron-visible {
142
+ /* same visible box as obc-icon-button so the two align in one list */
143
+ width: var(--ui-components-icon-button-visual-target-size);
144
+ height: var(--ui-components-icon-button-visual-target-size);
145
+ border-radius: var(--ui-components-button-border-radius-top-left);
146
+ display: flex;
147
+ align-items: center;
148
+ justify-content: center;
149
+ }
150
+
41
151
  .checkbox-item-container .chevron-icon {
42
152
  width: var(--global-size-spacing-icon-icon-size-regular);
43
153
  height: var(--global-size-spacing-icon-icon-size-regular);
44
- color: var(--on-flat-neutral-color);
45
154
  }
46
155
 
47
156
  .checkbox-item-container .checkbox-label-container {
48
157
  display: flex;
158
+ flex-direction: column;
159
+ justify-content: center;
160
+ min-width: 0; /* lets the label ellipsis instead of widening the row */
49
161
  padding: 0 var(--global-size-spacing-list-item-padding-vertical) 0 0;
50
162
  margin-left: calc(
51
163
  var(--global-size-spacing-list-item-padding-vertical) / -2
52
164
  );
53
- align-items: center;
54
165
  flex-grow: 1;
55
166
  }
56
167
 
@@ -85,6 +196,25 @@ const componentStyle = css`* {
85
196
  color: var(--element-disabled-color);
86
197
  }
87
198
 
199
+ .checkbox-item-container .checkbox-description {
200
+ color: var(--element-active-color);
201
+ font-family: var(--global-typography-font-family);
202
+ font-weight: var(--global-typography-ui-label-font-weight);
203
+ font-size: var(--global-typography-ui-label-font-size);
204
+ line-height: var(--global-typography-ui-label-line-height);
205
+ font-feature-settings:
206
+ "liga" off,
207
+ "clig" off,
208
+ "ss04" on;
209
+ white-space: nowrap;
210
+ overflow: hidden;
211
+ text-overflow: ellipsis;
212
+ }
213
+
214
+ .disabled :is(.checkbox-item-container .checkbox-description) {
215
+ color: var(--element-disabled-color);
216
+ }
217
+
88
218
  .checkbox-item-container.hover-style-touch-target {
89
219
  cursor: pointer;
90
220
  }
@@ -162,11 +292,6 @@ const componentStyle = css`* {
162
292
  --base-background-color: var(--flat-enabled-background-color);
163
293
  }
164
294
 
165
- .checkbox-item-container.hover-style-visual-target .chevron-container,.checkbox-item-container.hover-style-visual-target .nested-spacer {
166
- width: var(--ui-components-checkbox-nested-item-padding-left);
167
- min-width: var(--ui-components-checkbox-nested-item-padding-left);
168
- }
169
-
170
295
  .content-container {
171
296
  display: flex;
172
297
  width: 100%;
@@ -179,7 +304,7 @@ const componentStyle = css`* {
179
304
  border-radius: var(--ui-components-checkbox-list-item-border-radius);
180
305
  }
181
306
 
182
- .checkbox-item-container.hover-style-visual-target:not(.is-nested):not(.is-level-1):not(.is-level-2) .content-container {
307
+ .checkbox-item-container.hover-style-visual-target:not(.is-nested) .content-container {
183
308
  margin-left: calc(var(--ui-components-checkbox-padding-horizontal) * -1);
184
309
  }
185
310
 
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-item.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"checkbox-item.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}