@trintel/zooy 1.14.1 → 1.15.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/README.md +6 -6
- package/dist/chunks/register-B0h_UWOz.js +1 -0
- package/dist/chunks/register-CSR-CzsT.js +1679 -0
- package/dist/zooy.cjs.js +1 -1
- package/dist/zooy.es.js +1 -1
- package/package.json +11 -3
- package/src/sass/carbon.scss +20 -0
- package/dist/chunks/register-B53HY61t.js +0 -1508
- package/dist/chunks/register-Cvf7s1Ds.js +0 -1
package/dist/zooy.cjs.js
CHANGED
|
@@ -79,4 +79,4 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
|
|
|
79
79
|
}
|
|
80
80
|
`;constructor(){super(),this.timestamp=Date.now(),this.kind="both",this.concat="r (s)",this._boundTickHandler=this._onTimeTick.bind(this),this._isListening=!1}_shouldListenToTicks(){return this.kind==="relative"||this.kind==="both"||this.kind==="stack"}connectedCallback(){super.connectedCallback(),this._updateTickListener()}disconnectedCallback(){this._removeTickListener(),super.disconnectedCallback()}updated(e){super.updated(e),e.has("kind")&&this._updateTickListener()}_updateTickListener(){const e=this._shouldListenToTicks();e&&!this._isListening?(document.addEventListener("zoo-tick-60",this._boundTickHandler),this._isListening=!0):!e&&this._isListening&&this._removeTickListener()}_removeTickListener(){this._isListening&&(document.removeEventListener("zoo-tick-60",this._boundTickHandler),this._isListening=!1)}_onTimeTick(){this.requestUpdate()}_parseTemplate(e){const t=[];let s=e;for(;s.length>0;){const i=s.indexOf("r"),r=s.indexOf("s"),n=[i,r,s.indexOf("d")].filter(c=>c!==-1).sort((c,g)=>c-g)[0];if(n===void 0){s.length>0&&t.push({type:"text",value:s});break}n>0&&t.push({type:"text",value:s.substring(0,n)}),n===i?t.push({type:"relative",value:""}):n===r?t.push({type:"static",value:""}):t.push({type:"dateOnly",value:""}),s=s.substring(n+1)}return t}_parseStackOrder(e){const t=e.indexOf("r"),s=e.indexOf("s"),i=e.indexOf("d");let r=-1,n=null;return s!==-1&&(i===-1||s<i)?(r=s,n="static"):i!==-1&&(r=i,n="dateOnly"),t!==-1&&r!==-1?t<r?["relative",n]:[n,"relative"]:t!==-1?["relative"]:r!==-1?[n]:["relative","static"]}_getFormattedParts(){let e=this.timestamp;e<9466848e5&&(e=e*1e3);const t=new Date(e),s=je(t),i=He(t),r=We(t);switch(this.kind){case"relative":return[{type:"relative",value:s}];case"datetime":return[{type:"static",value:i}];case"date":return[{type:"static",value:r}];case"both":return this._parseTemplate(this.concat).map(n=>n.type==="relative"?{type:"relative",value:s}:n.type==="static"?{type:"static",value:i}:n.type==="dateOnly"?{type:"static",value:r}:n);case"stack":return this._parseStackOrder(this.concat).map(n=>n==="relative"?{type:"relative",value:s}:n==="dateOnly"?{type:"static",value:r}:{type:"static",value:i});default:return this._parseTemplate(this.concat).map(n=>n.type==="relative"?{type:"relative",value:s}:n.type==="static"?{type:"static",value:i}:n.type==="dateOnly"?{type:"static",value:r}:n)}}render(){let e=this.timestamp;e<9466848e5&&(e=e*1e3);const t=new Date(e),s=this._getFormattedParts();return L.html`<time datetime="${t.toISOString()}">
|
|
81
81
|
${s.map(i=>i.type==="relative"?L.html`<span class="relative">${i.value}</span>`:i.type==="static"?L.html`<span class="static">${i.value}</span>`:L.html`<span class="separator">${i.value}</span>`)}
|
|
82
|
-
</time>`}};customElements.get("zoo-timestamp")||customElements.define("zoo-timestamp",_e);var ye=T.__exportAll({ZooTag:()=>Ee,ZooTimestamp:()=>_e,getEventAttribute:()=>A.getEventAttribute,getSemanticAttributes:()=>A.getSemanticAttributes});async function be(e={}){const{registerCarbonLibrary:t}=await Promise.resolve().then(()=>require("./chunks/register-
|
|
82
|
+
</time>`}};customElements.get("zoo-timestamp")||customElements.define("zoo-timestamp",_e);var ye=T.__exportAll({ZooTag:()=>Ee,ZooTimestamp:()=>_e,getEventAttribute:()=>A.getEventAttribute,getSemanticAttributes:()=>A.getSemanticAttributes});async function be(e={}){const{registerCarbonLibrary:t}=await Promise.resolve().then(()=>require("./chunks/register-B0h_UWOz.js"));return t(e)}async function Se(){const{registerMdcLibrary:e}=await Promise.resolve().then(()=>require("./chunks/register-Kldh2rNG.js"));return e()}var Je={Evt:w,Component:I,Dragger:V,Panel:F,FormPanel:ue,Split:pe,UserManager:N,View:J,Conductor:ve,DataBinder:A.Binder,UiEventType:u,domUtils:p.utils_exports,uriUtils:ie,registerCarbonLibrary:be,registerMdcLibrary:Se,ComponentLibraryRegistry:T.ComponentLibraryRegistry,handlers:fe,zoo:ye};exports.Binder=A.Binder;exports.Component=I;exports.ComponentLibraryRegistry=T.ComponentLibraryRegistry;exports.Conductor=ve;exports.Dragger=V;exports.Evt=w;exports.FormPanel=ue;exports.Panel=F;exports.Split=pe;exports.UiEventType=u;exports.UserManager=N;exports.View=J;exports.default=Je;Object.defineProperty(exports,"domUtils",{enumerable:!0,get:function(){return p.utils_exports}});Object.defineProperty(exports,"handlers",{enumerable:!0,get:function(){return fe}});exports.registerCarbonLibrary=be;exports.registerMdcLibrary=Se;Object.defineProperty(exports,"uriUtils",{enumerable:!0,get:function(){return ie}});Object.defineProperty(exports,"zoo",{enumerable:!0,get:function(){return ye}});
|
package/dist/zooy.es.js
CHANGED
|
@@ -1543,7 +1543,7 @@ var ft = /* @__PURE__ */ J({
|
|
|
1543
1543
|
getSemanticAttributes: () => Ve
|
|
1544
1544
|
});
|
|
1545
1545
|
async function gt(e = {}) {
|
|
1546
|
-
const { registerCarbonLibrary: t } = await import("./chunks/register-
|
|
1546
|
+
const { registerCarbonLibrary: t } = await import("./chunks/register-CSR-CzsT.js");
|
|
1547
1547
|
return t(e);
|
|
1548
1548
|
}
|
|
1549
1549
|
async function vt() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trintel/zooy",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "UI Building Blocks",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -40,22 +40,30 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@eslint/js": "latest",
|
|
43
|
+
"@vitest/browser-playwright": "4.1.11",
|
|
43
44
|
"esbuild": "latest",
|
|
44
45
|
"esm": "latest",
|
|
46
|
+
"playwright": "1.62.1",
|
|
45
47
|
"sass": "latest",
|
|
46
48
|
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.0",
|
|
47
|
-
"vite-plus": "0.3.0"
|
|
49
|
+
"vite-plus": "0.3.0",
|
|
50
|
+
"node": "runtime:^24.0.0"
|
|
48
51
|
},
|
|
49
52
|
"devEngines": {
|
|
50
53
|
"packageManager": {
|
|
51
54
|
"name": "pnpm",
|
|
52
55
|
"version": "11.24.0",
|
|
53
56
|
"onFail": "download"
|
|
57
|
+
},
|
|
58
|
+
"runtime": {
|
|
59
|
+
"name": "node",
|
|
60
|
+
"version": "^24.0.0",
|
|
61
|
+
"onFail": "download"
|
|
54
62
|
}
|
|
55
63
|
},
|
|
56
64
|
"scripts": {
|
|
57
65
|
"clean": "rm -rf dist",
|
|
58
|
-
"build": "
|
|
66
|
+
"build": "vp run clean && vp build",
|
|
59
67
|
"lint": "vp lint src/**/*.js",
|
|
60
68
|
"lint:fix": "vp lint src/**/*.js --fix",
|
|
61
69
|
"dev": "vp dev"
|
package/src/sass/carbon.scss
CHANGED
|
@@ -116,6 +116,15 @@ cds-popover {
|
|
|
116
116
|
// Long modal content still scrolls correctly because the inner
|
|
117
117
|
// <cds-modal-body> has its own `overflow-y: auto` on a different
|
|
118
118
|
// element (`.cds--modal-content`).
|
|
119
|
+
// A <cds-modal> that is part of a panel's markup (rather than a fetched,
|
|
120
|
+
// panel-root modal) sits in the DOM before Carbon's module is imported. Until
|
|
121
|
+
// the element is defined the browser would render its light-DOM children
|
|
122
|
+
// inline — the "modal shows on page load" flash. Hide it until it upgrades;
|
|
123
|
+
// Carbon takes over visibility from there.
|
|
124
|
+
cds-modal:not(:defined) {
|
|
125
|
+
display: none;
|
|
126
|
+
}
|
|
127
|
+
|
|
119
128
|
cds-modal[open][allow_overflow]::part(dialog) {
|
|
120
129
|
overflow: visible;
|
|
121
130
|
}
|
|
@@ -125,3 +134,14 @@ cds-modal[open][allow_overflow] {
|
|
|
125
134
|
overflow: visible;
|
|
126
135
|
}
|
|
127
136
|
}
|
|
137
|
+
|
|
138
|
+
// Carbon gives <cds-definition-tooltip> no host `display`, yet its shadow
|
|
139
|
+
// <cds-popover> is `display: flex` — a block-level box inside an inline host,
|
|
140
|
+
// so every term forces line breaks before and after itself in running text
|
|
141
|
+
// ("The / MNO / supplies the / ICCID …"). Reproduced with Carbon's CSS alone,
|
|
142
|
+
// so it is a Carbon oversight. A document rule on the host is safe here:
|
|
143
|
+
// Carbon sets no `:host` display for this element (unlike cds-modal, whose
|
|
144
|
+
// host-level visibility must be left alone).
|
|
145
|
+
cds-definition-tooltip {
|
|
146
|
+
display: inline-flex;
|
|
147
|
+
}
|