@limetech/lime-elements 37.3.0 → 37.4.1
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/CHANGELOG.md +35 -0
- package/dist/cjs/limel-breadcrumbs_3.cjs.entry.js +1 -1
- package/dist/cjs/limel-breadcrumbs_3.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-chip_2.cjs.entry.js +5 -4
- package/dist/cjs/limel-chip_2.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +1 -1
- package/dist/cjs/limel-collapsible-section.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-color-picker-palette.cjs.entry.js +1 -1
- package/dist/cjs/limel-color-picker-palette.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-color-picker.cjs.entry.js +1 -1
- package/dist/cjs/limel-color-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-form.cjs.entry.js +1 -1
- package/dist/cjs/limel-form.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-header.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-helper-line.cjs.entry.js +1 -1
- package/dist/cjs/limel-helper-line.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-input-field_3.cjs.entry.js +2 -2
- package/dist/cjs/limel-input-field_3.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-progress-flow.cjs.entry.js +1 -1
- package/dist/cjs/limel-progress-flow.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-select.cjs.entry.js +1 -1
- package/dist/cjs/limel-select.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-slider.cjs.entry.js +1 -1
- package/dist/cjs/limel-slider.cjs.entry.js.map +1 -1
- package/dist/collection/components/chip/chip.css +3 -0
- package/dist/collection/components/chip-set/chip-set.css +27 -11
- package/dist/collection/components/chip-set/chip-set.js +3 -2
- package/dist/collection/components/chip-set/chip-set.js.map +1 -1
- package/dist/collection/components/collapsible-section/collapsible-section.css +1 -2
- package/dist/collection/components/color-picker/color-picker-palette.css +71 -4
- package/dist/collection/components/color-picker/color-picker.css +71 -4
- package/dist/collection/components/form/form.css +1 -2
- package/dist/collection/components/header/header.js +1 -0
- package/dist/collection/components/header/header.js.map +1 -1
- package/dist/collection/components/helper-line/helper-line.css +1 -0
- package/dist/collection/components/input-field/input-field.css +24 -5
- package/dist/collection/components/list/list.css +2 -5
- package/dist/collection/components/menu-list/menu-list.css +2 -5
- package/dist/collection/components/progress-flow/progress-flow.css +1 -1
- package/dist/collection/components/select/select.css +9 -19
- package/dist/collection/components/select/select.js +0 -1
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/slider/slider.css +12 -9
- package/dist/collection/style/internal/shared_input-select-picker.scss +11 -2
- package/dist/esm/limel-breadcrumbs_3.entry.js +1 -1
- package/dist/esm/limel-breadcrumbs_3.entry.js.map +1 -1
- package/dist/esm/limel-chip_2.entry.js +5 -4
- package/dist/esm/limel-chip_2.entry.js.map +1 -1
- package/dist/esm/limel-collapsible-section.entry.js +1 -1
- package/dist/esm/limel-collapsible-section.entry.js.map +1 -1
- package/dist/esm/limel-color-picker-palette.entry.js +1 -1
- package/dist/esm/limel-color-picker-palette.entry.js.map +1 -1
- package/dist/esm/limel-color-picker.entry.js +1 -1
- package/dist/esm/limel-color-picker.entry.js.map +1 -1
- package/dist/esm/limel-form.entry.js +1 -1
- package/dist/esm/limel-form.entry.js.map +1 -1
- package/dist/esm/limel-header.entry.js.map +1 -1
- package/dist/esm/limel-helper-line.entry.js +1 -1
- package/dist/esm/limel-helper-line.entry.js.map +1 -1
- package/dist/esm/limel-input-field_3.entry.js +2 -2
- package/dist/esm/limel-input-field_3.entry.js.map +1 -1
- package/dist/esm/limel-progress-flow.entry.js +1 -1
- package/dist/esm/limel-progress-flow.entry.js.map +1 -1
- package/dist/esm/limel-select.entry.js +1 -1
- package/dist/esm/limel-select.entry.js.map +1 -1
- package/dist/esm/limel-slider.entry.js +1 -1
- package/dist/esm/limel-slider.entry.js.map +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-54c9b7b1.entry.js → p-00064897.entry.js} +2 -2
- package/dist/lime-elements/{p-54c9b7b1.entry.js.map → p-00064897.entry.js.map} +1 -1
- package/dist/lime-elements/p-027b500e.entry.js +2 -0
- package/dist/lime-elements/p-027b500e.entry.js.map +1 -0
- package/dist/lime-elements/{p-79fa180b.entry.js → p-0345e5c9.entry.js} +4 -4
- package/dist/lime-elements/{p-79fa180b.entry.js.map → p-0345e5c9.entry.js.map} +1 -1
- package/dist/lime-elements/p-27330d1d.entry.js +2 -0
- package/dist/lime-elements/p-27330d1d.entry.js.map +1 -0
- package/dist/lime-elements/{p-554cdf9e.entry.js → p-5903e050.entry.js} +2 -2
- package/dist/lime-elements/{p-554cdf9e.entry.js.map → p-5903e050.entry.js.map} +1 -1
- package/dist/lime-elements/p-68cb9574.entry.js +2 -0
- package/dist/lime-elements/p-68cb9574.entry.js.map +1 -0
- package/dist/lime-elements/p-71282352.entry.js.map +1 -1
- package/dist/lime-elements/{p-60063e02.entry.js → p-870d72f1.entry.js} +2 -2
- package/dist/lime-elements/{p-60063e02.entry.js.map → p-870d72f1.entry.js.map} +1 -1
- package/dist/lime-elements/p-a1d841db.entry.js +2 -0
- package/dist/lime-elements/p-a1d841db.entry.js.map +1 -0
- package/dist/lime-elements/p-b851bdfb.entry.js +2 -0
- package/dist/lime-elements/p-b851bdfb.entry.js.map +1 -0
- package/dist/lime-elements/{p-e41d6636.entry.js → p-d9ad1ebe.entry.js} +2 -2
- package/dist/lime-elements/{p-e41d6636.entry.js.map → p-d9ad1ebe.entry.js.map} +1 -1
- package/dist/lime-elements/p-dfa06174.entry.js +2 -0
- package/dist/lime-elements/p-dfa06174.entry.js.map +1 -0
- package/dist/lime-elements/style/internal/shared_input-select-picker.scss +11 -2
- package/dist/types/components/header/header.d.ts +1 -0
- package/dist/types/components/select/select.d.ts +0 -1
- package/dist/types/components.d.ts +4 -4
- package/package.json +5 -5
- package/dist/lime-elements/p-1291ed2c.entry.js +0 -2
- package/dist/lime-elements/p-1291ed2c.entry.js.map +0 -1
- package/dist/lime-elements/p-5240b8a3.entry.js +0 -2
- package/dist/lime-elements/p-5240b8a3.entry.js.map +0 -1
- package/dist/lime-elements/p-91aaa8b4.entry.js +0 -2
- package/dist/lime-elements/p-91aaa8b4.entry.js.map +0 -1
- package/dist/lime-elements/p-e0f37631.entry.js +0 -2
- package/dist/lime-elements/p-e0f37631.entry.js.map +0 -1
- package/dist/lime-elements/p-fc423e66.entry.js +0 -2
- package/dist/lime-elements/p-fc423e66.entry.js.map +0 -1
- package/dist/lime-elements/p-fd69d7ad.entry.js +0 -2
- package/dist/lime-elements/p-fd69d7ad.entry.js.map +0 -1
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
isolation: isolate;
|
|
62
62
|
display: inline-flex;
|
|
63
63
|
align-items: center;
|
|
64
|
+
min-width: 0;
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
* {
|
|
@@ -70,6 +71,7 @@
|
|
|
70
71
|
.chip {
|
|
71
72
|
all: unset;
|
|
72
73
|
position: relative;
|
|
74
|
+
min-width: 0;
|
|
73
75
|
display: inline-flex;
|
|
74
76
|
align-items: center;
|
|
75
77
|
justify-content: center;
|
|
@@ -195,6 +197,7 @@ limel-badge {
|
|
|
195
197
|
color: var(--mdc-theme-on-surface);
|
|
196
198
|
background-color: transparent;
|
|
197
199
|
z-index: 1;
|
|
200
|
+
flex-shrink: 0;
|
|
198
201
|
display: flex;
|
|
199
202
|
align-items: center;
|
|
200
203
|
justify-content: center;
|
|
@@ -1885,6 +1885,13 @@
|
|
|
1885
1885
|
color: rgba(var(--contrast-1400), 0.5);
|
|
1886
1886
|
}
|
|
1887
1887
|
|
|
1888
|
+
.mdc-floating-label--float-above {
|
|
1889
|
+
transform: translateY(-1.6875rem) scale(0.75) !important;
|
|
1890
|
+
}
|
|
1891
|
+
.mdc-text-field--with-leading-icon .mdc-floating-label--float-above {
|
|
1892
|
+
transform: translateY(-1.5625rem) translateX(-1.25rem) scale(0.75) !important;
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1888
1895
|
.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,
|
|
1889
1896
|
.mdc-text-field--outlined.mdc-text-field--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above,
|
|
1890
1897
|
.mdc-text-field--outlined.mdc-text-field--textarea.mdc-notched-outline--upgraded .mdc-floating-label--float-above,
|
|
@@ -1936,7 +1943,7 @@
|
|
|
1936
1943
|
}
|
|
1937
1944
|
.mdc-text-field.mdc-text-field--disabled.lime-text-field--readonly.mdc-text-field--with-trailing-icon .mdc-text-field__icon--trailing limel-icon {
|
|
1938
1945
|
width: 1.5rem;
|
|
1939
|
-
margin-right: 0.
|
|
1946
|
+
margin-right: 0.25rem;
|
|
1940
1947
|
}
|
|
1941
1948
|
.mdc-text-field.mdc-text-field--disabled.lime-text-field--readonly.mdc-text-field--with-trailing-icon:hover .mdc-text-field__icon--trailing:hover {
|
|
1942
1949
|
box-shadow: var(--button-shadow-hovered);
|
|
@@ -1978,16 +1985,17 @@
|
|
|
1978
1985
|
|
|
1979
1986
|
.mdc-chip-set {
|
|
1980
1987
|
display: flex;
|
|
1988
|
+
flex-wrap: wrap;
|
|
1981
1989
|
align-items: center;
|
|
1982
1990
|
gap: 0.5rem;
|
|
1983
|
-
min-height:
|
|
1991
|
+
min-height: 2.5rem;
|
|
1984
1992
|
position: relative;
|
|
1985
1993
|
}
|
|
1986
1994
|
.mdc-chip-set.chip-set--with-label .lime-floating-label--float-above {
|
|
1987
1995
|
padding-left: 0.25rem;
|
|
1988
1996
|
}
|
|
1989
1997
|
.mdc-chip-set.mdc-chip-set--input {
|
|
1990
|
-
padding: 0.5rem;
|
|
1998
|
+
padding: 0.4rem 0.5rem;
|
|
1991
1999
|
width: 100%;
|
|
1992
2000
|
}
|
|
1993
2001
|
.mdc-chip-set.has-clear-all-button.mdc-chip-set--input {
|
|
@@ -2037,7 +2045,7 @@
|
|
|
2037
2045
|
}
|
|
2038
2046
|
.lime-notched-outline--notched .mdc-notched-outline__notch .lime-floating-label--float-above {
|
|
2039
2047
|
top: 1.6875rem;
|
|
2040
|
-
transform: translateY(-34.75px) scale(0.75);
|
|
2048
|
+
transform: translateY(-34.75px) scale(0.75) !important;
|
|
2041
2049
|
font-size: 0.875rem;
|
|
2042
2050
|
}
|
|
2043
2051
|
|
|
@@ -2056,7 +2064,7 @@
|
|
|
2056
2064
|
background-image: url("data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><defs/><path fill='rgb(255,255,255)' d='M7.219 5.781L5.78 7.22 14.563 16 5.78 24.781 7.22 26.22 16 17.437l8.781 8.782 1.438-1.438L17.437 16l8.782-8.781L24.78 5.78 16 14.563z'/></svg>");
|
|
2057
2065
|
position: absolute;
|
|
2058
2066
|
right: 0.5rem;
|
|
2059
|
-
top:
|
|
2067
|
+
top: calc(2.5rem / 4);
|
|
2060
2068
|
opacity: 0;
|
|
2061
2069
|
}
|
|
2062
2070
|
.clear-all-button:hover {
|
|
@@ -2084,22 +2092,22 @@
|
|
|
2084
2092
|
}
|
|
2085
2093
|
|
|
2086
2094
|
.has-leading-icon:not(.has-chips) .mdc-text-field__input {
|
|
2087
|
-
padding-left:
|
|
2095
|
+
padding-left: 1.5rem;
|
|
2088
2096
|
}
|
|
2089
2097
|
.has-leading-icon:not(.has-chips) .mdc-floating-label:not(.lime-floating-label--float-above) {
|
|
2090
|
-
left:
|
|
2098
|
+
left: 1.5rem;
|
|
2091
2099
|
}
|
|
2092
2100
|
.has-leading-icon:not(.has-chips) .mdc-floating-label.mdc-floating-label--float-above {
|
|
2093
2101
|
left: 0.25rem;
|
|
2094
2102
|
}
|
|
2095
2103
|
.has-leading-icon limel-chip:first-of-type {
|
|
2096
|
-
margin-left:
|
|
2104
|
+
margin-left: 1.5rem;
|
|
2097
2105
|
}
|
|
2098
2106
|
.has-leading-icon .search-icon {
|
|
2099
2107
|
transition: transform 0.2s ease;
|
|
2100
2108
|
position: absolute;
|
|
2101
|
-
top:
|
|
2102
|
-
left:
|
|
2109
|
+
top: 0.5625rem;
|
|
2110
|
+
left: 0.25rem;
|
|
2103
2111
|
}
|
|
2104
2112
|
.has-leading-icon limel-icon {
|
|
2105
2113
|
background-color: transparent;
|
|
@@ -2122,8 +2130,12 @@ limel-chip.can-be-removed {
|
|
|
2122
2130
|
display: none;
|
|
2123
2131
|
}
|
|
2124
2132
|
|
|
2133
|
+
:host(limel-chip-set[readonly]) .mdc-text-field.mdc-text-field--disabled {
|
|
2134
|
+
pointer-events: auto;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2125
2137
|
:host {
|
|
2126
|
-
--dropzone-margin: 0.
|
|
2138
|
+
--dropzone-margin: 0.125rem;
|
|
2127
2139
|
--dropzone-color: rgb(var(--contrast-600));
|
|
2128
2140
|
}
|
|
2129
2141
|
|
|
@@ -2242,4 +2254,8 @@ limel-chip.can-be-removed {
|
|
|
2242
2254
|
:host(limel-chip-set:focus-within) limel-helper-line,
|
|
2243
2255
|
:host(limel-chip-set:hover) limel-helper-line {
|
|
2244
2256
|
will-change: grid-template-rows;
|
|
2257
|
+
}
|
|
2258
|
+
|
|
2259
|
+
.mdc-text-field.mdc-text-field--outlined {
|
|
2260
|
+
min-height: 2.5rem;
|
|
2245
2261
|
}
|
|
@@ -317,8 +317,9 @@ export class ChipSet {
|
|
|
317
317
|
];
|
|
318
318
|
}
|
|
319
319
|
getChipProps(chip, chipType) {
|
|
320
|
-
const removable = this.type === 'input' && chip.removable;
|
|
321
|
-
|
|
320
|
+
const removable = this.type === 'input' && chip.removable && !this.readonly;
|
|
321
|
+
const readonly = this.readonly && this.type !== 'input';
|
|
322
|
+
return Object.assign({ role: 'row', identifier: chip.id, text: chip.text, icon: chip.icon, badge: chip.badge, selected: chip.selected, disabled: this.disabled, readonly: readonly, type: chipType, removable: removable, onClick: this.catchInputChipClicks(chip), onRemove: this.handleRemoveChip }, (chip.href && {
|
|
322
323
|
link: {
|
|
323
324
|
href: getHref(chip.href),
|
|
324
325
|
target: getTarget(chip.href),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip-set.js","sourceRoot":"","sources":["../../../src/components/chip-set/chip-set.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EACH,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAE/B;;;;;;;;;;GAUG;AAMH,MAAM,OAAO,OAAO;EAuKhB;IAFQ,kBAAa,GAAG,mBAAmB,CAAC;IA4HpC,aAAQ,GAAG,GAAG,EAAE;MACpB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iCACzB,IAAI,GACJ,CAAC,IAAI,CAAC,IAAI,IAAI;QACb,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;OACnD,CAAC,EACJ,CAAC,CAAC;IACR,CAAC,CAAC;IAkFM,gCAA2B,GAAG,GAAG,EAAE;MACvC,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QAC1C,OAAO,CACH,YAAM,KAAK,EAAC,2DAA2D,aAEhE,CACV,CAAC;OACL;IACL,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Chip, ChipType } from '../chip-set/chip.types';\nimport { Languages } from '../date-picker/date.types';\nimport { MDCTextField } from '@material/textfield';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { handleKeyboardEvent } from './chip-set-input-helpers';\nimport translate from '../../global/translations';\nimport { getHref, getTarget } from '../../util/link-helper';\nimport { isEqual } from 'lodash-es';\nimport { LimelChipCustomEvent } from 'src/components';\n\nconst INPUT_FIELD_TABINDEX = 1;\n\n/**\n * @exampleComponent limel-example-chip-set\n * @exampleComponent limel-example-chip-set-choice\n * @exampleComponent limel-example-chip-set-filter\n * @exampleComponent limel-example-chip-set-filter-badge\n * @exampleComponent limel-example-chip-set-input\n * @exampleComponent limel-example-chip-set-input-type-text\n * @exampleComponent limel-example-chip-set-input-type-search\n * @exampleComponent limel-example-chip-icon-color\n * @exampleComponent limel-example-chip-set-composite\n */\n@Component({\n tag: 'limel-chip-set',\n shadow: true,\n styleUrl: 'chip-set.scss',\n})\nexport class ChipSet {\n /**\n * List of chips for the set\n */\n @Prop()\n public value: Chip[] = [];\n\n /**\n * Type of chip set\n *\n * - `choice` renders a set of selectable chips where only one is selectable. The `removable` property is ignored\n * - `filter` renders a set of selectable chips where all are selectable.\n * - `input` renders a set of chips that can be used in conjunction with an input field\n *\n * If no type is set, a basic set of chips without additional functionality will be rendered\n */\n @Prop({ reflect: true })\n public type?: 'choice' | 'filter' | 'input';\n\n /**\n * Label for the chip-set\n */\n @Prop({ reflect: true })\n public label: string;\n\n /**\n * Optional helper text to display below the chipset.\n * When type is `input`, the helper text is displayed below the\n * input field when it has focus.\n * When type is not `input`, the helper text is always displayed\n * if the device is touch screen; otherwise it is shown when chip-set\n * is hovered or focused using keyboard navigation.\n */\n @Prop({ reflect: true })\n public helperText: string;\n\n /**\n * True if the chip set should be disabled\n */\n @Prop({ reflect: true })\n public disabled: boolean = false;\n\n /**\n * For chip-sets of type `input`, set to `true` to disable adding and\n * removing chips, but allow interaction with existing chips in the set.\n * For any other types, setting either `readonly` or `disabled` disables\n * the chip-set.\n */\n @Prop({ reflect: true })\n public readonly: boolean = false;\n\n /**\n * Set to `true` to indicate that the current value of the input field is\n * invalid.\n */\n @Prop({ reflect: true })\n public invalid = false;\n\n /**\n * For chip-sets of type `input`. Value to use for the `type` attribute on the\n * input field inside the chip-set.\n */\n @Prop({ reflect: true })\n public inputType: 'search' | 'text' = 'text';\n\n /**\n * For chip-sets of type `input`. Limits the maximum number of chips.\n * When the value is `0` or not set, no limit is applied.\n */\n @Prop({ reflect: true })\n public maxItems: number;\n\n /**\n * True if the control requires a value\n */\n @Prop({ reflect: true })\n public required: boolean = false;\n\n /**\n * Search label to display when type is `input` and component is in search mode\n */\n @Prop({ reflect: true })\n public searchLabel: string;\n\n /**\n * Whether the input field should be emptied when the chip-set loses focus.\n */\n @Prop({ reflect: true })\n public emptyInputOnBlur: boolean = true;\n\n /**\n * Whether the \"Clear all\" buttons should be shown\n */\n @Prop()\n public clearAllButton: boolean = true;\n\n /**\n * For chip-sets of type `input`. When the value is null, no leading icon is used.\n * Leading icon to show to the far left in the text field\n */\n @Prop({ reflect: true })\n public leadingIcon: string = null;\n\n /**\n * For chip-set of type `input`. Sets delimiters between chips.\n */\n @Prop({ reflect: true })\n public delimiter: string = null;\n\n /**\n * Defines the language for translations.\n * Will translate the translatable strings on the components. For example, the clear all chips label.\n */\n @Prop()\n public language: Languages = 'en';\n\n /**\n * Dispatched when a chip is interacted with\n */\n @Event()\n private interact: EventEmitter<Chip>;\n\n /**\n * Dispatched when a chip is selected/deselected\n */\n @Event()\n private change: EventEmitter<Chip | Chip[]>;\n\n /**\n * Emitted when an input chip set has received focus and editing in the text field has started\n */\n @Event()\n private startEdit: EventEmitter<void>;\n\n /**\n * Emitted when an input chip set has lost focus and editing in the text field has ended\n */\n @Event()\n private stopEdit: EventEmitter<void>;\n\n /**\n * Dispatched when the input is changed for type `input`\n */\n @Event()\n private input: EventEmitter<string>;\n\n @Element()\n private host: HTMLLimelChipSetElement;\n\n @State()\n private editMode: boolean = false;\n\n @State()\n private textValue: string = '';\n\n @State()\n private blurred: boolean = false;\n\n @State()\n private inputChipIndexSelected: number = null;\n\n @State()\n private selectedChipIds: Array<string | number>;\n\n private mdcTextField: MDCTextField;\n private handleKeyDown = handleKeyboardEvent;\n\n constructor() {\n this.renderChip = this.renderChip.bind(this);\n this.renderInputChip = this.renderInputChip.bind(this);\n this.isFull = this.isFull.bind(this);\n this.handleTextFieldFocus = this.handleTextFieldFocus.bind(this);\n this.handleInputBlur = this.handleInputBlur.bind(this);\n this.handleTextInput = this.handleTextInput.bind(this);\n this.inputFieldOnChange = this.inputFieldOnChange.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.inputHidden = this.inputHidden.bind(this);\n this.handleDeleteAllIconClick =\n this.handleDeleteAllIconClick.bind(this);\n this.renderDelimiter = this.renderDelimiter.bind(this);\n }\n\n public connectedCallback() {\n this.initialize();\n }\n\n private initialize() {\n if (this.value.length) {\n this.selectedChipIds = this.value\n .filter((chip) => chip.selected)\n .map((chip) => chip.id);\n }\n }\n\n /**\n * Used to find out whether the chip-set is in edit mode.\n *\n * @returns `true` if the chip-set is in edit mode, `false` otherwise.\n */\n @Method()\n public async getEditMode(): Promise<boolean> {\n return this.editMode;\n }\n\n /**\n * Used to set focus to the chip-set input field.\n *\n * @param emptyInput - if `true`, any text in the input is discarded\n * @returns does not return anything, but methods have to be async\n */\n @Method()\n public async setFocus(emptyInput: boolean = false) {\n if (this.disabled || this.readonly) {\n return;\n }\n\n this.editMode = true;\n if (emptyInput) {\n this.textValue = '';\n }\n\n this.host.shadowRoot.querySelector('input').focus();\n this.startEdit.emit();\n }\n\n /**\n * Used to empty the input field. Used in conjunction with `emptyInputOnBlur` to let the\n * consumer control when the input is emptied.\n *\n * @returns does not return anything, but methods have to be async\n */\n @Method()\n public async emptyInput() {\n this.syncEmptyInput();\n }\n\n public componentDidLoad() {\n this.triggerIconColorWarning(this.value);\n\n if (this.type === 'input') {\n this.mdcTextField = new MDCTextField(\n this.host.shadowRoot.querySelector('.mdc-text-field'),\n );\n }\n }\n\n public componentDidUpdate() {\n const input = this.host.shadowRoot.querySelector('input');\n if (input && this.editMode) {\n input.focus();\n }\n }\n\n public disconnectedCallback() {\n if (this.mdcTextField) {\n this.mdcTextField.destroy();\n }\n }\n\n public render() {\n if (this.type === 'input') {\n return this.renderInputChips();\n }\n\n const classes = {\n 'mdc-chip-set': true,\n disabled: this.disabled || this.readonly,\n 'mdc-text-field--with-trailing-icon': true,\n };\n if (this.type) {\n classes[`mdc-chip-set--${this.type}`] = true;\n }\n\n const chipSetLabel = this.renderChipSetLabel();\n if (chipSetLabel) {\n classes['chip-set--with-label'] = true;\n }\n\n const value = this.getValue();\n\n return (\n <div class={classes} role=\"grid\">\n {chipSetLabel}\n {value.map(this.renderChip)}\n {this.renderHelperLine()}\n </div>\n );\n }\n\n private getValue = () => {\n return this.value.map((chip) => ({\n ...chip,\n ...(this.type && {\n selected: this.selectedChipIds.includes(chip.id),\n }),\n }));\n };\n\n @Watch('value')\n protected handleChangeChips(newValue: Chip[], oldValue: Chip[]) {\n if (isEqual(newValue, oldValue)) {\n return;\n }\n\n this.syncEmptyInput();\n this.initialize();\n }\n\n private renderChipSetLabel() {\n if (!this.label) {\n return;\n }\n\n return (\n <label class=\"chip-set__label mdc-floating-label mdc-floating-label--float-above\">\n {this.label}\n </label>\n );\n }\n\n private renderInputChips() {\n return [\n <div\n class={{\n 'mdc-text-field mdc-text-field--outlined': true,\n 'mdc-chip-set mdc-chip-set--input': true,\n 'force-invalid': this.isInvalid(),\n 'mdc-text-field--disabled': this.readonly || this.disabled,\n 'lime-text-field--readonly': this.readonly,\n 'has-chips mdc-text-field--label-floating':\n this.value.length !== 0,\n 'has-leading-icon': this.leadingIcon !== null,\n 'has-clear-all-button': this.clearAllButton,\n }}\n onClick={this.handleTextFieldFocus}\n >\n {this.value.map(this.renderInputChip)}\n <input\n tabIndex={INPUT_FIELD_TABINDEX}\n type={this.inputType}\n id=\"input-element\"\n disabled={this.readonly || this.disabled}\n class={{\n 'mdc-text-field__input': true,\n hidden: this.inputHidden(),\n }}\n value={this.textValue}\n onBlur={this.handleInputBlur}\n onFocus={this.handleTextFieldFocus}\n onKeyDown={this.handleKeyDown}\n onInput={this.handleTextInput}\n // Some browsers emit a change event on input elements, we need to stop\n // that event from propagating since we are emitting our own change event\n onChange={this.inputFieldOnChange}\n placeholder={this.isFull() ? '' : this.searchLabel}\n readonly={this.isFull()}\n />\n <div\n class={{\n 'mdc-notched-outline': true,\n 'mdc-notched-outline--upgraded': true,\n 'mdc-text-field--required': this.required,\n 'lime-notched-outline--notched': this.floatLabelAbove(),\n }}\n dropzone-tip={this.dropZoneTip()}\n >\n <div class=\"mdc-notched-outline__leading\" />\n {this.renderLabel()}\n <div class=\"mdc-notched-outline__trailing\" />\n </div>\n {this.renderLeadingIcon()}\n {this.renderEmptyValueForReadonly()}\n {this.renderClearAllChipsButton()}\n </div>,\n this.renderHelperLine(),\n ];\n }\n\n private renderEmptyValueForReadonly = () => {\n if (this.readonly && this.value.length === 0) {\n return (\n <span class=\"lime-empty-value-for-readonly lime-looks-like-input-value\">\n –\n </span>\n );\n }\n };\n\n private renderLabel() {\n const labelClassList = {\n 'mdc-floating-label': true,\n 'mdc-text-field--disabled': this.readonly || this.disabled,\n 'mdc-floating-label--required': this.required,\n 'lime-floating-label--float-above': this.floatLabelAbove(),\n };\n\n if (!this.label) {\n return;\n }\n\n return (\n <div class=\"mdc-notched-outline__notch\">\n <label class={labelClassList} htmlFor=\"input-element\">\n {this.label}\n </label>\n </div>\n );\n }\n\n private floatLabelAbove = () => {\n if (!!this.value.length || this.editMode || this.readonly) {\n return true;\n }\n };\n\n private dropZoneTip = (): string => {\n return translate.get('file.drag-and-drop-tips', this.language);\n };\n\n private isFull(): boolean {\n return !!this.maxItems && this.value.length >= this.maxItems;\n }\n\n private isInvalid() {\n if (this.readonly) {\n // A readonly field can never be invalid.\n return false;\n }\n\n if (this.invalid) {\n return true;\n }\n\n if (!this.required) {\n return false;\n }\n\n if (!this.blurred) {\n return false;\n }\n\n return !this.value || !this.value.length;\n }\n\n private inputFieldOnChange(event) {\n event.stopPropagation();\n }\n\n /**\n * Enter edit mode when the text field receives focus. When editMode is true, the input element will be visible\n */\n private handleTextFieldFocus() {\n if (this.disabled || this.readonly) {\n return;\n }\n\n if (this.editMode) {\n return;\n }\n\n this.editMode = true;\n this.startEdit.emit();\n }\n\n /**\n * Exit edit mode when the input element loses focus. This makes sure the input element does not take up any\n * additional space when the user it not typing anything\n */\n private handleInputBlur() {\n if (this.emptyInputOnBlur) {\n this.syncEmptyInput();\n }\n\n this.editMode = false;\n this.blurred = true;\n this.inputChipIndexSelected = null;\n\n // This timeout is needed in order to let a new element receive focus\n setTimeout(() => {\n this.stopEdit.emit();\n }, 0);\n }\n\n private syncEmptyInput() {\n this.textValue = '';\n }\n\n private inputHidden() {\n if (this.editMode) {\n return this.isFull();\n }\n\n // If there are chips in the picker, hide the input to avoid the input\n // being placed on a new line and adding ugly space beneath the chips.\n // If there are no chips, show the input, or the picker will look weird.\n return !!(this.value && this.value.length);\n }\n\n private handleTextInput(event) {\n event.stopPropagation();\n this.inputChipIndexSelected = null;\n this.textValue = event.target.value;\n this.input.emit(event.target.value && event.target.value.trim());\n }\n\n private emitInteraction(chip: Chip) {\n this.interact.emit(chip);\n }\n\n private renderChip(chip: Chip) {\n const chipType: ChipType =\n this.type === 'filter' ? 'filter' : 'default';\n\n const chipProps = this.getChipProps(chip, chipType);\n\n return <limel-chip {...chipProps} />;\n }\n\n private hasHelperText = () => {\n return this.helperText !== null && this.helperText !== undefined;\n };\n\n private renderHelperLine = () => {\n if (!this.maxItems && !this.hasHelperText()) {\n return;\n }\n\n return (\n <limel-helper-line\n length={this.value.length}\n maxLength={this.maxItems}\n helperText={this.helperText}\n invalid={this.isInvalid()}\n />\n );\n };\n\n private renderInputChip(chip: Chip, index: number) {\n const chipProps = this.getChipProps(chip, 'default');\n\n return [\n <limel-chip\n key={chip.id}\n class={{\n 'can-be-removed': this.inputChipIndexSelected === index,\n }}\n {...chipProps}\n />,\n this.renderDelimiter(),\n ];\n }\n\n private getChipProps(chip: Chip, chipType: ChipType) {\n const removable = this.type === 'input' && chip.removable;\n\n return {\n role: 'row',\n identifier: chip.id,\n text: chip.text,\n icon: chip.icon,\n badge: chip.badge,\n selected: chip.selected,\n disabled: this.disabled,\n readonly: this.readonly,\n type: chipType,\n removable: removable,\n onClick: this.catchInputChipClicks(chip),\n onRemove: this.handleRemoveChip,\n ...(chip.href && {\n link: {\n href: getHref(chip.href),\n target: getTarget(chip.href),\n },\n }),\n };\n }\n\n private catchInputChipClicks = (chip: Chip) => () => {\n if (this.isSelectableChip(chip)) {\n this.updateSelectedChipIds(chip);\n this.change.emit(chip);\n }\n\n this.emitInteraction(chip);\n };\n\n private isSelectableChip(chip: Chip): boolean {\n return this.type !== 'input' && 'selected' in chip;\n }\n\n private updateSelectedChipIds(chip: Chip): void {\n chip.selected = !chip.selected;\n const id = chip.id;\n if (this.type === 'choice') {\n this.updateChoiceTypeSelectedIds(id);\n } else {\n this.updateFilterTypeSelectedIds(id);\n }\n }\n\n private updateChoiceTypeSelectedIds(id: number | string): void {\n this.selectedChipIds = this.isChipSelected(id) ? [] : [id];\n }\n\n private isChipSelected(id: number | string): boolean {\n return !!this.selectedChipIds.find((chipId) => chipId === id);\n }\n\n private updateFilterTypeSelectedIds(id: number | string): void {\n if (this.isChipSelected(id)) {\n this.removeChipIdFromSelectedChipIds(id);\n } else {\n this.addChipIdToSelectedChipIds(id);\n }\n }\n\n private removeChipIdFromSelectedChipIds(id: number | string): void {\n this.selectedChipIds = this.selectedChipIds.filter(\n (chipId) => chipId !== id,\n );\n }\n\n private addChipIdToSelectedChipIds(id: number | string): void {\n this.selectedChipIds = [...this.selectedChipIds, id];\n }\n\n private handleRemoveChip = (\n event: LimelChipCustomEvent<string | number>,\n ) => {\n this.removeChip(event.detail);\n };\n\n private removeChip = (identifier: string | number) => {\n const newValue = this.value.filter((chip) => {\n return chip.id !== identifier;\n });\n this.change.emit(newValue);\n };\n\n private renderLeadingIcon() {\n if (!this.leadingIcon) {\n return;\n }\n\n return (\n <i class=\"mdc-text-field__icon search-icon\">\n <limel-icon name={this.leadingIcon} />\n </i>\n );\n }\n\n private renderClearAllChipsButton() {\n if (this.disabled || this.readonly || !this.clearAllButton) {\n return;\n }\n\n return (\n <a\n href=\"\"\n onClick={this.handleDeleteAllIconClick}\n class=\"mdc-text-field__icon clear-all-button\"\n tabindex=\"0\"\n role=\"button\"\n title={this.clearAllChipsLabel()}\n aria-label={this.clearAllChipsLabel()}\n />\n );\n }\n\n private clearAllChipsLabel = (): string => {\n return translate.get('chip-set.clear-all', this.language);\n };\n\n private handleDeleteAllIconClick(event: Event) {\n event.preventDefault();\n this.change.emit([]);\n }\n\n private renderDelimiter() {\n if (!this.delimiter) {\n return;\n }\n\n return <div class=\"delimiter\">{this.delimiter}</div>;\n }\n\n private triggerIconColorWarning(value: Chip[]) {\n for (const chip of value) {\n if (\n chip.icon &&\n (chip.iconFillColor ||\n chip.iconBackgroundColor ||\n chip.iconTitle)\n ) {\n /* eslint-disable-next-line no-console */\n console.warn(\n \"The `iconFillColor`, `iconBackgroundColor`, and `iconTitle` props are deprecated now! Use the new `Icon` interface and instead of `iconColor: 'color-name', `iconBackgroundColor: 'color-name', and `iconTitle: 'title'`, write `icon { name: 'icon-name', color: 'color-name', backgroundColor: 'color-name', title: 'title' }`.\",\n );\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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Chip, ChipType } from '../chip-set/chip.types';\nimport { Languages } from '../date-picker/date.types';\nimport { MDCTextField } from '@material/textfield';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { handleKeyboardEvent } from './chip-set-input-helpers';\nimport translate from '../../global/translations';\nimport { getHref, getTarget } from '../../util/link-helper';\nimport { isEqual } from 'lodash-es';\nimport { LimelChipCustomEvent } from 'src/components';\n\nconst INPUT_FIELD_TABINDEX = 1;\n\n/**\n * @exampleComponent limel-example-chip-set\n * @exampleComponent limel-example-chip-set-choice\n * @exampleComponent limel-example-chip-set-filter\n * @exampleComponent limel-example-chip-set-filter-badge\n * @exampleComponent limel-example-chip-set-input\n * @exampleComponent limel-example-chip-set-input-type-text\n * @exampleComponent limel-example-chip-set-input-type-search\n * @exampleComponent limel-example-chip-icon-color\n * @exampleComponent limel-example-chip-set-composite\n */\n@Component({\n tag: 'limel-chip-set',\n shadow: true,\n styleUrl: 'chip-set.scss',\n})\nexport class ChipSet {\n /**\n * List of chips for the set\n */\n @Prop()\n public value: Chip[] = [];\n\n /**\n * Type of chip set\n *\n * - `choice` renders a set of selectable chips where only one is selectable. The `removable` property is ignored\n * - `filter` renders a set of selectable chips where all are selectable.\n * - `input` renders a set of chips that can be used in conjunction with an input field\n *\n * If no type is set, a basic set of chips without additional functionality will be rendered\n */\n @Prop({ reflect: true })\n public type?: 'choice' | 'filter' | 'input';\n\n /**\n * Label for the chip-set\n */\n @Prop({ reflect: true })\n public label: string;\n\n /**\n * Optional helper text to display below the chipset.\n * When type is `input`, the helper text is displayed below the\n * input field when it has focus.\n * When type is not `input`, the helper text is always displayed\n * if the device is touch screen; otherwise it is shown when chip-set\n * is hovered or focused using keyboard navigation.\n */\n @Prop({ reflect: true })\n public helperText: string;\n\n /**\n * True if the chip set should be disabled\n */\n @Prop({ reflect: true })\n public disabled: boolean = false;\n\n /**\n * For chip-sets of type `input`, set to `true` to disable adding and\n * removing chips, but allow interaction with existing chips in the set.\n * For any other types, setting either `readonly` or `disabled` disables\n * the chip-set.\n */\n @Prop({ reflect: true })\n public readonly: boolean = false;\n\n /**\n * Set to `true` to indicate that the current value of the input field is\n * invalid.\n */\n @Prop({ reflect: true })\n public invalid = false;\n\n /**\n * For chip-sets of type `input`. Value to use for the `type` attribute on the\n * input field inside the chip-set.\n */\n @Prop({ reflect: true })\n public inputType: 'search' | 'text' = 'text';\n\n /**\n * For chip-sets of type `input`. Limits the maximum number of chips.\n * When the value is `0` or not set, no limit is applied.\n */\n @Prop({ reflect: true })\n public maxItems: number;\n\n /**\n * True if the control requires a value\n */\n @Prop({ reflect: true })\n public required: boolean = false;\n\n /**\n * Search label to display when type is `input` and component is in search mode\n */\n @Prop({ reflect: true })\n public searchLabel: string;\n\n /**\n * Whether the input field should be emptied when the chip-set loses focus.\n */\n @Prop({ reflect: true })\n public emptyInputOnBlur: boolean = true;\n\n /**\n * Whether the \"Clear all\" buttons should be shown\n */\n @Prop()\n public clearAllButton: boolean = true;\n\n /**\n * For chip-sets of type `input`. When the value is null, no leading icon is used.\n * Leading icon to show to the far left in the text field\n */\n @Prop({ reflect: true })\n public leadingIcon: string = null;\n\n /**\n * For chip-set of type `input`. Sets delimiters between chips.\n */\n @Prop({ reflect: true })\n public delimiter: string = null;\n\n /**\n * Defines the language for translations.\n * Will translate the translatable strings on the components. For example, the clear all chips label.\n */\n @Prop()\n public language: Languages = 'en';\n\n /**\n * Dispatched when a chip is interacted with\n */\n @Event()\n private interact: EventEmitter<Chip>;\n\n /**\n * Dispatched when a chip is selected/deselected\n */\n @Event()\n private change: EventEmitter<Chip | Chip[]>;\n\n /**\n * Emitted when an input chip set has received focus and editing in the text field has started\n */\n @Event()\n private startEdit: EventEmitter<void>;\n\n /**\n * Emitted when an input chip set has lost focus and editing in the text field has ended\n */\n @Event()\n private stopEdit: EventEmitter<void>;\n\n /**\n * Dispatched when the input is changed for type `input`\n */\n @Event()\n private input: EventEmitter<string>;\n\n @Element()\n private host: HTMLLimelChipSetElement;\n\n @State()\n private editMode: boolean = false;\n\n @State()\n private textValue: string = '';\n\n @State()\n private blurred: boolean = false;\n\n @State()\n private inputChipIndexSelected: number = null;\n\n @State()\n private selectedChipIds: Array<string | number>;\n\n private mdcTextField: MDCTextField;\n private handleKeyDown = handleKeyboardEvent;\n\n constructor() {\n this.renderChip = this.renderChip.bind(this);\n this.renderInputChip = this.renderInputChip.bind(this);\n this.isFull = this.isFull.bind(this);\n this.handleTextFieldFocus = this.handleTextFieldFocus.bind(this);\n this.handleInputBlur = this.handleInputBlur.bind(this);\n this.handleTextInput = this.handleTextInput.bind(this);\n this.inputFieldOnChange = this.inputFieldOnChange.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.inputHidden = this.inputHidden.bind(this);\n this.handleDeleteAllIconClick =\n this.handleDeleteAllIconClick.bind(this);\n this.renderDelimiter = this.renderDelimiter.bind(this);\n }\n\n public connectedCallback() {\n this.initialize();\n }\n\n private initialize() {\n if (this.value.length) {\n this.selectedChipIds = this.value\n .filter((chip) => chip.selected)\n .map((chip) => chip.id);\n }\n }\n\n /**\n * Used to find out whether the chip-set is in edit mode.\n *\n * @returns `true` if the chip-set is in edit mode, `false` otherwise.\n */\n @Method()\n public async getEditMode(): Promise<boolean> {\n return this.editMode;\n }\n\n /**\n * Used to set focus to the chip-set input field.\n *\n * @param emptyInput - if `true`, any text in the input is discarded\n * @returns does not return anything, but methods have to be async\n */\n @Method()\n public async setFocus(emptyInput: boolean = false) {\n if (this.disabled || this.readonly) {\n return;\n }\n\n this.editMode = true;\n if (emptyInput) {\n this.textValue = '';\n }\n\n this.host.shadowRoot.querySelector('input').focus();\n this.startEdit.emit();\n }\n\n /**\n * Used to empty the input field. Used in conjunction with `emptyInputOnBlur` to let the\n * consumer control when the input is emptied.\n *\n * @returns does not return anything, but methods have to be async\n */\n @Method()\n public async emptyInput() {\n this.syncEmptyInput();\n }\n\n public componentDidLoad() {\n this.triggerIconColorWarning(this.value);\n\n if (this.type === 'input') {\n this.mdcTextField = new MDCTextField(\n this.host.shadowRoot.querySelector('.mdc-text-field'),\n );\n }\n }\n\n public componentDidUpdate() {\n const input = this.host.shadowRoot.querySelector('input');\n if (input && this.editMode) {\n input.focus();\n }\n }\n\n public disconnectedCallback() {\n if (this.mdcTextField) {\n this.mdcTextField.destroy();\n }\n }\n\n public render() {\n if (this.type === 'input') {\n return this.renderInputChips();\n }\n\n const classes = {\n 'mdc-chip-set': true,\n disabled: this.disabled || this.readonly,\n 'mdc-text-field--with-trailing-icon': true,\n };\n if (this.type) {\n classes[`mdc-chip-set--${this.type}`] = true;\n }\n\n const chipSetLabel = this.renderChipSetLabel();\n if (chipSetLabel) {\n classes['chip-set--with-label'] = true;\n }\n\n const value = this.getValue();\n\n return (\n <div class={classes} role=\"grid\">\n {chipSetLabel}\n {value.map(this.renderChip)}\n {this.renderHelperLine()}\n </div>\n );\n }\n\n private getValue = () => {\n return this.value.map((chip) => ({\n ...chip,\n ...(this.type && {\n selected: this.selectedChipIds.includes(chip.id),\n }),\n }));\n };\n\n @Watch('value')\n protected handleChangeChips(newValue: Chip[], oldValue: Chip[]) {\n if (isEqual(newValue, oldValue)) {\n return;\n }\n\n this.syncEmptyInput();\n this.initialize();\n }\n\n private renderChipSetLabel() {\n if (!this.label) {\n return;\n }\n\n return (\n <label class=\"chip-set__label mdc-floating-label mdc-floating-label--float-above\">\n {this.label}\n </label>\n );\n }\n\n private renderInputChips() {\n return [\n <div\n class={{\n 'mdc-text-field mdc-text-field--outlined': true,\n 'mdc-chip-set mdc-chip-set--input': true,\n 'force-invalid': this.isInvalid(),\n 'mdc-text-field--disabled': this.readonly || this.disabled,\n 'lime-text-field--readonly': this.readonly,\n 'has-chips mdc-text-field--label-floating':\n this.value.length !== 0,\n 'has-leading-icon': this.leadingIcon !== null,\n 'has-clear-all-button': this.clearAllButton,\n }}\n onClick={this.handleTextFieldFocus}\n >\n {this.value.map(this.renderInputChip)}\n <input\n tabIndex={INPUT_FIELD_TABINDEX}\n type={this.inputType}\n id=\"input-element\"\n disabled={this.readonly || this.disabled}\n class={{\n 'mdc-text-field__input': true,\n hidden: this.inputHidden(),\n }}\n value={this.textValue}\n onBlur={this.handleInputBlur}\n onFocus={this.handleTextFieldFocus}\n onKeyDown={this.handleKeyDown}\n onInput={this.handleTextInput}\n // Some browsers emit a change event on input elements, we need to stop\n // that event from propagating since we are emitting our own change event\n onChange={this.inputFieldOnChange}\n placeholder={this.isFull() ? '' : this.searchLabel}\n readonly={this.isFull()}\n />\n <div\n class={{\n 'mdc-notched-outline': true,\n 'mdc-notched-outline--upgraded': true,\n 'mdc-text-field--required': this.required,\n 'lime-notched-outline--notched': this.floatLabelAbove(),\n }}\n dropzone-tip={this.dropZoneTip()}\n >\n <div class=\"mdc-notched-outline__leading\" />\n {this.renderLabel()}\n <div class=\"mdc-notched-outline__trailing\" />\n </div>\n {this.renderLeadingIcon()}\n {this.renderEmptyValueForReadonly()}\n {this.renderClearAllChipsButton()}\n </div>,\n this.renderHelperLine(),\n ];\n }\n\n private renderEmptyValueForReadonly = () => {\n if (this.readonly && this.value.length === 0) {\n return (\n <span class=\"lime-empty-value-for-readonly lime-looks-like-input-value\">\n –\n </span>\n );\n }\n };\n\n private renderLabel() {\n const labelClassList = {\n 'mdc-floating-label': true,\n 'mdc-text-field--disabled': this.readonly || this.disabled,\n 'mdc-floating-label--required': this.required,\n 'lime-floating-label--float-above': this.floatLabelAbove(),\n };\n\n if (!this.label) {\n return;\n }\n\n return (\n <div class=\"mdc-notched-outline__notch\">\n <label class={labelClassList} htmlFor=\"input-element\">\n {this.label}\n </label>\n </div>\n );\n }\n\n private floatLabelAbove = () => {\n if (!!this.value.length || this.editMode || this.readonly) {\n return true;\n }\n };\n\n private dropZoneTip = (): string => {\n return translate.get('file.drag-and-drop-tips', this.language);\n };\n\n private isFull(): boolean {\n return !!this.maxItems && this.value.length >= this.maxItems;\n }\n\n private isInvalid() {\n if (this.readonly) {\n // A readonly field can never be invalid.\n return false;\n }\n\n if (this.invalid) {\n return true;\n }\n\n if (!this.required) {\n return false;\n }\n\n if (!this.blurred) {\n return false;\n }\n\n return !this.value || !this.value.length;\n }\n\n private inputFieldOnChange(event) {\n event.stopPropagation();\n }\n\n /**\n * Enter edit mode when the text field receives focus. When editMode is true, the input element will be visible\n */\n private handleTextFieldFocus() {\n if (this.disabled || this.readonly) {\n return;\n }\n\n if (this.editMode) {\n return;\n }\n\n this.editMode = true;\n this.startEdit.emit();\n }\n\n /**\n * Exit edit mode when the input element loses focus. This makes sure the input element does not take up any\n * additional space when the user it not typing anything\n */\n private handleInputBlur() {\n if (this.emptyInputOnBlur) {\n this.syncEmptyInput();\n }\n\n this.editMode = false;\n this.blurred = true;\n this.inputChipIndexSelected = null;\n\n // This timeout is needed in order to let a new element receive focus\n setTimeout(() => {\n this.stopEdit.emit();\n }, 0);\n }\n\n private syncEmptyInput() {\n this.textValue = '';\n }\n\n private inputHidden() {\n if (this.editMode) {\n return this.isFull();\n }\n\n // If there are chips in the picker, hide the input to avoid the input\n // being placed on a new line and adding ugly space beneath the chips.\n // If there are no chips, show the input, or the picker will look weird.\n return !!(this.value && this.value.length);\n }\n\n private handleTextInput(event) {\n event.stopPropagation();\n this.inputChipIndexSelected = null;\n this.textValue = event.target.value;\n this.input.emit(event.target.value && event.target.value.trim());\n }\n\n private emitInteraction(chip: Chip) {\n this.interact.emit(chip);\n }\n\n private renderChip(chip: Chip) {\n const chipType: ChipType =\n this.type === 'filter' ? 'filter' : 'default';\n\n const chipProps = this.getChipProps(chip, chipType);\n\n return <limel-chip {...chipProps} />;\n }\n\n private hasHelperText = () => {\n return this.helperText !== null && this.helperText !== undefined;\n };\n\n private renderHelperLine = () => {\n if (!this.maxItems && !this.hasHelperText()) {\n return;\n }\n\n return (\n <limel-helper-line\n length={this.value.length}\n maxLength={this.maxItems}\n helperText={this.helperText}\n invalid={this.isInvalid()}\n />\n );\n };\n\n private renderInputChip(chip: Chip, index: number) {\n const chipProps = this.getChipProps(chip, 'default');\n\n return [\n <limel-chip\n key={chip.id}\n class={{\n 'can-be-removed': this.inputChipIndexSelected === index,\n }}\n {...chipProps}\n />,\n this.renderDelimiter(),\n ];\n }\n\n private getChipProps(chip: Chip, chipType: ChipType) {\n const removable =\n this.type === 'input' && chip.removable && !this.readonly;\n const readonly = this.readonly && this.type !== 'input';\n\n return {\n role: 'row',\n identifier: chip.id,\n text: chip.text,\n icon: chip.icon,\n badge: chip.badge,\n selected: chip.selected,\n disabled: this.disabled,\n readonly: readonly,\n type: chipType,\n removable: removable,\n onClick: this.catchInputChipClicks(chip),\n onRemove: this.handleRemoveChip,\n ...(chip.href && {\n link: {\n href: getHref(chip.href),\n target: getTarget(chip.href),\n },\n }),\n };\n }\n\n private catchInputChipClicks = (chip: Chip) => () => {\n if (this.isSelectableChip(chip)) {\n this.updateSelectedChipIds(chip);\n this.change.emit(chip);\n }\n\n this.emitInteraction(chip);\n };\n\n private isSelectableChip(chip: Chip): boolean {\n return this.type !== 'input' && 'selected' in chip;\n }\n\n private updateSelectedChipIds(chip: Chip): void {\n chip.selected = !chip.selected;\n const id = chip.id;\n if (this.type === 'choice') {\n this.updateChoiceTypeSelectedIds(id);\n } else {\n this.updateFilterTypeSelectedIds(id);\n }\n }\n\n private updateChoiceTypeSelectedIds(id: number | string): void {\n this.selectedChipIds = this.isChipSelected(id) ? [] : [id];\n }\n\n private isChipSelected(id: number | string): boolean {\n return !!this.selectedChipIds.find((chipId) => chipId === id);\n }\n\n private updateFilterTypeSelectedIds(id: number | string): void {\n if (this.isChipSelected(id)) {\n this.removeChipIdFromSelectedChipIds(id);\n } else {\n this.addChipIdToSelectedChipIds(id);\n }\n }\n\n private removeChipIdFromSelectedChipIds(id: number | string): void {\n this.selectedChipIds = this.selectedChipIds.filter(\n (chipId) => chipId !== id,\n );\n }\n\n private addChipIdToSelectedChipIds(id: number | string): void {\n this.selectedChipIds = [...this.selectedChipIds, id];\n }\n\n private handleRemoveChip = (\n event: LimelChipCustomEvent<string | number>,\n ) => {\n this.removeChip(event.detail);\n };\n\n private removeChip = (identifier: string | number) => {\n const newValue = this.value.filter((chip) => {\n return chip.id !== identifier;\n });\n this.change.emit(newValue);\n };\n\n private renderLeadingIcon() {\n if (!this.leadingIcon) {\n return;\n }\n\n return (\n <i class=\"mdc-text-field__icon search-icon\">\n <limel-icon name={this.leadingIcon} />\n </i>\n );\n }\n\n private renderClearAllChipsButton() {\n if (this.disabled || this.readonly || !this.clearAllButton) {\n return;\n }\n\n return (\n <a\n href=\"\"\n onClick={this.handleDeleteAllIconClick}\n class=\"mdc-text-field__icon clear-all-button\"\n tabindex=\"0\"\n role=\"button\"\n title={this.clearAllChipsLabel()}\n aria-label={this.clearAllChipsLabel()}\n />\n );\n }\n\n private clearAllChipsLabel = (): string => {\n return translate.get('chip-set.clear-all', this.language);\n };\n\n private handleDeleteAllIconClick(event: Event) {\n event.preventDefault();\n this.change.emit([]);\n }\n\n private renderDelimiter() {\n if (!this.delimiter) {\n return;\n }\n\n return <div class=\"delimiter\">{this.delimiter}</div>;\n }\n\n private triggerIconColorWarning(value: Chip[]) {\n for (const chip of value) {\n if (\n chip.icon &&\n (chip.iconFillColor ||\n chip.iconBackgroundColor ||\n chip.iconTitle)\n ) {\n /* eslint-disable-next-line no-console */\n console.warn(\n \"The `iconFillColor`, `iconBackgroundColor`, and `iconTitle` props are deprecated now! Use the new `Icon` interface and instead of `iconColor: 'color-name', `iconBackgroundColor: 'color-name', and `iconTitle: 'title'`, write `icon { name: 'icon-name', color: 'color-name', backgroundColor: 'color-name', title: 'title' }`.\",\n );\n }\n }\n }\n}\n"]}
|
|
@@ -689,6 +689,72 @@
|
|
|
689
689
|
* 2. the CSS variables of `--kompendium-example-font-family`
|
|
690
690
|
* in the `<style>` tag of `index.html`.
|
|
691
691
|
*/
|
|
692
|
+
/*
|
|
693
|
+
* This file is imported into every component!
|
|
694
|
+
*
|
|
695
|
+
* Nothing in this file may output any CSS
|
|
696
|
+
* without being explicitly called by outside code.
|
|
697
|
+
*/
|
|
698
|
+
/*
|
|
699
|
+
* This file is imported into every component that uses MDC!
|
|
700
|
+
*
|
|
701
|
+
* Anything in this file that generates CSS output on its own,
|
|
702
|
+
* without being explicitly used, will output that CSS in every
|
|
703
|
+
* single component, increasing the size of the production build.
|
|
704
|
+
* Avoid that unless there's very good reason for it!
|
|
705
|
+
*/
|
|
706
|
+
/*
|
|
707
|
+
* This file is imported into every component that uses MDC!
|
|
708
|
+
*
|
|
709
|
+
* Anything in this file that generates CSS output on its own,
|
|
710
|
+
* without being explicitly used, will output that CSS in every
|
|
711
|
+
* single component, increasing the size of the production build.
|
|
712
|
+
* Avoid that unless there's very good reason for it!
|
|
713
|
+
*/
|
|
714
|
+
:host {
|
|
715
|
+
--mdc-theme-primary: var(
|
|
716
|
+
--lime-primary-color,
|
|
717
|
+
rgb(var(--color-teal-default))
|
|
718
|
+
);
|
|
719
|
+
--mdc-theme-secondary: var(
|
|
720
|
+
--lime-secondary-color,
|
|
721
|
+
rgb(var(--contrast-1100))
|
|
722
|
+
);
|
|
723
|
+
--mdc-theme-on-primary: var(
|
|
724
|
+
--lime-on-primary-color,
|
|
725
|
+
rgb(var(--contrast-100))
|
|
726
|
+
);
|
|
727
|
+
--mdc-theme-on-secondary: var(
|
|
728
|
+
--lime-on-secondary-color,
|
|
729
|
+
rgb(var(--contrast-100))
|
|
730
|
+
);
|
|
731
|
+
--mdc-theme-text-disabled-on-background: var(
|
|
732
|
+
--lime-text-disabled-on-background-color,
|
|
733
|
+
rgba(var(--contrast-1700), 0.38)
|
|
734
|
+
);
|
|
735
|
+
--mdc-theme-text-primary-on-background: var(
|
|
736
|
+
--lime-text-primary-on-background-color,
|
|
737
|
+
rgba(var(--contrast-1700), 0.87)
|
|
738
|
+
);
|
|
739
|
+
--mdc-theme-text-secondary-on-background: var(
|
|
740
|
+
--lime-text-secondary-on-background-color,
|
|
741
|
+
rgba(var(--contrast-1700), 0.54)
|
|
742
|
+
);
|
|
743
|
+
--mdc-theme-error: var(
|
|
744
|
+
--lime-error-background-color,
|
|
745
|
+
rgb(var(--color-red-dark))
|
|
746
|
+
);
|
|
747
|
+
--lime-error-text-color: rgb(var(--color-red-darker));
|
|
748
|
+
--mdc-theme-surface: var(
|
|
749
|
+
--lime-surface-background-color,
|
|
750
|
+
rgb(var(--contrast-100))
|
|
751
|
+
);
|
|
752
|
+
--mdc-theme-on-surface: var(
|
|
753
|
+
--lime-on-surface-color,
|
|
754
|
+
rgb(var(--contrast-1500))
|
|
755
|
+
);
|
|
756
|
+
}
|
|
757
|
+
|
|
692
758
|
.picker-trigger[style="--background:lime-magenta;"]:after,
|
|
693
759
|
.chosen-color-preview[style="--background:lime-magenta;"]:after {
|
|
694
760
|
background-color: var(--lime-magenta);
|
|
@@ -727,13 +793,14 @@
|
|
|
727
793
|
}
|
|
728
794
|
|
|
729
795
|
:host {
|
|
796
|
+
position: relative;
|
|
730
797
|
--popover-surface-width: 50rem;
|
|
731
798
|
--color-picker-default-background: url("data:image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' style='fill-rule:evenodd;'><path fill='rgba(186,186,192,0.16)' d='M0 0h4v4H0zM4 4h4v4H4z'/></svg>");
|
|
732
799
|
}
|
|
733
800
|
|
|
734
801
|
.color-picker {
|
|
735
802
|
display: grid;
|
|
736
|
-
gap: 0.
|
|
803
|
+
gap: 0.25rem;
|
|
737
804
|
grid-template-columns: auto 1fr;
|
|
738
805
|
}
|
|
739
806
|
|
|
@@ -771,8 +838,8 @@
|
|
|
771
838
|
box-sizing: border-box;
|
|
772
839
|
position: relative;
|
|
773
840
|
isolation: isolate;
|
|
774
|
-
width:
|
|
775
|
-
height:
|
|
841
|
+
width: 2.5rem;
|
|
842
|
+
height: 2.5rem;
|
|
776
843
|
}
|
|
777
844
|
.chosen-color-preview:before, .chosen-color-preview:after,
|
|
778
845
|
.picker-trigger:before,
|
|
@@ -801,7 +868,7 @@
|
|
|
801
868
|
}
|
|
802
869
|
|
|
803
870
|
.chosen-color-input[readonly] {
|
|
804
|
-
transform: translateY(
|
|
871
|
+
transform: translateX(calc( 2.5rem / 4 * -1 )) translateY(calc(2.5rem / 4));
|
|
805
872
|
}
|
|
806
873
|
|
|
807
874
|
:host {
|
|
@@ -52,6 +52,72 @@
|
|
|
52
52
|
* 2. the CSS variables of `--kompendium-example-font-family`
|
|
53
53
|
* in the `<style>` tag of `index.html`.
|
|
54
54
|
*/
|
|
55
|
+
/*
|
|
56
|
+
* This file is imported into every component!
|
|
57
|
+
*
|
|
58
|
+
* Nothing in this file may output any CSS
|
|
59
|
+
* without being explicitly called by outside code.
|
|
60
|
+
*/
|
|
61
|
+
/*
|
|
62
|
+
* This file is imported into every component that uses MDC!
|
|
63
|
+
*
|
|
64
|
+
* Anything in this file that generates CSS output on its own,
|
|
65
|
+
* without being explicitly used, will output that CSS in every
|
|
66
|
+
* single component, increasing the size of the production build.
|
|
67
|
+
* Avoid that unless there's very good reason for it!
|
|
68
|
+
*/
|
|
69
|
+
/*
|
|
70
|
+
* This file is imported into every component that uses MDC!
|
|
71
|
+
*
|
|
72
|
+
* Anything in this file that generates CSS output on its own,
|
|
73
|
+
* without being explicitly used, will output that CSS in every
|
|
74
|
+
* single component, increasing the size of the production build.
|
|
75
|
+
* Avoid that unless there's very good reason for it!
|
|
76
|
+
*/
|
|
77
|
+
:host {
|
|
78
|
+
--mdc-theme-primary: var(
|
|
79
|
+
--lime-primary-color,
|
|
80
|
+
rgb(var(--color-teal-default))
|
|
81
|
+
);
|
|
82
|
+
--mdc-theme-secondary: var(
|
|
83
|
+
--lime-secondary-color,
|
|
84
|
+
rgb(var(--contrast-1100))
|
|
85
|
+
);
|
|
86
|
+
--mdc-theme-on-primary: var(
|
|
87
|
+
--lime-on-primary-color,
|
|
88
|
+
rgb(var(--contrast-100))
|
|
89
|
+
);
|
|
90
|
+
--mdc-theme-on-secondary: var(
|
|
91
|
+
--lime-on-secondary-color,
|
|
92
|
+
rgb(var(--contrast-100))
|
|
93
|
+
);
|
|
94
|
+
--mdc-theme-text-disabled-on-background: var(
|
|
95
|
+
--lime-text-disabled-on-background-color,
|
|
96
|
+
rgba(var(--contrast-1700), 0.38)
|
|
97
|
+
);
|
|
98
|
+
--mdc-theme-text-primary-on-background: var(
|
|
99
|
+
--lime-text-primary-on-background-color,
|
|
100
|
+
rgba(var(--contrast-1700), 0.87)
|
|
101
|
+
);
|
|
102
|
+
--mdc-theme-text-secondary-on-background: var(
|
|
103
|
+
--lime-text-secondary-on-background-color,
|
|
104
|
+
rgba(var(--contrast-1700), 0.54)
|
|
105
|
+
);
|
|
106
|
+
--mdc-theme-error: var(
|
|
107
|
+
--lime-error-background-color,
|
|
108
|
+
rgb(var(--color-red-dark))
|
|
109
|
+
);
|
|
110
|
+
--lime-error-text-color: rgb(var(--color-red-darker));
|
|
111
|
+
--mdc-theme-surface: var(
|
|
112
|
+
--lime-surface-background-color,
|
|
113
|
+
rgb(var(--contrast-100))
|
|
114
|
+
);
|
|
115
|
+
--mdc-theme-on-surface: var(
|
|
116
|
+
--lime-on-surface-color,
|
|
117
|
+
rgb(var(--contrast-1500))
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
55
121
|
.picker-trigger[style="--background:lime-magenta;"]:after,
|
|
56
122
|
.chosen-color-preview[style="--background:lime-magenta;"]:after {
|
|
57
123
|
background-color: var(--lime-magenta);
|
|
@@ -90,13 +156,14 @@
|
|
|
90
156
|
}
|
|
91
157
|
|
|
92
158
|
:host {
|
|
159
|
+
position: relative;
|
|
93
160
|
--popover-surface-width: 50rem;
|
|
94
161
|
--color-picker-default-background: url("data:image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' style='fill-rule:evenodd;'><path fill='rgba(186,186,192,0.16)' d='M0 0h4v4H0zM4 4h4v4H4z'/></svg>");
|
|
95
162
|
}
|
|
96
163
|
|
|
97
164
|
.color-picker {
|
|
98
165
|
display: grid;
|
|
99
|
-
gap: 0.
|
|
166
|
+
gap: 0.25rem;
|
|
100
167
|
grid-template-columns: auto 1fr;
|
|
101
168
|
}
|
|
102
169
|
|
|
@@ -134,8 +201,8 @@
|
|
|
134
201
|
box-sizing: border-box;
|
|
135
202
|
position: relative;
|
|
136
203
|
isolation: isolate;
|
|
137
|
-
width:
|
|
138
|
-
height:
|
|
204
|
+
width: 2.5rem;
|
|
205
|
+
height: 2.5rem;
|
|
139
206
|
}
|
|
140
207
|
.chosen-color-preview:before, .chosen-color-preview:after,
|
|
141
208
|
.picker-trigger:before,
|
|
@@ -164,5 +231,5 @@
|
|
|
164
231
|
}
|
|
165
232
|
|
|
166
233
|
.chosen-color-input[readonly] {
|
|
167
|
-
transform: translateY(
|
|
234
|
+
transform: translateX(calc( 2.5rem / 4 * -1 )) translateY(calc(2.5rem / 4));
|
|
168
235
|
}
|
|
@@ -448,7 +448,7 @@ limel-code-editor {
|
|
|
448
448
|
}
|
|
449
449
|
|
|
450
450
|
.limel-form-layout--grid {
|
|
451
|
-
--min-height-of-one-row:
|
|
451
|
+
--min-height-of-one-row: 2.5rem;
|
|
452
452
|
display: grid;
|
|
453
453
|
column-gap: var(--form-column-gap, 1rem);
|
|
454
454
|
row-gap: var(--form-row-gap, 1rem);
|
|
@@ -522,7 +522,6 @@ limel-code-editor {
|
|
|
522
522
|
min-height: var(--min-height-of-one-row);
|
|
523
523
|
}
|
|
524
524
|
.limel-form-layout--grid limel-checkbox {
|
|
525
|
-
margin-top: 0.5rem;
|
|
526
525
|
display: block;
|
|
527
526
|
}
|
|
528
527
|
.limel-form-layout--grid limel-switch {
|
|
@@ -41,6 +41,7 @@ import { getIconName } from '../icon/get-icon-props';
|
|
|
41
41
|
* :::
|
|
42
42
|
*
|
|
43
43
|
* @exampleComponent limel-example-header
|
|
44
|
+
* @exampleComponent limel-example-header-slot-actions
|
|
44
45
|
* @exampleComponent limel-example-header-colors
|
|
45
46
|
* @exampleComponent limel-example-header-responsive
|
|
46
47
|
* @exampleComponent limel-example-header-narrow
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../src/components/header/header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD
|
|
1
|
+
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../src/components/header/header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAMH,MAAM,OAAO,MAAM;;;;;;6BA8BqB,GAAG;;EAEhC,MAAM;IACT,OAAO;MACH,WAAK,KAAK,EAAC,aAAa;QACnB,IAAI,CAAC,UAAU,EAAE;QAClB,WAAK,KAAK,EAAC,UAAU;UACjB,UAAI,KAAK,EAAC,SAAS,EAAC,KAAK,EAAE,IAAI,CAAC,OAAO,IAClC,IAAI,CAAC,OAAO,CACZ;UACL,UAAI,KAAK,EAAC,YAAY,EAAC,KAAK,EAAE,IAAI,CAAC,UAAU;YACxC,IAAI,CAAC,UAAU;YACf,IAAI,CAAC,oBAAoB,EAAE,CAC3B,CACH,CACJ;MACN,YAAM,IAAI,EAAC,SAAS;QAChB,eAAQ,CACL;KACV,CAAC;EACN,CAAC;EAEO,UAAU;IACd,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEpC,IAAI,CAAC,IAAI,EAAE;MACP,OAAO;KACV;IAED,OAAO,kBAAY,KAAK,EAAC,MAAM,EAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAI,CAAC;EAChE,CAAC;EAEO,oBAAoB;IACxB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;MACtB,OAAO;KACV;IAED,OAAO,CACH,YAAM,KAAK,EAAC,6BAA6B;MACpC,IAAI,CAAC,uBAAuB,EAAE;MAC9B,IAAI,CAAC,cAAc,CACjB,CACV,CAAC;EACN,CAAC;EAEO,uBAAuB;IAC3B,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE;MACzB,OAAO;KACV;IAED,OAAO,gBAAO,IAAI,CAAC,iBAAiB,CAAQ,CAAC;EACjD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, h, Prop } from '@stencil/core';\nimport { Icon } from '../../interface';\nimport { getIconName } from '../icon/get-icon-props';\n\n/**\n * A header is the top most visual element in a component, page, card, or a view.\n *\n * ## Usage\n * A header is the first thing that clarifies a context for users.\n * Due to their positions in the UI hierarchy, headers are the most\n * prominent elements of a user interface; and because of that, they carry both\n * vital information and fundamental controls for the area of the interface\n * they represent.\n *\n * For example, when a header is placed on top of a card, it should quickly\n * explain the card to the user. When placed on top of a modal, it should easily\n * clarify what the modal is about. When displayed on top of a fullscreen view,\n * it should indicate where in the system users are, and what part of the app\n * they are looking at.\n *\n *\n * ## Layout\n * The vital information in a header is usually manifested in form of an icon,\n * and a heading. A subheading also could be added to provide supplementary\n * information. There is also a third place for displaying supplementary information\n * or \"supporting text\", which will be rendered as a part of the subheading.\n * Along with this information, headers can also include actions, controls, or\n * menus.\n *\n * :::important\n * Such actions or menus must affect the entire section of the interface\n * which the header is representing. For example, a _Delete_ button on a card\n * header must delete that entire card and its respective contents all together,\n * not for example a selected item which is visible in the content of that card.\n * :::\n *\n *\n * :::warning\n * Do not user background color on icons in the headers. It is much better and\n * much easier for the eye if your icon itself has a color.\n * Background colors behind icons make them look like \"call to action\" buttons\n * and take a lot of attention from users.\n * :::\n *\n * @exampleComponent limel-example-header\n * @exampleComponent limel-example-header-slot-actions\n * @exampleComponent limel-example-header-colors\n * @exampleComponent limel-example-header-responsive\n * @exampleComponent limel-example-header-narrow\n * @slot actions - Content (actions) to be put inside the far right surface of\n * the header\n * @slot [no name] - DEPRECATED. The `actions` slot used to be unnamed. This\n * behavior has been deprecated, and support will be dropped in a future\n * version. Please add `slot=\"actions\"` to your elements to ensure your code\n * will continue to work with future versions of Lime Elements.\n */\n@Component({\n tag: 'limel-header',\n shadow: true,\n styleUrl: 'header.scss',\n})\nexport class Header {\n /**\n * Icon to display\n */\n @Prop()\n public icon?: string | Icon;\n\n /**\n * Title to display\n */\n @Prop()\n public heading?: string;\n\n /**\n * Subheading to display\n */\n @Prop()\n public subheading?: string;\n\n /**\n * An extra string of text to display along with with the Subheading\n */\n @Prop()\n public supportingText?: string;\n\n /**\n * The visual divider that separates the `subheading` and the `supportingText`.\n * It must be a single character such as `-` or `,`.\n */\n @Prop()\n public subheadingDivider?: string = '·';\n\n public render() {\n return [\n <div class=\"information\">\n {this.renderIcon()}\n <div class=\"headings\">\n <h1 class=\"heading\" title={this.heading}>\n {this.heading}\n </h1>\n <h2 class=\"subheading\" title={this.subheading}>\n {this.subheading}\n {this.renderSupportingText()}\n </h2>\n </div>\n </div>,\n <slot name=\"actions\">\n <slot />\n </slot>,\n ];\n }\n\n private renderIcon() {\n const icon = getIconName(this.icon);\n\n if (!icon) {\n return;\n }\n\n return <limel-icon class=\"icon\" badge={true} name={icon} />;\n }\n\n private renderSupportingText() {\n if (!this.supportingText) {\n return;\n }\n\n return (\n <span class=\"subheading__supporting-text\">\n {this.renderSubheadingDivider()}\n {this.supportingText}\n </span>\n );\n }\n\n private renderSubheadingDivider() {\n if (!this.subheadingDivider) {\n return;\n }\n\n return <span>{this.subheadingDivider}</span>;\n }\n}\n"]}
|