@grantcodes/ui 1.0.0 → 2.0.0-beta.2
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 +20 -0
- package/dist/components/avatar/avatar.component.js +3 -0
- package/dist/components/avatar/avatar.js +1 -0
- package/dist/components/avatar/avatar.react.js +1 -0
- package/dist/components/avatar/avatar.scss.js +1 -0
- package/dist/components/avatar/index.js +1 -0
- package/dist/components/button/button.component.js +5 -0
- package/dist/components/button/button.js +1 -0
- package/dist/components/button/button.react.js +1 -0
- package/dist/components/button/button.scss.js +1 -0
- package/dist/components/button/index.js +1 -0
- package/dist/components/button-group/button-group.component.js +5 -0
- package/dist/components/button-group/button-group.js +1 -0
- package/dist/components/button-group/button-group.react.js +1 -0
- package/dist/components/button-group/button-group.scss.js +1 -0
- package/dist/components/button-group/index.js +1 -0
- package/dist/components/card/card.component.js +8 -0
- package/dist/components/card/card.js +1 -0
- package/dist/components/card/card.react.js +1 -0
- package/dist/components/card/card.scss.js +1 -0
- package/dist/components/card/index.js +1 -0
- package/dist/components/code-preview/code-preview.component.js +1 -0
- package/dist/components/code-preview/code-preview.js +1 -0
- package/dist/components/code-preview/code-preview.react.js +1 -0
- package/dist/components/code-preview/code-preview.scss.js +1 -0
- package/dist/components/code-preview/index.js +1 -0
- package/dist/components/container/container.component.js +5 -0
- package/dist/components/container/container.js +1 -0
- package/dist/components/container/container.react.js +1 -0
- package/dist/components/container/container.scss.js +1 -0
- package/dist/components/container/index.js +1 -0
- package/dist/components/dialog/dialog.component.js +23 -0
- package/dist/components/dialog/dialog.js +1 -0
- package/dist/components/dialog/dialog.react.js +1 -0
- package/dist/components/dialog/dialog.scss.js +1 -0
- package/dist/components/dialog/index.js +1 -0
- package/dist/components/dropzone/dropzone.component.js +11 -0
- package/dist/components/dropzone/dropzone.js +1 -0
- package/dist/components/dropzone/dropzone.react.js +1 -0
- package/dist/components/dropzone/dropzone.scss.js +1 -0
- package/dist/components/dropzone/index.js +1 -0
- package/dist/components/form-field/form-field.component.js +22 -0
- package/dist/components/form-field/form-field.js +1 -0
- package/dist/components/form-field/form-field.react.js +1 -0
- package/dist/components/form-field/form-field.scss.js +1 -0
- package/dist/components/form-field/index.js +1 -0
- package/dist/components/gallery/gallery-image.component.js +14 -0
- package/dist/components/gallery/gallery-image.js +1 -0
- package/dist/components/gallery/gallery.component.js +5 -0
- package/dist/components/gallery/gallery.js +1 -0
- package/dist/components/gallery/gallery.react.js +1 -0
- package/dist/components/gallery/gallery.scss.js +1 -0
- package/dist/components/gallery/index.js +1 -0
- package/dist/components/icon/icon.component.js +1 -0
- package/dist/components/icon/icon.js +1 -0
- package/dist/components/icon/icon.react.js +1 -0
- package/dist/components/icon/icon.scss.js +1 -0
- package/dist/components/icon/index.js +1 -0
- package/dist/components/loading/index.js +1 -0
- package/dist/components/loading/loading.component.js +5 -0
- package/dist/components/loading/loading.js +1 -0
- package/dist/components/loading/loading.react.js +1 -0
- package/dist/components/loading/loading.scss.js +1 -0
- package/dist/components/notice/index.js +1 -0
- package/dist/components/notice/notice.component.js +17 -0
- package/dist/components/notice/notice.js +1 -0
- package/dist/components/notice/notice.react.js +1 -0
- package/dist/components/notice/notice.scss.js +1 -0
- package/dist/components/pagination/index.js +1 -0
- package/dist/components/pagination/pagination.component.js +13 -0
- package/dist/components/pagination/pagination.js +1 -0
- package/dist/components/pagination/pagination.react.js +1 -0
- package/dist/components/pagination/pagination.scss.js +1 -0
- package/dist/components/tabs/index.js +1 -0
- package/dist/components/tabs/tab.component.js +1 -0
- package/dist/components/tabs/tab.js +1 -0
- package/dist/components/tabs/tabs-item.component.js +1 -0
- package/dist/components/tabs/tabs-panel.component.js +10 -0
- package/dist/components/tabs/tabs-panel.js +1 -0
- package/dist/components/tabs/tabs-tab.component.js +12 -0
- package/dist/components/tabs/tabs-tab.js +1 -0
- package/dist/components/tabs/tabs.component.js +28 -0
- package/dist/components/tabs/tabs.js +1 -0
- package/dist/components/tabs/tabs.react.js +1 -0
- package/dist/components/tabs/tabs.scss.js +1 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/tooltip/tooltip.component.js +10 -0
- package/dist/components/tooltip/tooltip.js +1 -0
- package/dist/components/tooltip/tooltip.react.js +1 -0
- package/dist/components/tooltip/tooltip.scss.js +1 -0
- package/dist/css/base.css +1 -0
- package/dist/css/themes/grantcodes.css +1 -0
- package/dist/fonts/greycliff-bold-oblique.woff +0 -0
- package/dist/fonts/greycliff-bold-oblique.woff2 +0 -0
- package/dist/fonts/greycliff-bold.woff +0 -0
- package/dist/fonts/greycliff-bold.woff2 +0 -0
- package/dist/fonts/greycliff-demi-bold-oblique.woff +0 -0
- package/dist/fonts/greycliff-demi-bold-oblique.woff2 +0 -0
- package/dist/fonts/greycliff-demi-bold.woff +0 -0
- package/dist/fonts/greycliff-demi-bold.woff2 +0 -0
- package/dist/fonts/greycliff-extra-bold-oblique.woff +0 -0
- package/dist/fonts/greycliff-extra-bold-oblique.woff2 +0 -0
- package/dist/fonts/greycliff-extra-bold.woff +0 -0
- package/dist/fonts/greycliff-extra-bold.woff2 +0 -0
- package/dist/fonts/greycliff-extra-light-oblique.woff +0 -0
- package/dist/fonts/greycliff-extra-light-oblique.woff2 +0 -0
- package/dist/fonts/greycliff-extra-light.woff +0 -0
- package/dist/fonts/greycliff-extra-light.woff2 +0 -0
- package/dist/fonts/greycliff-heavy-oblique.woff +0 -0
- package/dist/fonts/greycliff-heavy-oblique.woff2 +0 -0
- package/dist/fonts/greycliff-heavy.woff +0 -0
- package/dist/fonts/greycliff-heavy.woff2 +0 -0
- package/dist/fonts/greycliff-light-oblique.woff +0 -0
- package/dist/fonts/greycliff-light-oblique.woff2 +0 -0
- package/dist/fonts/greycliff-light.woff +0 -0
- package/dist/fonts/greycliff-light.woff2 +0 -0
- package/dist/fonts/greycliff-medium-oblique.woff +0 -0
- package/dist/fonts/greycliff-medium-oblique.woff2 +0 -0
- package/dist/fonts/greycliff-medium.woff +0 -0
- package/dist/fonts/greycliff-medium.woff2 +0 -0
- package/dist/fonts/greycliff-regular-oblique.woff +0 -0
- package/dist/fonts/greycliff-regular-oblique.woff2 +0 -0
- package/dist/fonts/greycliff-regular.woff +0 -0
- package/dist/fonts/greycliff-regular.woff2 +0 -0
- package/dist/fonts/greycliff-thin-oblique.woff +0 -0
- package/dist/fonts/greycliff-thin-oblique.woff2 +0 -0
- package/dist/fonts/greycliff-thin.woff +0 -0
- package/dist/fonts/greycliff-thin.woff2 +0 -0
- package/dist/icons.js +1 -0
- package/dist/lib/generate-id.js +1 -0
- package/dist/main.js +1 -88328
- package/dist/react.js +1 -0
- package/package.json +83 -87
- package/dist/Provider/Provider.d.ts +0 -11
- package/dist/Provider/Themes/ThemeDefault.d.ts +0 -9
- package/dist/Provider/Themes/ThemeTodomap.d.ts +0 -8
- package/dist/Provider/Themes/index.d.ts +0 -5
- package/dist/Provider/index.d.ts +0 -1
- package/dist/components/Button/Button.d.ts +0 -3
- package/dist/components/Button/Button.types.d.ts +0 -8
- package/dist/components/Button/index.d.ts +0 -2
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +0 -8
- package/dist/components/ButtonGroup/index.d.ts +0 -1
- package/dist/components/Card/Card.d.ts +0 -3
- package/dist/components/Card/Card.types.d.ts +0 -8
- package/dist/components/Card/CardActions.d.ts +0 -3
- package/dist/components/Card/CardContent.d.ts +0 -3
- package/dist/components/Card/CardMeta.d.ts +0 -7
- package/dist/components/Card/CardMetaItem.d.ts +0 -7
- package/dist/components/Card/index.d.ts +0 -3
- package/dist/components/CodePreview/CodePreview.d.ts +0 -3
- package/dist/components/CodePreview/CodePreview.types.d.ts +0 -6
- package/dist/components/CodePreview/index.d.ts +0 -1
- package/dist/components/Container/Container.d.ts +0 -3
- package/dist/components/Container/Container.types.d.ts +0 -8
- package/dist/components/Container/index.d.ts +0 -1
- package/dist/components/Dialog/Dialog.d.ts +0 -10
- package/dist/components/Dialog/Dialog.types.d.ts +0 -8
- package/dist/components/Dialog/DialogActions.d.ts +0 -3
- package/dist/components/Dialog/index.d.ts +0 -2
- package/dist/components/Dropzone/Dropzone.d.ts +0 -3
- package/dist/components/Dropzone/Dropzone.types.d.ts +0 -9
- package/dist/components/Dropzone/index.d.ts +0 -1
- package/dist/components/Gallery/Gallery.d.ts +0 -4
- package/dist/components/Gallery/Gallery.types.d.ts +0 -29
- package/dist/components/Gallery/GalleryThumbnail.d.ts +0 -3
- package/dist/components/Gallery/index.d.ts +0 -1
- package/dist/components/Gallery/lib/normalize-image.d.ts +0 -3
- package/dist/components/Icon/Icon.d.ts +0 -9
- package/dist/components/Icon/index.d.ts +0 -1
- package/dist/components/Input/Checkbox.d.ts +0 -3
- package/dist/components/Input/Input.d.ts +0 -3
- package/dist/components/Input/Input.types.d.ts +0 -16
- package/dist/components/Input/Radio.d.ts +0 -3
- package/dist/components/Input/Select.d.ts +0 -3
- package/dist/components/Input/TextArea.d.ts +0 -3
- package/dist/components/Input/index.d.ts +0 -5
- package/dist/components/Label/Label.d.ts +0 -6
- package/dist/components/Label/index.d.ts +0 -1
- package/dist/components/Link/Link.d.ts +0 -6
- package/dist/components/Link/index.d.ts +0 -1
- package/dist/components/Loading/Loading.d.ts +0 -3
- package/dist/components/Loading/Loading.types.d.ts +0 -3
- package/dist/components/Loading/index.d.ts +0 -1
- package/dist/components/Notice/Notice.d.ts +0 -11
- package/dist/components/Notice/index.d.ts +0 -1
- package/dist/components/Pagination/Pagination.d.ts +0 -3
- package/dist/components/Pagination/Pagination.types.d.ts +0 -6
- package/dist/components/Pagination/index.d.ts +0 -1
- package/dist/components/Tabs/Tab.d.ts +0 -3
- package/dist/components/Tabs/Tabs.d.ts +0 -3
- package/dist/components/Tabs/Tabs.types.d.ts +0 -9
- package/dist/components/Tabs/index.d.ts +0 -2
- package/dist/lib/addClassNameToPrimitiveHOC.d.ts +0 -3
- package/dist/main.cjs +0 -88377
- package/dist/main.cjs.map +0 -1
- package/dist/main.d.ts +0 -17
- package/dist/main.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.2.0](https://github.com/grantcodes/ui/compare/v1.1.0...v1.2.0) (2023-06-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **tooltip:** add initial Tooltip component ([4991c56](https://github.com/grantcodes/ui/commit/4991c5631da7fd993c33f767252836730d5aae01))
|
|
9
|
+
|
|
10
|
+
## [1.1.0](https://github.com/grantcodes/ui/compare/v1.0.0...v1.1.0) (2023-01-24)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **avatar:** add initial Avatar component ([0f0f6eb](https://github.com/grantcodes/ui/commit/0f0f6eb7d956aa3fa479baeb641bbd60e98904f2))
|
|
16
|
+
* **container:** update Container full variation and add viewport variation ([74a02e1](https://github.com/grantcodes/ui/commit/74a02e1f67b95a02dbe3efba9d97282749009f6f))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **avatar:** export the Avatar component from the main exports ([2f4119b](https://github.com/grantcodes/ui/commit/2f4119b9216fe344712f3a9bf4abda9eb1245fb4))
|
|
22
|
+
|
|
3
23
|
## 1.0.0 (2022-10-22)
|
|
4
24
|
|
|
5
25
|
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{LitElement as m,html as o,unsafeCSS as h}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{property as l,customElement as u}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/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
|
+
>${this.getInitials()}</span
|
|
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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesAvatar as a}from"./avatar.component.js";const r=a;export{a as GrantCodesAvatar,r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as a from"/home/grantcodes/projects/@grantcodes/ui/node_modules/react/index.js";import{createComponent as t}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/@lit/react/index.js";import{GrantCodesAvatar as r}from"./avatar.component.js";const m=t({tagName:"grantcodes-avatar",elementClass:r,react:a});export{m as Avatar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e="*,*:before,*:after{box-sizing:border-box}:host{display:block}.avatar{display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:50%;overflow:hidden;background-color:var(--color-base-primary-200);color:var(--color-base-primary-900);text-align:center;font-size:1.2rem;font-weight:700}.avatar__image{width:100%;height:100%;object-fit:cover;object-position:center}.avatar__fallback{line-height:1}";export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./avatar.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{LitElement as a,unsafeCSS as u}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{literal as f,html as h}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/static-html.js";import{property as i,customElement as c}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/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
|
+
<${r} href="${this.href}" class="button">
|
|
3
|
+
<span><slot></slot></span>
|
|
4
|
+
</${r}>
|
|
5
|
+
`}};s.styles=[u(b)];m([i()],s.prototype,"href",2);s=m([c("grantcodes-button")],s);export{s as GrantCodesButton};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesButton as t}from"./button.component.js";const n=t;export{t as GrantCodesButton,n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as t from"/home/grantcodes/projects/@grantcodes/ui/node_modules/react/index.js";import{createComponent as o}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/@lit/react/index.js";import{GrantCodesButton as e}from"./button.component.js";const m=o({tagName:"grantcodes-button",elementClass:e,react:t});export{m as Button};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o="*,*:before,*:after{box-sizing:border-box}:host{display:block}.button{display:inline-flex;flex-direction:row;align-items:center;gap:.5rem;background:var(--component-button-base-background);color:var(--component-button-base-color);border-width:var(--component-button-base-border-width);border-style:solid;border-color:var(--component-button-base-border-color);padding:.5em 1em;border-radius:var(--component-button-base-border-radius);font-size:1rem;font-weight:700;letter-spacing:.05em;text-decoration:none;outline:1px solid transparent;transition:color .2s,border-color .2s,background-color .2s,outline .2s;outline-color:transparent;outline-offset:var(--component-focus-ring-offset, 0px);outline-style:solid;outline-width:var(--component-focus-ring-width, 2px)}.button:focus-visible{outline-color:var(--component-focus-ring-color)}@media (prefers-contrast: more){.button:focus-visible{--component-focus-ring-color: var(--color-base-primary-200);box-shadow:0 0 0 calc((var(--component-focus-ring-width) + var(--component-focus-ring-offset, 0px)) * 1.5) var(--color-base-primary-800)}}.button:hover,.button:focus-visible{color:var(--component-button-active-color);background:var(--component-button-active-background);cursor:pointer;text-decoration:none}.button:active{transform:translateY(1px)}.button[disabled]{cursor:not-allowed;filter:grayscale(70%);opacity:.8}";export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./button.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{LitElement as u,html as m,unsafeCSS as f}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{customElement as v}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/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
|
+
<div class="button-group">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
`}};l.styles=[f(a)];l=_([v("grantcodes-button-group")],l);export{l as GrantCodesButtonGroup};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesButtonGroup as o}from"./button-group.component.js";const r=o;export{o as GrantCodesButtonGroup,r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as t from"/home/grantcodes/projects/@grantcodes/ui/node_modules/react/index.js";import{createComponent as o}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/@lit/react/index.js";import{GrantCodesButtonGroup as r}from"./button-group.component.js";const m=o({tagName:"grantcodes-button-group",elementClass:r,react:t});export{m as ButtonGroup};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o="*,*:before,*:after{box-sizing:border-box}:host{display:block}.button-group{display:flex;flex-direction:row;flex-wrap:wrap;background:var(--component-button-base-background);border-radius:var(--component-button-base-border-radius);min-width:fit-content;max-width:100%}";export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./button-group.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{LitElement as n,html as d,unsafeCSS as m}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{customElement as _}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/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
|
+
<div class="card">
|
|
3
|
+
<slot name="card-header" class="card__header"></slot>
|
|
4
|
+
<slot name="card-content" class="card__content"></slot>
|
|
5
|
+
<slot name="card-actions" class="card__actions"></slot>
|
|
6
|
+
<slot name="card-footer" class="card__footer"></slot>
|
|
7
|
+
</div>
|
|
8
|
+
`}};c.styles=[m(f)];c=v([_("grantcodes-card")],c);export{c as GrantCodesCard};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesCard as a}from"./card.component.js";const d=a;export{a as GrantCodesCard,d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as r from"/home/grantcodes/projects/@grantcodes/ui/node_modules/react/index.js";import{createComponent as t}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/@lit/react/index.js";import{GrantCodesCard as a}from"./card.component.js";const m=t({tagName:"grantcodes-card",elementClass:a,react:r});export{m as Card};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const r='*,*:before,*:after{box-sizing:border-box}:host{display:block}.card{display:flex;width:100%;flex-direction:column;justify-content:flex-start;overflow:hidden;background:var(--component-card-background);border-style:solid;border-width:var(--component-card-border-width);border-color:var(--component-card-border-color);border-radius:var(--component-card-border-radius)}.card>img{display:block;width:100%}.card__content{display:flex;flex-direction:column;justify-content:flex-start;gap:var(--size-space-unit, 1rem);padding:var(--size-space-unit, 1rem)}.card__content>*{margin:0}.card__content>*:first-child{margin-block-start:0}.card__content>*:last-child{margin-block-end:0}.card .card__actions{display:flex;width:100%;margin-block-start:auto;border-radius:0;flex-direction:row;flex-wrap:wrap;background:var(--component-button-base-background)}.card__meta{display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;gap:var(--size-space-unit);margin:0;padding-inline:var(--size-space-unit, 1rem);padding-block:1em;font-size:var(--font-size-small);background-color:var(--color-base-light-shade);color:var(--color-base-dark-shade)}.card__meta__item{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;gap:.3em}.card__meta__item dt,.card__meta__item dd{display:block;margin:0;padding:0}.card__meta__item dt:after{content:":"}';export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./card.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{LitElement as l,html as m,unsafeCSS as d}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{property as h,query as c,customElement as g}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/decorators.js";import{codeToHtml as v}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/shiki/dist/bundle-web.mjs";import u from"./code-preview.scss.js";var f=Object.defineProperty,w=Object.getOwnPropertyDescriptor,s=(o,t,n,i)=>{for(var e=i>1?void 0:i?w(t,n):t,p=o.length-1,a;p>=0;p--)(a=o[p])&&(e=(i?a(t,n,e):a(e))||e);return i&&e&&f(t,n,e),e};let r=class extends l{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"></div> `}};r.styles=[d(u)];s([h({type:String})],r.prototype,"language",2);s([h({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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesCodePreview as e}from"./code-preview.component.js";const r=e;export{e as GrantCodesCodePreview,r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"/home/grantcodes/projects/@grantcodes/ui/node_modules/react/index.js";import{createComponent as o}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/@lit/react/index.js";import{GrantCodesCodePreview as r}from"./code-preview.component.js";const m=o({tagName:"grantcodes-code-preview",elementClass:r,react:e});export{m as CodePreview};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e="*,*:before,*:after{box-sizing:border-box}:host{display:block}.code-preview>pre{display:block;font-family:var(--font-family-monospace);line-height:1.2;width:100%;overflow:auto;border-radius:var(--component-card-border-radius);box-shadow:.1rem .2rem .4rem #0000001a;font-size:var(--font-size-small);font-weight:400;padding:var(--size-space-unit, 1rem)}";export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./code-preview.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{LitElement as c,html as f,unsafeCSS as m}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{property as p,customElement as d}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/decorators.js";import u from"/home/grantcodes/projects/@grantcodes/ui/node_modules/classnames/index.js";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
|
+
<div class="${r}">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
`}};e.styles=[m(v)];l([p()],e.prototype,"align",2);l([p({type:Boolean})],e.prototype,"nopad",2);e=l([d("grantcodes-container")],e);export{e as GrantCodesContainer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesContainer as n}from"./container.component.js";const o=n;export{n as GrantCodesContainer,o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as t from"/home/grantcodes/projects/@grantcodes/ui/node_modules/react/index.js";import{createComponent as e}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/@lit/react/index.js";import{GrantCodesContainer as o}from"./container.component.js";const n=e({tagName:"grantcodes-container",elementClass:o,react:t});export{n as Container};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const i="*,*:before,*:after{box-sizing:border-box}:host{display:block}.container{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;width:var(--size-block-width-normal);max-width:100%;padding-inline:var(--size-space-unit);margin-inline:auto;background-color:inherit}.container--wide{width:var(--size-block-width-wide)}.container--full{width:100%}.container--viewport{left:50%;position:relative;right:50%;margin-left:-50vw;margin-right:-50vw;max-width:100vw;width:100vw;margin-left:-50dvw;margin-right:-50dvw;max-width:100dvw;width:100dvw}.container--nopad{padding-inline:0}";export{i as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./container.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import{LitElement as m,html as p,unsafeCSS as h}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{query as f,property as d,customElement as g}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/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
|
+
<button
|
|
3
|
+
class="dialog__dismiss"
|
|
4
|
+
@click=${()=>{this.open=!1}}
|
|
5
|
+
aria-label="Dismiss dialog"
|
|
6
|
+
>
|
|
7
|
+
×
|
|
8
|
+
</button>
|
|
9
|
+
`:p``}render(){return p`
|
|
10
|
+
<dialog class="dialog" ?open=${this.open}>
|
|
11
|
+
${this.dismissTemplate()}
|
|
12
|
+
|
|
13
|
+
<header class="dialog__header">
|
|
14
|
+
<slot name="header"></slot>
|
|
15
|
+
</header>
|
|
16
|
+
|
|
17
|
+
<slot class="dialog__content"></slot>
|
|
18
|
+
|
|
19
|
+
<footer class="dialog__footer">
|
|
20
|
+
<slot name="footer"> </slot>
|
|
21
|
+
</footer>
|
|
22
|
+
</dialog>
|
|
23
|
+
`}};s.styles=[h(c)];i([f("dialog")],s.prototype,"dialog",2);i([d({type:Boolean,reflect:!0})],s.prototype,"open",2);i([d({type:Boolean})],s.prototype,"dismissible",2);s=i([g("grantcodes-dialog")],s);export{s as GrantCodesDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesDialog as a}from"./dialog.component.js";const s=a;export{a as GrantCodesDialog,s as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as o from"/home/grantcodes/projects/@grantcodes/ui/node_modules/react/index.js";import{createComponent as t}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/@lit/react/index.js";import{GrantCodesDialog as a}from"./dialog.component.js";const m=t({tagName:"grantcodes-dialog",elementClass:a,react:o});export{m as Dialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e="*,*:before,*:after{box-sizing:border-box}:host{display:block}.dialog{width:100%;padding:0;max-width:var(--size-block-width-normal);background:var(--component-card-background);border-style:solid;border-width:var(--component-card-border-width);border-color:var(--component-card-border-color);border-radius:var(--component-card-border-radius);overflow:hidden}.dialog::backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#0006;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.dialog__dismiss{display:block;position:absolute;border:none;line-height:1;font-size:1.4rem;cursor:pointer;background:transparent;inset-block-start:var(--size-space-unit, 1rem);inset-inline-end:var(--size-space-unit, 1rem);margin-block-start:-.25rem;margin-inline-end:-.25rem;border-radius:50%;width:2rem;height:2rem;padding:.25rem;justify-content:center;align-items:center}.dialog__content{display:flex;flex-direction:column;justify-content:flex-start;gap:var(--size-space-unit, 1rem);padding:var(--size-space-unit, 1rem)}.dialog__header:empty,.dialog__header:has(slot:empty),.dialog__footer:empty,.dialog__footer:has(slot:empty){display:none}.dialog__header{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:var(--size-space-unit, 1rem);border-bottom:var(--component-card-border-width) solid var(--component-card-border-color)}.dialog__footer ::slotted(grantcodes-button-group){--component-button-base-border-radius: 0}";export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./dialog.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{LitElement as d,html as p,unsafeCSS as u}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{property as f,queryAssignedElements as h,state as i,customElement as _}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/decorators.js";import m from"/home/grantcodes/projects/@grantcodes/ui/node_modules/classnames/index.js";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
|
+
<div
|
|
3
|
+
class=${t}
|
|
4
|
+
@mouseLeave=${this._disableFullscreen}
|
|
5
|
+
@dragEnd=${this._disableFullscreen}
|
|
6
|
+
@dragLeave=${this._disableFullscreen}
|
|
7
|
+
>
|
|
8
|
+
<slot></slot>
|
|
9
|
+
<span class="dropzone__placeholder">${this._placeholder}</span>
|
|
10
|
+
</div>
|
|
11
|
+
`}};r.styles=[u(v)];s([f({type:Boolean,reflect:!0})],r.prototype,"fullscreenOnDrag",2);s([h({selector:"input[type=file]"})],r.prototype,"_input",2);s([i()],r.prototype,"_fullscreen",2);s([i()],r.prototype,"_placeholder",2);r=s([_("grantcodes-dropzone")],r);export{r as GrantCodesDropzone};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesDropzone as o}from"./dropzone.component.js";const e=o;export{o as GrantCodesDropzone,e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as o from"/home/grantcodes/projects/@grantcodes/ui/node_modules/react/index.js";import{createComponent as e}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/@lit/react/index.js";import{GrantCodesDropzone as r}from"./dropzone.component.js";const m=e({tagName:"grantcodes-dropzone",elementClass:r,react:o});export{m as Dropzone};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e='*,*:before,*:after{box-sizing:border-box}:host{display:block}.dropzone{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem;border:max(var(--size-border-width),.2rem) dashed var(--color-base-primary-500);border-radius:var(--size-border-radius)}.dropzone--fullscreen:before{content:"";position:fixed;display:block;top:0;right:0;bottom:0;left:0;z-index:10;background-color:#ffffffe6}.dropzone--fullscreen:after{content:"";display:flex;position:fixed;top:2rem;right:2rem;bottom:2rem;left:2rem;justify-content:center;align-items:center;padding:2rem;border:max(var(--size-border-width) * 2,.4rem) dashed var(--color-base-primary-500);border-radius:calc(var(--size-border-radius) * 2);z-index:11;font-weight:700;color:inherit}::slotted(input),.dropzone__input{position:absolute;display:block;width:100%;height:100%;top:0;right:0;bottom:0;left:0;opacity:0;cursor:pointer}.dropzone--fullscreen ::slotted(input),.dropzone--fullscreen .dropzone__input{position:fixed;z-index:12}';export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./dropzone.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{LitElement as f,html as o,unsafeCSS as u}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{property as a,queryAssignedElements as d,customElement as c}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/decorators.js";import m from"./form-field.scss.js";import b from"/home/grantcodes/projects/@grantcodes/ui/node_modules/classnames/index.js";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
|
+
<p class="form-field__error" id=${this.errorId}>Error: ${this.error}</p>
|
|
3
|
+
`:""}helpTemplate(){return this.help?o`
|
|
4
|
+
<span class="form-field__help" id=${this.helpId}>${this.help}</span>
|
|
5
|
+
`:""}groupTemplate({className:e}){return o`
|
|
6
|
+
<fieldset class="${e}">
|
|
7
|
+
<legend class="form-field__label">${this.label}</legend>
|
|
8
|
+
<slot></slot>
|
|
9
|
+
${this.errorTemplate()}
|
|
10
|
+
</fieldset>
|
|
11
|
+
`}render(){const e=b("form-field",{"form-field--inline":this.inlineInput});return this.groupInput?this.groupTemplate({className:e}):o`
|
|
12
|
+
<div class="${e}">
|
|
13
|
+
<label>
|
|
14
|
+
<span class="form-field__label" @click=${this.handleLabelClick}
|
|
15
|
+
>${this.label}</span
|
|
16
|
+
>
|
|
17
|
+
${this.helpTemplate()}
|
|
18
|
+
<slot></slot>
|
|
19
|
+
</label>
|
|
20
|
+
${this.errorTemplate()}
|
|
21
|
+
</div>
|
|
22
|
+
`}};t.formAssociated=!0;t.styles=[u(m)];i([a({type:String})],t.prototype,"label",2);i([a({type:String})],t.prototype,"error",2);i([a({type:String})],t.prototype,"help",2);i([d({selector:"input, select, textarea"})],t.prototype,"inputElements",2);i([d({selector:"grantcodes-form-field"})],t.prototype,"nestedFields",2);t=i([c("grantcodes-form-field")],t);export{t as GrantCodesFormField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesFormField as o}from"./form-field.component.js";const e=o;export{o as GrantCodesFormField,e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"/home/grantcodes/projects/@grantcodes/ui/node_modules/react/index.js";import{createComponent as o}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/@lit/react/index.js";import{GrantCodesFormField as r}from"./form-field.component.js";const a=o({tagName:"grantcodes-form-field",elementClass:r,react:e});export{a as FormField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e="*,*:before,*:after{box-sizing:border-box}:host{display:block}.form-field{display:flex;flex-direction:column;gap:.25rem;padding:0;margin:0;border:none}.form-field label,.form-field slot{display:flex;flex-direction:column;gap:inherit}.form-field--inline label{flex-direction:row-reverse;align-items:center;justify-content:flex-end}.form-field__label{margin:0;padding:0}.form-field__label:where(legend){margin-bottom:.25rem}.form-field__help{font-size:var(--font-size-small);opacity:.7}.form-field__error{margin:0;font-size:var(--font-size-small);color:var(--color-base-error-700)}";export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./form-field.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{LitElement as g,html as h,unsafeCSS as c}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{property as i,customElement as m}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/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
|
+
<figcaption class="gallery__image__caption">${this.caption}</figcaption>
|
|
3
|
+
`}render(){return h`
|
|
4
|
+
<figure class="gallery__image">
|
|
5
|
+
<img
|
|
6
|
+
width=${this.width}
|
|
7
|
+
height=${this.height}
|
|
8
|
+
src=${this.src}
|
|
9
|
+
alt=${this.alt}
|
|
10
|
+
loading="lazy"
|
|
11
|
+
/>
|
|
12
|
+
${this.captionTemplate()}
|
|
13
|
+
</figure>
|
|
14
|
+
`}};t.styles=[c(y)];r([i({type:Number})],t.prototype,"width",2);r([i({type:Number})],t.prototype,"height",2);r([i({type:String})],t.prototype,"src",2);r([i({type:String})],t.prototype,"alt",2);r([i({type:String})],t.prototype,"caption",2);r([i({type:String})],t.prototype,"thumbnail",2);t=r([m("grantcodes-gallery-image")],t);export{t as GrantCodesGalleryImage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesGalleryImage as a}from"./gallery-image.component.js";const r=a;export{a as GrantCodesGalleryImage,r as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{LitElement as p,html as g,unsafeCSS as y}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{queryAssignedElements as c,customElement as f}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/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
|
+
<div class="gallery">
|
|
3
|
+
<slot class="gallery__slot"></slot>
|
|
4
|
+
</div>
|
|
5
|
+
`}};s.styles=[y(i)];n([c({selector:"grantcodes-gallery-image"})],s.prototype,"images",2);s=n([f("grantcodes-gallery")],s);export{s as GrantCodesGallery};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesGallery as a}from"./gallery.component.js";const e=a;export{a as GrantCodesGallery,e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"/home/grantcodes/projects/@grantcodes/ui/node_modules/react/index.js";import{createComponent as r}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/@lit/react/index.js";import{GrantCodesGallery as t}from"./gallery.component.js";const m=r({tagName:"grantcodes-gallery",elementClass:t,react:e});export{m as Gallery};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const l="*,*:before,*:after{box-sizing:border-box}:host{display:block}.gallery{display:block}.gallery__slot{display:grid;grid-template-columns:repeat(var(--gallery-columns, 3),1fr);width:100%;flex-direction:row;flex-wrap:wrap;gap:var(--gallery-gap, 0)}.gallery__slot>*{display:block;width:100%}.gallery--has-lightbox>*{cursor:pointer}.gallery__image{position:relative;width:100%;display:block;flex-direction:column;margin:0}.gallery__image img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover;object-position:center}.gallery__image__caption{position:absolute;top:0;right:0;bottom:0;left:0;inset-block-start:auto;background-color:#0006;padding-inline:.5em;padding-block:.3em;line-height:1.2;color:#fff}";export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./gallery.js";import"./gallery-image.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{LitElement as l,html as m,unsafeCSS as a}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{property as f,customElement as u}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/decorators.js";import v from"./icon.scss.js";var _=Object.defineProperty,d=Object.getOwnPropertyDescriptor,i=(t,r,s,n)=>{for(var e=n>1?void 0:n?d(r,s):r,c=t.length-1,p;c>=0;c--)(p=t[c])&&(e=(n?p(r,s,e):p(e))||e);return n&&e&&_(r,s,e),e};let o=class extends l{constructor(){super(...arguments),this.icon=""}render(){const t=document.createElement("div");t.innerHTML=this.icon;const r=t.children[0];return m`<span class="icon">${r}</span>`}};o.styles=[a(v)];i([f({type:String})],o.prototype,"icon",2);o=i([u("grantcodes-icon")],o);export{o as GrantCodesIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesIcon as o}from"./icon.component.js";const a=o;export{o as GrantCodesIcon,a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as o from"/home/grantcodes/projects/@grantcodes/ui/node_modules/react/index.js";import{createComponent as t}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/@lit/react/index.js";import{GrantCodesIcon as e}from"./icon.component.js";const m=t({tagName:"grantcodes-icon",elementClass:e,react:o});export{m as Icon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o="*,*:before,*:after{box-sizing:border-box}:host{display:block}.icon{display:inline-block;color:inherit;width:1em;height:1em}.icon svg{display:block;width:100%;height:100%;object-fit:contain;object-position:center}.icon svg:not([fill]){fill:currentColor}.icon svg:not([stoke]){stroke:currentColor}";export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./icon.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./loading.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{LitElement as p,html as m,unsafeCSS as f}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{customElement as i}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/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
|
+
<span class="loading">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</span>
|
|
5
|
+
`}};n.styles=[f(c)];n=_([i("grantcodes-loading")],n);export{n as GrantCodesLoading};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesLoading as a}from"./loading.component.js";const d=a;export{a as GrantCodesLoading,d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as o from"/home/grantcodes/projects/@grantcodes/ui/node_modules/react/index.js";import{createComponent as t}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/@lit/react/index.js";import{GrantCodesLoading as a}from"./loading.component.js";const m=t({tagName:"grantcodes-loading",elementClass:a,react:o});export{m as Loading};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const i="*,*:before,*:after{box-sizing:border-box}:host{display:block}:host{--height: .5rem;--inner-width: 40%;--starting-position: calc(0% - (var(--inner-width) * 2));--ending-position: calc(100% + (var(--inner-width) * 2))}.loading{display:block;height:var(--height);border-radius:calc(var(--height) / 2);overflow:hidden;padding-top:var(--height);background-repeat:no-repeat;background-color:var(--color-base-primary-500);background-image:linear-gradient(to right,transparent 0%,var(--color-base-secondary-500) 10%,var(--color-base-secondary-500) 90%,transparent 100%);background-size:var(--inner-width) 100%;background-position-x:var(--starting-position);animation:loading 2s linear infinite;font-size:0}@keyframes loading{0%{background-position-x:var(--starting-position)}to{background-position-x:var(--ending-position)}}";export{i as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./notice.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{LitElement as m,html as a,unsafeCSS as _}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{property as p,customElement as f}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/decorators.js";import d from"/home/grantcodes/projects/@grantcodes/ui/node_modules/classnames/index.js";import h from"./notice.scss.js";import{GrantCodesIcon as u}from"../icon/icon.component.js";import"../../icons.js";import{Info as v,CheckCircle2 as C,AlertCircle as g,XCircle as $,X as y}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lucide-static/dist/esm/lucide-static.js";var O=Object.defineProperty,b=Object.getOwnPropertyDescriptor,s=(e,i,r,n)=>{for(var t=n>1?void 0:n?b(i,r):i,c=e.length-1,l;c>=0;c--)(l=e[c])&&(t=(n?l(i,r,t):l(t))||t);return n&&t&&O(i,r,t),t};const D={info:v,success:C,warning:g,error:$};let o=class extends m{constructor(){super(...arguments),this.variant="info",this.title=""}render(){const e=D[this.variant];return a`
|
|
2
|
+
<aside class="${d("notice",`notice--${this.variant}`)}">
|
|
3
|
+
<!-- <Icon icon="{iconEl}" class="notice__icon" /> -->
|
|
4
|
+
<grantcodes-icon icon="${e}" class="notice__icon"></grantcodes-icon>
|
|
5
|
+
|
|
6
|
+
<div class="notice__content">
|
|
7
|
+
${this.title&&a` <h2 class="notice__title">${this.title}</h2> `}
|
|
8
|
+
<p><slot></slot></p>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
${this.onDismiss!=null&&a`
|
|
12
|
+
<button class="notice__close">
|
|
13
|
+
<grantcodes-icon icon="${y}" title="Close Notice"></grantcodes-icon>
|
|
14
|
+
</button>
|
|
15
|
+
`}
|
|
16
|
+
</aside>
|
|
17
|
+
`}};o.dependencies={"grancodes-icon":u};o.styles=[_(h)];s([p()],o.prototype,"variant",2);s([p()],o.prototype,"title",2);s([p()],o.prototype,"onDismiss",2);o=s([f("grantcodes-notice")],o);export{o as GrantCodesNotice};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesNotice as o}from"./notice.component.js";const e=o;export{o as GrantCodesNotice,e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as t from"/home/grantcodes/projects/@grantcodes/ui/node_modules/react/index.js";import{createComponent as e}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/@lit/react/index.js";import{GrantCodesNotice as o}from"./notice.component.js";const m=e({tagName:"grantcodes-notice",elementClass:o,react:t});export{m as Notice};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o="*,*:before,*:after{box-sizing:border-box}:host{display:block}.notice{display:flex;flex-direction:row;align-items:flex-start;gap:1rem;padding:1rem;border-radius:.25rem}.notice--info{color:var(--color-base-info-900);background-color:var(--color-base-info-100)}.notice--success{color:var(--color-base-success-900);background-color:var(--color-base-success-100)}.notice--warning{color:var(--color-base-warning-900);background-color:var(--color-base-warning-100)}.notice--error{color:var(--color-base-error-900);background-color:var(--color-base-error-100)}.notice__title{font-size:1rem;margin:0}.notice__icon{font-size:calc(var(--font-line-height-body) * 1em)}.notice__content{flex-grow:1}.notice__close{background:none;color:inherit;opacity:.5;transition:.2s;font-size:calc(var(--font-line-height-body) * 1em);line-height:1;padding:.5rem;margin:-.5rem -.5rem 0 0;border:0}.notice__close:hover,.notice__close:focus-visible{background:none;color:inherit;opacity:1}.notice p{margin:0}";export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./pagination.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{LitElement as l,html as s,unsafeCSS as v}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{property as f,customElement as m}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/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
|
+
<grantcodes-button class="pagination__next" href=${this.nextHref}
|
|
3
|
+
>Next</grantcodes-button
|
|
4
|
+
>
|
|
5
|
+
`:""}previousTemplate(){return this.previousHref?s`
|
|
6
|
+
<grantcodes-button class="pagination__previous" href=${this.previousHref}
|
|
7
|
+
>Previous</grantcodes-button
|
|
8
|
+
>
|
|
9
|
+
`:""}render(){return s`
|
|
10
|
+
<nav class="pagination" aria-label="Pagination navigation">
|
|
11
|
+
${this.previousTemplate()} ${this.nextTemplate()}
|
|
12
|
+
</nav>
|
|
13
|
+
`}};t.styles=[v(c)];t.dependencies={"grantcodes-button":g};p([f({attribute:"previous-href"})],t.prototype,"previousHref",2);p([f({attribute:"next-href"})],t.prototype,"nextHref",2);t=p([m("grantcodes-pagination")],t);export{t as GrantCodesPagination};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesPagination as a}from"./pagination.component.js";const o=a;export{a as GrantCodesPagination,o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as t from"/home/grantcodes/projects/@grantcodes/ui/node_modules/react/index.js";import{createComponent as a}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/@lit/react/index.js";import{GrantCodesPagination as o}from"./pagination.component.js";const r=a({tagName:"grantcodes-pagination",elementClass:o,react:t});export{r as Pagination};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const i="*,*:before,*:after{box-sizing:border-box}:host{display:block}.pagination{display:flex;flex-direction:row;align-items:center}.pagination__next{margin-inline-start:auto}.pagination__previous{margin-inline-end:auto}";export{i as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./tabs.js";import"./tab.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesTabsItem as a}from"./tabs-item.component.js";import{html as f}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{customElement as l}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/decorators.js";var v=Object.defineProperty,_=Object.getOwnPropertyDescriptor,b=(n,e,o,t)=>{for(var r=t>1?void 0:t?_(e,o):e,s=n.length-1,m;s>=0;s--)(m=n[s])&&(r=(t?m(e,o,r):m(r))||r);return t&&r&&v(e,o,r),r};let p=class extends a{render(){return f``}};p=b([l("grantcodes-tab")],p);export{p as GrantCodesTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesTab as a}from"./tab.component.js";const s=a;export{a as GrantCodesTab,s as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{LitElement as y,html as c}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{property as e}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/decorators.js";var d=Object.defineProperty,g=Object.getOwnPropertyDescriptor,r=(i,o,a,p)=>{for(var t=p>1?void 0:p?g(o,a):o,s=i.length-1,l;s>=0;s--)(l=i[s])&&(t=(p?l(o,a,t):l(t))||t);return p&&t&&d(o,a,t),t};class n extends y{constructor(){super(...arguments),this.active=!1,this.label="",this.index=-1,this.containerId=""}get tabId(){return`${this.containerId}-tab-${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,"tabId",1);r([e({type:String})],n.prototype,"panelId",1);r([e({type:String})],n.prototype,"content",1);export{n as GrantCodesTabsItem};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{GrantCodesTabsItem as i}from"./tabs-item.component.js";import{html as p,unsafeCSS as m}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{customElement as b}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/decorators.js";import f from"./tabs.scss.js";var v=Object.defineProperty,d=Object.getOwnPropertyDescriptor,c=(n,t,r,s)=>{for(var e=s>1?void 0:s?d(t,r):t,a=n.length-1,l;a>=0;a--)(l=n[a])&&(e=(s?l(t,r,e):l(e))||e);return s&&e&&v(t,r,e),e};let o=class extends i{render(){return p`
|
|
2
|
+
<div
|
|
3
|
+
id="${this.panelId}"
|
|
4
|
+
role="tabpanel"
|
|
5
|
+
aria-labelledby="${this.tabId}"
|
|
6
|
+
class="tabs__panel ${this.active?"is-active":""}"
|
|
7
|
+
>
|
|
8
|
+
<slot></slot>
|
|
9
|
+
</div>
|
|
10
|
+
`}};o.styles=[m(f)];o=c([b("grantcodes-tabs-panel")],o);export{o as GrantCodesTabsPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesTabsPanel as a}from"./tabs-panel.component.js";const e=a;export{a as GrantCodesTabsPanel,e as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{GrantCodesTabsItem as l}from"./tabs-item.component.js";import{html as b,LitElement as p,unsafeCSS as m}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{customElement as c}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/decorators.js";import d from"./tabs.scss.js";var f=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h=(i,e,o,s)=>{for(var t=s>1?void 0:s?u(e,o):e,r=i.length-1,n;r>=0;r--)(n=i[r])&&(t=(s?n(e,o,t):n(t))||t);return s&&t&&f(e,o,t),t};let a=class extends l{render(){return b`
|
|
2
|
+
<button
|
|
3
|
+
id="${this.tabId}"
|
|
4
|
+
type="button"
|
|
5
|
+
role="tab"
|
|
6
|
+
?aria-selected=${this.active}
|
|
7
|
+
aria-controls="${this.panelId}"
|
|
8
|
+
class="tabs__tab ${this.active?"is-active":""}"
|
|
9
|
+
>
|
|
10
|
+
<span>${this.label}</span>
|
|
11
|
+
</button>
|
|
12
|
+
`}};a.shadowRootOptions={...p.shadowRootOptions,delegatesFocus:!0};a.styles=[m(d)];a=h([c("grantcodes-tabs-tab")],a);export{a as GrantCodesTabsTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesTabsTab as a}from"./tabs-tab.component.js";const b=a;export{a as GrantCodesTabsTab,b as default};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{LitElement as d,html as b,unsafeCSS as c}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{property as p,queryAssignedElements as h,queryAll as v,state as f,customElement as u}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/decorators.js";import m from"./tabs.scss.js";import"./tabs-tab.js";import"./tabs-panel.js";import{generateId as T}from"../../lib/generate-id.js";var y=Object.defineProperty,$=Object.getOwnPropertyDescriptor,n=(t,e,s,a)=>{for(var i=a>1?void 0:a?$(e,s):e,o=t.length-1,l;o>=0;o--)(l=t[o])&&(i=(a?l(e,s,i):l(i))||i);return a&&i&&y(e,s,i),i};let r=class extends d{constructor(){super(),this.label="",this.focusedTabIndex=-1,this.id=T("tabs")}get activeTab(){return this.tabs.find(t=>t.active)??null}set activeTab(t){this.tabs.map((e,s)=>{e===t?(e.active=!0,this.focusedTabIndex=s):e.active=!1}),this.requestUpdate()}firstUpdated(){this.requestUpdate(),this.activeTab==null&&(this.activeTab=this.tabs[0])}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,a=this.tabsListTabs[s];a&&(a.focus(),this.focusedTabIndex=s)}}render(){return b`
|
|
2
|
+
<div class="tabs" id="${this.id}">
|
|
3
|
+
<div role="tablist" class="tabs__tablist" aria-label=${this.label}>
|
|
4
|
+
<div class="tabs__tablist__inner">
|
|
5
|
+
${this.tabs.map((t,e)=>b`<grantcodes-tabs-tab
|
|
6
|
+
index=${e+1}
|
|
7
|
+
label="${t.label}"
|
|
8
|
+
containerId="${this.id}"
|
|
9
|
+
?active=${t.active}
|
|
10
|
+
@click=${()=>{this.activeTab=t}}
|
|
11
|
+
@keydown=${this.handleTabKeyDown}
|
|
12
|
+
></grantcodes-tabs-tab>`)}
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div class="tabs__panels">
|
|
17
|
+
${this.tabs.map((t,e)=>b`<grantcodes-tabs-panel
|
|
18
|
+
index=${e}
|
|
19
|
+
label="${t.label}"
|
|
20
|
+
containerId="${this.id}"
|
|
21
|
+
?active=${t.active}
|
|
22
|
+
>${t.content}</grantcodes-tabs-panel
|
|
23
|
+
>`)}
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<slot></slot>
|
|
27
|
+
</div>
|
|
28
|
+
`}};r.styles=[c(m)];n([p({type:String})],r.prototype,"label",2);n([h({selector:"grantcodes-tab"})],r.prototype,"tabs",2);n([v("grantcodes-tabs-tab")],r.prototype,"tabsListTabs",2);n([f()],r.prototype,"focusedTabIndex",2);r=n([u("grantcodes-tabs")],r);export{r as GrantCodesTabs};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesTabs as a}from"./tabs.component.js";const o=a;export{a as GrantCodesTabs,o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as t from"/home/grantcodes/projects/@grantcodes/ui/node_modules/react/index.js";import{createComponent as a}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/@lit/react/index.js";import{GrantCodesTabs as e}from"./tabs.component.js";const m=a({tagName:"grantcodes-tabs",elementClass:e,react:t});export{m as Tabs};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o="*,*:before,*:after{box-sizing:border-box}:host{display:block}.tabs{display:block}.tabs__tablist{overflow:auto;contain:none}.tabs__tablist::-webkit-scrollbar{width:.5rem;height:.5rem}.tabs__tablist::-webkit-scrollbar-track{background-color:#0000000d;border-radius:.25rem}.tabs__tablist::-webkit-scrollbar-thumb{border-radius:.25rem;min-height:2rem;background-color:#0000004d}.tabs__tablist__inner{position:relative;display:flex;flex-direction:row;flex-wrap:nowrap;width:fit-content;min-width:100%;background-image:linear-gradient(var(--color-base-primary-100),var(--color-base-primary-100));background-size:auto 3px;background-position:bottom;background-repeat:repeat-x}.tabs__tab{padding:.6em 1.2em;line-height:1;font-size:1rem;border:none;border-block-start:3px solid transparent;border-block-end:3px solid var(--color-base-primary-100);opacity:.7;white-space:nowrap;cursor:pointer;transition:opacity .2s,border-color .2s;--component-focus-ring-offset: calc(var(--component-focus-ring-width) * -1);outline-color:transparent;outline-offset:var(--component-focus-ring-offset, 0px);outline-style:solid;outline-width:var(--component-focus-ring-width, 2px)}.tabs__tab:focus-visible{outline-color:var(--component-focus-ring-color)}@media (prefers-contrast: more){.tabs__tab:focus-visible{--component-focus-ring-color: var(--color-base-primary-200);box-shadow:0 0 0 calc((var(--component-focus-ring-width) + var(--component-focus-ring-offset, 0px)) * 1.5) var(--color-base-primary-800)}}@media (min-width: 40em){.tabs__tab{padding-inline:var(--size-space-unit, 1rem)}}.tabs__tab:hover,.tabs__tab:focus-visible{opacity:1;border-block-end-color:var(--color-base-primary-200)}.tabs__tab.is-active,.tabs__tab[aria-selected=true]{border-block-end-color:var(--color-base-primary-500);z-index:1;position:relative;opacity:1}.tabs__panel{margin-block-start:var(--size-space-unit, 1rem);outline-color:var(--color-base-primary-500);outline-offset:var(--size-space-unit, 1rem);display:none}.tabs__panel.is-active{display:block}";export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./tooltip.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{LitElement as a,html as c,unsafeCSS as h}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{property as d,queryAssignedElements as b,customElement as f}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/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
|
+
<div class="tooltip">
|
|
3
|
+
<div class="tooltip__slot">
|
|
4
|
+
<slot></slot>
|
|
5
|
+
</div>
|
|
6
|
+
<p id="${this.id}" class="tooltip__content" role="tooltip">
|
|
7
|
+
${this.label||this.description}
|
|
8
|
+
</p>
|
|
9
|
+
</div>
|
|
10
|
+
`}};o.styles=[h(m)];r([d({type:String})],o.prototype,"label",2);r([d({type:String})],o.prototype,"description",2);r([b({selector:"*"})],o.prototype,"slotted",2);o=r([f("grantcodes-tooltip")],o);export{o as GrantCodesTooltip};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GrantCodesTooltip as o}from"./tooltip.component.js";const a=o;export{o as GrantCodesTooltip,a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as o from"/home/grantcodes/projects/@grantcodes/ui/node_modules/react/index.js";import{createComponent as t}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/@lit/react/index.js";import{GrantCodesTooltip as e}from"./tooltip.component.js";const m=t({tagName:"grantcodes-tooltip",elementClass:e,react:o});export{m as Tooltip};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t="*,*:before,*:after{box-sizing:border-box}:host{display:block}:host,.tooltip,.tooltip__slot{width:fit-content}.tooltip{position:relative}.tooltip__slot{padding:.5rem;margin:-.5rem}.tooltip__content{display:none;position:absolute;width:fit-content;margin:0;max-width:100%;min-width:6rem;top:100%;left:50%;transform:translate(-50%);z-index:100;border-radius:var(--size-border-radius);padding:.6em 1em;font-size:var(--font-size-small);line-height:1;color:var(--color-base-primary-900);background-color:var(--color-base-primary-100);box-shadow:.2rem .4rem .8rem #0003;-webkit-user-select:none;user-select:none;text-align:center;opacity:0;transition:opacity .2s;transition-behavior:allow-discrete}.tooltip__slot:hover+.tooltip__content,.tooltip__slot:focus+.tooltip__content,.tooltip__slot:focus-within+.tooltip__content{display:block;opacity:1}";export{t as default};
|