bromcom-ui 2.8.0-rc.0 → 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.
- package/dist/bromcom-ui/bromcom-ui.css +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/p-00269ca7.entry.js +5 -0
- package/dist/bromcom-ui/p-0041bd28.entry.js +5 -0
- package/dist/bromcom-ui/p-007bec47.entry.js +5 -0
- package/dist/bromcom-ui/p-036f3880.entry.js +5 -0
- package/dist/bromcom-ui/p-0626d065.entry.js +5 -0
- package/dist/bromcom-ui/p-13082089.entry.js +5 -0
- package/dist/bromcom-ui/p-13337304.entry.js +5 -0
- package/dist/bromcom-ui/{p-e0ec1a36.js → p-19cba40f.js} +1 -1
- package/dist/bromcom-ui/p-1e328bbb.entry.js +5 -0
- package/dist/bromcom-ui/{p-3836eb77.entry.js → p-30070e50.entry.js} +1 -1
- package/dist/bromcom-ui/p-3407de8c.entry.js +5 -0
- package/dist/bromcom-ui/p-35e357fb.entry.js +5 -0
- package/dist/bromcom-ui/p-400f7245.entry.js +5 -0
- package/dist/bromcom-ui/p-445a227f.entry.js +5 -0
- package/dist/bromcom-ui/{p-7c9025cb.js → p-4bbba8b4.js} +1 -1
- package/dist/bromcom-ui/p-56bb19ef.js +5 -0
- package/dist/bromcom-ui/p-57185ca0.entry.js +5 -0
- package/dist/bromcom-ui/p-5948de7f.entry.js +5 -0
- package/dist/bromcom-ui/p-5a26b9b8.entry.js +5 -0
- package/dist/bromcom-ui/p-5bad0d7b.entry.js +5 -0
- package/dist/bromcom-ui/p-6530b216.entry.js +5 -0
- package/dist/bromcom-ui/p-67659c20.entry.js +5 -0
- package/dist/bromcom-ui/p-6bd60d81.entry.js +5 -0
- package/dist/bromcom-ui/p-6bfece08.entry.js +5 -0
- package/dist/bromcom-ui/p-6c288e79.entry.js +5 -0
- package/dist/bromcom-ui/p-6c7b218c.entry.js +5 -0
- package/dist/bromcom-ui/p-7124553b.js +5 -0
- package/dist/bromcom-ui/p-71930900.js +5 -0
- package/dist/bromcom-ui/{p-23cb7133.js → p-7b153da4.js} +1 -1
- package/dist/bromcom-ui/p-82031406.entry.js +5 -0
- package/dist/bromcom-ui/p-843c229b.entry.js +5 -0
- package/dist/bromcom-ui/p-8c9d67ad.entry.js +5 -0
- package/dist/bromcom-ui/p-8ced5b81.entry.js +5 -0
- package/dist/bromcom-ui/p-935fdf64.entry.js +5 -0
- package/dist/bromcom-ui/p-9490e993.entry.js +5 -0
- package/dist/bromcom-ui/{p-8fdcb5e7.js → p-a366b934.js} +1 -1
- package/dist/bromcom-ui/p-a3a346fc.entry.js +5 -0
- package/dist/bromcom-ui/{p-2a2466d0.js → p-a82bcbd4.js} +1 -1
- package/dist/bromcom-ui/p-aa59b8d1.entry.js +5 -0
- package/dist/bromcom-ui/p-b0d84958.entry.js +5 -0
- package/dist/bromcom-ui/p-b3003060.entry.js +5 -0
- package/dist/bromcom-ui/p-c012565a.entry.js +5 -0
- package/dist/bromcom-ui/p-c092fafd.entry.js +11 -0
- package/dist/bromcom-ui/{p-9d3a9f5b.entry.js → p-c9235a71.entry.js} +1 -1
- package/dist/bromcom-ui/p-cf24655f.entry.js +5 -0
- package/dist/bromcom-ui/p-d9bd56ef.entry.js +5 -0
- package/dist/bromcom-ui/p-dc3d9f76.entry.js +5 -0
- package/dist/bromcom-ui/p-e38344ed.entry.js +5 -0
- package/dist/bromcom-ui/p-e842eb54.entry.js +5 -0
- package/dist/bromcom-ui/p-ed04ae18.entry.js +5 -0
- package/dist/bromcom-ui/p-efd4bae1.entry.js +5 -0
- package/dist/bromcom-ui/p-f0877724.entry.js +5 -0
- package/dist/bromcom-ui/p-f4c08ca4.entry.js +5 -0
- package/dist/bromcom-ui/p-f4d15784.entry.js +5 -0
- package/dist/bromcom-ui/{p-6a473342.js → p-f4d6590d.js} +1 -1
- package/dist/bromcom-ui/p-ff78d3f1.entry.js +5 -0
- package/dist/cjs/bcm-accordion.cjs.entry.js +3 -1
- package/dist/cjs/bcm-alert.cjs.entry.js +2 -1
- package/dist/cjs/bcm-attendance.cjs.entry.js +3 -1
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +5 -4
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -1
- package/dist/cjs/bcm-button-group.cjs.entry.js +2 -1
- package/dist/cjs/{bcm-colorful_2.cjs.entry.js → bcm-button_10.cjs.entry.js} +1533 -18
- package/dist/cjs/bcm-card.cjs.entry.js +3 -2
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +18 -17
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +2 -1
- package/dist/cjs/bcm-checkbox_2.cjs.entry.js +3 -2
- package/dist/cjs/bcm-chip.cjs.entry.js +3 -2
- package/dist/cjs/bcm-collapse.cjs.entry.js +2 -1
- package/dist/cjs/bcm-color-input.cjs.entry.js +5 -4
- package/dist/cjs/bcm-date-picker.cjs.entry.js +2 -1
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +2 -1
- package/dist/cjs/bcm-default.cjs.entry.js +3 -1
- package/dist/cjs/bcm-drawer.cjs.entry.js +5 -4
- package/dist/cjs/bcm-dropdown.cjs.entry.js +3 -2
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +3 -2
- package/dist/cjs/bcm-form-2.cjs.entry.js +2 -1
- package/dist/cjs/bcm-input-custom.cjs.entry.js +2 -1
- package/dist/cjs/bcm-item.cjs.entry.js +3 -2
- package/dist/cjs/bcm-items.cjs.entry.js +3 -2
- package/dist/cjs/bcm-list.cjs.entry.js +8 -7
- package/dist/cjs/bcm-menu.cjs.entry.js +6 -5
- package/dist/cjs/bcm-modal.cjs.entry.js +2 -1
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +3 -2
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +2 -1
- package/dist/cjs/bcm-popover.cjs.entry.js +5 -4
- package/dist/cjs/bcm-progress.cjs.entry.js +3 -2
- package/dist/cjs/bcm-range.cjs.entry.js +2 -1
- package/dist/cjs/bcm-search.cjs.entry.js +4 -3
- package/dist/cjs/bcm-skeleton.cjs.entry.js +3 -1
- package/dist/cjs/bcm-step.cjs.entry.js +3 -2
- package/dist/cjs/bcm-stepper.cjs.entry.js +6 -5
- package/dist/cjs/bcm-switch.cjs.entry.js +2 -1
- package/dist/cjs/bcm-tab-group.cjs.entry.js +5 -4
- package/dist/cjs/bcm-tab-item-header.cjs.entry.js +5 -4
- package/dist/cjs/bcm-tab-item.cjs.entry.js +5 -4
- package/dist/cjs/bcm-tag.cjs.entry.js +3 -2
- package/dist/cjs/bcm-text.cjs.entry.js +2 -1
- package/dist/cjs/bcm-textarea.cjs.entry.js +3 -2
- package/dist/cjs/bcm-time-picker.cjs.entry.js +2 -1
- package/dist/cjs/bcm-toast.cjs.entry.js +115 -0
- package/dist/cjs/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/color-helper-09aa652d.js +86 -0
- package/dist/cjs/{color-helper-c9882bd8.js → colors-7cc2aee2.js} +1 -78
- package/dist/cjs/{generate-eef61d08.js → generate-e2397ffa.js} +14 -1
- package/dist/cjs/{input-template-517c3f53.js → input-template-2bdd0688.js} +1 -1
- package/dist/cjs/{json-parse-decarator-c0d7e570.js → json-parse-decarator-fe468734.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{number-helper-652dc22d.js → number-helper-aac9b592.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +3 -2
- package/dist/cjs/old-bcm-popover.cjs.entry.js +2 -1
- package/dist/cjs/{stepper-states-d00a1313.js → stepper-states-5aa9bb64.js} +1 -1
- package/dist/cjs/{tooltip-helper-cd02e32b.js → tooltip-helper-18b3deae.js} +5 -5
- package/dist/cjs/{validators-7eed007b.js → validators-5c4ee18b.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/external-source/bcm-toast-helper.js +20 -0
- package/dist/collection/components/external-source/test.js/bcm-toast-helper.js +20 -0
- package/dist/collection/components/molecules/radio/{group.js → radio-group.js} +185 -247
- package/dist/collection/components/molecules/radio/radio.js +42 -132
- package/dist/collection/components/organism/states/bcm-list2.states.js +1 -1
- package/dist/collection/helper/generate.js +12 -0
- package/dist/collection/helper/tooltip-helper.js +1 -1
- package/dist/components/bcm-list.js +1 -1
- package/dist/components/bcm-radio-group.js +103 -228
- package/dist/components/color-helper.js +1 -405
- package/dist/components/colors2.js +411 -0
- package/dist/components/generate.js +13 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/radio.js +38 -82
- package/dist/components/tooltip-helper.js +1 -1
- package/dist/esm/bcm-accordion.entry.js +3 -1
- package/dist/esm/bcm-alert.entry.js +2 -1
- package/dist/esm/bcm-attendance.entry.js +3 -1
- package/dist/esm/bcm-avatar_2.entry.js +5 -4
- package/dist/esm/bcm-breadcrumb.entry.js +2 -1
- package/dist/esm/bcm-button-group.entry.js +2 -1
- package/dist/esm/{bcm-colorful_2.entry.js → bcm-button_10.entry.js} +1521 -14
- package/dist/esm/bcm-card.entry.js +3 -2
- package/dist/esm/bcm-checkbox-group.entry.js +8 -7
- package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -1
- package/dist/esm/bcm-checkbox_2.entry.js +3 -2
- package/dist/esm/bcm-chip.entry.js +3 -2
- package/dist/esm/bcm-collapse.entry.js +2 -1
- package/dist/esm/bcm-color-input.entry.js +5 -4
- package/dist/esm/bcm-date-picker.entry.js +2 -1
- package/dist/esm/bcm-datetime-picker.entry.js +2 -1
- package/dist/esm/bcm-default.entry.js +3 -1
- package/dist/esm/bcm-drawer.entry.js +5 -4
- package/dist/esm/bcm-dropdown.entry.js +3 -2
- package/dist/esm/bcm-expansion-panel.entry.js +3 -2
- package/dist/esm/bcm-form-2.entry.js +2 -1
- package/dist/esm/bcm-input-custom.entry.js +2 -1
- package/dist/esm/bcm-item.entry.js +3 -2
- package/dist/esm/bcm-items.entry.js +3 -2
- package/dist/esm/bcm-list.entry.js +8 -7
- package/dist/esm/bcm-menu.entry.js +6 -5
- package/dist/esm/bcm-modal.entry.js +2 -1
- package/dist/esm/bcm-popconfirm-box.entry.js +3 -2
- package/dist/esm/bcm-popconfirm.entry.js +2 -1
- package/dist/esm/bcm-popover.entry.js +5 -4
- package/dist/esm/bcm-progress.entry.js +3 -2
- package/dist/esm/bcm-range.entry.js +2 -1
- package/dist/esm/bcm-search.entry.js +4 -3
- package/dist/esm/bcm-skeleton.entry.js +3 -1
- package/dist/esm/bcm-step.entry.js +3 -2
- package/dist/esm/bcm-stepper.entry.js +6 -5
- package/dist/esm/bcm-switch.entry.js +2 -1
- package/dist/esm/bcm-tab-group.entry.js +5 -4
- package/dist/esm/bcm-tab-item-header.entry.js +5 -4
- package/dist/esm/bcm-tab-item.entry.js +5 -4
- package/dist/esm/bcm-tag.entry.js +3 -2
- package/dist/esm/bcm-text.entry.js +2 -1
- package/dist/esm/bcm-textarea.entry.js +3 -2
- package/dist/esm/bcm-time-picker.entry.js +2 -1
- package/dist/esm/bcm-toast.entry.js +111 -0
- package/dist/esm/bromcom-ui.js +1 -1
- package/dist/esm/color-helper-2b6697b6.js +84 -0
- package/dist/esm/{color-helper-7e202fd8.js → colors-39b87f63.js} +1 -78
- package/dist/esm/{generate-5f6567d0.js → generate-82c3ee1f.js} +14 -1
- package/dist/esm/{input-template-e03cafc5.js → input-template-9a5da65a.js} +1 -1
- package/dist/esm/{json-parse-decarator-d8836c67.js → json-parse-decarator-aba7d121.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{number-helper-b8a2b813.js → number-helper-d4126c02.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +3 -2
- package/dist/esm/old-bcm-popover.entry.js +2 -1
- package/dist/esm/{stepper-states-16e0b400.js → stepper-states-3b8d6edd.js} +1 -1
- package/dist/esm/{tooltip-helper-87acf426.js → tooltip-helper-e7eb577d.js} +5 -5
- package/dist/esm/{validators-07033707.js → validators-2a89d009.js} +1 -1
- package/dist/types/components/external-source/bcm-toast-helper.d.ts +12 -0
- package/dist/types/components/external-source/test.js/bcm-toast-helper.d.ts +12 -0
- package/dist/types/components/molecules/radio/{group.d.ts → radio-group.d.ts} +22 -27
- package/dist/types/components/molecules/radio/radio.d.ts +5 -11
- package/dist/types/components.d.ts +19 -33
- package/dist/types/helper/generate.d.ts +1 -0
- package/package.json +1 -1
- package/dist/bromcom-ui/p-0191554f.entry.js +0 -5
- package/dist/bromcom-ui/p-040f1cc5.entry.js +0 -5
- package/dist/bromcom-ui/p-05a32a81.entry.js +0 -5
- package/dist/bromcom-ui/p-13f0d66c.entry.js +0 -5
- package/dist/bromcom-ui/p-1d77cf0f.entry.js +0 -5
- package/dist/bromcom-ui/p-21bf2bb5.js +0 -5
- package/dist/bromcom-ui/p-2552592a.entry.js +0 -5
- package/dist/bromcom-ui/p-2b774123.entry.js +0 -5
- package/dist/bromcom-ui/p-2cac45d6.entry.js +0 -5
- package/dist/bromcom-ui/p-2f0e0ecf.entry.js +0 -5
- package/dist/bromcom-ui/p-4789cc74.entry.js +0 -5
- package/dist/bromcom-ui/p-4a123037.entry.js +0 -5
- package/dist/bromcom-ui/p-4d556100.entry.js +0 -5
- package/dist/bromcom-ui/p-4fa21c01.entry.js +0 -5
- package/dist/bromcom-ui/p-53beb481.entry.js +0 -5
- package/dist/bromcom-ui/p-583d6b09.entry.js +0 -5
- package/dist/bromcom-ui/p-5a5cc30f.entry.js +0 -5
- package/dist/bromcom-ui/p-5c2bf950.entry.js +0 -5
- package/dist/bromcom-ui/p-5fa48e18.entry.js +0 -5
- package/dist/bromcom-ui/p-61865ff2.entry.js +0 -5
- package/dist/bromcom-ui/p-695f6b01.entry.js +0 -5
- package/dist/bromcom-ui/p-7224e112.entry.js +0 -5
- package/dist/bromcom-ui/p-74e46eeb.entry.js +0 -5
- package/dist/bromcom-ui/p-7d9a38b0.entry.js +0 -5
- package/dist/bromcom-ui/p-7f1a79c5.entry.js +0 -5
- package/dist/bromcom-ui/p-816c4dc7.entry.js +0 -5
- package/dist/bromcom-ui/p-86356b26.entry.js +0 -5
- package/dist/bromcom-ui/p-870c903a.entry.js +0 -5
- package/dist/bromcom-ui/p-8b60d1db.entry.js +0 -5
- package/dist/bromcom-ui/p-8dbe72a1.entry.js +0 -5
- package/dist/bromcom-ui/p-91b1efad.entry.js +0 -5
- package/dist/bromcom-ui/p-994e484e.entry.js +0 -5
- package/dist/bromcom-ui/p-a3ffcb0d.js +0 -5
- package/dist/bromcom-ui/p-a427f0ee.entry.js +0 -5
- package/dist/bromcom-ui/p-a9ab4073.entry.js +0 -5
- package/dist/bromcom-ui/p-b1d6b529.entry.js +0 -5
- package/dist/bromcom-ui/p-b39f6cb3.entry.js +0 -5
- package/dist/bromcom-ui/p-b69abb6f.entry.js +0 -5
- package/dist/bromcom-ui/p-b8ffc86f.entry.js +0 -5
- package/dist/bromcom-ui/p-bb95aa62.entry.js +0 -5
- package/dist/bromcom-ui/p-bc332b5d.entry.js +0 -5
- package/dist/bromcom-ui/p-bc97d311.entry.js +0 -5
- package/dist/bromcom-ui/p-c0ac6d54.entry.js +0 -5
- package/dist/bromcom-ui/p-c68f44be.entry.js +0 -5
- package/dist/bromcom-ui/p-cf04e7a3.entry.js +0 -5
- package/dist/bromcom-ui/p-d4ff4de0.entry.js +0 -5
- package/dist/bromcom-ui/p-d777677c.entry.js +0 -10
- package/dist/bromcom-ui/p-da540844.entry.js +0 -5
- package/dist/bromcom-ui/p-e2e7d808.entry.js +0 -5
- package/dist/bromcom-ui/p-ec7f4a12.entry.js +0 -5
- package/dist/bromcom-ui/p-f21a7fc0.entry.js +0 -5
- package/dist/bromcom-ui/p-fe996e86.entry.js +0 -5
- package/dist/bromcom-ui/p-fea33175.entry.js +0 -5
- package/dist/cjs/bcm-button_2.cjs.entry.js +0 -481
- package/dist/cjs/bcm-form.cjs.entry.js +0 -487
- package/dist/cjs/bcm-icon.cjs.entry.js +0 -41
- package/dist/cjs/bcm-input.cjs.entry.js +0 -368
- package/dist/cjs/bcm-label_2.cjs.entry.js +0 -148
- package/dist/cjs/bcm-radio-group.cjs.entry.js +0 -277
- package/dist/cjs/bcm-radio.cjs.entry.js +0 -105
- package/dist/collection/components/molecules/radio/group.css +0 -802
- package/dist/collection/components/molecules/radio/radio.css +0 -1287
- package/dist/collection/components/molecules/radio/types.js +0 -30
- package/dist/collection/components/molecules/states/radio-group.states.js +0 -107
- package/dist/esm/bcm-button_2.entry.js +0 -476
- package/dist/esm/bcm-form.entry.js +0 -483
- package/dist/esm/bcm-icon.entry.js +0 -37
- package/dist/esm/bcm-input.entry.js +0 -364
- package/dist/esm/bcm-label_2.entry.js +0 -143
- package/dist/esm/bcm-radio-group.entry.js +0 -273
- package/dist/esm/bcm-radio.entry.js +0 -101
- package/dist/types/components/molecules/radio/types.d.ts +0 -29
- package/dist/types/components/molecules/states/radio-group.states.d.ts +0 -48
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* Copyright (c) Bromcom.
|
|
4
|
-
*/
|
|
5
|
-
import{r as t,c as i,f as s,h as e,H as a,g as r}from"./p-88f7d869.js";import{I as o}from"./p-9bef5a59.js";import"./p-a3ffcb0d.js";import"./p-626a65e9.js";import{G as c}from"./p-21bf2bb5.js";import"./p-e0ec1a36.js";import"./p-16b50160.js";import"./p-6a473342.js";import"./p-7e44e6b5.js";import{d as l}from"./p-8c018ae0.js";import{a as h}from"./p-a429e85b.js";import"./p-436364c8.js";import"./p-6f56f8ca.js";const n=class{constructor(s){t(this,s),this.tabChange=i(this,"bcm-tab-change",7),this._id=c.UID(),this.active="1",this.color="blue",this.size=h.Size.medium}get tabItems(){return this.el.querySelectorAll("bcm-tab-item")}get tabItemHeaders(){return this.el.querySelectorAll("bcm-tab-item-header")}connectedCallback(){var t;(null===(t=this.tabItems)||void 0===t?void 0:t.length)&&(this.tabItems.forEach(((t,i)=>{let s=!!t.hasAttribute("active"),e=!!t.hasAttribute("disabled"),a=i+1;t.setAttribute("index",`${a}`),t.setAttribute("size",this.size),t.setAttribute("color",this.color),t.removeAttribute("active"),t.removeAttribute("disabled"),s&&(t.setAttribute("active",""),this.active=a.toString()),e&&t.setAttribute("disabled","")})),Array.from(this.tabItems).some((t=>t.hasAttribute("active")))||this.tabItems[0].setAttribute("active",""))}handleTabClick(t){var i,s;t&&(this.active=t.toString()),(null===(i=this.tabItems)||void 0===i?void 0:i.length)&&this.tabItems.forEach((t=>{t.removeAttribute("active"),t.setAttribute("size",this.size),t.setAttribute("color",this.color),t.getAttribute("index")==this.active&&t.setAttribute("active","")})),(null===(s=this.tabItemHeaders)||void 0===s?void 0:s.length)&&this.tabItemHeaders.forEach((t=>{t.removeAttribute("active"),t.setAttribute("size",this.size),t.setAttribute("color",this.color),t.getAttribute("index")==this.active&&t.setAttribute("active","")})),this.tabChange.emit(this.active)}componentDidRender(){this.inkBarControl(),this.handleTabClick()}componentDidLoad(){this.inkBarControl()}async setActive(t){t>0&&t<=this.tabItems.length&&t!=+this.active&&this.handleTabClick(t)}async refresh(){await l(100),s(this)}inkBarControl(){var t;const i=this.el.querySelector("#ink-bar");if(i&&(null===(t=this.tabItemHeaders)||void 0===t?void 0:t.length))for(let t=0;t<this.tabItemHeaders.length;t++){const s=this.tabItemHeaders[t];s.getAttribute("index")===this.active&&(i.style.width=`${s.offsetWidth}px`,i.style.transform=`translateX(${s.offsetLeft}px)`)}}activeChanged(t,i){var s;(null===(s=this.tabItems)||void 0===s?void 0:s.length)&&(Array.from(this.tabItems).some((i=>i.getAttribute("index")==t))||(this.active="1"))}render(){const{color:t}=this;return e(a,{role:"tablist","aria-label":"Tab Group",class:"tw-flex tw-w-full tw-flex-col tw-items-center tw-font-sans"},e("div",{class:"tw-relative tw-flex tw-w-full tw-flex-row tw-items-end tw-justify-between",id:"tab-header"},e("div",{id:"ink-bar",class:`tw-bg-${t}-500 tw-absolute tw-bottom-0 tw-left-0 tw-mt-[-2px] tw-h-[2px] tw-rounded-sm tw-transition-transform`})),e("slot",null))}get el(){return r(this)}static get watchers(){return{active:["activeChanged"]}}};!function(t,i,s,e){var a,r=arguments.length,o=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,s,e);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(o=(r<3?a(o):r>3?a(i,s,o):a(i,s))||o);r>3&&o&&Object.defineProperty(i,s,o)}([o()],n.prototype,"el",void 0);export{n as bcm_tab_group}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* Copyright (c) Bromcom.
|
|
4
|
-
*/
|
|
5
|
-
import{r as e,h as i,H as t,g as p}from"./p-88f7d869.js";import{I as n}from"./p-9bef5a59.js";const a=class{constructor(i){e(this,i),this.hidden=!1,this.icon=void 0}render(){const{icon:e,hidden:p}=this;return i(t,{class:"bcm-icon fa "+(p?"hidden":"")},i("i",{class:`${e}`}))}get el(){return p(this)}};(function(e,i,t,p){var n,a=arguments.length,s=a<3?i:null===p?p=Object.getOwnPropertyDescriptor(i,t):p;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,i,t,p);else for(var x=e.length-1;x>=0;x--)(n=e[x])&&(s=(a<3?n(s):a>3?n(i,t,s):n(i,t))||s);a>3&&s&&Object.defineProperty(i,t,s)})([n()],a.prototype,"el",void 0),a.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-icon.hidden{display:none}';export{a as bcm_icon}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* Copyright (c) Bromcom.
|
|
4
|
-
*/
|
|
5
|
-
import{r as t,h as i,H as e,g as s}from"./p-88f7d869.js";import{c as a}from"./p-d5b08a77.js";import{I as n}from"./p-9bef5a59.js";import{G as h}from"./p-21bf2bb5.js";import{B as p}from"./p-a429e85b.js";import{d as r}from"./p-8c018ae0.js";import"./p-6f56f8ca.js";const o=class{constructor(i){t(this,i),this._id=h.UID(),this.time=new Date,this.value=void 0,this.hidden=!1,this.name=void 0,this.fullWidth=!1,this.required=!1,this.label=void 0,this.placeholder=void 0,this.disabled=!1,this.noCaption=!1,this.caption="",this.captionError=void 0,this.captionType="default",this.alignment=void 0,this.placement=p.Placement["bottom-start"],this.linkedComponent=void 0,this.clearable=!1}componentWillLoad(){if("string"==typeof this.time){const t=!!/\b([01][0-9]|2[0-3]):([0-5][0-9])\b/.test(this.time)&&this.time.split(":");this.time=t?new Date((new Date).setHours(Number(t[0]),Number(t[1]))):new Date}}handlePickerLoad(){this.value=this.picker.value}handlePickerChange(t){this.value=t.detail}async set(t){return this.picker.set(t)}async get(){var t;return(null===(t=this.value)||void 0===t?void 0:t.timestamp)||null}async setDisabled(t){this.disabled=t}async getInput(){return await this.picker.getInput()}async getValue(){return this.value}async isValid(){return await this.picker.isValid()}async setClear(){return await this.picker.setClear(),await r(10),Promise.resolve()}async resetCaption(){return await r(10),await this.picker.resetCaption(),this.captionType="default",this.captionError=null,await r(10),Promise.resolve()}async open(){return await this.picker.open()}render(){const t=a(this.hidden?"hidden":null,{"full-width":this.fullWidth});return i(e,{class:t},i("bcm-datetime-picker",{"linked-component":this.linkedComponent,id:this._id,fullWidth:this.fullWidth,required:this.required,label:this.label,name:this.name,placeholder:this.placeholder,type:"time",clearable:this.clearable,date:this.time,ref:t=>this.picker=t,disabled:this.disabled,"on-bcm-load":()=>this.handlePickerLoad(),"on-bcm-change":t=>this.handlePickerChange(t),noCaption:this.noCaption,captionError:this.captionError,caption:this.caption,captionType:this.captionType,alignment:this.alignment,placement:this.placement}))}get el(){return s(this)}};(function(t,i,e,s){var a,n=arguments.length,h=n<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,i,e,s);else for(var p=t.length-1;p>=0;p--)(a=t[p])&&(h=(n<3?a(h):n>3?a(i,e,h):a(i,e))||h);n>3&&h&&Object.defineProperty(i,e,h)})([n()],o.prototype,"el",void 0),o.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:inline-block;width:100%;max-width:256px}:host(.full-width){max-width:100%}:host(.hidden){display:none}:host(.linked-component){display:none}';export{o as bcm_time_picker}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* Copyright (c) Bromcom.
|
|
4
|
-
*/
|
|
5
|
-
import{r as t,c as s,h as i,H as e,g as h}from"./p-88f7d869.js";import{c as a}from"./p-d5b08a77.js";import{I as d}from"./p-9bef5a59.js";import{G as o}from"./p-21bf2bb5.js";import{s as c}from"./p-2a2466d0.js";import"./p-6f56f8ca.js";import"./p-74595a06.js";const n=class{constructor(i){t(this,i),this.dataIsLoaded=s(this,"data-is-loaded",7),this.bcmChangeHidden=s(this,"bcm-change-hidden",7),this.hidden=!1,this._id=o.UID(),this._title=void 0,this.description=void 0,this.status="default",this.icon=void 0,this.loading=!1,this.valid=!0,this.index=void 0,this.active=!1,this.htmlTemplate=void 0,this.isLast=!1,this.disabled=!1}componentDidLoad(){this.isLast&&this.dataIsLoaded.emit(!0)}getStepper(){return this.el.closest("bcm-stepper")||null}activeChanged(){if(this.active){const t=this.getStepper();t&&c.changeStepDisabled(t.stepperId,this._id,!1)}}statusChange(){const t=this.getStepper();t&&c.changeStepStatus(t.stepperId,this._id,this.status)}hiddenChange(t,s){const i=this.getStepper();t!==s&&i&&!this.active&&this.bcmChangeHidden.emit(t)}disabledChange(t,s){const i=this.getStepper();i&&c.changeStepDisabled(i.stepperId,this._id,t)}render(){const{hidden:t,valid:s,active:h}=this,d=a("bcm-stepper__step",s?"bcm-stepper__step-valid":"bcm-stepper__step-invalid",{"bcm-stepper__step-active":h,hidden:t});return i(e,{class:d},i("slot",null))}get el(){return h(this)}static get watchers(){return{active:["activeChanged"],status:["statusChange"],hidden:["hiddenChange"],disabled:["disabledChange"]}}};!function(t,s,i,e){var h,a=arguments.length,d=a<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(t,s,i,e);else for(var o=t.length-1;o>=0;o--)(h=t[o])&&(d=(a<3?h(d):a>3?h(s,i,d):h(s,i))||d);a>3&&d&&Object.defineProperty(s,i,d)}([d()],n.prototype,"el",void 0);export{n as bcm_step}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* Copyright (c) Bromcom.
|
|
4
|
-
*/
|
|
5
|
-
import{r as e,c as o,h as c,H as n,g as l}from"./p-88f7d869.js";import{c as r}from"./p-d5b08a77.js";import{B as s}from"./p-a429e85b.js";import{S as d}from"./p-16b50160.js";import{S as a}from"./p-48e9166c.js";import{G as m}from"./p-21bf2bb5.js";import{I as i}from"./p-9bef5a59.js";import"./p-6f56f8ca.js";const b=class{constructor(c){e(this,c),this.beforeOpen=o(this,"beforeOpen",7),this.beforeClose=o(this,"beforeClose",7),this.close=o(this,"bcm-close",7),this.modalSlots={},this._id=m.UID(),this.isShow=!1,this.hidden=!1,this.size=s.Size.medium,this.backdrop=!0,this.width=void 0,this.height=void 0,this.fullWidth=!1}connectedCallback(){const e=this.el.querySelectorAll("bcm-modal-header, bcm-modal-footer");e&&e.forEach((e=>{let o=d.lowercase(d.split(e.nodeName,"-").pop());e.slot=o,e.classList.add(`bcm-modal__container-${o}-content`),this.modalSlots[o]=e}));const o=`bcm-modal--disable-scroll-${this._id}`,c=`bcm-modal-style-${this._id}`;let n=document.getElementById(c);n||(n=document.createElement("style"),n.id=c,n.innerHTML=`.${o} { overflow: hidden; }`,document.head.appendChild(n))}componentWillLoad(){}handleSubmit(e){const o=m.findEventPathWithNodeName(e,d.uppercase("bcm-button"));o&&o.dataDismiss&&this.hide()}handleBackdrop(){1==this.backdrop&&this.hide()}async hide(){this.beforeClose.emit(this.el),this.isShow=!1,this.close.emit(this)}async show(){this.beforeOpen.emit(this.el),this.isShow=!0}keyboardNavigation(e){1==this.backdrop&&(e.keyCode||0)==s.KeyCode.escape&&(e.preventDefault(),this.hide())}_openHandler(){const e=`bcm-modal--disable-scroll-${this._id}`;this.isShow?document.body.classList.add(e):document.body.classList.remove(e)}disconnectedCallback(){document.body.classList.remove(`bcm-modal--disable-scroll-${this._id}`)}render(){const{isShow:e,size:o,fullWidth:l,hidden:s,width:d,height:m}=this,i=r("bcm-modal__container",o,{"custom-size":d||m,"full-width":l,"bcm-modal__show":e}),b=r("bcm-modal",{hidden:s,"bcm-modal__show":e}),t=r("bcm-modal__container-main","size-2"),w=Object.assign(Object.assign({},d&&{width:d}),m&&{height:m});return c(n,{class:`tw-overscroll-contain ${b}`},c("div",{class:"overlay",onClick:()=>this.handleBackdrop()}),c("div",{class:i,style:w},c((()=>this.modalSlots.header&&c("header",{class:"bcm-modal__container-header"},c(a,{name:"header",className:"full-width"}),c("div",{class:"bcm-modal__container-header-close",onClick:()=>this.hide()},c("bcm-icon",{icon:"far fa-times"})))),null),c("main",{class:t},c("article",null,c(a,null))),c((()=>this.modalSlots.footer&&c("footer",{class:"bcm-modal__container-footer"},c("slot",{name:"footer"}))),null)))}get el(){return l(this)}static get watchers(){return{isShow:["_openHandler"]}}};(function(e,o,c,n){var l,r=arguments.length,s=r<3?o:null===n?n=Object.getOwnPropertyDescriptor(o,c):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,o,c,n);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(s=(r<3?l(s):r>3?l(o,c,s):l(o,c))||s);r>3&&s&&Object.defineProperty(o,c,s)})([i()],b.prototype,"el",void 0),b.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:root,::after,::before{--bcm-new-ds-color-inherit:inherit;--bcm-new-ds-color-current:currentColor;--bcm-new-ds-color-transparent:transparent;--bcm-new-ds-color-black:#000;--bcm-new-ds-color-white:#fff;--bcm-new-ds-color-slate:#64748b;--bcm-new-ds-color-slate-50:#f8fafc;--bcm-new-ds-color-slate-100:#f1f5f9;--bcm-new-ds-color-slate-200:#e2e8f0;--bcm-new-ds-color-slate-300:#cbd5e1;--bcm-new-ds-color-slate-400:#94a3b8;--bcm-new-ds-color-slate-500:#64748b;--bcm-new-ds-color-slate-600:#475569;--bcm-new-ds-color-slate-700:#334155;--bcm-new-ds-color-slate-800:#1e293b;--bcm-new-ds-color-slate-900:#0f172a;--bcm-new-ds-color-gray:#6b7280;--bcm-new-ds-color-gray-50:#f9fafb;--bcm-new-ds-color-gray-100:#f3f4f6;--bcm-new-ds-color-gray-200:#e5e7eb;--bcm-new-ds-color-gray-300:#d1d5db;--bcm-new-ds-color-gray-400:#9ca3af;--bcm-new-ds-color-gray-500:#6b7280;--bcm-new-ds-color-gray-600:#4b5563;--bcm-new-ds-color-gray-700:#374151;--bcm-new-ds-color-gray-800:#1f2937;--bcm-new-ds-color-gray-900:#111827;--bcm-new-ds-color-zinc:#71717a;--bcm-new-ds-color-zinc-50:#fafafa;--bcm-new-ds-color-zinc-100:#f4f4f5;--bcm-new-ds-color-zinc-200:#e4e4e7;--bcm-new-ds-color-zinc-300:#d4d4d8;--bcm-new-ds-color-zinc-400:#a1a1aa;--bcm-new-ds-color-zinc-500:#71717a;--bcm-new-ds-color-zinc-600:#52525b;--bcm-new-ds-color-zinc-700:#3f3f46;--bcm-new-ds-color-zinc-800:#27272a;--bcm-new-ds-color-zinc-900:#18181b;--bcm-new-ds-color-neutral:#737373;--bcm-new-ds-color-neutral-50:#fafafa;--bcm-new-ds-color-neutral-100:#f5f5f5;--bcm-new-ds-color-neutral-200:#e5e5e5;--bcm-new-ds-color-neutral-300:#d4d4d4;--bcm-new-ds-color-neutral-400:#a3a3a3;--bcm-new-ds-color-neutral-500:#737373;--bcm-new-ds-color-neutral-600:#525252;--bcm-new-ds-color-neutral-700:#404040;--bcm-new-ds-color-neutral-800:#262626;--bcm-new-ds-color-neutral-900:#171717;--bcm-new-ds-color-stone:#78716c;--bcm-new-ds-color-stone-50:#fafaf9;--bcm-new-ds-color-stone-100:#f5f5f4;--bcm-new-ds-color-stone-200:#e7e5e4;--bcm-new-ds-color-stone-300:#d6d3d1;--bcm-new-ds-color-stone-400:#a8a29e;--bcm-new-ds-color-stone-500:#78716c;--bcm-new-ds-color-stone-600:#57534e;--bcm-new-ds-color-stone-700:#44403c;--bcm-new-ds-color-stone-800:#292524;--bcm-new-ds-color-stone-900:#1c1917;--bcm-new-ds-color-red:#ef4444;--bcm-new-ds-color-red-50:#fef2f2;--bcm-new-ds-color-red-100:#fee2e2;--bcm-new-ds-color-red-200:#fecaca;--bcm-new-ds-color-red-300:#fca5a5;--bcm-new-ds-color-red-400:#f87171;--bcm-new-ds-color-red-500:#ef4444;--bcm-new-ds-color-red-600:#dc2626;--bcm-new-ds-color-red-700:#b91c1c;--bcm-new-ds-color-red-800:#991b1b;--bcm-new-ds-color-red-900:#7f1d1d;--bcm-new-ds-color-orange:#f97316;--bcm-new-ds-color-orange-50:#fff7ed;--bcm-new-ds-color-orange-100:#ffedd5;--bcm-new-ds-color-orange-200:#fed7aa;--bcm-new-ds-color-orange-300:#fdba74;--bcm-new-ds-color-orange-400:#fb923c;--bcm-new-ds-color-orange-500:#f97316;--bcm-new-ds-color-orange-600:#ea580c;--bcm-new-ds-color-orange-700:#c2410c;--bcm-new-ds-color-orange-800:#9a3412;--bcm-new-ds-color-orange-900:#7c2d12;--bcm-new-ds-color-amber:#f59e0b;--bcm-new-ds-color-amber-50:#fffbeb;--bcm-new-ds-color-amber-100:#fef3c7;--bcm-new-ds-color-amber-200:#fde68a;--bcm-new-ds-color-amber-300:#fcd34d;--bcm-new-ds-color-amber-400:#fbbf24;--bcm-new-ds-color-amber-500:#f59e0b;--bcm-new-ds-color-amber-600:#d97706;--bcm-new-ds-color-amber-700:#b45309;--bcm-new-ds-color-amber-800:#92400e;--bcm-new-ds-color-amber-900:#78350f;--bcm-new-ds-color-yellow:#eab308;--bcm-new-ds-color-yellow-50:#fefce8;--bcm-new-ds-color-yellow-100:#fef9c3;--bcm-new-ds-color-yellow-200:#fef08a;--bcm-new-ds-color-yellow-300:#fde047;--bcm-new-ds-color-yellow-400:#facc15;--bcm-new-ds-color-yellow-500:#eab308;--bcm-new-ds-color-yellow-600:#ca8a04;--bcm-new-ds-color-yellow-700:#a16207;--bcm-new-ds-color-yellow-800:#854d0e;--bcm-new-ds-color-yellow-900:#713f12;--bcm-new-ds-color-lime:#84cc16;--bcm-new-ds-color-lime-50:#f7fee7;--bcm-new-ds-color-lime-100:#ecfccb;--bcm-new-ds-color-lime-200:#d9f99d;--bcm-new-ds-color-lime-300:#bef264;--bcm-new-ds-color-lime-400:#a3e635;--bcm-new-ds-color-lime-500:#84cc16;--bcm-new-ds-color-lime-600:#65a30d;--bcm-new-ds-color-lime-700:#4d7c0f;--bcm-new-ds-color-lime-800:#3f6212;--bcm-new-ds-color-lime-900:#365314;--bcm-new-ds-color-green:#22c55e;--bcm-new-ds-color-green-50:#f0fdf4;--bcm-new-ds-color-green-100:#dcfce7;--bcm-new-ds-color-green-200:#bbf7d0;--bcm-new-ds-color-green-300:#86efac;--bcm-new-ds-color-green-400:#4ade80;--bcm-new-ds-color-green-500:#22c55e;--bcm-new-ds-color-green-600:#16a34a;--bcm-new-ds-color-green-700:#15803d;--bcm-new-ds-color-green-800:#166534;--bcm-new-ds-color-green-900:#14532d;--bcm-new-ds-color-emerald:#10b981;--bcm-new-ds-color-emerald-50:#ecfdf5;--bcm-new-ds-color-emerald-100:#d1fae5;--bcm-new-ds-color-emerald-200:#a7f3d0;--bcm-new-ds-color-emerald-300:#6ee7b7;--bcm-new-ds-color-emerald-400:#34d399;--bcm-new-ds-color-emerald-500:#10b981;--bcm-new-ds-color-emerald-600:#059669;--bcm-new-ds-color-emerald-700:#047857;--bcm-new-ds-color-emerald-800:#065f46;--bcm-new-ds-color-emerald-900:#064e3b;--bcm-new-ds-color-teal:#14b8a6;--bcm-new-ds-color-teal-50:#f0fdfa;--bcm-new-ds-color-teal-100:#ccfbf1;--bcm-new-ds-color-teal-200:#99f6e4;--bcm-new-ds-color-teal-300:#5eead4;--bcm-new-ds-color-teal-400:#2dd4bf;--bcm-new-ds-color-teal-500:#14b8a6;--bcm-new-ds-color-teal-600:#0d9488;--bcm-new-ds-color-teal-700:#0f766e;--bcm-new-ds-color-teal-800:#115e59;--bcm-new-ds-color-teal-900:#134e4a;--bcm-new-ds-color-cyan:#06b6d4;--bcm-new-ds-color-cyan-50:#ecfeff;--bcm-new-ds-color-cyan-100:#cffafe;--bcm-new-ds-color-cyan-200:#a5f3fc;--bcm-new-ds-color-cyan-300:#67e8f9;--bcm-new-ds-color-cyan-400:#22d3ee;--bcm-new-ds-color-cyan-500:#06b6d4;--bcm-new-ds-color-cyan-600:#0891b2;--bcm-new-ds-color-cyan-700:#0e7490;--bcm-new-ds-color-cyan-800:#155e75;--bcm-new-ds-color-cyan-900:#164e63;--bcm-new-ds-color-sky:#0ea5e9;--bcm-new-ds-color-sky-50:#f0f9ff;--bcm-new-ds-color-sky-100:#e0f2fe;--bcm-new-ds-color-sky-200:#bae6fd;--bcm-new-ds-color-sky-300:#7dd3fc;--bcm-new-ds-color-sky-400:#38bdf8;--bcm-new-ds-color-sky-500:#0ea5e9;--bcm-new-ds-color-sky-600:#0284c7;--bcm-new-ds-color-sky-700:#0369a1;--bcm-new-ds-color-sky-800:#075985;--bcm-new-ds-color-sky-900:#0c4a6e;--bcm-new-ds-color-blue:#3b82f6;--bcm-new-ds-color-blue-50:#eff6ff;--bcm-new-ds-color-blue-100:#dbeafe;--bcm-new-ds-color-blue-200:#bfdbfe;--bcm-new-ds-color-blue-300:#93c5fd;--bcm-new-ds-color-blue-400:#60a5fa;--bcm-new-ds-color-blue-500:#3b82f6;--bcm-new-ds-color-blue-600:#2563eb;--bcm-new-ds-color-blue-700:#1d4ed8;--bcm-new-ds-color-blue-800:#1e40af;--bcm-new-ds-color-blue-900:#1e3a8a;--bcm-new-ds-color-indigo:#6366f1;--bcm-new-ds-color-indigo-50:#eef2ff;--bcm-new-ds-color-indigo-100:#e0e7ff;--bcm-new-ds-color-indigo-200:#c7d2fe;--bcm-new-ds-color-indigo-300:#a5b4fc;--bcm-new-ds-color-indigo-400:#818cf8;--bcm-new-ds-color-indigo-500:#6366f1;--bcm-new-ds-color-indigo-600:#4f46e5;--bcm-new-ds-color-indigo-700:#4338ca;--bcm-new-ds-color-indigo-800:#3730a3;--bcm-new-ds-color-indigo-900:#312e81;--bcm-new-ds-color-violet:#8b5cf6;--bcm-new-ds-color-violet-50:#f5f3ff;--bcm-new-ds-color-violet-100:#ede9fe;--bcm-new-ds-color-violet-200:#ddd6fe;--bcm-new-ds-color-violet-300:#c4b5fd;--bcm-new-ds-color-violet-400:#a78bfa;--bcm-new-ds-color-violet-500:#8b5cf6;--bcm-new-ds-color-violet-600:#7c3aed;--bcm-new-ds-color-violet-700:#6d28d9;--bcm-new-ds-color-violet-800:#5b21b6;--bcm-new-ds-color-violet-900:#4c1d95;--bcm-new-ds-color-purple:#a855f7;--bcm-new-ds-color-purple-50:#faf5ff;--bcm-new-ds-color-purple-100:#f3e8ff;--bcm-new-ds-color-purple-200:#e9d5ff;--bcm-new-ds-color-purple-300:#d8b4fe;--bcm-new-ds-color-purple-400:#c084fc;--bcm-new-ds-color-purple-500:#a855f7;--bcm-new-ds-color-purple-600:#9333ea;--bcm-new-ds-color-purple-700:#7e22ce;--bcm-new-ds-color-purple-800:#6b21a8;--bcm-new-ds-color-purple-900:#581c87;--bcm-new-ds-color-fuchsia:#d946ef;--bcm-new-ds-color-fuchsia-50:#fdf4ff;--bcm-new-ds-color-fuchsia-100:#fae8ff;--bcm-new-ds-color-fuchsia-200:#f5d0fe;--bcm-new-ds-color-fuchsia-300:#f0abfc;--bcm-new-ds-color-fuchsia-400:#e879f9;--bcm-new-ds-color-fuchsia-500:#d946ef;--bcm-new-ds-color-fuchsia-600:#c026d3;--bcm-new-ds-color-fuchsia-700:#a21caf;--bcm-new-ds-color-fuchsia-800:#86198f;--bcm-new-ds-color-fuchsia-900:#701a75;--bcm-new-ds-color-pink:#ec4899;--bcm-new-ds-color-pink-50:#fdf2f8;--bcm-new-ds-color-pink-100:#fce7f3;--bcm-new-ds-color-pink-200:#fbcfe8;--bcm-new-ds-color-pink-300:#f9a8d4;--bcm-new-ds-color-pink-400:#f472b6;--bcm-new-ds-color-pink-500:#ec4899;--bcm-new-ds-color-pink-600:#db2777;--bcm-new-ds-color-pink-700:#be185d;--bcm-new-ds-color-pink-800:#9d174d;--bcm-new-ds-color-pink-900:#831843;--bcm-new-ds-color-rose:#f43f5e;--bcm-new-ds-color-rose-50:#fff1f2;--bcm-new-ds-color-rose-100:#ffe4e6;--bcm-new-ds-color-rose-200:#fecdd3;--bcm-new-ds-color-rose-300:#fda4af;--bcm-new-ds-color-rose-400:#fb7185;--bcm-new-ds-color-rose-500:#f43f5e;--bcm-new-ds-color-rose-600:#e11d48;--bcm-new-ds-color-rose-700:#be123c;--bcm-new-ds-color-rose-800:#9f1239;--bcm-new-ds-color-rose-900:#881337}*{box-sizing:border-box}.bcm-modal{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;flex-wrap:nowrap;width:100%;height:100%;position:fixed;z-index:-1;opacity:0;top:0;left:0;visibility:hidden;overflow:auto;padding:24px;transition:opacity 0.5s ease, visibility 0.4s ease-in-out, 0.3s z-index}.bcm-modal__show{opacity:1;z-index:10500;visibility:visible;transition:opacity 0.2s ease, visibility 0.4s ease-in-out, 0.3s z-index}.bcm-modal__show .bcm-modal__container{transition:opacity 0.2s ease-in-out, transform 0.2s ease-in-out;transform:translateY(0)}.bcm-modal .overlay{position:fixed;width:100vw;height:100vh;z-index:1;top:0;left:0;opacity:0.6;background-color:var(--bcm-new-ds-color-slate-900)}.bcm-modal__container{display:flex;flex-direction:column;width:100%;box-shadow:0 2px 6px 1px rgba(17, 24, 38, 0.1);border-radius:8px;background-color:var(--bcm-new-ds-color-white);z-index:2;transform:translateY(-50px);transition:opacity 0.2s ease-in-out, transform 0.2s ease-in-out}.bcm-modal__container.portrait{max-width:312px}.bcm-modal__container.landscape{max-width:475px}.bcm-modal__container.small{max-width:576px}.bcm-modal__container.medium{max-width:768px}.bcm-modal__container.large{max-width:992px}.bcm-modal__container.xlarge{max-width:1024px}.bcm-modal__container.xxlarge{max-width:1200px}.bcm-modal__container.xxxlarge{max-width:1700px}.bcm-modal__container.full-width{width:100%;max-width:100%}.bcm-modal__container.custom-size main{overflow:auto;height:100%;width:100%}.bcm-modal__container-main{color:var(--bcm-color-grey-8);padding:0}.bcm-modal__container-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;padding:12px 24px;font-size:16px;line-height:calc(16px + 8px);font-weight:500;color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-sky-50);position:relative}.bcm-modal__container-header span.full-width{width:100%}.bcm-modal__container-header-close{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;padding:8px;cursor:pointer;color:var(--bcm-new-ds-color-slate-500);transition:color 0.1s ease-in-out}.bcm-modal__container-header-close:hover{color:var(--bcm-new-ds-color-slate-600)}.bcm-modal__container-header-close:active{color:var(--bcm-new-ds-color-slate-700)}.bcm-modal__container-header-close:focus-visible{color:var(--bcm-new-ds-color-slate-800)}.bcm-modal__container-header:after{border-radius:8px 8px 0 0;content:"";display:block;width:100%;height:4px;background-color:var(--bcm-new-ds-color-blue-400);position:absolute;top:-4px;left:0}.bcm-modal__container-footer-content{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-end;flex-wrap:nowrap;padding:12px 24px 24px;grid-gap:8px}';export{b as bcm_modal}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* Copyright (c) Bromcom.
|
|
4
|
-
*/
|
|
5
|
-
import{h as e,r as t,c as i,H as n,g as s}from"./p-88f7d869.js";import{c as a}from"./p-d5b08a77.js";import{G as o,s as c}from"./p-21bf2bb5.js";import{B as h}from"./p-a429e85b.js";import{d as r,g as l}from"./p-8c018ae0.js";import{c as p}from"./p-74595a06.js";import{L as d}from"./p-4487e8c2.js";import{I as m}from"./p-9bef5a59.js";import"./p-6f56f8ca.js";import"./p-48e9166c.js";import"./p-16b50160.js";const{state:u}=p({group:new Map,allChecked:!0,allUnchecked:!0,changeInderminate:{}}),x=e=>c((()=>u.group.get(e)),{}),g=e=>{var t;const i=x(e);let n=!0,s=!0;null===(t=i.childs)||void 0===t||t.map((e=>{e.checked&&(s=!1),!e.checked&&(n=!1)})),i.indeterminateState=n||s?n?"determinate":"uncheck":"indeterminate"},b=x,f=({customStyle:t,groupContainerClasses:i,onBcmSelect:n,items:s})=>e("div",{class:i,style:t},s.childs&&s.childs.map((t=>e("bcm-checkbox",{id:t.id,name:t.name,color:t.color,checked:t.checked,disabled:t.disabled,readonly:t.readonly,required:t.required,noCaption:t.noCaption,"no-margin":!0,size:t.size,"full-width":t.fullWidth,onClick:e=>{!t.disabled&&!t.readonly&&(n(t.id),e.preventDefault())}},t.slot||t.label))));const y=class{constructor(e){t(this,e),this.change=i(this,"bcm-change",7),this.groupCheckedList=i(this,"bcm-group-checked-list",7),this._id=o.UID(),this.direction=h.Direction.horizontal,this.items=[],this.indeterminate=!1,this.name=void 0,this.value=void 0,this.disabled=!1,this.readonly=!1,this.hidden=!1,this.required=!1,this.label=void 0,this.gap=void 0,this.defaultValue=void 0,this.fullWidth=!1,this.optionType="default",this.buttonStyle="solid",this.size=h.Size.medium,this.caption=void 0,this.noCaption=!1,this.captionType=h.Status.default,this.tick={}}componentDidLoad(){this.initState()}disconnectedCallback(){Promise.resolve(u.group.delete(this._id))}componentShouldUpdate(e,t,i){"tick"==i&&e!==t&&c((()=>b(this._id).childs.length>0),!1)&&this.getValue().then((e=>this.value=e)),this.getOptions().indexOf(i)>-1&&e!==t&&this.initState()}getOptions(){return c((()=>Object.keys(u.group.get(this._id))),[])}async initState(){const{fullWidth:e,optionType:t,buttonStyle:i,size:n,noCaption:s,defaultValue:a,label:h,required:r,captionType:l,hidden:p,direction:d,indeterminate:m,gap:x,items:g}=this,b=a&&("string"==typeof a?JSON.parse(a):a),f=g.length>0?g:await this.getCheckboxes();await(async({fullWidth:e,optionType:t,buttonStyle:i,size:n,defaultCheckedItems:s,el:a,id:h,label:r,required:l,captionType:p,hidden:d,direction:m,childs:x,indeterminate:g,gap:b,noCaption:f})=>{a&&u.group.set(h,{fullWidth:e,optionType:t,buttonStyle:i,size:n,defaultCheckedItems:s,label:r,required:l,captionType:p,hidden:d,direction:m,indeterminate:g,gap:b,noCaption:f,childs:null==x?void 0:x.map((e=>(e.checked&&(u.allUnchecked=!1),!e.checked&&(u.allChecked=!1),t&&(e.optionType=t),i&&(e.buttonStyle=i),n&&(e.size=n),s&&s.find((t=>t===e.name))&&(e.checked=!0),e.noCaption=f,{id:e.id||o.UID(),checked:e.checked||!1,name:e.name,size:e.size,buttonStyle:e.buttonStyle,optionType:e.optionType,style:e.style,noCaption:e.noCaption,color:e.color,disabled:e.disabled,readonly:e.readonly,label:e.label||e.name,slot:e.slot||c((()=>e.querySelector(".slot").textContent),e.textContent),required:e.required||l,el:e,captionType:p,hidden:d}))),indeterminateState:u.allChecked||u.allUnchecked?u.allChecked?"determinate":"uncheck":"indeterminate"})})({id:this._id,el:this.el,indeterminate:m,fullWidth:e,optionType:t,buttonStyle:i,size:n,defaultCheckedItems:b,label:h,noCaption:s,required:r,captionType:l,hidden:p,gap:x,direction:d,childs:f});const y=this.el.querySelector(`#bcm-checkbox-group__items-${this._id}`);y&&y.innerHTML&&(y.innerHTML=""),this.value=await this.getValue()}async markForCheck(){await r(10),this.tick=o.UID()}async onBcmFocus(){const e=this.getCheckboxes();e.length>0&&e[0].onBcmFocus()}async onBcmBlur(){this.el.blur()}async setClear(){return null===(t=x(e=this._id).childs)||void 0===t||t.forEach((e=>{e.checked=!1})),g(e),await r(10),this.getCheckboxes().forEach((e=>{e.setClear()})),this.markForCheck(),await r(10),Promise.resolve();var e,t}async resetCaption(){return await r(10),this.getCheckboxes().forEach((e=>{e.resetCaption()})),await r(10),Promise.resolve()}async set(e){Array.isArray(e)&&await this.check(e,!0,!0)}async get(){const e=await this.getCheckedList()&&Object.keys(await this.getCheckedList());return e.length>0?e:[]}async check(e,t=!0,i=!1){((e,t,i,n)=>{var s;const a=t&&("string"==typeof t?JSON.parse(t):t);null===(s=x(e).childs)||void 0===s||s.forEach((e=>{if(a){const t=a.find((t=>t===e.name||t.name===e.name));t?"object"==typeof t?Object.keys(t).map((n=>{e.checked="checked"===n?t[n]:i})):e.checked=i:n&&(e.checked=!1)}else e.checked=!1})),g(e)})(this._id,e,t,i),this.markForCheck()}async getValue(e){return Promise.resolve(((e,t)=>{var i;const n=x(e);let s={};return null===(i=n.childs)||void 0===i||i.map((e=>{t?e.name===t&&(s[e.name]={value:!!e.checked,name:e.name}):s[e.name]={value:!!e.checked,name:e.name}})),s})(this._id,e))}async getCheckedList(){return(e=>{var t;const i=x(e);let n={};return null===(t=i.childs)||void 0===t||t.map((e=>{!0===e.checked&&(n[e.name]={value:!!e.checked,name:e.name})})),n})(this._id)}handleItemsChange(){this.initState()}getCheckboxes(){return l(this.el,"bcm-checkbox:not(#bcm-indeterminate-element)")}async getCheckbox(e){const t=this.el.querySelector(`bcm-checkbox[id="${e}"]`);if(t){const e=t.name,i=await this.getValue(e);return{element:t,event:c((()=>i[e]),null)}}return{}}async indeterminateClick(){(e=>{var t;const i=x(e);if(!i.disabled){let n=!0;"determinate"===i.indeterminateState&&(n=!1),null===(t=x(e).childs)||void 0===t||t.map((e=>{e.checked=n})),g(e)}})(this._id),this.markForCheck()}async changeCheckBox(e){var t,i;null===(i=x((t={id:this._id,childId:e}).id).childs)||void 0===i||i.map((e=>{e.checked=e.id===t.childId?!e.checked:e.checked})),g(t.id),this.markForCheck(),await r(10),this.value=await this.getValue(),this.change.emit({value:this.value,changed:Object.assign({},await this.getCheckbox(e))}),this.groupCheckedList.emit(await this.getCheckedList())}getItems(){return b(this._id)}render(){const t=this.getItems(),{disabled:i,captionType:s,label:o,indeterminate:c,indeterminateState:h,required:r,direction:l,optionType:p,hidden:m,fullWidth:u,gap:x}=t,g=a("bcm-checkbox-group",l,p,{hidden:m,"full-width":u}),b=a("bcm-checkbox-group__container",p,{[l]:"default"===p,indeterminate:c,hidden:m,"full-width":u});return e(n,{class:g},e("span",{hidden:!0,id:`bcm-checkbox-group__items-${this._id}`},e("slot",null)),e("div",{class:"bcm-checkbox-group__label"},o&&e("div",null,e(d,{size:this.size,type:s,value:o,required:r}))),c&&e("bcm-checkbox",{onClick:e=>{this.indeterminateClick(),e.preventDefault()},"no-caption":!0,id:"bcm-indeterminate-element",indeterminate:h,disabled:i},"Check All"),e(f,{items:t,groupContainerClasses:b,customStyle:x&&{gap:x},onBcmSelect:e=>this.changeCheckBox(e)}))}get el(){return s(this)}static get watchers(){return{items:["handleItemsChange"]}}};(function(e,t,i,n){var s,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(o=(a<3?s(o):a>3?s(t,i,o):s(t,i))||o);a>3&&o&&Object.defineProperty(t,i,o)})([m()],y.prototype,"el",void 0),y.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-checkbox-group{display:flex;flex-direction:column;align-items:flex-start;width:100%;margin-bottom:8px}.bcm-checkbox-group.hidden{display:none}.bcm-checkbox-group__container{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:flex-start;width:100%}.bcm-checkbox-group__container.full-width{max-width:100%}.bcm-checkbox-group__container.vertical{gap:8px;flex-direction:column}.bcm-checkbox-group__container.button{gap:unset}.bcm-checkbox-group__container.indeterminate{padding-top:16px;margin-top:16px;border-top:1px solid #efefef}';export{y as bcm_checkbox_group}
|
|
@@ -1,481 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* Copyright (c) Bromcom.
|
|
4
|
-
*/
|
|
5
|
-
'use strict';
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
|
-
|
|
9
|
-
const index$1 = require('./index-7e2a5376.js');
|
|
10
|
-
const generate = require('./generate-eef61d08.js');
|
|
11
|
-
const bcm = require('./bcm-634604e3.js');
|
|
12
|
-
const index$2 = require('./index-a2b50e51.js');
|
|
13
|
-
const index = require('./index-56628fe5.js');
|
|
14
|
-
const slotTemplate = require('./slot-template-7a07f865.js');
|
|
15
|
-
const colorHelper = require('./color-helper-c9882bd8.js');
|
|
16
|
-
const isLoadDecorator = require('./is-load-decorator-c38598ab.js');
|
|
17
|
-
const stringHelper = require('./string-helper-71b10c53.js');
|
|
18
|
-
const utils = require('./utils-fc077139.js');
|
|
19
|
-
require('./_commonjsHelpers-bd20f4c0.js');
|
|
20
|
-
require('./colors-56282b00.js');
|
|
21
|
-
|
|
22
|
-
const variantOptions = {
|
|
23
|
-
save: {
|
|
24
|
-
text: 'Save',
|
|
25
|
-
color: 'emerald',
|
|
26
|
-
icon: 'far fa-save',
|
|
27
|
-
iconPosition: 'prefix',
|
|
28
|
-
},
|
|
29
|
-
ok: {
|
|
30
|
-
text: 'Ok',
|
|
31
|
-
color: 'emerald',
|
|
32
|
-
icon: 'far fa-check',
|
|
33
|
-
iconPosition: 'prefix',
|
|
34
|
-
},
|
|
35
|
-
new: {
|
|
36
|
-
text: 'New',
|
|
37
|
-
color: 'emerald',
|
|
38
|
-
icon: 'far fa-plus',
|
|
39
|
-
iconPosition: 'prefix',
|
|
40
|
-
},
|
|
41
|
-
add: {
|
|
42
|
-
text: 'Add',
|
|
43
|
-
color: 'emerald',
|
|
44
|
-
icon: 'far fa-plus',
|
|
45
|
-
iconPosition: 'prefix',
|
|
46
|
-
},
|
|
47
|
-
create: {
|
|
48
|
-
text: 'Create',
|
|
49
|
-
color: 'emerald',
|
|
50
|
-
icon: 'far fa-plus',
|
|
51
|
-
iconPosition: 'prefix',
|
|
52
|
-
},
|
|
53
|
-
prev: {
|
|
54
|
-
text: 'Prev',
|
|
55
|
-
color: '',
|
|
56
|
-
icon: 'far fa-arrow-left',
|
|
57
|
-
iconPosition: 'prefix',
|
|
58
|
-
},
|
|
59
|
-
next: {
|
|
60
|
-
text: 'Next',
|
|
61
|
-
color: '',
|
|
62
|
-
icon: 'far fa-arrow-right',
|
|
63
|
-
iconPosition: 'suffix',
|
|
64
|
-
},
|
|
65
|
-
apply: {
|
|
66
|
-
text: 'Apply',
|
|
67
|
-
color: '',
|
|
68
|
-
icon: 'far fa-check-circle',
|
|
69
|
-
iconPosition: 'prefix',
|
|
70
|
-
},
|
|
71
|
-
submit: {
|
|
72
|
-
text: 'Submit',
|
|
73
|
-
color: '',
|
|
74
|
-
icon: 'far fa-save',
|
|
75
|
-
iconPosition: 'prefix',
|
|
76
|
-
},
|
|
77
|
-
send: {
|
|
78
|
-
text: 'Send',
|
|
79
|
-
color: 'emerald',
|
|
80
|
-
icon: 'far fa-paper-plane',
|
|
81
|
-
iconPosition: 'prefix',
|
|
82
|
-
},
|
|
83
|
-
delete: {
|
|
84
|
-
text: 'Delete',
|
|
85
|
-
color: 'red',
|
|
86
|
-
icon: 'far fa-trash',
|
|
87
|
-
iconPosition: 'prefix',
|
|
88
|
-
},
|
|
89
|
-
cancel: {
|
|
90
|
-
text: 'Cancel',
|
|
91
|
-
color: 'red',
|
|
92
|
-
icon: 'far fa-times',
|
|
93
|
-
iconPosition: 'prefix',
|
|
94
|
-
},
|
|
95
|
-
decline: {
|
|
96
|
-
text: 'Decline',
|
|
97
|
-
color: 'red',
|
|
98
|
-
icon: 'far fa-ban',
|
|
99
|
-
iconPosition: 'prefix',
|
|
100
|
-
},
|
|
101
|
-
close: {
|
|
102
|
-
text: 'Close',
|
|
103
|
-
color: 'red',
|
|
104
|
-
icon: 'far fa-times-circle',
|
|
105
|
-
iconPosition: 'prefix',
|
|
106
|
-
},
|
|
107
|
-
archive: {
|
|
108
|
-
text: 'Archive',
|
|
109
|
-
color: 'red',
|
|
110
|
-
icon: 'far fa-folder-open',
|
|
111
|
-
iconPosition: 'prefix',
|
|
112
|
-
},
|
|
113
|
-
remove: {
|
|
114
|
-
text: 'Remove',
|
|
115
|
-
color: 'red',
|
|
116
|
-
icon: 'far fa-minus-circle',
|
|
117
|
-
iconPosition: 'prefix',
|
|
118
|
-
},
|
|
119
|
-
edit: {
|
|
120
|
-
text: 'Edit',
|
|
121
|
-
color: '',
|
|
122
|
-
icon: 'far fa-edit',
|
|
123
|
-
iconPosition: 'prefix',
|
|
124
|
-
},
|
|
125
|
-
export: {
|
|
126
|
-
text: 'Export',
|
|
127
|
-
color: '',
|
|
128
|
-
icon: 'far fa-sign-out',
|
|
129
|
-
iconPosition: 'prefix',
|
|
130
|
-
},
|
|
131
|
-
import: {
|
|
132
|
-
text: 'Import',
|
|
133
|
-
color: '',
|
|
134
|
-
icon: 'far fa-sign-in',
|
|
135
|
-
iconPosition: 'prefix',
|
|
136
|
-
},
|
|
137
|
-
filter: {
|
|
138
|
-
text: 'Filter',
|
|
139
|
-
color: '',
|
|
140
|
-
icon: 'far fa-filter',
|
|
141
|
-
iconPosition: 'prefix',
|
|
142
|
-
},
|
|
143
|
-
update: {
|
|
144
|
-
text: 'Update',
|
|
145
|
-
color: '',
|
|
146
|
-
icon: 'far fa-sync',
|
|
147
|
-
iconPosition: 'prefix',
|
|
148
|
-
},
|
|
149
|
-
reset: {
|
|
150
|
-
text: "Reset",
|
|
151
|
-
color: "",
|
|
152
|
-
icon: 'far fa-sync',
|
|
153
|
-
iconPosition: "prefix",
|
|
154
|
-
},
|
|
155
|
-
download: {
|
|
156
|
-
text: 'Download',
|
|
157
|
-
color: '',
|
|
158
|
-
icon: 'far fa-download',
|
|
159
|
-
iconPosition: 'prefix',
|
|
160
|
-
},
|
|
161
|
-
};
|
|
162
|
-
var VariantProps;
|
|
163
|
-
(function (VariantProps) {
|
|
164
|
-
VariantProps["save"] = "save";
|
|
165
|
-
VariantProps["submit"] = "submit";
|
|
166
|
-
VariantProps["ok"] = "ok";
|
|
167
|
-
VariantProps["new"] = "new";
|
|
168
|
-
VariantProps["add"] = "add";
|
|
169
|
-
VariantProps["create"] = "create";
|
|
170
|
-
VariantProps["apply"] = "apply";
|
|
171
|
-
VariantProps["prev"] = "prev";
|
|
172
|
-
VariantProps["next"] = "next";
|
|
173
|
-
VariantProps["send"] = "send";
|
|
174
|
-
VariantProps["delete"] = "delete";
|
|
175
|
-
VariantProps["cancel"] = "cancel";
|
|
176
|
-
VariantProps["decline"] = "decline";
|
|
177
|
-
VariantProps["close"] = "close";
|
|
178
|
-
VariantProps["archive"] = "archive";
|
|
179
|
-
VariantProps["remove"] = "remove";
|
|
180
|
-
VariantProps["edit"] = "edit";
|
|
181
|
-
VariantProps["export"] = "export";
|
|
182
|
-
VariantProps["import"] = "import";
|
|
183
|
-
VariantProps["filter"] = "filter";
|
|
184
|
-
VariantProps["update"] = "update";
|
|
185
|
-
VariantProps["reset"] = "Reset";
|
|
186
|
-
VariantProps["download"] = "download";
|
|
187
|
-
})(VariantProps || (VariantProps = {}));
|
|
188
|
-
|
|
189
|
-
const { state } = index.createStore({
|
|
190
|
-
value: new Map(),
|
|
191
|
-
setData: {},
|
|
192
|
-
removeData: {}
|
|
193
|
-
});
|
|
194
|
-
const setValue = (val) => {
|
|
195
|
-
const data = Object.assign(Object.assign({}, val), (variantOptions[val.variant] && {
|
|
196
|
-
icon: variantOptions[val.variant].icon,
|
|
197
|
-
value: variantOptions[val.variant].text,
|
|
198
|
-
iconPosition: bcm.Bcm.IconPosition[variantOptions[val.variant].iconPosition],
|
|
199
|
-
variantColor: variantOptions[val.variant].color
|
|
200
|
-
}));
|
|
201
|
-
state.value.set(data.id, data);
|
|
202
|
-
};
|
|
203
|
-
const removeValue = (_id) => {
|
|
204
|
-
state.value.delete(_id);
|
|
205
|
-
};
|
|
206
|
-
const getValue = (id) => generate.snq(() => state.value.get(id), {});
|
|
207
|
-
const buttonState = {
|
|
208
|
-
setValue,
|
|
209
|
-
removeValue,
|
|
210
|
-
getValue
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
const ButtonTemplate = ({ value, type, componentClass, disabled, href, target, loading, isIconOnly, icon, iconPosition, id }) => {
|
|
214
|
-
const ButtonTagType = (href) ? bcm.Bcm.HtmlElementType.a : bcm.Bcm.HtmlElementType.button;
|
|
215
|
-
return (index$1.h(ButtonTagType, Object.assign({ id: id }, (type == bcm.Bcm.HtmlElementType.button && { type }), { class: componentClass, disabled: disabled, href: href, target: target, tabindex: "0" }),
|
|
216
|
-
index$1.h("span", { hidden: true },
|
|
217
|
-
index$1.h("slot", null)),
|
|
218
|
-
loading && index$1.h("span", { class: "bcm-button__container-loading" },
|
|
219
|
-
" ",
|
|
220
|
-
index$1.h("span", { class: "bcm-button__container-icon" },
|
|
221
|
-
index$1.h("i", { class: "far fa-spinner-third fa-spin" }),
|
|
222
|
-
" ")),
|
|
223
|
-
icon && index$1.h("span", { class: `${iconPosition} bcm-button__container-icon` },
|
|
224
|
-
index$1.h("i", { class: `${icon}` })),
|
|
225
|
-
!isIconOnly && (index$1.h(slotTemplate.SlotTemplate, { className: "bcm-button__container-text", value: value })),
|
|
226
|
-
index$1.h("slot", { name: "suffix" })));
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
const buttonCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:root,::after,::before{--bcm-new-ds-color-inherit:inherit;--bcm-new-ds-color-current:currentColor;--bcm-new-ds-color-transparent:transparent;--bcm-new-ds-color-black:#000;--bcm-new-ds-color-white:#fff;--bcm-new-ds-color-slate:#64748b;--bcm-new-ds-color-slate-50:#f8fafc;--bcm-new-ds-color-slate-100:#f1f5f9;--bcm-new-ds-color-slate-200:#e2e8f0;--bcm-new-ds-color-slate-300:#cbd5e1;--bcm-new-ds-color-slate-400:#94a3b8;--bcm-new-ds-color-slate-500:#64748b;--bcm-new-ds-color-slate-600:#475569;--bcm-new-ds-color-slate-700:#334155;--bcm-new-ds-color-slate-800:#1e293b;--bcm-new-ds-color-slate-900:#0f172a;--bcm-new-ds-color-gray:#6b7280;--bcm-new-ds-color-gray-50:#f9fafb;--bcm-new-ds-color-gray-100:#f3f4f6;--bcm-new-ds-color-gray-200:#e5e7eb;--bcm-new-ds-color-gray-300:#d1d5db;--bcm-new-ds-color-gray-400:#9ca3af;--bcm-new-ds-color-gray-500:#6b7280;--bcm-new-ds-color-gray-600:#4b5563;--bcm-new-ds-color-gray-700:#374151;--bcm-new-ds-color-gray-800:#1f2937;--bcm-new-ds-color-gray-900:#111827;--bcm-new-ds-color-zinc:#71717a;--bcm-new-ds-color-zinc-50:#fafafa;--bcm-new-ds-color-zinc-100:#f4f4f5;--bcm-new-ds-color-zinc-200:#e4e4e7;--bcm-new-ds-color-zinc-300:#d4d4d8;--bcm-new-ds-color-zinc-400:#a1a1aa;--bcm-new-ds-color-zinc-500:#71717a;--bcm-new-ds-color-zinc-600:#52525b;--bcm-new-ds-color-zinc-700:#3f3f46;--bcm-new-ds-color-zinc-800:#27272a;--bcm-new-ds-color-zinc-900:#18181b;--bcm-new-ds-color-neutral:#737373;--bcm-new-ds-color-neutral-50:#fafafa;--bcm-new-ds-color-neutral-100:#f5f5f5;--bcm-new-ds-color-neutral-200:#e5e5e5;--bcm-new-ds-color-neutral-300:#d4d4d4;--bcm-new-ds-color-neutral-400:#a3a3a3;--bcm-new-ds-color-neutral-500:#737373;--bcm-new-ds-color-neutral-600:#525252;--bcm-new-ds-color-neutral-700:#404040;--bcm-new-ds-color-neutral-800:#262626;--bcm-new-ds-color-neutral-900:#171717;--bcm-new-ds-color-stone:#78716c;--bcm-new-ds-color-stone-50:#fafaf9;--bcm-new-ds-color-stone-100:#f5f5f4;--bcm-new-ds-color-stone-200:#e7e5e4;--bcm-new-ds-color-stone-300:#d6d3d1;--bcm-new-ds-color-stone-400:#a8a29e;--bcm-new-ds-color-stone-500:#78716c;--bcm-new-ds-color-stone-600:#57534e;--bcm-new-ds-color-stone-700:#44403c;--bcm-new-ds-color-stone-800:#292524;--bcm-new-ds-color-stone-900:#1c1917;--bcm-new-ds-color-red:#ef4444;--bcm-new-ds-color-red-50:#fef2f2;--bcm-new-ds-color-red-100:#fee2e2;--bcm-new-ds-color-red-200:#fecaca;--bcm-new-ds-color-red-300:#fca5a5;--bcm-new-ds-color-red-400:#f87171;--bcm-new-ds-color-red-500:#ef4444;--bcm-new-ds-color-red-600:#dc2626;--bcm-new-ds-color-red-700:#b91c1c;--bcm-new-ds-color-red-800:#991b1b;--bcm-new-ds-color-red-900:#7f1d1d;--bcm-new-ds-color-orange:#f97316;--bcm-new-ds-color-orange-50:#fff7ed;--bcm-new-ds-color-orange-100:#ffedd5;--bcm-new-ds-color-orange-200:#fed7aa;--bcm-new-ds-color-orange-300:#fdba74;--bcm-new-ds-color-orange-400:#fb923c;--bcm-new-ds-color-orange-500:#f97316;--bcm-new-ds-color-orange-600:#ea580c;--bcm-new-ds-color-orange-700:#c2410c;--bcm-new-ds-color-orange-800:#9a3412;--bcm-new-ds-color-orange-900:#7c2d12;--bcm-new-ds-color-amber:#f59e0b;--bcm-new-ds-color-amber-50:#fffbeb;--bcm-new-ds-color-amber-100:#fef3c7;--bcm-new-ds-color-amber-200:#fde68a;--bcm-new-ds-color-amber-300:#fcd34d;--bcm-new-ds-color-amber-400:#fbbf24;--bcm-new-ds-color-amber-500:#f59e0b;--bcm-new-ds-color-amber-600:#d97706;--bcm-new-ds-color-amber-700:#b45309;--bcm-new-ds-color-amber-800:#92400e;--bcm-new-ds-color-amber-900:#78350f;--bcm-new-ds-color-yellow:#eab308;--bcm-new-ds-color-yellow-50:#fefce8;--bcm-new-ds-color-yellow-100:#fef9c3;--bcm-new-ds-color-yellow-200:#fef08a;--bcm-new-ds-color-yellow-300:#fde047;--bcm-new-ds-color-yellow-400:#facc15;--bcm-new-ds-color-yellow-500:#eab308;--bcm-new-ds-color-yellow-600:#ca8a04;--bcm-new-ds-color-yellow-700:#a16207;--bcm-new-ds-color-yellow-800:#854d0e;--bcm-new-ds-color-yellow-900:#713f12;--bcm-new-ds-color-lime:#84cc16;--bcm-new-ds-color-lime-50:#f7fee7;--bcm-new-ds-color-lime-100:#ecfccb;--bcm-new-ds-color-lime-200:#d9f99d;--bcm-new-ds-color-lime-300:#bef264;--bcm-new-ds-color-lime-400:#a3e635;--bcm-new-ds-color-lime-500:#84cc16;--bcm-new-ds-color-lime-600:#65a30d;--bcm-new-ds-color-lime-700:#4d7c0f;--bcm-new-ds-color-lime-800:#3f6212;--bcm-new-ds-color-lime-900:#365314;--bcm-new-ds-color-green:#22c55e;--bcm-new-ds-color-green-50:#f0fdf4;--bcm-new-ds-color-green-100:#dcfce7;--bcm-new-ds-color-green-200:#bbf7d0;--bcm-new-ds-color-green-300:#86efac;--bcm-new-ds-color-green-400:#4ade80;--bcm-new-ds-color-green-500:#22c55e;--bcm-new-ds-color-green-600:#16a34a;--bcm-new-ds-color-green-700:#15803d;--bcm-new-ds-color-green-800:#166534;--bcm-new-ds-color-green-900:#14532d;--bcm-new-ds-color-emerald:#10b981;--bcm-new-ds-color-emerald-50:#ecfdf5;--bcm-new-ds-color-emerald-100:#d1fae5;--bcm-new-ds-color-emerald-200:#a7f3d0;--bcm-new-ds-color-emerald-300:#6ee7b7;--bcm-new-ds-color-emerald-400:#34d399;--bcm-new-ds-color-emerald-500:#10b981;--bcm-new-ds-color-emerald-600:#059669;--bcm-new-ds-color-emerald-700:#047857;--bcm-new-ds-color-emerald-800:#065f46;--bcm-new-ds-color-emerald-900:#064e3b;--bcm-new-ds-color-teal:#14b8a6;--bcm-new-ds-color-teal-50:#f0fdfa;--bcm-new-ds-color-teal-100:#ccfbf1;--bcm-new-ds-color-teal-200:#99f6e4;--bcm-new-ds-color-teal-300:#5eead4;--bcm-new-ds-color-teal-400:#2dd4bf;--bcm-new-ds-color-teal-500:#14b8a6;--bcm-new-ds-color-teal-600:#0d9488;--bcm-new-ds-color-teal-700:#0f766e;--bcm-new-ds-color-teal-800:#115e59;--bcm-new-ds-color-teal-900:#134e4a;--bcm-new-ds-color-cyan:#06b6d4;--bcm-new-ds-color-cyan-50:#ecfeff;--bcm-new-ds-color-cyan-100:#cffafe;--bcm-new-ds-color-cyan-200:#a5f3fc;--bcm-new-ds-color-cyan-300:#67e8f9;--bcm-new-ds-color-cyan-400:#22d3ee;--bcm-new-ds-color-cyan-500:#06b6d4;--bcm-new-ds-color-cyan-600:#0891b2;--bcm-new-ds-color-cyan-700:#0e7490;--bcm-new-ds-color-cyan-800:#155e75;--bcm-new-ds-color-cyan-900:#164e63;--bcm-new-ds-color-sky:#0ea5e9;--bcm-new-ds-color-sky-50:#f0f9ff;--bcm-new-ds-color-sky-100:#e0f2fe;--bcm-new-ds-color-sky-200:#bae6fd;--bcm-new-ds-color-sky-300:#7dd3fc;--bcm-new-ds-color-sky-400:#38bdf8;--bcm-new-ds-color-sky-500:#0ea5e9;--bcm-new-ds-color-sky-600:#0284c7;--bcm-new-ds-color-sky-700:#0369a1;--bcm-new-ds-color-sky-800:#075985;--bcm-new-ds-color-sky-900:#0c4a6e;--bcm-new-ds-color-blue:#3b82f6;--bcm-new-ds-color-blue-50:#eff6ff;--bcm-new-ds-color-blue-100:#dbeafe;--bcm-new-ds-color-blue-200:#bfdbfe;--bcm-new-ds-color-blue-300:#93c5fd;--bcm-new-ds-color-blue-400:#60a5fa;--bcm-new-ds-color-blue-500:#3b82f6;--bcm-new-ds-color-blue-600:#2563eb;--bcm-new-ds-color-blue-700:#1d4ed8;--bcm-new-ds-color-blue-800:#1e40af;--bcm-new-ds-color-blue-900:#1e3a8a;--bcm-new-ds-color-indigo:#6366f1;--bcm-new-ds-color-indigo-50:#eef2ff;--bcm-new-ds-color-indigo-100:#e0e7ff;--bcm-new-ds-color-indigo-200:#c7d2fe;--bcm-new-ds-color-indigo-300:#a5b4fc;--bcm-new-ds-color-indigo-400:#818cf8;--bcm-new-ds-color-indigo-500:#6366f1;--bcm-new-ds-color-indigo-600:#4f46e5;--bcm-new-ds-color-indigo-700:#4338ca;--bcm-new-ds-color-indigo-800:#3730a3;--bcm-new-ds-color-indigo-900:#312e81;--bcm-new-ds-color-violet:#8b5cf6;--bcm-new-ds-color-violet-50:#f5f3ff;--bcm-new-ds-color-violet-100:#ede9fe;--bcm-new-ds-color-violet-200:#ddd6fe;--bcm-new-ds-color-violet-300:#c4b5fd;--bcm-new-ds-color-violet-400:#a78bfa;--bcm-new-ds-color-violet-500:#8b5cf6;--bcm-new-ds-color-violet-600:#7c3aed;--bcm-new-ds-color-violet-700:#6d28d9;--bcm-new-ds-color-violet-800:#5b21b6;--bcm-new-ds-color-violet-900:#4c1d95;--bcm-new-ds-color-purple:#a855f7;--bcm-new-ds-color-purple-50:#faf5ff;--bcm-new-ds-color-purple-100:#f3e8ff;--bcm-new-ds-color-purple-200:#e9d5ff;--bcm-new-ds-color-purple-300:#d8b4fe;--bcm-new-ds-color-purple-400:#c084fc;--bcm-new-ds-color-purple-500:#a855f7;--bcm-new-ds-color-purple-600:#9333ea;--bcm-new-ds-color-purple-700:#7e22ce;--bcm-new-ds-color-purple-800:#6b21a8;--bcm-new-ds-color-purple-900:#581c87;--bcm-new-ds-color-fuchsia:#d946ef;--bcm-new-ds-color-fuchsia-50:#fdf4ff;--bcm-new-ds-color-fuchsia-100:#fae8ff;--bcm-new-ds-color-fuchsia-200:#f5d0fe;--bcm-new-ds-color-fuchsia-300:#f0abfc;--bcm-new-ds-color-fuchsia-400:#e879f9;--bcm-new-ds-color-fuchsia-500:#d946ef;--bcm-new-ds-color-fuchsia-600:#c026d3;--bcm-new-ds-color-fuchsia-700:#a21caf;--bcm-new-ds-color-fuchsia-800:#86198f;--bcm-new-ds-color-fuchsia-900:#701a75;--bcm-new-ds-color-pink:#ec4899;--bcm-new-ds-color-pink-50:#fdf2f8;--bcm-new-ds-color-pink-100:#fce7f3;--bcm-new-ds-color-pink-200:#fbcfe8;--bcm-new-ds-color-pink-300:#f9a8d4;--bcm-new-ds-color-pink-400:#f472b6;--bcm-new-ds-color-pink-500:#ec4899;--bcm-new-ds-color-pink-600:#db2777;--bcm-new-ds-color-pink-700:#be185d;--bcm-new-ds-color-pink-800:#9d174d;--bcm-new-ds-color-pink-900:#831843;--bcm-new-ds-color-rose:#f43f5e;--bcm-new-ds-color-rose-50:#fff1f2;--bcm-new-ds-color-rose-100:#ffe4e6;--bcm-new-ds-color-rose-200:#fecdd3;--bcm-new-ds-color-rose-300:#fda4af;--bcm-new-ds-color-rose-400:#fb7185;--bcm-new-ds-color-rose-500:#f43f5e;--bcm-new-ds-color-rose-600:#e11d48;--bcm-new-ds-color-rose-700:#be123c;--bcm-new-ds-color-rose-800:#9f1239;--bcm-new-ds-color-rose-900:#881337}*{box-sizing:border-box}.bcm-button{display:inline-flex;width:fit-content;height:fit-content;--bcm-button-solid-color-default:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-default:var(--bcm-new-ds-color-blue-500);--bcm-button-solid-border-default:var(--bcm-new-ds-color-blue-500);--bcm-button-solid-color-hover:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-button-solid-border-hover:var(--bcm-new-ds-color-blue-600);--bcm-button-solid-color-focus-visible:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-button-solid-border-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-button-solid-color-active:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-active:var(--bcm-new-ds-color-blue-700);--bcm-button-solid-border-active:var(--bcm-new-ds-color-blue-700);--bcm-button-solid-color-disabled:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-disabled:var(--bcm-new-ds-color-slate-400);--bcm-button-solid-border-disabled:var(--bcm-new-ds-color-slate-400);--bcm-button-ghost-color-default:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-background-color-default:var(--bcm-new-ds-color-slate-100);--bcm-button-ghost-border-default:var(--bcm-new-ds-color-slate-300);--bcm-button-ghost-color-hover:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-background-color-hover:var(--bcm-new-ds-color-slate-200);--bcm-button-ghost-border-hover:var(--bcm-new-ds-color-slate-400);--bcm-button-ghost-color-focus-visible:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-background-color-focus-visible:var(--bcm-new-ds-color-slate-400);--bcm-button-ghost-border-focus-visible:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-color-active:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-background-color-active:var(--bcm-new-ds-color-slate-300);--bcm-button-ghost-border-active:var(--bcm-new-ds-color-slate-500);--bcm-button-ghost-color-disabled:var(--bcm-new-ds-color-slate-300);--bcm-button-ghost-background-color-disabled:var(--bcm-new-ds-color-slate-50);--bcm-button-ghost-border-disabled:var(--bcm-new-ds-color-slate-200);--bcm-button-link-color-default:var(--bcm-new-ds-color-blue-500);--bcm-button-link-background-color-default:var(--bcm-new-ds-color-transparent);--bcm-button-link-border-default:var(--bcm-new-ds-color-transparent);--bcm-button-link-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-button-link-background-color-hover:var(--bcm-new-ds-color-transparent);--bcm-button-link-border-hover:var(--bcm-new-ds-color-transparent);--bcm-button-link-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-button-link-background-color-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-button-link-border-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-button-link-color-active:var(--bcm-new-ds-color-blue-700);--bcm-button-link-background-color-active:var(--bcm-new-ds-color-slate-50);--bcm-button-link-border-active:var(--bcm-new-ds-color-slate-50);--bcm-button-link-color-disabled:var(--bcm-new-ds-color-slate-400);--bcm-button-link-background-color-disabled:var(--bcm-new-ds-color-transparent);--bcm-button-link-border-disabled:var(--bcm-new-ds-color-transparent)}.bcm-button.full-width{width:100%}.bcm-button.full-width .bcm-button__container{width:100%}.bcm-button:after,.bcm-button:before{content:\"\";clear:both}.bcm-button__container{border:none;color:inherit;background-color:inherit;padding:0;margin:0;font:inherit;cursor:pointer;outline:none;text-decoration:none;font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-weight:500;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:4px 12px;outline:none;border-radius:4px;transition:background-color 0.1s ease-in-out;position:relative;min-width:40px;border-width:1px;border-style:solid;border-color:initial}.bcm-button__container:hover,.bcm-button__container:focus,.bcm-button__container:active{outline:none;text-decoration:none}.bcm-button__container-loading{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:4px;display:flex;align-items:center;justify-content:center}.bcm-button__container-kind-solid{color:var(--bcm-button-solid-color-default);background-color:var(--bcm-button-solid-background-color-default);border-color:var(--bcm-button-solid-border-default)}.bcm-button__container-kind-solid:hover{color:var(--bcm-button-solid-color-hover);background-color:var(--bcm-button-solid-background-color-hover);border-color:var(--bcm-button-solid-border-hover)}.bcm-button__container-kind-solid:focus-visible{color:var(--bcm-button-solid-color-focus-visible);background-color:var(--bcm-button-solid-background-color-focus-visible);border-color:var(--bcm-button-solid-border-focus-visible)}.bcm-button__container-kind-solid:active{color:var(--bcm-button-solid-color-active);background-color:var(--bcm-button-solid-background-color-active);border-color:var(--bcm-button-solid-border-active)}.bcm-button__container-kind-solid:disabled{color:var(--bcm-button-solid-color-disabled);background-color:var(--bcm-button-solid-background-color-disabled);border-color:var(--bcm-button-solid-border-disabled)}.bcm-button__container-kind-solid.checked{color:var(--bcm-button-solid-color-active);background-color:var(--bcm-button-solid-background-color-active);border-color:var(--bcm-button-solid-border-active)}.bcm-button__container-kind-solid.disabled{color:var(--bcm-button-solid-color-disabled);background-color:var(--bcm-button-solid-background-color-disabled);border-color:var(--bcm-button-solid-border-disabled)}.bcm-button__container-kind-solid .bcm-button__container-loading{color:var(--bcm-button-solid-color-default);background-color:var(--bcm-button-solid-background-color-default);border-color:var(--bcm-button-solid-border-default)}.bcm-button__container-kind-ghost{color:var(--bcm-button-ghost-color-default);background-color:var(--bcm-button-ghost-background-color-default);border-color:var(--bcm-button-ghost-border-default)}.bcm-button__container-kind-ghost:not([disabled]) .bcm-icon{color:var(--bcm-new-ds-color-slate-500)}.bcm-button__container-kind-ghost:hover{color:var(--bcm-button-ghost-color-hover);background-color:var(--bcm-button-ghost-background-color-hover);border-color:var(--bcm-button-ghost-border-hover)}.bcm-button__container-kind-ghost:focus-visible{color:var(--bcm-button-ghost-color-focus-visible);background-color:var(--bcm-button-ghost-background-color-focus-visible);border-color:var(--bcm-button-ghost-border-focus-visible)}.bcm-button__container-kind-ghost:active{color:var(--bcm-button-ghost-color-active);background-color:var(--bcm-button-ghost-background-color-active);border-color:var(--bcm-button-ghost-border-active)}.bcm-button__container-kind-ghost:disabled{color:var(--bcm-button-ghost-color-disabled);background-color:var(--bcm-button-ghost-background-color-disabled);border-color:var(--bcm-button-ghost-border-disabled)}.bcm-button__container-kind-ghost.checked{color:var(--bcm-button-ghost-color-active);background-color:var(--bcm-button-ghost-background-color-active);border-color:var(--bcm-button-ghost-border-active)}.bcm-button__container-kind-ghost.disabled{color:var(--bcm-button-ghost-color-disabled);background-color:var(--bcm-button-ghost-background-color-disabled);border-color:var(--bcm-button-ghost-border-disabled)}.bcm-button__container-kind-ghost .bcm-button__container-loading{color:var(--bcm-button-ghost-color-default);background-color:var(--bcm-button-ghost-background-color-default);border-color:var(--bcm-button-ghost-border-default)}.bcm-button__container-kind-link{color:var(--bcm-button-link-color-default);background-color:var(--bcm-button-link-background-color-default);border-color:var(--bcm-button-link-border-default)}.bcm-button__container-kind-link:hover{color:var(--bcm-button-link-color-hover);background-color:var(--bcm-button-link-background-color-hover);border-color:var(--bcm-button-link-border-hover)}.bcm-button__container-kind-link:focus-visible{color:var(--bcm-button-link-color-focus-visible);background-color:var(--bcm-button-link-background-color-focus-visible);border-color:var(--bcm-button-link-border-focus-visible)}.bcm-button__container-kind-link:active{color:var(--bcm-button-link-color-active);background-color:var(--bcm-button-link-background-color-active);border-color:var(--bcm-button-link-border-active)}.bcm-button__container-kind-link:disabled{color:var(--bcm-button-link-color-disabled);background-color:var(--bcm-button-link-background-color-disabled);border-color:var(--bcm-button-link-border-disabled)}.bcm-button__container-kind-link.checked{color:var(--bcm-button-link-color-active);background-color:var(--bcm-button-link-background-color-active);border-color:var(--bcm-button-link-border-active)}.bcm-button__container-kind-link.disabled{color:var(--bcm-button-link-color-disabled);background-color:var(--bcm-button-link-background-color-disabled);border-color:var(--bcm-button-link-border-disabled)}.bcm-button__container-kind-link .bcm-button__container-loading{color:var(--bcm-button-link-color-default);background-color:var(--bcm-button-link-background-color-default);border-color:var(--bcm-button-link-border-default)}.bcm-button__container[disabled]{cursor:not-allowed}.bcm-button__container-text{order:3;display:flex;align-items:center;gap:8px;white-space:nowrap}.bcm-button__container-icon{min-height:calc(12px + 8px)}.bcm-button__container-icon.prefix{order:2}.bcm-button__container-icon.suffix{order:4}.bcm-button__container-size-small{font-size:12px;line-height:calc(12px + 8px);padding:calc(4px - 3px) 12px;min-height:calc(calc(12px + 8px) + calc(calc(4px - 2px)) * 2)}.bcm-button__container-size-small .bcm-button__container-icon{min-height:calc(12px + 8px)}.bcm-button__container-size-medium{font-size:calc(12px + 1px);line-height:calc(12px + 8px);padding:calc(4px + 1px) 12px;min-height:calc(calc(12px + 8px) + calc(calc(4px + 2px)) * 2)}.bcm-button__container-size-medium .bcm-button__container-icon{min-height:calc(12px + 8px)}.bcm-button__container-size-large{font-size:16px;line-height:calc(16px + 8px);padding:calc(8px - 1px) 12px;min-height:calc(calc(16px + 8px) + (calc(8px) * 2))}.bcm-button__container-size-large .bcm-button__container-icon{min-height:calc(16px + 8px)}";
|
|
230
|
-
|
|
231
|
-
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
232
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
233
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
234
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
235
|
-
else
|
|
236
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
237
|
-
if (d = decorators[i])
|
|
238
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
239
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
240
|
-
};
|
|
241
|
-
const BcmButton = class {
|
|
242
|
-
constructor(hostRef) {
|
|
243
|
-
index$1.registerInstance(this, hostRef);
|
|
244
|
-
this.bcmClick = index$1.createEvent(this, "bcm-click", 7);
|
|
245
|
-
this._id = generate.Generate.UID();
|
|
246
|
-
this.hidden = false;
|
|
247
|
-
this.type = bcm.Bcm.ButtonType.button;
|
|
248
|
-
this.size = bcm.Bcm.Size.medium;
|
|
249
|
-
this.disabled = false;
|
|
250
|
-
this.kind = bcm.Bcm.Kind.solid;
|
|
251
|
-
this.outline = false;
|
|
252
|
-
this.icon = undefined;
|
|
253
|
-
this.href = undefined;
|
|
254
|
-
this.target = undefined;
|
|
255
|
-
this.value = undefined;
|
|
256
|
-
this.loading = false;
|
|
257
|
-
this.variant = undefined;
|
|
258
|
-
this.dataDismiss = false;
|
|
259
|
-
this.fullWidth = false;
|
|
260
|
-
this.iconPosition = bcm.Bcm.IconPosition.prefix;
|
|
261
|
-
this.color = undefined;
|
|
262
|
-
this.checked = false;
|
|
263
|
-
}
|
|
264
|
-
handleOnClick(e) {
|
|
265
|
-
if (this.disabled) {
|
|
266
|
-
e.preventDefault();
|
|
267
|
-
e.stopPropagation();
|
|
268
|
-
return false;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
componentWillRender() {
|
|
272
|
-
const { size, kind, icon, iconPosition, disabled, outline, href, type, target, loading, variant, fullWidth, hidden, value } = this;
|
|
273
|
-
buttonState.setValue({
|
|
274
|
-
id: this._id,
|
|
275
|
-
size,
|
|
276
|
-
type,
|
|
277
|
-
kind,
|
|
278
|
-
icon,
|
|
279
|
-
iconPosition,
|
|
280
|
-
disabled,
|
|
281
|
-
outline,
|
|
282
|
-
href,
|
|
283
|
-
target,
|
|
284
|
-
loading,
|
|
285
|
-
variant,
|
|
286
|
-
fullWidth,
|
|
287
|
-
hidden,
|
|
288
|
-
value,
|
|
289
|
-
isIconOnly: !!(this.isHaveChildNodes() && this.icon),
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
getStateData() {
|
|
293
|
-
return buttonState.getValue(this._id);
|
|
294
|
-
}
|
|
295
|
-
isHaveChildNodes() {
|
|
296
|
-
const childNodes = Array.from(this.el.childNodes);
|
|
297
|
-
return childNodes.find(node => node.nodeType === Node.TEXT_NODE) === undefined;
|
|
298
|
-
}
|
|
299
|
-
setColor(color = this.color) {
|
|
300
|
-
if (!color)
|
|
301
|
-
return;
|
|
302
|
-
const { kind } = this;
|
|
303
|
-
const prefix = `--bcm-button-${kind}`;
|
|
304
|
-
if (kind === 'solid') {
|
|
305
|
-
return {
|
|
306
|
-
[`${prefix}-color-default`]: colorHelper.ColorHelper.dsColor('white'),
|
|
307
|
-
[`${prefix}-color-hover`]: colorHelper.ColorHelper.dsColor('white'),
|
|
308
|
-
[`${prefix}-color-focus-visible`]: colorHelper.ColorHelper.dsColor('white'),
|
|
309
|
-
[`${prefix}-color-active`]: colorHelper.ColorHelper.dsColor('white'),
|
|
310
|
-
[`${prefix}-color-disabled`]: colorHelper.ColorHelper.dsColor('white'),
|
|
311
|
-
[`${prefix}-background-color-default`]: colorHelper.ColorHelper.dsColor(color + '-500'),
|
|
312
|
-
[`${prefix}-background-color-hover`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
313
|
-
[`${prefix}-background-color-focus-visible`]: colorHelper.ColorHelper.dsColor(color + '-700'),
|
|
314
|
-
[`${prefix}-background-color-active`]: colorHelper.ColorHelper.dsColor(color + '-800'),
|
|
315
|
-
[`${prefix}-background-color-disabled`]: colorHelper.ColorHelper.dsColor('slate-400'),
|
|
316
|
-
[`${prefix}-border-default`]: colorHelper.ColorHelper.dsColor(color + '-500'),
|
|
317
|
-
[`${prefix}-border-hover`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
318
|
-
[`${prefix}-border-focus-visible`]: colorHelper.ColorHelper.dsColor(color + '-700'),
|
|
319
|
-
[`${prefix}-border-active`]: colorHelper.ColorHelper.dsColor(color + '-800'),
|
|
320
|
-
[`${prefix}-border-disabled`]: colorHelper.ColorHelper.dsColor('slate-400')
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
else if (kind == 'link') {
|
|
324
|
-
return {
|
|
325
|
-
[`${prefix}-color-default`]: colorHelper.ColorHelper.dsColor(color + '-500'),
|
|
326
|
-
[`${prefix}-color-hover`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
327
|
-
[`${prefix}-color-focus-visible`]: colorHelper.ColorHelper.dsColor(color + '-800'),
|
|
328
|
-
[`${prefix}-color-active`]: colorHelper.ColorHelper.dsColor(color + '-700'),
|
|
329
|
-
[`${prefix}-color-disabled`]: colorHelper.ColorHelper.dsColor('slate-400'),
|
|
330
|
-
[`${prefix}-background-color-default`]: colorHelper.ColorHelper.dsColor('transparent'),
|
|
331
|
-
[`${prefix}-background-color-hover`]: colorHelper.ColorHelper.dsColor('transparent'),
|
|
332
|
-
[`${prefix}-background-color-focus-visible`]: colorHelper.ColorHelper.dsColor('slate-50'),
|
|
333
|
-
[`${prefix}-background-color-active`]: colorHelper.ColorHelper.dsColor('slate-50'),
|
|
334
|
-
[`${prefix}-background-color-disabled`]: colorHelper.ColorHelper.dsColor('transparent'),
|
|
335
|
-
[`${prefix}-border-default`]: colorHelper.ColorHelper.dsColor('transparent'),
|
|
336
|
-
[`${prefix}-border-hover`]: colorHelper.ColorHelper.dsColor('transparent'),
|
|
337
|
-
[`${prefix}-border-focus-visible`]: colorHelper.ColorHelper.dsColor('slate-50'),
|
|
338
|
-
[`${prefix}-border-active`]: colorHelper.ColorHelper.dsColor('slate-50'),
|
|
339
|
-
[`${prefix}-border-disabled`]: colorHelper.ColorHelper.dsColor('transparent')
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
else if (kind == 'ghost') {
|
|
343
|
-
return {
|
|
344
|
-
[`${prefix}-color-default`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
345
|
-
[`${prefix}-color-hover`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
346
|
-
[`${prefix}-color-focus-visible`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
347
|
-
[`${prefix}-color-active`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
348
|
-
[`${prefix}-color-disabled`]: colorHelper.ColorHelper.dsColor(color + '-300'),
|
|
349
|
-
[`${prefix}-background-color-default`]: colorHelper.ColorHelper.dsColor(color + '-100'),
|
|
350
|
-
[`${prefix}-background-color-hover`]: colorHelper.ColorHelper.dsColor(color + '-200'),
|
|
351
|
-
[`${prefix}-background-color-focus-visible`]: colorHelper.ColorHelper.dsColor(color + '-400'),
|
|
352
|
-
[`${prefix}-background-color-active`]: colorHelper.ColorHelper.dsColor(color + '-300'),
|
|
353
|
-
[`${prefix}-background-color-disabled`]: colorHelper.ColorHelper.dsColor(color + '-50'),
|
|
354
|
-
[`${prefix}-border-default`]: colorHelper.ColorHelper.dsColor(color + '-300'),
|
|
355
|
-
[`${prefix}-border-hover`]: colorHelper.ColorHelper.dsColor(color + '-400'),
|
|
356
|
-
[`${prefix}-border-focus-visible`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
357
|
-
[`${prefix}-border-active`]: colorHelper.ColorHelper.dsColor(color + '-500'),
|
|
358
|
-
[`${prefix}-border-disabled`]: colorHelper.ColorHelper.dsColor(color + '-200'),
|
|
359
|
-
};
|
|
360
|
-
}
|
|
361
|
-
return;
|
|
362
|
-
}
|
|
363
|
-
render() {
|
|
364
|
-
const { size, kind, disabled, outline, type, href, target, loading, variantColor, fullWidth, hidden, icon, iconPosition, value, isIconOnly, iconSize } = this.getStateData();
|
|
365
|
-
const classPrefix = 'bcm-button';
|
|
366
|
-
let componentClass = index$2.classnames('bcm-button__container', `bcm-button__container-size-${size}`, `bcm-button__container-kind-${outline ? 'ghost' : kind}`, {
|
|
367
|
-
'full-width': fullWidth,
|
|
368
|
-
'checked': this.checked,
|
|
369
|
-
'disabled': disabled,
|
|
370
|
-
});
|
|
371
|
-
const hostClasses = index$2.classnames(`${classPrefix}`, {
|
|
372
|
-
hidden,
|
|
373
|
-
'full-width': fullWidth,
|
|
374
|
-
});
|
|
375
|
-
return (index$1.h(index$1.Host, { class: hostClasses, style: this.setColor(variantColor), onClick: () => !disabled && this.bcmClick.emit(this.el) }, index$1.h(ButtonTemplate, { type: type, value: value, componentClass: componentClass, disabled: disabled, href: href, target: target, icon: icon, loading: loading, iconSize: iconSize, isIconOnly: isIconOnly, iconPosition: iconPosition })));
|
|
376
|
-
}
|
|
377
|
-
get el() { return index$1.getElement(this); }
|
|
378
|
-
};
|
|
379
|
-
__decorate$1([
|
|
380
|
-
isLoadDecorator.IsLoad()
|
|
381
|
-
], BcmButton.prototype, "el", void 0);
|
|
382
|
-
BcmButton.style = buttonCss;
|
|
383
|
-
|
|
384
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
385
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
386
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
387
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
388
|
-
else
|
|
389
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
390
|
-
if (d = decorators[i])
|
|
391
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
392
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
393
|
-
};
|
|
394
|
-
const BcmToast = class {
|
|
395
|
-
constructor(hostRef) {
|
|
396
|
-
index$1.registerInstance(this, hostRef);
|
|
397
|
-
this.bcmToastClose = index$1.createEvent(this, "bcm-toast-close", 7);
|
|
398
|
-
this.bcmToastOpen = index$1.createEvent(this, "bcm-toast-open", 7);
|
|
399
|
-
this.bcmToastView = index$1.createEvent(this, "bcm-toast-view", 7);
|
|
400
|
-
this._id = generate.Generate.UID();
|
|
401
|
-
this.status = undefined;
|
|
402
|
-
this.message = "";
|
|
403
|
-
this.description = "";
|
|
404
|
-
this.duration = 3000;
|
|
405
|
-
this.position = bcm.Bcm.Placement.bottom;
|
|
406
|
-
this.messageIcon = undefined;
|
|
407
|
-
this.viewButton = false;
|
|
408
|
-
this.closeButton = true;
|
|
409
|
-
this.visible = false;
|
|
410
|
-
this.visibleContainer = false;
|
|
411
|
-
}
|
|
412
|
-
async show() {
|
|
413
|
-
const container = document.getElementById(this._id + "-container");
|
|
414
|
-
if (container) {
|
|
415
|
-
document.body.appendChild(container);
|
|
416
|
-
}
|
|
417
|
-
this.visible = true;
|
|
418
|
-
await utils.delay(50);
|
|
419
|
-
this.visibleContainer = true;
|
|
420
|
-
this.bcmToastOpen.emit();
|
|
421
|
-
if (this.timer) {
|
|
422
|
-
clearTimeout(this.timer);
|
|
423
|
-
}
|
|
424
|
-
this.timer = setTimeout(() => this.hide(), this.duration);
|
|
425
|
-
return this.el;
|
|
426
|
-
}
|
|
427
|
-
async hide() {
|
|
428
|
-
this.visibleContainer = false;
|
|
429
|
-
clearTimeout(this.timer);
|
|
430
|
-
this.bcmToastClose.emit();
|
|
431
|
-
await utils.delay(100);
|
|
432
|
-
this.visible = false;
|
|
433
|
-
}
|
|
434
|
-
handleMouseEnter() {
|
|
435
|
-
clearTimeout(this.timer);
|
|
436
|
-
}
|
|
437
|
-
handleMouseLeave() {
|
|
438
|
-
if (this.visible) {
|
|
439
|
-
this.timer = setTimeout(() => this.hide(), 1000);
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
render() {
|
|
443
|
-
return (index$1.h(index$1.Host, { class: "tw-hidden" }, index$1.h("div", { class: index$2.classnames({ "tw-hidden": !this.visible }), id: this._id + "-container", onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave() }, index$1.h("div", { class: index$2.classnames("tw-pointer-events-auto tw-transform tw-transition tw-duration-300 tw-ease-in-out", "tw-flex tw-min-w-[256px] tw-max-w-[420px] tw-flex-col tw-gap-2 tw-rounded-lg tw-border tw-font-sans tw-font-normal tw-shadow-2", "tw-border-gray-300 tw-bg-white tw-text-slate-600", {
|
|
444
|
-
"tw-p-4": !this.description,
|
|
445
|
-
"tw-p-6": this.description,
|
|
446
|
-
}, "tw-fixed tw-z-50", "tw-transform tw-transition tw-duration-300 tw-ease-in-out ", {
|
|
447
|
-
"tw-inset-x-0 tw-top-4 tw-mx-auto": this.position === bcm.Bcm.Placement.top,
|
|
448
|
-
"tw-inset-x-0 tw-bottom-4 tw-mx-auto": this.position === bcm.Bcm.Placement.bottom,
|
|
449
|
-
"tw-top-4 tw-left-4": this.position === bcm.Bcm.Placement["top-start"],
|
|
450
|
-
"tw-top-4 tw-right-4": this.position === bcm.Bcm.Placement["top-end"],
|
|
451
|
-
"tw-bottom-4 tw-left-4": this.position === bcm.Bcm.Placement["bottom-start"],
|
|
452
|
-
"tw-bottom-4 tw-right-4": this.position === bcm.Bcm.Placement["bottom-end"],
|
|
453
|
-
"tw-translate-y-0 tw-opacity-100 ": this.visibleContainer,
|
|
454
|
-
"tw-opacity-0": !this.visibleContainer,
|
|
455
|
-
"tw-translate-y-[-100%]": !this.visibleContainer && this.position.split("-")[0] === "top",
|
|
456
|
-
"tw-translate-y-[100%]": !this.visibleContainer && this.position.split("-")[0] === "bottom",
|
|
457
|
-
}) }, index$1.h("div", { class: "tw-flex tw-items-center tw-justify-between tw-gap-5" }, index$1.h("div", { class: "tw-flex tw-items-center tw-gap-3 " }, this.status && (index$1.h("i", { class: index$2.classnames("tw-text-6", this.messageIcon ? this.messageIcon : "far", {
|
|
458
|
-
"tw-text-emerald-500": this.status === "success",
|
|
459
|
-
"tw-text-red-500": this.status === "error",
|
|
460
|
-
"tw-text-amber-500": this.status === "warning",
|
|
461
|
-
"tw-text-blue-500": this.status === "info",
|
|
462
|
-
}, {
|
|
463
|
-
"fa-check-circle": !this.messageIcon && this.status === "success",
|
|
464
|
-
"fa-exclamation-circle": !this.messageIcon && this.status === "error",
|
|
465
|
-
"fa-exclamation-triangle": !this.messageIcon && this.status === "warning",
|
|
466
|
-
"fa-info-circle": !this.messageIcon && this.status === "info",
|
|
467
|
-
}) })), index$1.h("span", { class: index$2.classnames({
|
|
468
|
-
"tw-text-4": !this.description,
|
|
469
|
-
"tw-text-6 tw-font-medium": this.description,
|
|
470
|
-
}) }, !this.description && this.status && index$1.h("span", null, stringHelper.StringHelper.capitalize(this.status), ": "), this.message)), index$1.h("div", { class: "tw-flex tw-items-baseline tw-gap-2" }, this.viewButton && (index$1.h("button", { onClick: () => this.bcmToastView.emit(), title: "View details", class: index$2.classnames("tw-cursor-pointer tw-rounded tw-bg-transparent tw-p-0 tw-px-1 tw-text-4 tw-text-inherit", "hover:tw-bg-gray-100 hover:tw-text-slate-800", "active:tw-bg-gray-200", "tw-transition tw-duration-300 tw-ease-in-out", {
|
|
471
|
-
"tw-font-medium": this.description,
|
|
472
|
-
}) }, "View")), this.closeButton && (index$1.h("button", { title: "Close", onClick: () => this.hide(), class: index$2.classnames("tw-rounded tw-bg-transparent tw-p-0", "tw-flex tw-h-6 tw-w-6 tw-cursor-pointer tw-items-center tw-justify-center tw-text-3 tw-text-inherit", "hover:tw-bg-gray-100 hover:tw-text-slate-800", "active:tw-bg-gray-200") }, index$1.h("i", { class: "fal fa-times" }))))), this.description && index$1.h("div", { class: "tw-text-3 " }, this.description), index$1.h("slot", null)))));
|
|
473
|
-
}
|
|
474
|
-
get el() { return index$1.getElement(this); }
|
|
475
|
-
};
|
|
476
|
-
__decorate([
|
|
477
|
-
isLoadDecorator.IsLoad()
|
|
478
|
-
], BcmToast.prototype, "el", void 0);
|
|
479
|
-
|
|
480
|
-
exports.bcm_button = BcmButton;
|
|
481
|
-
exports.bcm_toast = BcmToast;
|