@covalent/components-react 0.0.8 → 0.0.10

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 (3) hide show
  1. package/index.js +1 -1
  2. package/index.mjs +17 -12
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -2,4 +2,4 @@
2
2
  * @license
3
3
  * Copyright 2018 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const T=new Set(["children","localName","ref","style","className"]),b=new WeakMap,L=(o,c,l,i,p)=>{const g=p==null?void 0:p[c];g===void 0||l===i?(o[c]=l,l==null&&c in HTMLElement.prototype&&o.removeAttribute(c)):((m,r,C)=>{let v=b.get(m);v===void 0&&b.set(m,v=new Map);let s=v.get(r);C!==void 0?s===void 0?(v.set(r,s={handleEvent:C}),m.addEventListener(r,s)):s.handleEvent=C:s!==void 0&&(v.delete(r),m.removeEventListener(r,s))})(o,g,l)},a=({react:o,tagName:c,elementClass:l,events:i,displayName:p})=>{const g=new Set(Object.keys(i??{})),m=o.forwardRef((r,C)=>{const v=o.useRef(null),s=o.useRef(null),d={},N={};for(const[n,u]of Object.entries(r))T.has(n)?d[n==="className"?"class":n]=u:g.has(n)||n in l.prototype?N[n]=u:d[n]=u;return o.useLayoutEffect(()=>{if(s.current!==null){for(const n in N)L(s.current,n,r[n],v.current?v.current[n]:void 0,i);v.current=r}}),o.useLayoutEffect(()=>{var n;(n=s.current)==null||n.removeAttribute("defer-hydration")},[]),d.suppressHydrationWarning=!0,o.createElement(c,{...d,ref:o.useCallback(n=>{s.current=n,typeof C=="function"?C(n):C!==null&&(C.current=n)},[C])})});return m.displayName=p??l.name,m},f=a({tagName:"cv-action-ribbon",elementClass:e.CovalentActionRibbon,react:t}),I=a({tagName:"cv-alert",elementClass:e.CovalentAlert,react:t}),y=a({tagName:"cv-app-shell",elementClass:e.CovalentAppShell,react:t}),k=a({tagName:"cv-button",elementClass:e.CovalentButton,react:t,events:{}}),R=a({tagName:"cv-checkbox",elementClass:e.CovalentCheckbox,react:t}),x=a({tagName:"cv-card",elementClass:e.CovalentCard,react:t}),A=a({tagName:"cv-chip",elementClass:e.CovalentChip,react:t}),B=a({tagName:"cv-chip-set",elementClass:e.CovalentChipSet,react:t}),w=a({tagName:"cv-circular-progress",elementClass:e.CovalentCircularProgress,react:t}),E=a({tagName:"cv-code-snippet",elementClass:e.CovalentCodeSnippet,react:t}),P=a({tagName:"cv-dialog",elementClass:e.CovalentDialog,react:t}),D=a({tagName:"cv-drawer",elementClass:e.CovalentDrawer,react:t}),H=a({tagName:"cv-empty-state",elementClass:e.CovalentEmptyState,react:t}),M=a({tagName:"cv-icon",elementClass:e.CovalentIcon,react:t}),O=a({tagName:"cv-icon-button",elementClass:e.CovalentIconButton,react:t}),j=a({tagName:"cv-icon-check-item",elementClass:e.CovalentIconCheckToggle,react:t}),F=a({tagName:"cv-icon-radio-item",elementClass:e.CovalentIconRadioToggle,react:t}),_=a({tagName:"cv-linear-progress",elementClass:e.CovalentLinearProgress,react:t}),q=a({tagName:"cv-check-list-item",elementClass:e.CovalentCheckListItem,react:t}),W=a({tagName:"cv-list",elementClass:e.CovalentList,react:t}),z=a({tagName:"cv-list-item",elementClass:e.CovalentListItem,react:t}),G=a({tagName:"cv-nav-list-item",elementClass:e.CovalentNavRailListItem,react:t}),J=a({tagName:"cv-radio-list-item",elementClass:e.CovalentRadioListItem,react:t}),K=a({tagName:"cv-menu",elementClass:e.CovalentMenu,react:t}),Q=a({tagName:"cv-radio",elementClass:e.CovalentRadio,react:t}),U=a({tagName:"cv-select",elementClass:e.CovalentSelect,react:t}),V=a({tagName:"cv-side-sheet",elementClass:e.CovalentSideSheet,react:t}),X=a({tagName:"cv-slider",elementClass:e.CovalentSlider,react:t}),Y=a({tagName:"cv-slider-range",elementClass:e.CovalentSliderRange,react:t}),Z=a({tagName:"cv-snackbar",elementClass:e.CovalentSnackbar,react:t}),$=a({tagName:"cv-status-header",elementClass:e.CovalentStatusHeader,react:t}),ee=a({tagName:"cv-status-header-item",elementClass:e.CovalentStatusHeaderItem,react:t}),te=a({tagName:"cv-switch",elementClass:e.CovalentSwitch,react:t}),ae=a({tagName:"cv-tab",elementClass:e.CovalentTab,react:t}),ne=a({tagName:"cv-tab-bar",elementClass:e.CovalentTabBar,react:t}),oe=a({tagName:"cv-textarea",elementClass:e.CovalentTextArea,react:t}),le=a({tagName:"cv-textfield",elementClass:e.CovalentTextField,react:t}),se=a({tagName:"cv-text-lockup",elementClass:e.CovalentTextLockup,react:t}),ce=a({tagName:"cv-toolbar",elementClass:e.CovalentToolbar,react:t}),re=a({tagName:"cv-tooltip",elementClass:e.CovalentTooltip,react:t}),Ce=a({tagName:"cv-top-app-bar",elementClass:e.CovalentTopAppBar,react:t}),ve=a({tagName:"cv-top-app-bar-fixed",elementClass:e.CovalentTopAppBarFixed,react:t}),ie=a({tagName:"cv-tree-list",elementClass:e.CovalentTreeList,react:t}),me=a({tagName:"cv-tree-list-item",elementClass:e.CovalentTreeListItem,react:t}),pe=a({tagName:"cv-typography",elementClass:e.CovalentTypography,react:t});exports.CovalentActionRibbon=f;exports.CovalentAlert=I;exports.CovalentAppShell=y;exports.CovalentButton=k;exports.CovalentCard=x;exports.CovalentCheckListItem=q;exports.CovalentCheckbox=R;exports.CovalentChip=A;exports.CovalentChipSet=B;exports.CovalentCircularProgress=w;exports.CovalentCodeSnippet=E;exports.CovalentDialog=P;exports.CovalentDrawer=D;exports.CovalentEmptyState=H;exports.CovalentIcon=M;exports.CovalentIconButton=O;exports.CovalentIconCheckToggle=j;exports.CovalentIconRadioToggle=F;exports.CovalentLinearProgress=_;exports.CovalentList=W;exports.CovalentListItem=z;exports.CovalentMenu=K;exports.CovalentNavRailListItem=G;exports.CovalentRadio=Q;exports.CovalentRadioListItem=J;exports.CovalentSelect=U;exports.CovalentSideSheet=V;exports.CovalentSlider=X;exports.CovalentSliderRange=Y;exports.CovalentSnackbar=Z;exports.CovalentStatusHeader=$;exports.CovalentStatusHeaderItem=ee;exports.CovalentSwitch=te;exports.CovalentTab=ae;exports.CovalentTabBar=ne;exports.CovalentTextArea=oe;exports.CovalentTextField=le;exports.CovalentTextLockup=se;exports.CovalentToolbar=ce;exports.CovalentTooltip=re;exports.CovalentTopAppBar=Ce;exports.CovalentTopAppBarFixed=ve;exports.CovalentTreeList=ie;exports.CovalentTreeListItem=me;exports.CovalentTypography=pe;
5
+ */const T=new Set(["children","localName","ref","style","className"]),b=new WeakMap,L=(o,c,l,i,p)=>{const g=p==null?void 0:p[c];g===void 0||l===i?(o[c]=l,l==null&&c in HTMLElement.prototype&&o.removeAttribute(c)):((m,r,C)=>{let v=b.get(m);v===void 0&&b.set(m,v=new Map);let s=v.get(r);C!==void 0?s===void 0?(v.set(r,s={handleEvent:C}),m.addEventListener(r,s)):s.handleEvent=C:s!==void 0&&(v.delete(r),m.removeEventListener(r,s))})(o,g,l)},a=({react:o,tagName:c,elementClass:l,events:i,displayName:p})=>{const g=new Set(Object.keys(i??{})),m=o.forwardRef((r,C)=>{const v=o.useRef(null),s=o.useRef(null),d={},N={};for(const[n,u]of Object.entries(r))T.has(n)?d[n==="className"?"class":n]=u:g.has(n)||n in l.prototype?N[n]=u:d[n]=u;return o.useLayoutEffect(()=>{if(s.current!==null){for(const n in N)L(s.current,n,r[n],v.current?v.current[n]:void 0,i);v.current=r}}),o.useLayoutEffect(()=>{var n;(n=s.current)==null||n.removeAttribute("defer-hydration")},[]),d.suppressHydrationWarning=!0,o.createElement(c,{...d,ref:o.useCallback(n=>{s.current=n,typeof C=="function"?C(n):C!==null&&(C.current=n)},[C])})});return m.displayName=p??l.name,m},f=a({tagName:"cv-action-ribbon",elementClass:e.CovalentActionRibbon,react:t}),I=a({tagName:"cv-alert",elementClass:e.CovalentAlert,react:t}),y=a({tagName:"cv-app-shell",elementClass:e.CovalentAppShell,react:t}),k=a({tagName:"cv-button",elementClass:e.CovalentButton,react:t}),R=a({tagName:"cv-checkbox",elementClass:e.CovalentCheckbox,react:t}),x=a({tagName:"cv-card",elementClass:e.CovalentCard,react:t}),A=a({tagName:"cv-chip",elementClass:e.CovalentChip,react:t}),B=a({tagName:"cv-chip-set",elementClass:e.CovalentChipSet,react:t}),w=a({tagName:"cv-circular-progress",elementClass:e.CovalentCircularProgress,react:t}),E=a({tagName:"cv-code-snippet",elementClass:e.CovalentCodeSnippet,react:t}),P=a({tagName:"cv-dialog",elementClass:e.CovalentDialog,react:t}),D=a({tagName:"cv-drawer",elementClass:e.CovalentDrawer,react:t}),H=a({tagName:"cv-empty-state",elementClass:e.CovalentEmptyState,react:t}),M=a({tagName:"cv-icon",elementClass:e.CovalentIcon,react:t}),O=a({tagName:"cv-icon-button",elementClass:e.CovalentIconButton,react:t}),j=a({tagName:"cv-icon-check-item",elementClass:e.CovalentIconCheckToggle,react:t}),F=a({tagName:"cv-icon-radio-item",elementClass:e.CovalentIconRadioToggle,react:t}),_=a({tagName:"cv-linear-progress",elementClass:e.CovalentLinearProgress,react:t}),q=a({tagName:"cv-check-list-item",elementClass:e.CovalentCheckListItem,react:t}),W=a({tagName:"cv-list",elementClass:e.CovalentList,react:t}),z=a({tagName:"cv-list-item",elementClass:e.CovalentListItem,react:t}),G=a({tagName:"cv-nav-list-item",elementClass:e.CovalentNavRailListItem,react:t}),J=a({tagName:"cv-radio-list-item",elementClass:e.CovalentRadioListItem,react:t}),K=a({tagName:"cv-menu",elementClass:e.CovalentMenu,react:t}),Q=a({tagName:"cv-radio",elementClass:e.CovalentRadio,react:t}),U=a({tagName:"cv-select",elementClass:e.CovalentSelect,react:t}),V=a({tagName:"cv-side-sheet",elementClass:e.CovalentSideSheet,react:t,events:{opening:"opening",opened:"opened",closing:"closing",closed:"closed"}}),X=a({tagName:"cv-slider",elementClass:e.CovalentSlider,react:t}),Y=a({tagName:"cv-slider-range",elementClass:e.CovalentSliderRange,react:t}),Z=a({tagName:"cv-snackbar",elementClass:e.CovalentSnackbar,react:t}),$=a({tagName:"cv-status-header",elementClass:e.CovalentStatusHeader,react:t}),ee=a({tagName:"cv-status-header-item",elementClass:e.CovalentStatusHeaderItem,react:t}),te=a({tagName:"cv-switch",elementClass:e.CovalentSwitch,react:t}),ae=a({tagName:"cv-tab",elementClass:e.CovalentTab,react:t}),ne=a({tagName:"cv-tab-bar",elementClass:e.CovalentTabBar,react:t}),oe=a({tagName:"cv-textarea",elementClass:e.CovalentTextArea,react:t}),le=a({tagName:"cv-textfield",elementClass:e.CovalentTextField,react:t}),se=a({tagName:"cv-text-lockup",elementClass:e.CovalentTextLockup,react:t}),ce=a({tagName:"cv-toolbar",elementClass:e.CovalentToolbar,react:t}),re=a({tagName:"cv-tooltip",elementClass:e.CovalentTooltip,react:t}),Ce=a({tagName:"cv-top-app-bar",elementClass:e.CovalentTopAppBar,react:t}),ve=a({tagName:"cv-top-app-bar-fixed",elementClass:e.CovalentTopAppBarFixed,react:t}),ie=a({tagName:"cv-tree-list",elementClass:e.CovalentTreeList,react:t}),me=a({tagName:"cv-tree-list-item",elementClass:e.CovalentTreeListItem,react:t}),pe=a({tagName:"cv-typography",elementClass:e.CovalentTypography,react:t});exports.CovalentActionRibbon=f;exports.CovalentAlert=I;exports.CovalentAppShell=y;exports.CovalentButton=k;exports.CovalentCard=x;exports.CovalentCheckListItem=q;exports.CovalentCheckbox=R;exports.CovalentChip=A;exports.CovalentChipSet=B;exports.CovalentCircularProgress=w;exports.CovalentCodeSnippet=E;exports.CovalentDialog=P;exports.CovalentDrawer=D;exports.CovalentEmptyState=H;exports.CovalentIcon=M;exports.CovalentIconButton=O;exports.CovalentIconCheckToggle=j;exports.CovalentIconRadioToggle=F;exports.CovalentLinearProgress=_;exports.CovalentList=W;exports.CovalentListItem=z;exports.CovalentMenu=K;exports.CovalentNavRailListItem=G;exports.CovalentRadio=Q;exports.CovalentRadioListItem=J;exports.CovalentSelect=U;exports.CovalentSideSheet=V;exports.CovalentSlider=X;exports.CovalentSliderRange=Y;exports.CovalentSnackbar=Z;exports.CovalentStatusHeader=$;exports.CovalentStatusHeaderItem=ee;exports.CovalentSwitch=te;exports.CovalentTab=ae;exports.CovalentTabBar=ne;exports.CovalentTextArea=oe;exports.CovalentTextField=le;exports.CovalentTextLockup=se;exports.CovalentToolbar=ce;exports.CovalentTooltip=re;exports.CovalentTopAppBar=Ce;exports.CovalentTopAppBarFixed=ve;exports.CovalentTreeList=ie;exports.CovalentTreeListItem=me;exports.CovalentTypography=pe;
package/index.mjs CHANGED
@@ -5,23 +5,23 @@ import { CovalentActionRibbon as h, CovalentAlert as $, CovalentAppShell as T, C
5
5
  * Copyright 2018 Google LLC
6
6
  * SPDX-License-Identifier: BSD-3-Clause
7
7
  */
8
- const ve = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), N = /* @__PURE__ */ new WeakMap(), re = (n, r, C, i, m) => {
9
- const p = m == null ? void 0 : m[r];
10
- p === void 0 || C === i ? (n[r] = C, C == null && r in HTMLElement.prototype && n.removeAttribute(r)) : ((v, l, s) => {
8
+ const ve = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), N = /* @__PURE__ */ new WeakMap(), re = (n, r, C, m, i) => {
9
+ const p = i == null ? void 0 : i[r];
10
+ p === void 0 || C === m ? (n[r] = C, C == null && r in HTMLElement.prototype && n.removeAttribute(r)) : ((v, l, s) => {
11
11
  let c = N.get(v);
12
12
  c === void 0 && N.set(v, c = /* @__PURE__ */ new Map());
13
13
  let o = c.get(l);
14
14
  s !== void 0 ? o === void 0 ? (c.set(l, o = { handleEvent: s }), v.addEventListener(l, o)) : o.handleEvent = s : o !== void 0 && (c.delete(l), v.removeEventListener(l, o));
15
15
  })(n, p, C);
16
- }, t = ({ react: n, tagName: r, elementClass: C, events: i, displayName: m }) => {
17
- const p = new Set(Object.keys(i ?? {})), v = n.forwardRef((l, s) => {
16
+ }, t = ({ react: n, tagName: r, elementClass: C, events: m, displayName: i }) => {
17
+ const p = new Set(Object.keys(m ?? {})), v = n.forwardRef((l, s) => {
18
18
  const c = n.useRef(null), o = n.useRef(null), g = {}, u = {};
19
19
  for (const [a, d] of Object.entries(l))
20
20
  ve.has(a) ? g[a === "className" ? "class" : a] = d : p.has(a) || a in C.prototype ? u[a] = d : g[a] = d;
21
21
  return n.useLayoutEffect(() => {
22
22
  if (o.current !== null) {
23
23
  for (const a in u)
24
- re(o.current, a, l[a], c.current ? c.current[a] : void 0, i);
24
+ re(o.current, a, l[a], c.current ? c.current[a] : void 0, m);
25
25
  c.current = l;
26
26
  }
27
27
  }), n.useLayoutEffect(() => {
@@ -31,8 +31,8 @@ const ve = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "cl
31
31
  o.current = a, typeof s == "function" ? s(a) : s !== null && (s.current = a);
32
32
  }, [s]) });
33
33
  });
34
- return v.displayName = m ?? C.name, v;
35
- }, ie = t({
34
+ return v.displayName = i ?? C.name, v;
35
+ }, me = t({
36
36
  tagName: "cv-action-ribbon",
37
37
  elementClass: h,
38
38
  react: e
@@ -47,8 +47,7 @@ const ve = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "cl
47
47
  }), de = t({
48
48
  tagName: "cv-button",
49
49
  elementClass: S,
50
- react: e,
51
- events: {}
50
+ react: e
52
51
  }), ue = t({
53
52
  tagName: "cv-checkbox",
54
53
  elementClass: b,
@@ -140,7 +139,13 @@ const ve = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "cl
140
139
  }), Pe = t({
141
140
  tagName: "cv-side-sheet",
142
141
  elementClass: G,
143
- react: e
142
+ react: e,
143
+ events: {
144
+ opening: "opening",
145
+ opened: "opened",
146
+ closing: "closing",
147
+ closed: "closed"
148
+ }
144
149
  }), je = t({
145
150
  tagName: "cv-slider",
146
151
  elementClass: J,
@@ -215,7 +220,7 @@ const ve = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "cl
215
220
  react: e
216
221
  });
217
222
  export {
218
- ie as CovalentActionRibbon,
223
+ me as CovalentActionRibbon,
219
224
  pe as CovalentAlert,
220
225
  ge as CovalentAppShell,
221
226
  de as CovalentButton,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@covalent/components-react",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "dependencies": {
5
5
  "@covalent/components": "latest",
6
6
  "react": "^18.2.0"