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,125 +0,0 @@
|
|
|
1
|
-
import { css, unsafeCSS } from 'lit';
|
|
2
|
-
import { hostStyles } from '../tuix-input/TuixInput.styles';
|
|
3
|
-
import { Palette } from '../utils/colors';
|
|
4
|
-
import { ScreenSizes } from '../utils/screenSizes.enum';
|
|
5
|
-
import { DarkPalette } from '../utils/darkColors';
|
|
6
|
-
export const dropdownHostStyles = css `
|
|
7
|
-
${hostStyles}
|
|
8
|
-
:host {
|
|
9
|
-
--t-field-color-option: ${unsafeCSS(Palette.WHITE)};
|
|
10
|
-
--t-field-color-main: ${unsafeCSS(Palette.MAIN)};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:host .t-input-dropdown {
|
|
14
|
-
--t-field-font-weight: 300;
|
|
15
|
-
--t-field-font-size: 1rem;
|
|
16
|
-
--t-field-padding-x: 1rem;
|
|
17
|
-
--t-field-title-left-position: 1rem;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@media only screen and (max-width: ${ScreenSizes.TABLET}px) {
|
|
21
|
-
:host .t-input-dropdown {
|
|
22
|
-
--t-field-font-size: 0.938rem;
|
|
23
|
-
--t-field-line-height: 1.125rem;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@media only screen and (max-width: ${ScreenSizes.MOBILE}px) {
|
|
28
|
-
:host .t-input-dropdown {
|
|
29
|
-
--t-field-font-size: 0.813rem;
|
|
30
|
-
--t-field-line-height: 1rem;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:host([dark]) {
|
|
35
|
-
--t-field-color-option: ${unsafeCSS(DarkPalette.ELEVATION_2)};
|
|
36
|
-
}
|
|
37
|
-
`;
|
|
38
|
-
export const dropdownMainContainerStyles = css `
|
|
39
|
-
.t-dropdown-full-container {
|
|
40
|
-
position: relative;
|
|
41
|
-
font-family: 'Rubik', sans-serif;
|
|
42
|
-
}
|
|
43
|
-
.t-dropdown-container .t-input-dropdown {
|
|
44
|
-
--t-field-input-cursor: pointer;
|
|
45
|
-
}
|
|
46
|
-
`;
|
|
47
|
-
export const dropdownOptionStyles = css `
|
|
48
|
-
.t-options-container {
|
|
49
|
-
width: 100%;
|
|
50
|
-
position: absolute;
|
|
51
|
-
top: calc(100% + 2px);
|
|
52
|
-
left: 0;
|
|
53
|
-
border: none;
|
|
54
|
-
border-radius: 0 0 5px 5px;
|
|
55
|
-
background-color: var(--t-field-color-option);
|
|
56
|
-
visibility: collapse;
|
|
57
|
-
overflow-y: auto;
|
|
58
|
-
max-height: 250px;
|
|
59
|
-
color: var(--t-field-color-text);
|
|
60
|
-
box-shadow: 0px 2px 8px 0px ${unsafeCSS(Palette.SHADOW)};
|
|
61
|
-
z-index: 9999;
|
|
62
|
-
}
|
|
63
|
-
.t-options-container::-webkit-scrollbar {
|
|
64
|
-
width: 0.75rem;
|
|
65
|
-
}
|
|
66
|
-
.t-options-container::-webkit-scrollbar-track {
|
|
67
|
-
background-color: transparent;
|
|
68
|
-
}
|
|
69
|
-
.t-options-container::-webkit-scrollbar-thumb {
|
|
70
|
-
background-color: ${unsafeCSS(Palette.PRIMARY_100)};
|
|
71
|
-
border-radius: 0.25rem;
|
|
72
|
-
border: 0.188rem solid transparent;
|
|
73
|
-
background-clip: content-box;
|
|
74
|
-
}
|
|
75
|
-
.t-options-container.show {
|
|
76
|
-
visibility: visible;
|
|
77
|
-
}
|
|
78
|
-
.t-options-container.show.t-with-description {
|
|
79
|
-
top: calc(100% + 2px - 1.5rem);
|
|
80
|
-
}
|
|
81
|
-
@media only screen and (max-height: 500px) {
|
|
82
|
-
.t-options-container {
|
|
83
|
-
max-height: 50vh;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
.t-dropdown-option {
|
|
87
|
-
padding: var(--t-field-padding-y) 1rem;
|
|
88
|
-
cursor: pointer;
|
|
89
|
-
font-size: 1rem;
|
|
90
|
-
line-height: 1.25rem;
|
|
91
|
-
font-weight: 300;
|
|
92
|
-
-webkit-user-select: none;
|
|
93
|
-
-moz-user-select: none;
|
|
94
|
-
-ms-user-select: none;
|
|
95
|
-
user-select: none;
|
|
96
|
-
}
|
|
97
|
-
.t-dropdown-option.t-option-hover {
|
|
98
|
-
background-color: var(--t-field-color-form);
|
|
99
|
-
}
|
|
100
|
-
.t-dropdown-option.t-option-selected {
|
|
101
|
-
color: var(--t-field-color-main);
|
|
102
|
-
}
|
|
103
|
-
.t-dropdown-option.t-option-filtered {
|
|
104
|
-
display: none;
|
|
105
|
-
}
|
|
106
|
-
.t-dropdown-option:focus {
|
|
107
|
-
outline: none;
|
|
108
|
-
}
|
|
109
|
-
@media only screen and (max-width: ${ScreenSizes.TABLET}px) {
|
|
110
|
-
.t-dropdown-option {
|
|
111
|
-
font-size: 0.938rem;
|
|
112
|
-
line-height: 1.125rem;
|
|
113
|
-
--t-field-padding-y: 1.063rem;
|
|
114
|
-
--t-field-padding-top: 1.5rem;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
@media only screen and (max-width: ${ScreenSizes.MOBILE}px) {
|
|
118
|
-
.t-dropdown-option {
|
|
119
|
-
font-size: 0.813rem;
|
|
120
|
-
line-height: 1rem;
|
|
121
|
-
--t-field-padding-y: 1rem;
|
|
122
|
-
--t-field-padding-top: 1.375rem;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
`;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type CustomEventTuixInput } from '../../tuix-input/interfaces/tuix-input.interface';
|
|
2
|
-
import { type DetailValue } from '../../utils/interfaces/detail-value.interface';
|
|
3
|
-
export type TuixDropdownPlainOption = string | number | boolean;
|
|
4
|
-
export interface TuixDropdownObjectOption {
|
|
5
|
-
name: string;
|
|
6
|
-
value: TuixDropdownPlainOption;
|
|
7
|
-
}
|
|
8
|
-
export type TuixDropdownOption = TuixDropdownPlainOption | TuixDropdownObjectOption;
|
|
9
|
-
export interface TuixDropdownExtendedOption {
|
|
10
|
-
name: string;
|
|
11
|
-
value: TuixDropdownPlainOption;
|
|
12
|
-
filtered: boolean;
|
|
13
|
-
}
|
|
14
|
-
export type CustomEventTuixDropdownSelect<T extends TuixDropdownOption = TuixDropdownOption> = CustomEvent<DetailValue<T>>;
|
|
15
|
-
export type CustomEventTuixDropdownInput = CustomEventTuixInput;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
-
import { IconName, IconSizeVariant } from './enums/tuix-icon.enums';
|
|
3
|
-
import { TextVariant } from '../tuix-text/enums/tuix-text.enums';
|
|
4
|
-
export declare class TuixIcon extends LitElement {
|
|
5
|
-
static styles: import("lit").CSSResult;
|
|
6
|
-
name: IconName;
|
|
7
|
-
color?: string | TextVariant;
|
|
8
|
-
size: IconSizeVariant;
|
|
9
|
-
dark: boolean;
|
|
10
|
-
fill?: string | TextVariant;
|
|
11
|
-
private _getSelectedColor;
|
|
12
|
-
private _getSelectedFill;
|
|
13
|
-
private _getIconTemplate;
|
|
14
|
-
render(): TemplateResult<1>;
|
|
15
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
import { IconName } from './enums/tuix-icon.enums';
|
|
3
|
-
export declare const iconTemplate: (name?: IconName, color?: string, fill?: string) => ReturnType<typeof html>;
|
|
4
|
-
type IconContentMapType = Record<IconName, string>;
|
|
5
|
-
export declare const iconContentMap: IconContentMapType;
|
|
6
|
-
export {};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { LitElement, css, html } from 'lit';
|
|
3
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
-
import { styleMap } from 'lit/directives/style-map.js';
|
|
5
|
-
import { IconName, IconSizeVariant, iconSize } from './enums/tuix-icon.enums';
|
|
6
|
-
import { iconTemplate } from './TuixIcon.icons';
|
|
7
|
-
import { Palette } from '../utils/colors';
|
|
8
|
-
import { TextVariant, colorText, colorTextDark, } from '../tuix-text/enums/tuix-text.enums';
|
|
9
|
-
let TuixIcon = class TuixIcon extends LitElement {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.name = IconName.ARROW_DOWN;
|
|
13
|
-
this.size = IconSizeVariant.SMALL;
|
|
14
|
-
this.dark = false;
|
|
15
|
-
}
|
|
16
|
-
static { this.styles = css `
|
|
17
|
-
.icon-component {
|
|
18
|
-
width: 24px;
|
|
19
|
-
height: 24px;
|
|
20
|
-
display: block;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
svg {
|
|
24
|
-
width: 100%;
|
|
25
|
-
height: 100%;
|
|
26
|
-
display: block;
|
|
27
|
-
}
|
|
28
|
-
`; }
|
|
29
|
-
_getSelectedColor(color) {
|
|
30
|
-
let selectedColor = color || this.color || TextVariant.PRIMARY;
|
|
31
|
-
if (Object.values(TextVariant).includes(selectedColor)) {
|
|
32
|
-
const colorMap = this.dark ? colorTextDark : colorText;
|
|
33
|
-
const nameColor = colorMap[selectedColor];
|
|
34
|
-
return nameColor;
|
|
35
|
-
}
|
|
36
|
-
if (Object.prototype.hasOwnProperty.call(Palette, selectedColor)) {
|
|
37
|
-
const nameColor = selectedColor;
|
|
38
|
-
selectedColor = Palette[nameColor];
|
|
39
|
-
}
|
|
40
|
-
return selectedColor;
|
|
41
|
-
}
|
|
42
|
-
_getSelectedFill() {
|
|
43
|
-
return this.fill ? this._getSelectedColor(this.fill) : undefined;
|
|
44
|
-
}
|
|
45
|
-
_getIconTemplate() {
|
|
46
|
-
return iconTemplate(this.name, this._getSelectedColor(), this._getSelectedFill());
|
|
47
|
-
}
|
|
48
|
-
render() {
|
|
49
|
-
const selectedSize = iconSize[this.size] ?? iconSize[IconSizeVariant.SMALL];
|
|
50
|
-
const dynamicStyles = {
|
|
51
|
-
width: selectedSize,
|
|
52
|
-
height: selectedSize,
|
|
53
|
-
};
|
|
54
|
-
return html `
|
|
55
|
-
<div class="icon-component" style="${styleMap(dynamicStyles)}">
|
|
56
|
-
${this._getIconTemplate()}
|
|
57
|
-
</div>
|
|
58
|
-
`;
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
__decorate([
|
|
62
|
-
property({ type: IconName })
|
|
63
|
-
], TuixIcon.prototype, "name", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
property({ type: String })
|
|
66
|
-
], TuixIcon.prototype, "color", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
property({ type: IconSizeVariant })
|
|
69
|
-
], TuixIcon.prototype, "size", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
property({ type: Boolean })
|
|
72
|
-
], TuixIcon.prototype, "dark", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
property({ type: String })
|
|
75
|
-
], TuixIcon.prototype, "fill", void 0);
|
|
76
|
-
TuixIcon = __decorate([
|
|
77
|
-
customElement('tuix-icon')
|
|
78
|
-
], TuixIcon);
|
|
79
|
-
export { TuixIcon };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
export declare enum IconSizeVariant {
|
|
2
|
-
SMALL = "small",
|
|
3
|
-
MEDIUM = "medium",
|
|
4
|
-
LARGE = "large",
|
|
5
|
-
FULL = "full"
|
|
6
|
-
}
|
|
7
|
-
export declare const iconSize: Record<IconSizeVariant, string>;
|
|
8
|
-
export declare enum IconName {
|
|
9
|
-
ARROW_DOWN = "arrow-down",
|
|
10
|
-
ARROW_LEFT = "arrow-left",
|
|
11
|
-
ARROW_UP = "arrow-up",
|
|
12
|
-
ARROW_RIGHT = "arrow-right",
|
|
13
|
-
SEARCH = "search",
|
|
14
|
-
EYE_ON = "eye-on",
|
|
15
|
-
EYE_OFF = "eye-off",
|
|
16
|
-
EYE_CLOSE_LINE = "eye-close-line",
|
|
17
|
-
TRIANGLE_EXCLAMATION = "triangle-exclamation",
|
|
18
|
-
CIRCLE_X = "circle-x",
|
|
19
|
-
LOADER = "loader",
|
|
20
|
-
CIRCLE_CHECK = "circle-check",
|
|
21
|
-
CHEVRON_DOWN = "chevron-down",
|
|
22
|
-
CHEVRON_UP = "chevron-up",
|
|
23
|
-
CHEVRON_LEFT = "chevron-left",
|
|
24
|
-
CHEVRON_RIGHT = "chevron-right",
|
|
25
|
-
CHECK = "check",
|
|
26
|
-
NAV_HAMBURGUER = "nav-hamburguer",
|
|
27
|
-
SUN = "sun",
|
|
28
|
-
MOON = "moon",
|
|
29
|
-
BOOKMARK = "bookmark",
|
|
30
|
-
UPLOAD = "upload",
|
|
31
|
-
DOWNLOAD = "download",
|
|
32
|
-
MAP_PIN = "map-pin",
|
|
33
|
-
PHONE = "phone",
|
|
34
|
-
MAIL = "mail",
|
|
35
|
-
FACEBOOK = "facebook",
|
|
36
|
-
TWITTER = "twitter",
|
|
37
|
-
LINKEDIN = "linkedin",
|
|
38
|
-
SHARE = "share",
|
|
39
|
-
COPY = "copy",
|
|
40
|
-
GOOGLE = "google",
|
|
41
|
-
BELL = "bell",
|
|
42
|
-
GEAR = "gear",
|
|
43
|
-
LOGOUT = "logout",
|
|
44
|
-
CIRCLE_EXCLAMATION = "circle-exclamation",
|
|
45
|
-
CAMERA = "camera",
|
|
46
|
-
PENCIL = "pencil",
|
|
47
|
-
X = "x",
|
|
48
|
-
PLUS = "plus",
|
|
49
|
-
INVOICE = "invoice",
|
|
50
|
-
DELETE = "delete",
|
|
51
|
-
TRIANGLE_ARROW_DOWN = "triangle-arrow-down",
|
|
52
|
-
USERS = "users",
|
|
53
|
-
CLOCK = "clock",
|
|
54
|
-
CHECK_CLOCK = "check-clock",
|
|
55
|
-
GLOBE = "globe",
|
|
56
|
-
CALENDAR = "calendar",
|
|
57
|
-
STATS = "stats",
|
|
58
|
-
HOLIDAYS = "holidays",
|
|
59
|
-
TRENDING_UP = "trending-up",
|
|
60
|
-
ARCHIVE = "archive",
|
|
61
|
-
ACCESS_TOKEN = "access-token"
|
|
62
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
export var IconSizeVariant;
|
|
2
|
-
(function (IconSizeVariant) {
|
|
3
|
-
IconSizeVariant["SMALL"] = "small";
|
|
4
|
-
IconSizeVariant["MEDIUM"] = "medium";
|
|
5
|
-
IconSizeVariant["LARGE"] = "large";
|
|
6
|
-
IconSizeVariant["FULL"] = "full";
|
|
7
|
-
})(IconSizeVariant || (IconSizeVariant = {}));
|
|
8
|
-
export const iconSize = {
|
|
9
|
-
[IconSizeVariant.SMALL]: '16px',
|
|
10
|
-
[IconSizeVariant.MEDIUM]: '24px',
|
|
11
|
-
[IconSizeVariant.LARGE]: '32px',
|
|
12
|
-
[IconSizeVariant.FULL]: '100%',
|
|
13
|
-
};
|
|
14
|
-
export var IconName;
|
|
15
|
-
(function (IconName) {
|
|
16
|
-
IconName["ARROW_DOWN"] = "arrow-down";
|
|
17
|
-
IconName["ARROW_LEFT"] = "arrow-left";
|
|
18
|
-
IconName["ARROW_UP"] = "arrow-up";
|
|
19
|
-
IconName["ARROW_RIGHT"] = "arrow-right";
|
|
20
|
-
IconName["SEARCH"] = "search";
|
|
21
|
-
IconName["EYE_ON"] = "eye-on";
|
|
22
|
-
IconName["EYE_OFF"] = "eye-off";
|
|
23
|
-
IconName["EYE_CLOSE_LINE"] = "eye-close-line";
|
|
24
|
-
IconName["TRIANGLE_EXCLAMATION"] = "triangle-exclamation";
|
|
25
|
-
IconName["CIRCLE_X"] = "circle-x";
|
|
26
|
-
IconName["LOADER"] = "loader";
|
|
27
|
-
IconName["CIRCLE_CHECK"] = "circle-check";
|
|
28
|
-
IconName["CHEVRON_DOWN"] = "chevron-down";
|
|
29
|
-
IconName["CHEVRON_UP"] = "chevron-up";
|
|
30
|
-
IconName["CHEVRON_LEFT"] = "chevron-left";
|
|
31
|
-
IconName["CHEVRON_RIGHT"] = "chevron-right";
|
|
32
|
-
IconName["CHECK"] = "check";
|
|
33
|
-
IconName["NAV_HAMBURGUER"] = "nav-hamburguer";
|
|
34
|
-
IconName["SUN"] = "sun";
|
|
35
|
-
IconName["MOON"] = "moon";
|
|
36
|
-
IconName["BOOKMARK"] = "bookmark";
|
|
37
|
-
IconName["UPLOAD"] = "upload";
|
|
38
|
-
IconName["DOWNLOAD"] = "download";
|
|
39
|
-
IconName["MAP_PIN"] = "map-pin";
|
|
40
|
-
IconName["PHONE"] = "phone";
|
|
41
|
-
IconName["MAIL"] = "mail";
|
|
42
|
-
IconName["FACEBOOK"] = "facebook";
|
|
43
|
-
IconName["TWITTER"] = "twitter";
|
|
44
|
-
IconName["LINKEDIN"] = "linkedin";
|
|
45
|
-
IconName["SHARE"] = "share";
|
|
46
|
-
IconName["COPY"] = "copy";
|
|
47
|
-
IconName["GOOGLE"] = "google";
|
|
48
|
-
IconName["BELL"] = "bell";
|
|
49
|
-
IconName["GEAR"] = "gear";
|
|
50
|
-
IconName["LOGOUT"] = "logout";
|
|
51
|
-
IconName["CIRCLE_EXCLAMATION"] = "circle-exclamation";
|
|
52
|
-
IconName["CAMERA"] = "camera";
|
|
53
|
-
IconName["PENCIL"] = "pencil";
|
|
54
|
-
IconName["X"] = "x";
|
|
55
|
-
IconName["PLUS"] = "plus";
|
|
56
|
-
IconName["INVOICE"] = "invoice";
|
|
57
|
-
IconName["DELETE"] = "delete";
|
|
58
|
-
IconName["TRIANGLE_ARROW_DOWN"] = "triangle-arrow-down";
|
|
59
|
-
IconName["USERS"] = "users";
|
|
60
|
-
IconName["CLOCK"] = "clock";
|
|
61
|
-
IconName["CHECK_CLOCK"] = "check-clock";
|
|
62
|
-
IconName["GLOBE"] = "globe";
|
|
63
|
-
IconName["CALENDAR"] = "calendar";
|
|
64
|
-
IconName["STATS"] = "stats";
|
|
65
|
-
IconName["HOLIDAYS"] = "holidays";
|
|
66
|
-
IconName["TRENDING_UP"] = "trending-up";
|
|
67
|
-
IconName["ARCHIVE"] = "archive";
|
|
68
|
-
IconName["ACCESS_TOKEN"] = "access-token";
|
|
69
|
-
})(IconName || (IconName = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type TemplateResult } from 'lit';
|
|
2
|
-
import { IconName } from '../tuix-icon/enums/tuix-icon.enums';
|
|
3
|
-
import { TuixBaseButton } from '../tuix-button/TuixBaseButton';
|
|
4
|
-
export declare class TuixIconButton extends TuixBaseButton {
|
|
5
|
-
static styles: import("lit").CSSResult[];
|
|
6
|
-
icon: IconName;
|
|
7
|
-
protected _updateIconColor(): void;
|
|
8
|
-
protected _buttonContent(): TemplateResult;
|
|
9
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { css, html } from 'lit';
|
|
3
|
-
import { IconName, IconSizeVariant } from '../tuix-icon/enums/tuix-icon.enums';
|
|
4
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
5
|
-
import { ScreenSizes } from '../utils/screenSizes.enum';
|
|
6
|
-
import { buttonColorStyles, hostButtonStyles, } from '../tuix-button/TuixButton.styles';
|
|
7
|
-
import { TuixBaseButton } from '../tuix-button/TuixBaseButton';
|
|
8
|
-
let TuixIconButton = class TuixIconButton extends TuixBaseButton {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.icon = IconName.ARROW_DOWN;
|
|
12
|
-
}
|
|
13
|
-
static { this.styles = [
|
|
14
|
-
css `
|
|
15
|
-
.button {
|
|
16
|
-
padding: 16px;
|
|
17
|
-
border-radius: 4px;
|
|
18
|
-
border: none;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@media only screen and (max-width: ${ScreenSizes.TABLET}px) {
|
|
22
|
-
.button {
|
|
23
|
-
padding: 12px;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@media only screen and (max-width: ${ScreenSizes.MOBILE}px) {
|
|
28
|
-
.button {
|
|
29
|
-
padding: 8px;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
`,
|
|
33
|
-
hostButtonStyles,
|
|
34
|
-
buttonColorStyles,
|
|
35
|
-
]; }
|
|
36
|
-
_updateIconColor() {
|
|
37
|
-
if (!this.icon)
|
|
38
|
-
return;
|
|
39
|
-
this.iconColor = this._getTextColor();
|
|
40
|
-
}
|
|
41
|
-
_buttonContent() {
|
|
42
|
-
return html `${this._iconTemplate(this.icon, IconSizeVariant.MEDIUM)}`;
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
__decorate([
|
|
46
|
-
property({ type: IconName })
|
|
47
|
-
], TuixIconButton.prototype, "icon", void 0);
|
|
48
|
-
TuixIconButton = __decorate([
|
|
49
|
-
customElement('tuix-icon-button')
|
|
50
|
-
], TuixIconButton);
|
|
51
|
-
export { TuixIconButton };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { LitElement, type TemplateResult, CSSResult, type PropertyValueMap } from 'lit';
|
|
2
|
-
import '../tuix-icon/TuixIcon.js';
|
|
3
|
-
import { IconName } from '../tuix-icon/enums/tuix-icon.enums';
|
|
4
|
-
import { DescriptionType, InputType } from './enums/tuix-input.enums.js';
|
|
5
|
-
export declare class TuixInput extends LitElement {
|
|
6
|
-
_inputId: string;
|
|
7
|
-
static styles: CSSResult[];
|
|
8
|
-
disabled: boolean;
|
|
9
|
-
iconRight?: IconName;
|
|
10
|
-
value: string;
|
|
11
|
-
placeholder: string;
|
|
12
|
-
title: string;
|
|
13
|
-
type: InputType;
|
|
14
|
-
maxlength?: number;
|
|
15
|
-
description?: string;
|
|
16
|
-
descriptionType: DescriptionType;
|
|
17
|
-
dark: boolean;
|
|
18
|
-
readonly: boolean;
|
|
19
|
-
autofocus: boolean;
|
|
20
|
-
private _inputElement;
|
|
21
|
-
private _type;
|
|
22
|
-
private _letterCounter;
|
|
23
|
-
private _previousType;
|
|
24
|
-
private _previousValue;
|
|
25
|
-
private _generalIconColorsLight;
|
|
26
|
-
private _generalIconColorsDark;
|
|
27
|
-
private _handleInputBase;
|
|
28
|
-
private _handleClickOnInput;
|
|
29
|
-
private _handleInput;
|
|
30
|
-
private _handleBlur;
|
|
31
|
-
private _handlePasswordIconClick;
|
|
32
|
-
private _formatIconSet;
|
|
33
|
-
private _updateLetterCounter;
|
|
34
|
-
private _getInputTextFeatureTemplate;
|
|
35
|
-
private _getInputSearchFeatureTemplate;
|
|
36
|
-
private _getInputPasswordFeatureTemplate;
|
|
37
|
-
private _getFeatureTemplateByInputType;
|
|
38
|
-
private _getInputElementClasses;
|
|
39
|
-
private _getInputContainerClasses;
|
|
40
|
-
private _getMainContainerClasses;
|
|
41
|
-
private _setIdInput;
|
|
42
|
-
private _getInputTemplate;
|
|
43
|
-
private _getLetterCounterTemplate;
|
|
44
|
-
private _hasLetterCounter;
|
|
45
|
-
private _getTextAreaTemplate;
|
|
46
|
-
private _getIconDescriptionTemplate;
|
|
47
|
-
private _getDescriptionTemplate;
|
|
48
|
-
private _hasValidDescriptionType;
|
|
49
|
-
private _getDescriptionContainerTemplate;
|
|
50
|
-
protected render(): TemplateResult;
|
|
51
|
-
protected updated(changedProperties: PropertyValueMap<unknown>): void;
|
|
52
|
-
}
|