@grantcodes/ui 2.0.0-beta.5 → 2.0.0-beta.7
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 +41 -0
- package/dist/components/code-preview/code-preview.component.js +3 -1
- package/dist/components/code-preview/code-preview.scss.js +1 -1
- package/dist/components/container/container.component.js +1 -1
- package/dist/components/dropzone/dropzone.component.js +1 -1
- package/dist/components/form-field/form-field.component.js +1 -1
- package/dist/components/icon/icon.component.js +1 -1
- package/dist/components/notice/notice.component.js +1 -1
- package/package.json +7 -5
- package/dist/_virtual/_commonjsHelpers.js +0 -1
- package/dist/_virtual/index.js +0 -1
- package/dist/node_modules/classnames/index.js +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.0-beta.7](https://github.com/grantcodes/ui/compare/v2.0.0-beta.6...v2.0.0-beta.7) (2024-11-05)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* release 2.0.0-beta.7 ([ca8831c](https://github.com/grantcodes/ui/commit/ca8831ce2543aaaa4784ca027c72a5e1e280e9ef))
|
|
9
|
+
|
|
10
|
+
## [2.0.0-beta.6](https://github.com/grantcodes/ui/compare/v2.0.1-beta.5...v2.0.0-beta.6) (2024-10-30)
|
|
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
|
+
* **dialog:** add initial Dialog component ([6d50f52](https://github.com/grantcodes/ui/commit/6d50f52031cd4ae23183dac2152be29579bc3de9))
|
|
18
|
+
* **form-field:** add initial form-field component ([1ea4589](https://github.com/grantcodes/ui/commit/1ea458963e5039d6cfda9ca054a9527ad4540304))
|
|
19
|
+
* **gallery:** add gallery component ([4f8d6e1](https://github.com/grantcodes/ui/commit/4f8d6e11d5ea5c4ec7a0288ce61b65bb77e9be1b))
|
|
20
|
+
* improve focus styles ([8137403](https://github.com/grantcodes/ui/commit/8137403fd19f36cd034c9909dbd8088782905c53))
|
|
21
|
+
* **tabs:** add Tabs component ([e8d8452](https://github.com/grantcodes/ui/commit/e8d8452d7c8ce223fdcc5ac28371bb52859955f3))
|
|
22
|
+
* **tooltip:** add initial Tooltip component ([4991c56](https://github.com/grantcodes/ui/commit/4991c5631da7fd993c33f767252836730d5aae01))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **avatar:** export the Avatar component from the main exports ([2f4119b](https://github.com/grantcodes/ui/commit/2f4119b9216fe344712f3a9bf4abda9eb1245fb4))
|
|
28
|
+
* **code-preview:** fix code preview SSR ([3d327f7](https://github.com/grantcodes/ui/commit/3d327f741430e2421ee1812b5170339a5f4af110))
|
|
29
|
+
* **codepreview:** fix syntax highlighting ([5010a1f](https://github.com/grantcodes/ui/commit/5010a1f31c789d028154b036f29c67f3539f38b2))
|
|
30
|
+
* **icon:** fix icon ssr ([c953502](https://github.com/grantcodes/ui/commit/c95350285a53bb7d5b6527bf640655c7125066a5))
|
|
31
|
+
* **input:** improve select styles ([3d17cc4](https://github.com/grantcodes/ui/commit/3d17cc45da034995ee5ca4b85148f0c0e0f2f080))
|
|
32
|
+
* **notice:** fix notice dismiss button ([254e20a](https://github.com/grantcodes/ui/commit/254e20ae232f33ebefbe2b69aaf6e16554fa1d91))
|
|
33
|
+
* **plop:** fix plopfile ([dfc0879](https://github.com/grantcodes/ui/commit/dfc087927397bbc8a49666631b19b075dcaf4b9a))
|
|
34
|
+
* **tabs:** add missing tabs/internal folder ([545a372](https://github.com/grantcodes/ui/commit/545a372a30bd3acae40ce2392064f3d2190702c4))
|
|
35
|
+
* **tabs:** simplify and improve tabs ([c4badfb](https://github.com/grantcodes/ui/commit/c4badfb69fae21c29774032d24e45bfa89796ce4))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Miscellaneous Chores
|
|
39
|
+
|
|
40
|
+
* release 2.0.0-beta.5 ([04f38a1](https://github.com/grantcodes/ui/commit/04f38a1a79840ee15a1bc44c3e55ada780f1c2c4))
|
|
41
|
+
* release 2.0.0-beta.6 ([de561ab](https://github.com/grantcodes/ui/commit/de561ab4fe2cddb2a656a9cf2fc37457f909c9b7))
|
|
42
|
+
* release 2.0.0-beta4 ([5087ac5](https://github.com/grantcodes/ui/commit/5087ac51b8bf4bc31ce9bd312fa32114d2b9f78e))
|
|
43
|
+
|
|
3
44
|
## [2.0.0-beta.5](https://github.com/grantcodes/ui/compare/v2.0.2-beta...v2.0.0-beta.5) (2024-10-29)
|
|
4
45
|
|
|
5
46
|
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
import{LitElement as
|
|
1
|
+
import{LitElement as h,html as m,unsafeCSS as d}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{property as a,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,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
|
+
<pre><slot></slot></pre>
|
|
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
|
-
const e="*,*:before,*:after{box-sizing:border-box}:host{display:block}.code-preview>pre{display:block;font-family:var(--font-family-
|
|
1
|
+
const e="*,*:before,*:after{box-sizing:border-box}:host{display:block}.code-preview>pre{display:block;font-family:var(--font-family-mono);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};
|
|
@@ -1,4 +1,4 @@
|
|
|
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"
|
|
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
2
|
<div class="${r}">
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
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"
|
|
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
2
|
<div
|
|
3
3
|
class=${t}
|
|
4
4
|
@mouseLeave=${this._disableFullscreen}
|
|
@@ -1,4 +1,4 @@
|
|
|
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"
|
|
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
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{LitElement as
|
|
1
|
+
import{LitElement as m,html as f,unsafeCSS as l}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{property as a,customElement as u}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/decorators.js";import{unsafeHTML as v}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/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,4 +1,4 @@
|
|
|
1
|
-
import{LitElement as p,html as r,unsafeCSS as d}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{property as m,customElement as f}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/decorators.js";import h from"
|
|
1
|
+
import{LitElement as p,html as r,unsafeCSS as d}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/index.js";import{property as m,customElement as f}from"/home/grantcodes/projects/@grantcodes/ui/node_modules/lit/decorators.js";import h from"/home/grantcodes/projects/@grantcodes/ui/node_modules/classnames/index.js";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"/home/grantcodes/projects/@grantcodes/ui/node_modules/lucide-static/dist/esm/lucide-static.js";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>
|
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.7",
|
|
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",
|
|
@@ -1 +0,0 @@
|
|
|
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};
|
package/dist/_virtual/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s={exports:{}};export{s as __module};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{getDefaultExportFromCjs as a}from"../../_virtual/_commonjsHelpers.js";import{__module as s}from"../../_virtual/index.js";/*!
|
|
2
|
-
Copyright (c) 2018 Jed Watson.
|
|
3
|
-
Licensed under the MIT License (MIT), see
|
|
4
|
-
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var l=s.exports;(function(o){(function(){"use strict";var i={}.hasOwnProperty;function r(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=f(t,u(n)))}return t}function u(t){if(typeof t=="string"||typeof t=="number")return t;if(typeof t!="object")return"";if(Array.isArray(t))return r.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var n in t)i.call(t,n)&&t[n]&&(e=f(e,n));return e}function f(t,e){return e?t?t+" "+e:t+e:t}o.exports?(r.default=r,o.exports=r):window.classNames=r})()})(s);var c=s.exports;const m=a(c);export{m as default};
|