@once-ui-system/foundations 0.0.0-stage → 3.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -2
- package/dist/css/styles.css +1 -0
- package/dist/css/styles.css.map +1 -0
- package/dist/css/tokens.css +1 -0
- package/dist/css/tokens.css.map +1 -0
- package/package.json +56 -4
- package/scss/styles/background.generated.scss +395 -0
- package/scss/styles/border.generated.scss +528 -0
- package/scss/styles/breakpoints.scss +39 -0
- package/scss/styles/color.generated.scss +175 -0
- package/scss/styles/cursor.generated.scss +88 -0
- package/scss/styles/density.scss +74 -0
- package/scss/styles/display.generated.scss +1496 -0
- package/scss/styles/flex.generated.scss +867 -0
- package/scss/styles/global.scss +57 -0
- package/scss/styles/grid.generated.scss +649 -0
- package/scss/styles/index.scss +15 -0
- package/scss/styles/position.generated.scss +1957 -0
- package/scss/styles/shadow.generated.scss +23 -0
- package/scss/styles/size.generated.scss +69 -0
- package/scss/styles/spacing.generated.scss +9447 -0
- package/scss/styles/touch.scss +29 -0
- package/scss/styles/typography.generated.scss +334 -0
- package/scss/styles/utilities.scss +23 -0
- package/scss/tokens/border.scss +95 -0
- package/scss/tokens/data.scss +107 -0
- package/scss/tokens/function.scss +742 -0
- package/scss/tokens/index.scss +8 -0
- package/scss/tokens/layout.scss +317 -0
- package/scss/tokens/scheme.scss +352 -0
- package/scss/tokens/shadow.scss +7 -0
- package/scss/tokens/theme.scss +777 -0
- package/scss/tokens/typography.scss +118 -0
- package/tokens/README.md +49 -0
- package/tokens/once-ui.tokens.json +2794 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/* GENERATED by scripts/generate-utilities.mjs — do not edit.
|
|
2
|
+
* The class matrix lives in scripts/utilities.spec.mjs; change it there and
|
|
3
|
+
* re-run `pnpm generate:utilities`. */
|
|
4
|
+
|
|
5
|
+
[data-cursor="soft"] {
|
|
6
|
+
--cursor-default: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E32'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23s)' fill='%23ffffff' stroke='%23ffffff' stroke-width='2%2E4' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M4%2E6 3%2E2 L23%2E4 10%2E2 Q25 10%2E8 23%2E5 11%2E9 L15%2E9 15%2E9 L11%2E9 23%2E5 Q10%2E8 25 10%2E2 23%2E4 L3%2E2 4%2E6 Q2%2E8 2%2E8 4%2E6 3%2E2 Z'/%3E%3C/g%3E%3Cg fill='%23121212'%3E%3Cpath d='M4%2E6 3%2E2 L23%2E4 10%2E2 Q25 10%2E8 23%2E5 11%2E9 L15%2E9 15%2E9 L11%2E9 23%2E5 Q10%2E8 25 10%2E2 23%2E4 L3%2E2 4%2E6 Q2%2E8 2%2E8 4%2E6 3%2E2 Z'/%3E%3C/g%3E%3C/svg%3E") 4 4, default;
|
|
7
|
+
--cursor-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E32'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23s)' fill='%23ffffff' stroke='%23ffffff' stroke-width='2%2E8' stroke-linejoin='round' stroke-linecap='round'%3E%3Crect x='10%2E2' y='2%2E6' width='4%2E4' height='13%2E4' rx='2%2E2'/%3E%3Crect x='14' y='8%2E4' width='4%2E2' height='8%2E6' rx='2%2E1'/%3E%3Crect x='17%2E6' y='9%2E4' width='4%2E1' height='8' rx='2%2E05'/%3E%3Crect x='21%2E1' y='11' width='3%2E8' height='7' rx='1%2E9'/%3E%3Crect x='8%2E4' y='12%2E6' width='16%2E5' height='12%2E4' rx='5'/%3E%3Crect x='4%2E4' y='11%2E6' width='4%2E2' height='9%2E4' rx='2%2E1' transform='rotate(-38 6%2E5 16%2E3)'/%3E%3C/g%3E%3Cg fill='%23121212'%3E%3Crect x='10%2E2' y='2%2E6' width='4%2E4' height='13%2E4' rx='2%2E2'/%3E%3Crect x='14' y='8%2E4' width='4%2E2' height='8%2E6' rx='2%2E1'/%3E%3Crect x='17%2E6' y='9%2E4' width='4%2E1' height='8' rx='2%2E05'/%3E%3Crect x='21%2E1' y='11' width='3%2E8' height='7' rx='1%2E9'/%3E%3Crect x='8%2E4' y='12%2E6' width='16%2E5' height='12%2E4' rx='5'/%3E%3Crect x='4%2E4' y='11%2E6' width='4%2E2' height='9%2E4' rx='2%2E1' transform='rotate(-38 6%2E5 16%2E3)'/%3E%3C/g%3E%3Cg stroke='%23ffffff' stroke-width='%2E9' stroke-linecap='round'%3E%3Cpath d='M14%2E3 10%2E6 L14%2E3 14%2E2 M17%2E9 11%2E6 L17%2E9 14%2E6 M21%2E4 13 L21%2E4 15%2E4'/%3E%3C/g%3E%3C/svg%3E") 12 3, pointer;
|
|
8
|
+
--cursor-text: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E32'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23s)' fill='none' stroke='%23ffffff' stroke-width='4%2E6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 5%2E2 L12 5%2E2 Q14 5%2E2 14 7%2E2 Q14 5%2E2 16 5%2E2 L18 5%2E2 M14 7%2E2 L14 20%2E8 M10 22%2E8 L12 22%2E8 Q14 22%2E8 14 20%2E8 Q14 22%2E8 16 22%2E8 L18 22%2E8' fill='none'/%3E%3C/g%3E%3Cg fill='none' stroke='%23121212' stroke-width='1%2E9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 5%2E2 L12 5%2E2 Q14 5%2E2 14 7%2E2 Q14 5%2E2 16 5%2E2 L18 5%2E2 M14 7%2E2 L14 20%2E8 M10 22%2E8 L12 22%2E8 Q14 22%2E8 14 20%2E8 Q14 22%2E8 16 22%2E8 L18 22%2E8' fill='none'/%3E%3C/g%3E%3C/svg%3E") 14 14, text;
|
|
9
|
+
--cursor-disabled: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E32'/%3E%3C/filter%3E%3C/defs%3E%3Ccircle cx='14' cy='14' r='10%2E3' fill='%23ffffff' filter='url(%23s)'/%3E%3Cg stroke='%23121212' stroke-width='2%2E4' stroke-linecap='round'%3E%3Ccircle cx='14' cy='14' r='7%2E6' fill='none'/%3E%3Cpath d='M8%2E7 19%2E3 L19%2E3 8%2E7' fill='none'/%3E%3C/g%3E%3C/svg%3E") 14 14, not-allowed;
|
|
10
|
+
--cursor-interactive: var(--cursor-pointer);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[data-cursor="rounded"],
|
|
14
|
+
[data-cursor="rounded"] [data-theme="light"] {
|
|
15
|
+
--cursor-default: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E22'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23s)' fill='%23ffffff' stroke='%23ffffff' stroke-width='2%2E4' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M6 3%2E4 Q4%2E8 2%2E6 4%2E8 4%2E1 L4%2E8 20%2E4 Q4%2E8 22 6%2E1 21 L9%2E9 17%2E8 L12%2E6 24 Q13%2E2 25%2E2 14%2E4 24%2E7 L16%2E1 23%2E9 Q17%2E2 23%2E3 16%2E7 22%2E2 L14%2E1 16%2E3 L19%2E2 16%2E1 Q20%2E8 15%2E9 19%2E6 14%2E9 Z'/%3E%3C/g%3E%3Cg fill='%232a2826'%3E%3Cpath d='M6 3%2E4 Q4%2E8 2%2E6 4%2E8 4%2E1 L4%2E8 20%2E4 Q4%2E8 22 6%2E1 21 L9%2E9 17%2E8 L12%2E6 24 Q13%2E2 25%2E2 14%2E4 24%2E7 L16%2E1 23%2E9 Q17%2E2 23%2E3 16%2E7 22%2E2 L14%2E1 16%2E3 L19%2E2 16%2E1 Q20%2E8 15%2E9 19%2E6 14%2E9 Z'/%3E%3C/g%3E%3C/svg%3E") 5 3, default;
|
|
16
|
+
--cursor-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E22'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23s)' fill='%23ffffff' stroke='%23ffffff' stroke-width='2%2E8' stroke-linejoin='round' stroke-linecap='round'%3E%3Crect x='10%2E2' y='2%2E6' width='4%2E4' height='13%2E4' rx='2%2E2'/%3E%3Crect x='14' y='8%2E4' width='4%2E2' height='8%2E6' rx='2%2E1'/%3E%3Crect x='17%2E6' y='9%2E4' width='4%2E1' height='8' rx='2%2E05'/%3E%3Crect x='21%2E1' y='11' width='3%2E8' height='7' rx='1%2E9'/%3E%3Crect x='8%2E4' y='12%2E6' width='16%2E5' height='12%2E4' rx='5'/%3E%3Crect x='4%2E4' y='11%2E6' width='4%2E2' height='9%2E4' rx='2%2E1' transform='rotate(-38 6%2E5 16%2E3)'/%3E%3C/g%3E%3Cg fill='%232a2826'%3E%3Crect x='10%2E2' y='2%2E6' width='4%2E4' height='13%2E4' rx='2%2E2'/%3E%3Crect x='14' y='8%2E4' width='4%2E2' height='8%2E6' rx='2%2E1'/%3E%3Crect x='17%2E6' y='9%2E4' width='4%2E1' height='8' rx='2%2E05'/%3E%3Crect x='21%2E1' y='11' width='3%2E8' height='7' rx='1%2E9'/%3E%3Crect x='8%2E4' y='12%2E6' width='16%2E5' height='12%2E4' rx='5'/%3E%3Crect x='4%2E4' y='11%2E6' width='4%2E2' height='9%2E4' rx='2%2E1' transform='rotate(-38 6%2E5 16%2E3)'/%3E%3C/g%3E%3Cg stroke='%23ffffff' stroke-width='%2E9' stroke-linecap='round'%3E%3Cpath d='M14%2E3 10%2E6 L14%2E3 14%2E2 M17%2E9 11%2E6 L17%2E9 14%2E6 M21%2E4 13 L21%2E4 15%2E4'/%3E%3C/g%3E%3C/svg%3E") 12 3, pointer;
|
|
17
|
+
--cursor-text: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E22'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23s)' fill='none' stroke='%23ffffff' stroke-width='4%2E6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 5%2E2 L12 5%2E2 Q14 5%2E2 14 7%2E2 Q14 5%2E2 16 5%2E2 L18 5%2E2 M14 7%2E2 L14 20%2E8 M10 22%2E8 L12 22%2E8 Q14 22%2E8 14 20%2E8 Q14 22%2E8 16 22%2E8 L18 22%2E8' fill='none'/%3E%3C/g%3E%3Cg fill='none' stroke='%232a2826' stroke-width='1%2E9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 5%2E2 L12 5%2E2 Q14 5%2E2 14 7%2E2 Q14 5%2E2 16 5%2E2 L18 5%2E2 M14 7%2E2 L14 20%2E8 M10 22%2E8 L12 22%2E8 Q14 22%2E8 14 20%2E8 Q14 22%2E8 16 22%2E8 L18 22%2E8' fill='none'/%3E%3C/g%3E%3C/svg%3E") 14 14, text;
|
|
18
|
+
--cursor-disabled: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E22'/%3E%3C/filter%3E%3C/defs%3E%3Ccircle cx='14' cy='14' r='10%2E3' fill='%23ffffff' filter='url(%23s)'/%3E%3Cg stroke='%232a2826' stroke-width='2%2E4' stroke-linecap='round'%3E%3Ccircle cx='14' cy='14' r='7%2E6' fill='none'/%3E%3Cpath d='M8%2E7 19%2E3 L19%2E3 8%2E7' fill='none'/%3E%3C/g%3E%3C/svg%3E") 14 14, not-allowed;
|
|
19
|
+
--cursor-interactive: var(--cursor-pointer);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
[data-theme="dark"][data-cursor="rounded"],
|
|
23
|
+
[data-theme="dark"] [data-cursor="rounded"],
|
|
24
|
+
[data-cursor="rounded"] [data-theme="dark"] {
|
|
25
|
+
--cursor-default: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E4'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23s)' fill='%231c1b19' stroke='%231c1b19' stroke-width='2%2E4' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M6 3%2E4 Q4%2E8 2%2E6 4%2E8 4%2E1 L4%2E8 20%2E4 Q4%2E8 22 6%2E1 21 L9%2E9 17%2E8 L12%2E6 24 Q13%2E2 25%2E2 14%2E4 24%2E7 L16%2E1 23%2E9 Q17%2E2 23%2E3 16%2E7 22%2E2 L14%2E1 16%2E3 L19%2E2 16%2E1 Q20%2E8 15%2E9 19%2E6 14%2E9 Z'/%3E%3C/g%3E%3Cg fill='%23f6f4ef'%3E%3Cpath d='M6 3%2E4 Q4%2E8 2%2E6 4%2E8 4%2E1 L4%2E8 20%2E4 Q4%2E8 22 6%2E1 21 L9%2E9 17%2E8 L12%2E6 24 Q13%2E2 25%2E2 14%2E4 24%2E7 L16%2E1 23%2E9 Q17%2E2 23%2E3 16%2E7 22%2E2 L14%2E1 16%2E3 L19%2E2 16%2E1 Q20%2E8 15%2E9 19%2E6 14%2E9 Z'/%3E%3C/g%3E%3C/svg%3E") 5 3, default;
|
|
26
|
+
--cursor-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E4'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23s)' fill='%231c1b19' stroke='%231c1b19' stroke-width='2%2E8' stroke-linejoin='round' stroke-linecap='round'%3E%3Crect x='10%2E2' y='2%2E6' width='4%2E4' height='13%2E4' rx='2%2E2'/%3E%3Crect x='14' y='8%2E4' width='4%2E2' height='8%2E6' rx='2%2E1'/%3E%3Crect x='17%2E6' y='9%2E4' width='4%2E1' height='8' rx='2%2E05'/%3E%3Crect x='21%2E1' y='11' width='3%2E8' height='7' rx='1%2E9'/%3E%3Crect x='8%2E4' y='12%2E6' width='16%2E5' height='12%2E4' rx='5'/%3E%3Crect x='4%2E4' y='11%2E6' width='4%2E2' height='9%2E4' rx='2%2E1' transform='rotate(-38 6%2E5 16%2E3)'/%3E%3C/g%3E%3Cg fill='%23f6f4ef'%3E%3Crect x='10%2E2' y='2%2E6' width='4%2E4' height='13%2E4' rx='2%2E2'/%3E%3Crect x='14' y='8%2E4' width='4%2E2' height='8%2E6' rx='2%2E1'/%3E%3Crect x='17%2E6' y='9%2E4' width='4%2E1' height='8' rx='2%2E05'/%3E%3Crect x='21%2E1' y='11' width='3%2E8' height='7' rx='1%2E9'/%3E%3Crect x='8%2E4' y='12%2E6' width='16%2E5' height='12%2E4' rx='5'/%3E%3Crect x='4%2E4' y='11%2E6' width='4%2E2' height='9%2E4' rx='2%2E1' transform='rotate(-38 6%2E5 16%2E3)'/%3E%3C/g%3E%3Cg stroke='%231c1b19' stroke-width='%2E9' stroke-linecap='round'%3E%3Cpath d='M14%2E3 10%2E6 L14%2E3 14%2E2 M17%2E9 11%2E6 L17%2E9 14%2E6 M21%2E4 13 L21%2E4 15%2E4'/%3E%3C/g%3E%3C/svg%3E") 12 3, pointer;
|
|
27
|
+
--cursor-text: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E4'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23s)' fill='none' stroke='%231c1b19' stroke-width='4%2E6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 5%2E2 L12 5%2E2 Q14 5%2E2 14 7%2E2 Q14 5%2E2 16 5%2E2 L18 5%2E2 M14 7%2E2 L14 20%2E8 M10 22%2E8 L12 22%2E8 Q14 22%2E8 14 20%2E8 Q14 22%2E8 16 22%2E8 L18 22%2E8' fill='none'/%3E%3C/g%3E%3Cg fill='none' stroke='%23f6f4ef' stroke-width='1%2E9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 5%2E2 L12 5%2E2 Q14 5%2E2 14 7%2E2 Q14 5%2E2 16 5%2E2 L18 5%2E2 M14 7%2E2 L14 20%2E8 M10 22%2E8 L12 22%2E8 Q14 22%2E8 14 20%2E8 Q14 22%2E8 16 22%2E8 L18 22%2E8' fill='none'/%3E%3C/g%3E%3C/svg%3E") 14 14, text;
|
|
28
|
+
--cursor-disabled: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E4'/%3E%3C/filter%3E%3C/defs%3E%3Ccircle cx='14' cy='14' r='10%2E3' fill='%231c1b19' filter='url(%23s)'/%3E%3Cg stroke='%23f6f4ef' stroke-width='2%2E4' stroke-linecap='round'%3E%3Ccircle cx='14' cy='14' r='7%2E6' fill='none'/%3E%3Cpath d='M8%2E7 19%2E3 L19%2E3 8%2E7' fill='none'/%3E%3C/g%3E%3C/svg%3E") 14 14, not-allowed;
|
|
29
|
+
--cursor-interactive: var(--cursor-pointer);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[data-cursor="dot"],
|
|
33
|
+
[data-cursor="dot"] [data-theme="light"] {
|
|
34
|
+
--cursor-default: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E25'/%3E%3C/filter%3E%3C/defs%3E%3Ccircle cx='14' cy='14' r='4%2E6' fill='%231a1a1a' stroke='%23ffffff' stroke-width='1%2E6' filter='url(%23s)'/%3E%3C/svg%3E") 14 14, default;
|
|
35
|
+
--cursor-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E25'/%3E%3C/filter%3E%3C/defs%3E%3Ccircle cx='14' cy='14' r='10%2E4' fill='none' stroke='%23ffffff' stroke-width='4%2E4' filter='url(%23s)'/%3E%3Ccircle cx='14' cy='14' r='10%2E4' fill='%231a1a1a' fill-opacity='%2E12' stroke='%231a1a1a' stroke-width='1%2E8'/%3E%3Ccircle cx='14' cy='14' r='2%2E4' fill='%231a1a1a' stroke='%23ffffff' stroke-width='1%2E2'/%3E%3C/svg%3E") 14 14, pointer;
|
|
36
|
+
--cursor-text: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E25'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23s)' fill='none' stroke='%23ffffff' stroke-width='4%2E6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 5%2E2 L12 5%2E2 Q14 5%2E2 14 7%2E2 Q14 5%2E2 16 5%2E2 L18 5%2E2 M14 7%2E2 L14 20%2E8 M10 22%2E8 L12 22%2E8 Q14 22%2E8 14 20%2E8 Q14 22%2E8 16 22%2E8 L18 22%2E8' fill='none'/%3E%3C/g%3E%3Cg fill='none' stroke='%231a1a1a' stroke-width='1%2E9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 5%2E2 L12 5%2E2 Q14 5%2E2 14 7%2E2 Q14 5%2E2 16 5%2E2 L18 5%2E2 M14 7%2E2 L14 20%2E8 M10 22%2E8 L12 22%2E8 Q14 22%2E8 14 20%2E8 Q14 22%2E8 16 22%2E8 L18 22%2E8' fill='none'/%3E%3C/g%3E%3C/svg%3E") 14 14, text;
|
|
37
|
+
--cursor-disabled: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E25'/%3E%3C/filter%3E%3C/defs%3E%3Ccircle cx='14' cy='14' r='10%2E3' fill='%23ffffff' filter='url(%23s)'/%3E%3Cg stroke='%231a1a1a' stroke-width='2%2E4' stroke-linecap='round'%3E%3Ccircle cx='14' cy='14' r='7%2E6' fill='none'/%3E%3Cpath d='M8%2E7 19%2E3 L19%2E3 8%2E7' fill='none'/%3E%3C/g%3E%3C/svg%3E") 14 14, not-allowed;
|
|
38
|
+
--cursor-interactive: var(--cursor-pointer);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
[data-theme="dark"][data-cursor="dot"],
|
|
42
|
+
[data-theme="dark"] [data-cursor="dot"],
|
|
43
|
+
[data-cursor="dot"] [data-theme="dark"] {
|
|
44
|
+
--cursor-default: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E45'/%3E%3C/filter%3E%3C/defs%3E%3Ccircle cx='14' cy='14' r='4%2E6' fill='%23f4f4f4' stroke='%23161616' stroke-width='1%2E6' filter='url(%23s)'/%3E%3C/svg%3E") 14 14, default;
|
|
45
|
+
--cursor-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E45'/%3E%3C/filter%3E%3C/defs%3E%3Ccircle cx='14' cy='14' r='10%2E4' fill='none' stroke='%23161616' stroke-width='4%2E4' filter='url(%23s)'/%3E%3Ccircle cx='14' cy='14' r='10%2E4' fill='%23f4f4f4' fill-opacity='%2E12' stroke='%23f4f4f4' stroke-width='1%2E8'/%3E%3Ccircle cx='14' cy='14' r='2%2E4' fill='%23f4f4f4' stroke='%23161616' stroke-width='1%2E2'/%3E%3C/svg%3E") 14 14, pointer;
|
|
46
|
+
--cursor-text: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E45'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23s)' fill='none' stroke='%23161616' stroke-width='4%2E6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 5%2E2 L12 5%2E2 Q14 5%2E2 14 7%2E2 Q14 5%2E2 16 5%2E2 L18 5%2E2 M14 7%2E2 L14 20%2E8 M10 22%2E8 L12 22%2E8 Q14 22%2E8 14 20%2E8 Q14 22%2E8 16 22%2E8 L18 22%2E8' fill='none'/%3E%3C/g%3E%3Cg fill='none' stroke='%23f4f4f4' stroke-width='1%2E9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 5%2E2 L12 5%2E2 Q14 5%2E2 14 7%2E2 Q14 5%2E2 16 5%2E2 L18 5%2E2 M14 7%2E2 L14 20%2E8 M10 22%2E8 L12 22%2E8 Q14 22%2E8 14 20%2E8 Q14 22%2E8 16 22%2E8 L18 22%2E8' fill='none'/%3E%3C/g%3E%3C/svg%3E") 14 14, text;
|
|
47
|
+
--cursor-disabled: url("data:image/svg+xml,%3Csvg xmlns='http://www%2Ew3%2Eorg/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='1%2E2' flood-color='%23000' flood-opacity='0%2E45'/%3E%3C/filter%3E%3C/defs%3E%3Ccircle cx='14' cy='14' r='10%2E3' fill='%23161616' filter='url(%23s)'/%3E%3Cg stroke='%23f4f4f4' stroke-width='2%2E4' stroke-linecap='round'%3E%3Ccircle cx='14' cy='14' r='7%2E6' fill='none'/%3E%3Cpath d='M8%2E7 19%2E3 L19%2E3 8%2E7' fill='none'/%3E%3C/g%3E%3C/svg%3E") 14 14, not-allowed;
|
|
48
|
+
--cursor-interactive: var(--cursor-pointer);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:where([data-cursor="soft"], [data-cursor="rounded"], [data-cursor="dot"]),
|
|
52
|
+
:where([data-cursor="rounded"], [data-cursor="dot"]) :where([data-theme]) {
|
|
53
|
+
cursor: var(--cursor-default);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
[data-cursor="system"] {
|
|
57
|
+
--cursor-default: default;
|
|
58
|
+
--cursor-pointer: pointer;
|
|
59
|
+
--cursor-text: text;
|
|
60
|
+
--cursor-disabled: not-allowed;
|
|
61
|
+
--cursor-interactive: pointer;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:where([data-cursor="system"]) {
|
|
65
|
+
cursor: auto;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
html[data-cursor-interactive="default"]:is([data-cursor="soft"], [data-cursor="rounded"], [data-cursor="dot"], [data-cursor="system"]),
|
|
69
|
+
html[data-cursor-interactive="default"] :is([data-cursor="soft"], [data-cursor="rounded"], [data-cursor="dot"], [data-cursor="system"]),
|
|
70
|
+
html[data-cursor-interactive="default"] :is([data-cursor="soft"], [data-cursor="rounded"], [data-cursor="dot"]) [data-theme] {
|
|
71
|
+
--cursor-interactive: var(--cursor-default);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
[data-cursor-follow] {
|
|
75
|
+
cursor: none;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:where([data-cursor="soft"], [data-cursor="rounded"], [data-cursor="dot"], [data-cursor-follow]) :where(a[href], button, select, summary, label[for], [role="button"], [role="link"], [role="tab"], [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"], [role="checkbox"], [role="radio"], [role="switch"], input[type="checkbox"], input[type="radio"], input[type="range"], input[type="file"], input[type="color"], input[type="submit"], input[type="button"], input[type="reset"], input[type="image"]) {
|
|
79
|
+
cursor: var(--cursor-interactive, pointer);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:where([data-cursor="soft"], [data-cursor="rounded"], [data-cursor="dot"], [data-cursor-follow]) :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"], [type="submit"], [type="button"], [type="reset"], [type="image"], [type="hidden"]), textarea, [contenteditable]:not([contenteditable="false"])) {
|
|
83
|
+
cursor: var(--cursor-text, text);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:where([data-cursor="soft"], [data-cursor="rounded"], [data-cursor="dot"], [data-cursor-follow]) :where(:disabled, [aria-disabled="true"]) {
|
|
87
|
+
cursor: var(--cursor-disabled, not-allowed);
|
|
88
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// Density helpers for component modules. Emits no CSS of its own.
|
|
4
|
+
|
|
5
|
+
// The theme's density, `data-density` on <html> (ThemeProvider's `density`):
|
|
6
|
+
// the size a control takes when its own `size` is left out. `normal` is m,
|
|
7
|
+
// the size every control already defaults to, so it needs no rule; compact
|
|
8
|
+
// is s and spacious is l.
|
|
9
|
+
//
|
|
10
|
+
// A control left at its default renders its m classes plus an `auto` class,
|
|
11
|
+
// and its module restyles that class here to its s or l look, so the theme
|
|
12
|
+
// reaches it through CSS alone: in a server component and without JS. A
|
|
13
|
+
// control given a `size` never gets the class, so its own size always wins.
|
|
14
|
+
//
|
|
15
|
+
// The attribute is read on <html> only. Rules that matched any ancestor
|
|
16
|
+
// would let a `normal` subtree inside a `compact` page resolve by source
|
|
17
|
+
// order rather than by which ancestor is nearer.
|
|
18
|
+
$attribute: "data-density";
|
|
19
|
+
|
|
20
|
+
// Density name to the size it gives a control. One table, so a rename stays cheap.
|
|
21
|
+
$sizes: (
|
|
22
|
+
compact: s,
|
|
23
|
+
spacious: l,
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
// The rules inside apply under the density that gives `$size` (s or l).
|
|
27
|
+
//
|
|
28
|
+
// `size` is for the control's own box. The attribute sits in `:where()`, so
|
|
29
|
+
// the rule weighs what the control's `.s`/`.l` class weighs: it beats `.m`
|
|
30
|
+
// by coming after it, and a layout prop's utility class (`padding="16"`)
|
|
31
|
+
// meets it on the same terms it meets `.m` today.
|
|
32
|
+
//
|
|
33
|
+
// `parts` is for the pieces inside the control a size also picks presets
|
|
34
|
+
// for (its label's text, its icon), which already carry a utility class of
|
|
35
|
+
// the same weight (`.font-label.font-m`): there the attribute counts, so the
|
|
36
|
+
// density wins whatever order the stylesheets load in.
|
|
37
|
+
@mixin size($size) {
|
|
38
|
+
@each $density, $mapped in $sizes {
|
|
39
|
+
@if $mapped == $size {
|
|
40
|
+
:global(:where(html[#{$attribute}="#{$density}"])) & {
|
|
41
|
+
@content;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@mixin parts($size) {
|
|
48
|
+
@each $density, $mapped in $sizes {
|
|
49
|
+
@if $mapped == $size {
|
|
50
|
+
:global(html[#{$attribute}="#{$density}"]) & {
|
|
51
|
+
@content;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// A text preset's size, as the `.font-<family>.font-<size>` utility sets it.
|
|
58
|
+
@mixin text($family, $size) {
|
|
59
|
+
font-size: calc(var(--font-size-#{$family}-#{$size}) * var(--font-size-#{$family}-multiplier));
|
|
60
|
+
line-height: calc(var(--line-height-#{$family}-#{$size}) * var(--line-height-#{$family}-multiplier));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// An Icon's size, as Icon.module.scss sets it.
|
|
64
|
+
$icon-sizes: (
|
|
65
|
+
xs: var(--static-space-16),
|
|
66
|
+
s: var(--static-space-20),
|
|
67
|
+
m: var(--static-space-24),
|
|
68
|
+
l: var(--static-space-32),
|
|
69
|
+
xl: var(--static-space-40),
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
@mixin icon($size) {
|
|
73
|
+
font-size: map.get($icon-sizes, $size);
|
|
74
|
+
}
|