@dialpad/dialtone-css 8.80.0-next.2 → 8.80.0-next.4
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/lib/build/js/dialtone_migrate_link_rendering/button-nav-test-examples.vue +92 -0
- package/lib/build/js/dialtone_migrate_link_rendering/button-nav.test.mjs +272 -0
- package/lib/build/js/dialtone_migrate_link_rendering/helpers.mjs +25 -0
- package/lib/build/js/dialtone_migrate_link_rendering/index.mjs +1041 -0
- package/lib/build/js/dialtone_migrate_link_rendering/link-nav-test-examples.vue +97 -0
- package/lib/build/js/dialtone_migrate_link_rendering/link-nav.test.mjs +194 -0
- package/lib/build/js/dialtone_migrate_link_rendering/underline-test-examples.vue +57 -0
- package/lib/build/js/dialtone_migrate_link_rendering/underline.test.mjs +161 -0
- package/lib/build/js/dialtone_migrate_props/index.mjs +794 -0
- package/lib/build/js/dialtone_migrate_props/test.mjs +959 -0
- package/lib/build/js/dialtone_migration_helper/configs/base-to-semantic.mjs +8 -8
- package/lib/build/js/dialtone_migration_helper/configs/size-to-layout.mjs +10 -0
- package/lib/build/js/dialtone_migration_helper/configs/success-to-positive.mjs +73 -0
- package/lib/build/js/dialtone_migration_helper/configs/utility-class-to-token-stops.mjs +92 -12
- package/lib/build/js/dialtone_migration_helper/tests/base-to-semantic-test-examples.vue +10 -10
- package/lib/build/js/dialtone_migration_helper/tests/base-to-semantic.test.mjs +8 -8
- package/lib/build/js/dialtone_migration_helper/tests/size-to-layout-test-examples.vue +16 -0
- package/lib/build/js/dialtone_migration_helper/tests/size-to-layout.test.mjs +87 -0
- package/lib/build/js/dialtone_migration_helper/tests/success-to-positive-test-examples.vue +166 -0
- package/lib/build/js/dialtone_migration_helper/tests/success-to-positive.test.mjs +287 -0
- package/lib/build/js/dialtone_migration_helper/tests/utility-class-to-token-stops-radius-examples.vue +66 -0
- package/lib/build/js/dialtone_migration_helper/tests/utility-class-to-token-stops.test.mjs +170 -0
- package/lib/build/less/components/badge.less +1 -1
- package/lib/build/less/components/banner.less +1 -1
- package/lib/build/less/components/box.less +9 -22
- package/lib/build/less/components/description-list.less +4 -0
- package/lib/build/less/components/forms.less +4 -2
- package/lib/build/less/components/input.less +2 -2
- package/lib/build/less/components/link.less +18 -4
- package/lib/build/less/components/modal.less +1 -1
- package/lib/build/less/components/notice.less +3 -3
- package/lib/build/less/components/progress_circle.less +10 -2
- package/lib/build/less/components/prose.less +512 -0
- package/lib/build/less/components/rich-text-editor.less +31 -0
- package/lib/build/less/components/selects.less +1 -1
- package/lib/build/less/components/text.less +2 -0
- package/lib/build/less/components/toast.less +1 -1
- package/lib/build/less/dialtone.less +1 -0
- package/lib/build/less/recipes/leftbar_row.less +2 -2
- package/lib/build/less/recipes/settings_menu_button.less +1 -1
- package/lib/build/less/recipes/top_banner_info.less +1 -1
- package/lib/build/less/utilities/backgrounds.less +12 -0
- package/lib/build/less/utilities/borders.less +56 -89
- package/lib/build/less/utilities/colors.less +8 -0
- package/lib/build/less/utilities/effects.less +1 -0
- package/lib/build/less/utilities/flex.less +145 -18
- package/lib/build/less/utilities/grid.less +40 -152
- package/lib/build/less/utilities/layout.less +19 -7
- package/lib/build/less/utilities/sizing.less +148 -143
- package/lib/build/less/variables/visual-styles.less +2 -1
- package/lib/dist/dialtone-default-theme.css +2840 -1807
- package/lib/dist/dialtone-default-theme.min.css +1 -1
- package/lib/dist/dialtone-docs.json +1 -1
- package/lib/dist/dialtone.css +2747 -1756
- package/lib/dist/dialtone.min.css +1 -1
- package/lib/dist/js/dialtone_migrate_link_rendering/button-nav-test-examples.vue +92 -0
- package/lib/dist/js/dialtone_migrate_link_rendering/button-nav.test.mjs +272 -0
- package/lib/dist/js/dialtone_migrate_link_rendering/helpers.mjs +25 -0
- package/lib/dist/js/dialtone_migrate_link_rendering/index.mjs +1041 -0
- package/lib/dist/js/dialtone_migrate_link_rendering/link-nav-test-examples.vue +97 -0
- package/lib/dist/js/dialtone_migrate_link_rendering/link-nav.test.mjs +194 -0
- package/lib/dist/js/dialtone_migrate_link_rendering/underline-test-examples.vue +57 -0
- package/lib/dist/js/dialtone_migrate_link_rendering/underline.test.mjs +161 -0
- package/lib/dist/js/dialtone_migrate_props/index.mjs +794 -0
- package/lib/dist/js/dialtone_migrate_props/test.mjs +959 -0
- package/lib/dist/js/dialtone_migration_helper/configs/base-to-semantic.mjs +8 -8
- package/lib/dist/js/dialtone_migration_helper/configs/size-to-layout.mjs +10 -0
- package/lib/dist/js/dialtone_migration_helper/configs/success-to-positive.mjs +73 -0
- package/lib/dist/js/dialtone_migration_helper/configs/utility-class-to-token-stops.mjs +92 -12
- package/lib/dist/js/dialtone_migration_helper/tests/base-to-semantic-test-examples.vue +10 -10
- package/lib/dist/js/dialtone_migration_helper/tests/base-to-semantic.test.mjs +8 -8
- package/lib/dist/js/dialtone_migration_helper/tests/size-to-layout-test-examples.vue +16 -0
- package/lib/dist/js/dialtone_migration_helper/tests/size-to-layout.test.mjs +87 -0
- package/lib/dist/js/dialtone_migration_helper/tests/success-to-positive-test-examples.vue +166 -0
- package/lib/dist/js/dialtone_migration_helper/tests/success-to-positive.test.mjs +287 -0
- package/lib/dist/js/dialtone_migration_helper/tests/utility-class-to-token-stops-radius-examples.vue +66 -0
- package/lib/dist/js/dialtone_migration_helper/tests/utility-class-to-token-stops.test.mjs +170 -0
- package/lib/dist/tokens/tokens-101-dark.css +81 -45
- package/lib/dist/tokens/tokens-101-light.css +75 -39
- package/lib/dist/tokens/tokens-102-dark.css +81 -45
- package/lib/dist/tokens/tokens-102-light.css +75 -39
- package/lib/dist/tokens/tokens-103-dark.css +81 -45
- package/lib/dist/tokens/tokens-103-light.css +75 -39
- package/lib/dist/tokens/tokens-104-dark.css +81 -45
- package/lib/dist/tokens/tokens-104-light.css +75 -39
- package/lib/dist/tokens/tokens-105-dark.css +81 -45
- package/lib/dist/tokens/tokens-105-light.css +75 -39
- package/lib/dist/tokens/tokens-106-dark.css +81 -45
- package/lib/dist/tokens/tokens-106-light.css +75 -39
- package/lib/dist/tokens/tokens-107-dark.css +81 -45
- package/lib/dist/tokens/tokens-107-light.css +75 -39
- package/lib/dist/tokens/tokens-108-dark.css +81 -45
- package/lib/dist/tokens/tokens-108-light.css +75 -39
- package/lib/dist/tokens/tokens-109-dark.css +81 -45
- package/lib/dist/tokens/tokens-109-light.css +75 -39
- package/lib/dist/tokens/tokens-110-dark.css +81 -45
- package/lib/dist/tokens/tokens-110-light.css +75 -39
- package/lib/dist/tokens/tokens-111-dark.css +81 -45
- package/lib/dist/tokens/tokens-111-light.css +75 -39
- package/lib/dist/tokens/tokens-112-dark.css +81 -45
- package/lib/dist/tokens/tokens-112-light.css +75 -39
- package/lib/dist/tokens/tokens-113-dark.css +81 -45
- package/lib/dist/tokens/tokens-113-light.css +75 -39
- package/lib/dist/tokens/tokens-114-dark.css +81 -45
- package/lib/dist/tokens/tokens-114-light.css +75 -39
- package/lib/dist/tokens/tokens-115-dark.css +81 -45
- package/lib/dist/tokens/tokens-115-light.css +75 -39
- package/lib/dist/tokens/tokens-116-dark.css +81 -45
- package/lib/dist/tokens/tokens-116-light.css +75 -39
- package/lib/dist/tokens/tokens-117-dark.css +81 -45
- package/lib/dist/tokens/tokens-117-light.css +75 -39
- package/lib/dist/tokens/tokens-118-dark.css +81 -45
- package/lib/dist/tokens/tokens-118-light.css +75 -39
- package/lib/dist/tokens/tokens-119-dark.css +81 -45
- package/lib/dist/tokens/tokens-119-light.css +75 -39
- package/lib/dist/tokens/tokens-120-dark.css +81 -45
- package/lib/dist/tokens/tokens-120-light.css +75 -39
- package/lib/dist/tokens/tokens-121-dark.css +81 -45
- package/lib/dist/tokens/tokens-121-light.css +75 -39
- package/lib/dist/tokens/tokens-122-dark.css +81 -45
- package/lib/dist/tokens/tokens-122-light.css +75 -39
- package/lib/dist/tokens/tokens-123-dark.css +81 -45
- package/lib/dist/tokens/tokens-123-light.css +75 -39
- package/lib/dist/tokens/tokens-124-dark.css +81 -45
- package/lib/dist/tokens/tokens-124-light.css +75 -39
- package/lib/dist/tokens/tokens-125-dark.css +81 -45
- package/lib/dist/tokens/tokens-125-light.css +75 -39
- package/lib/dist/tokens/tokens-126-dark.css +81 -45
- package/lib/dist/tokens/tokens-126-light.css +75 -39
- package/lib/dist/tokens/tokens-127-dark.css +81 -45
- package/lib/dist/tokens/tokens-127-light.css +75 -39
- package/lib/dist/tokens/tokens-128-dark.css +81 -45
- package/lib/dist/tokens/tokens-128-light.css +75 -39
- package/lib/dist/tokens/tokens-129-dark.css +81 -45
- package/lib/dist/tokens/tokens-129-light.css +75 -39
- package/lib/dist/tokens/tokens-130-dark.css +81 -45
- package/lib/dist/tokens/tokens-130-light.css +75 -39
- package/lib/dist/tokens/tokens-131-dark.css +81 -45
- package/lib/dist/tokens/tokens-131-light.css +75 -39
- package/lib/dist/tokens/tokens-132-dark.css +81 -45
- package/lib/dist/tokens/tokens-132-light.css +75 -39
- package/lib/dist/tokens/tokens-133-dark.css +81 -45
- package/lib/dist/tokens/tokens-133-light.css +75 -39
- package/lib/dist/tokens/tokens-134-dark.css +81 -45
- package/lib/dist/tokens/tokens-134-light.css +75 -39
- package/lib/dist/tokens/tokens-135-dark.css +81 -45
- package/lib/dist/tokens/tokens-135-light.css +75 -39
- package/lib/dist/tokens/tokens-136-dark.css +81 -45
- package/lib/dist/tokens/tokens-136-light.css +75 -39
- package/lib/dist/tokens/tokens-137-dark.css +81 -45
- package/lib/dist/tokens/tokens-137-light.css +75 -39
- package/lib/dist/tokens/tokens-aegean-dark.css +81 -45
- package/lib/dist/tokens/tokens-aegean-light.css +75 -39
- package/lib/dist/tokens/tokens-base-dark.css +18 -12
- package/lib/dist/tokens/tokens-base-light.css +18 -12
- package/lib/dist/tokens/tokens-botany-dark.css +81 -45
- package/lib/dist/tokens/tokens-botany-light.css +75 -39
- package/lib/dist/tokens/tokens-buttercream-dark.css +81 -45
- package/lib/dist/tokens/tokens-buttercream-light.css +75 -39
- package/lib/dist/tokens/tokens-ceruleo-dark.css +81 -45
- package/lib/dist/tokens/tokens-ceruleo-light.css +75 -39
- package/lib/dist/tokens/tokens-debug-base.css +6 -0
- package/lib/dist/tokens/tokens-debug-dp.css +39 -3
- package/lib/dist/tokens/tokens-dp-dark.css +81 -45
- package/lib/dist/tokens/tokens-dp-light.css +75 -39
- package/lib/dist/tokens/tokens-expressive-dark.css +81 -45
- package/lib/dist/tokens/tokens-expressive-light.css +75 -39
- package/lib/dist/tokens/tokens-expressive-sm-dark.css +81 -45
- package/lib/dist/tokens/tokens-expressive-sm-light.css +75 -39
- package/lib/dist/tokens/tokens-high-desert-dark.css +81 -45
- package/lib/dist/tokens/tokens-high-desert-light.css +75 -39
- package/lib/dist/tokens/tokens-melon-dark.css +81 -45
- package/lib/dist/tokens/tokens-melon-light.css +75 -39
- package/lib/dist/tokens/tokens-plum-dark.css +81 -45
- package/lib/dist/tokens/tokens-plum-light.css +75 -39
- package/lib/dist/tokens/tokens-prota-deuter-dark.css +79 -43
- package/lib/dist/tokens/tokens-prota-deuter-light.css +74 -38
- package/lib/dist/tokens/tokens-sunflower-dark.css +81 -45
- package/lib/dist/tokens/tokens-sunflower-light.css +75 -39
- package/lib/dist/tokens/tokens-tmo-dark.css +81 -45
- package/lib/dist/tokens/tokens-tmo-light.css +75 -39
- package/lib/dist/tokens/tokens-trita-dark.css +81 -45
- package/lib/dist/tokens/tokens-trita-light.css +75 -39
- package/lib/dist/tokens/tokens-verdant-haze-dark.css +81 -45
- package/lib/dist/tokens/tokens-verdant-haze-light.css +75 -39
- package/lib/dist/tokens-docs.json +1 -1
- package/package.json +10 -5
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { describe, it } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import config from '../configs/utility-class-to-token-stops.mjs';
|
|
4
|
+
import { applyConfig } from './helpers.mjs';
|
|
5
|
+
|
|
6
|
+
const apply = (input) => applyConfig(config, input);
|
|
7
|
+
|
|
8
|
+
describe('utility-class-to-token-stops config', () => {
|
|
9
|
+
// ─── Off-scale pixel-indexed sizing classes (DLT-3330) ────────────────
|
|
10
|
+
//
|
|
11
|
+
// Old legacy Tier 1 calc-based selectors → new hyphenated px-suffixed selectors.
|
|
12
|
+
// d-w1 → d-w-1px, d-h2 → d-h-2px, d-hmn8 → d-hmn-8px, etc.
|
|
13
|
+
|
|
14
|
+
describe('off-scale sizing — legacy small-value selectors migrate to Npx', () => {
|
|
15
|
+
const prefixes = ['h', 'w', 'hmn', 'hmx', 'wmn', 'wmx'];
|
|
16
|
+
const pxValues = [1, 2, 8, 20, 24];
|
|
17
|
+
|
|
18
|
+
for (const prefix of prefixes) {
|
|
19
|
+
for (const px of pxValues) {
|
|
20
|
+
const from = `d-${prefix}${px}`;
|
|
21
|
+
const to = `d-${prefix}-${px}px`;
|
|
22
|
+
it(`${from} → ${to}`, () => {
|
|
23
|
+
assert.equal(apply(`<div class="${from}" />`), `<div class="${to}" />`);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// ─── Existing scale-indexed rewrites unchanged (smoke tests) ──────────
|
|
30
|
+
|
|
31
|
+
describe('scale-indexed sizing — unchanged', () => {
|
|
32
|
+
const cases = [
|
|
33
|
+
['d-h16', 'd-h-25'],
|
|
34
|
+
['d-w32', 'd-w-50'],
|
|
35
|
+
['d-w64', 'd-w-100'],
|
|
36
|
+
['d-hmn96', 'd-hmn-150'],
|
|
37
|
+
['d-hmx128', 'd-hmx-200'],
|
|
38
|
+
['d-w1024', 'd-w-1600'],
|
|
39
|
+
['d-wmn16', 'd-wmn-25'],
|
|
40
|
+
];
|
|
41
|
+
for (const [from, to] of cases) {
|
|
42
|
+
it(`${from} → ${to}`, () => {
|
|
43
|
+
assert.equal(apply(`<div class="${from}" />`), `<div class="${to}" />`);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
// ─── Regex disambiguation: longer alternatives must win over shorter ones ─
|
|
49
|
+
|
|
50
|
+
describe('regex alternation — longest match wins', () => {
|
|
51
|
+
it('d-w1024 matches 1024, not 1', () => {
|
|
52
|
+
assert.equal(apply(`<div class="d-w1024" />`), `<div class="d-w-1600" />`);
|
|
53
|
+
});
|
|
54
|
+
it('d-w128 matches 128, not 1 or 2', () => {
|
|
55
|
+
assert.equal(apply(`<div class="d-w128" />`), `<div class="d-w-200" />`);
|
|
56
|
+
});
|
|
57
|
+
it('d-w24 matches 24 (off-scale), not 2', () => {
|
|
58
|
+
assert.equal(apply(`<div class="d-w24" />`), `<div class="d-w-24px" />`);
|
|
59
|
+
});
|
|
60
|
+
it('d-h20 matches 20 (off-scale), not 2', () => {
|
|
61
|
+
assert.equal(apply(`<div class="d-h20" />`), `<div class="d-h-20px" />`);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
// ─── Spacing/margin/padding classes still map to spacing stops ────────
|
|
66
|
+
|
|
67
|
+
describe('margin / padding / gap — unchanged behavior', () => {
|
|
68
|
+
const cases = [
|
|
69
|
+
['d-m8', 'd-m-100'], // margin 8px → spacing-100
|
|
70
|
+
['d-p8', 'd-p-100'], // padding 8px → spacing-100
|
|
71
|
+
['d-g8', 'd-g-100'], // gap 8px → spacing-100
|
|
72
|
+
['d-mt16', 'd-mt-200'], // margin-top 16px → spacing-200
|
|
73
|
+
['d-pb24', 'd-pb-300'], // padding-bottom 24px → spacing-300
|
|
74
|
+
];
|
|
75
|
+
for (const [from, to] of cases) {
|
|
76
|
+
it(`${from} → ${to}`, () => {
|
|
77
|
+
assert.equal(apply(`<div class="${from}" />`), `<div class="${to}" />`);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
// ─── Multi-class strings ──────────────────────────────────────────────
|
|
83
|
+
|
|
84
|
+
describe('multi-class migration', () => {
|
|
85
|
+
it('migrates each off-scale sizing class in a space-separated list', () => {
|
|
86
|
+
const input = `<div class="d-w1 d-h2 d-size-25 d-hmn8 d-wmx24" />`;
|
|
87
|
+
const expected = `<div class="d-w-1px d-h-2px d-size-25 d-hmn-8px d-wmx-24px" />`;
|
|
88
|
+
assert.equal(apply(input), expected);
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// ─── Border-radius migration (DLT-3329) ───────────────────────────────
|
|
93
|
+
|
|
94
|
+
describe('border-radius all-corners — legacy pixel-suffix to token stop', () => {
|
|
95
|
+
const cases = [
|
|
96
|
+
['d-bar0', 'd-bar-0'],
|
|
97
|
+
['d-bar1', 'd-bar-100'],
|
|
98
|
+
['d-bar2', 'd-bar-200'],
|
|
99
|
+
['d-bar4', 'd-bar-300'],
|
|
100
|
+
['d-bar6', 'd-bar-350'],
|
|
101
|
+
['d-bar8', 'd-bar-400'],
|
|
102
|
+
['d-bar12', 'd-bar-450'],
|
|
103
|
+
['d-bar16', 'd-bar-500'],
|
|
104
|
+
['d-bar24', 'd-bar-550'],
|
|
105
|
+
['d-bar32', 'd-bar-600'],
|
|
106
|
+
];
|
|
107
|
+
for (const [from, to] of cases) {
|
|
108
|
+
it(`${from} → ${to}`, () => {
|
|
109
|
+
assert.equal(apply(`<div class="${from}" />`), `<div class="${to}" />`);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
describe('border-radius side-pair numeric — physical prefix to logical prefix', () => {
|
|
115
|
+
const cases = [
|
|
116
|
+
['d-btr6', 'd-bbsr-350'], // top → block-start pair
|
|
117
|
+
['d-bbr8', 'd-bber-400'], // bottom → block-end pair
|
|
118
|
+
['d-blr12', 'd-bisr-450'], // left → inline-start pair
|
|
119
|
+
['d-brr16', 'd-bier-500'], // right → inline-end pair
|
|
120
|
+
['d-btr24', 'd-bbsr-550'], // new 550 stop
|
|
121
|
+
['d-bbr32', 'd-bber-600'],
|
|
122
|
+
['d-blr0', 'd-bisr-0'],
|
|
123
|
+
['d-brr1', 'd-bier-100'],
|
|
124
|
+
];
|
|
125
|
+
for (const [from, to] of cases) {
|
|
126
|
+
it(`${from} → ${to}`, () => {
|
|
127
|
+
assert.equal(apply(`<div class="${from}" />`), `<div class="${to}" />`);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
describe('border-radius side-pair keyword — pill/circle', () => {
|
|
133
|
+
const cases = [
|
|
134
|
+
['d-btr-pill', 'd-bbsr-pill'],
|
|
135
|
+
['d-btr-circle', 'd-bbsr-circle'],
|
|
136
|
+
['d-bbr-pill', 'd-bber-pill'],
|
|
137
|
+
['d-bbr-circle', 'd-bber-circle'],
|
|
138
|
+
['d-blr-pill', 'd-bisr-pill'],
|
|
139
|
+
['d-blr-circle', 'd-bisr-circle'],
|
|
140
|
+
['d-brr-pill', 'd-bier-pill'],
|
|
141
|
+
['d-brr-circle', 'd-bier-circle'],
|
|
142
|
+
];
|
|
143
|
+
for (const [from, to] of cases) {
|
|
144
|
+
it(`${from} → ${to}`, () => {
|
|
145
|
+
assert.equal(apply(`<div class="${from}" />`), `<div class="${to}" />`);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
describe('border-radius canonical keyword names — unchanged', () => {
|
|
151
|
+
const cases = [
|
|
152
|
+
'd-bar-pill',
|
|
153
|
+
'd-bar-circle',
|
|
154
|
+
'd-bar-unset',
|
|
155
|
+
];
|
|
156
|
+
for (const unchanged of cases) {
|
|
157
|
+
it(`${unchanged} stays as ${unchanged}`, () => {
|
|
158
|
+
assert.equal(apply(`<div class="${unchanged}" />`), `<div class="${unchanged}" />`);
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
describe('border-radius multi-class migration', () => {
|
|
164
|
+
it('rewrites mixed legacy classes in one string', () => {
|
|
165
|
+
const input = `<div class="d-bar6 d-btr8 d-blr-pill d-p-200" />`;
|
|
166
|
+
const expected = `<div class="d-bar-350 d-bbsr-400 d-bisr-pill d-p-200" />`;
|
|
167
|
+
assert.equal(apply(input), expected);
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
});
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
--banner-dialog-padding-y: var(--dt-spacing-100);
|
|
20
20
|
--banner-dialog-padding-x: var(--dt-spacing-200);
|
|
21
21
|
--notice-icon-gap: var(--dt-spacing-100);
|
|
22
|
-
--notice-actions-align:
|
|
22
|
+
--notice-actions-align: center;
|
|
23
23
|
|
|
24
24
|
position: fixed;
|
|
25
25
|
inset-block-start: 0;
|
|
@@ -62,7 +62,12 @@
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
._box-layout(@prop) {
|
|
65
|
+
&-1px { @{prop}: var(--dt-layout-1px); }
|
|
66
|
+
&-2px { @{prop}: var(--dt-layout-2px); }
|
|
67
|
+
&-8px { @{prop}: var(--dt-layout-8px); }
|
|
65
68
|
&-25 { @{prop}: var(--dt-layout-25); }
|
|
69
|
+
&-20px { @{prop}: var(--dt-layout-20px); }
|
|
70
|
+
&-24px { @{prop}: var(--dt-layout-24px); }
|
|
66
71
|
&-50 { @{prop}: var(--dt-layout-50); }
|
|
67
72
|
&-75 { @{prop}: var(--dt-layout-75); }
|
|
68
73
|
each(range(0, 1600, 100), {
|
|
@@ -70,7 +75,7 @@
|
|
|
70
75
|
});
|
|
71
76
|
// Percentage tokens
|
|
72
77
|
each(@box-layout-percent-values, {
|
|
73
|
-
&-@{value}
|
|
78
|
+
&-@{value}p { @{prop}: ~"var(--dt-layout-@{value}-percent)"; }
|
|
74
79
|
});
|
|
75
80
|
}
|
|
76
81
|
|
|
@@ -97,15 +102,9 @@
|
|
|
97
102
|
// ============================================================================
|
|
98
103
|
// $ VALUE LISTS
|
|
99
104
|
// ----------------------------------------------------------------------------
|
|
100
|
-
|
|
101
|
-
// tokens still use legacy `success*` naming (no `--dt-color-surface-positive-*`
|
|
102
|
-
// exists yet), so `positive*` modifier classes are generated from explicit
|
|
103
|
-
// alias blocks below that map to `--dt-color-surface-success-*` /
|
|
104
|
-
// `--dt-color-border-success-*`. Once DLT-3331 lands the token rename,
|
|
105
|
-
// `positive*` moves into these lists and the alias blocks can be dropped.
|
|
106
|
-
@box-surface-values: primary, secondary, moderate, bold, strong, contrast, backdrop, brand, info, warning, critical, brand-subtle, brand-strong, info-subtle, info-strong, warning-subtle, warning-strong, critical-subtle, critical-strong, primary-opaque, secondary-opaque, moderate-opaque, bold-opaque, strong-opaque, contrast-opaque, brand-opaque, brand-subtle-opaque, info-opaque, info-subtle-opaque, warning-opaque, warning-subtle-opaque, critical-opaque, critical-subtle-opaque;
|
|
105
|
+
@box-surface-values: primary, secondary, moderate, bold, strong, contrast, backdrop, brand, info, warning, critical, positive, success, brand-subtle, brand-strong, info-subtle, info-strong, warning-subtle, warning-strong, critical-subtle, critical-strong, positive-subtle, positive-strong, success-subtle, success-strong, primary-opaque, secondary-opaque, moderate-opaque, bold-opaque, strong-opaque, contrast-opaque, brand-opaque, brand-subtle-opaque, info-opaque, info-subtle-opaque, warning-opaque, warning-subtle-opaque, critical-opaque, critical-subtle-opaque, positive-opaque, positive-subtle-opaque, success-opaque, success-subtle-opaque;
|
|
107
106
|
|
|
108
|
-
@box-border-color-values: subtle, default, moderate, bold, accent, focus, brand, warning, critical, brand-subtle, brand-strong, warning-subtle, warning-strong, critical-subtle, critical-strong;
|
|
107
|
+
@box-border-color-values: subtle, default, moderate, bold, accent, focus, brand, warning, critical, info, positive, success, brand-subtle, brand-strong, warning-subtle, warning-strong, critical-subtle, critical-strong, info-subtle, info-strong, positive-subtle, positive-strong, success-subtle, success-strong;
|
|
109
108
|
|
|
110
109
|
@box-border-width-values: 0, 50, 100, 150, 200, 300, 400;
|
|
111
110
|
@box-layout-percent-values: 10, 20, 25, 30, 33, 40, 50, 60, 66, 70, 75, 80, 90, 95, 100;
|
|
@@ -161,13 +160,6 @@
|
|
|
161
160
|
// ----------------------------------------------------------------------------
|
|
162
161
|
._box-token(surface; --box-surface; dt-color-surface; @box-surface-values);
|
|
163
162
|
|
|
164
|
-
// `positive` prop → maps to `--dt-color-surface-success-*` tokens (surface tokens use legacy `success` naming; see DLT-3331)
|
|
165
|
-
.d-box--surface-positive { --box-surface: var(--dt-color-surface-success); }
|
|
166
|
-
.d-box--surface-positive-subtle { --box-surface: var(--dt-color-surface-success-subtle); }
|
|
167
|
-
.d-box--surface-positive-strong { --box-surface: var(--dt-color-surface-success-strong); }
|
|
168
|
-
.d-box--surface-positive-opaque { --box-surface: var(--dt-color-surface-success-opaque); }
|
|
169
|
-
.d-box--surface-positive-subtle-opaque { --box-surface: var(--dt-color-surface-success-subtle-opaque); }
|
|
170
|
-
|
|
171
163
|
// ----------------------------------------------------------------------------
|
|
172
164
|
// $$ BORDER
|
|
173
165
|
// ----------------------------------------------------------------------------
|
|
@@ -175,12 +167,7 @@
|
|
|
175
167
|
.d-box--bc-transparent { --box-bc: transparent; }
|
|
176
168
|
._box-token(bc; --box-bc; dt-color-border; @box-border-color-values);
|
|
177
169
|
|
|
178
|
-
|
|
179
|
-
.d-box--bc-positive { --box-bc: var(--dt-color-border-success); }
|
|
180
|
-
.d-box--bc-positive-subtle { --box-bc: var(--dt-color-border-success-subtle); }
|
|
181
|
-
.d-box--bc-positive-strong { --box-bc: var(--dt-color-border-success-strong); }
|
|
182
|
-
|
|
183
|
-
@box-border-radius-values: 0, 100, 200, 300, 350, 400, 450, 500, 600;
|
|
170
|
+
@box-border-radius-values: 0, 100, 200, 300, 350, 400, 450, 500, 550, 600;
|
|
184
171
|
|
|
185
172
|
// Border width — 7 axes × border-width scale
|
|
186
173
|
.d-box--bw { ._box-border-width(--box-bw); }
|
|
@@ -157,7 +157,8 @@ fieldset {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
.d-validation-message--critical
|
|
160
|
+
.d-validation-message--critical,
|
|
161
|
+
.d-validation-message--error {
|
|
161
162
|
--validation-color-text: var(--dt-color-foreground-critical);
|
|
162
163
|
|
|
163
164
|
&::before {
|
|
@@ -165,7 +166,8 @@ fieldset {
|
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
168
|
|
|
168
|
-
.d-validation-message--positive
|
|
169
|
+
.d-validation-message--positive,
|
|
170
|
+
.d-validation-message--success {
|
|
169
171
|
--validation-color-text: var(--dt-color-foreground-positive);
|
|
170
172
|
|
|
171
173
|
&::before {
|
|
@@ -300,12 +300,12 @@
|
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
.d-input--positive {
|
|
303
|
-
--input-color-border: var(--dt-inputs-color-border-
|
|
303
|
+
--input-color-border: var(--dt-inputs-color-border-positive) !important;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
// @deprecated Use .d-input--positive
|
|
307
307
|
.d-input--success {
|
|
308
|
-
--input-color-border: var(--dt-inputs-color-border-
|
|
308
|
+
--input-color-border: var(--dt-inputs-color-border-positive) !important;
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
// ============================================================================
|
|
@@ -95,8 +95,15 @@
|
|
|
95
95
|
// ----------------------------------------------------------------------------
|
|
96
96
|
&--positive,
|
|
97
97
|
&--success {
|
|
98
|
-
--link-color-default: var(--dt-color-link-
|
|
99
|
-
--link-color-default-hover: var(--dt-color-link-
|
|
98
|
+
--link-color-default: var(--dt-color-link-positive);
|
|
99
|
+
--link-color-default-hover: var(--dt-color-link-positive-hover);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// $$ INFO
|
|
103
|
+
// ----------------------------------------------------------------------------
|
|
104
|
+
&--info {
|
|
105
|
+
--link-color-default: var(--dt-color-link-info);
|
|
106
|
+
--link-color-default-hover: var(--dt-color-link-info-hover);
|
|
100
107
|
}
|
|
101
108
|
|
|
102
109
|
// $$ MUTED
|
|
@@ -154,8 +161,8 @@
|
|
|
154
161
|
// ----------------------------------------------------------------------------
|
|
155
162
|
&--inverted-positive,
|
|
156
163
|
&--inverted-success {
|
|
157
|
-
--link-color-default: var(--dt-color-link-
|
|
158
|
-
--link-color-default-hover: var(--dt-color-link-
|
|
164
|
+
--link-color-default: var(--dt-color-link-positive-inverted);
|
|
165
|
+
--link-color-default-hover: var(--dt-color-link-positive-inverted-hover);
|
|
159
166
|
}
|
|
160
167
|
|
|
161
168
|
// $$ INVERTED WARNING
|
|
@@ -165,6 +172,13 @@
|
|
|
165
172
|
--link-color-default-hover: var(--dt-color-link-warning-inverted-hover);
|
|
166
173
|
}
|
|
167
174
|
|
|
175
|
+
// $$ INVERTED INFO
|
|
176
|
+
// ----------------------------------------------------------------------------
|
|
177
|
+
&--inverted-info {
|
|
178
|
+
--link-color-default: var(--dt-color-link-info-inverted);
|
|
179
|
+
--link-color-default-hover: var(--dt-color-link-info-inverted-hover);
|
|
180
|
+
}
|
|
181
|
+
|
|
168
182
|
// $$ INVERTED MUTED
|
|
169
183
|
// ----------------------------------------------------------------------------
|
|
170
184
|
&--inverted-muted {
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
.d-banner--info,
|
|
145
145
|
.d-toast--info {
|
|
146
146
|
--notice-color-background: var(--dt-color-surface-info);
|
|
147
|
-
--notice-color-icon: var(--dt-color-
|
|
147
|
+
--notice-color-icon: var(--dt-color-foreground-info);
|
|
148
148
|
|
|
149
149
|
&.d-notice--important,
|
|
150
150
|
&.d-banner--important,
|
|
@@ -162,13 +162,13 @@
|
|
|
162
162
|
.d-notice--success,
|
|
163
163
|
.d-banner--success,
|
|
164
164
|
.d-toast--success {
|
|
165
|
-
--notice-color-background: var(--dt-color-surface-
|
|
165
|
+
--notice-color-background: var(--dt-color-surface-positive);
|
|
166
166
|
--notice-color-icon: var(--dt-color-foreground-positive);
|
|
167
167
|
|
|
168
168
|
&.d-notice--important,
|
|
169
169
|
&.d-banner--important,
|
|
170
170
|
&.d-toast--important {
|
|
171
|
-
--notice-color-background: var(--dt-color-surface-
|
|
171
|
+
--notice-color-background: var(--dt-color-surface-positive-strong);
|
|
172
172
|
--notice-color-text: var(--dt-color-foreground-primary-inverted);
|
|
173
173
|
}
|
|
174
174
|
}
|
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
//
|
|
5
5
|
// https://dialtone.dialpad.com/components/progress-circle
|
|
6
6
|
|
|
7
|
+
// @@ @PROPERTY REGISTRATIONS
|
|
8
|
+
// ----------------------------------------------------------------------------
|
|
9
|
+
// `--progress-size` is only read on `.d-progress-circle` itself, so registering
|
|
10
|
+
// as non-inheriting is safe. `--progress-color` is NOT registered — it is set
|
|
11
|
+
// on `.d-progress-circle` and consumed by descendant `.d-progress-circle__shape`
|
|
12
|
+
// elements via inheritance.
|
|
13
|
+
@property --progress-size { syntax: "*"; inherits: false; }
|
|
14
|
+
|
|
7
15
|
@layer dialtone.components {
|
|
8
16
|
.d-progress-circle {
|
|
9
17
|
--progress-size: var(--dt-icon-size-500);
|
|
@@ -24,12 +32,12 @@
|
|
|
24
32
|
|
|
25
33
|
&--brand { --progress-color: var(--dt-color-border-brand); }
|
|
26
34
|
&--critical { --progress-color: var(--dt-color-border-critical); }
|
|
27
|
-
&--positive { --progress-color: var(--dt-color-border-
|
|
35
|
+
&--positive { --progress-color: var(--dt-color-border-positive); }
|
|
28
36
|
&--warning { --progress-color: var(--dt-color-border-warning); }
|
|
29
37
|
// AI fill gradient is an SVG <linearGradient> applied in the Vue component;
|
|
30
38
|
// the track intentionally keeps the default border color.
|
|
31
39
|
&--ai { --progress-color: var(--dt-color-border-bold); }
|
|
32
|
-
&--info { --progress-color: var(--dt-color-
|
|
40
|
+
&--info { --progress-color: var(--dt-color-border-info); }
|
|
33
41
|
}
|
|
34
42
|
|
|
35
43
|
.d-progress-circle__bar {
|