@haiilo/catalyst 2.4.9 → 3.0.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 +2411 -2
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/index.cdn.js +2 -0
- package/dist/catalyst/p-52f9fea7.entry.js +2 -0
- package/dist/catalyst/{p-5bfc70e3.entry.js.map → p-52f9fea7.entry.js.map} +1 -1
- package/dist/catalyst/p-557c8009.entry.js +2 -0
- package/dist/catalyst/p-557c8009.entry.js.map +1 -0
- package/dist/catalyst/scss/_variables.scss +11 -11
- package/dist/catalyst/scss/_variables.tokens.scss +2 -2
- package/dist/catalyst/scss/core/_dialog.scss +66 -0
- package/dist/catalyst/scss/index.scss +1 -0
- package/dist/catalyst/scss/utils/_media.mixins.scss +1 -0
- package/dist/cjs/{cat-alert_23.cjs.entry.js → cat-alert_24.cjs.entry.js} +70 -18
- package/dist/cjs/cat-alert_24.cjs.entry.js.map +1 -0
- package/dist/cjs/cat-modal.cjs.entry.js +1 -1
- package/dist/cjs/cat-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/catalyst.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/cat-button/cat-button.js +23 -6
- package/dist/collection/components/cat-button/cat-button.js.map +1 -1
- package/dist/collection/components/cat-form-group/cat-form-group.css +3 -0
- package/dist/collection/components/cat-form-group/cat-form-group.js +66 -0
- package/dist/collection/components/cat-form-group/cat-form-group.js.map +1 -0
- package/dist/collection/components/cat-icon/cat-icon.js +21 -9
- package/dist/collection/components/cat-icon/cat-icon.js.map +1 -1
- package/dist/collection/components/cat-input/cat-input.js +27 -1
- package/dist/collection/components/cat-input/cat-input.js.map +1 -1
- package/dist/collection/components/cat-label/cat-label.js +27 -1
- package/dist/collection/components/cat-label/cat-label.js.map +1 -1
- package/dist/collection/components/cat-modal/cat-modal.css +1 -1
- package/dist/collection/components/cat-select/cat-select.js +47 -4
- package/dist/collection/components/cat-select/cat-select.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-textarea/cat-textarea.js +31 -1
- package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
- package/dist/collection/index.cdn.js +2 -0
- package/dist/collection/scss/_variables.scss +11 -11
- package/dist/collection/scss/_variables.tokens.scss +2 -2
- package/dist/collection/scss/core/_dialog.scss +66 -0
- package/dist/collection/scss/index.scss +1 -0
- package/dist/collection/scss/utils/_media.mixins.scss +1 -0
- package/dist/components/cat-button2.js +7 -6
- package/dist/components/cat-button2.js.map +1 -1
- package/dist/components/cat-dropdown2.js.map +1 -1
- package/dist/components/cat-form-group.d.ts +11 -0
- package/dist/components/cat-form-group.js +64 -0
- package/dist/components/cat-form-group.js.map +1 -0
- package/dist/components/cat-icon2.js +2 -5
- package/dist/components/cat-icon2.js.map +1 -1
- package/dist/components/cat-input.js +6 -1
- package/dist/components/cat-input.js.map +1 -1
- package/dist/components/cat-label.js +6 -1
- package/dist/components/cat-label.js.map +1 -1
- package/dist/components/cat-modal.js +1 -1
- package/dist/components/cat-modal.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 +8 -2
- package/dist/components/cat-select2.js.map +1 -1
- package/dist/components/cat-textarea.js +7 -1
- package/dist/components/cat-textarea.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/esm/{cat-alert_23.entry.js → cat-alert_24.entry.js} +70 -19
- package/dist/esm/cat-alert_24.entry.js.map +1 -0
- package/dist/esm/cat-modal.entry.js +1 -1
- package/dist/esm/cat-modal.entry.js.map +1 -1
- package/dist/esm/catalyst.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/cat-button/cat-button.d.ts +5 -0
- package/dist/types/components/cat-form-group/cat-form-group.d.ts +16 -0
- package/dist/types/components/cat-icon/cat-icon.d.ts +5 -1
- package/dist/types/components/cat-input/cat-input.d.ts +4 -0
- package/dist/types/components/cat-label/cat-label.d.ts +4 -0
- package/dist/types/components/cat-select/cat-select.d.ts +13 -5
- package/dist/types/components/cat-textarea/cat-textarea.d.ts +4 -0
- package/dist/types/components.d.ts +80 -3
- package/package.json +2 -2
- package/dist/catalyst/p-5bfc70e3.entry.js +0 -2
- package/dist/catalyst/p-602c38be.entry.js +0 -2
- package/dist/catalyst/p-602c38be.entry.js.map +0 -1
- package/dist/cjs/cat-alert_23.cjs.entry.js.map +0 -1
- package/dist/esm/cat-alert_23.entry.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-c2a28ebb.js';
|
|
2
2
|
import { c as createFocusTrap, f as firstTabbable } from './first-tabbable-4a00de61.js';
|
|
3
3
|
|
|
4
|
-
const catModalCss = ":host{display:block}:host([hidden]){display:none}.modal-wrapper{position:fixed;top:0;right:0;bottom:0;left:0;background-color:rgb(rgb(var(--cat-bg-backdrop,
|
|
4
|
+
const catModalCss = ":host{display:block}:host([hidden]){display:none}.modal-wrapper{position:fixed;top:0;right:0;bottom:0;left:0;background-color:rgb(rgb(var(--cat-bg-backdrop, 27, 31, 38)), var(--cat-opacity-backdrop, 0.4));z-index:2;display:flex}.modal-wrapper[aria-hidden=true]{display:none}.modal{margin:auto;z-index:2;position:relative;background-color:white;border-radius:var(--cat-border-radius-l, 0.5rem);max-width:100%;padding:32px}.modal-header{display:flex;justify-content:end;align-self:stretch}.modal-header .close-button::part(button){box-shadow:unset}.modal-content{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch;margin:16px 0}.modal-s{width:400px}.modal-m{width:600px}.modal-l{width:800px}";
|
|
5
5
|
|
|
6
6
|
const CatModal = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cat-modal.entry.js","mappings":";;;AAAA,MAAM,WAAW,GAAG,
|
|
1
|
+
{"file":"cat-modal.entry.js","mappings":";;;AAAA,MAAM,WAAW,GAAG,6sBAA6sB;;MCSptB,QAAQ;EALrB;;IAYW,cAAS,GAAG,KAAK,CAAC;;;;IAKnB,SAAI,GAAoB,GAAG,CAAC;GA2ErC;EAzEC,gBAAgB;IACd,IAAI,IAAI,CAAC,KAAK,EAAE;MACd,IAAI,CAAC,IAAI,GAAGA,eAAyB,CAAC,IAAI,CAAC,KAAK,EAAE;QAChD,eAAe,EAAE;UACf,aAAa,EAAE,IAAI;SACpB;QACD,YAAY,EAAE,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC;QAC7C,iBAAiB,EAAE,IAAI;QACvB,uBAAuB,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;QAC3F,YAAY,EAAE,OAAO,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QAC5C,cAAc,EAAE,qBAAqB,IACnC,qBAAqB,YAAY,WAAW;YACvC,aAAa,CAAC,qBAAqB,CAAiB;YACrD,qBAAqB;OAC5B,CAAC,CAAC;KACJ;GACF;EAED,kBAAkB;;IAChB,IAAI,IAAI,CAAC,SAAS;MAAE,MAAA,IAAI,CAAC,IAAI,0CAAE,QAAQ,EAAE,CAAC;IAC1C,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;GAC5C;;;;EAMD,MAAM,IAAI;IACR,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;GACvB;EAED,MAAM;IACJ,QACE,+BAAgB,IAAI,EAAC,QAAQ,iBAAc,CAAC,IAAI,CAAC,SAAS,GAAG,MAAM,GAAG,OAAO,EAAE,KAAK,EAAC,eAAe,IAClG,WAAK,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,SAAS,IAAI,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IACnG,WAAK,KAAK,EAAC,cAAc,IACvB,kBACE,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,EAClC,IAAI,EAAC,gBAAgB,EACrB,KAAK,EAAC,cAAc,EACpB,IAAI,EAAC,GAAG,EACR,QAAQ,QACR,SAAS,EAAC,OAAO,EACjB,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GACvB,CACV,EACN,WAAK,KAAK,EAAC,eAAe,IACxB,eAAa,CACT,CACF,CACF,EACN;GACH;EAEO,OAAO;;IACb,MAAA,IAAI,CAAC,IAAI,0CAAE,UAAU,EAAE,CAAC;GACzB;EAEO,mBAAmB,CAAC,OAAoB;IAC9C,IAAI,OAAO,CAAC,aAAa,EAAE;MACzB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,cAAc;QAC/D,IAAI,cAAc,KAAK,OAAO,EAAE;UAC9B,IAAI,CAAC,SAAS;cACV,cAAc,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC;cAClD,cAAc,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACnD;OACF,CAAC,CAAC;MAEH,IAAI,OAAO,CAAC,aAAa,KAAK,QAAQ,CAAC,IAAI,EAAE;QAC3C,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;OACjD;KACF;GACF;;;;;;;","names":["focusTrap.createFocusTrap"],"sources":["./src/components/cat-modal/cat-modal.scss?tag=cat-modal&encapsulation=shadow","./src/components/cat-modal/cat-modal.tsx"],"sourcesContent":["@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.modal-wrapper {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: rgb(cat-token('color.ui.background.backdrop'), cat-token('opacity.backdrop'));\n z-index: 2;\n display: flex;\n\n &[aria-hidden='true'] {\n display: none;\n }\n}\n\n.modal {\n margin: auto;\n z-index: 2;\n position: relative;\n background-color: cat-token('color.ui.background.body');\n border-radius: cat-border-radius('l');\n max-width: 100%;\n padding: 32px;\n}\n\n.modal-header {\n display: flex;\n justify-content: end;\n align-self: stretch;\n\n .close-button::part(button) {\n box-shadow: unset;\n }\n}\n\n.modal-content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n align-self: stretch;\n margin: 16px 0;\n}\n\n@mixin size($size) {\n .modal-#{$size} {\n width: cat-token('size.modal.#{$size}');\n }\n}\n\n@include size('s');\n@include size('m');\n@include size('l');\n","import { Component, Element, h, Method, Prop, State } from '@stencil/core';\nimport * as focusTrap from 'focus-trap';\nimport firstTabbable from '../../utils/first-tabbable';\n\n@Component({\n tag: 'cat-modal',\n styleUrl: 'cat-modal.scss',\n shadow: true\n})\nexport class CatModal {\n private trap?: focusTrap.FocusTrap;\n private modal?: HTMLElement;\n private closeButton?: HTMLElement;\n\n @Element() hostElement!: HTMLElement;\n\n @State() isVisible = false;\n\n /**\n * The size of the modal.\n */\n @Prop() size: 's' | 'm' | 'l' = 'm';\n\n componentDidLoad(): void {\n if (this.modal) {\n this.trap = focusTrap.createFocusTrap(this.modal, {\n tabbableOptions: {\n getShadowRoot: true\n },\n initialFocus: firstTabbable(this.closeButton),\n allowOutsideClick: true,\n clickOutsideDeactivates: event => !this.modal || !event.composedPath().includes(this.modal),\n onDeactivate: () => (this.isVisible = false),\n setReturnFocus: previousActiveElement =>\n previousActiveElement instanceof HTMLElement\n ? (firstTabbable(previousActiveElement) as HTMLElement)\n : previousActiveElement\n });\n }\n }\n\n componentDidUpdate(): void {\n if (this.isVisible) this.trap?.activate();\n this.updateAccessibility(this.hostElement);\n }\n\n /**\n * Shows the modal.\n */\n @Method()\n async show(): Promise<void> {\n this.isVisible = true;\n }\n\n render() {\n return (\n <div aria-modal role=\"dialog\" aria-hidden={!this.isVisible ? 'true' : 'false'} class=\"modal-wrapper\">\n <div ref={el => (this.modal = el)} class={{ modal: true, [`modal-${this.size}`]: Boolean(this.size) }}>\n <div class=\"modal-header\">\n <cat-button\n ref={el => (this.closeButton = el)}\n icon=\"cross-outlined\"\n class=\"close-button\"\n size=\"s\"\n iconOnly\n a11yLabel=\"close\"\n onCatClick={this.onClick.bind(this)}\n ></cat-button>\n </div>\n <div class=\"modal-content\">\n <slot></slot>\n </div>\n </div>\n </div>\n );\n }\n\n private onClick() {\n this.trap?.deactivate();\n }\n\n private updateAccessibility(element: HTMLElement) {\n if (element.parentElement) {\n Array.from(element.parentElement.children).forEach(elementSibling => {\n if (elementSibling !== element) {\n this.isVisible\n ? elementSibling.setAttribute('aria-hidden', 'true')\n : elementSibling.removeAttribute('aria-hidden');\n }\n });\n\n if (element.parentElement !== document.body) {\n this.updateAccessibility(element.parentElement);\n }\n }\n }\n}\n"],"version":3}
|
package/dist/esm/catalyst.js
CHANGED
|
@@ -13,7 +13,7 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["cat-
|
|
16
|
+
return bootstrapLazy([["cat-alert_24",[[1,"cat-select-demo"],[1,"cat-input",{"requiredMarker":[1,"required-marker"],"autoComplete":[1,"auto-complete"],"clearable":[4],"disabled":[4],"hint":[1],"icon":[1],"iconRight":[4,"icon-right"],"identifier":[1],"label":[1],"labelHidden":[4,"label-hidden"],"max":[8],"maxLength":[2,"max-length"],"min":[8],"minLength":[2,"min-length"],"name":[1],"placeholder":[1],"textPrefix":[1,"text-prefix"],"textSuffix":[1,"text-suffix"],"readonly":[4],"required":[4],"round":[4],"type":[1],"value":[1032],"hasSlottedLabel":[32],"doFocus":[64],"doBlur":[64],"doClick":[64],"clear":[64]}],[1,"cat-pagination",{"page":[1026],"pageCount":[2,"page-count"],"activePadding":[2,"active-padding"],"sidePadding":[2,"side-padding"],"size":[1],"variant":[1],"round":[4],"compact":[4],"iconPrev":[1,"icon-prev"],"iconNext":[1,"icon-next"]}],[1,"cat-tabs",{"activeTab":[1,"active-tab"],"tabsAlign":[1,"tabs-align"],"tabs":[32],"activeTabId":[32]},[[0,"keydown","onKeydown"]]],[1,"cat-alert",{"color":[513],"icon":[1],"noIcon":[4,"no-icon"]}],[1,"cat-badge",{"variant":[513],"color":[513],"size":[513],"round":[516],"pulse":[516]}],[1,"cat-card"],[1,"cat-form-group",{"requiredMarker":[1,"required-marker"]}],[1,"cat-label",{"requiredMarker":[1,"required-marker"],"for":[1],"required":[4]}],[1,"cat-radio",{"checked":[1028],"disabled":[4],"identifier":[1],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"doFocus":[64],"doBlur":[64],"doClick":[64]}],[1,"cat-radio-group",{"name":[1],"value":[1025],"disabled":[4],"a11yLabel":[1,"a11y-label"],"labelLeft":[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"],[2,"blur","onBlur"]]],[1,"cat-tab",{"label":[513],"icon":[513],"iconOnly":[520,"icon-only"],"iconRight":[516,"icon-right"],"url":[513],"urlTarget":[513,"url-target"],"deactivated":[516]},[[0,"click","onClick"]]],[1,"cat-textarea",{"requiredMarker":[1,"required-marker"],"disabled":[4],"hint":[1],"identifier":[1],"label":[1],"labelHidden":[4,"label-hidden"],"maxLength":[2,"max-length"],"minLength":[2,"min-length"],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"rows":[2],"value":[1032],"hasSlottedLabel":[32],"doFocus":[64],"doBlur":[64],"doClick":[64]}],[1,"cat-toggle",{"checked":[1028],"disabled":[4],"identifier":[1],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1032],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"doFocus":[64],"doBlur":[64],"doClick":[64]}],[1,"cat-tooltip",{"content":[1],"disabled":[4],"placement":[1],"round":[4],"size":[1],"showDelay":[2,"show-delay"],"hideDelay":[2,"hide-delay"],"longTouchDuration":[2,"long-touch-duration"]},[[0,"keydown","handleKeyDown"]]],[1,"cat-select",{"requiredMarker":[1,"required-marker"],"multiple":[4],"debounce":[2],"placement":[1],"value":[1025],"disabled":[4],"placeholder":[1],"hint":[1],"identifier":[1],"label":[1],"name":[1],"labelHidden":[4,"label-hidden"],"required":[4],"clearable":[4],"tags":[4],"tagHint":[1,"tag-hint"],"noItems":[1,"no-items"],"connector":[32],"state":[32],"hasSlottedLabel":[32],"connect":[64]},[[0,"blur","onBlur"],[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"]]],[1,"cat-dropdown",{"placement":[1],"noAutoClose":[4,"no-auto-close"],"overflow":[4],"close":[64]},[[0,"catClick","clickHandler"]]],[1,"cat-avatar",{"size":[1],"round":[4],"label":[1],"initials":[1],"src":[1],"icon":[1],"url":[1],"urlTarget":[1,"url-target"],"backgroundImage":[32]}],[1,"cat-checkbox",{"checked":[1028],"disabled":[4],"identifier":[1],"indeterminate":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1032],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"doFocus":[64],"doBlur":[64],"doClick":[64]}],[1,"cat-scrollable",{"noShadowX":[4,"no-shadow-x"],"noShadowY":[4,"no-shadow-y"],"noOverflowX":[4,"no-overflow-x"],"noOverflowY":[4,"no-overflow-y"],"noOverscroll":[4,"no-overscroll"],"noScrolledInit":[4,"no-scrolled-init"],"scrolledBuffer":[2,"scrolled-buffer"]}],[1,"cat-skeleton",{"effect":[1],"variant":[1],"size":[1],"lines":[2]}],[1,"cat-button",{"variant":[1],"color":[1],"active":[4],"size":[1],"name":[1],"value":[1],"disabled":[4],"loading":[4],"submit":[4],"noEllipsis":[4,"no-ellipsis"],"round":[4],"url":[1],"urlTarget":[1,"url-target"],"icon":[1],"iconSrc":[1,"icon-src"],"iconOnly":[8,"icon-only"],"iconRight":[4,"icon-right"],"buttonId":[1,"button-id"],"a11yLabel":[1,"a11y-label"],"a11yCurrent":[1,"a11y-current"],"_iconOnly":[32],"doFocus":[64],"doBlur":[64],"doClick":[64]},[[0,"click","haltDisabledEvents"]]],[1,"cat-spinner",{"size":[1],"a11yLabel":[1,"a11y-label"]}],[1,"cat-icon",{"icon":[1],"iconSrc":[1,"icon-src"],"size":[1],"a11yLabel":[1,"a11y-label"]}]]],["cat-modal",[[1,"cat-modal",{"size":[1],"isVisible":[32],"show":[64]}]]]], options);
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
//# sourceMappingURL=catalyst.js.map
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["cat-
|
|
13
|
+
return bootstrapLazy([["cat-alert_24",[[1,"cat-select-demo"],[1,"cat-input",{"requiredMarker":[1,"required-marker"],"autoComplete":[1,"auto-complete"],"clearable":[4],"disabled":[4],"hint":[1],"icon":[1],"iconRight":[4,"icon-right"],"identifier":[1],"label":[1],"labelHidden":[4,"label-hidden"],"max":[8],"maxLength":[2,"max-length"],"min":[8],"minLength":[2,"min-length"],"name":[1],"placeholder":[1],"textPrefix":[1,"text-prefix"],"textSuffix":[1,"text-suffix"],"readonly":[4],"required":[4],"round":[4],"type":[1],"value":[1032],"hasSlottedLabel":[32],"doFocus":[64],"doBlur":[64],"doClick":[64],"clear":[64]}],[1,"cat-pagination",{"page":[1026],"pageCount":[2,"page-count"],"activePadding":[2,"active-padding"],"sidePadding":[2,"side-padding"],"size":[1],"variant":[1],"round":[4],"compact":[4],"iconPrev":[1,"icon-prev"],"iconNext":[1,"icon-next"]}],[1,"cat-tabs",{"activeTab":[1,"active-tab"],"tabsAlign":[1,"tabs-align"],"tabs":[32],"activeTabId":[32]},[[0,"keydown","onKeydown"]]],[1,"cat-alert",{"color":[513],"icon":[1],"noIcon":[4,"no-icon"]}],[1,"cat-badge",{"variant":[513],"color":[513],"size":[513],"round":[516],"pulse":[516]}],[1,"cat-card"],[1,"cat-form-group",{"requiredMarker":[1,"required-marker"]}],[1,"cat-label",{"requiredMarker":[1,"required-marker"],"for":[1],"required":[4]}],[1,"cat-radio",{"checked":[1028],"disabled":[4],"identifier":[1],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"doFocus":[64],"doBlur":[64],"doClick":[64]}],[1,"cat-radio-group",{"name":[1],"value":[1025],"disabled":[4],"a11yLabel":[1,"a11y-label"],"labelLeft":[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"],[2,"blur","onBlur"]]],[1,"cat-tab",{"label":[513],"icon":[513],"iconOnly":[520,"icon-only"],"iconRight":[516,"icon-right"],"url":[513],"urlTarget":[513,"url-target"],"deactivated":[516]},[[0,"click","onClick"]]],[1,"cat-textarea",{"requiredMarker":[1,"required-marker"],"disabled":[4],"hint":[1],"identifier":[1],"label":[1],"labelHidden":[4,"label-hidden"],"maxLength":[2,"max-length"],"minLength":[2,"min-length"],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"rows":[2],"value":[1032],"hasSlottedLabel":[32],"doFocus":[64],"doBlur":[64],"doClick":[64]}],[1,"cat-toggle",{"checked":[1028],"disabled":[4],"identifier":[1],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1032],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"doFocus":[64],"doBlur":[64],"doClick":[64]}],[1,"cat-tooltip",{"content":[1],"disabled":[4],"placement":[1],"round":[4],"size":[1],"showDelay":[2,"show-delay"],"hideDelay":[2,"hide-delay"],"longTouchDuration":[2,"long-touch-duration"]},[[0,"keydown","handleKeyDown"]]],[1,"cat-select",{"requiredMarker":[1,"required-marker"],"multiple":[4],"debounce":[2],"placement":[1],"value":[1025],"disabled":[4],"placeholder":[1],"hint":[1],"identifier":[1],"label":[1],"name":[1],"labelHidden":[4,"label-hidden"],"required":[4],"clearable":[4],"tags":[4],"tagHint":[1,"tag-hint"],"noItems":[1,"no-items"],"connector":[32],"state":[32],"hasSlottedLabel":[32],"connect":[64]},[[0,"blur","onBlur"],[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"]]],[1,"cat-dropdown",{"placement":[1],"noAutoClose":[4,"no-auto-close"],"overflow":[4],"close":[64]},[[0,"catClick","clickHandler"]]],[1,"cat-avatar",{"size":[1],"round":[4],"label":[1],"initials":[1],"src":[1],"icon":[1],"url":[1],"urlTarget":[1,"url-target"],"backgroundImage":[32]}],[1,"cat-checkbox",{"checked":[1028],"disabled":[4],"identifier":[1],"indeterminate":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1032],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"doFocus":[64],"doBlur":[64],"doClick":[64]}],[1,"cat-scrollable",{"noShadowX":[4,"no-shadow-x"],"noShadowY":[4,"no-shadow-y"],"noOverflowX":[4,"no-overflow-x"],"noOverflowY":[4,"no-overflow-y"],"noOverscroll":[4,"no-overscroll"],"noScrolledInit":[4,"no-scrolled-init"],"scrolledBuffer":[2,"scrolled-buffer"]}],[1,"cat-skeleton",{"effect":[1],"variant":[1],"size":[1],"lines":[2]}],[1,"cat-button",{"variant":[1],"color":[1],"active":[4],"size":[1],"name":[1],"value":[1],"disabled":[4],"loading":[4],"submit":[4],"noEllipsis":[4,"no-ellipsis"],"round":[4],"url":[1],"urlTarget":[1,"url-target"],"icon":[1],"iconSrc":[1,"icon-src"],"iconOnly":[8,"icon-only"],"iconRight":[4,"icon-right"],"buttonId":[1,"button-id"],"a11yLabel":[1,"a11y-label"],"a11yCurrent":[1,"a11y-current"],"_iconOnly":[32],"doFocus":[64],"doBlur":[64],"doClick":[64]},[[0,"click","haltDisabledEvents"]]],[1,"cat-spinner",{"size":[1],"a11yLabel":[1,"a11y-label"]}],[1,"cat-icon",{"icon":[1],"iconSrc":[1,"icon-src"],"size":[1],"a11yLabel":[1,"a11y-label"]}]]],["cat-modal",[[1,"cat-modal",{"size":[1],"isVisible":[32],"show":[64]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -78,6 +78,11 @@ export declare class CatButton {
|
|
|
78
78
|
* The name of an icon to be displayed in the button.
|
|
79
79
|
*/
|
|
80
80
|
icon?: string;
|
|
81
|
+
/**
|
|
82
|
+
* The SVG source of an icon to be displayed in the button. This takes
|
|
83
|
+
* precenedence over the `icon` name.
|
|
84
|
+
*/
|
|
85
|
+
iconSrc?: string;
|
|
81
86
|
/**
|
|
82
87
|
* Hide the actual button content and only display the icon.
|
|
83
88
|
*/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare class CatFormGroup {
|
|
2
|
+
private formElements;
|
|
3
|
+
hostElement: HTMLElement;
|
|
4
|
+
/**
|
|
5
|
+
* Whether the labels need a marker to shown if the forms fields are required or optional.<br /><br />
|
|
6
|
+
* By default, it is set to auto, it will display the mark depending on the number of required and optional fields: <br />
|
|
7
|
+
* - If there are more required, the optional will be marked.<br />
|
|
8
|
+
* - If there are less required, it will mark the required.<br /><br />
|
|
9
|
+
* If a form field had "!", the requiredMarked of the field would not change.
|
|
10
|
+
*/
|
|
11
|
+
requiredMarker: 'none' | 'required' | 'optional' | 'auto';
|
|
12
|
+
onRequiredMarker(newRequiredMarker: 'none' | 'required' | 'optional' | 'auto'): void;
|
|
13
|
+
render(): any;
|
|
14
|
+
private onSlotChange;
|
|
15
|
+
private calculate;
|
|
16
|
+
}
|
|
@@ -8,7 +8,11 @@ export declare class CatIcon {
|
|
|
8
8
|
/**
|
|
9
9
|
* The name of the icon.
|
|
10
10
|
*/
|
|
11
|
-
icon
|
|
11
|
+
icon?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The SVG source of the icon. This takes precenedence over the `icon` name.
|
|
14
|
+
*/
|
|
15
|
+
iconSrc?: string;
|
|
12
16
|
/**
|
|
13
17
|
* The size of the icon.
|
|
14
18
|
*/
|
|
@@ -17,6 +17,10 @@ export declare class CatInput {
|
|
|
17
17
|
private input;
|
|
18
18
|
hostElement: HTMLElement;
|
|
19
19
|
hasSlottedLabel: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the label need a marker to shown if the input is required or optional.
|
|
22
|
+
*/
|
|
23
|
+
requiredMarker: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!';
|
|
20
24
|
/**
|
|
21
25
|
* Hint for form autofill feature.
|
|
22
26
|
*/
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare class CatLabel {
|
|
5
5
|
private static readonly SHADOW_TARGETS;
|
|
6
|
+
/**
|
|
7
|
+
* Whether the label need a marker to shown if the input is required or optional.
|
|
8
|
+
*/
|
|
9
|
+
requiredMarker: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!';
|
|
6
10
|
/**
|
|
7
11
|
* The unique identifier for a referenced input.
|
|
8
12
|
*/
|
|
@@ -79,6 +79,10 @@ export declare class CatSelect {
|
|
|
79
79
|
connector?: CatSelectConnector;
|
|
80
80
|
state: CatSelectState;
|
|
81
81
|
hasSlottedLabel: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Whether the label need a marker to shown if the select is required or optional.
|
|
84
|
+
*/
|
|
85
|
+
requiredMarker: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!';
|
|
82
86
|
/**
|
|
83
87
|
* Enable multiple selection.
|
|
84
88
|
*/
|
|
@@ -92,11 +96,11 @@ export declare class CatSelect {
|
|
|
92
96
|
*/
|
|
93
97
|
placement: Placement;
|
|
94
98
|
/**
|
|
95
|
-
* The value of the select.
|
|
96
|
-
*
|
|
97
|
-
* The value of the select depends on whether it is allowed to choose a single item or several items.
|
|
98
|
-
* When only one item can be selected, the value is the id of the item, in case several items can be selected, the value is an array of ids of the selected items.
|
|
99
|
-
*
|
|
99
|
+
* The value of the select. <br />
|
|
100
|
+
* <br />
|
|
101
|
+
* The value of the select depends on whether it is allowed to choose a single item or several items. <br />
|
|
102
|
+
* When only one item can be selected, the value is the id of the item, in case several items can be selected, the value is an array of ids of the selected items. <br />
|
|
103
|
+
* <br />
|
|
100
104
|
* In case the user can add new items to the select (tags activated), the value in the single select is an object (CatSelectTaggingValue) with the id of the item or the name of the created item,
|
|
101
105
|
* in the case of multiple select, it is an object (CatSelectMultipleTaggingValue) with the array of the ids of the items selected and the array of the names of the items created
|
|
102
106
|
*/
|
|
@@ -145,6 +149,10 @@ export declare class CatSelect {
|
|
|
145
149
|
* Optional hint text to be displayed on the new item to be added.
|
|
146
150
|
*/
|
|
147
151
|
tagHint?: string;
|
|
152
|
+
/**
|
|
153
|
+
* The text to display in the dropdown if no results are found.
|
|
154
|
+
*/
|
|
155
|
+
noItems?: string;
|
|
148
156
|
onConnectorChange(connector: CatSelectConnector): void;
|
|
149
157
|
onValueChange(): void;
|
|
150
158
|
onStateChange(newState: CatSelectState, oldState: CatSelectState): void;
|
|
@@ -14,6 +14,10 @@ export declare class CatTextarea {
|
|
|
14
14
|
private textarea;
|
|
15
15
|
hostElement: HTMLElement;
|
|
16
16
|
hasSlottedLabel: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the label need a marker to shown if the textarea is required or optional.
|
|
19
|
+
*/
|
|
20
|
+
requiredMarker: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!';
|
|
17
21
|
/**
|
|
18
22
|
* Whether the textarea is disabled.
|
|
19
23
|
*/
|
|
@@ -131,6 +131,10 @@ export namespace Components {
|
|
|
131
131
|
* Display the icon on the right.
|
|
132
132
|
*/
|
|
133
133
|
"iconRight": boolean;
|
|
134
|
+
/**
|
|
135
|
+
* The SVG source of an icon to be displayed in the button. This takes precenedence over the `icon` name.
|
|
136
|
+
*/
|
|
137
|
+
"iconSrc"?: string;
|
|
134
138
|
/**
|
|
135
139
|
* Displays the button in a loading state with a spinner. Just like a disabled button, an inactive button is unusable and un-clickable. However, it retains the current focus state.
|
|
136
140
|
*/
|
|
@@ -251,6 +255,12 @@ export namespace Components {
|
|
|
251
255
|
*/
|
|
252
256
|
"placement": Placement;
|
|
253
257
|
}
|
|
258
|
+
interface CatFormGroup {
|
|
259
|
+
/**
|
|
260
|
+
* Whether the labels need a marker to shown if the forms fields are required or optional.<br /><br /> By default, it is set to auto, it will display the mark depending on the number of required and optional fields: <br /> - If there are more required, the optional will be marked.<br /> - If there are less required, it will mark the required.<br /><br /> If a form field had "!", the requiredMarked of the field would not change.
|
|
261
|
+
*/
|
|
262
|
+
"requiredMarker": 'none' | 'required' | 'optional' | 'auto';
|
|
263
|
+
}
|
|
254
264
|
interface CatIcon {
|
|
255
265
|
/**
|
|
256
266
|
* Adds accessible label for the icon that is only shown for screen readers. The `aria-hidden` attribute will be set if no label is present.
|
|
@@ -259,7 +269,11 @@ export namespace Components {
|
|
|
259
269
|
/**
|
|
260
270
|
* The name of the icon.
|
|
261
271
|
*/
|
|
262
|
-
"icon"
|
|
272
|
+
"icon"?: string;
|
|
273
|
+
/**
|
|
274
|
+
* The SVG source of the icon. This takes precenedence over the `icon` name.
|
|
275
|
+
*/
|
|
276
|
+
"iconSrc"?: string;
|
|
263
277
|
/**
|
|
264
278
|
* The size of the icon.
|
|
265
279
|
*/
|
|
@@ -351,6 +365,10 @@ export namespace Components {
|
|
|
351
365
|
* A value is required or must be check for the form to be submittable.
|
|
352
366
|
*/
|
|
353
367
|
"required": boolean;
|
|
368
|
+
/**
|
|
369
|
+
* Whether the label need a marker to shown if the input is required or optional.
|
|
370
|
+
*/
|
|
371
|
+
"requiredMarker": 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!';
|
|
354
372
|
/**
|
|
355
373
|
* Use round input edges.
|
|
356
374
|
*/
|
|
@@ -381,6 +399,10 @@ export namespace Components {
|
|
|
381
399
|
* A value is required or must be check for the form to be submittable.
|
|
382
400
|
*/
|
|
383
401
|
"required": boolean;
|
|
402
|
+
/**
|
|
403
|
+
* Whether the label need a marker to shown if the input is required or optional.
|
|
404
|
+
*/
|
|
405
|
+
"requiredMarker": 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!';
|
|
384
406
|
}
|
|
385
407
|
interface CatModal {
|
|
386
408
|
/**
|
|
@@ -583,6 +605,10 @@ export namespace Components {
|
|
|
583
605
|
* The name of the form control. Submitted with the form as part of a name/value pair.
|
|
584
606
|
*/
|
|
585
607
|
"name"?: string;
|
|
608
|
+
/**
|
|
609
|
+
* The text to display in the dropdown if no results are found.
|
|
610
|
+
*/
|
|
611
|
+
"noItems"?: string;
|
|
586
612
|
/**
|
|
587
613
|
* The placeholder text to display within the select.
|
|
588
614
|
*/
|
|
@@ -595,6 +621,10 @@ export namespace Components {
|
|
|
595
621
|
* A value is required or must be checked for the form to be submittable.
|
|
596
622
|
*/
|
|
597
623
|
"required": boolean;
|
|
624
|
+
/**
|
|
625
|
+
* Whether the label need a marker to shown if the select is required or optional.
|
|
626
|
+
*/
|
|
627
|
+
"requiredMarker": 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!';
|
|
598
628
|
/**
|
|
599
629
|
* Optional hint text to be displayed on the new item to be added.
|
|
600
630
|
*/
|
|
@@ -604,7 +634,7 @@ export namespace Components {
|
|
|
604
634
|
*/
|
|
605
635
|
"tags": boolean;
|
|
606
636
|
/**
|
|
607
|
-
* The value of the select.
|
|
637
|
+
* The value of the select. <br /> <br /> The value of the select depends on whether it is allowed to choose a single item or several items. <br /> When only one item can be selected, the value is the id of the item, in case several items can be selected, the value is an array of ids of the selected items. <br /> <br /> In case the user can add new items to the select (tags activated), the value in the single select is an object (CatSelectTaggingValue) with the id of the item or the name of the created item, in the case of multiple select, it is an object (CatSelectMultipleTaggingValue) with the array of the ids of the items selected and the array of the names of the items created
|
|
608
638
|
*/
|
|
609
639
|
"value"?: string | string[] | CatSelectTaggingValue | CatSelectMultipleTaggingValue;
|
|
610
640
|
}
|
|
@@ -736,6 +766,10 @@ export namespace Components {
|
|
|
736
766
|
* A value is required or must be check for the form to be submittable.
|
|
737
767
|
*/
|
|
738
768
|
"required": boolean;
|
|
769
|
+
/**
|
|
770
|
+
* Whether the label need a marker to shown if the textarea is required or optional.
|
|
771
|
+
*/
|
|
772
|
+
"requiredMarker": 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!';
|
|
739
773
|
/**
|
|
740
774
|
* Specifies the initial number of lines in the textarea.
|
|
741
775
|
*/
|
|
@@ -922,6 +956,12 @@ declare global {
|
|
|
922
956
|
prototype: HTMLCatDropdownElement;
|
|
923
957
|
new (): HTMLCatDropdownElement;
|
|
924
958
|
};
|
|
959
|
+
interface HTMLCatFormGroupElement extends Components.CatFormGroup, HTMLStencilElement {
|
|
960
|
+
}
|
|
961
|
+
var HTMLCatFormGroupElement: {
|
|
962
|
+
prototype: HTMLCatFormGroupElement;
|
|
963
|
+
new (): HTMLCatFormGroupElement;
|
|
964
|
+
};
|
|
925
965
|
interface HTMLCatIconElement extends Components.CatIcon, HTMLStencilElement {
|
|
926
966
|
}
|
|
927
967
|
var HTMLCatIconElement: {
|
|
@@ -1032,6 +1072,7 @@ declare global {
|
|
|
1032
1072
|
"cat-card": HTMLCatCardElement;
|
|
1033
1073
|
"cat-checkbox": HTMLCatCheckboxElement;
|
|
1034
1074
|
"cat-dropdown": HTMLCatDropdownElement;
|
|
1075
|
+
"cat-form-group": HTMLCatFormGroupElement;
|
|
1035
1076
|
"cat-icon": HTMLCatIconElement;
|
|
1036
1077
|
"cat-input": HTMLCatInputElement;
|
|
1037
1078
|
"cat-label": HTMLCatLabelElement;
|
|
@@ -1159,6 +1200,10 @@ declare namespace LocalJSX {
|
|
|
1159
1200
|
* Display the icon on the right.
|
|
1160
1201
|
*/
|
|
1161
1202
|
"iconRight"?: boolean;
|
|
1203
|
+
/**
|
|
1204
|
+
* The SVG source of an icon to be displayed in the button. This takes precenedence over the `icon` name.
|
|
1205
|
+
*/
|
|
1206
|
+
"iconSrc"?: string;
|
|
1162
1207
|
/**
|
|
1163
1208
|
* Displays the button in a loading state with a spinner. Just like a disabled button, an inactive button is unusable and un-clickable. However, it retains the current focus state.
|
|
1164
1209
|
*/
|
|
@@ -1294,6 +1339,12 @@ declare namespace LocalJSX {
|
|
|
1294
1339
|
*/
|
|
1295
1340
|
"placement"?: Placement;
|
|
1296
1341
|
}
|
|
1342
|
+
interface CatFormGroup {
|
|
1343
|
+
/**
|
|
1344
|
+
* Whether the labels need a marker to shown if the forms fields are required or optional.<br /><br /> By default, it is set to auto, it will display the mark depending on the number of required and optional fields: <br /> - If there are more required, the optional will be marked.<br /> - If there are less required, it will mark the required.<br /><br /> If a form field had "!", the requiredMarked of the field would not change.
|
|
1345
|
+
*/
|
|
1346
|
+
"requiredMarker"?: 'none' | 'required' | 'optional' | 'auto';
|
|
1347
|
+
}
|
|
1297
1348
|
interface CatIcon {
|
|
1298
1349
|
/**
|
|
1299
1350
|
* Adds accessible label for the icon that is only shown for screen readers. The `aria-hidden` attribute will be set if no label is present.
|
|
@@ -1303,6 +1354,10 @@ declare namespace LocalJSX {
|
|
|
1303
1354
|
* The name of the icon.
|
|
1304
1355
|
*/
|
|
1305
1356
|
"icon"?: string;
|
|
1357
|
+
/**
|
|
1358
|
+
* The SVG source of the icon. This takes precenedence over the `icon` name.
|
|
1359
|
+
*/
|
|
1360
|
+
"iconSrc"?: string;
|
|
1306
1361
|
/**
|
|
1307
1362
|
* The size of the icon.
|
|
1308
1363
|
*/
|
|
@@ -1389,6 +1444,10 @@ declare namespace LocalJSX {
|
|
|
1389
1444
|
* A value is required or must be check for the form to be submittable.
|
|
1390
1445
|
*/
|
|
1391
1446
|
"required"?: boolean;
|
|
1447
|
+
/**
|
|
1448
|
+
* Whether the label need a marker to shown if the input is required or optional.
|
|
1449
|
+
*/
|
|
1450
|
+
"requiredMarker"?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!';
|
|
1392
1451
|
/**
|
|
1393
1452
|
* Use round input edges.
|
|
1394
1453
|
*/
|
|
@@ -1419,6 +1478,10 @@ declare namespace LocalJSX {
|
|
|
1419
1478
|
* A value is required or must be check for the form to be submittable.
|
|
1420
1479
|
*/
|
|
1421
1480
|
"required"?: boolean;
|
|
1481
|
+
/**
|
|
1482
|
+
* Whether the label need a marker to shown if the input is required or optional.
|
|
1483
|
+
*/
|
|
1484
|
+
"requiredMarker"?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!';
|
|
1422
1485
|
}
|
|
1423
1486
|
interface CatModal {
|
|
1424
1487
|
/**
|
|
@@ -1635,6 +1698,10 @@ declare namespace LocalJSX {
|
|
|
1635
1698
|
* The name of the form control. Submitted with the form as part of a name/value pair.
|
|
1636
1699
|
*/
|
|
1637
1700
|
"name"?: string;
|
|
1701
|
+
/**
|
|
1702
|
+
* The text to display in the dropdown if no results are found.
|
|
1703
|
+
*/
|
|
1704
|
+
"noItems"?: string;
|
|
1638
1705
|
/**
|
|
1639
1706
|
* Emitted when the select loses the focus.
|
|
1640
1707
|
*/
|
|
@@ -1663,6 +1730,10 @@ declare namespace LocalJSX {
|
|
|
1663
1730
|
* A value is required or must be checked for the form to be submittable.
|
|
1664
1731
|
*/
|
|
1665
1732
|
"required"?: boolean;
|
|
1733
|
+
/**
|
|
1734
|
+
* Whether the label need a marker to shown if the select is required or optional.
|
|
1735
|
+
*/
|
|
1736
|
+
"requiredMarker"?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!';
|
|
1666
1737
|
/**
|
|
1667
1738
|
* Optional hint text to be displayed on the new item to be added.
|
|
1668
1739
|
*/
|
|
@@ -1672,7 +1743,7 @@ declare namespace LocalJSX {
|
|
|
1672
1743
|
*/
|
|
1673
1744
|
"tags"?: boolean;
|
|
1674
1745
|
/**
|
|
1675
|
-
* The value of the select.
|
|
1746
|
+
* The value of the select. <br /> <br /> The value of the select depends on whether it is allowed to choose a single item or several items. <br /> When only one item can be selected, the value is the id of the item, in case several items can be selected, the value is an array of ids of the selected items. <br /> <br /> In case the user can add new items to the select (tags activated), the value in the single select is an object (CatSelectTaggingValue) with the id of the item or the name of the created item, in the case of multiple select, it is an object (CatSelectMultipleTaggingValue) with the array of the ids of the items selected and the array of the names of the items created
|
|
1676
1747
|
*/
|
|
1677
1748
|
"value"?: string | string[] | CatSelectTaggingValue | CatSelectMultipleTaggingValue;
|
|
1678
1749
|
}
|
|
@@ -1807,6 +1878,10 @@ declare namespace LocalJSX {
|
|
|
1807
1878
|
* A value is required or must be check for the form to be submittable.
|
|
1808
1879
|
*/
|
|
1809
1880
|
"required"?: boolean;
|
|
1881
|
+
/**
|
|
1882
|
+
* Whether the label need a marker to shown if the textarea is required or optional.
|
|
1883
|
+
*/
|
|
1884
|
+
"requiredMarker"?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!';
|
|
1810
1885
|
/**
|
|
1811
1886
|
* Specifies the initial number of lines in the textarea.
|
|
1812
1887
|
*/
|
|
@@ -1912,6 +1987,7 @@ declare namespace LocalJSX {
|
|
|
1912
1987
|
"cat-card": CatCard;
|
|
1913
1988
|
"cat-checkbox": CatCheckbox;
|
|
1914
1989
|
"cat-dropdown": CatDropdown;
|
|
1990
|
+
"cat-form-group": CatFormGroup;
|
|
1915
1991
|
"cat-icon": CatIcon;
|
|
1916
1992
|
"cat-input": CatInput;
|
|
1917
1993
|
"cat-label": CatLabel;
|
|
@@ -1942,6 +2018,7 @@ declare module "@stencil/core" {
|
|
|
1942
2018
|
"cat-card": LocalJSX.CatCard & JSXBase.HTMLAttributes<HTMLCatCardElement>;
|
|
1943
2019
|
"cat-checkbox": LocalJSX.CatCheckbox & JSXBase.HTMLAttributes<HTMLCatCheckboxElement>;
|
|
1944
2020
|
"cat-dropdown": LocalJSX.CatDropdown & JSXBase.HTMLAttributes<HTMLCatDropdownElement>;
|
|
2021
|
+
"cat-form-group": LocalJSX.CatFormGroup & JSXBase.HTMLAttributes<HTMLCatFormGroupElement>;
|
|
1945
2022
|
"cat-icon": LocalJSX.CatIcon & JSXBase.HTMLAttributes<HTMLCatIconElement>;
|
|
1946
2023
|
"cat-input": LocalJSX.CatInput & JSXBase.HTMLAttributes<HTMLCatInputElement>;
|
|
1947
2024
|
"cat-label": LocalJSX.CatLabel & JSXBase.HTMLAttributes<HTMLCatLabelElement>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haiilo/catalyst",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Catalyst Design System",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@floating-ui/dom": "1.0.3",
|
|
48
|
-
"@haiilo/catalyst-tokens": "
|
|
48
|
+
"@haiilo/catalyst-tokens": "3.0.0",
|
|
49
49
|
"@stencil/core": "2.17.4",
|
|
50
50
|
"autosize": "5.0.1",
|
|
51
51
|
"autosize-input": "1.0.2",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,g as a}from"./p-53a1db22.js";import{c as o,f as s}from"./p-60a20ebe.js";const e=":host{display:block}:host([hidden]){display:none}.modal-wrapper{position:fixed;top:0;right:0;bottom:0;left:0;background-color:rgb(rgb(var(--cat-bg-backdrop, 0, 0, 0)), var(--cat-opacity-backdrop, 0.6));z-index:2;display:flex}.modal-wrapper[aria-hidden=true]{display:none}.modal{margin:auto;z-index:2;position:relative;background-color:white;border-radius:var(--cat-border-radius-l, 0.5rem);max-width:100%;padding:32px}.modal-header{display:flex;justify-content:end;align-self:stretch}.modal-header .close-button::part(button){box-shadow:unset}.modal-content{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch;margin:16px 0}.modal-s{width:400px}.modal-m{width:600px}.modal-l{width:800px}";const d=class{constructor(i){t(this,i);this.isVisible=false;this.size="m"}componentDidLoad(){if(this.modal){this.trap=o(this.modal,{tabbableOptions:{getShadowRoot:true},initialFocus:s(this.closeButton),allowOutsideClick:true,clickOutsideDeactivates:t=>!this.modal||!t.composedPath().includes(this.modal),onDeactivate:()=>this.isVisible=false,setReturnFocus:t=>t instanceof HTMLElement?s(t):t})}}componentDidUpdate(){var t;if(this.isVisible)(t=this.trap)===null||t===void 0?void 0:t.activate();this.updateAccessibility(this.hostElement)}async show(){this.isVisible=true}render(){return i("div",{"aria-modal":true,role:"dialog","aria-hidden":!this.isVisible?"true":"false",class:"modal-wrapper"},i("div",{ref:t=>this.modal=t,class:{modal:true,[`modal-${this.size}`]:Boolean(this.size)}},i("div",{class:"modal-header"},i("cat-button",{ref:t=>this.closeButton=t,icon:"cross-outlined",class:"close-button",size:"s",iconOnly:true,a11yLabel:"close",onCatClick:this.onClick.bind(this)})),i("div",{class:"modal-content"},i("slot",null))))}onClick(){var t;(t=this.trap)===null||t===void 0?void 0:t.deactivate()}updateAccessibility(t){if(t.parentElement){Array.from(t.parentElement.children).forEach((i=>{if(i!==t){this.isVisible?i.setAttribute("aria-hidden","true"):i.removeAttribute("aria-hidden")}}));if(t.parentElement!==document.body){this.updateAccessibility(t.parentElement)}}}get hostElement(){return a(this)}};d.style=e;export{d as cat_modal};
|
|
2
|
-
//# sourceMappingURL=p-5bfc70e3.entry.js.map
|