@nordhealth/react 1.0.0-beta.2 → 1.0.0-beta.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.
package/lib/index.d.ts CHANGED
@@ -3,21 +3,24 @@ 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 Card: React.ForwardRefExoticComponent<Partial<Omit<Components.Card, "children">> & {} & React.HTMLAttributes<HTMLElement> & {
16
+ children?: React.ReactNode;
17
+ } & React.RefAttributes<unknown>>;
12
18
  export declare const Checkbox: React.ForwardRefExoticComponent<Partial<Omit<Components.Checkbox, "children">> & {
13
19
  onInput?: ((e: Event) => unknown) | undefined;
14
20
  onChange?: ((e: Event) => unknown) | undefined;
15
21
  } & React.HTMLAttributes<HTMLElement> & {
16
22
  children?: React.ReactNode;
17
23
  } & React.RefAttributes<unknown>>;
18
- export declare const Card: React.ForwardRefExoticComponent<Partial<Omit<Components.Card, "children">> & {} & React.HTMLAttributes<HTMLElement> & {
19
- children?: React.ReactNode;
20
- } & React.RefAttributes<unknown>>;
21
24
  export declare const CommandMenu: React.ForwardRefExoticComponent<Partial<Omit<Components.CommandMenu, "children">> & {
22
25
  onOpen?: ((e: Event) => unknown) | undefined;
23
26
  onClose?: ((e: Event) => unknown) | undefined;
@@ -33,10 +36,10 @@ export declare const DatePicker: React.ForwardRefExoticComponent<Partial<Omit<Co
33
36
  } & React.HTMLAttributes<HTMLElement> & {
34
37
  children?: React.ReactNode;
35
38
  } & React.RefAttributes<unknown>>;
36
- export declare const EmptyState: React.ForwardRefExoticComponent<Partial<Omit<Components.EmptyState, "children">> & {} & React.HTMLAttributes<HTMLElement> & {
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 Fieldset: React.ForwardRefExoticComponent<Partial<Omit<Components.Fieldset, "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> & {
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 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-button",e.Button,{}),s=r(n,"nord-calendar",e.Calendar,{}),l=r(n,"nord-checkbox",e.Checkbox,{onInput:"input",onChange:"change"}),c=r(n,"nord-card",e.Card,{}),p=r(n,"nord-command-menu",e.CommandMenu,{onOpen:"open",onClose:"close",onNordSelect:"nord-select"}),h=r(n,"nord-date-picker",e.DatePicker,{onOpen:"open",onClose:"close",onChange:"change",onInput:"input"}),u=r(n,"nord-empty-state",e.EmptyState,{}),m=r(n,"nord-fieldset",e.Fieldset,{}),g=r(n,"nord-header",e.Header,{}),v=r(n,"nord-icon",e.Icon,{}),y=r(n,"nord-input",e.Input,{onInput:"input",onChange:"change"}),f=r(n,"nord-layout",e.Layout,{}),C=r(n,"nord-nav-group",e.NavGroup,{}),b=r(n,"nord-nav-item",e.NavItem,{onToggle:"toggle"}),I=r(n,"nord-navigation",e.Navigation,{}),N=r(n,"nord-radio",e.Radio,{onInput:"input",onChange:"change"}),k=r(n,"nord-select",e.Select,{onInput:"input",onChange:"change"}),w=r(n,"nord-spinner",e.Spinner,{}),E=r(n,"nord-stack",e.Stack,{}),S=r(n,"nord-table",e.Table,{}),x=r(n,"nord-textarea",e.Textarea,{onInput:"input",onChange:"change"}),M=r(n,"nord-tooltip",e.Tooltip,{}),T=r(n,"nord-visually-hidden",e.VisuallyHidden,{});export{i as Badge,d as Button,s as Calendar,c as Card,l as Checkbox,p as CommandMenu,h as DatePicker,u as EmptyState,m as Fieldset,g as Header,v as Icon,y as Input,f as Layout,C as NavGroup,b as NavItem,I as Navigation,N as Radio,k as Select,w as Spinner,E as Stack,S as Table,x as Textarea,M as Tooltip,T 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-card",e.Card,{}),p=r(n,"nord-checkbox",e.Checkbox,{onInput:"input",onChange:"change"}),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,c as Card,p 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 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 EmptyState = createComponent(React, \"nord-empty-state\", Components.EmptyState, {})\n\nexport const Fieldset = createComponent(React, \"nord-fieldset\", Components.Fieldset, {})\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","Button","Calendar","Checkbox","onInput","onChange","Card","CommandMenu","onOpen","onClose","onNordSelect","DatePicker","EmptyState","Fieldset","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,EAAEH,GAAGL,EAAEI,GAAGC,GAAGA,EAAE,CAACH,EAAEG,EAAEC,EAAEC,EAAEC,KAAK,MAAMQ,EAAEd,EAAEe,UAAUC,EAAEhB,EAAEiB,cAAcC,EAAE,IAAInB,IAAIoB,OAAOC,KAAK,MAAMf,EAAEA,EAAE,KAAK,IAAI,MAAML,KAAKI,EAAEiB,UAAUrB,KAAKsB,YAAYD,YAAYvB,EAAEyB,IAAIvB,GAAGwB,QAAQC,KAAK,GAAGtB,uBAAuBH,8FAA8FkB,EAAEQ,IAAI1B,IAAI,MAAM2B,UAAUb,EAAEc,cAAcC,SAASC,WAAWC,KAAKjC,EAAE,KAAKM,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AAO,uBAAwBC,EAAW6B,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 Card = createComponent(React, \"nord-card\", Components.Card, {})\n\nexport const Checkbox = createComponent(React, \"nord-checkbox\", Components.Checkbox, {\n onInput: \"input\",\n onChange: \"change\",\n})\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","Card","Checkbox","onInput","onChange","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,EAAEH,GAAGL,EAAEI,GAAGC,GAAGA,EAAE,CAACH,EAAEG,EAAEC,EAAEC,EAAEC,KAAK,MAAMQ,EAAEd,EAAEe,UAAUC,EAAEhB,EAAEiB,cAAcC,EAAE,IAAInB,IAAIoB,OAAOC,KAAK,MAAMf,EAAEA,EA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QAAS,IAErEC,EAAQ5B,EAAgBC,EAAO,aAAcC,EAAW0B,MAAO,IAE/DC,EAAQ7B,EAAgBC,EAAO,aAAcC,EAAW2B,MAAO,IAE/DC,EAAW9B,EAAgBC,EAAO,gBAAiBC,EAAW4B,SAAU,CACnFtB,QAAS,QACTC,SAAU,WAGCsB,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.2",
3
+ "version": "1.0.0-beta.3",
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.2"
31
+ "@nordhealth/components": "^1.0.0-beta.3"
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": "6a2e0f2a7cc40d798702172a508aa5fb42324018"
46
+ "gitHead": "e273309b5c533a99ae36fd4033db2272e3e5f32f"
47
47
  }