From c281b4a239036741628634195fb3bad2c5ba3b40 Mon Sep 17 00:00:00 2001 From: Bruno Amorim Date: Mon, 8 Jul 2024 16:17:53 -0300 Subject: [PATCH 1/2] feat(combobox): adding shadow parts --- .../src/components/combo-box/combo-box.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/carbon-web-components/src/components/combo-box/combo-box.ts b/packages/carbon-web-components/src/components/combo-box/combo-box.ts index 523fd55c7db..21929d2d5fd 100644 --- a/packages/carbon-web-components/src/components/combo-box/combo-box.ts +++ b/packages/carbon-web-components/src/components/combo-box/combo-box.ts @@ -26,6 +26,8 @@ export { DROPDOWN_DIRECTION, DROPDOWN_SIZE } from '../dropdown/dropdown'; * Combo box. * * @element cds-combo-box + * @csspart text-input - The text input. Usage `cds-combo-box::part(text-input)` + * @csspart list-box - The list box. Usage `cds-combo-box::part(list-box)` * @fires cds-combo-box-beingselected * The custom event fired before a combo box item is selected upon a user gesture. * Cancellation of this event stops changing the user-initiated selection. @@ -239,6 +241,7 @@ class CDSComboBox extends CDSDropdown { return html` Date: Mon, 8 Jul 2024 16:22:35 -0300 Subject: [PATCH 2/2] feat(combobox): updating snapshots --- .../tests/snapshots/cds-checkbox.md | 20 ++++-- .../tests/snapshots/cds-code-snippet.md | 64 ++++++++++++++----- .../tests/snapshots/cds-combo-box.md | 2 + 3 files changed, 66 insertions(+), 20 deletions(-) diff --git a/packages/carbon-web-components/tests/snapshots/cds-checkbox.md b/packages/carbon-web-components/tests/snapshots/cds-checkbox.md index d3c4be9d836..3fee3e907e8 100644 --- a/packages/carbon-web-components/tests/snapshots/cds-checkbox.md +++ b/packages/carbon-web-components/tests/snapshots/cds-checkbox.md @@ -19,14 +19,20 @@ part="label" title="" > - + -
+
``` @@ -49,14 +55,20 @@ part="label" title="" > - + -
+
``` diff --git a/packages/carbon-web-components/tests/snapshots/cds-code-snippet.md b/packages/carbon-web-components/tests/snapshots/cds-code-snippet.md index 9959d3bfc03..26efdf88db8 100644 --- a/packages/carbon-web-components/tests/snapshots/cds-code-snippet.md +++ b/packages/carbon-web-components/tests/snapshots/cds-code-snippet.md @@ -10,23 +10,28 @@ aria-multiline="" aria-readonly="true" class="cds--snippet-container" + part="container container--single" role="textbox" style="" tabindex="0" > -
-    
+  
+    
       
       
     
   
-
+
Copy to Clipboard @@ -41,12 +46,13 @@ aria-multiline="true" aria-readonly="true" class="cds--snippet-container" + part="container container--multi" role="textbox" style="max-height:240px;min-height:48px;" tabindex="0" > -
-    
+  
+    
       
       
     
@@ -56,6 +62,7 @@
   button-class-name=""
   feedback="Copied!"
   feedback-timeout="2000"
+  part="copy-button"
 >
   Copy to Clipboard
 
@@ -65,12 +72,21 @@
 ####   `Should render with minimum attributes for inline mode`
 
 ```
-
-  
+
+  
     
     
   
-  
+  
     Copy to Clipboard
   
 
@@ -85,23 +101,28 @@
   aria-multiline=""
   aria-readonly="true"
   class="cds--snippet-container"
+  part="container container--single"
   role="textbox"
   style=""
   tabindex="0"
 >
-  
-    
+  
+    
       
       
     
   
-
+
Copy to Clipboard @@ -116,12 +137,13 @@ aria-multiline="true" aria-readonly="true" class="cds--snippet-container" + part="container container--multi" role="textbox" style="max-height:240px;min-height:48px;" tabindex="0" > -
-    
+  
+    
       
       
     
@@ -131,6 +153,7 @@
   button-class-name=""
   feedback="Copied!"
   feedback-timeout="2000"
+  part="copy-button"
 >
   Copy to Clipboard
 
@@ -140,12 +163,21 @@
 ####   `Should render with various attributes for inline mode`
 
 ```
-
-  
+
+  
     
     
   
-  
+  
     Copy to Clipboard
   
 
diff --git a/packages/carbon-web-components/tests/snapshots/cds-combo-box.md b/packages/carbon-web-components/tests/snapshots/cds-combo-box.md
index 7cd9c82a12a..979e12f8ff9 100644
--- a/packages/carbon-web-components/tests/snapshots/cds-combo-box.md
+++ b/packages/carbon-web-components/tests/snapshots/cds-combo-box.md
@@ -28,6 +28,7 @@
       aria-haspopup="listbox"
       class="cds--text-input cds--text-input--empty"
       id="trigger-button"
+      part="text-input"
       placeholder=""
       role="combobox"
     >
@@ -96,6 +97,7 @@
       class="cds--text-input"
       disabled=""
       id="trigger-button"
+      part="text-input"
       placeholder=""
       role="combobox"
     >