bromcom-ui-next 0.1.7 → 0.1.9

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 (109) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/bromcom-ui.esm.js.map +1 -1
  3. package/dist/bromcom-ui/global/global.js +10 -0
  4. package/dist/bromcom-ui/p-1bf71c9b.entry.js +2 -0
  5. package/dist/bromcom-ui/{p-7d8ad3dd.entry.js.map → p-1bf71c9b.entry.js.map} +1 -1
  6. package/dist/bromcom-ui/p-48f18671.entry.js +2 -0
  7. package/dist/bromcom-ui/{p-d57587e5.entry.js.map → p-48f18671.entry.js.map} +1 -1
  8. package/dist/bromcom-ui/p-a1aae3ef.entry.js +2 -0
  9. package/dist/bromcom-ui/p-a1aae3ef.entry.js.map +1 -0
  10. package/dist/bromcom-ui/p-ab9a95f9.entry.js +2 -0
  11. package/dist/bromcom-ui/p-ab9a95f9.entry.js.map +1 -0
  12. package/dist/bromcom-ui/p-b1b493ab.entry.js +2 -0
  13. package/dist/bromcom-ui/p-b1b493ab.entry.js.map +1 -0
  14. package/dist/bromcom-ui/p-c427ffee.entry.js +2 -0
  15. package/dist/bromcom-ui/{p-15829c47.entry.js.map → p-c427ffee.entry.js.map} +1 -1
  16. package/dist/bromcom-ui/p-cee68279.entry.js +2 -0
  17. package/dist/bromcom-ui/{p-4b7294a3.entry.js.map → p-cee68279.entry.js.map} +1 -1
  18. package/dist/bromcom-ui/p-ddf64315.js +2 -0
  19. package/dist/bromcom-ui/p-ddf64315.js.map +1 -0
  20. package/dist/cjs/{app-globals-29edfda4.js → app-globals-e0eef2e9.js} +9 -1
  21. package/dist/cjs/app-globals-e0eef2e9.js.map +1 -0
  22. package/dist/cjs/bcm-avatar_4.cjs.entry.js +23 -10
  23. package/dist/cjs/bcm-avatar_4.cjs.entry.js.map +1 -1
  24. package/dist/cjs/bcm-checkbox.cjs.entry.js +3 -3
  25. package/dist/cjs/bcm-checkbox.cjs.entry.js.map +1 -1
  26. package/dist/cjs/bcm-chip.cjs.entry.js +1 -1
  27. package/dist/cjs/bcm-chip.cjs.entry.js.map +1 -1
  28. package/dist/cjs/bcm-divider.cjs.entry.js +1 -1
  29. package/dist/cjs/bcm-divider.cjs.entry.js.map +1 -1
  30. package/dist/cjs/bcm-input.cjs.entry.js +23 -20
  31. package/dist/cjs/bcm-input.cjs.entry.js.map +1 -1
  32. package/dist/cjs/bcm-tabs-trigger.cjs.entry.js +1 -1
  33. package/dist/cjs/bcm-tabs-trigger.cjs.entry.js.map +1 -1
  34. package/dist/cjs/bcm-text.cjs.entry.js +1 -1
  35. package/dist/cjs/bcm-text.cjs.entry.js.map +1 -1
  36. package/dist/cjs/bromcom-ui.cjs.js +2 -2
  37. package/dist/cjs/loader.cjs.js +2 -2
  38. package/dist/collection/components/basic-badge/basic-badge.component.js +3 -3
  39. package/dist/collection/components/basic-badge/basic-badge.component.js.map +1 -1
  40. package/dist/collection/components/button/button.component.js +19 -6
  41. package/dist/collection/components/button/button.component.js.map +1 -1
  42. package/dist/collection/components/button/button.css +1 -1
  43. package/dist/collection/components/checkbox/checkbox.component.js +2 -2
  44. package/dist/collection/components/checkbox/checkbox.component.js.map +1 -1
  45. package/dist/collection/components/checkbox/checkbox.css +1 -1
  46. package/dist/collection/components/chip/chip.css +1 -1
  47. package/dist/collection/components/divider/divider.css +1 -1
  48. package/dist/collection/components/input/input.component.js +24 -10
  49. package/dist/collection/components/input/input.component.js.map +1 -1
  50. package/dist/collection/components/input/input.css +1 -1
  51. package/dist/collection/components/tabs/tabs-trigger.css +1 -1
  52. package/dist/collection/components/text/text.css +1 -1
  53. package/dist/collection/global/global.js +10 -0
  54. package/dist/components/bcm-basic-badge.js +3 -3
  55. package/dist/components/bcm-basic-badge.js.map +1 -1
  56. package/dist/components/bcm-button.js +1 -1
  57. package/dist/components/bcm-checkbox.js +3 -3
  58. package/dist/components/bcm-checkbox.js.map +1 -1
  59. package/dist/components/bcm-chip.js +1 -1
  60. package/dist/components/bcm-chip.js.map +1 -1
  61. package/dist/components/bcm-divider.js +1 -1
  62. package/dist/components/bcm-divider.js.map +1 -1
  63. package/dist/components/bcm-dropdown.js +1 -1
  64. package/dist/components/bcm-input.js +24 -20
  65. package/dist/components/bcm-input.js.map +1 -1
  66. package/dist/components/bcm-pop-confirm.js +1 -1
  67. package/dist/components/bcm-tabs-trigger.js +1 -1
  68. package/dist/components/bcm-tabs-trigger.js.map +1 -1
  69. package/dist/components/bcm-text.js +1 -1
  70. package/dist/components/bcm-text.js.map +1 -1
  71. package/dist/components/index.js +8 -0
  72. package/dist/components/index.js.map +1 -1
  73. package/dist/components/{p-e6567774.js → p-434bf03a.js} +21 -8
  74. package/dist/components/p-434bf03a.js.map +1 -0
  75. package/dist/esm/{app-globals-bfa07b76.js → app-globals-f7994f55.js} +9 -1
  76. package/dist/esm/app-globals-f7994f55.js.map +1 -0
  77. package/dist/esm/bcm-avatar_4.entry.js +23 -10
  78. package/dist/esm/bcm-avatar_4.entry.js.map +1 -1
  79. package/dist/esm/bcm-checkbox.entry.js +3 -3
  80. package/dist/esm/bcm-checkbox.entry.js.map +1 -1
  81. package/dist/esm/bcm-chip.entry.js +1 -1
  82. package/dist/esm/bcm-chip.entry.js.map +1 -1
  83. package/dist/esm/bcm-divider.entry.js +1 -1
  84. package/dist/esm/bcm-divider.entry.js.map +1 -1
  85. package/dist/esm/bcm-input.entry.js +23 -20
  86. package/dist/esm/bcm-input.entry.js.map +1 -1
  87. package/dist/esm/bcm-tabs-trigger.entry.js +1 -1
  88. package/dist/esm/bcm-tabs-trigger.entry.js.map +1 -1
  89. package/dist/esm/bcm-text.entry.js +1 -1
  90. package/dist/esm/bcm-text.entry.js.map +1 -1
  91. package/dist/esm/bromcom-ui.js +2 -2
  92. package/dist/esm/loader.js +2 -2
  93. package/dist/types/components/input/input.component.d.ts +4 -0
  94. package/package.json +1 -1
  95. package/dist/bromcom-ui/p-15829c47.entry.js +0 -2
  96. package/dist/bromcom-ui/p-4b7294a3.entry.js +0 -2
  97. package/dist/bromcom-ui/p-729a870f.js +0 -2
  98. package/dist/bromcom-ui/p-729a870f.js.map +0 -1
  99. package/dist/bromcom-ui/p-7d8ad3dd.entry.js +0 -2
  100. package/dist/bromcom-ui/p-a29e61a4.entry.js +0 -2
  101. package/dist/bromcom-ui/p-a29e61a4.entry.js.map +0 -1
  102. package/dist/bromcom-ui/p-ae16edd3.entry.js +0 -2
  103. package/dist/bromcom-ui/p-ae16edd3.entry.js.map +0 -1
  104. package/dist/bromcom-ui/p-d57587e5.entry.js +0 -2
  105. package/dist/bromcom-ui/p-e6025578.entry.js +0 -2
  106. package/dist/bromcom-ui/p-e6025578.entry.js.map +0 -1
  107. package/dist/cjs/app-globals-29edfda4.js.map +0 -1
  108. package/dist/components/p-e6567774.js.map +0 -1
  109. package/dist/esm/app-globals-bfa07b76.js.map +0 -1
@@ -3,12 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-9a2c5938.js');
6
- const appGlobals = require('./app-globals-29edfda4.js');
6
+ const appGlobals = require('./app-globals-e0eef2e9.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["bcm-dropdown.cjs",[[1,"bcm-dropdown",{"text":[1],"isReady":[32],"dropdownItems":[32]},[[2,"bcmDropDownItemChange","handleDropdownItemChange"]]]]],["bcm-pop-confirm.cjs",[[1,"bcm-pop-confirm",{"arrowColor":[1,"arrow-color"],"cancelText":[1,"cancel-text"],"confirmText":[1,"confirm-text"],"description":[1],"headerText":[1,"header-text"],"placement":[1],"size":[1],"status":[1],"statusIcon":[4,"status-icon"],"targetId":[1,"target-id"],"isOpen":[32],"currentPlacement":[32],"show":[64],"hide":[64]}]]],["bcm-accordion.cjs",[[1,"bcm-accordion",{"expanded":[1540],"headerTitle":[1,"header-title"],"group":[516],"hintText":[1,"hint-text"],"hasFooterContent":[32],"toggle":[64],"expand":[64],"collapse":[64]}]]],["bcm-accordion-group.cjs",[[1,"bcm-accordion-group",{"multi":[4],"accordionItems":[32],"expandAll":[64],"collapseAll":[64],"getExpandedItems":[64]},[[2,"bcmAccordionChange","handleAccordionChange"]]]]],["bcm-alert.cjs",[[1,"bcm-alert",{"status":[1],"size":[1],"kind":[1],"dismissible":[4],"showStatusIcon":[4,"show-status-icon"]}]]],["bcm-button-group.cjs",[[1,"bcm-button-group",{"kind":[1],"size":[1],"status":[1],"fullWidth":[516,"full-width"],"loading":[4],"disabled":[4],"orientation":[513]}]]],["bcm-checkbox.cjs",[[1,"bcm-checkbox",{"_id":[513,"id"],"label":[1],"name":[1],"indeterminate":[1028],"size":[1],"checked":[1028],"error":[4],"disabled":[4],"labelPosition":[1,"label-position"],"internalChecked":[32]},null,{"checked":["syncCheckedProp"],"indeterminate":["updateIndeterminateState"],"internalChecked":["updateIndeterminateState"]}]]],["bcm-chip.cjs",[[1,"bcm-chip",{"size":[1],"kind":[1],"status":[1],"dismissible":[4],"disabled":[4],"color":[1]}]]],["bcm-divider.cjs",[[1,"bcm-divider",{"direction":[1],"variant":[1],"size":[1]}]]],["bcm-dropdown-item.cjs",[[1,"bcm-dropdown-item",{"text":[1],"icon":[1],"rightIcons":[16],"selected":[516],"error":[516],"disabled":[516]}]]],["bcm-input.cjs",[[1,"bcm-input",{"value":[1537],"placeholder":[1],"name":[1],"_id":[513,"id"],"size":[1],"status":[1],"fullWidth":[516,"full-width"],"type":[1],"disabled":[4],"readonly":[4],"required":[4],"autocomplete":[1],"minLength":[2,"min-length"],"maxLength":[2,"max-length"],"min":[2],"max":[2],"step":[2],"pattern":[1],"label":[1],"errorMessage":[1,"error-message"],"captionText":[1,"caption-text"],"labelledby":[1],"describedby":[1],"prefixIcon":[1,"prefix-icon"],"suffixIcon":[1,"suffix-icon"],"useNativeValidation":[4,"use-native-validation"],"validator":[16],"isFocused":[32],"validationMessage":[32],"isValid":[32],"internalStatus":[32],"internalErrorMessage":[32],"setFocus":[64],"setBlur":[64],"select":[64],"setLocale":[64]},null,{"value":["handleValueChange"],"status":["watchStatus"],"errorMessage":["watchErrorMessage"]}]]],["bcm-popover.cjs",[[1,"bcm-popover",{"size":[1],"placement":[1],"trigger":[1],"hoverDelay":[2,"hover-delay"],"open":[1028],"headerText":[1,"header-text"],"message":[1],"openPopup":[64],"closePopup":[64]}]]],["bcm-radio.cjs",[[1,"bcm-radio",{"label":[1],"name":[1],"value":[1],"checked":[516],"size":[1],"disabled":[4],"readonly":[4],"labelPosition":[1,"label-position"],"error":[4]}]]],["bcm-radio-group.cjs",[[1,"bcm-radio-group",{"name":[1],"value":[1],"disabled":[4],"required":[4],"error":[4],"label":[1],"size":[1],"direction":[1],"captionText":[1,"caption-text"],"setClear":[64],"resetCaption":[64]},[[2,"bcmRadioChange","handleRadioChange"]],{"value":["handleValueChange"]}]]],["bcm-segmented-picker.cjs",[[1,"bcm-segmented-picker",{"size":[1],"value":[1537],"disabled":[4],"fullWidth":[516,"full-width"],"options":[32],"indicatorStyles":[32]},[[0,"bcmOptionClick","handleOptionClick"]],{"value":["valueChanged"]}]]],["bcm-segmented-picker-option.cjs",[[1,"bcm-segmented-picker-option",{"value":[1],"label":[1],"size":[1],"selected":[1028],"disabled":[4],"getWidth":[64]}]]],["bcm-switch.cjs",[[1,"bcm-switch",{"checked":[1540],"disabled":[4],"name":[1],"value":[1],"label":[1],"labelPosition":[1,"label-position"],"error":[4],"caption":[1],"size":[1],"readonly":[4],"required":[4]}]]],["bcm-tabs.cjs",[[1,"bcm-tabs",{"defaultValue":[513,"default-value"],"size":[513],"activeTab":[32],"previousTab":[32],"disableTab":[64],"enableTab":[64],"disableAllTabs":[64],"enableAllTabs":[64],"getActiveTab":[64],"setActiveTab":[64]},[[9,"resize","handleResize"],[2,"bcmTabSelected","handleTabSelected"]],{"size":["handleSizeChange"]}]]],["bcm-tabs-content.cjs",[[1,"bcm-tabs-content",{"value":[513]}]]],["bcm-tabs-list.cjs",[[1,"bcm-tabs-list"]]],["bcm-tabs-trigger.cjs",[[1,"bcm-tabs-trigger",{"value":[513],"active":[516],"size":[513],"disabled":[516]}]]],["bcm-text.cjs",[[1,"bcm-text",{"text":[1],"variant":[1],"size":[1]}]]],["bcm-textarea.cjs",[[1,"bcm-textarea",{"value":[1537],"rows":[2],"cols":[2],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"resize":[1],"autoGrow":[4,"auto-grow"],"placeholder":[1],"name":[1],"_id":[513,"id"],"size":[1],"status":[1],"fullWidth":[516,"full-width"],"disabled":[4],"readonly":[4],"required":[4],"minLength":[2,"min-length"],"maxLength":[2,"max-length"],"showCounter":[4,"show-counter"],"label":[1],"errorMessage":[1,"error-message"],"captionText":[1,"caption-text"],"labelledby":[1],"describedby":[1],"validator":[16],"isFocused":[32],"validationMessage":[32],"isValid":[32],"internalStatus":[32],"internalErrorMessage":[32],"setFocus":[64],"setBlur":[64],"select":[64]},null,{"value":["handleValueChange"],"status":["watchStatus"],"errorMessage":["watchErrorMessage"]}]]],["bcm-tooltip.cjs",[[1,"bcm-tooltip",{"trigger":[1],"placement":[1],"size":[1],"message":[1],"showDelay":[2,"show-delay"],"open":[32],"openTooltip":[64],"closeTooltip":[64]}]]],["bcm-linked.cjs",[[1,"bcm-linked",{"targetId":[513,"target-id"],"targetElement":[16],"isVisible":[32]}]]],["bcm-avatar_4.cjs",[[1,"bcm-avatar",{"image":[1],"alt":[1],"shape":[1],"size":[1],"color":[1],"icon":[1],"status":[1],"blink":[4],"name":[1],"isFallback":[32]}],[1,"bcm-basic-badge",{"size":[1],"variant":[1],"color":[1],"soft":[4],"text":[1]}],[1,"bcm-badge",{"size":[1],"variant":[1],"color":[1],"soft":[4],"blink":[4],"status":[1],"position":[1],"offset":[1],"text":[1]}],[1,"bcm-button",{"kind":[1],"size":[1],"status":[1],"variant":[1],"position":[513],"icon":[1],"iconPosition":[1,"icon-position"],"iconOnly":[4,"icon-only"],"fullWidth":[516,"full-width"],"type":[1],"loading":[4],"disabled":[4],"text":[1],"active":[4],"form":[1],"value":[1],"name":[1],"label":[1],"expanded":[1],"controls":[1]}]]]], options);
11
+ return index.bootstrapLazy([["bcm-dropdown.cjs",[[1,"bcm-dropdown",{"text":[1],"isReady":[32],"dropdownItems":[32]},[[2,"bcmDropDownItemChange","handleDropdownItemChange"]]]]],["bcm-pop-confirm.cjs",[[1,"bcm-pop-confirm",{"arrowColor":[1,"arrow-color"],"cancelText":[1,"cancel-text"],"confirmText":[1,"confirm-text"],"description":[1],"headerText":[1,"header-text"],"placement":[1],"size":[1],"status":[1],"statusIcon":[4,"status-icon"],"targetId":[1,"target-id"],"isOpen":[32],"currentPlacement":[32],"show":[64],"hide":[64]}]]],["bcm-accordion.cjs",[[1,"bcm-accordion",{"expanded":[1540],"headerTitle":[1,"header-title"],"group":[516],"hintText":[1,"hint-text"],"hasFooterContent":[32],"toggle":[64],"expand":[64],"collapse":[64]}]]],["bcm-accordion-group.cjs",[[1,"bcm-accordion-group",{"multi":[4],"accordionItems":[32],"expandAll":[64],"collapseAll":[64],"getExpandedItems":[64]},[[2,"bcmAccordionChange","handleAccordionChange"]]]]],["bcm-alert.cjs",[[1,"bcm-alert",{"status":[1],"size":[1],"kind":[1],"dismissible":[4],"showStatusIcon":[4,"show-status-icon"]}]]],["bcm-button-group.cjs",[[1,"bcm-button-group",{"kind":[1],"size":[1],"status":[1],"fullWidth":[516,"full-width"],"loading":[4],"disabled":[4],"orientation":[513]}]]],["bcm-checkbox.cjs",[[1,"bcm-checkbox",{"_id":[513,"id"],"label":[1],"name":[1],"indeterminate":[1028],"size":[1],"checked":[1028],"error":[4],"disabled":[4],"labelPosition":[1,"label-position"],"internalChecked":[32]},null,{"checked":["syncCheckedProp"],"indeterminate":["updateIndeterminateState"],"internalChecked":["updateIndeterminateState"]}]]],["bcm-chip.cjs",[[1,"bcm-chip",{"size":[1],"kind":[1],"status":[1],"dismissible":[4],"disabled":[4],"color":[1]}]]],["bcm-divider.cjs",[[1,"bcm-divider",{"direction":[1],"variant":[1],"size":[1]}]]],["bcm-dropdown-item.cjs",[[1,"bcm-dropdown-item",{"text":[1],"icon":[1],"rightIcons":[16],"selected":[516],"error":[516],"disabled":[516]}]]],["bcm-input.cjs",[[1,"bcm-input",{"value":[1537],"placeholder":[1],"name":[1],"_id":[513,"id"],"size":[1],"status":[1],"fullWidth":[516,"full-width"],"type":[1],"disabled":[4],"readonly":[4],"required":[4],"autocomplete":[1],"minLength":[2,"min-length"],"maxLength":[2,"max-length"],"min":[2],"max":[2],"step":[2],"pattern":[1],"label":[1],"errorMessage":[1,"error-message"],"captionText":[1,"caption-text"],"labelledby":[1],"describedby":[1],"prefixIcon":[1,"prefix-icon"],"suffixIcon":[1,"suffix-icon"],"useNativeValidation":[4,"use-native-validation"],"validator":[16],"isFocused":[32],"validationMessage":[32],"isValid":[32],"internalStatus":[32],"internalErrorMessage":[32],"isPasswordVisible":[32],"setFocus":[64],"setBlur":[64],"select":[64],"setLocale":[64]},null,{"value":["handleValueChange"],"status":["watchStatus"],"errorMessage":["watchErrorMessage"]}]]],["bcm-popover.cjs",[[1,"bcm-popover",{"size":[1],"placement":[1],"trigger":[1],"hoverDelay":[2,"hover-delay"],"open":[1028],"headerText":[1,"header-text"],"message":[1],"openPopup":[64],"closePopup":[64]}]]],["bcm-radio.cjs",[[1,"bcm-radio",{"label":[1],"name":[1],"value":[1],"checked":[516],"size":[1],"disabled":[4],"readonly":[4],"labelPosition":[1,"label-position"],"error":[4]}]]],["bcm-radio-group.cjs",[[1,"bcm-radio-group",{"name":[1],"value":[1],"disabled":[4],"required":[4],"error":[4],"label":[1],"size":[1],"direction":[1],"captionText":[1,"caption-text"],"setClear":[64],"resetCaption":[64]},[[2,"bcmRadioChange","handleRadioChange"]],{"value":["handleValueChange"]}]]],["bcm-segmented-picker.cjs",[[1,"bcm-segmented-picker",{"size":[1],"value":[1537],"disabled":[4],"fullWidth":[516,"full-width"],"options":[32],"indicatorStyles":[32]},[[0,"bcmOptionClick","handleOptionClick"]],{"value":["valueChanged"]}]]],["bcm-segmented-picker-option.cjs",[[1,"bcm-segmented-picker-option",{"value":[1],"label":[1],"size":[1],"selected":[1028],"disabled":[4],"getWidth":[64]}]]],["bcm-switch.cjs",[[1,"bcm-switch",{"checked":[1540],"disabled":[4],"name":[1],"value":[1],"label":[1],"labelPosition":[1,"label-position"],"error":[4],"caption":[1],"size":[1],"readonly":[4],"required":[4]}]]],["bcm-tabs.cjs",[[1,"bcm-tabs",{"defaultValue":[513,"default-value"],"size":[513],"activeTab":[32],"previousTab":[32],"disableTab":[64],"enableTab":[64],"disableAllTabs":[64],"enableAllTabs":[64],"getActiveTab":[64],"setActiveTab":[64]},[[9,"resize","handleResize"],[2,"bcmTabSelected","handleTabSelected"]],{"size":["handleSizeChange"]}]]],["bcm-tabs-content.cjs",[[1,"bcm-tabs-content",{"value":[513]}]]],["bcm-tabs-list.cjs",[[1,"bcm-tabs-list"]]],["bcm-tabs-trigger.cjs",[[1,"bcm-tabs-trigger",{"value":[513],"active":[516],"size":[513],"disabled":[516]}]]],["bcm-text.cjs",[[1,"bcm-text",{"text":[1],"variant":[1],"size":[1]}]]],["bcm-textarea.cjs",[[1,"bcm-textarea",{"value":[1537],"rows":[2],"cols":[2],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"resize":[1],"autoGrow":[4,"auto-grow"],"placeholder":[1],"name":[1],"_id":[513,"id"],"size":[1],"status":[1],"fullWidth":[516,"full-width"],"disabled":[4],"readonly":[4],"required":[4],"minLength":[2,"min-length"],"maxLength":[2,"max-length"],"showCounter":[4,"show-counter"],"label":[1],"errorMessage":[1,"error-message"],"captionText":[1,"caption-text"],"labelledby":[1],"describedby":[1],"validator":[16],"isFocused":[32],"validationMessage":[32],"isValid":[32],"internalStatus":[32],"internalErrorMessage":[32],"setFocus":[64],"setBlur":[64],"select":[64]},null,{"value":["handleValueChange"],"status":["watchStatus"],"errorMessage":["watchErrorMessage"]}]]],["bcm-tooltip.cjs",[[1,"bcm-tooltip",{"trigger":[1],"placement":[1],"size":[1],"message":[1],"showDelay":[2,"show-delay"],"open":[32],"openTooltip":[64],"closeTooltip":[64]}]]],["bcm-linked.cjs",[[1,"bcm-linked",{"targetId":[513,"target-id"],"targetElement":[16],"isVisible":[32]}]]],["bcm-avatar_4.cjs",[[1,"bcm-avatar",{"image":[1],"alt":[1],"shape":[1],"size":[1],"color":[1],"icon":[1],"status":[1],"blink":[4],"name":[1],"isFallback":[32]}],[1,"bcm-basic-badge",{"size":[1],"variant":[1],"color":[1],"soft":[4],"text":[1]}],[1,"bcm-badge",{"size":[1],"variant":[1],"color":[1],"soft":[4],"blink":[4],"status":[1],"position":[1],"offset":[1],"text":[1]}],[1,"bcm-button",{"kind":[1],"size":[1],"status":[1],"variant":[1],"position":[513],"icon":[1],"iconPosition":[1,"icon-position"],"iconOnly":[4,"icon-only"],"fullWidth":[516,"full-width"],"type":[1],"loading":[4],"disabled":[4],"text":[1],"active":[4],"form":[1],"value":[1],"name":[1],"label":[1],"expanded":[1],"controls":[1]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -76,17 +76,17 @@ export class BasicBadge {
76
76
  get badgeStyle() {
77
77
  if (!this.color)
78
78
  return {};
79
- const variantType = this.soft ? 'soft' : 'vivid';
79
+ const variantType = this.soft ? 'palette' : 'vivid';
80
80
  return {
81
81
  '--bcm-badge-bg': `var(--bcm-ui-color-background-${variantType}-${this.color}-default)`,
82
82
  '--bcm-badge-text': this.soft ? `var(--bcm-ui-color-text-palette-${this.color})` : 'var(--bcm-ui-color-text-base)',
83
83
  };
84
84
  }
85
85
  render() {
86
- return (h("span", { key: '17d82a67aaf2793bbd922c901bbfb05b91abea35', part: "base", role: "status", "aria-live": "polite", style: this.badgeStyle, class: this.classes({
86
+ return (h("span", { key: '808cd1e3672a57596174767ce793244024a3f6c3', part: "base", role: "status", "aria-live": "polite", style: this.badgeStyle, class: this.classes({
87
87
  size: this.size,
88
88
  variant: this.variant,
89
- }) }, this.variant === 'text' && (h("span", { key: '5b4fffd0979dec737d0209f8268467c19a5dd795', class: "badge-content" }, h("slot", { key: 'a554c64e657079ba933ead458c76a894f236b533' })))));
89
+ }) }, this.variant === 'text' && (h("span", { key: 'c3b5d31649cf6177173401cafcb8c520d4cf9745', class: "badge-content" }, h("slot", { key: 'a6a902a3a2a9c2effa1fc7e0ef4267ab17b6b2ef' })))));
90
90
  }
91
91
  static get is() { return "bcm-basic-badge"; }
92
92
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"basic-badge.component.js","sourceRoot":"","sources":["../../../src/components/basic-badge/basic-badge.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAGvC;;;;;;;;;;;;GAYG;AAOH,MAAM,OAAO,UAAU;IALvB;QAMI;;;;WAIG;QAEH,SAAI,GAAiC,QAAQ,CAAC;QAE9C;;;;;;WAMG;QAEH,YAAO,GAAmB,MAAM,CAAC;QAWjC;;;;;WAKG;QAEH,SAAI,GAAY,KAAK,CAAC;QAWd,YAAO,GAAG,EAAE,CAAC;YACjB,IAAI,EAAE,iLAAiL;YACvL,QAAQ,EAAE;gBACN,IAAI,EAAE;oBACF,KAAK,EAAE,kBAAkB;oBACzB,MAAM,EAAE,2BAA2B;oBACnC,KAAK,EAAE,uBAAuB;iBACjC;gBACD,OAAO,EAAE;oBACL,GAAG,EAAE,mCAAmC;oBACxC,IAAI,EAAE,EAAE;iBACX;aACJ;YACD,gBAAgB,EAAE;gBACd;oBACI,OAAO,EAAE,KAAK;oBACd,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,QAAQ;iBAClB;gBACD;oBACI,OAAO,EAAE,KAAK;oBACd,IAAI,EAAE,QAAQ;o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from 'tailwind-variants';\n\n\n/**\n * @component BcmBasicBadge\n * @description A basic badge component that can be used as a status indicator or to highlight content.\n * Supports dot and text variants with different sizes and color options.\n * \n * @example Basic usage\n * <bcm-basic-badge size=\"medium\" color=\"primary\">\n * New\n * </bcm-basic-badge>\n * \n * @example Dot variant\n * <bcm-basic-badge variant=\"dot\" color=\"success\" />\n */\n\n@Component({\n tag: 'bcm-basic-badge',\n styleUrl: 'basic-badge.css',\n shadow: true,\n})\nexport class BasicBadge implements ComponentInterface {\n /**\n * Determines the size of the badge.\n * @type {'small' | 'medium' | 'large'}\n * @default 'medium'\n */\n @Prop()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Sets the visual variant of the badge.\n * 'dot': Appears as a small dot indicator\n * 'text': Displays content as text\n * @type {'dot' | 'text'}\n * @default 'text'\n */\n @Prop()\n variant: 'dot' | 'text' = 'text';\n\n /**\n * Defines the color of the badge.\n * Uses system color variables (e.g., 'primary', 'success', 'warning', etc.)\n * @type {string}\n * @optional\n */\n @Prop()\n color?: string;\n\n /**\n * Enables soft color mode for the badge.\n * When true, uses lighter tones and pastel colors.\n * @type {boolean}\n * @default false\n */\n @Prop()\n soft: boolean = false;\n\n /**\n * Text to be displayed inside the badge.\n * Used when variant is set to 'text'.\n * @type {string}\n * @optional\n */\n @Prop()\n text?: string;\n\n private classes = tv({\n base: 'badge bcm-ui-element inline-flex items-center justify-center whitespace-nowrap select-none font-medium bg-[--bcm-badge-bg] text-[--bcm-badge-text] rounded-[--bcm-badge-radius]',\n variants: {\n size: {\n small: 'px-1 text-size-3',\n medium: 'py-0.5 px-1.5 text-size-4',\n large: 'py-1 px-2 text-size-5',\n },\n variant: {\n dot: 'gap-0 p-0 text-[0px] leading-none',\n text: '',\n },\n },\n compoundVariants: [\n {\n variant: 'dot',\n size: 'small',\n class: 'size-1',\n },\n {\n variant: 'dot',\n size: 'medium',\n class: 'size-1.5',\n },\n {\n variant: 'dot',\n size: 'large',\n class: 'size-2',\n },\n ],\n defaultVariants: {\n variant: 'text',\n size: 'medium',\n blink: false,\n },\n });\n\n private get badgeStyle() {\n if (!this.color) return {};\n const variantType = this.soft ? 'soft' : 'vivid';\n\n return {\n '--bcm-badge-bg': `var(--bcm-ui-color-background-${variantType}-${this.color}-default)`,\n '--bcm-badge-text': this.soft ? `var(--bcm-ui-color-text-palette-${this.color})` : 'var(--bcm-ui-color-text-base)',\n };\n }\n\n render() {\n return (\n <span\n part=\"base\"\n role=\"status\"\n aria-live=\"polite\"\n style={this.badgeStyle}\n class={this.classes({\n size: this.size,\n variant: this.variant,\n })}\n >\n {this.variant === 'text' && (\n <span class=\"badge-content\">\n <slot></slot>\n </span>\n )}\n </span>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"basic-badge.component.js","sourceRoot":"","sources":["../../../src/components/basic-badge/basic-badge.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAEvC;;;;;;;;;;;;GAYG;AAOH,MAAM,OAAO,UAAU;IALvB;QAME;;;;WAIG;QAEH,SAAI,GAAiC,QAAQ,CAAC;QAE9C;;;;;;WAMG;QAEH,YAAO,GAAmB,MAAM,CAAC;QAWjC;;;;;WAKG;QAEH,SAAI,GAAY,KAAK,CAAC;QAWd,YAAO,GAAG,EAAE,CAAC;YACnB,IAAI,EAAE,iLAAiL;YACvL,QAAQ,EAAE;gBACR,IAAI,EAAE;oBACJ,KAAK,EAAE,kBAAkB;oBACzB,MAAM,EAAE,2BAA2B;oBACnC,KAAK,EAAE,uBAAuB;iBAC/B;gBACD,OAAO,EAAE;oBACP,GAAG,EAAE,mCAAmC;oBACxC,IAAI,EAAE,EAAE;iBACT;aACF;YACD,gBAAgB,EAAE;gBAChB;oBACE,OAAO,EAAE,KAAK;oBACd,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,QAAQ;iBA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;;;;CACF","sourcesContent":["import { Component, ComponentInterface, Prop, h } from '@stencil/core';\nimport { tv } from 'tailwind-variants';\n\n/**\n * @component BcmBasicBadge\n * @description A basic badge component that can be used as a status indicator or to highlight content.\n * Supports dot and text variants with different sizes and color options.\n *\n * @example Basic usage\n * <bcm-basic-badge size=\"medium\" color=\"primary\">\n * New\n * </bcm-basic-badge>\n *\n * @example Dot variant\n * <bcm-basic-badge variant=\"dot\" color=\"success\" />\n */\n\n@Component({\n tag: 'bcm-basic-badge',\n styleUrl: 'basic-badge.css',\n shadow: true,\n})\nexport class BasicBadge implements ComponentInterface {\n /**\n * Determines the size of the badge.\n * @type {'small' | 'medium' | 'large'}\n * @default 'medium'\n */\n @Prop()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Sets the visual variant of the badge.\n * 'dot': Appears as a small dot indicator\n * 'text': Displays content as text\n * @type {'dot' | 'text'}\n * @default 'text'\n */\n @Prop()\n variant: 'dot' | 'text' = 'text';\n\n /**\n * Defines the color of the badge.\n * Uses system color variables (e.g., 'primary', 'success', 'warning', etc.)\n * @type {string}\n * @optional\n */\n @Prop()\n color?: string;\n\n /**\n * Enables soft color mode for the badge.\n * When true, uses lighter tones and pastel colors.\n * @type {boolean}\n * @default false\n */\n @Prop()\n soft: boolean = false;\n\n /**\n * Text to be displayed inside the badge.\n * Used when variant is set to 'text'.\n * @type {string}\n * @optional\n */\n @Prop()\n text?: string;\n\n private classes = tv({\n base: 'badge bcm-ui-element inline-flex items-center justify-center whitespace-nowrap select-none font-medium bg-[--bcm-badge-bg] text-[--bcm-badge-text] rounded-[--bcm-badge-radius]',\n variants: {\n size: {\n small: 'px-1 text-size-3',\n medium: 'py-0.5 px-1.5 text-size-4',\n large: 'py-1 px-2 text-size-5',\n },\n variant: {\n dot: 'gap-0 p-0 text-[0px] leading-none',\n text: '',\n },\n },\n compoundVariants: [\n {\n variant: 'dot',\n size: 'small',\n class: 'size-1',\n },\n {\n variant: 'dot',\n size: 'medium',\n class: 'size-1.5',\n },\n {\n variant: 'dot',\n size: 'large',\n class: 'size-2',\n },\n ],\n defaultVariants: {\n variant: 'text',\n size: 'medium',\n blink: false,\n },\n });\n\n private get badgeStyle() {\n if (!this.color) return {};\n const variantType = this.soft ? 'palette' : 'vivid';\n\n return {\n '--bcm-badge-bg': `var(--bcm-ui-color-background-${variantType}-${this.color}-default)`,\n '--bcm-badge-text': this.soft ? `var(--bcm-ui-color-text-palette-${this.color})` : 'var(--bcm-ui-color-text-base)',\n };\n }\n\n render() {\n return (\n <span\n part=\"base\"\n role=\"status\"\n aria-live=\"polite\"\n style={this.badgeStyle}\n class={this.classes({\n size: this.size,\n variant: this.variant,\n })}\n >\n {this.variant === 'text' && (\n <span class=\"badge-content\">\n <slot></slot>\n </span>\n )}\n </span>\n );\n }\n}\n"]}
@@ -55,9 +55,9 @@ export class BcmButton {
55
55
  true: 'disabled cursor-not-allowed bg-[--bcm-ui-color-background-disabled-default] text-color-disabled border-color-disabled',
56
56
  false: [
57
57
  'cursor-pointer',
58
- 'bg-[--bcm-button-bg] text-[--bcm-button-text] border-[--bcm-button-border]',
59
- 'hover:bg-[--bcm-button-bg-hover]',
60
- 'active:bg-[--bcm-button-bg-active]',
58
+ 'bg-[--bcm-final-bg-color] text-[--bcm-final-text-color] border-[--bcm-final-border-color]',
59
+ 'hover:bg-[--bcm-final-hover-bg-color]',
60
+ 'active:bg-[--bcm-final-active-bg-color]',
61
61
  'focus-visible:ring',
62
62
  ],
63
63
  },
@@ -101,6 +101,7 @@ export class BcmButton {
101
101
  }
102
102
  get buttonStyles() {
103
103
  const status = this.buttonStatus === 'default' ? 'primary' : this.buttonStatus;
104
+ // These are the internal default styles based on component props (kind, status)
104
105
  const kindStyleMap = {
105
106
  primary: {
106
107
  '--bcm-button-bg': `var(--bcm-ui-color-background-${status}-default)`,
@@ -131,18 +132,30 @@ export class BcmButton {
131
132
  '--bcm-button-text': `var(--bcm-ui-color-text-${status})`,
132
133
  },
133
134
  };
134
- return kindStyleMap[this.kind];
135
+ const internalDefaultStyles = kindStyleMap[this.kind];
136
+ // These are the "final" CSS custom properties used by the component's styling.
137
+ // They use the "--bcm-button-custom-..." token if provided by the user,
138
+ // otherwise, they fall back to the internal "--bcm-button-..." style defined above.
139
+ const finalEffectiveStyles = {
140
+ '--bcm-final-text-color': `var(--bcm-button-custom-text-color, ${internalDefaultStyles['--bcm-button-text']})`,
141
+ '--bcm-final-border-color': `var(--bcm-button-custom-border-color, ${internalDefaultStyles['--bcm-button-border']})`,
142
+ '--bcm-final-bg-color': `var(--bcm-button-custom-bg-color, ${internalDefaultStyles['--bcm-button-bg']})`,
143
+ '--bcm-final-hover-bg-color': `var(--bcm-button-custom-hover-bg-color, ${internalDefaultStyles['--bcm-button-bg-hover']})`,
144
+ '--bcm-final-active-bg-color': `var(--bcm-button-custom-active-bg-color, ${internalDefaultStyles['--bcm-button-bg-active']})`,
145
+ };
146
+ // return kindStyleMap[this.kind];
147
+ return Object.assign(Object.assign({}, internalDefaultStyles), finalEffectiveStyles);
135
148
  }
136
149
  render() {
137
150
  const { icon, position } = this.buttonIcon;
138
- return (h(Host, { key: '3983c85df11a13f852af55310ba15a4099fe1f54' }, h("button", { key: 'a01a152f16e5a97197f17517d6cc225aacf1f7e0', type: this.type, disabled: this.disabled || this.loading, "aria-label": this.label, "aria-expanded": this.expanded, "aria-controls": this.controls, "aria-disabled": this.disabled, onClick: this.handleClick, onFocus: this.handleFocus, onBlur: this.handleBlur, style: this.buttonStyles, class: this.buttonClass({
151
+ return (h(Host, { key: '434cab012a2f174ca6b21f7484104ed9952daf38' }, h("button", { key: 'bf000fa02d836d0142e3f335b806c20afe10726b', type: this.type, disabled: this.disabled || this.loading, "aria-label": this.label, "aria-expanded": this.expanded, "aria-controls": this.controls, "aria-disabled": this.disabled, onClick: this.handleClick, onFocus: this.handleFocus, onBlur: this.handleBlur, style: this.buttonStyles, class: this.buttonClass({
139
152
  size: this.size,
140
153
  kind: this.kind,
141
154
  fullWidth: this.fullWidth,
142
155
  disabled: this.disabled,
143
156
  loading: this.loading,
144
157
  position: this.position,
145
- }) }, this.loading && h("slot", { key: '161b90eebdc8157163aaeda1ce542fe87c60db78', name: "loading" }), h("span", { key: '6c63908979e465eea1cc358bf4c87f0710891d41' }, h("slot", { key: 'c2931b0dfff2ff00730addc734cb0f24b24ea4ba', name: "prefix" }, position === 'prefix' && icon && h("i", { key: 'cab571f159ae0b6d87862acc4b187fd42189d574', class: ' leading-none ' + icon }))), h("slot", { key: '387a3f7452b7cfc5ad6484743ad3a02aa0d8427e' }, this.buttonText), h("span", { key: '19db4a9fe4b85df6fd85ebad6eac2d7c82313820' }, h("slot", { key: '4f1169aed2c8e446b267139ece8b5db01d9f1da3', name: "suffix" }, position === 'suffix' && icon && h("i", { key: '67355ba68078bc921d99ebb7d3b8d5bc7c0f2776', class: ' leading-none ' + icon }))))));
158
+ }) }, this.loading && h("slot", { key: 'c95198f7776c10c7b380c8f2c3c73a05517a72c8', name: "loading" }), h("span", { key: '3433ff03ba933966cab816a8f9882c51b647549d' }, h("slot", { key: 'd1027e43b007789d1da57ace2b2f2da585434604', name: "prefix" }, position === 'prefix' && icon && h("i", { key: '0be135da5ee717f885f56298e9886112ad44767f', class: ' leading-none ' + icon }))), h("slot", { key: '13dc3c513cc364615e15c7074729219a251c8756' }, this.buttonText), h("span", { key: '5dab9df786eec4ed2554df88ffbfea8c6a324c1f' }, h("slot", { key: 'ca80a898105d9d310fea2b34f9b6c9fe282a7eb0', name: "suffix" }, position === 'suffix' && icon && h("i", { key: '57d3a187cf7af1d6ebc289c472579aa973fc6c86', class: ' leading-none ' + icon }))))));
146
159
  }
147
160
  static get is() { return "bcm-button"; }
148
161
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"button.component.js","sourceRoot":"","sources":["../../../src/components/button/button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,IAAI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,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Event, EventEmitter, Host } from '@stencil/core';\nimport { ButtonKind, ButtonSize, ButtonType, ButtonStatus, ButtonVariant, IconPosition, ButtonPosition, variantOptions } from './types';\nimport { tv } from 'tailwind-variants';\n\n@Component({\n tag: 'bcm-button',\n styleUrl: 'button.css',\n shadow: true,\n})\nexport class BcmButton {\n /** Defines the main visual style of the button */\n @Prop()\n kind: ButtonKind = 'primary';\n\n /** Controls the button size */\n @Prop()\n size: ButtonSize = 'medium';\n\n /** Defines the button's status/state color */\n @Prop()\n status: ButtonStatus = 'default';\n\n /** Predefined button variants */\n @Prop()\n variant?: ButtonVariant;\n\n /** Button position in button group (first, middle, last) */\n @Prop({ reflect: true })\n position?: ButtonPosition;\n\n /** Icon class name */\n @Prop()\n icon?: string;\n\n /** Icon placement (prefix/suffix) */\n @Prop()\n iconPosition: IconPosition = 'prefix';\n\n /** Icon-only button mode */\n @Prop()\n iconOnly = false;\n\n /** Full width button */\n @Prop({ attribute: 'full-width', reflect: true })\n fullWidth = false;\n\n /** HTML button type */\n @Prop()\n type: ButtonType = 'button';\n\n /** Loading state */\n @Prop()\n loading = false;\n\n /** Disabled state */\n @Prop()\n disabled = false;\n\n /** Button text content */\n @Prop()\n text?: string;\n\n /** Active state */\n @Prop()\n active = false;\n\n /** Form association */\n @Prop()\n form: string;\n\n @Prop()\n value: string;\n\n @Prop()\n name: string;\n\n /** Screen reader label */\n @Prop()\n label: string;\n\n /** Expanded state for expandable content */\n @Prop()\n expanded?: string;\n\n /** ID of controlled element */\n @Prop()\n controls: string;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmClick: EventEmitter<MouseEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmFocus: EventEmitter<FocusEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmBlur: EventEmitter<FocusEvent>;\n\n private handleClick = (event: MouseEvent) => {\n if (!this.disabled && !this.loading) {\n this.bcmClick.emit(event);\n }\n };\n\n private handleFocus = (event: FocusEvent) => {\n this.bcmFocus.emit(event);\n };\n\n private handleBlur = (event: FocusEvent) => {\n this.bcmBlur.emit(event);\n };\n\n private get buttonText(): string {\n return this.text || (this.variant ? variantOptions[this.variant].text : '');\n }\n\n private get buttonIcon(): { icon?: string; position: IconPosition } {\n if (this.variant && variantOptions[this.variant].icon) {\n return {\n icon: variantOptions[this.variant].icon,\n position: variantOptions[this.variant].iconPosition || 'prefix',\n };\n }\n\n return {\n icon: this.icon,\n position: this.iconPosition,\n };\n }\n\n private get buttonStatus(): ButtonStatus {\n return this.variant ? variantOptions[this.variant].status : this.status;\n }\n\n private get buttonStyles() {\n const status = this.buttonStatus === 'default' ? 'primary' : this.buttonStatus;\n\n const kindStyleMap = {\n primary: {\n '--bcm-button-bg': `var(--bcm-ui-color-background-${status}-default)`,\n '--bcm-button-bg-hover': `var(--bcm-ui-color-background-${status}-hover)`,\n '--bcm-button-bg-active': `var(--bcm-ui-color-background-${status}-active)`,\n '--bcm-button-border': 'transparent',\n '--bcm-button-text': 'var(--bcm-ui-color-text-base)',\n },\n outline: {\n '--bcm-button-bg': 'var(--bcm-ui-color-background-default-default)',\n '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',\n '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',\n '--bcm-button-border': `var(--bcm-ui-color-border-${this.buttonStatus})`,\n '--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,\n },\n ghost: {\n '--bcm-button-bg': 'transparent',\n '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',\n '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',\n '--bcm-button-border': 'transparent',\n '--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,\n },\n text: {\n '--bcm-button-bg': 'transparent',\n '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',\n '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',\n '--bcm-button-border': 'transparent',\n '--bcm-button-text': `var(--bcm-ui-color-text-${status})`,\n },\n };\n\n return kindStyleMap[this.kind];\n }\n\n private buttonClass = tv(\n {\n base: 'bcm-button appearance-none inline-flex items-center justify-center border border-solid rounded outline-0',\n variants: {\n size: {\n small: 'text-size-4 py-px px-2 min-h-6',\n medium: 'text-size-5 py-0.5 px-3 min-h-8',\n large: 'text-size-6 py-1 px-3 min-h-10',\n },\n kind: {\n primary: 'kind-primary',\n ghost: 'kind-ghost',\n text: 'kind-text',\n outline: 'kind-outline',\n },\n fullWidth: {\n true: 'full-width w-full',\n },\n disabled: {\n true: 'disabled cursor-not-allowed bg-[--bcm-ui-color-background-disabled-default] text-color-disabled border-color-disabled',\n false: [\n 'cursor-pointer',\n 'bg-[--bcm-button-bg] text-[--bcm-button-text] border-[--bcm-button-border]',\n 'hover:bg-[--bcm-button-bg-hover]',\n 'active:bg-[--bcm-button-bg-active]',\n 'focus-visible:ring',\n ],\n },\n loading: {\n true: '',\n },\n position: {\n first: 'position-first',\n middle: 'position-middle',\n last: 'position-last',\n },\n },\n defaultVariants: {\n size: 'medium',\n kind: 'primary',\n fullWidth: false,\n disabled: false,\n loading: false,\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n const { icon, position } = this.buttonIcon;\n\n return (\n <Host>\n <button\n type={this.type}\n disabled={this.disabled || this.loading}\n aria-label={this.label}\n aria-expanded={this.expanded}\n aria-controls={this.controls}\n aria-disabled={this.disabled}\n onClick={this.handleClick}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n style={this.buttonStyles}\n class={this.buttonClass({\n size: this.size,\n kind: this.kind,\n fullWidth: this.fullWidth,\n disabled: this.disabled,\n loading: this.loading,\n position: this.position,\n })}\n >\n {this.loading && <slot name=\"loading\"></slot>}\n <span>\n <slot name=\"prefix\">{position === 'prefix' && icon && <i class={' leading-none ' + icon}></i>}</slot>\n </span>\n <slot>{this.buttonText}</slot>\n <span>\n <slot name=\"suffix\">{position === 'suffix' && icon && <i class={' leading-none ' + icon}></i>}</slot>\n </span>\n </button>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"button.component.js","sourceRoot":"","sources":["../../../src/components/button/button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAiG,cAAc,EAAE,MAAM,SAAS,CAAC;AACxI,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAOvC,MAAM,OAAO,SAAS;IALtB;QAME,kDAAkD;QAElD,SAAI,GAAe,SAAS,CAAC;QAE7B,+BAA+B;QAE/B,SAAI,GAAe,QAAQ,CAAC;QAE5B,8CAA8C;QAE9C,WAAM,GAAiB,SAAS,CAAC;QAcjC,qCAAqC;QAErC,iBAAY,GAAiB,QAAQ,CAAC;QAEtC,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E,6DAAM,IAAI,EAAC,QAAQ,IAAE,QAAQ,KAAK,QAAQ,IAAI,IAAI,IAAI,0DAAG,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAAM,CAAQ,CAChG,CACA,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Event, EventEmitter, Host } from '@stencil/core';\nimport { ButtonKind, ButtonSize, ButtonType, ButtonStatus, ButtonVariant, IconPosition, ButtonPosition, variantOptions } from './types';\nimport { tv } from 'tailwind-variants';\n\n@Component({\n tag: 'bcm-button',\n styleUrl: 'button.css',\n shadow: true,\n})\nexport class BcmButton {\n /** Defines the main visual style of the button */\n @Prop()\n kind: ButtonKind = 'primary';\n\n /** Controls the button size */\n @Prop()\n size: ButtonSize = 'medium';\n\n /** Defines the button's status/state color */\n @Prop()\n status: ButtonStatus = 'default';\n\n /** Predefined button variants */\n @Prop()\n variant?: ButtonVariant;\n\n /** Button position in button group (first, middle, last) */\n @Prop({ reflect: true })\n position?: ButtonPosition;\n\n /** Icon class name */\n @Prop()\n icon?: string;\n\n /** Icon placement (prefix/suffix) */\n @Prop()\n iconPosition: IconPosition = 'prefix';\n\n /** Icon-only button mode */\n @Prop()\n iconOnly = false;\n\n /** Full width button */\n @Prop({ attribute: 'full-width', reflect: true })\n fullWidth = false;\n\n /** HTML button type */\n @Prop()\n type: ButtonType = 'button';\n\n /** Loading state */\n @Prop()\n loading = false;\n\n /** Disabled state */\n @Prop()\n disabled = false;\n\n /** Button text content */\n @Prop()\n text?: string;\n\n /** Active state */\n @Prop()\n active = false;\n\n /** Form association */\n @Prop()\n form: string;\n\n @Prop()\n value: string;\n\n @Prop()\n name: string;\n\n /** Screen reader label */\n @Prop()\n label: string;\n\n /** Expanded state for expandable content */\n @Prop()\n expanded?: string;\n\n /** ID of controlled element */\n @Prop()\n controls: string;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmClick: EventEmitter<MouseEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmFocus: EventEmitter<FocusEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmBlur: EventEmitter<FocusEvent>;\n\n private handleClick = (event: MouseEvent) => {\n if (!this.disabled && !this.loading) {\n this.bcmClick.emit(event);\n }\n };\n\n private handleFocus = (event: FocusEvent) => {\n this.bcmFocus.emit(event);\n };\n\n private handleBlur = (event: FocusEvent) => {\n this.bcmBlur.emit(event);\n };\n\n private get buttonText(): string {\n return this.text || (this.variant ? variantOptions[this.variant].text : '');\n }\n\n private get buttonIcon(): { icon?: string; position: IconPosition } {\n if (this.variant && variantOptions[this.variant].icon) {\n return {\n icon: variantOptions[this.variant].icon,\n position: variantOptions[this.variant].iconPosition || 'prefix',\n };\n }\n\n return {\n icon: this.icon,\n position: this.iconPosition,\n };\n }\n\n private get buttonStatus(): ButtonStatus {\n return this.variant ? variantOptions[this.variant].status : this.status;\n }\n\n private get buttonStyles() {\n const status = this.buttonStatus === 'default' ? 'primary' : this.buttonStatus;\n\n // These are the internal default styles based on component props (kind, status)\n const kindStyleMap = {\n primary: {\n '--bcm-button-bg': `var(--bcm-ui-color-background-${status}-default)`,\n '--bcm-button-bg-hover': `var(--bcm-ui-color-background-${status}-hover)`,\n '--bcm-button-bg-active': `var(--bcm-ui-color-background-${status}-active)`,\n '--bcm-button-border': 'transparent',\n '--bcm-button-text': 'var(--bcm-ui-color-text-base)',\n },\n outline: {\n '--bcm-button-bg': 'var(--bcm-ui-color-background-default-default)',\n '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',\n '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',\n '--bcm-button-border': `var(--bcm-ui-color-border-${this.buttonStatus})`,\n '--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,\n },\n ghost: {\n '--bcm-button-bg': 'transparent',\n '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',\n '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',\n '--bcm-button-border': 'transparent',\n '--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,\n },\n text: {\n '--bcm-button-bg': 'transparent',\n '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',\n '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',\n '--bcm-button-border': 'transparent',\n '--bcm-button-text': `var(--bcm-ui-color-text-${status})`,\n },\n };\n const internalDefaultStyles = kindStyleMap[this.kind];\n\n // These are the \"final\" CSS custom properties used by the component's styling.\n // They use the \"--bcm-button-custom-...\" token if provided by the user,\n // otherwise, they fall back to the internal \"--bcm-button-...\" style defined above.\n const finalEffectiveStyles = {\n '--bcm-final-text-color': `var(--bcm-button-custom-text-color, ${internalDefaultStyles['--bcm-button-text']})`,\n '--bcm-final-border-color': `var(--bcm-button-custom-border-color, ${internalDefaultStyles['--bcm-button-border']})`,\n '--bcm-final-bg-color': `var(--bcm-button-custom-bg-color, ${internalDefaultStyles['--bcm-button-bg']})`,\n '--bcm-final-hover-bg-color': `var(--bcm-button-custom-hover-bg-color, ${internalDefaultStyles['--bcm-button-bg-hover']})`,\n '--bcm-final-active-bg-color': `var(--bcm-button-custom-active-bg-color, ${internalDefaultStyles['--bcm-button-bg-active']})`,\n };\n\n // return kindStyleMap[this.kind];\n\n return {\n ...internalDefaultStyles, // Provides the fallback values like --bcm-button-text\n ...finalEffectiveStyles, // Defines the --bcm-final-xxx tokens that handle the override logic\n };\n }\n\n private buttonClass = tv(\n {\n base: 'bcm-button appearance-none inline-flex items-center justify-center border border-solid rounded outline-0',\n variants: {\n size: {\n small: 'text-size-4 py-px px-2 min-h-6',\n medium: 'text-size-5 py-0.5 px-3 min-h-8',\n large: 'text-size-6 py-1 px-3 min-h-10',\n },\n kind: {\n primary: 'kind-primary',\n ghost: 'kind-ghost',\n text: 'kind-text',\n outline: 'kind-outline',\n },\n fullWidth: {\n true: 'full-width w-full',\n },\n disabled: {\n true: 'disabled cursor-not-allowed bg-[--bcm-ui-color-background-disabled-default] text-color-disabled border-color-disabled',\n false: [\n 'cursor-pointer',\n 'bg-[--bcm-final-bg-color] text-[--bcm-final-text-color] border-[--bcm-final-border-color]',\n 'hover:bg-[--bcm-final-hover-bg-color]',\n 'active:bg-[--bcm-final-active-bg-color]',\n 'focus-visible:ring',\n ],\n },\n loading: {\n true: '',\n },\n position: {\n first: 'position-first',\n middle: 'position-middle',\n last: 'position-last',\n },\n },\n defaultVariants: {\n size: 'medium',\n kind: 'primary',\n fullWidth: false,\n disabled: false,\n loading: false,\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n const { icon, position } = this.buttonIcon;\n\n return (\n <Host>\n <button\n type={this.type}\n disabled={this.disabled || this.loading}\n aria-label={this.label}\n aria-expanded={this.expanded}\n aria-controls={this.controls}\n aria-disabled={this.disabled}\n onClick={this.handleClick}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n style={this.buttonStyles}\n class={this.buttonClass({\n size: this.size,\n kind: this.kind,\n fullWidth: this.fullWidth,\n disabled: this.disabled,\n loading: this.loading,\n position: this.position,\n })}\n >\n {this.loading && <slot name=\"loading\"></slot>}\n <span>\n <slot name=\"prefix\">{position === 'prefix' && icon && <i class={' leading-none ' + icon}></i>}</slot>\n </span>\n <slot>{this.buttonText}</slot>\n <span>\n <slot name=\"suffix\">{position === 'suffix' && icon && <i class={' leading-none ' + icon}></i>}</slot>\n </span>\n </button>\n </Host>\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- .relative{position:relative}:host{display:inline-block;position:relative}:host([full-width]){width:100%}:host([position=first]) .bcm-button{border-bottom-right-radius:0;border-top-right-radius:0}:host([position=middle]) .bcm-button{border-radius:0}:host([position=last]) .bcm-button{border-bottom-left-radius:0;border-top-left-radius:0}:host([position=first].orientation-vertical) .bcm-button{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--bcm-ui-border-radius,4px);border-top-right-radius:var(--bcm-ui-border-radius,4px)}:host([position=middle].orientation-vertical) .bcm-button{border-radius:0}:host([position=last].orientation-vertical) .bcm-button{border-bottom-left-radius:var(--bcm-ui-border-radius,4px);border-bottom-right-radius:var(--bcm-ui-border-radius,4px);border-top-left-radius:0;border-top-right-radius:0}.static{position:static}.inline-flex{display:inline-flex}.min-h-10{min-height:2.5rem}.min-h-6{min-height:1.5rem}.min-h-8{min-height:2rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.appearance-none{appearance:none}.items-center{align-items:center}.justify-center{justify-content:center}.rounded{border-radius:var(--bcm-ui-border-radius-default,6px)}.border{border-width:1px}.border-solid{border-style:solid}.border-\[--bcm-button-border\]{border-color:var(--bcm-button-border)}.border-color-disabled{border-color:var(--bcm-ui-color-border-disabled)}.bg-\[--bcm-button-bg\]{background-color:var(--bcm-button-bg)}.bg-\[--bcm-ui-color-background-disabled-default\]{background-color:var(--bcm-ui-color-background-disabled-default)}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-px{padding-bottom:1px;padding-top:1px}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.leading-none{line-height:1}.text-\[--bcm-button-text\]{color:var(--bcm-button-text)}.text-color-disabled{color:var(--bcm-ui-color-text-disabled)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.outline-0{outline-width:0}.hover\:bg-\[--bcm-button-bg-hover\]:hover{background-color:var(--bcm-button-bg-hover)}.focus-visible\:ring:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.active\:bg-\[--bcm-button-bg-active\]:active{background-color:var(--bcm-button-bg-active)}.flex{display:flex}.max-h-\[--dropdown-box-max-height\]{max-height:var(--dropdown-box-max-height)}.min-w-\[--dropdown-box-min-weight\]{min-width:var(--dropdown-box-min-weight)}.max-w-\[--dropdown-box-max-weight\]{max-width:var(--dropdown-box-max-weight)}.flex-col{flex-direction:column}.rounded-lg{border-radius:var(--bcm-ui-border-radius-lg,8px)}.bg-\[--dropdown-box-background-color\]{background-color:var(--dropdown-box-background-color)}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.shadow,.shadow-3{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-3{--tw-shadow:var(--bcm-ui-box-shadow-3);--tw-shadow-colored:var(--bcm-ui-box-shadow-3)}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.absolute{position:absolute}.z-\[9999\]{z-index:9999}.mx-auto{margin-left:auto;margin-right:auto}.hidden{display:none}.size-6{height:1.5rem;width:1.5rem}.h-2{height:.5rem}.w-4{width:1rem}.max-w-64{max-width:16rem}.max-w-80{max-width:20rem}.max-w-96{max-width:24rem}.flex-1{flex:1 1 0%}.flex-row{flex-direction:row}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.text-pretty{text-wrap:pretty}.rounded-\[--popover-radius\]{border-radius:var(--popover-radius)}.rounded-full{border-radius:var(--bcm-ui-border-radius-full,9999px)}.bg-\[--popover-bg\]{background-color:var(--popover-bg)}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.font-sans{font-family:Inter,sans-serif}.text-size-7{font-size:var(--bcm-ui-font-size-7,20px);line-height:var(--bcm-ui-line-height-7,28px)}.text-size-inherit{font-size:inherit;line-height:inherit}.font-semibold{font-weight:600}.\!text-color-header{color:var(--bcm-ui-color-text-header)!important}.text-\[--text-color\]{color:var(--text-color)}.shadow,.shadow-2{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2{--tw-shadow:var(--bcm-ui-box-shadow-2);--tw-shadow-colored:var(--bcm-ui-box-shadow-2)}.hover\:bg-gray-100:hover{background-color:oklch(.967 .003 264.542)}
1
+ .relative{position:relative}:host{display:inline-block;position:relative}:host([full-width]){width:100%}:host([position=first]) .bcm-button{border-bottom-right-radius:0;border-top-right-radius:0}:host([position=middle]) .bcm-button{border-radius:0}:host([position=last]) .bcm-button{border-bottom-left-radius:0;border-top-left-radius:0}:host([position=first].orientation-vertical) .bcm-button{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--bcm-ui-border-radius,4px);border-top-right-radius:var(--bcm-ui-border-radius,4px)}:host([position=middle].orientation-vertical) .bcm-button{border-radius:0}:host([position=last].orientation-vertical) .bcm-button{border-bottom-left-radius:var(--bcm-ui-border-radius,4px);border-bottom-right-radius:var(--bcm-ui-border-radius,4px);border-top-left-radius:0;border-top-right-radius:0}.static{position:static}.inline-flex{display:inline-flex}.min-h-10{min-height:2.5rem}.min-h-6{min-height:1.5rem}.min-h-8{min-height:2rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.appearance-none{appearance:none}.items-center{align-items:center}.justify-center{justify-content:center}.rounded{border-radius:var(--bcm-ui-border-radius-default,6px)}.border{border-width:1px}.border-solid{border-style:solid}.border-\[--bcm-final-border-color\]{border-color:var(--bcm-final-border-color)}.border-color-disabled{border-color:var(--bcm-ui-color-border-disabled)}.bg-\[--bcm-final-bg-color\]{background-color:var(--bcm-final-bg-color)}.bg-\[--bcm-ui-color-background-disabled-default\]{background-color:var(--bcm-ui-color-background-disabled-default)}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-px{padding-bottom:1px;padding-top:1px}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.leading-none{line-height:1}.text-\[--bcm-final-text-color\]{color:var(--bcm-final-text-color)}.text-color-disabled{color:var(--bcm-ui-color-text-disabled)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.outline-0{outline-width:0}.hover\:bg-\[--bcm-final-hover-bg-color\]:hover{background-color:var(--bcm-final-hover-bg-color)}.focus-visible\:ring:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.active\:bg-\[--bcm-final-active-bg-color\]:active{background-color:var(--bcm-final-active-bg-color)}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.absolute{position:absolute}.z-\[9999\]{z-index:9999}.mx-auto{margin-left:auto;margin-right:auto}.flex{display:flex}.hidden{display:none}.size-6{height:1.5rem;width:1.5rem}.h-2{height:.5rem}.w-4{width:1rem}.max-w-64{max-width:16rem}.max-w-80{max-width:20rem}.max-w-96{max-width:24rem}.flex-1{flex:1 1 0%}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.text-pretty{text-wrap:pretty}.rounded-\[--popover-radius\]{border-radius:var(--popover-radius)}.rounded-full{border-radius:var(--bcm-ui-border-radius-full,9999px)}.bg-\[--popover-bg\]{background-color:var(--popover-bg)}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.font-sans{font-family:Inter,sans-serif}.text-size-7{font-size:var(--bcm-ui-font-size-7,20px);line-height:var(--bcm-ui-line-height-7,28px)}.text-size-inherit{font-size:inherit;line-height:inherit}.font-semibold{font-weight:600}.\!text-color-header{color:var(--bcm-ui-color-text-header)!important}.text-\[--text-color\]{color:var(--text-color)}.shadow,.shadow-2{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2{--tw-shadow:var(--bcm-ui-box-shadow-2);--tw-shadow-colored:var(--bcm-ui-box-shadow-2)}.hover\:bg-gray-100:hover{background-color:oklch(.967 .003 264.542)}.max-h-\[--dropdown-box-max-height\]{max-height:var(--dropdown-box-max-height)}.min-w-\[--dropdown-box-min-weight\]{min-width:var(--dropdown-box-min-weight)}.max-w-\[--dropdown-box-max-weight\]{max-width:var(--dropdown-box-max-weight)}.rounded-lg{border-radius:var(--bcm-ui-border-radius-lg,8px)}.bg-\[--dropdown-box-background-color\]{background-color:var(--dropdown-box-background-color)}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.shadow,.shadow-3{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-3{--tw-shadow:var(--bcm-ui-box-shadow-3);--tw-shadow-colored:var(--bcm-ui-box-shadow-3)}
@@ -63,7 +63,7 @@ export class Checkbox {
63
63
  slots: {
64
64
  container: 'flex items-center bcm-ui-element bcm-checkbox',
65
65
  checkbox: [
66
- 'flex items-center justify-center rounded',
66
+ 'flex items-center justify-center rounded-sm',
67
67
  'border border-solid border-[--border-color]',
68
68
  'bg-[--unchecked-color]',
69
69
  'transition-colors duration-200 ease-out',
@@ -204,7 +204,7 @@ export class Checkbox {
204
204
  render() {
205
205
  const { container, checkbox, iconContainer, label, hiddenInput } = this.classes({ size: this.size, disabled: this.disabled, labelPosition: this.labelPosition });
206
206
  const internalId = this._id + '-internal-checkbox' || this.name;
207
- return (h("div", { key: '929811f64a1ff48905b61f227554cccfae903108', class: container(), style: this.getStyles(), part: "checkbox-wrapper" }, h("div", { key: '69dc0ca98a78368e72641152e8fc324b08819fa3', class: "relative inline-flex" }, h("input", { key: '97784b43009500e631190ed82926c64c41ac00a4', type: "checkbox", role: "checkbox", id: internalId, name: this.name, checked: this.internalChecked, indeterminate: this.indeterminate, disabled: this.disabled, class: hiddenInput(), "aria-checked": this.internalChecked ? 'true' : this.indeterminate ? 'mixed' : 'false', "aria-invalid": this.error, "aria-label": this.label || 'Checkbox', onChange: this.handleChange, ref: el => (this.inputElement = el) }), h("div", { key: '8d3d03ab4f96d3393faec1bd5a8feff2160eae27', class: checkbox(), onClick: this.handleChange, part: "checkbox" }, this.internalChecked && (h("div", { key: '4e9043412e09f344da5c019f9c40a1f99e859220', class: iconContainer(), part: "icon" }, h("bcm-icon", { key: 'd041938bee4fb0adb5036846c22662d2bd95ba9b', name: "fa-regular fa-check" }))), this.indeterminate && !this.internalChecked && (h("div", { key: '25091614ed7d86cc27a5799e4358edf58f918192', class: iconContainer(), part: "icon" }, h("bcm-icon", { key: '0aa679bcf957cc272621132a54b76067ce0b90ea', name: "fa-regular fa-minus" }))))), h("label", { key: '44b7e84f1e61febee09baad2a0957172455726e0', htmlFor: internalId, class: label(), part: "label" }, this.label)));
207
+ return (h("div", { key: 'c23908c1dd19e330626cfbfab8b9d82fb87e0f48', class: container(), style: this.getStyles(), part: "checkbox-wrapper" }, h("div", { key: '0ce3bd62e1977df5ed3d5c5a6367700b0a1ab269', class: "relative inline-flex" }, h("input", { key: '9456de7b4ccc12692befde6fd98dd13442885d32', type: "checkbox", role: "checkbox", id: internalId, name: this.name, checked: this.internalChecked, indeterminate: this.indeterminate, disabled: this.disabled, class: hiddenInput(), "aria-checked": this.internalChecked ? 'true' : this.indeterminate ? 'mixed' : 'false', "aria-invalid": this.error, "aria-label": this.label || 'Checkbox', onChange: this.handleChange, ref: el => (this.inputElement = el) }), h("div", { key: '5279bc808893c1edd735f65156fe331d36d2b188', class: checkbox(), onClick: this.handleChange, part: "checkbox" }, this.internalChecked && (h("div", { key: 'bf25e91a887eaafb0aea199ea293532d350ba402', class: iconContainer(), part: "icon" }, h("bcm-icon", { key: '6255f59203e8ed3aa7b50a4c359d00857750789c', name: "fa-regular fa-check" }))), this.indeterminate && !this.internalChecked && (h("div", { key: '1534039b1d628485ecc09fd196684904b7d8168f', class: iconContainer(), part: "icon" }, h("bcm-icon", { key: '4389b4aaee7bbb6bf7af5320f695abd898d31d86', name: "fa-regular fa-minus" }))))), h("label", { key: 'd023d4c211b20438957392ae14d762181d3cc508', htmlFor: internalId, class: label(), part: "label" }, this.label)));
208
208
  }
209
209
  static get is() { return "bcm-checkbox"; }
210
210
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.component.js","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAoC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACnH,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD;;;GAGG;AAMH,MAAM,OAAO,QAAQ;IALrB;QASI;;WAEG;QAEH,QAAG,GAAY,UAAU,CAAC,cAAc,CAAC,CAAC;QAc1C;;;WAGG;QAEH,kBAAa,GAAY,KAAK,CAAC;QAE/B;;WAEG;Q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AAU;oBAC9D,IAAI,CAAC,eAAe,IAAI,CACrB,4DAAK,KAAK,EAAE,aAAa,EAAE,EAAE,IAAI,EAAC,MAAM;wBACpC,iEAAU,IAAI,EAAC,qBAAqB,GAAY,CAC9C,CACT;oBACA,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,eAAe,IAAI,CAC5C,4DAAK,KAAK,EAAE,aAAa,EAAE,EAAE,IAAI,EAAC,MAAM;wBACpC,iEAAU,IAAI,EAAC,qBAAqB,GAAY,CAC9C,CACT,CACC,CACJ;YACN,8DAAO,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,EAAC,OAAO,IACnD,IAAI,CAAC,KAAK,CACP,CACN,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, h, Prop, Element, ComponentInterface, EventEmitter, Event, Watch, State } from '@stencil/core';\nimport { tv } from 'tailwind-variants';\nimport { generateId } from '../../utils/id/generate-id';\n\n/**\n * @description A checkbox component that allows users to select or deselect an option.\n * It also supports an indeterminate state.\n */\n@Component({\n tag: 'bcm-checkbox',\n styleUrl: 'checkbox.css',\n shadow: true,\n})\nexport class Checkbox implements ComponentInterface {\n /** Reference to the host element */\n @Element() el: HTMLElement;\n\n /**\n * Unique ID for the component. Automatically generated if not specified.\n */\n @Prop({ attribute: 'id', reflect: true })\n _id?: string = generateId('bcm-checkbox');\n\n /**\n * Label text to display next to the checkbox\n */\n @Prop()\n label?: string;\n\n /**\n * Name attribute for the checkbox when used in a form\n */\n @Prop()\n name: string;\n\n /**\n * Determines if the checkbox is in an indeterminate state.\n * This is useful when some items in a group of checkboxes are selected and others are not.\n */\n @Prop({ mutable: true })\n indeterminate: boolean = false;\n\n /**\n * Size variant of the checkbox\n */\n @Prop()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Determines if the checkbox is checked\n */\n @Prop({ mutable: true })\n checked: boolean = false;\n\n /**\n * Indicates if the checkbox is in an error state.\n * This affects the visual styling of the component.\n */\n @Prop()\n error: boolean = false;\n\n /**\n * Determines if the checkbox is disabled\n */\n @Prop()\n disabled: boolean = false;\n\n /**\n * Controls the position of the label relative to the checkbox\n */\n @Prop()\n labelPosition: 'left' | 'right' = 'right';\n\n /**\n * Internal state to track checked status\n */\n @State() internalChecked: boolean;\n\n /**\n * Event emitted when the checked state changes\n */\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n eventName: 'bcmCheckboxChange',\n })\n bcmCheckboxChange: EventEmitter<{ element: any; checked: boolean }>;\n\n /** Reference to the underlying input element */\n private inputElement: HTMLInputElement;\n\n /**\n * Lifecycle method that runs before the component first renders.\n * Initializes the internal checked state.\n */\n componentWillLoad() {\n this.internalChecked = this.checked !== undefined ? this.checked : false;\n }\n\n /**\n * Lifecycle method that runs after the component has rendered.\n * Updates the indeterminate state of the input element.\n */\n componentDidLoad() {\n this.updateIndeterminateState();\n }\n\n /**\n * Watches for changes to the checked prop and updates the internal state\n * @param newValue The new checked value\n */\n @Watch('checked')\n syncCheckedProp(newValue: boolean | undefined) {\n if (newValue !== undefined) {\n this.internalChecked = newValue;\n }\n }\n\n /**\n * Watches for changes to indeterminate and internalChecked states\n * Updates the input element accordingly\n */\n @Watch('indeterminate')\n @Watch('internalChecked')\n updateIndeterminateState() {\n if (this.inputElement) {\n this.inputElement.indeterminate = this.indeterminate && !this.internalChecked;\n this.inputElement.checked = this.internalChecked;\n }\n }\n\n /**\n * Handles change events on the checkbox\n * Updates state and emits the change event\n */\n private handleChange = () => {\n if (this.disabled) return;\n if (this.inputElement) {\n this.inputElement.indeterminate = false;\n this.indeterminate = false;\n this.internalChecked = !this.internalChecked;\n this.inputElement.checked = this.internalChecked;\n this.bcmCheckboxChange.emit({\n element: this.inputElement,\n checked: this.internalChecked,\n });\n }\n };\n\n /**\n * Returns the CSS custom properties based on component state\n * @returns Object with CSS custom properties\n */\n private getStyles() {\n const defaultStyles = {\n '--checked-color': 'var(--bcm-ui-color-background-primary-default)',\n '--unchecked-color': 'var(--bcm-ui-color-background-default-default)',\n '--border-color': 'var(--bcm-ui-color-border-default)',\n '--hover-border-color': 'var(--bcm-ui-color-border-primary)',\n '--hover-color': 'var(--bcm-ui-color-background-info-hover)',\n };\n\n const errorStyles = {\n '--checked-color': 'var(--bcm-ui-color-background-error-default)',\n '--unchecked-color': 'var(--bcm-ui-color-background-palette-red-default)',\n '--border-color': 'var(--bcm-ui-color-border-error)',\n '--hover-border-color': 'var(--bcm-ui-color-border-error)',\n '--hover-color': 'var(--bcm-ui-color-border-error)',\n };\n\n const disabledStyles = {\n '--checked-color': 'var(--bcm-ui-color-background-disabled-default)',\n '--unchecked-color': 'var(--bcm-ui-color-background-disabled-default)',\n '--border-color': 'var(--bcm-ui-color-border-disabled)',\n '--hover-color': 'var(--bcm-ui-color-border-disabled)',\n '--hover-border-color': 'var(--bcm-ui-color-border-disabled)',\n };\n\n return {\n ...defaultStyles,\n ...(this.error ? errorStyles : {}),\n ...(this.disabled ? disabledStyles : {}),\n };\n }\n\n /**\n * Tailwind Variants definition for the component\n * Configures styling based on component props\n */\n private classes = tv(\n {\n slots: {\n container: 'flex items-center bcm-ui-element bcm-checkbox',\n checkbox: [\n 'flex items-center justify-center rounded',\n 'border border-solid border-[--border-color]',\n 'bg-[--unchecked-color]',\n 'transition-colors duration-200 ease-out',\n 'peer-checked:bg-[--checked-color]',\n 'peer-checked:border-[--checked-color]',\n 'peer-indeterminate:bg-[--checked-color]',\n 'peer-indeterminate:border-[--checked-color]',\n 'hover:border-[--hover-border-color]',\n 'hover:peer-checked:bg-[--hover-color]',\n 'hover:peer-indeterminate:bg-[--hover-color]',\n ],\n iconContainer: 'flex items-center justify-center',\n label: 'select-none text-color',\n hiddenInput: 'absolute w-0 h-0 opacity-0 peer',\n },\n variants: {\n size: {\n small: {\n container: 'gap-2',\n checkbox: 'size-3',\n iconContainer: 'size-2 text-size-2',\n label: 'text-size-4',\n hiddenInput: 'size-3',\n },\n medium: {\n container: 'gap-2.5',\n checkbox: 'size-4',\n iconContainer: 'size-[10px] text-size-3',\n label: 'text-size-5',\n hiddenInput: 'size-4',\n },\n large: {\n container: 'gap-3',\n checkbox: 'size-[18px]',\n iconContainer: 'size-4 text-size-4',\n label: 'text-size-6',\n hiddenInput: 'size-[18px]',\n },\n },\n disabled: {\n true: {\n container: 'cursor-not-allowed',\n checkbox: 'cursor-not-allowed hover:border-[--border-color] hover:bg-[--unchecked-color]',\n label: 'cursor-not-allowed text-color-disabled',\n iconContainer: 'text-color-disabled',\n hiddenInput: 'cursor-not-allowed',\n },\n false: {\n container: 'cursor-pointer',\n checkbox: 'cursor-pointer',\n label: 'cursor-pointer text-color',\n iconContainer: 'text-color-base',\n hiddenInput: 'cursor-pointer',\n },\n },\n labelPosition: {\n left: {\n container: 'flex-row-reverse',\n },\n right: {\n container: 'flex-row',\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n checked: false,\n disabled: false,\n error: false,\n labelPosition: 'right',\n },\n },\n { twMerge: false },\n );\n\n /**\n * Renders the checkbox component\n */\n render() {\n const { container, checkbox, iconContainer, label, hiddenInput } = this.classes({ size: this.size, disabled: this.disabled, labelPosition: this.labelPosition });\n const internalId = this._id + '-internal-checkbox' || this.name;\n\n return (\n <div class={container()} style={this.getStyles()} part=\"checkbox-wrapper\">\n <div class=\"relative inline-flex\">\n <input\n type=\"checkbox\"\n role=\"checkbox\"\n id={internalId}\n name={this.name}\n checked={this.internalChecked}\n indeterminate={this.indeterminate}\n disabled={this.disabled}\n class={hiddenInput()}\n aria-checked={this.internalChecked ? 'true' : this.indeterminate ? 'mixed' : 'false'}\n aria-invalid={this.error}\n aria-label={this.label || 'Checkbox'}\n onChange={this.handleChange}\n ref={el => (this.inputElement = el as HTMLInputElement)}\n />\n <div class={checkbox()} onClick={this.handleChange} part=\"checkbox\">\n {this.internalChecked && (\n <div class={iconContainer()} part=\"icon\">\n <bcm-icon name=\"fa-regular fa-check\"></bcm-icon>\n </div>\n )}\n {this.indeterminate && !this.internalChecked && (\n <div class={iconContainer()} part=\"icon\">\n <bcm-icon name=\"fa-regular fa-minus\"></bcm-icon>\n </div>\n )}\n </div>\n </div>\n <label htmlFor={internalId} class={label()} part=\"label\">\n {this.label}\n </label>\n </div>\n );\n }\n}"]}
1
+ {"version":3,"file":"checkbox.component.js","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAoC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACnH,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD;;;GAGG;AAMH,MAAM,OAAO,QAAQ;IALrB;QASE;;WAEG;QAEH,QAAG,GAAY,UAAU,CAAC,cAAc,CAAC,CAAC;QAc1C;;;WAGG;QAEH,kBAAa,GAAY,KAAK,CAAC;QAE/B;;WAEG;QAEH,SAAI,GAAiC,QAAQ,CAAC;QAE9C;;WAEG;QAEH,YAAO,GAAY,KAAK,CAAC;QAEzB;;;WAGG;QAEH,UAAK,GAAY,KAAK,CAAC;QAEvB;;WAEG;QAEH,aAAQ,GAAY,KAAK,CAAC;QAE1B;;WAEG;QAEH,kBAAa,GAAqB,OAAO,CAAC;QA6D1C;;;WAGG;QACK,iBAAY,GAAG,GAAG,EAAE;YAC1B,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAC1B,IAAI,IAAI,CAAC,YAAY,E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CACF;YACN,8DAAO,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,EAAC,OAAO,IACrD,IAAI,CAAC,KAAK,CACL,CACJ,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, Element, ComponentInterface, EventEmitter, Event, Watch, State } from '@stencil/core';\nimport { tv } from 'tailwind-variants';\nimport { generateId } from '../../utils/id/generate-id';\n\n/**\n * @description A checkbox component that allows users to select or deselect an option.\n * It also supports an indeterminate state.\n */\n@Component({\n tag: 'bcm-checkbox',\n styleUrl: 'checkbox.css',\n shadow: true,\n})\nexport class Checkbox implements ComponentInterface {\n /** Reference to the host element */\n @Element() el: HTMLElement;\n\n /**\n * Unique ID for the component. Automatically generated if not specified.\n */\n @Prop({ attribute: 'id', reflect: true })\n _id?: string = generateId('bcm-checkbox');\n\n /**\n * Label text to display next to the checkbox\n */\n @Prop()\n label?: string;\n\n /**\n * Name attribute for the checkbox when used in a form\n */\n @Prop()\n name: string;\n\n /**\n * Determines if the checkbox is in an indeterminate state.\n * This is useful when some items in a group of checkboxes are selected and others are not.\n */\n @Prop({ mutable: true })\n indeterminate: boolean = false;\n\n /**\n * Size variant of the checkbox\n */\n @Prop()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Determines if the checkbox is checked\n */\n @Prop({ mutable: true })\n checked: boolean = false;\n\n /**\n * Indicates if the checkbox is in an error state.\n * This affects the visual styling of the component.\n */\n @Prop()\n error: boolean = false;\n\n /**\n * Determines if the checkbox is disabled\n */\n @Prop()\n disabled: boolean = false;\n\n /**\n * Controls the position of the label relative to the checkbox\n */\n @Prop()\n labelPosition: 'left' | 'right' = 'right';\n\n /**\n * Internal state to track checked status\n */\n @State() internalChecked: boolean;\n\n /**\n * Event emitted when the checked state changes\n */\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n eventName: 'bcmCheckboxChange',\n })\n bcmCheckboxChange: EventEmitter<{ element: any; checked: boolean }>;\n\n /** Reference to the underlying input element */\n private inputElement: HTMLInputElement;\n\n /**\n * Lifecycle method that runs before the component first renders.\n * Initializes the internal checked state.\n */\n componentWillLoad() {\n this.internalChecked = this.checked !== undefined ? this.checked : false;\n }\n\n /**\n * Lifecycle method that runs after the component has rendered.\n * Updates the indeterminate state of the input element.\n */\n componentDidLoad() {\n this.updateIndeterminateState();\n }\n\n /**\n * Watches for changes to the checked prop and updates the internal state\n * @param newValue The new checked value\n */\n @Watch('checked')\n syncCheckedProp(newValue: boolean | undefined) {\n if (newValue !== undefined) {\n this.internalChecked = newValue;\n }\n }\n\n /**\n * Watches for changes to indeterminate and internalChecked states\n * Updates the input element accordingly\n */\n @Watch('indeterminate')\n @Watch('internalChecked')\n updateIndeterminateState() {\n if (this.inputElement) {\n this.inputElement.indeterminate = this.indeterminate && !this.internalChecked;\n this.inputElement.checked = this.internalChecked;\n }\n }\n\n /**\n * Handles change events on the checkbox\n * Updates state and emits the change event\n */\n private handleChange = () => {\n if (this.disabled) return;\n if (this.inputElement) {\n this.inputElement.indeterminate = false;\n this.indeterminate = false;\n this.internalChecked = !this.internalChecked;\n this.inputElement.checked = this.internalChecked;\n this.bcmCheckboxChange.emit({\n element: this.inputElement,\n checked: this.internalChecked,\n });\n }\n };\n\n /**\n * Returns the CSS custom properties based on component state\n * @returns Object with CSS custom properties\n */\n private getStyles() {\n const defaultStyles = {\n '--checked-color': 'var(--bcm-ui-color-background-primary-default)',\n '--unchecked-color': 'var(--bcm-ui-color-background-default-default)',\n '--border-color': 'var(--bcm-ui-color-border-default)',\n '--hover-border-color': 'var(--bcm-ui-color-border-primary)',\n '--hover-color': 'var(--bcm-ui-color-background-info-hover)',\n };\n\n const errorStyles = {\n '--checked-color': 'var(--bcm-ui-color-background-error-default)',\n '--unchecked-color': 'var(--bcm-ui-color-background-palette-red-default)',\n '--border-color': 'var(--bcm-ui-color-border-error)',\n '--hover-border-color': 'var(--bcm-ui-color-border-error)',\n '--hover-color': 'var(--bcm-ui-color-border-error)',\n };\n\n const disabledStyles = {\n '--checked-color': 'var(--bcm-ui-color-background-disabled-default)',\n '--unchecked-color': 'var(--bcm-ui-color-background-disabled-default)',\n '--border-color': 'var(--bcm-ui-color-border-disabled)',\n '--hover-color': 'var(--bcm-ui-color-border-disabled)',\n '--hover-border-color': 'var(--bcm-ui-color-border-disabled)',\n };\n\n return {\n ...defaultStyles,\n ...(this.error ? errorStyles : {}),\n ...(this.disabled ? disabledStyles : {}),\n };\n }\n\n /**\n * Tailwind Variants definition for the component\n * Configures styling based on component props\n */\n private classes = tv(\n {\n slots: {\n container: 'flex items-center bcm-ui-element bcm-checkbox',\n checkbox: [\n 'flex items-center justify-center rounded-sm',\n 'border border-solid border-[--border-color]',\n 'bg-[--unchecked-color]',\n 'transition-colors duration-200 ease-out',\n 'peer-checked:bg-[--checked-color]',\n 'peer-checked:border-[--checked-color]',\n 'peer-indeterminate:bg-[--checked-color]',\n 'peer-indeterminate:border-[--checked-color]',\n 'hover:border-[--hover-border-color]',\n 'hover:peer-checked:bg-[--hover-color]',\n 'hover:peer-indeterminate:bg-[--hover-color]',\n ],\n iconContainer: 'flex items-center justify-center',\n label: 'select-none text-color',\n hiddenInput: 'absolute w-0 h-0 opacity-0 peer',\n },\n variants: {\n size: {\n small: {\n container: 'gap-2',\n checkbox: 'size-3',\n iconContainer: 'size-2 text-size-2',\n label: 'text-size-4',\n hiddenInput: 'size-3',\n },\n medium: {\n container: 'gap-2.5',\n checkbox: 'size-4',\n iconContainer: 'size-[10px] text-size-3',\n label: 'text-size-5',\n hiddenInput: 'size-4',\n },\n large: {\n container: 'gap-3',\n checkbox: 'size-[18px]',\n iconContainer: 'size-4 text-size-4',\n label: 'text-size-6',\n hiddenInput: 'size-[18px]',\n },\n },\n disabled: {\n true: {\n container: 'cursor-not-allowed',\n checkbox: 'cursor-not-allowed hover:border-[--border-color] hover:bg-[--unchecked-color]',\n label: 'cursor-not-allowed text-color-disabled',\n iconContainer: 'text-color-disabled',\n hiddenInput: 'cursor-not-allowed',\n },\n false: {\n container: 'cursor-pointer',\n checkbox: 'cursor-pointer',\n label: 'cursor-pointer text-color',\n iconContainer: 'text-color-base',\n hiddenInput: 'cursor-pointer',\n },\n },\n labelPosition: {\n left: {\n container: 'flex-row-reverse',\n },\n right: {\n container: 'flex-row',\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n checked: false,\n disabled: false,\n error: false,\n labelPosition: 'right',\n },\n },\n { twMerge: false },\n );\n\n /**\n * Renders the checkbox component\n */\n render() {\n const { container, checkbox, iconContainer, label, hiddenInput } = this.classes({ size: this.size, disabled: this.disabled, labelPosition: this.labelPosition });\n const internalId = this._id + '-internal-checkbox' || this.name;\n\n return (\n <div class={container()} style={this.getStyles()} part=\"checkbox-wrapper\">\n <div class=\"relative inline-flex\">\n <input\n type=\"checkbox\"\n role=\"checkbox\"\n id={internalId}\n name={this.name}\n checked={this.internalChecked}\n indeterminate={this.indeterminate}\n disabled={this.disabled}\n class={hiddenInput()}\n aria-checked={this.internalChecked ? 'true' : this.indeterminate ? 'mixed' : 'false'}\n aria-invalid={this.error}\n aria-label={this.label || 'Checkbox'}\n onChange={this.handleChange}\n ref={el => (this.inputElement = el as HTMLInputElement)}\n />\n <div class={checkbox()} onClick={this.handleChange} part=\"checkbox\">\n {this.internalChecked && (\n <div class={iconContainer()} part=\"icon\">\n <bcm-icon name=\"fa-regular fa-check\"></bcm-icon>\n </div>\n )}\n {this.indeterminate && !this.internalChecked && (\n <div class={iconContainer()} part=\"icon\">\n <bcm-icon name=\"fa-regular fa-minus\"></bcm-icon>\n </div>\n )}\n </div>\n </div>\n <label htmlFor={internalId} class={label()} part=\"label\">\n {this.label}\n </label>\n </div>\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- .relative{position:relative}.block{display:block}:host{align-self:center;display:block;height:-moz-fit-content;height:fit-content;position:relative;width:-moz-fit-content;width:fit-content}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.absolute{position:absolute}.flex{display:flex}.inline-flex{display:inline-flex}.size-2{height:.5rem;width:.5rem}.size-3{height:.75rem;width:.75rem}.size-4{height:1rem;width:1rem}.size-\[10px\]{height:10px;width:10px}.size-\[18px\]{height:18px;width:18px}.h-0{height:0}.w-0{width:0}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{user-select:none}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.rounded{border-radius:var(--bcm-ui-border-radius-default,6px)}.border{border-width:1px}.border-solid{border-style:solid}.border-\[--border-color\]{border-color:var(--border-color)}.bg-\[--unchecked-color\]{background-color:var(--unchecked-color)}.text-size-2{font-size:var(--bcm-ui-font-size-2,10px);line-height:var(--bcm-ui-line-height-2,12px)}.text-size-3{font-size:var(--bcm-ui-font-size-3,12px);line-height:var(--bcm-ui-line-height-3,16px)}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.text-color-base{color:var(--bcm-ui-color-text-base)}.text-color-disabled{color:var(--bcm-ui-color-text-disabled)}.opacity-0{opacity:0}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.hover\:border-\[--border-color\]:hover{border-color:var(--border-color)}.hover\:border-\[--hover-border-color\]:hover{border-color:var(--hover-border-color)}.hover\:bg-\[--unchecked-color\]:hover{background-color:var(--unchecked-color)}.peer:checked~.peer-checked\:border-\[--checked-color\]{border-color:var(--checked-color)}.peer:checked~.peer-checked\:bg-\[--checked-color\]{background-color:var(--checked-color)}.peer:checked~.hover\:peer-checked\:bg-\[--hover-color\]:hover{background-color:var(--hover-color)}.peer:indeterminate~.peer-indeterminate\:border-\[--checked-color\]{border-color:var(--checked-color)}.peer:indeterminate~.peer-indeterminate\:bg-\[--checked-color\]{background-color:var(--checked-color)}.peer:indeterminate~.hover\:peer-indeterminate\:bg-\[--hover-color\]:hover{background-color:var(--hover-color)}
1
+ .relative{position:relative}.block{display:block}:host{align-self:center;display:block;height:-moz-fit-content;height:fit-content;position:relative;width:-moz-fit-content;width:fit-content}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.absolute{position:absolute}.flex{display:flex}.inline-flex{display:inline-flex}.size-2{height:.5rem;width:.5rem}.size-3{height:.75rem;width:.75rem}.size-4{height:1rem;width:1rem}.size-\[10px\]{height:10px;width:10px}.size-\[18px\]{height:18px;width:18px}.h-0{height:0}.w-0{width:0}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{user-select:none}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.rounded-sm{border-radius:var(--bcm-ui-border-radius-sm,4px)}.border{border-width:1px}.border-solid{border-style:solid}.border-\[--border-color\]{border-color:var(--border-color)}.bg-\[--unchecked-color\]{background-color:var(--unchecked-color)}.text-size-2{font-size:var(--bcm-ui-font-size-2,10px);line-height:var(--bcm-ui-line-height-2,12px)}.text-size-3{font-size:var(--bcm-ui-font-size-3,12px);line-height:var(--bcm-ui-line-height-3,16px)}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.text-color-base{color:var(--bcm-ui-color-text-base)}.text-color-disabled{color:var(--bcm-ui-color-text-disabled)}.opacity-0{opacity:0}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.hover\:border-\[--border-color\]:hover{border-color:var(--border-color)}.hover\:border-\[--hover-border-color\]:hover{border-color:var(--hover-border-color)}.hover\:bg-\[--unchecked-color\]:hover{background-color:var(--unchecked-color)}.peer:checked~.peer-checked\:border-\[--checked-color\]{border-color:var(--checked-color)}.peer:checked~.peer-checked\:bg-\[--checked-color\]{background-color:var(--checked-color)}.peer:checked~.hover\:peer-checked\:bg-\[--hover-color\]:hover{background-color:var(--hover-color)}.peer:indeterminate~.peer-indeterminate\:border-\[--checked-color\]{border-color:var(--checked-color)}.peer:indeterminate~.peer-indeterminate\:bg-\[--checked-color\]{background-color:var(--checked-color)}.peer:indeterminate~.hover\:peer-indeterminate\:bg-\[--hover-color\]:hover{background-color:var(--hover-color)}
@@ -1 +1 @@
1
- :host{--bcm-chip-bg:var(--bcm-ui-color-background-default-default);--bcm-chip-text:var(--bcm-ui-color-text-default);--bcm-chip-border:var(--bcm-ui-color-border-default);--bcm-chip-hover-bg:var(--bcm-ui-color-background-default-hover);--bcm-chip-active-bg:var(--bcm-ui-color-background-default-active);--bcm-chip-radius:6px;display:inline-block}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.flex{display:flex}.min-w-max{min-width:max-content}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.rounded-\[--bcm-chip-radius\]{border-radius:var(--bcm-chip-radius)}.border{border-width:1px}.border-none{border-style:none}.border-\[--bcm-chip-border\]{border-color:var(--bcm-chip-border)}.border-transparent{border-color:transparent}.bg-\[--bcm-chip-bg\]{background-color:var(--bcm-chip-bg)}.px-2{padding-left:.5rem;padding-right:.5rem}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-px{padding-bottom:1px;padding-top:1px}.text-size-3{font-size:var(--bcm-ui-font-size-3,12px);line-height:var(--bcm-ui-line-height-3,16px)}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.font-normal{font-weight:400}.text-\[--bcm-chip-text\]{color:var(--bcm-chip-text)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:bg-\[--bcm-chip-hover-bg\]:hover{background-color:var(--bcm-chip-hover-bg)}.active\:bg-\[--bcm-chip-active-bg\]:active{background-color:var(--bcm-chip-active-bg)}
1
+ :host{--bcm-chip-bg:var(--bcm-ui-color-background-default-default);--bcm-chip-text:var(--bcm-ui-color-text-default);--bcm-chip-border:var(--bcm-ui-color-border-default);--bcm-chip-hover-bg:var(--bcm-ui-color-background-default-hover);--bcm-chip-active-bg:var(--bcm-ui-color-background-default-active);--bcm-chip-radius:6px;display:inline-block}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.flex{display:flex}.min-w-max{min-width:max-content}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.rounded-\[--bcm-chip-radius\]{border-radius:var(--bcm-chip-radius)}.border{border-width:1px}.border-none{border-style:none}.border-\[--bcm-chip-border\]{border-color:var(--bcm-chip-border)}.border-transparent{border-color:transparent}.bg-\[--bcm-chip-bg\]{background-color:var(--bcm-chip-bg)}.px-2{padding-left:.5rem;padding-right:.5rem}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-px{padding-bottom:1px;padding-top:1px}.text-size-3{font-size:var(--bcm-ui-font-size-3,12px);line-height:var(--bcm-ui-line-height-3,16px)}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.font-normal{font-weight:400}.text-\[--bcm-chip-text\]{color:var(--bcm-chip-text)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:bg-\[--bcm-chip-hover-bg\]:hover{background-color:var(--bcm-chip-hover-bg)}.active\:bg-\[--bcm-chip-active-bg\]:active{background-color:var(--bcm-chip-active-bg)}
@@ -1 +1 @@
1
- .block{display:block}:host{--bcm-divider-border:var(--bcm-ui-color-border-default);display:block}.static{position:static}.h-full{height:100%}.w-full{width:100%}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-\[1px\]{border-width:1px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-\[--bcm-divider-border\]{border-color:var(--bcm-divider-border)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}
1
+ .block{display:block}:host{--bcm-divider-border:var(--bcm-ui-color-border-default);display:block}.h-full{height:100%}.w-full{width:100%}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-\[1px\]{border-width:1px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-\[--bcm-divider-border\]{border-color:var(--bcm-divider-border)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}
@@ -1,5 +1,4 @@
1
1
  import { h } from "@stencil/core";
2
- import { defaultIcons } from "./types";
3
2
  import { tv } from "tailwind-variants";
4
3
  import classNames from "classnames";
5
4
  import { generateId } from "../../utils/id/generate-id";
@@ -10,6 +9,7 @@ export class BcmInput {
10
9
  this.isFocused = false;
11
10
  this.isValid = true;
12
11
  this.internalStatus = 'default';
12
+ this.isPasswordVisible = false;
13
13
  /** Input value */
14
14
  this.value = '';
15
15
  /** Input id */
@@ -61,6 +61,7 @@ export class BcmInput {
61
61
  base: [
62
62
  'bcm-input bcm-input__container',
63
63
  'bg-[--bcm-ui-color-background-base-default]',
64
+ 'text-[--bcm-ui-color-text-default]',
64
65
  'border border-solid rounded',
65
66
  'flex items-center justify-between',
66
67
  'transition-colors duration-200',
@@ -74,6 +75,7 @@ export class BcmInput {
74
75
  'text-[--bcm-ui-color-text-default] placeholder:text-[--bcm-ui-color-text-placeholder] placeholder:font-normal',
75
76
  'font-sans antialiased font-medium',
76
77
  'px-1',
78
+ '[appearance:textfield][&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none',
77
79
  ],
78
80
  },
79
81
  variants: {
@@ -131,6 +133,21 @@ export class BcmInput {
131
133
  }, {
132
134
  twMerge: false,
133
135
  });
136
+ this.togglePasswordVisibility = () => {
137
+ this.isPasswordVisible = !this.isPasswordVisible;
138
+ this.inputRef.type = this.isPasswordVisible ? 'text' : 'password';
139
+ };
140
+ this.PasswordToggleButton = () => {
141
+ var _a;
142
+ if (this.type !== 'password' || this.disabled || this.readonly || ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) === 0)
143
+ return null;
144
+ return (h("button", { class: "appearance-none flex items-center w-6 h-full justify-center", onClick: this.togglePasswordVisibility, type: "button" }, h("bcm-icon", { name: this.isPasswordVisible ? 'fa-eye-slash fa-regular' : 'fa-regular fa-eye', size: this.iconSize })));
145
+ };
146
+ this.iconSize = {
147
+ small: 14,
148
+ medium: 16,
149
+ large: 18,
150
+ }[this.size];
134
151
  }
135
152
  handleValueChange(newValue) {
136
153
  if (this.inputRef) {
@@ -225,7 +242,8 @@ export class BcmInput {
225
242
  return checkSlotContent(this.el, slotName);
226
243
  }
227
244
  getDefaultIconForType() {
228
- return defaultIcons[this.type];
245
+ return; // TODO: Will be implemented later
246
+ // return defaultIcons[this.type as keyof typeof defaultIcons];
229
247
  }
230
248
  render() {
231
249
  const inputId = this._id + '-input' || this.name;
@@ -236,19 +254,14 @@ export class BcmInput {
236
254
  disabled: this.disabled,
237
255
  focused: this.isFocused,
238
256
  });
239
- const iconSize = {
240
- small: 14,
241
- medium: 16,
242
- large: 18,
243
- }[this.size];
244
- return (h("div", { key: 'a0fa86f738a07e475cd809c9abe8bd7aa5f50d2e', class: "bcm-ui-element" }, this.label && (h("label", { key: 'b2715f3669bf51b2bc93b29a4ce78fc84d6a8fec', class: classNames('input-label font-medium', {
257
+ return (h("div", { key: '329961819a0b1206c3d63b9c243ff7a40ed804af', class: "bcm-ui-element" }, this.label && (h("label", { key: 'aaf17bea9b4b76e377688a09ffc6b3c03802dd0a', class: classNames('input-label font-medium', {
245
258
  'text-color-label': !this.disabled,
246
259
  'text-color-disabled': this.disabled,
247
260
  }, {
248
261
  'text-size-3': this.size === 'small',
249
262
  'text-size-4': this.size === 'medium',
250
263
  'text-size-5': this.size === 'large',
251
- }), htmlFor: inputId }, h("slot", { key: '26f991e1bad25cc2f074b9259320cc555c3d4bd9', name: "label" }, this.label), this.required && h("span", { key: '0b5a332b842ece285b093b2474e7dd376530d613' }, "*"))), h("div", { key: 'f4b1d4087e2bdfb07c140170e4e59e10c2163535', class: base() }, (this.hasSlotContent('prefix') || this.prefixIcon || this.getDefaultIconForType()) && (h("div", { key: 'dcc49ae6c4ad4795d1f10f85065e44cb061fce0e', class: "flex items-center gap-2 px-2" }, (this.prefixIcon || this.getDefaultIconForType()) && (h("bcm-icon", { key: 'c56c06852192dcfc4e7d3df24851afc31804b6b9', class: "prefix-icon", "icon-name": this.prefixIcon || this.getDefaultIconForType(), size: iconSize })), h("slot", { key: '29bd74d28492d5e95b4c3155b3c5a9fed3671a2a', name: "prefix" }))), h("input", { key: '21a06d459d5f68be085d46580134ea4718192d89', ref: el => (this.inputRef = el), id: inputId, class: inputClass(), type: this.type, name: this.name, disabled: this.disabled, readonly: this.readonly, required: this.required, placeholder: this.placeholder, autocomplete: this.autocomplete, minlength: this.minLength, maxlength: this.maxLength, min: this.min, max: this.max, step: this.step, pattern: this.pattern, "aria-invalid": this.status === 'error', "aria-required": this.required, "aria-labelledby": this.labelledby, "aria-describedby": this.describedby, value: this.value, onInput: this.onInput, onChange: this.onChange, onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, onKeyUp: this.onKeyUp }), (this.hasSlotContent('suffix') || this.suffixIcon) && (h("div", { key: 'd3852234f0410ed5ceb7df79c2645a97c45afac2', class: "flex items-center gap-2 px-2" }, h("slot", { key: '1e280c327b4791631c3dda4f3ec49706b8a88300', name: "suffix" }), this.suffixIcon && h("bcm-icon", { key: 'd0d14a9d2c7ce1be1de030afb661866b7bf60546', class: "suffix-icon", "icon-name": this.suffixIcon, size: iconSize })))), (this.captionText || this.internalErrorMessage || this.validationMessage) && (h("div", { key: '4408fc79afa594d8a932898f13573395ae33cccd', class: classNames('input-caption-text font-regular mt-1', {
264
+ }), htmlFor: inputId }, h("slot", { key: 'dcd71580ffeb1d551b44bbf5855c58a0fd894df7', name: "label" }, this.label), this.required && h("span", { key: '76cd1eba6895c9764de8bd5d920ece61378a6ccf' }, "*"))), h("div", { key: 'd9b6a175dc8b3489ebb48aa56baa8808fdffec55', class: base() }, (this.hasSlotContent('prefix') || this.prefixIcon || this.getDefaultIconForType()) && (h("div", { key: '5557b58dba9ccfe42b04bb29169dfce72a460423', class: "flex items-center gap-2 px-2" }, (this.prefixIcon || this.getDefaultIconForType()) && (h("bcm-icon", { key: '7f2e74230b52334ca860fda49e5ffd78b3b5f7f6', class: "prefix-icon", "icon-name": this.prefixIcon || this.getDefaultIconForType(), size: this.iconSize })), h("slot", { key: '74bad4cd327a1f3b40f793073b4e842915438ad3', name: "prefix" }))), h("input", { key: 'bef941d6c710a5f62a7fc8b6c92dd4a7970dba25', ref: el => (this.inputRef = el), id: inputId, class: inputClass(), type: this.type, name: this.name, disabled: this.disabled, readonly: this.readonly, required: this.required, placeholder: this.placeholder, autocomplete: this.autocomplete, minlength: this.minLength, maxlength: this.maxLength, min: this.min, max: this.max, step: this.step, pattern: this.pattern, "aria-invalid": this.status === 'error', "aria-required": this.required, "aria-labelledby": this.labelledby, "aria-describedby": this.describedby, value: this.value, onInput: this.onInput, onChange: this.onChange, onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, onKeyUp: this.onKeyUp }), (this.hasSlotContent('suffix') || this.suffixIcon) && (h("div", { key: '000769fffb5af147a41919393b527b36158b9471', class: "flex items-center gap-2 px-2" }, h("slot", { key: '0064416ee9905b16508b10892e2eb00b7bc3923a', name: "suffix" }), this.suffixIcon && h("bcm-icon", { key: 'b7dd33c6c1c6b5dff32206d493b9c76b927dd535', class: "suffix-icon", "icon-name": this.suffixIcon, size: this.iconSize }))), this.PasswordToggleButton()), (this.captionText || this.internalErrorMessage || this.validationMessage) && (h("div", { key: '307629a3cb19870c5e32cb2fa7124278ae273b97', class: classNames('input-caption-text font-regular mt-1', {
252
265
  'text-[--bcm-ui-color-text-caption]': !this.disabled && this.internalStatus === 'default',
253
266
  'text-[--bcm-ui-color-text-error]': !this.disabled && (this.internalStatus === 'error' || !this.isValid),
254
267
  'text-[--bcm-ui-color-text-success]': !this.disabled && this.internalStatus === 'success',
@@ -822,7 +835,8 @@ export class BcmInput {
822
835
  "validationMessage": {},
823
836
  "isValid": {},
824
837
  "internalStatus": {},
825
- "internalErrorMessage": {}
838
+ "internalErrorMessage": {},
839
+ "isPasswordVisible": {}
826
840
  };
827
841
  }
828
842
  static get events() {