@meshmakers/octo-ui 3.4.1480 → 3.5.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.
@@ -0,0 +1,123 @@
1
+ @use "variables" as *;
2
+
3
+ // Disabled solid primary (AB#3444): a muted, neutral surface with muted text — not the accent at
4
+ // reduced opacity, which still read as a clickable primary on the dark canvas. Covers native
5
+ // `disabled`, Kendo's `.k-disabled` and the focusable disabled-with-reason pattern
6
+ // (`aria-disabled="true"`, mm-action-button), and pins the look on hover/active so nothing
7
+ // reacts. Pointer events stay on (Kendo sets none on disabled buttons) so the not-allowed cursor
8
+ // shows; a natively disabled button still fires no clicks, a disabled link is rendered as a
9
+ // button by mm-action-button and aria-disabled buttons swallow their clicks themselves.
10
+ @mixin octo-button-primary-disabled($icons: false) {
11
+ // One compact selector on purpose: this mixin is included under long parent selector lists,
12
+ // and nested selector lists multiply with them. `[class]` (always present on a Kendo button)
13
+ // lifts the rule by one attribute so it also beats the `:hover:not(:disabled)` rules declared
14
+ // before it — an aria-disabled button is not `:disabled`, so those would otherwise match.
15
+ // No box-shadow here: the focus ring of a focusable disabled button must stay visible.
16
+ &:is(:disabled, .k-disabled, [aria-disabled="true"])[class] {
17
+ opacity: 1;
18
+ filter: none;
19
+ background: color-mix(in srgb, var(--theme-text-muted, #77869c) 16%, transparent);
20
+ border-color: var(--theme-border-default, rgba(128, 128, 128, 0.2));
21
+ color: var(--theme-text-muted, #77869c);
22
+ cursor: not-allowed;
23
+ pointer-events: auto;
24
+
25
+ @if $icons {
26
+ :is(.k-svg-icon, .k-icon, svg) {
27
+ fill: var(--theme-text-muted, #77869c);
28
+ color: var(--theme-text-muted, #77869c);
29
+ }
30
+ }
31
+ }
32
+ }
33
+
34
+ // Deep Sea button (AB#5526): flat base/outline style with a flat primary
35
+ // variant. No gradients, no glows, sentence case. Internal to octo.styles():
36
+ // toolbars, dialogs and widget configs in _styles.scss include it (renamed
37
+ // from the former `lcars-button` in AB#5526; not forwarded to hosts).
38
+ @mixin octo-button {
39
+ background: transparent;
40
+ border: 1px solid var(--theme-border-default, var(--octo-mint-30));
41
+ color: var(--theme-text-primary, var(--octo-text-color));
42
+ font-family: var(--theme-font-ui, inherit);
43
+ font-weight: 500;
44
+ font-size: 0.8125rem;
45
+ letter-spacing: normal;
46
+ text-transform: none;
47
+ border-radius: var(--theme-radius-sm, 4px);
48
+ box-shadow: none;
49
+ transition:
50
+ background-color var(--theme-motion-fast, 120ms) var(--theme-motion-easing, ease),
51
+ border-color var(--theme-motion-fast, 120ms) var(--theme-motion-easing, ease),
52
+ color var(--theme-motion-fast, 120ms) var(--theme-motion-easing, ease);
53
+
54
+ &:hover:not(:disabled) {
55
+ background: var(--theme-bg-hover, var(--octo-mint-10));
56
+ border-color: var(--theme-border-strong, var(--octo-mint-50));
57
+ box-shadow: none;
58
+ }
59
+
60
+ &:active:not(:disabled) {
61
+ background: var(--theme-bg-selected, var(--octo-mint-20));
62
+ }
63
+
64
+ &:focus-visible {
65
+ outline: none;
66
+ box-shadow: var(--theme-focus-ring, 0 0 0 2px var(--octo-mint));
67
+ }
68
+
69
+ &:disabled {
70
+ opacity: 0.5;
71
+ cursor: not-allowed;
72
+ }
73
+
74
+ // Selected state of toggle buttons (Kendo `togglable` / button groups set `.k-selected`,
75
+ // AB#5623). Without it the reset above hid the state: the a11y tree said "pressed", the eye saw
76
+ // nothing (quick-view segments in list toolbars). Before the primary branch, so a primary
77
+ // button keeps its look. z-index lifts the accent border above the next grouped button.
78
+ &.k-selected {
79
+ background: var(--theme-bg-selected, var(--octo-mint-20));
80
+ border-color: var(--theme-accent, var(--octo-mint));
81
+ color: var(--theme-text-accent, var(--octo-mint));
82
+ z-index: 1;
83
+
84
+ &:hover:not(:disabled) {
85
+ background: var(--theme-bg-selected, var(--octo-mint-20));
86
+ border-color: var(--theme-accent, var(--octo-mint));
87
+ }
88
+ }
89
+
90
+ &.k-button-solid-primary,
91
+ &.k-button-primary,
92
+ &[themecolor="primary"] {
93
+ background: var(--theme-accent, var(--octo-mint));
94
+ border-color: var(--theme-accent, var(--octo-mint));
95
+ color: var(--theme-text-on-accent, var(--deep-sea));
96
+
97
+ &:hover:not(:disabled) {
98
+ background: var(--theme-accent-hover, var(--octo-mint));
99
+ border-color: var(--theme-accent-hover, var(--octo-mint));
100
+ box-shadow: none;
101
+ }
102
+ }
103
+
104
+ // One `:is()` instead of nesting in the list above: keeps the output small (AB#3444).
105
+ &:is(.k-button-solid-primary, .k-button-primary, [themecolor="primary"]) {
106
+ @include octo-button-primary-disabled;
107
+ }
108
+
109
+ // Selected FLAT toggles (e.g. the list view's row-filter command, `themeColor="primary"
110
+ // fillMode="flat"`): the primary branch above has the same specificity as `.k-selected` and
111
+ // comes later, so it would paint selected and unselected alike. This rule is more specific and
112
+ // comes after it (AB#5623).
113
+ &.k-button-flat.k-selected {
114
+ background: var(--theme-bg-selected, var(--octo-mint-20));
115
+ border-color: var(--theme-accent, var(--octo-mint));
116
+ color: var(--theme-text-accent, var(--octo-mint));
117
+
118
+ &:hover:not(:disabled) {
119
+ background: var(--theme-bg-selected, var(--octo-mint-20));
120
+ border-color: var(--theme-accent, var(--octo-mint));
121
+ }
122
+ }
123
+ }
@@ -0,0 +1,16 @@
1
+ @use "variables" as *;
2
+
3
+ // Deep Sea input (AB#5526): input surface, neutral border, accent border +
4
+ // focus ring on focus. Internal to octo.styles() (formerly `lcars-input`,
5
+ // renamed in AB#5526).
6
+ @mixin field-input {
7
+ background: var(--theme-bg-input, var(--deep-sea)) !important;
8
+ border: 1px solid var(--theme-border-default, var(--octo-mint-30)) !important;
9
+ color: var(--theme-text-primary, var(--octo-text-color)) !important;
10
+ border-radius: var(--theme-radius-sm, 4px) !important;
11
+ &:focus {
12
+ border-color: var(--theme-accent, var(--octo-mint)) !important;
13
+ box-shadow: var(--theme-focus-ring) !important;
14
+ outline: none !important;
15
+ }
16
+ }
@@ -0,0 +1,14 @@
1
+ @use "variables" as *;
2
+
3
+ // Deep Sea outline button for dialog/window action rows (AB#5526): flat,
4
+ // neutral hairline border, no gradient. Internal to octo.styles() (formerly
5
+ // `lcars-flat-btn`, renamed in AB#5526).
6
+ @mixin flat-button {
7
+ background: transparent !important;
8
+ border: 1px solid var(--theme-border-default, var(--octo-mint-30)) !important;
9
+ color: var(--theme-text-primary, var(--octo-text-color)) !important;
10
+ &:hover:not(:disabled) {
11
+ background: var(--theme-bg-hover, var(--octo-mint-10)) !important;
12
+ border-color: var(--theme-border-strong, var(--octo-mint-50)) !important;
13
+ }
14
+ }
@@ -6,6 +6,6 @@
6
6
 
7
7
  @forward "variables" show variables;
8
8
  @forward "styles" show styles;
9
- @forward "theme" show theme, theme-overrides, ink-overlays, kendo-bridge, dark-theme-tokens, light-theme-tokens,
9
+ @forward "theme" show theme, theme-overrides, ink-overlays, kendo-bridge, foundation-tokens, dark-theme-tokens, light-theme-tokens,
10
10
  light-theme-button-primary, light-theme-button-base,
11
11
  light-theme-button-overrides;