From 087f630c519f08858c864a6338b46188eb6b4620 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 09:48:27 +0000 Subject: [PATCH] deploy: 2b08cb49b457710829945a182309b16d1346f5ff --- ...3de.js => AlertBanner.stories-2088f90c.js} | 4 +- ...ap => AlertBanner.stories-2088f90c.js.map} | 2 +- ...{Avatar-4a7575a1.js => Avatar-36a67816.js} | 4 +- ...4a7575a1.js.map => Avatar-36a67816.js.map} | 2 +- ...91ddb022.js => Avatar.stories-78b180ab.js} | 4 +- ....js.map => Avatar.stories-78b180ab.js.map} | 2 +- ...-373faa20.js => Badge.stories-84c02d44.js} | 4 +- ...0.js.map => Badge.stories-84c02d44.js.map} | 2 +- ...{Button-f0f6780b.js => Button-dffe308c.js} | 4 +- ...f0f6780b.js.map => Button-dffe308c.js.map} | 2 +- ...3b185ef7.js => Button.stories-ab703b7b.js} | 4 +- ....js.map => Button.stories-ab703b7b.js.map} | 2 +- ...elog-f7852150.js => Changelog-e9ead93c.js} | 4 +- ...52150.js.map => Changelog-e9ead93c.js.map} | 2 +- ...ckbox-af5adcef.js => Checkbox-4c4bd360.js} | 4 +- ...5adcef.js.map => Checkbox-4c4bd360.js.map} | 2 +- ...a57a19.js => Checkbox.stories-0322bfba.js} | 4 +- ...s.map => Checkbox.stories-0322bfba.js.map} | 2 +- ...6.js => CheckboxGroup.stories-6f06f0c1.js} | 4 +- ... => CheckboxGroup.stories-6f06f0c1.js.map} | 2 +- ...ca41d801.js => Color-6VNJS4EI-e03781da.js} | 4 +- ....js.map => Color-6VNJS4EI-e03781da.js.map} | 2 +- ...fe27aed.js => Counter.stories-921af222.js} | 4 +- ...js.map => Counter.stories-921af222.js.map} | 2 +- ...d7df53c.js => Divider.stories-33d034e7.js} | 4 +- ...js.map => Divider.stories-33d034e7.js.map} | 2 +- assets/DocsRenderer-3PUGWF3O-4d6321b8.js | 2 - assets/DocsRenderer-3PUGWF3O-4d6321b8.js.map | 1 - assets/DocsRenderer-3PUGWF3O-6506d0ff.js | 2 + assets/DocsRenderer-3PUGWF3O-6506d0ff.js.map | 1 + ...obalScrollAreaStyles-UY5SB7EJ-a11b269b.js} | 4 +- ...ScrollAreaStyles-UY5SB7EJ-a11b269b.js.map} | 2 +- ...ext-d180c721.js => HelperText-2d8f3a33.js} | 4 +- ...c721.js.map => HelperText-2d8f3a33.js.map} | 2 +- ...d49a.js => HelperText.stories-d472c289.js} | 4 +- ...map => HelperText.stories-d472c289.js.map} | 2 +- ...ton-a5fefd68.js => IconButton-fb5ca4c8.js} | 4 +- ...fd68.js.map => IconButton-fb5ca4c8.js.map} | 2 +- ...9dfc.js => IconButton.stories-7c0926cc.js} | 4 +- ...map => IconButton.stories-7c0926cc.js.map} | 2 +- ...b0.js => InlineBanner.stories-7cf59a3d.js} | 4 +- ...p => InlineBanner.stories-7cf59a3d.js.map} | 2 +- ...3.js => InlineMessage.stories-e717ae66.js} | 4 +- ... => InlineMessage.stories-e717ae66.js.map} | 2 +- ... => InlineSearchInput.stories-2f8807f4.js} | 4 +- ...InlineSearchInput.stories-2f8807f4.js.map} | 2 +- .../{Label-c3954f77.js => Label-6d600e0b.js} | 4 +- ...-c3954f77.js.map => Label-6d600e0b.js.map} | 2 +- ...-c7364cff.js => Label.stories-069b3d3a.js} | 4 +- ...f.js.map => Label.stories-069b3d3a.js.map} | 2 +- ...883e8cb3.js => Loader.stories-dd6317a8.js} | 4 +- ....js.map => Loader.stories-dd6317a8.js.map} | 2 +- ...6a1385d.js => Popover.stories-5c427194.js} | 4 +- ...js.map => Popover.stories-5c427194.js.map} | 2 +- ...on-39b6476e.js => RadioButton-1659869b.js} | 4 +- ...76e.js.map => RadioButton-1659869b.js.map} | 2 +- ...ef7.js => RadioButton.stories-cd3bca3d.js} | 4 +- ...ap => RadioButton.stories-cd3bca3d.js.map} | 2 +- ...s => RadioButtonGroup.stories-30affbfe.js} | 4 +- ... RadioButtonGroup.stories-30affbfe.js.map} | 2 +- ...{ReadMe-77cbdecb.js => ReadMe-cef99008.js} | 4 +- ...77cbdecb.js.map => ReadMe-cef99008.js.map} | 2 +- ...ut-6cf15242.js => SearchInput-9b67f04a.js} | 4 +- ...242.js.map => SearchInput-9b67f04a.js.map} | 2 +- ...2c9.js => SearchInput.stories-2cbc5a9c.js} | 4 +- ...ap => SearchInput.stories-2cbc5a9c.js.map} | 2 +- ...8468b7b2.js => Select.stories-d26bacc9.js} | 4 +- ....js.map => Select.stories-d26bacc9.js.map} | 2 +- ...62.js => SocialButton.stories-a4ca51fe.js} | 4 +- ...p => SocialButton.stories-a4ca51fe.js.map} | 2 +- ...c5516.js => StatusDot.stories-add48de8.js} | 4 +- ....map => StatusDot.stories-add48de8.js.map} | 2 +- assets/Tag.stories-3a7a5a5d.js | 17 ----- assets/Tag.stories-3a7a5a5d.js.map | 1 - ...etDocs-c95a7072.js => TetDocs-27818ecc.js} | 4 +- ...95a7072.js.map => TetDocs-27818ecc.js.map} | 2 +- ...nput-60aa91f4.js => TextInput-28ebe73f.js} | 4 +- ...a91f4.js.map => TextInput-28ebe73f.js.map} | 2 +- ...ec5e8.js => TextInput.stories-f9245633.js} | 4 +- ....map => TextInput.stories-f9245633.js.map} | 2 +- ...-65f09d80.js => Toast.stories-efbfc19b.js} | 4 +- ...0.js.map => Toast.stories-efbfc19b.js.map} | 2 +- ...c5.js => WithTooltip-J57HCPYA-0b7d4448.js} | 4 +- assets/WithTooltip-J57HCPYA-0b7d4448.js.map | 1 + assets/WithTooltip-J57HCPYA-a1256ac5.js.map | 1 - ...b3ed99a8.js => chunk-S4VUQJ4A-cf8ba770.js} | 4 +- ....js.map => chunk-S4VUQJ4A-cf8ba770.js.map} | 2 +- ...72f8.js => formatter-SWP5E3XI-7bf9065f.js} | 4 +- ...map => formatter-SWP5E3XI-7bf9065f.js.map} | 2 +- assets/iframe-012cd190.js | 2 + assets/iframe-012cd190.js.map | 1 + assets/iframe-a6ed202a.js | 2 - assets/iframe-a6ed202a.js.map | 1 - .../{index-d730317a.js => index-28c86eb6.js} | 12 ++-- ...-d730317a.js.map => index-28c86eb6.js.map} | 2 +- .../{index-5458ad35.js => index-7a55bdd3.js} | 4 +- ...-5458ad35.js.map => index-7a55bdd3.js.map} | 2 +- assets/preview-01f28937.js | 2 + ...a11a4cc.js.map => preview-01f28937.js.map} | 2 +- assets/preview-4a11a4cc.js | 2 - ...=> syntaxhighlighter-PONEFOSF-3429ae2e.js} | 4 +- ...syntaxhighlighter-PONEFOSF-3429ae2e.js.map | 1 + ...syntaxhighlighter-PONEFOSF-9b8e6cb3.js.map | 1 - iframe.html | 2 +- index.json | 2 +- project.json | 2 +- src/components/Tag/Tag.d.ts | 4 -- src/components/Tag/Tag.props.d.ts | 11 ---- src/components/Tag/Tag.stories.d.ts | 24 ------- src/components/Tag/Tag.styles.d.ts | 65 ------------------- src/components/Tag/Tag.test.d.ts | 1 - src/components/Tag/index.d.ts | 2 - src/components/Tag/stylesBuilder/index.d.ts | 1 - .../Tag/stylesBuilder/stylesBuilder.d.ts | 10 --- src/docs-components/TagDocs.d.ts | 2 - stories.json | 2 +- 116 files changed, 149 insertions(+), 287 deletions(-) rename assets/{AlertBanner.stories-d64ba3de.js => AlertBanner.stories-2088f90c.js} (92%) rename assets/{AlertBanner.stories-d64ba3de.js.map => AlertBanner.stories-2088f90c.js.map} (99%) rename assets/{Avatar-4a7575a1.js => Avatar-36a67816.js} (98%) rename assets/{Avatar-4a7575a1.js.map => Avatar-36a67816.js.map} (99%) rename assets/{Avatar.stories-91ddb022.js => Avatar.stories-78b180ab.js} (91%) rename assets/{Avatar.stories-91ddb022.js.map => Avatar.stories-78b180ab.js.map} (98%) rename assets/{Badge.stories-373faa20.js => Badge.stories-84c02d44.js} (98%) rename assets/{Badge.stories-373faa20.js.map => Badge.stories-84c02d44.js.map} (99%) rename assets/{Button-f0f6780b.js => Button-dffe308c.js} (99%) rename assets/{Button-f0f6780b.js.map => Button-dffe308c.js.map} (99%) rename assets/{Button.stories-3b185ef7.js => Button.stories-ab703b7b.js} (98%) rename assets/{Button.stories-3b185ef7.js.map => Button.stories-ab703b7b.js.map} (99%) rename assets/{Changelog-f7852150.js => Changelog-e9ead93c.js} (96%) rename assets/{Changelog-f7852150.js.map => Changelog-e9ead93c.js.map} (99%) rename assets/{Checkbox-af5adcef.js => Checkbox-4c4bd360.js} (96%) rename assets/{Checkbox-af5adcef.js.map => Checkbox-4c4bd360.js.map} (99%) rename assets/{Checkbox.stories-baa57a19.js => Checkbox.stories-0322bfba.js} (93%) rename assets/{Checkbox.stories-baa57a19.js.map => Checkbox.stories-0322bfba.js.map} (98%) rename assets/{CheckboxGroup.stories-5a4bd9e6.js => CheckboxGroup.stories-6f06f0c1.js} (88%) rename assets/{CheckboxGroup.stories-5a4bd9e6.js.map => CheckboxGroup.stories-6f06f0c1.js.map} (99%) rename assets/{Color-6VNJS4EI-ca41d801.js => Color-6VNJS4EI-e03781da.js} (99%) rename assets/{Color-6VNJS4EI-ca41d801.js.map => Color-6VNJS4EI-e03781da.js.map} (99%) rename assets/{Counter.stories-efe27aed.js => Counter.stories-921af222.js} (97%) rename assets/{Counter.stories-efe27aed.js.map => Counter.stories-921af222.js.map} (99%) rename assets/{Divider.stories-0d7df53c.js => Divider.stories-33d034e7.js} (88%) rename assets/{Divider.stories-0d7df53c.js.map => Divider.stories-33d034e7.js.map} (97%) delete mode 100644 assets/DocsRenderer-3PUGWF3O-4d6321b8.js delete mode 100644 assets/DocsRenderer-3PUGWF3O-4d6321b8.js.map create mode 100644 assets/DocsRenderer-3PUGWF3O-6506d0ff.js create mode 100644 assets/DocsRenderer-3PUGWF3O-6506d0ff.js.map rename assets/{GlobalScrollAreaStyles-UY5SB7EJ-6df95492.js => GlobalScrollAreaStyles-UY5SB7EJ-a11b269b.js} (98%) rename assets/{GlobalScrollAreaStyles-UY5SB7EJ-6df95492.js.map => GlobalScrollAreaStyles-UY5SB7EJ-a11b269b.js.map} (99%) rename assets/{HelperText-d180c721.js => HelperText-2d8f3a33.js} (94%) rename assets/{HelperText-d180c721.js.map => HelperText-2d8f3a33.js.map} (98%) rename assets/{HelperText.stories-7f0ad49a.js => HelperText.stories-d472c289.js} (84%) rename assets/{HelperText.stories-7f0ad49a.js.map => HelperText.stories-d472c289.js.map} (95%) rename assets/{IconButton-a5fefd68.js => IconButton-fb5ca4c8.js} (97%) rename assets/{IconButton-a5fefd68.js.map => IconButton-fb5ca4c8.js.map} (98%) rename assets/{IconButton.stories-9e919dfc.js => IconButton.stories-7c0926cc.js} (88%) rename assets/{IconButton.stories-9e919dfc.js.map => IconButton.stories-7c0926cc.js.map} (98%) rename assets/{InlineBanner.stories-cf06a8b0.js => InlineBanner.stories-7cf59a3d.js} (94%) rename assets/{InlineBanner.stories-cf06a8b0.js.map => InlineBanner.stories-7cf59a3d.js.map} (99%) rename assets/{InlineMessage.stories-32ef2223.js => InlineMessage.stories-e717ae66.js} (96%) rename assets/{InlineMessage.stories-32ef2223.js.map => InlineMessage.stories-e717ae66.js.map} (99%) rename assets/{InlineSearchInput.stories-a3fd438e.js => InlineSearchInput.stories-2f8807f4.js} (86%) rename assets/{InlineSearchInput.stories-a3fd438e.js.map => InlineSearchInput.stories-2f8807f4.js.map} (98%) rename assets/{Label-c3954f77.js => Label-6d600e0b.js} (90%) rename assets/{Label-c3954f77.js.map => Label-6d600e0b.js.map} (98%) rename assets/{Label.stories-c7364cff.js => Label.stories-069b3d3a.js} (85%) rename assets/{Label.stories-c7364cff.js.map => Label.stories-069b3d3a.js.map} (50%) rename assets/{Loader.stories-883e8cb3.js => Loader.stories-dd6317a8.js} (93%) rename assets/{Loader.stories-883e8cb3.js.map => Loader.stories-dd6317a8.js.map} (98%) rename assets/{Popover.stories-96a1385d.js => Popover.stories-5c427194.js} (93%) rename assets/{Popover.stories-96a1385d.js.map => Popover.stories-5c427194.js.map} (99%) rename assets/{RadioButton-39b6476e.js => RadioButton-1659869b.js} (94%) rename assets/{RadioButton-39b6476e.js.map => RadioButton-1659869b.js.map} (99%) rename assets/{RadioButton.stories-9a50cef7.js => RadioButton.stories-cd3bca3d.js} (93%) rename assets/{RadioButton.stories-9a50cef7.js.map => RadioButton.stories-cd3bca3d.js.map} (98%) rename assets/{RadioButtonGroup.stories-9bbd2ca6.js => RadioButtonGroup.stories-30affbfe.js} (90%) rename assets/{RadioButtonGroup.stories-9bbd2ca6.js.map => RadioButtonGroup.stories-30affbfe.js.map} (99%) rename assets/{ReadMe-77cbdecb.js => ReadMe-cef99008.js} (96%) rename assets/{ReadMe-77cbdecb.js.map => ReadMe-cef99008.js.map} (99%) rename assets/{SearchInput-6cf15242.js => SearchInput-9b67f04a.js} (87%) rename assets/{SearchInput-6cf15242.js.map => SearchInput-9b67f04a.js.map} (94%) rename assets/{SearchInput.stories-4879b2c9.js => SearchInput.stories-2cbc5a9c.js} (87%) rename assets/{SearchInput.stories-4879b2c9.js.map => SearchInput.stories-2cbc5a9c.js.map} (97%) rename assets/{Select.stories-8468b7b2.js => Select.stories-d26bacc9.js} (87%) rename assets/{Select.stories-8468b7b2.js.map => Select.stories-d26bacc9.js.map} (93%) rename assets/{SocialButton.stories-0d701562.js => SocialButton.stories-a4ca51fe.js} (97%) rename assets/{SocialButton.stories-0d701562.js.map => SocialButton.stories-a4ca51fe.js.map} (99%) rename assets/{StatusDot.stories-eb8c5516.js => StatusDot.stories-add48de8.js} (93%) rename assets/{StatusDot.stories-eb8c5516.js.map => StatusDot.stories-add48de8.js.map} (99%) delete mode 100644 assets/Tag.stories-3a7a5a5d.js delete mode 100644 assets/Tag.stories-3a7a5a5d.js.map rename assets/{TetDocs-c95a7072.js => TetDocs-27818ecc.js} (99%) rename assets/{TetDocs-c95a7072.js.map => TetDocs-27818ecc.js.map} (99%) rename assets/{TextInput-60aa91f4.js => TextInput-28ebe73f.js} (95%) rename assets/{TextInput-60aa91f4.js.map => TextInput-28ebe73f.js.map} (99%) rename assets/{TextInput.stories-e16ec5e8.js => TextInput.stories-f9245633.js} (93%) rename assets/{TextInput.stories-e16ec5e8.js.map => TextInput.stories-f9245633.js.map} (84%) rename assets/{Toast.stories-65f09d80.js => Toast.stories-efbfc19b.js} (96%) rename assets/{Toast.stories-65f09d80.js.map => Toast.stories-efbfc19b.js.map} (99%) rename assets/{WithTooltip-J57HCPYA-a1256ac5.js => WithTooltip-J57HCPYA-0b7d4448.js} (52%) create mode 100644 assets/WithTooltip-J57HCPYA-0b7d4448.js.map delete mode 100644 assets/WithTooltip-J57HCPYA-a1256ac5.js.map rename assets/{chunk-S4VUQJ4A-b3ed99a8.js => chunk-S4VUQJ4A-cf8ba770.js} (77%) rename assets/{chunk-S4VUQJ4A-b3ed99a8.js.map => chunk-S4VUQJ4A-cf8ba770.js.map} (98%) rename assets/{formatter-SWP5E3XI-c9c872f8.js => formatter-SWP5E3XI-7bf9065f.js} (99%) rename assets/{formatter-SWP5E3XI-c9c872f8.js.map => formatter-SWP5E3XI-7bf9065f.js.map} (99%) create mode 100644 assets/iframe-012cd190.js create mode 100644 assets/iframe-012cd190.js.map delete mode 100644 assets/iframe-a6ed202a.js delete mode 100644 assets/iframe-a6ed202a.js.map rename assets/{index-d730317a.js => index-28c86eb6.js} (99%) rename assets/{index-d730317a.js.map => index-28c86eb6.js.map} (99%) rename assets/{index-5458ad35.js => index-7a55bdd3.js} (97%) rename assets/{index-5458ad35.js.map => index-7a55bdd3.js.map} (99%) create mode 100644 assets/preview-01f28937.js rename assets/{preview-4a11a4cc.js.map => preview-01f28937.js.map} (94%) delete mode 100644 assets/preview-4a11a4cc.js rename assets/{syntaxhighlighter-PONEFOSF-9b8e6cb3.js => syntaxhighlighter-PONEFOSF-3429ae2e.js} (53%) create mode 100644 assets/syntaxhighlighter-PONEFOSF-3429ae2e.js.map delete mode 100644 assets/syntaxhighlighter-PONEFOSF-9b8e6cb3.js.map delete mode 100644 src/components/Tag/Tag.d.ts delete mode 100644 src/components/Tag/Tag.props.d.ts delete mode 100644 src/components/Tag/Tag.stories.d.ts delete mode 100644 src/components/Tag/Tag.styles.d.ts delete mode 100644 src/components/Tag/Tag.test.d.ts delete mode 100644 src/components/Tag/index.d.ts delete mode 100644 src/components/Tag/stylesBuilder/index.d.ts delete mode 100644 src/components/Tag/stylesBuilder/stylesBuilder.d.ts delete mode 100644 src/docs-components/TagDocs.d.ts diff --git a/assets/AlertBanner.stories-d64ba3de.js b/assets/AlertBanner.stories-2088f90c.js similarity index 92% rename from assets/AlertBanner.stories-d64ba3de.js rename to assets/AlertBanner.stories-2088f90c.js index dd1d2d95..884e4703 100644 --- a/assets/AlertBanner.stories-d64ba3de.js +++ b/assets/AlertBanner.stories-2088f90c.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-ffb262ed.js";import{a as g}from"./chunk-AY7I2SME-5eb1ab46.js";import{R as N}from"./tetrisly-icons.es-3ae3ef26.js";import{r as y}from"./index-76fb7be0.js";import{m as q,l as H,T as M}from"./TetDocs-c95a7072.js";import{B as C}from"./Button-f0f6780b.js";import{I as V}from"./IconButton-a5fefd68.js";import{u as D}from"./useAction-275346b1.js";import{t as r}from"./TetrislyProvider-e15ac01a.js";import{S as x}from"./SectionHeader-922ceba2.js";import"./_commonjsHelpers-de833af9.js";import"./index-d730317a.js";import"./iframe-a6ed202a.js";import"../sb-preview/runtime.js";import"./index-ffc7e5ff.js";import"./index-d37d4223.js";import"./index-356e4a49.js";import"./index-5458ad35.js";const T={p:"$space-component-padding-medium",pl:"$space-component-padding-2xLarge",display:"flex",alignItems:"center",text:"$typo-body-medium",intent:{none:{backgroundColor:"$color-background-neutral-strong",color:"$color-content-primary-inverted"},positive:{backgroundColor:"$color-background-positive-strong",color:"$color-content-primary-inverted"},warning:{backgroundColor:"$color-background-warning-strong",color:"$color-content-primary"},negative:{backgroundColor:"$color-background-negative-strong",color:"$color-content-primary-inverted"}},innerElements:{iconContainer:{mr:"$space-component-gap-small"},actionContainer:{display:"flex",alignItems:"center",justifyContent:"center",gap:"$space-component-gap-small",ml:"$space-component-gap-large"},closeButton:{ml:"auto"}}},R=n=>({none:"20-info-fill",positive:"20-info-fill",warning:"20-warning-fill",negative:"20-alert-fill"})[n],W=(n,o)=>{const{intent:i,innerElements:{iconContainer:v,actionContainer:s,closeButton:f},...t}=q({defaultConfig:T,custom:o}),c={appearance:n==="warning"?"reverseInverted":"inverted"},l={appearance:n==="warning"?"primary":"inverted"};return{container:{...i[n],...t},iconContainer:v,actionContainer:s,actionProps:c,closeButtonProps:l,closeButton:f}},a=({text:n,intent:o="none",custom:i,action:v,onCloseClick:s,...f})=>{const t=y.useMemo(()=>W(o,i),[o,i]),[c,l]=D(v),S=y.useMemo(()=>R(o),[o]);return e.jsxs(r.div,{...t.container,"data-testid":"alert-banner",...f,children:[e.jsx(r.span,{...t.iconContainer,"data-testid":"alert-banner-iconContainer",children:e.jsx(N,{name:S})}),n,c&&e.jsxs(r.div,{...t.actionContainer,"data-testid":"alert-banner-actionContainer",children:[e.jsx(C,{variant:"bare",...t.actionProps,...c}),l&&e.jsxs(e.Fragment,{children:[e.jsx(r.div,{children:"·"}),e.jsx(C,{variant:"bare",...t.actionProps,...l})]})]}),!!s&&e.jsx(V,{size:"small",variant:"ghost",intent:"none",icon:"20-close",onClick:s,...t.closeButton,...t.closeButtonProps,"data-testid":"alert-banner-closeButton"})]})};try{a.displayName="AlertBanner",a.__docgenInfo={description:"",displayName:"AlertBanner",props:{text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},intent:{defaultValue:{value:"none"},description:"",name:"intent",required:!1,type:{name:"enum",value:[{value:'"warning"'},{value:'"negative"'},{value:'"none"'},{value:'"positive"'}]}},action:{defaultValue:null,description:"",name:"action",required:!1,type:{name:"ActionProp"}},onCloseClick:{defaultValue:null,description:"",name:"onCloseClick",required:!1,type:{name:"((e: MouseEvent) => void)"}},custom:{defaultValue:null,description:"",name:"custom",required:!1,type:{name:"AlertBannerConfig"}}}}}catch{}const z=["none","positive","warning","negative"],F=()=>e.jsx(e.Fragment,{children:z.map(n=>e.jsxs(r.section,{children:[e.jsxs(x,{px:{md:"$dimension-1000",_:"$dimension-500"},py:"$dimension-500",variant:"H1",children:["Intent: ",H.capitalize(n)]}),e.jsxs(r.div,{px:{md:"$dimension-1000",_:"$dimension-500"},children:[e.jsx(x,{py:"$dimension-500",variant:"H2",children:"Action: No"}),e.jsx(a,{text:"Alert text",intent:n})]}),e.jsxs(r.div,{px:{md:"$dimension-1000",_:"$dimension-500"},children:[e.jsx(x,{py:"$dimension-500",variant:"H2",children:"Action: Yes"}),e.jsx(a,{text:"Alert text",intent:n,my:"$dimension-500",action:[{label:"Click me",onClick:g("onClick")},{label:"Or click me",onClick:g("onClick")}]})]})]},n))}),ce={title:"AlertBanner",component:a,tags:["autodocs"],args:{text:"Alert text",action:[{label:"Action",onClick:g("onClick")},{label:"Action",onClick:g("onClick")}]},parameters:{docs:{description:{component:"Prominent element used to display important messages or notifications to users. Alert Banners can convey various levels of urgency, such as success, warning, or error. They are designed to capture the user's attention and provide a clear and concise message."},page:()=>e.jsx(M,{docs:"https://docs.tetrisly.com/components/list/alertbanner",children:e.jsx(F,{})})}}},m={},p={args:{intent:"positive"}},d={args:{intent:"warning"}},u={args:{intent:"negative"}};var $,j,h;m.parameters={...m.parameters,docs:{...($=m.parameters)==null?void 0:$.docs,source:{originalSource:"{}",...(h=(j=m.parameters)==null?void 0:j.docs)==null?void 0:h.source}}};var b,k,A;p.parameters={...p.parameters,docs:{...(b=p.parameters)==null?void 0:b.docs,source:{originalSource:`{ +import{j as e}from"./jsx-runtime-ffb262ed.js";import{a as g}from"./chunk-AY7I2SME-5eb1ab46.js";import{R as N}from"./tetrisly-icons.es-3ae3ef26.js";import{r as y}from"./index-76fb7be0.js";import{m as q,l as H,T as M}from"./TetDocs-27818ecc.js";import{B as C}from"./Button-dffe308c.js";import{I as V}from"./IconButton-fb5ca4c8.js";import{u as D}from"./useAction-275346b1.js";import{t as r}from"./TetrislyProvider-e15ac01a.js";import{S as x}from"./SectionHeader-922ceba2.js";import"./_commonjsHelpers-de833af9.js";import"./index-28c86eb6.js";import"./iframe-012cd190.js";import"../sb-preview/runtime.js";import"./index-ffc7e5ff.js";import"./index-d37d4223.js";import"./index-356e4a49.js";import"./index-7a55bdd3.js";const T={p:"$space-component-padding-medium",pl:"$space-component-padding-2xLarge",display:"flex",alignItems:"center",text:"$typo-body-medium",intent:{none:{backgroundColor:"$color-background-neutral-strong",color:"$color-content-primary-inverted"},positive:{backgroundColor:"$color-background-positive-strong",color:"$color-content-primary-inverted"},warning:{backgroundColor:"$color-background-warning-strong",color:"$color-content-primary"},negative:{backgroundColor:"$color-background-negative-strong",color:"$color-content-primary-inverted"}},innerElements:{iconContainer:{mr:"$space-component-gap-small"},actionContainer:{display:"flex",alignItems:"center",justifyContent:"center",gap:"$space-component-gap-small",ml:"$space-component-gap-large"},closeButton:{ml:"auto"}}},R=n=>({none:"20-info-fill",positive:"20-info-fill",warning:"20-warning-fill",negative:"20-alert-fill"})[n],W=(n,o)=>{const{intent:i,innerElements:{iconContainer:v,actionContainer:s,closeButton:f},...t}=q({defaultConfig:T,custom:o}),c={appearance:n==="warning"?"reverseInverted":"inverted"},l={appearance:n==="warning"?"primary":"inverted"};return{container:{...i[n],...t},iconContainer:v,actionContainer:s,actionProps:c,closeButtonProps:l,closeButton:f}},a=({text:n,intent:o="none",custom:i,action:v,onCloseClick:s,...f})=>{const t=y.useMemo(()=>W(o,i),[o,i]),[c,l]=D(v),S=y.useMemo(()=>R(o),[o]);return e.jsxs(r.div,{...t.container,"data-testid":"alert-banner",...f,children:[e.jsx(r.span,{...t.iconContainer,"data-testid":"alert-banner-iconContainer",children:e.jsx(N,{name:S})}),n,c&&e.jsxs(r.div,{...t.actionContainer,"data-testid":"alert-banner-actionContainer",children:[e.jsx(C,{variant:"bare",...t.actionProps,...c}),l&&e.jsxs(e.Fragment,{children:[e.jsx(r.div,{children:"·"}),e.jsx(C,{variant:"bare",...t.actionProps,...l})]})]}),!!s&&e.jsx(V,{size:"small",variant:"ghost",intent:"none",icon:"20-close",onClick:s,...t.closeButton,...t.closeButtonProps,"data-testid":"alert-banner-closeButton"})]})};try{a.displayName="AlertBanner",a.__docgenInfo={description:"",displayName:"AlertBanner",props:{text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},intent:{defaultValue:{value:"none"},description:"",name:"intent",required:!1,type:{name:"enum",value:[{value:'"warning"'},{value:'"negative"'},{value:'"none"'},{value:'"positive"'}]}},action:{defaultValue:null,description:"",name:"action",required:!1,type:{name:"ActionProp"}},onCloseClick:{defaultValue:null,description:"",name:"onCloseClick",required:!1,type:{name:"((e: MouseEvent) => void)"}},custom:{defaultValue:null,description:"",name:"custom",required:!1,type:{name:"AlertBannerConfig"}}}}}catch{}const z=["none","positive","warning","negative"],F=()=>e.jsx(e.Fragment,{children:z.map(n=>e.jsxs(r.section,{children:[e.jsxs(x,{px:{md:"$dimension-1000",_:"$dimension-500"},py:"$dimension-500",variant:"H1",children:["Intent: ",H.capitalize(n)]}),e.jsxs(r.div,{px:{md:"$dimension-1000",_:"$dimension-500"},children:[e.jsx(x,{py:"$dimension-500",variant:"H2",children:"Action: No"}),e.jsx(a,{text:"Alert text",intent:n})]}),e.jsxs(r.div,{px:{md:"$dimension-1000",_:"$dimension-500"},children:[e.jsx(x,{py:"$dimension-500",variant:"H2",children:"Action: Yes"}),e.jsx(a,{text:"Alert text",intent:n,my:"$dimension-500",action:[{label:"Click me",onClick:g("onClick")},{label:"Or click me",onClick:g("onClick")}]})]})]},n))}),ce={title:"AlertBanner",component:a,tags:["autodocs"],args:{text:"Alert text",action:[{label:"Action",onClick:g("onClick")},{label:"Action",onClick:g("onClick")}]},parameters:{docs:{description:{component:"Prominent element used to display important messages or notifications to users. Alert Banners can convey various levels of urgency, such as success, warning, or error. They are designed to capture the user's attention and provide a clear and concise message."},page:()=>e.jsx(M,{docs:"https://docs.tetrisly.com/components/list/alertbanner",children:e.jsx(F,{})})}}},m={},p={args:{intent:"positive"}},d={args:{intent:"warning"}},u={args:{intent:"negative"}};var $,j,h;m.parameters={...m.parameters,docs:{...($=m.parameters)==null?void 0:$.docs,source:{originalSource:"{}",...(h=(j=m.parameters)==null?void 0:j.docs)==null?void 0:h.source}}};var b,k,A;p.parameters={...p.parameters,docs:{...(b=p.parameters)==null?void 0:b.docs,source:{originalSource:`{ args: { intent: 'positive' } @@ -11,4 +11,4 @@ import{j as e}from"./jsx-runtime-ffb262ed.js";import{a as g}from"./chunk-AY7I2SM intent: 'negative' } }`,...(I=(P=u.parameters)==null?void 0:P.docs)==null?void 0:I.source}}};const le=["Default","Positive","Warning","Negative"];export{m as Default,u as Negative,p as Positive,d as Warning,le as __namedExportsOrder,ce as default}; -//# sourceMappingURL=AlertBanner.stories-d64ba3de.js.map +//# sourceMappingURL=AlertBanner.stories-2088f90c.js.map diff --git a/assets/AlertBanner.stories-d64ba3de.js.map b/assets/AlertBanner.stories-2088f90c.js.map similarity index 99% rename from assets/AlertBanner.stories-d64ba3de.js.map rename to assets/AlertBanner.stories-2088f90c.js.map index 24af994c..5cf0051f 100644 --- a/assets/AlertBanner.stories-d64ba3de.js.map +++ b/assets/AlertBanner.stories-2088f90c.js.map @@ -1 +1 @@ -{"version":3,"file":"AlertBanner.stories-d64ba3de.js","sources":["../../src/components/AlertBanner/AlertBanner.styles.ts","../../src/components/AlertBanner/stylesBuilder/stylesBuilder.ts","../../src/components/AlertBanner/AlertBanner.tsx","../../src/docs-components/AlertBannerDocs.tsx"],"sourcesContent":["import { AlertBannerIntent } from './types/AlertBannerIntent.type';\n\nimport { BaseProps } from '@/types/BaseProps';\nimport { IconName } from '@/utility-types/IconName';\n\nexport type AlertBannerConfig = {\n intent?: Partial>;\n innerElements?: {\n iconContainer?: BaseProps;\n actionContainer?: BaseProps;\n closeButton?: BaseProps;\n };\n} & BaseProps;\n\nexport const defaultConfig = {\n p: '$space-component-padding-medium',\n pl: '$space-component-padding-2xLarge',\n display: 'flex',\n alignItems: 'center',\n text: '$typo-body-medium',\n intent: {\n none: {\n backgroundColor: '$color-background-neutral-strong',\n color: '$color-content-primary-inverted',\n },\n positive: {\n backgroundColor: '$color-background-positive-strong',\n color: '$color-content-primary-inverted',\n },\n warning: {\n backgroundColor: '$color-background-warning-strong',\n color: '$color-content-primary',\n },\n negative: {\n backgroundColor: '$color-background-negative-strong',\n color: '$color-content-primary-inverted',\n },\n },\n innerElements: {\n iconContainer: {\n mr: '$space-component-gap-small',\n },\n actionContainer: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: '$space-component-gap-small',\n ml: '$space-component-gap-large',\n },\n closeButton: {\n ml: 'auto',\n },\n },\n} satisfies AlertBannerConfig;\n\nexport const resolveIconName = (intent: AlertBannerIntent): IconName<20> => {\n const iconConfig: Record> = {\n none: '20-info-fill',\n positive: '20-info-fill',\n warning: '20-warning-fill',\n negative: '20-alert-fill',\n };\n\n return iconConfig[intent];\n};\n","import { AlertBannerProps } from '../AlertBanner.props';\nimport { defaultConfig } from '../AlertBanner.styles';\nimport { AlertBannerIntent } from '../types';\n\nimport { BareButtonProps } from '@/components/Button/Button.props';\nimport { GhostIconButtonProps } from '@/components/IconButton/IconButton.props';\nimport { mergeConfigWithCustom } from '@/services';\nimport { BaseProps } from '@/types/BaseProps';\n\ntype AlertBannerStylesBuilder = {\n container: BaseProps;\n iconContainer: BaseProps;\n actionContainer: BaseProps;\n closeButton: BaseProps;\n actionProps: Partial;\n closeButtonProps: Partial;\n};\n\nexport const stylesBuilder = (\n intent: AlertBannerIntent,\n custom: AlertBannerProps['custom'],\n): AlertBannerStylesBuilder => {\n const {\n intent: intentStyles,\n innerElements: { iconContainer, actionContainer, closeButton },\n ...restStyles\n } = mergeConfigWithCustom({ defaultConfig, custom });\n\n const actionProps = {\n appearance: intent === 'warning' ? 'reverseInverted' : 'inverted',\n } as const;\n\n const closeButtonProps = {\n appearance: intent === 'warning' ? 'primary' : 'inverted',\n } as const;\n\n return {\n container: {\n ...intentStyles[intent],\n ...restStyles,\n },\n iconContainer,\n actionContainer,\n actionProps,\n closeButtonProps,\n closeButton,\n };\n};\n","import { Icon } from '@virtuslab/tetrisly-icons';\nimport { FC, useMemo } from 'react';\n\nimport { AlertBannerProps } from './AlertBanner.props';\nimport { resolveIconName } from './AlertBanner.styles';\nimport { stylesBuilder } from './stylesBuilder';\nimport { Button } from '../Button';\nimport { IconButton } from '../IconButton';\n\nimport { useAction } from '@/hooks';\nimport { tet } from '@/tetrisly';\nimport { MarginProps } from '@/types';\n\nexport const AlertBanner: FC = ({\n text,\n intent = 'none',\n custom,\n action,\n onCloseClick,\n ...restProps\n}) => {\n const styles = useMemo(() => stylesBuilder(intent, custom), [intent, custom]);\n\n const [firstAction, secondAction] = useAction(action);\n\n const iconName = useMemo(() => resolveIconName(intent), [intent]);\n\n return (\n \n \n \n \n {text}\n {firstAction && (\n \n