mithril-materialized 2.0.0-beta.3 → 2.0.0-beta.6
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/dist/advanced.css +1888 -0
- package/dist/autocomplete.d.ts +3 -3
- package/dist/breadcrumb.d.ts +53 -0
- package/dist/button.d.ts +10 -10
- package/dist/carousel.d.ts +2 -2
- package/dist/chip.d.ts +2 -2
- package/dist/code-block.d.ts +2 -2
- package/dist/collapsible.d.ts +2 -2
- package/dist/collection.d.ts +2 -2
- package/dist/components.css +2310 -0
- package/dist/core.css +3402 -0
- package/dist/datepicker.d.ts +66 -0
- package/dist/dropdown.d.ts +2 -2
- package/dist/file-upload.d.ts +34 -0
- package/dist/floating-action-button.d.ts +2 -2
- package/dist/forms.css +2284 -0
- package/dist/index.css +1451 -144
- package/dist/index.d.ts +12 -1
- package/dist/index.esm.js +4590 -2612
- package/dist/index.js +4610 -2611
- package/dist/index.min.css +8 -0
- package/dist/index.umd.js +4610 -2611
- package/dist/input-options.d.ts +1 -1
- package/dist/input.d.ts +9 -9
- package/dist/label.d.ts +2 -2
- package/dist/material-box.d.ts +2 -2
- package/dist/modal.d.ts +2 -2
- package/dist/option.d.ts +4 -4
- package/dist/pagination.d.ts +2 -2
- package/dist/parallax.d.ts +2 -2
- package/dist/pickers.css +487 -0
- package/dist/pushpin.d.ts +32 -0
- package/dist/radio.d.ts +4 -4
- package/dist/search-select.d.ts +2 -2
- package/dist/select.d.ts +2 -2
- package/dist/sidenav.d.ts +76 -0
- package/dist/switch.d.ts +2 -2
- package/dist/tabs.d.ts +2 -2
- package/dist/theme-switcher.d.ts +49 -0
- package/dist/timepicker.d.ts +42 -0
- package/dist/toast.d.ts +45 -0
- package/dist/tooltip.d.ts +59 -0
- package/dist/utilities.css +3197 -0
- package/dist/wizard.d.ts +58 -0
- package/package.json +13 -5
- package/sass/components/_breadcrumb.scss +248 -0
- package/sass/components/_buttons.scss +3 -3
- package/sass/components/_collapsible.scss +8 -8
- package/sass/components/_datepicker.scss +45 -14
- package/sass/components/_file-upload.scss +228 -0
- package/sass/components/_global.scss +7 -5
- package/sass/components/_modal.scss +5 -2
- package/sass/components/_navbar.scss +13 -5
- package/sass/components/_sidenav.scss +164 -7
- package/sass/components/_tabs.scss +5 -4
- package/sass/components/_theme-switcher.scss +120 -0
- package/sass/components/_theme-variables.scss +187 -0
- package/sass/components/_timepicker.scss +179 -87
- package/sass/components/_wizard.scss +416 -0
- package/sass/components/forms/_input-fields.scss +34 -12
- package/sass/components/forms/_radio-buttons.scss +10 -10
- package/sass/components/forms/_switches.scss +6 -6
- package/sass/materialize.scss +7 -0
- package/dist/pickers.d.ts +0 -130
package/dist/input-options.d.ts
CHANGED
package/dist/input.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import m, { FactoryComponent, Attributes } from 'mithril';
|
|
2
|
-
import {
|
|
2
|
+
import { InputAttrs } from './input-options';
|
|
3
3
|
/** Character counter component that tracks text length against maxLength */
|
|
4
4
|
export declare const CharacterCounter: FactoryComponent<{
|
|
5
5
|
currentLength: number;
|
|
@@ -7,22 +7,22 @@ export declare const CharacterCounter: FactoryComponent<{
|
|
|
7
7
|
show: boolean;
|
|
8
8
|
}>;
|
|
9
9
|
/** Create a TextArea */
|
|
10
|
-
export declare const TextArea: FactoryComponent<
|
|
10
|
+
export declare const TextArea: FactoryComponent<InputAttrs<string>>;
|
|
11
11
|
export type InputType = 'url' | 'color' | 'text' | 'number' | 'email' | 'range' | 'password';
|
|
12
12
|
/** Component for entering some text */
|
|
13
|
-
export declare const TextInput: m.FactoryComponent<
|
|
13
|
+
export declare const TextInput: m.FactoryComponent<InputAttrs<string>>;
|
|
14
14
|
/** Component for entering a password */
|
|
15
|
-
export declare const PasswordInput: m.FactoryComponent<
|
|
15
|
+
export declare const PasswordInput: m.FactoryComponent<InputAttrs<string>>;
|
|
16
16
|
/** Component for entering a number */
|
|
17
|
-
export declare const NumberInput: m.FactoryComponent<
|
|
17
|
+
export declare const NumberInput: m.FactoryComponent<InputAttrs<number>>;
|
|
18
18
|
/** Component for entering a URL */
|
|
19
|
-
export declare const UrlInput: m.FactoryComponent<
|
|
19
|
+
export declare const UrlInput: m.FactoryComponent<InputAttrs<string>>;
|
|
20
20
|
/** Component for entering a color */
|
|
21
|
-
export declare const ColorInput: m.FactoryComponent<
|
|
21
|
+
export declare const ColorInput: m.FactoryComponent<InputAttrs<string>>;
|
|
22
22
|
/** Component for entering a range */
|
|
23
|
-
export declare const RangeInput: m.FactoryComponent<
|
|
23
|
+
export declare const RangeInput: m.FactoryComponent<InputAttrs<number>>;
|
|
24
24
|
/** Component for entering an email */
|
|
25
|
-
export declare const EmailInput: m.FactoryComponent<
|
|
25
|
+
export declare const EmailInput: m.FactoryComponent<InputAttrs<string>>;
|
|
26
26
|
export interface FileInputAttrs extends Attributes {
|
|
27
27
|
/** Displayed on the button, @default File */
|
|
28
28
|
label?: string;
|
package/dist/label.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FactoryComponent, Component, Attributes } from 'mithril';
|
|
2
2
|
export declare const Mandatory: Component;
|
|
3
|
-
export interface
|
|
3
|
+
export interface LabelAttrs extends Attributes {
|
|
4
4
|
/** Optional title/label */
|
|
5
5
|
label?: string;
|
|
6
6
|
/** Optional ID */
|
|
@@ -11,7 +11,7 @@ export interface LabelAttributes extends Attributes {
|
|
|
11
11
|
isActive?: boolean | string;
|
|
12
12
|
}
|
|
13
13
|
/** Simple label element, used for most components. */
|
|
14
|
-
export declare const Label: FactoryComponent<
|
|
14
|
+
export declare const Label: FactoryComponent<LabelAttrs>;
|
|
15
15
|
export interface HelperTextOptions extends Attributes {
|
|
16
16
|
helperText?: string;
|
|
17
17
|
dataError?: string;
|
package/dist/material-box.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface MaterialBoxOptions {
|
|
|
13
13
|
/** Callback when materialbox closing animation is complete */
|
|
14
14
|
onCloseEnd?: () => void;
|
|
15
15
|
}
|
|
16
|
-
export interface
|
|
16
|
+
export interface MaterialBoxAttrs extends MaterialBoxOptions, Attributes {
|
|
17
17
|
/** Source image path */
|
|
18
18
|
src: string;
|
|
19
19
|
/** Alt text for the image */
|
|
@@ -35,4 +35,4 @@ export interface MaterialBoxAttributes extends MaterialBoxOptions, Attributes {
|
|
|
35
35
|
* Pure TypeScript MaterialBox - creates an image lightbox that fills the screen when clicked
|
|
36
36
|
* No MaterializeCSS dependencies
|
|
37
37
|
*/
|
|
38
|
-
export declare const MaterialBox: FactoryComponent<
|
|
38
|
+
export declare const MaterialBox: FactoryComponent<MaterialBoxAttrs>;
|
package/dist/modal.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export interface ModalState {
|
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
id: string;
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface ModalAttrs extends Attributes {
|
|
7
7
|
id: string;
|
|
8
8
|
title: string;
|
|
9
9
|
description?: string | Vnode<any, any>;
|
|
@@ -38,4 +38,4 @@ export interface ModalAttributes extends Attributes {
|
|
|
38
38
|
* CSS-only Modal Panel component - no JavaScript dependencies
|
|
39
39
|
* Uses modern CSS techniques for modal functionality
|
|
40
40
|
*/
|
|
41
|
-
export declare const ModalPanel: FactoryComponent<
|
|
41
|
+
export declare const ModalPanel: FactoryComponent<ModalAttrs>;
|
package/dist/option.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Vnode, FactoryComponent, Attributes, Component } from 'mithril';
|
|
2
|
-
export interface
|
|
2
|
+
export interface InputCheckboxAttrs extends Attributes {
|
|
3
3
|
/** Optional event handler when a checkbox is clicked */
|
|
4
4
|
onchange?: (checked: boolean) => void;
|
|
5
5
|
/** Label of the checkbox, can be a string or Vnode */
|
|
@@ -12,7 +12,7 @@ export interface InputCheckboxAttributes extends Attributes {
|
|
|
12
12
|
inputId?: string;
|
|
13
13
|
}
|
|
14
14
|
/** Component to show a check box */
|
|
15
|
-
export declare const InputCheckbox: FactoryComponent<
|
|
15
|
+
export declare const InputCheckbox: FactoryComponent<InputCheckboxAttrs>;
|
|
16
16
|
export interface InputOption<T extends string | number> {
|
|
17
17
|
/** Option ID */
|
|
18
18
|
id: T;
|
|
@@ -31,7 +31,7 @@ export interface InputOption<T extends string | number> {
|
|
|
31
31
|
/** Optional description */
|
|
32
32
|
description?: string;
|
|
33
33
|
}
|
|
34
|
-
export interface
|
|
34
|
+
export interface OptionsAttrs<T extends string | number> extends Attributes {
|
|
35
35
|
/** Element ID */
|
|
36
36
|
id?: string;
|
|
37
37
|
/** Optional title or label */
|
|
@@ -58,4 +58,4 @@ export interface OptionsAttributes<T extends string | number> extends Attributes
|
|
|
58
58
|
showSelectAll?: boolean;
|
|
59
59
|
}
|
|
60
60
|
/** A list of checkboxes */
|
|
61
|
-
export declare const Options: <T extends string | number>() => Component<
|
|
61
|
+
export declare const Options: <T extends string | number>() => Component<OptionsAttrs<T>>;
|
package/dist/pagination.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export interface PaginationItem extends Attributes {
|
|
|
3
3
|
href: string;
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface PaginationAttrs extends Attributes {
|
|
7
7
|
/**
|
|
8
8
|
* How many items do we show
|
|
9
9
|
* @default 9 or items.length, whatever is the smallest
|
|
@@ -13,4 +13,4 @@ export interface PaginationAttributes extends Attributes {
|
|
|
13
13
|
curPage?: number;
|
|
14
14
|
items: PaginationItem[];
|
|
15
15
|
}
|
|
16
|
-
export declare const Pagination: FactoryComponent<
|
|
16
|
+
export declare const Pagination: FactoryComponent<PaginationAttrs>;
|
package/dist/parallax.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FactoryComponent, Attributes } from 'mithril';
|
|
2
|
-
export interface
|
|
2
|
+
export interface ParallaxAttrs extends Attributes {
|
|
3
3
|
/** Enable responsive parallax (disable on mobile for performance) */
|
|
4
4
|
responsiveThreshold?: number;
|
|
5
5
|
/** Image source */
|
|
@@ -11,4 +11,4 @@ export interface ParallaxAttributes extends Attributes {
|
|
|
11
11
|
* MaterializeCSS Parallax component with dynamic positioning
|
|
12
12
|
* Port of the original MaterializeCSS parallax logic
|
|
13
13
|
*/
|
|
14
|
-
export declare const Parallax: FactoryComponent<
|
|
14
|
+
export declare const Parallax: FactoryComponent<ParallaxAttrs>;
|
package/dist/pickers.css
ADDED
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
/* Modal */
|
|
2
|
+
.datepicker-modal {
|
|
3
|
+
max-width: 325px;
|
|
4
|
+
min-width: 300px;
|
|
5
|
+
max-height: none;
|
|
6
|
+
overflow: visible;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.datepicker-container.modal-content {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
padding: 0;
|
|
13
|
+
overflow: visible;
|
|
14
|
+
background-color: var(--mm-surface-color, #ffffff);
|
|
15
|
+
color: var(--mm-text-primary, rgba(0, 0, 0, 0.87));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.datepicker-controls {
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
width: 280px;
|
|
22
|
+
margin: 0 auto;
|
|
23
|
+
overflow: visible;
|
|
24
|
+
}
|
|
25
|
+
.datepicker-controls .selects-container {
|
|
26
|
+
display: flex;
|
|
27
|
+
overflow: visible;
|
|
28
|
+
}
|
|
29
|
+
.datepicker-controls .select-wrapper {
|
|
30
|
+
position: relative;
|
|
31
|
+
overflow: visible;
|
|
32
|
+
}
|
|
33
|
+
.datepicker-controls .select-wrapper input {
|
|
34
|
+
border-bottom: none;
|
|
35
|
+
text-align: center;
|
|
36
|
+
margin: 0;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
.datepicker-controls .select-wrapper input:focus {
|
|
40
|
+
border-bottom: none;
|
|
41
|
+
}
|
|
42
|
+
.datepicker-controls .select-wrapper .caret {
|
|
43
|
+
position: absolute;
|
|
44
|
+
right: 0;
|
|
45
|
+
top: 50%;
|
|
46
|
+
transform: translateY(-50%);
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
width: 16px;
|
|
49
|
+
height: 16px;
|
|
50
|
+
fill: var(--mm-text-secondary, rgba(0, 0, 0, 0.54));
|
|
51
|
+
}
|
|
52
|
+
.datepicker-controls .select-wrapper .dropdown-content {
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 100%;
|
|
55
|
+
left: 0;
|
|
56
|
+
right: 0;
|
|
57
|
+
background-color: var(--mm-surface-color, white);
|
|
58
|
+
box-shadow: 0 4px 20px var(--mm-shadow-color, rgba(0, 0, 0, 0.3));
|
|
59
|
+
z-index: 20000;
|
|
60
|
+
border: 1px solid var(--mm-border-color, #ddd);
|
|
61
|
+
border-radius: 2px;
|
|
62
|
+
display: block;
|
|
63
|
+
opacity: 1;
|
|
64
|
+
}
|
|
65
|
+
.datepicker-controls .select-wrapper .dropdown-content .dropdown-item {
|
|
66
|
+
padding: 8px 16px;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
transition: background-color 0.2s;
|
|
70
|
+
}
|
|
71
|
+
.datepicker-controls .select-wrapper .dropdown-content .dropdown-item:hover {
|
|
72
|
+
background-color: var(--mm-border-color, #f5f5f5);
|
|
73
|
+
}
|
|
74
|
+
.datepicker-controls .select-wrapper .dropdown-content .dropdown-item.selected {
|
|
75
|
+
background-color: var(--mm-border-color, #f5f5f5);
|
|
76
|
+
}
|
|
77
|
+
.datepicker-controls .select-year input {
|
|
78
|
+
width: 50px;
|
|
79
|
+
}
|
|
80
|
+
.datepicker-controls .select-year .dropdown-content {
|
|
81
|
+
max-height: 60vh;
|
|
82
|
+
overflow-y: auto;
|
|
83
|
+
}
|
|
84
|
+
.datepicker-controls .select-month input {
|
|
85
|
+
width: 80px;
|
|
86
|
+
}
|
|
87
|
+
.datepicker-controls .select-month .dropdown-content {
|
|
88
|
+
width: auto;
|
|
89
|
+
min-width: 120px;
|
|
90
|
+
left: auto;
|
|
91
|
+
right: 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.month-prev, .month-next {
|
|
95
|
+
margin-top: 4px;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
background-color: transparent;
|
|
98
|
+
border: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Date Display */
|
|
102
|
+
.datepicker-date-display {
|
|
103
|
+
flex: 1 auto;
|
|
104
|
+
background-color: #26a69a;
|
|
105
|
+
color: #fff;
|
|
106
|
+
padding: 20px 22px;
|
|
107
|
+
font-weight: 500;
|
|
108
|
+
}
|
|
109
|
+
.datepicker-date-display .year-text {
|
|
110
|
+
display: block;
|
|
111
|
+
font-size: 1.5rem;
|
|
112
|
+
line-height: 25px;
|
|
113
|
+
color: rgba(255, 255, 255, 0.7);
|
|
114
|
+
}
|
|
115
|
+
.datepicker-date-display .date-text {
|
|
116
|
+
display: block;
|
|
117
|
+
font-size: 2.8rem;
|
|
118
|
+
line-height: 47px;
|
|
119
|
+
font-weight: 500;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* Calendar */
|
|
123
|
+
.datepicker-calendar-container {
|
|
124
|
+
flex: 2.5 auto;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.datepicker-table {
|
|
128
|
+
width: 280px;
|
|
129
|
+
font-size: 1rem;
|
|
130
|
+
margin: 0 auto;
|
|
131
|
+
}
|
|
132
|
+
.datepicker-table.with-week-numbers {
|
|
133
|
+
width: 310px;
|
|
134
|
+
}
|
|
135
|
+
.datepicker-table thead {
|
|
136
|
+
border-bottom: none;
|
|
137
|
+
}
|
|
138
|
+
.datepicker-table th {
|
|
139
|
+
padding: 10px 5px;
|
|
140
|
+
text-align: center;
|
|
141
|
+
}
|
|
142
|
+
.datepicker-table th.datepicker-week-header {
|
|
143
|
+
color: var(--mm-text-hint, rgba(0, 0, 0, 0.38));
|
|
144
|
+
font-size: 0.8rem;
|
|
145
|
+
font-weight: 600;
|
|
146
|
+
width: 30px;
|
|
147
|
+
padding: 10px 2px;
|
|
148
|
+
}
|
|
149
|
+
.datepicker-table tr {
|
|
150
|
+
border: none;
|
|
151
|
+
}
|
|
152
|
+
.datepicker-table abbr {
|
|
153
|
+
text-decoration: none;
|
|
154
|
+
color: var(--mm-text-secondary, rgba(0, 0, 0, 0.54));
|
|
155
|
+
}
|
|
156
|
+
.datepicker-table td {
|
|
157
|
+
border-radius: 50%;
|
|
158
|
+
padding: 0;
|
|
159
|
+
}
|
|
160
|
+
.datepicker-table td.is-today {
|
|
161
|
+
color: var(--mm-primary-color, #26a69a);
|
|
162
|
+
}
|
|
163
|
+
.datepicker-table td.is-selected {
|
|
164
|
+
background-color: var(--mm-primary-color, #26a69a);
|
|
165
|
+
color: var(--mm-button-text, #fff);
|
|
166
|
+
}
|
|
167
|
+
.datepicker-table td.is-outside-current-month, .datepicker-table td.is-disabled {
|
|
168
|
+
color: var(--mm-text-disabled, rgba(0, 0, 0, 0.3));
|
|
169
|
+
pointer-events: none;
|
|
170
|
+
}
|
|
171
|
+
.datepicker-table td.datepicker-week-number {
|
|
172
|
+
color: var(--mm-text-hint, rgba(0, 0, 0, 0.38));
|
|
173
|
+
font-size: 0.8rem;
|
|
174
|
+
font-weight: 600;
|
|
175
|
+
text-align: center;
|
|
176
|
+
vertical-align: middle;
|
|
177
|
+
border-radius: 0;
|
|
178
|
+
width: 30px;
|
|
179
|
+
padding: 5px 2px;
|
|
180
|
+
background-color: var(--mm-border-color, rgba(0, 0, 0, 0.02));
|
|
181
|
+
border-right: 1px solid var(--mm-border-color, rgba(0, 0, 0, 0.05));
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.datepicker-day-button {
|
|
185
|
+
background-color: transparent;
|
|
186
|
+
border: none;
|
|
187
|
+
line-height: 38px;
|
|
188
|
+
display: block;
|
|
189
|
+
width: 100%;
|
|
190
|
+
border-radius: 50%;
|
|
191
|
+
padding: 0 5px;
|
|
192
|
+
cursor: pointer;
|
|
193
|
+
color: inherit;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* Footer */
|
|
197
|
+
.datepicker-footer {
|
|
198
|
+
width: 280px;
|
|
199
|
+
margin: 0 auto;
|
|
200
|
+
padding-bottom: 5px;
|
|
201
|
+
display: flex;
|
|
202
|
+
justify-content: space-between;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.datepicker-cancel,
|
|
206
|
+
.datepicker-clear,
|
|
207
|
+
.datepicker-today,
|
|
208
|
+
.datepicker-done {
|
|
209
|
+
color: #26a69a;
|
|
210
|
+
padding: 0 1rem;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.datepicker-clear {
|
|
214
|
+
color: #f44336;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* Media Queries */
|
|
218
|
+
@media only screen and (min-width: 601px) {
|
|
219
|
+
.datepicker-modal {
|
|
220
|
+
max-width: 625px;
|
|
221
|
+
}
|
|
222
|
+
.datepicker-container.modal-content {
|
|
223
|
+
flex-direction: row;
|
|
224
|
+
}
|
|
225
|
+
.datepicker-date-display {
|
|
226
|
+
flex: 0 1 270px;
|
|
227
|
+
}
|
|
228
|
+
.datepicker-controls,
|
|
229
|
+
.datepicker-table,
|
|
230
|
+
.datepicker-footer {
|
|
231
|
+
width: 320px;
|
|
232
|
+
}
|
|
233
|
+
.datepicker-table.with-week-numbers {
|
|
234
|
+
width: 350px;
|
|
235
|
+
}
|
|
236
|
+
.datepicker-day-button {
|
|
237
|
+
line-height: 44px;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
/* Enhanced TimePicker Styles */
|
|
241
|
+
.input-field.timepicker input[disabled] {
|
|
242
|
+
cursor: not-allowed;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.timepicker-actions {
|
|
246
|
+
display: flex;
|
|
247
|
+
gap: 8px;
|
|
248
|
+
margin-top: 4px;
|
|
249
|
+
font-size: 12px;
|
|
250
|
+
}
|
|
251
|
+
.timepicker-actions .btn-flat {
|
|
252
|
+
padding: 2px 8px;
|
|
253
|
+
min-width: auto;
|
|
254
|
+
height: 24px;
|
|
255
|
+
line-height: 20px;
|
|
256
|
+
font-size: 11px;
|
|
257
|
+
text-transform: none;
|
|
258
|
+
}
|
|
259
|
+
.timepicker-actions .btn-flat i.material-icons {
|
|
260
|
+
font-size: 14px;
|
|
261
|
+
margin-right: 4px;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.inline-time-controls {
|
|
265
|
+
display: flex;
|
|
266
|
+
align-items: center;
|
|
267
|
+
gap: 8px;
|
|
268
|
+
margin-top: 8px;
|
|
269
|
+
padding: 12px;
|
|
270
|
+
background-color: var(--mm-border-color, #f5f5f5);
|
|
271
|
+
border-radius: 4px;
|
|
272
|
+
font-size: 14px;
|
|
273
|
+
}
|
|
274
|
+
.inline-time-controls .time-controls-12h {
|
|
275
|
+
display: flex;
|
|
276
|
+
align-items: center;
|
|
277
|
+
gap: 4px;
|
|
278
|
+
}
|
|
279
|
+
.inline-time-controls .time-controls-12h input[type=number] {
|
|
280
|
+
width: 50px;
|
|
281
|
+
text-align: center;
|
|
282
|
+
padding: 4px;
|
|
283
|
+
border: 1px solid var(--mm-border-color, #ccc);
|
|
284
|
+
border-radius: 4px;
|
|
285
|
+
}
|
|
286
|
+
.inline-time-controls .time-controls-12h select {
|
|
287
|
+
padding: 4px;
|
|
288
|
+
border: 1px solid var(--mm-border-color, #ccc);
|
|
289
|
+
border-radius: 4px;
|
|
290
|
+
margin-left: 4px;
|
|
291
|
+
}
|
|
292
|
+
.inline-time-controls input[type=time] {
|
|
293
|
+
font-size: 16px;
|
|
294
|
+
padding: 4px 8px;
|
|
295
|
+
border: 1px solid var(--mm-border-color, #ccc);
|
|
296
|
+
border-radius: 4px;
|
|
297
|
+
min-width: 120px;
|
|
298
|
+
}
|
|
299
|
+
.inline-time-controls .btn-flat {
|
|
300
|
+
padding: 4px 8px;
|
|
301
|
+
font-size: 11px;
|
|
302
|
+
background-color: var(--mm-border-color, #e0e0e0);
|
|
303
|
+
border-radius: 4px;
|
|
304
|
+
min-width: auto;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/* Timepicker Containers */
|
|
308
|
+
.timepicker-modal {
|
|
309
|
+
max-width: 325px;
|
|
310
|
+
max-height: none;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.timepicker-container.modal-content {
|
|
314
|
+
display: flex;
|
|
315
|
+
flex-direction: column;
|
|
316
|
+
padding: 0;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.text-primary {
|
|
320
|
+
color: rgb(255, 255, 255);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/* Clock Digital Display */
|
|
324
|
+
.timepicker-digital-display {
|
|
325
|
+
flex: 1 auto;
|
|
326
|
+
background-color: #26a69a;
|
|
327
|
+
padding: 10px;
|
|
328
|
+
font-weight: 300;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.timepicker-text-container {
|
|
332
|
+
font-size: 4rem;
|
|
333
|
+
font-weight: bold;
|
|
334
|
+
text-align: center;
|
|
335
|
+
color: rgba(255, 255, 255, 0.6);
|
|
336
|
+
font-weight: 400;
|
|
337
|
+
position: relative;
|
|
338
|
+
user-select: none;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.timepicker-span-hours,
|
|
342
|
+
.timepicker-span-minutes,
|
|
343
|
+
.timepicker-span-am-pm div {
|
|
344
|
+
cursor: pointer;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.timepicker-span-hours {
|
|
348
|
+
margin-right: 3px;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.timepicker-span-minutes {
|
|
352
|
+
margin-left: 3px;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.timepicker-display-am-pm {
|
|
356
|
+
font-size: 1.3rem;
|
|
357
|
+
position: absolute;
|
|
358
|
+
right: 1rem;
|
|
359
|
+
bottom: 1rem;
|
|
360
|
+
font-weight: 400;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/* Analog Clock Display */
|
|
364
|
+
.timepicker-analog-display {
|
|
365
|
+
flex: 2.5 auto;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.timepicker-plate {
|
|
369
|
+
background-color: #eee;
|
|
370
|
+
border-radius: 50%;
|
|
371
|
+
width: 270px;
|
|
372
|
+
height: 270px;
|
|
373
|
+
overflow: visible;
|
|
374
|
+
position: relative;
|
|
375
|
+
margin: auto;
|
|
376
|
+
margin-top: 25px;
|
|
377
|
+
margin-bottom: 5px;
|
|
378
|
+
user-select: none;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.timepicker-canvas,
|
|
382
|
+
.timepicker-dial {
|
|
383
|
+
position: absolute;
|
|
384
|
+
left: 0;
|
|
385
|
+
right: 0;
|
|
386
|
+
top: 0;
|
|
387
|
+
bottom: 0;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.timepicker-minutes {
|
|
391
|
+
visibility: hidden;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.timepicker-tick {
|
|
395
|
+
border-radius: 50%;
|
|
396
|
+
color: rgba(0, 0, 0, 0.87);
|
|
397
|
+
line-height: 40px;
|
|
398
|
+
text-align: center;
|
|
399
|
+
width: 40px;
|
|
400
|
+
height: 40px;
|
|
401
|
+
position: absolute;
|
|
402
|
+
cursor: pointer;
|
|
403
|
+
font-size: 15px;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.timepicker-tick.active,
|
|
407
|
+
.timepicker-tick:hover {
|
|
408
|
+
background-color: rgba(38, 166, 154, 0.25);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.timepicker-dial {
|
|
412
|
+
transition: transform 350ms, opacity 350ms;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.timepicker-dial-out {
|
|
416
|
+
opacity: 0;
|
|
417
|
+
}
|
|
418
|
+
.timepicker-dial-out.timepicker-hours {
|
|
419
|
+
transform: scale(1.1, 1.1);
|
|
420
|
+
}
|
|
421
|
+
.timepicker-dial-out.timepicker-minutes {
|
|
422
|
+
transform: scale(0.8, 0.8);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.timepicker-canvas {
|
|
426
|
+
transition: opacity 175ms;
|
|
427
|
+
}
|
|
428
|
+
.timepicker-canvas line {
|
|
429
|
+
stroke: #26a69a;
|
|
430
|
+
stroke-width: 4;
|
|
431
|
+
stroke-linecap: round;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.timepicker-canvas-out {
|
|
435
|
+
opacity: 0.25;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.timepicker-canvas-bearing {
|
|
439
|
+
stroke: none;
|
|
440
|
+
fill: #26a69a;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.timepicker-canvas-bg {
|
|
444
|
+
stroke: none;
|
|
445
|
+
fill: #26a69a;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/* Footer */
|
|
449
|
+
.timepicker-footer {
|
|
450
|
+
margin: 0 auto;
|
|
451
|
+
padding: 5px 1rem;
|
|
452
|
+
display: flex;
|
|
453
|
+
justify-content: space-between;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.timepicker-clear {
|
|
457
|
+
color: #F44336;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.timepicker-close {
|
|
461
|
+
color: #26a69a;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.timepicker-clear,
|
|
465
|
+
.timepicker-close {
|
|
466
|
+
padding: 0 20px;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/* Media Queries */
|
|
470
|
+
@media only screen and (min-width : 601px) {
|
|
471
|
+
.timepicker-modal {
|
|
472
|
+
max-width: 600px;
|
|
473
|
+
}
|
|
474
|
+
.timepicker-container.modal-content {
|
|
475
|
+
flex-direction: row;
|
|
476
|
+
}
|
|
477
|
+
.timepicker-text-container {
|
|
478
|
+
top: 32%;
|
|
479
|
+
}
|
|
480
|
+
.timepicker-display-am-pm {
|
|
481
|
+
position: relative;
|
|
482
|
+
right: auto;
|
|
483
|
+
bottom: auto;
|
|
484
|
+
text-align: center;
|
|
485
|
+
margin-top: 1.2rem;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FactoryComponent, Attributes } from 'mithril';
|
|
2
|
+
export interface PushpinOptions {
|
|
3
|
+
/** Distance from top of page where element becomes fixed */
|
|
4
|
+
top?: number;
|
|
5
|
+
/** Distance from bottom of page where element stops being fixed */
|
|
6
|
+
bottom?: number;
|
|
7
|
+
/** Offset for calculations */
|
|
8
|
+
offset?: number;
|
|
9
|
+
/** Called when pushpin position changes */
|
|
10
|
+
onPositionChange?: (position: 'pin-top' | 'pinned' | 'pin-bottom') => void;
|
|
11
|
+
}
|
|
12
|
+
export declare class Pushpin {
|
|
13
|
+
el: HTMLElement;
|
|
14
|
+
options: Required<PushpinOptions>;
|
|
15
|
+
private state;
|
|
16
|
+
private static defaults;
|
|
17
|
+
private _updateElementPositionBound;
|
|
18
|
+
constructor(el: HTMLElement, options?: PushpinOptions);
|
|
19
|
+
static getInstance(el: HTMLElement): Pushpin | undefined;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
_setupEventHandlers(): void;
|
|
22
|
+
_removeEventHandlers(): void;
|
|
23
|
+
_updateElementPosition(): void;
|
|
24
|
+
_removePinClasses(): void;
|
|
25
|
+
_updatePosition(): void;
|
|
26
|
+
}
|
|
27
|
+
export interface PushpinAttrs extends Attributes, PushpinOptions {
|
|
28
|
+
/** Element selector or reference to attach pushpin to */
|
|
29
|
+
targetSelector?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const PushpinComponent: FactoryComponent<PushpinAttrs>;
|
|
32
|
+
export declare const initPushpins: (selector?: string, options?: PushpinOptions) => Pushpin[];
|
package/dist/radio.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Attributes, Component } from 'mithril';
|
|
2
2
|
import { InputOption } from './option';
|
|
3
|
-
export interface
|
|
3
|
+
export interface RadioButtonsAttrs<T extends string | number> extends Attributes {
|
|
4
4
|
/** Element ID */
|
|
5
5
|
id?: string;
|
|
6
6
|
/** Optional title or label */
|
|
@@ -26,7 +26,7 @@ export interface RadioButtonsAttributes<T extends string | number> extends Attri
|
|
|
26
26
|
/** Layout for the options: 'vertical' (default) or 'horizontal' */
|
|
27
27
|
layout?: 'vertical' | 'horizontal';
|
|
28
28
|
}
|
|
29
|
-
export interface
|
|
29
|
+
export interface RadioButtonAttrs<T extends string | number> extends Attributes {
|
|
30
30
|
id: T;
|
|
31
31
|
checked?: boolean;
|
|
32
32
|
onchange: (id: T) => void;
|
|
@@ -36,6 +36,6 @@ export interface RadioButtonAttributes<T extends string | number> extends Attrib
|
|
|
36
36
|
/** Optional input id for the radio button */
|
|
37
37
|
inputId?: string;
|
|
38
38
|
}
|
|
39
|
-
export declare const RadioButton: <T extends string | number>() => Component<
|
|
39
|
+
export declare const RadioButton: <T extends string | number>() => Component<RadioButtonAttrs<T>>;
|
|
40
40
|
/** Component to show a list of radio buttons, from which you can choose one. */
|
|
41
|
-
export declare const RadioButtons: <T extends string | number>() => Component<
|
|
41
|
+
export declare const RadioButtons: <T extends string | number>() => Component<RadioButtonsAttrs<T>>;
|