@api-client/ui 0.5.39 → 0.5.41
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/build/src/elements/contextual-menu/{internals/ContextualMenu.d.ts → ContextualMenu.d.ts} +11 -6
- package/build/src/elements/contextual-menu/ContextualMenu.d.ts.map +1 -0
- package/build/src/elements/contextual-menu/{internals/ContextualMenu.js → ContextualMenu.js} +25 -3
- package/build/src/elements/contextual-menu/ContextualMenu.js.map +1 -0
- package/build/src/elements/contextual-menu/internals/types.d.ts +16 -7
- package/build/src/elements/contextual-menu/internals/types.d.ts.map +1 -1
- package/build/src/elements/contextual-menu/internals/types.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
- package/src/elements/contextual-menu/{internals/ContextualMenu.ts → ContextualMenu.ts} +31 -7
- package/src/elements/contextual-menu/internals/types.ts +17 -7
- package/.aiexclude +0 -3
- package/.cursor/rules/html-and-css-best-practices.mdc +0 -63
- package/.cursor/rules/lit-best-practices.mdc +0 -89
- package/.editorconfig +0 -29
- package/.github/CONTRIBUTING.md +0 -24
- package/.github/instructions/html-and-css-best-practices.instructions.md +0 -70
- package/.github/instructions/lit-best-practices.instructions.md +0 -90
- package/.github/release.yml +0 -14
- package/.github/stale.yml +0 -23
- package/.github/workflows/auto-release.yml +0 -182
- package/.github/workflows/release.yml +0 -82
- package/.prettierrc.js +0 -14
- package/.vscode/settings.json +0 -18
- package/RELEASE.md +0 -163
- package/RELEASE_SETUP.md +0 -235
- package/build/src/demo/DemoPage.d.ts +0 -81
- package/build/src/demo/DemoPage.d.ts.map +0 -1
- package/build/src/demo/DemoPage.js +0 -175
- package/build/src/demo/DemoPage.js.map +0 -1
- package/build/src/demo/DemoStyles.d.ts +0 -3
- package/build/src/demo/DemoStyles.d.ts.map +0 -1
- package/build/src/demo/DemoStyles.js +0 -60
- package/build/src/demo/DemoStyles.js.map +0 -1
- package/build/src/elements/contextual-menu/internals/ContextualMenu.d.ts.map +0 -1
- package/build/src/elements/contextual-menu/internals/ContextualMenu.js.map +0 -1
- package/build/test/elements/navigation/Navigation.test.d.ts +0 -3
- package/build/test/elements/navigation/Navigation.test.d.ts.map +0 -1
- package/build/test/elements/navigation/Navigation.test.js +0 -113
- package/build/test/elements/navigation/Navigation.test.js.map +0 -1
- package/commitlint.config.cjs +0 -2
- package/demo/elements/authorization/AuthPlugin.js +0 -57
- package/demo/elements/authorization/AuthProxy.js +0 -215
- package/demo/elements/authorization/api-key.html +0 -27
- package/demo/elements/authorization/api-key.ts +0 -44
- package/demo/elements/authorization/basic.html +0 -27
- package/demo/elements/authorization/basic.ts +0 -43
- package/demo/elements/authorization/bearer.html +0 -27
- package/demo/elements/authorization/bearer.ts +0 -43
- package/demo/elements/authorization/env.js +0 -8
- package/demo/elements/authorization/index.html +0 -44
- package/demo/elements/authorization/ntlm.html +0 -27
- package/demo/elements/authorization/ntlm.ts +0 -43
- package/demo/elements/authorization/oauth-authorize.html +0 -75
- package/demo/elements/authorization/oauth-authorize.ts +0 -40
- package/demo/elements/authorization/oauth-error.html +0 -18
- package/demo/elements/authorization/oauth-error.ts +0 -10
- package/demo/elements/authorization/oauth-popup.html +0 -36
- package/demo/elements/authorization/oauth2.html +0 -27
- package/demo/elements/authorization/oauth2.ts +0 -100
- package/demo/elements/authorization/oidc.html +0 -27
- package/demo/elements/authorization/oidc.ts +0 -139
- package/demo/elements/authorization/private.crt +0 -31
- package/demo/elements/authorization/private.csr +0 -28
- package/demo/elements/authorization/private.key +0 -51
- package/demo/elements/authorization/private.pem +0 -31
- package/demo/elements/authorization/redirect.html +0 -20
- package/demo/elements/authorization/ssl-commands.sh +0 -30
- package/demo/elements/authorization/ssl.conf +0 -24
- package/demo/elements/autocomplete/index.html +0 -64
- package/demo/elements/autocomplete/index.ts +0 -171
- package/demo/elements/code-editor/CodeEditorDemo.ts +0 -173
- package/demo/elements/code-editor/index.html +0 -19
- package/demo/elements/context-menu/DemoIcons.ts +0 -21
- package/demo/elements/context-menu/basic.html +0 -25
- package/demo/elements/context-menu/basic.ts +0 -119
- package/demo/elements/context-menu/custom-data.html +0 -25
- package/demo/elements/context-menu/custom-data.ts +0 -62
- package/demo/elements/context-menu/demo.css +0 -28
- package/demo/elements/context-menu/enabled-state.html +0 -25
- package/demo/elements/context-menu/enabled-state.ts +0 -73
- package/demo/elements/context-menu/icons.html +0 -25
- package/demo/elements/context-menu/icons.ts +0 -64
- package/demo/elements/context-menu/index.html +0 -43
- package/demo/elements/context-menu/nested.html +0 -25
- package/demo/elements/context-menu/nestedt.ts +0 -152
- package/demo/elements/context-menu/no-execute.html +0 -25
- package/demo/elements/context-menu/no-execute.ts +0 -134
- package/demo/elements/context-menu/radio-menu.html +0 -25
- package/demo/elements/context-menu/radio-menu.ts +0 -83
- package/demo/elements/context-menu/separators.html +0 -25
- package/demo/elements/context-menu/separators.ts +0 -172
- package/demo/elements/currency/index.html +0 -91
- package/demo/elements/currency/index.ts +0 -352
- package/demo/elements/environment/environment-editor.html +0 -20
- package/demo/elements/environment/environment-editor.ts +0 -49
- package/demo/elements/environment/index.html +0 -33
- package/demo/elements/environment/server-editor.html +0 -20
- package/demo/elements/environment/server-editor.ts +0 -67
- package/demo/elements/environment/variables-editor.html +0 -20
- package/demo/elements/environment/variables-editor.ts +0 -94
- package/demo/elements/har/har-viewer.html +0 -20
- package/demo/elements/har/har-viewer.ts +0 -76
- package/demo/elements/har/har1.har +0 -3044
- package/demo/elements/har/har2.json +0 -439
- package/demo/elements/har/index.html +0 -26
- package/demo/elements/highlight/example.md +0 -27
- package/demo/elements/highlight/index.html +0 -31
- package/demo/elements/highlight/marked-highlight.html +0 -132
- package/demo/elements/highlight/marked-highlight.ts +0 -22
- package/demo/elements/highlight/prism-highlight.html +0 -62
- package/demo/elements/highlight/prism-highlight.ts +0 -17
- package/demo/elements/http/body-editor.html +0 -17
- package/demo/elements/http/body-editor.ts +0 -115
- package/demo/elements/http/headers.html +0 -17
- package/demo/elements/http/headers.ts +0 -59
- package/demo/elements/http/http-assertions.html +0 -20
- package/demo/elements/http/http-assertions.ts +0 -89
- package/demo/elements/http/http-flows.html +0 -23
- package/demo/elements/http/http-flows.ts +0 -89
- package/demo/elements/http/index.html +0 -45
- package/demo/elements/http/request-editor.html +0 -26
- package/demo/elements/http/request-editor.ts +0 -197
- package/demo/elements/http/request-log.html +0 -16
- package/demo/elements/http/request-log.ts +0 -136
- package/demo/elements/http/url-editing.html +0 -17
- package/demo/elements/http/url-editing.ts +0 -112
- package/demo/elements/icons/index.html +0 -81
- package/demo/elements/icons/index.ts +0 -52
- package/demo/elements/index.html +0 -72
- package/demo/elements/mention-textarea/index.html +0 -19
- package/demo/elements/mention-textarea/index.ts +0 -205
- package/demo/elements/navigation/navigation-item.html +0 -49
- package/demo/elements/navigation/navigation-item.ts +0 -131
- package/demo/elements/navigation/navigation.html +0 -20
- package/demo/elements/navigation/navigation.ts +0 -45
- package/demo/elements/project/index.html +0 -29
- package/demo/elements/project/project-run-report.html +0 -20
- package/demo/elements/project/project-run-report.ts +0 -132
- package/demo/elements/project/request-editor.html +0 -23
- package/demo/elements/project/request-editor.ts +0 -232
- package/demo/elements/user/user-avatar.html +0 -17
- package/demo/elements/user/user-avatar.ts +0 -60
- package/demo/env.js +0 -4
- package/demo/index.html +0 -34
- package/demo/layout/index.html +0 -94
- package/demo/layout/index.ts +0 -190
- package/demo/md/DemoStyles.ts +0 -61
- package/demo/md/UiDemoPage.ts +0 -6
- package/demo/md/buttons/button.html +0 -121
- package/demo/md/buttons/button.ts +0 -246
- package/demo/md/buttons/group.html +0 -36
- package/demo/md/buttons/group.ts +0 -171
- package/demo/md/checkbox/index.html +0 -39
- package/demo/md/checkbox/index.ts +0 -220
- package/demo/md/chip/chip.html +0 -70
- package/demo/md/chip/chip.ts +0 -219
- package/demo/md/chip/pawel6c9a.jpg +0 -0
- package/demo/md/collapse/CustomDetail.ts +0 -89
- package/demo/md/collapse/collapse.html +0 -21
- package/demo/md/collapse/collapse.ts +0 -78
- package/demo/md/date-picker/date-picker.ts +0 -336
- package/demo/md/date-picker/index.html +0 -171
- package/demo/md/dialog/confirm-dialog.html +0 -49
- package/demo/md/dialog/confirm-dialog.ts +0 -121
- package/demo/md/dialog/dialog.html +0 -25
- package/demo/md/dialog/dialog.ts +0 -468
- package/demo/md/dropdown-list/index.html +0 -31
- package/demo/md/dropdown-list/index.ts +0 -158
- package/demo/md/icon-button/index.html +0 -122
- package/demo/md/icon-button/index.ts +0 -132
- package/demo/md/index.html +0 -73
- package/demo/md/inputs/input.html +0 -73
- package/demo/md/inputs/input.ts +0 -278
- package/demo/md/inputs/radio.html +0 -39
- package/demo/md/inputs/radio.ts +0 -156
- package/demo/md/inputs/switch.html +0 -45
- package/demo/md/inputs/switch.ts +0 -144
- package/demo/md/list/list.html +0 -65
- package/demo/md/list/list.ts +0 -204
- package/demo/md/listbox/listbox.html +0 -31
- package/demo/md/listbox/listbox.ts +0 -27
- package/demo/md/menu/index.html +0 -19
- package/demo/md/menu/index.ts +0 -514
- package/demo/md/notification/snack.html +0 -21
- package/demo/md/notification/snack.ts +0 -70
- package/demo/md/progress/progress.html +0 -46
- package/demo/md/progress/progress.ts +0 -161
- package/demo/md/segmented-button/index.html +0 -21
- package/demo/md/segmented-button/index.ts +0 -55
- package/demo/md/select/index.html +0 -16
- package/demo/md/select/index.ts +0 -217
- package/demo/md/tabs/tabs.html +0 -40
- package/demo/md/tabs/tabs.ts +0 -214
- package/demo/oauth-popup.html +0 -36
- package/demo/page.css +0 -8
- package/demo/resources/calendar-month.png +0 -0
- package/demo/resources/favorite.png +0 -0
- package/demo/resources/fingerprint.png +0 -0
- package/demo/resources/home-work.png +0 -0
- package/demo/resources/mood.png +0 -0
- package/demo/resources/print.png +0 -0
- package/demo/resources/stars.png +0 -0
- package/demo/resources/theaters.png +0 -0
- package/demo/tsconfig.json +0 -4
- package/eslint.config.js +0 -97
- package/scripts/copy-assets.js +0 -21
- package/scripts/release.js +0 -66
- package/src/demo/DemoPage.ts +0 -169
- package/src/demo/DemoStyles.ts +0 -60
- package/test/README.md +0 -375
- package/test/contextual-menu/ContextMenu.test.ts +0 -760
- package/test/contextual-menu/ContextMenuElement.test.ts +0 -569
- package/test/core/activity.spec.ts +0 -413
- package/test/core/activity_manager.spec.ts +0 -544
- package/test/core/application.spec.ts +0 -218
- package/test/core/fragment.spec.ts +0 -565
- package/test/core/fragment_manager.spec.ts +0 -404
- package/test/core/live_data.spec.ts +0 -558
- package/test/core/renderer.spec.ts +0 -113
- package/test/dom-assertions.test.ts +0 -182
- package/test/elements/MonacoSetup.ts +0 -65
- package/test/elements/authorization/basic-method.test.ts +0 -177
- package/test/elements/authorization/bearer-method.test.ts +0 -143
- package/test/elements/authorization/ntlm-method.test.ts +0 -219
- package/test/elements/authorization/oauth2-client-credentials-method.test.ts +0 -334
- package/test/elements/authorization/oauth2-code-method.test.ts +0 -320
- package/test/elements/authorization/oauth2-custom-grant-method.test.ts +0 -255
- package/test/elements/authorization/oauth2-device-code-method.test.ts +0 -371
- package/test/elements/authorization/oauth2-implicit-method.test.ts +0 -407
- package/test/elements/authorization/oauth2-jwt-method.test.ts +0 -217
- package/test/elements/authorization/oauth2-password-method.test.ts +0 -275
- package/test/elements/authorization/openid-method.test.ts +0 -591
- package/test/elements/autocomplete/autocomplete-input.spec.ts +0 -646
- package/test/elements/code-editor/code-editor.accessibility.test.ts +0 -298
- package/test/elements/code-editor/code-editor.test.ts +0 -574
- package/test/elements/currency/CurrencyPicker.accessibility.test.ts +0 -328
- package/test/elements/currency/CurrencyPicker.core.test.ts +0 -318
- package/test/elements/currency/CurrencyPicker.integration.test.ts +0 -482
- package/test/elements/currency/CurrencyPicker.test.ts +0 -486
- package/test/elements/data-table/DataTable.browser.test.ts +0 -649
- package/test/elements/har/HarUtils.test.ts +0 -45
- package/test/elements/har/HarViewerElement.test.ts +0 -687
- package/test/elements/har/test-data/har1.har +0 -3044
- package/test/elements/highlight/MarkedHighlightElement.test.ts +0 -452
- package/test/elements/highlight/PrismHighlightElement.test.ts +0 -79
- package/test/elements/highlight/PrismHighlighter.test.ts +0 -94
- package/test/elements/highlight/remoteSanitization.md +0 -1
- package/test/elements/highlight/test.md +0 -3
- package/test/elements/highlight/test1.md +0 -3
- package/test/elements/highlight/test2.md +0 -1
- package/test/elements/http/BodyFormdataEditorElement.test.ts +0 -482
- package/test/elements/http/BodyMultipartEditorElement.test.ts +0 -658
- package/test/elements/http/BodyRawEditorElement.test.ts +0 -90
- package/test/elements/http/CertificateAdd.test.ts +0 -457
- package/test/elements/http/HttpAssertions.test.ts +0 -994
- package/test/elements/http/HttpFlows.test.ts +0 -502
- package/test/elements/http/UrlEncodeUtils.test.ts +0 -202
- package/test/elements/layout/SplitItem.test.ts +0 -440
- package/test/elements/layout/SplitLayoutManager.test.ts +0 -1501
- package/test/elements/layout/SplitPanel.test.ts +0 -1109
- package/test/elements/mention-textarea/MentionTextArea.basic.test.ts +0 -114
- package/test/elements/mention-textarea/MentionTextArea.test.ts +0 -613
- package/test/elements/navigation/Navigation.test.ts +0 -120
- package/test/env.ts +0 -15
- package/test/events/EventTypes.test.ts +0 -363
- package/test/events/EventsTestHelpers.ts +0 -16
- package/test/helpers/TestUtils.ts +0 -243
- package/test/helpers/UiMock.ts +0 -185
- package/test/lib/Dom.test.ts +0 -231
- package/test/md/button/UiButton.test.ts +0 -347
- package/test/md/button/UiIconButton.test.ts +0 -155
- package/test/md/chip/UiChip.test.ts +0 -219
- package/test/md/collapse/UiCollapse.test.ts +0 -250
- package/test/md/collapse/flex-layout.test.ts +0 -105
- package/test/md/date-time/DateTime.test.ts +0 -348
- package/test/md/dialog/UiConfirmDialog.test.ts +0 -131
- package/test/md/dialog/UiDialog.test.ts +0 -759
- package/test/md/menu/Menu.test.ts +0 -855
- package/test/md/menu/MenuIntegration.test.ts +0 -426
- package/test/md/menu/MenuItem.test.ts +0 -652
- package/test/md/menu/SubMenu.test.ts +0 -410
- package/test/md/progress/UiCircularProgressElement.test.ts +0 -481
- package/test/md/progress/UiProgressElement.test.ts +0 -117
- package/test/md/progress/UiRangeElement.test.ts +0 -156
- package/test/md/select/Select.test.ts +0 -925
- package/test/plugins/takeScreenshotPlugin.js +0 -35
- package/test/setup.test.ts +0 -217
- package/test/setup.ts +0 -117
- package/test/tsconfig.json +0 -7
- package/web-dev-server.config.js +0 -21
- package/web-test-runner.config.js +0 -90
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
2
|
-
import { html, TemplateResult } from 'lit'
|
|
3
|
-
import { DemoPage } from '../../../src/demo/DemoPage.js'
|
|
4
|
-
import '../../../src/md/progress/ui-progress.js'
|
|
5
|
-
import '../../../src/md/progress/ui-circular-progress.js'
|
|
6
|
-
import '../../../src/md/button/ui-button.js'
|
|
7
|
-
|
|
8
|
-
class ComponentDemoPage extends DemoPage {
|
|
9
|
-
override accessor componentName = 'UI progress'
|
|
10
|
-
|
|
11
|
-
repeat = 0
|
|
12
|
-
|
|
13
|
-
maxRepeat = 5
|
|
14
|
-
|
|
15
|
-
animating = false
|
|
16
|
-
|
|
17
|
-
startProgress(): void {
|
|
18
|
-
const progress = document.querySelector('ui-progress')!
|
|
19
|
-
const button = document.querySelector('ui-button')!
|
|
20
|
-
this.repeat = 0
|
|
21
|
-
progress.value = progress.min
|
|
22
|
-
progress.style.setProperty('--ui-progress-scale-duration', '0')
|
|
23
|
-
button.disabled = true
|
|
24
|
-
if (!this.animating) {
|
|
25
|
-
this.nextProgress()
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
nextProgress(): void {
|
|
30
|
-
const progress = document.querySelector('ui-progress')!
|
|
31
|
-
const button = document.querySelector('ui-button')!
|
|
32
|
-
this.animating = true
|
|
33
|
-
if (progress.value < progress.max) {
|
|
34
|
-
progress.value += progress.step || 1
|
|
35
|
-
} else {
|
|
36
|
-
if (++this.repeat >= this.maxRepeat) {
|
|
37
|
-
this.animating = false
|
|
38
|
-
button.disabled = false
|
|
39
|
-
return
|
|
40
|
-
}
|
|
41
|
-
progress.value = progress.min
|
|
42
|
-
}
|
|
43
|
-
requestAnimationFrame(this.nextProgress.bind(this))
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
contentTemplate(): TemplateResult {
|
|
47
|
-
return html`
|
|
48
|
-
<a href="../">Back</a>
|
|
49
|
-
${this.imperativeTemplate()} ${this.indeterminateTemplate()} ${this.styledTemplate()} ${this.disabledTemplate()}
|
|
50
|
-
${this.secondaryTemplate()} ${this.circularProgressTemplate()} ${this.circularProgressIndeterminateTemplate()}
|
|
51
|
-
`
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
imperativeTemplate(): TemplateResult {
|
|
55
|
-
return html`
|
|
56
|
-
<section class="demo-section">
|
|
57
|
-
<h2 class="title-large">Imperative control</h2>
|
|
58
|
-
<p>
|
|
59
|
-
Once started, loops 5 times before stopping.
|
|
60
|
-
<ui-button color="elevated" @click="${this.startProgress}" id="start">Start</ui-button>
|
|
61
|
-
</p>
|
|
62
|
-
<ui-progress id="progress" aria-label="Imperative control"></ui-progress>
|
|
63
|
-
</section>
|
|
64
|
-
`
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
indeterminateTemplate(): TemplateResult {
|
|
68
|
-
return html`
|
|
69
|
-
<section class="demo-section">
|
|
70
|
-
<h2 class="title-large">Indeterminate value</h2>
|
|
71
|
-
<div class="demo-row">
|
|
72
|
-
<ui-progress indeterminate aria-label="indeterminate progress"></ui-progress>
|
|
73
|
-
</div>
|
|
74
|
-
<div class="demo-row">
|
|
75
|
-
<ui-progress indeterminate class="slow" aria-label="slow indeterminate progress"></ui-progress>
|
|
76
|
-
</div>
|
|
77
|
-
</section>
|
|
78
|
-
`
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
styledTemplate(): TemplateResult {
|
|
82
|
-
return html`
|
|
83
|
-
<section class="demo-section">
|
|
84
|
-
<h2 class="title-large">Styling</h2>
|
|
85
|
-
<div class="demo-row">
|
|
86
|
-
<ui-progress
|
|
87
|
-
value="40"
|
|
88
|
-
secondaryProgress="80"
|
|
89
|
-
class="blue"
|
|
90
|
-
aria-label="Blue progress with a secondary progress"
|
|
91
|
-
></ui-progress>
|
|
92
|
-
</div>
|
|
93
|
-
<div class="demo-row">
|
|
94
|
-
<ui-progress value="800" min="100" max="1000" class="red" aria-label="Red progress"></ui-progress>
|
|
95
|
-
</div>
|
|
96
|
-
<div class="demo-row">
|
|
97
|
-
<ui-progress value="60" class="green" aria-label="green progress"></ui-progress>
|
|
98
|
-
</div>
|
|
99
|
-
</section>
|
|
100
|
-
`
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
disabledTemplate(): TemplateResult {
|
|
104
|
-
return html`
|
|
105
|
-
<section class="demo-section">
|
|
106
|
-
<h2 class="title-large">Disabled state</h2>
|
|
107
|
-
<div class="demo-row">
|
|
108
|
-
<ui-progress value="40" secondaryProgress="80" disabled aria-label="Disabled progress"></ui-progress>
|
|
109
|
-
</div>
|
|
110
|
-
<div class="demo-row">
|
|
111
|
-
<ui-progress indeterminate disabled aria-label="Disabled indeterminate progress"></ui-progress>
|
|
112
|
-
</div>
|
|
113
|
-
</section>
|
|
114
|
-
`
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
secondaryTemplate(): TemplateResult {
|
|
118
|
-
return html`
|
|
119
|
-
<section class="demo-section secondary">
|
|
120
|
-
<h2 class="title-large">Timeline</h2>
|
|
121
|
-
<p>0 - 12 (Δ 12)</p>
|
|
122
|
-
<ui-progress value="0" secondaryProgress="12" max="328" aria-label="Value 1"></ui-progress>
|
|
123
|
-
<p>12 - 15 (Δ 3)</p>
|
|
124
|
-
<ui-progress value="12" secondaryProgress="15" max="328" aria-label="Value 2"></ui-progress>
|
|
125
|
-
<p>15 - 204 (Δ ${204 - 15})</p>
|
|
126
|
-
<ui-progress value="15" secondaryProgress="204" max="328" aria-label="Value 3"></ui-progress>
|
|
127
|
-
<p>204 - 254 (Δ ${254 - 204})</p>
|
|
128
|
-
<ui-progress value="204" secondaryProgress="254" max="328" aria-label="Value 4"></ui-progress>
|
|
129
|
-
<p>254 - 254 (Δ 0)</p>
|
|
130
|
-
<ui-progress value="254" secondaryProgress="254" max="328" aria-label="Value 5"></ui-progress>
|
|
131
|
-
<p>254 - 328 (Δ ${328 - 254})</p>
|
|
132
|
-
<ui-progress value="254" secondaryProgress="328" max="328" aria-label="Value 6"></ui-progress>
|
|
133
|
-
</section>
|
|
134
|
-
`
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
circularProgressTemplate(): TemplateResult {
|
|
138
|
-
return html`
|
|
139
|
-
<section class="demo-section">
|
|
140
|
-
<h2 class="title-large">Circular Progress</h2>
|
|
141
|
-
<div class="demo-row">
|
|
142
|
-
<ui-circular-progress value="40" max="100" aria-label="Circular progress"></ui-circular-progress>
|
|
143
|
-
</div>
|
|
144
|
-
</section>
|
|
145
|
-
`
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
circularProgressIndeterminateTemplate(): TemplateResult {
|
|
149
|
-
return html`
|
|
150
|
-
<section class="demo-section">
|
|
151
|
-
<h2 class="title-large">Circular Indeterminate Progress</h2>
|
|
152
|
-
<div class="demo-row">
|
|
153
|
-
<ui-circular-progress indeterminate aria-label="Circular indeterminate progress"></ui-circular-progress>
|
|
154
|
-
</div>
|
|
155
|
-
</section>
|
|
156
|
-
`
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
const instance = new ComponentDemoPage()
|
|
161
|
-
instance.render()
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en-GB">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<title>UI segmented buttons</title>
|
|
6
|
-
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0">
|
|
7
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
|
|
8
|
-
<link href="../../../src/styles/m3/tokens.css" rel="stylesheet" type="text/css" />
|
|
9
|
-
<link href="../../../src/styles/m3/theme.css" rel="stylesheet" type="text/css" />
|
|
10
|
-
<style>
|
|
11
|
-
.demo-row {
|
|
12
|
-
margin: 20px 0;
|
|
13
|
-
}
|
|
14
|
-
</style>
|
|
15
|
-
</head>
|
|
16
|
-
<body>
|
|
17
|
-
<div id="app"></div>
|
|
18
|
-
|
|
19
|
-
<script type="module" src="/.tmp/demo/md/segmented-button/index.js"></script>
|
|
20
|
-
</body>
|
|
21
|
-
</html>
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { html, TemplateResult } from 'lit'
|
|
2
|
-
import '../../../src/md/segmented-button/ui-segmented-button.js'
|
|
3
|
-
import '../../../src/md/segmented-button/ui-segmented-button-set.js'
|
|
4
|
-
import '../../../src/md/icons/ui-icon.js'
|
|
5
|
-
import { DemoPage } from '../../../src/demo/DemoPage.js'
|
|
6
|
-
|
|
7
|
-
class ComponentDemoPage extends DemoPage {
|
|
8
|
-
override accessor componentName = 'UI segmented buttons'
|
|
9
|
-
|
|
10
|
-
contentTemplate(): TemplateResult {
|
|
11
|
-
return html`
|
|
12
|
-
<a href="../">Back</a>
|
|
13
|
-
<section class="demo-section">
|
|
14
|
-
<h2 class="title-large">Single selection buttons</h2>
|
|
15
|
-
<div class="demo-row">
|
|
16
|
-
<ui-segmented-button-set>
|
|
17
|
-
<ui-segmented-button>Option 1</ui-segmented-button>
|
|
18
|
-
<ui-segmented-button>Option 2</ui-segmented-button>
|
|
19
|
-
<ui-segmented-button>Option 3</ui-segmented-button>
|
|
20
|
-
</ui-segmented-button-set>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
<h2 class="title-large">Preselected button (multi)</h2>
|
|
24
|
-
<div class="demo-row">
|
|
25
|
-
<ui-segmented-button-set multiselect>
|
|
26
|
-
<ui-segmented-button>Driving</ui-segmented-button>
|
|
27
|
-
<ui-segmented-button selected>Public transport</ui-segmented-button>
|
|
28
|
-
<ui-segmented-button>Biking</ui-segmented-button>
|
|
29
|
-
</ui-segmented-button-set>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<h2 class="title-large">Icons</h2>
|
|
33
|
-
<div class="demo-row">
|
|
34
|
-
<ui-segmented-button-set>
|
|
35
|
-
<ui-segmented-button>
|
|
36
|
-
Option 1
|
|
37
|
-
<ui-icon slot="icon" icon="add"></ui-icon>
|
|
38
|
-
</ui-segmented-button>
|
|
39
|
-
<ui-segmented-button>
|
|
40
|
-
Option 2
|
|
41
|
-
<ui-icon slot="icon" icon="deleteOutline"></ui-icon>
|
|
42
|
-
</ui-segmented-button>
|
|
43
|
-
<ui-segmented-button>
|
|
44
|
-
Option 3
|
|
45
|
-
<ui-icon slot="icon" icon="cancel"></ui-icon>
|
|
46
|
-
</ui-segmented-button>
|
|
47
|
-
</ui-segmented-button-set>
|
|
48
|
-
</div>
|
|
49
|
-
</section>
|
|
50
|
-
`
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const instance = new ComponentDemoPage()
|
|
55
|
-
instance.render()
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<title>UI Select</title>
|
|
7
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
|
|
8
|
-
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&icon_names=arrow_drop_down,check" rel="stylesheet" />
|
|
9
|
-
<link href="../../../src/styles/m3/tokens.css" rel="stylesheet" type="text/css" />
|
|
10
|
-
<link href="../../../src/styles/m3/theme.css" rel="stylesheet" type="text/css" />
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<div id="app"></div>
|
|
14
|
-
<script type="module" src="/.tmp/demo/md/select/index.js"></script>
|
|
15
|
-
</body>
|
|
16
|
-
</html>
|
package/demo/md/select/index.ts
DELETED
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import { html, TemplateResult } from 'lit'
|
|
2
|
-
import { DemoPage } from '../../../src/demo/DemoPage.js'
|
|
3
|
-
import { reactive } from '../../../src/decorators/index.js'
|
|
4
|
-
import '../../../src/md/select/ui-select.js'
|
|
5
|
-
import '../../../src/md/select/ui-option.js'
|
|
6
|
-
import '../../../src/md/button/ui-button.js'
|
|
7
|
-
import '../../../src/md/icons/ui-icon.js'
|
|
8
|
-
|
|
9
|
-
class ComponentDemoPage extends DemoPage {
|
|
10
|
-
override accessor componentName = 'UI Select'
|
|
11
|
-
|
|
12
|
-
@reactive() accessor basicSelected: string | undefined
|
|
13
|
-
|
|
14
|
-
@reactive() accessor iconSelected: string | undefined
|
|
15
|
-
|
|
16
|
-
@reactive() accessor supportingSelected: string | undefined
|
|
17
|
-
|
|
18
|
-
@reactive() accessor noIconSelected: string | undefined
|
|
19
|
-
|
|
20
|
-
@reactive() accessor programmaticSelected: string | undefined
|
|
21
|
-
|
|
22
|
-
contentTemplate(): TemplateResult {
|
|
23
|
-
return html`
|
|
24
|
-
<a href="../">Back</a>
|
|
25
|
-
<h1>UI Select</h1>
|
|
26
|
-
<p>A Material Design 3 select component that behaves like an outlined text field with dropdown.</p>
|
|
27
|
-
|
|
28
|
-
<section>
|
|
29
|
-
<h2>Basic Select</h2>
|
|
30
|
-
<p>Select a fruit from the list:</p>
|
|
31
|
-
<ui-select id="basic-select" @change="${this.handleBasicSelectChange}" label="Select a fruit">
|
|
32
|
-
<ui-option value="apple" selected>Apple</ui-option>
|
|
33
|
-
<ui-option value="banana">Banana</ui-option>
|
|
34
|
-
<ui-option value="cherry">Cherry</ui-option>
|
|
35
|
-
<ui-option value="date">Date</ui-option>
|
|
36
|
-
<ui-option value="elderberry">Elderberry</ui-option>
|
|
37
|
-
</ui-select>
|
|
38
|
-
<p>Selected: <span id="basic-result">None</span></p>
|
|
39
|
-
</section>
|
|
40
|
-
|
|
41
|
-
<section>
|
|
42
|
-
<h2>Select with Icons</h2>
|
|
43
|
-
<p>Select a country with icons:</p>
|
|
44
|
-
<ui-select id="icon-select" @change="${this.handleIconSelectChange}" value="us" label="Select a country">
|
|
45
|
-
<ui-option value="us">
|
|
46
|
-
<ui-icon slot="start">🇺🇸</ui-icon>
|
|
47
|
-
United States
|
|
48
|
-
<span slot="overline">North America</span>
|
|
49
|
-
<span slot="supporting-text">USA</span>
|
|
50
|
-
</ui-option>
|
|
51
|
-
<ui-option value="gb">
|
|
52
|
-
<ui-icon slot="start">🇬🇧</ui-icon>
|
|
53
|
-
United Kingdom
|
|
54
|
-
<span slot="overline">Europe</span>
|
|
55
|
-
<span slot="supporting-text">UK</span>
|
|
56
|
-
</ui-option>
|
|
57
|
-
<ui-option value="de">
|
|
58
|
-
<ui-icon slot="start">🇩🇪</ui-icon>
|
|
59
|
-
Germany
|
|
60
|
-
<span slot="overline">Europe</span>
|
|
61
|
-
<span slot="supporting-text">DE</span>
|
|
62
|
-
</ui-option>
|
|
63
|
-
<ui-option value="fr">
|
|
64
|
-
<ui-icon slot="start">🇫🇷</ui-icon>
|
|
65
|
-
France
|
|
66
|
-
<span slot="overline">Europe</span>
|
|
67
|
-
<span slot="supporting-text">FR</span>
|
|
68
|
-
</ui-option>
|
|
69
|
-
<ui-option value="jp">
|
|
70
|
-
<ui-icon slot="start">🇯🇵</ui-icon>
|
|
71
|
-
Japan
|
|
72
|
-
<span slot="overline">Asia</span>
|
|
73
|
-
<span slot="supporting-text">JP</span>
|
|
74
|
-
</ui-option>
|
|
75
|
-
</ui-select>
|
|
76
|
-
<p>Selected: <span id="icon-result">None</span></p>
|
|
77
|
-
</section>
|
|
78
|
-
|
|
79
|
-
<section>
|
|
80
|
-
<h2>Select with Supporting Text</h2>
|
|
81
|
-
<p>Select a user with additional information:</p>
|
|
82
|
-
<ui-select id="supporting-select" @change="${this.handleSupportingSelectChange}">
|
|
83
|
-
<ui-option value="alice">
|
|
84
|
-
Alice Johnson
|
|
85
|
-
<span slot="supporting-text">alice@example.com</span>
|
|
86
|
-
</ui-option>
|
|
87
|
-
<ui-option value="bob">
|
|
88
|
-
Bob Smith
|
|
89
|
-
<span slot="supporting-text">bob@example.com</span>
|
|
90
|
-
</ui-option>
|
|
91
|
-
<ui-option value="carol">
|
|
92
|
-
Carol Davis
|
|
93
|
-
<span slot="supporting-text">carol@example.com</span>
|
|
94
|
-
</ui-option>
|
|
95
|
-
<ui-option value="dave">
|
|
96
|
-
Dave Wilson
|
|
97
|
-
<span slot="supporting-text">dave@example.com</span>
|
|
98
|
-
</ui-option>
|
|
99
|
-
</ui-select>
|
|
100
|
-
<p>Selected: <span id="supporting-result">None</span></p>
|
|
101
|
-
</section>
|
|
102
|
-
|
|
103
|
-
<section>
|
|
104
|
-
<h2>Disabled Select</h2>
|
|
105
|
-
<p>This select is disabled:</p>
|
|
106
|
-
<ui-select id="disabled-select" disabled>
|
|
107
|
-
<ui-option value="option1">Option 1</ui-option>
|
|
108
|
-
<ui-option value="option2">Option 2</ui-option>
|
|
109
|
-
<ui-option value="option3">Option 3</ui-option>
|
|
110
|
-
</ui-select>
|
|
111
|
-
</section>
|
|
112
|
-
|
|
113
|
-
<section>
|
|
114
|
-
<h2>Select without Selection Icon</h2>
|
|
115
|
-
<p>Select without the check icon:</p>
|
|
116
|
-
<ui-select id="no-icon-select" @change="${this.handleNoIconSelectChange}">
|
|
117
|
-
<ui-option value="red">Red</ui-option>
|
|
118
|
-
<ui-option value="green">Green</ui-option>
|
|
119
|
-
<ui-option value="blue">Blue</ui-option>
|
|
120
|
-
<ui-option value="yellow">Yellow</ui-option>
|
|
121
|
-
</ui-select>
|
|
122
|
-
<p>Selected: <span id="no-icon-result">None</span></p>
|
|
123
|
-
</section>
|
|
124
|
-
|
|
125
|
-
<section>
|
|
126
|
-
<h2>Programmatic Control</h2>
|
|
127
|
-
<p>Control the select value programmatically:</p>
|
|
128
|
-
<ui-select id="programmatic-select" @change="${this.handleProgrammaticSelectChange}">
|
|
129
|
-
<ui-option value="one">One</ui-option>
|
|
130
|
-
<ui-option value="two">Two</ui-option>
|
|
131
|
-
<ui-option value="three">Three</ui-option>
|
|
132
|
-
<ui-option value="four">Four</ui-option>
|
|
133
|
-
</ui-select>
|
|
134
|
-
<p>Selected: <span id="programmatic-result">None</span></p>
|
|
135
|
-
<div class="button-group">
|
|
136
|
-
<ui-button @click="${this.setValueOne}">Set to "One"</ui-button>
|
|
137
|
-
<ui-button @click="${this.setValueTwo}">Set to "Two"</ui-button>
|
|
138
|
-
<ui-button @click="${this.clearValue}">Clear</ui-button>
|
|
139
|
-
</div>
|
|
140
|
-
</section>
|
|
141
|
-
`
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
handleBasicSelectChange(e: CustomEvent): void {
|
|
145
|
-
const { value } = e.detail
|
|
146
|
-
this.basicSelected = value
|
|
147
|
-
console.log(`Basic select changed: ${value}`)
|
|
148
|
-
const resultElement = document.querySelector('#basic-result')
|
|
149
|
-
if (resultElement) {
|
|
150
|
-
resultElement.textContent = value || 'None'
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
handleIconSelectChange(e: CustomEvent): void {
|
|
155
|
-
const { value } = e.detail
|
|
156
|
-
this.iconSelected = value
|
|
157
|
-
console.log(`Icon select changed: ${value}`)
|
|
158
|
-
const resultElement = document.querySelector('#icon-result')
|
|
159
|
-
if (resultElement) {
|
|
160
|
-
resultElement.textContent = value || 'None'
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
handleSupportingSelectChange(e: CustomEvent): void {
|
|
165
|
-
const { value } = e.detail
|
|
166
|
-
this.supportingSelected = value
|
|
167
|
-
console.log(`Supporting select changed: ${value}`)
|
|
168
|
-
const resultElement = document.querySelector('#supporting-result')
|
|
169
|
-
if (resultElement) {
|
|
170
|
-
resultElement.textContent = value || 'None'
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
handleNoIconSelectChange(e: CustomEvent): void {
|
|
175
|
-
const { value } = e.detail
|
|
176
|
-
this.noIconSelected = value
|
|
177
|
-
console.log(`No icon select changed: ${value}`)
|
|
178
|
-
const resultElement = document.querySelector('#no-icon-result')
|
|
179
|
-
if (resultElement) {
|
|
180
|
-
resultElement.textContent = value || 'None'
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
handleProgrammaticSelectChange(e: CustomEvent): void {
|
|
185
|
-
const { value } = e.detail
|
|
186
|
-
this.programmaticSelected = value
|
|
187
|
-
console.log(`Programmatic select changed: ${value}`)
|
|
188
|
-
const resultElement = document.querySelector('#programmatic-result')
|
|
189
|
-
if (resultElement) {
|
|
190
|
-
resultElement.textContent = value || 'None'
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
setValueOne(): void {
|
|
195
|
-
const select = document.querySelector('#programmatic-select') as HTMLElement & { value: string }
|
|
196
|
-
if (select) {
|
|
197
|
-
select.value = 'one'
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
setValueTwo(): void {
|
|
202
|
-
const select = document.querySelector('#programmatic-select') as HTMLElement & { value: string }
|
|
203
|
-
if (select) {
|
|
204
|
-
select.value = 'two'
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
clearValue(): void {
|
|
209
|
-
const select = document.querySelector('#programmatic-select') as HTMLElement & { value: string }
|
|
210
|
-
if (select) {
|
|
211
|
-
select.value = ''
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
const instance = new ComponentDemoPage()
|
|
217
|
-
instance.render()
|
package/demo/md/tabs/tabs.html
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en-GB">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
|
|
6
|
-
<title>UI tabs</title>
|
|
7
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
|
|
8
|
-
<link href="../../../src/styles/m3/tokens.css" rel="stylesheet" type="text/css" />
|
|
9
|
-
<link href="../../../src/styles/m3/theme.css" rel="stylesheet" type="text/css" />
|
|
10
|
-
<style>
|
|
11
|
-
.demo-row {
|
|
12
|
-
margin: 20px 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.demo .demo-section {
|
|
16
|
-
max-width: 858px;
|
|
17
|
-
margin: 0 auto 80px auto;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.demo h2, .demo h3 {
|
|
21
|
-
margin-bottom: 36px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.frame {
|
|
25
|
-
padding: 40px;
|
|
26
|
-
border-radius: 20px;
|
|
27
|
-
border: 1px var(--md-sys-color-outline) solid;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.scrollable {
|
|
31
|
-
max-width: 700px;
|
|
32
|
-
}
|
|
33
|
-
</style>
|
|
34
|
-
</head>
|
|
35
|
-
<body>
|
|
36
|
-
<div id="app"></div>
|
|
37
|
-
|
|
38
|
-
<script type="module" src="/.tmp/demo/md/tabs/tabs.js"></script>
|
|
39
|
-
</body>
|
|
40
|
-
</html>
|