bromcom-ui 2.9.0-rc.4 → 2.9.0-rc.5
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.
- package/dist/bromcom-ui/bromcom-ui.css +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/p-0543a86f.js +5 -0
- package/dist/bromcom-ui/{p-d888c814.entry.js → p-0a528362.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3992dd70.entry.js → p-0c549bd0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-08d4cd65.entry.js → p-0d4372c9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8c9d109c.entry.js → p-15758356.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2df6dc86.entry.js → p-179af180.entry.js} +1 -1
- package/dist/bromcom-ui/p-1a04159f.entry.js +5 -0
- package/dist/bromcom-ui/{p-6478455c.entry.js → p-1a405289.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5648b456.entry.js → p-1b1f4b44.entry.js} +1 -1
- package/dist/bromcom-ui/p-1eabd5dc.js +10 -0
- package/dist/bromcom-ui/p-24cffc16.entry.js +13 -0
- package/dist/bromcom-ui/{p-20aa2ba8.entry.js → p-25f9928a.entry.js} +1 -1
- package/dist/bromcom-ui/p-285722ad.entry.js +5 -0
- package/dist/bromcom-ui/{p-3adc157d.entry.js → p-29a12785.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f48e5337.entry.js → p-2a02b473.entry.js} +1 -1
- package/dist/bromcom-ui/p-2fc584c4.js +5 -0
- package/dist/bromcom-ui/{p-fd7243a7.entry.js → p-365eec45.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6a087ad5.js → p-38972c46.js} +1 -1
- package/dist/bromcom-ui/{p-8c018ae0.js → p-3c7a0345.js} +1 -1
- package/dist/bromcom-ui/p-53448351.js +5 -0
- package/dist/bromcom-ui/{p-09c4a42a.entry.js → p-546f5f82.entry.js} +1 -1
- package/dist/bromcom-ui/{p-70aa6e00.entry.js → p-5855b125.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7e44e6b5.js → p-5ae0a59b.js} +1 -1
- package/dist/bromcom-ui/{p-4cd8a7c8.entry.js → p-5c3e9ac9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4e6292fd.entry.js → p-61172e12.entry.js} +1 -1
- package/dist/bromcom-ui/{p-224d392c.entry.js → p-65318f25.entry.js} +1 -1
- package/dist/bromcom-ui/p-663766cf.entry.js +5 -0
- package/dist/bromcom-ui/{p-30788121.entry.js → p-6c3e9e10.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6e9b23ed.entry.js → p-721e0cb5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fc07ca8a.entry.js → p-7bff7371.entry.js} +1 -1
- package/dist/bromcom-ui/{p-50066349.entry.js → p-8260eda6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1647559e.entry.js → p-8bcfe3b3.entry.js} +1 -1
- package/dist/bromcom-ui/{p-21783e29.entry.js → p-8e2e77ca.entry.js} +1 -1
- package/dist/bromcom-ui/p-90e5c655.js +5 -0
- package/dist/bromcom-ui/p-947c78e3.js +5 -0
- package/dist/bromcom-ui/{p-0d6623c0.entry.js → p-96614f57.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6cb648f0.entry.js → p-9d98d32d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ea23f0aa.entry.js → p-9e05f845.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c8695c8b.entry.js → p-a02c333f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4ea7331b.entry.js → p-a1335bd5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b321e86d.entry.js → p-a3b54a22.entry.js} +1 -1
- package/dist/bromcom-ui/{p-18696519.entry.js → p-a4731c71.entry.js} +1 -1
- package/dist/bromcom-ui/p-a5953ecd.entry.js +5 -0
- package/dist/bromcom-ui/{p-50c3df61.js → p-a8aaa382.js} +1 -1
- package/dist/bromcom-ui/{p-30a3320f.entry.js → p-b1c83bb8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8d14232d.entry.js → p-ba89e3c7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-119fc842.entry.js → p-c1de1367.entry.js} +1 -1
- package/dist/bromcom-ui/{p-15347028.entry.js → p-ca32c1b9.entry.js} +1 -1
- package/dist/bromcom-ui/p-cf0ab7f0.entry.js +5 -0
- package/dist/bromcom-ui/p-d37379d4.entry.js +5 -0
- package/dist/bromcom-ui/{p-afb4a0e7.entry.js → p-d58107e2.entry.js} +1 -1
- package/dist/bromcom-ui/p-dd422dd1.js +5 -0
- package/dist/bromcom-ui/{p-cf307549.entry.js → p-e92d9879.entry.js} +1 -1
- package/dist/bromcom-ui/{p-159b67a7.entry.js → p-e9c963b3.entry.js} +1 -1
- package/dist/bromcom-ui/{p-dc9466d6.entry.js → p-ebee9f45.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ba47106f.entry.js → p-ef8bbaf3.entry.js} +1 -1
- package/dist/bromcom-ui/p-f0350c0c.entry.js +5 -0
- package/dist/bromcom-ui/p-f302cbdf.entry.js +5 -0
- package/dist/bromcom-ui/{p-68abefd2.entry.js → p-f331e009.entry.js} +1 -1
- package/dist/bromcom-ui/{p-28649759.entry.js → p-f3b546c6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8ae4bdb2.entry.js → p-f532862e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e12e563a.entry.js → p-f889d1b6.entry.js} +1 -1
- package/dist/bromcom-ui/p-f8bf531f.entry.js +5 -0
- package/dist/bromcom-ui/{p-9fff4f7d.entry.js → p-f8cbdade.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cb344455.entry.js → p-fb22bc06.entry.js} +1 -1
- package/dist/bromcom-ui/p-fceaf172.entry.js +5 -0
- package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
- package/dist/cjs/bcm-alert.cjs.entry.js +1 -1
- package/dist/cjs/bcm-attendance.cjs.entry.js +1 -1
- package/dist/cjs/bcm-avatar.cjs.entry.js +126 -0
- package/dist/cjs/bcm-badge_15.cjs.entry.js +1738 -0
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/bcm-button-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-card.cjs.entry.js +2 -2
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +17 -17
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +1 -1
- package/dist/cjs/{bcm-checkbox_2.cjs.entry.js → bcm-checkbox.cjs.entry.js} +2 -13
- package/dist/cjs/bcm-chip-group.cjs.entry.js +128 -0
- package/dist/cjs/bcm-chip.cjs.entry.js +90 -0
- package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
- package/dist/cjs/bcm-color-input.cjs.entry.js +4 -4
- package/dist/cjs/{bcm-avatar_15.cjs.entry.js → bcm-colorful.cjs.entry.js} +3 -6332
- package/dist/cjs/bcm-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-default.cjs.entry.js +1 -1
- package/dist/cjs/bcm-drawer.cjs.entry.js +4 -4
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +2 -2
- package/dist/cjs/bcm-form-2.cjs.entry.js +1 -1
- package/dist/cjs/bcm-form.cjs.entry.js +488 -0
- package/dist/cjs/bcm-input-custom.cjs.entry.js +1 -1
- package/dist/cjs/bcm-input.cjs.entry.js +370 -0
- package/dist/cjs/bcm-label.cjs.entry.js +44 -0
- package/dist/cjs/bcm-list_3.cjs.entry.js +4025 -0
- package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal-2-header.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal-2.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +2 -2
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +1 -1
- package/dist/cjs/bcm-progress.cjs.entry.js +2 -2
- package/dist/cjs/bcm-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/bcm-radio.cjs.entry.js +4 -4
- package/dist/cjs/bcm-range.cjs.entry.js +1 -1
- package/dist/cjs/bcm-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bcm-step.cjs.entry.js +2 -2
- package/dist/cjs/bcm-stepper.cjs.entry.js +5 -5
- package/dist/cjs/bcm-switch.cjs.entry.js +1 -1
- package/dist/cjs/bcm-tag.cjs.entry.js +2 -2
- package/dist/cjs/bcm-textarea.cjs.entry.js +2 -2
- package/dist/cjs/bcm-time-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-toast.cjs.entry.js +1 -1
- package/dist/cjs/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/{color-helper-d6d2028b.js → color-helper-7ab15732.js} +27 -1
- package/dist/cjs/{generate-d246df02.js → generate-d0470117.js} +55 -5
- package/dist/cjs/index-906fb4e5.js +540 -0
- package/dist/cjs/index-b08b037a.js +52 -0
- package/dist/cjs/{input-template-22c31e2b.js → input-template-e1d297ed.js} +1 -1
- package/dist/cjs/{json-parse-decarator-bf157b28.js → json-parse-decarator-026354f1.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{number-helper-26df0c91.js → number-helper-b3d57233.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +2 -2
- package/dist/cjs/old-bcm-popover.cjs.entry.js +1 -1
- package/dist/cjs/{stepper-states-1a1a63cb.js → stepper-states-09cd4bed.js} +1 -1
- package/dist/cjs/{validators-095e7611.js → validators-39ca1c93.js} +1 -1
- package/dist/collection/components/atoms/avatar/avatar.js +95 -80
- package/dist/collection/components/atoms/avatar/avatar.style.js +39 -0
- package/dist/collection/components/atoms/badge/badge.js +29 -90
- package/dist/collection/components/atoms/badge/badge.style.js +39 -0
- package/dist/collection/components/molecules/items/items.js +1 -1
- package/dist/collection/components/molecules/menu/menu.js +1 -0
- package/dist/collection/components/molecules/popover/popover.js +1 -1
- package/dist/collection/components/molecules/tab-group/tab-group.js +5 -1
- package/dist/collection/components/molecules/tab-group/tab-item-header.js +11 -26
- package/dist/collection/components/molecules/tooltip/tooltip.js +1 -1
- package/dist/collection/components/other/typography/typography.js +1 -1
- package/dist/collection/helper/color-helper.js +27 -1
- package/dist/collection/helper/generate.js +54 -4
- package/dist/collection/helper/popover-helper.js +13 -9
- package/dist/collection/helper/tooltip-helper.js +12 -4
- package/dist/components/avatar.js +91 -52
- package/dist/components/badge.js +109 -46
- package/dist/components/bcm-items.js +1 -1
- package/dist/components/bcm-popover.js +14 -10
- package/dist/components/bcm-tab-group.js +5 -1
- package/dist/components/bcm-tab-item-header.js +11 -26
- package/dist/components/color-helper.js +27 -1
- package/dist/components/generate.js +55 -5
- package/dist/components/menu.js +1 -0
- package/dist/components/tooltip-helper.js +12 -4
- package/dist/components/tooltip.js +1 -1
- package/dist/components/typography.js +1 -1
- package/dist/esm/bcm-accordion.entry.js +1 -1
- package/dist/esm/bcm-alert.entry.js +1 -1
- package/dist/esm/bcm-attendance.entry.js +1 -1
- package/dist/esm/bcm-avatar.entry.js +122 -0
- package/dist/esm/bcm-badge_15.entry.js +1720 -0
- package/dist/esm/bcm-breadcrumb.entry.js +1 -1
- package/dist/esm/bcm-button-group.entry.js +1 -1
- package/dist/esm/bcm-card.entry.js +3 -3
- package/dist/esm/bcm-checkbox-group.entry.js +8 -8
- package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
- package/dist/esm/{bcm-checkbox_2.entry.js → bcm-checkbox.entry.js} +4 -14
- package/dist/esm/bcm-chip-group.entry.js +124 -0
- package/dist/esm/bcm-chip.entry.js +86 -0
- package/dist/esm/bcm-collapse-group.entry.js +1 -1
- package/dist/esm/bcm-collapse.entry.js +1 -1
- package/dist/esm/bcm-color-input.entry.js +6 -6
- package/dist/esm/{bcm-avatar_15.entry.js → bcm-colorful.entry.js} +4 -6319
- package/dist/esm/bcm-colorpicker.entry.js +2 -2
- package/dist/esm/bcm-date-picker.entry.js +2 -2
- package/dist/esm/bcm-datetime-picker.entry.js +3 -3
- package/dist/esm/bcm-default.entry.js +1 -1
- package/dist/esm/bcm-drawer.entry.js +6 -6
- package/dist/esm/bcm-expansion-panel.entry.js +3 -3
- package/dist/esm/bcm-form-2.entry.js +1 -1
- package/dist/esm/bcm-form.entry.js +484 -0
- package/dist/esm/bcm-input-custom.entry.js +1 -1
- package/dist/esm/bcm-input.entry.js +366 -0
- package/dist/esm/bcm-label.entry.js +40 -0
- package/dist/esm/bcm-list_3.entry.js +4019 -0
- package/dist/esm/bcm-modal-2-footer.entry.js +6 -6
- package/dist/esm/bcm-modal-2-header.entry.js +6 -6
- package/dist/esm/bcm-modal-2.entry.js +6 -6
- package/dist/esm/bcm-modal.entry.js +1 -1
- package/dist/esm/bcm-old-input.entry.js +1 -1
- package/dist/esm/bcm-old-tag_2.entry.js +1 -1
- package/dist/esm/bcm-popconfirm-box.entry.js +3 -3
- package/dist/esm/bcm-popconfirm.entry.js +1 -1
- package/dist/esm/bcm-progress.entry.js +3 -3
- package/dist/esm/bcm-radio-group.entry.js +6 -6
- package/dist/esm/bcm-radio.entry.js +6 -6
- package/dist/esm/bcm-range.entry.js +2 -2
- package/dist/esm/bcm-select.entry.js +1 -1
- package/dist/esm/bcm-skeleton.entry.js +1 -1
- package/dist/esm/bcm-step.entry.js +2 -2
- package/dist/esm/bcm-stepper.entry.js +7 -7
- package/dist/esm/bcm-switch.entry.js +2 -2
- package/dist/esm/bcm-table.entry.js +1 -1
- package/dist/esm/bcm-tabs-content.entry.js +1 -1
- package/dist/esm/bcm-tabs.entry.js +1 -1
- package/dist/esm/bcm-tag.entry.js +3 -3
- package/dist/esm/bcm-textarea.entry.js +3 -3
- package/dist/esm/bcm-time-picker.entry.js +2 -2
- package/dist/esm/bcm-toast.entry.js +2 -2
- package/dist/esm/bromcom-ui.js +1 -1
- package/dist/esm/{color-helper-e8ce23d7.js → color-helper-116755ed.js} +28 -2
- package/dist/esm/{element-dragger-89bb52fd.js → element-dragger-7ea06c76.js} +1 -1
- package/dist/esm/{generate-e7435a13.js → generate-abec36e5.js} +55 -5
- package/dist/esm/index-6310a048.js +537 -0
- package/dist/esm/index-962dec74.js +50 -0
- package/dist/esm/{input-template-e1e850b5.js → input-template-a02d00ff.js} +1 -1
- package/dist/esm/{json-parse-decarator-2bcd4584.js → json-parse-decarator-268fe3de.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{number-helper-cb2563aa.js → number-helper-cf26accd.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +4 -4
- package/dist/esm/old-bcm-popover.entry.js +1 -1
- package/dist/esm/{stepper-states-29463262.js → stepper-states-cf443480.js} +1 -1
- package/dist/esm/{utils-57652744.js → utils-b3338faf.js} +1 -1
- package/dist/esm/{validators-0a4134a4.js → validators-63753298.js} +1 -1
- package/dist/types/components/atoms/avatar/avatar.d.ts +8 -10
- package/dist/types/components/atoms/avatar/avatar.style.d.ts +5 -0
- package/dist/types/components/atoms/badge/badge.d.ts +3 -7
- package/dist/types/components/atoms/badge/badge.style.d.ts +4 -0
- package/dist/types/components.d.ts +11 -13
- package/dist/types/helper/color-helper.d.ts +22 -2
- package/dist/types/helper/generate.d.ts +21 -1
- package/dist/types/helper/popover-helper.d.ts +0 -5
- package/dist/types/helper/tooltip-helper.d.ts +0 -1
- package/package.json +7 -4
- package/dist/bromcom-ui/p-00d7bbed.js +0 -5
- package/dist/bromcom-ui/p-0ab46a99.js +0 -5
- package/dist/bromcom-ui/p-0b0660a0.js +0 -5
- package/dist/bromcom-ui/p-1a3d281e.entry.js +0 -5
- package/dist/bromcom-ui/p-2b4677a8.entry.js +0 -5
- package/dist/bromcom-ui/p-3ae615ef.entry.js +0 -5
- package/dist/bromcom-ui/p-61c51804.entry.js +0 -5
- package/dist/bromcom-ui/p-632bbc11.entry.js +0 -5
- package/dist/bromcom-ui/p-6c34860e.entry.js +0 -5
- package/dist/bromcom-ui/p-843905c8.js +0 -5
- package/dist/bromcom-ui/p-8ce0f5f8.entry.js +0 -5
- package/dist/bromcom-ui/p-92831a1d.js +0 -5
- package/dist/bromcom-ui/p-a9a9bf8f.js +0 -5
- package/dist/bromcom-ui/p-b17ba740.entry.js +0 -19
- package/dist/bromcom-ui/p-b8cfa9ab.entry.js +0 -5
- package/dist/bromcom-ui/p-c5de4c76.entry.js +0 -5
- package/dist/bromcom-ui/p-d832cf50.entry.js +0 -5
- package/dist/bromcom-ui/p-fb96c1cd.entry.js +0 -5
- package/dist/cjs/bcm-dropdown.cjs.entry.js +0 -118
- package/dist/cjs/bcm-item.cjs.entry.js +0 -71
- package/dist/cjs/bcm-items.cjs.entry.js +0 -48
- package/dist/cjs/bcm-menu.cjs.entry.js +0 -149
- package/dist/cjs/bcm-popover.cjs.entry.js +0 -225
- package/dist/cjs/bcm-tab-group.cjs.entry.js +0 -205
- package/dist/cjs/bcm-tab-item-header.cjs.entry.js +0 -73
- package/dist/cjs/bcm-tab-item.cjs.entry.js +0 -90
- package/dist/cjs/bcm-text.cjs.entry.js +0 -49
- package/dist/cjs/tooltip-helper-c822010b.js +0 -150
- package/dist/collection/components/atoms/avatar/avatar.css +0 -198
- package/dist/collection/components/atoms/badge/badge.css +0 -231
- package/dist/esm/bcm-dropdown.entry.js +0 -114
- package/dist/esm/bcm-item.entry.js +0 -67
- package/dist/esm/bcm-items.entry.js +0 -44
- package/dist/esm/bcm-menu.entry.js +0 -145
- package/dist/esm/bcm-popover.entry.js +0 -221
- package/dist/esm/bcm-tab-group.entry.js +0 -201
- package/dist/esm/bcm-tab-item-header.entry.js +0 -69
- package/dist/esm/bcm-tab-item.entry.js +0 -86
- package/dist/esm/bcm-text.entry.js +0 -45
- package/dist/esm/tooltip-helper-f35d93d2.js +0 -148
|
@@ -187,7 +187,11 @@ const BcmTabGroup$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
187
187
|
}
|
|
188
188
|
render() {
|
|
189
189
|
const { color } = this;
|
|
190
|
-
|
|
190
|
+
const dc = Generate.getTwColor({
|
|
191
|
+
color: color,
|
|
192
|
+
tones: [500]
|
|
193
|
+
});
|
|
194
|
+
return (h(Host, { role: "tablist", "aria-label": "Tab Group", class: "tw-flex tw-w-full tw-flex-col tw-items-center tw-font-sans" }, h("div", { class: `tw-relative tw-flex tw-w-full tw-flex-row tw-items-end tw-justify-between`, id: "tab-header", style: dc }, h("div", { id: "ink-bar", class: `tw-bg-default-500 tw-absolute tw-bottom-0 tw-left-0 tw-mt-[-2px] tw-h-[2px] tw-rounded-sm tw-transition-transform` })), h("slot", null)));
|
|
191
195
|
}
|
|
192
196
|
get el() { return this; }
|
|
193
197
|
static get watchers() { return {
|
|
@@ -31,33 +31,18 @@ const BcmTabItemHeader$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
33
|
const { color, size, active, disabled } = this;
|
|
34
|
-
let fontSize, padding, gap;
|
|
35
|
-
switch (size) {
|
|
36
|
-
case Bcm.Size.small:
|
|
37
|
-
fontSize = "2";
|
|
38
|
-
padding = "1";
|
|
39
|
-
gap = "2";
|
|
40
|
-
break;
|
|
41
|
-
case Bcm.Size.medium:
|
|
42
|
-
fontSize = "3";
|
|
43
|
-
padding = "2";
|
|
44
|
-
gap = "3";
|
|
45
|
-
break;
|
|
46
|
-
case Bcm.Size.large:
|
|
47
|
-
fontSize = "4";
|
|
48
|
-
padding = "3";
|
|
49
|
-
gap = "4";
|
|
50
|
-
break;
|
|
51
|
-
default:
|
|
52
|
-
fontSize = "3";
|
|
53
|
-
padding = "2";
|
|
54
|
-
gap = "3";
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
34
|
const disabledClass = "tw-cursor-not-allowed tw-text-gray-400 tw-opacity-50";
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
35
|
+
const dc = Generate.getTwColor({
|
|
36
|
+
color: color,
|
|
37
|
+
tones: [500, 600, 700, 800]
|
|
38
|
+
});
|
|
39
|
+
return (h(Host, { onClick: () => this.handleClick(), class: classnames(`tw-flex tw-flex-1 tw-items-center tw-justify-center tw-border-b-[2px] tw-border-b-slate-300 tw-transition-font tw-focus:outline-none`, {
|
|
40
|
+
"tw-text-2 tw-py-1 tw-gap-2": size === Bcm.Size.small,
|
|
41
|
+
"tw-text-3 tw-py-2 tw-gap-3": size === Bcm.Size.medium,
|
|
42
|
+
"tw-text-4 tw-py-3 tw-gap-4": size === Bcm.Size.large,
|
|
43
|
+
}, disabled ? disabledClass : "tw-cursor-pointer", active
|
|
44
|
+
? `tw-text-default-500 enabled:hover:tw-text-default-600 enabled:active:tw-text-default-700 enabled:focus-visible:tw-text-default-800`
|
|
45
|
+
: "tw-text-slate-400 enabled:hover:tw-text-slate-500 enabled:focus-visible:tw-text-slate-700 enabled:active:tw-text-slate-600"), style: dc }));
|
|
61
46
|
}
|
|
62
47
|
get el() { return this; }
|
|
63
48
|
}, [0, "bcm-tab-item-header", {
|
|
@@ -7,6 +7,26 @@ import { e as extractColor } from './utils.js';
|
|
|
7
7
|
import { c as colors } from './colors2.js';
|
|
8
8
|
|
|
9
9
|
class ColorHelper {
|
|
10
|
+
/**
|
|
11
|
+
* @param color - color string in format of `colorName-tone` or `colorName` (default tone is 600)
|
|
12
|
+
* @return `{ tone: number, colorName: string }`
|
|
13
|
+
* @description
|
|
14
|
+
* Parse color string to get color name and tone
|
|
15
|
+
* @example
|
|
16
|
+
* parseColor("red-500") // { tone: 500, colorName: "red" }
|
|
17
|
+
* parseColor("red") // { tone: 600, colorName: "red" }
|
|
18
|
+
* parseColor(null) // { tone: null, colorName: null }
|
|
19
|
+
*/
|
|
20
|
+
static parseColor(color, defaultTone = 600) {
|
|
21
|
+
if (!color)
|
|
22
|
+
return { tone: null, colorName: null };
|
|
23
|
+
const [colorName, tone] = color.split("-");
|
|
24
|
+
const parsedTone = tone ? parseInt(tone) : defaultTone;
|
|
25
|
+
return {
|
|
26
|
+
tone: parsedTone,
|
|
27
|
+
colorName,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
10
30
|
}
|
|
11
31
|
ColorHelper.isHex = (str) => /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(str);
|
|
12
32
|
ColorHelper.isRgb = (str) => /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.test(str);
|
|
@@ -43,7 +63,7 @@ ColorHelper.reverseColor = (color) => {
|
|
|
43
63
|
const g = parseInt(hexColor.substring(3, 5), 16);
|
|
44
64
|
const b = parseInt(hexColor.substring(5, 7), 16);
|
|
45
65
|
const yiq = (r * 299 + g * 587 + b * 114) / 1000;
|
|
46
|
-
return yiq >= 200 ? '#
|
|
66
|
+
return yiq >= 200 ? '#334155' : '#fff';
|
|
47
67
|
}
|
|
48
68
|
};
|
|
49
69
|
ColorHelper.dsColor = (color) => 'var(--bcm-new-ds-color-' + color + ')';
|
|
@@ -80,5 +100,11 @@ ColorHelper.twColor = (colorName, tone = '500') => {
|
|
|
80
100
|
return 'blue-500';
|
|
81
101
|
};
|
|
82
102
|
ColorHelper.twColorReverse = (color) => ColorHelper.reverseColor(ColorHelper.getTwColorToHex(color));
|
|
103
|
+
/**
|
|
104
|
+
* @param object
|
|
105
|
+
* @return string
|
|
106
|
+
* @description Convert style object to string
|
|
107
|
+
*/
|
|
108
|
+
ColorHelper.generateStyleString = (obj) => Object.keys(obj).reduce((acc, key) => { return `${acc}${key}:${obj[key]};`; }, "");
|
|
83
109
|
|
|
84
110
|
export { ColorHelper as C };
|
|
@@ -25,7 +25,7 @@ var TypeProps;
|
|
|
25
25
|
TypeProps["basic"] = "basic";
|
|
26
26
|
})(TypeProps || (TypeProps = {}));
|
|
27
27
|
|
|
28
|
-
const version = "2.9.0-rc.
|
|
28
|
+
const version = "2.9.0-rc.5";
|
|
29
29
|
|
|
30
30
|
function snq(callback, defaultValue) {
|
|
31
31
|
try {
|
|
@@ -65,15 +65,65 @@ if (isAllowedDomain()) {
|
|
|
65
65
|
}
|
|
66
66
|
})();
|
|
67
67
|
class Generate {
|
|
68
|
-
|
|
68
|
+
/**
|
|
69
|
+
const dc = Generate.getTwColor({
|
|
70
|
+
color: "blue",
|
|
71
|
+
tones: {
|
|
72
|
+
200: ["text"],
|
|
73
|
+
700: ["bg", "border"],
|
|
74
|
+
800: ["bg-hover", "border-hover"],
|
|
75
|
+
},
|
|
76
|
+
variable: "--bcm-avatar",
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
--bcm-avatar-text: --tw-blue-200;
|
|
81
|
+
--bcm-avatar-bg: --tw-blue-700;
|
|
82
|
+
--bcm-avatar-bg-hover: --tw-blue-800;
|
|
83
|
+
--bcm-avatar-border: --tw-blue-700;
|
|
84
|
+
--bcm-avatar-border-hover: --tw-blue-800;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
*/
|
|
88
|
+
static getTwColor(args) {
|
|
89
|
+
const { color, variable, tones } = (args = Object.assign({
|
|
90
|
+
variable: "--bcm-color-default",
|
|
91
|
+
defaultTone: "600",
|
|
92
|
+
tones: {
|
|
93
|
+
50: {},
|
|
94
|
+
100: {},
|
|
95
|
+
200: {},
|
|
96
|
+
300: {},
|
|
97
|
+
400: {},
|
|
98
|
+
500: {},
|
|
99
|
+
600: {},
|
|
100
|
+
700: {},
|
|
101
|
+
800: {},
|
|
102
|
+
900: {},
|
|
103
|
+
950: {},
|
|
104
|
+
},
|
|
105
|
+
}, args));
|
|
69
106
|
if (!color || !colors[color]) {
|
|
70
107
|
return false;
|
|
71
108
|
}
|
|
72
|
-
const colorObj = colors[color];
|
|
73
109
|
const result = {};
|
|
74
|
-
|
|
75
|
-
result[
|
|
110
|
+
if (typeof colors[color] === "string") {
|
|
111
|
+
result[variable] = colors[color];
|
|
112
|
+
return result;
|
|
76
113
|
}
|
|
114
|
+
const toneList = Array.isArray(tones) ? tones : Object.keys(tones);
|
|
115
|
+
toneList.forEach(tone => {
|
|
116
|
+
if (colors[color][tone]) {
|
|
117
|
+
if (Array.isArray(tones[tone])) {
|
|
118
|
+
tones[tone].forEach(item => {
|
|
119
|
+
result[`${variable}-${item}`] = colors[color][tone];
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
result[`${variable}-${tone}`] = colors[color][tone];
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
});
|
|
77
127
|
return result;
|
|
78
128
|
}
|
|
79
129
|
}
|
package/dist/components/menu.js
CHANGED
|
@@ -109,6 +109,7 @@ const BcmMenu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
109
109
|
}
|
|
110
110
|
return (h("a", { id: 'bcm-menu__item-' + this._id + '-' + item.id, onMouseEnter: () => this.collapse && this.getTooltip(item.id, item.text).show(), onMouseLeave: () => this.collapse && this.getTooltip(item.id, item.text).hide(), key: index, href: !item.disabled ? item.link || 'javascript:void(0)' : 'javascript:void(0)', tabindex: item.disabled ? '-1' : '0', class: classnames('bcm-menu__item', {
|
|
111
111
|
'bcm-menu__item--is-sub': subItems && item.isOpen,
|
|
112
|
+
'hidden tw-hidden': item.hidden,
|
|
112
113
|
}) }, h("span", { class: classnames('bcm-menu__item-link', `bcm-menu__item-link--${this.mode}`, {
|
|
113
114
|
'bcm-menu__item-link--active': this.selectable && (this.activeItemId ? this.activeItemId === item.id : item.active),
|
|
114
115
|
'bcm-menu__item-link--disabled': item.disabled,
|
|
@@ -22,7 +22,6 @@ class Tooltip {
|
|
|
22
22
|
}
|
|
23
23
|
this.removeListener();
|
|
24
24
|
};
|
|
25
|
-
this.bgColor = () => ColorHelper.twColor(this.color, 700);
|
|
26
25
|
this.target = () => document.getElementById(this.targetId);
|
|
27
26
|
this.sizeClass = () => {
|
|
28
27
|
switch (this.size) {
|
|
@@ -37,13 +36,22 @@ class Tooltip {
|
|
|
37
36
|
}
|
|
38
37
|
};
|
|
39
38
|
this.init = () => {
|
|
39
|
+
const { tone, colorName } = ColorHelper.parseColor(this.color, 700);
|
|
40
|
+
const dc = Generate.getTwColor({
|
|
41
|
+
color: colorName,
|
|
42
|
+
tones: {
|
|
43
|
+
[tone]: ["bg"],
|
|
44
|
+
},
|
|
45
|
+
variable: "--bcm-tooltip",
|
|
46
|
+
});
|
|
47
|
+
const style = Object.assign(Object.assign({}, dc), (dc["--bcm-tooltip-bg"] && { "--bcm-tooltip-text": ColorHelper.reverseColor(dc["--bcm-tooltip-bg"]) }));
|
|
40
48
|
this.el = Generate.createElement("div", {
|
|
41
49
|
"id": `${this.targetId}-tooltip-box`,
|
|
42
50
|
"class": `
|
|
43
|
-
tw-whitespace-normal tw-break-words tw-block tw-font-sans tw-pointer-events-none tw-max-w-xs tw-py-1 tw-px-2 tw-rounded tw-bg
|
|
51
|
+
tw-whitespace-normal tw-break-words tw-block tw-font-sans tw-pointer-events-none tw-max-w-xs tw-py-1 tw-px-2 tw-rounded tw-bg-[--bcm-tooltip-bg] tw-text-[--bcm-tooltip-text] ${this.sizeClass()} tw-absolute tw-top-0 tw-left-0 tw-z-tooltip tw-opacity-0 tw-transition-opacity tw-duration-300`,
|
|
44
52
|
"role": "tooltip",
|
|
45
53
|
"aria-hidden": "true",
|
|
46
|
-
"style":
|
|
54
|
+
"style": ColorHelper.generateStyleString(style),
|
|
47
55
|
"innerHTML": StringHelper.trim(this.message),
|
|
48
56
|
});
|
|
49
57
|
};
|
|
@@ -97,7 +105,7 @@ class Tooltip {
|
|
|
97
105
|
placement: this.placement,
|
|
98
106
|
offset: 8,
|
|
99
107
|
arrow: true,
|
|
100
|
-
arrowColor: `tw-bg
|
|
108
|
+
arrowColor: `tw-bg-[--bcm-tooltip-bg]`,
|
|
101
109
|
});
|
|
102
110
|
}
|
|
103
111
|
};
|
|
@@ -79,7 +79,7 @@ const BcmTooltip = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
79
79
|
this.tooltip.toggle();
|
|
80
80
|
}
|
|
81
81
|
render() {
|
|
82
|
-
return (h(Host, {
|
|
82
|
+
return (h(Host, { class: "tw-inline-flex tw-h-fit tw-w-fit", role: "tooltip", "aria-hidden": "true" }, h("slot", null)));
|
|
83
83
|
}
|
|
84
84
|
get el() { return this; }
|
|
85
85
|
}, [4, "bcm-tooltip", {
|
|
@@ -10,7 +10,7 @@ const BcmTypography = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
10
10
|
this.__registerHost();
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h(Host,
|
|
13
|
+
return (h(Host, { class: "bcm-ui-element bcm-ui-content-display" }, h("slot", null)));
|
|
14
14
|
}
|
|
15
15
|
get el() { return this; }
|
|
16
16
|
}, [4, "bcm-typography"]);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-348b16ad.js';
|
|
6
|
-
import { G as Generate } from './generate-
|
|
6
|
+
import { G as Generate } from './generate-abec36e5.js';
|
|
7
7
|
import './colors-44c95e7e.js';
|
|
8
8
|
import './_commonjsHelpers-3016b722.js';
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-348b16ad.js';
|
|
6
|
-
import { G as Generate, s as snq, S as StatusProps, T as TypeProps } from './generate-
|
|
6
|
+
import { G as Generate, s as snq, S as StatusProps, T as TypeProps } from './generate-abec36e5.js';
|
|
7
7
|
import { c as classnames } from './index-ed9652af.js';
|
|
8
8
|
import { c as createStore } from './index-0052017c.js';
|
|
9
9
|
import { S as StringHelper } from './string-helper-6bd24967.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-348b16ad.js';
|
|
6
|
-
import { G as Generate } from './generate-
|
|
6
|
+
import { G as Generate } from './generate-abec36e5.js';
|
|
7
7
|
import './colors-44c95e7e.js';
|
|
8
8
|
import './_commonjsHelpers-3016b722.js';
|
|
9
9
|
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-348b16ad.js';
|
|
6
|
+
import './color-helper-116755ed.js';
|
|
7
|
+
import './datetime-helper-df25808a.js';
|
|
8
|
+
import { G as Generate } from './generate-abec36e5.js';
|
|
9
|
+
import './number-helper-cf26accd.js';
|
|
10
|
+
import './string-helper-6bd24967.js';
|
|
11
|
+
import './validators-63753298.js';
|
|
12
|
+
import './element-dragger-7ea06c76.js';
|
|
13
|
+
import { B as Bcm } from './bcm-9f50af9c.js';
|
|
14
|
+
import { c as cva } from './index-962dec74.js';
|
|
15
|
+
import './colors-1d7854ea.js';
|
|
16
|
+
import './utils-b3338faf.js';
|
|
17
|
+
import './colors-44c95e7e.js';
|
|
18
|
+
import './_commonjsHelpers-3016b722.js';
|
|
19
|
+
|
|
20
|
+
const avatarStyle = cva([
|
|
21
|
+
"bcm-avatar bcm-ui-element bcm-ui-content-display",
|
|
22
|
+
"tw-uppercase tw-inline-flex tw-items-center tw-justify-center",
|
|
23
|
+
"tw-bg-[--bcm-avatar-bg] tw-text-[--bcm-avatar-text]",
|
|
24
|
+
"[&>img]:tw-w-full [&>img]:tw-h-full",
|
|
25
|
+
], {
|
|
26
|
+
variants: {
|
|
27
|
+
size: {
|
|
28
|
+
small: ["bcm-avatar__size-small tw-text-1 tw-w-6 tw-h-6"],
|
|
29
|
+
medium: ["bcm-avatar__size-medium tw-text-2 tw-w-8 tw-h-8"],
|
|
30
|
+
large: ["bcm-avatar__size-large tw-text-3 tw-w-10 tw-h-10"],
|
|
31
|
+
},
|
|
32
|
+
shape: {
|
|
33
|
+
ellipse: ["bcm-avatar__shape-ellipse tw-rounded-full", "[&>.bcm-badge]:tw-top-0 [&>.bcm-badge]:tw-right-0", "[&>img]:tw-rounded-full"],
|
|
34
|
+
square: ["bcm-avatar__shape-square tw-rounded", "[&>.bcm-badge]:tw--top-0.5 [&>.bcm-badge]:tw--right-0.5", "[&>img]:tw-rounded"],
|
|
35
|
+
},
|
|
36
|
+
status: {
|
|
37
|
+
true: ["bcm-avatar__status tw-relative [&>.bcm-badge]:tw-absolute"],
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
compoundVariants: [
|
|
41
|
+
{
|
|
42
|
+
size: "medium",
|
|
43
|
+
shape: "ellipse",
|
|
44
|
+
status: false,
|
|
45
|
+
class: "",
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
defaultVariants: {
|
|
49
|
+
size: "medium",
|
|
50
|
+
shape: "ellipse",
|
|
51
|
+
status: false,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const BcmAvatar = class {
|
|
56
|
+
constructor(hostRef) {
|
|
57
|
+
registerInstance(this, hostRef);
|
|
58
|
+
this._id = Generate.UID();
|
|
59
|
+
this.image = undefined;
|
|
60
|
+
this.name = undefined;
|
|
61
|
+
this.alt = undefined;
|
|
62
|
+
this.shape = Bcm.Shape.ellipse;
|
|
63
|
+
this.size = Bcm.Size.medium;
|
|
64
|
+
this.color = undefined;
|
|
65
|
+
this.icon = "fas fa-user";
|
|
66
|
+
this.status = undefined;
|
|
67
|
+
this.blink = false;
|
|
68
|
+
this.isFallback = false;
|
|
69
|
+
}
|
|
70
|
+
getFirstLetters(name) {
|
|
71
|
+
const words = name.split(" ");
|
|
72
|
+
const initials = words.map(word => word.charAt(0).toUpperCase()).join("");
|
|
73
|
+
return initials.substring(0, 2);
|
|
74
|
+
}
|
|
75
|
+
renderContent() {
|
|
76
|
+
if (this.isFallback) {
|
|
77
|
+
if (this.name) {
|
|
78
|
+
return this.getFirstLetters(this.name);
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
return this.renderDefaultIcon();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
else if (this.image) {
|
|
85
|
+
return this.renderImage();
|
|
86
|
+
}
|
|
87
|
+
else if (this.name) {
|
|
88
|
+
return this.getFirstLetters(this.name);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
return this.renderDefaultIcon();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
renderDefaultIcon() {
|
|
95
|
+
return h("bcm-icon", { icon: this.icon });
|
|
96
|
+
}
|
|
97
|
+
renderImage() {
|
|
98
|
+
return h("img", { onError: () => (this.isFallback = true), src: this.image, alt: this.alt });
|
|
99
|
+
}
|
|
100
|
+
render() {
|
|
101
|
+
const { shape, size, status, color, blink } = this;
|
|
102
|
+
const dc = Generate.getTwColor({
|
|
103
|
+
color: color,
|
|
104
|
+
tones: {
|
|
105
|
+
200: ["bg"],
|
|
106
|
+
700: ["text"],
|
|
107
|
+
},
|
|
108
|
+
variable: "--bcm-avatar",
|
|
109
|
+
});
|
|
110
|
+
const customSize = !Object.keys(Bcm.BaseSize).includes(size)
|
|
111
|
+
? {
|
|
112
|
+
width: `${size}px`,
|
|
113
|
+
height: `${size}px`,
|
|
114
|
+
fontSize: `${+size / 3}px`,
|
|
115
|
+
}
|
|
116
|
+
: {};
|
|
117
|
+
return (h(Host, { role: "img", "aria-label": this.alt || this.name || "Avatar", class: avatarStyle({ size, shape, status: !!status }), style: Object.assign(Object.assign({}, dc), customSize) }, this.renderContent(), status && h("bcm-badge", { status: status, blink: blink, "aria-hidden": "true" }), h("slot", null)));
|
|
118
|
+
}
|
|
119
|
+
get el() { return getElement(this); }
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export { BcmAvatar as bcm_avatar };
|