@marianmeres/stuic 3.0.0 → 3.0.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.
Files changed (144) hide show
  1. package/dist/actions/index.d.ts +1 -0
  2. package/dist/actions/index.js +1 -0
  3. package/dist/actions/typeahead.svelte.d.ts +53 -0
  4. package/dist/actions/typeahead.svelte.js +328 -0
  5. package/dist/base.css +17 -0
  6. package/dist/components/AlertConfirmPrompt/AlertConfirmPrompt.svelte +4 -3
  7. package/dist/components/AlertConfirmPrompt/AlertConfirmPrompt.svelte.d.ts +4 -3
  8. package/dist/components/AlertConfirmPrompt/Current.svelte +1 -2
  9. package/dist/components/AlertConfirmPrompt/Current.svelte.d.ts +0 -1
  10. package/dist/components/AlertConfirmPrompt/index.css +47 -43
  11. package/dist/components/AssetsPreview/AssetsPreview.svelte +0 -1
  12. package/dist/components/AssetsPreview/AssetsPreview.svelte.d.ts +0 -1
  13. package/dist/components/AssetsPreview/index.css +31 -29
  14. package/dist/components/Avatar/Avatar.svelte +0 -1
  15. package/dist/components/Avatar/Avatar.svelte.d.ts +0 -1
  16. package/dist/components/Avatar/index.css +87 -85
  17. package/dist/components/Backdrop/Backdrop.svelte +0 -1
  18. package/dist/components/Backdrop/Backdrop.svelte.d.ts +0 -1
  19. package/dist/components/Backdrop/index.css +15 -13
  20. package/dist/components/Button/Button.svelte +0 -1
  21. package/dist/components/Button/Button.svelte.d.ts +0 -1
  22. package/dist/components/Button/index.css +431 -429
  23. package/dist/components/ButtonGroupRadio/ButtonGroupRadio.svelte +0 -1
  24. package/dist/components/ButtonGroupRadio/ButtonGroupRadio.svelte.d.ts +0 -1
  25. package/dist/components/ButtonGroupRadio/index.css +123 -117
  26. package/dist/components/Collapsible/index.css +17 -15
  27. package/dist/components/CommandMenu/CommandMenu.svelte +7 -4
  28. package/dist/components/CommandMenu/CommandMenu.svelte.d.ts +0 -1
  29. package/dist/components/CommandMenu/index.css +27 -25
  30. package/dist/components/DismissibleMessage/DismissibleMessage.svelte +0 -1
  31. package/dist/components/DismissibleMessage/DismissibleMessage.svelte.d.ts +0 -1
  32. package/dist/components/DismissibleMessage/index.css +116 -110
  33. package/dist/components/DropdownMenu/DropdownMenu.svelte +0 -1
  34. package/dist/components/DropdownMenu/DropdownMenu.svelte.d.ts +0 -1
  35. package/dist/components/DropdownMenu/index.css +179 -177
  36. package/dist/components/Input/FieldInput.svelte +8 -0
  37. package/dist/components/Input/FieldInput.svelte.d.ts +2 -0
  38. package/dist/components/Input/FieldOptions.svelte +1 -1
  39. package/dist/components/Input/index.css +411 -398
  40. package/dist/components/KbdShortcut/KbdShortcut.svelte +4 -12
  41. package/dist/components/KbdShortcut/README.md +34 -0
  42. package/dist/components/KbdShortcut/index.css +55 -0
  43. package/dist/components/ListItemButton/ListItemButton.svelte +0 -1
  44. package/dist/components/ListItemButton/ListItemButton.svelte.d.ts +0 -1
  45. package/dist/components/ListItemButton/index.css +118 -116
  46. package/dist/components/Modal/Modal.svelte +0 -1
  47. package/dist/components/Modal/Modal.svelte.d.ts +0 -1
  48. package/dist/components/Modal/index.css +18 -16
  49. package/dist/components/ModalDialog/index.css +29 -27
  50. package/dist/components/Nav/Nav.svelte +732 -0
  51. package/dist/components/Nav/Nav.svelte.d.ts +110 -0
  52. package/dist/components/Nav/README.md +334 -0
  53. package/dist/components/Nav/index.css +318 -0
  54. package/dist/components/Nav/index.d.ts +1 -0
  55. package/dist/components/Nav/index.js +1 -0
  56. package/dist/components/Notifications/Notifications.svelte +2 -3
  57. package/dist/components/Notifications/Notifications.svelte.d.ts +0 -1
  58. package/dist/components/Notifications/index.css +158 -158
  59. package/dist/components/Notifications/notifications-stack.svelte.d.ts +4 -0
  60. package/dist/components/Notifications/notifications-stack.svelte.js +8 -0
  61. package/dist/components/Progress/Progress.svelte +4 -2
  62. package/dist/components/Progress/Progress.svelte.d.ts +1 -0
  63. package/dist/components/Progress/README.md +86 -15
  64. package/dist/components/Progress/_internal/Bar.svelte +4 -15
  65. package/dist/components/Progress/_internal/Bar.svelte.d.ts +1 -1
  66. package/dist/components/Progress/_internal/Circle.svelte +30 -2
  67. package/dist/components/Progress/_internal/Circle.svelte.d.ts +1 -0
  68. package/dist/components/Progress/index.css +47 -1
  69. package/dist/components/Skeleton/README.md +152 -0
  70. package/dist/components/Skeleton/Skeleton.svelte +6 -7
  71. package/dist/components/Skeleton/Skeleton.svelte.d.ts +0 -1
  72. package/dist/components/Skeleton/index.css +73 -43
  73. package/dist/components/Spinner/README.md +149 -37
  74. package/dist/components/Spinner/Spinner.svelte +14 -38
  75. package/dist/components/Spinner/Spinner.svelte.d.ts +2 -1
  76. package/dist/components/Spinner/SpinnerCircle.svelte +6 -34
  77. package/dist/components/Spinner/SpinnerCircle.svelte.d.ts +1 -0
  78. package/dist/components/Spinner/SpinnerCircleOscillate.svelte +10 -5
  79. package/dist/components/Spinner/SpinnerUnicode.svelte +3 -1
  80. package/dist/components/Spinner/SpinnerUnicode.svelte.d.ts +1 -0
  81. package/dist/components/Spinner/index.css +104 -0
  82. package/dist/components/Switch/README.md +34 -18
  83. package/dist/components/Switch/Switch.svelte +24 -46
  84. package/dist/components/Switch/Switch.svelte.d.ts +4 -2
  85. package/dist/components/Switch/index.css +120 -2
  86. package/dist/components/Switch/index.d.ts +1 -2
  87. package/dist/components/Switch/index.js +1 -2
  88. package/dist/components/TabbedMenu/README.md +28 -17
  89. package/dist/components/TabbedMenu/TabbedMenu.svelte +5 -46
  90. package/dist/components/TabbedMenu/TabbedMenu.svelte.d.ts +0 -1
  91. package/dist/components/TabbedMenu/index.css +85 -3
  92. package/dist/components/ThemePreview/ThemePreview.svelte +76 -23
  93. package/dist/components/ThemePreview/ThemePreview.svelte.d.ts +3 -1
  94. package/dist/components/ThemePreview/index.css +17 -1
  95. package/dist/components/TwCheck/README.md +32 -13
  96. package/dist/components/TwCheck/TwCheck.svelte +11 -9
  97. package/dist/components/TwCheck/TwCheck.svelte.d.ts +0 -1
  98. package/dist/components/TwCheck/index.css +14 -0
  99. package/dist/components/TypeaheadInput/TypeaheadInput.svelte +19 -187
  100. package/dist/components/TypeaheadInput/TypeaheadInput.svelte.d.ts +4 -2
  101. package/dist/index.css +44 -39
  102. package/dist/index.d.ts +1 -0
  103. package/dist/index.js +1 -0
  104. package/dist/themes/blue-orange.css +202 -148
  105. package/dist/themes/blue-orange.js +24 -0
  106. package/dist/themes/cyan-red.css +202 -148
  107. package/dist/themes/cyan-red.js +24 -0
  108. package/dist/themes/cyan-slate.css +202 -148
  109. package/dist/themes/cyan-slate.js +25 -1
  110. package/dist/themes/emerald-pink.css +202 -148
  111. package/dist/themes/emerald-pink.js +25 -1
  112. package/dist/themes/fuchsia-emerald.css +202 -148
  113. package/dist/themes/fuchsia-emerald.js +25 -1
  114. package/dist/themes/gray.css +202 -148
  115. package/dist/themes/gray.js +24 -0
  116. package/dist/themes/indigo-amber.css +202 -148
  117. package/dist/themes/indigo-amber.js +26 -2
  118. package/dist/themes/neutral.css +202 -148
  119. package/dist/themes/neutral.js +24 -0
  120. package/dist/themes/pink-emerald.css +202 -148
  121. package/dist/themes/pink-emerald.js +25 -1
  122. package/dist/themes/purple-yellow.css +202 -148
  123. package/dist/themes/purple-yellow.js +24 -0
  124. package/dist/themes/rainbow.css +202 -148
  125. package/dist/themes/rainbow.js +25 -1
  126. package/dist/themes/red-blue.css +202 -148
  127. package/dist/themes/red-blue.js +24 -0
  128. package/dist/themes/red-cyan.css +202 -148
  129. package/dist/themes/red-cyan.js +24 -0
  130. package/dist/themes/rose-teal.css +202 -148
  131. package/dist/themes/rose-teal.js +24 -0
  132. package/dist/themes/sky-amber.css +202 -148
  133. package/dist/themes/sky-amber.js +26 -2
  134. package/dist/themes/slate-cyan.css +202 -148
  135. package/dist/themes/slate-cyan.js +25 -1
  136. package/dist/themes/teal-rose.css +202 -148
  137. package/dist/themes/teal-rose.js +24 -0
  138. package/dist/themes/violet-lime.css +202 -148
  139. package/dist/themes/violet-lime.js +27 -3
  140. package/dist/utils/design-tokens.js +29 -2
  141. package/dist/utils/storage-abstraction.js +1 -1
  142. package/package.json +11 -28
  143. package/dist/components/Switch/SwitchButton.svelte +0 -134
  144. package/dist/components/Switch/SwitchButton.svelte.d.ts +0 -21
@@ -12,114 +12,120 @@
12
12
  --stuic-dismissible-message-transition: 150ms;
13
13
  }
14
14
 
15
- /* =============================================================================
16
- BASE STYLES
17
- ============================================================================= */
18
-
19
- .stuic-dismissible-message {
20
- display: flex;
21
- align-items: center;
22
- border-width: var(--stuic-dismissible-message-border-width);
23
- border-style: solid;
24
- border-radius: var(--stuic-dismissible-message-radius);
25
- transition:
26
- background var(--stuic-dismissible-message-transition),
27
- border-color var(--stuic-dismissible-message-transition);
28
-
29
- /* Colors via internal vars set by intent */
30
- background: var(--_bg);
31
- color: var(--_text);
32
- border-color: var(--_border);
33
- }
34
-
35
- /* Content area */
36
- .stuic-dismissible-message > .content {
37
- flex: 1;
38
- padding: var(--stuic-dismissible-message-padding-y)
39
- var(--stuic-dismissible-message-padding-x);
40
- }
41
-
42
- /* Icon container (left side) */
43
- .stuic-dismissible-message > .icon {
44
- display: flex;
45
- align-items: center;
46
- justify-content: center;
47
- flex-shrink: 0;
48
- padding-left: var(--stuic-dismissible-message-padding-x);
49
- color: var(--_text);
50
- opacity: 0.85;
51
- }
52
-
53
- .stuic-dismissible-message > .icon svg {
54
- width: 1.5rem;
55
- height: 1.5rem;
56
- }
57
-
58
- /* Dismiss button container */
59
- .stuic-dismissible-message > .dismiss {
60
- display: flex;
61
- align-items: center;
62
- justify-content: center;
63
- padding: calc(var(--stuic-dismissible-message-padding-y) * 0.75);
64
- }
65
-
66
- /* Dismiss button inherits message text color */
67
- .stuic-dismissible-message > .dismiss .stuic-button {
68
- color: var(--_text);
69
- }
70
-
71
- /* =============================================================================
72
- DEFAULT (NO INTENT): NEUTRAL MUTED APPEARANCE
73
- ============================================================================= */
74
-
75
- .stuic-dismissible-message:not([data-intent]) {
76
- --_bg: var(--stuic-color-muted);
77
- --_text: var(--stuic-color-muted-foreground);
78
- --_border: var(--stuic-color-border);
79
- }
80
-
81
- /* =============================================================================
82
- INTENT COLOR MAPPING (SOFT STYLE)
83
- Each intent uses a soft/tinted appearance appropriate for messages.
84
- ============================================================================= */
85
-
86
- /* Destructive: error messages */
87
- .stuic-dismissible-message[data-intent="destructive"] {
88
- --_bg: color-mix(in srgb, var(--stuic-color-destructive) 10%, transparent);
89
- --_text: var(--stuic-color-destructive);
90
- --_border: color-mix(in srgb, var(--stuic-color-destructive) 30%, transparent);
91
- }
92
-
93
- /* Warning: caution messages */
94
- .stuic-dismissible-message[data-intent="warning"] {
95
- --_bg: color-mix(in srgb, var(--stuic-color-warning) 10%, transparent);
96
- --_text: var(--stuic-color-warning);
97
- --_border: color-mix(in srgb, var(--stuic-color-warning) 30%, transparent);
98
- }
99
-
100
- /* Success: confirmation messages */
101
- .stuic-dismissible-message[data-intent="success"] {
102
- --_bg: color-mix(in srgb, var(--stuic-color-success) 10%, transparent);
103
- --_text: var(--stuic-color-success);
104
- --_border: color-mix(in srgb, var(--stuic-color-success) 30%, transparent);
105
- }
106
-
107
- /* Info: informational messages */
108
- .stuic-dismissible-message[data-intent="info"] {
109
- --_bg: color-mix(in srgb, var(--stuic-color-info) 10%, transparent);
110
- --_text: var(--stuic-color-info);
111
- --_border: color-mix(in srgb, var(--stuic-color-info) 30%, transparent);
112
- }
113
-
114
- /* =============================================================================
115
- DARK MODE ADJUSTMENTS
116
- Increase color intensity for better visibility in dark mode.
117
- ============================================================================= */
118
-
119
- .dark .stuic-dismissible-message[data-intent="destructive"],
120
- .dark .stuic-dismissible-message[data-intent="warning"],
121
- .dark .stuic-dismissible-message[data-intent="success"],
122
- .dark .stuic-dismissible-message[data-intent="info"] {
123
- --_bg: color-mix(in srgb, var(--_text) 20%, transparent);
124
- --_border: color-mix(in srgb, var(--_text) 40%, transparent);
15
+ @layer components {
16
+ /* =============================================================================
17
+ BASE STYLES
18
+ ============================================================================= */
19
+
20
+ .stuic-dismissible-message {
21
+ display: flex;
22
+ align-items: center;
23
+ border-width: var(--stuic-dismissible-message-border-width);
24
+ border-style: solid;
25
+ border-radius: var(--stuic-dismissible-message-radius);
26
+ transition:
27
+ background var(--stuic-dismissible-message-transition),
28
+ border-color var(--stuic-dismissible-message-transition);
29
+
30
+ /* Colors via internal vars set by intent */
31
+ background: var(--_bg);
32
+ color: var(--_text);
33
+ border-color: var(--_border);
34
+ }
35
+
36
+ /* Content area */
37
+ .stuic-dismissible-message > .content {
38
+ flex: 1;
39
+ padding: var(--stuic-dismissible-message-padding-y)
40
+ var(--stuic-dismissible-message-padding-x);
41
+ }
42
+
43
+ /* Icon container (left side) */
44
+ .stuic-dismissible-message > .icon {
45
+ display: flex;
46
+ align-items: center;
47
+ justify-content: center;
48
+ flex-shrink: 0;
49
+ padding-left: var(--stuic-dismissible-message-padding-x);
50
+ color: var(--_text);
51
+ opacity: 0.85;
52
+ }
53
+
54
+ .stuic-dismissible-message > .icon svg {
55
+ width: 1.5rem;
56
+ height: 1.5rem;
57
+ }
58
+
59
+ /* Dismiss button container */
60
+ .stuic-dismissible-message > .dismiss {
61
+ display: flex;
62
+ align-items: center;
63
+ justify-content: center;
64
+ padding: calc(var(--stuic-dismissible-message-padding-y) * 0.75);
65
+ }
66
+
67
+ /* Dismiss button inherits message text color */
68
+ .stuic-dismissible-message > .dismiss .stuic-button {
69
+ color: var(--_text);
70
+ }
71
+
72
+ /* =============================================================================
73
+ DEFAULT (NO INTENT): NEUTRAL MUTED APPEARANCE
74
+ ============================================================================= */
75
+
76
+ .stuic-dismissible-message:not([data-intent]) {
77
+ --_bg: var(--stuic-color-muted);
78
+ --_text: var(--stuic-color-muted-foreground);
79
+ --_border: var(--stuic-color-border);
80
+ }
81
+
82
+ /* =============================================================================
83
+ INTENT COLOR MAPPING (SOFT STYLE)
84
+ Each intent uses a soft/tinted appearance appropriate for messages.
85
+ ============================================================================= */
86
+
87
+ /* Destructive: error messages */
88
+ .stuic-dismissible-message[data-intent="destructive"] {
89
+ --_bg: color-mix(in srgb, var(--stuic-color-destructive) 15%, transparent);
90
+ /* --_text: var(--stuic-color-destructive); */
91
+ --_text: color-mix(in srgb, var(--stuic-color-destructive), black 15%);
92
+ --_border: color-mix(in srgb, var(--stuic-color-destructive) 30%, transparent);
93
+ }
94
+
95
+ /* Warning: caution messages */
96
+ .stuic-dismissible-message[data-intent="warning"] {
97
+ --_bg: color-mix(in srgb, var(--stuic-color-warning) 15%, transparent);
98
+ /* --_text: var(--stuic-color-warning); */
99
+ --_text: color-mix(in srgb, var(--stuic-color-warning), black 15%);
100
+ --_border: color-mix(in srgb, var(--stuic-color-warning) 30%, transparent);
101
+ }
102
+
103
+ /* Success: confirmation messages */
104
+ .stuic-dismissible-message[data-intent="success"] {
105
+ --_bg: color-mix(in srgb, var(--stuic-color-success) 15%, transparent);
106
+ /* --_text: var(--stuic-color-success); */
107
+ --_text: color-mix(in srgb, var(--stuic-color-success), black 15%);
108
+ --_border: color-mix(in srgb, var(--stuic-color-success) 30%, transparent);
109
+ }
110
+
111
+ /* Info: informational messages */
112
+ .stuic-dismissible-message[data-intent="info"] {
113
+ --_bg: color-mix(in srgb, var(--stuic-color-info) 15%, transparent);
114
+ /* --_text: var(--stuic-color-info); */
115
+ --_text: color-mix(in srgb, var(--stuic-color-info), black 15%);
116
+ --_border: color-mix(in srgb, var(--stuic-color-info) 30%, transparent);
117
+ }
118
+
119
+ /* =============================================================================
120
+ DARK MODE ADJUSTMENTS
121
+ Increase color intensity for better visibility in dark mode.
122
+ ============================================================================= */
123
+
124
+ .dark .stuic-dismissible-message[data-intent="destructive"],
125
+ .dark .stuic-dismissible-message[data-intent="warning"],
126
+ .dark .stuic-dismissible-message[data-intent="success"],
127
+ .dark .stuic-dismissible-message[data-intent="info"] {
128
+ --_bg: color-mix(in srgb, var(--_text) 20%, transparent);
129
+ --_border: color-mix(in srgb, var(--_text) 40%, transparent);
130
+ }
125
131
  }
@@ -229,7 +229,6 @@
229
229
  import { untrack } from "svelte";
230
230
  import Thc from "../Thc/Thc.svelte";
231
231
  import ListItemButton from "../ListItemButton/ListItemButton.svelte";
232
- import "./index.css";
233
232
  import { BodyScroll } from "../../utils/body-scroll-locker.js";
234
233
  import { waitForTwoRepaints } from "../../utils/paint.js";
235
234
 
@@ -153,7 +153,6 @@ export declare const DROPDOWN_MENU_DROPDOWN_CLASSES = "stuic-dropdown-menu-dropd
153
153
  export declare const DROPDOWN_MENU_DIVIDER_CLASSES = "stuic-dropdown-menu-divider";
154
154
  export declare const DROPDOWN_MENU_HEADER_CLASSES = "stuic-dropdown-menu-header";
155
155
  export declare const DROPDOWN_MENU_BACKDROP_CLASSES = "stuic-dropdown-menu-backdrop";
156
- import "./index.css";
157
156
  declare const DropdownMenu: import("svelte").Component<Props, {}, "isOpen" | "triggerEl" | "dropdownEl">;
158
157
  type DropdownMenu = ReturnType<typeof DropdownMenu>;
159
158
  export default DropdownMenu;
@@ -66,202 +66,204 @@
66
66
  --stuic-dropdown-menu-expandable-indent: calc(var(--spacing) * 4);
67
67
  }
68
68
 
69
- /* =============================================================================
70
- BASE STYLES
71
- ============================================================================= */
72
-
73
- .stuic-dropdown-menu {
74
- position: relative;
75
- display: inline-block;
76
- }
77
-
78
- /* =============================================================================
79
- TRIGGER BUTTON
80
- ============================================================================= */
81
-
82
- .stuic-dropdown-menu-trigger {
83
- /* Layout */
84
- display: inline-flex;
85
- align-items: center;
86
- justify-content: center;
87
- gap: var(--stuic-dropdown-menu-gap);
88
-
89
- /* Sizing */
90
- padding: var(--stuic-dropdown-menu-trigger-padding-y)
91
- var(--stuic-dropdown-menu-trigger-padding-x);
92
-
93
- /* Box model */
94
- border-width: 1px;
95
- border-style: solid;
96
- border-radius: var(--stuic-dropdown-menu-radius);
97
-
98
- /* Colors */
99
- background: var(--stuic-dropdown-menu-trigger-bg);
100
- color: var(--stuic-dropdown-menu-trigger-text);
101
- border-color: var(--stuic-dropdown-menu-trigger-border);
102
-
103
- /* Interaction */
104
- cursor: pointer;
105
- user-select: none;
106
- -webkit-tap-highlight-color: transparent;
107
- touch-action: manipulation;
108
- transition:
109
- background var(--stuic-dropdown-menu-transition),
110
- color var(--stuic-dropdown-menu-transition),
111
- border-color var(--stuic-dropdown-menu-transition);
112
- }
113
-
114
- .stuic-dropdown-menu-trigger:hover:not(:disabled) {
115
- background: var(--stuic-dropdown-menu-trigger-bg-hover);
116
- color: var(--stuic-dropdown-menu-trigger-text-hover);
117
- border-color: var(--stuic-dropdown-menu-trigger-border-hover);
118
- }
119
-
120
- .stuic-dropdown-menu-trigger:active:not(:disabled) {
121
- background: var(--stuic-dropdown-menu-trigger-bg-active);
122
- color: var(--stuic-dropdown-menu-trigger-text-active);
123
- border-color: var(--stuic-dropdown-menu-trigger-border-active);
124
- }
125
-
126
- .stuic-dropdown-menu-trigger:focus-visible {
127
- outline: var(--stuic-dropdown-menu-ring-width) solid
128
- var(--stuic-dropdown-menu-ring-color);
129
- outline-offset: var(--stuic-dropdown-menu-ring-offset);
130
- }
69
+ @layer components {
70
+ /* =============================================================================
71
+ BASE STYLES
72
+ ============================================================================= */
73
+
74
+ .stuic-dropdown-menu {
75
+ position: relative;
76
+ display: inline-block;
77
+ }
131
78
 
132
- /* =============================================================================
133
- DROPDOWN CONTAINER
134
- ============================================================================= */
79
+ /* =============================================================================
80
+ TRIGGER BUTTON
81
+ ============================================================================= */
82
+
83
+ .stuic-dropdown-menu-trigger {
84
+ /* Layout */
85
+ display: inline-flex;
86
+ align-items: center;
87
+ justify-content: center;
88
+ gap: var(--stuic-dropdown-menu-gap);
89
+
90
+ /* Sizing */
91
+ padding: var(--stuic-dropdown-menu-trigger-padding-y)
92
+ var(--stuic-dropdown-menu-trigger-padding-x);
93
+
94
+ /* Box model */
95
+ border-width: 1px;
96
+ border-style: solid;
97
+ border-radius: var(--stuic-dropdown-menu-radius);
98
+
99
+ /* Colors */
100
+ background: var(--stuic-dropdown-menu-trigger-bg);
101
+ color: var(--stuic-dropdown-menu-trigger-text);
102
+ border-color: var(--stuic-dropdown-menu-trigger-border);
103
+
104
+ /* Interaction */
105
+ cursor: pointer;
106
+ user-select: none;
107
+ -webkit-tap-highlight-color: transparent;
108
+ touch-action: manipulation;
109
+ transition:
110
+ background var(--stuic-dropdown-menu-transition),
111
+ color var(--stuic-dropdown-menu-transition),
112
+ border-color var(--stuic-dropdown-menu-transition);
113
+ }
135
114
 
136
- .stuic-dropdown-menu-dropdown {
137
- /* Colors */
138
- background: var(--stuic-dropdown-menu-bg);
139
- color: var(--stuic-dropdown-menu-text);
140
- border: 1px solid var(--stuic-dropdown-menu-border);
141
- box-shadow: var(--stuic-dropdown-menu-shadow);
115
+ .stuic-dropdown-menu-trigger:hover:not(:disabled) {
116
+ background: var(--stuic-dropdown-menu-trigger-bg-hover);
117
+ color: var(--stuic-dropdown-menu-trigger-text-hover);
118
+ border-color: var(--stuic-dropdown-menu-trigger-border-hover);
119
+ }
142
120
 
143
- /* Box model */
144
- border-radius: var(--stuic-dropdown-menu-radius);
145
- padding: var(--stuic-dropdown-menu-padding);
121
+ .stuic-dropdown-menu-trigger:active:not(:disabled) {
122
+ background: var(--stuic-dropdown-menu-trigger-bg-active);
123
+ color: var(--stuic-dropdown-menu-trigger-text-active);
124
+ border-color: var(--stuic-dropdown-menu-trigger-border-active);
125
+ }
146
126
 
147
- /* Layout */
148
- min-width: var(--stuic-dropdown-menu-min-width);
149
- overflow-y: auto;
150
- scrollbar-width: thin;
127
+ .stuic-dropdown-menu-trigger:focus-visible {
128
+ outline: var(--stuic-dropdown-menu-ring-width) solid
129
+ var(--stuic-dropdown-menu-ring-color);
130
+ outline-offset: var(--stuic-dropdown-menu-ring-offset);
131
+ }
151
132
 
152
- /* Stacking */
153
- z-index: 50;
154
- }
133
+ /* =============================================================================
134
+ DROPDOWN CONTAINER
135
+ ============================================================================= */
155
136
 
156
- /* =============================================================================
157
- DIVIDER
158
- ============================================================================= */
137
+ .stuic-dropdown-menu-dropdown {
138
+ /* Colors */
139
+ background: var(--stuic-dropdown-menu-bg);
140
+ color: var(--stuic-dropdown-menu-text);
141
+ border: 1px solid var(--stuic-dropdown-menu-border);
142
+ box-shadow: var(--stuic-dropdown-menu-shadow);
143
+
144
+ /* Box model */
145
+ border-radius: var(--stuic-dropdown-menu-radius);
146
+ padding: var(--stuic-dropdown-menu-padding);
147
+
148
+ /* Layout */
149
+ min-width: var(--stuic-dropdown-menu-min-width);
150
+ overflow-y: auto;
151
+ scrollbar-width: thin;
152
+
153
+ /* Stacking */
154
+ z-index: 50;
155
+ }
159
156
 
160
- .stuic-dropdown-menu-divider {
161
- height: var(--stuic-dropdown-menu-divider-height);
162
- margin: var(--stuic-dropdown-menu-divider-margin-y) 0;
163
- background: var(--stuic-dropdown-menu-divider-bg);
164
- }
157
+ /* =============================================================================
158
+ DIVIDER
159
+ ============================================================================= */
165
160
 
166
- /* =============================================================================
167
- HEADER (Section Label)
168
- ============================================================================= */
161
+ .stuic-dropdown-menu-divider {
162
+ height: var(--stuic-dropdown-menu-divider-height);
163
+ margin: var(--stuic-dropdown-menu-divider-margin-y) 0;
164
+ background: var(--stuic-dropdown-menu-divider-bg);
165
+ }
169
166
 
170
- .stuic-dropdown-menu-header {
171
- padding: var(--stuic-dropdown-menu-header-padding-y)
172
- var(--stuic-dropdown-menu-header-padding-x);
173
- font-size: var(--stuic-dropdown-menu-header-font-size);
174
- font-weight: var(--stuic-dropdown-menu-header-font-weight);
175
- letter-spacing: var(--stuic-dropdown-menu-header-letter-spacing);
176
- text-transform: var(--stuic-dropdown-menu-header-text-transform);
177
- color: var(--stuic-dropdown-menu-header-text);
178
- user-select: none;
179
- }
167
+ /* =============================================================================
168
+ HEADER (Section Label)
169
+ ============================================================================= */
170
+
171
+ .stuic-dropdown-menu-header {
172
+ padding: var(--stuic-dropdown-menu-header-padding-y)
173
+ var(--stuic-dropdown-menu-header-padding-x);
174
+ font-size: var(--stuic-dropdown-menu-header-font-size);
175
+ font-weight: var(--stuic-dropdown-menu-header-font-weight);
176
+ letter-spacing: var(--stuic-dropdown-menu-header-letter-spacing);
177
+ text-transform: var(--stuic-dropdown-menu-header-text-transform);
178
+ color: var(--stuic-dropdown-menu-header-text);
179
+ user-select: none;
180
+ }
180
181
 
181
- /* =============================================================================
182
- BACKDROP (Fallback Mode)
183
- ============================================================================= */
182
+ /* =============================================================================
183
+ BACKDROP (Fallback Mode)
184
+ ============================================================================= */
184
185
 
185
- .stuic-dropdown-menu-backdrop {
186
- position: fixed;
187
- inset: 0;
188
- background: var(--stuic-dropdown-menu-backdrop-bg);
189
- z-index: var(--stuic-dropdown-menu-backdrop-z-index);
190
- transition-property: opacity;
191
- }
192
-
193
- /* =============================================================================
194
- CLOSE BUTTON (Fallback Mode)
195
- ============================================================================= */
186
+ .stuic-dropdown-menu-backdrop {
187
+ position: fixed;
188
+ inset: 0;
189
+ background: var(--stuic-dropdown-menu-backdrop-bg);
190
+ z-index: var(--stuic-dropdown-menu-backdrop-z-index);
191
+ transition-property: opacity;
192
+ }
196
193
 
197
- .stuic-dropdown-menu-close {
198
- background: var(--stuic-dropdown-menu-close-bg);
199
- color: var(--stuic-dropdown-menu-close-text);
200
- opacity: var(--stuic-dropdown-menu-close-opacity);
201
- border-radius: var(--stuic-dropdown-menu-radius);
202
- padding: calc(var(--spacing) * 2);
203
- cursor: pointer;
204
- line-height: 1;
205
- transition: opacity var(--stuic-dropdown-menu-transition);
206
- }
194
+ /* =============================================================================
195
+ CLOSE BUTTON (Fallback Mode)
196
+ ============================================================================= */
197
+
198
+ .stuic-dropdown-menu-close {
199
+ background: var(--stuic-dropdown-menu-close-bg);
200
+ color: var(--stuic-dropdown-menu-close-text);
201
+ opacity: var(--stuic-dropdown-menu-close-opacity);
202
+ border-radius: var(--stuic-dropdown-menu-radius);
203
+ padding: calc(var(--spacing) * 2);
204
+ cursor: pointer;
205
+ line-height: 1;
206
+ transition: opacity var(--stuic-dropdown-menu-transition);
207
+ }
207
208
 
208
- .stuic-dropdown-menu-close:hover {
209
- opacity: var(--stuic-dropdown-menu-close-opacity-hover);
210
- }
209
+ .stuic-dropdown-menu-close:hover {
210
+ opacity: var(--stuic-dropdown-menu-close-opacity-hover);
211
+ }
211
212
 
212
- /* =============================================================================
213
- EXPANDABLE SECTION
214
- ============================================================================= */
213
+ /* =============================================================================
214
+ EXPANDABLE SECTION
215
+ ============================================================================= */
215
216
 
216
- .stuic-dropdown-menu-expandable-content {
217
- padding-left: var(--stuic-dropdown-menu-expandable-indent);
218
- overflow: hidden;
219
- }
217
+ .stuic-dropdown-menu-expandable-content {
218
+ padding-left: var(--stuic-dropdown-menu-expandable-indent);
219
+ overflow: hidden;
220
+ }
220
221
 
221
- /* =============================================================================
222
- LIST ITEM BUTTON OVERRIDES FOR DROPDOWN CONTEXT
223
- Reset default ListItemButton background to transparent within dropdown.
224
- ============================================================================= */
222
+ /* =============================================================================
223
+ LIST ITEM BUTTON OVERRIDES FOR DROPDOWN CONTEXT
224
+ Reset default ListItemButton background to transparent within dropdown.
225
+ ============================================================================= */
225
226
 
226
- .stuic-dropdown-menu-dropdown .stuic-list-item-button {
227
- --stuic-list-item-button-bg: transparent;
228
- --stuic-list-item-button-border: transparent;
229
- }
227
+ .stuic-dropdown-menu-dropdown .stuic-list-item-button {
228
+ --stuic-list-item-button-bg: transparent;
229
+ --stuic-list-item-button-border: transparent;
230
+ }
230
231
 
231
- /* =============================================================================
232
- CSS ANCHOR POSITIONING (when supported)
233
- ============================================================================= */
232
+ /* =============================================================================
233
+ CSS ANCHOR POSITIONING (when supported)
234
+ ============================================================================= */
234
235
 
235
- @position-try --pop-top {
236
- position-area: top;
237
- }
238
- @position-try --pop-top-span-right {
239
- position-area: top span-right;
240
- }
241
- @position-try --pop-top-span-left {
242
- position-area: top span-left;
243
- }
244
- @position-try --pop-bottom {
245
- position-area: bottom;
246
- }
247
- @position-try --pop-bottom-span-right {
248
- position-area: bottom span-right;
249
- }
250
- @position-try --pop-bottom-span-left {
251
- position-area: bottom span-left;
252
- }
253
- @position-try --pop-left {
254
- position-area: left;
255
- }
256
- @position-try --pop-right {
257
- position-area: right;
258
- }
236
+ @position-try --pop-top {
237
+ position-area: top;
238
+ }
239
+ @position-try --pop-top-span-right {
240
+ position-area: top span-right;
241
+ }
242
+ @position-try --pop-top-span-left {
243
+ position-area: top span-left;
244
+ }
245
+ @position-try --pop-bottom {
246
+ position-area: bottom;
247
+ }
248
+ @position-try --pop-bottom-span-right {
249
+ position-area: bottom span-right;
250
+ }
251
+ @position-try --pop-bottom-span-left {
252
+ position-area: bottom span-left;
253
+ }
254
+ @position-try --pop-left {
255
+ position-area: left;
256
+ }
257
+ @position-try --pop-right {
258
+ position-area: right;
259
+ }
259
260
 
260
- @supports (anchor-name: --anchor) {
261
- .stuic-dropdown-menu-dropdown {
262
- position-try-fallbacks:
263
- flip-inline, --pop-bottom-span-right, --pop-bottom-span-left, --pop-bottom,
264
- flip-block, --pop-top-span-right, --pop-top-span-left, --pop-top, --pop-left,
265
- --pop-right;
261
+ @supports (anchor-name: --anchor) {
262
+ .stuic-dropdown-menu-dropdown {
263
+ position-try-fallbacks:
264
+ flip-inline, --pop-bottom-span-right, --pop-bottom-span-left, --pop-bottom,
265
+ flip-block, --pop-top-span-right, --pop-top-span-left, --pop-top, --pop-left,
266
+ --pop-right;
267
+ }
266
268
  }
267
269
  }