@carbon/ai-chat 0.0.1-test.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/es/components/tag/src/tag.css.js +12 -0
- package/es/components/tag/src/tag.d.ts +42 -0
- package/es/components/tag/src/tag.js +87 -0
- package/es/components/tag/src/tag.js.map +1 -0
- package/es/components/tag/src/tag.template.d.ts +18 -0
- package/es/components/tag/src/tag.template.js +44 -0
- package/es/components/tag/src/tag.template.js.map +1 -0
- package/es/components/tag/tag.d.ts +24 -0
- package/es/components/tag/tag.js +38 -0
- package/es/components/tag/tag.js.map +1 -0
- package/es/examples/tag/src/styles.css.js +12 -0
- package/es/index.d.ts +11 -0
- package/es/index.js +10 -0
- package/es/index.js.map +1 -0
- package/es/react/tag.d.ts +12 -0
- package/es/react/tag.js +18 -0
- package/es/react/tag.js.map +1 -0
- package/package.json +35 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2023
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import { css } from 'lit';
|
|
10
|
+
export default css([
|
|
11
|
+
':host(clabs-tag){display:flex;justify-content:center;padding:96px 48px;background-color:#222}:host(clabs-tag) .clabs--tag-container{position:relative;display:inline-block}:host(clabs-tag) .clabs--tag-button{display:inline-block;box-sizing:border-box;padding:16px;border-width:0;border-style:none;background-color:#525252;block-size:48px;-o-border-image:none;border-image:none;border-inline-start:4px solid var(--border-color,#67ba6e);color:#fff;font-size:18px;line-height:inherit}:host(clabs-tag) .clabs--tag-button:active,:host(clabs-tag) .clabs--tag-button:focus{outline:2px solid #fff;outline-offset:-2px}:host(clabs-tag) .clabs--tag-button:hover{background-color:#393939}:host(clabs-tag) .clabs--tag-button:active{background-color:#262626}:host(clabs-tag) .clabs--tag-button:focus,:host(clabs-tag) .clabs--tag-button:hover{cursor:pointer}:host(clabs-tag) .tooltip{position:absolute;z-index:1;padding:1rem;border-radius:2px;background-color:#333;color:#fff;inset-block-start:100%;inset-inline-start:50%;margin-block-start:10px;opacity:0;text-align:center;transform:translateX(-50%);visibility:hidden;white-space:nowrap}:host(clabs-tag) .tooltip::after{position:absolute;border-width:5px;border-style:solid;border-color:#333 transparent transparent;content:"";inset-block-start:-10px;inset-inline-start:50%;transform:scaleY(-1)}:host(clabs-tag) .clabs--tag-container:hover .tooltip{opacity:1;visibility:visible}',
|
|
12
|
+
]);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2023
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import { LitElement } from 'lit';
|
|
10
|
+
/**
|
|
11
|
+
* Input component using search typeahead api
|
|
12
|
+
*/
|
|
13
|
+
export declare class Tag extends LitElement {
|
|
14
|
+
static styles: any;
|
|
15
|
+
/**
|
|
16
|
+
* Text inside the tag
|
|
17
|
+
*/
|
|
18
|
+
text: any;
|
|
19
|
+
/**
|
|
20
|
+
* Left border color
|
|
21
|
+
*/
|
|
22
|
+
color: any;
|
|
23
|
+
/**
|
|
24
|
+
* Tooltip position
|
|
25
|
+
*/
|
|
26
|
+
tooltipPosition: any;
|
|
27
|
+
/**
|
|
28
|
+
* Tooltip text
|
|
29
|
+
*/
|
|
30
|
+
tooltipText: any;
|
|
31
|
+
/**
|
|
32
|
+
* updated - check changed properties
|
|
33
|
+
* @param {object} changedProperties - LIT object denoting changed attributes
|
|
34
|
+
*/
|
|
35
|
+
updated(changedProperties: any): void;
|
|
36
|
+
/**
|
|
37
|
+
* fire event when tag is clicked
|
|
38
|
+
*/
|
|
39
|
+
handleClick(): void;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=tag.d.ts.map
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2023
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
|
|
10
|
+
var c = arguments.length,
|
|
11
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
12
|
+
d;
|
|
13
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15
|
+
};
|
|
16
|
+
import { LitElement } from 'lit';
|
|
17
|
+
import { property } from 'lit/decorators.js';
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import styles from "./tag.css.js";
|
|
21
|
+
/**
|
|
22
|
+
* Input component using search typeahead api
|
|
23
|
+
*/ /**
|
|
24
|
+
* Input component using search typeahead api
|
|
25
|
+
*/
|
|
26
|
+
export class Tag extends LitElement {
|
|
27
|
+
/**
|
|
28
|
+
* updated - check changed properties
|
|
29
|
+
* @param {object} changedProperties - LIT object denoting changed attributes
|
|
30
|
+
*/
|
|
31
|
+
updated(changedProperties) {
|
|
32
|
+
super.updated(changedProperties);
|
|
33
|
+
if (changedProperties.has('color')) {
|
|
34
|
+
if (this.color === 'red') {
|
|
35
|
+
this.style.setProperty('--border-color', '#fa4d56');
|
|
36
|
+
} else if (this.color === 'magenta') {
|
|
37
|
+
this.style.setProperty('--border-color', '#ee5396');
|
|
38
|
+
} else if (this.color === 'purple') {
|
|
39
|
+
this.style.setProperty('--border-color', '#a56eff');
|
|
40
|
+
} else if (this.color === 'blue') {
|
|
41
|
+
this.style.setProperty('--border-color', '#4589ff');
|
|
42
|
+
} else if (this.color === 'cyan') {
|
|
43
|
+
this.style.setProperty('--border-color', '#1192e8');
|
|
44
|
+
} else if (this.color === 'teal') {
|
|
45
|
+
this.style.setProperty('--border-color', '#009d9a');
|
|
46
|
+
} else if (this.color === 'green') {
|
|
47
|
+
this.style.setProperty('--border-color', '#24a148');
|
|
48
|
+
} else if (this.color === 'gray') {
|
|
49
|
+
this.style.setProperty('--border-color', '#8d8d8d');
|
|
50
|
+
} else if (this.color === 'cool-gray') {
|
|
51
|
+
this.style.setProperty('--border-color', '#878d96');
|
|
52
|
+
} else if (this.color === 'warm-gray') {
|
|
53
|
+
this.style.setProperty('--border-color', '#8f8b8b');
|
|
54
|
+
} else {
|
|
55
|
+
this.style.setProperty('--border-color', '#24a148');
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* fire event when tag is clicked
|
|
61
|
+
*/
|
|
62
|
+
handleClick() {
|
|
63
|
+
this.dispatchEvent(new CustomEvent('tag-click', {
|
|
64
|
+
detail: {
|
|
65
|
+
message: 'Tag clicked'
|
|
66
|
+
}
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
Tag.styles = styles;
|
|
71
|
+
__decorate([property({
|
|
72
|
+
attribute: 'text',
|
|
73
|
+
type: String
|
|
74
|
+
})], Tag.prototype, "text", void 0);
|
|
75
|
+
__decorate([property({
|
|
76
|
+
attribute: 'color',
|
|
77
|
+
type: String
|
|
78
|
+
})], Tag.prototype, "color", void 0);
|
|
79
|
+
__decorate([property({
|
|
80
|
+
attribute: 'tooltip-position',
|
|
81
|
+
type: String
|
|
82
|
+
})], Tag.prototype, "tooltipPosition", void 0);
|
|
83
|
+
__decorate([property({
|
|
84
|
+
attribute: 'tooltip-text',
|
|
85
|
+
type: String
|
|
86
|
+
})], Tag.prototype, "tooltipText", void 0);
|
|
87
|
+
//# sourceMappingURL=tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/tag/src/tag.ts","components/tag/src/tag.js"],"names":["__decorate","decorators","target","key","desc","c","arguments","length","r","Object","getOwnPropertyDescriptor","d","Reflect","decorate","i","defineProperty","LitElement","property","styles","Tag","updated","changedProperties","has","color","style","setProperty","handleClick","dispatchEvent","CustomEvent","detail","message","attribute","type","String","prototype"],"mappings":"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","file":"tag.js","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\n\n// @ts-ignore\nimport styles from './tag.scss?inline';\n/**\n * Input component using search typeahead api\n */\nexport class Tag extends LitElement {\n static styles = styles;\n\n /**\n * Text inside the tag\n */\n @property({ attribute: 'text', type: String })\n text;\n\n /**\n * Left border color\n */\n @property({ attribute: 'color', type: String })\n color;\n\n /**\n * Tooltip position\n */\n @property({ attribute: 'tooltip-position', type: String })\n tooltipPosition;\n\n /**\n * Tooltip text\n */\n @property({ attribute: 'tooltip-text', type: String })\n tooltipText;\n\n /**\n * updated - check changed properties\n * @param {object} changedProperties - LIT object denoting changed attributes\n */\n updated(changedProperties) {\n super.updated(changedProperties);\n if (changedProperties.has('color')) {\n if (this.color === 'red') {\n this.style.setProperty('--border-color', '#fa4d56');\n } else if (this.color === 'magenta') {\n this.style.setProperty('--border-color', '#ee5396');\n } else if (this.color === 'purple') {\n this.style.setProperty('--border-color', '#a56eff');\n } else if (this.color === 'blue') {\n this.style.setProperty('--border-color', '#4589ff');\n } else if (this.color === 'cyan') {\n this.style.setProperty('--border-color', '#1192e8');\n } else if (this.color === 'teal') {\n this.style.setProperty('--border-color', '#009d9a');\n } else if (this.color === 'green') {\n this.style.setProperty('--border-color', '#24a148');\n } else if (this.color === 'gray') {\n this.style.setProperty('--border-color', '#8d8d8d');\n } else if (this.color === 'cool-gray') {\n this.style.setProperty('--border-color', '#878d96');\n } else if (this.color === 'warm-gray') {\n this.style.setProperty('--border-color', '#8f8b8b');\n } else {\n this.style.setProperty('--border-color', '#24a148');\n }\n }\n }\n\n /**\n * fire event when tag is clicked\n */\n handleClick() {\n this.dispatchEvent(\n new CustomEvent('tag-click', { detail: { message: 'Tag clicked' } })\n );\n }\n}\n","/**\n * @license\n *\n * Copyright IBM Corp. 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\n// @ts-ignore\nimport styles from './tag.scss?inline';\n/**\n * Input component using search typeahead api\n */\nexport class Tag extends LitElement {\n /**\n * updated - check changed properties\n * @param {object} changedProperties - LIT object denoting changed attributes\n */\n updated(changedProperties) {\n super.updated(changedProperties);\n if (changedProperties.has('color')) {\n if (this.color === 'red') {\n this.style.setProperty('--border-color', '#fa4d56');\n }\n else if (this.color === 'magenta') {\n this.style.setProperty('--border-color', '#ee5396');\n }\n else if (this.color === 'purple') {\n this.style.setProperty('--border-color', '#a56eff');\n }\n else if (this.color === 'blue') {\n this.style.setProperty('--border-color', '#4589ff');\n }\n else if (this.color === 'cyan') {\n this.style.setProperty('--border-color', '#1192e8');\n }\n else if (this.color === 'teal') {\n this.style.setProperty('--border-color', '#009d9a');\n }\n else if (this.color === 'green') {\n this.style.setProperty('--border-color', '#24a148');\n }\n else if (this.color === 'gray') {\n this.style.setProperty('--border-color', '#8d8d8d');\n }\n else if (this.color === 'cool-gray') {\n this.style.setProperty('--border-color', '#878d96');\n }\n else if (this.color === 'warm-gray') {\n this.style.setProperty('--border-color', '#8f8b8b');\n }\n else {\n this.style.setProperty('--border-color', '#24a148');\n }\n }\n }\n /**\n * fire event when tag is clicked\n */\n handleClick() {\n this.dispatchEvent(new CustomEvent('tag-click', { detail: { message: 'Tag clicked' } }));\n }\n}\nTag.styles = styles;\n__decorate([\n property({ attribute: 'text', type: String })\n], Tag.prototype, \"text\", void 0);\n__decorate([\n property({ attribute: 'color', type: String })\n], Tag.prototype, \"color\", void 0);\n__decorate([\n property({ attribute: 'tooltip-position', type: String })\n], Tag.prototype, \"tooltipPosition\", void 0);\n__decorate([\n property({ attribute: 'tooltip-text', type: String })\n], Tag.prototype, \"tooltipText\", void 0);\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2023
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import '@carbon/web-components/es/components/tooltip/index.js';
|
|
10
|
+
/**
|
|
11
|
+
* Lit template for card
|
|
12
|
+
*
|
|
13
|
+
* @param {object} customElementClass Class functionality for the custom element
|
|
14
|
+
* @returns {TemplateResult<1>} Lit html template
|
|
15
|
+
*/
|
|
16
|
+
export declare function tagTemplate(customElementClass: any): import("lit-html").TemplateResult<1>;
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=tag.template.d.ts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2023
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import { html } from 'lit';
|
|
10
|
+
import { settings } from '@carbon-labs/utilities/es/settings/index.js';
|
|
11
|
+
const {
|
|
12
|
+
stablePrefix: clabsPrefix
|
|
13
|
+
} = settings;
|
|
14
|
+
import '@carbon/web-components/es/components/tooltip/index.js';
|
|
15
|
+
/**
|
|
16
|
+
* Lit template for card
|
|
17
|
+
*
|
|
18
|
+
* @param {object} customElementClass Class functionality for the custom element
|
|
19
|
+
* @returns {TemplateResult<1>} Lit html template
|
|
20
|
+
*/
|
|
21
|
+
export function tagTemplate(customElementClass) {
|
|
22
|
+
const {
|
|
23
|
+
text: text,
|
|
24
|
+
color: color,
|
|
25
|
+
tooltipPosition: tooltipPosition,
|
|
26
|
+
tooltipText: tooltipText,
|
|
27
|
+
handleClick: handleClick
|
|
28
|
+
} = customElementClass;
|
|
29
|
+
return html` <div class="${clabsPrefix}--tag">
|
|
30
|
+
<div class="${clabsPrefix}--tag-container">
|
|
31
|
+
<cds-tooltip align="${tooltipPosition}">
|
|
32
|
+
<button
|
|
33
|
+
class="${clabsPrefix}--tag-button ${clabsPrefix}--tag-tooltip-trigger"
|
|
34
|
+
color="${color}"
|
|
35
|
+
tooltip-position="${tooltipPosition}"
|
|
36
|
+
@click="${handleClick}">
|
|
37
|
+
<slot>${text}</slot>
|
|
38
|
+
</button>
|
|
39
|
+
<cds-tooltip-content id="content"> ${tooltipText} </cds-tooltip-content>
|
|
40
|
+
</cds-tooltip>
|
|
41
|
+
</div>
|
|
42
|
+
</div>`;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=tag.template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/tag/src/tag.template.ts","components/tag/src/tag.template.js"],"names":["html","settings","stablePrefix","clabsPrefix","tagTemplate","customElementClass","text","color","tooltipPosition","tooltipText","handleClick"],"mappings":"AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;ADEA,SAASA,IAAI,QAAQ,KAAK;AAC1B,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,MAAM;EAAEC,YAAY,EAAEC;AAAW,CAAE,GAAGF,QAAQ;AAE9C,OAAO,uDAAuD;AAE9D;ACFA;AACA;AACA;AACA;AACA;ADIA,OAAM,SAAUG,WAAWA,CAACC,kBAAkB,EAAA;EAC5C,MAAM;IACJC,IAAI,EAAEA,IAAI;IACVC,KAAK,EAAEA,KAAK;IACZC,eAAe,EAAEA,eAAe;IAChCC,WAAW,EAAEA,WAAW;IACxBC,WAAW,EAAEA;EAAW,CACzB,GAAGL,kBAAkB;EAEtB,OAAOL,IAAI,gBAAgBG,WAAW;ACTxC,kBDUkBA,WAAW;ACT7B,4BDU4BK,eAAe;ACT3C;AACA,mBDUmBL,WAAW,gBAAgBA,WAAW;ACTzD,mBDUmBI,KAAK;ACTxB,8BDU8BC,eAAe;ACT7C,oBDUoBE,WAAW;ACT/B,kBDUkBJ,IAAI;ACTtB;AACA,6CDU6CG,WAAW;ACTxD;AACA;AACA,SDUS;AACT","file":"tag.template.js","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html } from 'lit';\nimport { settings } from '@carbon-labs/utilities/es/settings/index.js';\nconst { stablePrefix: clabsPrefix } = settings;\n\nimport '@carbon/web-components/es/components/tooltip/index.js';\n\n/**\n * Lit template for card\n *\n * @param {object} customElementClass Class functionality for the custom element\n * @returns {TemplateResult<1>} Lit html template\n */\nexport function tagTemplate(customElementClass) {\n const {\n text: text,\n color: color,\n tooltipPosition: tooltipPosition,\n tooltipText: tooltipText,\n handleClick: handleClick,\n } = customElementClass;\n\n return html` <div class=\"${clabsPrefix}--tag\">\n <div class=\"${clabsPrefix}--tag-container\">\n <cds-tooltip align=\"${tooltipPosition}\">\n <button\n class=\"${clabsPrefix}--tag-button ${clabsPrefix}--tag-tooltip-trigger\"\n color=\"${color}\"\n tooltip-position=\"${tooltipPosition}\"\n @click=\"${handleClick}\">\n <slot>${text}</slot>\n </button>\n <cds-tooltip-content id=\"content\"> ${tooltipText} </cds-tooltip-content>\n </cds-tooltip>\n </div>\n </div>`;\n}\n","/**\n * @license\n *\n * Copyright IBM Corp. 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { html } from 'lit';\nimport { settings } from '@carbon-labs/utilities/es/settings/index.js';\nconst { stablePrefix: clabsPrefix } = settings;\nimport '@carbon/web-components/es/components/tooltip/index.js';\n/**\n * Lit template for card\n *\n * @param {object} customElementClass Class functionality for the custom element\n * @returns {TemplateResult<1>} Lit html template\n */\nexport function tagTemplate(customElementClass) {\n const { text: text, color: color, tooltipPosition: tooltipPosition, tooltipText: tooltipText, handleClick: handleClick, } = customElementClass;\n return html ` <div class=\"${clabsPrefix}--tag\">\n <div class=\"${clabsPrefix}--tag-container\">\n <cds-tooltip align=\"${tooltipPosition}\">\n <button\n class=\"${clabsPrefix}--tag-button ${clabsPrefix}--tag-tooltip-trigger\"\n color=\"${color}\"\n tooltip-position=\"${tooltipPosition}\"\n @click=\"${handleClick}\">\n <slot>${text}</slot>\n </button>\n <cds-tooltip-content id=\"content\"> ${tooltipText} </cds-tooltip-content>\n </cds-tooltip>\n </div>\n </div>`;\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2023
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import { Tag } from './src/tag.js';
|
|
10
|
+
import { TemplateResult } from 'lit';
|
|
11
|
+
/**
|
|
12
|
+
* Component extending the Tag component
|
|
13
|
+
*
|
|
14
|
+
* @element clabs-tag
|
|
15
|
+
*/
|
|
16
|
+
declare class CLABSTag extends Tag {
|
|
17
|
+
/**
|
|
18
|
+
* Renders the template while passing in class functionality
|
|
19
|
+
*/
|
|
20
|
+
render(): TemplateResult<1>;
|
|
21
|
+
}
|
|
22
|
+
export default CLABSTag;
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=tag.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2023
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
|
|
10
|
+
var c = arguments.length,
|
|
11
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
12
|
+
d;
|
|
13
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15
|
+
};
|
|
16
|
+
import { customElement } from 'lit/decorators.js';
|
|
17
|
+
import { settings } from '@carbon-labs/utilities/es/settings/index.js';
|
|
18
|
+
import { Tag } from './src/tag.js';
|
|
19
|
+
import { tagTemplate } from './src/tag.template.js';
|
|
20
|
+
const {
|
|
21
|
+
stablePrefix: clabsPrefix
|
|
22
|
+
} = settings;
|
|
23
|
+
/**
|
|
24
|
+
* Component extending the Tag component
|
|
25
|
+
*
|
|
26
|
+
* @element clabs-tag
|
|
27
|
+
*/
|
|
28
|
+
let CLABSTag = class CLABSTag extends Tag {
|
|
29
|
+
/**
|
|
30
|
+
* Renders the template while passing in class functionality
|
|
31
|
+
*/
|
|
32
|
+
render() {
|
|
33
|
+
return tagTemplate(this);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
CLABSTag = __decorate([customElement(`${clabsPrefix}-tag`)], CLABSTag);
|
|
37
|
+
export default CLABSTag;
|
|
38
|
+
//# sourceMappingURL=tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/tag/tag.ts","components/tag/tag.js"],"names":["__decorate","decorators","target","key","desc","c","arguments","length","r","Object","getOwnPropertyDescriptor","d","Reflect","decorate","i","defineProperty","customElement","settings","Tag","tagTemplate","stablePrefix","clabsPrefix","CLABSTag","render"],"mappings":"AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIA,UAAU,GAAI,IAAI,IAAI,IAAI,CAACA,UAAU,IAAK,UAAUC,UAAU,EAAEC,MAAM,EAAEC,GAAG,EAAEC,IAAI,EAAE;EACnF,IAAIC,CAAC,GAAGC,SAAS,CAACC,MAAM;IAAEC,CAAC,GAAGH,CAAC,GAAG,CAAC,GAAGH,MAAM,GAAGE,IAAI,KAAK,IAAI,GAAGA,IAAI,GAAGK,MAAM,CAACC,wBAAwB,CAACR,MAAM,EAAEC,GAAG,CAAC,GAAGC,IAAI;IAAEO,CAAC;EAC5H,IAAI,OAAOC,OAAO,KAAK,QAAQ,IAAI,OAAOA,OAAO,CAACC,QAAQ,KAAK,UAAU,EAAEL,CAAC,GAAGI,OAAO,CAACC,QAAQ,CAACZ,UAAU,EAAEC,MAAM,EAAEC,GAAG,EAAEC,IAAI,CAAC,CAAC,KAC1H,KAAK,IAAIU,CAAC,GAAGb,UAAU,CAACM,MAAM,GAAG,CAAC,EAAEO,CAAC,IAAI,CAAC,EAAEA,CAAC,EAAE,EAAE,IAAIH,CAAC,GAAGV,UAAU,CAACa,CAAC,CAAC,EAAEN,CAAC,GAAG,CAACH,CAAC,GAAG,CAAC,GAAGM,CAAC,CAACH,CAAC,CAAC,GAAGH,CAAC,GAAG,CAAC,GAAGM,CAAC,CAACT,MAAM,EAAEC,GAAG,EAAEK,CAAC,CAAC,GAAGG,CAAC,CAACT,MAAM,EAAEC,GAAG,CAAC,KAAKK,CAAC;EACjJ,OAAOH,CAAC,GAAG,CAAC,IAAIG,CAAC,IAAIC,MAAM,CAACM,cAAc,CAACb,MAAM,EAAEC,GAAG,EAAEK,CAAC,CAAC,EAAEA,CAAC;AACjE,CAAC;ADJD,SAASQ,aAAa,QAAQ,mBAAmB;AACjD,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SAASC,GAAG,QAAQ,cAAc;AAElC,SAASC,WAAW,QAAQ,uBAAuB;AAEnD,MAAM;EAAEC,YAAY,EAAEC;AAAW,CAAE,GAAGJ,QAAQ;AAE9C;ACGA;AACA;AACA;AACA;ADAA,IAAMK,QAAQ,GAAd,MAAMA,QAAS,SAAQJ,GAAG,CAAA;EACxB;ACEF;AACA;EDAEK,MAAMA,CAAA,EAAA;IACJ,OAAOJ,WAAW,CAAC,IAAI,CAAC;EAC1B;ACEF,CDDC;AAPKG,QAAQ,GAAAtB,UAAA,CAAA,CADbgB,aAAa,CAAC,GAAGK,WAAW,MAAM,CAAC,CCYnC,EDXKC,QAAQ,CAOb;AAED,eAAeA,QAAQ","file":"tag.js","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { customElement } from 'lit/decorators.js';\nimport { settings } from '@carbon-labs/utilities/es/settings/index.js';\nimport { Tag } from './src/tag.js';\nimport { TemplateResult } from 'lit';\nimport { tagTemplate } from './src/tag.template.js';\n\nconst { stablePrefix: clabsPrefix } = settings;\n\n/**\n * Component extending the Tag component\n *\n * @element clabs-tag\n */\n@customElement(`${clabsPrefix}-tag`)\nclass CLABSTag extends Tag {\n /**\n * Renders the template while passing in class functionality\n */\n render(): TemplateResult<1> {\n return tagTemplate(this);\n }\n}\n\nexport default CLABSTag;\n","/**\n * @license\n *\n * Copyright IBM Corp. 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from 'lit/decorators.js';\nimport { settings } from '@carbon-labs/utilities/es/settings/index.js';\nimport { Tag } from './src/tag.js';\nimport { tagTemplate } from './src/tag.template.js';\nconst { stablePrefix: clabsPrefix } = settings;\n/**\n * Component extending the Tag component\n *\n * @element clabs-tag\n */\nlet CLABSTag = class CLABSTag extends Tag {\n /**\n * Renders the template while passing in class functionality\n */\n render() {\n return tagTemplate(this);\n }\n};\nCLABSTag = __decorate([\n customElement(`${clabsPrefix}-tag`)\n], CLABSTag);\nexport default CLABSTag;\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2023
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import { css } from 'lit';
|
|
10
|
+
export default css([
|
|
11
|
+
"a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{padding:0;border:0;margin:0;font:inherit;font-size:100%;vertical-align:baseline}button,input,select,textarea{border-radius:0;font-family:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{background-color:var(--cds-background,#fff);color:var(--cds-text-primary,#161616);line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote::after,blockquote::before,q::after,q::before{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}html{box-sizing:border-box}*,::after,::before{box-sizing:inherit}html{font-size:100%}body{font-weight:400;font-family:'IBM Plex Sans',system-ui,-apple-system,BlinkMacSystemFont,'.SFNSText-Regular',sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}code{font-family:'IBM Plex Mono',system-ui,-apple-system,BlinkMacSystemFont,'.SFNSText-Regular',monospace}strong{font-weight:600}@media screen and (-ms-high-contrast:active){svg{fill:ButtonText}}h1{font-size:var(--cds-heading-06-font-size,2.625rem);font-weight:var(--cds-heading-06-font-weight,300);line-height:var(--cds-heading-06-line-height,1.199);letter-spacing:var(--cds-heading-06-letter-spacing,0)}h2{font-size:var(--cds-heading-05-font-size,2rem);font-weight:var(--cds-heading-05-font-weight,400);line-height:var(--cds-heading-05-line-height,1.25);letter-spacing:var(--cds-heading-05-letter-spacing,0)}h3{font-size:var(--cds-heading-04-font-size,1.75rem);font-weight:var(--cds-heading-04-font-weight,400);line-height:var(--cds-heading-04-line-height,1.28572);letter-spacing:var(--cds-heading-04-letter-spacing,0)}h4{font-size:var(--cds-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);line-height:var(--cds-heading-03-line-height,1.4);letter-spacing:var(--cds-heading-03-letter-spacing,0)}h5{font-size:var(--cds-heading-02-font-size,1rem);font-weight:var(--cds-heading-02-font-weight,600);line-height:var(--cds-heading-02-line-height,1.5);letter-spacing:var(--cds-heading-02-letter-spacing,0)}h6{font-size:var(--cds-heading-01-font-size,.875rem);font-weight:var(--cds-heading-01-font-weight,600);line-height:var(--cds-heading-01-line-height,1.42857);letter-spacing:var(--cds-heading-01-letter-spacing,.16px)}p{font-size:var(--cds-body-02-font-size,1rem);font-weight:var(--cds-body-02-font-weight,400);line-height:var(--cds-body-02-line-height,1.5);letter-spacing:var(--cds-body-02-letter-spacing,0)}a{color:var(--cds-link-primary,#0062fe)}em{font-style:italic}:root{--cds-ai-aura-end:rgba(255, 255, 255, 0);--cds-ai-aura-hover-background:#edf5ff;--cds-ai-aura-hover-end:rgba(255, 255, 255, 0);--cds-ai-aura-hover-start:rgba(69, 137, 255, 0.32);--cds-ai-aura-start:rgba(69, 137, 255, 0.1);--cds-ai-aura-start-sm:rgba(69, 137, 255, 0.16);--cds-ai-border-end:#78a9ff;--cds-ai-border-start:rgba(166, 200, 255, 0.64);--cds-ai-border-strong:#4589ff;--cds-ai-drop-shadow:rgba(15, 98, 254, 0.1);--cds-ai-inner-shadow:rgba(69, 137, 255, 0.1);--cds-ai-overlay:rgba(0, 17, 65, 0.5);--cds-ai-popover-background:#ffffff;--cds-ai-popover-caret-bottom:#78a9ff;--cds-ai-popover-caret-bottom-background:#eaf1ff;--cds-ai-popover-caret-bottom-background-actions:#e9effa;--cds-ai-popover-caret-center:#a0c3ff;--cds-ai-popover-shadow-outer-01:rgba(0, 67, 206, 0.06);--cds-ai-popover-shadow-outer-02:rgba(0, 0, 0, 0.04);--cds-ai-skeleton-background:#d0e2ff;--cds-ai-skeleton-element-background:#4589ff;--cds-background:#ffffff;--cds-background-active:rgba(141, 141, 141, 0.5);--cds-background-brand:#0f62fe;--cds-background-hover:rgba(141, 141, 141, 0.12);--cds-background-inverse:#393939;--cds-background-inverse-hover:#474747;--cds-background-selected:rgba(141, 141, 141, 0.2);--cds-background-selected-hover:rgba(141, 141, 141, 0.32);--cds-border-disabled:#c6c6c6;--cds-border-interactive:#0f62fe;--cds-border-inverse:#161616;--cds-border-strong-01:#8d8d8d;--cds-border-strong-02:#8d8d8d;--cds-border-strong-03:#8d8d8d;--cds-border-subtle-00:#e0e0e0;--cds-border-subtle-01:#c6c6c6;--cds-border-subtle-02:#e0e0e0;--cds-border-subtle-03:#c6c6c6;--cds-border-subtle-selected-01:#c6c6c6;--cds-border-subtle-selected-02:#c6c6c6;--cds-border-subtle-selected-03:#c6c6c6;--cds-border-tile-01:#c6c6c6;--cds-border-tile-02:#a8a8a8;--cds-border-tile-03:#c6c6c6;--cds-chat-avatar-agent:#393939;--cds-chat-avatar-bot:#6f6f6f;--cds-chat-avatar-user:#0f62fe;--cds-chat-bubble-agent:#ffffff;--cds-chat-bubble-border:#e0e0e0;--cds-chat-bubble-user:#e0e0e0;--cds-chat-button:#0f62fe;--cds-chat-button-active:rgba(141, 141, 141, 0.5);--cds-chat-button-hover:rgba(141, 141, 141, 0.12);--cds-chat-button-selected:rgba(141, 141, 141, 0.2);--cds-chat-button-text-hover:#0043ce;--cds-chat-button-text-selected:#525252;--cds-chat-header-background:#ffffff;--cds-chat-prompt-background:#ffffff;--cds-chat-prompt-border-end:rgba(244, 244, 244, 0);--cds-chat-prompt-border-start:#f4f4f4;--cds-chat-shell-background:#ffffff;--cds-field-01:#f4f4f4;--cds-field-02:#ffffff;--cds-field-03:#f4f4f4;--cds-field-hover-01:#e8e8e8;--cds-field-hover-02:#e8e8e8;--cds-field-hover-03:#e8e8e8;--cds-focus:#0f62fe;--cds-focus-inset:#ffffff;--cds-focus-inverse:#ffffff;--cds-highlight:#d0e2ff;--cds-icon-disabled:rgba(22, 22, 22, 0.25);--cds-icon-interactive:#0f62fe;--cds-icon-inverse:#ffffff;--cds-icon-on-color:#ffffff;--cds-icon-on-color-disabled:#8d8d8d;--cds-icon-primary:#161616;--cds-icon-secondary:#525252;--cds-interactive:#0f62fe;--cds-layer-01:#f4f4f4;--cds-layer-02:#ffffff;--cds-layer-03:#f4f4f4;--cds-layer-accent-01:#e0e0e0;--cds-layer-accent-02:#e0e0e0;--cds-layer-accent-03:#e0e0e0;--cds-layer-accent-active-01:#a8a8a8;--cds-layer-accent-active-02:#a8a8a8;--cds-layer-accent-active-03:#a8a8a8;--cds-layer-accent-hover-01:#d1d1d1;--cds-layer-accent-hover-02:#d1d1d1;--cds-layer-accent-hover-03:#d1d1d1;--cds-layer-active-01:#c6c6c6;--cds-layer-active-02:#c6c6c6;--cds-layer-active-03:#c6c6c6;--cds-layer-hover-01:#e8e8e8;--cds-layer-hover-02:#e8e8e8;--cds-layer-hover-03:#e8e8e8;--cds-layer-selected-01:#e0e0e0;--cds-layer-selected-02:#e0e0e0;--cds-layer-selected-03:#e0e0e0;--cds-layer-selected-disabled:#8d8d8d;--cds-layer-selected-hover-01:#d1d1d1;--cds-layer-selected-hover-02:#d1d1d1;--cds-layer-selected-hover-03:#d1d1d1;--cds-layer-selected-inverse:#161616;--cds-link-inverse:#78a9ff;--cds-link-inverse-active:#f4f4f4;--cds-link-inverse-hover:#a6c8ff;--cds-link-inverse-visited:#be95ff;--cds-link-primary:#0f62fe;--cds-link-primary-hover:#0043ce;--cds-link-secondary:#0043ce;--cds-link-visited:#8a3ffc;--cds-overlay:rgba(22, 22, 22, 0.5);--cds-shadow:rgba(0, 0, 0, 0.3);--cds-skeleton-background:#e8e8e8;--cds-skeleton-element:#c6c6c6;--cds-support-caution-major:#ff832b;--cds-support-caution-minor:#f1c21b;--cds-support-caution-undefined:#8a3ffc;--cds-support-error:#da1e28;--cds-support-error-inverse:#fa4d56;--cds-support-info:#0043ce;--cds-support-info-inverse:#4589ff;--cds-support-success:#24a148;--cds-support-success-inverse:#42be65;--cds-support-warning:#f1c21b;--cds-support-warning-inverse:#f1c21b;--cds-text-disabled:rgba(22, 22, 22, 0.25);--cds-text-error:#da1e28;--cds-text-helper:#6f6f6f;--cds-text-inverse:#ffffff;--cds-text-on-color:#ffffff;--cds-text-on-color-disabled:#8d8d8d;--cds-text-placeholder:rgba(22, 22, 22, 0.4);--cds-text-primary:#161616;--cds-text-secondary:#525252;--cds-toggle-off:#8d8d8d;--cds-spacing-01:0.125rem;--cds-spacing-02:0.25rem;--cds-spacing-03:0.5rem;--cds-spacing-04:0.75rem;--cds-spacing-05:1rem;--cds-spacing-06:1.5rem;--cds-spacing-07:2rem;--cds-spacing-08:2.5rem;--cds-spacing-09:3rem;--cds-spacing-10:4rem;--cds-spacing-11:5rem;--cds-spacing-12:6rem;--cds-spacing-13:10rem;--cds-fluid-spacing-01:0;--cds-fluid-spacing-02:2vw;--cds-fluid-spacing-03:5vw;--cds-fluid-spacing-04:10vw;--cds-caption-01-font-size:0.75rem;--cds-caption-01-font-weight:400;--cds-caption-01-line-height:1.33333;--cds-caption-01-letter-spacing:0.32px;--cds-caption-02-font-size:0.875rem;--cds-caption-02-font-weight:400;--cds-caption-02-line-height:1.28572;--cds-caption-02-letter-spacing:0.32px;--cds-label-01-font-size:0.75rem;--cds-label-01-font-weight:400;--cds-label-01-line-height:1.33333;--cds-label-01-letter-spacing:0.32px;--cds-label-02-font-size:0.875rem;--cds-label-02-font-weight:400;--cds-label-02-line-height:1.28572;--cds-label-02-letter-spacing:0.16px;--cds-helper-text-01-font-size:0.75rem;--cds-helper-text-01-line-height:1.33333;--cds-helper-text-01-letter-spacing:0.32px;--cds-helper-text-02-font-size:0.875rem;--cds-helper-text-02-font-weight:400;--cds-helper-text-02-line-height:1.28572;--cds-helper-text-02-letter-spacing:0.16px;--cds-body-short-01-font-size:0.875rem;--cds-body-short-01-font-weight:400;--cds-body-short-01-line-height:1.28572;--cds-body-short-01-letter-spacing:0.16px;--cds-body-short-02-font-size:1rem;--cds-body-short-02-font-weight:400;--cds-body-short-02-line-height:1.375;--cds-body-short-02-letter-spacing:0;--cds-body-long-01-font-size:0.875rem;--cds-body-long-01-font-weight:400;--cds-body-long-01-line-height:1.42857;--cds-body-long-01-letter-spacing:0.16px;--cds-body-long-02-font-size:1rem;--cds-body-long-02-font-weight:400;--cds-body-long-02-line-height:1.5;--cds-body-long-02-letter-spacing:0;--cds-code-01-font-family:'IBM Plex Mono',system-ui,-apple-system,BlinkMacSystemFont,'.SFNSText-Regular',monospace;--cds-code-01-font-size:0.75rem;--cds-code-01-font-weight:400;--cds-code-01-line-height:1.33333;--cds-code-01-letter-spacing:0.32px;--cds-code-02-font-family:'IBM Plex Mono',system-ui,-apple-system,BlinkMacSystemFont,'.SFNSText-Regular',monospace;--cds-code-02-font-size:0.875rem;--cds-code-02-font-weight:400;--cds-code-02-line-height:1.42857;--cds-code-02-letter-spacing:0.32px;--cds-heading-01-font-size:0.875rem;--cds-heading-01-font-weight:600;--cds-heading-01-line-height:1.42857;--cds-heading-01-letter-spacing:0.16px;--cds-heading-02-font-size:1rem;--cds-heading-02-font-weight:600;--cds-heading-02-line-height:1.5;--cds-heading-02-letter-spacing:0;--cds-productive-heading-01-font-size:0.875rem;--cds-productive-heading-01-font-weight:600;--cds-productive-heading-01-line-height:1.28572;--cds-productive-heading-01-letter-spacing:0.16px;--cds-productive-heading-02-font-size:1rem;--cds-productive-heading-02-font-weight:600;--cds-productive-heading-02-line-height:1.375;--cds-productive-heading-02-letter-spacing:0;--cds-productive-heading-03-font-size:1.25rem;--cds-productive-heading-03-font-weight:400;--cds-productive-heading-03-line-height:1.4;--cds-productive-heading-03-letter-spacing:0;--cds-productive-heading-04-font-size:1.75rem;--cds-productive-heading-04-font-weight:400;--cds-productive-heading-04-line-height:1.28572;--cds-productive-heading-04-letter-spacing:0;--cds-productive-heading-05-font-size:2rem;--cds-productive-heading-05-font-weight:400;--cds-productive-heading-05-line-height:1.25;--cds-productive-heading-05-letter-spacing:0;--cds-productive-heading-06-font-size:2.625rem;--cds-productive-heading-06-font-weight:300;--cds-productive-heading-06-line-height:1.199;--cds-productive-heading-06-letter-spacing:0;--cds-productive-heading-07-font-size:3.375rem;--cds-productive-heading-07-font-weight:300;--cds-productive-heading-07-line-height:1.19;--cds-productive-heading-07-letter-spacing:0;--cds-expressive-paragraph-01-font-size:1.5rem;--cds-expressive-paragraph-01-font-weight:300;--cds-expressive-paragraph-01-line-height:1.334;--cds-expressive-paragraph-01-letter-spacing:0;--cds-expressive-heading-01-font-size:0.875rem;--cds-expressive-heading-01-font-weight:600;--cds-expressive-heading-01-line-height:1.42857;--cds-expressive-heading-01-letter-spacing:0.16px;--cds-expressive-heading-02-font-size:1rem;--cds-expressive-heading-02-font-weight:600;--cds-expressive-heading-02-line-height:1.5;--cds-expressive-heading-02-letter-spacing:0;--cds-expressive-heading-03-font-size:1.25rem;--cds-expressive-heading-03-font-weight:400;--cds-expressive-heading-03-line-height:1.4;--cds-expressive-heading-03-letter-spacing:0;--cds-expressive-heading-04-font-size:1.75rem;--cds-expressive-heading-04-font-weight:400;--cds-expressive-heading-04-line-height:1.28572;--cds-expressive-heading-04-letter-spacing:0;--cds-expressive-heading-05-font-size:2rem;--cds-expressive-heading-05-font-weight:400;--cds-expressive-heading-05-line-height:1.25;--cds-expressive-heading-05-letter-spacing:0;--cds-expressive-heading-06-font-size:2rem;--cds-expressive-heading-06-font-weight:600;--cds-expressive-heading-06-line-height:1.25;--cds-expressive-heading-06-letter-spacing:0;--cds-quotation-01-font-family:'IBM Plex Serif',system-ui,-apple-system,BlinkMacSystemFont,'.SFNSText-Regular',serif;--cds-quotation-01-font-size:1.25rem;--cds-quotation-01-font-weight:400;--cds-quotation-01-line-height:1.3;--cds-quotation-01-letter-spacing:0;--cds-quotation-02-font-family:'IBM Plex Serif',system-ui,-apple-system,BlinkMacSystemFont,'.SFNSText-Regular',serif;--cds-quotation-02-font-size:2rem;--cds-quotation-02-font-weight:300;--cds-quotation-02-line-height:1.25;--cds-quotation-02-letter-spacing:0;--cds-display-01-font-size:2.625rem;--cds-display-01-font-weight:300;--cds-display-01-line-height:1.19;--cds-display-01-letter-spacing:0;--cds-display-02-font-size:2.625rem;--cds-display-02-font-weight:600;--cds-display-02-line-height:1.19;--cds-display-02-letter-spacing:0;--cds-display-03-font-size:2.625rem;--cds-display-03-font-weight:300;--cds-display-03-line-height:1.19;--cds-display-03-letter-spacing:0;--cds-display-04-font-size:2.625rem;--cds-display-04-font-weight:300;--cds-display-04-line-height:1.19;--cds-display-04-letter-spacing:0;--cds-legal-01-font-size:0.75rem;--cds-legal-01-font-weight:400;--cds-legal-01-line-height:1.33333;--cds-legal-01-letter-spacing:0.32px;--cds-legal-02-font-size:0.875rem;--cds-legal-02-font-weight:400;--cds-legal-02-line-height:1.28572;--cds-legal-02-letter-spacing:0.16px;--cds-body-compact-01-font-size:0.875rem;--cds-body-compact-01-font-weight:400;--cds-body-compact-01-line-height:1.28572;--cds-body-compact-01-letter-spacing:0.16px;--cds-body-compact-02-font-size:1rem;--cds-body-compact-02-font-weight:400;--cds-body-compact-02-line-height:1.375;--cds-body-compact-02-letter-spacing:0;--cds-heading-compact-01-font-size:0.875rem;--cds-heading-compact-01-font-weight:600;--cds-heading-compact-01-line-height:1.28572;--cds-heading-compact-01-letter-spacing:0.16px;--cds-heading-compact-02-font-size:1rem;--cds-heading-compact-02-font-weight:600;--cds-heading-compact-02-line-height:1.375;--cds-heading-compact-02-letter-spacing:0;--cds-body-01-font-size:0.875rem;--cds-body-01-font-weight:400;--cds-body-01-line-height:1.42857;--cds-body-01-letter-spacing:0.16px;--cds-body-02-font-size:1rem;--cds-body-02-font-weight:400;--cds-body-02-line-height:1.5;--cds-body-02-letter-spacing:0;--cds-heading-03-font-size:1.25rem;--cds-heading-03-font-weight:400;--cds-heading-03-line-height:1.4;--cds-heading-03-letter-spacing:0;--cds-heading-04-font-size:1.75rem;--cds-heading-04-font-weight:400;--cds-heading-04-line-height:1.28572;--cds-heading-04-letter-spacing:0;--cds-heading-05-font-size:2rem;--cds-heading-05-font-weight:400;--cds-heading-05-line-height:1.25;--cds-heading-05-letter-spacing:0;--cds-heading-06-font-size:2.625rem;--cds-heading-06-font-weight:300;--cds-heading-06-line-height:1.199;--cds-heading-06-letter-spacing:0;--cds-heading-07-font-size:3.375rem;--cds-heading-07-font-weight:300;--cds-heading-07-line-height:1.19;--cds-heading-07-letter-spacing:0;--cds-fluid-heading-03-font-size:1.25rem;--cds-fluid-heading-03-font-weight:400;--cds-fluid-heading-03-line-height:1.4;--cds-fluid-heading-03-letter-spacing:0;--cds-fluid-heading-04-font-size:1.75rem;--cds-fluid-heading-04-font-weight:400;--cds-fluid-heading-04-line-height:1.28572;--cds-fluid-heading-04-letter-spacing:0;--cds-fluid-heading-05-font-size:2rem;--cds-fluid-heading-05-font-weight:400;--cds-fluid-heading-05-line-height:1.25;--cds-fluid-heading-05-letter-spacing:0;--cds-fluid-heading-06-font-size:2rem;--cds-fluid-heading-06-font-weight:600;--cds-fluid-heading-06-line-height:1.25;--cds-fluid-heading-06-letter-spacing:0;--cds-fluid-paragraph-01-font-size:1.5rem;--cds-fluid-paragraph-01-font-weight:300;--cds-fluid-paragraph-01-line-height:1.334;--cds-fluid-paragraph-01-letter-spacing:0;--cds-fluid-quotation-01-font-family:'IBM Plex Serif',system-ui,-apple-system,BlinkMacSystemFont,'.SFNSText-Regular',serif;--cds-fluid-quotation-01-font-size:1.25rem;--cds-fluid-quotation-01-font-weight:400;--cds-fluid-quotation-01-line-height:1.3;--cds-fluid-quotation-01-letter-spacing:0;--cds-fluid-quotation-02-font-family:'IBM Plex Serif',system-ui,-apple-system,BlinkMacSystemFont,'.SFNSText-Regular',serif;--cds-fluid-quotation-02-font-size:2rem;--cds-fluid-quotation-02-font-weight:300;--cds-fluid-quotation-02-line-height:1.25;--cds-fluid-quotation-02-letter-spacing:0;--cds-fluid-display-01-font-size:2.625rem;--cds-fluid-display-01-font-weight:300;--cds-fluid-display-01-line-height:1.19;--cds-fluid-display-01-letter-spacing:0;--cds-fluid-display-02-font-size:2.625rem;--cds-fluid-display-02-font-weight:600;--cds-fluid-display-02-line-height:1.19;--cds-fluid-display-02-letter-spacing:0;--cds-fluid-display-03-font-size:2.625rem;--cds-fluid-display-03-font-weight:300;--cds-fluid-display-03-line-height:1.19;--cds-fluid-display-03-letter-spacing:0;--cds-fluid-display-04-font-size:2.625rem;--cds-fluid-display-04-font-weight:300;--cds-fluid-display-04-line-height:1.19;--cds-fluid-display-04-letter-spacing:0;--cds-layer:var(--cds-layer-01, #f4f4f4);--cds-layer-active:var(--cds-layer-active-01, #c6c6c6);--cds-layer-hover:var(--cds-layer-hover-01, #e8e8e8);--cds-layer-selected:var(--cds-layer-selected-01, #e0e0e0);--cds-layer-selected-hover:var(--cds-layer-selected-hover-01, #d1d1d1);--cds-layer-accent:var(--cds-layer-accent-01, #e0e0e0);--cds-layer-accent-hover:var(--cds-layer-accent-hover-01, #d1d1d1);--cds-layer-accent-active:var(--cds-layer-accent-active-01, #a8a8a8);--cds-field:var(--cds-field-01, #f4f4f4);--cds-field-hover:var(--cds-field-hover-01, #e8e8e8);--cds-border-subtle:var(--cds-border-subtle-00, #e0e0e0);--cds-border-subtle-selected:var(--cds-border-subtle-selected-01, #c6c6c6);--cds-border-strong:var(--cds-border-strong-01, #8d8d8d);--cds-border-tile:var(--cds-border-tile-01, #c6c6c6);background-color:var(--cds-background);color:var(--cds-text-primary)}",
|
|
12
|
+
]);
|
package/es/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2023
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import './components/tag/tag.js';
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
package/es/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2023
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import './components/tag/tag.js';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
package/es/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts","index.js"],"names":[],"mappings":"AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;ADEA,OAAO,yBAAyB","file":"index.js","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport './components/tag/tag.js';\n","/**\n * @license\n *\n * Copyright IBM Corp. 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport './components/tag/tag.js';\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2024
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import Tag from '../components/tag/tag.js';
|
|
10
|
+
export declare const CLABSTag: import("@lit/react").ReactWebComponent<Tag, {}>;
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=tag.d.ts.map
|
package/es/react/tag.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2024
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { createComponent } from '@lit/react';
|
|
11
|
+
import Tag from '../components/tag/tag.js';
|
|
12
|
+
export const CLABSTag = createComponent({
|
|
13
|
+
tagName: 'clabs-tag',
|
|
14
|
+
elementClass: Tag,
|
|
15
|
+
react: React,
|
|
16
|
+
events: {}
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["react/tag.ts","react/tag.js"],"names":["React","createComponent","Tag","CLABSTag","tagName","elementClass","react","events"],"mappings":"AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;ADEA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,eAAe,QAAQ,YAAY;AAC5C,OAAOC,GAAG,MAAM,0BAA0B;AAE1C,OAAO,MAAMC,QAAQ,GAAGF,eAAe,CAAC;EACtCG,OAAO,EAAE,WAAW;EACpBC,YAAY,EAAEH,GAAG;EACjBI,KAAK,EAAEN,KAAK;EACZO,MAAM,EAAE,CAAA;ACDV,CDEC,CAAC","file":"tag.js","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2024\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport React from 'react';\nimport { createComponent } from '@lit/react';\nimport Tag from '../components/tag/tag.js';\n\nexport const CLABSTag = createComponent({\n tagName: 'clabs-tag',\n elementClass: Tag,\n react: React,\n events: {},\n});\n","/**\n * @license\n *\n * Copyright IBM Corp. 2024\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport React from 'react';\nimport { createComponent } from '@lit/react';\nimport Tag from '../components/tag/tag.js';\nexport const CLABSTag = createComponent({\n tagName: 'clabs-tag',\n elementClass: Tag,\n react: React,\n events: {},\n});\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@carbon/ai-chat",
|
|
3
|
+
"version": "0.0.1-test.0",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"type": "module",
|
|
8
|
+
"description": "Carbon for AI - tag component",
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"main": "./src/index.js",
|
|
11
|
+
"module": "./src/index.js",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"default": "./src/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./es/": "./es/"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"es/**/*",
|
|
20
|
+
"custom-elements.json"
|
|
21
|
+
],
|
|
22
|
+
"types": "./src/index.d.ts",
|
|
23
|
+
"customElements": "custom-elements.json",
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "gulp build --option tag",
|
|
26
|
+
"build:dist": "rm -rf dist && rollup --config ../../tools/rollup.config.dist.js",
|
|
27
|
+
"build:dist:canary": "rm -rf dist && rollup --config ../../tools/rollup.config.dist.js --configCanary"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@babel/runtime": "^7.23.2",
|
|
31
|
+
"@carbon-labs/utilities": "0.8.0",
|
|
32
|
+
"@carbon/grid": "^11.21.0",
|
|
33
|
+
"@carbon/web-components": "2.11.1"
|
|
34
|
+
}
|
|
35
|
+
}
|