soltana-ui 0.1.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 +158 -0
- package/dist/config/index.d.ts +3 -0
- package/dist/config/index.js +7 -0
- package/dist/config/register.d.ts +27 -0
- package/dist/config/stylesheet.d.ts +13 -0
- package/dist/config/types.d.ts +177 -0
- package/dist/config/types.js +7 -0
- package/dist/config/validation.d.ts +29 -0
- package/dist/config/validation.js +59 -0
- package/dist/enhancers/accordion.d.ts +19 -0
- package/dist/enhancers/carousel.d.ts +21 -0
- package/dist/enhancers/collapsible.d.ts +14 -0
- package/dist/enhancers/color-picker.d.ts +20 -0
- package/dist/enhancers/combobox.d.ts +17 -0
- package/dist/enhancers/context-menu.d.ts +19 -0
- package/dist/enhancers/date-picker.d.ts +8 -0
- package/dist/enhancers/drawer.d.ts +11 -0
- package/dist/enhancers/dropdown.d.ts +17 -0
- package/dist/enhancers/hover-card.d.ts +15 -0
- package/dist/enhancers/index.d.ts +42 -0
- package/dist/enhancers/modal.d.ts +16 -0
- package/dist/enhancers/scroll-area.d.ts +14 -0
- package/dist/enhancers/tabs.d.ts +26 -0
- package/dist/enhancers/test-helpers.d.ts +20 -0
- package/dist/enhancers/test-utils.d.ts +10 -0
- package/dist/enhancers/toast.d.ts +24 -0
- package/dist/enhancers/tooltip.d.ts +15 -0
- package/dist/enhancers/tree.d.ts +24 -0
- package/dist/enhancers/utils/click-away.d.ts +7 -0
- package/dist/enhancers/utils/create-overlay-enhancer.d.ts +14 -0
- package/dist/enhancers/utils/focus-trap.d.ts +9 -0
- package/dist/enhancers/utils/generate-id.d.ts +6 -0
- package/dist/enhancers/utils/keyboard-nav.d.ts +21 -0
- package/dist/enhancers/utils/position.d.ts +30 -0
- package/dist/fonts/index.d.ts +20 -0
- package/dist/index.d.ts +9 -0
- package/dist/init.d.ts +16 -0
- package/dist/plugins/index.d.ts +2 -0
- package/dist/plugins/index.js +1 -0
- package/dist/plugins/postcss-soltana-treeshake.d.ts +10 -0
- package/dist/plugins/postcss-soltana-treeshake.js +149 -0
- package/dist/plugins/types.d.ts +9 -0
- package/dist/plugins/types.js +4 -0
- package/dist/soltana-ui.css +1 -0
- package/dist/soltana-ui.js +1702 -0
- package/dist/soltana-ui.umd.cjs +1 -0
- package/package.json +90 -0
- package/src/styles/_variables.scss +348 -0
- package/src/styles/base/_accessibility.scss +146 -0
- package/src/styles/base/_index.scss +12 -0
- package/src/styles/base/_register.scss +84 -0
- package/src/styles/base/_relief-system.scss +53 -0
- package/src/styles/base/_scrollbar.scss +40 -0
- package/src/styles/base/_transitions.scss +75 -0
- package/src/styles/base/_typography.scss +442 -0
- package/src/styles/components/_alert-dialogs.scss +75 -0
- package/src/styles/components/_badges.scss +215 -0
- package/src/styles/components/_buttons.scss +293 -0
- package/src/styles/components/_callouts.scss +99 -0
- package/src/styles/components/_cards.scss +97 -0
- package/src/styles/components/_carousels.scss +108 -0
- package/src/styles/components/_closes.scss +63 -0
- package/src/styles/components/_code.scss +75 -0
- package/src/styles/components/_collapsibles.scss +61 -0
- package/src/styles/components/_color-pickers.scss +211 -0
- package/src/styles/components/_comboboxes.scss +88 -0
- package/src/styles/components/_context-menus.scss +82 -0
- package/src/styles/components/_date-pickers.scss +165 -0
- package/src/styles/components/_feedback.scss +354 -0
- package/src/styles/components/_figures.scss +52 -0
- package/src/styles/components/_heros.scss +83 -0
- package/src/styles/components/_hover-cards.scss +55 -0
- package/src/styles/components/_images.scss +71 -0
- package/src/styles/components/_index.scss +41 -0
- package/src/styles/components/_indicators.scss +403 -0
- package/src/styles/components/_inputs.scss +409 -0
- package/src/styles/components/_layouts.scss +139 -0
- package/src/styles/components/_lists.scss +135 -0
- package/src/styles/components/_menus.scss +195 -0
- package/src/styles/components/_navigation.scss +325 -0
- package/src/styles/components/_overlays.scss +233 -0
- package/src/styles/components/_scroll-areas.scss +53 -0
- package/src/styles/components/_segmented-controls.scss +75 -0
- package/src/styles/components/_tables.scss +137 -0
- package/src/styles/components/_toasts.scss +111 -0
- package/src/styles/components/_toggles.scss +57 -0
- package/src/styles/components/_trees.scss +123 -0
- package/src/styles/decorative/_classical.scss +196 -0
- package/src/styles/decorative/_index.scss +7 -0
- package/src/styles/finishes/_index.scss +55 -0
- package/src/styles/index.scss +30 -0
- package/src/styles/reliefs/_index.scss +66 -0
- package/src/styles/reliefs/_neumorphic-tables.scss +92 -0
- package/src/styles/themes/_dark.scss +130 -0
- package/src/styles/themes/_index.scss +3 -0
- package/src/styles/themes/_light.scss +122 -0
- package/src/styles/themes/_sepia.scss +121 -0
- package/src/styles/utilities/_index.scss +13 -0
- package/src/styles/utilities/_layout.scss +100 -0
- package/src/styles/utilities/_mixins.scss +410 -0
- package/src/styles/utilities/_responsive.scss +46 -0
- package/src/styles/utilities/_sizing.scss +62 -0
- package/src/styles/utilities/_spacing.scss +12 -0
- package/src/styles/utilities/_visual.scss +436 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Accessibility System
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Reduced motion, high contrast, focus styles, skip-link, and
|
|
5
|
+
// screen reader utilities. WCAG 2.1 AA compliance foundation.
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
|
|
8
|
+
// ---- Reduced Motion ----
|
|
9
|
+
// Disables animations and transitions for users who prefer reduced motion.
|
|
10
|
+
// !important is intentional: accessibility overrides must win over any
|
|
11
|
+
// component-level animation/transition declarations regardless of specificity.
|
|
12
|
+
@media (prefers-reduced-motion: reduce) {
|
|
13
|
+
*,
|
|
14
|
+
*::before,
|
|
15
|
+
*::after {
|
|
16
|
+
animation-duration: 0.01ms !important;
|
|
17
|
+
animation-iteration-count: 1 !important;
|
|
18
|
+
transition-duration: 0.01ms !important;
|
|
19
|
+
scroll-behavior: auto !important;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// ---- High Contrast Mode ----
|
|
24
|
+
// Token-level overrides for users who need stronger contrast.
|
|
25
|
+
@media (prefers-contrast: more) {
|
|
26
|
+
:root {
|
|
27
|
+
// Semantic border tokens remapped to decorative accent tokens for WCAG AAA compliance.
|
|
28
|
+
// Borders shift from neutral UI structure to accent-colored decoration for visibility.
|
|
29
|
+
--border-default: var(--border-decorative-strong);
|
|
30
|
+
--border-subtle: var(--border-decorative);
|
|
31
|
+
--border-strong: var(--accent-decorative);
|
|
32
|
+
|
|
33
|
+
// Eliminate translucency and decorative overlays
|
|
34
|
+
--finish-blur: 0px;
|
|
35
|
+
--finish-saturation: 100%;
|
|
36
|
+
--finish-opacity: 1;
|
|
37
|
+
--finish-overlay: none;
|
|
38
|
+
--finish-sheen: none;
|
|
39
|
+
--bridge-backdrop-blur: 0px;
|
|
40
|
+
|
|
41
|
+
// Enhanced focus ring
|
|
42
|
+
--focus-ring-width: 3px;
|
|
43
|
+
|
|
44
|
+
// Collapse lower hierarchy into secondary
|
|
45
|
+
--text-muted: var(--text-secondary);
|
|
46
|
+
--text-tertiary: var(--text-secondary);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// ---- Focus Ring Tokens ----
|
|
51
|
+
:root {
|
|
52
|
+
--focus-ring-color: var(--accent-primary);
|
|
53
|
+
--focus-ring-width: 2px;
|
|
54
|
+
--focus-ring-offset: 3px;
|
|
55
|
+
--focus-ring-shadow: 0 0 0 3px var(--state-focus-ring);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// ---- Focus Ring Mixin ----
|
|
59
|
+
@mixin focus-ring-outline($inset: false) {
|
|
60
|
+
outline: var(--focus-ring-width) solid var(--focus-ring-color);
|
|
61
|
+
|
|
62
|
+
@if $inset {
|
|
63
|
+
outline-offset: calc(-1 * var(--focus-ring-offset));
|
|
64
|
+
} @else {
|
|
65
|
+
outline-offset: var(--focus-ring-offset);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// ---- Disabled State Mixin ----
|
|
70
|
+
@mixin disabled-state {
|
|
71
|
+
background: var(--state-disabled-bg);
|
|
72
|
+
cursor: not-allowed;
|
|
73
|
+
box-shadow: none;
|
|
74
|
+
backdrop-filter: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// ---- Focus Styles ----
|
|
78
|
+
// Consistent focus ring on all interactive elements via tokens.
|
|
79
|
+
:focus-visible {
|
|
80
|
+
@include focus-ring-outline;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Generic focus ring utility
|
|
84
|
+
.focus-ring {
|
|
85
|
+
&:focus-visible {
|
|
86
|
+
@include focus-ring-outline;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.focus-ring-inset {
|
|
91
|
+
&:focus-visible {
|
|
92
|
+
@include focus-ring-outline($inset: true);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// ---- Screen Reader Only ----
|
|
97
|
+
@mixin sr-only-styles {
|
|
98
|
+
position: absolute;
|
|
99
|
+
width: 1px;
|
|
100
|
+
height: 1px;
|
|
101
|
+
padding: 0;
|
|
102
|
+
margin: -1px;
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
clip-path: inset(50%);
|
|
105
|
+
white-space: nowrap;
|
|
106
|
+
border-width: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.sr-only {
|
|
110
|
+
@include sr-only-styles;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Focusable screen reader only — becomes visible on focus
|
|
114
|
+
.sr-only-focusable {
|
|
115
|
+
&:not(:focus, :focus-within) {
|
|
116
|
+
@include sr-only-styles;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// ---- Skip Navigation Link ----
|
|
121
|
+
.skip-link {
|
|
122
|
+
position: absolute;
|
|
123
|
+
top: -100%;
|
|
124
|
+
left: 50%;
|
|
125
|
+
transform: translateX(-50%);
|
|
126
|
+
z-index: var(--z-skip-link);
|
|
127
|
+
padding: 0.75rem 1.5rem;
|
|
128
|
+
font-family: var(--font-sans);
|
|
129
|
+
font-size: var(--text-sm);
|
|
130
|
+
font-weight: var(--font-semibold);
|
|
131
|
+
color: var(--text-inverse);
|
|
132
|
+
background: var(--accent-primary);
|
|
133
|
+
border-radius: 0 0 var(--radius-md) var(--radius-md);
|
|
134
|
+
text-decoration: none;
|
|
135
|
+
transition: top var(--transition-normal) var(--easing-in-out);
|
|
136
|
+
|
|
137
|
+
&:focus {
|
|
138
|
+
top: 0;
|
|
139
|
+
@include focus-ring-outline;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// ---- Live Region ----
|
|
144
|
+
.aria-live-region {
|
|
145
|
+
@include sr-only-styles;
|
|
146
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Base Index
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Foundation styles: relief system, typography, and accessibility.
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
@forward 'relief-system';
|
|
8
|
+
@forward 'transitions';
|
|
9
|
+
@forward 'typography';
|
|
10
|
+
@forward 'accessibility';
|
|
11
|
+
@forward 'register';
|
|
12
|
+
@forward 'scrollbar';
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Tier Registration Mixins
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Emit dual-selector blocks (data-attribute + utility class) for custom tier
|
|
5
|
+
// values from a single @content block.
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
|
|
8
|
+
// Theme: [data-theme] + .theme-* selectors (and optionally :root).
|
|
9
|
+
@mixin register-theme($name, $include-root: false) {
|
|
10
|
+
@if $include-root {
|
|
11
|
+
:root,
|
|
12
|
+
[data-theme='#{$name}'],
|
|
13
|
+
.theme-#{$name} {
|
|
14
|
+
@content;
|
|
15
|
+
}
|
|
16
|
+
} @else {
|
|
17
|
+
[data-theme='#{$name}'],
|
|
18
|
+
.theme-#{$name} {
|
|
19
|
+
@content;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Relief: [data-relief] + .relief-* selectors.
|
|
25
|
+
@mixin register-relief($name) {
|
|
26
|
+
[data-relief='#{$name}'],
|
|
27
|
+
.relief-#{$name} {
|
|
28
|
+
@content;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Finish: [data-finish] + .finish-* selectors.
|
|
33
|
+
@mixin register-finish($name) {
|
|
34
|
+
[data-finish='#{$name}'],
|
|
35
|
+
.finish-#{$name} {
|
|
36
|
+
@content;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// ---------------------------------------------------------------------------
|
|
41
|
+
// Shared Property Mixins
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
|
|
44
|
+
@mixin relief-container($shadow: var(--relief-shadow)) {
|
|
45
|
+
border: 1px solid var(--relief-border);
|
|
46
|
+
box-shadow: $shadow;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Applies background with tier composition: consumes --relief-bg (set by active
|
|
50
|
+
// relief tier) with fallback to --surface-1. Finish properties (opacity, blur,
|
|
51
|
+
// overlay, sheen) are applied additively.
|
|
52
|
+
@mixin finish-surface($bg: var(--relief-bg, var(--surface-1)), $gradient: null) {
|
|
53
|
+
background-color: color-mix(
|
|
54
|
+
in srgb,
|
|
55
|
+
#{$bg} calc(var(--relief-opacity, 1) * var(--finish-opacity, 1) * 100%),
|
|
56
|
+
transparent
|
|
57
|
+
);
|
|
58
|
+
@if $gradient {
|
|
59
|
+
background-image:
|
|
60
|
+
var(--finish-sheen, none),
|
|
61
|
+
var(--finish-overlay, none),
|
|
62
|
+
#{$gradient};
|
|
63
|
+
} @else {
|
|
64
|
+
background-image: var(--finish-sheen, none), var(--finish-overlay, none);
|
|
65
|
+
}
|
|
66
|
+
backdrop-filter: blur(var(--finish-blur, 0)) saturate(var(--finish-saturation, 100%));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@mixin mask($image, $size: null, $repeat: null, $position: null) {
|
|
70
|
+
-webkit-mask-image: $image;
|
|
71
|
+
mask-image: $image;
|
|
72
|
+
@if $size {
|
|
73
|
+
-webkit-mask-size: $size;
|
|
74
|
+
mask-size: $size;
|
|
75
|
+
}
|
|
76
|
+
@if $repeat {
|
|
77
|
+
-webkit-mask-repeat: $repeat;
|
|
78
|
+
mask-repeat: $repeat;
|
|
79
|
+
}
|
|
80
|
+
@if $position {
|
|
81
|
+
-webkit-mask-position: $position;
|
|
82
|
+
mask-position: $position;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Relief Bridge Tokens
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Shared defaults via var() indirection — resolve per-element at substitution
|
|
5
|
+
// time, so per-element .theme-* overrides work correctly.
|
|
6
|
+
// Per-theme overrides (--surface-deep, --neu-shadow, --neu-light) live in
|
|
7
|
+
// theme files.
|
|
8
|
+
// Bridge tokens defined here:
|
|
9
|
+
// --relief-surface-flat, --relief-surface-raised, --relief-surface-deep,
|
|
10
|
+
// --relief-border-default, --relief-opacity, --glass-opacity, --relief-accent,
|
|
11
|
+
// --relief-bg, --relief-shadow, --relief-shadow-sm, --relief-shadow-lg,
|
|
12
|
+
// --relief-shadow-inset, --relief-shadow-inset-sm, --relief-shadow-inset-lg,
|
|
13
|
+
// --relief-border, --mesh-color-1, --mesh-color-2, --mesh-color-3,
|
|
14
|
+
// --channel-sheen-color, --channel-tint-color, --bridge-backdrop-blur
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
:root {
|
|
18
|
+
--relief-surface-flat: var(--surface-1);
|
|
19
|
+
--relief-surface-raised: var(--surface-2);
|
|
20
|
+
--relief-surface-deep: var(--surface-deep);
|
|
21
|
+
--relief-border-default: var(--border-default);
|
|
22
|
+
--relief-opacity: 1;
|
|
23
|
+
--glass-opacity: 0.5;
|
|
24
|
+
|
|
25
|
+
// Relief property defaults — overridden by each relief selector
|
|
26
|
+
--relief-bg: var(--relief-surface-flat);
|
|
27
|
+
--relief-shadow: none;
|
|
28
|
+
--relief-shadow-sm: none;
|
|
29
|
+
--relief-shadow-lg: none;
|
|
30
|
+
--relief-shadow-inset: none;
|
|
31
|
+
--relief-shadow-inset-sm: none;
|
|
32
|
+
--relief-shadow-inset-lg: none;
|
|
33
|
+
--relief-border: var(--relief-border-default);
|
|
34
|
+
|
|
35
|
+
// Mesh gradient colors — overridden per-theme for contrast against surfaces
|
|
36
|
+
--mesh-color-1: var(--accent-primary);
|
|
37
|
+
--mesh-color-2: var(--accent-secondary);
|
|
38
|
+
--mesh-color-3: var(--accent-decorative);
|
|
39
|
+
|
|
40
|
+
// Relief accent — allows relief-scoped components to reference the active accent
|
|
41
|
+
--relief-accent: var(--accent-primary);
|
|
42
|
+
|
|
43
|
+
// Channel tokens — three-layer indirection pattern:
|
|
44
|
+
// 1. Themes define channel color values (--highlight-color, --shadow-color)
|
|
45
|
+
// 2. Relief-system provides fallback defaults via var() references
|
|
46
|
+
// 3. Finishes consume these tokens for visual effects (tinted overlay, glossy sheen)
|
|
47
|
+
// This indirection enables per-theme channel tuning while maintaining finish reusability.
|
|
48
|
+
--channel-sheen-color: var(--highlight-color);
|
|
49
|
+
--channel-tint-color: var(--shadow-color);
|
|
50
|
+
|
|
51
|
+
// Bridge token for backdrop blur — set by finish tier, consumed by relief tier
|
|
52
|
+
--bridge-backdrop-blur: 0px;
|
|
53
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Scrollbar Styling
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Themed scrollbars consuming --scrollbar-thumb and --scrollbar-track tokens
|
|
5
|
+
// from the component-tokens mixin. Uses the standard scrollbar-color
|
|
6
|
+
// property with a WebKit fallback for broader engine coverage.
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
// Standard (Firefox, Chrome 121+)
|
|
10
|
+
// Applied to * so every scrollable container inherits themed scrollbars
|
|
11
|
+
// without requiring per-element opt-in.
|
|
12
|
+
* {
|
|
13
|
+
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
|
|
14
|
+
scrollbar-width: thin;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// WebKit fallback (older Chrome/Safari/Edge)
|
|
18
|
+
::-webkit-scrollbar {
|
|
19
|
+
width: 8px;
|
|
20
|
+
height: 8px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
::-webkit-scrollbar-track {
|
|
24
|
+
background: var(--scrollbar-track);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
::-webkit-scrollbar-thumb {
|
|
28
|
+
background: var(--scrollbar-thumb);
|
|
29
|
+
border-radius: 4px;
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
// Falls back to a computed mix when no --scrollbar-thumb-hover token is
|
|
33
|
+
// provided by the active theme. Themes can override this token to control
|
|
34
|
+
// the hover intensity explicitly.
|
|
35
|
+
background: var(
|
|
36
|
+
--scrollbar-thumb-hover,
|
|
37
|
+
color-mix(in srgb, var(--text-primary) 20%, transparent)
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Transition Mixins
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Standardized transition patterns for interactive components.
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
@mixin transition-interactive($duration: var(--transition-slow)) {
|
|
8
|
+
transition:
|
|
9
|
+
background-color $duration var(--easing-in-out),
|
|
10
|
+
color $duration var(--easing-in-out),
|
|
11
|
+
border-color $duration var(--easing-in-out),
|
|
12
|
+
box-shadow $duration var(--easing-in-out),
|
|
13
|
+
transform var(--transition-normal) var(--easing-in-out);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@mixin transition-depth($duration: var(--transition-slow)) {
|
|
17
|
+
transition:
|
|
18
|
+
box-shadow $duration var(--easing-in-out),
|
|
19
|
+
transform $duration var(--easing-in-out);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@mixin transition-feedback($duration: var(--transition-slow)) {
|
|
23
|
+
transition:
|
|
24
|
+
background-color $duration var(--easing-in-out),
|
|
25
|
+
box-shadow $duration var(--easing-in-out);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@mixin transition-property($prop, $duration: var(--transition-normal)) {
|
|
29
|
+
transition: $prop $duration var(--easing-in-out);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@mixin hover-state($guard: true) {
|
|
33
|
+
@if $guard {
|
|
34
|
+
&:hover:not(:disabled) {
|
|
35
|
+
background-color: var(--state-hover);
|
|
36
|
+
@content;
|
|
37
|
+
}
|
|
38
|
+
} @else {
|
|
39
|
+
&:hover {
|
|
40
|
+
background-color: var(--state-hover);
|
|
41
|
+
@content;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@mixin accent-gradient(
|
|
47
|
+
$from: var(--accent-primary),
|
|
48
|
+
$to: var(--accent-decorative),
|
|
49
|
+
$angle: 145deg
|
|
50
|
+
) {
|
|
51
|
+
background: linear-gradient($angle, $from, $to);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@mixin hover-lift($distance: -1px) {
|
|
55
|
+
transform: translateY($distance);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@mixin edge-radius($radius: var(--radius-lg), $child: null) {
|
|
59
|
+
@if $child {
|
|
60
|
+
&:first-child #{$child} {
|
|
61
|
+
border-radius: #{$radius} 0 0 #{$radius};
|
|
62
|
+
}
|
|
63
|
+
&:last-child #{$child} {
|
|
64
|
+
border-radius: 0 #{$radius} #{$radius} 0;
|
|
65
|
+
}
|
|
66
|
+
} @else {
|
|
67
|
+
&:first-child {
|
|
68
|
+
border-radius: #{$radius} 0 0 #{$radius};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:last-child {
|
|
72
|
+
border-radius: 0 #{$radius} #{$radius} 0;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|