@lion/ui 0.0.1 → 0.0.3
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/components/core/test/SlotMixin.test.js +28 -21
- package/components/drawer/src/LionDrawer.js +217 -0
- package/components/drawer/src/drawerStyle.js +59 -0
- package/components/drawer/test/lion-drawer.test.js +109 -0
- package/components/localize/src/number/parseNumber.js +15 -36
- package/components/localize/test/number/parseNumber.test.js +3 -12
- package/custom-elements.json +743 -0
- package/dist-types/components/drawer/src/LionDrawer.d.ts +67 -0
- package/dist-types/components/drawer/src/LionDrawer.d.ts.map +1 -0
- package/dist-types/components/drawer/src/drawerStyle.d.ts +2 -0
- package/dist-types/components/drawer/src/drawerStyle.d.ts.map +1 -0
- package/dist-types/components/drawer/test/lion-drawer.test.d.ts +3 -0
- package/dist-types/components/drawer/test/lion-drawer.test.d.ts.map +1 -0
- package/dist-types/components/localize/src/number/parseNumber.d.ts.map +1 -1
- package/dist-types/exports/define/lion-drawer.d.ts +2 -0
- package/dist-types/exports/define/lion-drawer.d.ts.map +1 -0
- package/dist-types/exports/drawer.d.ts +2 -0
- package/dist-types/exports/drawer.d.ts.map +1 -0
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/accordion/index.md +3 -0
- package/docs/components/accordion/overview.md +129 -0
- package/docs/components/accordion/reference.md +47 -0
- package/docs/components/accordion/use-cases.md +252 -0
- package/docs/components/button/examples.md +30 -0
- package/docs/components/button/index.md +3 -0
- package/docs/components/button/overview.md +30 -0
- package/docs/components/button/src/icon.svg.js +5 -0
- package/docs/components/button/use-cases.md +106 -0
- package/docs/components/calendar/index.md +3 -0
- package/docs/components/calendar/overview.md +49 -0
- package/docs/components/calendar/use-cases.md +192 -0
- package/docs/components/checkbox-group/index.md +3 -0
- package/docs/components/checkbox-group/overview.md +40 -0
- package/docs/components/checkbox-group/use-cases.md +256 -0
- package/docs/components/collapsible/assets/CustomCollapsible.js +113 -0
- package/docs/components/collapsible/assets/applyDemoCollapsibleStyles.js +37 -0
- package/docs/components/collapsible/examples.md +83 -0
- package/docs/components/collapsible/index.md +3 -0
- package/docs/components/collapsible/overview.md +39 -0
- package/docs/components/collapsible/use-cases.md +79 -0
- package/docs/components/combobox/examples.md +153 -0
- package/docs/components/combobox/index.md +3 -0
- package/docs/components/combobox/overview.md +51 -0
- package/docs/components/combobox/src/LinkMixin.js +60 -0
- package/docs/components/combobox/src/demo-selection-display.js +191 -0
- package/docs/components/combobox/src/gh-combobox/gh-button.js +69 -0
- package/docs/components/combobox/src/gh-combobox/gh-combobox.js +508 -0
- package/docs/components/combobox/src/google-combobox/assets/google-clear-icon.js +9 -0
- package/docs/components/combobox/src/google-combobox/assets/google-search-icon.js +9 -0
- package/docs/components/combobox/src/google-combobox/assets/google-voice-search-icon.js +19 -0
- package/docs/components/combobox/src/google-combobox/assets/googlelogo_color_272x92dp.png +0 -0
- package/docs/components/combobox/src/google-combobox/google-combobox.js +460 -0
- package/docs/components/combobox/src/lazyRender.js +29 -0
- package/docs/components/combobox/src/levenshtein.js +95 -0
- package/docs/components/combobox/src/md-combobox/MdFieldMixin.js +341 -0
- package/docs/components/combobox/src/md-combobox/md-combobox.js +89 -0
- package/docs/components/combobox/src/md-combobox/md-input.js +5 -0
- package/docs/components/combobox/src/md-combobox/style/load-roboto.js +6 -0
- package/docs/components/combobox/src/md-combobox/style/md-ripple.js +81 -0
- package/docs/components/combobox/src/wa-combobox/wa-combobox.js +368 -0
- package/docs/components/combobox/use-cases.md +377 -0
- package/docs/components/dialog/index.md +3 -0
- package/docs/components/dialog/overview.md +63 -0
- package/docs/components/dialog/src/demo-dialog-style.js +3 -0
- package/docs/components/dialog/src/demoStyle.js +39 -0
- package/docs/components/dialog/src/slots-dialog-content.js +32 -0
- package/docs/components/dialog/src/styled-dialog-content.js +38 -0
- package/docs/components/dialog/use-cases.md +154 -0
- package/docs/components/drawer/index.md +3 -0
- package/docs/components/drawer/overview.md +68 -0
- package/docs/components/drawer/src/demoStyle.js +71 -0
- package/docs/components/drawer/use-cases.md +194 -0
- package/docs/components/fieldset/index.md +3 -0
- package/docs/components/fieldset/overview.md +49 -0
- package/docs/components/fieldset/use-cases.md +185 -0
- package/docs/components/form/index.md +3 -0
- package/docs/components/form/overview.md +43 -0
- package/docs/components/form/use-cases.md +72 -0
- package/docs/components/icon/assets/bugs/bug01.svg.js +2 -0
- package/docs/components/icon/assets/bugs/bug02.svg.js +2 -0
- package/docs/components/icon/assets/bugs/bug05.svg.js +2 -0
- package/docs/components/icon/assets/bugs/bug06.svg.js +2 -0
- package/docs/components/icon/assets/bugs/bug08.svg.js +2 -0
- package/docs/components/icon/assets/bugs/bug12.svg.js +2 -0
- package/docs/components/icon/assets/bugs/bug19.svg.js +2 -0
- package/docs/components/icon/assets/bugs/bug23.svg.js +2 -0
- package/docs/components/icon/assets/bugs/bug24.svg.js +2 -0
- package/docs/components/icon/assets/iconset-bugs.js +11 -0
- package/docs/components/icon/assets/iconset-misc.js +3 -0
- package/docs/components/icon/assets/iconset-space.js +31 -0
- package/docs/components/icon/assets/misc/arrowLeft.svg.js +6 -0
- package/docs/components/icon/assets/space/aliens-spaceship.svg.js +2 -0
- package/docs/components/icon/assets/space/meteor.svg.js +2 -0
- package/docs/components/icon/assets/space/moon-flag.svg.js +2 -0
- package/docs/components/icon/assets/space/moon.svg.js +2 -0
- package/docs/components/icon/assets/space/night.svg.js +2 -0
- package/docs/components/icon/assets/space/orbit.svg.js +2 -0
- package/docs/components/icon/assets/space/planet.svg.js +2 -0
- package/docs/components/icon/assets/space/robot.svg.js +2 -0
- package/docs/components/icon/assets/space/rocket.svg.js +2 -0
- package/docs/components/icon/assets/space/satellite.svg.js +2 -0
- package/docs/components/icon/assets/space/signal.svg.js +2 -0
- package/docs/components/icon/assets/space/space-helmet.svg.js +2 -0
- package/docs/components/icon/assets/space/sun.svg.js +2 -0
- package/docs/components/icon/assets/space/telescope.svg.js +2 -0
- package/docs/components/icon/index.md +3 -0
- package/docs/components/icon/overview.md +40 -0
- package/docs/components/icon/use-cases.md +93 -0
- package/docs/components/index.md +7 -0
- package/docs/components/input/index.md +3 -0
- package/docs/components/input/overview.md +36 -0
- package/docs/components/input/use-cases.md +77 -0
- package/docs/components/input-amount/index.md +3 -0
- package/docs/components/input-amount/overview.md +49 -0
- package/docs/components/input-amount/use-cases.md +122 -0
- package/docs/components/input-date/index.md +3 -0
- package/docs/components/input-date/overview.md +39 -0
- package/docs/components/input-date/use-cases.md +83 -0
- package/docs/components/input-datepicker/index.md +3 -0
- package/docs/components/input-datepicker/overview.md +42 -0
- package/docs/components/input-datepicker/use-cases.md +78 -0
- package/docs/components/input-email/index.md +3 -0
- package/docs/components/input-email/overview.md +32 -0
- package/docs/components/input-email/use-cases.md +48 -0
- package/docs/components/input-iban/index.md +3 -0
- package/docs/components/input-iban/overview.md +37 -0
- package/docs/components/input-iban/use-cases.md +102 -0
- package/docs/components/input-range/index.md +3 -0
- package/docs/components/input-range/overview.md +34 -0
- package/docs/components/input-range/use-cases.md +108 -0
- package/docs/components/input-stepper/index.md +3 -0
- package/docs/components/input-stepper/overview.md +36 -0
- package/docs/components/input-stepper/use-cases.md +41 -0
- package/docs/components/input-tel/index.md +3 -0
- package/docs/components/input-tel/overview.md +62 -0
- package/docs/components/input-tel/src/h-region-code-table.js +109 -0
- package/docs/components/input-tel/use-cases.md +307 -0
- package/docs/components/input-tel-dropdown/examples.md +32 -0
- package/docs/components/input-tel-dropdown/index.md +3 -0
- package/docs/components/input-tel-dropdown/overview.md +38 -0
- package/docs/components/input-tel-dropdown/src/intl-input-tel-dropdown.js +127 -0
- package/docs/components/input-tel-dropdown/use-cases.md +159 -0
- package/docs/components/listbox/index.md +3 -0
- package/docs/components/listbox/overview.md +42 -0
- package/docs/components/listbox/src/listboxData.js +65 -0
- package/docs/components/listbox/use-cases.md +147 -0
- package/docs/components/pagination/index.md +3 -0
- package/docs/components/pagination/overview.md +29 -0
- package/docs/components/pagination/use-cases.md +99 -0
- package/docs/components/progress-indicator/assets/my-determinate-progress-bar.js +30 -0
- package/docs/components/progress-indicator/assets/my-indeterminate-progress-spinner.js +55 -0
- package/docs/components/progress-indicator/examples.md +125 -0
- package/docs/components/progress-indicator/index.md +3 -0
- package/docs/components/progress-indicator/overview.md +36 -0
- package/docs/components/radio-group/index.md +3 -0
- package/docs/components/radio-group/overview.md +46 -0
- package/docs/components/radio-group/use-cases.md +140 -0
- package/docs/components/select/index.md +3 -0
- package/docs/components/select/overview.md +44 -0
- package/docs/components/select/use-cases.md +55 -0
- package/docs/components/select-rich/examples.md +31 -0
- package/docs/components/select-rich/index.md +3 -0
- package/docs/components/select-rich/overview.md +46 -0
- package/docs/components/select-rich/src/flagStyles.js +1250 -0
- package/docs/components/select-rich/src/flags.png +0 -0
- package/docs/components/select-rich/src/flags@2x.png +0 -0
- package/docs/components/select-rich/src/intl-select-rich.js +194 -0
- package/docs/components/select-rich/src/regionMetaList.js +1717 -0
- package/docs/components/select-rich/use-cases.md +370 -0
- package/docs/components/steps/index.md +3 -0
- package/docs/components/steps/overview.md +63 -0
- package/docs/components/steps/use-cases.md +163 -0
- package/docs/components/switch/index.md +3 -0
- package/docs/components/switch/overview.md +75 -0
- package/docs/components/switch/reference.md +39 -0
- package/docs/components/switch/use-cases.md +76 -0
- package/docs/components/tabs/examples.md +23 -0
- package/docs/components/tabs/index.md +3 -0
- package/docs/components/tabs/overview.md +48 -0
- package/docs/components/tabs/src/lea-tab-panel.js +24 -0
- package/docs/components/tabs/src/lea-tab.js +45 -0
- package/docs/components/tabs/src/lea-tabs.js +28 -0
- package/docs/components/tabs/use-cases.md +219 -0
- package/docs/components/textarea/index.md +3 -0
- package/docs/components/textarea/overview.md +35 -0
- package/docs/components/textarea/use-cases.md +95 -0
- package/docs/components/tooltip/examples.md +39 -0
- package/docs/components/tooltip/index.md +3 -0
- package/docs/components/tooltip/overview.md +44 -0
- package/docs/components/tooltip/use-cases.md +208 -0
- package/docs/fundamentals/index.md +19 -0
- package/docs/fundamentals/node-tools/babel-plugin-extend-docs/index.md +1 -0
- package/docs/fundamentals/node-tools/babel-plugin-extend-docs/overview.md +233 -0
- package/docs/fundamentals/node-tools/index.md +1 -0
- package/docs/fundamentals/node-tools/providence-analytics/LocalConfiguration.md +68 -0
- package/docs/fundamentals/node-tools/providence-analytics/QueryResult.md +111 -0
- package/docs/fundamentals/node-tools/providence-analytics/analyzer.md +69 -0
- package/docs/fundamentals/node-tools/providence-analytics/assets/_mermaid.svg.js +1202 -0
- package/docs/fundamentals/node-tools/providence-analytics/dashboard.md +22 -0
- package/docs/fundamentals/node-tools/providence-analytics/index.md +1 -0
- package/docs/fundamentals/node-tools/providence-analytics/overview.md +192 -0
- package/docs/fundamentals/node-tools/publish-docs/index.md +1 -0
- package/docs/fundamentals/node-tools/publish-docs/overview.md +136 -0
- package/docs/fundamentals/node-tools/remark-extend/index.md +1 -0
- package/docs/fundamentals/node-tools/remark-extend/overview.md +274 -0
- package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/index.md +1 -0
- package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +285 -0
- package/docs/fundamentals/rationales/TypeScript.md +18 -0
- package/docs/fundamentals/rationales/index.md +1 -0
- package/docs/fundamentals/rationales/side-effects.md +203 -0
- package/docs/fundamentals/rationales/versioning.md +35 -0
- package/docs/fundamentals/systems/core/index.md +3 -0
- package/docs/fundamentals/systems/core/overview.md +85 -0
- package/docs/fundamentals/systems/form/assets/FormatMixinDiagram-1.svg +1 -0
- package/docs/fundamentals/systems/form/assets/FormatMixinDiagram-2.svg +1 -0
- package/docs/fundamentals/systems/form/assets/FormatMixinDiagram-3.svg +84 -0
- package/docs/fundamentals/systems/form/assets/h-output.js +155 -0
- package/docs/fundamentals/systems/form/formatting-and-parsing.md +245 -0
- package/docs/fundamentals/systems/form/index.md +3 -0
- package/docs/fundamentals/systems/form/interaction-states.md +177 -0
- package/docs/fundamentals/systems/form/model-value.md +35 -0
- package/docs/fundamentals/systems/form/overview.md +82 -0
- package/docs/fundamentals/systems/form/styling.md +101 -0
- package/docs/fundamentals/systems/form/use-cases.md +156 -0
- package/docs/fundamentals/systems/form/validate.md +929 -0
- package/docs/fundamentals/systems/icon/index.md +3 -0
- package/docs/fundamentals/systems/icon/overview.md +124 -0
- package/docs/fundamentals/systems/index.md +1 -0
- package/docs/fundamentals/systems/localize/assets/all-locales.js +437 -0
- package/docs/fundamentals/systems/localize/assets/en-AU.js +6 -0
- package/docs/fundamentals/systems/localize/assets/en-GB.js +6 -0
- package/docs/fundamentals/systems/localize/assets/en-US.js +6 -0
- package/docs/fundamentals/systems/localize/assets/en.js +4 -0
- package/docs/fundamentals/systems/localize/assets/nl-BE.js +6 -0
- package/docs/fundamentals/systems/localize/assets/nl-NL.js +6 -0
- package/docs/fundamentals/systems/localize/assets/nl.js +4 -0
- package/docs/fundamentals/systems/localize/dates.md +195 -0
- package/docs/fundamentals/systems/localize/index.md +3 -0
- package/docs/fundamentals/systems/localize/numbers.md +217 -0
- package/docs/fundamentals/systems/localize/overview.md +48 -0
- package/docs/fundamentals/systems/localize/rationale.md +62 -0
- package/docs/fundamentals/systems/localize/text.md +125 -0
- package/docs/fundamentals/systems/localize/use-cases.md +319 -0
- package/docs/fundamentals/systems/overlays/assets/applyDemoOverlayStyles.js +22 -0
- package/docs/fundamentals/systems/overlays/assets/demo-overlay-backdrop.js +48 -0
- package/docs/fundamentals/systems/overlays/assets/demo-overlay-system.js +42 -0
- package/docs/fundamentals/systems/overlays/assets/umbrella-form.js +133 -0
- package/docs/fundamentals/systems/overlays/configuration.md +453 -0
- package/docs/fundamentals/systems/overlays/form-integration.md +65 -0
- package/docs/fundamentals/systems/overlays/index.md +3 -0
- package/docs/fundamentals/systems/overlays/overview.md +118 -0
- package/docs/fundamentals/systems/overlays/rationale.md +232 -0
- package/docs/fundamentals/systems/overlays/scope.md +176 -0
- package/docs/fundamentals/systems/overlays/use-cases.md +699 -0
- package/docs/fundamentals/tools/ajax/assets/naga.json +9 -0
- package/docs/fundamentals/tools/ajax/assets/pabu.json +9 -0
- package/docs/fundamentals/tools/ajax/index.md +3 -0
- package/docs/fundamentals/tools/ajax/overview.md +128 -0
- package/docs/fundamentals/tools/ajax/use-cases.md +456 -0
- package/docs/fundamentals/tools/helpers/action-logger.md +165 -0
- package/docs/fundamentals/tools/helpers/index.md +3 -0
- package/docs/fundamentals/tools/helpers/overview.md +30 -0
- package/docs/fundamentals/tools/index.md +1 -0
- package/docs/fundamentals/tools/singleton-manager/index.md +3 -0
- package/docs/fundamentals/tools/singleton-manager/overview.md +304 -0
- package/docs/guides/how-to/create-a-custom-field.md +200 -0
- package/docs/guides/how-to/extend-a-native-input.md +66 -0
- package/docs/guides/how-to/get-started.md +77 -0
- package/docs/guides/how-to/index.md +1 -0
- package/docs/guides/index.md +34 -0
- package/docs/guides/principles/definitions-and-terms.md +41 -0
- package/docs/guides/principles/index.md +26 -0
- package/docs/guides/principles/scoped-elements.md +103 -0
- package/docs/guides/principles/styling.md +32 -0
- package/docs/guides/principles/subclasser-apis.md +28 -0
- package/docs/override.js +15 -0
- package/exports/define/lion-drawer.js +3 -0
- package/exports/drawer.js +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
import { html, css } from 'lit';
|
|
2
|
+
import { renderLitAsNode } from '@lion/ui/helpers.js';
|
|
3
|
+
import { LionOption } from '@lion/ui/listbox.js';
|
|
4
|
+
import { LionCombobox } from '@lion/ui/combobox.js';
|
|
5
|
+
|
|
6
|
+
class WaOption extends LionOption {
|
|
7
|
+
static get properties() {
|
|
8
|
+
return {
|
|
9
|
+
title: String,
|
|
10
|
+
text: String,
|
|
11
|
+
time: String,
|
|
12
|
+
image: String,
|
|
13
|
+
isUserText: { attribute: 'is-user-text', reflect: true, type: Boolean },
|
|
14
|
+
isUserTextRead: { attribute: 'is-user-text-read', reflect: true, type: Boolean },
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static get styles() {
|
|
19
|
+
return [
|
|
20
|
+
...super.styles,
|
|
21
|
+
css`
|
|
22
|
+
:host {
|
|
23
|
+
--background-default: white;
|
|
24
|
+
--background-default-active: gray;
|
|
25
|
+
--secondary: #777;
|
|
26
|
+
--secondary-lighter: #aaa;
|
|
27
|
+
--chatlist-icon: #aaa;
|
|
28
|
+
background-color: var(--background-default);
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
color: rgb(74, 74, 74);
|
|
31
|
+
padding: 0;
|
|
32
|
+
transition: max-height 0.4s ease, opacity 0.3s ease;
|
|
33
|
+
max-height: 500px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([checked]) {
|
|
37
|
+
background-color: #eee;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host(:hover) {
|
|
41
|
+
background-color: #f6f6f6;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.wa-option {
|
|
45
|
+
position: relative;
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: row;
|
|
48
|
+
height: 72px;
|
|
49
|
+
pointer-events: all;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.wa-option__image {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex: none;
|
|
55
|
+
align-items: center;
|
|
56
|
+
margin-top: -1px;
|
|
57
|
+
padding: 0 15px 0 13px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.wa-option__image-inner {
|
|
61
|
+
position: relative;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
background-color: var(--avatar-background);
|
|
64
|
+
border-radius: 50%;
|
|
65
|
+
height: 49px;
|
|
66
|
+
width: 49px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.wa-option__image-inner img,
|
|
70
|
+
.wa-option__image-inner svg {
|
|
71
|
+
width: 100%;
|
|
72
|
+
height: 100%;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.wa-option__image-inner-inner {
|
|
76
|
+
position: absolute;
|
|
77
|
+
top: 0;
|
|
78
|
+
z-index: 1;
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
width: 100%;
|
|
83
|
+
height: 100%;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.wa-option__content {
|
|
87
|
+
display: flex;
|
|
88
|
+
flex-basis: auto;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
flex-grow: 1;
|
|
91
|
+
justify-content: center;
|
|
92
|
+
min-width: 0;
|
|
93
|
+
border-bottom: 1px solid #eee;
|
|
94
|
+
padding-right: 15px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.wa-option__content-row1 {
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
line-height: normal;
|
|
101
|
+
text-align: left;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.wa-option__content-row1-title {
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-grow: 1;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
color: var(--primary-strong);
|
|
109
|
+
font-weight: 400;
|
|
110
|
+
font-size: 17px;
|
|
111
|
+
line-height: 21px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.wa-option__content-row1-time {
|
|
115
|
+
line-height: 14px;
|
|
116
|
+
overflow: hidden;
|
|
117
|
+
text-overflow: ellipsis;
|
|
118
|
+
white-space: nowrap;
|
|
119
|
+
margin-left: 6px;
|
|
120
|
+
margin-top: 3px;
|
|
121
|
+
|
|
122
|
+
flex: none;
|
|
123
|
+
max-width: 100%;
|
|
124
|
+
color: var(--secondary-lighter);
|
|
125
|
+
font-size: 12px;
|
|
126
|
+
line-height: 20px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.wa-option__content-row2 {
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
min-height: 20px;
|
|
133
|
+
color: var(--secondary);
|
|
134
|
+
font-size: 13px;
|
|
135
|
+
line-height: 20px;
|
|
136
|
+
margin-top: 2px;
|
|
137
|
+
/* color: var(--secondary-stronger); */
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.wa-option__content-row2-text {
|
|
141
|
+
flex-grow: 1;
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
font-weight: 400;
|
|
144
|
+
font-size: 14px;
|
|
145
|
+
line-height: 20px;
|
|
146
|
+
white-space: nowrap;
|
|
147
|
+
text-overflow: ellipsis;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.wa-option__content-row2-text-inner {
|
|
151
|
+
display: flex;
|
|
152
|
+
align-items: flex-start;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.wa-option__content-row2-text-inner-icon {
|
|
156
|
+
display: none;
|
|
157
|
+
flex: none;
|
|
158
|
+
color: var(--chatlist-icon);
|
|
159
|
+
vertical-align: top;
|
|
160
|
+
margin-right: 2px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
:host([is-user-text]) .wa-option__content-row2-text-inner-icon {
|
|
164
|
+
display: inline-block;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
:host([is-user-text-read]) .wa-option__content-row2-text-inner-icon {
|
|
168
|
+
color: lightblue;
|
|
169
|
+
}
|
|
170
|
+
/*
|
|
171
|
+
.wa-option__content-row2-menu {
|
|
172
|
+
} */
|
|
173
|
+
`,
|
|
174
|
+
];
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
render() {
|
|
178
|
+
return html`<div class="wa-option">
|
|
179
|
+
<div class="wa-option__image">
|
|
180
|
+
<div class="wa-option__image-inner">
|
|
181
|
+
<img
|
|
182
|
+
src="${this.image}"
|
|
183
|
+
alt=""
|
|
184
|
+
draggable="false"
|
|
185
|
+
class="_2goTk _1Jdop _3Whw5"
|
|
186
|
+
style="visibility: visible;"
|
|
187
|
+
/>
|
|
188
|
+
${this.image
|
|
189
|
+
? ''
|
|
190
|
+
: html`<div class="wa-option__image-inner-inner">
|
|
191
|
+
<span data-testid="default-user" data-icon="default-user" class="">
|
|
192
|
+
<svg
|
|
193
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
194
|
+
viewBox="0 0 212 212"
|
|
195
|
+
width="212"
|
|
196
|
+
height="212"
|
|
197
|
+
>
|
|
198
|
+
<path
|
|
199
|
+
fill="#DFE5E7"
|
|
200
|
+
class="background"
|
|
201
|
+
d="M106.251.5C164.653.5 212 47.846 212 106.25S164.653 212 106.25 212C47.846 212 .5 164.654.5 106.25S47.846.5 106.251.5z"
|
|
202
|
+
></path>
|
|
203
|
+
<path
|
|
204
|
+
fill="#FFF"
|
|
205
|
+
class="primary"
|
|
206
|
+
d="M173.561 171.615a62.767 62.767 0 0 0-2.065-2.955 67.7 67.7 0 0 0-2.608-3.299 70.112 70.112 0 0 0-3.184-3.527 71.097 71.097 0 0 0-5.924-5.47 72.458 72.458 0 0 0-10.204-7.026 75.2 75.2 0 0 0-5.98-3.055c-.062-.028-.118-.059-.18-.087-9.792-4.44-22.106-7.529-37.416-7.529s-27.624 3.089-37.416 7.529c-.338.153-.653.318-.985.474a75.37 75.37 0 0 0-6.229 3.298 72.589 72.589 0 0 0-9.15 6.395 71.243 71.243 0 0 0-5.924 5.47 70.064 70.064 0 0 0-3.184 3.527 67.142 67.142 0 0 0-2.609 3.299 63.292 63.292 0 0 0-2.065 2.955 56.33 56.33 0 0 0-1.447 2.324c-.033.056-.073.119-.104.174a47.92 47.92 0 0 0-1.07 1.926c-.559 1.068-.818 1.678-.818 1.678v.398c18.285 17.927 43.322 28.985 70.945 28.985 27.678 0 52.761-11.103 71.055-29.095v-.289s-.619-1.45-1.992-3.778a58.346 58.346 0 0 0-1.446-2.322zM106.002 125.5c2.645 0 5.212-.253 7.68-.737a38.272 38.272 0 0 0 3.624-.896 37.124 37.124 0 0 0 5.12-1.958 36.307 36.307 0 0 0 6.15-3.67 35.923 35.923 0 0 0 9.489-10.48 36.558 36.558 0 0 0 2.422-4.84 37.051 37.051 0 0 0 1.716-5.25c.299-1.208.542-2.443.725-3.701.275-1.887.417-3.827.417-5.811s-.142-3.925-.417-5.811a38.734 38.734 0 0 0-1.215-5.494 36.68 36.68 0 0 0-3.648-8.298 35.923 35.923 0 0 0-9.489-10.48 36.347 36.347 0 0 0-6.15-3.67 37.124 37.124 0 0 0-5.12-1.958 37.67 37.67 0 0 0-3.624-.896 39.875 39.875 0 0 0-7.68-.737c-21.162 0-37.345 16.183-37.345 37.345 0 21.159 16.183 37.342 37.345 37.342z"
|
|
207
|
+
></path>
|
|
208
|
+
</svg>
|
|
209
|
+
</span>
|
|
210
|
+
</div>`}
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
<div class="wa-option__content">
|
|
214
|
+
<div class="wa-option__content-row1">
|
|
215
|
+
<div class="wa-option__content-row1-title">
|
|
216
|
+
<span class="_357i8">
|
|
217
|
+
<span dir="auto" title="${this.title}" class="_3ko75 _5h6Y_ _3Whw5">
|
|
218
|
+
${this.title}
|
|
219
|
+
</span>
|
|
220
|
+
<div class="_3XFan"></div>
|
|
221
|
+
</span>
|
|
222
|
+
</div>
|
|
223
|
+
<div class="wa-option__content-row1-time">${this.time}</div>
|
|
224
|
+
</div>
|
|
225
|
+
<div class="wa-option__content-row2">
|
|
226
|
+
<div class="wa-option__content-row2-text">
|
|
227
|
+
<span class="wa-option__content-row2-text-inner" title="${this.text}">
|
|
228
|
+
<div class="wa-option__content-row2-text-inner-icon">
|
|
229
|
+
<span data-testid="status-dblcheck" data-icon="status-dblcheck" class="">
|
|
230
|
+
<svg
|
|
231
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
232
|
+
viewBox="0 0 18 18"
|
|
233
|
+
width="18"
|
|
234
|
+
height="18"
|
|
235
|
+
>
|
|
236
|
+
<path
|
|
237
|
+
fill="currentColor"
|
|
238
|
+
d="M17.394 5.035l-.57-.444a.434.434 0 0 0-.609.076l-6.39 8.198a.38.38 0 0 1-.577.039l-.427-.388a.381.381 0 0 0-.578.038l-.451.576a.497.497 0 0 0 .043.645l1.575 1.51a.38.38 0 0 0 .577-.039l7.483-9.602a.436.436 0 0 0-.076-.609zm-4.892 0l-.57-.444a.434.434 0 0 0-.609.076l-6.39 8.198a.38.38 0 0 1-.577.039l-2.614-2.556a.435.435 0 0 0-.614.007l-.505.516a.435.435 0 0 0 .007.614l3.887 3.8a.38.38 0 0 0 .577-.039l7.483-9.602a.435.435 0 0 0-.075-.609z"
|
|
239
|
+
></path>
|
|
240
|
+
</svg>
|
|
241
|
+
</span>
|
|
242
|
+
</div>
|
|
243
|
+
<span dir="ltr" class="_3ko75 _5h6Y_ _3Whw5">${this.text}</span></span
|
|
244
|
+
>
|
|
245
|
+
</div>
|
|
246
|
+
<div class="wa-option__content-row2-menu"><span></span><span></span><span></span></div>
|
|
247
|
+
</div>
|
|
248
|
+
</div>
|
|
249
|
+
</div>`;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @configure LionCombobox
|
|
254
|
+
* @param {string} matchingString
|
|
255
|
+
*/
|
|
256
|
+
onFilterMatch(matchingString) {
|
|
257
|
+
this.__originalTitle = this.title;
|
|
258
|
+
const newInnerHTML = this.title.replace(new RegExp(`(${matchingString})`, 'i'), `<b>$1</b>`);
|
|
259
|
+
const helperNode = document.createElement('div');
|
|
260
|
+
// For Safari, we need to add a label to the element
|
|
261
|
+
helperNode.innerHTML = `<span aria-label="${this.title}">${newInnerHTML}</span>`;
|
|
262
|
+
[this.title] = helperNode.children;
|
|
263
|
+
this.style.cssText = `
|
|
264
|
+
max-height: 500px;
|
|
265
|
+
opacity: 1;
|
|
266
|
+
`;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* @configure LionCombobox
|
|
271
|
+
* @param {string} [curValue]
|
|
272
|
+
* @param {string} [prevValue]
|
|
273
|
+
*/
|
|
274
|
+
// eslint-disable-next-line no-unused-vars
|
|
275
|
+
onFilterUnmatch() {
|
|
276
|
+
if (this.__originalTitle) {
|
|
277
|
+
this.title = this.__originalTitle;
|
|
278
|
+
}
|
|
279
|
+
this.style.cssText = `
|
|
280
|
+
max-height: 0;
|
|
281
|
+
opacity: 0;
|
|
282
|
+
`;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
customElements.define('wa-option', WaOption);
|
|
286
|
+
|
|
287
|
+
class WaCombobox extends LionCombobox {
|
|
288
|
+
static get styles() {
|
|
289
|
+
return [
|
|
290
|
+
...super.styles,
|
|
291
|
+
css`
|
|
292
|
+
:host {
|
|
293
|
+
font-family: SF Pro Text, SF Pro Icons, system, -apple-system, system-ui,
|
|
294
|
+
BlinkMacSystemFont, Helvetica Neue, Helvetica, Lucida Grande, Kohinoor Devanagari,
|
|
295
|
+
sans-serif;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.input-group__container {
|
|
299
|
+
display: flex;
|
|
300
|
+
border-bottom: none;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
* > ::slotted([role='listbox']) {
|
|
304
|
+
max-height: none;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
* > ::slotted([slot='input']) {
|
|
308
|
+
font-size: 14px;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.input-group {
|
|
312
|
+
padding: 15px;
|
|
313
|
+
background: #f6f6f6;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.input-group__prefix {
|
|
317
|
+
margin-right: 20px;
|
|
318
|
+
color: #999;
|
|
319
|
+
display: flex;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.input-group__container {
|
|
323
|
+
border-radius: 18px;
|
|
324
|
+
background: white;
|
|
325
|
+
padding: 7px;
|
|
326
|
+
padding-left: 16px;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/** Undo Popper */
|
|
330
|
+
#overlay-content-node-wrapper {
|
|
331
|
+
position: static !important;
|
|
332
|
+
width: auto !important;
|
|
333
|
+
transform: none !important;
|
|
334
|
+
|
|
335
|
+
/* height: 300px;
|
|
336
|
+
overflow: scroll; */
|
|
337
|
+
}
|
|
338
|
+
`,
|
|
339
|
+
];
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
get slots() {
|
|
343
|
+
return {
|
|
344
|
+
...super.slots,
|
|
345
|
+
prefix: () =>
|
|
346
|
+
renderLitAsNode(
|
|
347
|
+
html`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
|
348
|
+
<path
|
|
349
|
+
fill="currentColor"
|
|
350
|
+
d="M15.009 13.805h-.636l-.22-.219a5.184 5.184 0 0 0 1.256-3.386 5.207 5.207 0 1 0-5.207 5.208 5.183 5.183 0 0 0 3.385-1.255l.221.22v.635l4.004 3.999 1.194-1.195-3.997-4.007zm-4.808 0a3.605 3.605 0 1 1 0-7.21 3.605 3.605 0 0 1 0 7.21z"
|
|
351
|
+
></path>
|
|
352
|
+
</svg>`,
|
|
353
|
+
),
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
constructor() {
|
|
358
|
+
super();
|
|
359
|
+
|
|
360
|
+
/** @configure OverlayMixin */
|
|
361
|
+
this.opened = true;
|
|
362
|
+
/** @configure LionCombobox */
|
|
363
|
+
this.showAllOnEmpty = true;
|
|
364
|
+
/** @configure LionCombobox */
|
|
365
|
+
this.rotateKeyboardNavigation = false;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
customElements.define('wa-combobox', WaCombobox);
|