@nordhealth/react 1.0.0-beta.1 → 1.0.0-beta.4

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.
package/lib/index.d.ts CHANGED
@@ -3,12 +3,21 @@ import * as Components from "@nordhealth/components";
3
3
  export declare const Badge: React.ForwardRefExoticComponent<Partial<Omit<Components.Badge, "children">> & {} & React.HTMLAttributes<HTMLElement> & {
4
4
  children?: React.ReactNode;
5
5
  } & React.RefAttributes<unknown>>;
6
+ export declare const Banner: React.ForwardRefExoticComponent<Partial<Omit<Components.Banner, "children">> & {} & React.HTMLAttributes<HTMLElement> & {
7
+ children?: React.ReactNode;
8
+ } & React.RefAttributes<unknown>>;
6
9
  export declare const Button: React.ForwardRefExoticComponent<Partial<Omit<Components.Button, "children">> & {} & React.HTMLAttributes<HTMLElement> & {
7
10
  children?: React.ReactNode;
8
11
  } & React.RefAttributes<unknown>>;
9
12
  export declare const Calendar: React.ForwardRefExoticComponent<Partial<Omit<Components.Calendar, "children">> & {} & React.HTMLAttributes<HTMLElement> & {
10
13
  children?: React.ReactNode;
11
14
  } & React.RefAttributes<unknown>>;
15
+ export declare const Checkbox: React.ForwardRefExoticComponent<Partial<Omit<Components.Checkbox, "children">> & {
16
+ onInput?: ((e: Event) => unknown) | undefined;
17
+ onChange?: ((e: Event) => unknown) | undefined;
18
+ } & React.HTMLAttributes<HTMLElement> & {
19
+ children?: React.ReactNode;
20
+ } & React.RefAttributes<unknown>>;
12
21
  export declare const Card: React.ForwardRefExoticComponent<Partial<Omit<Components.Card, "children">> & {} & React.HTMLAttributes<HTMLElement> & {
13
22
  children?: React.ReactNode;
14
23
  } & React.RefAttributes<unknown>>;
@@ -19,12 +28,6 @@ export declare const CommandMenu: React.ForwardRefExoticComponent<Partial<Omit<C
19
28
  } & React.HTMLAttributes<HTMLElement> & {
20
29
  children?: React.ReactNode;
21
30
  } & React.RefAttributes<unknown>>;
22
- export declare const Checkbox: React.ForwardRefExoticComponent<Partial<Omit<Components.Checkbox, "children">> & {
23
- onInput?: ((e: Event) => unknown) | undefined;
24
- onChange?: ((e: Event) => unknown) | undefined;
25
- } & React.HTMLAttributes<HTMLElement> & {
26
- children?: React.ReactNode;
27
- } & React.RefAttributes<unknown>>;
28
31
  export declare const DatePicker: React.ForwardRefExoticComponent<Partial<Omit<Components.DatePicker, "children">> & {
29
32
  onOpen?: ((e: Event) => unknown) | undefined;
30
33
  onClose?: ((e: Event) => unknown) | undefined;
@@ -36,12 +39,15 @@ export declare const DatePicker: React.ForwardRefExoticComponent<Partial<Omit<Co
36
39
  export declare const Fieldset: React.ForwardRefExoticComponent<Partial<Omit<Components.Fieldset, "children">> & {} & React.HTMLAttributes<HTMLElement> & {
37
40
  children?: React.ReactNode;
38
41
  } & React.RefAttributes<unknown>>;
39
- export declare const Icon: React.ForwardRefExoticComponent<Partial<Omit<Components.Icon, "children">> & {} & React.HTMLAttributes<HTMLElement> & {
42
+ export declare const EmptyState: React.ForwardRefExoticComponent<Partial<Omit<Components.EmptyState, "children">> & {} & React.HTMLAttributes<HTMLElement> & {
40
43
  children?: React.ReactNode;
41
44
  } & React.RefAttributes<unknown>>;
42
45
  export declare const Header: React.ForwardRefExoticComponent<Partial<Omit<Components.Header, "children">> & {} & React.HTMLAttributes<HTMLElement> & {
43
46
  children?: React.ReactNode;
44
47
  } & React.RefAttributes<unknown>>;
48
+ export declare const Icon: React.ForwardRefExoticComponent<Partial<Omit<Components.Icon, "children">> & {} & React.HTMLAttributes<HTMLElement> & {
49
+ children?: React.ReactNode;
50
+ } & React.RefAttributes<unknown>>;
45
51
  export declare const Input: React.ForwardRefExoticComponent<Partial<Omit<Components.Input, "children">> & {
46
52
  onInput?: ((e: Event) => unknown) | undefined;
47
53
  onChange?: ((e: Event) => unknown) | undefined;
package/lib/index.js CHANGED
@@ -3,5 +3,5 @@ import*as n from"react";import*as e from"@nordhealth/components";
3
3
  * @license
4
4
  * Copyright 2018 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
- */const o=new Set(["children","localName","ref","style","className"]),t=new WeakMap,a=(n,e,o,a,r)=>{const i=null==r?void 0:r[e];void 0!==i?o!==a&&((n,e,o)=>{let a=t.get(n);void 0===a&&t.set(n,a=new Map);let r=a.get(e);void 0!==o?void 0===r?(a.set(e,r={handleEvent:o}),n.addEventListener(e,r)):r.handleEvent=o:void 0!==r&&(a.delete(e),n.removeEventListener(e,r))})(n,i,o):n[e]=o},r=(n,e,t,r,i)=>{const d=n.Component,s=n.createElement,l=new Set(Object.keys(null!=r?r:{}));for(const n in t.prototype)n in HTMLElement.prototype||(o.has(n)?console.warn(`${e} contains property ${n} which is a React reserved property. It will be used by React and not set on the element.`):l.add(n));class c extends d{constructor(){super(...arguments),this.t=null}o(n){if(null!==this.t)for(const e in this.i)a(this.t,e,this.props[e],n?n[e]:void 0,r)}componentDidMount(){this.o()}componentDidUpdate(n){this.o(n)}render(){const n=this.props.l;void 0!==this.h&&this.u===n||(this.h=e=>{null===this.t&&(this.t=e),null!==n&&((n,e)=>{"function"==typeof n?n(e):n.current=e})(n,e),this.u=n});const o={ref:this.h};this.i={};for(const[n,e]of Object.entries(this.props))l.has(n)?this.i[n]=e:o["className"===n?"class":n]=e;return s(e,o)}}c.displayName=null!=i?i:t.name;const p=n.forwardRef(((n,e)=>s(c,{...n,l:e},null==n?void 0:n.children)));return p.displayName=c.displayName,p},i=r(n,"nord-badge",e.Badge,{}),d=r(n,"nord-button",e.Button,{}),s=r(n,"nord-calendar",e.Calendar,{}),l=r(n,"nord-card",e.Card,{}),c=r(n,"nord-command-menu",e.CommandMenu,{onOpen:"open",onClose:"close",onNordSelect:"nord-select"}),p=r(n,"nord-checkbox",e.Checkbox,{onInput:"input",onChange:"change"}),h=r(n,"nord-date-picker",e.DatePicker,{onOpen:"open",onClose:"close",onChange:"change",onInput:"input"}),u=r(n,"nord-fieldset",e.Fieldset,{}),m=r(n,"nord-icon",e.Icon,{}),g=r(n,"nord-header",e.Header,{}),v=r(n,"nord-input",e.Input,{onInput:"input",onChange:"change"}),y=r(n,"nord-layout",e.Layout,{}),f=r(n,"nord-nav-group",e.NavGroup,{}),C=r(n,"nord-nav-item",e.NavItem,{onToggle:"toggle"}),b=r(n,"nord-navigation",e.Navigation,{}),I=r(n,"nord-radio",e.Radio,{onInput:"input",onChange:"change"}),N=r(n,"nord-select",e.Select,{onInput:"input",onChange:"change"}),k=r(n,"nord-spinner",e.Spinner,{}),w=r(n,"nord-stack",e.Stack,{}),x=r(n,"nord-table",e.Table,{}),E=r(n,"nord-textarea",e.Textarea,{onInput:"input",onChange:"change"}),S=r(n,"nord-tooltip",e.Tooltip,{}),M=r(n,"nord-visually-hidden",e.VisuallyHidden,{});export{i as Badge,d as Button,s as Calendar,l as Card,p as Checkbox,c as CommandMenu,h as DatePicker,u as Fieldset,g as Header,m as Icon,v as Input,y as Layout,f as NavGroup,C as NavItem,b as Navigation,I as Radio,N as Select,k as Spinner,w as Stack,x as Table,E as Textarea,S as Tooltip,M as VisuallyHidden};
6
+ */const t=new Set(["children","localName","ref","style","className"]),o=new WeakMap,a=(n,e,t,a,r)=>{const i=null==r?void 0:r[e];void 0!==i?t!==a&&((n,e,t)=>{let a=o.get(n);void 0===a&&o.set(n,a=new Map);let r=a.get(e);void 0!==t?void 0===r?(a.set(e,r={handleEvent:t}),n.addEventListener(e,r)):r.handleEvent=t:void 0!==r&&(a.delete(e),n.removeEventListener(e,r))})(n,i,t):n[e]=t},r=(n,e,o,r,i)=>{const d=n.Component,s=n.createElement,l=new Set(Object.keys(null!=r?r:{}));for(const n in o.prototype)n in HTMLElement.prototype||(t.has(n)?console.warn(`${e} contains property ${n} which is a React reserved property. It will be used by React and not set on the element.`):l.add(n));class c extends d{constructor(){super(...arguments),this.t=null}o(n){if(null!==this.t)for(const e in this.i)a(this.t,e,this.props[e],n?n[e]:void 0,r)}componentDidMount(){this.o()}componentDidUpdate(n){this.o(n)}render(){const n=this.props.l;void 0!==this.h&&this.u===n||(this.h=e=>{null===this.t&&(this.t=e),null!==n&&((n,e)=>{"function"==typeof n?n(e):n.current=e})(n,e),this.u=n});const t={ref:this.h};this.i={};for(const[n,e]of Object.entries(this.props))l.has(n)?this.i[n]=e:t["className"===n?"class":n]=e;return s(e,t)}}c.displayName=null!=i?i:o.name;const p=n.forwardRef(((n,e)=>s(c,{...n,l:e},null==n?void 0:n.children)));return p.displayName=c.displayName,p},i=r(n,"nord-badge",e.Badge,{}),d=r(n,"nord-banner",e.Banner,{}),s=r(n,"nord-button",e.Button,{}),l=r(n,"nord-calendar",e.Calendar,{}),c=r(n,"nord-checkbox",e.Checkbox,{onInput:"input",onChange:"change"}),p=r(n,"nord-card",e.Card,{}),h=r(n,"nord-command-menu",e.CommandMenu,{onOpen:"open",onClose:"close",onNordSelect:"nord-select"}),u=r(n,"nord-date-picker",e.DatePicker,{onOpen:"open",onClose:"close",onChange:"change",onInput:"input"}),m=r(n,"nord-fieldset",e.Fieldset,{}),g=r(n,"nord-empty-state",e.EmptyState,{}),v=r(n,"nord-header",e.Header,{}),y=r(n,"nord-icon",e.Icon,{}),f=r(n,"nord-input",e.Input,{onInput:"input",onChange:"change"}),C=r(n,"nord-layout",e.Layout,{}),b=r(n,"nord-nav-group",e.NavGroup,{}),I=r(n,"nord-nav-item",e.NavItem,{onToggle:"toggle"}),N=r(n,"nord-navigation",e.Navigation,{}),k=r(n,"nord-radio",e.Radio,{onInput:"input",onChange:"change"}),w=r(n,"nord-select",e.Select,{onInput:"input",onChange:"change"}),E=r(n,"nord-spinner",e.Spinner,{}),S=r(n,"nord-stack",e.Stack,{}),x=r(n,"nord-table",e.Table,{}),M=r(n,"nord-textarea",e.Textarea,{onInput:"input",onChange:"change"}),T=r(n,"nord-tooltip",e.Tooltip,{}),L=r(n,"nord-visually-hidden",e.VisuallyHidden,{});export{i as Badge,d as Banner,s as Button,l as Calendar,p as Card,c as Checkbox,h as CommandMenu,u as DatePicker,g as EmptyState,m as Fieldset,v as Header,y as Icon,f as Input,C as Layout,b as NavGroup,I as NavItem,N as Navigation,k as Radio,w as Select,E as Spinner,S as Stack,x as Table,M as Textarea,T as Tooltip,L as VisuallyHidden};
7
7
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../node_modules/@lit-labs/react/create-component.js","../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=new Set([\"children\",\"localName\",\"ref\",\"style\",\"className\"]),e=new WeakMap,n=(t,n,s,o,i)=>{const l=null==i?void 0:i[n];void 0!==l?s!==o&&((t,n,s)=>{let o=e.get(t);void 0===o&&e.set(t,o=new Map);let i=o.get(n);void 0!==s?void 0===i?(o.set(n,i={handleEvent:s}),t.addEventListener(n,i)):i.handleEvent=s:void 0!==i&&(o.delete(n),t.removeEventListener(n,i))})(t,l,s):t[n]=s},s=(e,s,o,i,l)=>{const c=e.Component,r=e.createElement,h=new Set(Object.keys(null!=i?i:{}));for(const e in o.prototype)e in HTMLElement.prototype||(t.has(e)?console.warn(`${s} contains property ${e} which is a React reserved property. It will be used by React and not set on the element.`):h.add(e));class d extends c{constructor(){super(...arguments),this.t=null}o(t){if(null!==this.t)for(const e in this.i)n(this.t,e,this.props[e],t?t[e]:void 0,i)}componentDidMount(){this.o()}componentDidUpdate(t){this.o(t)}render(){const t=this.props.l;void 0!==this.h&&this.u===t||(this.h=e=>{null===this.t&&(this.t=e),null!==t&&((t,e)=>{\"function\"==typeof t?t(e):t.current=e})(t,e),this.u=t});const e={ref:this.h};this.i={};for(const[t,n]of Object.entries(this.props))h.has(t)?this.i[t]=n:e[\"className\"===t?\"class\":t]=n;return r(s,e)}}d.displayName=null!=l?l:o.name;const a=e.forwardRef(((t,e)=>r(d,{...t,l:e},null==t?void 0:t.children)));return a.displayName=d.displayName,a};export{s as createComponent};\n//# sourceMappingURL=create-component.js.map\n","import * as React from \"react\"\nimport { createComponent } from \"@lit-labs/react\"\nimport * as Components from \"@nordhealth/components\"\n\nexport const Badge = createComponent(React, \"nord-badge\", Components.Badge, {})\n\nexport const Button = createComponent(React, \"nord-button\", Components.Button, {})\n\nexport const Calendar = createComponent(React, \"nord-calendar\", Components.Calendar, {})\n\nexport const Card = createComponent(React, \"nord-card\", Components.Card, {})\n\nexport const CommandMenu = createComponent(React, \"nord-command-menu\", Components.CommandMenu, {\n onOpen: \"open\",\n onClose: \"close\",\n onNordSelect: \"nord-select\",\n})\n\nexport const Checkbox = createComponent(React, \"nord-checkbox\", Components.Checkbox, {\n onInput: \"input\",\n onChange: \"change\",\n})\n\nexport const DatePicker = createComponent(React, \"nord-date-picker\", Components.DatePicker, {\n onOpen: \"open\",\n onClose: \"close\",\n onChange: \"change\",\n onInput: \"input\",\n})\n\nexport const Fieldset = createComponent(React, \"nord-fieldset\", Components.Fieldset, {})\n\nexport const Icon = createComponent(React, \"nord-icon\", Components.Icon, {})\n\nexport const Header = createComponent(React, \"nord-header\", Components.Header, {})\n\nexport const Input = createComponent(React, \"nord-input\", Components.Input, { onInput: \"input\", onChange: \"change\" })\n\nexport const Layout = createComponent(React, \"nord-layout\", Components.Layout, {})\n\nexport const NavGroup = createComponent(React, \"nord-nav-group\", Components.NavGroup, {})\n\nexport const NavItem = createComponent(React, \"nord-nav-item\", Components.NavItem, { onToggle: \"toggle\" })\n\nexport const Navigation = createComponent(React, \"nord-navigation\", Components.Navigation, {})\n\nexport const Radio = createComponent(React, \"nord-radio\", Components.Radio, { onInput: \"input\", onChange: \"change\" })\n\nexport const Select = createComponent(React, \"nord-select\", Components.Select, { onInput: \"input\", onChange: \"change\" })\n\nexport const Spinner = createComponent(React, \"nord-spinner\", Components.Spinner, {})\n\nexport const Stack = createComponent(React, \"nord-stack\", Components.Stack, {})\n\nexport const Table = createComponent(React, \"nord-table\", Components.Table, {})\n\nexport const Textarea = createComponent(React, \"nord-textarea\", Components.Textarea, {\n onInput: \"input\",\n onChange: \"change\",\n})\n\nexport const Tooltip = createComponent(React, \"nord-tooltip\", Components.Tooltip, {})\n\nexport const VisuallyHidden = createComponent(React, \"nord-visually-hidden\", Components.VisuallyHidden, {})\n"],"names":["t","Set","e","WeakMap","n","s","o","i","l","get","set","Map","handleEvent","addEventListener","delete","removeEventListener","c","Component","r","createElement","h","Object","keys","prototype","HTMLElement","has","console","warn","add","d","constructor","super","arguments","this","props","componentDidMount","componentDidUpdate","render","u","current","ref","entries","displayName","name","a","forwardRef","children","Badge","createComponent","React","Components","Button","Calendar","Card","CommandMenu","onOpen","onClose","onNordSelect","Checkbox","onInput","onChange","DatePicker","Fieldset","Icon","Header","Input","Layout","NavGroup","NavItem","onToggle","Navigation","Radio","Select","Spinner","Stack","Table","Textarea","Tooltip","VisuallyHidden"],"mappings":";;;;;GAKA,MAAMA,EAAE,IAAIC,IAAI,CAAC,WAAW,YAAY,MAAM,QAAQ,cAAcC,EAAE,IAAIC,QAAQC,EAAE,CAACJ,EAAEI,EAAEC,EAAEC,EAAEC,KAAK,MAAMC,EAAE,MAAMD,OAAE,EAAOA,EAAEH,QAAG,IAASI,EAAEH,IAAIC,GAAG,EAAEN,EAAEI,EAAEC,KAAK,IAAIC,EAAEJ,EAAEO,IAAIT,QAAG,IAASM,GAAGJ,EAAEQ,IAAIV,EAAEM,EAAE,IAAIK,KAAK,IAAIJ,EAAED,EAAEG,IAAIL,QAAG,IAASC,OAAE,IAASE,GAAGD,EAAEI,IAAIN,EAAEG,EAAE,CAACK,YAAYP,IAAIL,EAAEa,iBAAiBT,EAAEG,IAAIA,EAAEK,YAAYP,OAAE,IAASE,IAAID,EAAEQ,OAAOV,GAAGJ,EAAEe,oBAAoBX,EAAEG,KAApN,CAA0NP,EAAEQ,EAAEH,GAAGL,EAAEI,GAAGC,GAAGA,EAAE,CAACH,EAAEG,EAAEC,EAAEC,EAAEC,KAAK,MAAMQ,EAAEd,EAAEe,UAAUC,EAAEhB,EAAEiB,cAAcC,EAAE,IAAInB,IAAIoB,OAAOC,KAA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,aAAcC,EAAWyB,MAAO,IAE/DC,EAAW5B,EAAgBC,EAAO,gBAAiBC,EAAW0B,SAAU,CACnFjB,QAAS,QACTC,SAAU,WAGCiB,EAAU7B,EAAgBC,EAAO,eAAgBC,EAAW2B,QAAS,IAErEC,EAAiB9B,EAAgBC,EAAO,uBAAwBC,EAAW4B,eAAgB"}
1
+ {"version":3,"file":"index.js","sources":["../node_modules/@lit-labs/react/create-component.js","../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=new Set([\"children\",\"localName\",\"ref\",\"style\",\"className\"]),e=new WeakMap,n=(t,n,s,o,i)=>{const l=null==i?void 0:i[n];void 0!==l?s!==o&&((t,n,s)=>{let o=e.get(t);void 0===o&&e.set(t,o=new Map);let i=o.get(n);void 0!==s?void 0===i?(o.set(n,i={handleEvent:s}),t.addEventListener(n,i)):i.handleEvent=s:void 0!==i&&(o.delete(n),t.removeEventListener(n,i))})(t,l,s):t[n]=s},s=(e,s,o,i,l)=>{const c=e.Component,r=e.createElement,h=new Set(Object.keys(null!=i?i:{}));for(const e in o.prototype)e in HTMLElement.prototype||(t.has(e)?console.warn(`${s} contains property ${e} which is a React reserved property. It will be used by React and not set on the element.`):h.add(e));class d extends c{constructor(){super(...arguments),this.t=null}o(t){if(null!==this.t)for(const e in this.i)n(this.t,e,this.props[e],t?t[e]:void 0,i)}componentDidMount(){this.o()}componentDidUpdate(t){this.o(t)}render(){const t=this.props.l;void 0!==this.h&&this.u===t||(this.h=e=>{null===this.t&&(this.t=e),null!==t&&((t,e)=>{\"function\"==typeof t?t(e):t.current=e})(t,e),this.u=t});const e={ref:this.h};this.i={};for(const[t,n]of Object.entries(this.props))h.has(t)?this.i[t]=n:e[\"className\"===t?\"class\":t]=n;return r(s,e)}}d.displayName=null!=l?l:o.name;const a=e.forwardRef(((t,e)=>r(d,{...t,l:e},null==t?void 0:t.children)));return a.displayName=d.displayName,a};export{s as createComponent};\n//# sourceMappingURL=create-component.js.map\n","import * as React from \"react\"\nimport { createComponent } from \"@lit-labs/react\"\nimport * as Components from \"@nordhealth/components\"\n\nexport const Badge = createComponent(React, \"nord-badge\", Components.Badge, {})\n\nexport const Banner = createComponent(React, \"nord-banner\", Components.Banner, {})\n\nexport const Button = createComponent(React, \"nord-button\", Components.Button, {})\n\nexport const Calendar = createComponent(React, \"nord-calendar\", Components.Calendar, {})\n\nexport const Checkbox = createComponent(React, \"nord-checkbox\", Components.Checkbox, {\n onInput: \"input\",\n onChange: \"change\",\n})\n\nexport const Card = createComponent(React, \"nord-card\", Components.Card, {})\n\nexport const CommandMenu = createComponent(React, \"nord-command-menu\", Components.CommandMenu, {\n onOpen: \"open\",\n onClose: \"close\",\n onNordSelect: \"nord-select\",\n})\n\nexport const DatePicker = createComponent(React, \"nord-date-picker\", Components.DatePicker, {\n onOpen: \"open\",\n onClose: \"close\",\n onChange: \"change\",\n onInput: \"input\",\n})\n\nexport const Fieldset = createComponent(React, \"nord-fieldset\", Components.Fieldset, {})\n\nexport const EmptyState = createComponent(React, \"nord-empty-state\", Components.EmptyState, {})\n\nexport const Header = createComponent(React, \"nord-header\", Components.Header, {})\n\nexport const Icon = createComponent(React, \"nord-icon\", Components.Icon, {})\n\nexport const Input = createComponent(React, \"nord-input\", Components.Input, { onInput: \"input\", onChange: \"change\" })\n\nexport const Layout = createComponent(React, \"nord-layout\", Components.Layout, {})\n\nexport const NavGroup = createComponent(React, \"nord-nav-group\", Components.NavGroup, {})\n\nexport const NavItem = createComponent(React, \"nord-nav-item\", Components.NavItem, { onToggle: \"toggle\" })\n\nexport const Navigation = createComponent(React, \"nord-navigation\", Components.Navigation, {})\n\nexport const Radio = createComponent(React, \"nord-radio\", Components.Radio, { onInput: \"input\", onChange: \"change\" })\n\nexport const Select = createComponent(React, \"nord-select\", Components.Select, { onInput: \"input\", onChange: \"change\" })\n\nexport const Spinner = createComponent(React, \"nord-spinner\", Components.Spinner, {})\n\nexport const Stack = createComponent(React, \"nord-stack\", Components.Stack, {})\n\nexport const Table = createComponent(React, \"nord-table\", Components.Table, {})\n\nexport const Textarea = createComponent(React, \"nord-textarea\", Components.Textarea, {\n onInput: \"input\",\n onChange: \"change\",\n})\n\nexport const Tooltip = createComponent(React, \"nord-tooltip\", Components.Tooltip, {})\n\nexport const VisuallyHidden = createComponent(React, \"nord-visually-hidden\", Components.VisuallyHidden, {})\n"],"names":["t","Set","e","WeakMap","n","s","o","i","l","get","set","Map","handleEvent","addEventListener","delete","removeEventListener","c","Component","r","createElement","h","Object","keys","prototype","HTMLElement","has","console","warn","add","d","constructor","super","arguments","this","props","componentDidMount","componentDidUpdate","render","u","current","ref","entries","displayName","name","a","forwardRef","children","Badge","createComponent","React","Components","Banner","Button","Calendar","Checkbox","onInput","onChange","Card","CommandMenu","onOpen","onClose","onNordSelect","DatePicker","Fieldset","EmptyState","Header","Icon","Input","Layout","NavGroup","NavItem","onToggle","Navigation","Radio","Select","Spinner","Stack","Table","Textarea","Tooltip","VisuallyHidden"],"mappings":";;;;;GAKA,MAAMA,EAAE,IAAIC,IAAI,CAAC,WAAW,YAAY,MAAM,QAAQ,cAAcC,EAAE,IAAIC,QAAQC,EAAE,CAACJ,EAAEI,EAAEC,EAAEC,EAAEC,KAAK,MAAMC,EAAE,MAAMD,OAAE,EAAOA,EAAEH,QAAG,IAASI,EAAEH,IAAIC,GAAG,EAAEN,EAAEI,EAAEC,KAAK,IAAIC,EAAEJ,EAAEO,IAAIT,QAAG,IAASM,GAAGJ,EAAEQ,IAAIV,EAAEM,EAAE,IAAIK,KAAK,IAAIJ,EAAED,EAAEG,IAAIL,QAAG,IAASC,OAAE,IAASE,GAAGD,EAAEI,IAAIN,EAAEG,EAAE,CAACK,YAAYP,IAAIL,EAAEa,iBAAiBT,EAAEG,IAAIA,EAAEK,YAAYP,OAAE,IAASE,IAAID,EAAEQ,OAAOV,GAAGJ,EAAEe,oBAAoBX,EAAEG,KAApN,CAA0NP,EAAEQ,EAA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AgBC,EAAO,aAAcC,EAAWuB,MAAO,CAAElB,QAAS,QAASC,SAAU,WAE7FkB,EAAS1B,EAAgBC,EAAO,cAAeC,EAAWwB,OAAQ,CAAEnB,QAAS,QAASC,SAAU,WAEhGmB,EAAU3B,EAAgBC,EAAO,eAAgBC,EAAWyB,QAAS,IAErEC,EAAQ5B,EAAgBC,EAAO,aAAcC,EAAW0B,MAAO,IAE/DC,EAAQ7B,EAAgBC,EAAO,aAAcC,EAAW2B,MAAO,IAE/DC,EAAW9B,EAAgBC,EAAO,gBAAiBC,EAAW4B,SAAU,CACnFvB,QAAS,QACTC,SAAU,WAGCuB,EAAU/B,EAAgBC,EAAO,eAAgBC,EAAW6B,QAAS,IAErEC,EAAiBhC,EAAgBC,EAAO,uBAAwBC,EAAW8B,eAAgB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nordhealth/react",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0-beta.4",
4
4
  "description": "This package includes react wrappers for Nord Design System's web components",
5
5
  "author": "Nordhealth <support@nordhealth.design>",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -28,7 +28,7 @@
28
28
  "homepage": "https://github.com/nordhealth/design-system#readme",
29
29
  "dependencies": {
30
30
  "@lit-labs/react": "1.0.2",
31
- "@nordhealth/components": "^1.0.0-beta.1"
31
+ "@nordhealth/components": "^1.0.0-beta.4"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "react": "17.0.2"
@@ -43,5 +43,5 @@
43
43
  "rollup-plugin-summary": "1.3.0",
44
44
  "rollup-plugin-terser": "7.0.2"
45
45
  },
46
- "gitHead": "a179d4d6c04d8688baaa6fefa143fcf72a110d7e"
46
+ "gitHead": "f3c629e15cd4ade685daf13efd411567f100287c"
47
47
  }