@ctrliq/quantic-components 1.84.0 → 1.84.1
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/capacity-bar/index.js +30 -30
- package/dist/card/card-carousel.component.js +35 -35
- package/dist/card/card-group.component.js +2 -8
- package/dist/card/card.component.js +38 -38
- package/dist/code-input/index.js +33 -33
- package/dist/combobox/index.js +30 -30
- package/dist/dialog/dialog.js +18 -18
- package/dist/dropdown-menu/item.component.js +24 -24
- package/dist/field/field-group.component.js +13 -13
- package/dist/field/field.component.js +31 -31
- package/dist/fieldset/fieldset.component.js +27 -27
- package/dist/grid/grid.component.js +31 -31
- package/dist/index.js.map +1 -1
- package/dist/layout/layout.component.js +1 -0
- package/dist/layout/navbar-menu-item.component.js +1 -0
- package/dist/layout/sidebar-menu-item.component.js +1 -0
- package/dist/log-output/log-output.component.js +1 -1
- package/dist/meta/index.js.map +1 -1
- package/dist/meta/public-css-variables.test.d.ts +1 -0
- package/dist/meta/public-css-variables.test.js +244 -0
- package/dist/meta.json +1 -1
- package/dist/number-input/index.js +18 -17
- package/dist/option-card/option-card.component.js +27 -27
- package/dist/panel/panel-group.component.js +10 -7
- package/dist/panel/panel.component.js +3 -3
- package/dist/progress/index.js +15 -15
- package/dist/quantic-components.js +443 -439
- package/dist/quantic-components.js.map +1 -1
- package/dist/quantic-components.min.js +443 -439
- package/dist/quantic-components.min.js.map +1 -1
- package/dist/register.js.map +1 -1
- package/dist/select/index.js +8 -8
- package/dist/spinner/index.js +7 -3
- package/dist/table/table-cell.component.js +2 -2
- package/dist/table/table-head.component.js +1 -1
- package/dist/table/table.component.js +16 -16
- package/dist/text-input/index.js +10 -10
- package/dist/textarea/index.js +10 -10
- package/dist/tooltip/tooltip.js +0 -1
- package/dist/types/meta/public-css-variables.test.d.ts +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { globSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import postcss from 'postcss';
|
|
5
|
+
import { describe, expect, it } from 'vitest';
|
|
6
|
+
const SRC_DIR = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
7
|
+
const PUBLIC = /^--quantic-component-[a-z0-9-]+$/;
|
|
8
|
+
const PRIVATE = /^--quantic-internal-[a-z0-9-]+$/;
|
|
9
|
+
const TAG = /@quanticElement\(\s*['"`]quantic-([a-z0-9-]+)['"`]/g;
|
|
10
|
+
const VAR_CALL = /var\(\s*(--[a-z0-9_-]+)/g;
|
|
11
|
+
function skipInterpolation(source, start) {
|
|
12
|
+
let depth = 0;
|
|
13
|
+
for (let cursor = start; cursor < source.length; cursor += 1) {
|
|
14
|
+
if (source[cursor] === '{')
|
|
15
|
+
depth += 1;
|
|
16
|
+
else if (source[cursor] === '}') {
|
|
17
|
+
depth -= 1;
|
|
18
|
+
if (depth === 0)
|
|
19
|
+
return cursor + 1;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return source.length;
|
|
23
|
+
}
|
|
24
|
+
function readTemplate(source, start) {
|
|
25
|
+
let css = '';
|
|
26
|
+
let index = start;
|
|
27
|
+
while (index < source.length && source[index] !== '`') {
|
|
28
|
+
if (source[index] === '$' && source[index + 1] === '{') {
|
|
29
|
+
index = skipInterpolation(source, index + 1);
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
css += source[index];
|
|
33
|
+
index += 1;
|
|
34
|
+
}
|
|
35
|
+
return { css, end: index };
|
|
36
|
+
}
|
|
37
|
+
function isInComment(source, matchIndex) {
|
|
38
|
+
const lineStart = source.lastIndexOf('\n', matchIndex) + 1;
|
|
39
|
+
const prefix = source.slice(lineStart, matchIndex).trim();
|
|
40
|
+
return prefix.startsWith('*') || prefix.startsWith('//');
|
|
41
|
+
}
|
|
42
|
+
function parse(source) {
|
|
43
|
+
const blocks = /\bcss`/g;
|
|
44
|
+
const roots = [];
|
|
45
|
+
for (let match = blocks.exec(source); match; match = blocks.exec(source)) {
|
|
46
|
+
const { css, end } = readTemplate(source, blocks.lastIndex);
|
|
47
|
+
blocks.lastIndex = end + 1;
|
|
48
|
+
if (!isInComment(source, match.index))
|
|
49
|
+
roots.push(postcss.parse(css));
|
|
50
|
+
}
|
|
51
|
+
return roots;
|
|
52
|
+
}
|
|
53
|
+
function namespacesOf(source) {
|
|
54
|
+
return [...source.matchAll(TAG)].map(([, name]) => `--quantic-component-${name}-`);
|
|
55
|
+
}
|
|
56
|
+
const elements = globSync('**/*.ts', { cwd: SRC_DIR })
|
|
57
|
+
.filter((file) => !/\.(stories|test|d)\.ts$/.test(file))
|
|
58
|
+
.map((file) => ({ file, source: readFileSync(join(SRC_DIR, file), 'utf-8') }))
|
|
59
|
+
.map(({ file, source }) => ({
|
|
60
|
+
file,
|
|
61
|
+
dir: file.split('/')[0],
|
|
62
|
+
tags: [...source.matchAll(TAG)].map(([, name]) => `quantic-${name}`),
|
|
63
|
+
roots: parse(source),
|
|
64
|
+
namespaces: namespacesOf(source),
|
|
65
|
+
}))
|
|
66
|
+
.filter(({ roots }) => roots.length > 0);
|
|
67
|
+
const components = Object.entries(elements
|
|
68
|
+
.reduce((grouped, { dir, roots, namespaces }) => {
|
|
69
|
+
const found = grouped[dir] ?? { file: dir, roots: [], namespaces: [] };
|
|
70
|
+
return {
|
|
71
|
+
...grouped,
|
|
72
|
+
[dir]: {
|
|
73
|
+
file: dir,
|
|
74
|
+
roots: [...found.roots, ...roots],
|
|
75
|
+
namespaces: [...found.namespaces, ...namespaces],
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
}, {})).map(([, component]) => component);
|
|
79
|
+
function hasFallback(value, openIndex) {
|
|
80
|
+
return [...value.slice(openIndex)].reduce((state, char) => {
|
|
81
|
+
if (state.closed)
|
|
82
|
+
return state;
|
|
83
|
+
if (char === '(')
|
|
84
|
+
return { ...state, depth: state.depth + 1 };
|
|
85
|
+
if (char === ')') {
|
|
86
|
+
const depth = state.depth - 1;
|
|
87
|
+
return { ...state, depth, closed: depth === 0 };
|
|
88
|
+
}
|
|
89
|
+
if (char === ',' && state.depth === 1)
|
|
90
|
+
return { ...state, found: true };
|
|
91
|
+
return state;
|
|
92
|
+
}, { depth: 0, closed: false, found: false }).found;
|
|
93
|
+
}
|
|
94
|
+
function varCalls(value) {
|
|
95
|
+
return [...value.matchAll(VAR_CALL)].map((match) => ({
|
|
96
|
+
name: match[1],
|
|
97
|
+
hasFallback: hasFallback(value, (match.index ?? 0) + 3),
|
|
98
|
+
}));
|
|
99
|
+
}
|
|
100
|
+
function isHostOnly(rule) {
|
|
101
|
+
return rule.selectors.every((selector) => selector.trim().startsWith(':host'));
|
|
102
|
+
}
|
|
103
|
+
function declarations(component) {
|
|
104
|
+
const found = [];
|
|
105
|
+
for (const root of component.roots) {
|
|
106
|
+
root.walkDecls((decl) => {
|
|
107
|
+
found.push(decl);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
return found;
|
|
111
|
+
}
|
|
112
|
+
function reads(component) {
|
|
113
|
+
const names = new Set();
|
|
114
|
+
for (const root of component.roots) {
|
|
115
|
+
root.walkDecls((decl) => {
|
|
116
|
+
for (const { name } of varCalls(decl.value)) {
|
|
117
|
+
if (name !== decl.prop)
|
|
118
|
+
names.add(name);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
return names;
|
|
123
|
+
}
|
|
124
|
+
function hostDeclared(component) {
|
|
125
|
+
const names = new Set();
|
|
126
|
+
for (const decl of declarations(component)) {
|
|
127
|
+
const parent = decl.parent;
|
|
128
|
+
if (parent?.type === 'rule' && isHostOnly(parent))
|
|
129
|
+
names.add(decl.prop);
|
|
130
|
+
}
|
|
131
|
+
return names;
|
|
132
|
+
}
|
|
133
|
+
function innerDeclarations(component, pattern) {
|
|
134
|
+
return declarations(component).filter((decl) => {
|
|
135
|
+
if (!pattern.test(decl.prop))
|
|
136
|
+
return false;
|
|
137
|
+
const parent = decl.parent;
|
|
138
|
+
if (!parent || parent.type !== 'rule')
|
|
139
|
+
return true;
|
|
140
|
+
return !isHostOnly(parent);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function privateDeclarations(element) {
|
|
144
|
+
const names = new Set();
|
|
145
|
+
for (const root of element.roots) {
|
|
146
|
+
root.walkDecls((decl) => {
|
|
147
|
+
if (PRIVATE.test(decl.prop))
|
|
148
|
+
names.add(decl.prop);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
return names;
|
|
152
|
+
}
|
|
153
|
+
describe('public CSS variables', () => {
|
|
154
|
+
it('parses the stylesheet of every component that declares one', () => {
|
|
155
|
+
expect(components.length).toBeGreaterThan(40);
|
|
156
|
+
});
|
|
157
|
+
it('reads a stylesheet past an interpolated template literal', () => {
|
|
158
|
+
const spinner = components.find((component) => component.file === 'spinner');
|
|
159
|
+
expect(spinner, 'quantic-spinner is the fixture for this check').toBeDefined();
|
|
160
|
+
const atRules = (spinner?.roots ?? []).flatMap((root) => root.nodes.filter((node) => node.type === 'atrule').map((node) => node.name));
|
|
161
|
+
expect(atRules).toContain('keyframes');
|
|
162
|
+
});
|
|
163
|
+
it('never declares a public variable on the element that reads it', () => {
|
|
164
|
+
const dead = components.flatMap((component) => {
|
|
165
|
+
const read = reads(component);
|
|
166
|
+
return innerDeclarations(component, PUBLIC)
|
|
167
|
+
.filter((decl) => read.has(decl.prop))
|
|
168
|
+
.map((decl) => `${decl.prop} in ${component.file} (on "${decl.parent.selector}")`);
|
|
169
|
+
});
|
|
170
|
+
expect([...new Set(dead)]).toEqual([]);
|
|
171
|
+
});
|
|
172
|
+
it('names every private variable after the component that owns it', () => {
|
|
173
|
+
const generic = components.flatMap((component) => {
|
|
174
|
+
const owned = `--quantic-internal-${component.file}-`;
|
|
175
|
+
const names = [
|
|
176
|
+
...declarations(component)
|
|
177
|
+
.map((decl) => decl.prop)
|
|
178
|
+
.filter((name) => PRIVATE.test(name)),
|
|
179
|
+
...[...reads(component)].filter((name) => PRIVATE.test(name)),
|
|
180
|
+
];
|
|
181
|
+
return names
|
|
182
|
+
.filter((name) => !name.startsWith(owned))
|
|
183
|
+
.map((name) => `${name} in ${component.file} (expected ${owned}*)`);
|
|
184
|
+
});
|
|
185
|
+
expect([...new Set(generic)]).toEqual([]);
|
|
186
|
+
});
|
|
187
|
+
it('names every private variable after the element that declares it', () => {
|
|
188
|
+
const misattributed = elements
|
|
189
|
+
.filter((element) => element.tags.length > 0)
|
|
190
|
+
.flatMap((element) => [...privateDeclarations(element)]
|
|
191
|
+
.filter((name) => !element.tags.some((tag) => name.startsWith(`--quantic-internal-${tag.replace(/^quantic-/, '')}-`)))
|
|
192
|
+
.map((name) => `${name} declared by ${element.tags.join(', ')} (${element.file})`));
|
|
193
|
+
expect([...new Set(misattributed)]).toEqual([]);
|
|
194
|
+
});
|
|
195
|
+
it('declares every private variable it reads', () => {
|
|
196
|
+
const dangling = components.flatMap((component) => {
|
|
197
|
+
const declared = new Set(declarations(component)
|
|
198
|
+
.filter((decl) => PRIVATE.test(decl.prop))
|
|
199
|
+
.map((decl) => decl.prop));
|
|
200
|
+
return [...reads(component)]
|
|
201
|
+
.filter((name) => PRIVATE.test(name) && !declared.has(name))
|
|
202
|
+
.map((name) => `${name} in ${component.file}`);
|
|
203
|
+
});
|
|
204
|
+
expect(dangling).toEqual([]);
|
|
205
|
+
});
|
|
206
|
+
it('reads every private variable it declares', () => {
|
|
207
|
+
const orphaned = components.flatMap((component) => {
|
|
208
|
+
const read = reads(component);
|
|
209
|
+
return declarations(component)
|
|
210
|
+
.filter((decl) => PRIVATE.test(decl.prop) && !read.has(decl.prop))
|
|
211
|
+
.map((decl) => `${decl.prop} in ${component.file}`);
|
|
212
|
+
});
|
|
213
|
+
expect([...new Set(orphaned)]).toEqual([]);
|
|
214
|
+
});
|
|
215
|
+
it('reads every public variable it declares in its own namespace', () => {
|
|
216
|
+
const orphaned = components.flatMap((component) => {
|
|
217
|
+
const read = reads(component);
|
|
218
|
+
return declarations(component)
|
|
219
|
+
.filter((decl) => PUBLIC.test(decl.prop) && !read.has(decl.prop))
|
|
220
|
+
.filter((decl) => component.namespaces.some((prefix) => decl.prop.startsWith(prefix)))
|
|
221
|
+
.map((decl) => `${decl.prop} in ${component.file}`);
|
|
222
|
+
});
|
|
223
|
+
expect([...new Set(orphaned)]).toEqual([]);
|
|
224
|
+
});
|
|
225
|
+
it('gives every public read a default', () => {
|
|
226
|
+
const bare = components.flatMap((component) => {
|
|
227
|
+
const onHost = hostDeclared(component);
|
|
228
|
+
const found = [];
|
|
229
|
+
for (const root of component.roots) {
|
|
230
|
+
root.walkDecls((decl) => {
|
|
231
|
+
if (decl.prop.startsWith('--'))
|
|
232
|
+
return;
|
|
233
|
+
for (const { name, hasFallback } of varCalls(decl.value)) {
|
|
234
|
+
if (PUBLIC.test(name) && !hasFallback && !onHost.has(name)) {
|
|
235
|
+
found.push(`${name} in ${component.file} (read by ${decl.prop})`);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
return found;
|
|
241
|
+
});
|
|
242
|
+
expect([...new Set(bare)]).toEqual([]);
|
|
243
|
+
});
|
|
244
|
+
});
|
package/dist/meta.json
CHANGED
|
@@ -187,8 +187,8 @@ NumberInput.styles = css `
|
|
|
187
187
|
display: inline-block;
|
|
188
188
|
width: 100%;
|
|
189
189
|
|
|
190
|
-
--quantic-
|
|
191
|
-
--quantic-
|
|
190
|
+
--quantic-internal-number-input-padding-inline: var(--quantic-spacing-3);
|
|
191
|
+
--quantic-internal-number-input-padding-block: var(--quantic-spacing-md);
|
|
192
192
|
--quantic-component-number-input-bg: var(--quantic-bg-primary);
|
|
193
193
|
--quantic-component-number-input-color: var(--quantic-text-primary);
|
|
194
194
|
}
|
|
@@ -205,12 +205,13 @@ NumberInput.styles = css `
|
|
|
205
205
|
border-radius: var(--quantic-component-number-input-border-radius, var(--quantic-radius-sm));
|
|
206
206
|
color: var(--quantic-component-number-input-color);
|
|
207
207
|
background-color: var(--quantic-component-number-input-bg);
|
|
208
|
-
padding-block: var(--quantic-component-number-input-padding-block);
|
|
208
|
+
padding-block: var(--quantic-component-number-input-padding-block, var(--quantic-internal-number-input-padding-block));
|
|
209
209
|
padding-inline-start: var(
|
|
210
|
-
--quantic-component-number-input-padding-inline
|
|
211
|
-
)
|
|
210
|
+
--quantic-component-number-input-padding-inline,
|
|
211
|
+
var(--quantic-internal-number-input-padding-inline)
|
|
212
|
+
);
|
|
212
213
|
padding-inline-end: calc(
|
|
213
|
-
var(--quantic-component-number-input-padding-inline) + var(--quantic-spacing-6)
|
|
214
|
+
var(--quantic-component-number-input-padding-inline, var(--quantic-internal-number-input-padding-inline)) + var(--quantic-spacing-6)
|
|
214
215
|
);
|
|
215
216
|
transition:
|
|
216
217
|
border-color 0.2s ease-in-out,
|
|
@@ -231,30 +232,30 @@ NumberInput.styles = css `
|
|
|
231
232
|
|
|
232
233
|
.main.size--xs {
|
|
233
234
|
font-size: 13px;
|
|
234
|
-
--quantic-
|
|
235
|
-
--quantic-
|
|
235
|
+
--quantic-internal-number-input-padding-inline: var(--quantic-spacing-2);
|
|
236
|
+
--quantic-internal-number-input-padding-block: var(
|
|
236
237
|
--quantic-spacing-xxs
|
|
237
238
|
);
|
|
238
|
-
--quantic-
|
|
239
|
+
--quantic-internal-number-input-icon-size: var(--quantic-spacing-3);
|
|
239
240
|
}
|
|
240
241
|
|
|
241
242
|
.main.size--sm {
|
|
242
243
|
font-size: var(--quantic-font-size-body-sm);
|
|
243
|
-
--quantic-
|
|
244
|
-
--quantic-
|
|
245
|
-
--quantic-
|
|
244
|
+
--quantic-internal-number-input-padding-inline: var(--quantic-spacing-2);
|
|
245
|
+
--quantic-internal-number-input-padding-block: var(--quantic-spacing-sm);
|
|
246
|
+
--quantic-internal-number-input-icon-size: var(--quantic-spacing-4);
|
|
246
247
|
}
|
|
247
248
|
|
|
248
249
|
.main.size--md {
|
|
249
250
|
font-size: var(--quantic-font-size-body-md);
|
|
250
|
-
--quantic-
|
|
251
|
+
--quantic-internal-number-input-icon-size: var(--quantic-spacing-4);
|
|
251
252
|
}
|
|
252
253
|
|
|
253
254
|
.main.size--lg {
|
|
254
255
|
font-size: var(--quantic-font-size-body-lg);
|
|
255
|
-
--quantic-
|
|
256
|
-
--quantic-
|
|
257
|
-
--quantic-
|
|
256
|
+
--quantic-internal-number-input-padding-inline: var(--quantic-spacing-4);
|
|
257
|
+
--quantic-internal-number-input-padding-block: var(--quantic-spacing-3);
|
|
258
|
+
--quantic-internal-number-input-icon-size: var(--quantic-spacing-5);
|
|
258
259
|
}
|
|
259
260
|
|
|
260
261
|
.input {
|
|
@@ -310,7 +311,7 @@ NumberInput.styles = css `
|
|
|
310
311
|
|
|
311
312
|
quantic-icon-lucide-chevron-up,
|
|
312
313
|
quantic-icon-lucide-chevron-down {
|
|
313
|
-
--icon-size: var(--quantic-component-number-input-icon-size);
|
|
314
|
+
--icon-size: var(--quantic-component-number-input-icon-size, var(--quantic-internal-number-input-icon-size));
|
|
314
315
|
}
|
|
315
316
|
|
|
316
317
|
slot[name='prefix'] {
|
|
@@ -194,13 +194,13 @@ OptionCard.styles = css `
|
|
|
194
194
|
font-family: var(--quantic-font-family-body);
|
|
195
195
|
color: var(--quantic-text-secondary);
|
|
196
196
|
|
|
197
|
-
--quantic-
|
|
198
|
-
--quantic-
|
|
199
|
-
--quantic-
|
|
200
|
-
--quantic-
|
|
197
|
+
--quantic-internal-option-card-padding: var(--quantic-spacing-5);
|
|
198
|
+
--quantic-internal-option-card-radius: var(--quantic-radius-md);
|
|
199
|
+
--quantic-internal-option-card-spacing: var(--quantic-spacing-3);
|
|
200
|
+
--quantic-internal-option-card-font-size: var(
|
|
201
201
|
--quantic-font-size-body-md
|
|
202
202
|
);
|
|
203
|
-
--quantic-
|
|
203
|
+
--quantic-internal-option-card-line-height: var(
|
|
204
204
|
--quantic-line-height-body-md
|
|
205
205
|
);
|
|
206
206
|
}
|
|
@@ -209,13 +209,13 @@ OptionCard.styles = css `
|
|
|
209
209
|
position: relative;
|
|
210
210
|
display: flex;
|
|
211
211
|
flex-direction: column;
|
|
212
|
-
gap: var(--quantic-component-option-card-spacing);
|
|
213
|
-
padding: var(--quantic-component-option-card-padding);
|
|
214
|
-
border-radius: var(--quantic-component-option-card-radius);
|
|
212
|
+
gap: var(--quantic-component-option-card-spacing, var(--quantic-internal-option-card-spacing));
|
|
213
|
+
padding: var(--quantic-component-option-card-padding, var(--quantic-internal-option-card-padding));
|
|
214
|
+
border-radius: var(--quantic-component-option-card-radius, var(--quantic-internal-option-card-radius));
|
|
215
215
|
border: 2px solid var(--quantic-border-secondary);
|
|
216
216
|
background-color: transparent;
|
|
217
|
-
font-size: var(--quantic-component-option-card-font-size);
|
|
218
|
-
line-height: var(--quantic-component-option-card-line-height);
|
|
217
|
+
font-size: var(--quantic-component-option-card-font-size, var(--quantic-internal-option-card-font-size));
|
|
218
|
+
line-height: var(--quantic-component-option-card-line-height, var(--quantic-internal-option-card-line-height));
|
|
219
219
|
cursor: pointer;
|
|
220
220
|
user-select: none;
|
|
221
221
|
transition:
|
|
@@ -233,37 +233,37 @@ OptionCard.styles = css `
|
|
|
233
233
|
|
|
234
234
|
/* Size variants */
|
|
235
235
|
.size--sm {
|
|
236
|
-
--quantic-
|
|
237
|
-
--quantic-
|
|
238
|
-
--quantic-
|
|
239
|
-
--quantic-
|
|
236
|
+
--quantic-internal-option-card-padding: var(--quantic-spacing-4);
|
|
237
|
+
--quantic-internal-option-card-spacing: var(--quantic-spacing-2);
|
|
238
|
+
--quantic-internal-option-card-radius: var(--quantic-radius-sm);
|
|
239
|
+
--quantic-internal-option-card-font-size: var(
|
|
240
240
|
--quantic-font-size-body-sm
|
|
241
241
|
);
|
|
242
|
-
--quantic-
|
|
242
|
+
--quantic-internal-option-card-line-height: var(
|
|
243
243
|
--quantic-line-height-body-sm
|
|
244
244
|
);
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
.size--md {
|
|
248
|
-
--quantic-
|
|
249
|
-
--quantic-
|
|
250
|
-
--quantic-
|
|
251
|
-
--quantic-
|
|
248
|
+
--quantic-internal-option-card-padding: var(--quantic-spacing-5);
|
|
249
|
+
--quantic-internal-option-card-spacing: var(--quantic-spacing-3);
|
|
250
|
+
--quantic-internal-option-card-radius: var(--quantic-radius-md);
|
|
251
|
+
--quantic-internal-option-card-font-size: var(
|
|
252
252
|
--quantic-font-size-body-md
|
|
253
253
|
);
|
|
254
|
-
--quantic-
|
|
254
|
+
--quantic-internal-option-card-line-height: var(
|
|
255
255
|
--quantic-line-height-body-md
|
|
256
256
|
);
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
.size--lg {
|
|
260
|
-
--quantic-
|
|
261
|
-
--quantic-
|
|
262
|
-
--quantic-
|
|
263
|
-
--quantic-
|
|
260
|
+
--quantic-internal-option-card-padding: var(--quantic-spacing-6);
|
|
261
|
+
--quantic-internal-option-card-spacing: var(--quantic-spacing-4);
|
|
262
|
+
--quantic-internal-option-card-radius: var(--quantic-radius-lg);
|
|
263
|
+
--quantic-internal-option-card-font-size: var(
|
|
264
264
|
--quantic-font-size-body-lg
|
|
265
265
|
);
|
|
266
|
-
--quantic-
|
|
266
|
+
--quantic-internal-option-card-line-height: var(
|
|
267
267
|
--quantic-line-height-body-lg
|
|
268
268
|
);
|
|
269
269
|
}
|
|
@@ -313,7 +313,7 @@ OptionCard.styles = css `
|
|
|
313
313
|
position: absolute;
|
|
314
314
|
inset: 0;
|
|
315
315
|
opacity: 0;
|
|
316
|
-
border-radius: calc(var(--quantic-component-option-card-radius) + 4px);
|
|
316
|
+
border-radius: calc(var(--quantic-component-option-card-radius, var(--quantic-internal-option-card-radius)) + 4px);
|
|
317
317
|
border: 2px solid transparent;
|
|
318
318
|
transition: all 0.2s ease-in-out;
|
|
319
319
|
pointer-events: none;
|
|
@@ -337,7 +337,7 @@ OptionCard.styles = css `
|
|
|
337
337
|
display: flex;
|
|
338
338
|
align-items: flex-start;
|
|
339
339
|
justify-content: space-between;
|
|
340
|
-
gap: var(--quantic-component-option-card-spacing);
|
|
340
|
+
gap: var(--quantic-component-option-card-spacing, var(--quantic-internal-option-card-spacing));
|
|
341
341
|
}
|
|
342
342
|
|
|
343
343
|
.indicator {
|
|
@@ -46,31 +46,34 @@ PanelGroup.styles = css `
|
|
|
46
46
|
.group {
|
|
47
47
|
display: flex;
|
|
48
48
|
flex-direction: column;
|
|
49
|
-
gap: var(
|
|
49
|
+
gap: var(
|
|
50
|
+
--quantic-component-panel-group-gap,
|
|
51
|
+
var(--quantic-internal-panel-group-gap, var(--quantic-spacing-6))
|
|
52
|
+
);
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
.gap--none {
|
|
53
|
-
--quantic-
|
|
56
|
+
--quantic-internal-panel-group-gap: 0;
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
.gap--xs {
|
|
57
|
-
--quantic-
|
|
60
|
+
--quantic-internal-panel-group-gap: var(--quantic-spacing-3);
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
.gap--sm {
|
|
61
|
-
--quantic-
|
|
64
|
+
--quantic-internal-panel-group-gap: var(--quantic-spacing-4);
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
.gap--md {
|
|
65
|
-
--quantic-
|
|
68
|
+
--quantic-internal-panel-group-gap: var(--quantic-spacing-6);
|
|
66
69
|
}
|
|
67
70
|
|
|
68
71
|
.gap--lg {
|
|
69
|
-
--quantic-
|
|
72
|
+
--quantic-internal-panel-group-gap: var(--quantic-spacing-8);
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
.gap--xl {
|
|
73
|
-
--quantic-
|
|
76
|
+
--quantic-internal-panel-group-gap: var(--quantic-spacing-12);
|
|
74
77
|
}
|
|
75
78
|
`;
|
|
76
79
|
__decorate([
|
|
@@ -59,7 +59,7 @@ Panel.styles = css `
|
|
|
59
59
|
font-family: var(--quantic-font-family-body);
|
|
60
60
|
color: var(--quantic-text-secondary);
|
|
61
61
|
|
|
62
|
-
--quantic-
|
|
62
|
+
--quantic-internal-panel-padding: var(--quantic-spacing-6);
|
|
63
63
|
--quantic-component-panel-font-size: var(--quantic-font-size-body-md);
|
|
64
64
|
--quantic-component-panel-line-height: var(--quantic-line-height-body-md);
|
|
65
65
|
--quantic-component-panel-radius: var(--quantic-radius-md);
|
|
@@ -71,7 +71,7 @@ Panel.styles = css `
|
|
|
71
71
|
display: flex;
|
|
72
72
|
flex-direction: column;
|
|
73
73
|
gap: var(--quantic-component-panel-spacing);
|
|
74
|
-
padding: var(--quantic-component-panel-padding);
|
|
74
|
+
padding: var(--quantic-component-panel-padding, var(--quantic-internal-panel-padding));
|
|
75
75
|
border-radius: var(--quantic-component-panel-radius);
|
|
76
76
|
border: 1px solid var(--quantic-border-primary);
|
|
77
77
|
font-size: var(--quantic-component-panel-font-size);
|
|
@@ -93,7 +93,7 @@ Panel.styles = css `
|
|
|
93
93
|
.variant--ghost {
|
|
94
94
|
background-color: transparent;
|
|
95
95
|
border: none;
|
|
96
|
-
--quantic-
|
|
96
|
+
--quantic-internal-panel-padding: 0;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
.highlighted {
|
package/dist/progress/index.js
CHANGED
|
@@ -96,37 +96,37 @@ Progress.styles = css `
|
|
|
96
96
|
overflow: hidden;
|
|
97
97
|
border-radius: var(--quantic-radius-full);
|
|
98
98
|
background-color: var(--quantic-color-gray-dark-mode-700);
|
|
99
|
-
height: var(--quantic-component-progress-height, 4px);
|
|
99
|
+
height: var(--quantic-component-progress-height, var(--quantic-internal-progress-height, 4px));
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
.size--xs {
|
|
103
|
-
--quantic-
|
|
104
|
-
--quantic-
|
|
105
|
-
--quantic-
|
|
103
|
+
--quantic-internal-progress-height: 2px;
|
|
104
|
+
--quantic-internal-progress-font-size: var(--quantic-font-size-body-xs);
|
|
105
|
+
--quantic-internal-progress-line-height: var(
|
|
106
106
|
--quantic-line-height-body-xs
|
|
107
107
|
);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
.size--sm {
|
|
111
|
-
--quantic-
|
|
112
|
-
--quantic-
|
|
113
|
-
--quantic-
|
|
111
|
+
--quantic-internal-progress-height: 4px;
|
|
112
|
+
--quantic-internal-progress-font-size: var(--quantic-font-size-body-sm);
|
|
113
|
+
--quantic-internal-progress-line-height: var(
|
|
114
114
|
--quantic-line-height-body-sm
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
.size--md {
|
|
119
|
-
--quantic-
|
|
120
|
-
--quantic-
|
|
121
|
-
--quantic-
|
|
119
|
+
--quantic-internal-progress-height: 6px;
|
|
120
|
+
--quantic-internal-progress-font-size: var(--quantic-font-size-body-md);
|
|
121
|
+
--quantic-internal-progress-line-height: var(
|
|
122
122
|
--quantic-line-height-body-md
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
.size--lg {
|
|
127
|
-
--quantic-
|
|
128
|
-
--quantic-
|
|
129
|
-
--quantic-
|
|
127
|
+
--quantic-internal-progress-height: 8px;
|
|
128
|
+
--quantic-internal-progress-font-size: var(--quantic-font-size-body-lg);
|
|
129
|
+
--quantic-internal-progress-line-height: var(
|
|
130
130
|
--quantic-line-height-body-lg
|
|
131
131
|
);
|
|
132
132
|
}
|
|
@@ -154,11 +154,11 @@ Progress.styles = css `
|
|
|
154
154
|
flex-shrink: 0;
|
|
155
155
|
font-size: var(
|
|
156
156
|
--quantic-component-progress-font-size,
|
|
157
|
-
var(--quantic-font-size-body-sm)
|
|
157
|
+
var(--quantic-internal-progress-font-size, var(--quantic-font-size-body-sm))
|
|
158
158
|
);
|
|
159
159
|
line-height: var(
|
|
160
160
|
--quantic-component-progress-line-height,
|
|
161
|
-
var(--quantic-line-height-body-sm)
|
|
161
|
+
var(--quantic-internal-progress-line-height, var(--quantic-line-height-body-sm))
|
|
162
162
|
);
|
|
163
163
|
font-family: var(--quantic-font-family-body);
|
|
164
164
|
color: var(--quantic-text-secondary);
|