bromcom-ui-next 0.1.24 → 0.1.25

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 (163) hide show
  1. package/dist/bromcom-ui/bcm-button.entry.esm.js.map +1 -0
  2. package/dist/bromcom-ui/bcm-drawer.entry.esm.js.map +1 -0
  3. package/dist/bromcom-ui/bcm-dropdown-item.entry.esm.js.map +1 -0
  4. package/dist/bromcom-ui/bcm-dropdown.entry.esm.js.map +1 -0
  5. package/dist/bromcom-ui/bcm-input.entry.esm.js.map +1 -0
  6. package/dist/bromcom-ui/bcm-linked.entry.esm.js.map +1 -0
  7. package/dist/bromcom-ui/bcm-shortcut.entry.esm.js.map +1 -0
  8. package/dist/bromcom-ui/bcm-switch.entry.esm.js.map +1 -1
  9. package/dist/bromcom-ui/bcm-tabs-list.entry.esm.js.map +1 -1
  10. package/dist/bromcom-ui/bcm-tabs-trigger.entry.esm.js.map +1 -1
  11. package/dist/bromcom-ui/bcm-tabs.entry.esm.js.map +1 -1
  12. package/dist/bromcom-ui/bcm-text.entry.esm.js.map +1 -0
  13. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  14. package/dist/bromcom-ui/p-00dc393e.entry.js +2 -0
  15. package/dist/bromcom-ui/p-00dc393e.entry.js.map +1 -0
  16. package/dist/bromcom-ui/p-0421d64a.entry.js +2 -0
  17. package/dist/bromcom-ui/p-0421d64a.entry.js.map +1 -0
  18. package/dist/bromcom-ui/p-06656239.entry.js +2 -0
  19. package/dist/bromcom-ui/p-06656239.entry.js.map +1 -0
  20. package/dist/bromcom-ui/p-10de6d9c.entry.js +2 -0
  21. package/dist/bromcom-ui/p-10de6d9c.entry.js.map +1 -0
  22. package/dist/bromcom-ui/p-48c554fc.entry.js +2 -0
  23. package/dist/bromcom-ui/p-48c554fc.entry.js.map +1 -0
  24. package/dist/bromcom-ui/{p-b02f5178.entry.js → p-7f117b72.entry.js} +2 -2
  25. package/dist/bromcom-ui/p-a07a257f.entry.js +2 -0
  26. package/dist/bromcom-ui/p-a07a257f.entry.js.map +1 -0
  27. package/dist/bromcom-ui/{p-5c1b22b5.entry.js → p-a18d34c7.entry.js} +2 -2
  28. package/dist/bromcom-ui/p-b37f2434.entry.js +2 -0
  29. package/dist/bromcom-ui/p-b37f2434.entry.js.map +1 -0
  30. package/dist/bromcom-ui/p-c709842a.entry.js +2 -0
  31. package/dist/bromcom-ui/p-c709842a.entry.js.map +1 -0
  32. package/dist/bromcom-ui/p-e989b918.entry.js +2 -0
  33. package/dist/bromcom-ui/p-e989b918.entry.js.map +1 -0
  34. package/dist/bromcom-ui/p-ed796a79.entry.js +2 -0
  35. package/dist/bromcom-ui/p-ed796a79.entry.js.map +1 -0
  36. package/dist/bromcom-ui/p-edd01d0d.entry.js +2 -0
  37. package/dist/bromcom-ui/p-edd01d0d.entry.js.map +1 -0
  38. package/dist/bromcom-ui/p-f34bfa88.entry.js +2 -0
  39. package/dist/bromcom-ui/p-f34bfa88.entry.js.map +1 -0
  40. package/dist/cjs/bcm-button.cjs.entry.js +316 -0
  41. package/dist/cjs/bcm-button.cjs.entry.js.map +1 -0
  42. package/dist/cjs/bcm-button.entry.cjs.js.map +1 -0
  43. package/dist/cjs/bcm-drawer.cjs.entry.js +206 -0
  44. package/dist/cjs/bcm-drawer.cjs.entry.js.map +1 -0
  45. package/dist/cjs/bcm-drawer.entry.cjs.js.map +1 -0
  46. package/dist/cjs/bcm-dropdown-item.cjs.entry.js +61 -0
  47. package/dist/cjs/bcm-dropdown-item.cjs.entry.js.map +1 -0
  48. package/dist/cjs/bcm-dropdown-item.entry.cjs.js.map +1 -0
  49. package/dist/cjs/bcm-dropdown.cjs.entry.js +54 -0
  50. package/dist/cjs/bcm-dropdown.cjs.entry.js.map +1 -0
  51. package/dist/cjs/bcm-dropdown.entry.cjs.js.map +1 -0
  52. package/dist/cjs/bcm-input.cjs.entry.js +315 -0
  53. package/dist/cjs/bcm-input.cjs.entry.js.map +1 -0
  54. package/dist/cjs/bcm-input.entry.cjs.js.map +1 -0
  55. package/dist/cjs/bcm-linked.cjs.entry.js +343 -0
  56. package/dist/cjs/bcm-linked.cjs.entry.js.map +1 -0
  57. package/dist/cjs/bcm-linked.entry.cjs.js.map +1 -0
  58. package/dist/cjs/bcm-shortcut.cjs.entry.js +50 -0
  59. package/dist/cjs/bcm-shortcut.cjs.entry.js.map +1 -0
  60. package/dist/cjs/bcm-shortcut.entry.cjs.js.map +1 -0
  61. package/dist/cjs/bcm-switch.cjs.entry.js +7 -7
  62. package/dist/cjs/bcm-switch.cjs.entry.js.map +1 -1
  63. package/dist/cjs/bcm-switch.entry.cjs.js.map +1 -1
  64. package/dist/cjs/bcm-tabs-list.cjs.entry.js +49 -6
  65. package/dist/cjs/bcm-tabs-list.cjs.entry.js.map +1 -1
  66. package/dist/cjs/bcm-tabs-list.entry.cjs.js.map +1 -1
  67. package/dist/cjs/bcm-tabs-trigger.cjs.entry.js +38 -6
  68. package/dist/cjs/bcm-tabs-trigger.cjs.entry.js.map +1 -1
  69. package/dist/cjs/bcm-tabs-trigger.entry.cjs.js.map +1 -1
  70. package/dist/cjs/bcm-tabs.cjs.entry.js +106 -17
  71. package/dist/cjs/bcm-tabs.cjs.entry.js.map +1 -1
  72. package/dist/cjs/bcm-tabs.entry.cjs.js.map +1 -1
  73. package/dist/cjs/bcm-text.cjs.entry.js +124 -0
  74. package/dist/cjs/bcm-text.cjs.entry.js.map +1 -0
  75. package/dist/cjs/bcm-text.entry.cjs.js.map +1 -0
  76. package/dist/cjs/bcm-textarea.cjs.entry.js +3 -3
  77. package/dist/cjs/bcm-tooltip.cjs.entry.js +1 -1
  78. package/dist/cjs/bromcom-ui.cjs.js +1 -1
  79. package/dist/cjs/loader.cjs.js +1 -1
  80. package/dist/collection/components/button/button.css +1 -1
  81. package/dist/collection/components/switch/switch.component.js +6 -6
  82. package/dist/collection/components/switch/switch.component.js.map +1 -1
  83. package/dist/collection/components/switch/switch.css +1 -1
  84. package/dist/collection/components/tabs/bcm-tabs.css +1 -1
  85. package/dist/collection/components/tabs/tabs-list.component.js +92 -5
  86. package/dist/collection/components/tabs/tabs-list.component.js.map +1 -1
  87. package/dist/collection/components/tabs/tabs-list.css +1 -1
  88. package/dist/collection/components/tabs/tabs-trigger.component.js +77 -5
  89. package/dist/collection/components/tabs/tabs-trigger.component.js.map +1 -1
  90. package/dist/collection/components/tabs/tabs-trigger.css +1 -1
  91. package/dist/collection/components/tabs/tabs.component.js +148 -15
  92. package/dist/collection/components/tabs/tabs.component.js.map +1 -1
  93. package/dist/collection/components/text/text.component.js +1 -1
  94. package/dist/collection/components/textarea/textarea.component.js +3 -3
  95. package/dist/collection/components/tooltip/tooltip.component.js +1 -1
  96. package/dist/components/bcm-button.js +1 -1
  97. package/dist/components/bcm-dropdown.js +1 -1
  98. package/dist/components/bcm-pop-confirm.js +1 -1
  99. package/dist/components/bcm-switch.js +7 -7
  100. package/dist/components/bcm-switch.js.map +1 -1
  101. package/dist/components/bcm-tabs-list.js +53 -7
  102. package/dist/components/bcm-tabs-list.js.map +1 -1
  103. package/dist/components/bcm-tabs-trigger.js +41 -7
  104. package/dist/components/bcm-tabs-trigger.js.map +1 -1
  105. package/dist/components/bcm-tabs.js +111 -18
  106. package/dist/components/bcm-tabs.js.map +1 -1
  107. package/dist/components/bcm-text.js +1 -1
  108. package/dist/components/bcm-textarea.js +3 -3
  109. package/dist/components/bcm-tooltip.js +1 -1
  110. package/dist/components/{p-BdGAZ8M0.js → p-e6quW4es.js} +3 -3
  111. package/dist/components/{p-BdGAZ8M0.js.map → p-e6quW4es.js.map} +1 -1
  112. package/dist/esm/bcm-button.entry.js +314 -0
  113. package/dist/esm/bcm-button.entry.js.map +1 -0
  114. package/dist/esm/bcm-drawer.entry.js +204 -0
  115. package/dist/esm/bcm-drawer.entry.js.map +1 -0
  116. package/dist/esm/bcm-dropdown-item.entry.js +59 -0
  117. package/dist/esm/bcm-dropdown-item.entry.js.map +1 -0
  118. package/dist/esm/bcm-dropdown.entry.js +52 -0
  119. package/dist/esm/bcm-dropdown.entry.js.map +1 -0
  120. package/dist/esm/bcm-input.entry.js +313 -0
  121. package/dist/esm/bcm-input.entry.js.map +1 -0
  122. package/dist/esm/bcm-linked.entry.js +341 -0
  123. package/dist/esm/bcm-linked.entry.js.map +1 -0
  124. package/dist/esm/bcm-shortcut.entry.js +48 -0
  125. package/dist/esm/bcm-shortcut.entry.js.map +1 -0
  126. package/dist/esm/bcm-switch.entry.js +7 -7
  127. package/dist/esm/bcm-switch.entry.js.map +1 -1
  128. package/dist/esm/bcm-tabs-list.entry.js +49 -6
  129. package/dist/esm/bcm-tabs-list.entry.js.map +1 -1
  130. package/dist/esm/bcm-tabs-trigger.entry.js +38 -6
  131. package/dist/esm/bcm-tabs-trigger.entry.js.map +1 -1
  132. package/dist/esm/bcm-tabs.entry.js +106 -17
  133. package/dist/esm/bcm-tabs.entry.js.map +1 -1
  134. package/dist/esm/bcm-text.entry.js +122 -0
  135. package/dist/esm/bcm-text.entry.js.map +1 -0
  136. package/dist/esm/bcm-textarea.entry.js +3 -3
  137. package/dist/esm/bcm-tooltip.entry.js +1 -1
  138. package/dist/esm/bromcom-ui.js +1 -1
  139. package/dist/esm/loader.js +1 -1
  140. package/dist/types/components/tabs/tabs-list.component.d.ts +8 -0
  141. package/dist/types/components/tabs/tabs-trigger.component.d.ts +8 -0
  142. package/dist/types/components/tabs/tabs.component.d.ts +15 -0
  143. package/dist/types/components.d.ts +60 -0
  144. package/package.json +1 -1
  145. package/dist/bromcom-ui/bcm-button.bcm-drawer.bcm-dropdown.bcm-dropdown-item.bcm-input.bcm-linked.bcm-shortcut.bcm-text.entry.esm.js.map +0 -1
  146. package/dist/bromcom-ui/p-1d79c9de.entry.js +0 -2
  147. package/dist/bromcom-ui/p-1d79c9de.entry.js.map +0 -1
  148. package/dist/bromcom-ui/p-4766474f.entry.js +0 -2
  149. package/dist/bromcom-ui/p-4766474f.entry.js.map +0 -1
  150. package/dist/bromcom-ui/p-4f0851e2.entry.js +0 -2
  151. package/dist/bromcom-ui/p-4f0851e2.entry.js.map +0 -1
  152. package/dist/bromcom-ui/p-88d35bcf.entry.js +0 -2
  153. package/dist/bromcom-ui/p-88d35bcf.entry.js.map +0 -1
  154. package/dist/bromcom-ui/p-d04246f0.entry.js +0 -2
  155. package/dist/bromcom-ui/p-d04246f0.entry.js.map +0 -1
  156. package/dist/cjs/bcm-button.bcm-drawer.bcm-dropdown.bcm-dropdown-item.bcm-input.bcm-linked.bcm-shortcut.bcm-text.entry.cjs.js.map +0 -1
  157. package/dist/cjs/bcm-button_8.cjs.entry.js +0 -1414
  158. package/dist/cjs/bcm-button_8.cjs.entry.js.map +0 -1
  159. package/dist/esm/bcm-button.bcm-drawer.bcm-dropdown.bcm-dropdown-item.bcm-input.bcm-linked.bcm-shortcut.bcm-text.entry.js.map +0 -1
  160. package/dist/esm/bcm-button_8.entry.js +0 -1405
  161. package/dist/esm/bcm-button_8.entry.js.map +0 -1
  162. /package/dist/bromcom-ui/{p-b02f5178.entry.js.map → p-7f117b72.entry.js.map} +0 -0
  163. /package/dist/bromcom-ui/{p-5c1b22b5.entry.js.map → p-a18d34c7.entry.js.map} +0 -0
@@ -1,1405 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-B84DzIAh.js';
2
- import { t as tv } from './tv-CEcVC0yX.js';
3
- import { c as classNames } from './index-BfTCfPZ1.js';
4
- import { g as generateId } from './generate-id-IBjzkjef.js';
5
- import { s as setValidationMessages, g as getValidationMessage, d as defaultValidationMessages } from './validation-messages-CUvT12BL.js';
6
- import { b as autoUpdate, c as computePosition, o as offset, f as flip, s as shift } from './floating-ui.dom-DxMLMJ3r.js';
7
-
8
- const variantOptions = {
9
- save: {
10
- text: 'Save',
11
- status: 'success',
12
- icon: 'far fa-save',
13
- iconPosition: 'prefix',
14
- kind: 'primary',
15
- },
16
- ok: {
17
- text: 'Ok',
18
- status: 'success',
19
- icon: 'far fa-check',
20
- iconPosition: 'prefix',
21
- },
22
- new: {
23
- text: 'New',
24
- status: 'success',
25
- icon: 'far fa-plus',
26
- iconPosition: 'prefix',
27
- },
28
- add: {
29
- text: 'Add',
30
- status: 'success',
31
- icon: 'far fa-plus',
32
- iconPosition: 'prefix',
33
- },
34
- create: {
35
- text: 'Create',
36
- status: 'success',
37
- icon: 'far fa-plus',
38
- iconPosition: 'prefix',
39
- },
40
- prev: {
41
- text: 'Prev',
42
- status: 'default',
43
- icon: 'far fa-arrow-left',
44
- iconPosition: 'prefix',
45
- },
46
- next: {
47
- text: 'Next',
48
- status: 'default',
49
- icon: 'far fa-arrow-right',
50
- iconPosition: 'suffix',
51
- },
52
- apply: {
53
- text: 'Apply',
54
- status: 'default',
55
- icon: 'far fa-check-circle',
56
- iconPosition: 'prefix',
57
- },
58
- submit: {
59
- text: 'Submit',
60
- status: 'default',
61
- icon: 'far fa-save',
62
- iconPosition: 'prefix',
63
- },
64
- send: {
65
- text: 'Send',
66
- status: 'success',
67
- icon: 'far fa-paper-plane',
68
- iconPosition: 'prefix',
69
- },
70
- delete: {
71
- text: 'Delete',
72
- status: 'error',
73
- icon: 'far fa-trash',
74
- iconPosition: 'prefix',
75
- },
76
- cancel: {
77
- text: 'Cancel',
78
- status: 'error',
79
- icon: 'far fa-times',
80
- iconPosition: 'prefix',
81
- },
82
- decline: {
83
- text: 'Decline',
84
- status: 'error',
85
- icon: 'far fa-ban',
86
- iconPosition: 'prefix',
87
- },
88
- close: {
89
- text: 'Close',
90
- status: 'error',
91
- icon: 'far fa-times-circle',
92
- iconPosition: 'prefix',
93
- },
94
- archive: {
95
- text: 'Archive',
96
- status: 'error',
97
- icon: 'far fa-folder-open',
98
- iconPosition: 'prefix',
99
- },
100
- remove: {
101
- text: 'Remove',
102
- status: 'error',
103
- icon: 'far fa-minus-circle',
104
- iconPosition: 'prefix',
105
- },
106
- edit: {
107
- text: 'Edit',
108
- status: 'default',
109
- icon: 'far fa-edit',
110
- iconPosition: 'prefix',
111
- },
112
- export: {
113
- text: 'Export',
114
- status: 'default',
115
- icon: 'far fa-sign-out',
116
- iconPosition: 'prefix',
117
- },
118
- import: {
119
- text: 'Import',
120
- status: 'default',
121
- icon: 'far fa-sign-in',
122
- iconPosition: 'prefix',
123
- },
124
- filter: {
125
- text: 'Filter',
126
- status: 'default',
127
- icon: 'far fa-filter',
128
- iconPosition: 'prefix',
129
- },
130
- update: {
131
- text: 'Update',
132
- status: 'default',
133
- icon: 'far fa-sync',
134
- iconPosition: 'prefix',
135
- },
136
- reset: {
137
- text: 'Reset',
138
- status: 'default',
139
- icon: 'far fa-sync',
140
- iconPosition: 'prefix',
141
- },
142
- download: {
143
- text: 'Download',
144
- status: 'default',
145
- icon: 'far fa-download',
146
- iconPosition: 'prefix',
147
- },
148
- };
149
-
150
- const buttonCss = ".relative{position:relative}:host{display:inline-flex;height:-moz-fit-content;height:fit-content;position:relative;width:-moz-fit-content;width:fit-content}: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)}.flex{display:flex}.max-h-64{max-height:16rem}.min-w-10{min-width:2.5rem}.max-w-64{max-width:16rem}.flex-col{flex-direction:column}.overflow-y-auto{overflow-y:auto}.rounded-lg{border-radius:var(--bcm-ui-border-radius-lg,8px)}.bg-color-basic-panel{background-color:var(--bcm-ui-color-background-basic-panel)}.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-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)}";
151
-
152
- const BcmButton = class {
153
- constructor(hostRef) {
154
- registerInstance(this, hostRef);
155
- this.bcmClick = createEvent(this, "bcmClick", 1);
156
- this.bcmFocus = createEvent(this, "bcmFocus", 1);
157
- this.bcmBlur = createEvent(this, "bcmBlur", 1);
158
- /** Defines the main visual style of the button */
159
- this.kind = 'primary';
160
- /** Controls the button size */
161
- this.size = 'medium';
162
- /** Defines the button's status/state color */
163
- this.status = 'default';
164
- /** Icon placement (prefix/suffix) */
165
- this.iconPosition = 'prefix';
166
- /** Icon-only button mode */
167
- this.iconOnly = false;
168
- /** Full width button */
169
- this.fullWidth = false;
170
- /** HTML button type */
171
- this.type = 'button';
172
- /** Loading state */
173
- this.loading = false;
174
- /** Disabled state */
175
- this.disabled = false;
176
- /** Active state */
177
- this.active = false;
178
- this.handleClick = (event) => {
179
- if (!this.disabled && !this.loading) {
180
- this.bcmClick.emit(event);
181
- }
182
- };
183
- this.handleFocus = (event) => {
184
- this.bcmFocus.emit(event);
185
- };
186
- this.handleBlur = (event) => {
187
- this.bcmBlur.emit(event);
188
- };
189
- this.buttonClass = tv({
190
- base: 'bcm-button appearance-none inline-flex items-center justify-center border border-solid rounded outline-0',
191
- variants: {
192
- size: {
193
- small: 'text-size-4 py-px px-2 min-h-6',
194
- medium: 'text-size-5 py-0.5 px-3 min-h-8',
195
- large: 'text-size-6 py-1 px-3 min-h-10',
196
- },
197
- kind: {
198
- primary: 'kind-primary',
199
- ghost: 'kind-ghost',
200
- text: 'kind-text',
201
- outline: 'kind-outline',
202
- },
203
- fullWidth: {
204
- true: 'full-width w-full',
205
- },
206
- disabled: {
207
- true: 'disabled cursor-not-allowed bg-[--bcm-ui-color-background-disabled-default] text-color-disabled border-color-disabled',
208
- false: [
209
- 'cursor-pointer',
210
- 'bg-[--bcm-final-bg-color] text-[--bcm-final-text-color] border-[--bcm-final-border-color]',
211
- 'hover:bg-[--bcm-final-hover-bg-color]',
212
- 'active:bg-[--bcm-final-active-bg-color]',
213
- 'focus-visible:ring',
214
- ],
215
- },
216
- loading: {
217
- true: '',
218
- },
219
- position: {
220
- first: 'position-first',
221
- middle: 'position-middle',
222
- last: 'position-last',
223
- },
224
- },
225
- defaultVariants: {
226
- size: 'medium',
227
- kind: 'primary',
228
- fullWidth: false,
229
- disabled: false,
230
- loading: false,
231
- },
232
- }, {
233
- twMerge: false,
234
- });
235
- }
236
- get buttonText() {
237
- return this.text || (this.variant ? variantOptions[this.variant].text : '');
238
- }
239
- get buttonIcon() {
240
- if (this.variant && variantOptions[this.variant].icon) {
241
- return {
242
- icon: variantOptions[this.variant].icon,
243
- position: variantOptions[this.variant].iconPosition || 'prefix',
244
- };
245
- }
246
- return {
247
- icon: this.icon,
248
- position: this.iconPosition,
249
- };
250
- }
251
- get buttonStatus() {
252
- return this.variant ? variantOptions[this.variant].status : this.status;
253
- }
254
- get buttonStyles() {
255
- const status = this.buttonStatus === 'default' ? 'primary' : this.buttonStatus;
256
- // These are the internal default styles based on component props (kind, status)
257
- const kindStyleMap = {
258
- primary: {
259
- '--bcm-button-bg': `var(--bcm-ui-color-background-${status}-default)`,
260
- '--bcm-button-bg-hover': `var(--bcm-ui-color-background-${status}-hover)`,
261
- '--bcm-button-bg-active': `var(--bcm-ui-color-background-${status}-active)`,
262
- '--bcm-button-border': 'transparent',
263
- '--bcm-button-text': 'var(--bcm-ui-color-text-base)',
264
- },
265
- outline: {
266
- '--bcm-button-bg': 'var(--bcm-ui-color-background-default-default)',
267
- '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
268
- '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
269
- '--bcm-button-border': `var(--bcm-ui-color-border-${this.buttonStatus})`,
270
- '--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,
271
- },
272
- ghost: {
273
- '--bcm-button-bg': 'transparent',
274
- '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
275
- '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
276
- '--bcm-button-border': 'transparent',
277
- '--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,
278
- },
279
- text: {
280
- '--bcm-button-bg': 'transparent',
281
- '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
282
- '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
283
- '--bcm-button-border': 'transparent',
284
- '--bcm-button-text': `var(--bcm-ui-color-text-${status})`,
285
- },
286
- };
287
- const internalDefaultStyles = kindStyleMap[this.kind];
288
- // These are the "final" CSS custom properties used by the component's styling.
289
- // They use the "--bcm-button-custom-..." token if provided by the user,
290
- // otherwise, they fall back to the internal "--bcm-button-..." style defined above.
291
- const finalEffectiveStyles = {
292
- '--bcm-final-text-color': `var(--bcm-button-custom-text-color, ${internalDefaultStyles['--bcm-button-text']})`,
293
- '--bcm-final-border-color': `var(--bcm-button-custom-border-color, ${internalDefaultStyles['--bcm-button-border']})`,
294
- '--bcm-final-bg-color': `var(--bcm-button-custom-bg-color, ${internalDefaultStyles['--bcm-button-bg']})`,
295
- '--bcm-final-hover-bg-color': `var(--bcm-button-custom-hover-bg-color, ${internalDefaultStyles['--bcm-button-bg-hover']})`,
296
- '--bcm-final-active-bg-color': `var(--bcm-button-custom-active-bg-color, ${internalDefaultStyles['--bcm-button-bg-active']})`,
297
- };
298
- // return kindStyleMap[this.kind];
299
- return Object.assign(Object.assign({}, internalDefaultStyles), finalEffectiveStyles);
300
- }
301
- render() {
302
- const { icon, position } = this.buttonIcon;
303
- return (h(Host, { key: '33e438220fdb261ff87289f8dcbaa7e0601d73c1' }, h("button", { key: '4fb4d22a44bac12b3780f9570c734f60fdaba788', 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({
304
- size: this.size,
305
- kind: this.kind,
306
- fullWidth: this.fullWidth,
307
- disabled: this.disabled,
308
- loading: this.loading,
309
- position: this.position,
310
- }) }, this.loading && h("slot", { key: 'fa8dcbcba338f94700842fd0482d0261c9a1d3e3', name: "loading" }), h("span", { key: '345162b4ad0034d5081dee0438ceeefe4930ecfb' }, h("slot", { key: 'c65c9aa07fd2f159426192fc6239c394ee6ec58d', name: "prefix" }, position === 'prefix' && icon && h("i", { key: 'c94e32a5d308ba3ad98ac10239fc9a155f47e2ac', class: ' leading-none ' + icon }))), h("slot", { key: '171402bb9251492c7e5b0cf572fb0e2ae62a6add' }, this.buttonText), h("span", { key: 'ae3c5a885029b3d4c54e5ca21ac22adffa26b013' }, h("slot", { key: 'f80819d122624bb279d19822278c8e651dec27c7', name: "suffix" }, position === 'suffix' && icon && h("i", { key: '69631e99a8b7f47dd1d00984f582ec6e7b5433e8', class: ' leading-none ' + icon }))))));
311
- }
312
- };
313
- BcmButton.style = buttonCss;
314
-
315
- const drawerCss = ".contents{display:contents}:host{display:contents}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.inset-0{inset:0}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-40{z-index:40}.z-50{z-index:50}.m-0{margin:0}.flex{display:flex}.hidden{display:none}.h-6{height:1.5rem}.w-6{width:1.5rem}.flex-grow{flex-grow:1}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.-translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y:-100%}.translate-x-0{--tw-translate-x:0px}.translate-x-0,.translate-x-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x:100%}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y:100%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.overflow-y-auto{overflow-y:auto}.border-none{border-style:none}.bg-color-base{background-color:var(--bcm-ui-color-background-base-default)}.bg-color-default{background-color:var(--bcm-ui-color-background-default-default)}.bg-color-transparent{background-color:var(--bcm-ui-color-background-transparent-default)}.bg-transparent{background-color:transparent}.p-0{padding:0}.p-4{padding:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.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)}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-color-default{color:var(--bcm-ui-color-text-default)}.opacity-0{opacity:0}.opacity-100{opacity:1}.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-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:bg-color-default-hover:hover{background-color:var(--bcm-ui-color-background-default-hover)}.active\\:bg-color-default-active:active{background-color:var(--bcm-ui-color-background-default-active)}";
316
-
317
- const BcmDrawer = class {
318
- constructor(hostRef) {
319
- registerInstance(this, hostRef);
320
- this.bcmOpen = createEvent(this, "bcmOpen", 7);
321
- this.bcmClose = createEvent(this, "bcmClose", 7);
322
- this.bcmBeforeOpen = createEvent(this, "bcmBeforeOpen", 7);
323
- this.bcmBeforeClose = createEvent(this, "bcmBeforeClose", 7);
324
- this.open = false;
325
- this.size = 'medium';
326
- this.position = 'right';
327
- this.fullWidth = false;
328
- this.noHeader = false;
329
- this.drawerClass = tv({
330
- slots: {
331
- backdrop: 'fixed inset-0 bg-color-transparent z-40 transition-opacity duration-300',
332
- wrapper: 'bcm-ui-element fixed bg-color-base text-color-default z-50 transform transition-transform duration-300 ease-in-out flex flex-col',
333
- header: 'flex justify-between items-center bg-color-default text-color-default',
334
- title: 'font-semibold m-0 text-size-6',
335
- closeButton: 'text-size-5 font-medium text-color-default bg-transparent border-none p-0 h-6 w-6 hover:bg-color-default-hover cursor-pointer active:bg-color-default-active',
336
- content: 'overflow-y-auto flex-grow',
337
- },
338
- variants: {
339
- open: {
340
- true: {
341
- backdrop: 'opacity-100 visible',
342
- },
343
- false: {
344
- backdrop: 'opacity-0 invisible',
345
- },
346
- },
347
- position: {
348
- left: {
349
- wrapper: 'top-0 left-0 bottom-0',
350
- },
351
- right: {
352
- wrapper: 'top-0 right-0 bottom-0',
353
- },
354
- top: {
355
- wrapper: 'top-0 left-0 right-0',
356
- },
357
- bottom: {
358
- wrapper: 'bottom-0 left-0 right-0',
359
- },
360
- },
361
- size: {
362
- small: {
363
- header: 'py-3 px-4',
364
- content: 'p-4',
365
- },
366
- medium: {
367
- header: 'py-3 px-4',
368
- content: 'p-4',
369
- },
370
- large: {
371
- header: 'py-3 px-4',
372
- content: 'p-4',
373
- },
374
- },
375
- noHeader: {
376
- true: {
377
- header: 'hidden',
378
- },
379
- },
380
- },
381
- compoundVariants: [
382
- {
383
- open: true,
384
- position: ['left', 'right'],
385
- class: {
386
- wrapper: 'translate-x-0',
387
- },
388
- },
389
- {
390
- open: true,
391
- position: ['top', 'bottom'],
392
- class: {
393
- wrapper: 'translate-y-0',
394
- },
395
- },
396
- {
397
- open: false,
398
- position: 'left',
399
- class: {
400
- wrapper: '-translate-x-full',
401
- },
402
- },
403
- {
404
- open: false,
405
- position: 'right',
406
- class: {
407
- wrapper: 'translate-x-full',
408
- },
409
- },
410
- {
411
- open: false,
412
- position: 'top',
413
- class: {
414
- wrapper: '-translate-y-full',
415
- },
416
- },
417
- {
418
- open: false,
419
- position: 'bottom',
420
- class: {
421
- wrapper: 'translate-y-full',
422
- },
423
- },
424
- ],
425
- });
426
- }
427
- handleOpenChange(isOpen) {
428
- if (isOpen) {
429
- document.body.style.overflow = 'hidden';
430
- this.bcmOpen.emit();
431
- }
432
- else {
433
- document.body.style.overflow = '';
434
- this.bcmClose.emit();
435
- }
436
- }
437
- handleKeyDown(event) {
438
- if (event.key === 'Escape' && this.open) {
439
- this.hide();
440
- }
441
- }
442
- async show() {
443
- const event = this.bcmBeforeOpen.emit();
444
- if (!event.defaultPrevented) {
445
- this.open = true;
446
- }
447
- }
448
- async hide() {
449
- const event = this.bcmBeforeClose.emit();
450
- if (!event.defaultPrevented) {
451
- this.open = false;
452
- }
453
- }
454
- disconnectedCallback() {
455
- document.body.style.overflow = '';
456
- }
457
- getWrapperStyle() {
458
- const style = {};
459
- if (this.fullWidth) {
460
- if (this.position === 'left' || this.position === 'right') {
461
- style.width = '100vw';
462
- }
463
- else {
464
- style.height = '100vh';
465
- }
466
- return style;
467
- }
468
- if (this.position === 'left' || this.position === 'right') {
469
- switch (this.size) {
470
- case 'small':
471
- style.width = '320px';
472
- break;
473
- case 'medium':
474
- style.width = '480px';
475
- break;
476
- case 'large':
477
- style.width = '1064px';
478
- break;
479
- }
480
- }
481
- else {
482
- switch (this.size) {
483
- case 'small':
484
- style.height = '40vh';
485
- break;
486
- case 'medium':
487
- style.height = '60vh';
488
- break;
489
- case 'large':
490
- style.height = '90vh';
491
- break;
492
- }
493
- }
494
- return style;
495
- }
496
- render() {
497
- const { backdrop, wrapper, header, title, closeButton, content } = this.drawerClass({
498
- open: this.open,
499
- position: this.position,
500
- size: this.size,
501
- noHeader: this.noHeader,
502
- });
503
- return (h("div", { key: '44379905f1499a16d625ac4d1ff5e89fc6367d46', part: "base" }, h("div", { key: 'bc53e5322a61cd4af0691905c509d4c5fb765939', part: "backdrop", class: backdrop(), onClick: () => this.hide() }), h("div", { key: 'd5a666671d24b2f3b55b7462b5218a3e11358982', part: "wrapper", class: wrapper(), style: this.getWrapperStyle(), role: "dialog", "aria-modal": "true", "aria-hidden": !this.open ? 'true' : 'false', "aria-label": this.headerText }, h("div", { key: '5124de9d7fa8f3aa7267f0998f4c4f98f3ebbc4a', part: "header", class: header() }, h("h2", { key: '8aa4b971efa9fe0fafa1cfb94f0b6b96f21f2f15', part: "title", class: title() }, h("slot", { key: '949ae8f65d13e9e1c973c16a9f90205ac7e7042f', name: "header" }, this.headerText)), h("button", { key: 'a0c42761ee859e87dee5c267ea7245dde4fb8756', part: "close-button", class: closeButton(), onClick: () => this.hide(), "aria-label": "Close" }, h("bcm-icon", { key: '2df273d63da93eda2280759a909906fe4ae0c493', name: "fa-solid fa-xmark" }))), h("div", { key: 'b2532537d10f9aa0dcfa2fca8ac806577363e05b', part: "content", class: content() }, h("slot", { key: 'bfec5cff35a7bf7bf1d9801ba89559501e6f301f' })), h("div", { key: '4d44fdba62c74fd5c893c5296f998754228cf961', part: "footer" }, h("slot", { key: 'fd0a58127fd2f0ba0955cef629e55700142a8f32', name: "footer" })))));
504
- }
505
- get host() { return getElement(this); }
506
- static get watchers() { return {
507
- "open": ["handleOpenChange"]
508
- }; }
509
- };
510
- BcmDrawer.style = drawerCss;
511
-
512
- const dropdownCss = ".visible{visibility:visible}.hidden{display:none}.static{position:static}.flex{display:flex}.max-h-64{max-height:16rem}.w-full{width:100%}.min-w-10{min-width:2.5rem}.max-w-64{max-width:16rem}.flex-col{flex-direction:column}.items-center{align-items:center}.overflow-y-auto{overflow-y:auto}.rounded-lg{border-radius:var(--bcm-ui-border-radius-lg,8px)}.bg-color-basic-panel{background-color:var(--bcm-ui-color-background-basic-panel)}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default)}.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)}.outline{outline-style:solid}";
513
-
514
- const Dropdown = class {
515
- constructor(hostRef) {
516
- registerInstance(this, hostRef);
517
- this.bcmDropdownChange = createEvent(this, "bcmDropdownChange", 1);
518
- this.isReady = false;
519
- this.dropdownItems = [];
520
- this.dropdownClass = tv({
521
- base: 'dropdown flex flex-col items-center min-w-10 shadow-3 max-w-64 max-h-64 w-full bg-color-basic-panel rounded-lg py-1.5 overflow-y-auto',
522
- });
523
- this.handleSlotChange = () => {
524
- this.dropdownItems = Array.from(this.host.querySelectorAll('bcm-dropdown-item'));
525
- if (this.dropdownItems.length === 0) {
526
- console.warn('No dropdown items found in dropdown component');
527
- }
528
- };
529
- }
530
- componentDidLoad() {
531
- const button = this.host.shadowRoot.querySelector('bcm-button');
532
- if (button) {
533
- this.buttonRef = button;
534
- this.isReady = true;
535
- }
536
- }
537
- handleDropdownItemChange(event) {
538
- var _a;
539
- const { element, selected } = event === null || event === void 0 ? void 0 : event.detail;
540
- (_a = this.dropdownItems) === null || _a === void 0 ? void 0 : _a.forEach(item => {
541
- if (item != element) {
542
- item.selected = false;
543
- }
544
- });
545
- this.bcmDropdownChange.emit({
546
- element: element,
547
- selected,
548
- });
549
- }
550
- render() {
551
- return (h(Host, { key: '6aaff12c84d38c32df5bc8dccb83421afb315eef' }, h("bcm-button", { key: '5612cef7303a6b839531e125c895a4e7b8d32282', kind: "outline" }, h("span", { key: '951418845cb1ec71fe6dc5bbbc33c49934447640', part: "text" }, this.text)), this.isReady && (h("bcm-linked", { key: 'd594359d6a9b7c673307c6a92e6d69cc47be3e1a', targetElement: this.buttonRef }, h("div", { key: '9badba5b1e99af6a5d58b02e849cb0923e49dfd8', part: "dropdown-container", class: this.dropdownClass() }, h("slot", { key: 'c8191f215600170475d514bb6b4056047e6442d2', onSlotchange: this.handleSlotChange }))))));
552
- }
553
- get host() { return getElement(this); }
554
- };
555
- Dropdown.style = dropdownCss;
556
-
557
- const dropdownItemCss = ".flex{display:flex}:host{display:inline-block;width:100%}::slotted([slot=left-content]){align-items:center;display:flex;flex-direction:row;gap:8px}::slotted([slot=right-content]){align-items:center;display:flex;flex-direction:row;gap:8px}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.w-full{width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.gap-2{gap:.5rem}.text-pretty{text-wrap:pretty}.bg-\\[var\\(--bcm-ui-color-background-base-active\\)\\]{background-color:var(--bcm-ui-color-background-base-active)}.bg-\\[var\\(--bcm-ui-color-background-palette-red-default\\)\\]{background-color:var(--bcm-ui-color-background-palette-red-default)}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.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-\\[var\\(--bcm-ui-color-background-base-active\\)\\]:hover{background-color:var(--bcm-ui-color-background-base-active)}.hover\\:bg-\\[var\\(--bcm-ui-color-background-base-hover\\)\\]:hover{background-color:var(--bcm-ui-color-background-base-hover)}.hover\\:bg-\\[var\\(--bcm-ui-color-background-palette-red-default\\)\\]:hover{background-color:var(--bcm-ui-color-background-palette-red-default)}";
558
-
559
- const DropdownItem = class {
560
- constructor(hostRef) {
561
- registerInstance(this, hostRef);
562
- this.bcmDropDownItemChange = createEvent(this, "bcmDropDownItemChange", 1);
563
- this.selected = false;
564
- this.error = false;
565
- this.disabled = false;
566
- this.dropdownItemClass = tv({
567
- base: 'dropdown-item bcm-ui-element bcm-ui-content-display flex flex-row gap-2 py-2 px-4 cursor-pointer text-color',
568
- variants: {
569
- selected: {
570
- true: 'bg-[var(--bcm-ui-color-background-base-active)] hover:bg-[var(--bcm-ui-color-background-base-active)]',
571
- false: 'hover:bg-[var(--bcm-ui-color-background-base-hover)]',
572
- },
573
- error: {
574
- true: 'bg-[var(--bcm-ui-color-background-palette-red-default)] hover:bg-[var(--bcm-ui-color-background-palette-red-default)]',
575
- false: '',
576
- },
577
- disabled: {
578
- true: '', // should be discuss with ux team
579
- false: '',
580
- },
581
- },
582
- defaultVariants: {
583
- selected: false,
584
- error: false,
585
- disabled: false,
586
- },
587
- }, {
588
- twMerge: false,
589
- });
590
- }
591
- handleClick() {
592
- this.selected = true;
593
- this.bcmDropDownItemChange.emit({
594
- element: this.host,
595
- selected: this.selected,
596
- });
597
- }
598
- render() {
599
- var _a;
600
- return (h("div", { key: '69beaac4c9225bc7803b4002f1543c18e76e36cc', "aria-checked": this.selected, class: this.dropdownItemClass({
601
- selected: this.selected,
602
- error: this.error,
603
- }), onClick: () => this.handleClick() }, h("slot", { key: 'ca2712023285689a1774b5869d982e87d3add46a', name: "left-content" }, this.icon && h("bcm-icon", { key: 'bef7483a47c823ed746c39ae37acc3a2360f0c59', "icon-name": this.icon })), h("div", { key: 'a9bdddf97d4a4e07e601599a4adb11354227dd0f', class: "flex flex-row text-pretty w-full" }, h("slot", { key: '51c488350d2daabc32fc9693211a4e89d8cce16f' }, this.text)), h("slot", { key: '9bf3f8b4affa41ea72f181a073aea8cd56f8a2df', name: "right-content" }, (_a = this.rightIcons) === null || _a === void 0 ? void 0 : _a.map(icon => (h("bcm-icon", { "icon-name": icon }))))));
604
- }
605
- get host() { return getElement(this); }
606
- };
607
- DropdownItem.style = dropdownItemCss;
608
-
609
- /**
610
- * Checks if a named slot has any content
611
- * @param element - The host element (component instance)
612
- * @param slotName - Name of the slot to check
613
- * @returns boolean indicating if the slot has any assigned nodes
614
- */
615
- const checkSlotContent = (element, slotName) => {
616
- var _a;
617
- const slot = (_a = element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`slot[name="${slotName}"]`);
618
- if (!slot)
619
- return false;
620
- const assignedNodes = slot.assignedNodes();
621
- return assignedNodes.length > 0;
622
- };
623
-
624
- const inputCss = ".visible{visibility:visible}.collapse{visibility:collapse}.relative{position:relative}.block{display:block}.table{display:table}.contents{display:contents}.hidden{display:none}.border-collapse{border-collapse:collapse}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.border{border-width:1px}.underline{text-decoration-line:underline}.outline{outline-style:solid}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid oklch(92.8% .006 264.531deg);box-sizing:border-box}:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:Inter,sans-serif;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:oklch(70.7% .022 261.325deg);opacity:1}input::placeholder,textarea::placeholder{color:oklch(70.7% .022 261.325deg);opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:host{display:inline-block}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.mt-1{margin-top:.25rem}.flex{display:flex}.h-full{height:100%}.w-6{width:1.5rem}.w-full{width:100%}.flex-1{flex:1 1 0%}.cursor-not-allowed{cursor:not-allowed}.appearance-none{appearance:none}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.text-ellipsis{text-overflow:ellipsis}.rounded{border-radius:var(--bcm-ui-border-radius-default,6px)}.border-0{border-width:0}.border-solid{border-style:solid}.border-\\[--bcm-ui-color-border-default\\]{border-color:var(--bcm-ui-color-border-default)}.border-\\[--bcm-ui-color-border-error\\]{border-color:var(--bcm-ui-color-border-error)}.border-\\[--bcm-ui-color-border-info\\]{border-color:var(--bcm-ui-color-border-info)}.border-\\[--bcm-ui-color-border-success\\]{border-color:var(--bcm-ui-color-border-success)}.border-\\[--bcm-ui-color-border-warning\\]{border-color:var(--bcm-ui-color-border-warning)}.bg-\\[--bcm-ui-color-background-base-default\\]{background-color:var(--bcm-ui-color-background-base-default)}.bg-transparent{background-color:transparent}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-px{padding-bottom:1px;padding-top:1px}.font-sans{font-family:Inter,sans-serif}.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)}.font-medium{font-weight:500}.leading-6{line-height:1.5rem}.text-\\[--bcm-ui-color-text-caption\\]{color:var(--bcm-ui-color-text-caption)}.text-\\[--bcm-ui-color-text-default\\]{color:var(--bcm-ui-color-text-default)}.text-\\[--bcm-ui-color-text-disabled\\]{color:var(--bcm-ui-color-text-disabled)}.text-\\[--bcm-ui-color-text-error\\]{color:var(--bcm-ui-color-text-error)}.text-\\[--bcm-ui-color-text-info\\]{color:var(--bcm-ui-color-text-info)}.text-\\[--bcm-ui-color-text-success\\]{color:var(--bcm-ui-color-text-success)}.text-\\[--bcm-ui-color-text-warning\\]{color:var(--bcm-ui-color-text-warning)}.text-color-disabled{color:var(--bcm-ui-color-text-disabled)}.text-color-label{color:var(--bcm-ui-color-text-label)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.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-0{outline-width:0}.blur{--tw-blur:blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-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}.placeholder\\:font-normal::placeholder{font-weight:400}.placeholder\\:text-\\[--bcm-ui-color-text-placeholder\\]::placeholder{color:var(--bcm-ui-color-text-placeholder)}.hover\\:border-\\[--bcm-ui-color-border-error\\]:hover{border-color:var(--bcm-ui-color-border-error)}.hover\\:border-\\[--bcm-ui-color-border-info\\]:hover{border-color:var(--bcm-ui-color-border-info)}.hover\\:border-\\[--bcm-ui-color-border-primary\\]:hover{border-color:var(--bcm-ui-color-border-primary)}.hover\\:border-\\[--bcm-ui-color-border-success\\]:hover{border-color:var(--bcm-ui-color-border-success)}.hover\\:border-\\[--bcm-ui-color-border-warning\\]:hover{border-color:var(--bcm-ui-color-border-warning)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-error\\]:has(:focus){border-color:var(--bcm-ui-color-border-error)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-info\\]:has(:focus){border-color:var(--bcm-ui-color-border-info)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-primary\\]:has(:focus){border-color:var(--bcm-ui-color-border-primary)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-success\\]:has(:focus){border-color:var(--bcm-ui-color-border-success)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-warning\\]:has(:focus){border-color:var(--bcm-ui-color-border-warning)}.\\[\\&\\:\\:-webkit-inner-spin-button\\]\\:appearance-none::-webkit-inner-spin-button{appearance:none}";
625
-
626
- const BcmInput = class {
627
- constructor(hostRef) {
628
- registerInstance(this, hostRef);
629
- this.bcmInput = createEvent(this, "bcmInput", 1);
630
- this.bcmChange = createEvent(this, "bcmChange", 1);
631
- this.bcmFocus = createEvent(this, "bcmFocus", 1);
632
- this.bcmBlur = createEvent(this, "bcmBlur", 1);
633
- this.bcmKeyDown = createEvent(this, "bcmKeyDown", 1);
634
- this.bcmKeyUp = createEvent(this, "bcmKeyUp", 1);
635
- this.isFocused = false;
636
- this.isValid = true;
637
- this.internalStatus = 'default';
638
- this.isPasswordVisible = false;
639
- /** Input value */
640
- this.value = '';
641
- /** Input id */
642
- this._id = generateId('input');
643
- /** Controls the input size */
644
- this.size = 'medium';
645
- /** Defines the input's status/state */
646
- this.status = 'default';
647
- /** Full width input */
648
- this.fullWidth = false;
649
- /** HTML input type */
650
- this.type = 'text';
651
- /** Whether the input is disabled */
652
- this.disabled = false;
653
- /** Whether the input is readonly */
654
- this.readonly = false;
655
- /** Whether the input is required */
656
- this.required = false;
657
- /** Whether to use native form validation
658
- * If false, component will handle validation internally
659
- */
660
- this.useNativeValidation = true;
661
- this.onInput = (event) => {
662
- const input = event.target;
663
- this.value = input.value;
664
- this.bcmInput.emit(event);
665
- this.validateInput();
666
- };
667
- this.onChange = (event) => {
668
- this.bcmChange.emit(event);
669
- };
670
- this.onFocus = (event) => {
671
- this.isFocused = true;
672
- this.bcmFocus.emit(event);
673
- };
674
- this.onBlur = (event) => {
675
- this.isFocused = false;
676
- this.bcmBlur.emit(event);
677
- this.validateInput();
678
- };
679
- this.onKeyDown = (event) => {
680
- this.bcmKeyDown.emit(event);
681
- };
682
- this.onKeyUp = (event) => {
683
- this.bcmKeyUp.emit(event);
684
- };
685
- this.styleClass = tv({
686
- slots: {
687
- base: [
688
- 'bcm-input bcm-input__container',
689
- 'bg-[--bcm-ui-color-background-base-default]',
690
- 'text-[--bcm-ui-color-text-default]',
691
- 'border border-solid rounded',
692
- 'flex items-center justify-between',
693
- 'transition-colors duration-200',
694
- 'px-2',
695
- ],
696
- inputClass: [
697
- 'input',
698
- 'w-full flex-1',
699
- 'border-0 outline-0 bg-transparent',
700
- 'appearance-none text-ellipsis',
701
- 'text-[--bcm-ui-color-text-default] placeholder:text-[--bcm-ui-color-text-placeholder] placeholder:font-normal',
702
- 'font-sans antialiased font-medium',
703
- 'px-1',
704
- '[appearance:textfield][&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none',
705
- ],
706
- },
707
- variants: {
708
- size: {
709
- small: {
710
- base: '',
711
- inputClass: 'text-size-4 py-px',
712
- },
713
- medium: {
714
- base: '',
715
- inputClass: 'text-size-5 leading-6 py-1',
716
- },
717
- large: {
718
- base: '',
719
- inputClass: 'text-size-6 py-2',
720
- },
721
- },
722
- status: {
723
- default: {
724
- base: ['border-[--bcm-ui-color-border-default]', 'hover:border-[--bcm-ui-color-border-primary]', 'has-[:focus]:border-[--bcm-ui-color-border-primary]'],
725
- },
726
- error: {
727
- base: ['border-[--bcm-ui-color-border-error]', 'hover:border-[--bcm-ui-color-border-error]', 'has-[:focus]:border-[--bcm-ui-color-border-error]'],
728
- },
729
- success: {
730
- base: ['border-[--bcm-ui-color-border-success]', 'hover:border-[--bcm-ui-color-border-success]', 'has-[:focus]:border-[--bcm-ui-color-border-success]'],
731
- },
732
- warning: {
733
- base: ['border-[--bcm-ui-color-border-warning]', 'hover:border-[--bcm-ui-color-border-warning]', 'has-[:focus]:border-[--bcm-ui-color-border-warning]'],
734
- },
735
- info: {
736
- base: ['border-[--bcm-ui-color-border-info]', 'hover:border-[--bcm-ui-color-border-info]', 'has-[:focus]:border-[--bcm-ui-color-border-info]'],
737
- },
738
- },
739
- fullWidth: {
740
- true: 'full-width w-full',
741
- },
742
- disabled: {
743
- true: 'disabled cursor-not-allowed',
744
- false: '',
745
- },
746
- focused: {
747
- true: {
748
- base: '',
749
- },
750
- },
751
- },
752
- defaultVariants: {
753
- size: 'medium',
754
- status: 'default',
755
- fullWidth: false,
756
- disabled: false,
757
- focused: false,
758
- },
759
- }, {
760
- twMerge: false,
761
- });
762
- this.togglePasswordVisibility = () => {
763
- this.isPasswordVisible = !this.isPasswordVisible;
764
- this.inputRef.type = this.isPasswordVisible ? 'text' : 'password';
765
- };
766
- this.PasswordToggleButton = () => {
767
- var _a;
768
- if (this.type !== 'password' || this.disabled || this.readonly || ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) === 0)
769
- return null;
770
- 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 })));
771
- };
772
- this.iconSize = {
773
- small: 14,
774
- medium: 16,
775
- large: 18,
776
- }[this.size];
777
- }
778
- handleValueChange(newValue) {
779
- if (this.inputRef) {
780
- this.inputRef.value = newValue;
781
- }
782
- }
783
- watchStatus(newValue) {
784
- this.internalStatus = newValue;
785
- }
786
- watchErrorMessage(newValue) {
787
- this.internalErrorMessage = newValue;
788
- }
789
- async setFocus() {
790
- var _a;
791
- (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
792
- }
793
- async setBlur() {
794
- var _a;
795
- (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.blur();
796
- }
797
- async select() {
798
- var _a;
799
- (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.select();
800
- }
801
- /** Sets locale and messages for all inputs */
802
- async setLocale(locale, messages) {
803
- // Set messages and update validation immediately
804
- setValidationMessages(locale, messages);
805
- // Mevcut validasyon mesajını güncelle
806
- if (!this.isValid) {
807
- this.validateInput();
808
- }
809
- }
810
- componentWillLoad() {
811
- // I18n için default mesajları set et
812
- setValidationMessages('en', defaultValidationMessages);
813
- this.internalStatus = this.status;
814
- this.internalErrorMessage = this.errorMessage;
815
- }
816
- validateInput() {
817
- if (!this.inputRef)
818
- return;
819
- // Reset validation state
820
- this.isValid = true;
821
- this.validationMessage = '';
822
- const value = this.inputRef.value;
823
- // Required check
824
- if (this.required && !value) {
825
- this.isValid = false;
826
- this.validationMessage = getValidationMessage('required');
827
- this.internalStatus = 'error';
828
- this.internalErrorMessage = this.validationMessage;
829
- return;
830
- }
831
- // Minimum length check
832
- else if (this.minLength && value.length < this.minLength) {
833
- this.isValid = false;
834
- this.validationMessage = getValidationMessage('minlength', { min: this.minLength });
835
- }
836
- // Maximum length check
837
- else if (this.maxLength && value.length > this.maxLength) {
838
- this.isValid = false;
839
- this.validationMessage = getValidationMessage('maxlength', { max: this.maxLength });
840
- }
841
- // Pattern check
842
- else if (this.pattern && !new RegExp(this.pattern).test(value)) {
843
- this.isValid = false;
844
- this.validationMessage = getValidationMessage('pattern');
845
- }
846
- // Email check
847
- else if (this.type === 'email' && value && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
848
- this.isValid = false;
849
- this.validationMessage = getValidationMessage('email');
850
- }
851
- // Number range check
852
- else if (this.type === 'number' && value) {
853
- const numValue = parseFloat(value);
854
- if (this.min !== undefined && numValue < this.min) {
855
- this.isValid = false;
856
- this.validationMessage = getValidationMessage('min', { min: this.min });
857
- }
858
- else if (this.max !== undefined && numValue > this.max) {
859
- this.isValid = false;
860
- this.validationMessage = getValidationMessage('max', { max: this.max });
861
- }
862
- }
863
- // Update component state
864
- this.internalStatus = this.isValid ? 'default' : 'error';
865
- this.internalErrorMessage = this.validationMessage;
866
- }
867
- hasSlotContent(slotName) {
868
- return checkSlotContent(this.el, slotName);
869
- }
870
- getDefaultIconForType() {
871
- return; // TODO: Will be implemented later
872
- // return defaultIcons[this.type as keyof typeof defaultIcons];
873
- }
874
- render() {
875
- const inputId = this._id + '-input' || this.name;
876
- const { base, inputClass } = this.styleClass({
877
- size: this.size,
878
- status: this.internalStatus,
879
- fullWidth: this.fullWidth,
880
- disabled: this.disabled,
881
- focused: this.isFocused,
882
- });
883
- return (h("div", { key: 'effaec9bfaf730d8dc64c1eebb18f24f1b81d6a7', class: "bcm-ui-element" }, this.label && (h("label", { key: '1ab316bc8c04c5a17280d539976f8304d9a146cf', class: classNames('input-label font-medium', {
884
- 'text-color-label': !this.disabled,
885
- 'text-color-disabled': this.disabled,
886
- }, {
887
- 'text-size-3': this.size === 'small',
888
- 'text-size-4': this.size === 'medium',
889
- 'text-size-5': this.size === 'large',
890
- }), htmlFor: inputId }, h("slot", { key: '89fb855f3c84bd43759fdf3ab19298dd376e9714', name: "label" }, this.label), this.required && h("span", { key: 'e82f1aa9da8e7b6098128e6a9fb49453aab662a9' }, "*"))), h("div", { key: 'b2503d3e60b246fe6342c0ae9ad74c95f993b11b', class: base() }, (this.hasSlotContent('prefix') || this.prefixIcon || this.getDefaultIconForType()) && (h("div", { key: '311435f21f3e357d8f7e87e191152d32b2b39ba3', class: "flex items-center gap-2 px-2" }, (this.prefixIcon || this.getDefaultIconForType()) && (h("bcm-icon", { key: '9bcff2b57c2364e5e84c4cd5202c9a7c5c6a59f6', class: "prefix-icon", "icon-name": this.prefixIcon || this.getDefaultIconForType(), size: this.iconSize })), h("slot", { key: 'bacfdc130d70df0c8e6bcadb9fc4d58a66067a47', name: "prefix" }))), h("input", { key: '9d78831b435a606f06214bfb9ac8a17f743c8ba9', 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: '060a4cb048a6f041acadfb6375307d736e18c6e4', class: "flex items-center gap-2 px-2" }, h("slot", { key: '54536a8b871e6524f3e2aa885ff38dbe8e1f7337', name: "suffix" }), this.suffixIcon && h("bcm-icon", { key: 'ec7482256e4fc4154ddaef6070045b6c926d9f7b', class: "suffix-icon", "icon-name": this.suffixIcon, size: this.iconSize }))), this.PasswordToggleButton()), (this.captionText || this.internalErrorMessage || this.validationMessage) && (h("div", { key: '6c09a0de12102b805ad224da2007405d4f03e03f', class: classNames('input-caption-text font-regular mt-1', {
891
- 'text-[--bcm-ui-color-text-caption]': !this.disabled && this.internalStatus === 'default',
892
- 'text-[--bcm-ui-color-text-error]': !this.disabled && (this.internalStatus === 'error' || !this.isValid),
893
- 'text-[--bcm-ui-color-text-success]': !this.disabled && this.internalStatus === 'success',
894
- 'text-[--bcm-ui-color-text-warning]': !this.disabled && this.internalStatus === 'warning',
895
- 'text-[--bcm-ui-color-text-info]': !this.disabled && this.internalStatus === 'info',
896
- 'text-[--bcm-ui-color-text-disabled]': this.disabled,
897
- }, {
898
- 'text-size-3': this.size === 'small',
899
- 'text-size-4': this.size === 'medium',
900
- 'text-size-5': this.size === 'large',
901
- }) }, !this.isValid ? this.validationMessage : this.internalStatus === 'error' ? this.internalErrorMessage : this.captionText))));
902
- }
903
- get el() { return getElement(this); }
904
- static get watchers() { return {
905
- "value": ["handleValueChange"],
906
- "status": ["watchStatus"],
907
- "errorMessage": ["watchErrorMessage"]
908
- }; }
909
- };
910
- BcmInput.style = inputCss;
911
-
912
- const linkedCss = ".absolute{position:absolute}.relative{position:relative}.block{display:block}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.border{border-width:1px}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}bcm-linked{display:block;position:relative}bcm-linked[append-to-body]{display:none}.floating-content{min-width:-moz-max-content;min-width:max-content;transition:opacity .2s ease,visibility .2s ease,transform .2s ease;will-change:transform,opacity}.floating-visible{animation:fadeInScale .2s ease-out}.floating-hidden{display:none!important;pointer-events:none}.floating-wrapper{position:relative;z-index:1}@keyframes fadeInScale{0%{opacity:0;transform:scale(.95) translateY(-5px)}to{opacity:1;transform:scale(1) translateY(0)}}.floating-arrow{z-index:-1}.floating-arrow,.floating-arrow:before{height:10px;position:absolute;width:10px}.floating-arrow:before{background:#fff;border:1px solid #e2e8f0;content:\"\";transform:rotate(45deg)}.arrow-top{bottom:-5px}.arrow-bottom,.arrow-top{left:50%;transform:translateX(-50%)}.arrow-bottom{top:-5px}.arrow-left{right:-5px}.arrow-left,.arrow-right{top:50%;transform:translateY(-50%)}.arrow-right{left:-5px}.arrow-top:before{border-bottom:0;border-right:0}.arrow-bottom:before{border-left:0;border-top:0}.arrow-left:before{border-right:0;border-top:0}.arrow-right:before{border-bottom:0;border-left:0}@media (max-width:768px){.floating-content{max-height:calc(100vh - 32px);max-width:calc(100vw - 32px)}}.static{position:static}.flex{display:flex}.max-h-64{max-height:16rem}.w-full{width:100%}.min-w-10{min-width:2.5rem}.max-w-64{max-width:16rem}.flex-col{flex-direction:column}.items-center{align-items:center}.overflow-y-auto{overflow-y:auto}.rounded-lg{border-radius:var(--bcm-ui-border-radius-lg,8px)}.bg-color-basic-panel{background-color:var(--bcm-ui-color-background-basic-panel)}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default)}.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)}.outline{outline-style:solid}.visible{visibility:visible}.fixed{position:fixed}.hidden{display:none}.resize{resize:both}.blur{--tw-blur:blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}";
913
-
914
- const BcmLinked = class {
915
- constructor(hostRef) {
916
- registerInstance(this, hostRef);
917
- this.bcmShow = createEvent(this, "bcmShow", 7);
918
- this.bcmHide = createEvent(this, "bcmHide", 7);
919
- this.bcmShown = createEvent(this, "bcmShown", 7);
920
- this.bcmHidden = createEvent(this, "bcmHidden", 7);
921
- // Trigger configuration
922
- this.trigger = 'click';
923
- this.placement = 'bottom-start';
924
- // Timing configuration
925
- this.showDelay = 0;
926
- this.hideDelay = 0;
927
- // Positioning configuration
928
- this.offset = 8;
929
- this.arrow = false;
930
- this.disabled = false;
931
- // Style configuration
932
- this.zIndex = 1000;
933
- this.appendToBody = false;
934
- this.destroyOnHide = false;
935
- // State
936
- this.isVisible = false;
937
- this.isReady = false;
938
- this.handleMouseEnter = () => {
939
- this.clearTimeouts();
940
- if (this.showDelay > 0) {
941
- this.showTimeout = setTimeout(() => this.show(), this.showDelay);
942
- }
943
- else {
944
- this.show();
945
- }
946
- };
947
- this.handleMouseLeave = () => {
948
- this.clearTimeouts();
949
- if (this.hideDelay > 0) {
950
- this.hideTimeout = setTimeout(() => this.hide(), this.hideDelay);
951
- }
952
- else {
953
- this.hide();
954
- }
955
- };
956
- this.handleFloatingMouseEnter = () => {
957
- this.clearTimeouts();
958
- };
959
- this.handleFloatingMouseLeave = () => {
960
- this.clearTimeouts();
961
- if (this.hideDelay > 0) {
962
- this.hideTimeout = setTimeout(() => this.hide(), this.hideDelay);
963
- }
964
- else {
965
- this.hide();
966
- }
967
- };
968
- this.handleClick = (e) => {
969
- e.stopPropagation();
970
- this.toggle();
971
- };
972
- this.handleFocus = () => {
973
- this.show();
974
- };
975
- this.handleBlur = () => {
976
- this.hide();
977
- };
978
- }
979
- // Watch for changes
980
- setupTarget() {
981
- this.disconnectTarget();
982
- this.connectTarget();
983
- }
984
- onVisibilityChange(newValue) {
985
- if (newValue) {
986
- this.updatePosition();
987
- this.bcmShown.emit();
988
- }
989
- else {
990
- this.bcmHidden.emit();
991
- }
992
- }
993
- async componentDidLoad() {
994
- // Wait for render
995
- await new Promise(resolve => requestAnimationFrame(resolve));
996
- this.floatingEl = this.host.querySelector('.floating-content');
997
- if (this.floatingEl) {
998
- this.isReady = true;
999
- this.connectTarget();
1000
- this.setupFloatingObserver();
1001
- console.log('✅ bcm-linked initialized successfully');
1002
- }
1003
- else {
1004
- console.error('❌ Could not find .floating-content element');
1005
- }
1006
- }
1007
- disconnectedCallback() {
1008
- var _a, _b;
1009
- this.disconnectTarget();
1010
- this.clearTimeouts();
1011
- (_a = this.cleanup) === null || _a === void 0 ? void 0 : _a.call(this);
1012
- (_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
1013
- // Restore element to original position if component is destroyed while in portal
1014
- if (this.appendToBody && this.floatingEl && this.originalParent) {
1015
- this.originalParent.appendChild(this.floatingEl);
1016
- }
1017
- }
1018
- connectTarget() {
1019
- if (!this.isReady)
1020
- return;
1021
- // Find target element
1022
- this.targetEl =
1023
- this.targetElement || (this.targetId ? document.getElementById(this.targetId) : null) || this.host.previousElementSibling || this.host.parentElement;
1024
- if (!this.targetEl) {
1025
- console.warn('bcm-linked: No target element found');
1026
- return;
1027
- }
1028
- // Setup event listeners based on trigger type
1029
- this.setupEventListeners();
1030
- // Setup auto-update for position
1031
- if (this.targetEl && this.floatingEl) {
1032
- this.cleanup = autoUpdate(this.targetEl, this.floatingEl, () => {
1033
- if (this.isVisible) {
1034
- this.updatePosition();
1035
- }
1036
- });
1037
- }
1038
- // Setup resize observer for responsive positioning
1039
- this.resizeObserver = new ResizeObserver(() => {
1040
- if (this.isVisible) {
1041
- this.updatePosition();
1042
- }
1043
- });
1044
- this.resizeObserver.observe(this.floatingEl);
1045
- }
1046
- disconnectTarget() {
1047
- var _a, _b;
1048
- if (this.targetEl) {
1049
- this.removeEventListeners();
1050
- }
1051
- (_a = this.cleanup) === null || _a === void 0 ? void 0 : _a.call(this);
1052
- (_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
1053
- }
1054
- setupEventListeners() {
1055
- var _a, _b;
1056
- if (!this.targetEl || this.disabled)
1057
- return;
1058
- switch (this.trigger) {
1059
- case 'hover':
1060
- this.targetEl.addEventListener('mouseenter', this.handleMouseEnter);
1061
- this.targetEl.addEventListener('mouseleave', this.handleMouseLeave);
1062
- (_a = this.floatingEl) === null || _a === void 0 ? void 0 : _a.addEventListener('mouseenter', this.handleFloatingMouseEnter);
1063
- (_b = this.floatingEl) === null || _b === void 0 ? void 0 : _b.addEventListener('mouseleave', this.handleFloatingMouseLeave);
1064
- break;
1065
- case 'click':
1066
- this.targetEl.addEventListener('click', this.handleClick);
1067
- this.setupClickOutside();
1068
- break;
1069
- case 'focus':
1070
- this.targetEl.addEventListener('focus', this.handleFocus);
1071
- this.targetEl.addEventListener('blur', this.handleBlur);
1072
- break;
1073
- }
1074
- }
1075
- removeEventListeners() {
1076
- var _a, _b;
1077
- if (!this.targetEl)
1078
- return;
1079
- this.targetEl.removeEventListener('mouseenter', this.handleMouseEnter);
1080
- this.targetEl.removeEventListener('mouseleave', this.handleMouseLeave);
1081
- this.targetEl.removeEventListener('click', this.handleClick);
1082
- this.targetEl.removeEventListener('focus', this.handleFocus);
1083
- this.targetEl.removeEventListener('blur', this.handleBlur);
1084
- (_a = this.floatingEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseenter', this.handleFloatingMouseEnter);
1085
- (_b = this.floatingEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseleave', this.handleFloatingMouseLeave);
1086
- this.removeClickOutside();
1087
- }
1088
- setupClickOutside() {
1089
- this.clickOutsideHandler = (e) => {
1090
- var _a, _b;
1091
- const target = e.target;
1092
- if (!((_a = this.floatingEl) === null || _a === void 0 ? void 0 : _a.contains(target)) && !((_b = this.targetEl) === null || _b === void 0 ? void 0 : _b.contains(target)) && !this.host.contains(target)) {
1093
- this.hide();
1094
- }
1095
- };
1096
- document.addEventListener('click', this.clickOutsideHandler, true);
1097
- }
1098
- removeClickOutside() {
1099
- if (this.clickOutsideHandler) {
1100
- document.removeEventListener('click', this.clickOutsideHandler, true);
1101
- this.clickOutsideHandler = undefined;
1102
- }
1103
- }
1104
- clearTimeouts() {
1105
- if (this.showTimeout) {
1106
- clearTimeout(this.showTimeout);
1107
- this.showTimeout = undefined;
1108
- }
1109
- if (this.hideTimeout) {
1110
- clearTimeout(this.hideTimeout);
1111
- this.hideTimeout = undefined;
1112
- }
1113
- }
1114
- async updatePosition() {
1115
- if (!this.targetEl || !this.floatingEl || !this.isVisible)
1116
- return;
1117
- // Use autoPlacement only for bottom-start (dropdown default)
1118
- // For other placements, respect the manual placement with flip fallback
1119
- // const useAutoPlacement = this.placement === 'bottom-start';
1120
- const middleware = [
1121
- offset(this.offset),
1122
- // useAutoPlacement
1123
- // ? autoPlacement({
1124
- // allowedPlacements: ['bottom-start', 'bottom-end', 'bottom', 'top-start', 'top-end', 'top', 'right-start', 'right-end', 'right', 'left-start', 'left-end', 'left'],
1125
- // boundary: document.body,
1126
- // })
1127
- // :
1128
- flip({
1129
- fallbackPlacements: ['top', 'bottom', 'left', 'right', 'top-start', 'top-end', 'bottom-start', 'bottom-end', 'left-start', 'left-end', 'right-start', 'right-end'],
1130
- }),
1131
- shift({
1132
- padding: 8,
1133
- }),
1134
- ];
1135
- const { x, y, placement } = await computePosition(this.targetEl, this.floatingEl, {
1136
- placement: this.placement,
1137
- middleware,
1138
- strategy: 'fixed',
1139
- });
1140
- Object.assign(this.floatingEl.style, {
1141
- left: `${x}px`,
1142
- top: `${y}px`,
1143
- zIndex: this.zIndex.toString(),
1144
- });
1145
- // Update arrow if enabled
1146
- if (this.arrow) {
1147
- this.updateArrow(placement);
1148
- }
1149
- }
1150
- updateArrow(placement) {
1151
- var _a;
1152
- const arrow = (_a = this.floatingEl) === null || _a === void 0 ? void 0 : _a.querySelector('.floating-arrow');
1153
- if (!arrow)
1154
- return;
1155
- // Remove all arrow classes
1156
- arrow.className = 'floating-arrow';
1157
- // Add placement-specific class
1158
- const side = placement.split('-')[0];
1159
- arrow.classList.add(`arrow-${side}`);
1160
- }
1161
- async show() {
1162
- if (this.disabled || this.isVisible)
1163
- return;
1164
- this.bcmShow.emit();
1165
- // Portalling: Move the floating element to the body
1166
- if (this.appendToBody && this.floatingEl) {
1167
- this.originalParent = this.floatingEl.parentNode;
1168
- this.originalNextSibling = this.floatingEl.nextSibling;
1169
- document.body.appendChild(this.floatingEl);
1170
- }
1171
- this.isVisible = true;
1172
- // Use requestAnimationFrame to ensure the element is visible before positioning
1173
- await new Promise(resolve => requestAnimationFrame(resolve));
1174
- await this.updatePosition();
1175
- }
1176
- async hide() {
1177
- if (!this.isVisible)
1178
- return;
1179
- this.bcmHide.emit();
1180
- this.isVisible = false;
1181
- // Portalling: Restore the floating element to its original position
1182
- if (this.appendToBody && this.floatingEl && this.originalParent) {
1183
- if (this.originalNextSibling) {
1184
- this.originalParent.insertBefore(this.floatingEl, this.originalNextSibling);
1185
- }
1186
- else {
1187
- this.originalParent.appendChild(this.floatingEl);
1188
- }
1189
- this.originalParent = undefined;
1190
- this.originalNextSibling = undefined;
1191
- }
1192
- if (this.destroyOnHide && this.floatingEl && this.floatingEl.parentNode) {
1193
- this.floatingEl.parentNode.removeChild(this.floatingEl);
1194
- }
1195
- }
1196
- async toggle() {
1197
- if (this.isVisible) {
1198
- await this.hide();
1199
- }
1200
- else {
1201
- await this.show();
1202
- }
1203
- }
1204
- async updatePositioning() {
1205
- await this.updatePosition();
1206
- }
1207
- setupFloatingObserver() {
1208
- if (!this.floatingEl)
1209
- return;
1210
- // Observe floating element size changes for position updates
1211
- this.resizeObserver = new ResizeObserver(() => {
1212
- if (this.isVisible) {
1213
- this.updatePosition();
1214
- }
1215
- });
1216
- this.resizeObserver.observe(this.floatingEl);
1217
- }
1218
- render() {
1219
- const floatingClasses = {
1220
- 'floating-content': true,
1221
- 'floating-visible': this.isVisible,
1222
- 'floating-hidden': !this.isVisible,
1223
- 'floating-with-arrow': this.arrow,
1224
- 'floating-destroy-on-hide': this.destroyOnHide,
1225
- };
1226
- return (h(Host, { key: 'f5835cc1b6044476e66402d23a3becf18d3f2049' }, h("div", { key: '2c7f92bbe85bc938a767734ef4b27702247fb390', class: floatingClasses, style: {
1227
- position: 'fixed',
1228
- top: '0px',
1229
- left: '0px',
1230
- zIndex: this.zIndex.toString(),
1231
- display: this.isVisible ? 'block' : 'none',
1232
- visibility: this.isVisible ? 'visible' : 'hidden',
1233
- opacity: this.isVisible ? '1' : '0',
1234
- pointerEvents: this.isVisible ? 'auto' : 'none',
1235
- } }, this.arrow && h("div", { key: 'f6eedac02b29b3ca00a9a84eea940ac89089f30c', class: "floating-arrow" }), h("div", { key: '7cb19f085de1d77a41fd9897be90999e78a0a54d', class: "floating-wrapper" }, h("slot", { key: 'a4b4289642850e3c2f7f27771b3d28bc41c8248a' }))), h("div", { key: '61cd7af9a4a47c87c308e1e67f96efb987c97312', style: { display: 'none' } }, h("slot", { key: '7160df275f5c7c66733158f95266598d0d207a17', name: "fallback" }))));
1236
- }
1237
- get host() { return getElement(this); }
1238
- static get watchers() { return {
1239
- "targetId": ["setupTarget"],
1240
- "targetElement": ["setupTarget"],
1241
- "isVisible": ["onVisibilityChange"]
1242
- }; }
1243
- };
1244
- BcmLinked.style = linkedCss;
1245
-
1246
- const shortcutCss = ":host{display:inline-block}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.block{display:block}.h-fit{height:fit-content}.w-fit{width:fit-content}.rounded{border-radius:var(--bcm-ui-border-radius-default,6px)}.border{border-width:1px}.border-solid{border-style:solid}.border-color-default{border-color:var(--bcm-ui-color-border-default)}.bg-color-default{background-color:var(--bcm-ui-color-background-default-default)}.px-1{padding-left:.25rem;padding-right:.25rem}.text-center{text-align:center}.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)}.font-medium{font-weight:500}.capitalize{text-transform:capitalize}.text-color-default{color:var(--bcm-ui-color-text-default)}.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)}";
1247
-
1248
- const osKeys = {
1249
- ctrl: '⌘',
1250
- alt: '⌥',
1251
- shift: '⇧',
1252
- del: '⌫',
1253
- delete: '⌫',
1254
- backspace: '⌦',
1255
- enter: '⏎',
1256
- return: '⏎',
1257
- };
1258
- const BcmShortcut = class {
1259
- constructor(hostRef) {
1260
- registerInstance(this, hostRef);
1261
- this.size = 'small';
1262
- this.isMac = /Mac/.test(window.navigator.userAgent);
1263
- }
1264
- getHotkey(key) {
1265
- if (!key) {
1266
- return '';
1267
- }
1268
- if (this.isMac && (key.includes(' ') || key.includes('+'))) {
1269
- const keys = key.split(/[\s+]+/);
1270
- return keys.map(k => osKeys[k] || k).join('');
1271
- }
1272
- else {
1273
- return key;
1274
- }
1275
- }
1276
- render() {
1277
- const { size, hotkey } = this;
1278
- return (h("div", { key: '007588d1d20941ead644a3d1fd72410cb6793ff5', class: classNames('bcm-ui-element bcm-ui-content-display', 'block h-fit w-fit rounded border border-solid px-1', 'border-color-default bg-color-default text-color-default', 'text-center font-medium capitalize', {
1279
- 'text-size-2': size === 'small',
1280
- 'text-size-3': size === 'medium',
1281
- 'text-size-4': size === 'large',
1282
- }) }, this.getHotkey(hotkey)));
1283
- }
1284
- };
1285
- BcmShortcut.style = shortcutCss;
1286
-
1287
- const variantTagMap = {
1288
- display: 'h1',
1289
- heading1: 'h2',
1290
- heading2: 'h3',
1291
- title1: 'h4',
1292
- title2: 'h5',
1293
- title3: 'h6',
1294
- body: 'p',
1295
- bodyAccent: 'p',
1296
- helper: 'p',
1297
- caption: 'p',
1298
- label: 'label',
1299
- placeholder: 'p',
1300
- link: 'a',
1301
- info: 'p',
1302
- infoAccent: 'p',
1303
- };
1304
-
1305
- const textCss = ".static{position:static}.m-0{margin:0}.appearance-none{appearance:none}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-0{padding:0}.text-size-12{font-size:var(--bcm-ui-font-size-12,60px);line-height:var(--bcm-ui-line-height-12,72px)}.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-size-7{font-size:var(--bcm-ui-font-size-7,20px);line-height:var(--bcm-ui-line-height-7,28px)}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-color-caption{color:var(--bcm-ui-color-text-caption)}.text-color-default{color:var(--bcm-ui-color-text-default)}.text-color-disabled{color:var(--bcm-ui-color-text-disabled)}.text-color-header{color:var(--bcm-ui-color-text-header)}.text-color-helper{color:var(--bcm-ui-color-text-helper)}.text-color-label{color:var(--bcm-ui-color-text-label)}.text-color-placeholder{color:var(--bcm-ui-color-text-placeholder)}.text-color-primary{color:var(--bcm-ui-color-text-primary)}.underline{text-decoration-line:underline}.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)}";
1306
-
1307
- const BcmText = class {
1308
- constructor(hostRef) {
1309
- registerInstance(this, hostRef);
1310
- /** Text variant */
1311
- this.variant = 'body';
1312
- /** Text size */
1313
- this.size = 'medium';
1314
- /** Text overflow behavior */
1315
- this.overflow = false;
1316
- this.variantClassMap = {
1317
- display: 'font-semibold text-size-12 text-color-header',
1318
- heading1: 'font-semibold text-size-7 text-color-header',
1319
- heading2: 'font-semibold text-size-6 text-color-header',
1320
- title1: {
1321
- small: 'font-semibold text-size-5 text-color-header',
1322
- medium: 'font-semibold text-size-6 text-color-header',
1323
- large: 'font-semibold text-size-7 text-color-header',
1324
- },
1325
- title2: {
1326
- small: 'font-semibold text-size-4 text-color-default',
1327
- medium: 'font-semibold text-size-5 text-color-default',
1328
- large: 'font-semibold text-size-6 text-color-default',
1329
- },
1330
- title3: {
1331
- small: 'font-semibold text-size-3 text-color-disabled',
1332
- medium: 'font-semibold text-size-4 text-color-disabled',
1333
- large: 'font-semibold text-size-5 text-color-disabled',
1334
- },
1335
- body: {
1336
- small: 'font-regular text-size-4 text-color-default',
1337
- medium: 'font-regular text-size-5 text-color-default',
1338
- large: 'font-regular text-size-6 text-color-default',
1339
- },
1340
- bodyAccent: {
1341
- small: 'font-medium text-size-4 text-color-default',
1342
- medium: 'font-medium text-size-5 text-color-default',
1343
- large: 'font-medium text-size-6 text-color-default',
1344
- },
1345
- helper: {
1346
- small: 'font-regular text-size-4 text-color-helper',
1347
- medium: 'font-regular text-size-5 text-color-helper',
1348
- large: 'font-regular text-size-6 text-color-helper',
1349
- },
1350
- caption: {
1351
- small: 'font-regular text-size-3 text-color-caption',
1352
- medium: 'font-regular text-size-4 text-color-caption',
1353
- large: 'font-regular text-size-5 text-color-caption',
1354
- },
1355
- link: {
1356
- small: 'font-medium text-size-4 underline text-color-primary',
1357
- medium: 'font-medium text-size-5 underline text-color-primary',
1358
- large: 'font-medium text-size-6 underline text-color-primary',
1359
- },
1360
- label: {
1361
- small: 'font-medium text-size-3 text-color-label',
1362
- medium: 'font-medium text-size-4 text-color-label',
1363
- large: 'font-medium text-size-5 text-color-label',
1364
- },
1365
- placeholder: {
1366
- small: 'font-regular text-size-4 text-color-placeholder',
1367
- medium: 'font-regular text-size-5 text-color-placeholder',
1368
- large: 'font-regular text-size-6 text-color-placeholder',
1369
- },
1370
- info: {
1371
- small: 'font-regular text-size-3 text-color-default',
1372
- medium: 'font-regular text-size-4 text-color-default',
1373
- large: 'font-regular text-size-5 text-color-default',
1374
- },
1375
- infoAccent: {
1376
- small: 'font-medium text-size-3 text-color-header',
1377
- medium: 'font-medium text-size-4 text-color-header',
1378
- large: 'font-medium text-size-5 text-color-header',
1379
- },
1380
- };
1381
- this.getTextClass = (variant, size) => {
1382
- const variantClasses = this.variantClassMap[variant];
1383
- if (typeof variantClasses === 'string') {
1384
- return variantClasses;
1385
- }
1386
- return variantClasses[size];
1387
- };
1388
- this.getOverflowClass = (overflow) => {
1389
- return overflow ? 'truncate' : '';
1390
- };
1391
- }
1392
- render() {
1393
- var _a;
1394
- const Tag = variantTagMap[this.variant];
1395
- const variantClass = this.getTextClass(this.variant, this.size);
1396
- const overflowClass = this.getOverflowClass((_a = this.overflow) !== null && _a !== void 0 ? _a : false);
1397
- return (h(Tag, { key: '152d737752eea962ac3c5086011da69578ef0920', class: classNames('bcm-text appearance-none m-0 p-0', variantClass, overflowClass), part: "text" }, h("slot", { key: 'e8c8c89a5925936a2e22a75265b7f42317eab983' }, this.text)));
1398
- }
1399
- };
1400
- BcmText.style = textCss;
1401
-
1402
- export { BcmButton as bcm_button, BcmDrawer as bcm_drawer, Dropdown as bcm_dropdown, DropdownItem as bcm_dropdown_item, BcmInput as bcm_input, BcmLinked as bcm_linked, BcmShortcut as bcm_shortcut, BcmText as bcm_text };
1403
- //# sourceMappingURL=bcm-button.bcm-drawer.bcm-dropdown.bcm-dropdown-item.bcm-input.bcm-linked.bcm-shortcut.bcm-text.entry.js.map
1404
-
1405
- //# sourceMappingURL=bcm-button_8.entry.js.map