@haiilo/catalyst 6.3.2 → 6.4.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/catalyst/catalyst.css +7 -0
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/index.esm.js.map +1 -1
- package/dist/catalyst/p-12fa3edc.js +3 -0
- package/dist/catalyst/p-12fa3edc.js.map +1 -0
- package/dist/catalyst/p-d3a118b5.entry.js +10 -0
- package/dist/catalyst/p-d3a118b5.entry.js.map +1 -0
- package/dist/catalyst/p-dd8ae83e.js.map +1 -1
- package/dist/catalyst/scss/_snippets/_form-label.scss +12 -4
- package/dist/catalyst/scss/fonts/_fonts-mixins.scss +4 -0
- package/dist/catalyst/scss/fonts/_fonts.mixins.ss3v.scss +13 -0
- package/dist/cjs/cat-alert_26.cjs.entry.js +276 -304
- package/dist/cjs/cat-alert_26.cjs.entry.js.map +1 -1
- package/dist/cjs/catalyst.cjs.js +2 -2
- package/dist/cjs/catalyst.cjs.js.map +1 -1
- package/dist/cjs/{index-8d1f4d8e.js → index-b4391019.js} +86 -10
- package/dist/cjs/index-b4391019.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/cat-button/cat-button.css +14 -2
- package/dist/collection/components/cat-button/cat-button.js +2 -2
- package/dist/collection/components/cat-button/cat-button.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.js +2 -11
- package/dist/collection/components/cat-datepicker/cat-datepicker.js.map +1 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.js +21 -21
- package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
- package/dist/collection/components/cat-input/cat-input.css +24 -8
- package/dist/collection/components/cat-input/cat-input.js +2 -2
- package/dist/collection/components/cat-input/cat-input.js.map +1 -1
- package/dist/collection/components/cat-select/cat-select.css +24 -8
- package/dist/collection/components/cat-select/cat-select.js +4 -7
- package/dist/collection/components/cat-select/cat-select.js.map +1 -1
- package/dist/collection/components/cat-select/cat-select.spec.js +1 -1
- package/dist/collection/components/cat-select/cat-select.spec.js.map +1 -1
- package/dist/collection/components/cat-select-demo/cat-select-demo.js +1 -1
- package/dist/collection/components/cat-select-demo/cat-select-demo.js.map +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.js +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.css +24 -8
- package/dist/collection/components/cat-textarea/cat-textarea.js +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
- package/dist/collection/components/cat-tooltip/cat-tooltip.js +1 -1
- package/dist/collection/scss/_snippets/_form-label.scss +12 -4
- package/dist/collection/scss/fonts/_fonts-mixins.scss +4 -0
- package/dist/collection/scss/fonts/_fonts.mixins.ss3v.scss +13 -0
- package/dist/collection/utils/find-closest.js +13 -0
- package/dist/collection/utils/find-closest.js.map +1 -0
- package/dist/components/cat-button2.js +1 -1
- package/dist/components/cat-button2.js.map +1 -1
- package/dist/components/cat-datepicker.js +14 -11
- package/dist/components/cat-datepicker.js.map +1 -1
- package/dist/components/cat-dropdown2.js +20 -20
- package/dist/components/cat-dropdown2.js.map +1 -1
- package/dist/components/cat-input2.js +3 -3
- package/dist/components/cat-input2.js.map +1 -1
- package/dist/components/cat-select-demo.js +1 -1
- package/dist/components/cat-select-demo.js.map +1 -1
- package/dist/components/cat-select2.js +4 -7
- package/dist/components/cat-select2.js.map +1 -1
- package/dist/components/cat-tabs.js +1 -1
- package/dist/components/cat-tabs.js.map +1 -1
- package/dist/components/cat-textarea.js +2 -2
- package/dist/components/cat-textarea.js.map +1 -1
- package/dist/components/floating-ui.dom.esm.js +237 -265
- package/dist/components/floating-ui.dom.esm.js.map +1 -1
- package/dist/esm/cat-alert_26.entry.js +276 -304
- package/dist/esm/cat-alert_26.entry.js.map +1 -1
- package/dist/esm/catalyst.js +3 -3
- package/dist/esm/catalyst.js.map +1 -1
- package/dist/esm/{index-16bd9531.js → index-2c703aa8.js} +86 -10
- package/dist/esm/index-2c703aa8.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/loader.js.map +1 -1
- package/dist/types/components/cat-button/cat-button.d.ts +1 -1
- package/dist/types/components/cat-datepicker/cat-datepicker.d.ts +0 -1
- package/dist/types/components/cat-dropdown/cat-dropdown.d.ts +1 -0
- package/dist/types/components.d.ts +2 -2
- package/dist/types/stencil-public-runtime.d.ts +6 -2
- package/dist/types/utils/find-closest.d.ts +5 -0
- package/loader/index.d.ts +1 -1
- package/package.json +11 -11
- package/dist/catalyst/p-2257ac13.entry.js +0 -10
- package/dist/catalyst/p-2257ac13.entry.js.map +0 -1
- package/dist/catalyst/p-897412f2.js +0 -3
- package/dist/catalyst/p-897412f2.js.map +0 -1
- package/dist/cjs/index-8d1f4d8e.js.map +0 -1
- package/dist/esm/index-16bd9531.js.map +0 -1
package/dist/esm/catalyst.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-2c703aa8.js';
|
|
2
|
+
export { s as setNonce } from './index-2c703aa8.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Patch Browser v4.0.
|
|
5
|
+
Stencil Client Patch Browser v4.0.3 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
const patchBrowser = () => {
|
|
8
8
|
const importMeta = import.meta.url;
|
package/dist/esm/catalyst.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"catalyst.js","mappings":";;;AAAA;AACA;AACA;AAGA,MAAM,YAAY,GAAG,MAAM;AAyB3B,IAAI,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AACvC,IAAI,MAAM,IAAI,GAAiE,EAAE,CAAC;AAClF,IAAI,IAAI,UAAU,KAAK,EAAE,EAAE;AAC3B,QAAQ,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;AAC1D,KAAK;AACL,IAAI,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;;AChCD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI;AAE/B,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC","names":[],"sources":["../node_modules/.pnpm/@stencil+core@4.0.
|
|
1
|
+
{"file":"catalyst.js","mappings":";;;AAAA;AACA;AACA;AAGA,MAAM,YAAY,GAAG,MAAM;AAyB3B,IAAI,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AACvC,IAAI,MAAM,IAAI,GAAiE,EAAE,CAAC;AAClF,IAAI,IAAI,UAAU,KAAK,EAAE,EAAE;AAC3B,QAAQ,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;AAC1D,KAAK;AACL,IAAI,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;;AChCD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI;AAE/B,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC","names":[],"sources":["../node_modules/.pnpm/@stencil+core@4.0.3/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.0.3 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n if (importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n return promiseResolve(opts);\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"version":3}
|
|
@@ -376,6 +376,21 @@ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
|
376
376
|
*
|
|
377
377
|
* Modified for Stencil's compiler and vdom
|
|
378
378
|
*/
|
|
379
|
+
/**
|
|
380
|
+
* When running a VDom render set properties present on a VDom node onto the
|
|
381
|
+
* corresponding HTML element.
|
|
382
|
+
*
|
|
383
|
+
* Note that this function has special functionality for the `class`,
|
|
384
|
+
* `style`, `key`, and `ref` attributes, as well as event handlers (like
|
|
385
|
+
* `onClick`, etc). All others are just passed through as-is.
|
|
386
|
+
*
|
|
387
|
+
* @param elm the HTMLElement onto which attributes should be set
|
|
388
|
+
* @param memberName the name of the attribute to set
|
|
389
|
+
* @param oldValue the old value for the attribute
|
|
390
|
+
* @param newValue the new value for the attribute
|
|
391
|
+
* @param isSvg whether we're in an svg context or not
|
|
392
|
+
* @param flags bitflags for Vdom variables
|
|
393
|
+
*/
|
|
379
394
|
const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
380
395
|
if (oldValue !== newValue) {
|
|
381
396
|
let isProp = isMemberInElement(elm, memberName);
|
|
@@ -977,17 +992,44 @@ const nullifyVNodeRefs = (vNode) => {
|
|
|
977
992
|
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
978
993
|
* the DOM node into which it should be rendered.
|
|
979
994
|
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
995
|
+
* @param isInitialLoad whether or not this is the first call after page load
|
|
980
996
|
*/
|
|
981
|
-
const renderVdom = (hostRef, renderFnResults) => {
|
|
997
|
+
const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
982
998
|
const hostElm = hostRef.$hostElement$;
|
|
983
999
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
984
1000
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1001
|
+
// if `renderFnResults` is a Host node then we can use it directly. If not,
|
|
1002
|
+
// we need to call `h` again to wrap the children of our component in a
|
|
1003
|
+
// 'dummy' Host node (well, an empty vnode) since `renderVdom` assumes
|
|
1004
|
+
// implicitly that the top-level vdom node is 1) an only child and 2)
|
|
1005
|
+
// contains attrs that need to be set on the host element.
|
|
985
1006
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
986
1007
|
hostTagName = hostElm.tagName;
|
|
987
1008
|
if (cmpMeta.$attrsToReflect$) {
|
|
988
1009
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
989
1010
|
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
990
1011
|
}
|
|
1012
|
+
// On the first render and *only* on the first render we want to check for
|
|
1013
|
+
// any attributes set on the host element which are also set on the vdom
|
|
1014
|
+
// node. If we find them, we override the value on the VDom node attrs with
|
|
1015
|
+
// the value from the host element, which allows developers building apps
|
|
1016
|
+
// with Stencil components to override e.g. the `role` attribute on a
|
|
1017
|
+
// component even if it's already set on the `Host`.
|
|
1018
|
+
if (isInitialLoad && rootVnode.$attrs$) {
|
|
1019
|
+
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
1020
|
+
// We have a special implementation in `setAccessor` for `style` and
|
|
1021
|
+
// `class` which reconciles values coming from the VDom with values
|
|
1022
|
+
// already present on the DOM element, so we don't want to override those
|
|
1023
|
+
// attributes on the VDom tree with values from the host element if they
|
|
1024
|
+
// are present.
|
|
1025
|
+
//
|
|
1026
|
+
// Likewise, `ref` and `key` are special internal values for the Stencil
|
|
1027
|
+
// runtime and we don't want to override those either.
|
|
1028
|
+
if (hostElm.hasAttribute(key) && !['key', 'ref', 'style', 'class'].includes(key)) {
|
|
1029
|
+
rootVnode.$attrs$[key] = hostElm[key];
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
991
1033
|
rootVnode.$tag$ = null;
|
|
992
1034
|
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
993
1035
|
hostRef.$vnode$ = rootVnode;
|
|
@@ -1096,6 +1138,16 @@ const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.th
|
|
|
1096
1138
|
*/
|
|
1097
1139
|
const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
|
|
1098
1140
|
(maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
|
|
1141
|
+
/**
|
|
1142
|
+
* Update a component given reference to its host elements and so on.
|
|
1143
|
+
*
|
|
1144
|
+
* @param hostRef an object containing references to the element's host node,
|
|
1145
|
+
* VDom nodes, and other metadata
|
|
1146
|
+
* @param instance a reference to the underlying host element where it will be
|
|
1147
|
+
* rendered
|
|
1148
|
+
* @param isInitialLoad whether or not this function is being called as part of
|
|
1149
|
+
* the first render cycle
|
|
1150
|
+
*/
|
|
1099
1151
|
const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
1100
1152
|
var _a;
|
|
1101
1153
|
const elm = hostRef.$hostElement$;
|
|
@@ -1107,7 +1159,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1107
1159
|
}
|
|
1108
1160
|
const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
|
|
1109
1161
|
{
|
|
1110
|
-
callRender(hostRef, instance);
|
|
1162
|
+
callRender(hostRef, instance, elm, isInitialLoad);
|
|
1111
1163
|
}
|
|
1112
1164
|
if (rc) {
|
|
1113
1165
|
// ok, so turns out there are some child host elements
|
|
@@ -1131,7 +1183,19 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1131
1183
|
}
|
|
1132
1184
|
}
|
|
1133
1185
|
};
|
|
1134
|
-
|
|
1186
|
+
/**
|
|
1187
|
+
* Handle making the call to the VDom renderer with the proper context given
|
|
1188
|
+
* various build variables
|
|
1189
|
+
*
|
|
1190
|
+
* @param hostRef an object containing references to the element's host node,
|
|
1191
|
+
* VDom nodes, and other metadata
|
|
1192
|
+
* @param instance a reference to the underlying host element where it will be
|
|
1193
|
+
* rendered
|
|
1194
|
+
* @param elm the Host element for the component
|
|
1195
|
+
* @param isInitialLoad whether or not this function is being called as part of
|
|
1196
|
+
* @returns an empty promise
|
|
1197
|
+
*/
|
|
1198
|
+
const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
1135
1199
|
try {
|
|
1136
1200
|
instance = instance.render() ;
|
|
1137
1201
|
{
|
|
@@ -1146,7 +1210,7 @@ const callRender = (hostRef, instance, elm) => {
|
|
|
1146
1210
|
// or we need to update the css class/attrs on the host element
|
|
1147
1211
|
// DOM WRITE!
|
|
1148
1212
|
{
|
|
1149
|
-
renderVdom(hostRef, instance);
|
|
1213
|
+
renderVdom(hostRef, instance, isInitialLoad);
|
|
1150
1214
|
}
|
|
1151
1215
|
}
|
|
1152
1216
|
}
|
|
@@ -1511,23 +1575,35 @@ const connectedCallback = (elm) => {
|
|
|
1511
1575
|
// since they would have been removed when disconnected
|
|
1512
1576
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1513
1577
|
// fire off connectedCallback() on component instance
|
|
1514
|
-
|
|
1578
|
+
if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
|
|
1579
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1580
|
+
}
|
|
1581
|
+
else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
|
|
1582
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
|
|
1583
|
+
}
|
|
1515
1584
|
}
|
|
1516
1585
|
endConnected();
|
|
1517
1586
|
}
|
|
1518
1587
|
};
|
|
1519
|
-
const
|
|
1588
|
+
const disconnectInstance = (instance) => {
|
|
1589
|
+
{
|
|
1590
|
+
safeCall(instance, 'disconnectedCallback');
|
|
1591
|
+
}
|
|
1592
|
+
};
|
|
1593
|
+
const disconnectedCallback = async (elm) => {
|
|
1520
1594
|
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1521
1595
|
const hostRef = getHostRef(elm);
|
|
1522
|
-
const instance = hostRef.$lazyInstance$ ;
|
|
1523
1596
|
{
|
|
1524
1597
|
if (hostRef.$rmListeners$) {
|
|
1525
1598
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1526
1599
|
hostRef.$rmListeners$ = undefined;
|
|
1527
1600
|
}
|
|
1528
1601
|
}
|
|
1529
|
-
{
|
|
1530
|
-
|
|
1602
|
+
if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
|
|
1603
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
1604
|
+
}
|
|
1605
|
+
else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
|
|
1606
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1531
1607
|
}
|
|
1532
1608
|
}
|
|
1533
1609
|
};
|
|
@@ -1783,4 +1859,4 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
|
1783
1859
|
|
|
1784
1860
|
export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1785
1861
|
|
|
1786
|
-
//# sourceMappingURL=index-
|
|
1862
|
+
//# sourceMappingURL=index-2c703aa8.js.map
|