@expressivecss/expressive 0.3.0 → 0.4.0
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/README.md +1 -1
- package/dist/css/expressive.css +1011 -1339
- package/dist/css/expressive.css.map +1 -1
- package/dist/css/expressive.min.css +1 -1
- package/dist/css/expressive.min.css.map +1 -1
- package/dist/js/expressive.cjs +701 -853
- package/dist/js/expressive.cjs.map +4 -4
- package/dist/js/expressive.js +701 -853
- package/dist/js/expressive.js.map +4 -4
- package/dist/js/expressive.min.js +10 -20
- package/dist/js/expressive.min.js.map +4 -4
- package/dist/js/expressive.mjs +701 -854
- package/dist/js/expressive.mjs.map +4 -4
- package/dist/types/components/autocomplete.d.ts +2 -9
- package/dist/types/components/buttons.d.ts +2 -2
- package/dist/types/components/cards.d.ts +3 -6
- package/dist/types/components/carousel.d.ts +3 -3
- package/dist/types/components/characterCounter.d.ts +3 -5
- package/dist/types/components/chips.d.ts +2 -2
- package/dist/types/components/collapsible.d.ts +6 -23
- package/dist/types/components/datepicker.d.ts +2 -8
- package/dist/types/components/dropdown.d.ts +11 -2
- package/dist/types/components/index.d.ts +0 -1
- package/dist/types/components/lightbox.d.ts +2 -2
- package/dist/types/components/parallax.d.ts +2 -8
- package/dist/types/components/pushpin.d.ts +2 -2
- package/dist/types/components/range.d.ts +2 -2
- package/dist/types/components/registry.d.ts +0 -4
- package/dist/types/components/scrollspy.d.ts +26 -50
- package/dist/types/components/select.d.ts +20 -6
- package/dist/types/components/sidenav.d.ts +40 -55
- package/dist/types/components/slider.d.ts +2 -2
- package/dist/types/components/tabs.d.ts +2 -2
- package/dist/types/components/tapTarget.d.ts +2 -2
- package/dist/types/components/timepicker.d.ts +2 -4
- package/dist/types/components/tooltip.d.ts +2 -2
- package/dist/types/core/component.d.ts +4 -4
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/sass/README.md +2 -6
- package/src/sass/abstracts/_breakpoints.scss +0 -16
- package/src/sass/abstracts/_variables.scss +0 -21
- package/src/sass/base/_grid.scss +0 -19
- package/src/sass/components/_badges.scss +1 -1
- package/src/sass/components/_buttons.scss +22 -54
- package/src/sass/components/_cards.scss +50 -123
- package/src/sass/components/_carousel.scss +4 -6
- package/src/sass/components/_collapsible.scss +13 -15
- package/src/sass/components/_collection.scss +9 -27
- package/src/sass/components/_datepicker.scss +1 -15
- package/src/sass/components/_dropdown.scss +110 -14
- package/src/sass/components/_index.scss +1 -0
- package/src/sass/components/_modal.scss +13 -31
- package/src/sass/components/_navbar.scss +9 -6
- package/src/sass/components/_page-footer.scss +134 -15
- package/src/sass/components/_parallax.scss +7 -28
- package/src/sass/components/_preloader.scss +145 -300
- package/src/sass/components/_scrollspy.scss +18 -0
- package/src/sass/components/_sidenav.scss +226 -120
- package/src/sass/components/_table_of_contents.scss +30 -14
- package/src/sass/components/_tabs.scss +54 -35
- package/src/sass/components/_tapTarget.scss +2 -6
- package/src/sass/components/_toast.scss +10 -11
- package/src/sass/components/_toolbar.scss +2 -2
- package/src/sass/components/_tooltip.scss +4 -9
- package/src/sass/components/_transitions.scss +0 -5
- package/src/sass/components/forms/_index.scss +0 -5
- package/src/sass/components/forms/_input-fields.scss +49 -52
- package/src/sass/components/forms/_select.scss +175 -60
- package/src/sass/components/forms/_switches.scss +21 -8
- package/src/sass/utilities/_helpers.scss +1 -3
- package/src/sass/utilities/_typescale.scss +0 -5
- package/src/sass/utilities/_visibility.scss +2 -2
- package/dist/types/components/modal.d.ts +0 -45
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, BaseOptions, InitElements,
|
|
1
|
+
import { Component, BaseOptions, InitElements, InitElement, Openable } from '../core/component';
|
|
2
2
|
export interface SidenavOptions extends BaseOptions {
|
|
3
3
|
/**
|
|
4
4
|
* Side of screen on which Sidenav appears.
|
|
@@ -15,21 +15,6 @@ export interface SidenavOptions extends BaseOptions {
|
|
|
15
15
|
* @default '10px'
|
|
16
16
|
*/
|
|
17
17
|
dragTargetWidth: string;
|
|
18
|
-
/**
|
|
19
|
-
* Length in ms of enter transition.
|
|
20
|
-
* @default 250
|
|
21
|
-
*/
|
|
22
|
-
inDuration: number;
|
|
23
|
-
/**
|
|
24
|
-
* Length in ms of exit transition.
|
|
25
|
-
* @default 200
|
|
26
|
-
*/
|
|
27
|
-
outDuration: number;
|
|
28
|
-
/**
|
|
29
|
-
* Prevent page from scrolling while sidenav is open.
|
|
30
|
-
* @default true
|
|
31
|
-
*/
|
|
32
|
-
preventScrolling: boolean;
|
|
33
18
|
/**
|
|
34
19
|
* Function called when sidenav starts entering.
|
|
35
20
|
*/
|
|
@@ -47,27 +32,30 @@ export interface SidenavOptions extends BaseOptions {
|
|
|
47
32
|
*/
|
|
48
33
|
onCloseEnd: (elem: HTMLElement) => void;
|
|
49
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Navigation drawer. Overlay is a modal <dialog>; fixed is a breakpoint.
|
|
37
|
+
* JS opens/closes, handles the trigger, and writes --md-comp-nav-drawer-shift
|
|
38
|
+
* while dragging. CSS owns the slide, the scrim, and the large-screen dock.
|
|
39
|
+
*/
|
|
50
40
|
export declare class Sidenav extends Component<SidenavOptions> implements Openable {
|
|
51
41
|
id: string;
|
|
52
|
-
/** Describes open/close state of
|
|
42
|
+
/** Describes open/close state of the overlay drawer. */
|
|
53
43
|
isOpen: boolean;
|
|
54
|
-
/** Describes if sidenav
|
|
44
|
+
/** Describes if sidenav has sidenav-fixed. */
|
|
55
45
|
isFixed: boolean;
|
|
56
46
|
/** Describes if Sidenav is being dragged. */
|
|
57
47
|
isDragged: boolean;
|
|
58
|
-
lastWindowWidth: number;
|
|
59
|
-
lastWindowHeight: number;
|
|
60
48
|
static _sidenavs: Sidenav[];
|
|
61
|
-
|
|
62
|
-
|
|
49
|
+
dragTarget: HTMLElement | null;
|
|
50
|
+
private _dialog;
|
|
51
|
+
private _createdDialog;
|
|
52
|
+
private _closing;
|
|
53
|
+
private _mql;
|
|
63
54
|
private _startingXpos;
|
|
64
55
|
private _xPos;
|
|
65
|
-
private _time;
|
|
66
56
|
private _width;
|
|
67
57
|
private _initialScrollTop;
|
|
68
58
|
private _verticallyScrolling;
|
|
69
|
-
private deltaX;
|
|
70
|
-
private velocityX;
|
|
71
59
|
private percentOpen;
|
|
72
60
|
constructor(el: HTMLElement, options: Partial<SidenavOptions>);
|
|
73
61
|
static get defaults(): SidenavOptions;
|
|
@@ -82,44 +70,41 @@ export declare class Sidenav extends Component<SidenavOptions> implements Openab
|
|
|
82
70
|
* @param els HTML elements.
|
|
83
71
|
* @param options Component options.
|
|
84
72
|
*/
|
|
85
|
-
static init(els: InitElements<
|
|
73
|
+
static init(els: InitElements<InitElement>, options?: Partial<SidenavOptions>): Sidenav[];
|
|
86
74
|
static getInstance(el: HTMLElement): Sidenav;
|
|
87
75
|
destroy(): void;
|
|
88
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Opens the overlay drawer. No-op while the sidenav is docked
|
|
78
|
+
* (sidenav-fixed at the large breakpoint).
|
|
79
|
+
*/
|
|
80
|
+
open: () => void;
|
|
81
|
+
/**
|
|
82
|
+
* Closes the overlay drawer. No-op while the sidenav is docked.
|
|
83
|
+
*/
|
|
84
|
+
close: () => void;
|
|
85
|
+
private _beginClose;
|
|
86
|
+
private _finishClose;
|
|
87
|
+
private _onDialogClose;
|
|
88
|
+
private _onBreakpointChange;
|
|
89
|
+
private _setupDialog;
|
|
90
|
+
private _unwrapDialog;
|
|
91
|
+
private _createDragTarget;
|
|
92
|
+
private _removeDragTarget;
|
|
93
|
+
private _setupClasses;
|
|
89
94
|
private _setupEventHandlers;
|
|
90
95
|
private _removeEventHandlers;
|
|
91
|
-
private _handleTriggerClick;
|
|
96
|
+
private static _handleTriggerClick;
|
|
97
|
+
private _handleCloseTriggerClick;
|
|
98
|
+
private _isDraggable;
|
|
99
|
+
private _isCurrentlyFixed;
|
|
92
100
|
private _startDrag;
|
|
93
101
|
private _dragMoveUpdate;
|
|
102
|
+
private _rawDelta;
|
|
103
|
+
private _applyShift;
|
|
104
|
+
private _clearShift;
|
|
94
105
|
private _handleDragTargetDrag;
|
|
95
106
|
private _handleDragTargetRelease;
|
|
96
107
|
private _handleCloseDrag;
|
|
97
|
-
private _calculateDelta;
|
|
98
108
|
private _handleCloseRelease;
|
|
99
|
-
private
|
|
100
|
-
private _handleWindowResize;
|
|
101
|
-
private _setupClasses;
|
|
102
|
-
private _removeClasses;
|
|
103
|
-
private _setupFixed;
|
|
104
|
-
private _isDraggable;
|
|
105
|
-
private _isCurrentlyFixed;
|
|
106
|
-
private _createDragTarget;
|
|
107
|
-
private _preventBodyScrolling;
|
|
108
|
-
private _enableBodyScrolling;
|
|
109
|
-
/**
|
|
110
|
-
* Opens Sidenav.
|
|
111
|
-
*/
|
|
112
|
-
open: () => void;
|
|
113
|
-
/**
|
|
114
|
-
* Closes Sidenav.
|
|
115
|
-
*/
|
|
116
|
-
close: () => void;
|
|
117
|
-
private _animateIn;
|
|
118
|
-
private _animateOut;
|
|
119
|
-
private _animateSidenavIn;
|
|
120
|
-
private _animateSidenavOut;
|
|
121
|
-
private _animateOverlayIn;
|
|
122
|
-
private _animateOverlayOut;
|
|
123
|
-
private _setAriaHidden;
|
|
124
|
-
private _setTabIndex;
|
|
109
|
+
private _syncTriggers;
|
|
125
110
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, BaseOptions, InitElements,
|
|
1
|
+
import { Component, BaseOptions, InitElements, InitElement } from '../core/component';
|
|
2
2
|
export interface SliderOptions extends BaseOptions {
|
|
3
3
|
/**
|
|
4
4
|
* Set to false to hide slide indicators.
|
|
@@ -65,7 +65,7 @@ export declare class Slider extends Component<SliderOptions> {
|
|
|
65
65
|
* @param els HTML elements.
|
|
66
66
|
* @param options Component options.
|
|
67
67
|
*/
|
|
68
|
-
static init(els: InitElements<
|
|
68
|
+
static init(els: InitElements<InitElement>, options?: Partial<SliderOptions>): Slider[];
|
|
69
69
|
static getInstance(el: HTMLElement): Slider;
|
|
70
70
|
destroy(): void;
|
|
71
71
|
private _setupEventHandlers;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Carousel } from './carousel';
|
|
2
|
-
import { Component, BaseOptions, InitElements,
|
|
2
|
+
import { Component, BaseOptions, InitElements, InitElement } from '../core/component';
|
|
3
3
|
export interface TabsOptions extends BaseOptions {
|
|
4
4
|
/**
|
|
5
5
|
* Transition duration in milliseconds.
|
|
@@ -46,7 +46,7 @@ export declare class Tabs extends Component<TabsOptions> {
|
|
|
46
46
|
* @param els HTML elements.
|
|
47
47
|
* @param options Component options.
|
|
48
48
|
*/
|
|
49
|
-
static init(els: InitElements<
|
|
49
|
+
static init(els: InitElements<InitElement>, options?: Partial<TabsOptions>): Tabs[];
|
|
50
50
|
static getInstance(el: HTMLElement): Tabs;
|
|
51
51
|
destroy(): void;
|
|
52
52
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, BaseOptions, InitElements,
|
|
1
|
+
import { Component, BaseOptions, InitElements, InitElement, Openable } from '../core/component';
|
|
2
2
|
export interface TapTargetOptions extends BaseOptions {
|
|
3
3
|
/**
|
|
4
4
|
* Callback function called when Tap Target is opened.
|
|
@@ -31,7 +31,7 @@ export declare class TapTarget extends Component<TapTargetOptions> implements Op
|
|
|
31
31
|
constructor(el: HTMLElement, options: Partial<TapTargetOptions>);
|
|
32
32
|
static get defaults(): TapTargetOptions;
|
|
33
33
|
static init(el: HTMLElement, options?: Partial<TapTargetOptions>): TapTarget;
|
|
34
|
-
static init(els: InitElements<
|
|
34
|
+
static init(els: InitElements<InitElement>, options?: Partial<TapTargetOptions>): TapTarget[];
|
|
35
35
|
static getInstance(el: HTMLElement): TapTarget;
|
|
36
36
|
destroy(): void;
|
|
37
37
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, BaseOptions, InitElements,
|
|
1
|
+
import { Component, BaseOptions, InitElements, InitElement, I18nOptions } from '../core/component';
|
|
2
2
|
export type Views = 'hours' | 'minutes';
|
|
3
3
|
export interface TimepickerOptions extends BaseOptions {
|
|
4
4
|
/**
|
|
@@ -158,7 +158,7 @@ export declare class Timepicker extends Component<TimepickerOptions> {
|
|
|
158
158
|
* @param els HTML elements.
|
|
159
159
|
* @param options Component options.
|
|
160
160
|
*/
|
|
161
|
-
static init(els: InitElements<HTMLInputElement |
|
|
161
|
+
static init(els: InitElements<HTMLInputElement | InitElement>, options?: Partial<TimepickerOptions>): Timepicker[];
|
|
162
162
|
static _addLeadingZero(num: number): string;
|
|
163
163
|
static _createSVGEl(name: string): SVGElement;
|
|
164
164
|
static _Pos(e: TouchEvent | MouseEvent): Point;
|
|
@@ -209,7 +209,5 @@ export declare class Timepicker extends Component<TimepickerOptions> {
|
|
|
209
209
|
confirm: () => void;
|
|
210
210
|
cancel: () => void;
|
|
211
211
|
clear: () => void;
|
|
212
|
-
open(): this;
|
|
213
|
-
close(): this;
|
|
214
212
|
}
|
|
215
213
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, BaseOptions, InitElements,
|
|
1
|
+
import { Component, BaseOptions, InitElements, InitElement } from '../core/component';
|
|
2
2
|
export type TooltipPosition = 'top' | 'right' | 'bottom' | 'left';
|
|
3
3
|
export interface TooltipOptions extends BaseOptions {
|
|
4
4
|
/**
|
|
@@ -84,7 +84,7 @@ export declare class Tooltip extends Component<TooltipOptions> {
|
|
|
84
84
|
* @param els HTML elements.
|
|
85
85
|
* @param options Component options.
|
|
86
86
|
*/
|
|
87
|
-
static init(els: InitElements<
|
|
87
|
+
static init(els: InitElements<InitElement>, options?: Partial<TooltipOptions>): Tooltip[];
|
|
88
88
|
static getInstance(el: HTMLElement): Tooltip;
|
|
89
89
|
destroy(): void;
|
|
90
90
|
_appendTooltipEl(): void;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface BaseOptions {
|
|
5
5
|
}
|
|
6
|
-
export type
|
|
7
|
-
export type InitElements<T extends
|
|
6
|
+
export type InitElement = HTMLElement | Element;
|
|
7
|
+
export type InitElements<T extends InitElement> = NodeListOf<T> | HTMLCollectionOf<T>;
|
|
8
8
|
type ComponentConstructor<T extends Component<O>, O extends BaseOptions> = {
|
|
9
9
|
new (el: HTMLElement, options: Partial<O>): T;
|
|
10
10
|
};
|
|
@@ -48,14 +48,14 @@ export declare class Component<O extends BaseOptions> {
|
|
|
48
48
|
* @param options Component options.
|
|
49
49
|
* @param classDef Class definition.
|
|
50
50
|
*/
|
|
51
|
-
protected static init<I extends
|
|
51
|
+
protected static init<I extends InitElement, O extends BaseOptions, C extends Component<O>>(els: InitElements<I>, options: Partial<O>, classDef: ComponentType<C, O>): C[];
|
|
52
52
|
/**
|
|
53
53
|
* Initializes component instances.
|
|
54
54
|
* @param els HTML elements.
|
|
55
55
|
* @param options Component options.
|
|
56
56
|
* @param classDef Class definition.
|
|
57
57
|
*/
|
|
58
|
-
protected static init<I extends
|
|
58
|
+
protected static init<I extends InitElement, O extends BaseOptions, C extends Component<O>>(els: I | InitElements<I>, options: Partial<O>, classDef: ComponentType<C, O>): C | C[];
|
|
59
59
|
/**
|
|
60
60
|
* @returns default options for component instance.
|
|
61
61
|
*/
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,4 +4,4 @@ export { Forms } from './behaviors/forms';
|
|
|
4
4
|
export { Waves } from './behaviors/waves';
|
|
5
5
|
export { AutoInit } from './components/registry';
|
|
6
6
|
export type { AutoInitOptions } from './components/registry';
|
|
7
|
-
export declare const version = "0.
|
|
7
|
+
export declare const version = "0.4.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expressivecss/expressive",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "ExpressiveCSS - a Material Design 3 front-end framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "BaezFJ <baezdevs@gmail.com>",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"build:js:iife-min": "esbuild src/ts/index.ts --bundle --format=iife --global-name=Expressive --target=es2020 --outfile=dist/js/expressive.min.js --minify --sourcemap",
|
|
70
70
|
"build:types": "tsc -p tsconfig.build.json",
|
|
71
71
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
72
|
-
"test": "run-s build:js test:run",
|
|
72
|
+
"test": "run-s build:js build:css test:run",
|
|
73
73
|
"test:run": "node --test",
|
|
74
74
|
"test:watch": "node --test --watch",
|
|
75
75
|
"watch": "run-p watch:css watch:js",
|
package/src/sass/README.md
CHANGED
|
@@ -79,9 +79,6 @@ exclusive comparator, so the old `600.99px` / `992.99px` values used to stop
|
|
|
79
79
|
`max-width` and `min-width` both matching on the boundary pixel are gone, and
|
|
80
80
|
each boundary is written once.
|
|
81
81
|
|
|
82
|
-
The interpolated-string form (`@media #{$medium-and-up}`) still compiles and now
|
|
83
|
-
produces the same range queries, but it is deprecated and unused in here.
|
|
84
|
-
|
|
85
82
|
## Theming
|
|
86
83
|
|
|
87
84
|
`tokens/_reference.scss` **generates** five of the six M3 tonal ramps from
|
|
@@ -196,6 +193,5 @@ consumer's own `display` — silently, and in the common case. Classes whose who
|
|
|
196
193
|
job is to be unconditional (`.hide`, `.m-3`, the palette classes) keep it.
|
|
197
194
|
|
|
198
195
|
The `!important` in `components/` is a different thing again: `.pushpin`
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
longer needs the flag.
|
|
196
|
+
sets JS-driven geometry that must not be overridable. That stays.
|
|
197
|
+
Tap target and the preloader no longer need the flag.
|
|
@@ -51,19 +51,3 @@ $breakpoints: (
|
|
|
51
51
|
@content;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
// Deprecated: the interpolated-string breakpoints.
|
|
56
|
-
//
|
|
57
|
-
// Kept so a downstream `@media #{$medium-and-up}` keeps compiling - the
|
|
58
|
-
// framework itself no longer uses them. Values are now range syntax, so the
|
|
59
|
-
// queries they produce match the mixins above exactly. Prefer the mixins.
|
|
60
|
-
$small-screen-up: breakpoint("small") !default;
|
|
61
|
-
$medium-screen-up: breakpoint("large") !default;
|
|
62
|
-
$large-screen-up: breakpoint("xlarge") !default;
|
|
63
|
-
|
|
64
|
-
$medium-and-up: "(width >= #{breakpoint('small')})" !default;
|
|
65
|
-
$large-and-up: "(width >= #{breakpoint('large')})" !default;
|
|
66
|
-
$extra-large-and-up: "(width >= #{breakpoint('xlarge')})" !default;
|
|
67
|
-
$small-and-down: "(width < #{breakpoint('small')})" !default;
|
|
68
|
-
$medium-and-down: "(width < #{breakpoint('large')})" !default;
|
|
69
|
-
$medium-only: "(#{breakpoint('small')} <= width < #{breakpoint('large')})" !default;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// TypeScale
|
|
2
|
-
$md_sys_typescale_body-large_size: 16px;
|
|
3
|
-
|
|
4
1
|
@use "sass:math";
|
|
5
2
|
|
|
6
3
|
// Colors
|
|
@@ -11,14 +8,6 @@ $md_sys_typescale_body-large_size: 16px;
|
|
|
11
8
|
// value from it: this link color. Everything now comes from --md-sys-color-*.
|
|
12
9
|
$link-color: var(--md-sys-color-primary) !default;
|
|
13
10
|
|
|
14
|
-
// Floating buttons
|
|
15
|
-
$button-floating-background: var(--md-sys-color-secondary) !default;
|
|
16
|
-
$button-floating-background-hover: var(--md-ref-palette-secondary70) !default;
|
|
17
|
-
$button-floating-background-focus: var(--md-ref-palette-secondary80) !default;
|
|
18
|
-
$button-floating-color: var(--md-sys-color-on-secondary) !default;
|
|
19
|
-
$button-floating-size: 40px !default;
|
|
20
|
-
$button-floating-radius: 16px !default;
|
|
21
|
-
|
|
22
11
|
// Dropdown
|
|
23
12
|
$dropdown-item-height: 50px !default;
|
|
24
13
|
|
|
@@ -27,7 +16,6 @@ $dropdown-item-height: 50px !default;
|
|
|
27
16
|
// the 600.99px / 992.99px / 1200.99px values are gone.
|
|
28
17
|
|
|
29
18
|
// Grid
|
|
30
|
-
$num-cols: 12 !default;
|
|
31
19
|
$gutter-width: 1.5rem !default;
|
|
32
20
|
$element-top-margin: math.div($gutter-width, 3) !default;
|
|
33
21
|
$element-bottom-margin: math.div($gutter-width * 2, 3) !default;
|
|
@@ -40,15 +28,6 @@ $text-color: var(--md-sys-color-on-background) !default;
|
|
|
40
28
|
// derived from it, so the two cannot drift.
|
|
41
29
|
$root-font-size: 14px !default;
|
|
42
30
|
|
|
43
|
-
// Legacy rem heading ladder. Headings now consume --md-sys-typescale-*
|
|
44
|
-
// (see base/_typography.scss). Kept so existing Sass overrides still compile.
|
|
45
|
-
$h1-fontsize: 4.2rem !default;
|
|
46
|
-
$h2-fontsize: 3.56rem !default;
|
|
47
|
-
$h3-fontsize: 2.92rem !default;
|
|
48
|
-
$h4-fontsize: 2.28rem !default;
|
|
49
|
-
$h5-fontsize: 1.64rem !default;
|
|
50
|
-
$h6-fontsize: 1.15rem !default;
|
|
51
|
-
|
|
52
31
|
// Flow text: font-size interpolates between these two across the viewport
|
|
53
32
|
// range below. This used to be a @while loop emitting 21 media queries.
|
|
54
33
|
$flow-text-min: 1.2rem !default;
|
package/src/sass/base/_grid.scss
CHANGED
|
@@ -23,25 +23,6 @@
|
|
|
23
23
|
padding: 1rem 0;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
// Mixins to eliminate code repetition
|
|
27
|
-
@mixin reset-offset {
|
|
28
|
-
margin-left: auto;
|
|
29
|
-
left: auto;
|
|
30
|
-
right: auto;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@mixin grid-classes($size, $i, $perc) {
|
|
34
|
-
&.offset-#{$size}#{$i} {
|
|
35
|
-
margin-left: $perc;
|
|
36
|
-
}
|
|
37
|
-
&.pull-#{$size}#{$i} {
|
|
38
|
-
right: $perc;
|
|
39
|
-
}
|
|
40
|
-
&.push-#{$size}#{$i} {
|
|
41
|
-
left: $perc;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
26
|
body {
|
|
46
27
|
--gap-size: 1.5rem; // default
|
|
47
28
|
}
|
|
@@ -68,7 +68,7 @@ header:has(> nav) nav a span.badge {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.sidenav span.badge {
|
|
71
|
-
margin-top: calc(calc(var(--
|
|
71
|
+
margin-top: calc(calc(var(--md-comp-nav-drawer-line-height) * 0.5) - calc(22px * 0.5));
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
table span.badge {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
// Common buttons and FABs.
|
|
4
4
|
//
|
|
5
|
-
// Anatomy is the HTML. A <button> (or <a class="button">
|
|
6
|
-
// common button. Put an <i> first or last for a leading/trailing icon
|
|
7
|
-
//
|
|
8
|
-
//
|
|
5
|
+
// Anatomy is the HTML. A <button> (or <a class="button">) is a filled
|
|
6
|
+
// common button. Put an <i> first or last for a leading/trailing icon.
|
|
7
|
+
// Icon-only is a 40dp icon button. Helpers switch the M3 variant
|
|
8
|
+
// (tonal, outlined, elevated, text) or the size.
|
|
9
9
|
//
|
|
10
10
|
// Tokens follow https://m3.material.io/components/buttons/specs
|
|
11
11
|
// height 40 / 32 small / 56 large, label-large, 20dp stadium
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
// Widget chrome that happens to be a <button> — not a common button.
|
|
29
29
|
$_not-btn: ".datepicker-day-button, .month-prev, .month-next, .indicator-item-btn";
|
|
30
30
|
|
|
31
|
-
$_btn: "button:not(#{$_not-btn}), a.button
|
|
31
|
+
$_btn: "button:not(#{$_not-btn}), a.button";
|
|
32
32
|
|
|
33
33
|
:where(#{$_btn}) {
|
|
34
34
|
@include btn;
|
|
@@ -69,7 +69,7 @@ $_btn: "button:not(#{$_not-btn}), a.button, .btn, .btn-flat, .btn-large, .btn-sm
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
// Default variant is filled. :where() keeps specificity at zero so .tonal etc. win.
|
|
72
|
-
:where(#{$_btn}):not(.tonal, .outlined, .
|
|
72
|
+
:where(#{$_btn}):not(.tonal, .outlined, .elevated, .text) {
|
|
73
73
|
@include btn-filled;
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -77,8 +77,7 @@ $_btn: "button:not(#{$_not-btn}), a.button, .btn, .btn-flat, .btn-large, .btn-sm
|
|
|
77
77
|
@include btn-tonal;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
:where(#{$_btn}).outlined
|
|
81
|
-
:where(#{$_btn}).border {
|
|
80
|
+
:where(#{$_btn}).outlined {
|
|
82
81
|
@include btn-outlined;
|
|
83
82
|
}
|
|
84
83
|
|
|
@@ -86,20 +85,12 @@ $_btn: "button:not(#{$_not-btn}), a.button, .btn, .btn-flat, .btn-large, .btn-sm
|
|
|
86
85
|
@include btn-elevated;
|
|
87
86
|
}
|
|
88
87
|
|
|
89
|
-
:where(#{$_btn}).text
|
|
90
|
-
:where(#{$_btn}).transparent,
|
|
91
|
-
.btn-flat {
|
|
88
|
+
:where(#{$_btn}).text {
|
|
92
89
|
@include btn-flat;
|
|
93
90
|
}
|
|
94
91
|
|
|
95
|
-
// icon-right is a compat alias: new markup puts the icon last in the DOM.
|
|
96
|
-
:where(#{$_btn}).icon-right {
|
|
97
|
-
flex-direction: row-reverse;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
92
|
// Sizes. small = 32dp, large/extra = 56dp (M3 extra-large / FAB height).
|
|
101
|
-
:where(#{$_btn}).small
|
|
102
|
-
.btn-small {
|
|
93
|
+
:where(#{$_btn}).small {
|
|
103
94
|
--md-comp-filled-button-container-height: 32px;
|
|
104
95
|
--md-comp-filled-button-container-shape: 16px;
|
|
105
96
|
--md-comp-filled-button-leading-space: 16px;
|
|
@@ -111,8 +102,7 @@ $_btn: "button:not(#{$_not-btn}), a.button, .btn, .btn-flat, .btn-large, .btn-sm
|
|
|
111
102
|
}
|
|
112
103
|
|
|
113
104
|
:where(#{$_btn}).large,
|
|
114
|
-
:where(#{$_btn}).extra
|
|
115
|
-
.btn-large {
|
|
105
|
+
:where(#{$_btn}).extra {
|
|
116
106
|
--md-comp-filled-button-container-height: 56px;
|
|
117
107
|
--md-comp-filled-button-container-shape: 28px;
|
|
118
108
|
--md-comp-filled-button-leading-space: 24px;
|
|
@@ -126,11 +116,6 @@ $_btn: "button:not(#{$_not-btn}), a.button, .btn, .btn-flat, .btn-large, .btn-sm
|
|
|
126
116
|
border-radius: 9999px;
|
|
127
117
|
}
|
|
128
118
|
|
|
129
|
-
.btn-block {
|
|
130
|
-
display: flex;
|
|
131
|
-
width: 100%;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
119
|
// Extended FAB: 56dp, large corners, primary-container, icon + label.
|
|
135
120
|
:where(#{$_btn}).extend {
|
|
136
121
|
height: 56px;
|
|
@@ -168,13 +153,10 @@ $_btn: "button:not(#{$_not-btn}), a.button, .btn, .btn-flat, .btn-large, .btn-sm
|
|
|
168
153
|
}
|
|
169
154
|
}
|
|
170
155
|
|
|
171
|
-
// FAB.
|
|
172
|
-
//
|
|
173
|
-
// is the 40dp small FAB.
|
|
174
|
-
.btn-floating,
|
|
156
|
+
// FAB. Icon-only .extra / .large is the 56dp regular FAB. Add .small for
|
|
157
|
+
// the 40dp small FAB. The speed-dial host is .fixed-action-btn.
|
|
175
158
|
:where(#{$_btn}).extra.circle,
|
|
176
|
-
:where(#{$_btn}).large.circle
|
|
177
|
-
:where(#{$_btn}).btn-large.circle {
|
|
159
|
+
:where(#{$_btn}).large.circle {
|
|
178
160
|
display: inline-flex;
|
|
179
161
|
align-items: center;
|
|
180
162
|
justify-content: center;
|
|
@@ -191,7 +173,6 @@ $_btn: "button:not(#{$_not-btn}), a.button, .btn, .btn-flat, .btn-large, .btn-sm
|
|
|
191
173
|
vertical-align: middle;
|
|
192
174
|
@include z-depth("3");
|
|
193
175
|
@include focus-visible;
|
|
194
|
-
transition: background-color .2s ease-out, box-shadow .2s ease-out;
|
|
195
176
|
|
|
196
177
|
> i {
|
|
197
178
|
font-size: 24px;
|
|
@@ -219,8 +200,7 @@ $_btn: "button:not(#{$_not-btn}), a.button, .btn, .btn-flat, .btn-large, .btn-sm
|
|
|
219
200
|
);
|
|
220
201
|
}
|
|
221
202
|
|
|
222
|
-
&.small
|
|
223
|
-
&.btn-small {
|
|
203
|
+
&.small {
|
|
224
204
|
width: 40px;
|
|
225
205
|
height: 40px;
|
|
226
206
|
border-radius: 12px;
|
|
@@ -242,23 +222,9 @@ $_btn: "button:not(#{$_not-btn}), a.button, .btn, .btn-flat, .btn-large, .btn-sm
|
|
|
242
222
|
}
|
|
243
223
|
}
|
|
244
224
|
|
|
245
|
-
// Small FAB alias: .btn-floating alone is 40dp (historical size + M3 small).
|
|
246
|
-
.btn-floating:not(.large, .btn-large, .extra, .small, .btn-small) {
|
|
247
|
-
width: 40px;
|
|
248
|
-
height: 40px;
|
|
249
|
-
border-radius: 12px;
|
|
250
|
-
|
|
251
|
-
&.halfway-fab {
|
|
252
|
-
bottom: -20px;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
225
|
:where(#{$_btn}):disabled,
|
|
257
226
|
:where(#{$_btn})[disabled],
|
|
258
|
-
:where(#{$_btn}).disabled
|
|
259
|
-
.btn-floating:disabled,
|
|
260
|
-
.btn-floating[disabled],
|
|
261
|
-
.btn-floating.disabled {
|
|
227
|
+
:where(#{$_btn}).disabled {
|
|
262
228
|
@include btn-disabled;
|
|
263
229
|
}
|
|
264
230
|
|
|
@@ -334,12 +300,14 @@ $_btn: "button:not(#{$_not-btn}), a.button, .btn, .btn-flat, .btn-large, .btn-sm
|
|
|
334
300
|
li:nth-last-child(7) { --i: 6; }
|
|
335
301
|
li:nth-last-child(8) { --i: 7; }
|
|
336
302
|
|
|
337
|
-
:is(a, button) {
|
|
303
|
+
> li > :is(a, button) {
|
|
338
304
|
opacity: 0;
|
|
339
305
|
transform: var(--md-comp-fab-hidden-transform);
|
|
340
306
|
transition:
|
|
341
307
|
opacity var(--md-comp-fab-duration) var(--md-comp-fab-easing),
|
|
342
|
-
transform var(--md-comp-fab-duration) var(--md-comp-fab-easing)
|
|
308
|
+
transform var(--md-comp-fab-duration) var(--md-comp-fab-easing),
|
|
309
|
+
background-color .2s ease-out,
|
|
310
|
+
box-shadow .2s ease-out;
|
|
343
311
|
// Close: farthest first, so they funnel into the disc.
|
|
344
312
|
transition-delay: calc(
|
|
345
313
|
var(--md-comp-fab-stagger) * (var(--n) - 1 - var(--i, 0))
|
|
@@ -351,7 +319,7 @@ $_btn: "button:not(#{$_not-btn}), a.button, .btn, .btn-flat, .btn-large, .btn-sm
|
|
|
351
319
|
visibility: visible;
|
|
352
320
|
transition-delay: 0s;
|
|
353
321
|
|
|
354
|
-
:is(a, button) {
|
|
322
|
+
> li > :is(a, button) {
|
|
355
323
|
opacity: 1;
|
|
356
324
|
transform: none;
|
|
357
325
|
transition-delay: calc(var(--md-comp-fab-stagger) * var(--i, 0));
|
|
@@ -429,7 +397,7 @@ $_btn: "button:not(#{$_not-btn}), a.button, .btn, .btn-flat, .btn-large, .btn-sm
|
|
|
429
397
|
padding: 0;
|
|
430
398
|
height: 56px;
|
|
431
399
|
|
|
432
|
-
:is(ul, menu) :is(a, button) {
|
|
400
|
+
:is(ul, menu) > li > :is(a, button) {
|
|
433
401
|
opacity: 1;
|
|
434
402
|
transform: none;
|
|
435
403
|
transition: opacity var(--md-comp-fab-duration);
|
|
@@ -490,7 +458,7 @@ $_btn: "button:not(#{$_not-btn}), a.button, .btn, .btn-flat, .btn-large, .btn-sm
|
|
|
490
458
|
visibility: visible;
|
|
491
459
|
transition-delay: 0s;
|
|
492
460
|
|
|
493
|
-
:is(a, button) {
|
|
461
|
+
> li > :is(a, button) {
|
|
494
462
|
opacity: 1;
|
|
495
463
|
transform: none;
|
|
496
464
|
transition-delay: calc(var(--md-comp-fab-stagger) * var(--i, 0));
|