@api-client/ui 0.5.5 → 0.5.7

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.
Files changed (114) hide show
  1. package/.cursor/rules/html-and-css-best-practices.mdc +63 -0
  2. package/.cursor/rules/lit-best-practices.mdc +78 -0
  3. package/.github/instructions/html-and-css-best-practices.instructions.md +70 -0
  4. package/.github/instructions/lit-best-practices.instructions.md +86 -0
  5. package/build/src/elements/currency/currency-picker.d.ts +10 -0
  6. package/build/src/elements/currency/currency-picker.d.ts.map +1 -0
  7. package/build/src/elements/currency/currency-picker.js +27 -0
  8. package/build/src/elements/currency/currency-picker.js.map +1 -0
  9. package/build/src/elements/currency/internals/Picker.d.ts +311 -0
  10. package/build/src/elements/currency/internals/Picker.d.ts.map +1 -0
  11. package/build/src/elements/currency/internals/Picker.js +857 -0
  12. package/build/src/elements/currency/internals/Picker.js.map +1 -0
  13. package/build/src/elements/currency/internals/Picker.styles.d.ts +3 -0
  14. package/build/src/elements/currency/internals/Picker.styles.d.ts.map +1 -0
  15. package/build/src/elements/currency/internals/Picker.styles.js +58 -0
  16. package/build/src/elements/currency/internals/Picker.styles.js.map +1 -0
  17. package/build/src/elements/highlight/MarkdownStyles.d.ts.map +1 -1
  18. package/build/src/elements/highlight/MarkdownStyles.js +0 -13
  19. package/build/src/elements/highlight/MarkdownStyles.js.map +1 -1
  20. package/build/src/elements/http/BodyEditor.d.ts +0 -13
  21. package/build/src/elements/http/BodyEditor.d.ts.map +1 -1
  22. package/build/src/elements/http/BodyEditor.js +0 -13
  23. package/build/src/elements/http/BodyEditor.js.map +1 -1
  24. package/build/src/elements/http/BodyTextEditor.d.ts +0 -13
  25. package/build/src/elements/http/BodyTextEditor.d.ts.map +1 -1
  26. package/build/src/elements/http/BodyTextEditor.js +0 -13
  27. package/build/src/elements/http/BodyTextEditor.js.map +1 -1
  28. package/build/src/elements/http/BodyUrlEncodedEditor.d.ts +0 -13
  29. package/build/src/elements/http/BodyUrlEncodedEditor.d.ts.map +1 -1
  30. package/build/src/elements/http/BodyUrlEncodedEditor.js +0 -13
  31. package/build/src/elements/http/BodyUrlEncodedEditor.js.map +1 -1
  32. package/build/src/elements/http/UrlInput.d.ts +0 -13
  33. package/build/src/elements/http/UrlInput.d.ts.map +1 -1
  34. package/build/src/elements/http/UrlInput.js +0 -13
  35. package/build/src/elements/http/UrlInput.js.map +1 -1
  36. package/build/src/index.d.ts +2 -0
  37. package/build/src/index.d.ts.map +1 -1
  38. package/build/src/index.js +2 -0
  39. package/build/src/index.js.map +1 -1
  40. package/build/src/md/button/internals/base.d.ts +1 -0
  41. package/build/src/md/button/internals/base.d.ts.map +1 -1
  42. package/build/src/md/button/internals/base.js +7 -0
  43. package/build/src/md/button/internals/base.js.map +1 -1
  44. package/build/src/md/button/internals/button.styles.js +1 -1
  45. package/build/src/md/button/internals/button.styles.js.map +1 -1
  46. package/build/src/md/date/internals/DateTime.d.ts +0 -13
  47. package/build/src/md/date/internals/DateTime.d.ts.map +1 -1
  48. package/build/src/md/date/internals/DateTime.js +0 -13
  49. package/build/src/md/date/internals/DateTime.js.map +1 -1
  50. package/build/src/md/date-picker/index.d.ts +13 -0
  51. package/build/src/md/date-picker/index.d.ts.map +1 -0
  52. package/build/src/md/date-picker/index.js +13 -0
  53. package/build/src/md/date-picker/index.js.map +1 -0
  54. package/build/src/md/date-picker/internals/DatePicker.styles.d.ts +4 -0
  55. package/build/src/md/date-picker/internals/DatePicker.styles.d.ts.map +1 -0
  56. package/build/src/md/date-picker/internals/DatePicker.styles.js +409 -0
  57. package/build/src/md/date-picker/internals/DatePicker.styles.js.map +1 -0
  58. package/build/src/md/date-picker/internals/DatePickerCalendar.d.ts +272 -0
  59. package/build/src/md/date-picker/internals/DatePickerCalendar.d.ts.map +1 -0
  60. package/build/src/md/date-picker/internals/DatePickerCalendar.js +1062 -0
  61. package/build/src/md/date-picker/internals/DatePickerCalendar.js.map +1 -0
  62. package/build/src/md/date-picker/internals/DatePickerUtils.d.ts +93 -0
  63. package/build/src/md/date-picker/internals/DatePickerUtils.d.ts.map +1 -0
  64. package/build/src/md/date-picker/internals/DatePickerUtils.js +221 -0
  65. package/build/src/md/date-picker/internals/DatePickerUtils.js.map +1 -0
  66. package/build/src/md/date-picker/ui-date-picker-input.d.ts +160 -0
  67. package/build/src/md/date-picker/ui-date-picker-input.d.ts.map +1 -0
  68. package/build/src/md/date-picker/ui-date-picker-input.js +464 -0
  69. package/build/src/md/date-picker/ui-date-picker-input.js.map +1 -0
  70. package/build/src/md/date-picker/ui-date-picker-modal-input.d.ts +178 -0
  71. package/build/src/md/date-picker/ui-date-picker-modal-input.d.ts.map +1 -0
  72. package/build/src/md/date-picker/ui-date-picker-modal-input.js +538 -0
  73. package/build/src/md/date-picker/ui-date-picker-modal-input.js.map +1 -0
  74. package/build/src/md/date-picker/ui-date-picker-modal.d.ts +156 -0
  75. package/build/src/md/date-picker/ui-date-picker-modal.d.ts.map +1 -0
  76. package/build/src/md/date-picker/ui-date-picker-modal.js +423 -0
  77. package/build/src/md/date-picker/ui-date-picker-modal.js.map +1 -0
  78. package/build/src/md/dialog/internals/Dialog.styles.d.ts.map +1 -1
  79. package/build/src/md/dialog/internals/Dialog.styles.js +1 -0
  80. package/build/src/md/dialog/internals/Dialog.styles.js.map +1 -1
  81. package/demo/elements/currency/index.html +91 -0
  82. package/demo/elements/currency/index.ts +272 -0
  83. package/demo/elements/har/har2.json +1 -1
  84. package/demo/elements/index.html +3 -0
  85. package/demo/md/date-picker/date-picker.ts +336 -0
  86. package/demo/md/date-picker/index.html +171 -0
  87. package/demo/md/index.html +2 -0
  88. package/package.json +1 -1
  89. package/src/elements/currency/currency-picker.ts +14 -0
  90. package/src/elements/currency/internals/Picker.styles.ts +58 -0
  91. package/src/elements/currency/internals/Picker.ts +846 -0
  92. package/src/elements/highlight/MarkdownStyles.ts +0 -13
  93. package/src/elements/http/BodyEditor.ts +0 -13
  94. package/src/elements/http/BodyTextEditor.ts +0 -13
  95. package/src/elements/http/BodyUrlEncodedEditor.ts +0 -13
  96. package/src/elements/http/UrlInput.ts +0 -13
  97. package/src/index.ts +17 -0
  98. package/src/md/button/internals/base.ts +7 -0
  99. package/src/md/button/internals/button.styles.ts +1 -1
  100. package/src/md/date/internals/DateTime.ts +0 -14
  101. package/src/md/date-picker/README.md +184 -0
  102. package/src/md/date-picker/index.ts +17 -0
  103. package/src/md/date-picker/internals/DatePicker.styles.ts +411 -0
  104. package/src/md/date-picker/internals/DatePickerCalendar.ts +1031 -0
  105. package/src/md/date-picker/internals/DatePickerUtils.ts +288 -0
  106. package/src/md/date-picker/ui-date-picker-input.ts +333 -0
  107. package/src/md/date-picker/ui-date-picker-modal-input.ts +440 -0
  108. package/src/md/date-picker/ui-date-picker-modal.ts +346 -0
  109. package/src/md/dialog/internals/Dialog.styles.ts +1 -0
  110. package/test/README.md +3 -2
  111. package/test/elements/currency/CurrencyPicker.accessibility.test.ts +328 -0
  112. package/test/elements/currency/CurrencyPicker.core.test.ts +318 -0
  113. package/test/elements/currency/CurrencyPicker.integration.test.ts +482 -0
  114. package/test/elements/currency/CurrencyPicker.test.ts +486 -0
@@ -0,0 +1,156 @@
1
+ import { LitElement, TemplateResult } from 'lit';
2
+ import { DateRange } from './internals/DatePickerUtils.js';
3
+ import './internals/DatePickerCalendar.js';
4
+ import '../../md/dialog/ui-dialog.js';
5
+ import '../../md/button/ui-button.js';
6
+ import '../../md/icon-button/ui-icon-button.js';
7
+ import '../../md/icons/ui-icon.js';
8
+ export interface ModalDatePickerChangeEvent {
9
+ range: DateRange;
10
+ formattedRange: {
11
+ start: string | null;
12
+ end: string | null;
13
+ };
14
+ }
15
+ /**
16
+ * A modal date picker for selecting date ranges.
17
+ * Extends full-screen and is ideal for date range selection like flight bookings.
18
+ *
19
+ * ## Features
20
+ * - Full-screen modal interface
21
+ * - Date range selection with visual feedback
22
+ * - Calendar and input mode toggle
23
+ * - Min/max date constraints
24
+ * - Disabled dates support
25
+ * - Accessible design with proper ARIA attributes and semantic HTML
26
+ * - Real-time date range validation
27
+ *
28
+ * ## Events
29
+ *
30
+ * ### `date-range-change`
31
+ * Fired when a date range is selected or changed.
32
+ *
33
+ * **Detail:**
34
+ * ```typescript
35
+ * {
36
+ * range: DateRange,
37
+ * formattedRange: {
38
+ * start: string | null,
39
+ * end: string | null
40
+ * }
41
+ * }
42
+ * ```
43
+ *
44
+ * ### `close`
45
+ * Fired when the modal is closed.
46
+ *
47
+ * **Detail:**
48
+ * ```typescript
49
+ * {
50
+ * confirmed: boolean,
51
+ * range: DateRange | null
52
+ * }
53
+ * ```
54
+ *
55
+ * ## Usage
56
+ *
57
+ * ### Basic usage
58
+ * ```html
59
+ * <ui-date-picker-modal
60
+ * .open=${true}
61
+ * .selectedRange=${{ start: new Date(), end: null }}
62
+ * @date-range-change=${this.handleRangeChange}
63
+ * @close=${this.handleClose}
64
+ * ></ui-date-picker-modal>
65
+ * ```
66
+ *
67
+ * ### Custom labels and constraints
68
+ * ```html
69
+ * <ui-date-picker-modal
70
+ * title="Select travel dates"
71
+ * startLabel="Check-in"
72
+ * endLabel="Check-out"
73
+ * .minDate=${new Date()}
74
+ * .maxDate=${new Date(Date.now() + 365 * 24 * 60 * 60 * 1000)}
75
+ * .disabledDates=${[new Date('2024-12-25')]}
76
+ * ></ui-date-picker-modal>
77
+ * ```
78
+ *
79
+ * ### With mode toggle disabled
80
+ * ```html
81
+ * <ui-date-picker-modal
82
+ * .showModeToggle=${false}
83
+ * ></ui-date-picker-modal>
84
+ * ```
85
+ */
86
+ export declare class UiDatePickerModal extends LitElement {
87
+ static styles: import("lit").CSSResult;
88
+ /**
89
+ * Whether the modal is open
90
+ */
91
+ accessor open: boolean;
92
+ /**
93
+ * The modal title
94
+ */
95
+ accessor title: string;
96
+ /**
97
+ * Label for the start date
98
+ */
99
+ accessor startLabel: string;
100
+ /**
101
+ * Label for the end date
102
+ */
103
+ accessor endLabel: string;
104
+ /**
105
+ * The selected date range
106
+ */
107
+ accessor selectedRange: DateRange | null;
108
+ /**
109
+ * Minimum selectable date
110
+ */
111
+ accessor minDate: Date | undefined;
112
+ /**
113
+ * Maximum selectable date
114
+ */
115
+ accessor maxDate: Date | undefined;
116
+ /**
117
+ * Array of disabled dates
118
+ */
119
+ accessor disabledDates: Date[] | undefined;
120
+ /**
121
+ * Locale for date formatting
122
+ */
123
+ accessor locale: string | undefined;
124
+ /**
125
+ * Whether to show edit/calendar toggle button
126
+ */
127
+ accessor showModeToggle: boolean;
128
+ private accessor isInputMode;
129
+ constructor();
130
+ private handleRangeSelect;
131
+ private handleCancel;
132
+ private handleConfirm;
133
+ private handleModeToggle;
134
+ private dispatchChangeEvent;
135
+ private dispatchCloseEvent;
136
+ private renderHeader;
137
+ private renderDateDisplay;
138
+ private renderCalendar;
139
+ private renderInputMode;
140
+ private renderContent;
141
+ private renderActions;
142
+ render(): TemplateResult;
143
+ }
144
+ declare global {
145
+ interface HTMLElementTagNameMap {
146
+ 'ui-date-picker-modal': UiDatePickerModal;
147
+ }
148
+ interface HTMLElementEventMap {
149
+ 'date-range-change': CustomEvent<ModalDatePickerChangeEvent>;
150
+ 'close': CustomEvent<{
151
+ confirmed: boolean;
152
+ range: DateRange | null;
153
+ }>;
154
+ }
155
+ }
156
+ //# sourceMappingURL=ui-date-picker-modal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-date-picker-modal.d.ts","sourceRoot":"","sources":["../../../../src/md/date-picker/ui-date-picker-modal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAA;AAGtD,OAAO,EAAE,SAAS,EAAc,MAAM,gCAAgC,CAAA;AAEtE,OAAO,mCAAmC,CAAA;AAC1C,OAAO,8BAA8B,CAAA;AACrC,OAAO,8BAA8B,CAAA;AACrC,OAAO,wCAAwC,CAAA;AAC/C,OAAO,2BAA2B,CAAA;AAElC,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,SAAS,CAAA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AM,IAAI,cAAc;CAalC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,sBAAsB,EAAE,iBAAiB,CAAA;KAC1C;IAED,UAAU,mBAAmB;QAC3B,mBAAmB,EAAE,WAAW,CAAC,0BAA0B,CAAC,CAAA;QAC5D,OAAO,EAAE,WAAW,CAAC;YACnB,SAAS,EAAE,OAAO,CAAA;YAClB,KAAK,EAAE,SAAS,GAAG,IAAI,CAAA;SACxB,CAAC,CAAA;KACH;CACF"}
@@ -0,0 +1,423 @@
1
+ import { __esDecorate, __runInitializers } from "tslib";
2
+ import { LitElement, html } from 'lit';
3
+ import { customElement, property, state } from 'lit/decorators.js';
4
+ import { modalStyles } from './internals/DatePicker.styles.js';
5
+ import { formatDate } from './internals/DatePickerUtils.js';
6
+ import './internals/DatePickerCalendar.js';
7
+ import '../../md/dialog/ui-dialog.js';
8
+ import '../../md/button/ui-button.js';
9
+ import '../../md/icon-button/ui-icon-button.js';
10
+ import '../../md/icons/ui-icon.js';
11
+ /**
12
+ * A modal date picker for selecting date ranges.
13
+ * Extends full-screen and is ideal for date range selection like flight bookings.
14
+ *
15
+ * ## Features
16
+ * - Full-screen modal interface
17
+ * - Date range selection with visual feedback
18
+ * - Calendar and input mode toggle
19
+ * - Min/max date constraints
20
+ * - Disabled dates support
21
+ * - Accessible design with proper ARIA attributes and semantic HTML
22
+ * - Real-time date range validation
23
+ *
24
+ * ## Events
25
+ *
26
+ * ### `date-range-change`
27
+ * Fired when a date range is selected or changed.
28
+ *
29
+ * **Detail:**
30
+ * ```typescript
31
+ * {
32
+ * range: DateRange,
33
+ * formattedRange: {
34
+ * start: string | null,
35
+ * end: string | null
36
+ * }
37
+ * }
38
+ * ```
39
+ *
40
+ * ### `close`
41
+ * Fired when the modal is closed.
42
+ *
43
+ * **Detail:**
44
+ * ```typescript
45
+ * {
46
+ * confirmed: boolean,
47
+ * range: DateRange | null
48
+ * }
49
+ * ```
50
+ *
51
+ * ## Usage
52
+ *
53
+ * ### Basic usage
54
+ * ```html
55
+ * <ui-date-picker-modal
56
+ * .open=${true}
57
+ * .selectedRange=${{ start: new Date(), end: null }}
58
+ * @date-range-change=${this.handleRangeChange}
59
+ * @close=${this.handleClose}
60
+ * ></ui-date-picker-modal>
61
+ * ```
62
+ *
63
+ * ### Custom labels and constraints
64
+ * ```html
65
+ * <ui-date-picker-modal
66
+ * title="Select travel dates"
67
+ * startLabel="Check-in"
68
+ * endLabel="Check-out"
69
+ * .minDate=${new Date()}
70
+ * .maxDate=${new Date(Date.now() + 365 * 24 * 60 * 60 * 1000)}
71
+ * .disabledDates=${[new Date('2024-12-25')]}
72
+ * ></ui-date-picker-modal>
73
+ * ```
74
+ *
75
+ * ### With mode toggle disabled
76
+ * ```html
77
+ * <ui-date-picker-modal
78
+ * .showModeToggle=${false}
79
+ * ></ui-date-picker-modal>
80
+ * ```
81
+ */
82
+ let UiDatePickerModal = (() => {
83
+ let _classDecorators = [customElement('ui-date-picker-modal')];
84
+ let _classDescriptor;
85
+ let _classExtraInitializers = [];
86
+ let _classThis;
87
+ let _classSuper = LitElement;
88
+ let _open_decorators;
89
+ let _open_initializers = [];
90
+ let _open_extraInitializers = [];
91
+ let _title_decorators;
92
+ let _title_initializers = [];
93
+ let _title_extraInitializers = [];
94
+ let _startLabel_decorators;
95
+ let _startLabel_initializers = [];
96
+ let _startLabel_extraInitializers = [];
97
+ let _endLabel_decorators;
98
+ let _endLabel_initializers = [];
99
+ let _endLabel_extraInitializers = [];
100
+ let _selectedRange_decorators;
101
+ let _selectedRange_initializers = [];
102
+ let _selectedRange_extraInitializers = [];
103
+ let _minDate_decorators;
104
+ let _minDate_initializers = [];
105
+ let _minDate_extraInitializers = [];
106
+ let _maxDate_decorators;
107
+ let _maxDate_initializers = [];
108
+ let _maxDate_extraInitializers = [];
109
+ let _disabledDates_decorators;
110
+ let _disabledDates_initializers = [];
111
+ let _disabledDates_extraInitializers = [];
112
+ let _locale_decorators;
113
+ let _locale_initializers = [];
114
+ let _locale_extraInitializers = [];
115
+ let _showModeToggle_decorators;
116
+ let _showModeToggle_initializers = [];
117
+ let _showModeToggle_extraInitializers = [];
118
+ let _isInputMode_decorators;
119
+ let _isInputMode_initializers = [];
120
+ let _isInputMode_extraInitializers = [];
121
+ var UiDatePickerModal = class extends _classSuper {
122
+ static { _classThis = this; }
123
+ static {
124
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
125
+ _open_decorators = [property({ type: Boolean })];
126
+ _title_decorators = [property({ type: String })];
127
+ _startLabel_decorators = [property({ type: String })];
128
+ _endLabel_decorators = [property({ type: String })];
129
+ _selectedRange_decorators = [property({ type: Object })];
130
+ _minDate_decorators = [property({ type: Object })];
131
+ _maxDate_decorators = [property({ type: Object })];
132
+ _disabledDates_decorators = [property({ type: Array })];
133
+ _locale_decorators = [property({ type: String })];
134
+ _showModeToggle_decorators = [property({ type: Boolean })];
135
+ _isInputMode_decorators = [state()];
136
+ __esDecorate(this, null, _open_decorators, { kind: "accessor", name: "open", static: false, private: false, access: { has: obj => "open" in obj, get: obj => obj.open, set: (obj, value) => { obj.open = value; } }, metadata: _metadata }, _open_initializers, _open_extraInitializers);
137
+ __esDecorate(this, null, _title_decorators, { kind: "accessor", name: "title", static: false, private: false, access: { has: obj => "title" in obj, get: obj => obj.title, set: (obj, value) => { obj.title = value; } }, metadata: _metadata }, _title_initializers, _title_extraInitializers);
138
+ __esDecorate(this, null, _startLabel_decorators, { kind: "accessor", name: "startLabel", static: false, private: false, access: { has: obj => "startLabel" in obj, get: obj => obj.startLabel, set: (obj, value) => { obj.startLabel = value; } }, metadata: _metadata }, _startLabel_initializers, _startLabel_extraInitializers);
139
+ __esDecorate(this, null, _endLabel_decorators, { kind: "accessor", name: "endLabel", static: false, private: false, access: { has: obj => "endLabel" in obj, get: obj => obj.endLabel, set: (obj, value) => { obj.endLabel = value; } }, metadata: _metadata }, _endLabel_initializers, _endLabel_extraInitializers);
140
+ __esDecorate(this, null, _selectedRange_decorators, { kind: "accessor", name: "selectedRange", static: false, private: false, access: { has: obj => "selectedRange" in obj, get: obj => obj.selectedRange, set: (obj, value) => { obj.selectedRange = value; } }, metadata: _metadata }, _selectedRange_initializers, _selectedRange_extraInitializers);
141
+ __esDecorate(this, null, _minDate_decorators, { kind: "accessor", name: "minDate", static: false, private: false, access: { has: obj => "minDate" in obj, get: obj => obj.minDate, set: (obj, value) => { obj.minDate = value; } }, metadata: _metadata }, _minDate_initializers, _minDate_extraInitializers);
142
+ __esDecorate(this, null, _maxDate_decorators, { kind: "accessor", name: "maxDate", static: false, private: false, access: { has: obj => "maxDate" in obj, get: obj => obj.maxDate, set: (obj, value) => { obj.maxDate = value; } }, metadata: _metadata }, _maxDate_initializers, _maxDate_extraInitializers);
143
+ __esDecorate(this, null, _disabledDates_decorators, { kind: "accessor", name: "disabledDates", static: false, private: false, access: { has: obj => "disabledDates" in obj, get: obj => obj.disabledDates, set: (obj, value) => { obj.disabledDates = value; } }, metadata: _metadata }, _disabledDates_initializers, _disabledDates_extraInitializers);
144
+ __esDecorate(this, null, _locale_decorators, { kind: "accessor", name: "locale", static: false, private: false, access: { has: obj => "locale" in obj, get: obj => obj.locale, set: (obj, value) => { obj.locale = value; } }, metadata: _metadata }, _locale_initializers, _locale_extraInitializers);
145
+ __esDecorate(this, null, _showModeToggle_decorators, { kind: "accessor", name: "showModeToggle", static: false, private: false, access: { has: obj => "showModeToggle" in obj, get: obj => obj.showModeToggle, set: (obj, value) => { obj.showModeToggle = value; } }, metadata: _metadata }, _showModeToggle_initializers, _showModeToggle_extraInitializers);
146
+ __esDecorate(this, null, _isInputMode_decorators, { kind: "accessor", name: "isInputMode", static: false, private: false, access: { has: obj => "isInputMode" in obj, get: obj => obj.isInputMode, set: (obj, value) => { obj.isInputMode = value; } }, metadata: _metadata }, _isInputMode_initializers, _isInputMode_extraInitializers);
147
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
148
+ UiDatePickerModal = _classThis = _classDescriptor.value;
149
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
150
+ }
151
+ static styles = modalStyles;
152
+ #open_accessor_storage = __runInitializers(this, _open_initializers, false
153
+ /**
154
+ * The modal title
155
+ */
156
+ );
157
+ /**
158
+ * Whether the modal is open
159
+ */
160
+ get open() { return this.#open_accessor_storage; }
161
+ set open(value) { this.#open_accessor_storage = value; }
162
+ #title_accessor_storage = (__runInitializers(this, _open_extraInitializers), __runInitializers(this, _title_initializers, 'Select dates'
163
+ /**
164
+ * Label for the start date
165
+ */
166
+ ));
167
+ /**
168
+ * The modal title
169
+ */
170
+ get title() { return this.#title_accessor_storage; }
171
+ set title(value) { this.#title_accessor_storage = value; }
172
+ #startLabel_accessor_storage = (__runInitializers(this, _title_extraInitializers), __runInitializers(this, _startLabel_initializers, 'Start date'
173
+ /**
174
+ * Label for the end date
175
+ */
176
+ ));
177
+ /**
178
+ * Label for the start date
179
+ */
180
+ get startLabel() { return this.#startLabel_accessor_storage; }
181
+ set startLabel(value) { this.#startLabel_accessor_storage = value; }
182
+ #endLabel_accessor_storage = (__runInitializers(this, _startLabel_extraInitializers), __runInitializers(this, _endLabel_initializers, 'End date'
183
+ /**
184
+ * The selected date range
185
+ */
186
+ ));
187
+ /**
188
+ * Label for the end date
189
+ */
190
+ get endLabel() { return this.#endLabel_accessor_storage; }
191
+ set endLabel(value) { this.#endLabel_accessor_storage = value; }
192
+ #selectedRange_accessor_storage = (__runInitializers(this, _endLabel_extraInitializers), __runInitializers(this, _selectedRange_initializers, null
193
+ /**
194
+ * Minimum selectable date
195
+ */
196
+ ));
197
+ /**
198
+ * The selected date range
199
+ */
200
+ get selectedRange() { return this.#selectedRange_accessor_storage; }
201
+ set selectedRange(value) { this.#selectedRange_accessor_storage = value; }
202
+ #minDate_accessor_storage = (__runInitializers(this, _selectedRange_extraInitializers), __runInitializers(this, _minDate_initializers, undefined
203
+ /**
204
+ * Maximum selectable date
205
+ */
206
+ ));
207
+ /**
208
+ * Minimum selectable date
209
+ */
210
+ get minDate() { return this.#minDate_accessor_storage; }
211
+ set minDate(value) { this.#minDate_accessor_storage = value; }
212
+ #maxDate_accessor_storage = (__runInitializers(this, _minDate_extraInitializers), __runInitializers(this, _maxDate_initializers, undefined
213
+ /**
214
+ * Array of disabled dates
215
+ */
216
+ ));
217
+ /**
218
+ * Maximum selectable date
219
+ */
220
+ get maxDate() { return this.#maxDate_accessor_storage; }
221
+ set maxDate(value) { this.#maxDate_accessor_storage = value; }
222
+ #disabledDates_accessor_storage = (__runInitializers(this, _maxDate_extraInitializers), __runInitializers(this, _disabledDates_initializers, undefined
223
+ /**
224
+ * Locale for date formatting
225
+ */
226
+ ));
227
+ /**
228
+ * Array of disabled dates
229
+ */
230
+ get disabledDates() { return this.#disabledDates_accessor_storage; }
231
+ set disabledDates(value) { this.#disabledDates_accessor_storage = value; }
232
+ #locale_accessor_storage = (__runInitializers(this, _disabledDates_extraInitializers), __runInitializers(this, _locale_initializers, undefined
233
+ /**
234
+ * Whether to show edit/calendar toggle button
235
+ */
236
+ ));
237
+ /**
238
+ * Locale for date formatting
239
+ */
240
+ get locale() { return this.#locale_accessor_storage; }
241
+ set locale(value) { this.#locale_accessor_storage = value; }
242
+ #showModeToggle_accessor_storage = (__runInitializers(this, _locale_extraInitializers), __runInitializers(this, _showModeToggle_initializers, true));
243
+ /**
244
+ * Whether to show edit/calendar toggle button
245
+ */
246
+ get showModeToggle() { return this.#showModeToggle_accessor_storage; }
247
+ set showModeToggle(value) { this.#showModeToggle_accessor_storage = value; }
248
+ #isInputMode_accessor_storage = (__runInitializers(this, _showModeToggle_extraInitializers), __runInitializers(this, _isInputMode_initializers, false));
249
+ get isInputMode() { return this.#isInputMode_accessor_storage; }
250
+ set isInputMode(value) { this.#isInputMode_accessor_storage = value; }
251
+ constructor() {
252
+ super();
253
+ __runInitializers(this, _isInputMode_extraInitializers);
254
+ // Initialize boolean properties to false as per Lit best practices
255
+ this.open = false;
256
+ this.showModeToggle = true;
257
+ }
258
+ handleRangeSelect(event) {
259
+ this.selectedRange = event.detail.range;
260
+ this.dispatchChangeEvent();
261
+ }
262
+ handleCancel() {
263
+ this.dispatchCloseEvent(false);
264
+ }
265
+ handleConfirm() {
266
+ this.dispatchCloseEvent(true);
267
+ }
268
+ handleModeToggle() {
269
+ this.isInputMode = !this.isInputMode;
270
+ }
271
+ dispatchChangeEvent() {
272
+ if (!this.selectedRange)
273
+ return;
274
+ const event = {
275
+ range: this.selectedRange,
276
+ formattedRange: {
277
+ start: this.selectedRange.start ? formatDate(this.selectedRange.start, this.locale) : null,
278
+ end: this.selectedRange.end ? formatDate(this.selectedRange.end, this.locale) : null,
279
+ },
280
+ };
281
+ this.dispatchEvent(new CustomEvent('date-range-change', {
282
+ detail: event,
283
+ bubbles: true,
284
+ composed: true,
285
+ }));
286
+ }
287
+ dispatchCloseEvent(confirmed) {
288
+ this.dispatchEvent(new CustomEvent('close', {
289
+ detail: {
290
+ confirmed,
291
+ range: confirmed ? this.selectedRange : null,
292
+ },
293
+ bubbles: true,
294
+ composed: true,
295
+ }));
296
+ }
297
+ renderHeader() {
298
+ return html `
299
+ <header class="modal-header">
300
+ <h2 id="modal-title" class="modal-title">${this.title}</h2>
301
+ <div class="header-actions">
302
+ ${this.showModeToggle
303
+ ? html `
304
+ <ui-icon-button
305
+ @click=${this.handleModeToggle}
306
+ aria-label=${this.isInputMode ? 'Show calendar' : 'Show date input'}
307
+ title=${this.isInputMode ? 'Show calendar' : 'Show date input'}
308
+ >
309
+ <ui-icon icon=${this.isInputMode ? 'calendarToday' : 'edit'}></ui-icon>
310
+ </ui-icon-button>
311
+ `
312
+ : ''}
313
+ <ui-icon-button @click=${this.handleCancel} aria-label="Close" title="Close">
314
+ <ui-icon icon="close"></ui-icon>
315
+ </ui-icon-button>
316
+ </div>
317
+ </header>
318
+ `;
319
+ }
320
+ renderDateDisplay() {
321
+ const startDate = this.selectedRange?.start;
322
+ const endDate = this.selectedRange?.end;
323
+ return html `
324
+ <section class="date-range-display" role="status" aria-live="polite" aria-label="Selected date range">
325
+ <div class="date-display">
326
+ <div class="date-label" id="start-label">${this.startLabel}</div>
327
+ <div class="date-value" aria-labelledby="start-label" aria-describedby="start-description">
328
+ ${startDate ? formatDate(startDate, this.locale) : 'Select date'}
329
+ </div>
330
+ <div id="start-description" class="visually-hidden">
331
+ ${startDate ? `Start date selected: ${formatDate(startDate, this.locale)}` : 'No start date selected'}
332
+ </div>
333
+ </div>
334
+ <div class="date-separator" aria-hidden="true">—</div>
335
+ <div class="date-display">
336
+ <div class="date-label" id="end-label">${this.endLabel}</div>
337
+ <div class="date-value" aria-labelledby="end-label" aria-describedby="end-description">
338
+ ${endDate ? formatDate(endDate, this.locale) : 'Select date'}
339
+ </div>
340
+ <div id="end-description" class="visually-hidden">
341
+ ${endDate ? `End date selected: ${formatDate(endDate, this.locale)}` : 'No end date selected'}
342
+ </div>
343
+ </div>
344
+ </section>
345
+ `;
346
+ }
347
+ renderCalendar() {
348
+ const currentDate = this.selectedRange?.start || new Date();
349
+ return html `
350
+ <ui-date-picker-calendar
351
+ .year=${currentDate.getFullYear()}
352
+ .month=${currentDate.getMonth()}
353
+ .rangeStart=${this.selectedRange?.start || null}
354
+ .rangeEnd=${this.selectedRange?.end || null}
355
+ .rangeSelection=${true}
356
+ .minDate=${this.minDate}
357
+ .maxDate=${this.maxDate}
358
+ .disabledDates=${this.disabledDates}
359
+ .locale=${this.locale}
360
+ @date-range-select=${this.handleRangeSelect}
361
+ ></ui-date-picker-calendar>
362
+ `;
363
+ }
364
+ renderInputMode() {
365
+ return html `
366
+ <section class="input-mode-placeholder" role="status" aria-live="polite">
367
+ <ui-icon icon="edit" class="input-mode-icon" aria-hidden="true"></ui-icon>
368
+ <h3>Manual date input mode</h3>
369
+ <p>This feature can be enhanced with date input fields for direct text entry</p>
370
+ <p><em>Use the calendar toggle button to return to calendar view</em></p>
371
+ </section>
372
+ `;
373
+ }
374
+ renderContent() {
375
+ return html `
376
+ <main id="modal-content" class="modal-content">
377
+ ${this.renderDateDisplay()} ${this.isInputMode ? this.renderInputMode() : this.renderCalendar()}
378
+ </main>
379
+ `;
380
+ }
381
+ renderActions() {
382
+ const hasValidRange = this.selectedRange?.start && this.selectedRange?.end;
383
+ return html `
384
+ <footer class="modal-actions" role="group" aria-label="Date picker actions">
385
+ <ui-button color="text" @click=${this.handleCancel} aria-describedby="cancel-description"> Cancel </ui-button>
386
+ <ui-button
387
+ color="filled"
388
+ @click=${this.handleConfirm}
389
+ .disabled=${!hasValidRange}
390
+ aria-describedby="confirm-description"
391
+ >
392
+ Confirm
393
+ </ui-button>
394
+ <div id="cancel-description" class="visually-hidden">Close the date picker without saving changes</div>
395
+ <div id="confirm-description" class="visually-hidden">
396
+ ${hasValidRange
397
+ ? 'Save the selected date range and close the picker'
398
+ : 'Select both start and end dates to confirm the selection'}
399
+ </div>
400
+ </footer>
401
+ `;
402
+ }
403
+ render() {
404
+ return html `
405
+ <ui-dialog
406
+ .open=${this.open}
407
+ @close=${this.handleCancel}
408
+ role="dialog"
409
+ aria-labelledby="modal-title"
410
+ aria-describedby="modal-content"
411
+ >
412
+ ${this.renderHeader()} ${this.renderContent()} ${this.renderActions()}
413
+ </ui-dialog>
414
+ `;
415
+ }
416
+ static {
417
+ __runInitializers(_classThis, _classExtraInitializers);
418
+ }
419
+ };
420
+ return UiDatePickerModal = _classThis;
421
+ })();
422
+ export { UiDatePickerModal };
423
+ //# sourceMappingURL=ui-date-picker-modal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-date-picker-modal.js","sourceRoot":"","sources":["../../../../src/md/date-picker/ui-date-picker-modal.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,E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;QAEO,aAAa;YACnB,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,KAAK,IAAI,IAAI,CAAC,aAAa,EAAE,GAAG,CAAA;YAE1E,OAAO,IAAI,CAAA;;yCAE0B,IAAI,CAAC,YAAY;;;mBAGvC,IAAI,CAAC,aAAa;sBACf,CAAC,aAAa;;;;;;;YAOxB,aAAa;gBACb,CAAC,CAAC,mDAAmD;gBACrD,CAAC,CAAC,0DAA0D;;;KAGnE,CAAA;QACH,CAAC;QAEQ,MAAM;YACb,OAAO,IAAI,CAAA;;gBAEC,IAAI,CAAC,IAAI;iBACR,IAAI,CAAC,YAAY;;;;;UAKxB,IAAI,CAAC,YAAY,EAAE,IAAI,IAAI,CAAC,aAAa,EAAE,IAAI,IAAI,CAAC,aAAa,EAAE;;KAExE,CAAA;QACH,CAAC;;YA/OU,uDAAiB;;;;;SAAjB,iBAAiB","sourcesContent":["import { LitElement, html, TemplateResult } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { modalStyles } from './internals/DatePicker.styles.js'\nimport { DateRange, formatDate } from './internals/DatePickerUtils.js'\nimport type { DateRangeSelectEvent } from './internals/DatePickerCalendar.js'\nimport './internals/DatePickerCalendar.js'\nimport '../../md/dialog/ui-dialog.js'\nimport '../../md/button/ui-button.js'\nimport '../../md/icon-button/ui-icon-button.js'\nimport '../../md/icons/ui-icon.js'\n\nexport interface ModalDatePickerChangeEvent {\n range: DateRange\n formattedRange: {\n start: string | null\n end: string | null\n }\n}\n\n/**\n * A modal date picker for selecting date ranges.\n * Extends full-screen and is ideal for date range selection like flight bookings.\n *\n * ## Features\n * - Full-screen modal interface\n * - Date range selection with visual feedback\n * - Calendar and input mode toggle\n * - Min/max date constraints\n * - Disabled dates support\n * - Accessible design with proper ARIA attributes and semantic HTML\n * - Real-time date range validation\n *\n * ## Events\n *\n * ### `date-range-change`\n * Fired when a date range is selected or changed.\n *\n * **Detail:**\n * ```typescript\n * {\n * range: DateRange,\n * formattedRange: {\n * start: string | null,\n * end: string | null\n * }\n * }\n * ```\n *\n * ### `close`\n * Fired when the modal is closed.\n *\n * **Detail:**\n * ```typescript\n * {\n * confirmed: boolean,\n * range: DateRange | null\n * }\n * ```\n *\n * ## Usage\n *\n * ### Basic usage\n * ```html\n * <ui-date-picker-modal\n * .open=${true}\n * .selectedRange=${{ start: new Date(), end: null }}\n * @date-range-change=${this.handleRangeChange}\n * @close=${this.handleClose}\n * ></ui-date-picker-modal>\n * ```\n *\n * ### Custom labels and constraints\n * ```html\n * <ui-date-picker-modal\n * title=\"Select travel dates\"\n * startLabel=\"Check-in\"\n * endLabel=\"Check-out\"\n * .minDate=${new Date()}\n * .maxDate=${new Date(Date.now() + 365 * 24 * 60 * 60 * 1000)}\n * .disabledDates=${[new Date('2024-12-25')]}\n * ></ui-date-picker-modal>\n * ```\n *\n * ### With mode toggle disabled\n * ```html\n * <ui-date-picker-modal\n * .showModeToggle=${false}\n * ></ui-date-picker-modal>\n * ```\n */\n@customElement('ui-date-picker-modal')\nexport class UiDatePickerModal extends LitElement {\n static override styles = modalStyles\n\n /**\n * Whether the modal is open\n */\n @property({ type: Boolean }) accessor open = false\n\n /**\n * The modal title\n */\n @property({ type: String }) override accessor title = 'Select dates'\n\n /**\n * Label for the start date\n */\n @property({ type: String }) accessor startLabel = 'Start date'\n\n /**\n * Label for the end date\n */\n @property({ type: String }) accessor endLabel = 'End date'\n\n /**\n * The selected date range\n */\n @property({ type: Object }) accessor selectedRange: DateRange | null = null\n\n /**\n * Minimum selectable date\n */\n @property({ type: Object }) accessor minDate: Date | undefined = undefined\n\n /**\n * Maximum selectable date\n */\n @property({ type: Object }) accessor maxDate: Date | undefined = undefined\n\n /**\n * Array of disabled dates\n */\n @property({ type: Array }) accessor disabledDates: Date[] | undefined = undefined\n\n /**\n * Locale for date formatting\n */\n @property({ type: String }) accessor locale: string | undefined = undefined\n\n /**\n * Whether to show edit/calendar toggle button\n */\n @property({ type: Boolean }) accessor showModeToggle = true\n\n @state() private accessor isInputMode = false\n\n constructor() {\n super()\n // Initialize boolean properties to false as per Lit best practices\n this.open = false\n this.showModeToggle = true\n }\n\n private handleRangeSelect(event: CustomEvent<DateRangeSelectEvent>): void {\n this.selectedRange = event.detail.range\n this.dispatchChangeEvent()\n }\n\n private handleCancel(): void {\n this.dispatchCloseEvent(false)\n }\n\n private handleConfirm(): void {\n this.dispatchCloseEvent(true)\n }\n\n private handleModeToggle(): void {\n this.isInputMode = !this.isInputMode\n }\n\n private dispatchChangeEvent(): void {\n if (!this.selectedRange) return\n\n const event: ModalDatePickerChangeEvent = {\n range: this.selectedRange,\n formattedRange: {\n start: this.selectedRange.start ? formatDate(this.selectedRange.start, this.locale) : null,\n end: this.selectedRange.end ? formatDate(this.selectedRange.end, this.locale) : null,\n },\n }\n\n this.dispatchEvent(\n new CustomEvent('date-range-change', {\n detail: event,\n bubbles: true,\n composed: true,\n })\n )\n }\n\n private dispatchCloseEvent(confirmed: boolean): void {\n this.dispatchEvent(\n new CustomEvent('close', {\n detail: {\n confirmed,\n range: confirmed ? this.selectedRange : null,\n },\n bubbles: true,\n composed: true,\n })\n )\n }\n\n private renderHeader(): TemplateResult {\n return html`\n <header class=\"modal-header\">\n <h2 id=\"modal-title\" class=\"modal-title\">${this.title}</h2>\n <div class=\"header-actions\">\n ${this.showModeToggle\n ? html`\n <ui-icon-button\n @click=${this.handleModeToggle}\n aria-label=${this.isInputMode ? 'Show calendar' : 'Show date input'}\n title=${this.isInputMode ? 'Show calendar' : 'Show date input'}\n >\n <ui-icon icon=${this.isInputMode ? 'calendarToday' : 'edit'}></ui-icon>\n </ui-icon-button>\n `\n : ''}\n <ui-icon-button @click=${this.handleCancel} aria-label=\"Close\" title=\"Close\">\n <ui-icon icon=\"close\"></ui-icon>\n </ui-icon-button>\n </div>\n </header>\n `\n }\n\n private renderDateDisplay(): TemplateResult {\n const startDate = this.selectedRange?.start\n const endDate = this.selectedRange?.end\n\n return html`\n <section class=\"date-range-display\" role=\"status\" aria-live=\"polite\" aria-label=\"Selected date range\">\n <div class=\"date-display\">\n <div class=\"date-label\" id=\"start-label\">${this.startLabel}</div>\n <div class=\"date-value\" aria-labelledby=\"start-label\" aria-describedby=\"start-description\">\n ${startDate ? formatDate(startDate, this.locale) : 'Select date'}\n </div>\n <div id=\"start-description\" class=\"visually-hidden\">\n ${startDate ? `Start date selected: ${formatDate(startDate, this.locale)}` : 'No start date selected'}\n </div>\n </div>\n <div class=\"date-separator\" aria-hidden=\"true\">—</div>\n <div class=\"date-display\">\n <div class=\"date-label\" id=\"end-label\">${this.endLabel}</div>\n <div class=\"date-value\" aria-labelledby=\"end-label\" aria-describedby=\"end-description\">\n ${endDate ? formatDate(endDate, this.locale) : 'Select date'}\n </div>\n <div id=\"end-description\" class=\"visually-hidden\">\n ${endDate ? `End date selected: ${formatDate(endDate, this.locale)}` : 'No end date selected'}\n </div>\n </div>\n </section>\n `\n }\n\n private renderCalendar(): TemplateResult {\n const currentDate = this.selectedRange?.start || new Date()\n\n return html`\n <ui-date-picker-calendar\n .year=${currentDate.getFullYear()}\n .month=${currentDate.getMonth()}\n .rangeStart=${this.selectedRange?.start || null}\n .rangeEnd=${this.selectedRange?.end || null}\n .rangeSelection=${true}\n .minDate=${this.minDate}\n .maxDate=${this.maxDate}\n .disabledDates=${this.disabledDates}\n .locale=${this.locale}\n @date-range-select=${this.handleRangeSelect}\n ></ui-date-picker-calendar>\n `\n }\n\n private renderInputMode(): TemplateResult {\n return html`\n <section class=\"input-mode-placeholder\" role=\"status\" aria-live=\"polite\">\n <ui-icon icon=\"edit\" class=\"input-mode-icon\" aria-hidden=\"true\"></ui-icon>\n <h3>Manual date input mode</h3>\n <p>This feature can be enhanced with date input fields for direct text entry</p>\n <p><em>Use the calendar toggle button to return to calendar view</em></p>\n </section>\n `\n }\n\n private renderContent(): TemplateResult {\n return html`\n <main id=\"modal-content\" class=\"modal-content\">\n ${this.renderDateDisplay()} ${this.isInputMode ? this.renderInputMode() : this.renderCalendar()}\n </main>\n `\n }\n\n private renderActions(): TemplateResult {\n const hasValidRange = this.selectedRange?.start && this.selectedRange?.end\n\n return html`\n <footer class=\"modal-actions\" role=\"group\" aria-label=\"Date picker actions\">\n <ui-button color=\"text\" @click=${this.handleCancel} aria-describedby=\"cancel-description\"> Cancel </ui-button>\n <ui-button\n color=\"filled\"\n @click=${this.handleConfirm}\n .disabled=${!hasValidRange}\n aria-describedby=\"confirm-description\"\n >\n Confirm\n </ui-button>\n <div id=\"cancel-description\" class=\"visually-hidden\">Close the date picker without saving changes</div>\n <div id=\"confirm-description\" class=\"visually-hidden\">\n ${hasValidRange\n ? 'Save the selected date range and close the picker'\n : 'Select both start and end dates to confirm the selection'}\n </div>\n </footer>\n `\n }\n\n override render(): TemplateResult {\n return html`\n <ui-dialog\n .open=${this.open}\n @close=${this.handleCancel}\n role=\"dialog\"\n aria-labelledby=\"modal-title\"\n aria-describedby=\"modal-content\"\n >\n ${this.renderHeader()} ${this.renderContent()} ${this.renderActions()}\n </ui-dialog>\n `\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ui-date-picker-modal': UiDatePickerModal\n }\n\n interface HTMLElementEventMap {\n 'date-range-change': CustomEvent<ModalDatePickerChangeEvent>\n 'close': CustomEvent<{\n confirmed: boolean\n range: DateRange | null\n }>\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.styles.d.ts","sourceRoot":"","sources":["../../../../../src/md/dialog/internals/Dialog.styles.ts"],"names":[],"mappings":";AAEA,wBAiKC"}
1
+ {"version":3,"file":"Dialog.styles.d.ts","sourceRoot":"","sources":["../../../../../src/md/dialog/internals/Dialog.styles.ts"],"names":[],"mappings":";AAEA,wBAkKC"}
@@ -34,6 +34,7 @@ export default css `
34
34
  left: 50%;
35
35
  transform: translate(-50%, -50%);
36
36
  margin: 0;
37
+ z-index: 1000;
37
38
  }
38
39
 
39
40
  dialog.non-modal:open {
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.styles.js","sourceRoot":"","sources":["../../../../../src/md/dialog/internals/Dialog.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiKjB,CAAA","sourcesContent":["import { css } from 'lit'\n\nexport default css`\n :host {\n display: contents;\n }\n\n dialog {\n overflow: hidden;\n /* Do not override the display value here. It will render the dialog even when hidden */\n\n border: none;\n border-radius: var(--md-sys-shape-corner-extra-large);\n background-color: var(--md-sys-color-surface-container-high);\n box-shadow: var(--md-sys-elevation-3);\n color: var(--md-sys-color-on-surface-variant);\n padding: 24px;\n\n max-width: var(--ui-dialog-max-width, 90vw);\n max-height: var(--ui-dialog-max-height, 90vh);\n width: var(--ui-dialog-width, revert);\n height: var(--ui-dialog-height, revert);\n }\n\n dialog:open {\n animation: 250ms cubic-bezier(0.2, 0, 0, 1) show-dialog;\n display: flex;\n flex-direction: column;\n }\n\n /* Positioning for non-modal dialogs */\n dialog.non-modal {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n margin: 0;\n }\n\n dialog.non-modal:open {\n /* Override the animation transform for non-modal dialogs to account for centering */\n animation: 250ms cubic-bezier(0.2, 0, 0, 1) show-non-modal-dialog;\n }\n\n dialog:open::backdrop {\n animation: 250ms cubic-bezier(0.2, 0, 0, 1) show-backdrop;\n }\n\n .container {\n display: flex;\n flex-direction: column;\n flex: 1;\n overflow: hidden;\n }\n\n .icon {\n display: none;\n }\n\n .icon.with-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 16px;\n }\n\n .icon ::slotted(*) {\n color: var(--md-sys-color-secondary);\n fill: var(--md-sys-color-secondary);\n width: 24px;\n height: 24px;\n }\n\n .icon.destructive ::slotted(*) {\n color: var(--md-sys-color-error);\n fill: var(--md-sys-color-error);\n }\n\n .title {\n display: none;\n color: var(--md-sys-color-on-surface);\n font-family: var(--md-sys-typescale-headline-small-font);\n font-weight: var(--md-sys-typescale-headline-small-weight);\n font-size: var(--md-sys-typescale-headline-small-size);\n letter-spacing: var(--md-sys-typescale-headline-small-tracking);\n line-height: var(--md-sys-typescale-headline-small-height);\n margin: 0;\n padding: 0;\n text-align: center;\n }\n\n .title.with-title {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 16px;\n }\n\n .content {\n overflow: auto;\n font-family: var(--md-sys-typescale-body-medium-font);\n font-weight: var(--md-sys-typescale-body-medium-weight);\n font-size: var(--md-sys-typescale-body-medium-size);\n letter-spacing: var(--md-sys-typescale-body-medium-tracking);\n line-height: var(--md-sys-typescale-body-medium-height);\n }\n\n .buttons {\n display: none;\n display: flex;\n align-items: center;\n justify-content: end;\n }\n\n .buttons.with-buttons {\n margin-top: 24px;\n }\n\n .buttons ::slotted(:not(:last-child)) {\n margin-right: 12px;\n }\n\n .content ::slotted(*) {\n background-color: var(--md-sys-color-surface-container-high);\n }\n\n @keyframes show-dialog {\n from {\n transform: translateY(-110%) scaleY(0);\n }\n to {\n transform: translateY(0%) scaleY(1);\n }\n }\n\n @keyframes show-non-modal-dialog {\n from {\n transform: translate(-50%, -50%) translateY(-110%) scaleY(0);\n }\n to {\n transform: translate(-50%, -50%) translateY(0%) scaleY(1);\n }\n }\n\n @keyframes show-backdrop {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n /* Destructive button styling for dangerous actions */\n .internal-button.destructive {\n --_background-color: var(--md-sys-color-error);\n --_color: var(--md-sys-color-on-error);\n\n /* Override ripple colors for better interaction feedback */\n --md-ripple-hover-state-layer-color: var(--md-sys-color-on-error);\n --md-ripple-focus-state-layer-color: var(--md-sys-color-on-error);\n --md-ripple-pressed-state-layer-color: var(--md-sys-color-on-error);\n }\n`\n"]}
1
+ {"version":3,"file":"Dialog.styles.js","sourceRoot":"","sources":["../../../../../src/md/dialog/internals/Dialog.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkKjB,CAAA","sourcesContent":["import { css } from 'lit'\n\nexport default css`\n :host {\n display: contents;\n }\n\n dialog {\n overflow: hidden;\n /* Do not override the display value here. It will render the dialog even when hidden */\n\n border: none;\n border-radius: var(--md-sys-shape-corner-extra-large);\n background-color: var(--md-sys-color-surface-container-high);\n box-shadow: var(--md-sys-elevation-3);\n color: var(--md-sys-color-on-surface-variant);\n padding: 24px;\n\n max-width: var(--ui-dialog-max-width, 90vw);\n max-height: var(--ui-dialog-max-height, 90vh);\n width: var(--ui-dialog-width, revert);\n height: var(--ui-dialog-height, revert);\n }\n\n dialog:open {\n animation: 250ms cubic-bezier(0.2, 0, 0, 1) show-dialog;\n display: flex;\n flex-direction: column;\n }\n\n /* Positioning for non-modal dialogs */\n dialog.non-modal {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n margin: 0;\n z-index: 1000;\n }\n\n dialog.non-modal:open {\n /* Override the animation transform for non-modal dialogs to account for centering */\n animation: 250ms cubic-bezier(0.2, 0, 0, 1) show-non-modal-dialog;\n }\n\n dialog:open::backdrop {\n animation: 250ms cubic-bezier(0.2, 0, 0, 1) show-backdrop;\n }\n\n .container {\n display: flex;\n flex-direction: column;\n flex: 1;\n overflow: hidden;\n }\n\n .icon {\n display: none;\n }\n\n .icon.with-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 16px;\n }\n\n .icon ::slotted(*) {\n color: var(--md-sys-color-secondary);\n fill: var(--md-sys-color-secondary);\n width: 24px;\n height: 24px;\n }\n\n .icon.destructive ::slotted(*) {\n color: var(--md-sys-color-error);\n fill: var(--md-sys-color-error);\n }\n\n .title {\n display: none;\n color: var(--md-sys-color-on-surface);\n font-family: var(--md-sys-typescale-headline-small-font);\n font-weight: var(--md-sys-typescale-headline-small-weight);\n font-size: var(--md-sys-typescale-headline-small-size);\n letter-spacing: var(--md-sys-typescale-headline-small-tracking);\n line-height: var(--md-sys-typescale-headline-small-height);\n margin: 0;\n padding: 0;\n text-align: center;\n }\n\n .title.with-title {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 16px;\n }\n\n .content {\n overflow: auto;\n font-family: var(--md-sys-typescale-body-medium-font);\n font-weight: var(--md-sys-typescale-body-medium-weight);\n font-size: var(--md-sys-typescale-body-medium-size);\n letter-spacing: var(--md-sys-typescale-body-medium-tracking);\n line-height: var(--md-sys-typescale-body-medium-height);\n }\n\n .buttons {\n display: none;\n display: flex;\n align-items: center;\n justify-content: end;\n }\n\n .buttons.with-buttons {\n margin-top: 24px;\n }\n\n .buttons ::slotted(:not(:last-child)) {\n margin-right: 12px;\n }\n\n .content ::slotted(*) {\n background-color: var(--md-sys-color-surface-container-high);\n }\n\n @keyframes show-dialog {\n from {\n transform: translateY(-110%) scaleY(0);\n }\n to {\n transform: translateY(0%) scaleY(1);\n }\n }\n\n @keyframes show-non-modal-dialog {\n from {\n transform: translate(-50%, -50%) translateY(-110%) scaleY(0);\n }\n to {\n transform: translate(-50%, -50%) translateY(0%) scaleY(1);\n }\n }\n\n @keyframes show-backdrop {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n /* Destructive button styling for dangerous actions */\n .internal-button.destructive {\n --_background-color: var(--md-sys-color-error);\n --_color: var(--md-sys-color-on-error);\n\n /* Override ripple colors for better interaction feedback */\n --md-ripple-hover-state-layer-color: var(--md-sys-color-on-error);\n --md-ripple-focus-state-layer-color: var(--md-sys-color-on-error);\n --md-ripple-pressed-state-layer-color: var(--md-sys-color-on-error);\n }\n`\n"]}