@swiftwc/ui 0.0.0-dev.89 → 0.0.0-dev.91
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/generated/components/bordered-button.d.ts +1 -1
- package/generated/components/bordered-button.js +1 -1
- package/generated/components/bordered-prominent-button.d.ts +1 -1
- package/generated/components/bordered-prominent-button.js +1 -1
- package/generated/components/borderless-button.d.ts +1 -1
- package/generated/components/borderless-button.js +1 -1
- package/generated/components/date-picker.d.ts +3 -0
- package/generated/components/date-picker.js +3 -0
- package/generated/components/glass-button.d.ts +1 -1
- package/generated/components/glass-button.js +1 -1
- package/generated/components/glass-prominent-button.d.ts +1 -1
- package/generated/components/glass-prominent-button.js +1 -1
- package/generated/components/section-view.d.ts +2 -0
- package/generated/components/section-view.js +2 -0
- package/generated/components/text-field.js +2 -2
- package/generated/components/tool-bar-item-group.d.ts +3 -0
- package/generated/components/tool-bar-item-group.js +3 -0
- package/generated/components/tool-bar-item.d.ts +3 -0
- package/generated/components/tool-bar-item.js +3 -0
- package/generated/components/tool-bar.d.ts +2 -0
- package/generated/components/tool-bar.js +2 -0
- package/generated/css/index.css +23 -0
- package/generated/internal/utils/compare-big-decimals.js +7 -17
- package/package.json +3 -2
- package/scss/_components.scss +1 -0
- package/scss/_maps.scss +31 -0
- package/scss/components/_index.scss +1 -0
- package/scss/components/_text-view.scss +57 -0
- package/scss/utils/_index.scss +3 -32
- package/scss/utils/_stacks.scss +0 -33
- package/web-components.html-data/en.json +104 -29
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonBase } from '../namespace-browser/base';
|
|
2
2
|
/**
|
|
3
|
-
* @summary A
|
|
3
|
+
* @summary A control that initiates an action. Styled with standard border artwork based on the button’s context.
|
|
4
4
|
*
|
|
5
5
|
* @example <button is="bordered-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
6
6
|
*
|
|
@@ -3,7 +3,7 @@ import { devFlags, ensurePlaceholder, onoff } from '../internal/utils';
|
|
|
3
3
|
import { ButtonBase } from '../namespace-browser/base';
|
|
4
4
|
import { Snapshot } from '../snapshot';
|
|
5
5
|
/**
|
|
6
|
-
* @summary A
|
|
6
|
+
* @summary A control that initiates an action. Styled with standard border artwork based on the button’s context.
|
|
7
7
|
*
|
|
8
8
|
* @example <button is="bordered-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
9
9
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonBase } from '../namespace-browser/base';
|
|
2
2
|
/**
|
|
3
|
-
* @summary A
|
|
3
|
+
* @summary A control that initiates an action. Styled with standard border prominent artwork based on the button’s context.
|
|
4
4
|
*
|
|
5
5
|
* @example <button is="bordered-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
6
6
|
*
|
|
@@ -3,7 +3,7 @@ import { devFlags, ensurePlaceholder, onoff } from '../internal/utils';
|
|
|
3
3
|
import { ButtonBase } from '../namespace-browser/base';
|
|
4
4
|
import { Snapshot } from '../snapshot';
|
|
5
5
|
/**
|
|
6
|
-
* @summary A
|
|
6
|
+
* @summary A control that initiates an action. Styled with standard border prominent artwork based on the button’s context.
|
|
7
7
|
*
|
|
8
8
|
* @example <button is="bordered-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
9
9
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonBase } from '../namespace-browser/base';
|
|
2
2
|
/**
|
|
3
|
-
* @summary A
|
|
3
|
+
* @summary A control that initiates an action. Styled without any borders.
|
|
4
4
|
*
|
|
5
5
|
* @example <button is="borderless-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
6
6
|
*
|
|
@@ -3,7 +3,7 @@ import { devFlags, ensurePlaceholder, onoff } from '../internal/utils';
|
|
|
3
3
|
import { ButtonBase } from '../namespace-browser/base';
|
|
4
4
|
import { Snapshot } from '../snapshot';
|
|
5
5
|
/**
|
|
6
|
-
* @summary A
|
|
6
|
+
* @summary A control that initiates an action. Styled without any borders.
|
|
7
7
|
*
|
|
8
8
|
* @example <button is="borderless-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
9
9
|
*
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { FormAssociatedBase } from '../internal/class/form-associated-base';
|
|
2
2
|
declare const datePickerStyles: readonly ["graphical", "field", "automatic"];
|
|
3
3
|
export type DatePickerStyle = (typeof datePickerStyles)[number];
|
|
4
|
+
/**
|
|
5
|
+
* @summary A control for selecting an absolute date.
|
|
6
|
+
*/
|
|
4
7
|
export declare class DatePicker extends FormAssociatedBase {
|
|
5
8
|
#private;
|
|
6
9
|
static get observedAttributes(): string[];
|
|
@@ -6,6 +6,9 @@ import { MutationObserverSet } from '../internal/class/mutation-observer-set';
|
|
|
6
6
|
import { $, clamp, devFlags, kebabCase, onoff, set } from '../internal/utils';
|
|
7
7
|
import { html, queryMorph } from '../morphdom';
|
|
8
8
|
const datePickerStyles = ['graphical', 'field', 'automatic'];
|
|
9
|
+
/**
|
|
10
|
+
* @summary A control for selecting an absolute date.
|
|
11
|
+
*/
|
|
9
12
|
export class DatePicker extends FormAssociatedBase {
|
|
10
13
|
static get observedAttributes() {
|
|
11
14
|
return [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonBase } from '../namespace-browser/base';
|
|
2
2
|
/**
|
|
3
|
-
* @summary A
|
|
3
|
+
* @summary A control that initiates an action. Styled with glass border artwork based on the button’s context.
|
|
4
4
|
*
|
|
5
5
|
* @example <button is="glass-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
6
6
|
*
|
|
@@ -3,7 +3,7 @@ import { devFlags, ensurePlaceholder, onoff, touchGlass } from '../internal/util
|
|
|
3
3
|
import { ButtonBase } from '../namespace-browser/base';
|
|
4
4
|
import { Snapshot } from '../snapshot';
|
|
5
5
|
/**
|
|
6
|
-
* @summary A
|
|
6
|
+
* @summary A control that initiates an action. Styled with glass border artwork based on the button’s context.
|
|
7
7
|
*
|
|
8
8
|
* @example <button is="glass-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
9
9
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonBase } from '../namespace-browser/base';
|
|
2
2
|
/**
|
|
3
|
-
* @summary A
|
|
3
|
+
* @summary A control that initiates an action. Styled with prominent glass border artwork based on the button’s context.
|
|
4
4
|
*
|
|
5
5
|
* @example <button is="glass-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
6
6
|
*
|
|
@@ -3,7 +3,7 @@ import { devFlags, ensurePlaceholder, onoff, touchGlass } from '../internal/util
|
|
|
3
3
|
import { ButtonBase } from '../namespace-browser/base';
|
|
4
4
|
import { Snapshot } from '../snapshot';
|
|
5
5
|
/**
|
|
6
|
-
* @summary A
|
|
6
|
+
* @summary A control that initiates an action. Styled with prominent glass border artwork based on the button’s context.
|
|
7
7
|
*
|
|
8
8
|
* @example <button is="glass-prominent-button"><label-view system-image="hand-tap" title="Tap Me"></label-view></button>
|
|
9
9
|
*
|
|
@@ -124,7 +124,7 @@ export class TextField extends FormAssociatedBase {
|
|
|
124
124
|
case 'name':
|
|
125
125
|
case 'minimum':
|
|
126
126
|
case 'maximum':
|
|
127
|
-
this.#sendValueToForm();
|
|
127
|
+
this.#sendValueToForm(false);
|
|
128
128
|
break;
|
|
129
129
|
case 'prompt':
|
|
130
130
|
this.#input?.setAttribute('placeholder', newValue ?? ''); // else this.#input?.removeAttribute(name)
|
|
@@ -491,7 +491,7 @@ export class TextField extends FormAssociatedBase {
|
|
|
491
491
|
};
|
|
492
492
|
formResetCallback = () => {
|
|
493
493
|
this.text = '';
|
|
494
|
-
this.#sendValueToForm();
|
|
494
|
+
this.#sendValueToForm(false);
|
|
495
495
|
};
|
|
496
496
|
}
|
|
497
497
|
_a = TextField;
|
|
@@ -8,6 +8,9 @@ var ToolBarItemGroup_1;
|
|
|
8
8
|
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
9
9
|
import { adaptiveSlot } from '../internal/decorators';
|
|
10
10
|
import { devFlags } from '../internal/utils';
|
|
11
|
+
/**
|
|
12
|
+
* A model that represents a group of `ToolbarItems` which can be placed in the toolbar or navigation bar.
|
|
13
|
+
*/
|
|
11
14
|
let ToolBarItemGroup = ToolBarItemGroup_1 = class ToolBarItemGroup extends HTMLElement {
|
|
12
15
|
constructor() {
|
|
13
16
|
super();
|
|
@@ -9,6 +9,9 @@ import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
|
9
9
|
import { adaptiveSlot } from '../internal/decorators';
|
|
10
10
|
import { devFlags, ensurePlaceholder, onoff, touchGlass } from '../internal/utils';
|
|
11
11
|
import { Snapshot } from '../snapshot';
|
|
12
|
+
/**
|
|
13
|
+
* @summary A model that represents an item which can be placed in the toolbar or navigation bar.
|
|
14
|
+
*/
|
|
12
15
|
let ToolBarItem = ToolBarItem_1 = class ToolBarItem extends HTMLElement {
|
|
13
16
|
static get observedAttributes() {
|
|
14
17
|
return ['slot', 'data-previous-slot', 'title-key'];
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @summary Populates the toolbar or navigation bar with the specified items.
|
|
3
|
+
*
|
|
2
4
|
* @slot cancellation-action - The item represents a cancellation action for a modal interface. Places the item in the leading edge of the top bar and on the trailing edge of the bottom bar when fine modal
|
|
3
5
|
* @slot primary-action - The item represents a primary action. Places the item in the trailing edge of the top bar and on the trailing edge of the bottom bar when fine modal
|
|
4
6
|
* @slot confirmation-action - The item represents a confirmation action for a modal interface. Places the item in the trailing edge of the top bar and on the trailing edge of the bottom bar when fine modal
|
|
@@ -3,6 +3,8 @@ import { ResizeObserverSingleton } from '../internal/class/resize-observer-singl
|
|
|
3
3
|
import { $, devFlags } from '../internal/utils';
|
|
4
4
|
const observers = new ResizeObserverSingleton();
|
|
5
5
|
/**
|
|
6
|
+
* @summary Populates the toolbar or navigation bar with the specified items.
|
|
7
|
+
*
|
|
6
8
|
* @slot cancellation-action - The item represents a cancellation action for a modal interface. Places the item in the leading edge of the top bar and on the trailing edge of the bottom bar when fine modal
|
|
7
9
|
* @slot primary-action - The item represents a primary action. Places the item in the trailing edge of the top bar and on the trailing edge of the bottom bar when fine modal
|
|
8
10
|
* @slot confirmation-action - The item represents a confirmation action for a modal interface. Places the item in the trailing edge of the top bar and on the trailing edge of the bottom bar when fine modal
|
package/generated/css/index.css
CHANGED
|
@@ -1105,6 +1105,7 @@
|
|
|
1105
1105
|
group-box:not([hidden]),
|
|
1106
1106
|
tool-bar:not([hidden]),
|
|
1107
1107
|
label-view:not([hidden]),
|
|
1108
|
+
text-view:not([hidden]),
|
|
1108
1109
|
labeled-content:not([hidden]),
|
|
1109
1110
|
menu-view:not([hidden]),
|
|
1110
1111
|
section-view:not([hidden]),
|
|
@@ -3375,6 +3376,18 @@
|
|
|
3375
3376
|
}
|
|
3376
3377
|
}
|
|
3377
3378
|
}
|
|
3379
|
+
@layer sw-components {
|
|
3380
|
+
:where(text-view[prose]) {
|
|
3381
|
+
container: text-view/inline-size;
|
|
3382
|
+
--text-view--p-margin-block-start: 1rem;
|
|
3383
|
+
}
|
|
3384
|
+
text-view[prose] p {
|
|
3385
|
+
margin-block-start: var(--text-view--p-margin-block-start);
|
|
3386
|
+
}
|
|
3387
|
+
:where(text-view[prose] h1) {
|
|
3388
|
+
font-size: clamp(1rem, var(--text-view--h1-font-size) + 0.5rem, 3rem);
|
|
3389
|
+
}
|
|
3390
|
+
}
|
|
3378
3391
|
@layer sw-components {
|
|
3379
3392
|
:where(toggle-view) {
|
|
3380
3393
|
grid-template-columns: minmax(0, 1fr);
|
|
@@ -6020,6 +6033,16 @@
|
|
|
6020
6033
|
--accentColor4: var(--orange4);
|
|
6021
6034
|
--accentColor5: var(--orange5);
|
|
6022
6035
|
}
|
|
6036
|
+
:where([tint=purple],
|
|
6037
|
+
[list-item-tint=purple]) {
|
|
6038
|
+
--accentColorEffective: var(--purple);
|
|
6039
|
+
--accentColorEffective4: var(--purple4);
|
|
6040
|
+
--accentColor: var(--purple);
|
|
6041
|
+
--accentColor2: var(--purple2);
|
|
6042
|
+
--accentColor3: var(--purple3);
|
|
6043
|
+
--accentColor4: var(--purple4);
|
|
6044
|
+
--accentColor5: var(--purple5);
|
|
6045
|
+
}
|
|
6023
6046
|
}
|
|
6024
6047
|
@layer sw-utils {
|
|
6025
6048
|
:where([frame\:width=infinity]) {
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @example
|
|
3
|
-
* compareBigDecimals("1e3", "1000") // 0
|
|
4
|
-
* compareBigDecimals("1e-3", "0.001") // 0
|
|
5
|
-
* compareBigDecimals("-10", "-2") // -1 ✅
|
|
6
|
-
* const arr = ["1.2","1.10","1.02","1e2","100","-0.5"]
|
|
7
|
-
* arr.sort(compareBigDecimals)
|
|
8
|
-
* console.log(arr)
|
|
9
|
-
* function isInRange(value: string, min: string, max: string): boolean {return compareBigDecimals(value, min) >= 0 && compareBigDecimals(value, max) <= 0}
|
|
10
|
-
* // examples
|
|
11
|
-
* isInRange("-5", "-10", "-1") // true
|
|
12
|
-
* isInRange("-11", "-10", "-1") // false
|
|
13
|
-
* isInRange("0", "-10", "-1") // false
|
|
14
|
-
* isInRange("-Infinity", "-Infinity", "-1") // true
|
|
15
|
-
* isInRange("5", "-Infinity", "Infinity") // true
|
|
16
|
-
*/
|
|
17
1
|
const POSITIVE_INFINITY = 'Infinity', NEGATIVE_INFINITY = '-Infinity';
|
|
18
2
|
export default function (a, b) {
|
|
19
3
|
const aInf = isInfinity(a), bInf = isInfinity(b);
|
|
@@ -75,7 +59,13 @@ function parse(input) {
|
|
|
75
59
|
if (exp > 0) {
|
|
76
60
|
const move = Math.min(exp, f.length);
|
|
77
61
|
i += f.slice(0, move);
|
|
78
|
-
f = f.slice(move)
|
|
62
|
+
f = f.slice(move);
|
|
63
|
+
const remaining = exp - move;
|
|
64
|
+
if (remaining > 0)
|
|
65
|
+
i += '0'.repeat(remaining);
|
|
66
|
+
// const move = Math.min(exp, f.length)
|
|
67
|
+
// i += f.slice(0, move)
|
|
68
|
+
// f = f.slice(move) + '0'.repeat(exp - move)
|
|
79
69
|
}
|
|
80
70
|
else if (exp < 0) {
|
|
81
71
|
const move = Math.min(-exp, i.length);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swiftwc/ui",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.91",
|
|
4
4
|
"description": "Elegant SwiftUI-inspired web components for standalone web apps and web extensions.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"build:ts:watch": "npm run prebuild && tsc --watch",
|
|
63
63
|
"build:ts": "tsc",
|
|
64
64
|
"build:scss": "sass --style=expanded --no-source-map scss/index.scss generated/css/index.css",
|
|
65
|
-
"build:manifest": "tsx scripts/make-manifest.ts",
|
|
65
|
+
"build:manifest": "tsx scripts/make-manifest.ts && prettier ./web-components.html-data/en.json --write",
|
|
66
66
|
"build:barrels": "npm run build:barrels:components && npm run build:barrels:events && npm run build:barrels:buses && npm run build:barrels:tpl && npm run build:barrels:morphdom && npm run build:barrels:i18n",
|
|
67
67
|
"build:barrels:components": "barrelsby --noHeader --delete --singleQuotes --noSemicolon --directory ./js/components --exclude \".\\.test\\.ts\"",
|
|
68
68
|
"build:barrels:events": "barrelsby --noHeader --delete --singleQuotes --noSemicolon --directory ./js/events --exclude \".\\.test\\.ts\"",
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
"build:barrels:decorators": "barrelsby --noHeader --delete --singleQuotes --noSemicolon --exportDefault --directory ./js/internal/decorators",
|
|
74
74
|
"format:check": "prettier . --check",
|
|
75
75
|
"format:write": "prettier . --write",
|
|
76
|
+
"lint:scripts": "tsc -p tsconfig.scripts.json --noEmit",
|
|
76
77
|
"test": "vitest --dom",
|
|
77
78
|
"prepackage": "rm -rf generated",
|
|
78
79
|
"package": "npm run build:ts && npm run build:scss",
|
package/scss/_components.scss
CHANGED
package/scss/_maps.scss
CHANGED
|
@@ -254,3 +254,34 @@ $button-sizes-map: (
|
|
|
254
254
|
),
|
|
255
255
|
),
|
|
256
256
|
);
|
|
257
|
+
|
|
258
|
+
$tint-names: gray, blue, red, green, orange, purple;
|
|
259
|
+
|
|
260
|
+
$foreground-tokens: (
|
|
261
|
+
secondary: --secondary,
|
|
262
|
+
blue: --blue,
|
|
263
|
+
red: --red,
|
|
264
|
+
green: --green,
|
|
265
|
+
orange: --orange,
|
|
266
|
+
purple: --purple,
|
|
267
|
+
'blue.secondary': --blue2,
|
|
268
|
+
'red.secondary': --red2,
|
|
269
|
+
'green.secondary': --green2,
|
|
270
|
+
'orange.secondary': --orange2,
|
|
271
|
+
'purple.secondary': --purple2,
|
|
272
|
+
'blue.tertiary': --blue3,
|
|
273
|
+
'red.tertiary': --red3,
|
|
274
|
+
'green.tertiary': --green3,
|
|
275
|
+
'orange.tertiary': --orange3,
|
|
276
|
+
'purple.tertiary': --purple3,
|
|
277
|
+
'blue.quaternary': --blue4,
|
|
278
|
+
'red.quaternary': --red4,
|
|
279
|
+
'green.quaternary': --green4,
|
|
280
|
+
'orange.quaternary': --orange4,
|
|
281
|
+
'purple.quaternary': --purple4,
|
|
282
|
+
'blue.quinary': --blue5,
|
|
283
|
+
'red.quinary': --red5,
|
|
284
|
+
'green.quinary': --green5,
|
|
285
|
+
'orange.quinary': --orange5,
|
|
286
|
+
'purple.quinary': --purple5,
|
|
287
|
+
);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
@use '../vars';
|
|
2
|
+
|
|
3
|
+
@layer #{vars.$components-layer} {
|
|
4
|
+
text-view {
|
|
5
|
+
:where(&) {
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// inline-size: min-content;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&[prose] {
|
|
12
|
+
:where(&) {
|
|
13
|
+
container: text-view / inline-size;
|
|
14
|
+
|
|
15
|
+
// font-size: clamp(1rem, var(--text-view--base-font-size) + 0.5rem, 3rem);
|
|
16
|
+
|
|
17
|
+
// --text-view--base-font-size: 1cqi;
|
|
18
|
+
// --text-view--h1-font-size: 5cqi;
|
|
19
|
+
|
|
20
|
+
--text-view--p-margin-block-start: 1rem;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
p {
|
|
24
|
+
margin-block-start: var(--text-view--p-margin-block-start);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// @container text-view (width <= 576px) {
|
|
28
|
+
// :where(&) {
|
|
29
|
+
// --text-view--base-font-size: 1.3cqi;
|
|
30
|
+
// }
|
|
31
|
+
// }
|
|
32
|
+
// @container text-view (width > 576px) {
|
|
33
|
+
// :where(&) {
|
|
34
|
+
// --text-view--base-font-size: 1.3cqi;
|
|
35
|
+
// }
|
|
36
|
+
// }
|
|
37
|
+
// @container table (width > 768) {
|
|
38
|
+
// --text-view--base-font-size: 100% * 16px;
|
|
39
|
+
// }
|
|
40
|
+
// @container table (width > 1024) {
|
|
41
|
+
// --text-view--base-font-size: 100% * 16px;
|
|
42
|
+
// }
|
|
43
|
+
// @container table (width > 1280) {
|
|
44
|
+
// --text-view--base-font-size: 100% * 16px;
|
|
45
|
+
// }
|
|
46
|
+
// @container table (width > 1536) {
|
|
47
|
+
// --text-view--base-font-size: 100% * 16px;
|
|
48
|
+
// }
|
|
49
|
+
|
|
50
|
+
h1 {
|
|
51
|
+
:where(&) {
|
|
52
|
+
font-size: clamp(1rem, var(--text-view--h1-font-size) + 0.5rem, 3rem);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
package/scss/utils/_index.scss
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use '../vars';
|
|
2
|
+
@use '../maps';
|
|
2
3
|
|
|
3
4
|
@layer #{vars.$utils-layer} {
|
|
4
5
|
[background-style='grouped'] {
|
|
@@ -25,43 +26,13 @@
|
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
@each $k,
|
|
29
|
-
$v
|
|
30
|
-
in (
|
|
31
|
-
secondary: --secondary,
|
|
32
|
-
blue: --blue,
|
|
33
|
-
red: --red,
|
|
34
|
-
green: --green,
|
|
35
|
-
orange: --orange,
|
|
36
|
-
purple: --purple,
|
|
37
|
-
'blue.secondary': --blue2,
|
|
38
|
-
'red.secondary': --red2,
|
|
39
|
-
'green.secondary': --green2,
|
|
40
|
-
'orange.secondary': --orange2,
|
|
41
|
-
'purple.secondary': --purple2,
|
|
42
|
-
'blue.tertiary': --blue3,
|
|
43
|
-
'red.tertiary': --red3,
|
|
44
|
-
'green.tertiary': --green3,
|
|
45
|
-
'orange.tertiary': --orange3,
|
|
46
|
-
'purple.tertiary': --purple3,
|
|
47
|
-
'blue.quaternary': --blue4,
|
|
48
|
-
'red.quaternary': --red4,
|
|
49
|
-
'green.quaternary': --green4,
|
|
50
|
-
'orange.quaternary': --orange4,
|
|
51
|
-
'purple.quaternary': --purple4,
|
|
52
|
-
'blue.quinary': --blue5,
|
|
53
|
-
'red.quinary': --red5,
|
|
54
|
-
'green.quinary': --green5,
|
|
55
|
-
'orange.quinary': --orange5,
|
|
56
|
-
'purple.quinary': --purple5
|
|
57
|
-
)
|
|
58
|
-
{
|
|
29
|
+
@each $k, $v in maps.$foreground-tokens {
|
|
59
30
|
:where([foreground='#{"" + $k}']) {
|
|
60
31
|
color: var(#{$v});
|
|
61
32
|
}
|
|
62
33
|
}
|
|
63
34
|
|
|
64
|
-
@each $tint in
|
|
35
|
+
@each $tint in maps.$tint-names {
|
|
65
36
|
[tint='#{"" + $tint}'],
|
|
66
37
|
[list-item-tint='#{"" + $tint}'] {
|
|
67
38
|
:where(&) {
|
package/scss/utils/_stacks.scss
CHANGED
|
@@ -34,18 +34,6 @@
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
// @each $k, $v in $alignment-map {
|
|
39
|
-
// &[align='#{$k}'] {
|
|
40
|
-
// justify-items: $v;
|
|
41
|
-
// }
|
|
42
|
-
// }
|
|
43
|
-
|
|
44
|
-
// @each $k, $v in $distribution-map {
|
|
45
|
-
// &[distribute='#{$k}'] {
|
|
46
|
-
// justify-content: $v;
|
|
47
|
-
// }
|
|
48
|
-
// }
|
|
49
37
|
}
|
|
50
38
|
|
|
51
39
|
// Horizontal alignment becomes the common tweak
|
|
@@ -77,36 +65,15 @@
|
|
|
77
65
|
}
|
|
78
66
|
}
|
|
79
67
|
}
|
|
80
|
-
|
|
81
|
-
// @each $k, $v in $alignment-map {
|
|
82
|
-
// &[align='#{$k}'] {
|
|
83
|
-
// align-items: $v;
|
|
84
|
-
// }
|
|
85
|
-
// }
|
|
86
|
-
|
|
87
|
-
// @each $k, $v in $distribution-map {
|
|
88
|
-
// &[distribute='#{$k}'] {
|
|
89
|
-
// align-content: $v;
|
|
90
|
-
// }
|
|
91
|
-
// }
|
|
92
68
|
}
|
|
93
69
|
|
|
94
70
|
v-stack,
|
|
95
71
|
h-stack {
|
|
96
|
-
// $spaces: 0, 1, 2, 3, 4;
|
|
97
|
-
// @each $s in $spaces {
|
|
98
72
|
@for $i from 0 through 50 {
|
|
99
73
|
:where(&[spacing='#{$i}']) {
|
|
100
74
|
gap: #{math.div(math.round(math.div($i, 10) * 10), 10)}rem;
|
|
101
75
|
}
|
|
102
76
|
}
|
|
103
|
-
|
|
104
|
-
// :where(&[frame\:alignment='leading']) {
|
|
105
|
-
// justify-self: start;
|
|
106
|
-
// }
|
|
107
|
-
// :where(&[frame\:alignment='center']) {
|
|
108
|
-
// justify-self: center;
|
|
109
|
-
// }
|
|
110
77
|
}
|
|
111
78
|
|
|
112
79
|
// padding reserved word for stacks
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"name": "bordered-button",
|
|
13
|
-
"description": "A
|
|
13
|
+
"description": "A control that initiates an action. Styled with standard border artwork based on the button’s context.",
|
|
14
14
|
"attributes": [
|
|
15
15
|
{
|
|
16
16
|
"name": "role",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"name": "bordered-prominent-button",
|
|
27
|
-
"description": "A
|
|
27
|
+
"description": "A control that initiates an action. Styled with standard border prominent artwork based on the button’s context.",
|
|
28
28
|
"attributes": [
|
|
29
29
|
{
|
|
30
30
|
"name": "role",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"name": "borderless-button",
|
|
41
|
-
"description": "A
|
|
41
|
+
"description": "A control that initiates an action. Styled without any borders.",
|
|
42
42
|
"attributes": [
|
|
43
43
|
{
|
|
44
44
|
"name": "role",
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
"name": "date-picker",
|
|
81
|
+
"description": "A control for selecting an absolute date.",
|
|
81
82
|
"attributes": [
|
|
82
83
|
{
|
|
83
84
|
"name": "date-picker-style",
|
|
@@ -150,7 +151,7 @@
|
|
|
150
151
|
},
|
|
151
152
|
{
|
|
152
153
|
"name": "glass-button",
|
|
153
|
-
"description": "A
|
|
154
|
+
"description": "A control that initiates an action. Styled with glass border artwork based on the button’s context.",
|
|
154
155
|
"attributes": [
|
|
155
156
|
{
|
|
156
157
|
"name": "role",
|
|
@@ -164,7 +165,7 @@
|
|
|
164
165
|
},
|
|
165
166
|
{
|
|
166
167
|
"name": "glass-prominent-button",
|
|
167
|
-
"description": "A
|
|
168
|
+
"description": "A control that initiates an action. Styled with prominent glass border artwork based on the button’s context.",
|
|
168
169
|
"attributes": [
|
|
169
170
|
{
|
|
170
171
|
"name": "role",
|
|
@@ -433,7 +434,7 @@
|
|
|
433
434
|
},
|
|
434
435
|
{
|
|
435
436
|
"name": "section-view",
|
|
436
|
-
"description": "",
|
|
437
|
+
"description": "A container view that you can use to add hierarchy within certain views.",
|
|
437
438
|
"attributes": [
|
|
438
439
|
{
|
|
439
440
|
"name": "header"
|
|
@@ -563,10 +564,12 @@
|
|
|
563
564
|
]
|
|
564
565
|
},
|
|
565
566
|
{
|
|
566
|
-
"name": "tool-bar-item-group"
|
|
567
|
+
"name": "tool-bar-item-group",
|
|
568
|
+
"description": "A model that represents a group of `ToolbarItems` which can be placed in the toolbar or navigation bar."
|
|
567
569
|
},
|
|
568
570
|
{
|
|
569
571
|
"name": "tool-bar-item",
|
|
572
|
+
"description": "A model that represents an item which can be placed in the toolbar or navigation bar.",
|
|
570
573
|
"attributes": [
|
|
571
574
|
{
|
|
572
575
|
"name": "slot"
|
|
@@ -581,7 +584,7 @@
|
|
|
581
584
|
},
|
|
582
585
|
{
|
|
583
586
|
"name": "tool-bar",
|
|
584
|
-
"description": ""
|
|
587
|
+
"description": "Populates the toolbar or navigation bar with the specified items."
|
|
585
588
|
},
|
|
586
589
|
{
|
|
587
590
|
"name": "vkeyboard",
|
|
@@ -949,27 +952,27 @@
|
|
|
949
952
|
"values": [
|
|
950
953
|
{
|
|
951
954
|
"name": "gray",
|
|
952
|
-
"description": "
|
|
955
|
+
"description": "Like secondary, like disabled"
|
|
953
956
|
},
|
|
954
957
|
{
|
|
955
|
-
"name": "
|
|
956
|
-
"description": "
|
|
958
|
+
"name": "blue",
|
|
959
|
+
"description": "System `blue` color"
|
|
957
960
|
},
|
|
958
961
|
{
|
|
959
|
-
"name": "
|
|
960
|
-
"description": "
|
|
962
|
+
"name": "red",
|
|
963
|
+
"description": "System `red` color"
|
|
961
964
|
},
|
|
962
965
|
{
|
|
963
966
|
"name": "green",
|
|
964
|
-
"description": "
|
|
967
|
+
"description": "System `green` color"
|
|
965
968
|
},
|
|
966
969
|
{
|
|
967
970
|
"name": "orange",
|
|
968
|
-
"description": "
|
|
971
|
+
"description": "System `orange` color"
|
|
969
972
|
},
|
|
970
973
|
{
|
|
971
974
|
"name": "purple",
|
|
972
|
-
"description": "
|
|
975
|
+
"description": "System `purple` color"
|
|
973
976
|
}
|
|
974
977
|
]
|
|
975
978
|
},
|
|
@@ -978,35 +981,107 @@
|
|
|
978
981
|
"values": [
|
|
979
982
|
{
|
|
980
983
|
"name": "secondary",
|
|
981
|
-
"description": "system secondary color"
|
|
984
|
+
"description": "Applies the system secondary color (`--secondary`)"
|
|
982
985
|
},
|
|
983
986
|
{
|
|
984
987
|
"name": "blue",
|
|
985
|
-
"description": "system blue color"
|
|
988
|
+
"description": "Applies the system blue color (`--blue`)"
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
"name": "red",
|
|
992
|
+
"description": "Applies the system red color (`--red`)"
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
"name": "green",
|
|
996
|
+
"description": "Applies the system green color (`--green`)"
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
"name": "orange",
|
|
1000
|
+
"description": "Applies the system orange color (`--orange`)"
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
"name": "purple",
|
|
1004
|
+
"description": "Applies the system purple color (`--purple`)"
|
|
986
1005
|
},
|
|
987
1006
|
{
|
|
988
1007
|
"name": "blue.secondary",
|
|
989
|
-
"description": "system secondary blue color"
|
|
1008
|
+
"description": "Applies the system secondary blue color (`--blue2`)"
|
|
990
1009
|
},
|
|
991
1010
|
{
|
|
992
|
-
"name": "
|
|
993
|
-
"description": "system
|
|
1011
|
+
"name": "red.secondary",
|
|
1012
|
+
"description": "Applies the system secondary red color (`--red2`)"
|
|
994
1013
|
},
|
|
995
1014
|
{
|
|
996
|
-
"name": "
|
|
997
|
-
"description": "system
|
|
1015
|
+
"name": "green.secondary",
|
|
1016
|
+
"description": "Applies the system secondary green color (`--green2`)"
|
|
998
1017
|
},
|
|
999
1018
|
{
|
|
1000
|
-
"name": "
|
|
1001
|
-
"description": "system
|
|
1019
|
+
"name": "orange.secondary",
|
|
1020
|
+
"description": "Applies the system secondary orange color (`--orange2`)"
|
|
1002
1021
|
},
|
|
1003
1022
|
{
|
|
1004
|
-
"name": "
|
|
1005
|
-
"description": "system
|
|
1023
|
+
"name": "purple.secondary",
|
|
1024
|
+
"description": "Applies the system secondary purple color (`--purple2`)"
|
|
1006
1025
|
},
|
|
1007
1026
|
{
|
|
1008
|
-
"name": "
|
|
1009
|
-
"description": "system
|
|
1027
|
+
"name": "blue.tertiary",
|
|
1028
|
+
"description": "Applies the system tertiary blue color (`--blue3`)"
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
"name": "red.tertiary",
|
|
1032
|
+
"description": "Applies the system tertiary red color (`--red3`)"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
"name": "green.tertiary",
|
|
1036
|
+
"description": "Applies the system tertiary green color (`--green3`)"
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
"name": "orange.tertiary",
|
|
1040
|
+
"description": "Applies the system tertiary orange color (`--orange3`)"
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
"name": "purple.tertiary",
|
|
1044
|
+
"description": "Applies the system tertiary purple color (`--purple3`)"
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"name": "blue.quaternary",
|
|
1048
|
+
"description": "Applies the system quaternary blue color (`--blue4`)"
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
"name": "red.quaternary",
|
|
1052
|
+
"description": "Applies the system quaternary red color (`--red4`)"
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
"name": "green.quaternary",
|
|
1056
|
+
"description": "Applies the system quaternary green color (`--green4`)"
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
"name": "orange.quaternary",
|
|
1060
|
+
"description": "Applies the system quaternary orange color (`--orange4`)"
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
"name": "purple.quaternary",
|
|
1064
|
+
"description": "Applies the system quaternary purple color (`--purple4`)"
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
"name": "blue.quinary",
|
|
1068
|
+
"description": "Applies the system quinary blue color (`--blue5`)"
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
"name": "red.quinary",
|
|
1072
|
+
"description": "Applies the system quinary red color (`--red5`)"
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"name": "green.quinary",
|
|
1076
|
+
"description": "Applies the system quinary green color (`--green5`)"
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
"name": "orange.quinary",
|
|
1080
|
+
"description": "Applies the system quinary orange color (`--orange5`)"
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
"name": "purple.quinary",
|
|
1084
|
+
"description": "Applies the system quinary purple color (`--purple5`)"
|
|
1010
1085
|
}
|
|
1011
1086
|
]
|
|
1012
1087
|
},
|