@musecat/uikit 0.1.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/LICENSE +9 -0
- package/README.md +51 -0
- package/index.ts +78 -0
- package/package.json +103 -0
- package/packages/Components/Box/Box.tsx +173 -0
- package/packages/Components/Box/Box.types.ts +48 -0
- package/packages/Components/Button/Button.tsx +275 -0
- package/packages/Components/Button/Button.types.ts +44 -0
- package/packages/Components/Card/Card.default.tsx +180 -0
- package/packages/Components/Card/Card.foldable.tsx +383 -0
- package/packages/Components/Card/Card.module.scss +23 -0
- package/packages/Components/Card/Card.tsx +8 -0
- package/packages/Components/Card/Card.types.ts +91 -0
- package/packages/Components/Card/Card.utils.ts +66 -0
- package/packages/Components/Checkbox/Checkbox.module.scss +11 -0
- package/packages/Components/Checkbox/Checkbox.tsx +104 -0
- package/packages/Components/Checkbox/Checkbox.types.ts +24 -0
- package/packages/Components/CodeBox/CodeBox.copy.tsx +43 -0
- package/packages/Components/CodeBox/CodeBox.module.scss +72 -0
- package/packages/Components/CodeBox/CodeBox.tsx +91 -0
- package/packages/Components/CodeBox/CodeBox.types.ts +17 -0
- package/packages/Components/ContextMenu/ContextMenu.module.scss +8 -0
- package/packages/Components/ContextMenu/ContextMenu.options.tsx +126 -0
- package/packages/Components/ContextMenu/ContextMenu.tsx +381 -0
- package/packages/Components/ContextMenu/ContextMenu.types.ts +46 -0
- package/packages/Components/ContributionGraph/ContributionGraph.module.scss +42 -0
- package/packages/Components/ContributionGraph/ContributionGraph.tsx +454 -0
- package/packages/Components/ContributionGraph/ContributionGraph.types.ts +27 -0
- package/packages/Components/DatePicker/DatePicker.calendar.tsx +161 -0
- package/packages/Components/DatePicker/DatePicker.core.tsx +582 -0
- package/packages/Components/DatePicker/DatePicker.module.scss +26 -0
- package/packages/Components/DatePicker/DatePicker.tsx +786 -0
- package/packages/Components/DatePicker/DatePicker.types.ts +36 -0
- package/packages/Components/DatePicker/DatePicker.utils.ts +80 -0
- package/packages/Components/DatePicker/hooks/useCalendar.ts +61 -0
- package/packages/Components/DatePicker/hooks/useSelection.ts +208 -0
- package/packages/Components/Divider/Divider.tsx +46 -0
- package/packages/Components/Divider/Divider.types.ts +12 -0
- package/packages/Components/Header/Header.module.scss +74 -0
- package/packages/Components/Header/Header.tsx +47 -0
- package/packages/Components/Header/Header.types.ts +8 -0
- package/packages/Components/Icon/Icon.group.tsx +122 -0
- package/packages/Components/Icon/Icon.group.types.ts +20 -0
- package/packages/Components/Icon/Icon.tsx +341 -0
- package/packages/Components/Icon/Icon.types.ts +59 -0
- package/packages/Components/Icon/SVG/data.tsx +232 -0
- package/packages/Components/Input/Input.module.scss +5 -0
- package/packages/Components/Input/Input.tsx +87 -0
- package/packages/Components/Input/Input.types.ts +14 -0
- package/packages/Components/Label/Label.module.scss +19 -0
- package/packages/Components/Label/Label.tsx +115 -0
- package/packages/Components/Label/Label.types.ts +28 -0
- package/packages/Components/Layout/Layout.docs.module.scss +42 -0
- package/packages/Components/Layout/Layout.docs.tsx +150 -0
- package/packages/Components/Layout/Layout.docs.types.ts +18 -0
- package/packages/Components/Layout/Layout.module.scss +91 -0
- package/packages/Components/Layout/Layout.tsx +306 -0
- package/packages/Components/Layout/Layout.types.ts +71 -0
- package/packages/Components/Maps/OSM/MapOSM.module.scss +11 -0
- package/packages/Components/Maps/OSM/MapOSM.shared.ts +121 -0
- package/packages/Components/Maps/OSM/MapOSM.tsx +279 -0
- package/packages/Components/Maps/OSM/MapOSM.types.ts +18 -0
- package/packages/Components/Nav/Nav.module.scss +137 -0
- package/packages/Components/Nav/Nav.tsx +304 -0
- package/packages/Components/Nav/Nav.types.ts +32 -0
- package/packages/Components/Nav/hooks/useNavDrag.ts +374 -0
- package/packages/Components/Nav/hooks/useNavIndicator.ts +137 -0
- package/packages/Components/Pagination/Pagination.tsx +254 -0
- package/packages/Components/Pagination/Pagination.types.ts +18 -0
- package/packages/Components/Pill/Pill.tsx +127 -0
- package/packages/Components/Pill/Pill.types.ts +33 -0
- package/packages/Components/Profile/Profile.shared.ts +74 -0
- package/packages/Components/Profile/Profile.tsx +382 -0
- package/packages/Components/Profile/Profile.types.ts +55 -0
- package/packages/Components/Progress/Progress.module.scss +15 -0
- package/packages/Components/Progress/Progress.tsx +88 -0
- package/packages/Components/Progress/Progress.types.ts +22 -0
- package/packages/Components/Radio/Radio.module.scss +11 -0
- package/packages/Components/Radio/Radio.tsx +121 -0
- package/packages/Components/Radio/Radio.types.ts +20 -0
- package/packages/Components/Select/Select.keyboard.tsx +76 -0
- package/packages/Components/Select/Select.trigger.tsx +88 -0
- package/packages/Components/Select/Select.tsx +11 -0
- package/packages/Components/Select/Select.types.ts +38 -0
- package/packages/Components/Select/Select.utils.ts +84 -0
- package/packages/Components/Select/hooks/useSelectNavigation.ts +461 -0
- package/packages/Components/Select/hooks/useSelectSelection.ts +142 -0
- package/packages/Components/Select/hooks/useSelectState.ts +314 -0
- package/packages/Components/Select/select.control.tsx +228 -0
- package/packages/Components/Select/select.inner.tsx +312 -0
- package/packages/Components/Skeleton/Skeleton.tsx +30 -0
- package/packages/Components/Skeleton/Skeleton.types.ts +12 -0
- package/packages/Components/Spinner/Spinner.module.scss +78 -0
- package/packages/Components/Spinner/Spinner.tsx +125 -0
- package/packages/Components/Spinner/Spinner.types.ts +19 -0
- package/packages/Components/Text/Text.module.scss +7 -0
- package/packages/Components/Text/Text.tsx +49 -0
- package/packages/Components/Text/Text.types.ts +33 -0
- package/packages/Components/TimePicker/TimePicker.core.tsx +448 -0
- package/packages/Components/TimePicker/TimePicker.module.scss +30 -0
- package/packages/Components/TimePicker/TimePicker.tsx +511 -0
- package/packages/Components/TimePicker/TimePicker.types.ts +22 -0
- package/packages/Components/Timeline/Timeline.tsx +111 -0
- package/packages/Components/Timeline/Timeline.types.ts +23 -0
- package/packages/Components/Title/Title.tsx +305 -0
- package/packages/Components/Title/Title.types.ts +64 -0
- package/packages/Components/Toggle/Toggle.module.scss +32 -0
- package/packages/Components/Toggle/Toggle.tsx +272 -0
- package/packages/Components/Toggle/Toggle.types.ts +17 -0
- package/packages/Components/Tooltip/Tooltip.module.scss +44 -0
- package/packages/Components/Tooltip/Tooltip.tsx +340 -0
- package/packages/Components/Tooltip/Tooltip.types.ts +38 -0
- package/packages/Frameworks/Dialog/Dialog.background.tsx +88 -0
- package/packages/Frameworks/Dialog/Dialog.boot.tsx +32 -0
- package/packages/Frameworks/Dialog/Dialog.store.ts +199 -0
- package/packages/Frameworks/Dialog/Dialog.tsx +185 -0
- package/packages/Frameworks/Dialog/Dialog.types.ts +264 -0
- package/packages/Frameworks/Dialog/Dialog.utils.ts +22 -0
- package/packages/Frameworks/Dialog/contents/Dialog.footer.tsx +79 -0
- package/packages/Frameworks/Dialog/contents/Dialog.funnel.tsx +260 -0
- package/packages/Frameworks/Dialog/contents/Dialog.header.tsx +137 -0
- package/packages/Frameworks/Dialog/hooks/useDialogPosition.ts +298 -0
- package/packages/Frameworks/Dialog/hooks/useSheetDrag.ts +325 -0
- package/packages/Frameworks/Dialog/hooks/useSheetGeometry.ts +201 -0
- package/packages/Frameworks/Dialog/hooks/useSheetProgressive.ts +98 -0
- package/packages/Frameworks/Dialog/renderers/renderModal.tsx +228 -0
- package/packages/Frameworks/Dialog/renderers/renderPopover.tsx +220 -0
- package/packages/Frameworks/Dialog/renderers/renderSheet.tsx +571 -0
- package/packages/Frameworks/EdgeEffect/EdgeEffect.tsx +52 -0
- package/packages/Frameworks/EdgeEffect/EdgeEffect.types.ts +5 -0
- package/packages/Frameworks/Motion/Motion.presets.ts +49 -0
- package/packages/Frameworks/Pressable/Pressable.module.scss +19 -0
- package/packages/Frameworks/Pressable/Pressable.tsx +651 -0
- package/packages/Frameworks/Pressable/Pressable.types.ts +73 -0
- package/packages/Frameworks/Squircle/Squircle.tsx +263 -0
- package/packages/Frameworks/Squircle/Squircle.types.ts +15 -0
- package/packages/Frameworks/Theme/Radius.types.ts +55 -0
- package/packages/Frameworks/Theme/Theme.types.ts +325 -0
- package/packages/Frameworks/Toaster/Toaster.boot.tsx +47 -0
- package/packages/Frameworks/Toaster/Toaster.module.scss +168 -0
- package/packages/Frameworks/Toaster/Toaster.types.ts +13 -0
- package/packages/Frameworks/View/DNDView/DNDView.module.scss +8 -0
- package/packages/Frameworks/View/DNDView/DNDView.tsx +470 -0
- package/packages/Frameworks/View/DNDView/DNDView.types.ts +61 -0
- package/packages/Frameworks/View/HScrollView/HScrollView.module.scss +59 -0
- package/packages/Frameworks/View/HScrollView/HScrollView.tsx +386 -0
- package/packages/Frameworks/View/HScrollView/HScrollView.types.ts +46 -0
- package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.counter.tsx +27 -0
- package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.footer.tsx +76 -0
- package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.header.tsx +49 -0
- package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.list.tsx +74 -0
- package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.slide.tsx +71 -0
- package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.tsx +175 -0
- package/packages/Frameworks/View/ImageView/Image.controls.tsx +39 -0
- package/packages/Frameworks/View/ImageView/Image.hooks.ts +82 -0
- package/packages/Frameworks/View/ImageView/Image.module.scss +7 -0
- package/packages/Frameworks/View/ImageView/Image.tsx +375 -0
- package/packages/Frameworks/View/ImageView/Image.types.ts +71 -0
- package/packages/Frameworks/View/ImageView/Image.utils.ts +79 -0
- package/packages/Frameworks/View/View.module.scss +34 -0
- package/packages/Frameworks/View/View.tsx +200 -0
- package/packages/Frameworks/View/View.types.ts +36 -0
- package/packages/Frameworks/_shared/Padding.types.ts +52 -0
- package/packages/Frameworks/_shared/StopParentInteraction.tsx +45 -0
- package/packages/Frameworks/_shared/Wind.types.ts +17 -0
- package/packages/Frameworks/_shared/bodyScrollLock.ts +127 -0
- package/packages/Frameworks/_shared/layer.constants.ts +8 -0
- package/packages/Frameworks/_shared/normalize.ts +39 -0
- package/packages/Frameworks/_shared/sizing.ts +55 -0
- package/packages/Frameworks/_shared/useControllableState.ts +29 -0
- package/packages/Styles/_animation.scss +42 -0
- package/packages/Styles/_color.scss +131 -0
- package/packages/Styles/_font.scss +30 -0
- package/packages/Styles/_icon.scss +782 -0
- package/packages/Styles/_importer.scss +9 -0
- package/packages/Styles/_system.scss +69 -0
- package/packages/Styles/_textstyle.scss +111 -0
- package/packages/Styles/_theme.scss +452 -0
- package/packages/Styles/_viewport-global.scss +99 -0
- package/packages/Styles/_viewport.scss +108 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
font-family: var(--font-sans-serif);
|
|
6
|
+
word-break: keep-all;
|
|
7
|
+
-webkit-tap-highlight-color: rgb(0, 0, 0, 0%) !important;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
html {
|
|
11
|
+
font-size: var(--font-size);
|
|
12
|
+
line-height: 1;
|
|
13
|
+
color: var(--color-text-base);
|
|
14
|
+
background: var(--color-background-base);
|
|
15
|
+
transition: var(--transition-background);
|
|
16
|
+
scroll-behavior: smooth;
|
|
17
|
+
overflow-x: hidden;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
body {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
margin: 0;
|
|
26
|
+
padding: 0;
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 100%;
|
|
29
|
+
overflow: visible;
|
|
30
|
+
overflow-x: hidden;
|
|
31
|
+
transition: var(--transition-background);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
a,
|
|
35
|
+
button,
|
|
36
|
+
input,
|
|
37
|
+
textarea,
|
|
38
|
+
select,
|
|
39
|
+
label {
|
|
40
|
+
background: transparent;
|
|
41
|
+
color: inherit;
|
|
42
|
+
border: 0;
|
|
43
|
+
padding: 0;
|
|
44
|
+
margin: 0;
|
|
45
|
+
text-decoration: none;
|
|
46
|
+
outline: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// a, button, input, textarea, select, label, [tabindex="0"] {
|
|
50
|
+
// &:focus-visible {
|
|
51
|
+
// outline: 1px solid var(--color-blue-1) !important;
|
|
52
|
+
// outline-offset: -1px !important;
|
|
53
|
+
// }
|
|
54
|
+
// }
|
|
55
|
+
|
|
56
|
+
input::placeholder {
|
|
57
|
+
opacity: 0.4;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
a,
|
|
61
|
+
button {
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
text-align: initial;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
input,
|
|
67
|
+
textarea {
|
|
68
|
+
width: 100%;
|
|
69
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--font-largetitle-size: 3.8rem;
|
|
3
|
+
--font-largetitle-line-height: 4.1rem;
|
|
4
|
+
--font-title1-size: 2.6rem;
|
|
5
|
+
--font-title1-line-height: 3.3rem;
|
|
6
|
+
--font-title2-size: 2.2rem;
|
|
7
|
+
--font-title2-line-height: 2.8rem;
|
|
8
|
+
--font-title3-size: 2rem;
|
|
9
|
+
--font-title3-line-height: 2.5rem;
|
|
10
|
+
--font-headline-size: 1.8rem;
|
|
11
|
+
--font-headline-line-height: 2.2rem;
|
|
12
|
+
--font-body-size: 1.8rem;
|
|
13
|
+
--font-body-line-height: 2.2rem;
|
|
14
|
+
--font-callout-size: 1.7rem;
|
|
15
|
+
--font-callout-line-height: 2.1rem;
|
|
16
|
+
--font-subheadline-size: 1.6rem;
|
|
17
|
+
--font-subheadline-line-height: 2rem;
|
|
18
|
+
--font-footnote-size: 1.3rem;
|
|
19
|
+
--font-footnote-line-height: 1.8rem;
|
|
20
|
+
--font-caption1-size: 1.2rem;
|
|
21
|
+
--font-caption1-line-height: 1.7rem;
|
|
22
|
+
--font-caption2-size: 1.1rem;
|
|
23
|
+
--font-caption2-line-height: 1.3rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* 통합 클래스 */
|
|
27
|
+
.LargeTitle {
|
|
28
|
+
font-size: var(--font-largetitle-size);
|
|
29
|
+
line-height: var(--font-largetitle-line-height);
|
|
30
|
+
font-weight: 700;
|
|
31
|
+
letter-spacing: -0.1rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.Title1,
|
|
35
|
+
h1 {
|
|
36
|
+
font-size: var(--font-title1-size);
|
|
37
|
+
line-height: var(--font-title1-line-height);
|
|
38
|
+
font-weight: 600;
|
|
39
|
+
letter-spacing: -0.06rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.Title2,
|
|
43
|
+
h2 {
|
|
44
|
+
font-size: var(--font-title2-size);
|
|
45
|
+
line-height: var(--font-title2-line-height);
|
|
46
|
+
font-weight: 600;
|
|
47
|
+
letter-spacing: -0.05rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.Title3,
|
|
51
|
+
h3 {
|
|
52
|
+
font-size: var(--font-title3-size);
|
|
53
|
+
line-height: var(--font-title3-line-height);
|
|
54
|
+
font-weight: 600;
|
|
55
|
+
letter-spacing: -0.04rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.Headline,
|
|
59
|
+
h4 {
|
|
60
|
+
font-size: var(--font-headline-size);
|
|
61
|
+
line-height: var(--font-headline-line-height);
|
|
62
|
+
font-weight: 500;
|
|
63
|
+
letter-spacing: -0.03rem;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.Body,
|
|
67
|
+
p {
|
|
68
|
+
font-size: var(--font-body-size);
|
|
69
|
+
line-height: var(--font-body-line-height);
|
|
70
|
+
font-weight: 400;
|
|
71
|
+
letter-spacing: -0.02rem;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.Callout,
|
|
75
|
+
blockquote {
|
|
76
|
+
font-size: var(--font-callout-size);
|
|
77
|
+
line-height: var(--font-callout-line-height);
|
|
78
|
+
font-weight: 400;
|
|
79
|
+
letter-spacing: -0.02rem;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.Subheadline,
|
|
83
|
+
h5 {
|
|
84
|
+
font-size: var(--font-subheadline-size);
|
|
85
|
+
line-height: var(--font-subheadline-line-height);
|
|
86
|
+
font-weight: 400;
|
|
87
|
+
letter-spacing: -0.02rem;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.Footnote,
|
|
91
|
+
h6 {
|
|
92
|
+
font-size: var(--font-footnote-size);
|
|
93
|
+
line-height: var(--font-footnote-line-height);
|
|
94
|
+
font-weight: 400;
|
|
95
|
+
letter-spacing: -0.01rem;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.Caption1,
|
|
99
|
+
small {
|
|
100
|
+
font-size: var(--font-caption1-size);
|
|
101
|
+
line-height: var(--font-caption1-line-height);
|
|
102
|
+
font-weight: 300;
|
|
103
|
+
letter-spacing: 0.01rem;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.Caption2 {
|
|
107
|
+
font-size: var(--font-caption2-size);
|
|
108
|
+
line-height: var(--font-caption2-line-height);
|
|
109
|
+
font-weight: 300;
|
|
110
|
+
letter-spacing: 0.02rem;
|
|
111
|
+
}
|
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
@use "sass:string";
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
@use "sass:math";
|
|
4
|
+
|
|
5
|
+
$colors: (
|
|
6
|
+
"Pink": "pink",
|
|
7
|
+
"Red": "red",
|
|
8
|
+
"Brown": "brown",
|
|
9
|
+
"Orange": "orange",
|
|
10
|
+
"Yellow": "yellow",
|
|
11
|
+
"Green": "green",
|
|
12
|
+
"Mint": "mint",
|
|
13
|
+
"Cyan": "cyan",
|
|
14
|
+
"Blue": "blue",
|
|
15
|
+
"Indigo": "indigo",
|
|
16
|
+
"Purple": "purple",
|
|
17
|
+
"Magenta": "magenta",
|
|
18
|
+
);
|
|
19
|
+
$paint-colors: map.merge(
|
|
20
|
+
(
|
|
21
|
+
"Base": "base",
|
|
22
|
+
"BaseLight": "base-light",
|
|
23
|
+
"BaseDark": "base-dark",
|
|
24
|
+
"Reversed": "reversed",
|
|
25
|
+
),
|
|
26
|
+
$colors
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
$not-disabled: ':not(:disabled, [disabled], [readonly], [aria-disabled="true"], [data-disabled="true"], [data-readonly="true"], .disabled)';
|
|
30
|
+
$tp-bg: (
|
|
31
|
+
1: 70%,
|
|
32
|
+
2: 65%,
|
|
33
|
+
3: 60%,
|
|
34
|
+
4: 55%,
|
|
35
|
+
5: 50%,
|
|
36
|
+
6: 45%,
|
|
37
|
+
);
|
|
38
|
+
$tp-border: (
|
|
39
|
+
1: 20%,
|
|
40
|
+
2: 25%,
|
|
41
|
+
3: 30%,
|
|
42
|
+
4: 35%,
|
|
43
|
+
5: 40%,
|
|
44
|
+
6: 45%,
|
|
45
|
+
);
|
|
46
|
+
$border-widths: (
|
|
47
|
+
"Light": 0.05rem,
|
|
48
|
+
"Regular": 0.1rem,
|
|
49
|
+
"Bold": 0.15rem,
|
|
50
|
+
);
|
|
51
|
+
$border-directions: (
|
|
52
|
+
1: (
|
|
53
|
+
"border-top",
|
|
54
|
+
"border-right",
|
|
55
|
+
"border-bottom",
|
|
56
|
+
"border-left",
|
|
57
|
+
),
|
|
58
|
+
2: (
|
|
59
|
+
"border-right",
|
|
60
|
+
"border-left",
|
|
61
|
+
),
|
|
62
|
+
3: ("border-bottom"),
|
|
63
|
+
4: ("border-left"),
|
|
64
|
+
);
|
|
65
|
+
$shadow-blur: (
|
|
66
|
+
1: 0.125rem,
|
|
67
|
+
2: 0.25rem,
|
|
68
|
+
3: 0.5rem,
|
|
69
|
+
);
|
|
70
|
+
$shadow-opacity: (
|
|
71
|
+
1: 0.15,
|
|
72
|
+
2: 0.2,
|
|
73
|
+
3: 0.35,
|
|
74
|
+
);
|
|
75
|
+
$radius: (
|
|
76
|
+
"circle": 25.6rem,
|
|
77
|
+
"system-extra-light": 0.6rem,
|
|
78
|
+
"system-light": 1.2rem,
|
|
79
|
+
"system": 1.6rem,
|
|
80
|
+
"system-bold": 2rem,
|
|
81
|
+
"system-extra-bold": 2.4rem,
|
|
82
|
+
"system-heavy": 3.6rem,
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
@function bg-color($color, $level) {
|
|
86
|
+
@if $color == "base" {
|
|
87
|
+
@return var(--color-base-#{$level});
|
|
88
|
+
} @else if $color == "reversed" {
|
|
89
|
+
@return var(--color-base-reversed-#{$level});
|
|
90
|
+
} @else if $color == "base-light" {
|
|
91
|
+
@return var(--color-base-light-#{$level});
|
|
92
|
+
} @else if $color == "base-dark" {
|
|
93
|
+
@return var(--color-base-dark-#{$level});
|
|
94
|
+
} @else {
|
|
95
|
+
@return var(--color-#{$color}-#{$level});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@function fg-color($color, $level) {
|
|
100
|
+
@if $color == "base" {
|
|
101
|
+
@return var(--color-base-reversed-#{$level});
|
|
102
|
+
} @else if $color == "reversed" {
|
|
103
|
+
@return var(--color-base-#{$level});
|
|
104
|
+
} @else if $color == "base-light" {
|
|
105
|
+
@return var(--color-base-light-#{$level});
|
|
106
|
+
} @else if $color == "base-dark" {
|
|
107
|
+
@return var(--color-base-dark-#{$level});
|
|
108
|
+
} @else {
|
|
109
|
+
@return var(--color-#{$color}-#{$level});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@mixin apply-fg($value) {
|
|
114
|
+
color: $value;
|
|
115
|
+
|
|
116
|
+
&,
|
|
117
|
+
& * {
|
|
118
|
+
color: $value;
|
|
119
|
+
stroke: $value;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@mixin bg-paint-base($cls, $color, $level) {
|
|
124
|
+
.ThemeBg-#{$cls} {
|
|
125
|
+
--theme-bg: #{bg-color($color, $level)};
|
|
126
|
+
|
|
127
|
+
background: var(--theme-bg) !important;
|
|
128
|
+
|
|
129
|
+
@if $level <= 4 {
|
|
130
|
+
&.ThemeInteractive {
|
|
131
|
+
@media (hover: hover) and (pointer: fine) {
|
|
132
|
+
&:hover#{$not-disabled} {
|
|
133
|
+
--theme-bg: #{bg-color($color, math.min($level + 1, 6))};
|
|
134
|
+
|
|
135
|
+
background: var(--theme-bg) !important;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
&:active#{$not-disabled} {
|
|
139
|
+
--theme-bg: #{bg-color($color, math.min($level + 2, 6))};
|
|
140
|
+
|
|
141
|
+
background: var(--theme-bg) !important;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@mixin bg-paint-state($state, $cls, $value) {
|
|
149
|
+
.ThemeBg#{$state}-#{$cls} {
|
|
150
|
+
&.ThemeInteractive {
|
|
151
|
+
@if $state == "Hover" {
|
|
152
|
+
@media (hover: hover) and (pointer: fine) {
|
|
153
|
+
&:hover#{$not-disabled} {
|
|
154
|
+
--theme-bg: #{$value};
|
|
155
|
+
|
|
156
|
+
background: var(--theme-bg) !important;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
} @else if $state == "Active" {
|
|
160
|
+
&:active#{$not-disabled} {
|
|
161
|
+
--theme-bg: #{$value};
|
|
162
|
+
|
|
163
|
+
background: var(--theme-bg) !important;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@mixin bg-paint-tp($cls, $base-color, $level, $alpha) {
|
|
171
|
+
.ThemeBg-#{$cls} {
|
|
172
|
+
--theme-bg: color-mix(in srgb, #{$base-color} #{$alpha}, transparent);
|
|
173
|
+
|
|
174
|
+
background: var(--theme-bg) !important;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@each $color-name, $color in $paint-colors {
|
|
179
|
+
@for $level from 1 through 6 {
|
|
180
|
+
@include bg-paint-base("#{$color-name}#{$level}", $color, $level);
|
|
181
|
+
@include bg-paint-state(
|
|
182
|
+
"Hover",
|
|
183
|
+
"#{$color-name}#{$level}",
|
|
184
|
+
bg-color($color, $level)
|
|
185
|
+
);
|
|
186
|
+
@include bg-paint-state(
|
|
187
|
+
"Active",
|
|
188
|
+
"#{$color-name}#{$level}",
|
|
189
|
+
bg-color($color, $level)
|
|
190
|
+
);
|
|
191
|
+
|
|
192
|
+
@each $tp, $alpha in $tp-bg {
|
|
193
|
+
$base-c: bg-color($color, $level);
|
|
194
|
+
|
|
195
|
+
@include bg-paint-tp(
|
|
196
|
+
"#{$color-name}#{$level}TP#{$tp}",
|
|
197
|
+
$base-c,
|
|
198
|
+
$level,
|
|
199
|
+
$alpha
|
|
200
|
+
);
|
|
201
|
+
@include bg-paint-state(
|
|
202
|
+
"Hover",
|
|
203
|
+
"#{$color-name}#{$level}TP#{$tp}",
|
|
204
|
+
color-mix(in srgb, #{$base-c} #{$alpha}, transparent)
|
|
205
|
+
);
|
|
206
|
+
@include bg-paint-state(
|
|
207
|
+
"Active",
|
|
208
|
+
"#{$color-name}#{$level}TP#{$tp}",
|
|
209
|
+
color-mix(in srgb, #{$base-c} #{$alpha}, transparent)
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
@each $color-name, $color in $paint-colors {
|
|
216
|
+
@for $level from 1 through 6 {
|
|
217
|
+
.ThemeColor-#{$color-name}#{$level} {
|
|
218
|
+
@include apply-fg(fg-color($color, $level));
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.ThemeBorder-None {
|
|
224
|
+
border-color: transparent !important;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@mixin border-width-color($properties, $width, $color) {
|
|
228
|
+
@each $property in $properties {
|
|
229
|
+
#{$property}: $width solid $color !important;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@mixin border-color-only($properties, $color) {
|
|
234
|
+
@each $property in $properties {
|
|
235
|
+
#{$property}-color: $color !important;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
@mixin border-paint($prefix, $cls, $width-name, $width, $color, $properties) {
|
|
240
|
+
.#{$prefix}-#{$cls}-#{$width-name} {
|
|
241
|
+
@if $width-name == "None" {
|
|
242
|
+
@include border-color-only($properties, transparent);
|
|
243
|
+
} @else {
|
|
244
|
+
@include border-width-color($properties, $width, $color);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
@each $color-name, $color in $paint-colors {
|
|
250
|
+
@for $level from 1 through 6 {
|
|
251
|
+
@each $width-name, $width in $border-widths {
|
|
252
|
+
@include border-paint(
|
|
253
|
+
"ThemeBorder",
|
|
254
|
+
"#{$color-name}#{$level}",
|
|
255
|
+
$width-name,
|
|
256
|
+
$width,
|
|
257
|
+
bg-color($color, $level),
|
|
258
|
+
("border")
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
@include border-paint(
|
|
263
|
+
"ThemeBorder",
|
|
264
|
+
"#{$color-name}#{$level}",
|
|
265
|
+
"None",
|
|
266
|
+
0,
|
|
267
|
+
bg-color($color, $level),
|
|
268
|
+
("border")
|
|
269
|
+
);
|
|
270
|
+
|
|
271
|
+
@each $direction, $properties in $border-directions {
|
|
272
|
+
@each $width-name, $width in $border-widths {
|
|
273
|
+
@include border-paint(
|
|
274
|
+
"ThemeBorder#{$direction}",
|
|
275
|
+
"#{$color-name}#{$level}",
|
|
276
|
+
$width-name,
|
|
277
|
+
$width,
|
|
278
|
+
bg-color($color, $level),
|
|
279
|
+
$properties
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
@include border-paint(
|
|
284
|
+
"ThemeBorder#{$direction}",
|
|
285
|
+
"#{$color-name}#{$level}",
|
|
286
|
+
"None",
|
|
287
|
+
0,
|
|
288
|
+
bg-color($color, $level),
|
|
289
|
+
$properties
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
@each $tp, $alpha in $tp-border {
|
|
294
|
+
$border-color: color-mix(
|
|
295
|
+
in srgb,
|
|
296
|
+
#{bg-color($color, $level)} #{$alpha},
|
|
297
|
+
transparent
|
|
298
|
+
);
|
|
299
|
+
|
|
300
|
+
@each $width-name, $width in $border-widths {
|
|
301
|
+
@include border-paint(
|
|
302
|
+
"ThemeBorder",
|
|
303
|
+
"#{$color-name}#{$level}TP#{$tp}",
|
|
304
|
+
$width-name,
|
|
305
|
+
$width,
|
|
306
|
+
$border-color,
|
|
307
|
+
("border")
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
@include border-paint(
|
|
312
|
+
"ThemeBorder",
|
|
313
|
+
"#{$color-name}#{$level}TP#{$tp}",
|
|
314
|
+
"None",
|
|
315
|
+
0,
|
|
316
|
+
$border-color,
|
|
317
|
+
("border")
|
|
318
|
+
);
|
|
319
|
+
|
|
320
|
+
@each $direction, $properties in $border-directions {
|
|
321
|
+
@each $width-name, $width in $border-widths {
|
|
322
|
+
@include border-paint(
|
|
323
|
+
"ThemeBorder#{$direction}",
|
|
324
|
+
"#{$color-name}#{$level}TP#{$tp}",
|
|
325
|
+
$width-name,
|
|
326
|
+
$width,
|
|
327
|
+
$border-color,
|
|
328
|
+
$properties
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
@include border-paint(
|
|
333
|
+
"ThemeBorder#{$direction}",
|
|
334
|
+
"#{$color-name}#{$level}TP#{$tp}",
|
|
335
|
+
"None",
|
|
336
|
+
0,
|
|
337
|
+
$border-color,
|
|
338
|
+
$properties
|
|
339
|
+
);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.ThemeInteractive {
|
|
346
|
+
@media (hover: hover) and (pointer: fine) {
|
|
347
|
+
&:hover#{$not-disabled} {
|
|
348
|
+
--theme-bg: color-mix(in srgb, currentcolor 6%, transparent);
|
|
349
|
+
|
|
350
|
+
background: var(--theme-bg);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
&:active#{$not-disabled} {
|
|
354
|
+
--theme-bg: color-mix(in srgb, currentcolor 10%, transparent);
|
|
355
|
+
|
|
356
|
+
background: var(--theme-bg);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
:root {
|
|
361
|
+
@each $name, $value in $radius {
|
|
362
|
+
--radius-#{$name}: #{$value};
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
--radius-system-alt: var(--radius-circle);
|
|
366
|
+
|
|
367
|
+
@each $level, $blur in $shadow-blur {
|
|
368
|
+
$alpha: map.get($shadow-opacity, $level);
|
|
369
|
+
|
|
370
|
+
--shadow-base-light-#{$level}: 0 0 #{$blur} rgba(0, 0, 0, #{$alpha});
|
|
371
|
+
--shadow-base-dark-#{$level}: 0 0 #{$blur} rgba(255, 255, 255, #{$alpha});
|
|
372
|
+
--shadow-base-#{$level}: var(--shadow-base-light-#{$level});
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
[data-color-mode="dark"] {
|
|
377
|
+
@each $level, $blur in $shadow-blur {
|
|
378
|
+
--shadow-base-#{$level}: var(--shadow-base-dark-#{$level});
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.ThemeShadow-1 {
|
|
383
|
+
box-shadow: var(--shadow-base-1) !important;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.ThemeShadow-2 {
|
|
387
|
+
box-shadow: var(--shadow-base-2) !important;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.ThemeShadow-3 {
|
|
391
|
+
box-shadow: var(--shadow-base-3) !important;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.ThemeShadow-None {
|
|
395
|
+
box-shadow: none !important;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
$background-blur: (
|
|
399
|
+
"ExtraLight": 0.4rem,
|
|
400
|
+
"Light": 0.8rem,
|
|
401
|
+
"Regular": 1.2rem,
|
|
402
|
+
"Bold": 1.6rem,
|
|
403
|
+
"ExtraBold": 2rem,
|
|
404
|
+
"Heavy": 3.2rem,
|
|
405
|
+
);
|
|
406
|
+
@each $name, $value in $background-blur {
|
|
407
|
+
.BackgroundBlur-#{$name} {
|
|
408
|
+
--theme-backdrop-filter: blur(#{$value});
|
|
409
|
+
|
|
410
|
+
-webkit-backdrop-filter: var(--theme-backdrop-filter);
|
|
411
|
+
backdrop-filter: var(--theme-backdrop-filter);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
:is(
|
|
416
|
+
:disabled,
|
|
417
|
+
[disabled],
|
|
418
|
+
[readonly],
|
|
419
|
+
[aria-disabled="true"],
|
|
420
|
+
[data-disabled="true"],
|
|
421
|
+
[data-readonly="true"],
|
|
422
|
+
.disabled,
|
|
423
|
+
.ThemeDisabled,
|
|
424
|
+
.ThemeReadonly
|
|
425
|
+
) {
|
|
426
|
+
cursor: not-allowed !important;
|
|
427
|
+
opacity: 0.4 !important;
|
|
428
|
+
pointer-events: none !important;
|
|
429
|
+
|
|
430
|
+
&:hover,
|
|
431
|
+
&:active,
|
|
432
|
+
&:focus,
|
|
433
|
+
&:focus-visible {
|
|
434
|
+
pointer-events: none !important;
|
|
435
|
+
outline: 0 !important;
|
|
436
|
+
box-shadow: none !important;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
[data-squircle] {
|
|
441
|
+
position: relative;
|
|
442
|
+
|
|
443
|
+
&::before {
|
|
444
|
+
content: "";
|
|
445
|
+
position: absolute;
|
|
446
|
+
inset: 0;
|
|
447
|
+
z-index: -1;
|
|
448
|
+
pointer-events: none;
|
|
449
|
+
border-radius: inherit;
|
|
450
|
+
clip-path: var(--squircle-clip, none);
|
|
451
|
+
}
|
|
452
|
+
}
|