@optiaxiom/web-components 0.1.0-next.1 → 0.1.0-next.3

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.
Files changed (49) hide show
  1. package/README.md +5 -4
  2. package/dist/AnimatePresence-DvfDfq0x.js +1 -0
  3. package/dist/AnimatePresence.d.ts +14 -0
  4. package/dist/AnimatePresence.js +1 -0
  5. package/dist/Avatar.d.ts +14 -0
  6. package/dist/Avatar.js +1 -0
  7. package/dist/Box-9LrXBb0B.js +1 -0
  8. package/dist/Box.js +1 -1
  9. package/dist/Button.js +1 -1
  10. package/dist/ButtonGroup.css.ts.vanilla-4BGjgIuZ-BjHZZZUs.js +1 -0
  11. package/dist/ButtonGroup.d.ts +14 -0
  12. package/dist/ButtonGroup.js +1 -0
  13. package/dist/Code-CeUUaCb4.js +1 -0
  14. package/dist/Code.d.ts +14 -0
  15. package/dist/Code.js +1 -0
  16. package/dist/Field.d.ts +14 -0
  17. package/dist/Field.js +10 -0
  18. package/dist/Flex-CmzBxGW1.js +1 -0
  19. package/dist/Flex.d.ts +14 -0
  20. package/dist/Flex.js +1 -0
  21. package/dist/Grid.d.ts +14 -0
  22. package/dist/Grid.js +1 -0
  23. package/dist/Heading.d.ts +14 -0
  24. package/dist/Heading.js +1 -0
  25. package/dist/Input.js +1 -1
  26. package/dist/Kbd.d.ts +14 -0
  27. package/dist/Kbd.js +1 -0
  28. package/dist/Paper.js +1 -1
  29. package/dist/PresenceContext-BIyw24mj.js +1 -0
  30. package/dist/Progress.d.ts +14 -0
  31. package/dist/Progress.js +6 -0
  32. package/dist/Separator.d.ts +14 -0
  33. package/dist/Separator.js +5 -0
  34. package/dist/Skeleton.d.ts +14 -0
  35. package/dist/Skeleton.js +1 -0
  36. package/dist/Text-BIAeKp5v.js +1 -0
  37. package/dist/Text.d.ts +14 -0
  38. package/dist/Text.js +1 -0
  39. package/dist/Tooltip.js +1 -1
  40. package/dist/Transition-BD7yTsL2.js +1 -0
  41. package/dist/Transition.d.ts +14 -0
  42. package/dist/Transition.js +1 -0
  43. package/dist/index-D-Y5pVgW.js +1 -0
  44. package/dist/index-DLtacV-Q.js +1 -0
  45. package/dist/index-DoeKEfO9.js +1 -0
  46. package/dist/index.js +1 -1
  47. package/dist/register-C6qZMQlw.js +1 -0
  48. package/package.json +18 -3
  49. package/dist/register-CYOoDCCj.js +0 -1
package/README.md CHANGED
@@ -24,7 +24,8 @@ Use your favorite CDN to import the package:
24
24
 
25
25
  ```html
26
26
  <script
27
- src="https://esm.run/@optiaxiom/web-components@0.1.0"
27
+ <!-- Make sure to replace `latest` with a fixed version number. -->
28
+ src="https://cdn.jsdelivr.net/npm/@optiaxiom/web-components@latest/dist/index.js"
28
29
  type="module"
29
30
  ></script>
30
31
 
@@ -39,7 +40,7 @@ By default the index entry of the library lazy loads components to avoid loading
39
40
 
40
41
  ```html
41
42
  <script
42
- src="https://esm.run/@optiaxiom/web-components@0.1.0" <!-- index entry -->
43
+ src="https://cdn.jsdelivr.net/npm/@optiaxiom/web-components@latest/dist/index.js" <!-- `index.js` entry -->
43
44
  type="module"
44
45
  ></script>
45
46
 
@@ -70,7 +71,7 @@ function App() {
70
71
 
71
72
  ```html
72
73
  <script
73
- src="https://esm.run/@optiaxiom/web-components@0.1.0/Button" <!-- `/Button` path -->
74
+ src="https://cdn.jsdelivr.net/npm/@optiaxiom/web-components@latest/dist/Button.js" <!-- `Button.js` entry -->
74
75
  type="module"
75
76
  ></script>
76
77
 
@@ -88,7 +89,7 @@ Simply set the `slot` attribute to the corresponding prop name in your HTML.
88
89
 
89
90
  ```html
90
91
  <ax-input>
91
- <svg slot="leftSection">
92
+ <svg slot="startDecorator">
92
93
  <!-- ... -->
93
94
  </svg>
94
95
  </ax-input>
@@ -0,0 +1 @@
1
+ import{p as c,F as p,x as a,a as m,u as v}from"./register-C6qZMQlw.js";import{r as d}from"./PresenceContext-BIyw24mj.js";const w=({children:e})=>{const[n,l]=c(new Map),o=p(e);e&&(o.current=e);const t=!!e,i=a(s=>{l(r=>(r.delete(s),new Map(r.entries())))},[]),u=a(s=>{l(r=>(r.set(s,!0),new Map(r.entries())))},[]);return m(()=>{!t&&[...n.values()].some(Boolean)&&(o.current=!1)},[n,t]),v(d.Provider,{value:{isPresent:t,onExitComplete:i,register:u},children:e||([...n.values()].some(Boolean)?o.current:null)})};export{w as v};
@@ -0,0 +1,14 @@
1
+ import { AnimatePresence as AnimatePresence$1 } from '@optiaxiom/react';
2
+ import { C as ComponentAttributes } from './ComponentAttributes-D-k8G2HF.js';
3
+ import 'react';
4
+
5
+ declare const AnimatePresence = "ax-animate-presence";
6
+ declare global {
7
+ namespace JSX {
8
+ interface IntrinsicElements {
9
+ [AnimatePresence]: ComponentAttributes<typeof AnimatePresence$1>;
10
+ }
11
+ }
12
+ }
13
+
14
+ export { AnimatePresence };
@@ -0,0 +1 @@
1
+ import{r}from"./register-C6qZMQlw.js";import{v as t}from"./AnimatePresence-DvfDfq0x.js";import"./PresenceContext-BIyw24mj.js";const e="ax-animate-presence";r(e,t);export{e as AnimatePresence};
@@ -0,0 +1,14 @@
1
+ import { Avatar as Avatar$1 } from '@optiaxiom/react';
2
+ import { C as ComponentAttributes } from './ComponentAttributes-D-k8G2HF.js';
3
+ import 'react';
4
+
5
+ declare const Avatar = "ax-avatar";
6
+ declare global {
7
+ namespace JSX {
8
+ interface IntrinsicElements {
9
+ [Avatar]: ComponentAttributes<typeof Avatar$1>;
10
+ }
11
+ }
12
+ }
13
+
14
+ export { Avatar };
package/dist/Avatar.js ADDED
@@ -0,0 +1 @@
1
+ import{k as i,p as b,_ as g,a as _,i as y,u as l,r as z}from"./register-C6qZMQlw.js";import{t as f,y as m,o as $}from"./Box-9LrXBb0B.js";import{$ as C}from"./index-D-Y5pVgW.js";import{$ as L,a as x}from"./index-DoeKEfO9.js";import{$ as u}from"./index-DLtacV-Q.js";const v="Avatar",[w,Q]=C(v),[I,h]=w(v),M=i((r,t)=>{const{__scopeAvatar:a,...e}=r,[o,n]=b("idle");return g(I,{scope:a,imageLoadingStatus:o,onImageLoadingStatusChange:n},g(u.span,f({},e,{ref:t})))}),k="AvatarImage",j=i((r,t)=>{const{__scopeAvatar:a,src:e,onLoadingStatusChange:o=()=>{},...n}=r,s=h(k,a),c=P(e),d=L(p=>{o(p),s.onImageLoadingStatusChange(p)});return x(()=>{c!=="idle"&&d(c)},[c,d]),c==="loaded"?g(u.img,f({},n,{ref:t,src:e})):null}),N="AvatarFallback",E=i((r,t)=>{const{__scopeAvatar:a,delayMs:e,...o}=r,n=h(N,a),[s,c]=b(e===void 0);return _(()=>{if(e!==void 0){const d=window.setTimeout(()=>c(!0),e);return()=>window.clearTimeout(d)}},[e]),s&&n.imageLoadingStatus!=="loaded"?g(u.span,f({},o,{ref:t})):null});function P(r){const[t,a]=b("idle");return x(()=>{if(!r){a("error");return}let e=!0;const o=new window.Image,n=s=>()=>{e&&a(s)};return a("loading"),o.onload=n("loaded"),o.onerror=n("error"),o.src=r,()=>{e=!1}},[r]),t}const T=M,F=j,R=E;y("@layer optiaxiom._1kfj4ga1{.t64xwp0{user-select:none}}");var B=m({base:[{alignItems:"center",display:"inline-flex",justifyContent:"center",overflow:"hidden",rounded:"full"},"t64xwp0"],variants:{colorScheme:{blue:{bg:"blue.50",color:"blue.500"},brand:{bg:"brand.50",color:"brand.500"},dark:{bg:"dark.50",color:"dark.500"},gray:{bg:"gray.50",color:"gray.500"},green:{bg:"green.50",color:"green.500"},magenta:{bg:"magenta.50",color:"magenta.500"},neutral:{bg:"neutral.50",color:"neutral.500"},orange:{bg:"orange.50",color:"orange.500"},purple:{bg:"purple.50",color:"purple.500"},red:{bg:"red.50",color:"red.500"},slate:{bg:"slate.50",color:"slate.500"},yellow:{bg:"yellow.50",color:"yellow.500"}},size:{xs:{fontSize:"xs",size:"xs"},sm:{fontSize:"sm",size:"sm"},md:{fontSize:"md",size:"md"},lg:{fontSize:"lg",size:"lg"},xl:{fontSize:"xl",size:"xl"}}}}),G=m({base:{alignItems:"center",display:"flex",justifyContent:"center",rounded:"inherit",size:"full",textTransform:"uppercase"},variants:{size:{xs:{px:"4"},sm:{px:"6"},md:{px:"8"},lg:{px:"10"},xl:{px:"20"}}}});const K=600;function V(r){const t=r.trim().split(" "),a=t[0]??"",e=t.length>1?t[t.length-1]:"";return a&&e?`${a.charAt(0)}${e.charAt(0)}`:a.charAt(0)}const A=i(({children:r,className:t,colorScheme:a="neutral",icon:e,name:o,size:n="md",src:s,...c},d)=>l($,{asChild:!0,...B({colorScheme:a,size:n},t),...c,children:l(T,{ref:d,children:[l($,{asChild:!0,objectFit:"cover",rounded:"inherit",size:"full",children:l(F,{alt:o,src:s})}),l($,{asChild:!0,...G({size:n}),children:l(R,{delayMs:K,children:e||(o?V(o):r)})})]})}));A.displayName="@optiaxiom/react/Avatar";const S="ax-avatar";z(S,A);export{S as Avatar};