@getufy/flint-ui 0.1.1 → 0.2.0
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/dist/__benchmarks__/component-render.bench.d.ts +11 -0
- package/dist/__benchmarks__/component-render.bench.d.ts.map +1 -0
- package/dist/_shared/{flint-command-DGhby0QI.js → flint-command-COftXb8j.js} +39 -39
- package/dist/command/flint-command.d.ts.map +1 -1
- package/dist/command/flint-command.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +9 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import '../button/flint-button.js';
|
|
2
|
+
import '../input/flint-input.js';
|
|
3
|
+
import '../select/flint-select.js';
|
|
4
|
+
import '../checkbox/flint-checkbox.js';
|
|
5
|
+
import '../tabs/flint-tabs.js';
|
|
6
|
+
import '../accordion/flint-accordion.js';
|
|
7
|
+
import '../badge/flint-badge.js';
|
|
8
|
+
import '../chip/flint-chip.js';
|
|
9
|
+
import '../avatar/flint-avatar.js';
|
|
10
|
+
import '../tooltip/flint-tooltip.js';
|
|
11
|
+
//# sourceMappingURL=component-render.bench.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-render.bench.d.ts","sourceRoot":"","sources":["../../src/__benchmarks__/component-render.bench.ts"],"names":[],"mappings":"AAKA,OAAO,2BAA2B,CAAC;AACnC,OAAO,yBAAyB,CAAC;AACjC,OAAO,2BAA2B,CAAC;AACnC,OAAO,+BAA+B,CAAC;AACvC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,iCAAiC,CAAC;AACzC,OAAO,yBAAyB,CAAC;AACjC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,2BAA2B,CAAC;AACnC,OAAO,6BAA6B,CAAC"}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { t as e } from "./decorate-DPS9PT8d.js";
|
|
2
|
-
import { LitElement as t, html as n,
|
|
3
|
-
import { customElement as
|
|
4
|
-
import { classMap as
|
|
2
|
+
import { LitElement as t, html as n, unsafeCSS as r } from "lit";
|
|
3
|
+
import { customElement as i, property as a, state as o } from "lit/decorators.js";
|
|
4
|
+
import { classMap as s } from "lit/directives/class-map.js";
|
|
5
5
|
//#region src/command/flint-command-shortcut.css?inline
|
|
6
|
-
var
|
|
6
|
+
var c = ":host{letter-spacing:.05em;color:var(--flint-text-color-muted);font-size:.6875rem;font-family:var(--flint-font-family);align-items:center;margin-left:auto;padding-left:8px;display:inline-flex}", l = ":host{background:var(--flint-border-color);height:1px;margin:4px 0;display:block}:host([hidden]){display:none!important}", u = ":host{display:block}:host([hidden]){display:none!important}.item{cursor:pointer;color:var(--flint-text-color);font-size:.875rem;line-height:1.25rem;font-family:var(--flint-font-family);-webkit-user-select:none;user-select:none;border-radius:4px;outline:none;align-items:center;gap:8px;padding:6px 8px;transition:background .1s;display:flex}:host([highlighted]) .item{background:var(--flint-command-highlight-bg,var(--flint-hover-color));color:var(--flint-command-highlight-color,var(--flint-text-color))}.item:hover{background:var(--flint-hover-color)}:host([highlighted]) .item:hover{background:var(--flint-command-highlight-bg,var(--flint-hover-color))}:host([disabled]) .item{opacity:.38;cursor:not-allowed;pointer-events:none}.icon{width:16px;height:16px;color:var(--flint-text-color-muted);flex-shrink:0;justify-content:center;align-items:center;display:flex}.label{flex:1}[hidden]{display:none!important}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}", d = ":host{text-align:center;color:var(--flint-text-color-muted);font-size:.875rem;font-family:var(--flint-font-family);padding:24px 8px;display:block}:host([hidden]){display:none!important}", f = ":host{font-family:var(--flint-font-family);display:block}:host([hidden]){display:none!important}.heading{letter-spacing:.04em;text-transform:uppercase;color:var(--flint-text-color-muted);padding:6px 8px 2px;font-size:.6875rem;font-weight:600}.heading:empty{display:none}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}", p = ":host{max-height:var(--flint-command-list-max-height,300px);display:block;overflow-y:auto}.list{outline:none;padding:4px}.list:focus-visible{outline:2px solid var(--flint-primary-color);outline-offset:-2px}", m = ":host{font-family:var(--flint-font-family);display:block}.input-wrap{border-bottom:1px solid var(--flint-border-color);align-items:center;gap:8px;padding:10px 12px;display:flex}.search-icon{color:var(--flint-text-color-muted);flex-shrink:0;align-items:center;display:flex}input{color:var(--flint-text-color);background:0 0;border:none;outline:none;flex:1;min-width:0;font-family:inherit;font-size:.9375rem}input::placeholder{color:var(--flint-text-color-muted)}input[type=search]::-webkit-search-cancel-button{display:none}input[type=search]::-webkit-search-decoration{display:none}", h = ":host{font-family:var(--flint-font-family);background:var(--flint-command-bg,var(--flint-surface-1));border-radius:var(--flint-border-radius-md);border:1px solid var(--flint-command-border-color,var(--flint-border-color));display:block;overflow:hidden}.command{flex-direction:column;display:flex}", g = ":host{display:block}.backdrop{background:var(--flint-command-backdrop-bg,#00000080);z-index:var(--flint-command-z-index,1400);opacity:0;visibility:hidden;pointer-events:none;justify-content:center;align-items:flex-start;padding-top:12vh;transition:opacity .18s,visibility .18s;display:flex;position:fixed;inset:0}.backdrop.open{opacity:1;visibility:visible;pointer-events:auto}.panel{width:100%;max-width:var(--flint-command-dialog-width,512px);background:var(--flint-command-bg,var(--flint-surface-1));border-radius:var(--flint-border-radius-md);border:1px solid var(--flint-command-panel-border-color,var(--flint-border-color));transition:transform .18s cubic-bezier(.4,0,.2,1);overflow:hidden;transform:scale(.94)translateY(-8px);box-shadow:0 20px 25px -5px #00000026,0 10px 10px -5px #0000000f}.backdrop.open .panel{transform:scale(1)translateY(0)}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}", _ = class extends t {
|
|
7
7
|
static {
|
|
8
|
-
this.styles =
|
|
8
|
+
this.styles = r(c);
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
11
|
return n`<slot></slot>`;
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
var
|
|
14
|
+
_ = e([i("flint-command-shortcut")], _);
|
|
15
|
+
var v = class extends t {
|
|
16
16
|
static {
|
|
17
|
-
this.styles =
|
|
17
|
+
this.styles = r(l);
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
20
|
return n``;
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
|
|
24
|
-
var
|
|
23
|
+
v = e([i("flint-command-separator")], v);
|
|
24
|
+
var y = class extends t {
|
|
25
25
|
constructor(...e) {
|
|
26
26
|
super(...e), this.value = "", this.disabled = !1, this.highlighted = !1, this._hasIcon = !1;
|
|
27
27
|
}
|
|
28
28
|
static {
|
|
29
|
-
this.styles =
|
|
29
|
+
this.styles = r(u);
|
|
30
30
|
}
|
|
31
31
|
_onIconSlotChange(e) {
|
|
32
32
|
this._hasIcon = e.target.assignedNodes({ flatten: !0 }).length > 0;
|
|
@@ -60,31 +60,31 @@ var b = class extends t {
|
|
|
60
60
|
`;
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
|
-
e([
|
|
63
|
+
e([a({
|
|
64
64
|
type: String,
|
|
65
65
|
reflect: !0
|
|
66
|
-
})],
|
|
66
|
+
})], y.prototype, "value", void 0), e([a({
|
|
67
67
|
type: Boolean,
|
|
68
68
|
reflect: !0
|
|
69
|
-
})],
|
|
69
|
+
})], y.prototype, "disabled", void 0), e([a({
|
|
70
70
|
type: Boolean,
|
|
71
71
|
reflect: !0
|
|
72
|
-
})],
|
|
73
|
-
var
|
|
72
|
+
})], y.prototype, "highlighted", void 0), e([o()], y.prototype, "_hasIcon", void 0), y = e([i("flint-command-item")], y);
|
|
73
|
+
var b = class extends t {
|
|
74
74
|
static {
|
|
75
|
-
this.styles =
|
|
75
|
+
this.styles = r(d);
|
|
76
76
|
}
|
|
77
77
|
render() {
|
|
78
78
|
return n`<slot></slot>`;
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
|
-
|
|
82
|
-
var
|
|
81
|
+
b = e([i("flint-command-empty")], b);
|
|
82
|
+
var x = class extends t {
|
|
83
83
|
constructor(...e) {
|
|
84
84
|
super(...e), this.heading = "";
|
|
85
85
|
}
|
|
86
86
|
static {
|
|
87
|
-
this.styles =
|
|
87
|
+
this.styles = r(f);
|
|
88
88
|
}
|
|
89
89
|
render() {
|
|
90
90
|
return n`
|
|
@@ -93,13 +93,13 @@ var S = class extends t {
|
|
|
93
93
|
`;
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
|
-
e([
|
|
96
|
+
e([a({
|
|
97
97
|
type: String,
|
|
98
98
|
reflect: !0
|
|
99
|
-
})],
|
|
100
|
-
var
|
|
99
|
+
})], x.prototype, "heading", void 0), x = e([i("flint-command-group")], x);
|
|
100
|
+
var S = class extends t {
|
|
101
101
|
static {
|
|
102
|
-
this.styles =
|
|
102
|
+
this.styles = r(p);
|
|
103
103
|
}
|
|
104
104
|
render() {
|
|
105
105
|
return n`
|
|
@@ -109,13 +109,13 @@ var C = class extends t {
|
|
|
109
109
|
`;
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
|
-
|
|
113
|
-
var
|
|
112
|
+
S = e([i("flint-command-list")], S);
|
|
113
|
+
var C = class extends t {
|
|
114
114
|
constructor(...e) {
|
|
115
115
|
super(...e), this.placeholder = "Type a command or search...", this.value = "";
|
|
116
116
|
}
|
|
117
117
|
static {
|
|
118
|
-
this.styles =
|
|
118
|
+
this.styles = r(m);
|
|
119
119
|
}
|
|
120
120
|
_handleInput(e) {
|
|
121
121
|
let t = e.target;
|
|
@@ -160,11 +160,11 @@ var w = class extends t {
|
|
|
160
160
|
`;
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
|
-
e([
|
|
163
|
+
e([a({ type: String })], C.prototype, "placeholder", void 0), e([a({
|
|
164
164
|
type: String,
|
|
165
165
|
reflect: !0
|
|
166
|
-
})],
|
|
167
|
-
var
|
|
166
|
+
})], C.prototype, "value", void 0), C = e([i("flint-command-input")], C);
|
|
167
|
+
var w = class extends t {
|
|
168
168
|
constructor(...e) {
|
|
169
169
|
super(...e), this._query = "", this._highlightedItem = null, this._handleFilter = (e) => {
|
|
170
170
|
this._applyFilter(e.detail.query);
|
|
@@ -197,7 +197,7 @@ var T = class extends t {
|
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
199
|
static {
|
|
200
|
-
this.styles =
|
|
200
|
+
this.styles = r(h);
|
|
201
201
|
}
|
|
202
202
|
connectedCallback() {
|
|
203
203
|
super.connectedCallback(), this.addEventListener("_cmd-filter", this._handleFilter), this.addEventListener("keydown", this._handleKeyDown), this.addEventListener("mouseover", this._handleMouseOver);
|
|
@@ -258,15 +258,15 @@ var T = class extends t {
|
|
|
258
258
|
`;
|
|
259
259
|
}
|
|
260
260
|
};
|
|
261
|
-
|
|
262
|
-
var
|
|
261
|
+
w = e([i("flint-command")], w);
|
|
262
|
+
var T = class extends t {
|
|
263
263
|
constructor(...e) {
|
|
264
264
|
super(...e), this.open = !1, this._boundKeyDown = (e) => {
|
|
265
265
|
this.open && e.key === "Escape" && (e.stopPropagation(), this._close());
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
268
|
static {
|
|
269
|
-
this.styles =
|
|
269
|
+
this.styles = r(g);
|
|
270
270
|
}
|
|
271
271
|
connectedCallback() {
|
|
272
272
|
super.connectedCallback(), window.addEventListener("keydown", this._boundKeyDown);
|
|
@@ -291,11 +291,11 @@ var E = class extends t {
|
|
|
291
291
|
render() {
|
|
292
292
|
return n`
|
|
293
293
|
<div
|
|
294
|
-
class=${
|
|
294
|
+
class=${s({
|
|
295
295
|
backdrop: !0,
|
|
296
296
|
open: this.open
|
|
297
297
|
})}
|
|
298
|
-
|
|
298
|
+
?inert=${!this.open}
|
|
299
299
|
@click=${this._handleBackdropClick}
|
|
300
300
|
>
|
|
301
301
|
<div
|
|
@@ -310,9 +310,9 @@ var E = class extends t {
|
|
|
310
310
|
`;
|
|
311
311
|
}
|
|
312
312
|
};
|
|
313
|
-
e([
|
|
313
|
+
e([a({
|
|
314
314
|
type: Boolean,
|
|
315
315
|
reflect: !0
|
|
316
|
-
})],
|
|
316
|
+
})], T.prototype, "open", void 0), T = e([i("flint-command-dialog")], T);
|
|
317
317
|
//#endregion
|
|
318
|
-
export {
|
|
318
|
+
export { C as a, v as c, x as i, _ as l, T as n, y as o, b as r, S as s, w as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flint-command.d.ts","sourceRoot":"","sources":["../../src/command/flint-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"flint-command.d.ts","sourceRoot":"","sources":["../../src/command/flint-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAiBvE;;;;;GAKG;AACH,qBACa,oBAAqB,SAAQ,UAAU;IAChD,MAAM,CAAC,MAAM,0BAAsC;IACnD,MAAM;CACT;AAMD,mDAAmD;AACnD,qBACa,qBAAsB,SAAQ,UAAU;IACjD,MAAM,CAAC,MAAM,0BAAuC;IACpD,MAAM;CACT;AAMD;;;;;;;;;;;;;GAaG;AACH,qBACa,gBAAiB,SAAQ,UAAU;IAC5C,MAAM,CAAC,MAAM,0BAAkC;IAE/C,kFAAkF;IACvC,KAAK,SAAM;IAEtD,uEAAuE;IAC3B,QAAQ,UAAS;IAE7D,gEAAgE;IACpB,WAAW,UAAS;IAEvD,OAAO,CAAC,QAAQ,CAAS;IAElC,OAAO,CAAC,iBAAiB;IAKzB,sEAAsE;IACtE,sBAAsB;IAMtB,OAAO,CAAC,YAAY;IASpB,MAAM;CAkBT;AAMD;;;;;GAKG;AACH,qBACa,iBAAkB,SAAQ,UAAU;IAC7C,MAAM,CAAC,MAAM,0BAAmC;IAChD,MAAM;CACT;AAMD;;;;;;GAMG;AACH,qBACa,iBAAkB,SAAQ,UAAU;IAC7C,MAAM,CAAC,MAAM,0BAAmC;IAEhD,4CAA4C;IACD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qB;QAC3B,eAAe,EAAE,YAAY,CAAC;QAC9B,qBAAqB,EAAE,iBAAiB,CAAC;QACzC,oBAAoB,EAAE,gBAAgB,CAAC;QACvC,qBAAqB,EAAE,iBAAiB,CAAC;QACzC,qBAAqB,EAAE,iBAAiB,CAAC;QACzC,oBAAoB,EAAE,gBAAgB,CAAC;QACvC,yBAAyB,EAAE,qBAAqB,CAAC;QACjD,wBAAwB,EAAE,oBAAoB,CAAC;QAC/C,sBAAsB,EAAE,kBAAkB,CAAC;KAC9C;CACJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "../_shared/flint-command-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "../_shared/flint-command-COftXb8j.js";
|
|
2
2
|
export { c as FlintCommand, i as FlintCommandDialog, o as FlintCommandEmpty, n as FlintCommandGroup, e as FlintCommandInput, a as FlintCommandItem, s as FlintCommandList, t as FlintCommandSeparator, r as FlintCommandShortcut };
|
package/dist/index.js
CHANGED
|
@@ -66,7 +66,7 @@ import { a as Ue, c as We, i as Ge, n as Ke, o as qe, r as Je, s as Ye, t as Xe
|
|
|
66
66
|
import { t as Ze } from "./_shared/flint-tree-item-iMT216uo.js";
|
|
67
67
|
import { t as Qe } from "./_shared/flint-simple-tree-view-DD3zHLzJ.js";
|
|
68
68
|
import { t as $e } from "./_shared/flint-rich-tree-view-D1Cmqb3L.js";
|
|
69
|
-
import { a as et, c as tt, i as nt, l as rt, n as it, o as at, r as ot, s as st, t as ct } from "./_shared/flint-command-
|
|
69
|
+
import { a as et, c as tt, i as nt, l as rt, n as it, o as at, r as ot, s as st, t as ct } from "./_shared/flint-command-COftXb8j.js";
|
|
70
70
|
import { a as lt, i as ut, n as dt, r as ft, t as pt } from "./_shared/flint-carousel-jwZ5C4e_.js";
|
|
71
71
|
import { a as mt, i as ht, n as gt, o as _t, r as vt, t as yt } from "./_shared/flint-empty-Bq8DuJQT.js";
|
|
72
72
|
import { n as bt, r as xt, t as St } from "./_shared/flint-collapsible-BJ4LwGpz.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getufy/flint-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
"url": "https://github.com/getufy/flint-ui.git",
|
|
11
11
|
"directory": "packages/core"
|
|
12
12
|
},
|
|
13
|
+
"author": "Getufy <https://github.com/getufy>",
|
|
14
|
+
"homepage": "https://getufy.github.io/flint-ui/",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/getufy/flint-ui/issues"
|
|
17
|
+
},
|
|
13
18
|
"engines": {
|
|
14
19
|
"node": ">=18.0.0"
|
|
15
20
|
},
|
|
@@ -414,6 +419,9 @@
|
|
|
414
419
|
"storybook": "storybook dev -p 6006",
|
|
415
420
|
"build-storybook": "storybook build",
|
|
416
421
|
"build-coverage": "NODE_OPTIONS='--no-warnings' vitest run --project components --coverage",
|
|
422
|
+
"stryker": "npx stryker run",
|
|
423
|
+
"bench": "vitest bench --config vitest.bench.config.ts",
|
|
424
|
+
"test:snapshots": "NODE_OPTIONS='--no-warnings' vitest run --project components src/__snapshots__/",
|
|
417
425
|
"prepublishOnly": "npm run lint && npm run build"
|
|
418
426
|
},
|
|
419
427
|
"keywords": [
|