bromcom-ui 2.8.0-rc.1 → 2.8.0-rc.2

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 (194) hide show
  1. package/dist/bromcom-ui/bromcom-ui.css +1 -1
  2. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  3. package/dist/bromcom-ui/{p-89a9e8e3.entry.js → p-00269ca7.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-0ae31364.entry.js → p-0041bd28.entry.js} +1 -1
  5. package/dist/bromcom-ui/{p-98c9ac37.entry.js → p-007bec47.entry.js} +1 -1
  6. package/dist/bromcom-ui/{p-3a093f9e.entry.js → p-036f3880.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-8fa7cdf0.entry.js → p-0626d065.entry.js} +1 -1
  8. package/dist/bromcom-ui/p-13082089.entry.js +5 -0
  9. package/dist/bromcom-ui/{p-2a57c8c7.entry.js → p-13337304.entry.js} +1 -1
  10. package/dist/bromcom-ui/p-19cba40f.js +5 -0
  11. package/dist/bromcom-ui/{p-3d8802d9.entry.js → p-1e328bbb.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-3ccc9177.entry.js → p-30070e50.entry.js} +1 -1
  13. package/dist/bromcom-ui/p-3407de8c.entry.js +5 -0
  14. package/dist/bromcom-ui/{p-ffb57c2c.entry.js → p-35e357fb.entry.js} +1 -1
  15. package/dist/bromcom-ui/{p-2eaf7068.entry.js → p-400f7245.entry.js} +1 -1
  16. package/dist/bromcom-ui/{p-970a4dd6.entry.js → p-445a227f.entry.js} +1 -1
  17. package/dist/bromcom-ui/{p-79a1c167.js → p-4bbba8b4.js} +1 -1
  18. package/dist/bromcom-ui/{p-58815bb1.entry.js → p-57185ca0.entry.js} +1 -1
  19. package/dist/bromcom-ui/{p-4185987d.entry.js → p-5948de7f.entry.js} +1 -1
  20. package/dist/bromcom-ui/{p-afa908e9.entry.js → p-5a26b9b8.entry.js} +1 -1
  21. package/dist/bromcom-ui/{p-07b62dab.entry.js → p-5bad0d7b.entry.js} +1 -1
  22. package/dist/bromcom-ui/{p-80fdd63f.entry.js → p-6530b216.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-178fb088.entry.js → p-67659c20.entry.js} +1 -1
  24. package/dist/bromcom-ui/{p-65fbabc8.entry.js → p-6bd60d81.entry.js} +1 -1
  25. package/dist/bromcom-ui/{p-b175a1e1.entry.js → p-6bfece08.entry.js} +1 -1
  26. package/dist/bromcom-ui/{p-bd2d9941.entry.js → p-6c288e79.entry.js} +1 -1
  27. package/dist/bromcom-ui/{p-ceace9c7.entry.js → p-6c7b218c.entry.js} +1 -1
  28. package/dist/bromcom-ui/{p-34a59d30.js → p-7124553b.js} +1 -1
  29. package/dist/bromcom-ui/{p-410c74f6.js → p-7b153da4.js} +1 -1
  30. package/dist/bromcom-ui/{p-b5531d54.entry.js → p-82031406.entry.js} +1 -1
  31. package/dist/bromcom-ui/{p-1faaac85.entry.js → p-843c229b.entry.js} +1 -1
  32. package/dist/bromcom-ui/{p-e30c5251.entry.js → p-8c9d67ad.entry.js} +1 -1
  33. package/dist/bromcom-ui/{p-6baf6ea4.entry.js → p-8ced5b81.entry.js} +1 -1
  34. package/dist/bromcom-ui/{p-d39369ff.entry.js → p-935fdf64.entry.js} +1 -1
  35. package/dist/bromcom-ui/{p-a5abe2d6.entry.js → p-9490e993.entry.js} +1 -1
  36. package/dist/bromcom-ui/{p-56a5396d.js → p-a366b934.js} +1 -1
  37. package/dist/bromcom-ui/{p-3e45d00d.entry.js → p-a3a346fc.entry.js} +1 -1
  38. package/dist/bromcom-ui/{p-c718f29a.js → p-a82bcbd4.js} +1 -1
  39. package/dist/bromcom-ui/{p-ef6e4107.entry.js → p-aa59b8d1.entry.js} +1 -1
  40. package/dist/bromcom-ui/{p-a452bb5e.entry.js → p-b0d84958.entry.js} +1 -1
  41. package/dist/bromcom-ui/{p-94da7678.entry.js → p-b3003060.entry.js} +1 -1
  42. package/dist/bromcom-ui/{p-e3d32c37.entry.js → p-c012565a.entry.js} +1 -1
  43. package/dist/bromcom-ui/p-c092fafd.entry.js +11 -0
  44. package/dist/bromcom-ui/{p-7eb09daf.entry.js → p-cf24655f.entry.js} +1 -1
  45. package/dist/bromcom-ui/{p-524ab0fc.entry.js → p-d9bd56ef.entry.js} +1 -1
  46. package/dist/bromcom-ui/{p-c3238361.entry.js → p-dc3d9f76.entry.js} +1 -1
  47. package/dist/bromcom-ui/{p-ba8d8c03.entry.js → p-e38344ed.entry.js} +1 -1
  48. package/dist/bromcom-ui/{p-889553d3.entry.js → p-e842eb54.entry.js} +1 -1
  49. package/dist/bromcom-ui/{p-e9295fec.entry.js → p-ed04ae18.entry.js} +1 -1
  50. package/dist/bromcom-ui/{p-17bafd84.entry.js → p-efd4bae1.entry.js} +1 -1
  51. package/dist/bromcom-ui/{p-8cc29a92.entry.js → p-f0877724.entry.js} +1 -1
  52. package/dist/bromcom-ui/{p-5cd30376.entry.js → p-f4c08ca4.entry.js} +1 -1
  53. package/dist/bromcom-ui/{p-701cf04e.entry.js → p-f4d15784.entry.js} +1 -1
  54. package/dist/bromcom-ui/{p-7eb8c46e.js → p-f4d6590d.js} +1 -1
  55. package/dist/bromcom-ui/{p-d236a84f.entry.js → p-ff78d3f1.entry.js} +1 -1
  56. package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
  57. package/dist/cjs/bcm-alert.cjs.entry.js +1 -1
  58. package/dist/cjs/bcm-attendance.cjs.entry.js +1 -1
  59. package/dist/cjs/bcm-avatar_2.cjs.entry.js +3 -3
  60. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
  61. package/dist/cjs/bcm-button-group.cjs.entry.js +1 -1
  62. package/dist/cjs/{bcm-colorful_2.cjs.entry.js → bcm-button_10.cjs.entry.js} +1533 -19
  63. package/dist/cjs/bcm-card.cjs.entry.js +1 -1
  64. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +17 -17
  65. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +1 -1
  66. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +1 -1
  67. package/dist/cjs/bcm-chip.cjs.entry.js +1 -1
  68. package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
  69. package/dist/cjs/bcm-color-input.cjs.entry.js +3 -3
  70. package/dist/cjs/bcm-date-picker.cjs.entry.js +1 -1
  71. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +1 -1
  72. package/dist/cjs/bcm-default.cjs.entry.js +1 -1
  73. package/dist/cjs/bcm-drawer.cjs.entry.js +3 -3
  74. package/dist/cjs/bcm-dropdown.cjs.entry.js +2 -2
  75. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +1 -1
  76. package/dist/cjs/bcm-form-2.cjs.entry.js +1 -1
  77. package/dist/cjs/bcm-input-custom.cjs.entry.js +1 -1
  78. package/dist/cjs/bcm-item.cjs.entry.js +1 -1
  79. package/dist/cjs/bcm-items.cjs.entry.js +1 -1
  80. package/dist/cjs/bcm-list.cjs.entry.js +5 -5
  81. package/dist/cjs/bcm-menu.cjs.entry.js +4 -4
  82. package/dist/cjs/bcm-modal.cjs.entry.js +1 -1
  83. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +1 -1
  84. package/dist/cjs/bcm-popconfirm.cjs.entry.js +1 -1
  85. package/dist/cjs/bcm-popover.cjs.entry.js +3 -3
  86. package/dist/cjs/bcm-progress.cjs.entry.js +1 -1
  87. package/dist/cjs/bcm-range.cjs.entry.js +1 -1
  88. package/dist/cjs/bcm-search.cjs.entry.js +2 -2
  89. package/dist/cjs/bcm-skeleton.cjs.entry.js +1 -1
  90. package/dist/cjs/bcm-step.cjs.entry.js +2 -2
  91. package/dist/cjs/bcm-stepper.cjs.entry.js +4 -4
  92. package/dist/cjs/bcm-switch.cjs.entry.js +1 -1
  93. package/dist/cjs/bcm-tab-group.cjs.entry.js +3 -3
  94. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +3 -3
  95. package/dist/cjs/bcm-tab-item.cjs.entry.js +3 -3
  96. package/dist/cjs/bcm-tag.cjs.entry.js +2 -2
  97. package/dist/cjs/bcm-textarea.cjs.entry.js +2 -2
  98. package/dist/cjs/bcm-time-picker.cjs.entry.js +1 -1
  99. package/dist/cjs/bcm-toast.cjs.entry.js +115 -0
  100. package/dist/cjs/bromcom-ui.cjs.js +1 -1
  101. package/dist/cjs/{generate-b2779357.js → generate-e2397ffa.js} +1 -1
  102. package/dist/cjs/{input-template-ef0dff49.js → input-template-2bdd0688.js} +1 -1
  103. package/dist/cjs/{json-parse-decarator-6daa901d.js → json-parse-decarator-fe468734.js} +1 -1
  104. package/dist/cjs/loader.cjs.js +1 -1
  105. package/dist/cjs/{number-helper-c0a3073d.js → number-helper-aac9b592.js} +1 -1
  106. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +2 -2
  107. package/dist/cjs/old-bcm-popover.cjs.entry.js +1 -1
  108. package/dist/cjs/{stepper-states-7458308e.js → stepper-states-5aa9bb64.js} +1 -1
  109. package/dist/cjs/{tooltip-helper-d4c09d59.js → tooltip-helper-18b3deae.js} +3 -3
  110. package/dist/cjs/{validators-9db90679.js → validators-5c4ee18b.js} +1 -1
  111. package/dist/collection/components/molecules/radio/radio-group.js +27 -6
  112. package/dist/components/bcm-radio-group.js +21 -4
  113. package/dist/components/generate.js +1 -1
  114. package/dist/esm/bcm-accordion.entry.js +1 -1
  115. package/dist/esm/bcm-alert.entry.js +1 -1
  116. package/dist/esm/bcm-attendance.entry.js +1 -1
  117. package/dist/esm/bcm-avatar_2.entry.js +3 -3
  118. package/dist/esm/bcm-breadcrumb.entry.js +1 -1
  119. package/dist/esm/bcm-button-group.entry.js +1 -1
  120. package/dist/esm/{bcm-colorful_2.entry.js → bcm-button_10.entry.js} +1521 -15
  121. package/dist/esm/bcm-card.entry.js +1 -1
  122. package/dist/esm/bcm-checkbox-group.entry.js +7 -7
  123. package/dist/esm/bcm-checkbox-lite_9.entry.js +1 -1
  124. package/dist/esm/bcm-checkbox_2.entry.js +1 -1
  125. package/dist/esm/bcm-chip.entry.js +1 -1
  126. package/dist/esm/bcm-collapse.entry.js +1 -1
  127. package/dist/esm/bcm-color-input.entry.js +3 -3
  128. package/dist/esm/bcm-date-picker.entry.js +1 -1
  129. package/dist/esm/bcm-datetime-picker.entry.js +1 -1
  130. package/dist/esm/bcm-default.entry.js +1 -1
  131. package/dist/esm/bcm-drawer.entry.js +3 -3
  132. package/dist/esm/bcm-dropdown.entry.js +2 -2
  133. package/dist/esm/bcm-expansion-panel.entry.js +1 -1
  134. package/dist/esm/bcm-form-2.entry.js +1 -1
  135. package/dist/esm/bcm-input-custom.entry.js +1 -1
  136. package/dist/esm/bcm-item.entry.js +1 -1
  137. package/dist/esm/bcm-items.entry.js +1 -1
  138. package/dist/esm/bcm-list.entry.js +5 -5
  139. package/dist/esm/bcm-menu.entry.js +4 -4
  140. package/dist/esm/bcm-modal.entry.js +1 -1
  141. package/dist/esm/bcm-popconfirm-box.entry.js +1 -1
  142. package/dist/esm/bcm-popconfirm.entry.js +1 -1
  143. package/dist/esm/bcm-popover.entry.js +3 -3
  144. package/dist/esm/bcm-progress.entry.js +1 -1
  145. package/dist/esm/bcm-range.entry.js +1 -1
  146. package/dist/esm/bcm-search.entry.js +2 -2
  147. package/dist/esm/bcm-skeleton.entry.js +1 -1
  148. package/dist/esm/bcm-step.entry.js +2 -2
  149. package/dist/esm/bcm-stepper.entry.js +4 -4
  150. package/dist/esm/bcm-switch.entry.js +1 -1
  151. package/dist/esm/bcm-tab-group.entry.js +3 -3
  152. package/dist/esm/bcm-tab-item-header.entry.js +3 -3
  153. package/dist/esm/bcm-tab-item.entry.js +3 -3
  154. package/dist/esm/bcm-tag.entry.js +2 -2
  155. package/dist/esm/bcm-textarea.entry.js +2 -2
  156. package/dist/esm/bcm-time-picker.entry.js +1 -1
  157. package/dist/esm/bcm-toast.entry.js +111 -0
  158. package/dist/esm/bromcom-ui.js +1 -1
  159. package/dist/esm/{generate-fbf3c64b.js → generate-82c3ee1f.js} +1 -1
  160. package/dist/esm/{input-template-f5b003c0.js → input-template-9a5da65a.js} +1 -1
  161. package/dist/esm/{json-parse-decarator-f023562b.js → json-parse-decarator-aba7d121.js} +1 -1
  162. package/dist/esm/loader.js +1 -1
  163. package/dist/esm/{number-helper-b69dc985.js → number-helper-d4126c02.js} +1 -1
  164. package/dist/esm/old-bcm-popover-box.entry.js +2 -2
  165. package/dist/esm/old-bcm-popover.entry.js +1 -1
  166. package/dist/esm/{stepper-states-7087f0cb.js → stepper-states-3b8d6edd.js} +1 -1
  167. package/dist/esm/{tooltip-helper-31ca799b.js → tooltip-helper-e7eb577d.js} +3 -3
  168. package/dist/esm/{validators-d3c37e80.js → validators-2a89d009.js} +1 -1
  169. package/dist/types/components/molecules/radio/radio-group.d.ts +3 -0
  170. package/package.json +1 -1
  171. package/dist/bromcom-ui/p-168d2632.entry.js +0 -5
  172. package/dist/bromcom-ui/p-1a0900cc.entry.js +0 -10
  173. package/dist/bromcom-ui/p-4a123037.entry.js +0 -5
  174. package/dist/bromcom-ui/p-51deaab5.entry.js +0 -5
  175. package/dist/bromcom-ui/p-6ea775e8.entry.js +0 -5
  176. package/dist/bromcom-ui/p-70c794df.js +0 -5
  177. package/dist/bromcom-ui/p-967df53d.entry.js +0 -5
  178. package/dist/bromcom-ui/p-e2e7d808.entry.js +0 -5
  179. package/dist/bromcom-ui/p-e422fc70.entry.js +0 -5
  180. package/dist/bromcom-ui/p-f881a6b8.entry.js +0 -5
  181. package/dist/cjs/bcm-button_2.cjs.entry.js +0 -482
  182. package/dist/cjs/bcm-form.cjs.entry.js +0 -487
  183. package/dist/cjs/bcm-icon.cjs.entry.js +0 -41
  184. package/dist/cjs/bcm-input.cjs.entry.js +0 -369
  185. package/dist/cjs/bcm-label_2.cjs.entry.js +0 -149
  186. package/dist/cjs/bcm-radio-group.cjs.entry.js +0 -143
  187. package/dist/cjs/bcm-radio.cjs.entry.js +0 -64
  188. package/dist/esm/bcm-button_2.entry.js +0 -477
  189. package/dist/esm/bcm-form.entry.js +0 -483
  190. package/dist/esm/bcm-icon.entry.js +0 -37
  191. package/dist/esm/bcm-input.entry.js +0 -365
  192. package/dist/esm/bcm-label_2.entry.js +0 -144
  193. package/dist/esm/bcm-radio-group.entry.js +0 -139
  194. package/dist/esm/bcm-radio.entry.js +0 -60
@@ -1,139 +0,0 @@
1
- /*!
2
- * Built with Stencil
3
- * Copyright (c) Bromcom.
4
- */
5
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-6e2d80d7.js';
6
- import './color-helper-2b6697b6.js';
7
- import './datetime-helper-df25808a.js';
8
- import { G as Generate } from './generate-fbf3c64b.js';
9
- import './number-helper-b69dc985.js';
10
- import './string-helper-0fb7ff20.js';
11
- import './validators-d3c37e80.js';
12
- import './element-dragger-89bb52fd.js';
13
- import { d as delay } from './utils-57652744.js';
14
- import { a as Bcm } from './bcm-9f50af9c.js';
15
- import { C as CaptionTemplate } from './caption-template-389f5bd6.js';
16
- import { c as classnames } from './index-ba2edd32.js';
17
- import './types-6f06fa1a.js';
18
- import './types-bfc3bba1.js';
19
- import { I as IsLoad } from './is-load-decorator-66e19e04.js';
20
- import './colors-1d7854ea.js';
21
- import './colors-39b87f63.js';
22
- import './_commonjsHelpers-3016b722.js';
23
-
24
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
25
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
26
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
27
- r = Reflect.decorate(decorators, target, key, desc);
28
- else
29
- for (var i = decorators.length - 1; i >= 0; i--)
30
- if (d = decorators[i])
31
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
32
- return c > 3 && r && Object.defineProperty(target, key, r), r;
33
- };
34
- const BcmRadioGroup = class {
35
- constructor(hostRef) {
36
- registerInstance(this, hostRef);
37
- this.change = createEvent(this, "bcm-change", 7);
38
- this._id = Generate.UID();
39
- this.label = undefined;
40
- this.name = undefined;
41
- this.value = null;
42
- this.defaultValue = undefined;
43
- this.size = Bcm.Size.medium;
44
- this.disabled = false;
45
- this.hidden = false;
46
- this.required = false;
47
- this.gap = undefined;
48
- this.direction = Bcm.Direction.horizontal;
49
- this.fullWidth = false;
50
- this.items = [];
51
- this.caption = undefined;
52
- this.noCaption = false;
53
- this.captionError = undefined;
54
- this.captionType = Bcm.Status.default;
55
- this.captionCache = undefined;
56
- this.captionTypeCache = undefined;
57
- }
58
- get radios() {
59
- return Array.from(this.el.querySelectorAll("bcm-radio"));
60
- }
61
- get Items() {
62
- return this.items;
63
- }
64
- connectedCallback() {
65
- this.captionCache = this.caption;
66
- this.captionTypeCache = this.captionType;
67
- }
68
- updateValue() {
69
- var _a, _b, _c;
70
- this.value = (_c = (_b = (_a = this.radios) === null || _a === void 0 ? void 0 : _a.find(radio => radio.checked)) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : null;
71
- }
72
- componentWillLoad() {
73
- var _a;
74
- (_a = this.radios) === null || _a === void 0 ? void 0 : _a.forEach(radio => {
75
- radio.disabled = radio.disabled || this.disabled;
76
- radio.size = this.size;
77
- if (this.defaultValue) {
78
- radio.checked = radio.value == this.defaultValue;
79
- }
80
- });
81
- this.updateValue();
82
- }
83
- handleChange(e) {
84
- var _a, _b;
85
- e.stopPropagation();
86
- e.preventDefault();
87
- const checked = (_a = e.target.checked) !== null && _a !== void 0 ? _a : false;
88
- (_b = this.radios) === null || _b === void 0 ? void 0 : _b.forEach(radio => {
89
- radio.checked = radio.id == e.target.id ? !checked : false;
90
- });
91
- this.updateValue();
92
- this.change.emit(this.value);
93
- }
94
- ;
95
- async setClear() {
96
- var _a;
97
- this.value = null;
98
- (_a = this.radios) === null || _a === void 0 ? void 0 : _a.forEach(radio => {
99
- radio.checked = false;
100
- });
101
- }
102
- async resetCaption() {
103
- await delay(10);
104
- this.caption = this.captionCache;
105
- this.captionType = this.captionTypeCache;
106
- this.captionError = null;
107
- await delay(10);
108
- return Promise.resolve();
109
- }
110
- async check(itemId, checked = true) {
111
- var _a;
112
- (_a = this.radios) === null || _a === void 0 ? void 0 : _a.forEach(radio => {
113
- radio.checked = radio.id == itemId || radio.value == itemId ? checked : false;
114
- });
115
- this.updateValue();
116
- this.change.emit(this.value);
117
- }
118
- async get() {
119
- return this.value;
120
- }
121
- async set(data) {
122
- await this.check(data);
123
- }
124
- async getValue() {
125
- return this.value;
126
- }
127
- render() {
128
- var _a, _b;
129
- const { direction, fullWidth, gap, label, size, required, disabled, caption, captionError, captionType, noCaption } = this;
130
- return (h(Host, { role: "radio-group", class: "tw-mb-2 tw-flex tw-flex-col" }, label && h("bcm-label", { type: captionType, value: label, required: required }), h("div", { class: classnames("tw-flex tw-flex-wrap", direction == Bcm.Direction.horizontal ? "tw-flex-row" : "tw-flex-col", fullWidth && "tw-w-full"), style: { "gap": gap } }, h("slot", null), ((_a = this.Items) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
131
- ((_b = this.Items) === null || _b === void 0 ? void 0 : _b.map(item => (h("bcm-radio", { id: item.id, value: item.value, disabled: disabled || item.disabled, checked: item.checked, color: item.color, size: size }, item.label))))), h(CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption })));
132
- }
133
- get el() { return getElement(this); }
134
- };
135
- __decorate([
136
- IsLoad()
137
- ], BcmRadioGroup.prototype, "el", void 0);
138
-
139
- export { BcmRadioGroup as bcm_radio_group };
@@ -1,60 +0,0 @@
1
- /*!
2
- * Built with Stencil
3
- * Copyright (c) Bromcom.
4
- */
5
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-6e2d80d7.js';
6
- import { a as Bcm } from './bcm-9f50af9c.js';
7
- import './color-helper-2b6697b6.js';
8
- import './datetime-helper-df25808a.js';
9
- import { G as Generate } from './generate-fbf3c64b.js';
10
- import './number-helper-b69dc985.js';
11
- import './string-helper-0fb7ff20.js';
12
- import './validators-d3c37e80.js';
13
- import './element-dragger-89bb52fd.js';
14
- import { c as classnames } from './index-ba2edd32.js';
15
- import './colors-1d7854ea.js';
16
- import './utils-57652744.js';
17
- import './colors-39b87f63.js';
18
- import './_commonjsHelpers-3016b722.js';
19
-
20
- const BcmRadio = class {
21
- constructor(hostRef) {
22
- registerInstance(this, hostRef);
23
- this.radioChange = createEvent(this, "bcm-radio-change", 7);
24
- this.focus = createEvent(this, "bcm-focus", 7);
25
- this.blur = createEvent(this, "bcm-blur", 7);
26
- this._id = Generate.UID();
27
- this.checked = undefined;
28
- this.value = undefined;
29
- this.disabled = false;
30
- this.size = Bcm.Size.medium;
31
- this.color = undefined;
32
- }
33
- render() {
34
- const { value, size, disabled, checked, _id, color } = this;
35
- return (h(Host, { class: classnames("tw-cursor-pointer tw-font-sans tw-mb-1.5 tw-mt-1", {
36
- "tw-cursor-pointer tw-text-slate-600": !disabled,
37
- "tw-cursor-not-allowed tw-text-slate-400": disabled,
38
- "tw-text-1": size === Bcm.Size.small,
39
- "tw-text-2.5": size === Bcm.Size.medium,
40
- "tw-text-4": size === Bcm.Size.large,
41
- }), style: (Generate.getTwColor(color)) }, h("label", { class: classnames("tw-inline-flex tw-flex-row tw-gap-2 tw-mr-2 tw-items-center", disabled ? "tw-cursor-not-allowed" : "tw-cursor-pointer"), htmlFor: _id + '-input' }, h("input", { id: _id + '-input', type: "radio", value: value, checked: checked, disabled: disabled, class: classnames("tw-flex tw-items-center tw-justify-center", "tw-relative tw-appearance-none tw-border tw-rounded-full tw-cursor-pointer tw-transition tw-ease-in-out ", "tw-m-0", "before:tw-content-[''] before:tw-absolute before:tw-rounded-full", {
42
- "tw-w-4 tw-h-4 before:tw-w-2.5 before:tw-h-2.5": size === Bcm.Size.medium,
43
- "tw-w-3.5 tw-h-3.5 before:tw-w-2 before:tw-h-2": size === Bcm.Size.small,
44
- "tw-w-4.5 tw-h-4.5 before:tw-w-3 before:tw-h-3": size === Bcm.Size.large,
45
- }, "focus:tw-outline-none focus:tw-shadow-outline",
46
- // default
47
- `tw-border-slate-400 tw-bg-slate-50`, `checked:tw-border-default-500`, `checked:before:tw-bg-default-500`,
48
- // disabled
49
- `disabled:tw-border-slate-400 disabled:tw-bg-slate-200 disabled:tw-cursor-not-allowed`, `disabled:checked:tw-border-slate-400`, `disabled:checked:before:tw-bg-slate-400`, !disabled && classnames(
50
- // hover
51
- `hover:tw-border-default-600`, `hover:checked:tw-border-default-600`, `hover:checked:before:tw-bg-default-600`,
52
- // focus-visible
53
- `focus-visible:tw-border-default-800 focus-visible:tw-shadow-sm`, `focus-visible:checked:tw-border-default-800`, `focus-visible:checked:before:tw-bg-default-800`,
54
- // active
55
- `active:tw-border-default-700`, `active:checked:tw-border-default-700`, `active:checked:before:tw-bg-default-700`)), onChange: () => this.radioChange.emit(), onFocus: () => this.focus.emit(), onBlur: () => this.blur.emit() }), h("slot", null))));
56
- }
57
- get el() { return getElement(this); }
58
- };
59
-
60
- export { BcmRadio as bcm_radio };