tuix-webcomponents 0.63.0 → 0.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/addon-visual-tests-assets/visual-test-illustration.mp4 +0 -0
- package/dist/assets/Color-AVL7NMMY-IH_JbDEF.js +1 -0
- package/dist/assets/DocsRenderer-PQXLIZUC-C0ZKNA9m.js +1286 -0
- package/dist/{src/tuix-icon/TuixIcon.icons.js → assets/TuixIconButton-eQtxZNXh.js} +203 -125
- package/dist/assets/TuixModal-BZFIHTi_.js +78 -0
- package/dist/assets/TuixToast-BhxwZIGo.js +62 -0
- package/dist/assets/_commonjsHelpers-CqkleIqs.js +1 -0
- package/dist/assets/axe-C59a3kt3.js +30 -0
- package/dist/assets/iframe-ClsPaEIM.js +1057 -0
- package/dist/assets/index-DBzYXxxs.js +1554 -0
- package/dist/assets/index-TjhCmV-u.js +1 -0
- package/dist/assets/matchers-7Z3WT2CE-CcSi9QFY.js +14 -0
- package/dist/assets/screenSizes.enum-C1IhC_dy.js +13 -0
- package/dist/assets/state-CLjydI9z.js +13 -0
- package/dist/assets/tuix-button.stories-Dm_yifox.js +30 -0
- package/dist/assets/tuix-checkbox.stories-DmzoygjC.js +44 -0
- package/dist/assets/tuix-dropdown-object-list.stories-Neeajtj-.js +56 -0
- package/dist/assets/tuix-dropdown.stories-B7ea8QAz.js +28 -0
- package/dist/assets/tuix-icon-button.stories-CgbOSRO4.js +21 -0
- package/dist/assets/tuix-icon.enums-DYTtwLZl.js +1 -0
- package/dist/assets/tuix-icon.stories-CjN2XsKx.js +19 -0
- package/dist/assets/tuix-input.stories-CD7onvw2.js +33 -0
- package/dist/assets/tuix-link.stories-CT7pzGlx.js +35 -0
- package/dist/assets/tuix-modal.stories-B6v3cOPq.js +39 -0
- package/dist/assets/tuix-paper.enum-DhmlUJB7.js +1 -0
- package/dist/assets/tuix-paper.stories-CLnRPHNK.js +31 -0
- package/dist/assets/tuix-radio-button.stories-BwkKC3a9.js +35 -0
- package/dist/assets/tuix-table.stories-Bn-aZa0J.js +65 -0
- package/dist/assets/tuix-text.enums-Ck8cVqZZ.js +1 -0
- package/dist/assets/tuix-text.stories-BNIqPsGD.js +29 -0
- package/dist/assets/tuix-toast.stories-CRYiLiHK.js +21 -0
- package/dist/assets/tuix-toggle-button.stories-CY6wlDnA.js +40 -0
- package/dist/favicon-wrapper.svg +46 -0
- package/dist/favicon.svg +1 -0
- package/dist/iframe.html +685 -0
- package/dist/index.html +160 -0
- package/dist/index.json +1 -0
- package/dist/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/nunito-sans-bold.woff2 +0 -0
- package/dist/nunito-sans-italic.woff2 +0 -0
- package/dist/nunito-sans-regular.woff2 +0 -0
- package/dist/project.json +1 -0
- package/dist/sb-addons/a11y-3/manager-bundle.js +5 -0
- package/dist/sb-addons/a11y-3/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-addons/chromatic-com-storybook-1/manager-bundle.js +356 -0
- package/dist/sb-addons/chromatic-com-storybook-1/manager-bundle.js.LEGAL.txt +40 -0
- package/dist/sb-addons/docs-2/manager-bundle.js +151 -0
- package/dist/sb-addons/docs-2/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +971 -0
- package/dist/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-addons/vitest-4/manager-bundle.js +3 -0
- package/dist/sb-addons/vitest-4/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-common-assets/favicon-wrapper.svg +46 -0
- package/dist/sb-common-assets/favicon.svg +1 -0
- package/dist/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/dist/sb-manager/globals-module-info.js +797 -0
- package/dist/sb-manager/globals-runtime.js +69679 -0
- package/dist/sb-manager/globals.js +34 -0
- package/dist/sb-manager/runtime.js +13195 -0
- package/package.json +6 -6
- package/dist/src/index.d.ts +0 -36
- package/dist/src/index.js +0 -42
- package/dist/src/tuix-button/TuixBaseButton.d.ts +0 -17
- package/dist/src/tuix-button/TuixBaseButton.js +0 -60
- package/dist/src/tuix-button/TuixButton.d.ts +0 -11
- package/dist/src/tuix-button/TuixButton.js +0 -84
- package/dist/src/tuix-button/TuixButton.styles.d.ts +0 -3
- package/dist/src/tuix-button/TuixButton.styles.js +0 -107
- package/dist/src/tuix-button/enums/tuix-button.enums.d.ts +0 -2
- package/dist/src/tuix-button/enums/tuix-button.enums.js +0 -6
- package/dist/src/tuix-button/interfaces/tuix-button.interface.d.ts +0 -1
- package/dist/src/tuix-button/interfaces/tuix-button.interface.js +0 -1
- package/dist/src/tuix-checkbox/TuixCheckbox.d.ts +0 -15
- package/dist/src/tuix-checkbox/TuixCheckbox.js +0 -106
- package/dist/src/tuix-checkbox/TuixCheckbox.styles.d.ts +0 -4
- package/dist/src/tuix-checkbox/TuixCheckbox.styles.js +0 -132
- package/dist/src/tuix-checkbox/enums/tuix-checkbox.enums.d.ts +0 -21
- package/dist/src/tuix-checkbox/enums/tuix-checkbox.enums.js +0 -23
- package/dist/src/tuix-checkbox/interfaces/tuix-checkbox.interface.d.ts +0 -5
- package/dist/src/tuix-checkbox/interfaces/tuix-checkbox.interface.js +0 -1
- package/dist/src/tuix-dropdown/TuixDropdown.d.ts +0 -55
- package/dist/src/tuix-dropdown/TuixDropdown.js +0 -360
- package/dist/src/tuix-dropdown/TuixDropdown.styles.d.ts +0 -3
- package/dist/src/tuix-dropdown/TuixDropdown.styles.js +0 -125
- package/dist/src/tuix-dropdown/enums/tuix-dropdown.enums.d.ts +0 -4
- package/dist/src/tuix-dropdown/enums/tuix-dropdown.enums.js +0 -5
- package/dist/src/tuix-dropdown/interfaces/tuix-dropdown.interface.d.ts +0 -15
- package/dist/src/tuix-dropdown/interfaces/tuix-dropdown.interface.js +0 -1
- package/dist/src/tuix-icon/TuixIcon.d.ts +0 -15
- package/dist/src/tuix-icon/TuixIcon.icons.d.ts +0 -6
- package/dist/src/tuix-icon/TuixIcon.js +0 -79
- package/dist/src/tuix-icon/enums/tuix-icon.enums.d.ts +0 -62
- package/dist/src/tuix-icon/enums/tuix-icon.enums.js +0 -69
- package/dist/src/tuix-icon-button/TuixIconButton.d.ts +0 -9
- package/dist/src/tuix-icon-button/TuixIconButton.js +0 -51
- package/dist/src/tuix-input/TuixInput.d.ts +0 -52
- package/dist/src/tuix-input/TuixInput.js +0 -370
- package/dist/src/tuix-input/TuixInput.styles.d.ts +0 -8
- package/dist/src/tuix-input/TuixInput.styles.js +0 -295
- package/dist/src/tuix-input/enums/tuix-input.enums.d.ts +0 -38
- package/dist/src/tuix-input/enums/tuix-input.enums.js +0 -41
- package/dist/src/tuix-input/interfaces/tuix-input.interface.d.ts +0 -18
- package/dist/src/tuix-input/interfaces/tuix-input.interface.js +0 -5
- package/dist/src/tuix-link/TuixLink.d.ts +0 -15
- package/dist/src/tuix-link/TuixLink.js +0 -71
- package/dist/src/tuix-link/TuixLink.styles.d.ts +0 -2
- package/dist/src/tuix-link/TuixLink.styles.js +0 -55
- package/dist/src/tuix-link/enums/linkTarget.enum.d.ts +0 -6
- package/dist/src/tuix-link/enums/linkTarget.enum.js +0 -7
- package/dist/src/tuix-modal/TuixModal.d.ts +0 -9
- package/dist/src/tuix-modal/TuixModal.js +0 -63
- package/dist/src/tuix-modal/TuixModal.styles.d.ts +0 -2
- package/dist/src/tuix-modal/TuixModal.styles.js +0 -55
- package/dist/src/tuix-paper/TuixPaper.d.ts +0 -10
- package/dist/src/tuix-paper/TuixPaper.js +0 -46
- package/dist/src/tuix-paper/TuixPaper.styles.d.ts +0 -1
- package/dist/src/tuix-paper/TuixPaper.styles.js +0 -30
- package/dist/src/tuix-paper/enums/tuix-paper.enum.d.ts +0 -13
- package/dist/src/tuix-paper/enums/tuix-paper.enum.js +0 -15
- package/dist/src/tuix-radio-button/TuixRadioButton.d.ts +0 -16
- package/dist/src/tuix-radio-button/TuixRadioButton.js +0 -95
- package/dist/src/tuix-radio-button/TuixRadioButton.styles.d.ts +0 -5
- package/dist/src/tuix-radio-button/TuixRadioButton.styles.js +0 -135
- package/dist/src/tuix-radio-button/interfaces/tuix-radio-button.interface.d.ts +0 -3
- package/dist/src/tuix-radio-button/interfaces/tuix-radio-button.interface.js +0 -1
- package/dist/src/tuix-table/TuixTable.d.ts +0 -46
- package/dist/src/tuix-table/TuixTable.js +0 -367
- package/dist/src/tuix-table/TuixTable.styles.d.ts +0 -2
- package/dist/src/tuix-table/TuixTable.styles.js +0 -197
- package/dist/src/tuix-table/interfaces/tuix-table.interface.d.ts +0 -45
- package/dist/src/tuix-table/interfaces/tuix-table.interface.js +0 -1
- package/dist/src/tuix-text/TuixText.d.ts +0 -12
- package/dist/src/tuix-text/TuixText.js +0 -66
- package/dist/src/tuix-text/TuixText.styles.d.ts +0 -2
- package/dist/src/tuix-text/TuixText.styles.js +0 -158
- package/dist/src/tuix-text/enums/tuix-text.enums.d.ts +0 -31
- package/dist/src/tuix-text/enums/tuix-text.enums.js +0 -63
- package/dist/src/tuix-toast/TuixToast.d.ts +0 -15
- package/dist/src/tuix-toast/TuixToast.js +0 -100
- package/dist/src/tuix-toast/TuixToast.styles.d.ts +0 -3
- package/dist/src/tuix-toast/TuixToast.styles.js +0 -43
- package/dist/src/tuix-toast/enums/tuix-toast.enums.d.ts +0 -20
- package/dist/src/tuix-toast/enums/tuix-toast.enums.js +0 -59
- package/dist/src/tuix-toggle-button/TuixToggleButton.d.ts +0 -13
- package/dist/src/tuix-toggle-button/TuixToggleButton.js +0 -85
- package/dist/src/tuix-toggle-button/TuixToggleButton.styles.d.ts +0 -5
- package/dist/src/tuix-toggle-button/TuixToggleButton.styles.js +0 -134
- package/dist/src/tuix-toggle-button/interfaces/tuix-toggle.interface.d.ts +0 -2
- package/dist/src/tuix-toggle-button/interfaces/tuix-toggle.interface.js +0 -1
- package/dist/src/utils/colors.d.ts +0 -29
- package/dist/src/utils/colors.js +0 -30
- package/dist/src/utils/darkColors.d.ts +0 -31
- package/dist/src/utils/darkColors.js +0 -32
- package/dist/src/utils/hex-rgb.d.ts +0 -5
- package/dist/src/utils/hex-rgb.js +0 -15
- package/dist/src/utils/interfaces/detail-value.interface.d.ts +0 -3
- package/dist/src/utils/interfaces/detail-value.interface.js +0 -1
- package/dist/src/utils/mainVariant.enum.d.ts +0 -4
- package/dist/src/utils/mainVariant.enum.js +0 -5
- package/dist/src/utils/screenSizes.enum.d.ts +0 -4
- package/dist/src/utils/screenSizes.enum.js +0 -5
- package/dist/src/utils/slottedClassName.d.ts +0 -2
- package/dist/src/utils/slottedClassName.js +0 -1
- package/dist/tsconfig.publish.tsbuildinfo +0 -1
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { IconName } from '../../tuix-icon/enums/tuix-icon.enums';
|
|
2
|
-
import { Palette } from '../../utils/colors';
|
|
3
|
-
import { DarkPalette } from '../../utils/darkColors';
|
|
4
|
-
export declare enum InputType {
|
|
5
|
-
TEXT = "text",
|
|
6
|
-
SEARCH = "search",
|
|
7
|
-
PASSWORD = "password",
|
|
8
|
-
TEXT_AREA = "textarea"
|
|
9
|
-
}
|
|
10
|
-
export declare enum InputIconLocation {
|
|
11
|
-
LEFT = "left",
|
|
12
|
-
RIGHT = "right"
|
|
13
|
-
}
|
|
14
|
-
export declare enum DescriptionType {
|
|
15
|
-
TEXT = "text",
|
|
16
|
-
WARNING = "warning",
|
|
17
|
-
ERROR = "error",
|
|
18
|
-
SUCCESS = "success",
|
|
19
|
-
LOADING = "loading"
|
|
20
|
-
}
|
|
21
|
-
export declare const IconByDescriptionType: {
|
|
22
|
-
warning: IconName;
|
|
23
|
-
error: IconName;
|
|
24
|
-
success: IconName;
|
|
25
|
-
loading: IconName;
|
|
26
|
-
};
|
|
27
|
-
export declare const IconDescriptionColorLight: {
|
|
28
|
-
warning: Palette;
|
|
29
|
-
error: Palette;
|
|
30
|
-
success: Palette;
|
|
31
|
-
loading: Palette;
|
|
32
|
-
};
|
|
33
|
-
export declare const IconDescriptionColorDark: {
|
|
34
|
-
warning: DarkPalette;
|
|
35
|
-
error: DarkPalette;
|
|
36
|
-
success: DarkPalette;
|
|
37
|
-
loading: DarkPalette;
|
|
38
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { IconName } from '../../tuix-icon/enums/tuix-icon.enums';
|
|
2
|
-
import { Palette } from '../../utils/colors';
|
|
3
|
-
import { DarkPalette } from '../../utils/darkColors';
|
|
4
|
-
export var InputType;
|
|
5
|
-
(function (InputType) {
|
|
6
|
-
InputType["TEXT"] = "text";
|
|
7
|
-
InputType["SEARCH"] = "search";
|
|
8
|
-
InputType["PASSWORD"] = "password";
|
|
9
|
-
InputType["TEXT_AREA"] = "textarea";
|
|
10
|
-
})(InputType || (InputType = {}));
|
|
11
|
-
export var InputIconLocation;
|
|
12
|
-
(function (InputIconLocation) {
|
|
13
|
-
InputIconLocation["LEFT"] = "left";
|
|
14
|
-
InputIconLocation["RIGHT"] = "right";
|
|
15
|
-
})(InputIconLocation || (InputIconLocation = {}));
|
|
16
|
-
export var DescriptionType;
|
|
17
|
-
(function (DescriptionType) {
|
|
18
|
-
DescriptionType["TEXT"] = "text";
|
|
19
|
-
DescriptionType["WARNING"] = "warning";
|
|
20
|
-
DescriptionType["ERROR"] = "error";
|
|
21
|
-
DescriptionType["SUCCESS"] = "success";
|
|
22
|
-
DescriptionType["LOADING"] = "loading";
|
|
23
|
-
})(DescriptionType || (DescriptionType = {}));
|
|
24
|
-
export const IconByDescriptionType = {
|
|
25
|
-
[DescriptionType.WARNING]: IconName.TRIANGLE_EXCLAMATION,
|
|
26
|
-
[DescriptionType.ERROR]: IconName.CIRCLE_X,
|
|
27
|
-
[DescriptionType.SUCCESS]: IconName.CIRCLE_CHECK,
|
|
28
|
-
[DescriptionType.LOADING]: IconName.LOADER,
|
|
29
|
-
};
|
|
30
|
-
export const IconDescriptionColorLight = {
|
|
31
|
-
[DescriptionType.WARNING]: Palette.VALIDATION,
|
|
32
|
-
[DescriptionType.ERROR]: Palette.ERROR,
|
|
33
|
-
[DescriptionType.SUCCESS]: Palette.SUCCESS,
|
|
34
|
-
[DescriptionType.LOADING]: Palette.PRIMARY_300,
|
|
35
|
-
};
|
|
36
|
-
export const IconDescriptionColorDark = {
|
|
37
|
-
[DescriptionType.WARNING]: DarkPalette.VALIDATION,
|
|
38
|
-
[DescriptionType.ERROR]: DarkPalette.ERROR,
|
|
39
|
-
[DescriptionType.SUCCESS]: DarkPalette.SUCCESS,
|
|
40
|
-
[DescriptionType.LOADING]: DarkPalette.PRIMARY_300,
|
|
41
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { IconName } from '../../tuix-icon/enums/tuix-icon.enums';
|
|
2
|
-
import { type DetailValue } from '../../utils/interfaces/detail-value.interface';
|
|
3
|
-
import { InputIconLocation } from '../enums/tuix-input.enums';
|
|
4
|
-
import { DarkPalette } from '../../utils/darkColors';
|
|
5
|
-
import { Palette } from '../../utils/colors';
|
|
6
|
-
export declare const InputState: {
|
|
7
|
-
INACTIVE: string;
|
|
8
|
-
ACTIVE: string;
|
|
9
|
-
DISABLED: string;
|
|
10
|
-
};
|
|
11
|
-
export type InputState = (typeof InputState)[keyof typeof InputState];
|
|
12
|
-
export interface FormatIconSetParams {
|
|
13
|
-
iconName: IconName;
|
|
14
|
-
colorByState: Record<InputState, DarkPalette | Palette>;
|
|
15
|
-
location?: InputIconLocation;
|
|
16
|
-
clickHandler?: (e: MouseEvent) => void;
|
|
17
|
-
}
|
|
18
|
-
export type CustomEventTuixInput = CustomEvent<DetailValue<string>>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { LitElement, type TemplateResult } from 'lit';
|
|
2
|
-
import { MainVariant } from '../utils/mainVariant.enum';
|
|
3
|
-
import { LinkTarget } from './enums/linkTarget.enum';
|
|
4
|
-
export declare class TuixLink extends LitElement {
|
|
5
|
-
static styles: import("lit").CSSResult[];
|
|
6
|
-
href?: string;
|
|
7
|
-
target: LinkTarget;
|
|
8
|
-
variant: MainVariant;
|
|
9
|
-
disabled: boolean;
|
|
10
|
-
dark: boolean;
|
|
11
|
-
private _getClassMap;
|
|
12
|
-
private _anchorTemplate;
|
|
13
|
-
private _divTemplate;
|
|
14
|
-
render(): TemplateResult;
|
|
15
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { html, LitElement } from 'lit';
|
|
3
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
-
import { MainVariant } from '../utils/mainVariant.enum';
|
|
5
|
-
import { LinkTarget } from './enums/linkTarget.enum';
|
|
6
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
7
|
-
import { linkStyles } from './TuixLink.styles';
|
|
8
|
-
import { linkFontStyles } from '../tuix-text/TuixText.styles';
|
|
9
|
-
let TuixLink = class TuixLink extends LitElement {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.target = LinkTarget.BLANK;
|
|
13
|
-
this.variant = MainVariant.PRIMARY;
|
|
14
|
-
this.disabled = false;
|
|
15
|
-
this.dark = false;
|
|
16
|
-
}
|
|
17
|
-
static { this.styles = [linkStyles, linkFontStyles]; }
|
|
18
|
-
_getClassMap() {
|
|
19
|
-
return {
|
|
20
|
-
link: true,
|
|
21
|
-
disabled: this.disabled,
|
|
22
|
-
[MainVariant.SECONDARY]: this.variant === MainVariant.SECONDARY,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
_anchorTemplate() {
|
|
26
|
-
return html `
|
|
27
|
-
<a
|
|
28
|
-
target="${this.disabled ? LinkTarget.SELF : this.target}"
|
|
29
|
-
class="${classMap(this._getClassMap())}"
|
|
30
|
-
href="${this.disabled ? 'javascript:void(0)' : this.href}"
|
|
31
|
-
>
|
|
32
|
-
<slot></slot>
|
|
33
|
-
</a>
|
|
34
|
-
`;
|
|
35
|
-
}
|
|
36
|
-
_divTemplate() {
|
|
37
|
-
return html `
|
|
38
|
-
<div class="${classMap(this._getClassMap())}">
|
|
39
|
-
<slot></slot>
|
|
40
|
-
</div>
|
|
41
|
-
`;
|
|
42
|
-
}
|
|
43
|
-
render() {
|
|
44
|
-
const isValidAnchor = this.href && !this.disabled;
|
|
45
|
-
if (isValidAnchor) {
|
|
46
|
-
return this._anchorTemplate();
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
return this._divTemplate();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
__decorate([
|
|
54
|
-
property({ type: String })
|
|
55
|
-
], TuixLink.prototype, "href", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
property({ type: LinkTarget })
|
|
58
|
-
], TuixLink.prototype, "target", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
property({ type: MainVariant, reflect: true })
|
|
61
|
-
], TuixLink.prototype, "variant", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
property({ type: Boolean, reflect: true })
|
|
64
|
-
], TuixLink.prototype, "disabled", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
property({ type: Boolean, reflect: true })
|
|
67
|
-
], TuixLink.prototype, "dark", void 0);
|
|
68
|
-
TuixLink = __decorate([
|
|
69
|
-
customElement('tuix-link')
|
|
70
|
-
], TuixLink);
|
|
71
|
-
export { TuixLink };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { css, unsafeCSS } from 'lit';
|
|
2
|
-
import { MainVariant } from '../utils/mainVariant.enum';
|
|
3
|
-
import { Palette } from '../utils/colors';
|
|
4
|
-
import { DarkPalette } from '../utils/darkColors';
|
|
5
|
-
export const LINK_TEXT_COLOR_VAR_NAME = '--t-link-text-color';
|
|
6
|
-
export const linkStyles = css `
|
|
7
|
-
${unsafeCSS(`
|
|
8
|
-
:host {
|
|
9
|
-
--t-link-border-color: ${Palette.MAIN};
|
|
10
|
-
${LINK_TEXT_COLOR_VAR_NAME}: ${Palette.MAIN}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:host([dark]) {
|
|
14
|
-
--t-link-border-color: ${DarkPalette.MAIN};
|
|
15
|
-
${LINK_TEXT_COLOR_VAR_NAME}: ${DarkPalette.MAIN}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:host([variant=${MainVariant.SECONDARY}]) {
|
|
19
|
-
--t-link-border-color: ${Palette.WHITE};
|
|
20
|
-
${LINK_TEXT_COLOR_VAR_NAME}: ${Palette.WHITE}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
:host([variant=${MainVariant.SECONDARY}][dark]) {
|
|
24
|
-
--t-link-border-color: ${DarkPalette.WHITE};
|
|
25
|
-
${LINK_TEXT_COLOR_VAR_NAME}: ${DarkPalette.WHITE}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
:host([disabled]) .link.disabled {
|
|
29
|
-
--t-link-border-color: ${Palette.PRIMARY_300};
|
|
30
|
-
${LINK_TEXT_COLOR_VAR_NAME}: ${Palette.PRIMARY_300}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.link {
|
|
34
|
-
text-decoration: none;
|
|
35
|
-
display: inline;
|
|
36
|
-
color: var(${LINK_TEXT_COLOR_VAR_NAME});
|
|
37
|
-
border-bottom: solid 1px var(--t-link-border-active-color, transparent);
|
|
38
|
-
}
|
|
39
|
-
.link:hover {
|
|
40
|
-
border-bottom: solid 1px var(--t-link-border-color);
|
|
41
|
-
cursor: pointer;
|
|
42
|
-
}
|
|
43
|
-
.link.secondary {
|
|
44
|
-
color: var(${LINK_TEXT_COLOR_VAR_NAME});
|
|
45
|
-
}
|
|
46
|
-
.link.secondary:hover {
|
|
47
|
-
border-bottom: solid 1px var(--t-link-border-color);
|
|
48
|
-
}
|
|
49
|
-
.link.disabled {
|
|
50
|
-
border-bottom: solid 1px var(--t-link-border-color);
|
|
51
|
-
color: var(${LINK_TEXT_COLOR_VAR_NAME});
|
|
52
|
-
cursor: not-allowed;
|
|
53
|
-
}
|
|
54
|
-
`)}
|
|
55
|
-
`;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
export declare class TuixModal extends LitElement {
|
|
3
|
-
static styles: import("lit").CSSResult[];
|
|
4
|
-
visible: boolean;
|
|
5
|
-
dark: boolean;
|
|
6
|
-
scrollable: boolean;
|
|
7
|
-
protected _onClose(): void;
|
|
8
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
9
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { html, LitElement } from 'lit';
|
|
3
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
-
import { BorderRadiusPaper, PaperElevation, } from '../tuix-paper/enums/tuix-paper.enum.js';
|
|
5
|
-
import { commonModalStyles, mobileModalStyles } from './TuixModal.styles.js';
|
|
6
|
-
import { TextVariant } from '../tuix-text/enums/tuix-text.enums.js';
|
|
7
|
-
import { IconName, IconSizeVariant, } from '../tuix-icon/enums/tuix-icon.enums.js';
|
|
8
|
-
let TuixModal = class TuixModal extends LitElement {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.visible = false;
|
|
12
|
-
this.dark = false;
|
|
13
|
-
this.scrollable = false;
|
|
14
|
-
}
|
|
15
|
-
static { this.styles = [commonModalStyles, mobileModalStyles]; }
|
|
16
|
-
_onClose() {
|
|
17
|
-
this.visible = false;
|
|
18
|
-
this.dispatchEvent(new CustomEvent('on-close', { bubbles: true }));
|
|
19
|
-
}
|
|
20
|
-
render() {
|
|
21
|
-
return html `
|
|
22
|
-
<tuix-paper
|
|
23
|
-
class="modal-container"
|
|
24
|
-
elevation=${PaperElevation.VARIANT_4}
|
|
25
|
-
border-radius=${BorderRadiusPaper.SOFT}
|
|
26
|
-
?dark=${this.dark}
|
|
27
|
-
>
|
|
28
|
-
<div class="content">
|
|
29
|
-
<header>
|
|
30
|
-
<slot name="title"></slot>
|
|
31
|
-
<tuix-icon
|
|
32
|
-
@click=${this._onClose}
|
|
33
|
-
class="close-icon"
|
|
34
|
-
size="${IconSizeVariant.MEDIUM}"
|
|
35
|
-
name="${IconName.X}"
|
|
36
|
-
color="${TextVariant.MAIN}"
|
|
37
|
-
?dark=${this.dark}
|
|
38
|
-
></tuix-icon>
|
|
39
|
-
</header>
|
|
40
|
-
<div class="body" ?scrollable=${this.scrollable}>
|
|
41
|
-
<slot name="body"></slot>
|
|
42
|
-
</div>
|
|
43
|
-
<div class="action-buttons">
|
|
44
|
-
<slot name="actions"></slot>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
</tuix-paper>
|
|
48
|
-
`;
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
__decorate([
|
|
52
|
-
property({ type: Boolean, reflect: true })
|
|
53
|
-
], TuixModal.prototype, "visible", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
property({ type: Boolean, reflect: true })
|
|
56
|
-
], TuixModal.prototype, "dark", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
property({ type: Boolean, reflect: true })
|
|
59
|
-
], TuixModal.prototype, "scrollable", void 0);
|
|
60
|
-
TuixModal = __decorate([
|
|
61
|
-
customElement('tuix-modal')
|
|
62
|
-
], TuixModal);
|
|
63
|
-
export { TuixModal };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { css, unsafeCSS } from 'lit';
|
|
2
|
-
import { ScreenSizes } from '../utils/screenSizes.enum';
|
|
3
|
-
import { Palette } from '../utils/colors';
|
|
4
|
-
export const commonModalStyles = css `
|
|
5
|
-
:host {
|
|
6
|
-
display: none;
|
|
7
|
-
position: fixed;
|
|
8
|
-
width: 100%;
|
|
9
|
-
height: 100vh;
|
|
10
|
-
align-items: center;
|
|
11
|
-
top: 0;
|
|
12
|
-
left: 0;
|
|
13
|
-
background-color: ${unsafeCSS(Palette.BLACK + '80')};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
:host([visible]) {
|
|
17
|
-
display: flex;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.modal-container {
|
|
21
|
-
margin: auto;
|
|
22
|
-
max-width: 96%;
|
|
23
|
-
max-height: 96vh;
|
|
24
|
-
|
|
25
|
-
.content {
|
|
26
|
-
border-radius: 4px;
|
|
27
|
-
|
|
28
|
-
header {
|
|
29
|
-
display: flex;
|
|
30
|
-
justify-content: space-between;
|
|
31
|
-
padding: 16px 16px 8px;
|
|
32
|
-
|
|
33
|
-
.close-icon {
|
|
34
|
-
cursor: pointer;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
div.body {
|
|
39
|
-
padding: 8px 16px 32px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
div.action-buttons {
|
|
43
|
-
padding: 8px 16px 16px 16px;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
`;
|
|
48
|
-
export const mobileModalStyles = css `
|
|
49
|
-
@media only screen and (max-width: ${ScreenSizes.MOBILE}px) {
|
|
50
|
-
.modal-container {
|
|
51
|
-
min-width: 100%;
|
|
52
|
-
max-height: 100%;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
`;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { LitElement, type TemplateResult } from 'lit';
|
|
2
|
-
import { BorderRadiusPaper, PaperElevation } from './enums/tuix-paper.enum';
|
|
3
|
-
export declare class TuixPaper extends LitElement {
|
|
4
|
-
static styles: import("lit").CSSResult[];
|
|
5
|
-
elevation: PaperElevation;
|
|
6
|
-
borderRadius: BorderRadiusPaper;
|
|
7
|
-
dark: boolean;
|
|
8
|
-
private _getOptionalClasses;
|
|
9
|
-
render(): TemplateResult;
|
|
10
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { LitElement, html } from 'lit';
|
|
3
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
-
import { BorderRadiusPaper, PaperElevation } from './enums/tuix-paper.enum';
|
|
5
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
6
|
-
import { styleMap } from 'lit/directives/style-map.js';
|
|
7
|
-
import { paperStyles } from './TuixPaper.styles';
|
|
8
|
-
let TuixPaper = class TuixPaper extends LitElement {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.elevation = PaperElevation.VARIANT_1;
|
|
12
|
-
this.borderRadius = BorderRadiusPaper.NONE;
|
|
13
|
-
this.dark = false;
|
|
14
|
-
}
|
|
15
|
-
static { this.styles = [paperStyles]; }
|
|
16
|
-
_getOptionalClasses() {
|
|
17
|
-
const variantClass = `variant_${this.elevation}`;
|
|
18
|
-
const darkClass = `dark_${this.elevation}`;
|
|
19
|
-
return {
|
|
20
|
-
elevation: true,
|
|
21
|
-
[variantClass]: !this.dark,
|
|
22
|
-
[darkClass]: this.dark,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
render() {
|
|
26
|
-
return html ` <div
|
|
27
|
-
class="${classMap(this._getOptionalClasses())}"
|
|
28
|
-
style="${styleMap({ borderRadius: this.borderRadius })}"
|
|
29
|
-
>
|
|
30
|
-
<slot></slot>
|
|
31
|
-
</div>`;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
__decorate([
|
|
35
|
-
property({ type: PaperElevation })
|
|
36
|
-
], TuixPaper.prototype, "elevation", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
property({ type: String, attribute: 'border-radius' })
|
|
39
|
-
], TuixPaper.prototype, "borderRadius", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
property({ type: Boolean, reflect: true })
|
|
42
|
-
], TuixPaper.prototype, "dark", void 0);
|
|
43
|
-
TuixPaper = __decorate([
|
|
44
|
-
customElement('tuix-paper')
|
|
45
|
-
], TuixPaper);
|
|
46
|
-
export { TuixPaper };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const paperStyles: import("lit").CSSResult;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { css, unsafeCSS } from 'lit';
|
|
2
|
-
import { PaperElevation } from './enums/tuix-paper.enum';
|
|
3
|
-
import { Palette } from '../utils/colors';
|
|
4
|
-
const calculatedStyles = Object.values(PaperElevation)
|
|
5
|
-
.slice(1, -1)
|
|
6
|
-
.map((variant, index) => `
|
|
7
|
-
.elevation.variant_${variant} {
|
|
8
|
-
box-shadow: 0px ${2 ** index}px ${2 ** (index + 2)}px ${Palette.SHADOW};
|
|
9
|
-
}
|
|
10
|
-
.elevation.dark_${variant} {
|
|
11
|
-
background-color:rgb(${23 + 3 * index},${23 + 3 * index},${26 + 5 * index});
|
|
12
|
-
}`)
|
|
13
|
-
.join('\n');
|
|
14
|
-
export const paperStyles = css `
|
|
15
|
-
${unsafeCSS(`
|
|
16
|
-
.elevation {
|
|
17
|
-
background-color: ${Palette.WHITE};
|
|
18
|
-
}
|
|
19
|
-
.elevation.dark_${PaperElevation.VARIANT_0} {
|
|
20
|
-
background-color: ${Palette.BLACK};
|
|
21
|
-
}
|
|
22
|
-
${calculatedStyles}
|
|
23
|
-
.elevation.variant_${PaperElevation.VARIANT_4} {
|
|
24
|
-
box-shadow: 0px 7px 24px ${Palette.SHADOW};
|
|
25
|
-
}
|
|
26
|
-
.elevation.dark_${PaperElevation.VARIANT_4} {
|
|
27
|
-
background-color: rgb(33, 33, 40);
|
|
28
|
-
}
|
|
29
|
-
`)}
|
|
30
|
-
`;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export var PaperElevation;
|
|
2
|
-
(function (PaperElevation) {
|
|
3
|
-
PaperElevation["VARIANT_0"] = "0";
|
|
4
|
-
PaperElevation["VARIANT_1"] = "1";
|
|
5
|
-
PaperElevation["VARIANT_2"] = "2";
|
|
6
|
-
PaperElevation["VARIANT_3"] = "3";
|
|
7
|
-
PaperElevation["VARIANT_4"] = "4";
|
|
8
|
-
})(PaperElevation || (PaperElevation = {}));
|
|
9
|
-
export var BorderRadiusPaper;
|
|
10
|
-
(function (BorderRadiusPaper) {
|
|
11
|
-
BorderRadiusPaper["NONE"] = "0px";
|
|
12
|
-
BorderRadiusPaper["SOFT"] = "4px";
|
|
13
|
-
BorderRadiusPaper["MEDIUM"] = "10px";
|
|
14
|
-
BorderRadiusPaper["STRONG"] = "20px";
|
|
15
|
-
})(BorderRadiusPaper || (BorderRadiusPaper = {}));
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { CheckboxLabelSide } from '../tuix-checkbox/enums/tuix-checkbox.enums';
|
|
3
|
-
import type { TuixRadioButtonOption } from './interfaces/tuix-radio-button.interface';
|
|
4
|
-
export declare class TuixRadioButton extends LitElement {
|
|
5
|
-
static styles: import("lit").CSSResult[];
|
|
6
|
-
disabled: boolean;
|
|
7
|
-
dark: boolean;
|
|
8
|
-
error: boolean;
|
|
9
|
-
options: TuixRadioButtonOption[];
|
|
10
|
-
labelSide: CheckboxLabelSide;
|
|
11
|
-
selectedOption: TuixRadioButtonOption | null;
|
|
12
|
-
private _onRadioButtonChange;
|
|
13
|
-
private _getFullContainerClasses;
|
|
14
|
-
private _formatTemplate;
|
|
15
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
16
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { LitElement, html } from 'lit';
|
|
3
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
5
|
-
import { CheckboxLabelSide } from '../tuix-checkbox/enums/tuix-checkbox.enums';
|
|
6
|
-
import { TextSize, TextVariant } from '../tuix-text/enums/tuix-text.enums';
|
|
7
|
-
import { radioButtonContainerStyles, radioButtonInnerStyles, radioButtonLabelStyles, radioButtonStyles, radioHostStyles, } from './TuixRadioButton.styles';
|
|
8
|
-
let TuixRadioButton = class TuixRadioButton extends LitElement {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.disabled = false;
|
|
12
|
-
this.dark = false;
|
|
13
|
-
this.error = false;
|
|
14
|
-
this.options = [];
|
|
15
|
-
this.labelSide = CheckboxLabelSide.RIGHT;
|
|
16
|
-
this.selectedOption = null;
|
|
17
|
-
}
|
|
18
|
-
static { this.styles = [
|
|
19
|
-
radioHostStyles,
|
|
20
|
-
radioButtonContainerStyles,
|
|
21
|
-
radioButtonStyles,
|
|
22
|
-
radioButtonInnerStyles,
|
|
23
|
-
radioButtonLabelStyles,
|
|
24
|
-
]; }
|
|
25
|
-
_onRadioButtonChange(event) {
|
|
26
|
-
this.dispatchEvent(new CustomEvent('change', {
|
|
27
|
-
detail: {
|
|
28
|
-
value: event.target.value,
|
|
29
|
-
},
|
|
30
|
-
bubbles: true,
|
|
31
|
-
}));
|
|
32
|
-
}
|
|
33
|
-
_getFullContainerClasses() {
|
|
34
|
-
return {
|
|
35
|
-
't-radio-button-full-container': true,
|
|
36
|
-
't-with-error': this.error && !this.disabled,
|
|
37
|
-
't-with-label-left': this.labelSide === CheckboxLabelSide.LEFT,
|
|
38
|
-
't-multiple-options': this.options.length > 1,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
_formatTemplate(option, index) {
|
|
42
|
-
return html `<label class="${classMap(this._getFullContainerClasses())}">
|
|
43
|
-
<div class="t-radio-button-container">
|
|
44
|
-
<input
|
|
45
|
-
type="radio"
|
|
46
|
-
class="t-radio-button"
|
|
47
|
-
?disabled="${this.disabled}"
|
|
48
|
-
.value="${option}"
|
|
49
|
-
name="tuix-radio-button"
|
|
50
|
-
?checked="${this.selectedOption === option}"
|
|
51
|
-
@change="${this._onRadioButtonChange}"
|
|
52
|
-
/>
|
|
53
|
-
<div class="t-radio-button-checkmark">
|
|
54
|
-
<div class="t-radio-button-inner"></div>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
<div class="t-radio-button-label">
|
|
58
|
-
<slot name="label-${index}">
|
|
59
|
-
<tuix-text
|
|
60
|
-
size="${TextSize.Field1}"
|
|
61
|
-
color="${TextVariant.PRIMARY}"
|
|
62
|
-
?dark="${this.dark}"
|
|
63
|
-
>
|
|
64
|
-
${option}
|
|
65
|
-
</tuix-text>
|
|
66
|
-
</slot>
|
|
67
|
-
</div>
|
|
68
|
-
</label>`;
|
|
69
|
-
}
|
|
70
|
-
render() {
|
|
71
|
-
return html `${this.options.map((option, index) => this._formatTemplate(option, index))}`;
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
__decorate([
|
|
75
|
-
property({ type: Boolean, reflect: true })
|
|
76
|
-
], TuixRadioButton.prototype, "disabled", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
property({ type: Boolean, reflect: true })
|
|
79
|
-
], TuixRadioButton.prototype, "dark", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
property({ type: Boolean, reflect: true })
|
|
82
|
-
], TuixRadioButton.prototype, "error", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
property({ type: Array })
|
|
85
|
-
], TuixRadioButton.prototype, "options", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
property({ type: String })
|
|
88
|
-
], TuixRadioButton.prototype, "labelSide", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
property({ type: String })
|
|
91
|
-
], TuixRadioButton.prototype, "selectedOption", void 0);
|
|
92
|
-
TuixRadioButton = __decorate([
|
|
93
|
-
customElement('tuix-radio-button')
|
|
94
|
-
], TuixRadioButton);
|
|
95
|
-
export { TuixRadioButton };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const radioHostStyles: import("lit").CSSResult;
|
|
2
|
-
export declare const radioButtonContainerStyles: import("lit").CSSResult;
|
|
3
|
-
export declare const radioButtonStyles: import("lit").CSSResult;
|
|
4
|
-
export declare const radioButtonInnerStyles: import("lit").CSSResult;
|
|
5
|
-
export declare const radioButtonLabelStyles: import("lit").CSSResult;
|