@revikornmann/muka-ui 0.14.0 → 0.16.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.
Files changed (99) hide show
  1. package/build/manifest.json +10 -0
  2. package/dist/cjs/components/BottomBar/BottomBar.css +19 -4
  3. package/dist/cjs/components/ChatMessage/ChatMessage.css +7 -1
  4. package/dist/cjs/components/ChatMessage/ChatMessage.js.map +1 -1
  5. package/dist/cjs/components/ChatMessageList/ChatMessageList.css +1 -1
  6. package/dist/cjs/components/Combobox/Combobox.css +59 -1
  7. package/dist/cjs/components/Combobox/Combobox.js +22 -3
  8. package/dist/cjs/components/Combobox/Combobox.js.map +1 -1
  9. package/dist/cjs/components/Input/Input.js +8 -6
  10. package/dist/cjs/components/Input/Input.js.map +1 -1
  11. package/dist/cjs/components/LicensePlateInput/LicensePlateInput.js +10 -5
  12. package/dist/cjs/components/LicensePlateInput/LicensePlateInput.js.map +1 -1
  13. package/dist/cjs/components/NumberInput/NumberInput.js +6 -4
  14. package/dist/cjs/components/NumberInput/NumberInput.js.map +1 -1
  15. package/dist/cjs/components/SearchInput/SearchInput.js +20 -5
  16. package/dist/cjs/components/SearchInput/SearchInput.js.map +1 -1
  17. package/dist/cjs/components/TextLink/TextLink.css +79 -0
  18. package/dist/cjs/components/TextLink/TextLink.js +28 -0
  19. package/dist/cjs/components/TextLink/TextLink.js.map +1 -0
  20. package/dist/cjs/components/TextLink/index.js +11 -0
  21. package/dist/cjs/components/TextLink/index.js.map +1 -0
  22. package/dist/cjs/components/Textarea/Textarea.js +5 -4
  23. package/dist/cjs/components/Textarea/Textarea.js.map +1 -1
  24. package/dist/cjs/components/index.js +3 -1
  25. package/dist/cjs/components/index.js.map +1 -1
  26. package/dist/cjs/utils/accessibility.js +14 -0
  27. package/dist/cjs/utils/accessibility.js.map +1 -1
  28. package/dist/esm/components/BottomBar/BottomBar.css +19 -4
  29. package/dist/esm/components/ChatMessage/ChatMessage.css +7 -1
  30. package/dist/esm/components/ChatMessage/ChatMessage.js.map +1 -1
  31. package/dist/esm/components/ChatMessageList/ChatMessageList.css +1 -1
  32. package/dist/esm/components/Combobox/Combobox.css +59 -1
  33. package/dist/esm/components/Combobox/Combobox.js +23 -4
  34. package/dist/esm/components/Combobox/Combobox.js.map +1 -1
  35. package/dist/esm/components/Input/Input.js +8 -6
  36. package/dist/esm/components/Input/Input.js.map +1 -1
  37. package/dist/esm/components/LicensePlateInput/LicensePlateInput.js +10 -5
  38. package/dist/esm/components/LicensePlateInput/LicensePlateInput.js.map +1 -1
  39. package/dist/esm/components/NumberInput/NumberInput.js +6 -4
  40. package/dist/esm/components/NumberInput/NumberInput.js.map +1 -1
  41. package/dist/esm/components/SearchInput/SearchInput.js +20 -5
  42. package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
  43. package/dist/esm/components/TextLink/TextLink.css +79 -0
  44. package/dist/esm/components/TextLink/TextLink.js +24 -0
  45. package/dist/esm/components/TextLink/TextLink.js.map +1 -0
  46. package/dist/esm/components/TextLink/index.js +3 -0
  47. package/dist/esm/components/TextLink/index.js.map +1 -0
  48. package/dist/esm/components/Textarea/Textarea.js +5 -4
  49. package/dist/esm/components/Textarea/Textarea.js.map +1 -1
  50. package/dist/esm/components/index.js +1 -0
  51. package/dist/esm/components/index.js.map +1 -1
  52. package/dist/esm/utils/accessibility.js +13 -0
  53. package/dist/esm/utils/accessibility.js.map +1 -1
  54. package/dist/styles/components/BottomBar.css +19 -4
  55. package/dist/styles/components/ChatMessage.css +7 -1
  56. package/dist/styles/components/ChatMessageList.css +1 -1
  57. package/dist/styles/components/Combobox.css +59 -1
  58. package/dist/styles/components/TextLink.css +79 -0
  59. package/dist/styles/index.css +925 -762
  60. package/dist/styles/muka-dark.css +925 -762
  61. package/dist/styles/muka-light.css +925 -762
  62. package/dist/styles/tokens-bouwplan-dark.css +4 -2
  63. package/dist/styles/tokens-bouwplan-light.css +4 -2
  64. package/dist/styles/tokens-fscl-dark.css +4 -2
  65. package/dist/styles/tokens-fscl-light.css +4 -2
  66. package/dist/styles/tokens-grip-dark.css +4 -2
  67. package/dist/styles/tokens-grip-light.css +4 -2
  68. package/dist/styles/tokens-muka-dark.css +4 -2
  69. package/dist/styles/tokens-muka-light.css +4 -2
  70. package/dist/styles/tokens-wireframe-dark.css +4 -2
  71. package/dist/styles/tokens-wireframe-light.css +4 -2
  72. package/dist/styles/wireframe-dark.css +925 -762
  73. package/dist/styles/wireframe-light.css +925 -762
  74. package/dist/types/components/ChatMessage/ChatMessage.d.ts +4 -1
  75. package/dist/types/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  76. package/dist/types/components/Combobox/Combobox.d.ts +7 -0
  77. package/dist/types/components/Combobox/Combobox.d.ts.map +1 -1
  78. package/dist/types/components/Input/Input.d.ts +4 -2
  79. package/dist/types/components/Input/Input.d.ts.map +1 -1
  80. package/dist/types/components/LicensePlateInput/LicensePlateInput.d.ts +2 -2
  81. package/dist/types/components/LicensePlateInput/LicensePlateInput.d.ts.map +1 -1
  82. package/dist/types/components/NumberInput/NumberInput.d.ts +2 -2
  83. package/dist/types/components/NumberInput/NumberInput.d.ts.map +1 -1
  84. package/dist/types/components/SearchInput/SearchInput.d.ts +2 -2
  85. package/dist/types/components/SearchInput/SearchInput.d.ts.map +1 -1
  86. package/dist/types/components/TextLink/TextLink.d.ts +30 -0
  87. package/dist/types/components/TextLink/TextLink.d.ts.map +1 -0
  88. package/dist/types/components/TextLink/index.d.ts +3 -0
  89. package/dist/types/components/TextLink/index.d.ts.map +1 -0
  90. package/dist/types/components/Textarea/Textarea.d.ts +2 -2
  91. package/dist/types/components/Textarea/Textarea.d.ts.map +1 -1
  92. package/dist/types/components/index.d.ts +1 -0
  93. package/dist/types/components/index.d.ts.map +1 -1
  94. package/dist/types/utils/accessibility.d.ts +10 -0
  95. package/dist/types/utils/accessibility.d.ts.map +1 -1
  96. package/package.json +3 -1
  97. package/tokens/t4-components/bottombar.json +2 -1
  98. package/tokens/t4-components/chat.json +15 -0
  99. package/tokens/t4-components/chatbubble.json +7 -1
@@ -1,5 +1,18 @@
1
1
  /* Combobox Component Styles */
2
2
 
3
+ /* ─── Trigger group (positioning context for the trailing controls) ── */
4
+
5
+ /*
6
+ * The clear control is a sibling of the trigger, not a child (a <button> may
7
+ * not contain interactive content), so it is overlaid on the trigger's trailing
8
+ * padding. The trigger reserves that space with padding-right below.
9
+ */
10
+ .muka-combobox__trigger-group {
11
+ position: relative;
12
+ display: block;
13
+ width: 100%;
14
+ }
15
+
3
16
  /* ─── Trigger (looks like an Input field, behaves like a button) ── */
4
17
 
5
18
  .muka-combobox {
@@ -7,7 +20,7 @@
7
20
  align-items: center;
8
21
  gap: var(--spacing-2);
9
22
  width: 100%;
10
- padding: 0 var(--input-field-padding-x);
23
+ padding: 0 var(--muka-combobox-trailing-space) 0 var(--input-field-padding-x);
11
24
  background-color: var(--input-field-color-default-background);
12
25
  border: var(--border-width-regular) solid var(--input-field-color-default-border);
13
26
  color: var(--color-text-default-default);
@@ -19,6 +32,19 @@
19
32
  line-height: var(--text-body-md-regular-lineHeight);
20
33
  -webkit-tap-highlight-color: transparent;
21
34
  transition: border-color 0.12s ease;
35
+
36
+ /* Room for the chevron overlaid on the trailing edge. */
37
+ --muka-combobox-trailing-space: calc(
38
+ var(--input-field-padding-x) + var(--icon-size-sm) + var(--spacing-2)
39
+ );
40
+ }
41
+
42
+ /* …and for the clear button next to it, when one is rendered. */
43
+ .muka-combobox--clearable {
44
+ --muka-combobox-trailing-space: calc(
45
+ var(--input-field-padding-x) + var(--icon-size-sm) + var(--spacing-2) +
46
+ var(--icon-size-xs) + var(--spacing-1) * 2 + var(--spacing-2)
47
+ );
22
48
  }
23
49
 
24
50
  .muka-combobox--sm {
@@ -71,6 +97,23 @@
71
97
  text-overflow: ellipsis;
72
98
  }
73
99
 
100
+ /* ─── Trailing controls (clear + chevron) ─────────────── */
101
+
102
+ .muka-combobox__actions {
103
+ position: absolute;
104
+ top: 0;
105
+ right: var(--input-field-padding-x);
106
+ height: 100%;
107
+ display: flex;
108
+ align-items: center;
109
+ gap: var(--spacing-2);
110
+ /*
111
+ * The strip sits on top of the trigger, so it must not swallow taps meant to
112
+ * open the picker. Only the clear button takes pointer events back.
113
+ */
114
+ pointer-events: none;
115
+ }
116
+
74
117
  .muka-combobox__clear,
75
118
  .muka-combobox__chevron {
76
119
  display: inline-flex;
@@ -81,9 +124,13 @@
81
124
  }
82
125
 
83
126
  .muka-combobox__clear {
127
+ pointer-events: auto;
84
128
  cursor: pointer;
85
129
  padding: var(--spacing-1);
130
+ border: none;
131
+ background: none;
86
132
  border-radius: var(--radius-sm);
133
+ -webkit-tap-highlight-color: transparent;
87
134
  }
88
135
 
89
136
  .muka-combobox__clear:hover {
@@ -91,6 +138,17 @@
91
138
  background-color: var(--color-surface-level1);
92
139
  }
93
140
 
141
+ .muka-combobox__clear:focus-visible {
142
+ outline: 2px solid var(--color-border-focus);
143
+ outline-offset: 2px;
144
+ color: var(--color-text-default-default);
145
+ }
146
+
147
+ .muka-combobox--disabled ~ .muka-combobox__actions,
148
+ .muka-combobox:disabled ~ .muka-combobox__actions {
149
+ opacity: 0.5;
150
+ }
151
+
94
152
  /* ─── Picker sheet body ───────────────────────────────── */
95
153
 
96
154
  .muka-combobox__picker {
@@ -0,0 +1,79 @@
1
+ /* TextLink Component Styles - Using Muka Design Tokens */
2
+
3
+ .muka-text-link {
4
+ display: inline;
5
+ cursor: pointer;
6
+ text-decoration: underline;
7
+ /* Nudge the rule clear of descenders; the Figma underline sits off baseline. */
8
+ text-underline-offset: 0.2em;
9
+ text-decoration-thickness: from-font;
10
+ /* Rounds the focus ring's corners; the link itself has no visible box. */
11
+ border-radius: var(--border-radius-sm);
12
+ transition: color var(--motion-duration-micro, 0.15s) var(--motion-easing-enter, ease);
13
+ }
14
+
15
+ /* ─── Sizes ───────────────────────────────────────────────
16
+ Mirrors the body text scale so a link matches the copy it sits in. */
17
+ .muka-text-link--sm {
18
+ font-family: var(--text-body-sm-regular-fontFamily);
19
+ font-weight: var(--text-body-sm-regular-fontWeight);
20
+ font-size: var(--text-body-sm-regular-fontSize);
21
+ line-height: var(--text-body-sm-regular-lineHeight);
22
+ }
23
+
24
+ .muka-text-link--base {
25
+ font-family: var(--text-body-base-regular-fontFamily);
26
+ font-weight: var(--text-body-base-regular-fontWeight);
27
+ font-size: var(--text-body-base-regular-fontSize);
28
+ line-height: var(--text-body-base-regular-lineHeight);
29
+ }
30
+
31
+ .muka-text-link--lg {
32
+ font-family: var(--text-body-lg-regular-fontFamily);
33
+ font-weight: var(--text-body-lg-regular-fontWeight);
34
+ font-size: var(--text-body-lg-regular-fontSize);
35
+ line-height: var(--text-body-lg-regular-lineHeight);
36
+ }
37
+
38
+ /* ─── Variant: default (accent) ───────────────────────────
39
+ Visited repeats the default colour on purpose: the design treats visited and
40
+ default the same, and pinning it stops the browser's purple from showing. */
41
+ .muka-text-link--default,
42
+ .muka-text-link--default:visited {
43
+ color: var(--color-text-action-default);
44
+ }
45
+
46
+ .muka-text-link--default:hover,
47
+ .muka-text-link--default:focus-visible {
48
+ color: var(--color-text-action-hover);
49
+ }
50
+
51
+ .muka-text-link--default:active {
52
+ color: var(--color-text-action-pressed);
53
+ }
54
+
55
+ /* ─── Variant: subtle (neutral) ───────────────────────────
56
+ Hover, focus and pressed all darken to the default text colour. */
57
+ .muka-text-link--subtle,
58
+ .muka-text-link--subtle:visited {
59
+ color: var(--color-text-subtle-default);
60
+ }
61
+
62
+ .muka-text-link--subtle:hover,
63
+ .muka-text-link--subtle:focus-visible,
64
+ .muka-text-link--subtle:active {
65
+ color: var(--color-text-default-default);
66
+ }
67
+
68
+ /* ─── Focus ───────────────────────────────────────────────
69
+ Same ring as every other focusable Muka component. */
70
+ .muka-text-link:focus-visible {
71
+ outline: 2px solid var(--color-border-focus);
72
+ outline-offset: 2px;
73
+ }
74
+
75
+ @media (prefers-reduced-motion: reduce) {
76
+ .muka-text-link {
77
+ transition: none;
78
+ }
79
+ }