@trendyol/baklava 2.0.0-beta.88 → 2.0.0-beta.90
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.js +1 -1
- package/dist/{chunk-2Y65CGCP.js → chunk-2EMIR5ZN.js} +16 -18
- package/dist/chunk-2EMIR5ZN.js.map +7 -0
- package/dist/{chunk-THIPCHAK.js → chunk-4UWTC6BR.js} +7 -2
- package/dist/{chunk-THIPCHAK.js.map → chunk-4UWTC6BR.js.map} +2 -2
- package/dist/chunk-6IV5ELOB.js +32 -0
- package/dist/chunk-6IV5ELOB.js.map +7 -0
- package/dist/{chunk-R6XFK3HN.js → chunk-72WMF254.js} +1 -1
- package/dist/{chunk-R6XFK3HN.js.map → chunk-72WMF254.js.map} +2 -2
- package/dist/{chunk-W3NQ6T5J.js → chunk-B3HLJT4E.js} +5 -3
- package/dist/{chunk-W3NQ6T5J.js.map → chunk-B3HLJT4E.js.map} +2 -2
- package/dist/{chunk-FHOMHSA6.js → chunk-CMIFBOTH.js} +2 -2
- package/dist/{chunk-FHOMHSA6.js.map → chunk-CMIFBOTH.js.map} +2 -2
- package/dist/{chunk-J774WKKH.js → chunk-EMMMXLJJ.js} +2 -3
- package/dist/{chunk-J774WKKH.js.map → chunk-EMMMXLJJ.js.map} +2 -2
- package/dist/{chunk-BD5KXTYS.js → chunk-HTIGXY2B.js} +4 -7
- package/dist/chunk-HTIGXY2B.js.map +7 -0
- package/dist/{chunk-RHHUBYKO.js → chunk-J73JZGIX.js} +1 -1
- package/dist/{chunk-RHHUBYKO.js.map → chunk-J73JZGIX.js.map} +1 -1
- package/dist/{chunk-WWAUSDYZ.js → chunk-MGQL62CQ.js} +1 -1
- package/dist/chunk-MGQL62CQ.js.map +7 -0
- package/dist/chunk-MU34JCL5.js +7 -0
- package/dist/chunk-MU34JCL5.js.map +7 -0
- package/dist/{chunk-2I5EAQVM.js → chunk-NPBDEGIU.js} +2 -2
- package/dist/{chunk-C5UMBCON.js → chunk-NYLRILUV.js} +1 -1
- package/dist/chunk-NYLRILUV.js.map +7 -0
- package/dist/{chunk-4IAGV6FP.js → chunk-QV3A6DWH.js} +2 -2
- package/dist/chunk-QV3A6DWH.js.map +7 -0
- package/dist/{chunk-KQBXYF3J.js → chunk-VYKKWEKI.js} +9 -5
- package/dist/{chunk-KQBXYF3J.js.map → chunk-VYKKWEKI.js.map} +2 -2
- package/dist/{chunk-N35VLT2U.js → chunk-W6FBJD54.js} +2 -2
- package/dist/chunk-W6FBJD54.js.map +7 -0
- package/dist/{chunk-AHEWP6LO.js → chunk-XKX2GLBY.js} +14 -3
- package/dist/chunk-XKX2GLBY.js.map +7 -0
- package/dist/{chunk-L3EQLCFT.js → chunk-XQN3H7RG.js} +1 -1
- package/dist/chunk-XQN3H7RG.js.map +7 -0
- package/dist/{chunk-ZV3Y7O4M.js → chunk-ZEBKUNFE.js} +2 -2
- package/dist/{chunk-ZV3Y7O4M.js.map → chunk-ZEBKUNFE.js.map} +2 -2
- package/dist/components/alert/bl-alert.d.ts.map +1 -1
- package/dist/components/alert/bl-alert.js +1 -1
- package/dist/components/button/bl-button.d.ts.map +1 -1
- package/dist/components/button/bl-button.js +1 -1
- package/dist/components/dialog/bl-dialog.d.ts.map +1 -1
- package/dist/components/dialog/bl-dialog.js +1 -1
- package/dist/components/drawer/bl-drawer.d.ts.map +1 -1
- package/dist/components/drawer/bl-drawer.js +1 -1
- package/dist/components/dropdown/bl-dropdown.d.ts.map +1 -1
- package/dist/components/dropdown/bl-dropdown.js +1 -1
- package/dist/components/dropdown/group/bl-dropdown-group.d.ts.map +1 -1
- package/dist/components/dropdown/group/bl-dropdown-group.js +1 -1
- package/dist/components/dropdown/item/bl-dropdown-item.d.ts.map +1 -1
- package/dist/components/dropdown/item/bl-dropdown-item.js +1 -1
- package/dist/components/input/bl-input.js +1 -1
- package/dist/components/pagination/bl-pagination.d.ts.map +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.d.ts +1 -0
- package/dist/components/progress-indicator/bl-progress-indicator.d.ts.map +1 -1
- package/dist/components/progress-indicator/bl-progress-indicator.js +1 -1
- package/dist/components/radio-group/bl-radio-group.d.ts.map +1 -1
- package/dist/components/radio-group/bl-radio-group.js +1 -1
- package/dist/components/radio-group/radio/bl-radio.d.ts.map +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.d.ts.map +1 -1
- package/dist/components/select/option/bl-select-option.js +1 -1
- package/dist/components/switch/bl-switch.d.ts.map +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.d.ts.map +1 -1
- package/dist/components/tab-group/tab/bl-tab.js +1 -1
- package/dist/components/textarea/bl-textarea.d.ts.map +1 -1
- package/dist/components/textarea/bl-textarea.js +1 -1
- package/dist/components/tooltip/bl-tooltip.js +1 -1
- package/dist/custom-elements.json +7 -0
- package/dist/themes/default.css +1 -1
- package/dist/themes/default.css.map +2 -2
- package/dist/utilities/form-control.d.ts.map +1 -1
- package/package.json +6 -1
- package/dist/chunk-2Y65CGCP.js.map +0 -7
- package/dist/chunk-4IAGV6FP.js.map +0 -7
- package/dist/chunk-6J4GSOJU.js +0 -7
- package/dist/chunk-6J4GSOJU.js.map +0 -7
- package/dist/chunk-AHEWP6LO.js.map +0 -7
- package/dist/chunk-BD5KXTYS.js.map +0 -7
- package/dist/chunk-C3X43Y7C.js +0 -25
- package/dist/chunk-C3X43Y7C.js.map +0 -7
- package/dist/chunk-C5UMBCON.js.map +0 -7
- package/dist/chunk-L3EQLCFT.js.map +0 -7
- package/dist/chunk-N35VLT2U.js.map +0 -7
- package/dist/chunk-WWAUSDYZ.js.map +0 -7
- /package/dist/{chunk-2I5EAQVM.js.map → chunk-NPBDEGIU.js.map} +0 -0
package/dist/themes/default.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-cyrillic-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-cyrillic-ext-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-hebrew-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-latin-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-latin-ext-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}:root{--bl-color-primary: #f27a1a;--bl-color-primary-hover: #ef6114;--bl-color-secondary: #273142;--bl-color-secondary-hover: #0f131a;--bl-color-tertiary: #f1f2f7;--bl-color-tertiary-hover: #d5d9e1;--bl-color-success: #0bc15c;--bl-color-success-hover: #09a44e;--bl-color-danger: #ff5043;--bl-color-danger-hover: #ff3028;--bl-color-warning: #ffb600;--bl-color-warning-hover: #ff9800;--bl-color-alternative: #5794ff;--bl-color-alternative-hover: #457eff;--bl-color-featured: #8c4eff;--bl-color-featured-hover: #753eff;--bl-color-primary-background: #fff;--bl-color-accent-primary-background: #fef2e8;--bl-color-secondary-background: #f1f2f7;--bl-color-tertiary-background: #f7f7fa;--bl-color-success-background: #e7f9ef;--bl-color-danger-background: #ffeeec;--bl-color-warning-background: #fff8e6;--bl-color-alternative-background: #eef4ff;--bl-color-featured-background: #f4edff;--bl-color-content-primary: #273142;--bl-color-content-secondary: #6e7787;--bl-color-content-tertiary: #95a1b5;--bl-color-content-passive: #afbbca;--bl-color-content-primary-contrast: #fff;--bl-color-content-hover: #f27a1a;--bl-color-border: #d5d9e1;--bl-size-4xs: .125rem;--bl-size-3xs: .25rem;--bl-size-2xs: .5rem;--bl-size-xs: .75rem;--bl-size-s: .875rem;--bl-size-m: 1rem;--bl-size-l: 1.25rem;--bl-size-xl: 1.5rem;--bl-size-2xl: 2rem;--bl-size-3xl: 2.5rem;--bl-size-4xl: 3rem;--bl-size-5xl: 4rem;--bl-size-6xl: 5rem;--bl-index-deep: -1;--bl-index-base: 1;--bl-index-popover: 100;--bl-index-tooltip: 200;--bl-index-sticky: 300;--bl-index-overlay: 400;--bl-index-dialog: 500;--bl-index-notification: 600;--bl-font-family: "RubikVariable", sans-serif;--bl-font-weight-light: 300;--bl-font-weight-regular: 400;--bl-font-weight-medium: 500;--bl-font-weight-semibold: 600;--bl-font-weight-bold: 700;--bl-font-size-2xs: .5rem;--bl-font-size-xs: .625rem;--bl-font-size-s: .75rem;--bl-font-size-m: .875rem;--bl-font-size-l: 1rem;--bl-font-size-xl: 1.25rem;--bl-font-size-2xl: 1.5rem;--bl-font-size-3xl: 1.75rem;--bl-font-size-4xl: 2rem;--bl-font-size-5xl: 3rem;--bl-font-size-6xl: 4rem;--bl-border-radius-xs: .125rem;--bl-border-radius-s: .25rem;--bl-border-radius-m: .375rem;--bl-border-radius-l: .5rem;--bl-border-radius-pill: 62.438rem;--bl-border-radius-circle: 50%;--bl-font-display-font-size: var(--bl-font-size-5xl);--bl-font-display-line-height: calc(var(--bl-font-display-font-size) + var(--bl-size-2xs));--bl-font-display-size: var(--bl-font-display-font-size)/var(--bl-font-display-line-height);--bl-font-display: var(--bl-font-display-size) var(--bl-font-family);--bl-font-display-light: var(--bl-font-weight-light) var(--bl-font-display);--bl-font-display-regular: var(--bl-font-weight-regular) var(--bl-font-display);--bl-font-display-medium: var(--bl-font-weight-medium) var(--bl-font-display);--bl-font-display-semibold: var(--bl-font-weight-semibold) var(--bl-font-display);--bl-font-display-bold: var(--bl-font-weight-bold) var(--bl-font-display);--bl-font-heading-1-font-size: var(--bl-font-size-4xl);--bl-font-heading-1-line-height: calc(var(--bl-font-heading-1-font-size) + var(--bl-size-3xs));--bl-font-heading-1-size: var(--bl-font-heading-1-font-size)/var(--bl-font-heading-1-line-height);--bl-font-heading-1: var(--bl-font-weight-light) var(--bl-font-heading-1-size) var(--bl-font-family);--bl-font-heading-2-font-size: var(--bl-font-size-3xl);--bl-font-heading-2-line-height: calc(var(--bl-font-heading-2-font-size) + var(--bl-size-3xs));--bl-font-heading-2-size: var(--bl-font-heading-2-font-size)/var(--bl-font-heading-2-line-height);--bl-font-heading-2: var(--bl-font-weight-regular) var(--bl-font-heading-2-size) var(--bl-font-family);--bl-font-heading-3-font-size: var(--bl-font-size-2xl);--bl-font-heading-3-line-height: calc(var(--bl-font-heading-3-font-size) + var(--bl-size-3xs));--bl-font-heading-3-size: var(--bl-font-heading-3-font-size)/var(--bl-font-heading-3-line-height);--bl-font-heading-3: var(--bl-font-weight-regular) var(--bl-font-heading-3-size) var(--bl-font-family);--bl-font-title-1-font-size: var(--bl-font-size-xl);--bl-font-title-1-line-height: calc(var(--bl-font-title-1-font-size) + var(--bl-size-3xs));--bl-font-title-1-size: var(--bl-font-title-1-font-size)/var(--bl-font-title-1-line-height);--bl-font-title-1: var(--bl-font-title-1-size) var(--bl-font-family);--bl-font-title-1-regular: var(--bl-font-weight-regular) var(--bl-font-title-1);--bl-font-title-1-medium: var(--bl-font-weight-medium) var(--bl-font-title-1);--bl-font-title-1-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-1);--bl-font-title-1-bold: var(--bl-font-weight-bold) var(--bl-font-title-1);--bl-font-title-2-font-size: var(--bl-font-size-l);--bl-font-title-2-line-height: calc(var(--bl-font-title-2-font-size) + var(--bl-size-3xs));--bl-font-title-2-size: var(--bl-font-title-2-font-size)/var(--bl-font-title-2-line-height);--bl-font-title-2: var(--bl-font-title-2-size) var(--bl-font-family);--bl-font-title-2-regular: var(--bl-font-weight-regular) var(--bl-font-title-2);--bl-font-title-2-medium: var(--bl-font-weight-medium) var(--bl-font-title-2);--bl-font-title-2-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-2);--bl-font-title-2-bold: var(--bl-font-weight-bold) var(--bl-font-title-2);--bl-font-title-3-font-size: var(--bl-font-size-m);--bl-font-title-3-line-height: calc(var(--bl-font-title-3-font-size) + var(--bl-size-4xs));--bl-font-title-3-size: var(--bl-font-title-3-font-size)/var(--bl-font-title-3-line-height);--bl-font-title-3: var(--bl-font-title-3-size) var(--bl-font-family);--bl-font-title-3-regular: var(--bl-font-weight-regular) var(--bl-font-title-3);--bl-font-title-3-medium: var(--bl-font-weight-medium) var(--bl-font-title-3);--bl-font-title-3-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-3);--bl-font-title-3-bold: var(--bl-font-weight-bold) var(--bl-font-title-3);--bl-font-title-4-font-size: var(--bl-font-size-s);--bl-font-title-4-line-height: calc(var(--bl-font-title-4-font-size) + var(--bl-size-4xs));--bl-font-title-4-size: var(--bl-font-title-4-font-size)/var(--bl-font-title-4-line-height);--bl-font-title-4: var(--bl-font-title-4-size) var(--bl-font-family);--bl-font-title-4-regular: var(--bl-font-weight-regular) var(--bl-font-title-4);--bl-font-title-4-medium: var(--bl-font-weight-medium) var(--bl-font-title-4);--bl-font-title-4-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-4);--bl-font-title-4-bold: var(--bl-font-weight-bold) var(--bl-font-title-4);--bl-font-body-text-1-font-size: var(--bl-font-size-l);--bl-font-body-text-1-line-height: calc(var(--bl-font-body-text-1-font-size) + var(--bl-size-4xs));--bl-font-body-text-1-size: var(--bl-font-body-text-1-font-size)/var(--bl-font-body-text-1-line-height);--bl-font-body-text-1: var(--bl-font-weight-regular) var(--bl-font-body-text-1-size) var(--bl-font-family);--bl-font-body-text-2-font-size: var(--bl-font-size-m);--bl-font-body-text-2-line-height: calc(var(--bl-font-body-text-2-font-size) + var(--bl-size-4xs));--bl-font-body-text-2-size: var(--bl-font-body-text-2-font-size)/var(--bl-font-body-text-2-line-height);--bl-font-body-text-2: var(--bl-font-weight-regular) var(--bl-font-body-text-2-size) var(--bl-font-family);--bl-font-body-text-3-font-size: var(--bl-font-size-s);--bl-font-body-text-3-line-height: calc(var(--bl-font-body-text-3-font-size) + var(--bl-size-4xs));--bl-font-body-text-3-size: var(--bl-font-body-text-3-font-size)/var(--bl-font-body-text-3-line-height);--bl-font-body-text-3: var(--bl-font-weight-regular) var(--bl-font-body-text-3-size) var(--bl-font-family);--bl-font-caption-font-size: var(--bl-font-size-xs);--bl-font-caption-line-height: calc(var(--bl-font-caption-font-size) + var(--bl-size-4xs));--bl-font-caption-size: var(--bl-font-caption-font-size)/var(--bl-font-caption-line-height);--bl-font-caption: var(--bl-font-weight-medium) var(--bl-font-caption-size) var(--bl-font-family)}
|
|
1
|
+
@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-cyrillic-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-cyrillic-ext-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-hebrew-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-latin-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-latin-ext-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}:root{--bl-color-primary: #f27a1a;--bl-color-primary-hover: #ef6114;--bl-color-secondary: #273142;--bl-color-secondary-hover: #0f131a;--bl-color-tertiary: #f1f2f7;--bl-color-tertiary-hover: #d5d9e1;--bl-color-success: #0bc15c;--bl-color-success-hover: #09a44e;--bl-color-danger: #ff5043;--bl-color-danger-hover: #ff3028;--bl-color-warning: #ffb600;--bl-color-warning-hover: #ff9800;--bl-color-alternative: #5794ff;--bl-color-alternative-hover: #457eff;--bl-color-featured: #8c4eff;--bl-color-featured-hover: #753eff;--bl-color-primary-background: #fff;--bl-color-accent-primary-background: #fef2e8;--bl-color-secondary-background: #f1f2f7;--bl-color-tertiary-background: #f7f7fa;--bl-color-success-background: #e7f9ef;--bl-color-danger-background: #ffeeec;--bl-color-warning-background: #fff8e6;--bl-color-alternative-background: #eef4ff;--bl-color-featured-background: #f4edff;--bl-color-content-primary: #273142;--bl-color-content-secondary: #6e7787;--bl-color-content-tertiary: #95a1b5;--bl-color-content-passive: #afbbca;--bl-color-content-primary-contrast: #fff;--bl-color-content-hover: #f27a1a;--bl-color-border: #d5d9e1;--bl-size-4xs: .125rem;--bl-size-3xs: .25rem;--bl-size-2xs: .5rem;--bl-size-xs: .75rem;--bl-size-s: .875rem;--bl-size-m: 1rem;--bl-size-l: 1.25rem;--bl-size-xl: 1.5rem;--bl-size-2xl: 2rem;--bl-size-3xl: 2.5rem;--bl-size-4xl: 3rem;--bl-size-5xl: 4rem;--bl-size-6xl: 5rem;--bl-index-deep: -1;--bl-index-base: 1;--bl-index-popover: 100;--bl-index-tooltip: 200;--bl-index-sticky: 300;--bl-index-overlay: 400;--bl-index-dialog: 500;--bl-index-notification: 600;--bl-font-family: "RubikVariable", sans-serif;--bl-font-weight-light: 300;--bl-font-weight-regular: 400;--bl-font-weight-medium: 500;--bl-font-weight-semibold: 600;--bl-font-weight-bold: 700;--bl-font-size-2xs: .5rem;--bl-font-size-xs: .625rem;--bl-font-size-s: .75rem;--bl-font-size-m: .875rem;--bl-font-size-l: 1rem;--bl-font-size-xl: 1.25rem;--bl-font-size-2xl: 1.5rem;--bl-font-size-3xl: 1.75rem;--bl-font-size-4xl: 2rem;--bl-font-size-5xl: 3rem;--bl-font-size-6xl: 4rem;--bl-border-radius-xs: .125rem;--bl-border-radius-s: .25rem;--bl-border-radius-m: .375rem;--bl-border-radius-l: .5rem;--bl-border-radius-pill: 62.438rem;--bl-border-radius-circle: 50%;--bl-font-display-font-size: var(--bl-font-size-5xl);--bl-font-display-line-height: calc(var(--bl-font-display-font-size) + var(--bl-size-2xs));--bl-font-display-size: var(--bl-font-display-font-size) / var(--bl-font-display-line-height);--bl-font-display: var(--bl-font-display-size) var(--bl-font-family);--bl-font-display-light: var(--bl-font-weight-light) var(--bl-font-display);--bl-font-display-regular: var(--bl-font-weight-regular) var(--bl-font-display);--bl-font-display-medium: var(--bl-font-weight-medium) var(--bl-font-display);--bl-font-display-semibold: var(--bl-font-weight-semibold) var(--bl-font-display);--bl-font-display-bold: var(--bl-font-weight-bold) var(--bl-font-display);--bl-font-heading-1-font-size: var(--bl-font-size-4xl);--bl-font-heading-1-line-height: calc(var(--bl-font-heading-1-font-size) + var(--bl-size-3xs));--bl-font-heading-1-size: var(--bl-font-heading-1-font-size) / var(--bl-font-heading-1-line-height);--bl-font-heading-1: var(--bl-font-weight-light) var(--bl-font-heading-1-size) var(--bl-font-family);--bl-font-heading-2-font-size: var(--bl-font-size-3xl);--bl-font-heading-2-line-height: calc(var(--bl-font-heading-2-font-size) + var(--bl-size-3xs));--bl-font-heading-2-size: var(--bl-font-heading-2-font-size) / var(--bl-font-heading-2-line-height);--bl-font-heading-2: var(--bl-font-weight-regular) var(--bl-font-heading-2-size) var(--bl-font-family);--bl-font-heading-3-font-size: var(--bl-font-size-2xl);--bl-font-heading-3-line-height: calc(var(--bl-font-heading-3-font-size) + var(--bl-size-3xs));--bl-font-heading-3-size: var(--bl-font-heading-3-font-size) / var(--bl-font-heading-3-line-height);--bl-font-heading-3: var(--bl-font-weight-regular) var(--bl-font-heading-3-size) var(--bl-font-family);--bl-font-title-1-font-size: var(--bl-font-size-xl);--bl-font-title-1-line-height: calc(var(--bl-font-title-1-font-size) + var(--bl-size-3xs));--bl-font-title-1-size: var(--bl-font-title-1-font-size) / var(--bl-font-title-1-line-height);--bl-font-title-1: var(--bl-font-title-1-size) var(--bl-font-family);--bl-font-title-1-regular: var(--bl-font-weight-regular) var(--bl-font-title-1);--bl-font-title-1-medium: var(--bl-font-weight-medium) var(--bl-font-title-1);--bl-font-title-1-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-1);--bl-font-title-1-bold: var(--bl-font-weight-bold) var(--bl-font-title-1);--bl-font-title-2-font-size: var(--bl-font-size-l);--bl-font-title-2-line-height: calc(var(--bl-font-title-2-font-size) + var(--bl-size-3xs));--bl-font-title-2-size: var(--bl-font-title-2-font-size) / var(--bl-font-title-2-line-height);--bl-font-title-2: var(--bl-font-title-2-size) var(--bl-font-family);--bl-font-title-2-regular: var(--bl-font-weight-regular) var(--bl-font-title-2);--bl-font-title-2-medium: var(--bl-font-weight-medium) var(--bl-font-title-2);--bl-font-title-2-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-2);--bl-font-title-2-bold: var(--bl-font-weight-bold) var(--bl-font-title-2);--bl-font-title-3-font-size: var(--bl-font-size-m);--bl-font-title-3-line-height: calc(var(--bl-font-title-3-font-size) + var(--bl-size-4xs));--bl-font-title-3-size: var(--bl-font-title-3-font-size) / var(--bl-font-title-3-line-height);--bl-font-title-3: var(--bl-font-title-3-size) var(--bl-font-family);--bl-font-title-3-regular: var(--bl-font-weight-regular) var(--bl-font-title-3);--bl-font-title-3-medium: var(--bl-font-weight-medium) var(--bl-font-title-3);--bl-font-title-3-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-3);--bl-font-title-3-bold: var(--bl-font-weight-bold) var(--bl-font-title-3);--bl-font-title-4-font-size: var(--bl-font-size-s);--bl-font-title-4-line-height: calc(var(--bl-font-title-4-font-size) + var(--bl-size-4xs));--bl-font-title-4-size: var(--bl-font-title-4-font-size) / var(--bl-font-title-4-line-height);--bl-font-title-4: var(--bl-font-title-4-size) var(--bl-font-family);--bl-font-title-4-regular: var(--bl-font-weight-regular) var(--bl-font-title-4);--bl-font-title-4-medium: var(--bl-font-weight-medium) var(--bl-font-title-4);--bl-font-title-4-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-4);--bl-font-title-4-bold: var(--bl-font-weight-bold) var(--bl-font-title-4);--bl-font-body-text-1-font-size: var(--bl-font-size-l);--bl-font-body-text-1-line-height: calc( var(--bl-font-body-text-1-font-size) + var(--bl-size-4xs) );--bl-font-body-text-1-size: var(--bl-font-body-text-1-font-size) / var(--bl-font-body-text-1-line-height);--bl-font-body-text-1: var(--bl-font-weight-regular) var(--bl-font-body-text-1-size) var(--bl-font-family);--bl-font-body-text-2-font-size: var(--bl-font-size-m);--bl-font-body-text-2-line-height: calc( var(--bl-font-body-text-2-font-size) + var(--bl-size-4xs) );--bl-font-body-text-2-size: var(--bl-font-body-text-2-font-size) / var(--bl-font-body-text-2-line-height);--bl-font-body-text-2: var(--bl-font-weight-regular) var(--bl-font-body-text-2-size) var(--bl-font-family);--bl-font-body-text-3-font-size: var(--bl-font-size-s);--bl-font-body-text-3-line-height: calc( var(--bl-font-body-text-3-font-size) + var(--bl-size-4xs) );--bl-font-body-text-3-size: var(--bl-font-body-text-3-font-size) / var(--bl-font-body-text-3-line-height);--bl-font-body-text-3: var(--bl-font-weight-regular) var(--bl-font-body-text-3-size) var(--bl-font-family);--bl-font-caption-font-size: var(--bl-font-size-xs);--bl-font-caption-line-height: calc(var(--bl-font-caption-font-size) + var(--bl-size-4xs));--bl-font-caption-size: var(--bl-font-caption-font-size) / var(--bl-font-caption-line-height);--bl-font-caption: var(--bl-font-weight-medium) var(--bl-font-caption-size) var(--bl-font-family)}
|
|
2
2
|
/*# sourceMappingURL=default.css.map */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../node_modules/@fontsource/rubik/variable.css", "../../src/themes/default.css"],
|
|
4
|
-
"sourcesContent": ["/* rubik-cyrillic-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-cyrillic-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n} \n/* rubik-cyrillic-ext-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-cyrillic-ext-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n} \n/* rubik-hebrew-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-hebrew-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;\n} \n/* rubik-latin-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-latin-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n} \n/* rubik-latin-ext-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-latin-ext-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n} \n", "@import '@fontsource/rubik/variable.css';\n\n:root {\n /* Colors */\n --bl-color-primary: #f27a1a;\n --bl-color-primary-hover: #ef6114;\n --bl-color-secondary: #273142;\n --bl-color-secondary-hover: #0f131a;\n --bl-color-tertiary: #f1f2f7;\n --bl-color-tertiary-hover: #d5d9e1;\n --bl-color-success: #0bc15c;\n --bl-color-success-hover: #09a44e;\n --bl-color-danger: #ff5043;\n --bl-color-danger-hover: #ff3028;\n --bl-color-warning: #ffb600;\n --bl-color-warning-hover: #ff9800;\n --bl-color-alternative: #5794ff;\n --bl-color-alternative-hover: #457eff;\n --bl-color-featured: #8c4eff;\n --bl-color-featured-hover: #753eff;\n\n /* Background Colors */\n --bl-color-primary-background: #fff;\n --bl-color-accent-primary-background: #fef2e8;\n --bl-color-secondary-background: #f1f2f7;\n --bl-color-tertiary-background: #f7f7fa;\n --bl-color-success-background: #e7f9ef;\n --bl-color-danger-background: #ffeeec;\n --bl-color-warning-background: #fff8e6;\n --bl-color-alternative-background: #eef4ff;\n --bl-color-featured-background: #f4edff;\n\n /* Content Colors */\n --bl-color-content-primary: #273142;\n --bl-color-content-secondary: #6e7787;\n --bl-color-content-tertiary: #95a1b5;\n --bl-color-content-passive: #afbbca;\n --bl-color-content-primary-contrast: #fff;\n --bl-color-content-hover: #f27a1a;\n --bl-color-border: #d5d9e1;\n\n /* Size and Spacing */\n --bl-size-4xs: 0.125rem; /* 2px */\n --bl-size-3xs: 0.25rem; /* 4px */\n --bl-size-2xs: 0.5rem; /* 8px */\n --bl-size-xs: 0.75rem; /* 12px */\n --bl-size-s: 0.875rem; /* 14px */\n --bl-size-m: 1rem; /* 16px */\n --bl-size-l: 1.25rem; /* 20px */\n --bl-size-xl: 1.5rem; /* 24px */\n --bl-size-2xl: 2rem; /* 32px */\n --bl-size-3xl: 2.5rem; /* 40px */\n --bl-size-4xl: 3rem; /* 48px */\n --bl-size-5xl: 4rem; /* 64px */\n --bl-size-6xl: 5rem; /* 80px */\n\n /* Z-indexes */\n --bl-index-deep: -1;\n --bl-index-base: 1;\n --bl-index-popover: 100;\n --bl-index-tooltip: 200;\n --bl-index-sticky: 300;\n --bl-index-overlay: 400;\n --bl-index-dialog: 500;\n --bl-index-notification: 600;\n\n /* Typography */\n --bl-font-family: 'RubikVariable', sans-serif;\n\n /* Font weights */\n --bl-font-weight-light: 300;\n --bl-font-weight-regular: 400;\n --bl-font-weight-medium: 500;\n --bl-font-weight-semibold: 600;\n --bl-font-weight-bold: 700;\n\n /* Font sizes */\n --bl-font-size-2xs: 0.5rem; /* 8px */\n --bl-font-size-xs: 0.625rem; /* 10px */\n --bl-font-size-s: 0.75rem; /* 12px */\n --bl-font-size-m: 0.875rem; /* 14px */\n --bl-font-size-l: 1rem; /* 16px */\n --bl-font-size-xl: 1.25rem; /* 20px */\n --bl-font-size-2xl: 1.5rem; /* 24px */\n --bl-font-size-3xl: 1.75rem; /* 28px */\n --bl-font-size-4xl: 2rem; /* 32px */\n --bl-font-size-5xl: 3rem; /* 48px */\n --bl-font-size-6xl: 4rem; /* 64px */\n\n /* Border radius */\n --bl-border-radius-xs: 0.125rem; /* 2px */\n --bl-border-radius-s: 0.25rem; /* 4px */\n --bl-border-radius-m: 0.375rem; /* 6px */\n --bl-border-radius-l: 0.5rem; /* 8px */\n --bl-border-radius-pill: 62.438rem; /* 999px */\n --bl-border-radius-circle: 50%;\n\n /* Font Style: Display */\n --bl-font-display-font-size: var(--bl-font-size-5xl);\n --bl-font-display-line-height: calc(var(--bl-font-display-font-size) + var(--bl-size-2xs));\n --bl-font-display-size: var(--bl-font-display-font-size)/var(--bl-font-display-line-height);\n --bl-font-display: var(--bl-font-display-size) var(--bl-font-family);\n --bl-font-display-light: var(--bl-font-weight-light) var(--bl-font-display);\n --bl-font-display-regular: var(--bl-font-weight-regular) var(--bl-font-display);\n --bl-font-display-medium: var(--bl-font-weight-medium) var(--bl-font-display);\n --bl-font-display-semibold: var(--bl-font-weight-semibold) var(--bl-font-display);\n --bl-font-display-bold: var(--bl-font-weight-bold) var(--bl-font-display);\n\n /* Font Style: Heading 1 */\n --bl-font-heading-1-font-size: var(--bl-font-size-4xl);\n --bl-font-heading-1-line-height: calc(var(--bl-font-heading-1-font-size) + var(--bl-size-3xs));\n --bl-font-heading-1-size: var(--bl-font-heading-1-font-size)/var(--bl-font-heading-1-line-height);\n --bl-font-heading-1: var(--bl-font-weight-light) var(--bl-font-heading-1-size) var(--bl-font-family);\n\n /* Font Style: Heading 2 */\n --bl-font-heading-2-font-size: var(--bl-font-size-3xl);\n --bl-font-heading-2-line-height: calc(var(--bl-font-heading-2-font-size) + var(--bl-size-3xs));\n --bl-font-heading-2-size: var(--bl-font-heading-2-font-size)/var(--bl-font-heading-2-line-height);\n --bl-font-heading-2: var(--bl-font-weight-regular) var(--bl-font-heading-2-size) var(--bl-font-family);\n\n /* Font Style: Heading 3 */\n --bl-font-heading-3-font-size: var(--bl-font-size-2xl);\n --bl-font-heading-3-line-height: calc(var(--bl-font-heading-3-font-size) + var(--bl-size-3xs));\n --bl-font-heading-3-size: var(--bl-font-heading-3-font-size)/var(--bl-font-heading-3-line-height);\n --bl-font-heading-3: var(--bl-font-weight-regular) var(--bl-font-heading-3-size) var(--bl-font-family);\n\n /* Font Style: Title 1 */\n --bl-font-title-1-font-size: var(--bl-font-size-xl);\n --bl-font-title-1-line-height: calc(var(--bl-font-title-1-font-size) + var(--bl-size-3xs));\n --bl-font-title-1-size: var(--bl-font-title-1-font-size)/var(--bl-font-title-1-line-height);\n --bl-font-title-1: var(--bl-font-title-1-size) var(--bl-font-family);\n --bl-font-title-1-regular: var(--bl-font-weight-regular) var(--bl-font-title-1);\n --bl-font-title-1-medium: var(--bl-font-weight-medium) var(--bl-font-title-1);\n --bl-font-title-1-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-1);\n --bl-font-title-1-bold: var(--bl-font-weight-bold) var(--bl-font-title-1);\n\n /* Font Style: Title 2 */\n --bl-font-title-2-font-size: var(--bl-font-size-l);\n --bl-font-title-2-line-height: calc(var(--bl-font-title-2-font-size) + var(--bl-size-3xs));\n --bl-font-title-2-size: var(--bl-font-title-2-font-size)/var(--bl-font-title-2-line-height);\n --bl-font-title-2: var(--bl-font-title-2-size) var(--bl-font-family);\n --bl-font-title-2-regular: var(--bl-font-weight-regular) var(--bl-font-title-2);\n --bl-font-title-2-medium: var(--bl-font-weight-medium) var(--bl-font-title-2);\n --bl-font-title-2-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-2);\n --bl-font-title-2-bold: var(--bl-font-weight-bold) var(--bl-font-title-2);\n\n /* Font Style: Title 3 */\n --bl-font-title-3-font-size: var(--bl-font-size-m);\n --bl-font-title-3-line-height: calc(var(--bl-font-title-3-font-size) + var(--bl-size-4xs));\n --bl-font-title-3-size: var(--bl-font-title-3-font-size)/var(--bl-font-title-3-line-height);\n --bl-font-title-3: var(--bl-font-title-3-size) var(--bl-font-family);\n --bl-font-title-3-regular: var(--bl-font-weight-regular) var(--bl-font-title-3);\n --bl-font-title-3-medium: var(--bl-font-weight-medium) var(--bl-font-title-3);\n --bl-font-title-3-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-3);\n --bl-font-title-3-bold: var(--bl-font-weight-bold) var(--bl-font-title-3);\n\n /* Font Style: Title 4 */\n --bl-font-title-4-font-size: var(--bl-font-size-s);\n --bl-font-title-4-line-height: calc(var(--bl-font-title-4-font-size) + var(--bl-size-4xs));\n --bl-font-title-4-size: var(--bl-font-title-4-font-size)/var(--bl-font-title-4-line-height);\n --bl-font-title-4: var(--bl-font-title-4-size) var(--bl-font-family);\n --bl-font-title-4-regular: var(--bl-font-weight-regular) var(--bl-font-title-4);\n --bl-font-title-4-medium: var(--bl-font-weight-medium) var(--bl-font-title-4);\n --bl-font-title-4-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-4);\n --bl-font-title-4-bold: var(--bl-font-weight-bold) var(--bl-font-title-4);\n\n /* Font Style: Body Text 1 */\n --bl-font-body-text-1-font-size: var(--bl-font-size-l);\n --bl-font-body-text-1-line-height: calc(var(--bl-font-body-text-1-font-size) + var(--bl-size-4xs));\n --bl-font-body-text-1-size: var(--bl-font-body-text-1-font-size)/var(--bl-font-body-text-1-line-height);\n --bl-font-body-text-1: var(--bl-font-weight-regular) var(--bl-font-body-text-1-size) var(--bl-font-family);\n\n /* Font Style: Body Text 2 */\n --bl-font-body-text-2-font-size: var(--bl-font-size-m);\n --bl-font-body-text-2-line-height: calc(var(--bl-font-body-text-2-font-size) + var(--bl-size-4xs));\n --bl-font-body-text-2-size: var(--bl-font-body-text-2-font-size)/var(--bl-font-body-text-2-line-height);\n --bl-font-body-text-2: var(--bl-font-weight-regular) var(--bl-font-body-text-2-size) var(--bl-font-family);\n\n /* Font Style: Body Text 3 */\n --bl-font-body-text-3-font-size: var(--bl-font-size-s);\n --bl-font-body-text-3-line-height: calc(var(--bl-font-body-text-3-font-size) + var(--bl-size-4xs));\n --bl-font-body-text-3-size: var(--bl-font-body-text-3-font-size)/var(--bl-font-body-text-3-line-height);\n --bl-font-body-text-3: var(--bl-font-weight-regular) var(--bl-font-body-text-3-size) var(--bl-font-family);\n\n /* Font Style: Caption */\n --bl-font-caption-font-size: var(--bl-font-size-xs);\n --bl-font-caption-line-height: calc(var(--bl-font-caption-font-size) + var(--bl-size-4xs));\n --bl-font-caption-size: var(--bl-font-caption-font-size)/var(--bl-font-caption-line-height);\n --bl-font-caption: var(--bl-font-weight-medium) var(--bl-font-caption-size) var(--bl-font-family);\n}\n"],
|
|
5
|
-
"mappings": "AACA,WACE,0BACA,kBACA,kBACA,oBACA,iFACA,yDAGF,WACE,0BACA,kBACA,kBACA,oBACA,qFACA,iFAGF,WACE,0BACA,kBACA,kBACA,oBACA,+EACA,gEAGF,WACE,0BACA,kBACA,kBACA,oBACA,8EACA,yJAGF,WACE,0BACA,kBACA,kBACA,oBACA,kFACA,2GCzCF,MAEE,4BACA,kCACA,8BACA,oCACA,6BACA,mCACA,4BACA,kCACA,2BACA,iCACA,4BACA,kCACA,gCACA,sCACA,6BACA,mCAGA,oCACA,8CACA,yCACA,wCACA,uCACA,sCACA,uCACA,2CACA,wCAGA,oCACA,sCACA,qCACA,oCACA,0CACA,kCACA,2BAGA,uBACA,sBACA,qBACA,qBACA,qBACA,kBACA,qBACA,qBACA,oBACA,sBACA,oBACA,oBACA,oBAGA,oBACA,mBACA,wBACA,wBACA,uBACA,wBACA,uBACA,6BAGA,8CAGA,4BACA,8BACA,6BACA,+BACA,2BAGA,0BACA,2BACA,yBACA,0BACA,uBACA,2BACA,2BACA,4BACA,yBACA,yBACA,yBAGA,+BACA,6BACA,8BACA,4BACA,mCACA,+BAGA,qDACA,2FACA,
|
|
4
|
+
"sourcesContent": ["/* rubik-cyrillic-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-cyrillic-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n} \n/* rubik-cyrillic-ext-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-cyrillic-ext-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n} \n/* rubik-hebrew-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-hebrew-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;\n} \n/* rubik-latin-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-latin-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n} \n/* rubik-latin-ext-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-latin-ext-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n} \n", "@import '@fontsource/rubik/variable.css';\n\n:root {\n /* Colors */\n --bl-color-primary: #f27a1a;\n --bl-color-primary-hover: #ef6114;\n --bl-color-secondary: #273142;\n --bl-color-secondary-hover: #0f131a;\n --bl-color-tertiary: #f1f2f7;\n --bl-color-tertiary-hover: #d5d9e1;\n --bl-color-success: #0bc15c;\n --bl-color-success-hover: #09a44e;\n --bl-color-danger: #ff5043;\n --bl-color-danger-hover: #ff3028;\n --bl-color-warning: #ffb600;\n --bl-color-warning-hover: #ff9800;\n --bl-color-alternative: #5794ff;\n --bl-color-alternative-hover: #457eff;\n --bl-color-featured: #8c4eff;\n --bl-color-featured-hover: #753eff;\n\n /* Background Colors */\n --bl-color-primary-background: #fff;\n --bl-color-accent-primary-background: #fef2e8;\n --bl-color-secondary-background: #f1f2f7;\n --bl-color-tertiary-background: #f7f7fa;\n --bl-color-success-background: #e7f9ef;\n --bl-color-danger-background: #ffeeec;\n --bl-color-warning-background: #fff8e6;\n --bl-color-alternative-background: #eef4ff;\n --bl-color-featured-background: #f4edff;\n\n /* Content Colors */\n --bl-color-content-primary: #273142;\n --bl-color-content-secondary: #6e7787;\n --bl-color-content-tertiary: #95a1b5;\n --bl-color-content-passive: #afbbca;\n --bl-color-content-primary-contrast: #fff;\n --bl-color-content-hover: #f27a1a;\n --bl-color-border: #d5d9e1;\n\n /* Size and Spacing */\n --bl-size-4xs: 0.125rem; /* 2px */\n --bl-size-3xs: 0.25rem; /* 4px */\n --bl-size-2xs: 0.5rem; /* 8px */\n --bl-size-xs: 0.75rem; /* 12px */\n --bl-size-s: 0.875rem; /* 14px */\n --bl-size-m: 1rem; /* 16px */\n --bl-size-l: 1.25rem; /* 20px */\n --bl-size-xl: 1.5rem; /* 24px */\n --bl-size-2xl: 2rem; /* 32px */\n --bl-size-3xl: 2.5rem; /* 40px */\n --bl-size-4xl: 3rem; /* 48px */\n --bl-size-5xl: 4rem; /* 64px */\n --bl-size-6xl: 5rem; /* 80px */\n\n /* Z-indexes */\n --bl-index-deep: -1;\n --bl-index-base: 1;\n --bl-index-popover: 100;\n --bl-index-tooltip: 200;\n --bl-index-sticky: 300;\n --bl-index-overlay: 400;\n --bl-index-dialog: 500;\n --bl-index-notification: 600;\n\n /* Typography */\n --bl-font-family: 'RubikVariable', sans-serif;\n\n /* Font weights */\n --bl-font-weight-light: 300;\n --bl-font-weight-regular: 400;\n --bl-font-weight-medium: 500;\n --bl-font-weight-semibold: 600;\n --bl-font-weight-bold: 700;\n\n /* Font sizes */\n --bl-font-size-2xs: 0.5rem; /* 8px */\n --bl-font-size-xs: 0.625rem; /* 10px */\n --bl-font-size-s: 0.75rem; /* 12px */\n --bl-font-size-m: 0.875rem; /* 14px */\n --bl-font-size-l: 1rem; /* 16px */\n --bl-font-size-xl: 1.25rem; /* 20px */\n --bl-font-size-2xl: 1.5rem; /* 24px */\n --bl-font-size-3xl: 1.75rem; /* 28px */\n --bl-font-size-4xl: 2rem; /* 32px */\n --bl-font-size-5xl: 3rem; /* 48px */\n --bl-font-size-6xl: 4rem; /* 64px */\n\n /* Border radius */\n --bl-border-radius-xs: 0.125rem; /* 2px */\n --bl-border-radius-s: 0.25rem; /* 4px */\n --bl-border-radius-m: 0.375rem; /* 6px */\n --bl-border-radius-l: 0.5rem; /* 8px */\n --bl-border-radius-pill: 62.438rem; /* 999px */\n --bl-border-radius-circle: 50%;\n\n /* Font Style: Display */\n --bl-font-display-font-size: var(--bl-font-size-5xl);\n --bl-font-display-line-height: calc(var(--bl-font-display-font-size) + var(--bl-size-2xs));\n --bl-font-display-size: var(--bl-font-display-font-size) / var(--bl-font-display-line-height);\n --bl-font-display: var(--bl-font-display-size) var(--bl-font-family);\n --bl-font-display-light: var(--bl-font-weight-light) var(--bl-font-display);\n --bl-font-display-regular: var(--bl-font-weight-regular) var(--bl-font-display);\n --bl-font-display-medium: var(--bl-font-weight-medium) var(--bl-font-display);\n --bl-font-display-semibold: var(--bl-font-weight-semibold) var(--bl-font-display);\n --bl-font-display-bold: var(--bl-font-weight-bold) var(--bl-font-display);\n\n /* Font Style: Heading 1 */\n --bl-font-heading-1-font-size: var(--bl-font-size-4xl);\n --bl-font-heading-1-line-height: calc(var(--bl-font-heading-1-font-size) + var(--bl-size-3xs));\n --bl-font-heading-1-size: var(--bl-font-heading-1-font-size) /\n var(--bl-font-heading-1-line-height);\n --bl-font-heading-1: var(--bl-font-weight-light) var(--bl-font-heading-1-size)\n var(--bl-font-family);\n\n /* Font Style: Heading 2 */\n --bl-font-heading-2-font-size: var(--bl-font-size-3xl);\n --bl-font-heading-2-line-height: calc(var(--bl-font-heading-2-font-size) + var(--bl-size-3xs));\n --bl-font-heading-2-size: var(--bl-font-heading-2-font-size) /\n var(--bl-font-heading-2-line-height);\n --bl-font-heading-2: var(--bl-font-weight-regular) var(--bl-font-heading-2-size)\n var(--bl-font-family);\n\n /* Font Style: Heading 3 */\n --bl-font-heading-3-font-size: var(--bl-font-size-2xl);\n --bl-font-heading-3-line-height: calc(var(--bl-font-heading-3-font-size) + var(--bl-size-3xs));\n --bl-font-heading-3-size: var(--bl-font-heading-3-font-size) /\n var(--bl-font-heading-3-line-height);\n --bl-font-heading-3: var(--bl-font-weight-regular) var(--bl-font-heading-3-size)\n var(--bl-font-family);\n\n /* Font Style: Title 1 */\n --bl-font-title-1-font-size: var(--bl-font-size-xl);\n --bl-font-title-1-line-height: calc(var(--bl-font-title-1-font-size) + var(--bl-size-3xs));\n --bl-font-title-1-size: var(--bl-font-title-1-font-size) / var(--bl-font-title-1-line-height);\n --bl-font-title-1: var(--bl-font-title-1-size) var(--bl-font-family);\n --bl-font-title-1-regular: var(--bl-font-weight-regular) var(--bl-font-title-1);\n --bl-font-title-1-medium: var(--bl-font-weight-medium) var(--bl-font-title-1);\n --bl-font-title-1-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-1);\n --bl-font-title-1-bold: var(--bl-font-weight-bold) var(--bl-font-title-1);\n\n /* Font Style: Title 2 */\n --bl-font-title-2-font-size: var(--bl-font-size-l);\n --bl-font-title-2-line-height: calc(var(--bl-font-title-2-font-size) + var(--bl-size-3xs));\n --bl-font-title-2-size: var(--bl-font-title-2-font-size) / var(--bl-font-title-2-line-height);\n --bl-font-title-2: var(--bl-font-title-2-size) var(--bl-font-family);\n --bl-font-title-2-regular: var(--bl-font-weight-regular) var(--bl-font-title-2);\n --bl-font-title-2-medium: var(--bl-font-weight-medium) var(--bl-font-title-2);\n --bl-font-title-2-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-2);\n --bl-font-title-2-bold: var(--bl-font-weight-bold) var(--bl-font-title-2);\n\n /* Font Style: Title 3 */\n --bl-font-title-3-font-size: var(--bl-font-size-m);\n --bl-font-title-3-line-height: calc(var(--bl-font-title-3-font-size) + var(--bl-size-4xs));\n --bl-font-title-3-size: var(--bl-font-title-3-font-size) / var(--bl-font-title-3-line-height);\n --bl-font-title-3: var(--bl-font-title-3-size) var(--bl-font-family);\n --bl-font-title-3-regular: var(--bl-font-weight-regular) var(--bl-font-title-3);\n --bl-font-title-3-medium: var(--bl-font-weight-medium) var(--bl-font-title-3);\n --bl-font-title-3-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-3);\n --bl-font-title-3-bold: var(--bl-font-weight-bold) var(--bl-font-title-3);\n\n /* Font Style: Title 4 */\n --bl-font-title-4-font-size: var(--bl-font-size-s);\n --bl-font-title-4-line-height: calc(var(--bl-font-title-4-font-size) + var(--bl-size-4xs));\n --bl-font-title-4-size: var(--bl-font-title-4-font-size) / var(--bl-font-title-4-line-height);\n --bl-font-title-4: var(--bl-font-title-4-size) var(--bl-font-family);\n --bl-font-title-4-regular: var(--bl-font-weight-regular) var(--bl-font-title-4);\n --bl-font-title-4-medium: var(--bl-font-weight-medium) var(--bl-font-title-4);\n --bl-font-title-4-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-4);\n --bl-font-title-4-bold: var(--bl-font-weight-bold) var(--bl-font-title-4);\n\n /* Font Style: Body Text 1 */\n --bl-font-body-text-1-font-size: var(--bl-font-size-l);\n --bl-font-body-text-1-line-height: calc(\n var(--bl-font-body-text-1-font-size) + var(--bl-size-4xs)\n );\n --bl-font-body-text-1-size: var(--bl-font-body-text-1-font-size) /\n var(--bl-font-body-text-1-line-height);\n --bl-font-body-text-1: var(--bl-font-weight-regular) var(--bl-font-body-text-1-size)\n var(--bl-font-family);\n\n /* Font Style: Body Text 2 */\n --bl-font-body-text-2-font-size: var(--bl-font-size-m);\n --bl-font-body-text-2-line-height: calc(\n var(--bl-font-body-text-2-font-size) + var(--bl-size-4xs)\n );\n --bl-font-body-text-2-size: var(--bl-font-body-text-2-font-size) /\n var(--bl-font-body-text-2-line-height);\n --bl-font-body-text-2: var(--bl-font-weight-regular) var(--bl-font-body-text-2-size)\n var(--bl-font-family);\n\n /* Font Style: Body Text 3 */\n --bl-font-body-text-3-font-size: var(--bl-font-size-s);\n --bl-font-body-text-3-line-height: calc(\n var(--bl-font-body-text-3-font-size) + var(--bl-size-4xs)\n );\n --bl-font-body-text-3-size: var(--bl-font-body-text-3-font-size) /\n var(--bl-font-body-text-3-line-height);\n --bl-font-body-text-3: var(--bl-font-weight-regular) var(--bl-font-body-text-3-size)\n var(--bl-font-family);\n\n /* Font Style: Caption */\n --bl-font-caption-font-size: var(--bl-font-size-xs);\n --bl-font-caption-line-height: calc(var(--bl-font-caption-font-size) + var(--bl-size-4xs));\n --bl-font-caption-size: var(--bl-font-caption-font-size) / var(--bl-font-caption-line-height);\n --bl-font-caption: var(--bl-font-weight-medium) var(--bl-font-caption-size) var(--bl-font-family);\n}\n"],
|
|
5
|
+
"mappings": "AACA,WACE,0BACA,kBACA,kBACA,oBACA,iFACA,yDAGF,WACE,0BACA,kBACA,kBACA,oBACA,qFACA,iFAGF,WACE,0BACA,kBACA,kBACA,oBACA,+EACA,gEAGF,WACE,0BACA,kBACA,kBACA,oBACA,8EACA,yJAGF,WACE,0BACA,kBACA,kBACA,oBACA,kFACA,2GCzCF,MAEE,4BACA,kCACA,8BACA,oCACA,6BACA,mCACA,4BACA,kCACA,2BACA,iCACA,4BACA,kCACA,gCACA,sCACA,6BACA,mCAGA,oCACA,8CACA,yCACA,wCACA,uCACA,sCACA,uCACA,2CACA,wCAGA,oCACA,sCACA,qCACA,oCACA,0CACA,kCACA,2BAGA,uBACA,sBACA,qBACA,qBACA,qBACA,kBACA,qBACA,qBACA,oBACA,sBACA,oBACA,oBACA,oBAGA,oBACA,mBACA,wBACA,wBACA,uBACA,wBACA,uBACA,6BAGA,8CAGA,4BACA,8BACA,6BACA,+BACA,2BAGA,0BACA,2BACA,yBACA,0BACA,uBACA,2BACA,2BACA,4BACA,yBACA,yBACA,yBAGA,+BACA,6BACA,8BACA,4BACA,mCACA,+BAGA,qDACA,2FACA,8FACA,qEACA,4EACA,gFACA,8EACA,kFACA,0EAGA,uDACA,+FACA,oGAEA,qGAIA,uDACA,+FACA,oGAEA,uGAIA,uDACA,+FACA,oGAEA,uGAIA,oDACA,2FACA,8FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,mDACA,2FACA,8FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,mDACA,2FACA,8FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,mDACA,2FACA,8FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,uDACA,qGAGA,0GAEA,2GAIA,uDACA,qGAGA,0GAEA,2GAIA,uDACA,qGAGA,0GAEA,2GAIA,oDACA,2FACA,8FACA",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-control.d.ts","sourceRoot":"","sources":["../../src/utilities/form-control.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"form-control.d.ts","sourceRoot":"","sources":["../../src/utilities/form-control.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,oBAAoB;;sBAEb,WAAW,GAAG;QAAE,gBAAgB,EAAE,gBAAgB,CAAA;KAAE;GAMrE,CAAC;AAEJ,eAAO,MAAM,uBAAuB;sBAEhB,WAAW,GAAG;QAAE,gBAAgB,EAAE,mBAAmB,CAAA;KAAE;;;;;sBAAvD,WAAW,GAAG;QAAE,gBAAgB,EAAE,mBAAmB,CAAA;KAAE;;;;CAM1E,CAAC;AAEF,eAAO,MAAM,kBAAkB;;sBAlBX,WAAW,GAAG;QAAE,gBAAgB,EAAE,gBAAgB,CAAA;KAAE;;sBAUpD,WAAW,GAAG;QAAE,gBAAgB,EAAE,mBAAmB,CAAA;KAAE;;;;IAQS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trendyol/baklava",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.90",
|
|
4
4
|
"description": "Trendyol Baklava Design System",
|
|
5
5
|
"main": "dist/baklava.js",
|
|
6
6
|
"module": "dist/baklava.js",
|
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist/"
|
|
13
13
|
],
|
|
14
|
+
"homepage": "https://github.com/Trendyol/baklava",
|
|
15
|
+
"repository": "github:Trendyol/baklava",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/Trendyol/baklava/issues"
|
|
18
|
+
},
|
|
14
19
|
"author": {
|
|
15
20
|
"name": "Trendyol Tech",
|
|
16
21
|
"url": "https://github.com/Trendyol"
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/components/select/bl-select.css", "../src/components/select/bl-select.ts"],
|
|
4
|
-
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{width:200px;display:inline-block}.select-wrapper{width:100%;position:relative;display:flex;flex-direction:column;gap:var(--bl-size-3xs);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--background-color:var(--bl-color-primary-background);--border-color:var(--bl-color-border);--border-focus-color:var(--bl-color-primary-hover);--icon-color:var(--bl-color-content-tertiary);--text-color:var(--bl-color-content-primary);--label-color:var(--bl-color-content-secondary);--placeholder-color:var(--bl-color-content-tertiary);--height:var(--bl-size-2xl);--menu-padding:0 var(--bl-size-m);--menu-margin-top:var(--bl-size-2xs);--font-size:var(--bl-font-size-m);--disabled-color:var(--bl-color-tertiary);--menu-height:250px;--popover-position:var(--bl-popover-position,fixed)}:host([size='large']) .select-wrapper{--height:var(--bl-size-3xl);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-m)}:host([size='small']) .select-wrapper{--height:var(--bl-size-xl);--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-xs);--font-size:var(--bl-font-size-s)}:host([disabled]) .select-wrapper{--placeholder-color:var(--bl-color-content-passive)}.dirty.invalid{--border-color:var(--bl-color-danger);--border-focus-color:var(--bl-color-danger-hover);--label-color:var(--bl-color-danger)}.select-input{display:flex;align-items:center;justify-content:space-between;cursor:pointer;box-sizing:border-box;height:var(--height);border:solid 1px var(--border-color);font:var(--bl-font-title-3-regular);padding:0 var(--padding-horizontal);border-radius:var(--bl-border-radius-s);color:var(--text-color);-webkit-user-select:none;user-select:none}.placeholder{color:var(--placeholder-color);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.select-wrapper.selected .placeholder,:host([label]:not([label-fixed])) .select-wrapper:not(.select-open) .placeholder{display:none}.remove-all{display:none}.remove-all::after{content:'';position:absolute;left:1.5rem;bottom:4px;height:1rem;border-left:1px solid var(--bl-color-border)}.selected .remove-all{display:block}:host([disabled]) .remove-all,:host([disabled]) .remove-all::after{display:none}.dropdown-icon{font-size:var(--bl-font-size-m)}.dropdown-icon.open{display:none}.select-open .dropdown-icon.open{display:inline-block}.select-open .dropdown-icon.closed{display:none}.selected .dropdown-icon{--icon-color:var(--bl-color-secondary)}:host([disabled]) .dropdown-icon{--icon-color:var(--bl-color-content-passive)}.select-open .select-input,.select-input:focus-visible{border:solid 1px var(--border-focus-color);outline:0}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{flex:1;padding:0;margin:0;list-style:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.selected-options li{display:inline;font-size:var(--font-size);color:var(--text-color)}.selected-options li:not(:last-child)::after{content:', '}.select-input:not(.has-overflowed-options) .additional-selection-count{display:none}:host([disabled]) .selected-options li{color:var(--bl-color-content-passive)}.select-input .actions{display:flex;align-items:center;justify-content:center;gap:var(--bl-size-2xs);margin-left:var(--bl-size-2xs)}.popover{--left:0;--top:0;position:var(--popover-position);border:solid 1px var(--border-color);background-color:var(--background-color);font:var(--bl-font-title-3-regular);border-radius:var(--bl-border-radius-s);padding:var(--menu-padding);outline:0;box-sizing:border-box;max-height:var(--menu-height);overflow-y:auto;display:none;flex-direction:column;z-index:var(--bl-index-popover);width:100%;top:var(--top);left:var(--left)}.select-open .popover{display:flex;border:solid 1px var(--border-focus-color)}bl-icon{color:var(--icon-color)}label{position:absolute;display:block;top:var(--padding-vertical);left:var(--padding-horizontal);right:calc(var(--bl-size-2xs) + var(--bl-size-m) + var(--bl-size-2xs));max-width:max-content;transition:all ease-in .2s;pointer-events:none;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color);padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:where(.select-open,.selected) label{top:0;left:var(--bl-size-2xs);transform:translateY(-50%);font:var(--bl-font-caption);color:var(--label-color);padding:0 var(--bl-size-3xs);background-color:var(--bl-color-primary-background);pointer-events:initial;right:var(--padding-horizontal)}:host([label-fixed]) label{position:static;padding:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--label-color)}.hint{display:none;font:var(--bl-font-body-text-3)}.hint p{padding:0;margin:0}.error-icon,.invalid-text{display:none}.dirty.invalid label,.invalid-text,.error-icon{color:var(--bl-color-danger)}.help-text{color:var(--bl-color-content-secondary)}.select-open .help-text,.select-open .invalid-text{visibility:hidden}:host([help-text]) .hint,.dirty.invalid .hint{display:block}.dirty.invalid .invalid-text{display:block}.dirty.invalid .help-text{display:none}`;\nexport default styles;\n", "import { autoUpdate, computePosition, flip, MiddlewareArguments, offset, size } from '@floating-ui/dom';\nimport { FormControlMixin, requiredValidator } from '@open-wc/form-control';\nimport { FormValue } from '@open-wc/form-helpers';\nimport 'element-internals-polyfill';\nimport { CSSResultGroup, html, LitElement, PropertyValues } from 'lit';\nimport { customElement, property, query, queryAll, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport '../icon/bl-icon';\nimport style from '../select/bl-select.css';\nimport '../select/option/bl-select-option';\nimport type BlSelectOption from './option/bl-select-option';\n\nexport interface ISelectOption<T> {\n value: T;\n text: string;\n selected: boolean;\n}\n\nexport type SelectSize = 'medium' | 'large' | 'small';\n\nexport type CleanUpFunction = () => void;\n\n\n/**\n * @tag bl-select\n * @summary Baklava Select component\n *\n * @cssproperty --bl-popover-position - Sets the positioning strategy of select popover. You can set it as `absolute` if you need to show popover relative to its trigger element. Default value is `fixed`\n */\n@customElement('bl-select')\nexport default class BlSelect<ValueType extends FormValue = string> extends FormControlMixin(LitElement) {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n static formControlValidators = [requiredValidator];\n\n /**\n * Sets name of the select field\n */\n @property()\n name: string;\n\n private _value: ValueType | ValueType[] | null;\n\n private _initialValue: ValueType | ValueType[] | null;\n\n /**\n * Sets the value of the select\n */\n @property()\n get value(): ValueType | ValueType[] | null {\n return this._value;\n }\n\n set value(val: ValueType | ValueType[] | null) {\n this._value = val;\n\n if (Array.isArray(val)) {\n const formData = new FormData();\n val.forEach((option) => formData.append(this.name, `${option}`));\n this.setValue(formData);\n } else {\n this.setValue(val);\n }\n\n this.setOptionsSelected();\n }\n\n shouldFormValueUpdate(): boolean {\n return this.value !== null && this.value !== '';\n }\n\n /* Declare reactive properties */\n /**\n * Sets the label value\n */\n @property({ reflect: true })\n label?: string;\n\n /**\n * Sets the placeholder value. If left blank, the label value (if specified) is set as placeholder.\n */\n @property({})\n placeholder?: string;\n\n /**\n * Sets the size value. Select component's height value will be changed accordingly\n */\n @property({ type: String, reflect: true })\n size: SelectSize = 'medium';\n\n /**\n * When option is not selected, shows component in error state\n */\n @property({ type: Boolean, reflect: true })\n required = false;\n\n /**\n * Shows the component in disabled state.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Allows multiple options to be selected\n */\n @property({ type: Boolean })\n multiple = false;\n\n /**\n * Sets input to get keyboard focus automatically\n */\n @property({ type: Boolean, reflect: true })\n autofocus = false;\n\n /**\n * Makes label as fixed positioned\n */\n @property({ type: Boolean, attribute: 'label-fixed', reflect: true })\n labelFixed = false;\n\n /**\n * Adds help text\n */\n @property({ type: String, attribute: 'help-text' })\n helpText?: string;\n\n /**\n * Set custom error message\n */\n @property({ type: String, attribute: 'invalid-text' })\n customInvalidText?: string;\n\n /* Declare internal reactive properties */\n @state()\n private _isPopoverOpen = false;\n\n\n @state()\n private _additionalSelectedOptionCount = 0;\n\n @query('.selected-options')\n private selectedOptionsContainer!: HTMLElement;\n\n @queryAll('.selected-options li')\n private selectedOptionsItems!: NodeListOf<HTMLElement>;\n\n @query('.popover')\n private _popover: HTMLElement;\n\n @query('.select-input')\n private _selectInput: HTMLElement;\n\n /**\n * Fires when selection changes\n */\n @event('bl-select') private _onBlSelect: EventDispatcher<ISelectOption<ValueType>[]>;\n\n private _connectedOptions: BlSelectOption<ValueType>[] = [];\n\n private _cleanUpPopover: CleanUpFunction | null = null;\n\n private setOptionsSelected() {\n this._connectedOptions\n .forEach(\n (option) => option.selected = (\n this.value === option.value ||\n (Array.isArray(this.value) && this.value.includes(option.value))\n )\n );\n\n this._selectedOptions = [...this.options\n .filter(option => option.selected)\n ];\n }\n\n get options() {\n return this._connectedOptions;\n }\n\n get opened() {\n return this._isPopoverOpen;\n }\n\n @state()\n private _selectedOptions: BlSelectOption<ValueType>[] = [];\n\n @state()\n private dirty = false;\n\n get selectedOptions(): BlSelectOption<ValueType>[] {\n return this._selectedOptions;\n }\n\n get additionalSelectedOptionCount() {\n return this._additionalSelectedOptionCount;\n }\n\n validityCallback(): string | void {\n if (this.customInvalidText) {\n return this.customInvalidText;\n }\n const select = document.createElement('select');\n select.required = this.required;\n\n return select.validationMessage;\n }\n\n reportValidity() {\n this.dirty = true;\n return this.checkValidity();\n }\n\n resetFormControl(): void {\n this.value = this._initialValue;\n }\n\n @query('.select-input')\n validationTarget: HTMLElement;\n\n open() {\n this._isPopoverOpen = true;\n this._setupPopover();\n document.addEventListener('click', this._interactOutsideHandler, true);\n document.addEventListener('focus', this._interactOutsideHandler, true);\n }\n\n close() {\n this._isPopoverOpen = false;\n this.focusedOptionIndex = -1;\n this._cleanUpPopover && this._cleanUpPopover();\n document.removeEventListener('click', this._interactOutsideHandler, true);\n document.removeEventListener('focus', this._interactOutsideHandler, true);\n }\n\n private _interactOutsideHandler = (event: MouseEvent | FocusEvent) => {\n const eventPath = event.composedPath() as HTMLElement[];\n\n if (!eventPath?.find(el => el.tagName === 'BL-SELECT')?.contains(this)) {\n this.close();\n }\n };\n\n private _setupPopover() {\n this._cleanUpPopover = autoUpdate(this._selectInput, this._popover, () => {\n computePosition(this._selectInput, this._popover, {\n placement: 'bottom',\n strategy: 'fixed',\n middleware: [\n flip(),\n offset(8),\n size({\n apply(args: MiddlewareArguments) {\n Object.assign(args.elements.floating.style, {\n width: `${args.elements.reference.getBoundingClientRect().width}px`,\n });\n },\n }),\n ],\n }).then(({ x, y }) => {\n this._popover.style.setProperty('--left', `${x}px`);\n this._popover.style.setProperty('--top', `${y}px`);\n });\n });\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n\n this.form?.addEventListener('submit', (e: SubmitEvent) => {\n if (!this.reportValidity()) {\n e.preventDefault();\n }\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this._cleanUpPopover && this._cleanUpPopover();\n }\n\n private inputTemplate() {\n const inputSelectedOptions = html`<ul class=\"selected-options\">\n ${this._selectedOptions.map(item => html`<li>${item.textContent}</li>`)}\n </ul>`;\n const removeButton = html`<bl-button\n class=\"remove-all\"\n size=\"small\"\n variant=\"tertiary\"\n kind=\"neutral\"\n icon=\"close\"\n @click=${this._onClickRemove}></bl-button>`;\n\n return html`<div\n class=${classMap({\n 'select-input': true,\n 'has-overflowed-options': this._additionalSelectedOptionCount > 0\n })}\n tabindex=\"${this.disabled ? '-1' : 0}\"\n ?autofocus=${this.autofocus}\n @click=${this.togglePopover}\n >\n <span class=\"placeholder\">${this.placeholder}</span>\n ${inputSelectedOptions}\n <span class=\"additional-selection-count\">+${this._additionalSelectedOptionCount}</span>\n <div class=\"actions\">\n ${this.multiple ? removeButton : null}\n <bl-icon\n class=\"dropdown-icon open\"\n name=\"arrow_up\"\n ></bl-icon>\n\n <bl-icon\n class=\"dropdown-icon closed\"\n name=\"arrow_down\"\n ></bl-icon>\n </div>\n </div>`;\n }\n\n render() {\n const invalidMessage = !this.checkValidity()\n ? html`<p id=\"errorMessage\" aria-live=\"polite\" class=\"invalid-text\">\n ${this.validationMessage}\n </p>`: '';\n\n const helpMessage = this.helpText && !invalidMessage\n ? html`<p class=\"help-text\">${this.helpText}</p>` : '';\n\n const label = this.label\n ? html`<label>${this.label}</label>` : '';\n\n return html`<div\n class=${classMap({\n 'select-wrapper': true,\n 'select-open': this.opened,\n 'selected': this._selectedOptions.length > 0,\n 'invalid': !this.validity.valid,\n 'dirty': this.dirty\n })}\n @keydown=${this.handleKeydown}\n >\n ${label}\n ${this.inputTemplate()}\n <div class=\"popover\" tabindex=\"${ifDefined(this._isPopoverOpen ? undefined : '-1')}\" @bl-select-option=${this._handleSelectOptionEvent}>\n <slot></slot>\n </div>\n <div class=\"hint\">${invalidMessage} ${helpMessage}</div>\n </div> `;\n }\n\n private focusedOptionIndex = -1;\n\n private handleKeydown(event: KeyboardEvent) {\n if (this.focusedOptionIndex === -1 && ['Enter', 'Space'].includes(event.code)) {\n this.togglePopover();\n event.preventDefault();\n } else if (this._isPopoverOpen === false && ['ArrowDown', 'ArrowUp'].includes(event.code)) {\n this.open();\n event.preventDefault();\n } else if (event.code === 'Escape') {\n this.close();\n event.preventDefault();\n } else if (this._isPopoverOpen && ['ArrowDown', 'ArrowUp'].includes(event.code)) {\n event.code === 'ArrowDown' && this.focusedOptionIndex++;\n event.code === 'ArrowUp' && this.focusedOptionIndex--;\n\n // Don't exceed array indexes\n this.focusedOptionIndex = Math.max(\n 0,\n Math.min(this.focusedOptionIndex, this.options.length - 1)\n );\n\n this.options[this.focusedOptionIndex].focus();\n\n event.preventDefault();\n }\n\n }\n\n private togglePopover() {\n this._isPopoverOpen ? this.close() : this.open();\n }\n\n private _handleSelectEvent() {\n this._onBlSelect(this._selectedOptions.map(option => ({\n value: option.value,\n selected: option.selected,\n text: option.textContent\n } as ISelectOption<ValueType>)));\n }\n\n private _handleSingleSelect(optionItem: BlSelectOption<ValueType>) {\n this.value = optionItem.value;\n\n this._handleSelectEvent();\n this._isPopoverOpen = false;\n }\n\n private _handleMultipleSelect() {\n this.value = this._connectedOptions.filter((option) => option.selected).map(option => option.value);\n\n this._handleSelectEvent();\n }\n\n private _handleSelectOptionEvent(e: CustomEvent) {\n const optionItem = e.target as BlSelectOption<ValueType>;\n this.dirty = true;\n\n if (this.multiple) {\n this._handleMultipleSelect();\n } else {\n this._handleSingleSelect(optionItem);\n }\n }\n\n private _onClickRemove(e: MouseEvent) {\n e.stopPropagation();\n\n this._connectedOptions\n .filter(option => option.selected)\n .forEach(option => {\n option.selected = false;\n });\n\n this.value = null;\n this._additionalSelectedOptionCount = 0;\n this._handleSelectEvent();\n }\n\n private _checkAdditionalItemCount() {\n if (!this.multiple || !this.selectedOptionsItems || this.selectedOptionsItems.length < 2) {\n this._additionalSelectedOptionCount = 0;\n return;\n }\n\n const firstNonVisibleItemIndex = [...this.selectedOptionsItems]\n .findIndex((item) => item.offsetLeft > this.selectedOptionsContainer.offsetWidth);\n\n if (firstNonVisibleItemIndex > -1) {\n this._additionalSelectedOptionCount = this.selectedOptionsItems.length - firstNonVisibleItemIndex;\n } else {\n this._additionalSelectedOptionCount = 0;\n }\n }\n\n protected firstUpdated(): void {\n if (this.value === undefined) {\n this.value = '' as ValueType;\n }\n\n this._initialValue = this._value;\n }\n\n protected updated(_changedProperties: PropertyValues) {\n if (\n _changedProperties.has('multiple') &&\n typeof _changedProperties.get('multiple') === 'boolean'\n ) {\n this.value = null;\n }\n\n this._checkAdditionalItemCount();\n }\n\n /**\n * This method is used by `bl-select-option` component to register itself to bl-select.\n * @param option BlSelectOption reference to be registered\n */\n registerOption(option: BlSelectOption<ValueType>) {\n this._connectedOptions.push(option);\n\n if (option.selected) {\n if (this.multiple) {\n if (!Array.isArray(this.value)) {\n this.value = [];\n }\n this.value = [...this.value, option.value];\n } else {\n this.value = option.value;\n }\n }\n\n this.setOptionsSelected();\n this.requestUpdate();\n }\n\n /**\n * This method is used by `bl-select-option` component to unregister itself from bl-select.\n * @param option BlSelectOption reference to be unregistered\n */\n unregisterOption(option: BlSelectOption<ValueType>) {\n this._connectedOptions.splice(this._connectedOptions.indexOf(option), 1);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-select': BlSelect;\n }\n}\n"],
|
|
5
|
-
"mappings": "6YACO,IAAMA,EAASC,6jKACfC,EAAQF,EC8Bf,IAAqBG,EAArB,cAA4EC,EAAiBC,CAAU,CAAE,CAAzG,kCA4DE,UAAmB,SAMnB,cAAW,GAMX,cAAW,GAMX,cAAW,GAMX,eAAY,GAMZ,gBAAa,GAgBb,KAAQ,eAAiB,GAIzB,KAAQ,+BAAiC,EAmBzC,KAAQ,kBAAiD,CAAC,EAE1D,KAAQ,gBAA0C,KAyBlD,KAAQ,iBAAgD,CAAC,EAGzD,KAAQ,MAAQ,GA+ChB,KAAQ,wBAA2BC,GAAmC,CA9OxE,IAAAC,EA+OI,IAAMC,EAAYF,EAAM,aAAa,GAEhCC,EAAAC,GAAA,YAAAA,EAAW,KAAKC,GAAMA,EAAG,UAAY,eAArC,MAAAF,EAAmD,SAAS,OAC/D,KAAK,MAAM,CAEf,EA+GA,KAAQ,mBAAqB,GAlU7B,WAAW,QAAyB,CAClC,MAAO,CAACG,CAAK,CACf,CAkBA,IAAI,OAAwC,CAC1C,OAAO,KAAK,MACd,CAEA,IAAI,MAAMC,EAAqC,CAG7C,GA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EAgGnB,wBAMAiC,EAAA,CADCb,EAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,CAAC,GArGlCpB,EAsGnB,iCAIQiC,EAAA,CADPC,EAAM,GAzGYlC,EA0GX,8BAIAiC,EAAA,CADPC,EAAM,GA7GYlC,EA8GX,8CAGAiC,EAAA,CADPE,EAAM,mBAAmB,GAhHPnC,EAiHX,wCAGAiC,EAAA,CADPb,EAAS,sBAAsB,GAnHbpB,EAoHX,oCAGAiC,EAAA,CADPE,EAAM,UAAU,GAtHEnC,EAuHX,wBAGAiC,EAAA,CADPE,EAAM,eAAe,GAzHHnC,EA0HX,4BAKoBiC,EAAA,CAA3B9B,EAAM,WAAW,GA/HCH,EA+HS,2BA6BpBiC,EAAA,CADPC,EAAM,GA3JYlC,EA4JX,gCAGAiC,EAAA,CADPC,EAAM,GA9JYlC,EA+JX,qBA8BRiC,EAAA,CADCE,EAAM,eAAe,GA5LHnC,EA6LnB,gCA7LmBA,EAArBiC,EAAA,CADCb,EAAc,WAAW,GACLpB",
|
|
6
|
-
"names": ["styles", "i", "bl_select_default", "BlSelect", "FormControlMixin", "s", "event", "_a", "eventPath", "el", "bl_select_default", "val", "formData", "option", "select", "P", "z", "b", "O", "k", "args", "x", "y", "e", "inputSelectedOptions", "item", "removeButton", "o", "invalidMessage", "helpMessage", "label", "l", "optionItem", "firstNonVisibleItemIndex", "_changedProperties", "requiredValidator", "__decorateClass", "t", "i"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/components/switch/bl-switch.css", "../src/components/switch/bl-switch.ts"],
|
|
4
|
-
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{display:inline-block;cursor:pointer}span{display:inline-block}.switch{--track-height:var(--bl-size-xl);--track-width:var(--bl-size-4xl);--thumb-offset:var(--bl-size-4xs);--thumb-height:calc(var(--track-height) - calc(2 * var(--thumb-offset)));--thumb-width:var(--thumb-height);--animation-duration:var(--bl-switch-animation-duration,300ms);--switch-color:var(--bl-switch-color,var(--bl-color-primary));background-color:var(--bl-color-content-passive);border-radius:var(--bl-border-radius-pill);height:var(--track-height);transition-property:background-color;transition-duration:var(--animation-duration);width:var(--track-width)}.switch::before{content:\"\";display:inline-block;background-color:white;border-radius:var(--bl-border-radius-circle);height:var(--thumb-height);left:var(--thumb-offset);position:relative;top:var(--thumb-offset);transition:transform;transition-duration:var(--animation-duration);width:var(--thumb-width)}:host([checked]) .switch{background-color:var(--switch-color)}:host([checked]) .switch::before{transform:translateX(calc(var(--track-width) - var(--thumb-width) - calc(2 * var(--thumb-offset))))}:host([disabled]) .switch{opacity:.5}:host([disabled]){cursor:not-allowed}.switch:focus-visible{position:relative;outline:0}.switch:focus-visible::after{border:2px solid var(--switch-color);border-radius:var(--bl-border-radius-pill);content:\"\";position:absolute;top:-3px;right:-3px;bottom:-3px;left:-3px}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport style from './bl-switch.css';\n\nexport const blSwitchTag = 'bl-switch';\n\n/**\n * @tag bl-switch\n * @summary Baklava Switch component\n */\n@customElement(blSwitchTag)\nexport default class BlSwitch extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets the checked state for switch\n */\n @property({ type: Boolean, reflect: true })\n checked = false;\n\n /**\n * Sets the disabled state for switch\n */\n @property({ type: Boolean, reflect: true })\n disabled? = false;\n\n /**\n * Fires whenever user toggles the switch\n */\n @event('bl-switch-toggle') private onToggle: EventDispatcher<boolean>;\n\n toggle() {\n if (this.disabled) return;\n\n this.checked = !this.checked;\n this.onToggle(this.checked);\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (event.code === 'Enter' || event.code === 'Space') {\n this.toggle();\n event.preventDefault();\n }\n }\n\n render(): TemplateResult {\n const ariaLabel = this.ariaLabel ?? this.attributes.getNamedItem(\"aria-label\")?.value ?? undefined;\n\n return html`\n <span\n class=\"switch\"\n role=\"switch\"\n aria-checked=${this.checked}\n aria-readonly=${!!this.disabled}\n @click=${this.toggle}\n @keydown=${this.handleKeyDown}\n aria-label=${ifDefined(ariaLabel)}\n tabindex=\"0\"\n >\n </span>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blSwitchTag]: BlSwitch;\n }\n}\n"],
|
|
5
|
-
"mappings": "4LACO,IAAMA,EAASC,g6CACfC,EAAQF,ECIR,IAAMG,EAAc,YAONC,EAArB,cAAsCC,CAAW,CAAjD,kCASE,aAAU,GAMV,cAAY,GAdZ,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAmBA,QAAS,CACH,KAAK,WAET,KAAK,QAAU,CAAC,KAAK,QACrB,KAAK,SAAS,KAAK,OAAO,EAC5B,CAEQ,cAAcC,EAAsB,EACtCA,EAAM,OAAS,SAAWA,EAAM,OAAS,WAC3C,KAAK,OAAO,EACZA,EAAM,eAAe,EAEzB,CAEA,QAAyB,CAjD3B,IAAAC,EAAAC,EAAAC,EAkDI,IAAMC,GAAYD,GAAAD,EAAA,KAAK,YAAL,KAAAA,GAAkBD,EAAA,KAAK,WAAW,aAAa,YAAY,IAAzC,YAAAA,EAA4C,QAA9D,KAAAE,EAAuE,OAEzF,OAAOE;AAAA;AAAA;AAAA;AAAA,uBAIY,KAAK;AAAA,wBACJ,CAAC,CAAC,KAAK;AAAA,iBACd,KAAK;AAAA,mBACH,KAAK;AAAA,qBACHC,EAAUF,CAAS;AAAA;AAAA;AAAA;AAAA,KAKtC,CACF,EA5CEG,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GARvBX,EASnB,uBAMAU,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAdvBX,EAenB,wBAKmCU,EAAA,CAAlCP,EAAM,kBAAkB,GApBNH,EAoBgB,wBApBhBA,EAArBU,EAAA,CADCC,EAAcZ,CAAW,GACLC",
|
|
6
|
-
"names": ["styles", "i", "bl_switch_default", "blSwitchTag", "BlSwitch", "s", "bl_switch_default", "event", "_a", "_b", "_c", "ariaLabel", "y", "l", "__decorateClass", "e"]
|
|
7
|
-
}
|
package/dist/chunk-6J4GSOJU.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{a as i,b as l,f as o,g as u,h as a,i as s,j as p}from"./chunk-57PTZNIL.js";import{a as r}from"./chunk-NZ3RGSR6.js";var v=i`.progress-indicator{--max:100;--value:0;--value-color:var(--bl-color-success);--height:var(--bl-size-2xs);--radius:var(--bl-size-3xs);position:relative;background-color:var(--bl-color-secondary-background);height:var(--height);border-radius:var(--radius);width:100%}.progress-indicator::before{content:'';position:absolute;height:100%;width:calc(100% / var(--max) * var(--value));background-color:var(--value-color);border-radius:var(--radius)}:host([size='small']) .progress-indicator{--height:var(--bl-size-3xs);--radius:var(--bl-size-4xs)}:host([size='large']) .progress-indicator{--height:var(--bl-size-xs);--radius:6px}:host([failed]) .progress-indicator{--value-color:var(--bl-color-danger)}`,m=v;var e=class extends o{constructor(){super(...arguments);this.size="medium";this.failed=!1;this._max=100;this._value=0}static get styles(){return m}get max(){return this._max}set max(t){this._max=t,this.updateCssVariable()}get value(){return this._value}set value(t){this._value=t,this.updateCssVariable()}async updateCssVariable(){await this.updateComplete,this.wrapper.style.setProperty("--value",`${this.value}`),this.wrapper.style.setProperty("--max",`${this.max}`)}render(){return l`<div
|
|
2
|
-
class="progress-indicator"
|
|
3
|
-
role="progressbar"
|
|
4
|
-
aria-valuemax="${this._max}"
|
|
5
|
-
aria-valuenow="${this._value}"
|
|
6
|
-
></div>`}};r([p(".progress-indicator")],e.prototype,"wrapper",2),r([a({type:String,reflect:!0})],e.prototype,"size",2),r([a({type:Boolean,reflect:!0})],e.prototype,"failed",2),r([a({type:Number})],e.prototype,"max",1),r([a({type:Number})],e.prototype,"value",1),r([s()],e.prototype,"_max",2),r([s()],e.prototype,"_value",2),e=r([u("bl-progress-indicator")],e);export{e as a};
|
|
7
|
-
//# sourceMappingURL=chunk-6J4GSOJU.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/components/progress-indicator/bl-progress-indicator.css", "../src/components/progress-indicator/bl-progress-indicator.ts"],
|
|
4
|
-
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`.progress-indicator{--max:100;--value:0;--value-color:var(--bl-color-success);--height:var(--bl-size-2xs);--radius:var(--bl-size-3xs);position:relative;background-color:var(--bl-color-secondary-background);height:var(--height);border-radius:var(--radius);width:100%}.progress-indicator::before{content:'';position:absolute;height:100%;width:calc(100% / var(--max) * var(--value));background-color:var(--value-color);border-radius:var(--radius)}:host([size='small']) .progress-indicator{--height:var(--bl-size-3xs);--radius:var(--bl-size-4xs)}:host([size='large']) .progress-indicator{--height:var(--bl-size-xs);--radius:6px}:host([failed]) .progress-indicator{--value-color:var(--bl-color-danger)}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport style from './bl-progress-indicator.css';\n\nexport type ProgressIndicatorSize = 'small' | 'medium' | 'large';\n\n/**\n * @tag bl-progress-indicator\n * @summary Baklava Progress Indicator component\n *\n * @property {max} [max=100]\n * @property {number} [value=0]\n */\n\n@customElement('bl-progress-indicator')\nexport default class BlProgressIndicator extends LitElement {\n static get styles(): CSSResultGroup {\n return style;\n }\n\n @query('.progress-indicator') private wrapper: HTMLElement;\n\n /**\n * Sets the size\n */\n @property({ type: String, reflect: true })\n size: ProgressIndicatorSize = 'medium';\n\n /**\n * Sets the status\n */\n @property({ type: Boolean, reflect: true })\n failed = false;\n\n /**\n * Sets the max\n */\n @property({ type: Number })\n get max() {\n return this._max;\n }\n set max(max: number) {\n this._max = max;\n this.updateCssVariable();\n }\n\n /**\n * Sets the value\n */\n @property({ type: Number })\n get value() {\n return this._value;\n }\n set value(value: number) {\n this._value = value;\n this.updateCssVariable();\n }\n\n @state() private _max = 100;\n @state() private _value = 0;\n\n async updateCssVariable() {\n await this.updateComplete;\n this.wrapper.style.setProperty('--value', `${this.value}`);\n this.wrapper.style.setProperty('--max', `${this.max}`);\n }\n\n render(): TemplateResult {\n return html`<div\n class=\"progress-indicator\"\n role=\"progressbar\"\n aria-valuemax=\"${this._max}\"\n aria-valuenow=\"${this._value}\"\n ></div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-progress-indicator': BlProgressIndicator;\n }\n}\n"],
|
|
5
|
-
"mappings": "0HACO,IAAMA,EAAS,6rBACfC,EAAQD,ECaf,IAAqBE,EAArB,cAAiDC,CAAW,CAA5D,kCAWE,UAA8B,SAM9B,YAAS,GA0BA,KAAQ,KAAO,IACf,KAAQ,OAAS,EA3C1B,WAAW,QAAyB,CAClC,OAAOC,CACT,CAoBA,IAAI,KAAM,CACR,OAAO,KAAK,IACd,CACA,IAAI,IAAIC,EAAa,CACnB,KAAK,KAAOA,EACZ,KAAK,kBAAkB,CACzB,CAMA,IAAI,OAAQ,CACV,OAAO,KAAK,MACd,CACA,IAAI,MAAMC,EAAe,CACvB,KAAK,OAASA,EACd,KAAK,kBAAkB,CACzB,CAKA,MAAM,mBAAoB,CACxB,MAAM,KAAK,eACX,KAAK,QAAQ,MAAM,YAAY,UAAW,GAAG,KAAK,OAAO,EACzD,KAAK,QAAQ,MAAM,YAAY,QAAS,GAAG,KAAK,KAAK,CACvD,CAEA,QAAyB,CACvB,OAAOC;AAAA;AAAA;AAAA,uBAGY,KAAK;AAAA,uBACL,KAAK;AAAA,YAE1B,CACF,EAvDwCC,EAAA,CAArCC,EAAM,qBAAqB,GALTP,EAKmB,uBAMtCM,EAAA,CADCE,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAVtBR,EAWnB,oBAMAM,EAAA,CADCE,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAhBvBR,EAiBnB,sBAMIM,EAAA,CADHE,EAAS,CAAE,KAAM,MAAO,CAAC,GAtBPR,EAuBf,mBAYAM,EAAA,CADHE,EAAS,CAAE,KAAM,MAAO,CAAC,GAlCPR,EAmCf,qBAQaM,EAAA,CAAhBG,EAAM,GA3CYT,EA2CF,oBACAM,EAAA,CAAhBG,EAAM,GA5CYT,EA4CF,sBA5CEA,EAArBM,EAAA,CADCE,EAAc,uBAAuB,GACjBR",
|
|
6
|
-
"names": ["styles", "bl_progress_indicator_default", "BlProgressIndicator", "s", "bl_progress_indicator_default", "max", "value", "y", "__decorateClass", "i", "e", "t"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/components/dialog/bl-dialog.css", "../src/components/dialog/bl-dialog.ts"],
|
|
4
|
-
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`.container{--background-color:var(--bl-color-primary-background);display:flex;flex-direction:column;background:var(--background-color);max-width:calc(100vw - var(--bl-size-4xl));max-height:calc(100vh - var(--bl-size-4xl));min-width:424px;padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog,.dialog-polyfill .container{padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog-polyfill .container{position:fixed;z-index:var(--bl-index-dialog)}.dialog::backdrop{background:#273142;opacity:.7}.dialog-polyfill{display:none;position:fixed;left:0;top:0;width:100vw;height:100vh;align-items:center;justify-content:center;z-index:var(--bl-index-dialog);background:#273142b3}:host([open]) .dialog-polyfill{display:flex}header{display:flex;justify-content:space-between;align-items:center;gap:var(--bl-size-2xs);padding:var(--bl-size-xl) var(--bl-size-xl) 0 var(--bl-size-xl)}header bl-button{margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;padding:0}.content{padding:var(--bl-size-xl) var(--bl-size-xl) var(--bl-size-m) var(--bl-size-xl);overflow:auto}footer{padding:var(--bl-size-xl);display:flex;flex-flow:row-reverse wrap;gap:var(--bl-size-m)}footer.shadow{box-shadow:0 -4px 15px #27314226}@media only screen and (max-width:471px){.container{max-width:calc(100vw - var(--bl-size-2xl));max-height:calc(100vh - var(--bl-size-2xl));min-width:auto;min-height:auto}footer{flex-flow:column wrap}}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, PropertyValues, TemplateResult } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport '../button/bl-button';\nimport style from './bl-dialog.css';\n\ntype DialogElement = {\n showModal: () => void;\n close: () => void;\n};\n\n\n/**\n * @tag bl-dialog\n * @summary Baklava Dialog component\n */\n@customElement('bl-dialog')\nexport default class BlDialog extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets dialog open-close status\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Sets the dialog title\n */\n @property({ type: String })\n caption?: string;\n\n @query('.dialog')\n private dialog: HTMLDialogElement & DialogElement;\n\n @query('footer')\n private footer: HTMLElement;\n\n @query('.container')\n private container: HTMLElement;\n\n @query('.content')\n private content: HTMLElement;\n\n /**\n * Fires when the dialog is opened\n */\n @event('bl-dialog-open') private onOpen: EventDispatcher<object>;\n\n /**\n * Fires when the dialog is closed\n */\n @event('bl-dialog-close') private onClose: EventDispatcher<object>;\n\n updated(changedProperties: PropertyValues<this>) {\n if (changedProperties.has('open')) {\n this.toggleDialogHandler();\n }\n }\n\n private get hasHtmlDialogSupport() {\n return !!window.HTMLDialogElement;\n }\n\n private get _hasFooter() {\n return [...this.childNodes].some(node => node.nodeName === 'BL-BUTTON');\n }\n\n private toggleDialogHandler() {\n if (this.open) {\n this.dialog?.showModal?.();\n this.onOpen({ isOpen: true });\n document.body.style.overflow = 'hidden';\n this.toggleFooterShadow();\n window?.addEventListener('keydown', event => this.onKeydown(event));\n window?.addEventListener('resize', () => this.toggleFooterShadow());\n } else {\n this.dialog?.close?.();\n this.onClose({ isOpen: false });\n document.body.style.overflow = 'auto';\n window?.removeEventListener('keydown', this.onKeydown);\n window?.removeEventListener('resize', this.toggleFooterShadow);\n }\n }\n\n private closeDialog() {\n this.open = false;\n }\n\n private clickOutsideHandler = (event: MouseEvent) => {\n const eventPath = event.composedPath() as HTMLElement[];\n\n if (!eventPath.includes(this.container)) {\n this.closeDialog();\n }\n };\n\n private onKeydown = (event: KeyboardEvent): void => {\n if (event.code === 'Escape' && this.open) {\n this.closeDialog();\n }\n };\n\n private toggleFooterShadow() {\n if (this.content?.scrollHeight > this.content?.offsetHeight) {\n this.footer?.classList?.add('shadow');\n } else {\n this.footer?.classList?.remove('shadow');\n }\n }\n\n private renderFooter() {\n return this._hasFooter\n ? html`<footer>\n <slot name=\"primary-action\"></slot>\n <slot name=\"secondary-action\"></slot>\n <slot name=\"tertiary-action\"></slot>\n </footer>`\n : '';\n }\n\n private renderContainer() {\n const title = this.caption ? html`<h2 id=\"dialog-caption\">${this.caption}</h2>` : '';\n\n return html` <div class=\"container\">\n <header>\n ${title}\n <bl-button\n @click=\"${this.closeDialog}\"\n icon=\"close\"\n variant=\"tertiary\"\n kind=\"neutral\"\n ></bl-button>\n </header>\n <section class=\"content\"><slot /></section>\n ${this.renderFooter()}\n </div>`;\n }\n\n render(): TemplateResult {\n return this.hasHtmlDialogSupport\n ? html`\n <dialog class=\"dialog\" aria-labelledby=\"dialog-caption\" @click=${this.clickOutsideHandler}>${this.renderContainer()}</dialog>\n `\n : html`<div class=\"dialog-polyfill\" role=\"dialog\" aria-labelledby=\"dialog-caption\" @click=${this.clickOutsideHandler}>\n ${this.renderContainer()}\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-dialog': BlDialog;\n }\n}\n"],
|
|
5
|
-
"mappings": "sJACO,IAAMA,EAASC,s/CACfC,EAAQF,ECef,I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C,EAAA,KAAK,UAAL,YAAAA,EAAc,eAC7CE,GAAAD,EAAA,KAAK,SAAL,YAAAA,EAAa,YAAb,MAAAC,EAAwB,IAAI,WAE5BE,GAAAD,EAAA,KAAK,SAAL,YAAAA,EAAa,YAAb,MAAAC,EAAwB,OAAO,SAEnC,CAEQ,cAAe,CACrB,OAAO,KAAK,WACRC;AAAA;AAAA;AAAA;AAAA,mBAKA,EACN,CAEQ,iBAAkB,CACxB,IAAMC,EAAQ,KAAK,QAAUD,4BAA+B,KAAK,eAAiB,GAElF,OAAOA;AAAA;AAAA,UAEDC;AAAA;AAAA,oBAEU,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAOjB,KAAK,aAAa;AAAA,WAExB,CAEA,QAAyB,CACvB,OAAO,KAAK,qBACRD;AAAA,2EACmE,KAAK,uBAAuB,KAAK,gBAAgB;AAAA,UAEpHA,uFAA0F,KAAK;AAAA,YAC3F,KAAK,gBAAgB;AAAA,eAE/B,CACF,EA5HEE,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GARvBf,EASnB,oBAMAc,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GAdPf,EAenB,uBAGQc,EAAA,CADPE,EAAM,SAAS,GAjBGhB,EAkBX,sBAGAc,EAAA,CADPE,EAAM,QAAQ,GApBIhB,EAqBX,sBAGAc,EAAA,CADPE,EAAM,YAAY,GAvBAhB,EAwBX,yBAGAc,EAAA,CADPE,EAAM,UAAU,GA1BEhB,EA2BX,uBAKyBc,EAAA,CAAhCZ,EAAM,gBAAgB,GAhCJF,EAgCc,sBAKCc,EAAA,CAAjCZ,EAAM,iBAAiB,GArCLF,EAqCe,uBArCfA,EAArBc,EAAA,CADCC,EAAc,WAAW,GACLf",
|
|
6
|
-
"names": ["styles", "i", "bl_dialog_default", "BlDialog", "s", "event", "bl_dialog_default", "changedProperties", "node", "_a", "_b", "_c", "_d", "_e", "_f", "y", "title", "__decorateClass", "e", "i"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/components/radio-group/bl-radio-group.css", "../src/components/radio-group/bl-radio-group.ts", "../src/components/radio-group/radio/bl-radio.css", "../src/components/radio-group/radio/bl-radio.ts"],
|
|
4
|
-
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{display:flex;flex-direction:row}fieldset{border:0;padding:0}legend{font:var(--bl-font-title-3-medium);color:var(--bl-color-content-primary)}.options{display:flex;flex-flow:var(--bl-radio-direction,column) wrap;gap:16px;margin-block:var(--bl-size-xs)}`;\nexport default styles;\n", "import { FormControlMixin } from '@open-wc/form-control';\nimport { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport 'element-internals-polyfill';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport style from './bl-radio-group.css';\nimport BlRadio, { blRadioTag } from './radio/bl-radio';\n\nexport const blRadioGroupTag = 'bl-radio-group';\n\nexport const blChangeEventName = 'bl-radio-change';\n\n/**\n * @tag bl-radio-group\n * @summary Baklava Button component\n *\n * @cssproperty --bl-radio-direction - Can be used for showing radio options as columns instead of rows. Options are `row` or `column`\n */\n@customElement(blRadioGroupTag)\nexport default class BlRadioGroup extends FormControlMixin(LitElement) {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets the radio group label\n */\n @property({ type: String })\n label: string;\n\n /**\n * Set and gets the actual value of the field\n */\n @property()\n value = '';\n\n /**\n * Sets option as required\n */\n @property({ type: Boolean, reflect: true })\n required = false;\n\n get options(): BlRadio[] {\n return [].slice.call(this.querySelectorAll(blRadioTag));\n }\n\n get availableOptions(): BlRadio[] {\n return this.options.filter(option => !option.disabled);\n }\n\n updated(changedProperties: Map<string, unknown>): void {\n if (changedProperties.has('value')) {\n this.setValue(this.value);\n this.onChange(this.value);\n }\n }\n\n /**\n * Fires when radio group value changed\n */\n @event('bl-radio-change') private onChange: EventDispatcher<string>;\n\n private focusedOptionIndex = 0;\n\n private handleOptionChecked(event: CustomEvent) {\n const checkedOption = event.target as BlRadio;\n this.setValue(checkedOption.value);\n this.onChange(checkedOption.value);\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n // Next option\n if (['ArrowDown', 'ArrowRight'].includes(event.key)) {\n this.focusedOptionIndex++;\n\n // Previous option\n } else if (['ArrowUp', 'ArrowLeft'].includes(event.key)) {\n this.focusedOptionIndex--;\n\n // Select option\n } else if ([' '].includes(event.key)) {\n this.availableOptions[this.focusedOptionIndex].select();\n return;\n } else {\n // Other keys are not our interest here\n return;\n }\n\n // Don't exceed array indexes\n this.focusedOptionIndex = Math.max(\n 0,\n Math.min(this.focusedOptionIndex, this.availableOptions.length - 1)\n );\n\n this.availableOptions[this.focusedOptionIndex].focus();\n\n event.preventDefault();\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n\n this.tabIndex = 0;\n this.addEventListener('focus', this.handleFocus);\n this.addEventListener('keydown', this.handleKeyDown);\n }\n\n private handleFocus() {\n this.availableOptions[this.focusedOptionIndex].focus();\n }\n\n render(): TemplateResult {\n return html`<fieldset\n role=\"radiogroup\"\n aria-labelledby=\"label\"\n aria-required=${this.required}\n >\n <legend>${this.label}</legend>\n <div class=\"options\" @bl-checked=${this.handleOptionChecked}>\n <slot></slot>\n </div>\n </fieldset>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blRadioGroupTag]: BlRadioGroup;\n }\n interface HTMLElementEventMap {\n [blChangeEventName]: CustomEvent<string>;\n }\n}\n", "import {css} from 'lit';\nexport const styles = css`:host{display:inline-block;cursor:pointer;outline:0}.wrapper{outline:0}#label{display:flex;font:var(--bl-font-title-3-regular);height:var(--bl-size-m);line-height:normal;vertical-align:middle;margin-block:0;color:var(--bl-color-content-primary)}#label::before{content:'';display:inline-block;box-sizing:border-box;width:var(--bl-size-m);height:var(--bl-size-m);background-color:white;border-radius:var(--bl-border-radius-circle);border:solid 1px var(--bl-color-border);margin-right:var(--bl-size-2xs);vertical-align:middle}.selected #label::before{border-width:4px;border-color:var(--bl-color-primary)}:host(:hover) #label,.selected #label,:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) #label,.selected #label{color:var(--bl-color-primary)}:host([disabled]){cursor:not-allowed;pointer-events:none}:host([disabled]) #label{color:var(--bl-color-content-passive)}:host([disabled]) #label::before{background-color:var(--bl-color-secondary-background)}:host([disabled]) .selected #label::before{background-color:var(--bl-color-content-passive);border-color:var(--bl-color-secondary-background)}.wrapper:focus-visible #label::before{box-shadow:0 0 0 1px white,0 0 0 3px var(--bl-color-primary)}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { event, EventDispatcher } from '../../../utilities/event';\nimport type BlRadioGroup from '../bl-radio-group';\nimport { blChangeEventName, blRadioGroupTag } from '../bl-radio-group';\nimport style from './bl-radio.css';\n\n\nexport const blRadioTag = 'bl-radio';\n\nexport const blCheckedEventName = 'bl-checked';\n\n/**\n * @tag bl-radio\n * @summary Baklava Radio Option component\n */\n@customElement(blRadioTag)\nexport default class BlRadio extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n @property()\n name: string;\n\n @property()\n value: string;\n\n /**\n * Sets option as disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n\n @state() private selected = false;\n\n /**\n * Fires when radio is checked\n */\n @event('bl-checked') private onChecked: EventDispatcher<string>;\n\n /**\n * Fires when radio is blurred\n */\n @event('bl-focus') private onFocus: EventDispatcher<string>;\n\n /**\n * Fires when radio is blurred\n */\n @event('bl-blur') private onBlur: EventDispatcher<string>;\n\n /**\n * Sets this option selected\n */\n select() {\n this.selected = true;\n this.onChecked(this.value);\n }\n\n /**\n * Readonly property to determine if option is currently checked\n */\n get checked() {\n return this.selected;\n }\n\n @query('[role=radio]') private radioElement: HTMLElement;\n\n /**\n * Focuses this option\n */\n focus() {\n this.radioElement.tabIndex = 0;\n this.radioElement.focus();\n this.onFocus(this.value);\n }\n\n /**\n * Blurs from this option\n */\n blur() {\n this.radioElement.tabIndex = -1;\n this.onBlur(this.value);\n }\n\n private handleFieldValueChange = (event: CustomEvent<string>) => {\n const newValue = event.detail;\n this.selected = newValue === this.value;\n }\n\n private field: BlRadioGroup | null;\n\n connectedCallback(): void {\n super.connectedCallback();\n\n this.field = this.closest<BlRadioGroup>(blRadioGroupTag);\n\n if (!this.field) {\n console.warn('bl-radio is designed to be used inside a bl-radio-group', this);\n }\n\n this.field?.addEventListener(blChangeEventName, this.handleFieldValueChange);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.field?.removeEventListener(blChangeEventName, this.handleFieldValueChange);\n }\n\n render(): TemplateResult {\n const classes = classMap({\n wrapper: true,\n selected: this.selected\n });\n\n return html`<div\n class=${classes}\n role=\"radio\"\n aria-labelledby=\"label\"\n aria-disabled=${this.disabled}\n aria-readonly=${this.disabled}\n @blur=${this.blur}\n @click=${this.select}>\n <p id=\"label\"><slot></slot></p>\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blRadioTag]: BlRadio;\n }\n interface HTMLElementEventMap {\n [blCheckedEventName]: CustomEvent<string>\n }\n}\n"],
|
|
5
|
-
"mappings": "kPACO,IAAMA,EAASC,oQACfC,EAAQF,ECMR,IAAMG,EAAkB,iBAElBC,EAAoB,kBASZC,EAArB,cAA0CC,EAAiBC,CAAU,CAAE,CAAvE,kCAeE,WAAQ,GAMR,cAAW,GAsBX,KAAQ,mBAAqB,EA1C7B,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAoBA,IAAI,SAAqB,CACvB,MAAO,CAAC,EAAE,MAAM,KAAK,KAAK,iBAAiBC,CAAU,CAAC,CACxD,CAEA,IAAI,kBAA8B,CAChC,OAAO,KAAK,QAAQ,OAAOC,GAA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EAAA,CADCC,EAAS,GARSZ,EASnB,qBAMAW,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAdvBZ,EAenB,wBAGiBW,EAAA,CAAhBE,EAAM,GAlBYb,EAkBF,wBAKYW,EAAA,CAA5BT,EAAM,YAAY,GAvBAF,EAuBU,yBAKDW,EAAA,CAA1BT,EAAM,UAAU,GA5BCF,EA4BS,uBAKFW,EAAA,CAAzBT,EAAM,SAAS,GAjCGF,EAiCO,sBAiBKW,EAAA,CAA9BG,EAAM,cAAc,GAlDFd,EAkDY,4BAlDZA,EAArBW,EAAA,CADCC,EAAcd,CAAU,GACJE",
|
|
6
|
-
"names": ["styles", "i", "bl_radio_group_default", "blRadioGroupTag", "blChangeEventName", "BlRadioGroup", "FormControlMixin", "s", "bl_radio_group_default", "blRadioTag", "option", "changedProperties", "event", "checkedOption", "y", "__decorateClass", "e", "styles", "i", "bl_radio_default", "blRadioTag", "blCheckedEventName", "BlRadio", "s", "event", "newValue", "bl_radio_default", "_a", "blRadioGroupTag", "blChangeEventName", "classes", "o", "y", "__decorateClass", "e", "t", "i"]
|
|
7
|
-
}
|
package/dist/chunk-C3X43Y7C.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import{a as b}from"./chunk-KPAWUBRO.js";import{a as u}from"./chunk-23UFIOHV.js";import{a as c,b as n,f as p,g as d,h as o}from"./chunk-57PTZNIL.js";import{a as r}from"./chunk-NZ3RGSR6.js";var v=c`:host{display:block}.alert{--padding:var(--bl-size-m);--main-color:var(--bl-color-primary);--main-bg-color:var(--bl-color-accent-primary-background);position:relative;display:flex;align-items:flex-start;justify-content:space-between;background-color:var(--main-bg-color);color:var(--bl-color-content-primary);box-shadow:inset 0 0 0 1px var(--main-color);border-radius:var(--bl-border-radius-s);padding:calc(var(--padding) / 2) var(--padding);padding-right:calc(var(--padding) / 2)}.description{font:var(--bl-font-body-text-2)}.wrapper{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;flex:auto}.content{display:flex;padding:calc(var(--padding) / 2) 0;margin-right:var(--bl-size-2xs);flex:20 1 70%}.icon{margin-right:var(--bl-size-2xs);color:var(--main-color)}.text-content{display:flex;flex-direction:column}.caption{color:var(--bl-color-content-primary);font:var(--bl-font-title-3-medium)}.action{display:flex;align-items:center;flex:1 1 0%}.caption+.description{margin-top:var(--bl-size-2xs)}:host([closed]){display:none}:host([variant='success']) .alert{--main-color:var(--bl-color-success);--main-bg-color:var(--bl-color-success-background)}:host([variant='warning']) .alert{--main-color:var(--bl-color-warning);--main-bg-color:var(--bl-color-warning-background)}:host([variant='danger']) .alert{--main-color:var(--bl-color-danger);--main-bg-color:var(--bl-color-danger-background)}`,m=v;var g=()=>({fromAttribute:i=>!i||i==="true"?!0:i==="false"?!1:i});var t=class extends p{constructor(){super(...arguments);this.variant="info";this.closable=!1;this.closed=!1}static get styles(){return[m]}open(){this.closed=!1}close(){this.closed=!0}get _hasAlertCaptionSlot(){return this.querySelector(':scope > [slot="caption"]')!==null}_closeHandler(){this.closed=!0,this.onClose(!0)}_predefinedIcons(){switch(this.variant){case"success":return"check_fill";case"danger":return"close_fill";default:return this.variant}}_getIcon(){if(this.icon)return this.icon===!0?this._predefinedIcons():this.icon}_initAlertActionSlot(s){s.target.assignedElements().forEach(e=>{var a;if(e.tagName!=="BL-BUTTON"){(a=e.parentNode)==null||a.removeChild(e);return}e.setAttribute("variant","tertiary"),e.setAttribute("kind","neutral"),e.setAttribute("size","medium"),e.removeAttribute("icon")})}render(){let s=this.caption||this._hasAlertCaptionSlot?n`<span class="caption">
|
|
2
|
-
<slot name="caption"> ${this.caption} </slot>
|
|
3
|
-
</span>`:null,l=this._getIcon()?n`<bl-icon class="icon" name=${b(this._getIcon())}></bl-icon>`:null,e=this.closable?n`<bl-button
|
|
4
|
-
class="close"
|
|
5
|
-
label="close"
|
|
6
|
-
variant="tertiary"
|
|
7
|
-
kind="neutral"
|
|
8
|
-
icon="close"
|
|
9
|
-
variant="secondary"
|
|
10
|
-
@click=${this._closeHandler}
|
|
11
|
-
></bl-button>`:null,a=n`<span class="description">
|
|
12
|
-
<slot> ${this.description} </slot>
|
|
13
|
-
</span>`;return n`
|
|
14
|
-
<div class="alert">
|
|
15
|
-
<div class="wrapper">
|
|
16
|
-
<div class="content">
|
|
17
|
-
${l}
|
|
18
|
-
<div class="text-content">${s} ${a}</div>
|
|
19
|
-
</div>
|
|
20
|
-
<slot class="action" name="action" @slotchange=${this._initAlertActionSlot}></slot>
|
|
21
|
-
</div>
|
|
22
|
-
${e}
|
|
23
|
-
</div>
|
|
24
|
-
`}};r([o({reflect:!0})],t.prototype,"variant",2),r([o()],t.prototype,"description",2),r([o({converter:g()})],t.prototype,"icon",2),r([o({type:Boolean,reflect:!0})],t.prototype,"closable",2),r([o()],t.prototype,"caption",2),r([o({type:Boolean,reflect:!0})],t.prototype,"closed",2),r([u("bl-close")],t.prototype,"onClose",2),t=r([d("bl-alert")],t);export{t as a};
|
|
25
|
-
//# sourceMappingURL=chunk-C3X43Y7C.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/components/alert/bl-alert.css", "../src/utilities/string-boolean.converter.ts", "../src/components/alert/bl-alert.ts"],
|
|
4
|
-
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{display:block}.alert{--padding:var(--bl-size-m);--main-color:var(--bl-color-primary);--main-bg-color:var(--bl-color-accent-primary-background);position:relative;display:flex;align-items:flex-start;justify-content:space-between;background-color:var(--main-bg-color);color:var(--bl-color-content-primary);box-shadow:inset 0 0 0 1px var(--main-color);border-radius:var(--bl-border-radius-s);padding:calc(var(--padding) / 2) var(--padding);padding-right:calc(var(--padding) / 2)}.description{font:var(--bl-font-body-text-2)}.wrapper{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;flex:auto}.content{display:flex;padding:calc(var(--padding) / 2) 0;margin-right:var(--bl-size-2xs);flex:20 1 70%}.icon{margin-right:var(--bl-size-2xs);color:var(--main-color)}.text-content{display:flex;flex-direction:column}.caption{color:var(--bl-color-content-primary);font:var(--bl-font-title-3-medium)}.action{display:flex;align-items:center;flex:1 1 0%}.caption+.description{margin-top:var(--bl-size-2xs)}:host([closed]){display:none}:host([variant='success']) .alert{--main-color:var(--bl-color-success);--main-bg-color:var(--bl-color-success-background)}:host([variant='warning']) .alert{--main-color:var(--bl-color-warning);--main-bg-color:var(--bl-color-warning-background)}:host([variant='danger']) .alert{--main-color:var(--bl-color-danger);--main-bg-color:var(--bl-color-danger-background)}`;\nexport default styles;\n", "import type { ComplexAttributeConverter } from 'lit';\n\nexport const stringBooleanConverter = (): ComplexAttributeConverter<string | boolean> => {\n return {\n fromAttribute: (value: string): string | boolean => {\n if (!value || value === 'true') return true;\n if (value === 'false') return false;\n return value;\n },\n };\n};\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport style from './bl-alert.css';\nimport '../icon/bl-icon';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { stringBooleanConverter } from '../../utilities/string-boolean.converter';\nimport { ButtonVariant, ButtonKind, ButtonSize } from '../button/bl-button';\n\nexport type AlertVariant = 'info' | 'warning' | 'success' | 'danger';\n\n/**\n * @tag bl-alert\n * @summary Baklava Alert component\n */\n\n@customElement('bl-alert')\nexport default class BlAlert extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets alert variant\n */\n @property({ reflect: true })\n variant: AlertVariant = 'info';\n\n /**\n * Sets alert description\n */\n @property()\n description?: 'string';\n\n /**\n * Allows to customize alert icon\n */\n @property({ converter: stringBooleanConverter() })\n icon?: boolean | string;\n\n /**\n * Displays a close button.\n */\n @property({ type: Boolean, reflect: true })\n closable = false;\n\n /**\n * Sets alert caption.\n */\n @property()\n caption?: string;\n\n /**\n * Sets alert components display state.\n */\n @property({ type: Boolean, reflect: true })\n closed = false;\n\n /**\n * Opens alert component.\n */\n public open() {\n this.closed = false;\n }\n\n /**\n * Closes alert component.\n */\n public close() {\n this.closed = true;\n }\n\n /**\n * Fires when close button clicked.\n */\n @event('bl-close') private onClose: EventDispatcher<boolean>;\n\n private get _hasAlertCaptionSlot() {\n return this.querySelector(':scope > [slot=\"caption\"]') !== null;\n }\n\n private _closeHandler() {\n this.closed = true;\n this.onClose(true);\n }\n\n private _predefinedIcons() {\n switch (this.variant) {\n case 'success':\n return 'check_fill';\n case 'danger':\n return 'close_fill';\n default:\n return this.variant;\n }\n }\n\n private _getIcon(): string | undefined {\n if (!this.icon) return;\n if (this.icon === true) return this._predefinedIcons();\n return this.icon;\n }\n\n private _initAlertActionSlot(event: Event) {\n const slotElements = (event.target as HTMLSlotElement).assignedElements();\n slotElements.forEach(element => {\n if (element.tagName !== 'BL-BUTTON') {\n element.parentNode?.removeChild(element);\n return;\n }\n element.setAttribute('variant','tertiary' as ButtonVariant);\n element.setAttribute('kind', 'neutral' as ButtonKind);\n element.setAttribute('size', 'medium' as ButtonSize);\n element.removeAttribute('icon');\n });\n }\n\n render(): TemplateResult {\n const caption =\n this.caption || this._hasAlertCaptionSlot\n ? html`<span class=\"caption\">\n <slot name=\"caption\"> ${this.caption} </slot>\n </span>`\n : null;\n const icon = this._getIcon()\n ? html`<bl-icon class=\"icon\" name=${ifDefined(this._getIcon())}></bl-icon>`\n : null;\n\n const closable = this.closable\n ? html`<bl-button\n class=\"close\"\n label=\"close\"\n variant=\"tertiary\"\n kind=\"neutral\"\n icon=\"close\"\n variant=\"secondary\"\n @click=${this._closeHandler}\n ></bl-button>`\n : null;\n const description = html`<span class=\"description\">\n <slot> ${this.description} </slot>\n </span>`;\n\n return html`\n <div class=\"alert\">\n <div class=\"wrapper\">\n <div class=\"content\">\n ${icon}\n <div class=\"text-content\">${caption} ${description}</div>\n </div>\n <slot class=\"action\" name=\"action\" @slotchange=${this._initAlertActionSlot}></slot>\n </div>\n ${closable}\n </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BAAkCE,EAAU,KAAK,SAAS,CAAC,eAC3D,KAEEC,EAAW,KAAK,SAClBH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAOW,KAAK;AAAA,uBAEhB,KACEI,EAAcJ;AAAA,eACT,KAAK;AAAA,aAGhB,OAAOA;AAAA;AAAA;AAAA;AAAA,cAIGC;AAAA,wCAC0BF,KAAWK;AAAA;AAAA,2DAEQ,KAAK;AAAA;AAAA,UAEtDD;AAAA;AAAA,KAGR,CACF,EAlIEE,EAAA,CADCC,EAAS,CAAE,QAAS,EAAK,CAAC,GARRb,EASnB,uBAMAY,EAAA,CADCC,EAAS,GAdSb,EAenB,2BAMAY,EAAA,CADCC,EAAS,CAAE,UAAWC,EAAuB,CAAE,CAAC,GApB9Bd,EAqBnB,oBAMAY,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA1BvBb,EA2BnB,wBAMAY,EAAA,CADCC,EAAS,GAhCSb,EAiCnB,uBAMAY,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAtCvBb,EAuCnB,sBAmB2BY,EAAA,CAA1BT,EAAM,UAAU,GA1DEH,EA0DQ,uBA1DRA,EAArBY,EAAA,CADCC,EAAc,UAAU,GACJb",
|
|
6
|
-
"names": ["styles", "i", "bl_alert_default", "stringBooleanConverter", "value", "BlAlert", "s", "bl_alert_default", "event", "element", "_a", "caption", "y", "icon", "l", "closable", "description", "__decorateClass", "e", "stringBooleanConverter"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/components/popover/bl-popover.css", "../src/components/popover/bl-popover.ts"],
|
|
4
|
-
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`.popover{--arrow-display:var(--bl-popover-arrow-display,none);--background-color:var(--bl-popover-background-color,var(--bl-color-primary-background));--border-color:var(--bl-popover-border-color,var(--bl-color-primary-hover));--padding:var(--bl-popover-padding,var(--bl-size-m));--border-radius:var(--bl-popover-border-radius,var(--bl-size-3xs));--position:var(--bl-popover-position,fixed);position:var(--position);box-sizing:border-box;border:1px solid var(--border-color);padding:var(--padding);border-radius:var(--border-radius);z-index:var(--bl-index-popover);width:max-content;hyphens:auto;background-color:var(--background-color);font:var(--bl-font-title-3-regular);color:var(--bl-color-content-primary)}.popover:not(.visible){visibility:hidden}.arrow{--arrow-rotation:45deg;box-sizing:border-box;display:var(--arrow-display);position:absolute;background-color:var(--background-color);width:var(--bl-size-2xs);height:var(--bl-size-2xs);transform:rotate(var(--arrow-rotation));border:1px solid var(--border-color);border-bottom:0;border-right:0}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport {\n computePosition,\n flip,\n shift,\n offset,\n arrow,\n inline,\n autoUpdate,\n size,\n Middleware,\n MiddlewareState,\n} from '@floating-ui/dom';\nimport { classMap } from 'lit/directives/class-map.js';\nimport style from './bl-popover.css';\nimport { event, EventDispatcher } from '../../utilities/event';\n\nexport type Placement =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'bottom-start'\n | 'bottom'\n | 'bottom-end'\n | 'left-start'\n | 'left'\n | 'left-end'\n | 'right-start'\n | 'right'\n | 'right-end';\n\n/**\n * @tag bl-popover\n * @summary Baklava Popover component\n *\n * @cssproperty [--bl-popover-arrow-display=none] - Sets the display of popovers arrow. Set as `block` to make arrow visible.\n * @cssproperty [--bl-popover-background-color=--bl-color-primary-background] - Sets the background color of popover.\n * @cssproperty [--bl-popover-border-color=--bl-color-primary-hover] - Sets the border color of popover.\n * @cssproperty [--bl-popover-padding=--bl-size-m] - Sets the padding of popover.\n * @cssproperty [--bl-popover-border-radius=--bl-size-3xs] - Sets the border radius of popover.\n * @cssproperty [--bl-popover-position=fixed] - Sets the position of popover. You can set it to `absolute` if parent element is a fixed positioned element like drawer or dialog.\n */\n@customElement('bl-popover')\nexport default class BlPopover extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n @query('.popover') private popover: HTMLElement;\n @query('.arrow') private arrow: HTMLElement;\n\n /**\n * Sets placement of the popover\n */\n @property({ type: String })\n placement: Placement = 'bottom';\n\n /**\n * Target elements state\n */\n @state() _target: string | Element;\n\n\n /**\n * Sets size of popover same as trigger element\n */\n @property({ type: Boolean, attribute: 'fit-size' })\n fitSize = false;\n\n /**\n * Sets the distance between popover and target/trigger element\n */\n @property({ type: Number })\n offset = 8;\n\n /**\n * Visibility state\n */\n @state() private _visible = false;\n\n /**\n * Fires when the popover is shown\n */\n @event('bl-popover-show') private onBlPopoverShow: EventDispatcher<string>;\n\n /**\n * Fires when popover becomes hidden\n */\n @event('bl-popover-hide') private onBlPopoverHide: EventDispatcher<string>;\n\n connectedCallback() {\n super.connectedCallback();\n\n this._handlePopoverShowEvent = this._handlePopoverShowEvent.bind(this);\n this._handleKeyupEvent = this._handleKeyupEvent.bind(this);\n this._handleClickOutside = this._handleClickOutside.bind(this);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.popoverAutoUpdateCleanup && this.popoverAutoUpdateCleanup();\n }\n\n private getMiddleware(): Middleware[] {\n const middlewareParams: Middleware[] = [];\n middlewareParams.push(offset(this.offset), inline(), flip(),shift({ padding: 4 }));\n\n if (this.fitSize) {\n middlewareParams.push(\n size({\n apply(args: MiddlewareState) {\n if (args.elements.floating && args.elements.reference) {\n Object.assign(args.elements.floating.style, {\n width: `${args.elements.reference.getBoundingClientRect().width}px`,\n });\n }\n },\n })\n );\n }\n\n middlewareParams.push(arrow({ element: this.arrow, padding: 5 }));\n\n return middlewareParams;\n }\n\n private _handleClickOutside = (event: MouseEvent) => {\n const eventPath = event.composedPath() as HTMLElement[];\n if (!eventPath.includes(this._target as HTMLElement) && !eventPath.includes(this)) {\n this.hide();\n }\n };\n\n private popoverAutoUpdateCleanup: () => void;\n\n private setPopover() {\n if (this.target) {\n this.popoverAutoUpdateCleanup = autoUpdate(this.target as Element, this.popover, () => {\n computePosition(this.target as Element, this.popover, {\n placement: this.placement,\n strategy: 'fixed',\n middleware: this.getMiddleware(),\n }).then(({ x, y, placement, middlewareData }) => {\n Object.assign(this.popover.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n\n if (middlewareData.arrow) {\n const { x: arrowX, y: arrowY } = middlewareData.arrow;\n\n Object.assign(this.arrow.style, {\n left: `${arrowX}px`,\n top: `${arrowY}px`,\n });\n\n const arrowFlipDirections = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n };\n const arrowRotateDegrees = {\n top: '225deg',\n right: '315deg',\n bottom: '45deg',\n left: '135deg',\n };\n const popoverPlacement = placement.split('-')[0] as keyof typeof arrowFlipDirections;\n const arrowDirection = arrowFlipDirections[popoverPlacement];\n\n this.arrow.style.setProperty(arrowDirection, '-5px');\n this.arrow.style.setProperty('--arrow-rotation', arrowRotateDegrees[popoverPlacement]);\n }\n });\n });\n }\n }\n\n /**\n * Sets the target element of the popover to align and trigger.\n * It can be a string id of the target element or can be a direct Element reference of it.\n */\n @property()\n get target(): string | Element {\n return this._target;\n }\n\n set target(value: string | Element) {\n if (typeof value === 'string') {\n this._target = document.getElementById(value) as Element;\n } else if (value instanceof Element) {\n this._target = value;\n } else {\n console.warn(\n 'BlPopover target only accepts an Element instance or a string id of a DOM element.'\n );\n }\n }\n\n /**\n * Shows popover\n */\n show() {\n this._visible = true;\n this.setPopover();\n this.onBlPopoverShow('');\n document.addEventListener('click', this._handleClickOutside);\n document.addEventListener('keyup', this._handleKeyupEvent);\n document.addEventListener('bl-popover-show', this._handlePopoverShowEvent);\n }\n\n /**\n * Hides popover\n */\n hide() {\n this._visible = false;\n document.removeEventListener('click', this._handleClickOutside);\n document.removeEventListener('keyup', this._handleKeyupEvent);\n document.removeEventListener('bl-popover-show', this._handlePopoverShowEvent);\n this.onBlPopoverHide('');\n }\n\n /**\n * Gives the visibility status of the popover\n */\n get visible(): boolean {\n return this._visible;\n }\n\n private _handlePopoverShowEvent(event: Event) {\n if (event.target !== this) {\n this.hide();\n }\n }\n\n private _handleKeyupEvent(event: KeyboardEvent) {\n if (event.key === 'Escape' && this.visible) {\n this.hide();\n event.preventDefault();\n }\n }\n\n render(): TemplateResult {\n const classes = classMap({\n popover: true,\n visible: this._visible,\n });\n\n return html`<div class=${classes}>\n <slot id=\"popover\" aria-live=${this._visible ? 'polite' : 'off'}></slot>\n <div class=\"arrow\" aria-hidden=\"true\"></div>\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-popover': BlPopover;\n }\n}\n"],
|
|
5
|
-
"mappings": "mSACO,IAAMA,EAASC,+hCACfC,EAAQF,EC0Cf,IAAqBG,EAArB,cAAuCC,CAAW,CAAlD,kCAYE,eAAuB,SAYvB,aAAU,GAMV,YAAS,EAKA,KAAQ,SAAW,GAiD5B,KAAQ,oBAAuBC,GAAsB,CACnD,IAAMC,EAAYD,EAAM,aAAa,EACjC,CAACC,EAAU,SAAS,KAAK,OAAsB,GAAK,CAACA,EAAU,SAAS,IAAI,GAC9E,KAAK,KAAK,CAEd,EAxFA,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CA4CA,mBAAoB,CAClB,MAAM,kBAAkB,EAExB,KAAK,wBAA0B,KAAK,wBAAwB,KAAK,IAAI,EACrE,KAAK,kBAAoB,KAAK,kBAAkB,KAAK,IAAI,EACzD,KAAK,oBAAsB,KAAK,oBAAoB,KAAK,IAAI,CAC/D,CAEA,sBAAuB,CACrB,MAAM,qBAAqB,EAE3B,KAAK,0BAA4B,KAAK,yBAAyB,CACjE,CAEQ,eAA8B,CACpC,IAAMC,EAAiC,CAAC,EACxC,OAAAA,EAAiB,KAAKC,EAAO,KAAK,MAAM,EAAGC,EAAO,EAAGC,EAAK,EAAEC,EAAM,CAAE,QAAS,CAAE,CAAC,CAAC,EAE7E,KAAK,SACPJ,EAAiB,KACfK,EAAK,CACH,MAAMC,EAAuB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KiB4B,EAAA,CAAhBG,EAAM,GAnCY/B,EAmCF,wBAKiB4B,EAAA,CAAjC1B,EAAM,iBAAiB,GAxCLF,EAwCe,+BAKA4B,EAAA,CAAjC1B,EAAM,iBAAiB,GA7CLF,EA6Ce,+BAiG9B4B,EAAA,CADHE,EAAS,GA7IS9B,EA8If,sBA9IeA,EAArB4B,EAAA,CADCE,EAAc,YAAY,GACN9B",
|
|
6
|
-
"names": ["styles", "i", "bl_popover_default", "BlPopover", "s", "event", "eventPath", "bl_popover_default", "middlewareParams", "O", "T", "b", "D", "k", "args", "u", "P", "z", "x", "y", "placement", "middlewareData", "arrowX", "arrowY", "arrowFlipDirections", "arrowRotateDegrees", "popoverPlacement", "arrowDirection", "value", "classes", "o", "__decorateClass", "i", "e", "t"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/utilities/form-control.ts"],
|
|
4
|
-
"sourcesContent": ["import { maxLengthValidator } from \"@open-wc/form-control\";\n\n\nconst validityStates: Array<keyof ValidityState> = [\n 'valueMissing',\n 'typeMismatch',\n 'tooLong',\n 'tooShort',\n 'rangeUnderflow',\n 'rangeOverflow',\n 'stepMismatch',\n 'badInput',\n 'customError',\n];\n\nexport const innerInputValidators = validityStates.map(key => ({\n key,\n isValid(instance: HTMLElement & { validationTarget: HTMLInputElement }) {\n if (instance.validationTarget) {\n return !instance.validationTarget.validity[key];\n }\n return true;\n },\n}));\n\nexport const textareaLengthValidator = {\n ...maxLengthValidator,\n isValid(instance: HTMLElement & { validationTarget: HTMLTextAreaElement }) {\n if(instance.validationTarget && instance.getAttribute('maxlength')){\n return (Number(instance.getAttribute('maxlength')) >= instance.validationTarget.value.length);\n }\n return true;\n }\n};\n\nexport const textAreaValidators = [\n ...innerInputValidators,\n textareaLengthValidator\n]\n"],
|
|
5
|
-
"mappings": "wCAGA,IAAMA,EAA6C,CACjD,eACA,eACA,UACA,WACA,iBACA,gBACA,eACA,WACA,aACF,EAEaC,EAAuBD,EAAe,IAAIE,IAAQ,CAC7D,IAAAA,EACA,QAAQC,EAAgE,CACtE,OAAIA,EAAS,iBACJ,CAACA,EAAS,iBAAiB,SAASD,CAAG,EAEzC,EACT,CACF,EAAE,EAEWE,EAA0B,CACrC,GAAGC,EACH,QAAQF,EAAmE,CACzE,OAAGA,EAAS,kBAAoBA,EAAS,aAAa,WAAW,EACvD,OAAOA,EAAS,aAAa,WAAW,CAAC,GAAKA,EAAS,iBAAiB,MAAM,OAEjF,EACT,CACF,EAEaG,EAAqB,CAChC,GAAGL,EACHG,CACF",
|
|
6
|
-
"names": ["validityStates", "innerInputValidators", "key", "instance", "textareaLengthValidator", "maxLengthValidator", "textAreaValidators"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/components/drawer/bl-drawer.css", "../src/components/drawer/bl-drawer.ts"],
|
|
4
|
-
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`.drawer{box-sizing:border-box;position:fixed;display:flex;top:0;right:-100%;bottom:0;width:424px;padding:var(--bl-size-xl);padding-top:max(env(safe-area-inset-top),var(--bl-size-xl));padding-right:max(env(safe-area-inset-right),var(--bl-size-xl));padding-bottom:max(env(safe-area-inset-bottom),var(--bl-size-xl));background:var(--bl-color-primary-background);box-shadow:var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);transition:right var(--bl-drawer-animation-duration,.25s);z-index:var(--bl-index-sticky)}:host([open]) .drawer{right:0}iframe{height:100%;width:100%;border:0}.container{display:flex;flex-direction:column;gap:var(--bl-size-xl);flex:1}header{display:flex;justify-content:space-between;align-items:baseline;gap:var(--bl-size-2xs);background-color:white}header .header-buttons{display:flex;gap:24px;margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-secondary);overflow:hidden;margin:0;padding:0}.content{flex:1;overflow-y:scroll}.iframe-content{flex:1}@media only screen and (max-width:424px){:host([open]) .drawer{width:calc(100vw - 24px)}}`;\nexport default styles;\n", "import { customElement, property, state } from 'lit/decorators.js';\nimport { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport '../button/bl-button';\nimport style from './bl-drawer.css';\nimport { PropertyValues } from 'lit';\n\n/**\n * @tag bl-drawer\n * @summary Baklava Drawer component\n *\n */\n\n@customElement('bl-drawer')\nexport default class BlDrawer extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets drawer open-close status\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Sets the drawer title\n */\n @property({ type: String })\n caption?: string;\n\n /**\n * Sets the drawer embed url for iframe\n */\n @property({ type: String, attribute: 'embed-url' })\n embedUrl?: string;\n\n /**\n * Sets the drawer external link\n */\n @property({ type: String, attribute: 'external-link' })\n externalLink?: string;\n\n /**\n * Fires when the drawer is opened\n */\n @event('bl-drawer-open') private onOpen: EventDispatcher<string>;\n\n /**\n * Fires when the drawer is closed\n */\n @event('bl-drawer-close') private onClose: EventDispatcher<string>;\n\n connectedCallback() {\n super.connectedCallback();\n window?.addEventListener('bl-drawer-open', event => {\n if (event.target !== this) this.closeDrawer();\n });\n }\n\n updated(changedProperties: PropertyValues<this>) {\n if (changedProperties.has('open')) {\n this.toggleDialogHandler();\n }\n }\n\n private domExistenceSchedule: number;\n\n private toggleDialogHandler() {\n if (this.open) {\n if (this.domExistenceSchedule) {\n clearTimeout(this.domExistenceSchedule);\n }\n\n this.domExistence = true;\n // FIXME: Allow events without payload\n this.onOpen('');\n } else {\n // Give some time for exit animation\n this.domExistenceSchedule = window.setTimeout(() => {\n this.domExistence = false;\n }, 1000);\n\n // FIXME: Allow events without payload\n this.onClose('');\n }\n }\n\n @state() private domExistence = false;\n\n private closeDrawer() {\n this.open = false;\n }\n\n private renderContent() {\n const content = this.embedUrl ? html`<iframe src=${this.embedUrl}></iframe>` : html`<slot></slot>`;\n\n return html`<section class=${this.embedUrl ? 'iframe-content' : 'content'}>\n ${content}\n </section>`;\n }\n\n private renderContainer() {\n const title = this.caption ? html`<h2 id=\"drawer-caption\">${this.caption}</h2>` : '';\n const external_button = this.externalLink\n ? html`<bl-button\n icon=\"external_link\"\n variant=\"tertiary\"\n kind=\"neutral\"\n size=\"small\"\n href=\"${this.externalLink}\"\n target=\"_blank\"\n ></bl-button>`\n : '';\n\n return html`<div class=\"container\">\n <header>\n ${title}\n <div class=\"header-buttons\">\n ${external_button}\n <bl-button\n @click=\"${this.closeDrawer}\"\n icon=\"close\"\n size=\"small\"\n variant=\"tertiary\"\n kind=\"neutral\"\n ></bl-button>\n </div>\n </header>\n ${this.renderContent()}\n </div>`;\n }\n\n render(): TemplateResult {\n if (this.domExistence) {\n return html`<div class=\"drawer\">${this.renderContainer()}</div>`;\n } else {\n return html``;\n }\n }\n}\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-drawer': BlDrawer;\n }\n}\n"],
|
|
5
|
-
"mappings": "sJACO,IAAMA,EAASC,6kCACfC,EAAQF,ECYf,IAAqBG,EAArB,cAAsC,CAAW,CAAjD,kCASE,UAAO,GAiEE,KAAQ,aAAe,GAzEhC,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAoCA,mBAAoB,CAClB,MAAM,kBAAkB,EACxB,qBAAQ,iBAAiB,iBAAkBC,GAAS,CAC9CA,EAAM,SAAW,MAAM,KAAK,YAAY,CAC9C,EACF,CAEA,QAAQC,EAAyC,CAC3CA,EAAkB,IAAI,MAAM,GAC9B,KAAK,oBAAoB,CAE7B,CAIQ,qBAAsB,CACxB,KAAK,MACH,KAAK,sBACP,aAAa,KAAK,oBAAoB,EAGxC,KAAK,aAAe,GAEpB,KAAK,OAAO,EAAE,IAGd,KAAK,qBAAuB,OAAO,WAAW,IAAM,CAClD,KAAK,aAAe,EACtB,EAAG,GAAI,EAGP,KAAK,QAAQ,EAAE,EAEnB,CAIQ,aAAc,CACpB,KAAK,KAAO,EACd,CAEQ,eAAgB,CACtB,IAAMC,EAAU,KAAK,SAAWC,gBAAmB,KAAK,qBAAuBA,iBAE/E,OAAOA,mBAAsB,KAAK,SAAW,iBAAmB;AAAA,QAC5DD;AAAA,eAEN,CAEQ,iBAAkB,CACxB,IAAME,EAAQ,KAAK,QAAUD,4BAA+B,KAAK,eAAiB,GAC5EE,EAAkB,KAAK,aACzBF;AAAA;AAAA;AAAA;AAAA;AAAA,kBAKU,KAAK;AAAA;AAAA,uBAGf,GAEJ,OAAOA;AAAA;AAAA,UAEDC;AAAA;AAAA,YAEEC;AAAA;AAAA,sBAEU,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAQnB,KAAK,cAAc;AAAA,WAEzB,CAEA,QAAyB,CACvB,OAAI,KAAK,aACAF,wBAA2B,KAAK,gBAAgB,UAEhDA,GAEX,CACF,EArHEG,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GARvBT,EASnB,oBAMAQ,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GAdPT,EAenB,uBAMAQ,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,GApB/BT,EAqBnB,wBAMAQ,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,eAAgB,CAAC,GA1BnCT,EA2BnB,4BAKiCQ,EAAA,CAAhCN,EAAM,gBAAgB,GAhCJF,EAgCc,sBAKCQ,EAAA,CAAjCN,EAAM,iBAAiB,GArCLF,EAqCe,uBAqCjBQ,EAAA,CAAhBE,EAAM,GA1EYV,EA0EF,4BA1EEA,EAArBQ,EAAA,CADCC,EAAc,WAAW,GACLT",
|
|
6
|
-
"names": ["styles", "i", "bl_drawer_default", "BlDrawer", "bl_drawer_default", "event", "changedProperties", "content", "y", "title", "external_button", "__decorateClass", "e", "t"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/components/tab-group/tab/bl-tab.css", "../src/components/tab-group/tab/bl-tab.ts"],
|
|
4
|
-
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{position:relative;display:flex;align-items:center;background-color:var(--bl-color-primary-background)}.container{--title-padding-vertical:var(--bl-size-m);--title-padding-horizontal:var(--bl-size-xl);--title-color:var(--bl-color-secondary);--caption-color:var(--bl-color-secondary);--icon-color:var(--bl-color-secondary);--border-bottom-width:var(--bl-size-4xs);--border-left-space:var(--bl-size-xl);--font-title:var(--bl-font-title-3-medium);--font-caption:var(--bl-font-title-4-regular);--tab-right-padding:var(--bl-size-xl);--help-container-width:var(--bl-size-2xl);--tab-height:calc(var(--bl-size-3xl) + var(--bl-size-s));display:flex;border:0;cursor:pointer;background-color:initial;width:max-content;height:var(--tab-height);padding:0 var(--tab-right-padding);margin-right:1px}.container::after{position:absolute;content:'';right:0;top:var(--bl-size-m);height:calc(100% - var(--bl-size-2xl));border-right:1px solid var(--bl-color-tertiary-hover)}:host(:last-of-type) .container::after{border-right:0}:host(:focus-visible){outline:0}:host(:focus-visible) .container,.container:focus-visible{outline:2px solid var(--bl-color-primary);outline-offset:calc(-1 * var(--bl-size-3xs));border-radius:var(--bl-border-radius-s)}:host .container::before{content:'';position:absolute;opacity:0;bottom:calc(-1 * var(--bl-size-4xs));left:var(--border-left-space);width:calc(100% - var(--bl-size-4xl));border-bottom:var(--border-bottom-width) solid var(--bl-color-primary)}:host([selected]:not([disabled])) .container::before{opacity:1}:host(:hover) .container,:host([selected]) .container,:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .container,:host([selected]) .container{--title-color:var(--bl-color-primary);--icon-color:var(--bl-color-primary)}:host([disabled]) .container{cursor:not-allowed;--title-color:var(--bl-color-content-passive);--caption-color:var(--bl-color-content-passive);--icon-color:var(--bl-color-content-passive)}:host(:hover) :where(.title,.icon),:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) :where(.title,.icon){transition:color 120ms ease-out}:host([selected]) .border-bottom{display:inline-block}:host([disabled]) .container:hover,:host([disabled]) .container.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__{cursor:not-allowed}:host([help-text]) button{padding-right:0}.tab-button{width:max-content}.help-container{display:flex;justify-content:center;align-items:center;width:var(--help-container-width);height:100%;font-size:var(--bl-font-size-m);pointer-events:visible;padding-right:var(--tab-right-padding)}bl-tooltip{--bl-tooltip-position:fixed}.title{display:flex;align-items:center;justify-content:center;font:var(--font-title);color:var(--title-color);line-height:var(--bl-size-m);white-space:nowrap}.title-container{display:flex;align-items:center;justify-content:center;flex-direction:column;margin:auto}.badge-container{padding-left:var(--bl-size-3xs);display:flex;margin-bottom:1px}.caption{font:var(--font-caption);line-height:var(--bl-size-xs);color:var(--caption-color);text-align:center;margin-top:var(--bl-size-4xs)}.icon{display:flex;color:var(--icon-color);font-size:var(--bl-font-size-l);margin-right:var(--bl-size-3xs);margin-bottom:1px}:host([notify]) .title::after{content:'';height:var(--bl-size-2xs);width:var(--bl-size-2xs);border-radius:var(--bl-size-3xs);margin-left:var(--bl-size-3xs);background-color:var(--bl-color-danger);margin-bottom:1px}`;\nexport default styles;\n", "import {\n CSSResultGroup,\n html,\n LitElement,\n PropertyValues,\n TemplateResult,\n} from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { event, EventDispatcher } from '../../../utilities/event';\n\nimport style from './bl-tab.css';\nimport type BlTabGroup from '../bl-tab-group';\n\n/**\n * @tag bl-tab\n * @summary Baklava Tab component\n */\n@customElement('bl-tab')\nexport default class BlTab extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n private tabGroup: BlTabGroup | null;\n\n connectedCallback() {\n super.connectedCallback();\n\n this.updateComplete.then(() => {\n this.tabGroup = this.closest<BlTabGroup>('bl-tab-group');\n // FIXME: We need to warn if parent is not tab-group\n this.tabGroup?.registerTab(this);\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.tabGroup?.unregisterTab(this);\n }\n\n /**\n * Sets the caption of tab\n */\n @property({ type: String })\n caption: string;\n\n /**\n * Name of the tab that should match `tab-panel`'s `tab` attribute\n */\n @property({ type: String, reflect: true })\n name: string;\n\n /**\n * Set tooltip text. Should be set to display information icon.\n */\n @property({ type: String, attribute: 'help-text', reflect: true })\n helpText: string;\n\n /**\n * Name of the icon which display on the left side of the tab.\n */\n @property({ type: String })\n icon = '';\n\n /**\n * Shows notification dot.\n */\n @property({ type: Boolean, reflect: true })\n notify = false;\n\n /**\n * Sets the content of the badge.\n */\n @property({ type: String })\n badge = '';\n\n /**\n * Set `tab` as selected.\n */\n @property({ type: Boolean, reflect: true })\n selected = false;\n\n /**\n * Set `tab` as disabled.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Fires when tab is selected.\n */\n @event('bl-tab-selected') private _onSelect: EventDispatcher<string>;\n\n @query('.container')\n private tab: HTMLButtonElement;\n\n /**\n * Set tab selected.\n */\n select() {\n this.selected = true;\n }\n\n focus() {\n this.tab.focus();\n }\n\n updated(changedProperties: PropertyValues<this>) {\n this.tabIndex = this.selected ? 0 : -1;\n if (changedProperties.has('selected') && this.selected) {\n this._onSelect(this.name);\n }\n }\n\n render(): TemplateResult {\n const title = html` <slot></slot>`;\n\n const helpTooltip = this.helpText\n ? html` <div class=\"help-container\">\n <bl-tooltip>\n <bl-button\n slot=\"tooltip-trigger\"\n icon=\"info\"\n variant=\"tertiary\"\n kind=\"neutral\"\n label=\"${this.helpText}\"\n ></bl-button>\n ${this.helpText}\n </bl-tooltip>\n </div>`\n : null;\n\n const icon = this.icon\n ? html` <div class=\"icon\">\n <bl-icon name=\"${this.icon}\"></bl-icon>\n </div>`\n : null;\n\n const badge = this.badge\n ? html` <div class=\"badge-container\">\n <bl-badge size=\"small\">${this.badge}</bl-badge>\n </div>`\n : null;\n\n const caption = this.caption ? html` <div class=\"caption\">${this.caption}</div>` : null;\n\n return html`\n <button\n ?disabled=\"${this.disabled}\"\n role=\"tab\"\n class=\"container\"\n @click=\"${() => this.select()}\"\n aria-selected=\"${this.selected}\"\n >\n <div class=\"title-container\">\n <div class=\"title\">${icon} ${title} ${badge}</div>\n ${caption}\n </div>\n ${helpTooltip}\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-tab': BlTab;\n }\n}\n"],
|
|
5
|
-
"mappings": "2JACO,IAAMA,EAASC,80GACfC,EAAQF,ECgBf,IAAqBG,EAArB,cAAmCC,CAAW,CAA9C,kCA4CE,UAAO,GAMP,YAAS,GAMT,WAAQ,GAMR,cAAW,GAMX,cAAW,GAnEX,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAIA,mBAAoB,CAClB,MAAM,kBAAkB,EAExB,KAAK,eAAe,KAAK,IAAM,CA5BnC,IAAAC,EA6BM,KAAK,SAAW,KAAK,QAAoB,cAAc,GAEvDA,EAAA,KAAK,WAAL,MAAAA,EAAe,YAAY,KAC7B,CAAC,CACH,CAEA,sBAAuB,CAnCzB,IAAAA,EAoCI,MAAM,qBAAqB,GAC3BA,EAAA,KAAK,WAAL,MAAAA,EAAe,cAAc,KAC/B,CA6DA,QAAS,CACP,KAAK,SAAW,EAClB,CAEA,OAAQ,CACN,KAAK,IAAI,MAAM,CACjB,CAEA,QAAQC,EAAyC,CAC/C,KAAK,SAAW,KAAK,SAAW,EAAI,GAChCA,EAAkB,IAAI,UAAU,GAAK,KAAK,UAC5C,KAAK,UAAU,KAAK,IAAI,CAE5B,CAEA,QAAyB,CACvB,IAAMC,EAAQC,kBAERC,EAAc,KAAK,SACrBD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAOe,KAAK;AAAA;AAAA,cAEd,KAAK;AAAA;AAAA,gBAGX,KAEEE,EAAO,KAAK,KACdF;AAAA,2BACmB,KAAK;AAAA,gBAExB,KAEEG,EAAQ,KAAK,MACfH;AAAA,mCAC2B,KAAK;AAAA,gBAEhC,KAEEI,EAAU,KAAK,QAAUJ,0BAA6B,KAAK,gBAAkB,KAEnF,OAAOA;AAAA;AAAA,qBAEU,KAAK;AAAA;AAAA;AAAA,kBAGR,IAAM,KAAK,OAAO;AAAA,yBACX,KAAK;AAAA;AAAA;AAAA,+BAGCE,KAAQH,KAASI;AAAA,YACpCC;AAAA;AAAA,UAEFH;AAAA;AAAA,KAGR,CACF,EAtHEI,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GAzBPZ,EA0BnB,uBAMAW,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GA/BtBZ,EAgCnB,oBAMAW,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,YAAa,QAAS,EAAK,CAAC,GArC9CZ,EAsCnB,wBAMAW,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GA3CPZ,EA4CnB,oBAMAW,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAjDvBZ,EAkDnB,sBAMAW,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GAvDPZ,EAwDnB,qBAMAW,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA7DvBZ,EA8DnB,wBAMAW,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAnEvBZ,EAoEnB,wBAKkCW,EAAA,CAAjCE,EAAM,iBAAiB,GAzELb,EAyEe,yBAG1BW,EAAA,CADPG,EAAM,YAAY,GA3EAd,EA4EX,mBA5EWA,EAArBW,EAAA,CADCC,EAAc,QAAQ,GACFZ",
|
|
6
|
-
"names": ["styles", "i", "bl_tab_default", "BlTab", "s", "bl_tab_default", "_a", "changedProperties", "title", "y", "helpTooltip", "icon", "badge", "caption", "__decorateClass", "e", "event", "i"]
|
|
7
|
-
}
|
|
File without changes
|