@haiilo/catalyst 0.11.0 → 0.14.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 +1 -1
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/index.esm.js +1 -1
- package/dist/catalyst/p-5f9b3485.entry.js +12 -0
- package/dist/catalyst/p-5f9b3485.entry.js.map +1 -0
- package/dist/catalyst/p-933b6a7a.js +10 -0
- package/dist/catalyst/p-933b6a7a.js.map +1 -0
- package/dist/catalyst/{p-659073b5.js → p-a255bd64.js} +2 -2
- package/dist/catalyst/p-a255bd64.js.map +1 -0
- package/dist/catalyst/scss/core/_base.scss +0 -1
- package/dist/catalyst/scss/core/_toast.scss +22 -12
- package/dist/catalyst/scss/utils/_layout.scss +4 -4
- package/dist/catalyst/scss/utils/_sizing.mixins.scss +0 -4
- package/dist/catalyst/scss/utils/_typography.mixins.scss +3 -3
- package/dist/cjs/{cat-alert_21.cjs.entry.js → cat-alert_22.cjs.entry.js} +234 -63
- package/dist/cjs/cat-alert_22.cjs.entry.js.map +1 -0
- package/dist/cjs/{cat-notification-c2859ed7.js → cat-notification-6a438ad1.js} +374 -58
- package/dist/cjs/cat-notification-6a438ad1.js.map +1 -0
- package/dist/cjs/catalyst.cjs.js +2 -2
- package/dist/cjs/{index-936b777e.js → index-c7955116.js} +12 -1
- package/dist/cjs/index-c7955116.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -2
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/cat-alert/cat-alert.css +24 -14
- package/dist/collection/components/cat-alert/cat-alert.js +49 -1
- package/dist/collection/components/cat-alert/cat-alert.js.map +1 -1
- package/dist/collection/components/cat-button/cat-button.css +185 -0
- package/dist/collection/components/cat-checkbox/cat-checkbox.css +16 -9
- package/dist/collection/components/cat-input/cat-input.css +3 -0
- package/dist/collection/components/cat-input/cat-input.js +8 -3
- package/dist/collection/components/cat-input/cat-input.js.map +1 -1
- package/dist/collection/components/cat-input/input-type.js +2 -0
- package/dist/collection/components/cat-input/input-type.js.map +1 -0
- package/dist/collection/components/cat-notification/cat-notification.js +43 -44
- package/dist/collection/components/cat-notification/cat-notification.js.map +1 -1
- package/dist/collection/components/cat-radio/cat-radio.css +3 -0
- package/dist/collection/components/cat-radio-group/cat-radio-group.js +30 -0
- package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
- package/dist/collection/components/cat-select/cat-select.css +4 -2
- package/dist/collection/components/cat-select/cat-select.js +77 -20
- package/dist/collection/components/cat-select/cat-select.js.map +1 -1
- package/dist/collection/components/cat-tab/cat-tab.js +7 -7
- package/dist/collection/components/cat-tab/cat-tab.js.map +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.js +19 -2
- package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.css +3 -0
- package/dist/collection/components/cat-toast-demo/cat-toast-demo.js +12 -1
- package/dist/collection/components/cat-toast-demo/cat-toast-demo.js.map +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.css +9 -9
- package/dist/collection/components/cat-tooltip/cat-tooltip.css +2 -3
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/scss/core/_base.scss +0 -1
- package/dist/collection/scss/core/_toast.scss +22 -12
- package/dist/collection/scss/utils/_layout.scss +4 -4
- package/dist/collection/scss/utils/_sizing.mixins.scss +0 -4
- package/dist/collection/scss/utils/_typography.mixins.scss +3 -3
- package/dist/components/cat-alert.js +23 -4
- package/dist/components/cat-alert.js.map +1 -1
- package/dist/components/cat-avatar.js.map +1 -1
- package/dist/components/cat-badge.js.map +1 -1
- package/dist/components/cat-button2.js +1 -1
- package/dist/components/cat-button2.js.map +1 -1
- package/dist/components/cat-checkbox.js +1 -1
- package/dist/components/cat-checkbox.js.map +1 -1
- package/dist/components/cat-icon2.js.map +1 -1
- package/dist/components/cat-input.js +1 -1
- package/dist/components/cat-input.js.map +1 -1
- package/dist/components/cat-radio-group.js +7 -1
- package/dist/components/cat-radio-group.js.map +1 -1
- package/dist/components/cat-radio.js +1 -1
- package/dist/components/cat-radio.js.map +1 -1
- package/dist/components/cat-select.js +53 -21
- package/dist/components/cat-select.js.map +1 -1
- package/dist/components/cat-skeleton.js.map +1 -1
- package/dist/components/cat-spinner2.js.map +1 -1
- package/dist/components/cat-tab.js +7 -7
- package/dist/components/cat-tab.js.map +1 -1
- package/dist/components/cat-tabs.js +19 -2
- package/dist/components/cat-tabs.js.map +1 -1
- package/dist/components/cat-textarea.js +1 -1
- package/dist/components/cat-textarea.js.map +1 -1
- package/dist/components/cat-toast-demo.js +55 -45
- package/dist/components/cat-toast-demo.js.map +1 -1
- package/dist/components/cat-toggle.js +1 -1
- package/dist/components/cat-toggle.js.map +1 -1
- package/dist/components/cat-tooltip.js +1 -1
- package/dist/components/cat-tooltip.js.map +1 -1
- package/dist/esm/{cat-alert_21.entry.js → cat-alert_22.entry.js} +219 -49
- package/dist/esm/cat-alert_22.entry.js.map +1 -0
- package/dist/esm/{cat-notification-3da6ddb1.js → cat-notification-5b6a2cd9.js} +360 -47
- package/dist/esm/cat-notification-5b6a2cd9.js.map +1 -0
- package/dist/esm/catalyst.js +2 -2
- package/dist/esm/{index-41ceb7da.js → index-17d2bcf3.js} +12 -1
- package/dist/esm/index-17d2bcf3.js.map +1 -0
- package/dist/esm/index.js +1 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/types/components/cat-alert/cat-alert.d.ts +9 -0
- package/dist/types/components/cat-input/cat-input.d.ts +2 -1
- package/dist/types/components/cat-input/input-type.d.ts +1 -0
- package/dist/types/components/cat-notification/cat-notification.d.ts +9 -4
- package/dist/types/components/cat-radio-group/cat-radio-group.d.ts +5 -0
- package/dist/types/components/cat-select/cat-select.d.ts +9 -0
- package/dist/types/components/cat-tabs/cat-tabs.d.ts +5 -1
- package/dist/types/components.d.ts +27 -2
- package/dist/types/index.d.ts +1 -1
- package/package.json +4 -4
- package/dist/catalyst/p-2ad6f8d8.js +0 -2
- package/dist/catalyst/p-2ad6f8d8.js.map +0 -1
- package/dist/catalyst/p-659073b5.js.map +0 -1
- package/dist/catalyst/p-6fce43dd.js +0 -2
- package/dist/catalyst/p-6fce43dd.js.map +0 -1
- package/dist/catalyst/p-8121572a.js +0 -10
- package/dist/catalyst/p-8121572a.js.map +0 -1
- package/dist/catalyst/p-aa382647.entry.js +0 -12
- package/dist/catalyst/p-aa382647.entry.js.map +0 -1
- package/dist/catalyst/p-c0b4200d.entry.js +0 -2
- package/dist/catalyst/p-c0b4200d.entry.js.map +0 -1
- package/dist/cjs/cat-alert_21.cjs.entry.js.map +0 -1
- package/dist/cjs/cat-form-hint-25fdfed5.js +0 -22
- package/dist/cjs/cat-form-hint-25fdfed5.js.map +0 -1
- package/dist/cjs/cat-notification-c2859ed7.js.map +0 -1
- package/dist/cjs/cat-textarea.cjs.entry.js +0 -92
- package/dist/cjs/cat-textarea.cjs.entry.js.map +0 -1
- package/dist/cjs/index-936b777e.js.map +0 -1
- package/dist/cjs/loglevel-b5d158ad.js +0 -324
- package/dist/cjs/loglevel-b5d158ad.js.map +0 -1
- package/dist/esm/cat-alert_21.entry.js.map +0 -1
- package/dist/esm/cat-form-hint-790d1e46.js +0 -20
- package/dist/esm/cat-form-hint-790d1e46.js.map +0 -1
- package/dist/esm/cat-notification-3da6ddb1.js.map +0 -1
- package/dist/esm/cat-textarea.entry.js +0 -88
- package/dist/esm/cat-textarea.entry.js.map +0 -1
- package/dist/esm/index-41ceb7da.js.map +0 -1
- package/dist/esm/loglevel-c8b59c3a.js +0 -319
- package/dist/esm/loglevel-c8b59c3a.js.map +0 -1
|
@@ -7,8 +7,8 @@ import { Component, h, Element, State, Watch, Listen, Host, Prop } from '@stenci
|
|
|
7
7
|
*/
|
|
8
8
|
export class CatTabs {
|
|
9
9
|
constructor() {
|
|
10
|
-
this.tabs = [];
|
|
11
10
|
this.buttons = [];
|
|
11
|
+
this.tabs = [];
|
|
12
12
|
/**
|
|
13
13
|
* The ID of the active tab.
|
|
14
14
|
*/
|
|
@@ -23,11 +23,24 @@ export class CatTabs {
|
|
|
23
23
|
activeTab === null || activeTab === void 0 ? void 0 : activeTab.click();
|
|
24
24
|
}
|
|
25
25
|
componentWillLoad() {
|
|
26
|
-
this.
|
|
26
|
+
this.syncTabs();
|
|
27
27
|
if (this.tabs.length) {
|
|
28
28
|
this.activeTabId = this.activeTab;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
+
componentDidLoad() {
|
|
32
|
+
var _a;
|
|
33
|
+
this.mutationObserver = new MutationObserver(mutations => mutations.some(value => value.target.nodeName === 'CAT-TAB') && this.syncTabs());
|
|
34
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.hostElement, {
|
|
35
|
+
childList: true,
|
|
36
|
+
attributes: true,
|
|
37
|
+
subtree: true
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
disconnectedCallback() {
|
|
41
|
+
var _a;
|
|
42
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
43
|
+
}
|
|
31
44
|
onKeydown(event) {
|
|
32
45
|
var _a;
|
|
33
46
|
if (['ArrowDown', 'ArrowUp', 'ArrowRight', 'ArrowLeft'].includes(event.key)) {
|
|
@@ -57,6 +70,9 @@ export class CatTabs {
|
|
|
57
70
|
this.buttons.push(button);
|
|
58
71
|
}
|
|
59
72
|
}
|
|
73
|
+
syncTabs() {
|
|
74
|
+
this.tabs = Array.from(this.hostElement.querySelectorAll('cat-tab'));
|
|
75
|
+
}
|
|
60
76
|
static get is() { return "cat-tabs"; }
|
|
61
77
|
static get encapsulation() { return "shadow"; }
|
|
62
78
|
static get originalStyleUrls() { return {
|
|
@@ -104,6 +120,7 @@ export class CatTabs {
|
|
|
104
120
|
}
|
|
105
121
|
}; }
|
|
106
122
|
static get states() { return {
|
|
123
|
+
"tabs": {},
|
|
107
124
|
"activeTabId": {}
|
|
108
125
|
}; }
|
|
109
126
|
static get elementRef() { return "hostElement"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cat-tabs.js","sourceRoot":"","sources":["../../../src/components/cat-tabs/cat-tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAExF;;;;;GAKG;AAMH,MAAM,OAAO,OAAO;EALpB;IAMU,
|
|
1
|
+
{"version":3,"file":"cat-tabs.js","sourceRoot":"","sources":["../../../src/components/cat-tabs/cat-tabs.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, h, Element, State, Watch, Listen, Host, Prop } from '@stencil/core';\n\n/**\n * Tabs are used to display multiple panels to be contained within a single\n * window, using tabs as a navigational element.\n *\n * @part tab - The header of the tab.\n */\n@Component({\n tag: 'cat-tabs',\n styleUrl: 'cat-tabs.scss',\n shadow: true\n})\nexport class CatTabs {\n private buttons: HTMLCatButtonElement[] = [];\n private mutationObserver?: MutationObserver;\n\n @Element() hostElement!: HTMLElement;\n\n @State() tabs: HTMLCatTabElement[] = [];\n\n @State() activeTabId?: string;\n\n /**\n * The ID of the active tab.\n */\n @Prop() activeTab = '';\n\n /**\n * The alignment of the tabs.\n */\n @Prop() tabsAlign: 'left' | 'center' | 'right' | 'justify' = 'left';\n\n @Watch('activeTabId')\n onActiveTabChanged(newActiveTab: string): void {\n const activeTab = this.tabs.find(value => value.id === newActiveTab);\n activeTab?.click();\n }\n\n componentWillLoad(): void {\n this.syncTabs();\n if (this.tabs.length) {\n this.activeTabId = this.activeTab;\n }\n }\n\n componentDidLoad() {\n this.mutationObserver = new MutationObserver(\n mutations => mutations.some(value => value.target.nodeName === 'CAT-TAB') && this.syncTabs()\n );\n\n this.mutationObserver?.observe(this.hostElement, {\n childList: true,\n attributes: true,\n subtree: true\n });\n }\n\n disconnectedCallback() {\n this.mutationObserver?.disconnect();\n }\n\n @Listen('keydown')\n onKeydown(event: KeyboardEvent): void {\n if (['ArrowDown', 'ArrowUp', 'ArrowRight', 'ArrowLeft'].includes(event.key)) {\n const targetElements = this.buttons.filter(button => !button.disabled);\n const activeElement = this.hostElement.shadowRoot?.activeElement as HTMLCatButtonElement;\n const activeIdx = activeElement ? targetElements.indexOf(activeElement) : -1;\n const activeOff = ['ArrowDown', 'ArrowRight'].includes(event.key) ? 1 : -1;\n const targetIdx = activeIdx < 0 ? 0 : (activeIdx + activeOff + targetElements.length) % targetElements.length;\n targetElements[targetIdx].setFocus();\n event.preventDefault();\n }\n }\n\n render() {\n return (\n <Host>\n {this.tabs.map((tab: HTMLCatTabElement) => {\n return (\n <cat-button\n ref={el => el && this.updateButtonsRef(el)}\n buttonId={tab.id}\n role=\"tab\"\n part=\"tab\"\n class={{\n tab: true,\n 'tab-active': Boolean(this.activeTabId && tab.id === this.activeTabId)\n }}\n color={this.activeTabId && tab.id === this.activeTabId ? 'primary' : 'secondary'}\n variant=\"text\"\n icon={tab.icon}\n iconOnly={tab.iconOnly}\n iconRight={tab.iconRight}\n url={tab.url}\n disabled={tab.deactivated}\n urlTarget={tab.urlTarget}\n onCatClick={() => (this.activeTabId = tab.id)}\n >\n {tab.label}\n </cat-button>\n );\n })}\n </Host>\n );\n }\n\n private updateButtonsRef(button: HTMLCatButtonElement) {\n const indexOf = this.buttons.indexOf(button);\n\n if (indexOf >= 0) {\n this.buttons[indexOf] = button;\n } else {\n this.buttons.push(button);\n }\n }\n\n private syncTabs() {\n this.tabs = Array.from(this.hostElement.querySelectorAll('cat-tab'));\n }\n}\n"]}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
.hint-section ::slotted([slot=hint]) {
|
|
13
13
|
font-size: 0.875rem;
|
|
14
14
|
line-height: 1rem;
|
|
15
|
+
font-weight: var(--cat-font-weight-body, 400);
|
|
15
16
|
margin: 0;
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
gap: 0.5rem;
|
|
22
23
|
font-size: 0.9375rem;
|
|
23
24
|
line-height: 1.25rem;
|
|
25
|
+
font-weight: var(--cat-font-weight-body, 400);
|
|
24
26
|
margin-bottom: 1rem;
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -47,6 +49,7 @@ label.hidden {
|
|
|
47
49
|
margin-left: 0.25rem;
|
|
48
50
|
font-size: 0.75rem;
|
|
49
51
|
line-height: 1rem;
|
|
52
|
+
font-weight: var(--cat-font-weight-body, 400);
|
|
50
53
|
color: rgb(var(--cat-font-color-muted, 105, 118, 135));
|
|
51
54
|
}
|
|
52
55
|
|
|
@@ -11,7 +11,8 @@ export class CatToastDemo {
|
|
|
11
11
|
}
|
|
12
12
|
onClick() {
|
|
13
13
|
const infoOptions = {
|
|
14
|
-
position: 'top-left'
|
|
14
|
+
position: 'top-left',
|
|
15
|
+
type: 'info'
|
|
15
16
|
};
|
|
16
17
|
const errorOptions = {
|
|
17
18
|
position: 'top-center',
|
|
@@ -32,6 +33,16 @@ export class CatToastDemo {
|
|
|
32
33
|
type: 'success',
|
|
33
34
|
content: template.content.firstChild
|
|
34
35
|
};
|
|
36
|
+
const primaryOptions = {
|
|
37
|
+
position: 'bottom-right',
|
|
38
|
+
type: 'primary'
|
|
39
|
+
};
|
|
40
|
+
const secondaryOptions = {
|
|
41
|
+
position: 'bottom-right',
|
|
42
|
+
type: 'secondary'
|
|
43
|
+
};
|
|
44
|
+
NotificationsService.secondary('Secondary Click', 'secondary info', secondaryOptions);
|
|
45
|
+
NotificationsService.primary('primary Click', 'secondary info', primaryOptions);
|
|
35
46
|
NotificationsService.error('Default Click');
|
|
36
47
|
NotificationsService.error('Long default title, long default title, long default title, long default title');
|
|
37
48
|
NotificationsService.info('Info Click', 'Info message', infoOptions);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cat-toast-demo.js","sourceRoot":"","sources":["../../../src/components/cat-toast-demo/cat-toast-demo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAgB,MAAM,sCAAsC,CAAC;AAE1F;;;;GAIG;AAKH,MAAM,OAAO,YAAY;EACvB,MAAM;IACJ,OAAO,kBAAY,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,yBAAiC,CAAC;EACvF,CAAC;EAEO,OAAO;IACb,MAAM,WAAW,GAA0B;MACzC,QAAQ,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"cat-toast-demo.js","sourceRoot":"","sources":["../../../src/components/cat-toast-demo/cat-toast-demo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAgB,MAAM,sCAAsC,CAAC;AAE1F;;;;GAIG;AAKH,MAAM,OAAO,YAAY;EACvB,MAAM;IACJ,OAAO,kBAAY,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,yBAAiC,CAAC;EACvF,CAAC;EAEO,OAAO;IACb,MAAM,WAAW,GAA0B;MACzC,QAAQ,EAAE,UAAU;MACpB,IAAI,EAAE,MAAM;KACb,CAAC;IACF,MAAM,YAAY,GAA0B;MAC1C,QAAQ,EAAE,YAAY;MACtB,IAAI,EAAE,OAAO;KACd,CAAC;IACF,MAAM,aAAa,GAA0B;MAC3C,QAAQ,EAAE,aAAa;MACvB,IAAI,EAAE,OAAO;KACd,CAAC;IACF,MAAM,eAAe,GAA0B;MAC7C,QAAQ,EAAE,cAAc;MACxB,IAAI,EAAE,SAAS;KAChB,CAAC;IACF,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACpD,QAAQ,CAAC,SAAS,GAAG,wEAAwE,CAAC;IAC9F,MAAM,eAAe,GAA0B;MAC7C,QAAQ,EAAE,cAAc;MACxB,IAAI,EAAE,SAAS;MACf,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,UAAyB;KACpD,CAAC;IACF,MAAM,cAAc,GAA0B;MAC5C,QAAQ,EAAE,cAAc;MACxB,IAAI,EAAE,SAAS;KAChB,CAAC;IAEF,MAAM,gBAAgB,GAA0B;MAC9C,QAAQ,EAAE,cAAc;MACxB,IAAI,EAAE,WAAW;KAClB,CAAC;IAEF,oBAAoB,CAAC,SAAS,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;IACtF,oBAAoB,CAAC,OAAO,CAAC,eAAe,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;IAChF,oBAAoB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAC5C,oBAAoB,CAAC,KAAK,CAAC,gFAAgF,CAAC,CAAC;IAC7G,oBAAoB,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;IACrE,oBAAoB,CAAC,OAAO,CAAC,EAAE,EAAE,GAAG,EAAE,eAAe,CAAC,CAAC;IACvD,oBAAoB,CAAC,KAAK,CAAC,aAAa,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC;IAC7D,oBAAoB,CAAC,KAAK,CACxB,eAAe,EACf,8RAA8R,EAC9R,aAAa,CACd,CAAC;IACF,oBAAoB,CAAC,OAAO,CAAC,iDAAiD,EAAE,GAAG,EAAE,eAAe,CAAC,CAAC;EACxG,CAAC;;;;;;;;CACF","sourcesContent":["import { Component, h } from '@stencil/core';\nimport { NotificationsService, ToastOptions } from '../cat-notification/cat-notification';\n\n/**\n * Toast Component Demo\n *\n * @part toast - The content of the toast.\n */\n@Component({\n tag: 'cat-toast-demo',\n styleUrl: 'cat-toast-demo.scss'\n})\nexport class CatToastDemo {\n render() {\n return <cat-button onClick={this.onClick.bind(this)}>Show Notifications</cat-button>;\n }\n\n private onClick() {\n const infoOptions: Partial<ToastOptions> = {\n position: 'top-left',\n type: 'info'\n };\n const errorOptions: Partial<ToastOptions> = {\n position: 'top-center',\n type: 'error'\n };\n const errorOptions2: Partial<ToastOptions> = {\n position: 'bottom-left',\n type: 'error'\n };\n const successOptions3: Partial<ToastOptions> = {\n position: 'bottom-right',\n type: 'success'\n };\n const template = document.createElement('template');\n template.innerHTML = `<div style=\"padding: 7px 30px 7px 10px\">Custom HTML Node Content</div>`;\n const successOptions4: Partial<ToastOptions> = {\n position: 'bottom-right',\n type: 'success',\n content: template.content.firstChild as HTMLElement\n };\n const primaryOptions: Partial<ToastOptions> = {\n position: 'bottom-right',\n type: 'primary'\n };\n\n const secondaryOptions: Partial<ToastOptions> = {\n position: 'bottom-right',\n type: 'secondary'\n };\n\n NotificationsService.secondary('Secondary Click', 'secondary info', secondaryOptions);\n NotificationsService.primary('primary Click', 'secondary info', primaryOptions);\n NotificationsService.error('Default Click');\n NotificationsService.error('Long default title, long default title, long default title, long default title');\n NotificationsService.info('Info Click', 'Info message', infoOptions);\n NotificationsService.success('', ' ', successOptions4);\n NotificationsService.error('Error Title', ' ', errorOptions);\n NotificationsService.error(\n 'Error 2 Title',\n 'Very long message, Very long message, Very long message, Very long message, Very long message, Very long message, Very long message, Very long message, Very long message, Very long message,Very long message, Very long message, Very long message, Very long message, Very long message, ',\n errorOptions2\n );\n NotificationsService.success('Success Title - very long title without message', ' ', successOptions3);\n }\n}\n"]}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
.hint-section ::slotted([slot=hint]) {
|
|
13
13
|
font-size: 0.875rem;
|
|
14
14
|
line-height: 1rem;
|
|
15
|
+
font-weight: var(--cat-font-weight-body, 400);
|
|
15
16
|
margin: 0;
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -32,6 +33,7 @@ label {
|
|
|
32
33
|
gap: 0.5rem;
|
|
33
34
|
font-size: 0.9375rem;
|
|
34
35
|
line-height: 1.25rem;
|
|
36
|
+
font-weight: var(--cat-font-weight-body, 400);
|
|
35
37
|
/* stylelint-disable property-no-vendor-prefix */
|
|
36
38
|
-webkit-user-select: none;
|
|
37
39
|
-ms-user-select: none;
|
|
@@ -45,15 +47,12 @@ label {
|
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
input {
|
|
48
|
-
position: absolute
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
clip: rect(0, 0, 0, 0) !important;
|
|
55
|
-
white-space: nowrap !important;
|
|
56
|
-
border: 0 !important;
|
|
50
|
+
position: absolute;
|
|
51
|
+
margin: 0;
|
|
52
|
+
width: 2rem;
|
|
53
|
+
height: 1.25rem;
|
|
54
|
+
opacity: 0;
|
|
55
|
+
cursor: inherit;
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
.toggle {
|
|
@@ -67,6 +66,7 @@ input {
|
|
|
67
66
|
border-radius: 10rem;
|
|
68
67
|
background-color: #d7dbe0;
|
|
69
68
|
transition: background-color 0.13s ease;
|
|
69
|
+
pointer-events: none;
|
|
70
70
|
}
|
|
71
71
|
:checked + .toggle {
|
|
72
72
|
background-color: rgb(var(--cat-primary-bg, 32, 127, 138));
|
|
@@ -17,14 +17,13 @@
|
|
|
17
17
|
line-height: 1rem;
|
|
18
18
|
font-weight: 500;
|
|
19
19
|
padding: 0.75rem;
|
|
20
|
-
background-color:
|
|
20
|
+
background-color: black;
|
|
21
21
|
border-radius: 0.25rem;
|
|
22
|
-
color:
|
|
22
|
+
color: white;
|
|
23
23
|
transition: opacity 0.25s linear, visibility 0.25s linear;
|
|
24
24
|
visibility: hidden;
|
|
25
25
|
opacity: 0;
|
|
26
26
|
box-shadow: rgba(0, 0, 0, 0.08) 0 1px 8px 0;
|
|
27
|
-
border: 1px solid #ebecf0;
|
|
28
27
|
z-index: 200;
|
|
29
28
|
max-width: 16rem;
|
|
30
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC","sourcesContent":["export { Components, JSX } from './components';\nexport { CatI18nRegistry } from './components/cat-i18n/cat-i18n-registry';\nexport { CatIconRegistry } from './components/cat-icon/cat-icon-registry';\nexport { NotificationsService } from './components/cat-notification/cat-notification';\nexport {
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC","sourcesContent":["export { Components, JSX } from './components';\nexport { CatI18nRegistry } from './components/cat-i18n/cat-i18n-registry';\nexport { CatIconRegistry } from './components/cat-icon/cat-icon-registry';\nexport { NotificationsService } from './components/cat-notification/cat-notification';\nexport { CatSelectItem } from './components/cat-select/cat-select';\n"]}
|
|
@@ -6,13 +6,16 @@ $-text-color: cat-token('color.base.neutral.900');
|
|
|
6
6
|
$-title-border: cat-token('color.base.neutral.300');
|
|
7
7
|
$-shadow: cat-token('color.ui.border.dark');
|
|
8
8
|
$-error-color: cat-token('color.theme.danger.text');
|
|
9
|
-
$-info-color: cat-token('color.
|
|
9
|
+
$-info-color: cat-token('color.base.orange.700');
|
|
10
10
|
$-success-color: cat-token('color.theme.success.text');
|
|
11
|
+
$-secondary-color: cat-token('color.base.neutral.900');
|
|
12
|
+
$-primary-color: cat-token('color.base.brand.400');
|
|
11
13
|
|
|
12
14
|
.cat-toastify {
|
|
13
15
|
background: $-background-color;
|
|
14
16
|
color: $-text-color;
|
|
15
17
|
padding: 0;
|
|
18
|
+
border-radius: 0.5rem;
|
|
16
19
|
@include cat-elevation(1);
|
|
17
20
|
|
|
18
21
|
.toast-close {
|
|
@@ -31,12 +34,8 @@ $-success-color: cat-token('color.theme.success.text');
|
|
|
31
34
|
|
|
32
35
|
.cat-toastify-icon-wrapper {
|
|
33
36
|
position: absolute;
|
|
34
|
-
top:
|
|
35
|
-
left:
|
|
36
|
-
|
|
37
|
-
&.info {
|
|
38
|
-
color: $-info-color;
|
|
39
|
-
}
|
|
37
|
+
top: 1.1rem;
|
|
38
|
+
left: 1.125rem;
|
|
40
39
|
|
|
41
40
|
&.error {
|
|
42
41
|
color: $-error-color;
|
|
@@ -45,32 +44,43 @@ $-success-color: cat-token('color.theme.success.text');
|
|
|
45
44
|
&.success {
|
|
46
45
|
color: $-success-color;
|
|
47
46
|
}
|
|
47
|
+
|
|
48
|
+
&.primary {
|
|
49
|
+
color: $-primary-color;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&.secondary {
|
|
53
|
+
color: $-secondary-color;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&.info {
|
|
57
|
+
color: $-info-color;
|
|
58
|
+
}
|
|
48
59
|
}
|
|
49
60
|
|
|
50
61
|
.cat-toastify-title-wrapper {
|
|
51
62
|
width: 100%;
|
|
52
|
-
padding:
|
|
63
|
+
padding: 1.2rem 1.2rem 1.2rem 3rem;
|
|
53
64
|
|
|
54
65
|
&.has-message {
|
|
55
|
-
|
|
66
|
+
margin-bottom: -2.25rem;
|
|
56
67
|
}
|
|
57
68
|
|
|
58
69
|
.cat-toastify-title {
|
|
59
70
|
width: 100%;
|
|
60
|
-
padding-right:
|
|
71
|
+
padding-right: 1.5rem;
|
|
61
72
|
overflow: hidden;
|
|
62
73
|
text-overflow: ellipsis;
|
|
63
74
|
white-space: nowrap;
|
|
64
75
|
font-size: 15px;
|
|
65
76
|
line-height: 20px;
|
|
66
|
-
font-weight: 600;
|
|
67
77
|
color: $-text-color;
|
|
68
78
|
}
|
|
69
79
|
}
|
|
70
80
|
|
|
71
81
|
.cat-toastify-message {
|
|
72
82
|
width: 100%;
|
|
73
|
-
padding:
|
|
83
|
+
padding: 1.5rem 1.5rem 1.5rem 3rem;
|
|
74
84
|
color: $-text-color;
|
|
75
85
|
}
|
|
76
86
|
}
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
|
|
44
44
|
@include -layout-property('justify-items-start', 'justify-items', 'flex-start');
|
|
45
45
|
@include -layout-property('justify-items-end', 'justify-items', 'flex-end');
|
|
46
|
-
@include -layout-property('justify-items-center', 'justify-items', '
|
|
47
|
-
@include -layout-property('justify-items-stretch', 'justify-items', '
|
|
46
|
+
@include -layout-property('justify-items-center', 'justify-items', 'center');
|
|
47
|
+
@include -layout-property('justify-items-stretch', 'justify-items', 'stretch');
|
|
48
48
|
|
|
49
49
|
@include -layout-property('content-start', 'align-content', 'flex-start');
|
|
50
50
|
@include -layout-property('content-end', 'align-content', 'flex-end');
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
|
|
56
56
|
@include -layout-property('items-start', 'align-items', 'flex-start');
|
|
57
57
|
@include -layout-property('items-end', 'align-items', 'flex-end');
|
|
58
|
-
@include -layout-property('items-center', 'align-items', '
|
|
59
|
-
@include -layout-property('items-stretch', 'align-items', '
|
|
58
|
+
@include -layout-property('items-center', 'align-items', 'center');
|
|
59
|
+
@include -layout-property('items-stretch', 'align-items', 'stretch');
|
|
60
60
|
|
|
61
61
|
// -- Grid
|
|
62
62
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
@return cat-token('size.line.head.#{$size}');
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
@mixin cat-head($size, $weight:
|
|
17
|
+
@mixin cat-head($size, $weight: cat-token('font.weight.head')) {
|
|
18
18
|
font-family: cat-head-font-family();
|
|
19
19
|
font-size: cat-head-font-size($size);
|
|
20
20
|
line-height: cat-head-line-height($size);
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
@return cat-token('size.line.body.#{$size}');
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
@mixin cat-body($size, $weight:
|
|
39
|
+
@mixin cat-body($size, $weight: cat-token('font.weight.body')) {
|
|
40
40
|
// skip font family, as it is set on the body
|
|
41
41
|
// skip color, as it is set on the body
|
|
42
42
|
font-size: cat-body-font-size($size);
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
@return cat-token('size.line.mono.#{$size}');
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
@mixin cat-mono($size, $weight:
|
|
61
|
+
@mixin cat-mono($size, $weight: cat-token('font.weight.mono')) {
|
|
62
62
|
font-family: cat-mono-font-family();
|
|
63
63
|
font-size: cat-mono-font-size($size);
|
|
64
64
|
line-height: cat-mono-line-height($size);
|
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './cat-icon2.js';
|
|
2
3
|
|
|
3
|
-
const catAlertCss = ":host{display:block;margin-bottom:1rem}:host(:focus-visible){outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}:host([hidden]){display:none}.alert{font:inherit;
|
|
4
|
+
const catAlertCss = ":host{display:block;margin-bottom:1rem}:host(:focus-visible){outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}:host([hidden]){display:none}.alert{font:inherit;background-color:rgba(var(--bg), 0.1);border-radius:0.5rem;padding:1.25rem;display:flex;flex-direction:row;gap:0.5rem}.content{align-self:center}::slotted(:last-child){margin-bottom:0 !important}.alert-primary{--bg:var(--cat-primary-bg, 32, 127, 138)}.alert-primary cat-icon{color:#207f8a}.alert-secondary{--bg:105, 118, 135}.alert-secondary cat-icon{color:#697687}.alert-success{--bg:0, 132, 88}.alert-success cat-icon{color:#008458}.alert-warning{--bg:255, 206, 128}.alert-warning cat-icon{color:#ebb663}.alert-danger{--bg:217, 52, 13}.alert-danger cat-icon{color:#d9340d}";
|
|
4
5
|
|
|
5
6
|
const CatAlert$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
7
|
constructor() {
|
|
7
8
|
super();
|
|
8
9
|
this.__registerHost();
|
|
9
10
|
this.__attachShadow();
|
|
11
|
+
this.mapIcon = new Map([
|
|
12
|
+
['primary', 'star-circle-filled'],
|
|
13
|
+
['secondary', 'clock-filled'],
|
|
14
|
+
['success', 'check-circle-filled'],
|
|
15
|
+
['warning', 'danger-filled'],
|
|
16
|
+
['danger', 'cross-circle-filled']
|
|
17
|
+
]);
|
|
10
18
|
/**
|
|
11
19
|
* The color palette of the alert.
|
|
12
20
|
*/
|
|
13
21
|
this.color = 'primary';
|
|
22
|
+
/**
|
|
23
|
+
* Whether the icon of the alert is deactivated.
|
|
24
|
+
*/
|
|
25
|
+
this.noIcon = false;
|
|
14
26
|
}
|
|
15
27
|
render() {
|
|
16
28
|
return (h(Host, { tabindex: "0", role: this.role }, h("div", { part: "alert", class: {
|
|
17
29
|
alert: true,
|
|
18
30
|
[`alert-${this.color}`]: Boolean(this.color)
|
|
19
|
-
} }, h("slot", null))));
|
|
31
|
+
} }, !this.noIcon && h("cat-icon", { size: "l", icon: this.icon ? this.icon : this.mapIcon.get(this.color) }), h("div", { class: "content" }, h("slot", null)))));
|
|
20
32
|
}
|
|
21
33
|
get role() {
|
|
22
34
|
switch (this.color) {
|
|
@@ -29,19 +41,26 @@ const CatAlert$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
29
41
|
}
|
|
30
42
|
static get style() { return catAlertCss; }
|
|
31
43
|
}, [1, "cat-alert", {
|
|
32
|
-
"color": [1]
|
|
44
|
+
"color": [1],
|
|
45
|
+
"icon": [1],
|
|
46
|
+
"noIcon": [4, "no-icon"]
|
|
33
47
|
}]);
|
|
34
48
|
function defineCustomElement$1() {
|
|
35
49
|
if (typeof customElements === "undefined") {
|
|
36
50
|
return;
|
|
37
51
|
}
|
|
38
|
-
const components = ["cat-alert"];
|
|
52
|
+
const components = ["cat-alert", "cat-icon"];
|
|
39
53
|
components.forEach(tagName => { switch (tagName) {
|
|
40
54
|
case "cat-alert":
|
|
41
55
|
if (!customElements.get(tagName)) {
|
|
42
56
|
customElements.define(tagName, CatAlert$1);
|
|
43
57
|
}
|
|
44
58
|
break;
|
|
59
|
+
case "cat-icon":
|
|
60
|
+
if (!customElements.get(tagName)) {
|
|
61
|
+
defineCustomElement$2();
|
|
62
|
+
}
|
|
63
|
+
break;
|
|
45
64
|
} });
|
|
46
65
|
}
|
|
47
66
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cat-alert.js","mappings":"
|
|
1
|
+
{"file":"cat-alert.js","mappings":";;;AAAA,MAAM,WAAW,GAAG,mwBAAmwB;;MCa1wBA,UAAQ;EALrB;;;;IAMmB,YAAO,GAAwB,IAAI,GAAG,CAAC;MACtD,CAAC,SAAS,EAAE,oBAAoB,CAAC;MACjC,CAAC,WAAW,EAAE,cAAc,CAAC;MAC7B,CAAC,SAAS,EAAE,qBAAqB,CAAC;MAClC,CAAC,SAAS,EAAE,eAAe,CAAC;MAC5B,CAAC,QAAQ,EAAE,qBAAqB,CAAC;KAClC,CAAC,CAAC;;;;IAKK,UAAK,GAA+D,SAAS,CAAC;;;;IAU9E,WAAM,GAAG,KAAK,CAAC;GA8BxB;EA5BC,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,QAAQ,EAAC,GAAG,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IAChC,WACE,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE;QACL,KAAK,EAAE,IAAI;QACX,CAAC,SAAS,IAAI,CAAC,KAAK,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;OAC7C,IAEA,CAAC,IAAI,CAAC,MAAM,IAAI,gBAAU,IAAI,EAAC,GAAG,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAa,EAC3G,WAAK,KAAK,EAAC,SAAS,IAClB,eAAa,CACT,CACF,CACD,EACP;GACH;EAED,IAAY,IAAI;IACd,QAAQ,IAAI,CAAC,KAAK;MAChB,KAAK,QAAQ,CAAC;MACd,KAAK,SAAS;QACZ,OAAO,OAAO,CAAC;MACjB;QACE,OAAO,QAAQ,CAAC;KACnB;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CatAlert"],"sources":["./src/components/cat-alert/cat-alert.scss?tag=cat-alert&encapsulation=shadow","./src/components/cat-alert/cat-alert.tsx"],"sourcesContent":["@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: block;\n margin-bottom: $cat-body-margin-bottom;\n}\n\n:host(:focus-visible) {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.alert {\n font: inherit;\n background-color: cat-token-wrap(var(--bg), $alpha: 0.1);\n border-radius: cat-border-radius('l');\n padding: 1.25rem;\n display: flex;\n flex-direction: row;\n gap: 0.5rem;\n}\n\n.content {\n align-self: center;\n}\n\n::slotted(:last-child) {\n margin-bottom: 0 !important;\n}\n\n// ----- theme\n\n@mixin theme($theme) {\n .alert-#{$theme} {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n\n cat-icon {\n color: cat-token('color.ui.font.alert.#{$theme}');\n }\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n/**\n * Informs user about important changes or conditions in the interface. Use this\n * component if you need to capture user’s attention in a prominent way.\n *\n * @part alert - The alert element.\n */\n@Component({\n tag: 'cat-alert',\n styleUrl: 'cat-alert.scss',\n shadow: true\n})\nexport class CatAlert {\n private readonly mapIcon: Map<string, string> = new Map([\n ['primary', 'star-circle-filled'],\n ['secondary', 'clock-filled'],\n ['success', 'check-circle-filled'],\n ['warning', 'danger-filled'],\n ['danger', 'cross-circle-filled']\n ]);\n\n /**\n * The color palette of the alert.\n */\n @Prop() color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' = 'primary';\n\n /**\n * The name of an icon to be displayed in the alert.\n */\n @Prop() icon?: string;\n\n /**\n * Whether the icon of the alert is deactivated.\n */\n @Prop() noIcon = false;\n\n render() {\n return (\n <Host tabindex=\"0\" role={this.role}>\n <div\n part=\"alert\"\n class={{\n alert: true,\n [`alert-${this.color}`]: Boolean(this.color)\n }}\n >\n {!this.noIcon && <cat-icon size=\"l\" icon={this.icon ? this.icon : this.mapIcon.get(this.color)}></cat-icon>}\n <div class=\"content\">\n <slot></slot>\n </div>\n </div>\n </Host>\n );\n }\n\n private get role() {\n switch (this.color) {\n case 'danger':\n case 'warning':\n return 'alert';\n default:\n return 'status';\n }\n }\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cat-avatar.js","mappings":";;;;AAAA;;;;;;AAMA,MAAM,OAAO,GAAG,CAAC,GAAW;EAC1B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM;IACjC,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;IAC1B,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACxC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC;GACjB,CAAC,CAAC;AACL,CAAC;;ACbD,MAAM,YAAY,GAAG,o5CAAo5C;;MCY55CA,WAAS;EALtB;;;;;;;IAWU,SAAI,GAAkC,GAAG,CAAC;;;;IAK1C,UAAK,GAAG,KAAK,CAAC;;;;IAKd,UAAK,GAAG,EAAE,CAAC;GA4FpB;EAhEC,YAAY,CAAC,KAAc;IACzB,IAAI,KAAK,EAAE;MACT,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CACjB,OAAO,IAAI,CAAC,eAAe,GAAG,OAAO,KAAK,GAAG,CAAC,EAC9C,OAAO,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC,CACzC,CAAC;KACH;SAAM;MACL,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;KAClC;GACF;EAED,iBAAiB;IACf,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;GAC7B;EAED,mBAAmB;IACjB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;MACfC,QAAG,CAAC,IAAI,CAAC,qCAAqC,EAAE,IAAI,CAAC,CAAC;KACvD;GACF;EAED,MAAM;IACJ,IAAI,IAAI,CAAC,GAAG,EAAE;MACZ,QACE,SAAG,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,gBAAc,IAAI,CAAC,KAAK,IAC1G,IAAI,CAAC,OAAO,CACX,EACJ;KACH;SAAM;MACL,QACE,YAAM,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,gBAAc,IAAI,CAAC,KAAK,IACrE,IAAI,CAAC,OAAO,CACR,EACP;KACH;GACF;EAED,IAAY,OAAO;IACjB,OAAO,CAAC,IAAI,CAAC,eAAe;QACxB,CAAC,IAAI,CAAC,IAAI,GAAG,gBAAU,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAa,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1F,EAAE,CAAC;GACR;EAED,IAAY,QAAQ;IAClB,OAAO,EAAE,kBAAkB,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC;GACrD;EAED,IAAY,QAAQ;IAClB,OAAO;MACL,MAAM,EAAE,IAAI;MACZ,cAAc,EAAE,IAAI,CAAC,KAAK;MAC1B,CAAC,UAAU,IAAI,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;KAC5C,CAAC;GACH;EAEO,WAAW;;IACjB,QACE,MAAA,IAAI,CAAC,QAAQ,mCACb,CAAC,MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE;OACd,KAAK,CAAC,GAAG,CAAC;OACV,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;OACd,IAAI,CAAC,EAAE,CAAC,EACX;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CatAvatar","log"],"sources":["./src/utils/load-img.ts","./src/components/cat-avatar/cat-avatar.scss?tag=cat-avatar&encapsulation=shadow","./src/components/cat-avatar/cat-avatar.tsx"],"sourcesContent":["/**\n * Loads an image and wraps the result in a promise.\n *\n * @param src the image URL\n * @returns a promise\n */\nconst loadImg = (src: string): Promise<Event> => {\n return new Promise((resolve, reject) => {\n const image = new Image();\n image.addEventListener('load', resolve);\n image.addEventListener('error', reject);\n image.src = src;\n });\n};\n\nexport default loadImg;\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n /**\n * @prop --cat-avatar-bg: The background color of the avatar.\n * @prop --cat-avatar-fill: The text color of the avatar.\n * @prop --cat-avatar-size: The size of the avatar.\n * @prop --cat-avatar-font-size: The font size of the avatar.\n */\n display: inline-block;\n vertical-align: middle;\n @include cat-select(none);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.avatar {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: cat-border-radius('m');\n text-decoration: inherit;\n color: var(--cat-avatar-fill, cat-token('color.ui.font.avatar'));\n background-color: var(--cat-avatar-bg, cat-token('color.ui.background.avatar'));\n background-size: cover;\n background-position: center;\n white-space: nowrap;\n overflow: hidden;\n\n &:focus-visible {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n}\n\n.avatar-round {\n border-radius: 50%;\n}\n\n// ----- size\n\n@mixin size($size, $fontSize) {\n .avatar-#{$size} {\n width: var(--cat-avatar-size,
|
|
1
|
+
{"file":"cat-avatar.js","mappings":";;;;AAAA;;;;;;AAMA,MAAM,OAAO,GAAG,CAAC,GAAW;EAC1B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM;IACjC,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;IAC1B,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACxC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC;GACjB,CAAC,CAAC;AACL,CAAC;;ACbD,MAAM,YAAY,GAAG,o5CAAo5C;;MCY55CA,WAAS;EALtB;;;;;;;IAWU,SAAI,GAAkC,GAAG,CAAC;;;;IAK1C,UAAK,GAAG,KAAK,CAAC;;;;IAKd,UAAK,GAAG,EAAE,CAAC;GA4FpB;EAhEC,YAAY,CAAC,KAAc;IACzB,IAAI,KAAK,EAAE;MACT,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CACjB,OAAO,IAAI,CAAC,eAAe,GAAG,OAAO,KAAK,GAAG,CAAC,EAC9C,OAAO,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC,CACzC,CAAC;KACH;SAAM;MACL,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;KAClC;GACF;EAED,iBAAiB;IACf,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;GAC7B;EAED,mBAAmB;IACjB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;MACfC,QAAG,CAAC,IAAI,CAAC,qCAAqC,EAAE,IAAI,CAAC,CAAC;KACvD;GACF;EAED,MAAM;IACJ,IAAI,IAAI,CAAC,GAAG,EAAE;MACZ,QACE,SAAG,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,gBAAc,IAAI,CAAC,KAAK,IAC1G,IAAI,CAAC,OAAO,CACX,EACJ;KACH;SAAM;MACL,QACE,YAAM,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,gBAAc,IAAI,CAAC,KAAK,IACrE,IAAI,CAAC,OAAO,CACR,EACP;KACH;GACF;EAED,IAAY,OAAO;IACjB,OAAO,CAAC,IAAI,CAAC,eAAe;QACxB,CAAC,IAAI,CAAC,IAAI,GAAG,gBAAU,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAa,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1F,EAAE,CAAC;GACR;EAED,IAAY,QAAQ;IAClB,OAAO,EAAE,kBAAkB,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC;GACrD;EAED,IAAY,QAAQ;IAClB,OAAO;MACL,MAAM,EAAE,IAAI;MACZ,cAAc,EAAE,IAAI,CAAC,KAAK;MAC1B,CAAC,UAAU,IAAI,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;KAC5C,CAAC;GACH;EAEO,WAAW;;IACjB,QACE,MAAA,IAAI,CAAC,QAAQ,mCACb,CAAC,MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE;OACd,KAAK,CAAC,GAAG,CAAC;OACV,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;OACd,IAAI,CAAC,EAAE,CAAC,EACX;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CatAvatar","log"],"sources":["./src/utils/load-img.ts","./src/components/cat-avatar/cat-avatar.scss?tag=cat-avatar&encapsulation=shadow","./src/components/cat-avatar/cat-avatar.tsx"],"sourcesContent":["/**\n * Loads an image and wraps the result in a promise.\n *\n * @param src the image URL\n * @returns a promise\n */\nconst loadImg = (src: string): Promise<Event> => {\n return new Promise((resolve, reject) => {\n const image = new Image();\n image.addEventListener('load', resolve);\n image.addEventListener('error', reject);\n image.src = src;\n });\n};\n\nexport default loadImg;\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n$avatar-sizes: (\n 'xl': 3.5rem,\n 'l': 3rem,\n 'm': 2.5rem,\n 's': 2rem,\n 'xs': 1.5rem\n);\n\n:host {\n /**\n * @prop --cat-avatar-bg: The background color of the avatar.\n * @prop --cat-avatar-fill: The text color of the avatar.\n * @prop --cat-avatar-size: The size of the avatar.\n * @prop --cat-avatar-font-size: The font size of the avatar.\n */\n display: inline-block;\n vertical-align: middle;\n @include cat-select(none);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.avatar {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: cat-border-radius('m');\n text-decoration: inherit;\n color: var(--cat-avatar-fill, cat-token('color.ui.font.avatar'));\n background-color: var(--cat-avatar-bg, cat-token('color.ui.background.avatar'));\n background-size: cover;\n background-position: center;\n white-space: nowrap;\n overflow: hidden;\n\n &:focus-visible {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n}\n\n.avatar-round {\n border-radius: 50%;\n}\n\n// ----- size\n\n@mixin size($size, $fontSize) {\n .avatar-#{$size} {\n width: var(--cat-avatar-size, map.get($avatar-sizes, $size));\n height: var(--cat-avatar-size, map.get($avatar-sizes, $size));\n line-height: var(--cat-avatar-size, map.get($avatar-sizes, $size));\n font-size: var(--cat-avatar-font-size, cat-body-font-size($fontSize));\n }\n}\n\n@include size('xs', 'xs');\n@include size('s', 's');\n@include size('m', 'm');\n@include size('l', 'l');\n@include size('xl', 'xl');\n","import { Component, h, Prop, State, Watch } from '@stencil/core';\nimport log from 'loglevel';\nimport loadImg from '../../utils/load-img';\n\n/**\n * Avatars are used to represent a person or object.\n */\n@Component({\n tag: 'cat-avatar',\n styleUrl: 'cat-avatar.scss',\n shadow: true\n})\nexport class CatAvatar {\n @State() backgroundImage?: string;\n\n /**\n * The size of the avatar.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round avatar edges.\n */\n @Prop() round = false;\n\n /**\n * The label of the avatar.\n */\n @Prop() label = '';\n\n /**\n * Custom initials for the avatar.\n */\n @Prop() initials?: string;\n\n /**\n * An optional avatar image.\n */\n @Prop() src?: string;\n\n /**\n * An icon to be used instead of the initials.\n */\n @Prop() icon?: string;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop() url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop() urlTarget?: '_blank' | '_self';\n\n @Watch('src')\n onSrcChanged(value?: string): void {\n if (value) {\n loadImg(value).then(\n () => (this.backgroundImage = `url(${value})`),\n () => (this.backgroundImage = undefined)\n );\n } else {\n this.backgroundImage = undefined;\n }\n }\n\n componentWillLoad(): void {\n this.onSrcChanged(this.src);\n }\n\n componentWillRender(): void {\n if (!this.label) {\n log.warn('[A11y] Missing ARIA label on avatar', this);\n }\n }\n\n render() {\n if (this.url) {\n return (\n <a href={this.url} target={this.urlTarget} style={this.cssStyle} class={this.cssClass} aria-label={this.label}>\n {this.content}\n </a>\n );\n } else {\n return (\n <span style={this.cssStyle} class={this.cssClass} aria-label={this.label}>\n {this.content}\n </span>\n );\n }\n }\n\n private get content() {\n return !this.backgroundImage\n ? [this.icon ? <cat-icon icon={this.icon} size={this.size}></cat-icon> : this.getInitials()]\n : [];\n }\n\n private get cssStyle() {\n return { 'background-image': this.backgroundImage };\n }\n\n private get cssClass() {\n return {\n avatar: true,\n 'avatar-round': this.round,\n [`avatar-${this.size}`]: Boolean(this.size)\n };\n }\n\n private getInitials(): string {\n return (\n this.initials ??\n (this.label ?? '')\n .split(' ')\n .map(n => n[0])\n .join('')\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cat-badge.js","mappings":";;AAAA,MAAM,WAAW,GAAG,woEAAwoE;;MCa/oEA,UAAQ;EALrB;;;;;;;IASU,YAAO,GAA0B,QAAQ,CAAC;;;;IAK1C,UAAK,GAA+D,SAAS,CAAC;;;;IAK9E,SAAI,GAAkC,GAAG,CAAC;;;;IAK1C,UAAK,GAAG,KAAK,CAAC;;;;IAKd,UAAK,GAAG,KAAK,CAAC;GAmBvB;EAjBC,MAAM;IACJ,QACE,YACE,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE;QACL,KAAK,EAAE,IAAI;QACX,aAAa,EAAE,IAAI,CAAC,KAAK;QACzB,aAAa,EAAE,IAAI,CAAC,KAAK;QACzB,CAAC,SAAS,IAAI,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;QAChD,CAAC,SAAS,IAAI,CAAC,KAAK,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;QAC5C,CAAC,SAAS,IAAI,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;OAC3C,IAED,eAAa,CACR,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CatBadge"],"sources":["./src/components/cat-badge/cat-badge.scss?tag=cat-badge&encapsulation=shadow","./src/components/cat-badge/cat-badge.tsx"],"sourcesContent":["@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: inline-flex;\n max-width: 100%;\n vertical-align: baseline;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.badge {\n font: inherit;\n flex: 1 1 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: cat-border-radius('s');\n text-decoration: none;\n width: 100%;\n box-sizing: border-box;\n line-height: 1;\n white-space: nowrap;\n\n slot {\n display: inline-block;\n @include cat-ellipsis;\n }\n}\n\n// ----- round\n\n.badge-round {\n border-radius: 10rem;\n}\n\n// ----- theme\n\n.badge-filled {\n background-color: cat-token-wrap(var(--bg));\n color: cat-token-wrap(var(--fill));\n font-weight: 600;\n @include cat-font-smooth;\n}\n\n$-outline: inset 0 0 0 1px cat-token-wrap(var(--border), $alpha: 0.2);\n\n.badge-outlined {\n background-color: cat-token('color.ui.background.body');\n box-shadow: $-outline;\n color: cat-token-wrap(var(--text));\n}\n\n@mixin theme($theme) {\n .badge-#{$theme} {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n @if $theme == 'secondary' {\n --border: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n } @else {\n --border: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n\n// ----- size\n\n@mixin size($size, $fontSize) {\n .badge-#{$size} {\n height: cat-token('size.badge.height.#{$size}');\n min-width:
|
|
1
|
+
{"file":"cat-badge.js","mappings":";;AAAA,MAAM,WAAW,GAAG,woEAAwoE;;MCa/oEA,UAAQ;EALrB;;;;;;;IASU,YAAO,GAA0B,QAAQ,CAAC;;;;IAK1C,UAAK,GAA+D,SAAS,CAAC;;;;IAK9E,SAAI,GAAkC,GAAG,CAAC;;;;IAK1C,UAAK,GAAG,KAAK,CAAC;;;;IAKd,UAAK,GAAG,KAAK,CAAC;GAmBvB;EAjBC,MAAM;IACJ,QACE,YACE,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE;QACL,KAAK,EAAE,IAAI;QACX,aAAa,EAAE,IAAI,CAAC,KAAK;QACzB,aAAa,EAAE,IAAI,CAAC,KAAK;QACzB,CAAC,SAAS,IAAI,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;QAChD,CAAC,SAAS,IAAI,CAAC,KAAK,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;QAC5C,CAAC,SAAS,IAAI,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;OAC3C,IAED,eAAa,CACR,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CatBadge"],"sources":["./src/components/cat-badge/cat-badge.scss?tag=cat-badge&encapsulation=shadow","./src/components/cat-badge/cat-badge.tsx"],"sourcesContent":["@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n$badge-sizes: (\n 'xl': 1.75rem,\n 'l': 1.5rem,\n 'm': 1.25rem,\n 's': 1rem,\n 'xs': 0.75rem\n);\n\n:host {\n display: inline-flex;\n max-width: 100%;\n vertical-align: baseline;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.badge {\n font: inherit;\n flex: 1 1 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: cat-border-radius('s');\n text-decoration: none;\n width: 100%;\n box-sizing: border-box;\n line-height: 1;\n white-space: nowrap;\n\n slot {\n display: inline-block;\n @include cat-ellipsis;\n }\n}\n\n// ----- round\n\n.badge-round {\n border-radius: 10rem;\n}\n\n// ----- theme\n\n.badge-filled {\n background-color: cat-token-wrap(var(--bg));\n color: cat-token-wrap(var(--fill));\n font-weight: 600;\n @include cat-font-smooth;\n}\n\n$-outline: inset 0 0 0 1px cat-token-wrap(var(--border), $alpha: 0.2);\n\n.badge-outlined {\n background-color: cat-token('color.ui.background.body');\n box-shadow: $-outline;\n color: cat-token-wrap(var(--text));\n}\n\n@mixin theme($theme) {\n .badge-#{$theme} {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n @if $theme == 'secondary' {\n --border: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n } @else {\n --border: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n\n// ----- size\n\n@mixin size($size, $fontSize) {\n .badge-#{$size} {\n height: cat-token('size.badge.height.#{$size}');\n min-width: map.get($badge-sizes, $size);\n font-size: cat-token('size.badge.font.#{$size}');\n padding: 0 cat-token('size.badge.padding.horizontal.#{$size}');\n }\n}\n\n@include size('xs', 'xs');\n@include size('s', 's');\n@include size('m', 'm');\n@include size('l', 'l');\n@include size('xl', 'xl');\n\n// ----- pulse\n\n$-pulse-0: 0 0 0 0 cat-token-wrap(var(--bg));\n$-pulse-70: transparent 0 0 0 0.5rem;\n$-pulse-100: transparent 0 0 0 0;\n\n.badge-pulse {\n &.badge-filled {\n animation: 1.5s ease 0s infinite normal none running pulse;\n }\n\n &.badge-outlined {\n animation: 1.5s ease 0s infinite normal none running pulse-outlined;\n }\n}\n\n@keyframes pulse {\n 0% {\n box-shadow: $-pulse-0;\n }\n\n 70% {\n box-shadow: $-pulse-70;\n }\n\n 100% {\n box-shadow: $-pulse-100;\n }\n}\n\n@keyframes pulse-outlined {\n 0% {\n box-shadow: $-pulse-0, $-outline;\n }\n\n 70% {\n box-shadow: $-pulse-70, $-outline;\n }\n\n 100% {\n box-shadow: $-pulse-100, $-outline;\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * Badges are used to inform users of the status of an object or of an action\n * that’s been taken.\n *\n * @part badge - The badge element.\n */\n@Component({\n tag: 'cat-badge',\n styleUrl: 'cat-badge.scss',\n shadow: true\n})\nexport class CatBadge {\n /**\n * The rendering style of the badge.\n */\n @Prop() variant: 'filled' | 'outlined' = 'filled';\n\n /**\n * The color palette of the badge.\n */\n @Prop() color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' = 'primary';\n\n /**\n * The size of the badge.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round badge edges.\n */\n @Prop() round = false;\n\n /**\n * Draw attention to the badge with a subtle animation.\n */\n @Prop() pulse = false;\n\n render() {\n return (\n <span\n part=\"badge\"\n class={{\n badge: true,\n 'badge-round': this.round,\n 'badge-pulse': this.pulse,\n [`badge-${this.variant}`]: Boolean(this.variant),\n [`badge-${this.color}`]: Boolean(this.color),\n [`badge-${this.size}`]: Boolean(this.size)\n }}\n >\n <slot></slot>\n </span>\n );\n }\n}\n"],"version":3}
|
|
@@ -118,7 +118,7 @@ function createEmptyStyleRule(query) {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
const catButtonCss = ":host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}.cat-button{position:relative;font:inherit;display:flex;align-items:center;justify-content:center;border:none;border-radius:0.25rem;text-decoration:none;width:100%;box-sizing:border-box;cursor:pointer;transition:color 0.13s linear, border-color 0.13s linear, background-color 0.13s linear, box-shadow 0.13s linear}.cat-button:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-button-ellipsed .cat-button-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed;opacity:0.65;filter:grayscale(100%)}.cat-button-round{border-radius:10rem}.cat-button-loading{cursor:default}.cat-button-loading cat-spinner{position:absolute}.cat-button-loading>*:not(cat-spinner){visibility:hidden}.cat-button-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-button-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--base), 0.2);color:rgb(var(--text))}.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.05)}.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text{background-color:transparent;color:rgb(var(--text));text-decoration:none}.cat-button-text:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:none;background-color:rgba(var(--base), 0.05)}.cat-button-primary{--bg:var(--cat-primary-bg, 32, 127, 138);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 32, 127, 138);--base:var(--cat-primary-text, 32, 127, 138)}.cat-button-primary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-hover, 28, 112, 122);--fill:var(--cat-primary-fill-hover, 255, 255, 255);--text:var(--cat-primary-text-hover, 28, 112, 122)}.cat-button-primary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-active, 25, 101, 110);--fill:var(--cat-primary-fill-active, 255, 255, 255);--text:var(--cat-primary-text-active, 25, 101, 110)}.cat-button-secondary{--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0;--base:105, 118, 135}.cat-button-secondary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0}.cat-button-secondary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0}.cat-button-success{--bg:0, 132, 88;--fill:255, 255, 255;--text:0, 132, 88;--base:0, 132, 88}.cat-button-success:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:0, 117, 78;--fill:255, 255, 255;--text:0, 117, 78}.cat-button-success:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:0, 105, 70;--fill:255, 255, 255;--text:0, 105, 70}.cat-button-warning{--bg:255, 206, 128;--fill:0, 0, 0;--text:159, 97, 0;--base:159, 97, 0}.cat-button-warning:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:255, 214, 148;--fill:0, 0, 0;--text:159, 97, 0}.cat-button-warning:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:255, 222, 168;--fill:0, 0, 0;--text:159, 97, 0}.cat-button-danger{--bg:217, 52, 13;--fill:255, 255, 255;--text:217, 52, 13;--base:217, 52, 13}.cat-button-danger:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:194, 46, 11;--fill:255, 255, 255;--text:194, 46, 11}.cat-button-danger:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:174, 42, 10;--fill:255, 255, 255;--text:174, 42, 10}.cat-button-xs{min-width:1.5rem;padding:0.25rem 0.25rem;font-size:0.875rem;line-height:1rem}.cat-button-xs .cat-button-prefix{margin-right:0.25rem}.cat-button-xs .cat-button-suffix{margin-left:0.25rem}.cat-button-xs.cat-button-icon{width:1.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-xs{padding-left:1.25rem;padding-right:1.25rem}.cat-button-s{min-width:2rem;padding:0.375rem 0.5rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-s .cat-button-prefix{margin-right:0.25rem}.cat-button-s .cat-button-suffix{margin-left:0.25rem}.cat-button-s cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-s.cat-button-icon{width:2rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-s{padding-left:1.25rem;padding-right:1.25rem}.cat-button-m{min-width:2.5rem;padding:0.625rem 0.75rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-m .cat-button-prefix{margin-right:0.25rem}.cat-button-m .cat-button-suffix{margin-left:0.25rem}.cat-button-m cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-m.cat-button-icon{width:2.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-m{padding-left:1.25rem;padding-right:1.25rem}.cat-button-l{min-width:3rem;padding:0.875rem 1rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-l .cat-button-prefix{margin-right:0.25rem}.cat-button-l .cat-button-suffix{margin-left:0.25rem}.cat-button-l cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-l.cat-button-icon{width:3rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-l{padding-left:1.25rem;padding-right:1.25rem}.cat-button-xl{min-width:3.5rem;padding:1rem 1.25rem;font-size:1.125rem;line-height:1.5rem}.cat-button-xl .cat-button-prefix{margin-right:0.25rem}.cat-button-xl .cat-button-suffix{margin-left:0.25rem}.cat-button-xl.cat-button-icon{width:3.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-xl{padding-left:1.25rem;padding-right:1.25rem}.cat-button-active::before{content:\"\";display:block;position:absolute;top:0;left:0;width:0.25rem;height:100%;background:rgb(var(--base))}:host-context(nav){width:100%}:host-context(nav) .cat-button{box-shadow:none;border-radius:0;justify-content:left}:host-context(nav) .cat-button:focus-visible{outline-offset:-2px}:host(.cat-text-left) .cat-button{justify-content:left}:host(.cat-text-right) .cat-button{justify-content:right}";
|
|
121
|
+
const catButtonCss = ":host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}.cat-button{position:relative;font:inherit;display:flex;align-items:center;justify-content:center;border:none;border-radius:0.25rem;text-decoration:none;width:100%;box-sizing:border-box;cursor:pointer;transition:color 0.13s linear, border-color 0.13s linear, background-color 0.13s linear, box-shadow 0.13s linear}.cat-button:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-button-ellipsed .cat-button-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed;opacity:0.65;filter:grayscale(100%)}.cat-button-round{border-radius:10rem}.cat-button-loading{cursor:default}.cat-button-loading cat-spinner{position:absolute}.cat-button-loading>*:not(cat-spinner){visibility:hidden}.cat-button-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-button-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--base), 0.2);color:rgb(var(--text))}.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.05)}.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text{background-color:transparent;color:rgb(var(--text));text-decoration:none}.cat-button-text:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:none;background-color:rgba(var(--base), 0.05)}.cat-button-primary{--bg:var(--cat-primary-bg, 32, 127, 138);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 32, 127, 138);--base:var(--cat-primary-text, 32, 127, 138)}.cat-button-primary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-hover, 28, 112, 122);--fill:var(--cat-primary-fill-hover, 255, 255, 255);--text:var(--cat-primary-text-hover, 28, 112, 122)}.cat-button-primary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-active, 25, 101, 110);--fill:var(--cat-primary-fill-active, 255, 255, 255);--text:var(--cat-primary-text-active, 25, 101, 110)}.cat-button-secondary{--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0;--base:105, 118, 135}.cat-button-secondary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0}.cat-button-secondary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0}.cat-button-success{--bg:0, 132, 88;--fill:255, 255, 255;--text:0, 132, 88;--base:0, 132, 88}.cat-button-success:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:0, 117, 78;--fill:255, 255, 255;--text:0, 117, 78}.cat-button-success:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:0, 105, 70;--fill:255, 255, 255;--text:0, 105, 70}.cat-button-warning{--bg:255, 206, 128;--fill:0, 0, 0;--text:159, 97, 0;--base:159, 97, 0}.cat-button-warning:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:255, 214, 148;--fill:0, 0, 0;--text:159, 97, 0}.cat-button-warning:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:255, 222, 168;--fill:0, 0, 0;--text:159, 97, 0}.cat-button-danger{--bg:217, 52, 13;--fill:255, 255, 255;--text:217, 52, 13;--base:217, 52, 13}.cat-button-danger:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:194, 46, 11;--fill:255, 255, 255;--text:194, 46, 11}.cat-button-danger:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:174, 42, 10;--fill:255, 255, 255;--text:174, 42, 10}:host(.cat-button-pull:not([size])){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h:not([size])){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v:not([size])){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t:not([size])){margin-top:-0.625rem}:host(.cat-button-pull-l:not([size])){margin-left:-0.75rem}:host(.cat-button-pull-b:not([size])){margin-bottom:-0.625rem}:host(.cat-button-pull-r:not([size])){margin-right:-0.75rem}.cat-button-xs{min-width:1.5rem;padding:0.25rem 0.25rem;font-size:0.875rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400)}.cat-button-xs .cat-button-prefix{margin-right:0.25rem}.cat-button-xs .cat-button-suffix{margin-left:0.25rem}.cat-button-xs.cat-button-icon{width:1.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-xs{padding-left:1.25rem;padding-right:1.25rem}:host(.cat-button-pull[size=xs]){margin:-0.25rem -0.25rem}:host(.cat-button-pull-h[size=xs]){margin-left:-0.25rem;margin-right:-0.25rem}:host(.cat-button-pull-v[size=xs]){margin-top:-0.25rem;margin-bottom:-0.25rem}:host(.cat-button-pull-t[size=xs]){margin-top:-0.25rem}:host(.cat-button-pull-l[size=xs]){margin-left:-0.25rem}:host(.cat-button-pull-b[size=xs]){margin-bottom:-0.25rem}:host(.cat-button-pull-r[size=xs]){margin-right:-0.25rem}.cat-button-s{min-width:2rem;padding:0.375rem 0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400)}.cat-button-s .cat-button-prefix{margin-right:0.25rem}.cat-button-s .cat-button-suffix{margin-left:0.25rem}.cat-button-s cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-s.cat-button-icon{width:2rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-s{padding-left:1.25rem;padding-right:1.25rem}:host(.cat-button-pull[size=s]){margin:-0.375rem -0.5rem}:host(.cat-button-pull-h[size=s]){margin-left:-0.5rem;margin-right:-0.5rem}:host(.cat-button-pull-v[size=s]){margin-top:-0.375rem;margin-bottom:-0.375rem}:host(.cat-button-pull-t[size=s]){margin-top:-0.375rem}:host(.cat-button-pull-l[size=s]){margin-left:-0.5rem}:host(.cat-button-pull-b[size=s]){margin-bottom:-0.375rem}:host(.cat-button-pull-r[size=s]){margin-right:-0.5rem}.cat-button-m{min-width:2.5rem;padding:0.625rem 0.75rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400)}.cat-button-m .cat-button-prefix{margin-right:0.25rem}.cat-button-m .cat-button-suffix{margin-left:0.25rem}.cat-button-m cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-m.cat-button-icon{width:2.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-m{padding-left:1.25rem;padding-right:1.25rem}:host(.cat-button-pull[size=m]){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h[size=m]){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v[size=m]){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t[size=m]){margin-top:-0.625rem}:host(.cat-button-pull-l[size=m]){margin-left:-0.75rem}:host(.cat-button-pull-b[size=m]){margin-bottom:-0.625rem}:host(.cat-button-pull-r[size=m]){margin-right:-0.75rem}.cat-button-l{min-width:3rem;padding:0.875rem 1rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400)}.cat-button-l .cat-button-prefix{margin-right:0.25rem}.cat-button-l .cat-button-suffix{margin-left:0.25rem}.cat-button-l cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-l.cat-button-icon{width:3rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-l{padding-left:1.25rem;padding-right:1.25rem}:host(.cat-button-pull[size=l]){margin:-0.875rem -1rem}:host(.cat-button-pull-h[size=l]){margin-left:-1rem;margin-right:-1rem}:host(.cat-button-pull-v[size=l]){margin-top:-0.875rem;margin-bottom:-0.875rem}:host(.cat-button-pull-t[size=l]){margin-top:-0.875rem}:host(.cat-button-pull-l[size=l]){margin-left:-1rem}:host(.cat-button-pull-b[size=l]){margin-bottom:-0.875rem}:host(.cat-button-pull-r[size=l]){margin-right:-1rem}.cat-button-xl{min-width:3.5rem;padding:1rem 1.25rem;font-size:1.125rem;line-height:1.5rem;font-weight:var(--cat-font-weight-body, 400)}.cat-button-xl .cat-button-prefix{margin-right:0.25rem}.cat-button-xl .cat-button-suffix{margin-left:0.25rem}.cat-button-xl.cat-button-icon{width:3.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-xl{padding-left:1.25rem;padding-right:1.25rem}:host(.cat-button-pull[size=xl]){margin:-1rem -1.25rem}:host(.cat-button-pull-h[size=xl]){margin-left:-1.25rem;margin-right:-1.25rem}:host(.cat-button-pull-v[size=xl]){margin-top:-1rem;margin-bottom:-1rem}:host(.cat-button-pull-t[size=xl]){margin-top:-1rem}:host(.cat-button-pull-l[size=xl]){margin-left:-1.25rem}:host(.cat-button-pull-b[size=xl]){margin-bottom:-1rem}:host(.cat-button-pull-r[size=xl]){margin-right:-1.25rem}.cat-button-active::before{content:\"\";display:block;position:absolute;top:0;left:0;width:0.25rem;height:100%;background:rgb(var(--base))}:host-context(nav){width:100%}:host-context(nav) .cat-button{box-shadow:none;border-radius:0;justify-content:left}:host-context(nav) .cat-button:focus-visible{outline-offset:-2px}:host(.cat-text-left) .cat-button{justify-content:left}:host(.cat-text-right) .cat-button{justify-content:right}";
|
|
122
122
|
|
|
123
123
|
const CatButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
124
124
|
constructor() {
|