@api-client/ui 0.5.38 → 0.5.40
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/md/list/internals/ListItem.d.ts +24 -15
- package/build/src/md/list/internals/ListItem.d.ts.map +1 -1
- package/build/src/md/list/internals/ListItem.js +85 -59
- package/build/src/md/list/internals/ListItem.js.map +1 -1
- package/build/src/md/list/internals/ListItem.styles.js +11 -11
- package/build/src/md/list/internals/ListItem.styles.js.map +1 -1
- package/build/src/md/select/internals/Option.d.ts +4 -14
- package/build/src/md/select/internals/Option.d.ts.map +1 -1
- package/build/src/md/select/internals/Option.js +13 -28
- package/build/src/md/select/internals/Option.js.map +1 -1
- package/build/src/md/select/internals/Select.d.ts +1 -1
- package/build/src/md/select/internals/Select.d.ts.map +1 -1
- package/build/src/md/select/internals/Select.js +15 -5
- package/build/src/md/select/internals/Select.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
- package/src/md/list/internals/ListItem.styles.ts +11 -11
- package/src/md/list/internals/ListItem.ts +68 -43
- package/src/md/select/internals/Option.ts +14 -26
- package/src/md/select/internals/Select.ts +15 -5
- 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/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 -207
- 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,78 +0,0 @@
|
|
|
1
|
-
import { html, TemplateResult } from 'lit'
|
|
2
|
-
import { DemoPage } from '../../../src/demo/DemoPage.js'
|
|
3
|
-
import './CustomDetail.js'
|
|
4
|
-
|
|
5
|
-
class ComponentDemoPage extends DemoPage {
|
|
6
|
-
override accessor componentName = 'UI collapse'
|
|
7
|
-
|
|
8
|
-
contentTemplate(): TemplateResult {
|
|
9
|
-
return html`
|
|
10
|
-
<a href="../">Back</a>
|
|
11
|
-
|
|
12
|
-
<section class="demo-section">
|
|
13
|
-
<h2 class="title-large">Basic</h2>
|
|
14
|
-
<custom-detail>
|
|
15
|
-
<div class="content">
|
|
16
|
-
Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea, id minim maiestatis
|
|
17
|
-
incorrupte duo. Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani est.
|
|
18
|
-
Vix ad ponderum petentium suavitate, eum eu tempor populo, graece sententiae constituam vim ex. Cu torquatos
|
|
19
|
-
reprimique neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus. Lorem ipsum dolor
|
|
20
|
-
sit amet, per in nusquam nominavi periculis, sit elit oportere ea, id minim maiestatis incorrupte duo.
|
|
21
|
-
Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani est. Vix ad ponderum
|
|
22
|
-
petentium suavitate, eum eu tempor populo, graece sententiae constituam vim ex. Cu torquatos reprimique
|
|
23
|
-
neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus.
|
|
24
|
-
</div>
|
|
25
|
-
</custom-detail>
|
|
26
|
-
</section>
|
|
27
|
-
|
|
28
|
-
<section class="demo-section">
|
|
29
|
-
<h2 class="title-large">Nested, horizontal expand</h2>
|
|
30
|
-
<custom-detail>
|
|
31
|
-
<div class="content">
|
|
32
|
-
<div>
|
|
33
|
-
Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea, id minim maiestatis
|
|
34
|
-
incorrupte duo. Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani est.
|
|
35
|
-
Vix ad ponderum petentium suavitate, eum eu tempor populo, graece sententiae constituam vim ex. Cu
|
|
36
|
-
torquatos reprimique neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus. Lorem
|
|
37
|
-
ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea, id minim maiestatis
|
|
38
|
-
incorrupte duo. Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani est.
|
|
39
|
-
Vix ad ponderum petentium suavitate, eum eu tempor populo, graece sententiae constituam vim ex. Cu
|
|
40
|
-
torquatos reprimique neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus.
|
|
41
|
-
</div>
|
|
42
|
-
<custom-detail horizontal>
|
|
43
|
-
<div class="content">
|
|
44
|
-
Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea, id minim maiestatis
|
|
45
|
-
incorrupte duo. Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani
|
|
46
|
-
est. Vix ad ponderum petentium suavitate, eum eu tempor populo, graece sententiae constituam vim ex. Cu
|
|
47
|
-
torquatos reprimique neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus. Lorem
|
|
48
|
-
ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea, id minim maiestatis
|
|
49
|
-
incorrupte duo. Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani
|
|
50
|
-
est. Vix ad ponderum petentium suavitate, eum eu tempor populo, graece sententiae constituam vim ex. Cu
|
|
51
|
-
torquatos reprimique neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus.
|
|
52
|
-
</div>
|
|
53
|
-
</custom-detail>
|
|
54
|
-
</div>
|
|
55
|
-
</custom-detail>
|
|
56
|
-
</section>
|
|
57
|
-
|
|
58
|
-
<section class="demo-section">
|
|
59
|
-
<h2 class="title-large">No animation</h2>
|
|
60
|
-
<custom-detail noanimation>
|
|
61
|
-
<div class="content">
|
|
62
|
-
Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea, id minim maiestatis
|
|
63
|
-
incorrupte duo. Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani est.
|
|
64
|
-
Vix ad ponderum petentium suavitate, eum eu tempor populo, graece sententiae constituam vim ex. Cu torquatos
|
|
65
|
-
reprimique neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus. Lorem ipsum dolor
|
|
66
|
-
sit amet, per in nusquam nominavi periculis, sit elit oportere ea, id minim maiestatis incorrupte duo.
|
|
67
|
-
Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani est. Vix ad ponderum
|
|
68
|
-
petentium suavitate, eum eu tempor populo, graece sententiae constituam vim ex. Cu torquatos reprimique
|
|
69
|
-
neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus.
|
|
70
|
-
</div>
|
|
71
|
-
</custom-detail>
|
|
72
|
-
</section>
|
|
73
|
-
`
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const instance = new ComponentDemoPage()
|
|
78
|
-
instance.render()
|
|
@@ -1,336 +0,0 @@
|
|
|
1
|
-
import { html, TemplateResult } from 'lit'
|
|
2
|
-
import { reactive } from '../../../src/decorators/index.js'
|
|
3
|
-
import { DemoPage } from '../../../src/demo/DemoPage.js'
|
|
4
|
-
|
|
5
|
-
import '../../../src/md/date-picker/index.js'
|
|
6
|
-
import '../../../src/md/button/ui-button.js'
|
|
7
|
-
|
|
8
|
-
class DatePickerDemoPage extends DemoPage {
|
|
9
|
-
override accessor componentName = 'Date Picker'
|
|
10
|
-
|
|
11
|
-
@reactive() accessor selectedDate: Date | null = null
|
|
12
|
-
@reactive() accessor selectedRange: { start: Date | null; end: Date | null } = { start: null, end: null }
|
|
13
|
-
@reactive() accessor modalOpen = false
|
|
14
|
-
@reactive() accessor modalInputOpen = false
|
|
15
|
-
@reactive() accessor modalInputRangeOpen = false
|
|
16
|
-
@reactive() accessor formValues: string | undefined
|
|
17
|
-
|
|
18
|
-
private get today(): Date {
|
|
19
|
-
return new Date()
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
private get oneMonthFromNow(): Date {
|
|
23
|
-
const date = new Date()
|
|
24
|
-
date.setMonth(date.getMonth() + 1)
|
|
25
|
-
return date
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
private get oneYearFromNow(): Date {
|
|
29
|
-
const date = new Date()
|
|
30
|
-
date.setFullYear(date.getFullYear() + 1)
|
|
31
|
-
return date
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
handleDateChange(e: CustomEvent): void {
|
|
35
|
-
this.selectedDate = e.detail.value
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
handleRangeChange(e: CustomEvent): void {
|
|
39
|
-
this.selectedRange = e.detail.range || { start: null, end: null }
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
handleDateConfirm(e: CustomEvent): void {
|
|
43
|
-
this.selectedDate = e.detail.date
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
handleRangeConfirm(e: CustomEvent): void {
|
|
47
|
-
this.selectedRange = e.detail.range || { start: null, end: null }
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
handleDateCancel(e: CustomEvent): void {
|
|
51
|
-
console.log('Date selection cancelled:', e.detail.reason)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
openModal(): void {
|
|
55
|
-
this.modalOpen = true
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
openModalInput(): void {
|
|
59
|
-
this.modalInputOpen = true
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
openModalInputRange(): void {
|
|
63
|
-
this.modalInputRangeOpen = true
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
handleModalClose(e: CustomEvent): void {
|
|
67
|
-
this.modalOpen = false
|
|
68
|
-
if (e.detail.confirmed && e.detail.range) {
|
|
69
|
-
this.selectedRange = e.detail.range
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
handleModalInputClose(e: CustomEvent): void {
|
|
74
|
-
this.modalInputOpen = false
|
|
75
|
-
if (e.detail.confirmed && e.detail.date) {
|
|
76
|
-
this.selectedDate = e.detail.date
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
handleModalInputRangeClose(e: CustomEvent): void {
|
|
81
|
-
this.modalInputRangeOpen = false
|
|
82
|
-
if (e.detail.confirmed && e.detail.range) {
|
|
83
|
-
this.selectedRange = e.detail.range
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
private formatDateRange(start: Date | null, end: Date | null, defaultMessage = 'No range selected'): string {
|
|
88
|
-
if (!start || !end) return defaultMessage
|
|
89
|
-
return `${start.toDateString()} - ${end.toDateString()}`
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
private formatSingleDate(date: Date | null, defaultMessage = 'No date selected'): string {
|
|
93
|
-
return date ? date.toDateString() : defaultMessage
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
handleFormSubmit(e: SubmitEvent): void {
|
|
97
|
-
e.preventDefault()
|
|
98
|
-
const form = e.target as HTMLFormElement
|
|
99
|
-
const formData = new FormData(form)
|
|
100
|
-
const values = Array.from(formData.entries())
|
|
101
|
-
this.formValues = new URLSearchParams(values as string[][]).toString()
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
contentTemplate(): TemplateResult {
|
|
105
|
-
return html`
|
|
106
|
-
<nav>
|
|
107
|
-
<a href="../" class="back-link">← Back to Components</a>
|
|
108
|
-
</nav>
|
|
109
|
-
${this.renderInputs()} ${this.renderCalendars()} ${this.renderModalDatePickers()} ${this.renderFormIntegration()}
|
|
110
|
-
${this.renderModalComponents()}
|
|
111
|
-
${this.formValues
|
|
112
|
-
? html`
|
|
113
|
-
<section class="demo-section">
|
|
114
|
-
<h3 class="headline-medium">Form Output</h3>
|
|
115
|
-
<output role="status" aria-live="polite" aria-label="Form submission result">
|
|
116
|
-
<code><pre>${this.formValues}</pre></code>
|
|
117
|
-
</output>
|
|
118
|
-
</section>
|
|
119
|
-
`
|
|
120
|
-
: ''}
|
|
121
|
-
`
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
renderInputs(): TemplateResult {
|
|
125
|
-
return html`<section class="demo-section">
|
|
126
|
-
<h2 class="display-large">Date Picker Input</h2>
|
|
127
|
-
<div class="variant-grid" role="group" aria-labelledby="input-variants-heading">
|
|
128
|
-
<span> </span>
|
|
129
|
-
<span class="legend-marker">1</span>
|
|
130
|
-
<span class="legend-marker">2</span>
|
|
131
|
-
<span class="legend-marker">3</span>
|
|
132
|
-
|
|
133
|
-
<span class="legend-marker">A</span>
|
|
134
|
-
<ui-date-picker-input
|
|
135
|
-
label="Basic input"
|
|
136
|
-
placeholder="Select date"
|
|
137
|
-
name="basic-date-picker"
|
|
138
|
-
.value="${this.selectedDate}"
|
|
139
|
-
@change="${this.handleDateChange}"
|
|
140
|
-
aria-describedby="basic-input-help"
|
|
141
|
-
></ui-date-picker-input>
|
|
142
|
-
<ui-date-picker-input
|
|
143
|
-
label="With constraints"
|
|
144
|
-
placeholder="Select date"
|
|
145
|
-
name="constrained-date-picker"
|
|
146
|
-
.minDate="${this.today}"
|
|
147
|
-
.maxDate="${this.oneMonthFromNow}"
|
|
148
|
-
.value="${this.selectedDate}"
|
|
149
|
-
@change="${this.handleDateChange}"
|
|
150
|
-
aria-describedby="constrained-input-help"
|
|
151
|
-
></ui-date-picker-input>
|
|
152
|
-
<ui-date-picker-input
|
|
153
|
-
label="Disabled input"
|
|
154
|
-
placeholder="Select date"
|
|
155
|
-
disabled
|
|
156
|
-
name="disabled-date-picker"
|
|
157
|
-
aria-describedby="disabled-input-help"
|
|
158
|
-
></ui-date-picker-input>
|
|
159
|
-
</div>
|
|
160
|
-
<div id="input-variants-heading" class="visually-hidden">Date input variants demonstration</div>
|
|
161
|
-
<div id="basic-input-help" class="visually-hidden">Basic date picker with no restrictions</div>
|
|
162
|
-
<div id="constrained-input-help" class="visually-hidden">
|
|
163
|
-
Date picker with date constraints applied (today to one month from now)
|
|
164
|
-
</div>
|
|
165
|
-
<div id="disabled-input-help" class="visually-hidden">Disabled date picker for demonstration</div>
|
|
166
|
-
<p class="body-medium">A. Input variants</p>
|
|
167
|
-
<ol class="decimal body-medium">
|
|
168
|
-
<li>Basic input</li>
|
|
169
|
-
<li>With date constraints</li>
|
|
170
|
-
<li>Disabled state</li>
|
|
171
|
-
</ol>
|
|
172
|
-
</section>`
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
renderCalendars(): TemplateResult {
|
|
176
|
-
return html`<section class="demo-section xl">
|
|
177
|
-
<h2 class="display-large">Date Picker Calendar</h2>
|
|
178
|
-
<div class="variant-grid" role="group" aria-labelledby="calendar-variants-heading">
|
|
179
|
-
<span> </span>
|
|
180
|
-
<span class="legend-marker">1</span>
|
|
181
|
-
<span class="legend-marker">2</span>
|
|
182
|
-
<span class="legend-marker">3</span>
|
|
183
|
-
|
|
184
|
-
<span class="legend-marker">B</span>
|
|
185
|
-
<ui-date-picker-calendar
|
|
186
|
-
showActions
|
|
187
|
-
.selectedDate="${this.selectedDate}"
|
|
188
|
-
@date-select="${this.handleDateConfirm}"
|
|
189
|
-
@date-cancel="${this.handleDateCancel}"
|
|
190
|
-
aria-describedby="basic-calendar-help"
|
|
191
|
-
></ui-date-picker-calendar>
|
|
192
|
-
<ui-date-picker-calendar
|
|
193
|
-
showActions
|
|
194
|
-
rangeSelection
|
|
195
|
-
.rangeStart="${this.selectedRange.start}"
|
|
196
|
-
.rangeEnd="${this.selectedRange.end}"
|
|
197
|
-
@date-range-confirm="${this.handleRangeConfirm}"
|
|
198
|
-
@date-cancel="${this.handleDateCancel}"
|
|
199
|
-
aria-describedby="range-calendar-help"
|
|
200
|
-
></ui-date-picker-calendar>
|
|
201
|
-
<ui-date-picker-calendar
|
|
202
|
-
showActions
|
|
203
|
-
.minDate="${this.today}"
|
|
204
|
-
.maxDate="${this.oneMonthFromNow}"
|
|
205
|
-
.selectedDate="${this.selectedDate}"
|
|
206
|
-
@date-select="${this.handleDateConfirm}"
|
|
207
|
-
@date-cancel="${this.handleDateCancel}"
|
|
208
|
-
aria-describedby="constrained-calendar-help"
|
|
209
|
-
></ui-date-picker-calendar>
|
|
210
|
-
</div>
|
|
211
|
-
<div id="calendar-variants-heading" class="visually-hidden">Calendar variants demonstration</div>
|
|
212
|
-
<div id="basic-calendar-help" class="visually-hidden">Basic calendar for single date selection</div>
|
|
213
|
-
<div id="range-calendar-help" class="visually-hidden">Calendar configured for date range selection</div>
|
|
214
|
-
<div id="constrained-calendar-help" class="visually-hidden">
|
|
215
|
-
Calendar with date constraints limiting selectable dates
|
|
216
|
-
</div>
|
|
217
|
-
<p class="body-medium">B. Calendar variants</p>
|
|
218
|
-
<ol class="decimal body-medium">
|
|
219
|
-
<li>Single date selection</li>
|
|
220
|
-
<li>Range selection</li>
|
|
221
|
-
<li>With date constraints</li>
|
|
222
|
-
</ol>
|
|
223
|
-
</section>`
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
renderModalDatePickers(): TemplateResult {
|
|
227
|
-
return html`
|
|
228
|
-
<section class="demo-section">
|
|
229
|
-
<h2 class="display-large">Modal Date Pickers</h2>
|
|
230
|
-
<div class="modal-demo-grid">
|
|
231
|
-
<article class="modal-demo-item">
|
|
232
|
-
<h3 class="headline-small">Range Selection Modal</h3>
|
|
233
|
-
<p class="body-medium">Full-screen modal for selecting date ranges</p>
|
|
234
|
-
<ui-button @click="${this.openModal}" color="filled" aria-describedby="range-modal-output">
|
|
235
|
-
Open Date Range Picker
|
|
236
|
-
</ui-button>
|
|
237
|
-
<div id="range-modal-output" class="demo-output" role="status" aria-live="polite">
|
|
238
|
-
Selected range: ${this.formatDateRange(this.selectedRange.start, this.selectedRange.end)}
|
|
239
|
-
</div>
|
|
240
|
-
</article>
|
|
241
|
-
|
|
242
|
-
<article class="modal-demo-item">
|
|
243
|
-
<h3 class="headline-small">Single Date Input Modal</h3>
|
|
244
|
-
<p class="body-medium">Modal with single date input field</p>
|
|
245
|
-
<ui-button @click="${this.openModalInput}" color="filled" aria-describedby="input-modal-output">
|
|
246
|
-
Open Single Date Input
|
|
247
|
-
</ui-button>
|
|
248
|
-
<div id="input-modal-output" class="demo-output" role="status" aria-live="polite">
|
|
249
|
-
Selected date: ${this.formatSingleDate(this.selectedDate, 'No date entered')}
|
|
250
|
-
</div>
|
|
251
|
-
</article>
|
|
252
|
-
|
|
253
|
-
<article class="modal-demo-item">
|
|
254
|
-
<h3 class="headline-small">Range Input Modal</h3>
|
|
255
|
-
<p class="body-medium">Modal with date range input fields</p>
|
|
256
|
-
<ui-button @click="${this.openModalInputRange}" color="filled" aria-describedby="input-range-modal-output">
|
|
257
|
-
Open Range Date Input
|
|
258
|
-
</ui-button>
|
|
259
|
-
<div id="input-range-modal-output" class="demo-output" role="status" aria-live="polite">
|
|
260
|
-
Selected range:
|
|
261
|
-
${this.formatDateRange(this.selectedRange.start, this.selectedRange.end, 'No range entered')}
|
|
262
|
-
</div>
|
|
263
|
-
</article>
|
|
264
|
-
</div>
|
|
265
|
-
</section>
|
|
266
|
-
`
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
renderFormIntegration(): TemplateResult {
|
|
270
|
-
return html`<section class="demo-section">
|
|
271
|
-
<h2 class="display-large">Form Integration</h2>
|
|
272
|
-
<div class="frame">
|
|
273
|
-
<form @submit="${this.handleFormSubmit}" novalidate>
|
|
274
|
-
<fieldset>
|
|
275
|
-
<legend class="visually-hidden">Event scheduling form</legend>
|
|
276
|
-
<div class="form-row">
|
|
277
|
-
<ui-date-picker-input
|
|
278
|
-
required
|
|
279
|
-
label="Event date"
|
|
280
|
-
placeholder="Select event date"
|
|
281
|
-
name="event-date"
|
|
282
|
-
aria-describedby="event-date-help"
|
|
283
|
-
></ui-date-picker-input>
|
|
284
|
-
<div id="event-date-help" class="form-help">Choose the date when the event will take place</div>
|
|
285
|
-
</div>
|
|
286
|
-
<div class="form-row">
|
|
287
|
-
<ui-date-picker-input
|
|
288
|
-
label="Deadline (optional)"
|
|
289
|
-
placeholder="Select deadline"
|
|
290
|
-
name="deadline"
|
|
291
|
-
.minDate="${this.today}"
|
|
292
|
-
aria-describedby="deadline-help"
|
|
293
|
-
></ui-date-picker-input>
|
|
294
|
-
<div id="deadline-help" class="form-help">Optional deadline for event preparation</div>
|
|
295
|
-
</div>
|
|
296
|
-
</fieldset>
|
|
297
|
-
<div class="form-actions" role="group" aria-label="Form actions">
|
|
298
|
-
<ui-button type="submit" color="filled">Submit Form</ui-button>
|
|
299
|
-
<ui-button type="reset" color="outlined">Reset</ui-button>
|
|
300
|
-
</div>
|
|
301
|
-
</form>
|
|
302
|
-
</div>
|
|
303
|
-
</section>`
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
renderModalComponents(): TemplateResult {
|
|
307
|
-
return html`<!-- Modal Components -->
|
|
308
|
-
<ui-date-picker-modal
|
|
309
|
-
?open="${this.modalOpen}"
|
|
310
|
-
title="Select travel dates"
|
|
311
|
-
startLabel="Check-in"
|
|
312
|
-
endLabel="Check-out"
|
|
313
|
-
@close="${this.handleModalClose}"
|
|
314
|
-
></ui-date-picker-modal>
|
|
315
|
-
|
|
316
|
-
<ui-date-picker-modal-input
|
|
317
|
-
?open="${this.modalInputOpen}"
|
|
318
|
-
title="Enter date"
|
|
319
|
-
.rangeMode="${false}"
|
|
320
|
-
startLabel="Date"
|
|
321
|
-
@modal-input-close="${this.handleModalInputClose}"
|
|
322
|
-
></ui-date-picker-modal-input>
|
|
323
|
-
|
|
324
|
-
<ui-date-picker-modal-input
|
|
325
|
-
?open="${this.modalInputRangeOpen}"
|
|
326
|
-
title="Enter date range"
|
|
327
|
-
.rangeMode="${true}"
|
|
328
|
-
startLabel="Start date"
|
|
329
|
-
endLabel="End date"
|
|
330
|
-
@modal-input-close="${this.handleModalInputRangeClose}"
|
|
331
|
-
></ui-date-picker-modal-input>`
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
const instance = new DatePickerDemoPage()
|
|
336
|
-
instance.render()
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en-GB">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<title>Date Picker Demo</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="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&icon_names=calendar_month,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
|
-
<link href="../../../src/styles/m3/native.css" rel="stylesheet" type="text/css" />
|
|
12
|
-
<style>
|
|
13
|
-
.demo-row {
|
|
14
|
-
margin: 20px 0;
|
|
15
|
-
display: flex;
|
|
16
|
-
gap: 12px;
|
|
17
|
-
flex-wrap: wrap;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.demo .demo-section {
|
|
21
|
-
max-width: 858px;
|
|
22
|
-
margin: 0 auto 80px auto;
|
|
23
|
-
--_row-height: 80px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.demo .demo-section.l {
|
|
27
|
-
max-width: 1080px;
|
|
28
|
-
--_row-height: 120px;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.demo .demo-section.xl {
|
|
32
|
-
max-width: 1380px;
|
|
33
|
-
--_row-height: 180px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.demo h2, .demo h3 {
|
|
37
|
-
margin-bottom: 36px;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
ol {
|
|
41
|
-
padding-left: 0;
|
|
42
|
-
list-style: none;
|
|
43
|
-
counter-reset: item;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
ol > li {
|
|
47
|
-
margin-top: 4px;
|
|
48
|
-
margin-bottom: 20px;
|
|
49
|
-
margin-left: 36px;
|
|
50
|
-
counter-increment: item;
|
|
51
|
-
vertical-align: baseline;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
ol > li:before {
|
|
55
|
-
display: inline-block;
|
|
56
|
-
width: 24px;
|
|
57
|
-
height: 32px;
|
|
58
|
-
margin-top: -4px;
|
|
59
|
-
margin-right: 10px;
|
|
60
|
-
margin-left: -36px;
|
|
61
|
-
border-radius: 12px;
|
|
62
|
-
background: var(--md-sys-color-inverse-surface);
|
|
63
|
-
color: var(--md-sys-color-inverse-on-surface);
|
|
64
|
-
line-height: 32px;
|
|
65
|
-
text-align: center;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
ol.decimal > li:before {
|
|
69
|
-
content: counter(item, decimal);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.variant-grid {
|
|
73
|
-
display: grid;
|
|
74
|
-
gap: 24px;
|
|
75
|
-
grid-template-columns: 80px 1fr 1fr 1fr;
|
|
76
|
-
grid-template-rows: auto auto;
|
|
77
|
-
justify-items: start;
|
|
78
|
-
align-items: center;
|
|
79
|
-
padding: 40px;
|
|
80
|
-
border-radius: 20px;
|
|
81
|
-
border: 1px var(--md-sys-color-outline) solid;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.modal-demo-grid {
|
|
85
|
-
display: grid;
|
|
86
|
-
gap: 24px;
|
|
87
|
-
grid-template-columns: 1fr 1fr;
|
|
88
|
-
padding: 40px;
|
|
89
|
-
border-radius: 20px;
|
|
90
|
-
border: 1px var(--md-sys-color-outline) solid;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.modal-demo-item {
|
|
94
|
-
display: flex;
|
|
95
|
-
flex-direction: column;
|
|
96
|
-
gap: 16px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.config-grid {
|
|
100
|
-
display: flex;
|
|
101
|
-
gap: 24px;
|
|
102
|
-
flex-wrap: wrap;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.config-item {
|
|
106
|
-
display: flex;
|
|
107
|
-
align-items: center;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.checkbox-label {
|
|
111
|
-
display: flex;
|
|
112
|
-
align-items: center;
|
|
113
|
-
gap: 8px;
|
|
114
|
-
cursor: pointer;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.form-row {
|
|
118
|
-
margin-bottom: 16px;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.form-actions {
|
|
122
|
-
display: flex;
|
|
123
|
-
gap: 12px;
|
|
124
|
-
margin-top: 24px;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.demo-output {
|
|
128
|
-
padding: 12px;
|
|
129
|
-
background: var(--md-sys-color-surface-container);
|
|
130
|
-
border-radius: 8px;
|
|
131
|
-
font-family: monospace;
|
|
132
|
-
font-size: 12px;
|
|
133
|
-
color: var(--md-sys-color-on-surface);
|
|
134
|
-
white-space: pre-wrap;
|
|
135
|
-
min-height: 40px;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.legend-marker {
|
|
139
|
-
width: 24px;
|
|
140
|
-
height: 24px;
|
|
141
|
-
border-radius: 50%;
|
|
142
|
-
background-color: var(--md-sys-color-inverse-surface);
|
|
143
|
-
color: var(--md-sys-color-inverse-on-surface);
|
|
144
|
-
display: flex;
|
|
145
|
-
justify-content: center;
|
|
146
|
-
align-items: center;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.frame {
|
|
150
|
-
padding: 40px;
|
|
151
|
-
border-radius: 20px;
|
|
152
|
-
border: 1px var(--md-sys-color-outline) solid;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
@media (max-width: 768px) {
|
|
156
|
-
.variant-grid {
|
|
157
|
-
grid-template-columns: 1fr;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.modal-demo-grid {
|
|
161
|
-
grid-template-columns: 1fr;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
</style>
|
|
165
|
-
</head>
|
|
166
|
-
<body>
|
|
167
|
-
<div id="app"></div>
|
|
168
|
-
|
|
169
|
-
<script type="module" src="/.tmp/demo/md/date-picker/date-picker.js"></script>
|
|
170
|
-
</body>
|
|
171
|
-
</html>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en-GB">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<title>UI Confirm Dialog Demo</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-section {
|
|
12
|
-
margin: 40px 0;
|
|
13
|
-
padding: 24px;
|
|
14
|
-
border: 1px solid var(--md-sys-color-outline);
|
|
15
|
-
border-radius: 8px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.demo-section h2 {
|
|
19
|
-
margin-top: 0;
|
|
20
|
-
color: var(--md-sys-color-on-surface);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.demo-section p {
|
|
24
|
-
margin-bottom: 20px;
|
|
25
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.button-group {
|
|
29
|
-
display: flex;
|
|
30
|
-
gap: 12px;
|
|
31
|
-
flex-wrap: wrap;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.result {
|
|
35
|
-
margin-top: 20px;
|
|
36
|
-
padding: 12px;
|
|
37
|
-
background: var(--md-sys-color-surface-variant);
|
|
38
|
-
border-radius: 4px;
|
|
39
|
-
font-family: monospace;
|
|
40
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
41
|
-
}
|
|
42
|
-
</style>
|
|
43
|
-
</head>
|
|
44
|
-
<body>
|
|
45
|
-
<div id="app"></div>
|
|
46
|
-
|
|
47
|
-
<script type="module" src="/.tmp/demo/md/dialog/confirm-dialog.js"></script>
|
|
48
|
-
</body>
|
|
49
|
-
</html>
|