@trendyol/baklava 3.4.2 → 3.5.0-beta.10
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/baklava-react.js +1 -1
- package/dist/baklava-svelte.d.ts +4 -0
- package/dist/baklava.d.ts +2 -0
- package/dist/baklava.d.ts.map +1 -1
- package/dist/baklava.js +1 -1
- package/dist/chunk-276RDWEQ.js +95 -0
- package/dist/{chunk-HBPBDC7T.js.map → chunk-276RDWEQ.js.map} +4 -4
- package/dist/{chunk-LZ6VDMPM.js → chunk-2JDJGZRM.js} +2 -2
- package/dist/chunk-2PI5BUSE.js +2 -0
- package/dist/chunk-2PI5BUSE.js.map +7 -0
- package/dist/chunk-2XEDFGYF.js +59 -0
- package/dist/chunk-2XEDFGYF.js.map +7 -0
- package/dist/chunk-3D7WG3ON.js +5 -0
- package/dist/chunk-3D7WG3ON.js.map +7 -0
- package/dist/{chunk-NW7MDZJB.js → chunk-4BLKAURK.js} +2 -2
- package/dist/{chunk-3MLXIDOD.js → chunk-5TPDRTCU.js} +2 -2
- package/dist/chunk-6JU6I4L7.js +2 -0
- package/dist/chunk-6JU6I4L7.js.map +7 -0
- package/dist/{chunk-D7VPTSSK.js → chunk-7WQEZTFP.js} +2 -2
- package/dist/chunk-7WQEZTFP.js.map +7 -0
- package/dist/chunk-AIHL337R.js +50 -0
- package/dist/chunk-AIHL337R.js.map +7 -0
- package/dist/{chunk-3OQA4BKQ.js → chunk-BH64QNLE.js} +2 -2
- package/dist/{chunk-JTNWYMYZ.js → chunk-CNWKBBJJ.js} +2 -2
- package/dist/{chunk-KYLWO3YR.js → chunk-DAMBW5GX.js} +3 -3
- package/dist/{chunk-KYLWO3YR.js.map → chunk-DAMBW5GX.js.map} +3 -3
- package/dist/chunk-EFOTKJY4.js +80 -0
- package/dist/chunk-EFOTKJY4.js.map +7 -0
- package/dist/chunk-EH2C72PD.js +2 -0
- package/dist/chunk-EH2C72PD.js.map +7 -0
- package/dist/{chunk-LCAPXVGE.js → chunk-ERL6CBPO.js} +2 -2
- package/dist/{chunk-Z2AZS34W.js → chunk-G4DOH6BQ.js} +2 -2
- package/dist/{chunk-7HEDOM2M.js → chunk-GISZRI4I.js} +2 -2
- package/dist/{chunk-FS3MTRC3.js → chunk-IKYI4JCF.js} +2 -2
- package/dist/chunk-IZ2LK5GK.js +2 -0
- package/dist/{chunk-M4E4CVZ4.js → chunk-J24DBEJQ.js} +2 -2
- package/dist/{chunk-DPKNQOJX.js → chunk-J5YZ4HBV.js} +2 -2
- package/dist/{chunk-BDTCJ2JC.js → chunk-JXB2O63E.js} +2 -2
- package/dist/chunk-KC4ECXJJ.js +2 -0
- package/dist/chunk-KC4ECXJJ.js.map +7 -0
- package/dist/{chunk-5QGKDF4O.js → chunk-L5U5XRNP.js} +2 -2
- package/dist/chunk-LYHOM7F5.js +37 -0
- package/dist/chunk-LYHOM7F5.js.map +7 -0
- package/dist/{chunk-6XM52E7W.js → chunk-MWFGDECP.js} +2 -2
- package/dist/{chunk-FCOVZEHC.js → chunk-P5TOP3NH.js} +2 -2
- package/dist/chunk-PQEZBW3G.js +54 -0
- package/dist/chunk-PQEZBW3G.js.map +7 -0
- package/dist/{chunk-UK2ZEQBN.js → chunk-QDYWH7BU.js} +2 -2
- package/dist/{chunk-WZBUJ4ER.js → chunk-QF4LGACD.js} +2 -2
- package/dist/{chunk-UV7BOOVA.js → chunk-QKII4FCI.js} +2 -2
- package/dist/{chunk-5NSAJ3SX.js → chunk-S4BD3HT2.js} +2 -2
- package/dist/{chunk-23AVKNCC.js → chunk-SBCJY5IU.js} +2 -2
- package/dist/{chunk-LIUATY6B.js → chunk-SIP5IK3N.js} +2 -2
- package/dist/{chunk-UF5VCR36.js → chunk-STZJ3LBU.js} +2 -2
- package/dist/{chunk-UGRBWOQE.js → chunk-T5MEA7JO.js} +2 -2
- package/dist/{chunk-BCRV6HG6.js → chunk-TBB5HNL6.js} +2 -2
- package/dist/{chunk-7N7YHRPA.js → chunk-UQMXWLP6.js} +2 -2
- package/dist/{chunk-YH3MSMXL.js → chunk-WPESQSKX.js} +2 -2
- package/dist/{chunk-FANRUDPK.js → chunk-WUXXMMTM.js} +2 -2
- package/dist/chunk-X2MSD7NS.js +14 -0
- package/dist/chunk-X2MSD7NS.js.map +7 -0
- package/dist/{chunk-IR2QY2VG.js → chunk-YIKU2R7W.js} +2 -2
- package/dist/{chunk-OYHUG47P.js → chunk-ZE7GYACV.js} +2 -2
- package/dist/chunk-ZLE5MDX7.js +2 -0
- package/dist/chunk-ZLE5MDX7.js.map +7 -0
- package/dist/{chunk-HD7EU6S5.js → chunk-ZLJF4SVG.js} +2 -2
- package/dist/{chunk-NM74WWXQ.js → chunk-ZQ4MQ3U6.js} +2 -2
- package/dist/chunk-ZQ4MQ3U6.js.map +7 -0
- package/dist/components/accordion-group/accordion/bl-accordion.js +1 -1
- package/dist/components/accordion-group/bl-accordion-group.js +1 -1
- package/dist/components/alert/bl-alert.js +1 -1
- package/dist/components/badge/bl-badge.js +1 -1
- package/dist/components/button/bl-button.js +1 -1
- package/dist/components/calendar/bl-calendar.constant.js +1 -1
- package/dist/components/calendar/bl-calendar.js +1 -1
- package/dist/components/checkbox-group/bl-checkbox-group.js +1 -1
- package/dist/components/checkbox-group/checkbox/bl-checkbox.js +1 -1
- package/dist/components/datepicker/bl-datepicker.d.ts +4 -0
- package/dist/components/datepicker/bl-datepicker.d.ts.map +1 -1
- package/dist/components/datepicker/bl-datepicker.js +1 -1
- package/dist/components/dialog/bl-dialog.js +1 -1
- package/dist/components/dialog/bl-dialog.stories.js +1 -1
- package/dist/components/drawer/bl-drawer.js +1 -1
- package/dist/components/dropdown/bl-dropdown.js +1 -1
- package/dist/components/dropdown/group/bl-dropdown-group.js +1 -1
- package/dist/components/dropdown/item/bl-dropdown-item.js +1 -1
- package/dist/components/icon/bl-icon.js +1 -1
- package/dist/components/icon/icon-list.js +1 -1
- package/dist/components/input/bl-input.d.ts +4 -0
- package/dist/components/input/bl-input.d.ts.map +1 -1
- package/dist/components/input/bl-input.js +1 -1
- package/dist/components/link/bl-link.js +1 -1
- package/dist/components/link/bl-link.stories.js +1 -1
- package/dist/components/notification/bl-notification.js +1 -1
- package/dist/components/notification/bl-notification.stories.d.ts.map +1 -1
- package/dist/components/notification/bl-notification.stories.js +20 -8
- package/dist/components/notification/bl-notification.stories.js.map +2 -2
- package/dist/components/notification/card/bl-notification-card.js +1 -1
- package/dist/components/pagination/bl-pagination.js +1 -1
- package/dist/components/popover/bl-popover.d.ts.map +1 -1
- package/dist/components/popover/bl-popover.js +1 -1
- package/dist/components/progress-indicator/bl-progress-indicator.js +1 -1
- package/dist/components/radio-group/bl-radio-group.js +1 -1
- package/dist/components/radio-group/radio/bl-radio.js +1 -1
- package/dist/components/select/bl-select.d.ts.map +1 -1
- package/dist/components/select/bl-select.js +1 -1
- package/dist/components/select/option/bl-select-option.js +1 -1
- package/dist/components/spinner/bl-spinner.js +1 -1
- package/dist/components/split-button/bl-split-button.js +1 -1
- package/dist/components/stepper/bl-stepper-item.d.ts.map +1 -1
- package/dist/components/stepper/bl-stepper-item.js +1 -1
- package/dist/components/stepper/bl-stepper.js +1 -1
- package/dist/components/stepper/bl-stepper.stories.js +1 -1
- package/dist/components/switch/bl-switch.js +1 -1
- package/dist/components/tab-group/bl-tab-group.js +1 -1
- package/dist/components/tab-group/tab/bl-tab.js +1 -1
- package/dist/components/tab-group/tab-panel/bl-tab-panel.js +1 -1
- package/dist/components/table/bl-table.js +1 -1
- package/dist/components/table/table-body/bl-table-body.d.ts +4 -1
- package/dist/components/table/table-body/bl-table-body.d.ts.map +1 -1
- package/dist/components/table/table-body/bl-table-body.js +1 -1
- package/dist/components/table/table-cell/bl-table-cell.js +1 -1
- package/dist/components/table/table-header/bl-table-header.js +1 -1
- package/dist/components/table/table-header-cell/bl-table-header-cell.js +1 -1
- package/dist/components/table/table-row/bl-table-row.js +1 -1
- package/dist/components/tag/bl-tag.js +1 -1
- package/dist/components/textarea/bl-textarea.js +1 -1
- package/dist/components/tooltip/bl-tooltip.js +1 -1
- package/dist/components/tooltip/bl-tooltip.test.d.ts +6 -1
- package/dist/components/tooltip/bl-tooltip.test.d.ts.map +1 -1
- package/dist/custom-elements.json +63 -1
- package/dist/generated/locale-codes.js +1 -1
- package/dist/generated/locales/ar.d.ts +3 -0
- package/dist/generated/locales/ar.d.ts.map +1 -1
- package/dist/generated/locales/ar.js +1 -1
- package/dist/generated/locales/ar.js.map +4 -4
- package/dist/generated/locales/ro.d.ts +3 -0
- package/dist/generated/locales/ro.d.ts.map +1 -1
- package/dist/generated/locales/ro.js +1 -1
- package/dist/generated/locales/ro.js.map +4 -4
- package/dist/generated/locales/tr.d.ts +3 -0
- package/dist/generated/locales/tr.d.ts.map +1 -1
- package/dist/generated/locales/tr.js +1 -1
- package/dist/generated/locales/tr.js.map +4 -4
- package/dist/localization.d.ts +5 -0
- package/dist/localization.d.ts.map +1 -1
- package/dist/localization.js +1 -1
- package/dist/localization.js.map +4 -4
- package/dist/themes/dark.css +2 -0
- package/dist/themes/dark.css.map +7 -0
- package/dist/themes/default.css +1 -1
- package/dist/themes/default.css.map +2 -2
- package/dist/utilities/format-to-date-array.d.ts.map +1 -1
- package/package.json +10 -7
- package/dist/chunk-3IZAFXL6.js +0 -59
- package/dist/chunk-3IZAFXL6.js.map +0 -7
- package/dist/chunk-BWWXE4SL.js +0 -2
- package/dist/chunk-C2UDBDKV.js +0 -53
- package/dist/chunk-C2UDBDKV.js.map +0 -7
- package/dist/chunk-D7VPTSSK.js.map +0 -7
- package/dist/chunk-EZSEQHRH.js +0 -2
- package/dist/chunk-EZSEQHRH.js.map +0 -7
- package/dist/chunk-HBPBDC7T.js +0 -95
- package/dist/chunk-HCSEQTUP.js +0 -37
- package/dist/chunk-HCSEQTUP.js.map +0 -7
- package/dist/chunk-IEFQ6PGY.js +0 -80
- package/dist/chunk-IEFQ6PGY.js.map +0 -7
- package/dist/chunk-JN5BKKQZ.js +0 -14
- package/dist/chunk-JN5BKKQZ.js.map +0 -7
- package/dist/chunk-NM74WWXQ.js.map +0 -7
- package/dist/chunk-P4S537UY.js +0 -50
- package/dist/chunk-P4S537UY.js.map +0 -7
- package/dist/chunk-RCHKJINV.js +0 -5
- package/dist/chunk-RCHKJINV.js.map +0 -7
- /package/dist/{chunk-LZ6VDMPM.js.map → chunk-2JDJGZRM.js.map} +0 -0
- /package/dist/{chunk-NW7MDZJB.js.map → chunk-4BLKAURK.js.map} +0 -0
- /package/dist/{chunk-3MLXIDOD.js.map → chunk-5TPDRTCU.js.map} +0 -0
- /package/dist/{chunk-3OQA4BKQ.js.map → chunk-BH64QNLE.js.map} +0 -0
- /package/dist/{chunk-JTNWYMYZ.js.map → chunk-CNWKBBJJ.js.map} +0 -0
- /package/dist/{chunk-LCAPXVGE.js.map → chunk-ERL6CBPO.js.map} +0 -0
- /package/dist/{chunk-Z2AZS34W.js.map → chunk-G4DOH6BQ.js.map} +0 -0
- /package/dist/{chunk-7HEDOM2M.js.map → chunk-GISZRI4I.js.map} +0 -0
- /package/dist/{chunk-FS3MTRC3.js.map → chunk-IKYI4JCF.js.map} +0 -0
- /package/dist/{chunk-BWWXE4SL.js.map → chunk-IZ2LK5GK.js.map} +0 -0
- /package/dist/{chunk-M4E4CVZ4.js.map → chunk-J24DBEJQ.js.map} +0 -0
- /package/dist/{chunk-DPKNQOJX.js.map → chunk-J5YZ4HBV.js.map} +0 -0
- /package/dist/{chunk-BDTCJ2JC.js.map → chunk-JXB2O63E.js.map} +0 -0
- /package/dist/{chunk-5QGKDF4O.js.map → chunk-L5U5XRNP.js.map} +0 -0
- /package/dist/{chunk-6XM52E7W.js.map → chunk-MWFGDECP.js.map} +0 -0
- /package/dist/{chunk-FCOVZEHC.js.map → chunk-P5TOP3NH.js.map} +0 -0
- /package/dist/{chunk-UK2ZEQBN.js.map → chunk-QDYWH7BU.js.map} +0 -0
- /package/dist/{chunk-WZBUJ4ER.js.map → chunk-QF4LGACD.js.map} +0 -0
- /package/dist/{chunk-UV7BOOVA.js.map → chunk-QKII4FCI.js.map} +0 -0
- /package/dist/{chunk-5NSAJ3SX.js.map → chunk-S4BD3HT2.js.map} +0 -0
- /package/dist/{chunk-23AVKNCC.js.map → chunk-SBCJY5IU.js.map} +0 -0
- /package/dist/{chunk-LIUATY6B.js.map → chunk-SIP5IK3N.js.map} +0 -0
- /package/dist/{chunk-UF5VCR36.js.map → chunk-STZJ3LBU.js.map} +0 -0
- /package/dist/{chunk-UGRBWOQE.js.map → chunk-T5MEA7JO.js.map} +0 -0
- /package/dist/{chunk-BCRV6HG6.js.map → chunk-TBB5HNL6.js.map} +0 -0
- /package/dist/{chunk-7N7YHRPA.js.map → chunk-UQMXWLP6.js.map} +0 -0
- /package/dist/{chunk-YH3MSMXL.js.map → chunk-WPESQSKX.js.map} +0 -0
- /package/dist/{chunk-FANRUDPK.js.map → chunk-WUXXMMTM.js.map} +0 -0
- /package/dist/{chunk-IR2QY2VG.js.map → chunk-YIKU2R7W.js.map} +0 -0
- /package/dist/{chunk-OYHUG47P.js.map → chunk-ZE7GYACV.js.map} +0 -0
- /package/dist/{chunk-HD7EU6S5.js.map → chunk-ZLJF4SVG.js.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../node_modules/@open-wc/form-helpers/src/index.ts", "../src/components/button/bl-button.css", "../src/components/button/bl-button.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Implicitly submit a form by first validating all controls. If the form\n * is valid, issue a submit event and if that event is not prevented, manually\n * call the form's submit method.\n *\n * @param form {HTMLFormElement} - A form to implicitly submit\n */\nexport const submit = (form: HTMLFormElement): void => {\n if (!form.noValidate && !form.reportValidity()) {\n return;\n } else {\n const submitEvent = new SubmitEvent('submit', {\n bubbles: true,\n cancelable: true\n });\n form.dispatchEvent(submitEvent);\n if (!submitEvent.defaultPrevented) {\n form.submit();\n }\n }\n};\n\nexport type FormValue = string|FormData|File|FormValue[];\n\n/**\n * Parse a form and return a set of values based on the name/value pair.\n * If multiple controls of a similar name exist, return an array for those values;\n * otherwise return a single value.\n *\n * @param form {HTMLFormElement} - The form to parse for values\n * @returns {Record<string, any>} - An object representing the form's current values\n */\nexport const formValues = (form: HTMLFormElement): Record<string, FormValue> => {\n const formData = new FormData(form);\n const values: Record<string, FormValue> = {};\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore This does exist in all browsers. TypeScript is wrong\n for (const [key, value] of formData.entries()) {\n if (!values.hasOwnProperty(key)) {\n values[key] = value;\n } else if (Array.isArray(values[key])) {\n const pointer = values[key] as FormValue[];\n pointer.push(value);\n } else {\n values[key] = [values[key], value];\n }\n }\n\n return values;\n};\n\n/**\n * This method takes a form and parses it as an object. If any form control has a `.`\n * in its name, this utility will evaluate that name as a deep key for an object;\n * in other words, if a form has a named control, `name.first` and another, `name.last`\n * it will report back a nested object, name, with first and last properties\n * representing those controls' values.\n *\n * This can be useful when you have a complex model that you are attempting to represent\n * in declaratively in HTML.\n *\n * @param form {HTMLFormElement} - The form to grab values from\n * @returns {Object<string, FormValue>} - An object representation of the form\n */\nexport const parseFormAsObject = (form: HTMLFormElement): Record<string, FormValue> => {\n const data = formValues(form);\n const output: Record<string, FormValue> = {};\n\n Object.entries(data).forEach(([key, value]) => {\n /** If the key has a '.', parse it as an object */\n if (key.includes('.')) {\n const path = key.split('.');\n const destination: string | undefined = path.pop();\n let pointer = output;\n\n while (path.length) {\n const key = path.shift();\n pointer[key as string] = pointer[key as string] || ({} as FormValue);\n pointer = pointer[key as string] as unknown as Record<string, FormValue>;\n }\n\n pointer[destination as string] = value;\n } else {\n output[key] = data[key];\n }\n });\n\n return output;\n};\n", "import {css} from 'lit';\nexport const styles = css`:host{display:var(--bl-button-display,inline-block);max-width:100%;position:relative}.button{--main-color:var(--bl-color-primary);--main-hover-color:var(--bl-color-primary-highlight);--text-hover-color:var(--bl-color-neutral-lightest);--content-color:var(--bl-color-neutral-full);--bg-color:var(--main-color);--border-color:var(--main-color);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-m);--margin-icon:var(--padding-vertical);--icon-size:var(--bl-size-m);--font:var(--bl-font-title-3-medium);--height:var(--bl-size-2xl);display:flex;gap:var(--margin-icon);justify-content:var(--bl-button-justify,center);align-items:center;box-sizing:border-box;width:100%;height:var(--height);min-width:var(--height);border:solid 1px var(--border-color);border-radius:var(--bl-border-radius-m);text-decoration:none;padding:var(--padding-vertical) var(--padding-horizontal);cursor:pointer;background-color:var(--bg-color);color:var(--content-color);font:var(--font);font-kerning:none;user-select:none}:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .button,:host(:hover) .button{--bg-color:var(--main-hover-color);--border-color:var(--main-hover-color)}.label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host([size=small]) .button{--font:var(--bl-font-title-4-medium);--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-2xs);--icon-size:var(--bl-size-s);--height:var(--bl-size-xl)}:host([size=large]) .button{--font:var(--bl-font-title-3-medium);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-xl);--margin-icon:var(--bl-size-2xs);--height:var(--bl-size-3xl)}.button:focus{outline:0}.button:focus-visible{position:relative;outline:0}.button:focus-visible::after{border:2px solid var(--bl-button-focus-border-color,var(--main-color));border-radius:var(--bl-border-radius-l);content:\"\";position:absolute;inset:-4px}:host .button bl-icon,:host ::slotted(bl-icon){font-size:var(--icon-size)}:host([loading]) .button bl-icon,:host([loading]) ::slotted(bl-icon){display:none}:host .has-icon:not(.has-content){--padding-horizontal:var(--padding-vertical);--margin-icon:0}:host([variant=secondary]) .button{--bg-color:transparent;--content-color:var(--main-color)}:host([variant=tertiary]) .button{--content-color:var(--main-color);--border-color:transparent;--bg-color:transparent}:host([kind=neutral]) .button{--main-color:var(--bl-color-neutral-darker);--main-hover-color:var(--bl-color-neutral-darkest)}:host([kind=success]) .button{--main-color:var(--bl-color-success);--main-hover-color:var(--bl-color-success-highlight)}:host([kind=danger]) .button{--main-color:var(--bl-color-danger);--main-hover-color:var(--bl-color-danger-highlight)}:host([disabled]){cursor:not-allowed}:host([loading]){cursor:wait}:host .button[aria-disabled=true]{--main-color:var(--bl-color-neutral-lightest);--main-hover-color:var(--bl-color-neutral-lightest);--content-color:var(--bl-color-neutral-lighter);--bg-color:var(--main-color);pointer-events:none;text-decoration:none}:host([variant=tertiary]) .button[aria-disabled=true]{--main-color:transparent}:host([variant=secondary].__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .button[aria-disabled=false],:host([variant=secondary]:hover) .button[aria-disabled=false]{--content-color:var(--bl-color-neutral-full);--bg-color:var(--main-hover-color)}:host([variant=tertiary].__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .button[aria-disabled=false],:host([variant=tertiary]:hover) .button[aria-disabled=false]{--content-color:var(--main-hover-color);--bg-color:var(--text-hover-color)}:host([dropdown]) .open{display:none}:host([dropdown]) .active .open{display:inline-block}:host([dropdown]) .active .close{display:none}:host .active.button{--bg-color:var(--main-hover-color);--border-color:var(--main-hover-color)}:host([variant=secondary]) .active.button{--content-color:var(--bl-color-neutral-full);--bg-color:var(--main-hover-color)}:host([variant=tertiary]) .active.button{--content-color:var(--main-color);--bg-color:var(--bl-color-neutral-lightest);--border-color:transparent}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from \"lit\";\nimport { customElement, property, state, query } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { submit } from \"@open-wc/form-helpers\";\nimport { event, EventDispatcher } from \"../../utilities/event\";\nimport \"../icon/bl-icon\";\nimport { BaklavaIcon } from \"../icon/icon-list\";\nimport \"../spinner/bl-spinner\";\nimport style from \"./bl-button.css\";\n\nexport type ButtonVariant = \"primary\" | \"secondary\" | \"tertiary\";\nexport type ButtonKind = \"default\" | \"neutral\" | \"success\" | \"danger\";\nexport type ButtonSize = \"small\" | \"medium\" | \"large\";\nexport type TargetType = \"_blank\" | \"_parent\" | \"_self\" | \"_top\";\n\n/**\n * @tag bl-button\n * @summary Baklava Button component\n *\n * @cssproperty [--bl-button-display=inline-block] Sets the display property of button\n * @cssproperty [--bl-button-justify=center] Sets the justify-content property of button\n *\n */\n@customElement(\"bl-button\")\nexport default class BlButton extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets the button variant\n */\n @property({ type: String, reflect: true })\n variant: ButtonVariant = \"primary\";\n\n /**\n * Sets the button kind\n */\n @property({ type: String, reflect: true })\n kind: ButtonKind = \"default\";\n\n /**\n * Sets the button size\n */\n @property({ type: String, reflect: true })\n size: ButtonSize = \"medium\";\n\n /**\n * Sets the button label. Used for accessibility.\n */\n @property({ type: String })\n label: string;\n\n /**\n * Sets the button label for loading status.\n */\n @property({ type: String, attribute: \"loading-label\" })\n loadingLabel: string;\n\n /**\n * Sets loading state of button\n */\n @property({ type: Boolean, reflect: true })\n loading = false;\n\n /**\n * Sets button as disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Set link url. If set, button will be rendered as anchor tag.\n */\n @property({ type: String })\n href?: string;\n\n /**\n * Sets the icon name. Shows icon with bl-icon component\n */\n @property({ type: String })\n icon?: BaklavaIcon;\n\n /**\n * Sets the anchor target. Used when `href` is set.\n */\n @property({ type: String })\n target?: TargetType = \"_self\";\n\n /**\n * Sets the type of the button. Set `submit` to use button as the submitter of parent form.\n */\n @property({ type: String })\n type: \"submit\";\n\n /**\n * Sets button type to dropdown\n */\n @property({ type: Boolean })\n dropdown = false;\n\n /**\n * Sets button to get keyboard focus automatically\n */\n @property({ type: Boolean, reflect: true })\n autofocus = false;\n\n /**\n * Sets the associated form of the button. Use when `type` is set to `submit` and button is not inside the target form.\n */\n @property({ type: String })\n form: HTMLFormElement | string;\n\n /**\n * Active state\n */\n @state({})\n active = false;\n\n @query(\".button\")\n private button: HTMLAnchorElement | HTMLButtonElement;\n\n /**\n * Fires when button clicked\n */\n @event(\"bl-click\") private onClick: EventDispatcher<string>;\n\n private get _isActive() {\n return this.active;\n }\n\n connectedCallback() {\n super.connectedCallback();\n }\n\n private caretTemplate(): TemplateResult {\n return html` <bl-icon class=\"open\" name=\"arrow_up\"></bl-icon>\n <bl-icon class=\"close\" name=\"arrow_down\"></bl-icon>`;\n }\n\n private _handleClick() {\n if (this.type === \"submit\") {\n let targetForm: HTMLFormElement;\n\n if (this.form instanceof HTMLFormElement) {\n targetForm = this.form;\n } else if (typeof this.form === \"string\") {\n targetForm = document.getElementById(this.form) as HTMLFormElement;\n } else {\n targetForm = this.closest(\"form\") as HTMLFormElement;\n }\n\n if (targetForm) {\n submit(targetForm);\n }\n }\n\n this.onClick(\"Click event fired!\");\n }\n\n focus() {\n this.button.focus();\n }\n\n get _hasIconSlot() {\n return this.querySelector(':scope > [slot=\"icon\"]') !== null;\n }\n\n get _hasDefaultSlot() {\n const childNodes = [...this.childNodes];\n\n return childNodes.some(node => {\n const nodeType = node.nodeType;\n\n // has only text node.\n if (nodeType === node.TEXT_NODE && node.textContent?.trim() !== \"\") {\n return true;\n }\n // has element node, it should not have slot attribute.\n if (nodeType === node.ELEMENT_NODE) {\n if (!(node as HTMLElement).hasAttribute(\"slot\")) {\n return true;\n }\n }\n return false;\n });\n }\n\n render(): TemplateResult {\n const isDisabled = this.loading || this.disabled;\n const label = this.loading && this.loadingLabel ? this.loadingLabel : html`<slot></slot>`;\n const isAnchor = !!this.href;\n const icon = this.icon ? html`<bl-icon name=${this.icon}></bl-icon>` : \"\";\n const loadingIcon = html`<bl-spinner\n class=\"loading-spinner\"\n ?disabled=\"${isDisabled}\"\n size=\"${this.size}\"\n ></bl-spinner>`;\n const slots = html`<slot name=\"icon\">${this.loading ? loadingIcon : icon}</slot>\n <span class=\"label\">${label}</span>`;\n const caret = this.dropdown ? this.caretTemplate() : \"\";\n const classes = classMap({\n \"button\": true,\n \"has-icon\": this.icon || this._hasIconSlot,\n \"has-content\": this._hasDefaultSlot,\n \"active\": !isAnchor && this._isActive,\n });\n\n return isAnchor\n ? html`<a\n class=${classes}\n ?autofocus=${this.autofocus}\n aria-disabled=\"${ifDefined(isDisabled)}\"\n aria-label=\"${ifDefined(this.label)}\"\n href=${ifDefined(this.href)}\n target=${ifDefined(this.target)}\n role=\"button\"\n >${slots}\n </a>`\n : html`<button\n class=${classes}\n ?autofocus=${this.autofocus}\n aria-disabled=\"${ifDefined(isDisabled)}\"\n aria-label=\"${ifDefined(this.label)}\"\n ?disabled=${isDisabled}\n @click=\"${this._handleClick}\"\n >\n ${slots} ${caret}\n </button>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bl-button\": BlButton;\n }\n}\n"],
|
|
5
|
+
"mappings": "mRAOO,IAAMA,EAAUC,GAA+B,CACpD,GAAI,GAACA,EAAK,YAAc,CAACA,EAAK,eAAc,GAErC,CACL,IAAMC,EAAc,IAAI,YAAY,SAAU,CAC5C,QAAS,GACT,WAAY,GACb,EACDD,EAAK,cAAcC,CAAW,EACzBA,EAAY,kBACfD,EAAK,OAAM,EAGjB,ECnBO,IAAME,EAASC,q/HACfC,EAAQF,ECuBf,IAAqBG,EAArB,cAAsCC,CAAW,CAAjD,kCASE,aAAyB,UAMzB,UAAmB,UAMnB,UAAmB,SAkBnB,aAAU,GAMV,cAAW,GAkBX,YAAsB,QAYtB,cAAW,GAMX,eAAY,GAYZ,YAAS,GA5FT,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAoGA,IAAY,WAAY,CACtB,OAAO,KAAK,MACd,CAEA,mBAAoB,CAClB,MAAM,kBAAkB,CAC1B,CAEQ,eAAgC,CACtC,OAAOC;AAAA,0DAET,CAEQ,cAAe,CACrB,GAAI,KAAK,OAAS,SAAU,CAC1B,IAAIC,EAEA,KAAK,gBAAgB,gBACvBA,EAAa,KAAK,KACT,OAAO,KAAK,MAAS,SAC9BA,EAAa,SAAS,eA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AAM,SAAS,GA/FGrB,EAgGX,sBAKmBmB,EAAA,CAA1BG,EAAM,UAAU,GArGEtB,EAqGQ,uBArGRA,EAArBmB,EAAA,CADCI,EAAc,WAAW,GACLvB",
|
|
6
|
+
"names": ["submit", "form", "submitEvent", "styles", "i", "bl_button_default", "BlButton", "s", "bl_button_default", "x", "targetForm", "submit", "node", "_a", "nodeType", "isDisabled", "label", "isAnchor", "icon", "loadingIcon", "slots", "caret", "classes", "o", "l", "__decorateClass", "t", "i", "event", "e"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-YIKU2R7W.js";import"../../../chunk-ECPWEUBG.js";import"../../../chunk-6LT7O7T2.js";import"../../../chunk-BH64QNLE.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-3USCFSFQ.js";import"../../../chunk-7GK5LKBV.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-accordion.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-ZLJF4SVG.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-accordion-group.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-ERL6CBPO.js";import"../../chunk-ECPWEUBG.js";import"../../chunk-DINNT5P2.js";import"../../chunk-BH64QNLE.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-alert.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-T5MEA7JO.js";import"../../chunk-BH64QNLE.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-badge.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as a}from"../../chunk-
|
|
1
|
+
import{b as a}from"../../chunk-ZQ4MQ3U6.js";import"../../chunk-ZE7GYACV.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-DINNT5P2.js";import"../../chunk-BH64QNLE.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-button.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d}from"../../chunk-WEEGH2F4.js";import"../../chunk-
|
|
1
|
+
import{a,b,c,d}from"../../chunk-WEEGH2F4.js";import"../../chunk-IZ2LK5GK.js";export{d as CALENDAR_TYPES,c as CALENDAR_VIEWS,a as FIRST_MONTH_INDEX,b as LAST_MONTH_INDEX};
|
|
2
2
|
//# sourceMappingURL=bl-calendar.constant.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as a}from"../../chunk-
|
|
1
|
+
import{b as a}from"../../chunk-EFOTKJY4.js";import"../../chunk-IPYZIIRV.js";import"../../chunk-ZQ4MQ3U6.js";import"../../chunk-ZE7GYACV.js";import"../../chunk-WEEGH2F4.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-DINNT5P2.js";import"../../chunk-BH64QNLE.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-276RDWEQ.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-calendar.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as a,d as b,e as c}from"../../chunk-
|
|
1
|
+
import{c as a,d as b,e as c}from"../../chunk-MWFGDECP.js";import"../../chunk-EG7U7PM3.js";import"../../chunk-AYJMIZZ3.js";import"../../chunk-XDUIVR6I.js";import"../../chunk-HZ6A5QFC.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-DINNT5P2.js";import"../../chunk-BH64QNLE.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{b as blChangeEventName,a as blCheckboxGroupTag,c as default};
|
|
2
2
|
//# sourceMappingURL=bl-checkbox-group.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../../chunk-
|
|
1
|
+
import{a,b}from"../../../chunk-MWFGDECP.js";import"../../../chunk-EG7U7PM3.js";import"../../../chunk-AYJMIZZ3.js";import"../../../chunk-XDUIVR6I.js";import"../../../chunk-HZ6A5QFC.js";import"../../../chunk-6LT7O7T2.js";import"../../../chunk-DINNT5P2.js";import"../../../chunk-BH64QNLE.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-3USCFSFQ.js";import"../../../chunk-7GK5LKBV.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as blCheckboxTag,b as default};
|
|
2
2
|
//# sourceMappingURL=bl-checkbox.js.map
|
|
@@ -40,6 +40,10 @@ export default class BlDatepicker extends DatepickerCalendarMixin {
|
|
|
40
40
|
* Defines help text to datepicker input for users
|
|
41
41
|
*/
|
|
42
42
|
helpText: string;
|
|
43
|
+
/**
|
|
44
|
+
* Sets input error state
|
|
45
|
+
*/
|
|
46
|
+
error: string;
|
|
43
47
|
/**
|
|
44
48
|
* Custom function to render day cells in the calendar.
|
|
45
49
|
* It receives the date as an argument and should return a TemplateResult.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bl-datepicker.d.ts","sourceRoot":"","sources":["../../../src/components/datepicker/bl-datepicker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,uBAAuB,MAAM,kEAAkE,CAAC;AAEvG,OAAO,yBAAyB,CAAC;AAEjC,OAAO,mBAAmB,CAAC;AAC3B,OAAO,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,uBAAuB,CAAC;AAG/B;;;;;IAKI;AAEJ,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,uBAAuB;IAC/D;;OAEG;IAEH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IAEH,IAAI,CAAC,EAAE,SAAS,CAAY;IAE5B;;OAEG;IAEH,UAAU,UAAS;IACnB;;OAEG;IAEH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IAEH,cAAc,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,MAAM,CAAC,GAAG,IAAI,CAAQ;IAC1D;;OAEG;IAEH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IAEH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IAEH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,cAAc,CAAC;IAG7C,WAAW,SAAM;IAGjB,kBAAkB,EAAE,MAAM,CAAK;IAG/B,iBAAi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AAC,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,MAAM,CAAC,GAAG,IAAI,CAAQ;IAC1D;;OAEG;IAEH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IAEH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IAEH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IAEH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,cAAc,CAAC;IAG7C,WAAW,SAAM;IAGjB,kBAAkB,EAAE,MAAM,CAAK;IAG/B,iBAAiB,EAAE,MAAM,CAAK;IAG9B,WAAW,EAAE,UAAU,CAAC;IAGxB,UAAU,EAAE,SAAS,CAAC;IAGtB,QAAQ,EAAG,OAAO,CAAC;IAEnB,OAAO,CAAC,oBAAoB,CAA+B;IAC3D,OAAO,CAAC,iBAAiB,CAA+B;IAExD;;OAEG;IAC4B,OAAO,CAAC,qBAAqB,CAA0B;IAEtF,MAAM,KAAK,MAAM,IAAI,cAAc,CAElC;IAED,0BAA0B;IAqB1B,uBAAuB;IAOvB,gBAAgB;IAUhB,kBAAkB;IAYlB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAU9B,eAAe;IAMf,WAAW;IAKX,YAAY;IAIZ,cAAc;IAId,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,EAAE;IAY9C,YAAY;IAmBlB,gBAAgB;IAKhB,oBAAoB;IAMpB,MAAM;CA4EP"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-PQEZBW3G.js";import"../../chunk-TBB5HNL6.js";import"../../chunk-3D7WG3ON.js";import"../../chunk-ZLE5MDX7.js";import"../../chunk-2XEDFGYF.js";import"../../chunk-23PSWIUF.js";import"../../chunk-EFOTKJY4.js";import"../../chunk-IPYZIIRV.js";import"../../chunk-ZQ4MQ3U6.js";import"../../chunk-ZE7GYACV.js";import"../../chunk-WEEGH2F4.js";import"../../chunk-EG7U7PM3.js";import"../../chunk-AYJMIZZ3.js";import"../../chunk-XDUIVR6I.js";import"../../chunk-HZ6A5QFC.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-DINNT5P2.js";import"../../chunk-BH64QNLE.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-276RDWEQ.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-datepicker.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-QKII4FCI.js";import"../../chunk-ZQ4MQ3U6.js";import"../../chunk-ZE7GYACV.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-DINNT5P2.js";import"../../chunk-BH64QNLE.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-dialog.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as c}from"../../chunk-
|
|
1
|
+
import{b as c}from"../../chunk-J24DBEJQ.js";import{a as n}from"../../chunk-DINNT5P2.js";import{b as s}from"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import{b as e}from"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";var d={title:"Components/Dialog",component:"bl-dialog",parameters:{chromatic:{viewports:[1e3]},controls:{exclude:["id"]}},decorators:[c],argTypes:{open:{control:"boolean"},polyfilled:{control:"boolean"},caption:{control:"text"},content:{control:"text"}}},q=d,t=i=>async()=>{let a=document.getElementById(i);a.open=!0},o=i=>e`
|
|
2
2
|
<bl-button @bl-click="${t(i.id)}" variant="secondary">Open Dialog</bl-button>
|
|
3
3
|
|
|
4
4
|
<bl-dialog
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-7WQEZTFP.js";import"../../chunk-ZQ4MQ3U6.js";import"../../chunk-ZE7GYACV.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-DINNT5P2.js";import"../../chunk-BH64QNLE.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-drawer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e as a,f as b}from"../../chunk-
|
|
1
|
+
import{e as a,f as b}from"../../chunk-SIP5IK3N.js";import"../../chunk-WUXXMMTM.js";import"../../chunk-IPYZIIRV.js";import"../../chunk-ZQ4MQ3U6.js";import"../../chunk-ZE7GYACV.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-DINNT5P2.js";import"../../chunk-BH64QNLE.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{a as blDropdownTag,b as default};
|
|
2
2
|
//# sourceMappingURL=bl-dropdown.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../../chunk-
|
|
1
|
+
import{a,b}from"../../../chunk-WUXXMMTM.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as blDropdownGroupTag,b as default};
|
|
2
2
|
//# sourceMappingURL=bl-dropdown-group.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as a,d as b}from"../../../chunk-
|
|
1
|
+
import{c as a,d as b}from"../../../chunk-SIP5IK3N.js";import"../../../chunk-WUXXMMTM.js";import"../../../chunk-IPYZIIRV.js";import"../../../chunk-ZQ4MQ3U6.js";import"../../../chunk-ZE7GYACV.js";import"../../../chunk-6LT7O7T2.js";import"../../../chunk-DINNT5P2.js";import"../../../chunk-BH64QNLE.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-3USCFSFQ.js";import"../../../chunk-7GK5LKBV.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as blDropdownItemTag,b as default};
|
|
2
2
|
//# sourceMappingURL=bl-dropdown-item.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as a}from"../../chunk-
|
|
1
|
+
import{c as a}from"../../chunk-BH64QNLE.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-icon.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunk-
|
|
1
|
+
import"../../chunk-IZ2LK5GK.js";var o=["academy","account","add_note","add_part","add_photo","add_product","alert","announcement","archive","arrow_down","arrow_left","arrow_right","arrow_up","attach","award","back","back_fill","badge","barcode","bill","book","browser","burger","calendar","camera","camera_off","campaign","change","change_fill","chart","chatbot","check","check_fill","clock","close","close_fill","code","coin","compass","complain","confetti","copy","copy_checked","coupon","credit_card","delete","desktop","desktop_filled","dialog","disable","dislike","document","document_search","donation","door_open","download","drag_and_drop","edit","excel","exit","expand","export","express","express_delivery","express_furniture","external_link","external_share","eye_off","eye_on","facebook","filter","finance_accounting","fire","flag","flash","flash_fill","forward","full_size","gift","global_export","globe","go_forward","graphic","graphic_decrease","group_of_people","growth","hamburger_menu","handshake","happy","heart","heart_fill","heartbeat","help","history","home","hourglass","image","incognito","info","instagram","label","left_sided_arrow","light_bulb","like","link","listing","live_monitor","live_support","loading","lock","magic_wand","mail","mail_opened","map","market","market_order_back","market_order_cancel","market_order_change","market_order_check","market_processing","meal_bag","medal","message","metric_decrease","metric_increase","metric_minus","microphone","microphone_off","minus","minus_fill","mobile","mobile_fill","mobile_settings","money","money_transfer","motorcycle","motorcycle_check","new_store","normal","notice","notification","offers","order","order_back","order_box","order_boxes","order_cancel","order_check","order_return","order_settings","order_time","order_tracking","paper","partial_approve","pause","pause_fill","people","phone","phone_settings","photo","photo_off","pie_chart","pie_chart_report","pin","play","play_fill","plus","plus_fill","preview","price_settings","print","product","profile","profile_check","profile_star","puzzle","qr","report","review","right_sided_arrow","rocket","rotate","sad","save","search","send","send_mail","services","settings","share","shopping_bag","shopping_bag_add","shopping_bag_back","shopping_bag_cancel","shopping_bag_discount","shopping_bag_return","sorting","sorting_asc","sorting_desc","sound_off","sound_on","split_money","star","star_double","star_fill","star_triple","stop","stop_fill","store","store_performance","suitcase","support","target","ticket","translation","truck","turn_back","turn_back_fill","two_sided_arrow","unlock","upload","user_management","vacation_mode","very_happy","very_sad","wallet","warehouse","warning","youtube","zoom_in","zoom_out"],s=o;var e=s;export{e as default};
|
|
2
2
|
//# sourceMappingURL=icon-list.js.map
|
|
@@ -47,6 +47,10 @@ export default class BlInput extends BlInput_base {
|
|
|
47
47
|
* Makes input a mandatory field
|
|
48
48
|
*/
|
|
49
49
|
required: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Shows a red asterisk (*) next to the label to indicate the field is required.
|
|
52
|
+
*/
|
|
53
|
+
requiredIndicator: boolean;
|
|
50
54
|
/**
|
|
51
55
|
* Sets minimum length of the input
|
|
52
56
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bl-input.d.ts","sourceRoot":"","sources":["../../../src/components/input/bl-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,cAA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AAO,CAAC,oBAAoB;YAId,iBAAiB;IAS/B,UAAU;IAMV,gBAAgB,IAAI,MAAM,GAAG,IAAI;IAKjC;;;OAGG;IACH,iBAAiB,CAAC,OAAO,EAAE,MAAM;IAIjC;;;OAGG;IACG,gBAAgB;IAUtB;;;OAGG;IACG,gBAAgB;IAOtB,cAAc;IAMd,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,aAAa;IASrB,YAAY;cAKI,OAAO,CAAC,iBAAiB,EAAE,cAAc;IAczD,OAAO,CAAC,OAAO,CAA2C;IAE1D,OAAO,KAAK,YAAY,GAEvB;IAED,MAAM,IAAI,cAAc;CAoGzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-2XEDFGYF.js";import"../../chunk-23PSWIUF.js";import"../../chunk-ZQ4MQ3U6.js";import"../../chunk-ZE7GYACV.js";import"../../chunk-EG7U7PM3.js";import"../../chunk-AYJMIZZ3.js";import"../../chunk-XDUIVR6I.js";import"../../chunk-HZ6A5QFC.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-DINNT5P2.js";import"../../chunk-BH64QNLE.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-276RDWEQ.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-input.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-UQMXWLP6.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-DINNT5P2.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-link.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as i}from"../../chunk-
|
|
1
|
+
import{a as i}from"../../chunk-J24DBEJQ.js";import{a as t}from"../../chunk-DINNT5P2.js";import{b as r}from"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";var o="https://www.figma.com/design/RrcLH0mWpIUy4vwuTlDeKN/Baklava-Design-Guide?node-id=23617-1414",l="https://github.com/Trendyol/baklava/blob/main/src/components/link/docs/ADR/link-component-implementation.md",a={title:"Components/Link",component:"bl-link",parameters:{chromatic:{viewports:[1e3]},controls:{exclude:["content"]},docs:{description:{component:`<div class="bl-docs-container"><p class="bl-docs-description">The Link component is used for navigation between pages or to external URLs. It supports all native anchor tag attributes and provides additional styling variants. When not using the standalone variant, you can provide a custom icon using the icon slot.</p><div class="bl-docs-links" style="display: flex; gap: var(--bl-size-2xs); margin-top: var(--bl-size-m);"><bl-badge icon="document" style="--bl-badge-background: var(--bl-color-surface-hover)"><bl-link variant='inline' href='`+l+`' target='_blank'>ADR</bl-link></bl-badge><bl-badge icon="puzzle" style="--bl-badge-background: var(--bl-color-surface-hover)"><bl-link variant='inline' href='`+o+"' target='_blank'>Figma</bl-link></bl-badge></div></div>"}}},decorators:[i],argTypes:{href:{control:"text",description:"URL that the hyperlink points to",table:{type:{summary:"string"}}},variant:{control:{type:"select"},options:["inline","standalone"],description:"Link variant",table:{type:{summary:"LinkVariant"},defaultValue:{summary:"inline"}}},size:{control:{type:"select"},options:["small","medium","large"],description:"Link size (only applies to standalone variant)",table:{type:{summary:"LinkSize"},defaultValue:{summary:"medium"}}},kind:{control:{type:"select"},options:["primary","neutral"],description:"Link kind (only applies to standalone variant)",table:{type:{summary:"LinkKind"},defaultValue:{summary:"primary"}}},target:{control:{type:"select"},options:["_self","_blank","_parent","_top"],description:"Where to display the linked URL",table:{type:{summary:"HTMLAnchorElement['target']"},defaultValue:{summary:"_self"}}},rel:{control:"text",description:"Relationship between documents (e.g., noopener noreferrer)",table:{type:{summary:"HTMLAnchorElement['rel']"}}},hreflang:{control:"text",description:"Language of the linked document",table:{type:{summary:"HTMLAnchorElement['hreflang']"}}},type:{control:"text",description:"MIME type of the linked document",table:{type:{summary:"HTMLAnchorElement['type']"}}},referrerPolicy:{control:{type:"select"},options:["no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"],description:"Referrer policy for the link",table:{type:{summary:"HTMLAnchorElement['referrerPolicy']"}}},download:{control:"text",description:"Whether to download the resource instead of navigating to it",table:{type:{summary:"HTMLAnchorElement['download']"}}},ping:{control:"text",description:"URLs to be notified when following the link",table:{type:{summary:"HTMLAnchorElement['ping']"}}},"aria-label":{control:"text",description:"Aria label for accessibility",table:{type:{summary:"string"}}},icon:{control:"text",description:"Icon name for custom icon (only applies to non-standalone variants)",table:{type:{summary:"string"}}}}},d=a,n=e=>r`
|
|
2
2
|
<bl-link
|
|
3
3
|
href=${t(e.href)}
|
|
4
4
|
variant=${t(e.variant)}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-SBCJY5IU.js";import"../../chunk-AYJMIZZ3.js";import"../../chunk-DINNT5P2.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{a as SWIPE_UP_THRESHOLD,b as default};
|
|
2
2
|
//# sourceMappingURL=bl-notification.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bl-notification.stories.d.ts","sourceRoot":"","sources":["../../../src/components/notification/bl-notification.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAI3D,OAAO,KAAK,EAAgB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,QAAA,MAAM,IAAI,EAAE,IAqEX,CAAC;AAEF,eAAe,IAAI,CAAC;AAYpB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,iBAAiB,CAAC;AAEtB,MAAM,MAAM,KAAK,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"bl-notification.stories.d.ts","sourceRoot":"","sources":["../../../src/components/notification/bl-notification.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAI3D,OAAO,KAAK,EAAgB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,QAAA,MAAM,IAAI,EAAE,IAqEX,CAAC;AAEF,eAAe,IAAI,CAAC;AAYpB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,iBAAiB,CAAC;AAEtB,MAAM,MAAM,KAAK,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AA8B/C,eAAO,MAAM,UAAU,EAAE,KAexB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KA0B3B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAwChC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAyBlC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KA+BpC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAkDlC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAU9B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA8F7B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAqIxB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as p}from"../../chunk-
|
|
1
|
+
import{b as p}from"../../chunk-J24DBEJQ.js";import{a as s}from"../../chunk-DINNT5P2.js";import{b as t}from"../../chunk-4OT5AMS5.js";import{e}from"../../chunk-IZ2LK5GK.js";var N={title:"Components/Notification",component:"bl-notification",parameters:{chromatic:{viewports:[1e3]}},decorators:[p],argTypes:{duration:{control:"number",description:"Duration in seconds",defaultValue:7},caption:{control:"text",description:"Caption of the notification"},description:{control:"text",description:"Description of the notification. Required."},icon:{control:"text",defaultValue:"true",description:"Icon of the notification. If provided with a string, it will be used as an icon name. If provided with a boolean, it will use the default icon or no icon."},variant:{options:["info","warning","success","error"],default:"info",control:{type:"select"},description:"Variant of the notification"},permanent:{control:"boolean",defaultValue:!1,description:"If true, the notification will not have duration and will be removed when the user clicks on the close button."},primaryAction:{control:"object",description:"Primary action of the notification. onClick and label properties are required."},secondaryAction:{control:"object",description:"Secondary action of the notification. onClick and label properties are required."}},args:{noAnimation:!1,duration:20,caption:"Notification Caption",description:"Notification Description",icon:"true",variant:"info",permanent:!1,primaryAction:{label:"Primary Action",onClick(){}},secondaryAction:{label:"Secondary Action",onClick(){}}}},k=N,c=i=>{let o=document.querySelector("bl-notification");return o==null?void 0:o.addNotification(i)},A=i=>JSON.stringify(i,null,6),r=i=>t`
|
|
2
2
|
<bl-notification
|
|
3
3
|
?no-animation=${i.noAnimation}
|
|
4
4
|
duration=${s(i.duration)}
|
|
@@ -8,6 +8,8 @@ import{b as p}from"../../chunk-M4E4CVZ4.js";import{a as s}from"../../chunk-DINNT
|
|
|
8
8
|
|
|
9
9
|
<script>
|
|
10
10
|
(function () {
|
|
11
|
+
window?.__applyStorybookTheme?.();
|
|
12
|
+
|
|
11
13
|
const notificationElement = document.querySelector("bl-notification");
|
|
12
14
|
const addButton = document.querySelector("bl-button#`,`");
|
|
13
15
|
|
|
@@ -16,12 +18,14 @@ import{b as p}from"../../chunk-M4E4CVZ4.js";import{a as s}from"../../chunk-DINNT
|
|
|
16
18
|
});
|
|
17
19
|
})();
|
|
18
20
|
<\/script>
|
|
19
|
-
`])),a,o,a,
|
|
21
|
+
`])),a,o,a,A(i))},w={render(i){return t`${r(i)} ${n(i)} `},args:{duration:60,primaryAction:void 0,secondaryAction:void 0},play:({args:i})=>{c(i),c({...i,variant:"success"}),c({...i,variant:"warning"}),c({...i,variant:"error"})}},f,E={render(i){return t(f||(f=e([`
|
|
20
22
|
`,`
|
|
21
23
|
<bl-button>Remove Notification</bl-button>
|
|
22
24
|
|
|
23
25
|
<script>
|
|
24
26
|
(function () {
|
|
27
|
+
window?.__applyStorybookTheme?.();
|
|
28
|
+
|
|
25
29
|
const notificationElement = document.querySelector("bl-notification");
|
|
26
30
|
const removeButton = document.querySelector("bl-button");
|
|
27
31
|
|
|
@@ -36,12 +40,14 @@ import{b as p}from"../../chunk-M4E4CVZ4.js";import{a as s}from"../../chunk-DINNT
|
|
|
36
40
|
});
|
|
37
41
|
})();
|
|
38
42
|
<\/script>
|
|
39
|
-
`])),r(i))}},m,
|
|
43
|
+
`])),r(i))}},m,g={render(i){return t(m||(m=e([`
|
|
40
44
|
`,`
|
|
41
45
|
<bl-button>Remove Notifications</bl-button>
|
|
42
46
|
|
|
43
47
|
<script>
|
|
44
48
|
(function () {
|
|
49
|
+
window?.__applyStorybookTheme?.();
|
|
50
|
+
|
|
45
51
|
const notificationElement = document.querySelector("bl-notification");
|
|
46
52
|
const removeButton = document.querySelector("bl-button");
|
|
47
53
|
|
|
@@ -70,10 +76,12 @@ import{b as p}from"../../chunk-M4E4CVZ4.js";import{a as s}from"../../chunk-DINNT
|
|
|
70
76
|
});
|
|
71
77
|
})();
|
|
72
78
|
<\/script>
|
|
73
|
-
`])),r(i))}},u
|
|
79
|
+
`])),r(i))}},u,h={render(i){return t(u||(u=e([`
|
|
74
80
|
`,`
|
|
75
81
|
<script>
|
|
76
82
|
(function () {
|
|
83
|
+
window?.__applyStorybookTheme?.();
|
|
84
|
+
|
|
77
85
|
const notificationElement = document.querySelector("bl-notification");
|
|
78
86
|
|
|
79
87
|
notificationElement.addNotification({
|
|
@@ -89,10 +97,12 @@ import{b as p}from"../../chunk-M4E4CVZ4.js";import{a as s}from"../../chunk-DINNT
|
|
|
89
97
|
});
|
|
90
98
|
})();
|
|
91
99
|
<\/script>
|
|
92
|
-
`])),r(i))}},y
|
|
100
|
+
`])),r(i))}},y,$={render(i){return t(y||(y=e([`
|
|
93
101
|
`,`
|
|
94
102
|
<script>
|
|
95
103
|
(function () {
|
|
104
|
+
window?.__applyStorybookTheme?.();
|
|
105
|
+
|
|
96
106
|
const notificationElement = document.querySelector("bl-notification");
|
|
97
107
|
|
|
98
108
|
notificationElement.addNotification({
|
|
@@ -114,10 +124,12 @@ import{b as p}from"../../chunk-M4E4CVZ4.js";import{a as s}from"../../chunk-DINNT
|
|
|
114
124
|
});
|
|
115
125
|
})();
|
|
116
126
|
<\/script>
|
|
117
|
-
`])),r(i))}},
|
|
127
|
+
`])),r(i))}},b,x={render(i){return t(b||(b=e([`
|
|
118
128
|
`,`
|
|
119
129
|
<script>
|
|
120
130
|
(function () {
|
|
131
|
+
window?.__applyStorybookTheme?.();
|
|
132
|
+
|
|
121
133
|
const notificationElement = document.querySelector("bl-notification");
|
|
122
134
|
|
|
123
135
|
const notification = notificationElement.addNotification({
|
|
@@ -145,7 +157,7 @@ import{b as p}from"../../chunk-M4E4CVZ4.js";import{a as s}from"../../chunk-DINNT
|
|
|
145
157
|
${n({caption:"Notification Caption",description:"Notification Variant: success",permanent:!0,variant:"success",primaryAction:{label:"Primary Action",onClick(){}},secondaryAction:{label:"Secondary Action",onClick(){}}},"Success")}
|
|
146
158
|
${n({caption:"Notification Caption",description:"Notification Variant: warning",permanent:!0,variant:"warning",primaryAction:{label:"Primary Action",onClick(){}},secondaryAction:{label:"Secondary Action",onClick(){}}},"Warning")}
|
|
147
159
|
${n({caption:"Notification Caption",description:"Notification Variant: error",permanent:!0,variant:"error",primaryAction:{label:"Primary Action",onClick(){}},secondaryAction:{label:"Secondary Action",onClick(){}}},"Error")}
|
|
148
|
-
`},play:()=>{let i=["info","success","warning","error"];for(let o of i)c({caption:"Notification Caption",description:`Notification Variant: ${o}`,permanent:!0,variant:o,primaryAction:{label:"Primary Action",onClick(){}},secondaryAction:{label:"Secondary Action",onClick(){}}})}},
|
|
160
|
+
`},play:()=>{let i=["info","success","warning","error"];for(let o of i)c({caption:"Notification Caption",description:`Notification Variant: ${o}`,permanent:!0,variant:o,primaryAction:{label:"Primary Action",onClick(){}},secondaryAction:{label:"Secondary Action",onClick(){}}})}},T={render(i){return t`
|
|
149
161
|
<div class="rtl-container" dir="rtl" lang="ar">
|
|
150
162
|
${r(i)}
|
|
151
163
|
${n({caption:"\u0631\u0633\u0627\u0644\u0629 \u062A\u0631\u062D\u064A\u0628",description:"\u0645\u0631\u062D\u0628\u0627\u064B \u0628\u0643 \u0641\u064A \u062A\u0637\u0628\u064A\u0642\u0646\u0627! \u0646\u062A\u0645\u0646\u0649 \u0644\u0643 \u062A\u062C\u0631\u0628\u0629 \u0645\u0645\u062A\u0639\u0629.",duration:7,variant:"info",icon:!0,primaryAction:{label:"\u0627\u0628\u062F\u0623 \u0627\u0644\u0622\u0646",onClick(){}}},"Info")}
|
|
@@ -161,5 +173,5 @@ import{b as p}from"../../chunk-M4E4CVZ4.js";import{a as s}from"../../chunk-DINNT
|
|
|
161
173
|
padding: 1rem;
|
|
162
174
|
}
|
|
163
175
|
</style>
|
|
164
|
-
`},play:()=>{[{caption:"\u0631\u0633\u0627\u0644\u0629 \u062A\u0631\u062D\u064A\u0628",description:"\u0645\u0631\u062D\u0628\u0627\u064B \u0628\u0643 \u0641\u064A \u062A\u0637\u0628\u064A\u0642\u0646\u0627! \u0646\u062A\u0645\u0646\u0649 \u0644\u0643 \u062A\u062C\u0631\u0628\u0629 \u0645\u0645\u062A\u0639\u0629.",duration:7,variant:"info",icon:!0,primaryAction:{label:"\u0627\u0628\u062F\u0623 \u0627\u0644\u0622\u0646",onClick(){}}},{caption:"\u062A\u0645 \u0625\u0643\u0645\u0627\u0644 \u0627\u0644\u0645\u0647\u0645\u0629",description:"\u062A\u0645 \u0625\u0643\u0645\u0627\u0644 \u0645\u0647\u0645\u062A\u0643 \u0628\u0646\u062C\u0627\u062D.",duration:10,variant:"success",icon:!0},{caption:"\u062A\u0646\u0628\u064A\u0647 \u0627\u0644\u062A\u062E\u0632\u064A\u0646",description:"\u0645\u0633\u0627\u062D\u0629 \u0627\u0644\u062A\u062E\u0632\u064A\u0646 \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0645\u0646\u062E\u0641\u0636\u0629.",duration:15,variant:"warning",icon:!0,primaryAction:{label:"\u062A\u0631\u0642\u064A\u0629",onClick(){}},secondaryAction:{label:"\u0627\u0639\u0631\u0641 \u0627\u0644\u0645\u0632\u064A\u062F",onClick(){}}},{caption:"\u062E\u0637\u0623 \u0641\u064A \u0627\u0644\u0627\u062A\u0635\u0627\u0644",description:"\u062A\u0639\u0630\u0631 \u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0628\u0627\u0644\u062E\u0627\u062F\u0645. \u064A\u0631\u062C\u0649 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649.",duration:20,variant:"error",icon:!0,primaryAction:{label:"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",onClick(){}}}].forEach((o,a)=>{setTimeout(()=>{let l=document.querySelector(".rtl-container bl-notification");l==null||l.addNotification(o)},a*300)})},args:{noAnimation:!0,duration:7}};export{x as ActionsRemoveExample,
|
|
176
|
+
`},play:()=>{[{caption:"\u0631\u0633\u0627\u0644\u0629 \u062A\u0631\u062D\u064A\u0628",description:"\u0645\u0631\u062D\u0628\u0627\u064B \u0628\u0643 \u0641\u064A \u062A\u0637\u0628\u064A\u0642\u0646\u0627! \u0646\u062A\u0645\u0646\u0649 \u0644\u0643 \u062A\u062C\u0631\u0628\u0629 \u0645\u0645\u062A\u0639\u0629.",duration:7,variant:"info",icon:!0,primaryAction:{label:"\u0627\u0628\u062F\u0623 \u0627\u0644\u0622\u0646",onClick(){}}},{caption:"\u062A\u0645 \u0625\u0643\u0645\u0627\u0644 \u0627\u0644\u0645\u0647\u0645\u0629",description:"\u062A\u0645 \u0625\u0643\u0645\u0627\u0644 \u0645\u0647\u0645\u062A\u0643 \u0628\u0646\u062C\u0627\u062D.",duration:10,variant:"success",icon:!0},{caption:"\u062A\u0646\u0628\u064A\u0647 \u0627\u0644\u062A\u062E\u0632\u064A\u0646",description:"\u0645\u0633\u0627\u062D\u0629 \u0627\u0644\u062A\u062E\u0632\u064A\u0646 \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0645\u0646\u062E\u0641\u0636\u0629.",duration:15,variant:"warning",icon:!0,primaryAction:{label:"\u062A\u0631\u0642\u064A\u0629",onClick(){}},secondaryAction:{label:"\u0627\u0639\u0631\u0641 \u0627\u0644\u0645\u0632\u064A\u062F",onClick(){}}},{caption:"\u062E\u0637\u0623 \u0641\u064A \u0627\u0644\u0627\u062A\u0635\u0627\u0644",description:"\u062A\u0639\u0630\u0631 \u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0628\u0627\u0644\u062E\u0627\u062F\u0645. \u064A\u0631\u062C\u0649 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649.",duration:20,variant:"error",icon:!0,primaryAction:{label:"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",onClick(){}}}].forEach((o,a)=>{setTimeout(()=>{let l=document.querySelector(".rtl-container bl-notification");l==null||l.addNotification(o)},a*300)})},args:{noAnimation:!0,duration:7}};export{x as ActionsRemoveExample,w as AddExample,P as PermanentExample,h as PrimaryActionExample,T as RTLExample,g as RemoveAwaitExample,E as RemoveExample,$ as SecondaryActionExample,q as VariantsExample,k as default};
|
|
165
177
|
//# sourceMappingURL=bl-notification.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/notification/bl-notification.stories.ts"],
|
|
4
|
-
"sourcesContent": ["import { Meta, StoryObj } from \"@storybook/web-components\";\nimport { html } from \"lit\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { fullscreenLayout } from \"../../utilities/chromatic-decorators\";\nimport type { Notification, NotificationProps } from \"./bl-notification\";\n\nconst meta: Meta = {\n title: \"Components/Notification\",\n component: \"bl-notification\",\n parameters: {\n chromatic: {\n viewports: [1000],\n },\n },\n decorators: [fullscreenLayout],\n argTypes: {\n // Notification Card Props\n duration: {\n control: \"number\",\n description: \"Duration in seconds\",\n defaultValue: 7,\n },\n caption: {\n control: \"text\",\n description: \"Caption of the notification\",\n },\n description: {\n control: \"text\",\n description: \"Description of the notification. Required.\",\n },\n icon: {\n control: \"text\",\n defaultValue: \"true\",\n description:\n \"Icon of the notification. If provided with a string, it will be used as an icon name. If provided with a boolean, it will use the default icon or no icon.\",\n },\n variant: {\n options: [\"info\", \"warning\", \"success\", \"error\"],\n default: \"info\",\n control: { type: \"select\" },\n description: \"Variant of the notification\",\n },\n permanent: {\n control: \"boolean\",\n defaultValue: false,\n description:\n \"If true, the notification will not have duration and will be removed when the user clicks on the close button.\",\n },\n primaryAction: {\n control: \"object\",\n description: \"Primary action of the notification. onClick and label properties are required.\",\n },\n secondaryAction: {\n control: \"object\",\n description:\n \"Secondary action of the notification. onClick and label properties are required.\",\n },\n },\n args: {\n noAnimation: false,\n duration: 20,\n caption: \"Notification Caption\",\n description: \"Notification Description\",\n icon: \"true\",\n variant: \"info\",\n permanent: false,\n primaryAction: {\n label: \"Primary Action\",\n onClick() {},\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick() {},\n },\n },\n};\n\nexport default meta;\n\nconst addNotification = (options: NotificationProps) => {\n const el = document.querySelector(\"bl-notification\");\n\n return el?.addNotification(options);\n};\n\nconst stringifyArgs = (args: NotificationArgs | NotificationProps) => {\n return JSON.stringify(args, null, 6);\n};\n\nexport type NotificationArgs = {\n noAnimation: boolean;\n duration: number;\n} & NotificationProps;\n\nexport type Story = StoryObj<NotificationArgs>;\n\nconst BasicTemplate = (args: NotificationArgs) => html`\n <bl-notification\n ?no-animation=${args.noAnimation}\n duration=${ifDefined(args.duration)}\n ></bl-notification>\n`;\n\nconst NotificationCreator = (args: NotificationProps, buttonLabel = \"Add Notification\") => {\n const slug = buttonLabel.toLowerCase().replace(/\\s/g, \"-\");\n\n return html`\n <bl-button id=${slug}>${buttonLabel}</bl-button>\n\n <script>\n (function () {\n const notificationElement = document.querySelector(\"bl-notification\");\n const addButton = document.querySelector(\"bl-button#${slug}\");\n\n addButton.addEventListener(\"bl-click\", () => {\n notificationElement.addNotification(${stringifyArgs(args)});\n });\n })();\n </script>\n `;\n};\n\nexport const AddExample: Story = {\n render(args: NotificationArgs) {\n return html`${BasicTemplate(args)} ${NotificationCreator(args)} `;\n },\n args: {\n duration: 60,\n primaryAction: undefined,\n secondaryAction: undefined,\n },\n play: ({ args }) => {\n addNotification(args);\n addNotification({ ...args, variant: \"success\" });\n addNotification({ ...args, variant: \"warning\" });\n addNotification({ ...args, variant: \"error\" });\n },\n};\n\nexport const RemoveExample: Story = {\n render(args: NotificationArgs) {\n return html`\n ${BasicTemplate(args)}\n <bl-button>Remove Notification</bl-button>\n\n <script>\n (function () {\n const notificationElement = document.querySelector(\"bl-notification\");\n const removeButton = document.querySelector(\"bl-button\");\n\n const notification = notificationElement.addNotification({\n caption: \"Notification Caption\",\n description: \"Notification Description\",\n permanent: true,\n });\n\n removeButton.addEventListener(\"bl-click\", () => {\n notification.remove(); // notificationElement.removeNotification(notification.id);\n });\n })();\n </script>\n `;\n },\n};\n\nexport const RemoveAwaitExample: Story = {\n render(args: NotificationArgs) {\n return html`\n ${BasicTemplate(args)}\n <bl-button>Remove Notifications</bl-button>\n\n <script>\n (function () {\n const notificationElement = document.querySelector(\"bl-notification\");\n const removeButton = document.querySelector(\"bl-button\");\n\n const firstNotification = notificationElement.addNotification({\n caption: \"Notification Caption\",\n description: \"Notification Description\",\n permanent: true,\n });\n\n const secondNotification = notificationElement.addNotification({\n caption: \"Notification Caption Second\",\n description: \"Notification Description Second\",\n permanent: true,\n });\n\n const thirdNotification = notificationElement.addNotification({\n caption: \"Notification Caption Third\",\n description: \"Notification Description Third\",\n permanent: true,\n });\n\n removeButton.addEventListener(\"bl-click\", async () => {\n await secondNotification.remove();\n await thirdNotification.remove();\n await firstNotification.remove();\n });\n })();\n </script>\n `;\n },\n};\n\nexport const PrimaryActionExample: Story = {\n render(args: NotificationArgs) {\n return html`\n ${BasicTemplate(args)}\n <script>\n (function () {\n const notificationElement = document.querySelector(\"bl-notification\");\n\n notificationElement.addNotification({\n caption: \"Notification Caption\",\n description: \"Notification Description\",\n permanent: true,\n primaryAction: {\n label: \"Primary Action\",\n onClick: () => {\n window.alert(\"Primary Action Clicked\");\n },\n },\n });\n })();\n </script>\n `;\n },\n};\n\nexport const SecondaryActionExample: Story = {\n render(args: NotificationArgs) {\n return html`\n ${BasicTemplate(args)}\n <script>\n (function () {\n const notificationElement = document.querySelector(\"bl-notification\");\n\n notificationElement.addNotification({\n caption: \"Notification Caption\",\n description: \"Notification Description\",\n permanent: true,\n primaryAction: {\n label: \"Primary Action\",\n onClick: () => {\n window.alert(\"Primary Action Clicked\");\n },\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick: () => {\n window.alert(\"Secondary Action Clicked\");\n },\n },\n });\n })();\n </script>\n `;\n },\n};\n\nexport const ActionsRemoveExample: Story = {\n render(args: NotificationArgs) {\n return html`\n ${BasicTemplate(args)}\n <script>\n (function () {\n const notificationElement = document.querySelector(\"bl-notification\");\n\n const notification = notificationElement.addNotification({\n caption: \"Notification Caption\",\n description: \"Notification Description\",\n permanent: true,\n primaryAction: {\n label: \"Primary Action\",\n onClick: notification => {\n notification.remove();\n },\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick: notification => {\n notification.remove();\n },\n },\n });\n })();\n </script>\n `;\n },\n play: () => {\n addNotification({\n caption: \"Notification Caption\",\n description: \"Notification Description\",\n permanent: true,\n primaryAction: {\n label: \"Primary Action\",\n onClick: (notification: Notification) => {\n notification.remove();\n },\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick: (notification: Notification) => {\n notification.remove();\n },\n },\n });\n },\n};\n\nexport const PermanentExample: Story = {\n render(args: NotificationArgs) {\n return html` ${BasicTemplate(args)} ${NotificationCreator(args)} `;\n },\n args: {\n permanent: true,\n },\n play: ({ args }) => {\n addNotification(args);\n },\n};\n\nexport const VariantsExample: Story = {\n render(args: NotificationArgs) {\n return html`\n ${BasicTemplate(args)}\n ${NotificationCreator(\n {\n caption: \"Notification Caption\",\n description: \"Notification Variant: info\",\n permanent: true,\n variant: \"info\",\n primaryAction: {\n label: \"Primary Action\",\n onClick() {},\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick() {},\n },\n },\n \"Info\"\n )}\n ${NotificationCreator(\n {\n caption: \"Notification Caption\",\n description: \"Notification Variant: success\",\n permanent: true,\n variant: \"success\",\n primaryAction: {\n label: \"Primary Action\",\n onClick() {},\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick() {},\n },\n },\n \"Success\"\n )}\n ${NotificationCreator(\n {\n caption: \"Notification Caption\",\n description: \"Notification Variant: warning\",\n permanent: true,\n variant: \"warning\",\n primaryAction: {\n label: \"Primary Action\",\n onClick() {},\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick() {},\n },\n },\n \"Warning\"\n )}\n ${NotificationCreator(\n {\n caption: \"Notification Caption\",\n description: \"Notification Variant: error\",\n permanent: true,\n variant: \"error\",\n primaryAction: {\n label: \"Primary Action\",\n onClick() {},\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick() {},\n },\n },\n \"Error\"\n )}\n `;\n },\n play: () => {\n const variants = [\"info\", \"success\", \"warning\", \"error\"] as const;\n\n for (const variant of variants) {\n addNotification({\n caption: \"Notification Caption\",\n description: `Notification Variant: ${variant}`,\n permanent: true,\n variant,\n primaryAction: {\n label: \"Primary Action\",\n onClick() {},\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick() {},\n },\n });\n }\n },\n};\n\nexport const RTLExample: Story = {\n render(args: NotificationArgs) {\n return html`\n <div class=\"rtl-container\" dir=\"rtl\" lang=\"ar\">\n ${BasicTemplate(args)}\n ${NotificationCreator(\n {\n caption: \"\u0631\u0633\u0627\u0644\u0629 \u062A\u0631\u062D\u064A\u0628\",\n description: \"\u0645\u0631\u062D\u0628\u0627\u064B \u0628\u0643 \u0641\u064A \u062A\u0637\u0628\u064A\u0642\u0646\u0627! \u0646\u062A\u0645\u0646\u0649 \u0644\u0643 \u062A\u062C\u0631\u0628\u0629 \u0645\u0645\u062A\u0639\u0629.\",\n duration: 7,\n variant: \"info\" as const,\n icon: true,\n primaryAction: {\n label: \"\u0627\u0628\u062F\u0623 \u0627\u0644\u0622\u0646\",\n onClick() {},\n },\n },\n \"Info\"\n )}\n ${NotificationCreator(\n {\n caption: \"\u062A\u0645 \u0625\u0643\u0645\u0627\u0644 \u0627\u0644\u0645\u0647\u0645\u0629\",\n description: \"\u062A\u0645 \u0625\u0643\u0645\u0627\u0644 \u0645\u0647\u0645\u062A\u0643 \u0628\u0646\u062C\u0627\u062D.\",\n duration: 10,\n variant: \"success\" as const,\n icon: true,\n },\n \"Success\"\n )}\n ${NotificationCreator(\n {\n caption: \"\u062A\u0646\u0628\u064A\u0647 \u0627\u0644\u062A\u062E\u0632\u064A\u0646\",\n description: \"\u0645\u0633\u0627\u062D\u0629 \u0627\u0644\u062A\u062E\u0632\u064A\u0646 \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0645\u0646\u062E\u0641\u0636\u0629.\",\n duration: 15,\n variant: \"warning\" as const,\n icon: true,\n primaryAction: {\n label: \"\u062A\u0631\u0642\u064A\u0629\",\n onClick() {},\n },\n secondaryAction: {\n label: \"\u0627\u0639\u0631\u0641 \u0627\u0644\u0645\u0632\u064A\u062F\",\n onClick() {},\n },\n },\n \"Warning\"\n )}\n ${NotificationCreator(\n {\n caption: \"\u062E\u0637\u0623 \u0641\u064A \u0627\u0644\u0627\u062A\u0635\u0627\u0644\",\n description: \"\u062A\u0639\u0630\u0631 \u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0628\u0627\u0644\u062E\u0627\u062F\u0645. \u064A\u0631\u062C\u0649 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649.\",\n duration: 20,\n variant: \"error\" as const,\n icon: true,\n primaryAction: {\n label: \"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629\",\n onClick() {},\n },\n },\n \"Error\"\n )}\n </div>\n\n <style>\n .rtl-container {\n width: 100%;\n min-height: 100%;\n padding: 1rem;\n }\n </style>\n `;\n },\n play: () => {\n const rtlNotifications: NotificationProps[] = [\n {\n caption: \"\u0631\u0633\u0627\u0644\u0629 \u062A\u0631\u062D\u064A\u0628\",\n description: \"\u0645\u0631\u062D\u0628\u0627\u064B \u0628\u0643 \u0641\u064A \u062A\u0637\u0628\u064A\u0642\u0646\u0627! \u0646\u062A\u0645\u0646\u0649 \u0644\u0643 \u062A\u062C\u0631\u0628\u0629 \u0645\u0645\u062A\u0639\u0629.\",\n duration: 7,\n variant: \"info\",\n icon: true,\n primaryAction: {\n label: \"\u0627\u0628\u062F\u0623 \u0627\u0644\u0622\u0646\",\n onClick() {},\n },\n },\n {\n caption: \"\u062A\u0645 \u0625\u0643\u0645\u0627\u0644 \u0627\u0644\u0645\u0647\u0645\u0629\",\n description: \"\u062A\u0645 \u0625\u0643\u0645\u0627\u0644 \u0645\u0647\u0645\u062A\u0643 \u0628\u0646\u062C\u0627\u062D.\",\n duration: 10,\n variant: \"success\",\n icon: true,\n },\n {\n caption: \"\u062A\u0646\u0628\u064A\u0647 \u0627\u0644\u062A\u062E\u0632\u064A\u0646\",\n description: \"\u0645\u0633\u0627\u062D\u0629 \u0627\u0644\u062A\u062E\u0632\u064A\u0646 \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0645\u0646\u062E\u0641\u0636\u0629.\",\n duration: 15,\n variant: \"warning\",\n icon: true,\n primaryAction: {\n label: \"\u062A\u0631\u0642\u064A\u0629\",\n onClick() {},\n },\n secondaryAction: {\n label: \"\u0627\u0639\u0631\u0641 \u0627\u0644\u0645\u0632\u064A\u062F\",\n onClick() {},\n },\n },\n {\n caption: \"\u062E\u0637\u0623 \u0641\u064A \u0627\u0644\u0627\u062A\u0635\u0627\u0644\",\n description: \"\u062A\u0639\u0630\u0631 \u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0628\u0627\u0644\u062E\u0627\u062F\u0645. \u064A\u0631\u062C\u0649 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649.\",\n duration: 20,\n variant: \"error\",\n icon: true,\n primaryAction: {\n label: \"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629\",\n onClick() {},\n },\n },\n ];\n\n // Add RTL notifications\n rtlNotifications.forEach((notification, index) => {\n setTimeout(() => {\n const rtlContainer = document.querySelector<HTMLElement & { addNotification: typeof addNotification }>(\".rtl-container bl-notification\");\n\n rtlContainer?.addNotification(notification);\n }, index * 300);\n });\n },\n args: {\n noAnimation: true,\n duration: 7,\n },\n};\n"],
|
|
5
|
-
"mappings": "2KAMA,IAAMA,EAAa,CACjB,MAAO,0BACP,UAAW,kBACX,WAAY,CACV,UAAW,CACT,UAAW,CAAC,GAAI,CAClB,CACF,EACA,WAAY,CAACC,CAAgB,EAC7B,SAAU,CAER,SAAU,CACR,QAAS,SACT,YAAa,sBACb,aAAc,CAChB,EACA,QAAS,CACP,QAAS,OACT,YAAa,6BACf,EACA,YAAa,CACX,QAAS,OACT,YAAa,4CACf,EACA,KAAM,CACJ,QAAS,OACT,aAAc,OACd,YACE,4JACJ,EACA,QAAS,CACP,QAAS,CAAC,OAAQ,UAAW,UAAW,OAAO,EAC/C,QAAS,OACT,QAAS,CAAE,KAAM,QAAS,EAC1B,YAAa,6BACf,EACA,UAAW,CACT,QAAS,UACT,aAAc,GACd,YACE,gHACJ,EACA,cAAe,CACb,QAAS,SACT,YAAa,gFACf,EACA,gBAAiB,CACf,QAAS,SACT,YACE,kFACJ,CACF,EACA,KAAM,CACJ,YAAa,GACb,SAAU,GACV,QAAS,uBACT,YAAa,2BACb,KAAM,OACN,QAAS,OACT,UAAW,GACX,cAAe,CACb,MAAO,iBACP,SAAU,CAAC,CACb,EACA,gBAAiB,CACf,MAAO,mBACP,SAAU,CAAC,CACb,CACF,CACF,EAEOC,EAAQF,EAETG,EAAmBC,GAA+B,CACtD,IAAMC,EAAK,SAAS,cAAc,iBAAiB,EAEnD,OAAOA,GAAA,YAAAA,EAAI,gBAAgBD,EAC7B,EAEME,EAAiBC,GACd,KAAK,UAAUA,EAAM,KAAM,CAAC,EAU/BC,EAAiBD,GAA2BE;AAAA;AAAA,oBAE9BF,EAAK;AAAA,eACVG,EAAUH,EAAK,QAAQ;AAAA;AAAA,EAnGtCI,EAuGMC,EAAsB,CAACL,EAAyBM,EAAc,qBAAuB,CACzF,IAAMC,EAAOD,EAAY,YAAY,EAAE,QAAQ,MAAO,GAAG,EAEzD,OAAOJ,EAAAE,MAAII,EAAA;AAAA,oBACW,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import { Meta, StoryObj } from \"@storybook/web-components\";\nimport { html } from \"lit\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { fullscreenLayout } from \"../../utilities/chromatic-decorators\";\nimport type { Notification, NotificationProps } from \"./bl-notification\";\n\nconst meta: Meta = {\n title: \"Components/Notification\",\n component: \"bl-notification\",\n parameters: {\n chromatic: {\n viewports: [1000],\n },\n },\n decorators: [fullscreenLayout],\n argTypes: {\n // Notification Card Props\n duration: {\n control: \"number\",\n description: \"Duration in seconds\",\n defaultValue: 7,\n },\n caption: {\n control: \"text\",\n description: \"Caption of the notification\",\n },\n description: {\n control: \"text\",\n description: \"Description of the notification. Required.\",\n },\n icon: {\n control: \"text\",\n defaultValue: \"true\",\n description:\n \"Icon of the notification. If provided with a string, it will be used as an icon name. If provided with a boolean, it will use the default icon or no icon.\",\n },\n variant: {\n options: [\"info\", \"warning\", \"success\", \"error\"],\n default: \"info\",\n control: { type: \"select\" },\n description: \"Variant of the notification\",\n },\n permanent: {\n control: \"boolean\",\n defaultValue: false,\n description:\n \"If true, the notification will not have duration and will be removed when the user clicks on the close button.\",\n },\n primaryAction: {\n control: \"object\",\n description: \"Primary action of the notification. onClick and label properties are required.\",\n },\n secondaryAction: {\n control: \"object\",\n description:\n \"Secondary action of the notification. onClick and label properties are required.\",\n },\n },\n args: {\n noAnimation: false,\n duration: 20,\n caption: \"Notification Caption\",\n description: \"Notification Description\",\n icon: \"true\",\n variant: \"info\",\n permanent: false,\n primaryAction: {\n label: \"Primary Action\",\n onClick() {},\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick() {},\n },\n },\n};\n\nexport default meta;\n\nconst addNotification = (options: NotificationProps) => {\n const el = document.querySelector(\"bl-notification\");\n\n return el?.addNotification(options);\n};\n\nconst stringifyArgs = (args: NotificationArgs | NotificationProps) => {\n return JSON.stringify(args, null, 6);\n};\n\nexport type NotificationArgs = {\n noAnimation: boolean;\n duration: number;\n} & NotificationProps;\n\nexport type Story = StoryObj<NotificationArgs>;\n\nconst BasicTemplate = (args: NotificationArgs) => html`\n <bl-notification\n ?no-animation=${args.noAnimation}\n duration=${ifDefined(args.duration)}\n ></bl-notification>\n`;\n\nconst NotificationCreator = (args: NotificationProps, buttonLabel = \"Add Notification\") => {\n const slug = buttonLabel.toLowerCase().replace(/\\s/g, \"-\");\n\n return html`\n <bl-button id=${slug}>${buttonLabel}</bl-button>\n\n <script>\n (function () {\n window?.__applyStorybookTheme?.();\n\n const notificationElement = document.querySelector(\"bl-notification\");\n const addButton = document.querySelector(\"bl-button#${slug}\");\n\n addButton.addEventListener(\"bl-click\", () => {\n notificationElement.addNotification(${stringifyArgs(args)});\n });\n })();\n </script>\n `;\n};\n\nexport const AddExample: Story = {\n render(args: NotificationArgs) {\n return html`${BasicTemplate(args)} ${NotificationCreator(args)} `;\n },\n args: {\n duration: 60,\n primaryAction: undefined,\n secondaryAction: undefined,\n },\n play: ({ args }) => {\n addNotification(args);\n addNotification({ ...args, variant: \"success\" });\n addNotification({ ...args, variant: \"warning\" });\n addNotification({ ...args, variant: \"error\" });\n },\n};\n\nexport const RemoveExample: Story = {\n render(args: NotificationArgs) {\n return html`\n ${BasicTemplate(args)}\n <bl-button>Remove Notification</bl-button>\n\n <script>\n (function () {\n window?.__applyStorybookTheme?.();\n\n const notificationElement = document.querySelector(\"bl-notification\");\n const removeButton = document.querySelector(\"bl-button\");\n\n const notification = notificationElement.addNotification({\n caption: \"Notification Caption\",\n description: \"Notification Description\",\n permanent: true,\n });\n\n removeButton.addEventListener(\"bl-click\", () => {\n notification.remove(); // notificationElement.removeNotification(notification.id);\n });\n })();\n </script>\n `;\n },\n};\n\nexport const RemoveAwaitExample: Story = {\n render(args: NotificationArgs) {\n return html`\n ${BasicTemplate(args)}\n <bl-button>Remove Notifications</bl-button>\n\n <script>\n (function () {\n window?.__applyStorybookTheme?.();\n\n const notificationElement = document.querySelector(\"bl-notification\");\n const removeButton = document.querySelector(\"bl-button\");\n\n const firstNotification = notificationElement.addNotification({\n caption: \"Notification Caption\",\n description: \"Notification Description\",\n permanent: true,\n });\n\n const secondNotification = notificationElement.addNotification({\n caption: \"Notification Caption Second\",\n description: \"Notification Description Second\",\n permanent: true,\n });\n\n const thirdNotification = notificationElement.addNotification({\n caption: \"Notification Caption Third\",\n description: \"Notification Description Third\",\n permanent: true,\n });\n\n removeButton.addEventListener(\"bl-click\", async () => {\n await secondNotification.remove();\n await thirdNotification.remove();\n await firstNotification.remove();\n });\n })();\n </script>\n `;\n },\n};\n\nexport const PrimaryActionExample: Story = {\n render(args: NotificationArgs) {\n return html`\n ${BasicTemplate(args)}\n <script>\n (function () {\n window?.__applyStorybookTheme?.();\n\n const notificationElement = document.querySelector(\"bl-notification\");\n\n notificationElement.addNotification({\n caption: \"Notification Caption\",\n description: \"Notification Description\",\n permanent: true,\n primaryAction: {\n label: \"Primary Action\",\n onClick: () => {\n window.alert(\"Primary Action Clicked\");\n },\n },\n });\n })();\n </script>\n `;\n },\n};\n\nexport const SecondaryActionExample: Story = {\n render(args: NotificationArgs) {\n return html`\n ${BasicTemplate(args)}\n <script>\n (function () {\n window?.__applyStorybookTheme?.();\n\n const notificationElement = document.querySelector(\"bl-notification\");\n\n notificationElement.addNotification({\n caption: \"Notification Caption\",\n description: \"Notification Description\",\n permanent: true,\n primaryAction: {\n label: \"Primary Action\",\n onClick: () => {\n window.alert(\"Primary Action Clicked\");\n },\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick: () => {\n window.alert(\"Secondary Action Clicked\");\n },\n },\n });\n })();\n </script>\n `;\n },\n};\n\nexport const ActionsRemoveExample: Story = {\n render(args: NotificationArgs) {\n return html`\n ${BasicTemplate(args)}\n <script>\n (function () {\n window?.__applyStorybookTheme?.();\n\n const notificationElement = document.querySelector(\"bl-notification\");\n\n const notification = notificationElement.addNotification({\n caption: \"Notification Caption\",\n description: \"Notification Description\",\n permanent: true,\n primaryAction: {\n label: \"Primary Action\",\n onClick: notification => {\n notification.remove();\n },\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick: notification => {\n notification.remove();\n },\n },\n });\n })();\n </script>\n `;\n },\n play: () => {\n addNotification({\n caption: \"Notification Caption\",\n description: \"Notification Description\",\n permanent: true,\n primaryAction: {\n label: \"Primary Action\",\n onClick: (notification: Notification) => {\n notification.remove();\n },\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick: (notification: Notification) => {\n notification.remove();\n },\n },\n });\n },\n};\n\nexport const PermanentExample: Story = {\n render(args: NotificationArgs) {\n return html` ${BasicTemplate(args)} ${NotificationCreator(args)} `;\n },\n args: {\n permanent: true,\n },\n play: ({ args }) => {\n addNotification(args);\n },\n};\n\nexport const VariantsExample: Story = {\n render(args: NotificationArgs) {\n return html`\n ${BasicTemplate(args)}\n ${NotificationCreator(\n {\n caption: \"Notification Caption\",\n description: \"Notification Variant: info\",\n permanent: true,\n variant: \"info\",\n primaryAction: {\n label: \"Primary Action\",\n onClick() {},\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick() {},\n },\n },\n \"Info\"\n )}\n ${NotificationCreator(\n {\n caption: \"Notification Caption\",\n description: \"Notification Variant: success\",\n permanent: true,\n variant: \"success\",\n primaryAction: {\n label: \"Primary Action\",\n onClick() {},\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick() {},\n },\n },\n \"Success\"\n )}\n ${NotificationCreator(\n {\n caption: \"Notification Caption\",\n description: \"Notification Variant: warning\",\n permanent: true,\n variant: \"warning\",\n primaryAction: {\n label: \"Primary Action\",\n onClick() {},\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick() {},\n },\n },\n \"Warning\"\n )}\n ${NotificationCreator(\n {\n caption: \"Notification Caption\",\n description: \"Notification Variant: error\",\n permanent: true,\n variant: \"error\",\n primaryAction: {\n label: \"Primary Action\",\n onClick() {},\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick() {},\n },\n },\n \"Error\"\n )}\n `;\n },\n play: () => {\n const variants = [\"info\", \"success\", \"warning\", \"error\"] as const;\n\n for (const variant of variants) {\n addNotification({\n caption: \"Notification Caption\",\n description: `Notification Variant: ${variant}`,\n permanent: true,\n variant,\n primaryAction: {\n label: \"Primary Action\",\n onClick() {},\n },\n secondaryAction: {\n label: \"Secondary Action\",\n onClick() {},\n },\n });\n }\n },\n};\n\nexport const RTLExample: Story = {\n render(args: NotificationArgs) {\n return html`\n <div class=\"rtl-container\" dir=\"rtl\" lang=\"ar\">\n ${BasicTemplate(args)}\n ${NotificationCreator(\n {\n caption: \"\u0631\u0633\u0627\u0644\u0629 \u062A\u0631\u062D\u064A\u0628\",\n description: \"\u0645\u0631\u062D\u0628\u0627\u064B \u0628\u0643 \u0641\u064A \u062A\u0637\u0628\u064A\u0642\u0646\u0627! \u0646\u062A\u0645\u0646\u0649 \u0644\u0643 \u062A\u062C\u0631\u0628\u0629 \u0645\u0645\u062A\u0639\u0629.\",\n duration: 7,\n variant: \"info\" as const,\n icon: true,\n primaryAction: {\n label: \"\u0627\u0628\u062F\u0623 \u0627\u0644\u0622\u0646\",\n onClick() {},\n },\n },\n \"Info\"\n )}\n ${NotificationCreator(\n {\n caption: \"\u062A\u0645 \u0625\u0643\u0645\u0627\u0644 \u0627\u0644\u0645\u0647\u0645\u0629\",\n description: \"\u062A\u0645 \u0625\u0643\u0645\u0627\u0644 \u0645\u0647\u0645\u062A\u0643 \u0628\u0646\u062C\u0627\u062D.\",\n duration: 10,\n variant: \"success\" as const,\n icon: true,\n },\n \"Success\"\n )}\n ${NotificationCreator(\n {\n caption: \"\u062A\u0646\u0628\u064A\u0647 \u0627\u0644\u062A\u062E\u0632\u064A\u0646\",\n description: \"\u0645\u0633\u0627\u062D\u0629 \u0627\u0644\u062A\u062E\u0632\u064A\u0646 \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0645\u0646\u062E\u0641\u0636\u0629.\",\n duration: 15,\n variant: \"warning\" as const,\n icon: true,\n primaryAction: {\n label: \"\u062A\u0631\u0642\u064A\u0629\",\n onClick() {},\n },\n secondaryAction: {\n label: \"\u0627\u0639\u0631\u0641 \u0627\u0644\u0645\u0632\u064A\u062F\",\n onClick() {},\n },\n },\n \"Warning\"\n )}\n ${NotificationCreator(\n {\n caption: \"\u062E\u0637\u0623 \u0641\u064A \u0627\u0644\u0627\u062A\u0635\u0627\u0644\",\n description: \"\u062A\u0639\u0630\u0631 \u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0628\u0627\u0644\u062E\u0627\u062F\u0645. \u064A\u0631\u062C\u0649 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649.\",\n duration: 20,\n variant: \"error\" as const,\n icon: true,\n primaryAction: {\n label: \"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629\",\n onClick() {},\n },\n },\n \"Error\"\n )}\n </div>\n\n <style>\n .rtl-container {\n width: 100%;\n min-height: 100%;\n padding: 1rem;\n }\n </style>\n `;\n },\n play: () => {\n const rtlNotifications: NotificationProps[] = [\n {\n caption: \"\u0631\u0633\u0627\u0644\u0629 \u062A\u0631\u062D\u064A\u0628\",\n description: \"\u0645\u0631\u062D\u0628\u0627\u064B \u0628\u0643 \u0641\u064A \u062A\u0637\u0628\u064A\u0642\u0646\u0627! \u0646\u062A\u0645\u0646\u0649 \u0644\u0643 \u062A\u062C\u0631\u0628\u0629 \u0645\u0645\u062A\u0639\u0629.\",\n duration: 7,\n variant: \"info\",\n icon: true,\n primaryAction: {\n label: \"\u0627\u0628\u062F\u0623 \u0627\u0644\u0622\u0646\",\n onClick() {},\n },\n },\n {\n caption: \"\u062A\u0645 \u0625\u0643\u0645\u0627\u0644 \u0627\u0644\u0645\u0647\u0645\u0629\",\n description: \"\u062A\u0645 \u0625\u0643\u0645\u0627\u0644 \u0645\u0647\u0645\u062A\u0643 \u0628\u0646\u062C\u0627\u062D.\",\n duration: 10,\n variant: \"success\",\n icon: true,\n },\n {\n caption: \"\u062A\u0646\u0628\u064A\u0647 \u0627\u0644\u062A\u062E\u0632\u064A\u0646\",\n description: \"\u0645\u0633\u0627\u062D\u0629 \u0627\u0644\u062A\u062E\u0632\u064A\u0646 \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0645\u0646\u062E\u0641\u0636\u0629.\",\n duration: 15,\n variant: \"warning\",\n icon: true,\n primaryAction: {\n label: \"\u062A\u0631\u0642\u064A\u0629\",\n onClick() {},\n },\n secondaryAction: {\n label: \"\u0627\u0639\u0631\u0641 \u0627\u0644\u0645\u0632\u064A\u062F\",\n onClick() {},\n },\n },\n {\n caption: \"\u062E\u0637\u0623 \u0641\u064A \u0627\u0644\u0627\u062A\u0635\u0627\u0644\",\n description: \"\u062A\u0639\u0630\u0631 \u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0628\u0627\u0644\u062E\u0627\u062F\u0645. \u064A\u0631\u062C\u0649 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649.\",\n duration: 20,\n variant: \"error\",\n icon: true,\n primaryAction: {\n label: \"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629\",\n onClick() {},\n },\n },\n ];\n\n // Add RTL notifications\n rtlNotifications.forEach((notification, index) => {\n setTimeout(() => {\n const rtlContainer = document.querySelector<HTMLElement & { addNotification: typeof addNotification }>(\".rtl-container bl-notification\");\n\n rtlContainer?.addNotification(notification);\n }, index * 300);\n });\n },\n args: {\n noAnimation: true,\n duration: 7,\n },\n};\n"],
|
|
5
|
+
"mappings": "2KAMA,IAAMA,EAAa,CACjB,MAAO,0BACP,UAAW,kBACX,WAAY,CACV,UAAW,CACT,UAAW,CAAC,GAAI,CAClB,CACF,EACA,WAAY,CAACC,CAAgB,EAC7B,SAAU,CAER,SAAU,CACR,QAAS,SACT,YAAa,sBACb,aAAc,CAChB,EACA,QAAS,CACP,QAAS,OACT,YAAa,6BACf,EACA,YAAa,CACX,QAAS,OACT,YAAa,4CACf,EACA,KAAM,CACJ,QAAS,OACT,aAAc,OACd,YACE,4JACJ,EACA,QAAS,CACP,QAAS,CAAC,OAAQ,UAAW,UAAW,OAAO,EAC/C,QAAS,OACT,QAAS,CAAE,KAAM,QAAS,EAC1B,YAAa,6BACf,EACA,UAAW,CACT,QAAS,UACT,aAAc,GACd,YACE,gHACJ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,oDACP,SAAU,CAAC,CACb,CACF,EACA,CACE,QAAS,mFACT,YAAa,6GACb,SAAU,GACV,QAAS,UACT,KAAM,EACR,EACA,CACE,QAAS,4EACT,YAAa,oKACb,SAAU,GACV,QAAS,UACT,KAAM,GACN,cAAe,CACb,MAAO,iCACP,SAAU,CAAC,CACb,EACA,gBAAiB,CACf,MAAO,gEACP,SAAU,CAAC,CACb,CACF,EACA,CACE,QAAS,6EACT,YAAa,yOACb,SAAU,GACV,QAAS,QACT,KAAM,GACN,cAAe,CACb,MAAO,kFACP,SAAU,CAAC,CACb,CACF,CACF,EAGiB,QAAQ,CAACe,EAAcM,IAAU,CAChD,WAAW,IAAM,CACf,IAAMC,EAAe,SAAS,cAAyE,gCAAgC,EAEvIA,GAAA,MAAAA,EAAc,gBAAgBP,EAChC,EAAGM,EAAQ,GAAG,CAChB,CAAC,CACH,EACA,KAAM,CACJ,YAAa,GACb,SAAU,CACZ,CACF",
|
|
6
6
|
"names": ["meta", "fullscreenLayout", "bl_notification_stories_default", "addNotification", "options", "el", "stringifyArgs", "args", "BasicTemplate", "x", "l", "_a", "NotificationCreator", "buttonLabel", "slug", "__template", "AddExample", "_b", "RemoveExample", "_c", "RemoveAwaitExample", "_d", "PrimaryActionExample", "_e", "SecondaryActionExample", "_f", "ActionsRemoveExample", "notification", "PermanentExample", "VariantsExample", "variants", "variant", "RTLExample", "index", "rtlContainer"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../../chunk-
|
|
1
|
+
import{a,b}from"../../../chunk-GISZRI4I.js";import"../../../chunk-ECPWEUBG.js";import"../../../chunk-DINNT5P2.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as CloseSource,b as default};
|
|
2
2
|
//# sourceMappingURL=bl-notification-card.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-AIHL337R.js";import"../../chunk-DAMBW5GX.js";import"../../chunk-S4BD3HT2.js";import"../../chunk-ECPWEUBG.js";import"../../chunk-MWFGDECP.js";import"../../chunk-ZLE5MDX7.js";import"../../chunk-2XEDFGYF.js";import"../../chunk-23PSWIUF.js";import"../../chunk-IPYZIIRV.js";import"../../chunk-ZQ4MQ3U6.js";import"../../chunk-ZE7GYACV.js";import"../../chunk-EG7U7PM3.js";import"../../chunk-AYJMIZZ3.js";import"../../chunk-XDUIVR6I.js";import"../../chunk-HZ6A5QFC.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-DINNT5P2.js";import"../../chunk-BH64QNLE.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-276RDWEQ.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-pagination.js.map
|