@teseor/css 1.14.1 → 1.14.3
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/compiled.css +1 -1
- package/dist/index.css +1 -1
- package/package.json +1 -1
- package/src/base/index.scss +1 -1
- package/src/base/root.docs.json +35 -0
- package/src/base/{root/root.scss → root.scss} +1 -1
- package/src/components/actions/button/button.visual.spec.ts +5 -1
- package/src/components/actions/button-group/button-group.visual.spec.ts +5 -1
- package/src/components/actions/close-button/close-button.visual.spec.ts +5 -1
- package/src/components/content/divider/divider.visual.spec.ts +5 -1
- package/src/components/content/scroll-area/scroll-area.visual.spec.ts +5 -1
- package/src/components/content/spacer/spacer.visual.spec.ts +1 -1
- package/src/components/data-display/avatar/avatar.visual.spec.ts +5 -1
- package/src/components/data-display/badge/badge.visual.spec.ts +5 -1
- package/src/components/data-display/card/card.visual.spec.ts +5 -1
- package/src/components/data-display/data-list/data-list.visual.spec.ts +5 -1
- package/src/components/data-display/icon/icon.visual.spec.ts +5 -1
- package/src/components/data-display/image/image.visual.spec.ts +5 -1
- package/src/components/data-display/stat/stat.visual.spec.ts +5 -1
- package/src/components/data-display/status/status.visual.spec.ts +5 -1
- package/src/components/data-display/table/table.visual.spec.ts +5 -1
- package/src/components/data-display/tag/tag.visual.spec.ts +5 -1
- package/src/components/disclosure/accordion/accordion.visual.spec.ts +5 -1
- package/src/components/disclosure/disclosure/disclosure.visual.spec.ts +5 -1
- package/src/components/feedback/alert/alert.visual.spec.ts +5 -1
- package/src/components/feedback/progress/progress.visual.spec.ts +5 -1
- package/src/components/feedback/progress-circle/progress-circle.visual.spec.ts +5 -1
- package/src/components/feedback/skeleton/skeleton.visual.spec.ts +5 -1
- package/src/components/feedback/spinner/spinner.visual.spec.ts +5 -1
- package/src/components/feedback/toast/toast.visual.spec.ts +5 -1
- package/src/components/forms/checkbox/checkbox.visual.spec.ts +5 -1
- package/src/components/forms/checkbox-group/checkbox-group.visual.spec.ts +5 -1
- package/src/components/forms/field/field.visual.spec.ts +5 -1
- package/src/components/forms/fieldset/fieldset.visual.spec.ts +5 -1
- package/src/components/forms/form/form.visual.spec.ts +5 -1
- package/src/components/forms/form-error/form-error.visual.spec.ts +5 -1
- package/src/components/forms/form-helper/form-helper.visual.spec.ts +5 -1
- package/src/components/forms/input/input.visual.spec.ts +5 -1
- package/src/components/forms/label/label.visual.spec.ts +5 -1
- package/src/components/forms/number-input/number-input.visual.spec.ts +5 -1
- package/src/components/forms/password-input/password-input.visual.spec.ts +5 -1
- package/src/components/forms/radio/radio.visual.spec.ts +5 -1
- package/src/components/forms/radio-group/radio-group.visual.spec.ts +5 -1
- package/src/components/forms/search-input/search-input.visual.spec.ts +5 -1
- package/src/components/forms/select/select.visual.spec.ts +5 -1
- package/src/components/forms/slider/slider.visual.spec.ts +5 -1
- package/src/components/forms/textarea/textarea.visual.spec.ts +5 -1
- package/src/components/forms/toggle/toggle.visual.spec.ts +5 -1
- package/src/components/navigation/breadcrumb/breadcrumb.visual.spec.ts +5 -1
- package/src/components/navigation/dropdown-menu/dropdown-menu.visual.spec.ts +5 -1
- package/src/components/navigation/menu/menu.visual.spec.ts +5 -1
- package/src/components/navigation/nav/nav.visual.spec.ts +5 -1
- package/src/components/navigation/pagination/pagination.visual.spec.ts +5 -1
- package/src/components/navigation/tabs/tabs.visual.spec.ts +5 -1
- package/src/components/overlays/dialog/dialog.visual.spec.ts +5 -1
- package/src/components/overlays/drawer/drawer.visual.spec.ts +5 -1
- package/src/components/overlays/modal/modal.visual.spec.ts +5 -1
- package/src/components/overlays/overlay/overlay.visual.spec.ts +5 -1
- package/src/components/overlays/popover/popover.visual.spec.ts +5 -1
- package/src/components/overlays/tooltip/tooltip.visual.spec.ts +5 -1
- package/src/components/typography/blockquote/blockquote.visual.spec.ts +5 -1
- package/src/components/typography/code/code.visual.spec.ts +5 -1
- package/src/components/typography/code-block/code-block.visual.spec.ts +5 -1
- package/src/components/typography/heading/heading.visual.spec.ts +5 -1
- package/src/components/typography/kbd/kbd.visual.spec.ts +5 -1
- package/src/components/typography/link/link.visual.spec.ts +5 -1
- package/src/components/typography/list/list.visual.spec.ts +5 -1
- package/src/components/typography/mark/mark.visual.spec.ts +5 -1
- package/src/config/{tokens → guides}/accessibility.docs.json +1 -0
- package/src/config/guides/getting-started.docs.json +106 -0
- package/src/config/{tokens → guides}/theming.docs.json +1 -0
- package/src/config/tokens/_variables.scss +107 -68
- package/src/config/tokens/design-tokens.docs.json +239 -0
- package/src/config/tokens/index.scss +8 -8
- package/src/config/tokens/input.scss +13 -11
- package/src/debug/debug.docs.json +96 -0
- package/src/debug/index.scss +81 -1
- package/src/index.scss +1 -1
- package/src/layout/app-shell/app-shell.visual.spec.ts +1 -1
- package/src/layout/aspect-ratio/aspect-ratio.visual.spec.ts +1 -1
- package/src/layout/box/box.visual.spec.ts +1 -1
- package/src/layout/center/center.visual.spec.ts +1 -1
- package/src/layout/column/column.visual.spec.ts +1 -1
- package/src/layout/content/content.visual.spec.ts +1 -1
- package/src/layout/footer/footer.visual.spec.ts +1 -1
- package/src/layout/grid/grid.visual.spec.ts +1 -1
- package/src/layout/nav-rail/nav-rail.visual.spec.ts +1 -1
- package/src/layout/page-header/page-header.visual.spec.ts +1 -1
- package/src/layout/row/row.visual.spec.ts +1 -1
- package/src/layout/sidebar/sidebar.visual.spec.ts +1 -1
- package/src/layout/sidebar-nav/sidebar-nav.visual.spec.ts +1 -1
- package/src/layout/topbar/topbar.visual.spec.ts +1 -1
- package/src/debug/grid-overlay.scss +0 -81
- package/src/testing/api-types.ts +0 -20
- package/src/testing/grid-alignment.spec.ts +0 -38
- package/src/testing/html-generator.ts +0 -151
- package/src/testing/index.ts +0 -15
- package/src/testing/page-setup.ts +0 -149
- package/src/testing/rhythm.ts +0 -146
- package/src/testing/scaffold.ts +0 -50
- /package/src/config/{layers/layers.scss → layers.scss} +0 -0
- /package/src/config/tokens/{borders/index.scss → borders.scss} +0 -0
- /package/src/config/tokens/{motion/index.scss → motion.scss} +0 -0
- /package/src/config/tokens/{radius/index.scss → radius.scss} +0 -0
- /package/src/config/tokens/{semantic/colors/index.scss → semantic-colors.scss} +0 -0
- /package/src/config/tokens/{semantic/spacing/index.scss → semantic-spacing.scss} +0 -0
- /package/src/config/tokens/{shadows/index.scss → shadows.scss} +0 -0
- /package/src/config/tokens/{typography/index.scss → typography.scss} +0 -0
- /package/src/config/tokens/{zindex/index.scss → zindex.scss} +0 -0
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'dropdown-menu.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'menu.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'nav.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'pagination.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'tabs.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'dialog.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'drawer.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'modal.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'overlay.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'popover.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'tooltip.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'blockquote.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'code.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'code-block.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'heading.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'kbd.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'link.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'list.docs.json');
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
saveForLostPixel,
|
|
5
|
+
setupVisualTestFromDocs,
|
|
6
|
+
validateGridRhythm,
|
|
7
|
+
} from '../../../../test-utils';
|
|
4
8
|
|
|
5
9
|
const DOCS_PATH = resolve(__dirname, 'mark.docs.json');
|
|
6
10
|
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "getting-started",
|
|
3
|
+
"type": "guide",
|
|
4
|
+
"title": "Getting Started",
|
|
5
|
+
"description": "Install, import, and start using the CSS library in your project",
|
|
6
|
+
"weight": 1,
|
|
7
|
+
"skipValidation": true,
|
|
8
|
+
"sections": [
|
|
9
|
+
{
|
|
10
|
+
"title": "Installation",
|
|
11
|
+
"description": "Install the package from npm.",
|
|
12
|
+
"examples": [
|
|
13
|
+
{
|
|
14
|
+
"title": "npm / pnpm / yarn",
|
|
15
|
+
"code": "npm install @teseor/css\n# or\npnpm add @teseor/css\n# or\nyarn add @teseor/css"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"title": "Import",
|
|
21
|
+
"description": "Import the compiled CSS in your app entry point.",
|
|
22
|
+
"examples": [
|
|
23
|
+
{
|
|
24
|
+
"title": "JS / TS entry",
|
|
25
|
+
"code": "import '@teseor/css';\n// or\nimport '@teseor/css/dist/index.css';"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"title": "HTML link",
|
|
29
|
+
"code": "<link rel=\"stylesheet\" href=\"node_modules/@teseor/css/dist/index.css\">"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"title": "Root Class",
|
|
35
|
+
"description": "Add the .ui-root class to set baseline typography and colors.",
|
|
36
|
+
"examples": [
|
|
37
|
+
{
|
|
38
|
+
"items": [
|
|
39
|
+
{
|
|
40
|
+
"tag": "div",
|
|
41
|
+
"class": "ui-root",
|
|
42
|
+
"children": [{ "tag": "p", "text": "Text inherits font, size, color from .ui-root" }]
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"code": "<html class=\"ui-root\">\n <body>\n <!-- All children inherit base styles -->\n </body>\n</html>"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"title": "First Component",
|
|
51
|
+
"description": "Use any component by adding its class. No JS required.",
|
|
52
|
+
"examples": [
|
|
53
|
+
{
|
|
54
|
+
"title": "Button",
|
|
55
|
+
"items": [
|
|
56
|
+
{
|
|
57
|
+
"tag": "div",
|
|
58
|
+
"class": "ui-row ui-row--sm",
|
|
59
|
+
"children": [
|
|
60
|
+
{ "tag": "button", "class": "ui-button", "text": "Primary" },
|
|
61
|
+
{ "tag": "button", "class": "ui-button ui-button--secondary", "text": "Secondary" },
|
|
62
|
+
{ "tag": "button", "class": "ui-button ui-button--danger", "text": "Danger" }
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"code": "<button class=\"ui-button\">Primary</button>\n<button class=\"ui-button ui-button--secondary\">Secondary</button>\n<button class=\"ui-button ui-button--danger\">Danger</button>"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"title": "Card",
|
|
70
|
+
"items": [
|
|
71
|
+
{
|
|
72
|
+
"tag": "div",
|
|
73
|
+
"class": "ui-card",
|
|
74
|
+
"children": [
|
|
75
|
+
{ "tag": "h3", "class": "ui-heading ui-heading--4", "text": "Card Title" },
|
|
76
|
+
{
|
|
77
|
+
"tag": "p",
|
|
78
|
+
"text": "Cards use semantic tokens for padding, border, and background."
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"code": "<div class=\"ui-card\">\n <h3 class=\"ui-heading ui-heading--4\">Card Title</h3>\n <p>Content goes here.</p>\n</div>"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"title": "Customize",
|
|
89
|
+
"description": "Override design tokens with CSS custom properties. No build step required.",
|
|
90
|
+
"examples": [
|
|
91
|
+
{
|
|
92
|
+
"title": "Change brand color",
|
|
93
|
+
"items": [
|
|
94
|
+
{
|
|
95
|
+
"tag": "div",
|
|
96
|
+
"class": "theme-demo",
|
|
97
|
+
"style": { "--ui-hue-primary": "270" },
|
|
98
|
+
"children": [{ "tag": "button", "class": "ui-button", "text": "Purple brand" }]
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"code": ":root {\n --ui-hue-primary: 270; /* purple */\n}"
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
// SCSS Variables - Source of truth for fallback values
|
|
4
4
|
// These are the computed values that CSS custom properties resolve to.
|
|
5
5
|
// Import this file in components that need standalone fallbacks.
|
|
6
|
+
// Section order mirrors config/tokens/index.scss import order.
|
|
6
7
|
|
|
7
|
-
//
|
|
8
|
-
|
|
8
|
+
// ==========================================================================
|
|
9
|
+
// 1. Grid — all derived from $unit
|
|
10
|
+
// ==========================================================================
|
|
11
|
+
$unit: 0.5rem; // 8px (matches --ui-unit: 8px)
|
|
9
12
|
$row: $unit * 2; // 16px
|
|
10
13
|
$row-1: $row;
|
|
11
14
|
$row-2: $row * 2; // 32px
|
|
@@ -14,7 +17,41 @@ $row-4: $row * 4;
|
|
|
14
17
|
$row-5: $row * 5;
|
|
15
18
|
$row-6: $row * 6;
|
|
16
19
|
|
|
17
|
-
//
|
|
20
|
+
// ==========================================================================
|
|
21
|
+
// 2. Colors — OKLCH for perceptual uniformity
|
|
22
|
+
// ==========================================================================
|
|
23
|
+
|
|
24
|
+
// Theming hue — used in HSL fallbacks for shadows, debug overlays
|
|
25
|
+
$hue-primary: 220;
|
|
26
|
+
|
|
27
|
+
// Base palette
|
|
28
|
+
$color-primary: oklch(55% 0.22 250);
|
|
29
|
+
$color-success: oklch(60% 0.18 145);
|
|
30
|
+
$color-warning: oklch(75% 0.18 70);
|
|
31
|
+
$color-danger: oklch(60% 0.22 25);
|
|
32
|
+
$color-neutral: oklch(50% 0.02 250);
|
|
33
|
+
|
|
34
|
+
// Neutral scale — HSL approximation of color-mix(in oklch, ...) results.
|
|
35
|
+
// CSS tokens use oklch color-mix(); these HSL values are static SCSS
|
|
36
|
+
// fallbacks for when custom properties are unavailable.
|
|
37
|
+
$color-neutral-50: hsl(220 10% 98%);
|
|
38
|
+
$color-neutral-100: hsl(220 10% 96%);
|
|
39
|
+
$color-neutral-200: hsl(220 10% 90%);
|
|
40
|
+
$color-neutral-300: hsl(220 10% 80%);
|
|
41
|
+
$color-neutral-400: hsl(220 10% 60%);
|
|
42
|
+
$color-neutral-500: hsl(220 10% 45%);
|
|
43
|
+
$color-neutral-600: hsl(220 10% 35%);
|
|
44
|
+
$color-neutral-700: hsl(220 10% 25%);
|
|
45
|
+
$color-neutral-800: hsl(220 10% 15%);
|
|
46
|
+
$color-neutral-900: hsl(220 10% 10%);
|
|
47
|
+
|
|
48
|
+
// Primary shades (CSS uses color-mix)
|
|
49
|
+
$color-primary-light: oklch(75% 0.15 250);
|
|
50
|
+
$color-primary-dark: oklch(40% 0.18 250);
|
|
51
|
+
|
|
52
|
+
// ==========================================================================
|
|
53
|
+
// 3. Spacing — derived from $unit
|
|
54
|
+
// ==========================================================================
|
|
18
55
|
$space-px: $unit * 0.125; // 1px - hairline
|
|
19
56
|
$space-quarter: $unit * 0.25; // 2px - micro spacing
|
|
20
57
|
$space-0: $unit * 0.5; // 4px
|
|
@@ -39,11 +76,15 @@ $sizes: (
|
|
|
39
76
|
@return map.get($sizes, $name);
|
|
40
77
|
}
|
|
41
78
|
|
|
42
|
-
//
|
|
79
|
+
// ==========================================================================
|
|
80
|
+
// 4. Typography
|
|
81
|
+
// ==========================================================================
|
|
82
|
+
|
|
83
|
+
// Font families (system stack, consumers override via CSS tokens)
|
|
43
84
|
$font-sans: system-ui, -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", arial, sans-serif;
|
|
44
85
|
$font-mono: ui-monospace, sfmono-regular, "SF Mono", menlo, consolas, "Liberation Mono", monospace;
|
|
45
86
|
|
|
46
|
-
//
|
|
87
|
+
// Font sizes (1.2 modular scale)
|
|
47
88
|
$font-size-xs: 0.75rem; // 12px
|
|
48
89
|
$font-size-sm: 0.875rem; // 14px
|
|
49
90
|
$font-size-md: 1rem; // 16px (base)
|
|
@@ -53,13 +94,13 @@ $font-size-2xl: 1.75rem; // 28px
|
|
|
53
94
|
$font-size-3xl: 2rem; // 32px
|
|
54
95
|
$font-size-4xl: 2.5rem; // 40px
|
|
55
96
|
|
|
56
|
-
//
|
|
97
|
+
// Tight line heights (compact UI elements)
|
|
57
98
|
$leading-tight-xs: $row;
|
|
58
99
|
$leading-tight-sm: $row;
|
|
59
100
|
$leading-tight-md: $unit * 3;
|
|
60
101
|
$leading-tight-lg: $unit * 3;
|
|
61
102
|
|
|
62
|
-
//
|
|
103
|
+
// Normal line heights (body text)
|
|
63
104
|
$leading-xs: $row;
|
|
64
105
|
$leading-sm: $unit * 3;
|
|
65
106
|
$leading-md: $unit * 3;
|
|
@@ -69,54 +110,68 @@ $leading-2xl: $row-2;
|
|
|
69
110
|
$leading-3xl: $unit * 5;
|
|
70
111
|
$leading-4xl: $unit * 6;
|
|
71
112
|
|
|
72
|
-
//
|
|
113
|
+
// Font weights
|
|
73
114
|
$weight-normal: 400;
|
|
74
115
|
$weight-medium: 500;
|
|
75
116
|
$weight-semibold: 600;
|
|
76
117
|
$weight-bold: 700;
|
|
77
118
|
|
|
78
|
-
//
|
|
119
|
+
// Letter spacing
|
|
79
120
|
$tracking-display: -0.02em;
|
|
80
121
|
$tracking-body: 0;
|
|
81
122
|
$tracking-caps: 0.08em;
|
|
82
123
|
|
|
83
|
-
|
|
84
|
-
// Radius
|
|
124
|
+
// ==========================================================================
|
|
125
|
+
// 5. Radius — derived from $unit
|
|
126
|
+
// ==========================================================================
|
|
85
127
|
$radius-sm: $unit * 0.5; // 4px
|
|
86
128
|
$radius-md: $unit; // 8px
|
|
87
129
|
$radius-lg: $unit * 2; // 16px
|
|
88
130
|
$radius-full: 9999px;
|
|
89
131
|
|
|
90
|
-
//
|
|
132
|
+
// ==========================================================================
|
|
133
|
+
// 6. Borders — derived from $unit
|
|
134
|
+
// ==========================================================================
|
|
91
135
|
$border-width-sm: $unit * 0.125; // 1px
|
|
92
136
|
$border-width-md: $unit * 0.25; // 2px
|
|
93
137
|
$border-width-lg: $unit * 0.5; // 4px
|
|
94
138
|
|
|
95
|
-
//
|
|
96
|
-
//
|
|
97
|
-
|
|
98
|
-
$
|
|
99
|
-
$
|
|
100
|
-
$
|
|
101
|
-
$color-neutral: oklch(50% 0.02 250);
|
|
139
|
+
// ==========================================================================
|
|
140
|
+
// 7. Shadows — static hue fallback
|
|
141
|
+
// ==========================================================================
|
|
142
|
+
$shadow-sm: 0 1px 2px hsl(220 10% 20% / 0.05);
|
|
143
|
+
$shadow-md: 0 4px 6px hsl(220 10% 20% / 0.1);
|
|
144
|
+
$shadow-lg: 0 10px 15px hsl(220 10% 20% / 0.15);
|
|
102
145
|
|
|
103
|
-
//
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
$
|
|
107
|
-
$
|
|
108
|
-
$
|
|
109
|
-
$
|
|
110
|
-
$
|
|
111
|
-
$
|
|
112
|
-
$
|
|
113
|
-
$
|
|
146
|
+
// ==========================================================================
|
|
147
|
+
// 8. Z-index scale
|
|
148
|
+
// ==========================================================================
|
|
149
|
+
$z-base: 0;
|
|
150
|
+
$z-sticky: 100;
|
|
151
|
+
$z-dropdown: 200;
|
|
152
|
+
$z-overlay: 300;
|
|
153
|
+
$z-modal: 400;
|
|
154
|
+
$z-popover: 500;
|
|
155
|
+
$z-tooltip: 600;
|
|
156
|
+
$z-toast: 700;
|
|
157
|
+
$z-drawer: 800;
|
|
158
|
+
$z-debug: 9999;
|
|
114
159
|
|
|
115
|
-
//
|
|
116
|
-
|
|
117
|
-
|
|
160
|
+
// ==========================================================================
|
|
161
|
+
// 9. Motion
|
|
162
|
+
// ==========================================================================
|
|
163
|
+
$duration-instant: 50ms;
|
|
164
|
+
$duration-fast: 100ms;
|
|
165
|
+
$duration-base: 150ms;
|
|
166
|
+
$duration-normal: 200ms;
|
|
167
|
+
$duration-slow: 250ms;
|
|
168
|
+
$duration-slower: 400ms;
|
|
118
169
|
|
|
119
|
-
|
|
170
|
+
$ease-default: cubic-bezier(0.4, 0, 0.2, 1);
|
|
171
|
+
|
|
172
|
+
// ==========================================================================
|
|
173
|
+
// 10. Semantic colors (light theme defaults)
|
|
174
|
+
// ==========================================================================
|
|
120
175
|
$color-text: $color-neutral-900;
|
|
121
176
|
$color-text-muted: $color-neutral-500;
|
|
122
177
|
$color-text-inverse: $color-neutral-50;
|
|
@@ -133,37 +188,6 @@ $color-interactive-hover: $color-primary-dark;
|
|
|
133
188
|
|
|
134
189
|
$color-focus: $color-primary-light;
|
|
135
190
|
|
|
136
|
-
// Motion - duration scale (matches config/tokens/motion)
|
|
137
|
-
$duration-instant: 50ms;
|
|
138
|
-
$duration-fast: 100ms;
|
|
139
|
-
$duration-base: 150ms;
|
|
140
|
-
$duration-normal: 200ms;
|
|
141
|
-
$duration-slow: 250ms;
|
|
142
|
-
$duration-slower: 400ms;
|
|
143
|
-
|
|
144
|
-
// Motion - easing (matches config/tokens/motion)
|
|
145
|
-
$ease-default: cubic-bezier(0.4, 0, 0.2, 1);
|
|
146
|
-
|
|
147
|
-
// Shadows (matches config/tokens/shadows, static hue fallback)
|
|
148
|
-
$shadow-sm: 0 1px 2px hsl(220 10% 20% / 0.05);
|
|
149
|
-
$shadow-md: 0 4px 6px hsl(220 10% 20% / 0.1);
|
|
150
|
-
$shadow-lg: 0 10px 15px hsl(220 10% 20% / 0.15);
|
|
151
|
-
|
|
152
|
-
// Z-index scale (matches config/tokens/zindex)
|
|
153
|
-
$z-base: 0;
|
|
154
|
-
$z-sticky: 100;
|
|
155
|
-
$z-dropdown: 200;
|
|
156
|
-
$z-overlay: 300;
|
|
157
|
-
$z-modal: 400;
|
|
158
|
-
$z-popover: 500;
|
|
159
|
-
$z-tooltip: 600;
|
|
160
|
-
$z-toast: 700;
|
|
161
|
-
$z-drawer: 800;
|
|
162
|
-
$z-debug: 9999;
|
|
163
|
-
|
|
164
|
-
// Theming
|
|
165
|
-
$hue-primary: 220;
|
|
166
|
-
|
|
167
191
|
// State opacity
|
|
168
192
|
$opacity-disabled: 0.5;
|
|
169
193
|
$opacity-loading: 0.7;
|
|
@@ -174,17 +198,32 @@ $overlay-bg-light: rgb(255 255 255 / 0.7);
|
|
|
174
198
|
$overlay-bg-blur: rgb(0 0 0 / 0.3);
|
|
175
199
|
$overlay-bg-subtle: rgb(0 0 0 / 0.1);
|
|
176
200
|
|
|
177
|
-
//
|
|
201
|
+
// ==========================================================================
|
|
202
|
+
// 11. Semantic spacing
|
|
203
|
+
// ==========================================================================
|
|
204
|
+
$spacing-xs: $space-1;
|
|
205
|
+
$spacing-sm: $space-2;
|
|
206
|
+
$spacing-md: $space-4;
|
|
207
|
+
$spacing-lg: $space-6;
|
|
208
|
+
$spacing-xl: $space-8;
|
|
209
|
+
$spacing-gutter: $space-4;
|
|
210
|
+
$spacing-section: $space-8;
|
|
211
|
+
|
|
212
|
+
// ==========================================================================
|
|
213
|
+
// 12. Component defaults
|
|
214
|
+
// ==========================================================================
|
|
215
|
+
|
|
216
|
+
// Icons
|
|
178
217
|
$icon-stroke: 2;
|
|
179
218
|
$icon-stroke-thin: 1;
|
|
180
219
|
$icon-stroke-thick: 2.5;
|
|
181
220
|
|
|
182
|
-
//
|
|
221
|
+
// Feedback
|
|
183
222
|
$spinner-duration: 750ms;
|
|
184
223
|
$progress-circle-stroke-width: 8;
|
|
185
224
|
$skeleton-shimmer: rgb(255 255 255 / 0.5);
|
|
186
225
|
|
|
187
|
-
//
|
|
226
|
+
// Misc
|
|
188
227
|
$slider-thumb-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
|
|
189
228
|
$toast-viewport-max-width: 420px;
|
|
190
229
|
$spacer-size: 1;
|