wcs-core 7.2.1 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/cjs/accessibility-5f681a74.js.map +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/wcs-accordion-panel.cjs.entry.js +1 -1
  4. package/dist/cjs/wcs-accordion-panel.cjs.entry.js.map +1 -1
  5. package/dist/cjs/wcs-accordion.cjs.entry.js +2 -1
  6. package/dist/cjs/wcs-accordion.cjs.entry.js.map +1 -1
  7. package/dist/cjs/wcs-checkbox.cjs.entry.js +3 -2
  8. package/dist/cjs/wcs-checkbox.cjs.entry.js.map +1 -1
  9. package/dist/cjs/wcs-chip.cjs.entry.js +102 -0
  10. package/dist/cjs/wcs-chip.cjs.entry.js.map +1 -0
  11. package/dist/cjs/wcs-select_2.cjs.entry.js +8 -6
  12. package/dist/cjs/wcs-select_2.cjs.entry.js.map +1 -1
  13. package/dist/cjs/wcs.cjs.js +1 -1
  14. package/dist/collection/collection-manifest.json +1 -0
  15. package/dist/collection/components/accordion/accordion.e2e.js +187 -0
  16. package/dist/collection/components/accordion/accordion.e2e.js.map +1 -0
  17. package/dist/collection/components/accordion/accordion.js +2 -1
  18. package/dist/collection/components/accordion/accordion.js.map +1 -1
  19. package/dist/collection/components/accordion-panel/accordion-panel.js +2 -2
  20. package/dist/collection/components/accordion-panel/accordion-panel.js.map +1 -1
  21. package/dist/collection/components/checkbox/checkbox.css +3 -0
  22. package/dist/collection/components/checkbox/checkbox.js +20 -1
  23. package/dist/collection/components/checkbox/checkbox.js.map +1 -1
  24. package/dist/collection/components/chip/chip-interface.js +2 -0
  25. package/dist/collection/components/chip/chip-interface.js.map +1 -0
  26. package/dist/collection/components/chip/chip.css +220 -0
  27. package/dist/collection/components/chip/chip.e2e.js +209 -0
  28. package/dist/collection/components/chip/chip.e2e.js.map +1 -0
  29. package/dist/collection/components/chip/chip.js +341 -0
  30. package/dist/collection/components/chip/chip.js.map +1 -0
  31. package/dist/collection/components/select/select.e2e.js +52 -0
  32. package/dist/collection/components/select/select.e2e.js.map +1 -1
  33. package/dist/collection/components/select/select.js +8 -6
  34. package/dist/collection/components/select/select.js.map +1 -1
  35. package/dist/collection/utils/accessibility.js +16 -0
  36. package/dist/collection/utils/accessibility.js.map +1 -1
  37. package/dist/esm/accessibility-069640cf.js.map +1 -1
  38. package/dist/esm/loader.js +1 -1
  39. package/dist/esm/wcs-accordion-panel.entry.js +1 -1
  40. package/dist/esm/wcs-accordion-panel.entry.js.map +1 -1
  41. package/dist/esm/wcs-accordion.entry.js +2 -1
  42. package/dist/esm/wcs-accordion.entry.js.map +1 -1
  43. package/dist/esm/wcs-checkbox.entry.js +3 -2
  44. package/dist/esm/wcs-checkbox.entry.js.map +1 -1
  45. package/dist/esm/wcs-chip.entry.js +98 -0
  46. package/dist/esm/wcs-chip.entry.js.map +1 -0
  47. package/dist/esm/wcs-select_2.entry.js +8 -6
  48. package/dist/esm/wcs-select_2.entry.js.map +1 -1
  49. package/dist/esm/wcs.js +1 -1
  50. package/dist/types/components/accordion-panel/accordion-panel.d.ts +5 -0
  51. package/dist/types/components/checkbox/checkbox.d.ts +4 -0
  52. package/dist/types/components/chip/chip-interface.d.ts +4 -0
  53. package/dist/types/components/chip/chip.d.ts +132 -0
  54. package/dist/types/components/select/select.d.ts +1 -0
  55. package/dist/types/components.d.ts +342 -0
  56. package/dist/types/utils/accessibility.d.ts +7 -0
  57. package/dist/wcs/p-828b45b4.entry.js +2 -0
  58. package/dist/wcs/p-828b45b4.entry.js.map +1 -0
  59. package/dist/wcs/p-990698a7.entry.js +2 -0
  60. package/dist/wcs/p-990698a7.entry.js.map +1 -0
  61. package/dist/wcs/{p-d27d4a53.entry.js → p-b94a09b6.entry.js} +2 -2
  62. package/dist/wcs/p-b94a09b6.entry.js.map +1 -0
  63. package/dist/wcs/p-ed3b0709.entry.js +2 -0
  64. package/dist/wcs/p-ed3b0709.entry.js.map +1 -0
  65. package/dist/wcs/{p-6c6079ee.entry.js → p-f2eeb249.entry.js} +2 -2
  66. package/dist/wcs/{p-6c6079ee.entry.js.map → p-f2eeb249.entry.js.map} +1 -1
  67. package/dist/wcs/p-fb2751c2.js.map +1 -1
  68. package/dist/wcs/wcs.esm.js +1 -1
  69. package/dist/wcs/wcs.esm.js.map +1 -1
  70. package/package.json +1 -1
  71. package/dist/wcs/p-02f31010.entry.js +0 -2
  72. package/dist/wcs/p-02f31010.entry.js.map +0 -1
  73. package/dist/wcs/p-4fb2d985.entry.js +0 -2
  74. package/dist/wcs/p-4fb2d985.entry.js.map +0 -1
  75. package/dist/wcs/p-d27d4a53.entry.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"file":"wcs-chip.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,OAAO,GAAG,k/WAAk/W,CAAC;AACngX,sBAAe,OAAO;;MC4ET,IAAI;;;;;QAoGL,kBAAa,GAAG,CAAC,KAAY;YACjC,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,EAAE;gBAC9C,OAAO;aACV;YACD,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,CAAC,OAAO,EAAE,CAAC;SAClB,CAAC;;;wBA1FkC,KAAK;oBAOT,IAAI;wBAOA,KAAK;uBAKU,SAAS;oBAQf,YAAY;;IAajD,MAAM;QACV,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;KACjF;IAEO,OAAO;QACX,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;QAClB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QA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,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAClF,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,IAC/CA,kBACI,CAAC,EAAC,8gBAA8gB,EAChhB,IAAI,EAAC,cAAc,GAAG,CACxB,CACD,CACN,EACT;SACL;KACJ;;;;;;;","names":["h","Host"],"sources":["src/components/chip/chip.scss?tag=wcs-chip&encapsulation=shadow","src/components/chip/chip.tsx"],"sourcesContent":["@import '../../style/focus-outline.scss';\n\n:host {\n // #region CSS Variables\n --wcs-chip-height: var(--wcs-semantic-size-s);\n --wcs-chip-font-size: var(--wcs-semantic-font-size-base);\n --wcs-chip-font-weight: var(--wcs-semantic-font-weight-medium);\n\n --wcs-chip-focus-outline-border-width: var(--wcs-semantic-border-width-large);\n\n --wcs-chip-padding-vertical: var(--wcs-semantic-spacing-base);\n --wcs-chip-padding-horizontal: var(--wcs-semantic-spacing-base-150);\n --wcs-chip-padding-horizontal-dismissible: var(--wcs-semantic-spacing-base);\n\n --wcs-chip-selectable-background-color: var(--wcs-semantic-color-background-action-secondary-default);\n --wcs-chip-selectable-background-color-pressed: var(--wcs-semantic-color-background-action-secondary-press);\n --wcs-chip-selectable-background-color-hover: var(--wcs-semantic-color-background-action-secondary-hover);\n --wcs-chip-selectable-background-color-selected: var(--wcs-semantic-color-background-action-primary-default);\n --wcs-chip-selectable-background-color-selected-hover: var(--wcs-semantic-color-background-action-primary-hover);\n --wcs-chip-selectable-background-color-selected-pressed: var(--wcs-semantic-color-background-action-primary-press);\n --wcs-chip-selectable-background-color-selected-disabled: var(--wcs-semantic-color-background-action-primary-disabled);\n\n --wcs-chip-selectable-color: var(--wcs-semantic-color-foreground-action-secondary-default);\n --wcs-chip-selectable-color-hover: var(--wcs-semantic-color-foreground-action-secondary-hover);\n --wcs-chip-selectable-color-pressed: var(--wcs-semantic-color-foreground-action-secondary-press);\n --wcs-chip-selectable-color-disabled: var(--wcs-semantic-color-text-disabled);\n --wcs-chip-selectable-color-selected: var(--wcs-semantic-color-foreground-action-primary-default);\n --wcs-chip-selectable-color-selected-hover: var(--wcs-semantic-color-foreground-action-primary-hover);\n --wcs-chip-selectable-color-selected-pressed: var(--wcs-semantic-color-foreground-action-primary-press);\n\n --wcs-chip-border-radius: var(--wcs-semantic-border-radius-base);\n --wcs-chip-border-line-width: var(--wcs-semantic-border-width-default);\n --wcs-chip-selectable-border-color: var(--wcs-semantic-color-border-action-secondary-default);\n --wcs-chip-selectable-border-color-hover: var(--wcs-semantic-color-border-control-indicator-hover);\n --wcs-chip-selectable-border-color-pressed: var(--wcs-semantic-color-border-action-secondary-press);\n --wcs-chip-selectable-border-color-disabled: var(--wcs-semantic-color-border-action-secondary-disabled);\n\n --wcs-chip-selectable-content-gap: var(--wcs-semantic-spacing-base);\n --wcs-chip-selectable-focus-outline-color: var(--wcs-semantic-color-border-focus-base);\n\n --wcs-chip-dismissible-content-gap: var(--wcs-semantic-spacing-base-05);\n --wcs-chip-dismissible-padding-right: var(--wcs-semantic-spacing-base-05);\n --wcs-chip-dismissible-button-outline-radius: var(--wcs-semantic-border-radius-full);\n\n --wcs-chip-dismissible-primary-focus-outline-color: var(--wcs-semantic-color-border-focus-base-on-secondary);\n --wcs-chip-dismissible-primary-border-color: var(--wcs-semantic-color-background-action-primary-default);\n --wcs-chip-dismissible-primary-border-color-disabled: var(--wcs-semantic-color-background-action-primary-disabled);\n --wcs-chip-dismissible-primary-color: var(--wcs-semantic-color-foreground-action-primary-default);\n --wcs-chip-dismissible-primary-color-hover: var(--wcs-semantic-color-foreground-action-primary-hover);\n --wcs-chip-dismissible-primary-color-pressed: var(--wcs-semantic-color-foreground-action-primary-press);\n --wcs-chip-dismissible-primary-color-disabled: var(--wcs-semantic-color-text-disabled);\n --wcs-chip-dismissible-primary-background-color: var(--wcs-semantic-color-background-action-primary-default);\n --wcs-chip-dismissible-primary-background-color-hover: var(--wcs-semantic-color-background-action-primary-hover);\n --wcs-chip-dismissible-primary-background-color-pressed: var(--wcs-semantic-color-background-action-primary-press);\n --wcs-chip-dismissible-primary-background-color-disabled: var(--wcs-semantic-color-background-action-primary-disabled);\n\n --wcs-chip-dismissible-secondary-button-focus-outline-color: var(--wcs-semantic-color-border-focus-base);\n --wcs-chip-dismissible-secondary-border-color: var(--wcs-semantic-color-border-action-secondary-default);\n --wcs-chip-dismissible-secondary-border-color-disabled: var(--wcs-semantic-color-border-action-secondary-disabled);\n --wcs-chip-dismissible-secondary-color: var(--wcs-semantic-color-foreground-action-secondary-default);\n --wcs-chip-dismissible-secondary-color-disabled: var(--wcs-semantic-color-foreground-disabled);\n --wcs-chip-dismissible-secondary-background-color: var(--wcs-semantic-color-background-action-secondary-default);\n --wcs-chip-dismissible-secondary-button-background-color: var(--wcs-semantic-color-background-action-secondary-default);\n --wcs-chip-dismissible-secondary-button-background-color-hover: var(--wcs-semantic-color-background-surface-accent-lighter);\n --wcs-chip-dismissible-secondary-button-background-color-pressed: var(--wcs-semantic-color-background-surface-accent-light);\n --wcs-chip-dismissible-secondary-button-background-color-disabled: var(--wcs-semantic-color-background-action-secondary-disabled);\n\n // #endregion\n\n display: inline-flex;\n // we set a 100% line-height to center the children text vertically\n align-items: center;\n // Prevents extra space below the line caused by baseline alignment of inline-flex elements when a component contains an inline SVG\n vertical-align: middle;\n overflow: hidden;\n box-sizing: border-box;\n height: var(--wcs-chip-height);\n border-radius: var(--wcs-chip-border-radius);\n font-size: var(--wcs-chip-font-size);\n font-weight: var(--wcs-chip-font-weight);\n\n // Default styles (selectable, not selected, not disabled)\n padding: var(--wcs-chip-padding-vertical) var(--wcs-chip-padding-horizontal);\n cursor: pointer;\n user-select: none;\n\n transition-property: color, background-color;\n transition-duration: var(--wcs-semantic-motion-duration-feedback-base);\n transition-timing-function: ease-out;\n}\n\n// SELECTABLE MODE\n:host([mode=selectable]) {\n gap: var(--wcs-chip-selectable-content-gap);\n border: solid var(--wcs-chip-border-line-width) var(--wcs-chip-selectable-border-color);\n background-color: var(--wcs-chip-selectable-background-color);\n color: var(--wcs-chip-selectable-color);\n\n &:host(:focus-visible) {\n @include focus-outline(\n $outline-color: var(--wcs-chip-selectable-focus-outline-color),\n $border-radius: var(--wcs-chip-border-radius),\n $border-width: var(--wcs-chip-focus-outline-border-width)\n );\n }\n\n &:host(:not([disabled])) {\n &:host(:not([selected])) {\n &:host(:hover) {\n background-color: var(--wcs-chip-selectable-background-color-hover);\n color: var(--wcs-chip-selectable-color-hover);\n border-color: var(--wcs-chip-selectable-border-color-hover);\n }\n\n &:host(:active) {\n background-color: var(--wcs-chip-selectable-background-color-pressed);\n color: var(--wcs-chip-selectable-color-pressed);\n border-color: var(--wcs-chip-selectable-border-color-pressed);\n }\n }\n\n &:host([selected]) {\n color: var(--wcs-chip-selectable-color-selected);\n background-color: var(--wcs-chip-selectable-background-color-selected);\n border-color: transparent;\n\n svg path {\n fill: var(--wcs-chip-selectable-color-selected);\n // todo: check this issue with designers\n // We optically lift the check icon a bit to center it better\n transform: translateY(-1.5px);\n }\n\n &:host(:hover) {\n background-color: var(--wcs-chip-selectable-background-color-selected-hover);\n color: var(--wcs-chip-selectable-color-selected-hover);\n\n svg path {\n fill: var(--wcs-chip-selectable-color-selected-hover);\n }\n }\n\n &:host(:active) {\n background-color: var(--wcs-chip-selectable-background-color-selected-pressed);\n color: var(--wcs-chip-selectable-color-selected-pressed);\n\n svg path {\n fill: var(--wcs-chip-selectable-color-selected-pressed);\n }\n }\n }\n }\n\n &:host([disabled]) {\n color: var(--wcs-chip-selectable-color-disabled);\n cursor: not-allowed;\n\n svg {\n path {\n fill: var(--wcs-chip-selectable-color-disabled);\n }\n }\n\n &:host(:not([selected])) {\n border-color: var(--wcs-chip-selectable-border-color-disabled);\n }\n\n &:host([selected]) {\n background-color: var(--wcs-chip-selectable-background-color-selected-disabled);\n border: 0;\n }\n }\n}\n\n// DISMISSIBLE MODE\n:host([mode=dismissible]) {\n cursor: initial;\n border: solid var(--wcs-chip-border-line-width) var(--wcs-chip-dismissible-primary-border-color);\n color: var(--wcs-chip-dismissible-primary-color);\n background-color: var(--wcs-chip-dismissible-primary-background-color);\n gap: var(--wcs-chip-dismissible-content-gap);\n padding-right: var(--wcs-chip-dismissible-padding-right);\n\n button {\n background: transparent;\n border: none;\n margin: 0;\n padding: 0;\n border-radius: var(--wcs-semantic-border-radius-full);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n color: inherit;\n width: var(--wcs-semantic-size-xs);\n height: var(--wcs-semantic-size-xs);\n\n &:focus {\n outline: none;\n\n svg {\n @include focus-outline(\n $outline-color: var(--wcs-chip-dismissible-primary-focus-outline-color),\n $border-radius: var(--wcs-chip-dismissible-button-outline-radius),\n $border-width: var(--wcs-chip-focus-outline-border-width)\n );\n }\n }\n }\n\n &:host(:not([open])) {\n display: none;\n margin: 0;\n }\n\n &:host(:not([disabled])) {\n button:hover {\n background-color: var(--wcs-chip-dismissible-primary-background-color-hover);\n color: var(--wcs-chip-dismissible-primary-color-hover);\n }\n\n button:active {\n background-color: var(--wcs-chip-dismissible-primary-background-color-pressed);\n color: var(--wcs-chip-dismissible-primary-color-pressed);\n }\n }\n\n &:host([disabled]) {\n color: var(--wcs-chip-dismissible-primary-color-disabled);\n background-color: var(--wcs-chip-dismissible-primary-background-color-disabled);\n cursor: not-allowed;\n border: solid var(--wcs-chip-border-line-width) var(--wcs-chip-dismissible-primary-border-color-disabled);\n\n svg {\n cursor: not-allowed;\n\n path {\n fill: var(--wcs-chip-dismissible-primary-color-disabled);\n }\n }\n }\n\n // secondary override (colors only), based on the code above for the primary variant\n &:host([variant=secondary]) {\n color: var(--wcs-chip-dismissible-secondary-color);\n background-color: var(--wcs-chip-dismissible-secondary-background-color);\n border: solid var(--wcs-chip-border-line-width) var(--wcs-chip-dismissible-secondary-border-color);\n\n button {\n background: var(--wcs-chip-dismissible-secondary-button-background-color);\n\n &:focus {\n outline: none;\n\n svg {\n @include focus-outline(\n $outline-color: var(--wcs-chip-dismissible-secondary-button-focus-outline-color),\n $border-radius: var(--wcs-chip-dismissible-button-outline-radius),\n $border-width: var(--wcs-chip-focus-outline-border-width)\n );\n }\n }\n }\n\n &:host(:not([disabled])) {\n button:hover {\n background-color: var(--wcs-chip-dismissible-secondary-button-background-color-hover);\n color: var(--wcs-chip-dismissible-secondary-button-color-hover);\n }\n\n button:active {\n background-color: var(--wcs-chip-dismissible-secondary-button-background-color-pressed);\n color: var(--wcs-chip-dismissible-secondary-button-color-pressed);\n }\n }\n\n &:host([disabled]) {\n color: var(--wcs-chip-dismissible-secondary-color-disabled);\n background-color: var(--wcs-chip-dismissible-secondary-background-color-disabled);\n border: solid var(--wcs-chip-border-line-width) var(--wcs-chip-dismissible-secondary-border-color-disabled);\n\n svg {\n path {\n fill: var(--wcs-chip-dismissible-secondary-color-disabled);\n }\n }\n }\n }\n}\n","import { Component, ComponentInterface, EventEmitter, Prop, Event, Element, Host, h } from '@stencil/core';\nimport { WcsChipMode, WcsChipVariant } from './chip-interface';\n\n/**\n * The chip component is a small, interactive element that can be used to represent an input, filter, or tag.\n * It can be in one of two modes: 'selectable' or 'dismissible'.\n * - In 'selectable' mode, the chip can be selected or deselected, and emits an event when clicked.\n * - In 'dismissible' mode, the chip can be dismissed (removed) by clicking a dismiss icon, and emits an event when the dismiss icon is clicked.\n *\n * @cssprop --wcs-chip-height - Height of the chip\n * @cssprop --wcs-chip-font-size - Font size of the chip text\n * @cssprop --wcs-chip-font-weight - Font weight of the chip text\n *\n * @cssprop --wcs-chip-focus-outline-border-width - Border width of the chip focus outline\n *\n * @cssprop --wcs-chip-padding-vertical - Vertical padding (top - bottom) of the chip\n * @cssprop --wcs-chip-padding-horizontal - Horizontal padding (left - right) of the chip\n * @cssprop --wcs-chip-padding-horizontal-dismissible - Horizontal padding (left - right) of the chip with 'dismissible' mode\n *\n * @cssprop --wcs-chip-selectable-background-color - Background color of the chip with 'selectable' mode in default state\n * @cssprop --wcs-chip-selectable-background-color-pressed - Background color of the chip with 'selectable' mode when pressed\n * @cssprop --wcs-chip-selectable-background-color-hover - Background color of the chip with 'selectable' mode when hovered\n * @cssprop --wcs-chip-selectable-background-color-selected - Background color of the chip with 'selectable' mode when selected\n * @cssprop --wcs-chip-selectable-background-color-selected-hover - Background color of the chip with 'selectable' mode when selected and hovered\n * @cssprop --wcs-chip-selectable-background-color-selected-pressed - Background color of the chip with 'selectable' mode when selected and pressed\n * @cssprop --wcs-chip-selectable-background-color-selected-disabled - Background color of the chip with 'selectable' mode when selected and disabled\n *\n * @cssprop --wcs-chip-selectable-color - Text color of the chip with 'selectable' mode in default state\n * @cssprop --wcs-chip-selectable-color-hover - Text color of the chip with 'selectable' mode when hovered\n * @cssprop --wcs-chip-selectable-color-pressed - Text color of the chip with 'selectable' mode when pressed\n * @cssprop --wcs-chip-selectable-color-disabled - Text color of the chip with 'selectable' mode when disabled\n * @cssprop --wcs-chip-selectable-color-selected - Text color of the chip with 'selectable' mode when selected\n * @cssprop --wcs-chip-selectable-color-selected-hover - Text color of the chip with 'selectable' mode when selected and hovered\n * @cssprop --wcs-chip-selectable-color-selected-pressed - Text color of the chip with 'selectable' mode when selected and pressed\n *\n * @cssprop --wcs-chip-border-radius - Border radius of the chip\n * @cssprop --wcs-chip-border-line-width - Border line width of the chip\n * @cssprop --wcs-chip-selectable-border-color - Border color of the chip with 'selectable' mode in default state\n * @cssprop --wcs-chip-selectable-border-color-hover - Border color of the chip with 'selectable' mode when hovered\n * @cssprop --wcs-chip-selectable-border-color-pressed - Border color of the chip with 'selectable' mode when pressed\n * @cssprop --wcs-chip-selectable-border-color-disabled - Border color of the chip with 'selectable' mode when disabled\n *\n * @cssprop --wcs-chip-selectable-content-gap - Gap between content elements in chip with 'selectable' mode\n * @cssprop --wcs-chip-selectable-focus-outline-color - Focus outline color of the chip with 'selectable' mode\n *\n * @cssprop --wcs-chip-dismissible-content-gap - Gap between content elements in chip with 'dismissible' mode\n * @cssprop --wcs-chip-dismissible-padding-right - Right padding of the chip with 'dismissible' mode\n * @cssprop --wcs-chip-dismissible-button-outline-radius - Outline radius of the button for the chip with 'dismissible' mode\n *\n * @cssprop --wcs-chip-dismissible-primary-focus-outline-color - Focus outline color of the chip with 'dismissible' mode and 'primary' variant\n * @cssprop --wcs-chip-dismissible-primary-border-color - Border color of the chip with 'dismissible' mode and 'primary' variant\n * @cssprop --wcs-chip-dismissible-primary-border-color-disabled - Border color of the chip with 'dismissible' mode and 'primary' variant when disabled\n * @cssprop --wcs-chip-dismissible-primary-color - Text color of the chip with 'dismissible' mode and 'primary' variant\n * @cssprop --wcs-chip-dismissible-primary-color-hover - Text color of the chip with 'dismissible' mode and 'primary' variant when hovered\n * @cssprop --wcs-chip-dismissible-primary-color-pressed - Text color of the chip with 'dismissible' mode and 'primary' variant when pressed\n * @cssprop --wcs-chip-dismissible-primary-color-disabled - Text color of the chip with 'dismissible' mode and 'primary' variant when disabled\n * @cssprop --wcs-chip-dismissible-primary-background-color - Background color of the chip with 'dismissible' mode and 'primary' variant\n * @cssprop --wcs-chip-dismissible-primary-background-color-hover - Background color of the chip with 'dismissible' mode and 'primary' variant when hovered\n * @cssprop --wcs-chip-dismissible-primary-background-color-pressed - Background color of the chip with 'dismissible' mode and 'primary' variant when pressed\n * @cssprop --wcs-chip-dismissible-primary-background-color-disabled - Background color of the chip with 'dismissible' mode and 'primary' variant when disabled\n *\n * @cssprop --wcs-chip-dismissible-secondary-button-focus-outline-color - Button focus outline color of the chip with 'dismissible' mode and 'secondary' variant\n * @cssprop --wcs-chip-dismissible-secondary-border-color - Border color of the chip with 'dismissible' mode and 'secondary' variant\n * @cssprop --wcs-chip-dismissible-secondary-border-color-disabled - Border color of the chip with 'dismissible' mode and 'secondary' variant when disabled\n * @cssprop --wcs-chip-dismissible-secondary-color - Text color of the chip with 'dismissible' mode and 'secondary' variant\n * @cssprop --wcs-chip-dismissible-secondary-color-disabled - Text color of the chip with 'dismissible' mode and 'secondary' variant when disabled\n * @cssprop --wcs-chip-dismissible-secondary-background-color - Background color of the chip with 'dismissible' mode and 'secondary' variant\n * @cssprop --wcs-chip-dismissible-secondary-button-background-color - Button background color of the chip with 'dismissible' mode and 'secondary' variant\n * @cssprop --wcs-chip-dismissible-secondary-button-background-color-hover - Button background color of the chip with 'dismissible' mode and 'secondary' variant when hovered\n * @cssprop --wcs-chip-dismissible-secondary-button-background-color-pressed - Button background color of the chip with 'dismissible' mode and 'secondary' variant when pressed\n * @cssprop --wcs-chip-dismissible-secondary-button-background-color-disabled - Button background color of the chip with 'dismissible' mode and 'secondary' variant when disabled\n */\n@Component({\n tag: 'wcs-chip',\n styleUrl: 'chip.scss',\n shadow: true\n})\nexport class Chip implements ComponentInterface {\n @Element() el!: HTMLWcsChipElement;\n /**\n * Unique value representing the chip identifier in events.\n */\n @Prop() value: string;\n\n /**\n * Text label displayed on the chip.\n */\n @Prop() label: string;\n\n /**\n * If `true`, the chip is selected.\n * This property is only used in 'selectable' mode.\n */\n @Prop({ reflect: true }) selected = false;\n\n /**\n * If `true`, the chip is open.\n * This property is used to control the visibility of the chip in the dismissible mode.\n * When the user clicks the dismiss icon, this property automatically becomes `false`, hiding the chip.\n */\n @Prop({ reflect: true }) open = true;\n\n /**\n * If `true`, the chip is disabled.\n * The chip will not respond to click events and will not emit any events.\n * This property is used in both 'selectable' and 'dismissible' modes.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Defines the visual style of the chip for the dismissible mode.\n */\n @Prop({ reflect: true }) variant: WcsChipVariant = 'primary';\n\n /**\n * Defines the mode of the chip.\n * Can be 'selectable' or 'dismissible'.\n * - 'selectable': The chip can be selected and emits an event when clicked.\n * - 'dismissible': The chip can be dismissed (removed) and emits an event when the dismiss icon is clicked.\n */\n @Prop({ reflect: true }) mode: WcsChipMode = 'selectable';\n\n /**\n * Emitted when the chip is clicked in 'selectable' mode.\n */\n @Event() wcsChipSelectChange: EventEmitter<{ value: string; selected: boolean }>;\n\n /**\n * Emitted when the dismiss icon is clicked in 'dismissible' mode.\n */\n @Event() wcsChipDismiss: EventEmitter<{ value: string }>;\n\n\n private select() {\n this.selected = !this.selected; // Toggle the selected state\n this.wcsChipSelectChange.emit({ value: this.value, selected: this.selected });\n }\n\n private dismiss() {\n this.open = false;\n this.wcsChipDismiss.emit({ value: this.value });\n this.focusNextChip();\n }\n\n private focusNextChip(): void {\n let currentElement = this.el.nextElementSibling;\n\n while (currentElement) {\n if (this.isActionableChip(currentElement)) {\n this.focusChip(currentElement as HTMLWcsChipElement);\n return;\n }\n currentElement = currentElement.nextElementSibling;\n }\n }\n\n private isActionableChip(element: Element | null): element is HTMLWcsChipElement {\n return element instanceof HTMLElement\n && element.tagName === 'WCS-CHIP'\n && !(element as HTMLWcsChipElement).disabled;\n }\n\n private focusChip(chip: HTMLWcsChipElement): void {\n if (chip.mode === 'selectable') {\n chip.focus();\n } else if (chip.mode === 'dismissible') {\n chip.shadowRoot?.querySelector('button')?.focus();\n }\n }\n\n private handleClick() {\n if (this.disabled || this.mode !== 'selectable') {\n return;\n }\n this.select();\n };\n\n private handleDismiss = (event: Event) => {\n if (this.disabled || this.mode !== 'dismissible') {\n return;\n }\n event.stopPropagation(); // Prevent the click event from bubbling up to the chip click handler\n this.dismiss();\n };\n\n private handleKeydown(ev) {\n if (this.disabled) {\n return;\n }\n if (this.mode === 'selectable') {\n if (ev.key === 'Enter' || ev.key === ' ') {\n this.select();\n }\n } else if (this.mode === 'dismissible') {\n if (ev.key === 'Delete' || ev.key === 'Backspace') {\n this.dismiss();\n }\n }\n }\n\n render() {\n const commonProps = {\n 'aria-disabled': this.disabled ? 'true' : null\n };\n\n if (this.mode === 'selectable') {\n return (\n <Host\n {...commonProps}\n role=\"checkbox\"\n aria-checked={this.selected ? 'true' : 'false'}\n tabindex={this.disabled ? -1 : 0}\n onClick={this.handleClick.bind(this)}\n onKeyDown={this.handleKeydown.bind(this)}\n >\n {this.selected && (\n <svg class=\"check-icon\" aria-hidden=\"true\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\"\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M23.712 8.3011L8.0292 23.7157C7.6356 24.095 6.9984 24.095 6.6264 23.7157L0.288 17.4955C-0.096 17.1226 -0.096 16.496 0.288 16.1192L2.1552 14.2739C2.5536 13.9036 3.1776 13.9036 3.5532 14.2739L6.6264 17.2764C6.9984 17.6583 7.6356 17.6583 8.0292 17.2764L20.4384 5.08081C20.8236 4.70662 21.4536 4.70662 21.8364 5.08081L23.712 6.91841C24.096 7.29516 24.096 7.91923 23.712 8.3011Z\"\n fill=\"white\" />\n </svg>\n )}\n <span>{this.label}</span>\n </Host>\n );\n } else {\n return (\n <Host\n {...commonProps}\n >\n <span>{this.label}</span>\n <button\n aria-label={`Supprimer ${this.label}`}\n disabled={this.disabled}\n onClick={this.handleDismiss.bind(this)}\n onKeyDown={this.handleKeydown.bind(this)}\n >\n <svg class=\"dismiss-icon\" aria-hidden=\"true\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\"\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M14.2656 12.0298L19.588 6.72176C20.1908 6.12119 20.1061 5.05213 19.5034 4.45043C18.9006 3.84986 17.914 3.84986 17.3112 4.45043L11.9887 9.7596L6.66743 4.45043C6.06351 3.84986 5.07691 3.84986 4.47412 4.45043C3.87132 5.05213 3.82843 6.07942 4.43122 6.68112L9.75365 11.9892L4.43122 17.2983C3.82843 17.8989 3.87132 18.9262 4.47412 19.5279C5.07691 20.1296 6.10527 20.1702 6.70807 19.5685L12.0305 14.2605L17.3112 19.5279C17.914 20.1296 18.9006 20.1296 19.5034 19.5279C20.1061 18.9262 20.149 17.8989 19.5462 17.2983L14.2656 12.0298Z\"\n fill=\"currentColor\" />\n </svg>\n </button>\n </Host>\n );\n }\n }\n}\n\n"],"version":3}
@@ -5960,7 +5960,7 @@ const Select = class {
5960
5960
  onAutocompleteInputEvent(e) {
5961
5961
  var _a;
5962
5962
  const filter = (_a = this.autocompleteInput.value) !== null && _a !== void 0 ? _a : '';
5963
- this.setAutocompleteValue(filter);
5963
+ this.setAutocompleteValue(filter, false, true); // fromUserInteraction = true
5964
5964
  // Avoid the inputEvent event to bubble and be emitted, we rather use wcsFilterChange in this case :
5965
5965
  e.stopPropagation();
5966
5966
  }
@@ -5968,13 +5968,15 @@ const Select = class {
5968
5968
  * Set the autocomplete value and open the select if needed.
5969
5969
  * @param filter - The new filter value
5970
5970
  * @param isReset - If true, the filter is reset and the select is closed
5971
+ * @param fromUserInteraction - If true, the change comes from user interaction (typing), if false it's programmatic
5971
5972
  * @private
5972
5973
  */
5973
- setAutocompleteValue(filter, isReset = false) {
5974
+ setAutocompleteValue(filter, isReset = false, fromUserInteraction = false) {
5974
5975
  var _a, _b;
5975
5976
  this.clearHighlightOnLastHighlightedOption();
5976
5977
  const newValueIsDifferentFromLastModifiedOption = this.lastModifiedOptionElement == null || ((_a = this.lastModifiedOptionElement) === null || _a === void 0 ? void 0 : _a.textContent) !== this.autocompleteValue;
5977
- if (!this.expanded && newValueIsDifferentFromLastModifiedOption && !isReset) {
5978
+ // Only open the select automatically when the change comes from user interaction
5979
+ if (!this.expanded && newValueIsDifferentFromLastModifiedOption && !isReset && fromUserInteraction) {
5978
5980
  this.open();
5979
5981
  }
5980
5982
  // Prevents client-side filtering logic from being applied when serverMode is enabled.
@@ -6043,14 +6045,14 @@ const Select = class {
6043
6045
  var _a;
6044
6046
  const ariaLabelValue = `${this.labelElement ? this.labelElement.innerText : ''} ${this.hasValue ? this.displayText : ''}`.trimEnd();
6045
6047
  const noResultContainerId = 'no-result-container';
6046
- return (index.h(index.Host, Object.assign({ key: '6a973d4f68de6f668fda8b17de1da78b94076dc0', class: this.expanded ? 'expanded ' : '', overlayDirection: this.overlayDirection }, this.focusedAttributes(), { role: !this.autocomplete ? "combobox" : null, "aria-haspopup": !this.autocomplete ? "listbox" : null, "aria-owns": !this.autocomplete ? this.optionsId : null, "aria-controls": !this.autocomplete ? this.optionsId : null, "aria-disabled": !this.autocomplete ? (this.disabled ? 'true' : null) : null, "aria-required": !this.autocomplete ? (this.required ? 'true' : 'false') : null, "aria-expanded": !this.autocomplete ? (this.expanded ? 'true' : 'false') : null, "aria-multiselectable": !this.autocomplete ? (this.multiple ? 'true' : 'false') : null, "aria-label": !this.autocomplete ? ariaLabelValue : null }), index.h("div", { key: '190343789a5d2b4227b4a9822348aa087b4bbbad', class: "wcs-select-control" }, index.h("div", { key: '2f61ddd11d08bd25d8acf00ecfdced4a97a33320', class: "wcs-select-value-container" }, this.hasValue
6048
+ return (index.h(index.Host, Object.assign({ key: '71154caab9c0b2244716f5c5626cc0de3ed7d327', class: this.expanded ? 'expanded ' : '', overlayDirection: this.overlayDirection }, this.focusedAttributes(), { role: !this.autocomplete ? "combobox" : null, "aria-haspopup": !this.autocomplete ? "listbox" : null, "aria-owns": !this.autocomplete ? this.optionsId : null, "aria-controls": !this.autocomplete ? this.optionsId : null, "aria-disabled": !this.autocomplete ? (this.disabled ? 'true' : null) : null, "aria-required": !this.autocomplete ? (this.required ? 'true' : 'false') : null, "aria-expanded": !this.autocomplete ? (this.expanded ? 'true' : 'false') : null, "aria-multiselectable": !this.autocomplete ? (this.multiple ? 'true' : 'false') : null, "aria-label": !this.autocomplete ? ariaLabelValue : null }), index.h("div", { key: '2dff342eb864a28ac960583102de88cfd7f63d98', class: "wcs-select-control" }, index.h("div", { key: '0f2028f2eb8245fa08da06ccebbfbac880d0e090', class: "wcs-select-value-container" }, this.hasValue
6047
6049
  ?
6048
6050
  (this.chips ?
6049
6051
  this.values.map((option) => index.h(SelectChips, { disabled: this.disabled, option: option, onRemove: this.removeChip.bind(this) }))
6050
6052
  : (!this.autocomplete || this.autocomplete && this.multiple) &&
6051
6053
  index.h("label", { class: "wcs-select-value" }, this.displayText))
6052
- : !this.autocomplete && index.h("label", { class: "wcs-select-placeholder" }, this.placeholder), this.autocomplete && index.h("input", Object.assign({ key: '7f2fc76276628b45ebcbcb40f64a82acafa5e192', class: "autocomplete-field", value: this.autocompleteValue, role: "combobox", "aria-haspopup": "listbox", "aria-label": ariaLabelValue, "aria-describedby": noResultContainerId, "aria-disabled": this.disabled ? 'true' : null, "aria-expanded": this.expanded ? 'true' : 'false', "aria-controls": this.optionsId, "aria-owns": this.optionsId, "aria-multiselectable": this.multiple ? 'true' : 'false', "aria-autocomplete": "list", autocomplete: "off", disabled: this.disabled, required: this.required, onBlur: (e) => this.onAutocompleteFieldBlur(e), placeholder: ((_a = this.values) === null || _a === void 0 ? void 0 : _a.length) ? null : this.placeholder, onInput: (e) => this.onAutocompleteInputEvent(e), ref: el => this.autocompleteInput = el }, this.inheritedAttributes))), index.h(selectArrow.SelectArrow, { key: 'a6075fc5a325bc1e19cc3d62ddbffb8a3409d454', up: this.expanded })), index.h("div", { key: '36a6ea6029659db97f174c12a4a5ff3c4c0bfd69', class: "wcs-select-options", id: this.optionsId, role: "listbox" }, index.h("slot", { key: '3a02c19f0b77c98807a684ae77f2612c422cb096', name: "options", onSlotchange: this.onSlotchange.bind(this) }), (this.autocomplete && this.showNoResultFoundLabel) &&
6053
- index.h("div", { key: '82ecd4b70ed11d8497e9d5d3aea0c3c95f20ec36', role: "alert", id: noResultContainerId, class: "noresult-container" }, index.h("slot", { key: '607e7d9c3c112e64218d2170ca4e07aaf5cbd25c', name: "filter-no-result" }, index.h("span", { key: 'da3800fefd8f57c0d7b62e261933e3293bea2161' }, "Aucun r\u00E9sultat"))))));
6054
+ : !this.autocomplete && index.h("label", { class: "wcs-select-placeholder" }, this.placeholder), this.autocomplete && index.h("input", Object.assign({ key: '000f05300690b402f77b210b4e6808e73647d607', class: "autocomplete-field", value: this.autocompleteValue, role: "combobox", "aria-haspopup": "listbox", "aria-label": ariaLabelValue, "aria-describedby": noResultContainerId, "aria-disabled": this.disabled ? 'true' : null, "aria-expanded": this.expanded ? 'true' : 'false', "aria-controls": this.optionsId, "aria-owns": this.optionsId, "aria-multiselectable": this.multiple ? 'true' : 'false', "aria-autocomplete": "list", autocomplete: "off", disabled: this.disabled, required: this.required, onBlur: (e) => this.onAutocompleteFieldBlur(e), placeholder: ((_a = this.values) === null || _a === void 0 ? void 0 : _a.length) ? null : this.placeholder, onInput: (e) => this.onAutocompleteInputEvent(e), ref: el => this.autocompleteInput = el }, this.inheritedAttributes))), index.h(selectArrow.SelectArrow, { key: 'cbbb2ef8b0c49b69c2a3509e6444f52d114efd23', up: this.expanded })), index.h("div", { key: '9330811ed0b8e0a2380692cdca34f2196b087466', class: "wcs-select-options", id: this.optionsId, role: "listbox" }, index.h("slot", { key: '9efd1b1d83e7bc1af1733909060854025c21df07', name: "options", onSlotchange: this.onSlotchange.bind(this) }), (this.autocomplete && this.showNoResultFoundLabel) &&
6055
+ index.h("div", { key: 'a8438df62c26f1d4cfcd25c43d5636031138c71f', role: "alert", id: noResultContainerId, class: "noresult-container" }, index.h("slot", { key: '95397947cdef93512fec2c168ca42893500950ba', name: "filter-no-result" }, index.h("span", { key: 'd5fc78e9ba099a017f6ed3116b23aa929c34dcb9' }, "Aucun r\u00E9sultat"))))));
6054
6056
  }
6055
6057
  get el() { return index.getElement(this); }
6056
6058
  static get watchers() { return {