@sybilion/uilib 1.3.100 → 1.3.101

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.
@@ -0,0 +1,11 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import cn from 'classnames';
3
+ import { Button } from '../Button/Button.js';
4
+ import { XIcon, InfoIcon } from 'lucide-react';
5
+ import S from './Banner.styl.js';
6
+
7
+ function Banner({ children, className, icon: Icon = InfoIcon, onClose, }) {
8
+ return (jsxs("div", { className: cn(S.root, className), "data-slot": "banner", children: [Icon !== false && jsx(Icon, { className: S.icon, size: 16 }), children, onClose && (jsx(Button, { variant: "ghost", icon: true, type: "button", onClick: onClose, className: S.closeButton, children: jsx(XIcon, { size: 16 }) }))] }));
9
+ }
10
+
11
+ export { Banner };
@@ -0,0 +1,7 @@
1
+ import styleInject from 'style-inject';
2
+
3
+ var css_248z = ".Banner_root__zegJA{align-items:center;background-color:var(--card);border-radius:var(--p-2);display:flex;flex-wrap:wrap;margin-bottom:var(--p-10);margin-top:calc(var(--p-4)*-1);padding:var(--p-3) var(--p-4);width:-moz-fit-content;width:fit-content}.Banner_root__zegJA a{padding:0 var(--p-1)}.Banner_icon__q5xFu{display:inline-block;margin-right:var(--p-3)}.Banner_closeButton__cj0WU{margin-left:var(--p-1);opacity:.5;transition:opacity .2s ease}.Banner_closeButton__cj0WU:hover{opacity:1}";
4
+ var S = {"root":"Banner_root__zegJA","icon":"Banner_icon__q5xFu","closeButton":"Banner_closeButton__cj0WU"};
5
+ styleInject(css_248z);
6
+
7
+ export { S as default };
package/dist/esm/index.js CHANGED
@@ -15,6 +15,7 @@ export { AppHeaderHost, AppHeaderPortal } from './components/ui/AppHeader/AppHea
15
15
  export { PAGE_HEADER_ACTIONS_ID, PAGE_HEADER_ID } from './components/ui/AppHeader/appChromeAnchors.js';
16
16
  export { Avatar, AvatarFallback, AvatarImage } from './components/ui/Avatar/Avatar.js';
17
17
  export { Badge } from './components/ui/Badge/Badge.js';
18
+ export { Banner } from './components/ui/Banner/Banner.js';
18
19
  export { Chip } from './components/ui/Chip/Chip.js';
19
20
  export { Kicker } from './components/ui/Kicker/Kicker.js';
20
21
  export { PullQuote } from './components/ui/PullQuote/PullQuote.js';
@@ -0,0 +1,2 @@
1
+ import type { BannerProps } from './Banner.types';
2
+ export declare function Banner({ children, className, icon: Icon, onClose, }: BannerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { ComponentType, ReactNode } from 'react';
2
+ export interface BannerProps {
3
+ children: ReactNode;
4
+ icon?: ComponentType<{
5
+ className?: string;
6
+ size?: number;
7
+ }> | false;
8
+ onClose?: () => void;
9
+ className?: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ export { Banner } from './Banner';
2
+ export type { BannerProps } from './Banner.types';
@@ -13,6 +13,7 @@ export * from './components/ui/AnalysisLineIcon';
13
13
  export * from './components/ui/AppHeader';
14
14
  export * from './components/ui/Avatar';
15
15
  export * from './components/ui/Badge';
16
+ export * from './components/ui/Banner';
16
17
  export * from './components/ui/Chip';
17
18
  export * from './components/ui/Kicker';
18
19
  export * from './components/ui/PullQuote';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sybilion/uilib",
3
- "version": "1.3.100",
3
+ "version": "1.3.101",
4
4
  "description": "Sybilion Design System — React UI components (Webpack + Stylus)",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -0,0 +1,28 @@
1
+ .root
2
+ display flex
3
+ align-items center
4
+ flex-wrap wrap
5
+
6
+ width fit-content
7
+ padding var(--p-3) var(--p-4)
8
+ margin-top calc(var(--p-4) * -1)
9
+ margin-bottom var(--p-10)
10
+
11
+ background-color var(--card)
12
+ border-radius var(--p-2)
13
+
14
+ a
15
+ padding 0 var(--p-1)
16
+
17
+
18
+ .icon
19
+ display inline-block
20
+ margin-right var(--p-3)
21
+
22
+ .closeButton
23
+ margin-left var(--p-1)
24
+ opacity .5
25
+ transition opacity 200ms ease
26
+
27
+ &:hover
28
+ opacity 1
@@ -0,0 +1,9 @@
1
+ // This file is automatically generated.
2
+ // Please do not change this file!
3
+ interface CssExports {
4
+ 'closeButton': string;
5
+ 'icon': string;
6
+ 'root': string;
7
+ }
8
+ export const cssExports: CssExports;
9
+ export default cssExports;
@@ -0,0 +1,32 @@
1
+ import cn from 'classnames';
2
+
3
+ import { Button } from '#uilib/components/ui/Button';
4
+ import { InfoIcon, XIcon } from 'lucide-react';
5
+
6
+ import S from './Banner.styl';
7
+ import type { BannerProps } from './Banner.types';
8
+
9
+ export function Banner({
10
+ children,
11
+ className,
12
+ icon: Icon = InfoIcon,
13
+ onClose,
14
+ }: BannerProps) {
15
+ return (
16
+ <div className={cn(S.root, className)} data-slot="banner">
17
+ {Icon !== false && <Icon className={S.icon} size={16} />}
18
+ {children}
19
+ {onClose && (
20
+ <Button
21
+ variant="ghost"
22
+ icon
23
+ type="button"
24
+ onClick={onClose}
25
+ className={S.closeButton}
26
+ >
27
+ <XIcon size={16} />
28
+ </Button>
29
+ )}
30
+ </div>
31
+ );
32
+ }
@@ -0,0 +1,8 @@
1
+ import type { ComponentType, ReactNode } from 'react';
2
+
3
+ export interface BannerProps {
4
+ children: ReactNode;
5
+ icon?: ComponentType<{ className?: string; size?: number }> | false;
6
+ onClose?: () => void;
7
+ className?: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ export { Banner } from './Banner';
2
+ export type { BannerProps } from './Banner.types';
package/src/index.ts CHANGED
@@ -18,6 +18,7 @@ export * from './components/ui/AnalysisLineIcon';
18
18
  export * from './components/ui/AppHeader';
19
19
  export * from './components/ui/Avatar';
20
20
  export * from './components/ui/Badge';
21
+ export * from './components/ui/Banner';
21
22
  export * from './components/ui/Chip';
22
23
  export * from './components/ui/Kicker';
23
24
  export * from './components/ui/PullQuote';