sate-lib 1.85.0 → 1.87.0

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.
@@ -1,7 +1,9 @@
1
+ import type { ElementType } from "react";
1
2
  export declare function getInitials(name?: string): string;
2
3
  type AvatarSize = "small" | "medium" | "large";
3
4
  type AvatarShape = "circle" | "rounded";
4
5
  export interface AvatarProps {
6
+ as?: ElementType;
5
7
  src?: string;
6
8
  alt?: string;
7
9
  name?: string;
@@ -9,7 +11,8 @@ export interface AvatarProps {
9
11
  shape?: AvatarShape;
10
12
  border?: boolean;
11
13
  className?: string;
14
+ testId?: string;
12
15
  }
13
- export declare function Avatar({ src, alt, name, size, shape, border, className, ...rest }: AvatarProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function Avatar({ as: Tag, src, alt, name, size, shape, border, className, testId, ...rest }: AvatarProps): import("react/jsx-runtime").JSX.Element;
14
17
  export {};
15
18
  //# sourceMappingURL=avatar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/avatar.tsx"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAkBjD;AAED,KAAK,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC/C,KAAK,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAExC,MAAM,WAAW,WAAW;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,MAAM,CAAC,EACtB,GAAG,EACH,GAAG,EACH,IAAI,EACJ,IAAe,EACf,KAAgB,EAChB,MAAc,EACd,SAAS,EACT,GAAG,IAAI,EACP,EAAE,WAAW,2CAsBb"}
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGzC,wBAAgB,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAkBjD;AAED,KAAK,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC/C,KAAK,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAExC,MAAM,WAAW,WAAW;IAC3B,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,MAAM,CAAC,EACtB,EAAE,EAAE,GAAW,EACf,GAAG,EACH,GAAG,EACH,IAAI,EACJ,IAAe,EACf,KAAgB,EAChB,MAAc,EACd,SAAS,EACT,MAAiB,EACjB,GAAG,IAAI,EACP,EAAE,WAAW,2CA4Bb"}
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import r from"./avatar.styles.module.js";function t(e){if(!e)return"";let r=e.trim().replace(/\s+/g," "),t=r.includes(" ")?r.split(" "):r.split(/(?=[A-Z])/);return 0===(t=t.filter(Boolean)).length?"":1===t.length?t[0].substring(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}function a({src:a,alt:l,name:i,size:s="medium",shape:n="circle",border:o=!1,className:m,...c}){return e("div",{"aria-label":l||i,className:[r.root,r[s],r[n],o&&r.border,m].filter(Boolean).join(" "),role:"img",...c,children:i?e("span",{className:`bodyDefaultEmphasis ${r.text}`,children:t(i)}):e("img",{alt:l,className:r.img,draggable:!1,src:a})})}export{a as Avatar,t as getInitials};
1
+ import{jsx as e}from"react/jsx-runtime";import t from"./avatar.styles.module.js";function r(e){if(!e)return"";let t=e.trim().replace(/\s+/g," "),r=t.includes(" ")?t.split(" "):t.split(/(?=[A-Z])/);return 0===(r=r.filter(Boolean)).length?"":1===r.length?r[0].substring(0,2).toUpperCase():(r[0][0]+r[r.length-1][0]).toUpperCase()}function a({as:a="img",src:i,alt:s,name:l,size:n="medium",shape:o="circle",border:m=!1,className:c,testId:p="avatar",...d}){return e("div",{className:[t.root,t[n],t[o],m&&t.border,c].filter(Boolean).join(" "),"data-testid":p,children:l?e("span",{className:`bodyDefaultEmphasis ${t.text}`,children:r(l)}):e(a,{alt:s,className:t.img,draggable:!1,src:i,...d})})}export{a as Avatar,r as getInitials};
@@ -1,7 +1,9 @@
1
+ import type { ElementType } from "react";
1
2
  export interface MapMarkerProps {
3
+ as?: "img" | ElementType;
2
4
  src?: string;
3
5
  alt?: string;
4
6
  className?: string;
5
7
  }
6
- export declare function MapMarker({ src, alt, className }: MapMarkerProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function MapMarker({ as: Tag, src, alt, className, ...rest }: MapMarkerProps): import("react/jsx-runtime").JSX.Element;
7
9
  //# sourceMappingURL=map-marker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"map-marker.d.ts","sourceRoot":"","sources":["../../../src/components/map-marker/map-marker.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,SAAS,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,cAAc,2CAkBhE"}
1
+ {"version":3,"file":"map-marker.d.ts","sourceRoot":"","sources":["../../../src/components/map-marker/map-marker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGzC,MAAM,WAAW,cAAc;IAC9B,EAAE,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,SAAS,CAAC,EACzB,EAAE,EAAE,GAAW,EACf,GAAG,EACH,GAAG,EACH,SAAS,EACT,GAAG,IAAI,EACP,EAAE,cAAc,2CAkBhB"}
@@ -1 +1 @@
1
- import{jsx as r,jsxs as e}from"react/jsx-runtime";import o from"./map-marker.styles.module.js";function t({src:t,alt:i,className:n}){return e("div",{className:[o.root,n].filter(Boolean).join(" "),role:"img",children:[r("img",{alt:i,draggable:!1,src:t}),r("svg",{fill:"none",viewBox:"0 0 36 46",xmlns:"http://www.w3.org/2000/svg",children:r("path",{d:"M34 18c0 14.4-16 25.6-16 25.6S2 32.4 2 18a16 16 0 1 1 32 0Z",fill:"#202020",stroke:"#202020",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3.2"})})]})}export{t as MapMarker};
1
+ import{jsx as r,jsxs as e}from"react/jsx-runtime";import o from"./map-marker.styles.module.js";function t({as:t="img",src:i,alt:n,className:a,...l}){return e("div",{className:[o.root,a].filter(Boolean).join(" "),role:"img",children:[r(t,{alt:n,draggable:!1,src:i,...l}),r("svg",{fill:"none",viewBox:"0 0 36 46",xmlns:"http://www.w3.org/2000/svg",children:r("path",{d:"M34 18c0 14.4-16 25.6-16 25.6S2 32.4 2 18a16 16 0 1 1 32 0Z",fill:"#202020",stroke:"#202020",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3.2"})})]})}export{t as MapMarker};
@@ -0,0 +1,9 @@
1
+ export interface SkeletonProps {
2
+ variant?: "text" | "circular" | "rectangular" | "rounded";
3
+ palette?: "dark" | "light";
4
+ width?: number | string;
5
+ height?: number | string;
6
+ className?: string;
7
+ }
8
+ export declare function Skeleton({ variant, palette, width, height, className, }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/skeleton.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC7B,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,aAAa,GAAG,SAAS,CAAC;IAC1D,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,QAAQ,CAAC,EACxB,OAAgB,EAChB,OAAgB,EAChB,KAAK,EACL,MAAM,EACN,SAAS,GACT,EAAE,aAAa,2CAef"}
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import t from"./skeleton.styles.module.js";function o({variant:o="text",palette:r="dark",width:n,height:s,className:a}){return e("span",{"aria-hidden":!0,className:[t.root,t[o],t[r],a].filter(Boolean).join(" "),style:{height:s,width:n}})}export{o as Skeleton};
@@ -0,0 +1 @@
1
+ import"./skeleton.styles_module.css";let e={root:"root-FP6lRj",skeletonOpacity:"skeletonOpacity-qdgRhc",light:"light-sED9zn",dark:"dark-eoHwg4",text:"text-h2I188",rectangular:"rectangular-Hzdvh6",rounded:"rounded-A5VSkv",circular:"circular-Q69GjX"};export{e as default};
@@ -0,0 +1 @@
1
+ .root-FP6lRj{animation:1.6s ease-in-out infinite skeletonOpacity-qdgRhc;display:inline-block;position:relative}.light-sED9zn{background-color:#ffffff2e}.dark-eoHwg4{background-color:#0000001f}.text-h2I188{border-radius:4px;width:100%;height:1em}.rectangular-Hzdvh6{border-radius:0}.rounded-A5VSkv{border-radius:8px}.circular-Q69GjX{border-radius:50%}@keyframes skeletonOpacity-qdgRhc{0%{opacity:1}50%{opacity:.4}to{opacity:1}}
package/lib/index.d.ts CHANGED
@@ -12,6 +12,7 @@ export { Notification } from "./components/notification/notification";
12
12
  export { ProgressIndicator } from "./components/progress-indicator/progress-indicator";
13
13
  export { SearchInput } from "./components/search-input/search-input";
14
14
  export { SegmentedControl } from "./components/segmented-control/segmented-control";
15
+ export { Skeleton } from "./components/skeleton/skeleton";
15
16
  export { Tabs } from "./components/tabs/tabs";
16
17
  export { TextArea } from "./components/text-area/text-area";
17
18
  export { TextField } from "./components/text-field/text-field";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO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AE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC"}
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- import{Avatar as o}from"./components/avatar/avatar.js";import{Badge as t}from"./components/badge/badge.js";import{Button as r}from"./components/button/button.js";import{ButtonIcon as n}from"./components/button/button-icon.js";import{Drawer as e,DrawerGallery as m,DrawerMenu as p}from"./components/drawer/index.js";import{FilterChipGroup as i}from"./components/filter-chip/filter-chip.js";import{Icon as s}from"./components/icon/icon.js";import{Logo as a}from"./components/logo/logo.js";import{MapMarker as c}from"./components/map-marker/map-marker.js";import{MenuItem as f}from"./components/menu-item/menu-item.js";import{Notification as j}from"./components/notification/notification.js";import{ProgressIndicator as g}from"./components/progress-indicator/progress-indicator.js";import{SearchInput as d}from"./components/search-input/search-input.js";import{SegmentedControl as u}from"./components/segmented-control/segmented-control.js";import{Tabs as l}from"./components/tabs/tabs.js";import{TextArea as b}from"./components/text-area/text-area.js";import{TextField as h}from"./components/text-field/text-field.js";import{Typography as x}from"./components/typography/typography.js";export{o as Avatar,t as Badge,r as Button,n as ButtonIcon,e as Drawer,m as DrawerGallery,p as DrawerMenu,i as FilterChipGroup,s as Icon,a as Logo,c as MapMarker,f as MenuItem,j as Notification,g as ProgressIndicator,d as SearchInput,u as SegmentedControl,l as Tabs,b as TextArea,h as TextField,x as Typography};
1
+ import{Avatar as o}from"./components/avatar/avatar.js";import{Badge as t}from"./components/badge/badge.js";import{Button as r}from"./components/button/button.js";import{ButtonIcon as e}from"./components/button/button-icon.js";import{Drawer as n,DrawerGallery as m,DrawerMenu as p}from"./components/drawer/index.js";import{FilterChipGroup as s}from"./components/filter-chip/filter-chip.js";import{Icon as i}from"./components/icon/icon.js";import{Logo as a}from"./components/logo/logo.js";import{MapMarker as c}from"./components/map-marker/map-marker.js";import{MenuItem as f}from"./components/menu-item/menu-item.js";import{Notification as j}from"./components/notification/notification.js";import{ProgressIndicator as l}from"./components/progress-indicator/progress-indicator.js";import{SearchInput as g}from"./components/search-input/search-input.js";import{SegmentedControl as d}from"./components/segmented-control/segmented-control.js";import{Skeleton as u}from"./components/skeleton/skeleton.js";import{Tabs as b}from"./components/tabs/tabs.js";import{TextArea as h}from"./components/text-area/text-area.js";import{TextField as x}from"./components/text-field/text-field.js";import{Typography as y}from"./components/typography/typography.js";export{o as Avatar,t as Badge,r as Button,e as ButtonIcon,n as Drawer,m as DrawerGallery,p as DrawerMenu,s as FilterChipGroup,i as Icon,a as Logo,c as MapMarker,f as MenuItem,j as Notification,l as ProgressIndicator,g as SearchInput,d as SegmentedControl,u as Skeleton,b as Tabs,h as TextArea,x as TextField,y as Typography};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sate-lib",
3
- "version": "1.85.0",
3
+ "version": "1.87.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "keywords": [
@@ -21,6 +21,10 @@
21
21
  "import": "./lib/index.js",
22
22
  "types": "./lib/index.d.ts"
23
23
  },
24
+ "./skeleton": {
25
+ "import": "./lib/components/skeleton/skeleton.js",
26
+ "types": "./lib/components/skeleton/skeleton.d.ts"
27
+ },
24
28
  "./button": {
25
29
  "import": "./lib/components/button/button.js",
26
30
  "types": "./lib/components/button/button.d.ts"