@grantcodes/ui 2.0.0-beta.6 → 2.0.0-beta.8
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/CHANGELOG.md +14 -0
- package/dist/_virtual/_commonjsHelpers.js +1 -0
- package/dist/_virtual/index.js +1 -0
- package/dist/_virtual/react.production.min.js +1 -0
- package/dist/_virtual/react.production.min2.js +1 -0
- package/dist/components/avatar/avatar.component.js +1 -1
- package/dist/components/avatar/avatar.react.js +1 -1
- package/dist/components/button/button.component.js +1 -1
- package/dist/components/button/button.react.js +1 -1
- package/dist/components/button-group/button-group.component.js +1 -1
- package/dist/components/button-group/button-group.react.js +1 -1
- package/dist/components/card/card.component.js +1 -1
- package/dist/components/card/card.react.js +1 -1
- package/dist/components/code-preview/code-preview.component.js +1 -1
- package/dist/components/code-preview/code-preview.react.js +1 -1
- package/dist/components/container/container.component.js +1 -1
- package/dist/components/container/container.react.js +1 -1
- package/dist/components/dialog/dialog.component.js +1 -1
- package/dist/components/dialog/dialog.react.js +1 -1
- package/dist/components/dropzone/dropzone.component.js +1 -1
- package/dist/components/dropzone/dropzone.react.js +1 -1
- package/dist/components/form-field/form-field.component.js +1 -1
- package/dist/components/form-field/form-field.react.js +1 -1
- package/dist/components/gallery/gallery-image.component.js +1 -1
- package/dist/components/gallery/gallery.component.js +1 -1
- package/dist/components/gallery/gallery.react.js +1 -1
- package/dist/components/icon/icon.component.js +1 -1
- package/dist/components/icon/icon.react.js +1 -1
- package/dist/components/loading/loading.component.js +1 -1
- package/dist/components/loading/loading.react.js +1 -1
- package/dist/components/notice/notice.component.js +1 -1
- package/dist/components/notice/notice.react.js +1 -1
- package/dist/components/pagination/pagination.component.js +1 -1
- package/dist/components/pagination/pagination.react.js +1 -1
- package/dist/components/tabs/internal/tabs-button.component.js +1 -1
- package/dist/components/tabs/internal/tabs-item.component.js +1 -1
- package/dist/components/tabs/tab.component.js +1 -1
- package/dist/components/tabs/tabs.component.js +1 -1
- package/dist/components/tabs/tabs.react.js +1 -1
- package/dist/components/tooltip/tooltip.component.js +1 -1
- package/dist/components/tooltip/tooltip.react.js +1 -1
- package/dist/icons.js +1 -1
- package/dist/node_modules/react/cjs/react.production.min.js +9 -0
- package/dist/node_modules/react/index.js +1 -0
- package/package.json +8 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.0-beta.8](https://github.com/grantcodes/ui/compare/v2.0.0-beta.7...v2.0.0-beta.8) (2024-11-05)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* release 2.0.0-beta.8 ([72ab7b1](https://github.com/grantcodes/ui/commit/72ab7b1aa01b60f62e6516d2a5bc682cb969f11b))
|
|
9
|
+
|
|
10
|
+
## [2.0.0-beta.7](https://github.com/grantcodes/ui/compare/v2.0.0-beta.6...v2.0.0-beta.7) (2024-11-05)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Miscellaneous Chores
|
|
14
|
+
|
|
15
|
+
* release 2.0.0-beta.7 ([ca8831c](https://github.com/grantcodes/ui/commit/ca8831ce2543aaaa4784ca027c72a5e1e280e9ef))
|
|
16
|
+
|
|
3
17
|
## [2.0.0-beta.6](https://github.com/grantcodes/ui/compare/v2.0.1-beta.5...v2.0.0-beta.6) (2024-10-30)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var f=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function l(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}function c(e){if(e.__esModule)return e;var o=e.default;if(typeof o=="function"){var t=function r(){return this instanceof r?Reflect.construct(o,arguments,this.constructor):o.apply(this,arguments)};t.prototype=o.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var u=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,u.get?u:{enumerable:!0,get:function(){return e[r]}})}),t}export{f as commonjsGlobal,c as getAugmentedNamespace,n as getDefaultExportFromCjs,a as getDefaultExportFromNamespaceIfNotNamed,l as getDefaultExportFromNamespaceIfPresent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={exports:{}};export{e as __module};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../node_modules/react/cjs/react.production.min.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r={};export{r as __exports};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{LitElement as m,html as o,unsafeCSS as h}from"
|
|
1
|
+
import{LitElement as m,html as o,unsafeCSS as h}from"lit";import{property as l,customElement as u}from"lit/decorators.js";import f from"./avatar.scss.js";var v=Object.defineProperty,g=Object.getOwnPropertyDescriptor,e=(i,t,a,n)=>{for(var s=n>1?void 0:n?g(t,a):t,p=i.length-1,c;p>=0;p--)(c=i[p])&&(s=(n?c(t,a,s):c(s))||s);return n&&s&&v(t,a,s),s};let r=class extends m{constructor(){super(...arguments),this.src="",this.name="",this.alt="",this.initials=""}getInitials(){if(this.initials)return this.initials;if(this.name){const[i,t]=this.name.split(" ");return`${i[0]}${t?t[0]:""}`}return""}getAlt(){return this.alt?this.alt:`${this.name||this.initials} avatar`}getImg(){return this.src?o`<img src=${this.src} alt=${this.getAlt()} />`:o``}render(){const i=this.getImg(),t=o`<span class="avatar__initials"
|
|
2
2
|
>${this.getInitials()}</span
|
|
3
3
|
>`;return o` <div class="avatar">${i||t}</div> `}};r.styles=[h(f)];e([l()],r.prototype,"src",2);e([l()],r.prototype,"name",2);e([l()],r.prototype,"alt",2);e([l()],r.prototype,"initials",2);r=e([u("grantcodes-avatar")],r);export{r as GrantCodesAvatar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as a from"
|
|
1
|
+
import*as a from"../../node_modules/react/index.js";import{createComponent as t}from"@lit/react";import{GrantCodesAvatar as r}from"./avatar.component.js";const m=t({tagName:"grantcodes-avatar",elementClass:r,react:a});export{m as Avatar};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LitElement as a,unsafeCSS as u}from"
|
|
1
|
+
import{LitElement as a,unsafeCSS as u}from"lit";import{literal as f,html as h}from"lit/static-html.js";import{property as i,customElement as c}from"lit/decorators.js";import b from"./button.scss.js";var v=Object.defineProperty,_=Object.getOwnPropertyDescriptor,m=(r,e,n,o)=>{for(var t=o>1?void 0:o?_(e,n):e,p=r.length-1,l;p>=0;p--)(l=r[p])&&(t=(o?l(e,n,t):l(t))||t);return o&&t&&v(e,n,t),t};let s=class extends a{render(){const r=this.href?f`a`:f`button`;return h`
|
|
2
2
|
<${r} href="${this.href}" class="button">
|
|
3
3
|
<span><slot></slot></span>
|
|
4
4
|
</${r}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as t from"
|
|
1
|
+
import*as t from"../../node_modules/react/index.js";import{createComponent as o}from"@lit/react";import{GrantCodesButton as e}from"./button.component.js";const m=o({tagName:"grantcodes-button",elementClass:e,react:t});export{m as Button};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LitElement as u,html as m,unsafeCSS as f}from"
|
|
1
|
+
import{LitElement as u,html as m,unsafeCSS as f}from"lit";import{customElement as v}from"lit/decorators.js";import a from"./button-group.scss.js";var c=Object.defineProperty,i=Object.getOwnPropertyDescriptor,_=(p,r,o,e)=>{for(var t=e>1?void 0:e?i(r,o):r,s=p.length-1,n;s>=0;s--)(n=p[s])&&(t=(e?n(r,o,t):n(t))||t);return e&&t&&c(r,o,t),t};let l=class extends u{render(){return m`
|
|
2
2
|
<div class="button-group">
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as o from"../../node_modules/react/index.js";import{createComponent as t}from"@lit/react";import{GrantCodesButtonGroup as r}from"./button-group.component.js";const m=t({tagName:"grantcodes-button-group",elementClass:r,react:o});export{m as ButtonGroup};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LitElement as n,html as d,unsafeCSS as m}from"
|
|
1
|
+
import{LitElement as n,html as d,unsafeCSS as m}from"lit";import{customElement as _}from"lit/decorators.js";import f from"./card.scss.js";var p=Object.defineProperty,i=Object.getOwnPropertyDescriptor,v=(l,e,t,s)=>{for(var r=s>1?void 0:s?i(e,t):e,a=l.length-1,o;a>=0;a--)(o=l[a])&&(r=(s?o(e,t,r):o(r))||r);return s&&r&&p(e,t,r),r};let c=class extends n{render(){return d`
|
|
2
2
|
<div class="card">
|
|
3
3
|
<slot name="card-header" class="card__header"></slot>
|
|
4
4
|
<slot name="card-content" class="card__content"></slot>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as r from"
|
|
1
|
+
import*as r from"../../node_modules/react/index.js";import{createComponent as e}from"@lit/react";import{GrantCodesCard as o}from"./card.component.js";const m=e({tagName:"grantcodes-card",elementClass:o,react:r});export{m as Card};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{LitElement as h,html as m,unsafeCSS as d}from"
|
|
1
|
+
import{LitElement as h,html as m,unsafeCSS as d}from"lit";import{property as a,query as c,customElement as g}from"lit/decorators.js";import{codeToHtml as v}from"shiki/bundle/web";import u from"./code-preview.scss.js";var f=Object.defineProperty,w=Object.getOwnPropertyDescriptor,s=(o,t,p,i)=>{for(var e=i>1?void 0:i?w(t,p):t,n=o.length-1,l;n>=0;n--)(l=o[n])&&(e=(i?l(t,p,e):l(e))||e);return i&&e&&f(t,p,e),e};let r=class extends h{constructor(){super(...arguments),this.language="html",this.theme="aurora-x"}async doHighlight(){const o=this.textContent??"",t=await v(o.trim(),{lang:this.language,theme:this.theme});this.codePreview.innerHTML=t}firstUpdated(){this.doHighlight()}render(){return m`<div class="code-preview">
|
|
2
2
|
<pre><slot></slot></pre>
|
|
3
3
|
</div> `}};r.styles=[d(u)];s([a({type:String})],r.prototype,"language",2);s([a({type:String})],r.prototype,"theme",2);s([c(".code-preview")],r.prototype,"codePreview",2);r=s([g("grantcodes-code-preview")],r);export{r as GrantCodesCodePreview};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"
|
|
1
|
+
import*as e from"../../node_modules/react/index.js";import{createComponent as o}from"@lit/react";import{GrantCodesCodePreview as r}from"./code-preview.component.js";const a=o({tagName:"grantcodes-code-preview",elementClass:r,react:e});export{a as CodePreview};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LitElement as c,html as f,unsafeCSS as m}from"
|
|
1
|
+
import{LitElement as c,html as f,unsafeCSS as m}from"lit";import{property as p,customElement as d}from"lit/decorators.js";import u from"classnames";import v from"./container.scss.js";var h=Object.defineProperty,g=Object.getOwnPropertyDescriptor,l=(r,n,i,o)=>{for(var t=o>1?void 0:o?g(n,i):n,s=r.length-1,a;s>=0;s--)(a=r[s])&&(t=(o?a(n,i,t):a(t))||t);return o&&t&&h(n,i,t),t};let e=class extends c{constructor(){super(...arguments),this.align="default",this.nopad=!1}render(){const r=u("container",{"container--wide":this.align==="wide","container--full":this.align==="full","container--viewport":this.align==="viewport","container--nopad":this.nopad});return f`
|
|
2
2
|
<div class="${r}">
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as e from"../../node_modules/react/index.js";import{createComponent as o}from"@lit/react";import{GrantCodesContainer as t}from"./container.component.js";const a=o({tagName:"grantcodes-container",elementClass:t,react:e});export{a as Container};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LitElement as m,html as p,unsafeCSS as h}from"
|
|
1
|
+
import{LitElement as m,html as p,unsafeCSS as h}from"lit";import{query as f,property as d,customElement as g}from"lit/decorators.js";import c from"./dialog.scss.js";var u=Object.defineProperty,_=Object.getOwnPropertyDescriptor,i=(o,t,a,l)=>{for(var e=l>1?void 0:l?_(t,a):t,r=o.length-1,n;r>=0;r--)(n=o[r])&&(e=(l?n(t,a,e):n(e))||e);return l&&e&&u(t,a,e),e};let s=class extends m{constructor(){super(...arguments),this.open=!1,this.dismissible=!0}updated(o){o.has("open")&&this._handleOpenChange()}_handleOpenChange(){this.open?this.dialog.showModal():this.dialog.close()}dismissTemplate(){return this.dismissible?p`
|
|
2
2
|
<button
|
|
3
3
|
class="dialog__dismiss"
|
|
4
4
|
@click=${()=>{this.open=!1}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"
|
|
1
|
+
import*as o from"../../node_modules/react/index.js";import{createComponent as e}from"@lit/react";import{GrantCodesDialog as t}from"./dialog.component.js";const m=e({tagName:"grantcodes-dialog",elementClass:t,react:o});export{m as Dialog};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LitElement as d,html as p,unsafeCSS as u}from"
|
|
1
|
+
import{LitElement as d,html as p,unsafeCSS as u}from"lit";import{property as f,queryAssignedElements as h,state as i,customElement as _}from"lit/decorators.js";import m from"classnames";import v from"./dropzone.scss.js";var b=Object.defineProperty,g=Object.getOwnPropertyDescriptor,s=(t,l,o,n)=>{for(var e=n>1?void 0:n?g(l,o):l,a=t.length-1,c;a>=0;a--)(c=t[a])&&(e=(n?c(l,o,e):c(e))||e);return n&&e&&b(l,o,e),e};let r=class extends d{constructor(){super(...arguments),this.fullscreenOnDrag=!1,this._fullscreen=!1,this._enableFullscreen=()=>{this.fullscreenOnDrag&&(this._fullscreen=!0)},this._disableFullscreen=()=>{this._fullscreen=!1}}connectedCallback(){super.connectedCallback(),document.addEventListener("dragenter",this._enableFullscreen),document.addEventListener("dragend",this._disableFullscreen)}disconnectedCallback(){document.removeEventListener("dragenter",this._enableFullscreen),document.removeEventListener("dragend",this._disableFullscreen),super.disconnectedCallback()}firstUpdated(){if(this._input.length===0)throw new Error("No file input found");this._placeholder=this._input[0].placeholder}render(){const t=m("dropzone",{"dropzone--fullscreen":this._fullscreen});return p`
|
|
2
2
|
<div
|
|
3
3
|
class=${t}
|
|
4
4
|
@mouseLeave=${this._disableFullscreen}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"
|
|
1
|
+
import*as o from"../../node_modules/react/index.js";import{createComponent as e}from"@lit/react";import{GrantCodesDropzone as r}from"./dropzone.component.js";const m=e({tagName:"grantcodes-dropzone",elementClass:r,react:o});export{m as Dropzone};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LitElement as f,html as o,unsafeCSS as u}from"
|
|
1
|
+
import{LitElement as f,html as o,unsafeCSS as u}from"lit";import{property as a,queryAssignedElements as d,customElement as c}from"lit/decorators.js";import m from"./form-field.scss.js";import b from"classnames";import{generateId as y}from"../../lib/generate-id.js";var g=Object.defineProperty,I=Object.getOwnPropertyDescriptor,i=(e,s,p,l)=>{for(var r=l>1?void 0:l?I(s,p):s,n=e.length-1,h;n>=0;n--)(h=e[n])&&(r=(l?h(s,p,r):h(r))||r);return l&&r&&g(s,p,r),r};let t=class extends f{constructor(){super(),this.label="",this.inlineInput=!1,this.groupInput=!1,this.id||(this.id=y("form-field"))}get errorId(){return`${this.id}-error`}get helpId(){return`${this.id}-help`}get ariaDescribedBy(){const e=[];return this.error&&e.push(this.errorId),this.help&&e.push(this.helpId),e.join(" ")}firstUpdated(){const e=this.inputElements[0];this.nestedFields.length>0&&(this.groupInput=!0,this.requestUpdate()),e&&(e.id=this.id,e.setAttribute("aria-describedby",this.ariaDescribedBy),(e.type==="checkbox"||e.type==="radio")&&(this.inlineInput=!0,this.requestUpdate()))}handleLabelClick(){const e=this.inputElements[0];e&&(e.focus(),e instanceof HTMLInputElement&&(e.type==="checkbox"||e.type==="radio")&&(e.checked=!e.checked))}errorTemplate(){return this.error?o`
|
|
2
2
|
<p class="form-field__error" id=${this.errorId}>Error: ${this.error}</p>
|
|
3
3
|
`:""}helpTemplate(){return this.help?o`
|
|
4
4
|
<span class="form-field__help" id=${this.helpId}>${this.help}</span>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"
|
|
1
|
+
import*as e from"../../node_modules/react/index.js";import{createComponent as o}from"@lit/react";import{GrantCodesFormField as r}from"./form-field.component.js";const a=o({tagName:"grantcodes-form-field",elementClass:r,react:e});export{a as FormField};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LitElement as g,html as h,unsafeCSS as c}from"
|
|
1
|
+
import{LitElement as g,html as h,unsafeCSS as c}from"lit";import{property as i,customElement as m}from"lit/decorators.js";import y from"./gallery.scss.js";var u=Object.defineProperty,f=Object.getOwnPropertyDescriptor,r=(n,p,o,s)=>{for(var e=s>1?void 0:s?f(p,o):p,a=n.length-1,l;a>=0;a--)(l=n[a])&&(e=(s?l(p,o,e):l(e))||e);return s&&e&&u(p,o,e),e};let t=class extends g{constructor(){super(...arguments),this.width=0,this.height=0,this.src="",this.alt="",this.caption="",this.thumbnail=""}captionTemplate(){if(this.caption)return h`
|
|
2
2
|
<figcaption class="gallery__image__caption">${this.caption}</figcaption>
|
|
3
3
|
`}render(){return h`
|
|
4
4
|
<figure class="gallery__image">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LitElement as p,html as g,unsafeCSS as y}from"
|
|
1
|
+
import{LitElement as p,html as g,unsafeCSS as y}from"lit";import{queryAssignedElements as c,customElement as f}from"lit/decorators.js";import i from"./gallery.scss.js";var v=Object.defineProperty,_=Object.getOwnPropertyDescriptor,n=(m,r,t,l)=>{for(var e=l>1?void 0:l?_(r,t):r,o=m.length-1,a;o>=0;o--)(a=m[o])&&(e=(l?a(r,t,e):a(e))||e);return l&&e&&v(r,t,e),e};let s=class extends p{render(){return g`
|
|
2
2
|
<div class="gallery">
|
|
3
3
|
<slot class="gallery__slot"></slot>
|
|
4
4
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"
|
|
1
|
+
import*as e from"../../node_modules/react/index.js";import{createComponent as r}from"@lit/react";import{GrantCodesGallery as o}from"./gallery.component.js";const m=r({tagName:"grantcodes-gallery",elementClass:o,react:e});export{m as Gallery};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{LitElement as m,html as f,unsafeCSS as l}from"
|
|
1
|
+
import{LitElement as m,html as f,unsafeCSS as l}from"lit";import{property as a,customElement as u}from"lit/decorators.js";import{unsafeHTML as v}from"lit/directives/unsafe-html.js";import _ from"./icon.scss.js";var y=Object.defineProperty,h=Object.getOwnPropertyDescriptor,i=(c,e,s,t)=>{for(var r=t>1?void 0:t?h(e,s):e,n=c.length-1,p;n>=0;n--)(p=c[n])&&(r=(t?p(e,s,r):p(r))||r);return t&&r&&y(e,s,r),r};let o=class extends m{constructor(){super(...arguments),this.icon=""}render(){return f`<span class="icon">${v(this.icon)}</span>`}};o.styles=[l(_)];i([a({type:String})],o.prototype,"icon",2);o=i([u("grantcodes-icon")],o);export{o as GrantCodesIcon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"
|
|
1
|
+
import*as o from"../../node_modules/react/index.js";import{createComponent as e}from"@lit/react";import{GrantCodesIcon as t}from"./icon.component.js";const m=e({tagName:"grantcodes-icon",elementClass:t,react:o});export{m as Icon};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LitElement as p,html as m,unsafeCSS as f}from"
|
|
1
|
+
import{LitElement as p,html as m,unsafeCSS as f}from"lit";import{customElement as i}from"lit/decorators.js";import c from"./loading.scss.js";var d=Object.defineProperty,v=Object.getOwnPropertyDescriptor,_=(a,r,t,s)=>{for(var e=s>1?void 0:s?v(r,t):r,o=a.length-1,l;o>=0;o--)(l=a[o])&&(e=(s?l(r,t,e):l(e))||e);return s&&e&&d(r,t,e),e};let n=class extends p{render(){return m`
|
|
2
2
|
<span class="loading">
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</span>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"
|
|
1
|
+
import*as o from"../../node_modules/react/index.js";import{createComponent as e}from"@lit/react";import{GrantCodesLoading as t}from"./loading.component.js";const n=e({tagName:"grantcodes-loading",elementClass:t,react:o});export{n as Loading};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LitElement as p,html as r,unsafeCSS as d}from"
|
|
1
|
+
import{LitElement as p,html as r,unsafeCSS as d}from"lit";import{property as m,customElement as f}from"lit/decorators.js";import h from"classnames";import u from"./notice.scss.js";import{GrantCodesIcon as v}from"../icon/icon.component.js";import"../../icons.js";import{Info as _,CheckCircle2 as C,AlertCircle as g,XCircle as $,X as b}from"lucide-static";var y=Object.defineProperty,D=Object.getOwnPropertyDescriptor,n=(s,i,c,o)=>{for(var t=o>1?void 0:o?D(i,c):i,a=s.length-1,l;a>=0;a--)(l=s[a])&&(t=(o?l(i,c,t):l(t))||t);return o&&t&&y(i,c,t),t};const w={info:_,success:C,warning:g,error:$};let e=class extends p{constructor(){super(...arguments),this.variant="info",this.title="",this.dismissable=!1}onDismiss(s){document.startViewTransition?document.startViewTransition(()=>{this.remove()}):this.remove()}renderDismiss(){return this.dismissable?r`
|
|
2
2
|
<button class="notice__close" @click=${this.onDismiss}>
|
|
3
3
|
<grantcodes-icon icon="${b}" title="Close Notice"></grantcodes-icon>
|
|
4
4
|
</button>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as e from"../../node_modules/react/index.js";import{createComponent as o}from"@lit/react";import{GrantCodesNotice as t}from"./notice.component.js";const a=o({tagName:"grantcodes-notice",elementClass:t,react:e});export{a as Notice};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LitElement as l,html as s,unsafeCSS as v}from"
|
|
1
|
+
import{LitElement as l,html as s,unsafeCSS as v}from"lit";import{property as f,customElement as m}from"lit/decorators.js";import c from"./pagination.scss.js";import{GrantCodesButton as g}from"../button/button.component.js";var h=Object.defineProperty,b=Object.getOwnPropertyDescriptor,p=(u,r,o,n)=>{for(var e=n>1?void 0:n?b(r,o):r,a=u.length-1,i;a>=0;a--)(i=u[a])&&(e=(n?i(r,o,e):i(e))||e);return n&&e&&h(r,o,e),e};let t=class extends l{nextTemplate(){return this.nextHref?s`
|
|
2
2
|
<grantcodes-button class="pagination__next" href=${this.nextHref}
|
|
3
3
|
>Next</grantcodes-button
|
|
4
4
|
>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as o from"../../node_modules/react/index.js";import{createComponent as t}from"@lit/react";import{GrantCodesPagination as a}from"./pagination.component.js";const r=t({tagName:"grantcodes-pagination",elementClass:a,react:o});export{r as Pagination};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{GrantCodesTabsItem as l}from"./tabs-item.component.js";import{html as p,LitElement as b,unsafeCSS as m}from"
|
|
1
|
+
import{GrantCodesTabsItem as l}from"./tabs-item.component.js";import{html as p,LitElement as b,unsafeCSS as m}from"lit";import{customElement as c}from"lit/decorators.js";import{ifDefined as d}from"lit/directives/if-defined.js";import f from"../tabs.scss.js";var u=Object.defineProperty,v=Object.getOwnPropertyDescriptor,h=(n,e,r,s)=>{for(var t=s>1?void 0:s?v(e,r):e,a=n.length-1,i;a>=0;a--)(i=n[a])&&(t=(s?i(e,r,t):i(t))||t);return s&&t&&u(e,r,t),t};let o=class extends l{render(){return p`
|
|
2
2
|
<button
|
|
3
3
|
id="${this.buttonId}"
|
|
4
4
|
type="button"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{LitElement as y,html as c}from"
|
|
1
|
+
import{LitElement as y,html as c}from"lit";import{property as e}from"lit/decorators.js";var u=Object.defineProperty,d=Object.getOwnPropertyDescriptor,r=(i,o,s,p)=>{for(var t=p>1?void 0:p?d(o,s):o,a=i.length-1,l;a>=0;a--)(l=i[a])&&(t=(p?l(o,s,t):l(t))||t);return p&&t&&u(o,s,t),t};class n extends y{constructor(){super(...arguments),this.active=!1,this.label="",this.index=-1,this.containerId=""}get buttonId(){return`${this.containerId}-button-${this.index.toString()}`}get panelId(){return`${this.containerId}-panel-${this.index.toString()}`}get content(){return this.label}render(){return c``}}r([e({type:Boolean})],n.prototype,"active",2);r([e({type:String})],n.prototype,"label",2);r([e({type:Number})],n.prototype,"index",2);r([e({type:String})],n.prototype,"containerId",2);r([e({type:String,reflect:!0})],n.prototype,"buttonId",1);r([e({type:String})],n.prototype,"panelId",1);r([e({type:String})],n.prototype,"content",1);export{n as GrantCodesTabsItem};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{GrantCodesTabsItem as n}from"./internal/tabs-item.component.js";import{html as p,unsafeCSS as m}from"
|
|
1
|
+
import{GrantCodesTabsItem as n}from"./internal/tabs-item.component.js";import{html as p,unsafeCSS as m}from"lit";import{customElement as b}from"lit/decorators.js";import f from"./tabs.scss.js";var v=Object.defineProperty,d=Object.getOwnPropertyDescriptor,c=(i,t,s,r)=>{for(var e=r>1?void 0:r?d(t,s):t,a=i.length-1,l;a>=0;a--)(l=i[a])&&(e=(r?l(t,s,e):l(e))||e);return r&&e&&v(t,s,e),e};let o=class extends n{render(){return p`
|
|
2
2
|
<div
|
|
3
3
|
id="${this.panelId}"
|
|
4
4
|
role="tabpanel"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LitElement as l,html as d,unsafeCSS as c}from"
|
|
1
|
+
import{LitElement as l,html as d,unsafeCSS as c}from"lit";import{property as h,queryAssignedElements as f,queryAll as u,state as p,customElement as v}from"lit/decorators.js";import{ifDefined as T}from"lit/directives/if-defined.js";import m from"./tabs.scss.js";import"./internal/tabs-button.js";import{generateId as y}from"../../lib/generate-id.js";var _=Object.defineProperty,x=Object.getOwnPropertyDescriptor,n=(t,e,s,i)=>{for(var a=i>1?void 0:i?x(e,s):e,o=t.length-1,b;o>=0;o--)(b=t[o])&&(a=(i?b(e,s,a):b(a))||a);return i&&a&&_(e,s,a),a};let r=class extends l{constructor(){super(),this.focusedTabIndex=-1,this.id||(this.id=y("tabs"))}get activeTab(){return this.tabs.find(t=>t.active)??null}set activeTab(t){this.tabs.forEach((e,s)=>{e===t?(e.active=!0,this.focusedTabIndex=s):e.active=!1}),this.requestUpdate()}initializeTabs(){this.tabs.forEach((t,e)=>{t.index=e,t.containerId=this.id}),this.activeTab==null&&(this.focusedTabIndex=0,this.activeTab=this.tabs[0])}firstUpdated(){this.initializeTabs()}handleTabKeyDown(t){if(t.key==="ArrowRight"||t.key==="ArrowLeft"){t.preventDefault();const e=this.tabs,s=t.key==="ArrowRight"?(this.focusedTabIndex+1)%e.length:this.focusedTabIndex-1,i=this.tabButtons[s];i&&(i.focus(),this.focusedTabIndex=s)}}renderTabButtons(){return this.tabs.map((t,e)=>d`
|
|
2
2
|
<grantcodes-tabs-button
|
|
3
3
|
index=${e+1}
|
|
4
4
|
label="${t.label}"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as t from"
|
|
1
|
+
import*as t from"../../node_modules/react/index.js";import{createComponent as e}from"@lit/react";import{GrantCodesTabs as o}from"./tabs.component.js";const m=e({tagName:"grantcodes-tabs",elementClass:o,react:t});export{m as Tabs};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LitElement as a,html as c,unsafeCSS as h}from"
|
|
1
|
+
import{LitElement as a,html as c,unsafeCSS as h}from"lit";import{property as d,queryAssignedElements as b,customElement as f}from"lit/decorators.js";import m from"./tooltip.scss.js";import{generateId as u}from"../../lib/generate-id.js";var v=Object.defineProperty,y=Object.getOwnPropertyDescriptor,r=(i,t,l,s)=>{for(var e=s>1?void 0:s?y(t,l):t,p=i.length-1,n;p>=0;p--)(n=i[p])&&(e=(s?n(t,l,e):n(e))||e);return s&&e&&v(t,l,e),e};let o=class extends a{constructor(){super(),this.label="",this.description="",this.id=u("tooltip")}firstUpdated(){var t;const i=(t=this.slotted)==null?void 0:t[0];i&&(this.label?i.setAttribute("aria-labelledby",this.id):this.description&&i.setAttribute("aria-describedby",this.id))}render(){if(this.label&&this.description)throw new Error("You cannot provide both a label and a description");return c`
|
|
2
2
|
<div class="tooltip">
|
|
3
3
|
<div class="tooltip__slot">
|
|
4
4
|
<slot></slot>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"
|
|
1
|
+
import*as o from"../../node_modules/react/index.js";import{createComponent as t}from"@lit/react";import{GrantCodesTooltip as e}from"./tooltip.component.js";const a=t({tagName:"grantcodes-tooltip",elementClass:e,react:o});export{a as Tooltip};
|
package/dist/icons.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"
|
|
1
|
+
export*from"lucide-static";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import"../../../_virtual/_commonjsHelpers.js";import{__exports as r}from"../../../_virtual/react.production.min2.js";/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var y=Symbol.for("react.element"),T=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),U=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),M=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),C=Symbol.iterator;function z(e){return e===null||typeof e!="object"?null:(e=C&&e[C]||e["@@iterator"],typeof e=="function"?e:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$=Object.assign,O={};function p(e,t,n){this.props=e,this.context=t,this.refs=O,this.updater=n||b}p.prototype.isReactComponent={};p.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};p.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function x(){}x.prototype=p.prototype;function h(e,t,n){this.props=e,this.context=t,this.refs=O,this.updater=n||b}var S=h.prototype=new x;S.constructor=h;$(S,p.prototype);S.isPureReactComponent=!0;var k=Array.isArray,I=Object.prototype.hasOwnProperty,E={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function g(e,t,n){var u,o={},i=null,a=null;if(t!=null)for(u in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)I.call(t,u)&&!j.hasOwnProperty(u)&&(o[u]=t[u]);var s=arguments.length-2;if(s===1)o.children=n;else if(1<s){for(var c=Array(s),l=0;l<s;l++)c[l]=arguments[l+2];o.children=c}if(e&&e.defaultProps)for(u in s=e.defaultProps,s)o[u]===void 0&&(o[u]=s[u]);return{$$typeof:y,type:e,key:i,ref:a,props:o,_owner:E.current}}function B(e,t){return{$$typeof:y,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function R(e){return typeof e=="object"&&e!==null&&e.$$typeof===y}function H(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var w=/\/+/g;function m(e,t){return typeof e=="object"&&e!==null&&e.key!=null?H(""+e.key):t.toString(36)}function d(e,t,n,u,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case y:case T:a=!0}}if(a)return a=e,o=o(a),e=u===""?"."+m(a,0):u,k(o)?(n="",e!=null&&(n=e.replace(w,"$&/")+"/"),d(o,t,n,"",function(l){return l})):o!=null&&(R(o)&&(o=B(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(w,"$&/")+"/")+e)),t.push(o)),1;if(a=0,u=u===""?".":u+":",k(e))for(var s=0;s<e.length;s++){i=e[s];var c=u+m(i,s);a+=d(i,t,n,c,o)}else if(c=z(e),typeof c=="function")for(e=c.call(e),s=0;!(i=e.next()).done;)i=i.value,c=u+m(i,s++),a+=d(i,t,n,c,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function v(e,t,n){if(e==null)return e;var u=[],o=0;return d(e,u,"","",function(i){return t.call(n,i,o++)}),u}function W(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var f={current:null},_={transition:null},Y={ReactCurrentDispatcher:f,ReactCurrentBatchConfig:_,ReactCurrentOwner:E};function P(){throw Error("act(...) is not supported in production builds of React.")}var K=r.Children={map:v,forEach:function(e,t,n){v(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return v(e,function(){t++}),t},toArray:function(e){return v(e,function(t){return t})||[]},only:function(e){if(!R(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},Q=r.Component=p,X=r.Fragment=D,Z=r.Profiler=L,ee=r.PureComponent=h,te=r.StrictMode=V,re=r.Suspense=N,ne=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y,oe=r.act=P,ue=r.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var u=$({},e.props),o=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=E.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)I.call(t,c)&&!j.hasOwnProperty(c)&&(u[c]=t[c]===void 0&&s!==void 0?s[c]:t[c])}var c=arguments.length-2;if(c===1)u.children=n;else if(1<c){s=Array(c);for(var l=0;l<c;l++)s[l]=arguments[l+2];u.children=s}return{$$typeof:y,type:e.type,key:o,ref:i,props:u,_owner:a}},ce=r.createContext=function(e){return e={$$typeof:U,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:F,_context:e},e.Consumer=e},ie=r.createElement=g,se=r.createFactory=function(e){var t=g.bind(null,e);return t.type=e,t},ae=r.createRef=function(){return{current:null}},fe=r.forwardRef=function(e){return{$$typeof:A,render:e}},le=r.isValidElement=R,pe=r.lazy=function(e){return{$$typeof:q,_payload:{_status:-1,_result:e},_init:W}},ye=r.memo=function(e,t){return{$$typeof:M,type:e,compare:t===void 0?null:t}},ve=r.startTransition=function(e){var t=_.transition;_.transition={};try{e()}finally{_.transition=t}},de=r.unstable_act=P,_e=r.useCallback=function(e,t){return f.current.useCallback(e,t)},me=r.useContext=function(e){return f.current.useContext(e)},he=r.useDebugValue=function(){},Se=r.useDeferredValue=function(e){return f.current.useDeferredValue(e)},Ee=r.useEffect=function(e,t){return f.current.useEffect(e,t)},Re=r.useId=function(){return f.current.useId()},Ce=r.useImperativeHandle=function(e,t,n){return f.current.useImperativeHandle(e,t,n)},ke=r.useInsertionEffect=function(e,t){return f.current.useInsertionEffect(e,t)},we=r.useLayoutEffect=function(e,t){return f.current.useLayoutEffect(e,t)},be=r.useMemo=function(e,t){return f.current.useMemo(e,t)},$e=r.useReducer=function(e,t,n){return f.current.useReducer(e,t,n)},Oe=r.useRef=function(e){return f.current.useRef(e)},xe=r.useState=function(e){return f.current.useState(e)},Ie=r.useSyncExternalStore=function(e,t,n){return f.current.useSyncExternalStore(e,t,n)},je=r.useTransition=function(){return f.current.useTransition()},ge=r.version="18.3.1";export{K as Children,Q as Component,X as Fragment,Z as Profiler,ee as PureComponent,te as StrictMode,re as Suspense,ne as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,oe as act,ue as cloneElement,ce as createContext,ie as createElement,se as createFactory,ae as createRef,r as default,fe as forwardRef,le as isValidElement,pe as lazy,ye as memo,ve as startTransition,de as unstable_act,_e as useCallback,me as useContext,he as useDebugValue,Se as useDeferredValue,Ee as useEffect,Re as useId,Ce as useImperativeHandle,ke as useInsertionEffect,we as useLayoutEffect,be as useMemo,$e as useReducer,Oe as useRef,xe as useState,Ie as useSyncExternalStore,je as useTransition,ge as version};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getDefaultExportFromCjs as e}from"../../_virtual/_commonjsHelpers.js";import{__module as r}from"../../_virtual/index.js";import"../../_virtual/react.production.min.js";import{__exports as t}from"../../_virtual/react.production.min2.js";var i=r.exports;r.exports=t;var o=r.exports;const c=e(o);export{c as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grantcodes/ui",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.cjs",
|
|
@@ -10,13 +10,15 @@
|
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
12
|
"types": "./dist/main.d.ts",
|
|
13
|
-
"import": "./dist/main.js"
|
|
14
|
-
|
|
13
|
+
"import": "./dist/main.js"
|
|
14
|
+
},
|
|
15
|
+
"./icons": {
|
|
16
|
+
"types": "./dist/icons.d.ts",
|
|
17
|
+
"import": "./dist/icons.js"
|
|
15
18
|
},
|
|
16
19
|
"./react": {
|
|
17
20
|
"types": "./dist/react.d.ts",
|
|
18
|
-
"import": "./dist/react.js"
|
|
19
|
-
"require": "./dist/react.cjs"
|
|
21
|
+
"import": "./dist/react.js"
|
|
20
22
|
},
|
|
21
23
|
"./styles/base.css": {
|
|
22
24
|
"import": "./dist/css/base.css",
|
|
@@ -55,9 +57,9 @@
|
|
|
55
57
|
"shiki": "^1.22.0"
|
|
56
58
|
},
|
|
57
59
|
"devDependencies": {
|
|
58
|
-
"@biomejs/biome": "1.9.2",
|
|
59
60
|
"@ava/typescript": "^5.0.0",
|
|
60
61
|
"@babel/core": "^7.25.8",
|
|
62
|
+
"@biomejs/biome": "1.9.2",
|
|
61
63
|
"@grantcodes/commit": "^1.0.7",
|
|
62
64
|
"@storybook/addon-essentials": "^8.3.6",
|
|
63
65
|
"@storybook/web-components": "^8.3.6",
|
|
@@ -72,7 +74,6 @@
|
|
|
72
74
|
"typescript": "^5.6.3",
|
|
73
75
|
"vite": "^5.4.9"
|
|
74
76
|
},
|
|
75
|
-
"peerDependencies": {},
|
|
76
77
|
"files": [
|
|
77
78
|
"dist/**/*",
|
|
78
79
|
"CHANGELOG.md",
|