@ecopages/radiant-ui 0.1.0-beta.3 → 0.1.0-beta.6

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 (185) hide show
  1. package/dist/components/ui/autocomplete/autocomplete.css +135 -0
  2. package/dist/components/ui/autocomplete/autocomplete.d.ts +21 -0
  3. package/dist/components/ui/autocomplete/autocomplete.script.d.ts +42 -0
  4. package/dist/components/ui/autocomplete/index.d.ts +2 -0
  5. package/dist/components/ui/autocomplete/index.js +2 -0
  6. package/dist/components/ui/autocomplete/index.js.map +7 -0
  7. package/dist/components/ui/avatar/avatar.css +58 -0
  8. package/dist/components/ui/avatar/avatar.d.ts +13 -0
  9. package/dist/components/ui/avatar/index.d.ts +1 -0
  10. package/dist/components/ui/avatar/index.js +2 -0
  11. package/dist/components/ui/avatar/index.js.map +7 -0
  12. package/dist/components/ui/button-group/button-group.css +16 -0
  13. package/dist/components/ui/button-group/button-group.d.ts +10 -0
  14. package/dist/components/ui/button-group/index.d.ts +1 -0
  15. package/dist/components/ui/button-group/index.js +2 -0
  16. package/dist/components/ui/button-group/index.js.map +7 -0
  17. package/dist/components/ui/calendar/calendar.css +318 -0
  18. package/dist/components/ui/calendar/calendar.d.ts +5 -0
  19. package/dist/components/ui/calendar/calendar.script.d.ts +89 -0
  20. package/dist/components/ui/calendar/index.d.ts +2 -0
  21. package/dist/components/ui/calendar/index.js +2 -0
  22. package/dist/components/ui/calendar/index.js.map +7 -0
  23. package/dist/components/ui/chip/chip.css +47 -0
  24. package/dist/components/ui/chip/chip.d.ts +11 -0
  25. package/dist/components/ui/chip/index.d.ts +1 -0
  26. package/dist/components/ui/chip/index.js +2 -0
  27. package/dist/components/ui/chip/index.js.map +7 -0
  28. package/dist/components/ui/chip-list/chip-list.css +15 -0
  29. package/dist/components/ui/chip-list/chip-list.d.ts +10 -0
  30. package/dist/components/ui/chip-list/index.d.ts +1 -0
  31. package/dist/components/ui/chip-list/index.js +2 -0
  32. package/dist/components/ui/chip-list/index.js.map +7 -0
  33. package/dist/components/ui/combobox/combobox.css +42 -80
  34. package/dist/components/ui/combobox/combobox.d.ts +12 -20
  35. package/dist/components/ui/combobox/combobox.script.d.ts +15 -14
  36. package/dist/components/ui/combobox/index.d.ts +2 -1
  37. package/dist/components/ui/combobox/index.js +1 -1
  38. package/dist/components/ui/combobox/index.js.map +4 -4
  39. package/dist/components/ui/date-field/date-field.css +184 -0
  40. package/dist/components/ui/date-field/date-field.d.ts +10 -0
  41. package/dist/components/ui/date-field/date-field.script.d.ts +108 -0
  42. package/dist/components/ui/date-field/index.d.ts +2 -0
  43. package/dist/components/ui/date-field/index.js +2 -0
  44. package/dist/components/ui/date-field/index.js.map +7 -0
  45. package/dist/components/ui/date-range-picker/date-range-picker.css +194 -0
  46. package/dist/components/ui/date-range-picker/date-range-picker.d.ts +10 -0
  47. package/dist/components/ui/date-range-picker/date-range-picker.script.d.ts +99 -0
  48. package/dist/components/ui/date-range-picker/index.d.ts +2 -0
  49. package/dist/components/ui/date-range-picker/index.js +2 -0
  50. package/dist/components/ui/date-range-picker/index.js.map +7 -0
  51. package/dist/components/ui/dialog/dialog.css +1 -1
  52. package/dist/components/ui/feed/feed.css +169 -5
  53. package/dist/components/ui/feed/feed.d.ts +54 -11
  54. package/dist/components/ui/feed/index.d.ts +1 -2
  55. package/dist/components/ui/feed/index.js +1 -1
  56. package/dist/components/ui/feed/index.js.map +4 -4
  57. package/dist/components/ui/field/index.js +1 -1
  58. package/dist/components/ui/field/index.js.map +3 -3
  59. package/dist/components/ui/form/form-field.test.d.ts +1 -0
  60. package/dist/components/ui/form/index.js +1 -1
  61. package/dist/components/ui/form/index.js.map +3 -3
  62. package/dist/components/ui/heading/heading.css +107 -0
  63. package/dist/components/ui/heading/heading.d.ts +30 -0
  64. package/dist/components/ui/heading/index.d.ts +1 -0
  65. package/dist/components/ui/heading/index.js +2 -0
  66. package/dist/components/ui/heading/index.js.map +7 -0
  67. package/dist/components/ui/headline/headline.css +43 -0
  68. package/dist/components/ui/headline/headline.d.ts +16 -0
  69. package/dist/components/ui/headline/index.d.ts +1 -0
  70. package/dist/components/ui/headline/index.js +2 -0
  71. package/dist/components/ui/headline/index.js.map +7 -0
  72. package/dist/components/ui/input/index.js +1 -1
  73. package/dist/components/ui/input/index.js.map +4 -4
  74. package/dist/components/ui/input/input.d.ts +8 -1
  75. package/dist/components/ui/label/index.js +1 -1
  76. package/dist/components/ui/label/index.js.map +2 -2
  77. package/dist/components/ui/listbox/index.d.ts +1 -1
  78. package/dist/components/ui/listbox/index.js +1 -1
  79. package/dist/components/ui/listbox/index.js.map +4 -4
  80. package/dist/components/ui/listbox/listbox.css +34 -10
  81. package/dist/components/ui/listbox/listbox.d.ts +12 -4
  82. package/dist/components/ui/listbox/listbox.script.d.ts +12 -0
  83. package/dist/components/ui/menu-button/index.js +1 -1
  84. package/dist/components/ui/menu-button/index.js.map +4 -4
  85. package/dist/components/ui/menu-button/menu-button.css +24 -8
  86. package/dist/components/ui/menu-button/menu-button.script.d.ts +3 -4
  87. package/dist/components/ui/menubar/index.js +1 -1
  88. package/dist/components/ui/menubar/index.js.map +4 -4
  89. package/dist/components/ui/menubar/menubar.css +40 -22
  90. package/dist/components/ui/menubar/menubar.script.d.ts +6 -1
  91. package/dist/components/ui/number-field/index.d.ts +2 -0
  92. package/dist/components/ui/number-field/index.js +2 -0
  93. package/dist/components/ui/number-field/index.js.map +7 -0
  94. package/dist/components/ui/number-field/number-field.css +185 -0
  95. package/dist/components/ui/number-field/number-field.d.ts +43 -0
  96. package/dist/components/ui/number-field/number-field.script.d.ts +104 -0
  97. package/dist/components/ui/popover/index.d.ts +4 -0
  98. package/dist/components/ui/popover/index.js +2 -0
  99. package/dist/components/ui/popover/index.js.map +7 -0
  100. package/dist/components/ui/popover/popover.css +132 -0
  101. package/dist/components/ui/popover/popover.d.ts +15 -0
  102. package/dist/components/ui/popover/popover.script.d.ts +85 -0
  103. package/dist/components/ui/select/index.d.ts +3 -0
  104. package/dist/components/ui/select/index.js +2 -0
  105. package/dist/components/ui/select/index.js.map +7 -0
  106. package/dist/components/ui/select/select.css +216 -0
  107. package/dist/components/ui/select/select.d.ts +54 -0
  108. package/dist/components/ui/select/select.script.d.ts +106 -0
  109. package/dist/components/ui/shared/collection-navigation.d.ts +8 -0
  110. package/dist/components/ui/shared/collection-navigation.test.d.ts +1 -0
  111. package/dist/components/ui/shared/control-toggle.css +132 -0
  112. package/dist/components/ui/shared/field-label.d.ts +9 -0
  113. package/dist/components/ui/shared/floating-position.d.ts +13 -2
  114. package/dist/components/ui/shared/listbox-popover-behavior.d.ts +47 -0
  115. package/dist/components/ui/shared/listbox-popover-behavior.test.d.ts +1 -0
  116. package/dist/components/ui/shared/multi-value.d.ts +4 -0
  117. package/dist/components/ui/shared/popover-controller.d.ts +35 -0
  118. package/dist/components/ui/shared/popover-controller.test.d.ts +1 -0
  119. package/dist/components/ui/shared/popover.css +123 -0
  120. package/dist/components/ui/shared/portal.d.ts +7 -0
  121. package/dist/components/ui/shared/portal.test.d.ts +1 -0
  122. package/dist/components/ui/sidebar/index.js +1 -1
  123. package/dist/components/ui/sidebar/index.js.map +3 -3
  124. package/dist/components/ui/slider/index.js +1 -1
  125. package/dist/components/ui/slider/index.js.map +3 -3
  126. package/dist/components/ui/slider/slider.script.d.ts +5 -12
  127. package/dist/components/ui/tag-group/index.d.ts +2 -0
  128. package/dist/components/ui/tag-group/index.js +2 -0
  129. package/dist/components/ui/tag-group/index.js.map +7 -0
  130. package/dist/components/ui/tag-group/tag-group.css +184 -0
  131. package/dist/components/ui/tag-group/tag-group.d.ts +28 -0
  132. package/dist/components/ui/tag-group/tag-group.script.d.ts +65 -0
  133. package/dist/components/ui/textarea/index.js +1 -1
  134. package/dist/components/ui/textarea/index.js.map +2 -2
  135. package/dist/components/ui/toc/index.js +1 -1
  136. package/dist/components/ui/toc/index.js.map +3 -3
  137. package/dist/components/ui/toc/toc.css +1 -1
  138. package/dist/components/ui/toc/toc.ssr.test.d.ts +1 -0
  139. package/dist/components/ui/toc/toc.test.d.ts +1 -0
  140. package/dist/components/ui/tooltip/index.js +1 -1
  141. package/dist/components/ui/tooltip/index.js.map +3 -3
  142. package/dist/index.d.ts +14 -1
  143. package/dist/index.js +1 -1
  144. package/dist/index.js.map +4 -4
  145. package/dist/lib/icons/calendar.d.ts +3 -0
  146. package/dist/lib/icons/chevron-down.d.ts +3 -0
  147. package/dist/lib/icons/index.d.ts +3 -0
  148. package/dist/lib/icons/types.d.ts +4 -0
  149. package/dist/lib/intl/locale.d.ts +3 -0
  150. package/dist/lib/intl-date/calendar.d.ts +25 -0
  151. package/dist/lib/intl-date/formatters.d.ts +13 -0
  152. package/dist/lib/intl-date/index.d.ts +12 -0
  153. package/dist/lib/intl-date/iso.d.ts +6 -0
  154. package/dist/lib/intl-date/months.d.ts +12 -0
  155. package/dist/lib/intl-date/parts.d.ts +15 -0
  156. package/dist/lib/intl-date/parts.test.d.ts +1 -0
  157. package/dist/lib/intl-date/segments.d.ts +32 -0
  158. package/dist/lib/intl-date/segments.test.d.ts +1 -0
  159. package/dist/lib/intl-date/selection.d.ts +39 -0
  160. package/dist/lib/intl-date/selection.test.d.ts +1 -0
  161. package/dist/lib/intl-date/types.d.ts +17 -0
  162. package/dist/lib/intl-number/format.d.ts +9 -0
  163. package/dist/lib/intl-number/index.d.ts +2 -0
  164. package/dist/lib/intl-number/range.d.ts +3 -0
  165. package/dist/lib/intrinsic.d.ts +13 -0
  166. package/dist/lib/mask/date-mask.d.ts +29 -0
  167. package/dist/lib/mask/date-mask.test.d.ts +1 -0
  168. package/dist/lib/mask/index.d.ts +4 -0
  169. package/dist/lib/mask/input-mask.d.ts +52 -0
  170. package/dist/lib/mask/input-mask.test.d.ts +1 -0
  171. package/dist/lib/text-filter.d.ts +7 -0
  172. package/dist/lib/text-filter.test.d.ts +1 -0
  173. package/dist/styles/radiant-ui-core.css +131 -1
  174. package/dist/styles/radiant-ui.css +142 -1
  175. package/dist/styles/styles.css +4504 -2395
  176. package/dist/styles/tailwind.css +142 -1
  177. package/dist/styles/tokens/typography/default.css +8 -0
  178. package/package.json +106 -15
  179. package/dist/components/ui/feed/feed.script.d.ts +0 -22
  180. package/dist/components/ui/spinbutton/index.d.ts +0 -2
  181. package/dist/components/ui/spinbutton/index.js +0 -2
  182. package/dist/components/ui/spinbutton/index.js.map +0 -7
  183. package/dist/components/ui/spinbutton/spinbutton.css +0 -69
  184. package/dist/components/ui/spinbutton/spinbutton.d.ts +0 -5
  185. package/dist/components/ui/spinbutton/spinbutton.script.d.ts +0 -64
@@ -0,0 +1,216 @@
1
+ /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
+ @layer properties;
3
+ @layer components {
4
+ .rui-floating {
5
+ position: fixed;
6
+ visibility: hidden;
7
+ }
8
+ .rui-popover {
9
+ z-index: var(--z-index-popover, var(--z-popover));
10
+ overflow: auto;
11
+ border-radius: var(--radius-container, var(--radius-container));
12
+ border-style: var(--tw-border-style);
13
+ border-width: 1px;
14
+ border-color: var(--color-border, var(--border));
15
+ background-color: var(--color-background, var(--background));
16
+ --tw-shadow: var(--shadow-overlay);
17
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
18
+ }
19
+ .rui-popover--listbox {
20
+ display: flex;
21
+ width: 100%;
22
+ flex-direction: column;
23
+ overflow: hidden;
24
+ padding: 0px;
25
+ }
26
+ .rui-popover[hidden] {
27
+ display: none;
28
+ }
29
+ .rui-popover-trigger {
30
+ display: inline-flex;
31
+ }
32
+ }
33
+ rui-select {
34
+ position: relative;
35
+ display: inline-flex;
36
+ flex-direction: column;
37
+ }
38
+ @layer components {
39
+ .rui-select {
40
+ position: relative;
41
+ width: calc(var(--spacing, 0.25rem) * 64);
42
+ font-size: var(--text-sm, var(--text-sm));
43
+ line-height: var(--tw-leading, var(--text-sm--line-height, calc(1.25 / 0.875)));
44
+ }
45
+ .rui-select__control {
46
+ display: flex;
47
+ width: 100%;
48
+ min-width: 0px;
49
+ align-items: center;
50
+ gap: var(--spacing-1, var(--space-1));
51
+ border-radius: var(--radius-control, var(--radius-control));
52
+ border-style: var(--tw-border-style);
53
+ border-width: 1px;
54
+ border-color: var(--color-border, var(--border));
55
+ background-color: var(--color-background, var(--background));
56
+ padding-inline: var(--spacing-1, var(--space-1));
57
+ }
58
+ .rui-select__control:focus-within {
59
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
60
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
61
+ --tw-ring-color: var(--color-focus-ring, var(--focus-ring));
62
+ }
63
+ .rui-select__trigger {
64
+ display: inline-flex;
65
+ min-width: 0px;
66
+ flex: 1;
67
+ cursor: pointer;
68
+ align-items: center;
69
+ gap: var(--spacing-2, var(--space-2));
70
+ border-style: var(--tw-border-style);
71
+ border-width: 0px;
72
+ background-color: transparent;
73
+ padding-inline: var(--spacing-3, var(--space-3));
74
+ padding-block: var(--spacing-2, var(--space-2));
75
+ text-align: start;
76
+ color: var(--color-on-background, var(--on-background));
77
+ --tw-outline-style: none;
78
+ outline-style: none;
79
+ }
80
+ .rui-select__trigger:disabled {
81
+ cursor: not-allowed;
82
+ opacity: var(--opacity-muted, var(--opacity-muted));
83
+ }
84
+ .rui-select__value {
85
+ min-width: 0px;
86
+ flex: 1;
87
+ overflow: hidden;
88
+ text-overflow: ellipsis;
89
+ white-space: nowrap;
90
+ }
91
+ .rui-select__value[data-placeholder] {
92
+ color: var(--color-on-surface, var(--on-surface));
93
+ }
94
+ .rui-select__value [data-select-placeholder] {
95
+ color: var(--color-on-surface, var(--on-surface));
96
+ }
97
+ .rui-select__listbox {
98
+ min-width: 0px;
99
+ }
100
+ .rui-select__listbox[hidden] {
101
+ display: none;
102
+ }
103
+ .rui-select__listbox > rui-listbox {
104
+ min-width: 0px;
105
+ }
106
+ .rui-select__search {
107
+ margin: var(--spacing-1, var(--space-1));
108
+ min-width: 0px;
109
+ border-radius: var(--radius-control, var(--radius-control));
110
+ border-style: var(--tw-border-style);
111
+ border-width: 1px;
112
+ border-color: var(--color-border, var(--border));
113
+ background-color: var(--color-background, var(--background));
114
+ padding-inline: var(--spacing-3, var(--space-3));
115
+ padding-block: var(--spacing-2, var(--space-2));
116
+ color: var(--color-on-background, var(--on-background));
117
+ --tw-outline-style: none;
118
+ outline-style: none;
119
+ }
120
+ .rui-select__search:focus-visible {
121
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
122
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
123
+ --tw-ring-color: var(--color-focus-ring, var(--focus-ring));
124
+ }
125
+ }
126
+ @property --tw-border-style {
127
+ syntax: "*";
128
+ inherits: false;
129
+ initial-value: solid;
130
+ }
131
+ @property --tw-shadow {
132
+ syntax: "*";
133
+ inherits: false;
134
+ initial-value: 0 0 #0000;
135
+ }
136
+ @property --tw-shadow-color {
137
+ syntax: "*";
138
+ inherits: false;
139
+ }
140
+ @property --tw-shadow-alpha {
141
+ syntax: "<percentage>";
142
+ inherits: false;
143
+ initial-value: 100%;
144
+ }
145
+ @property --tw-inset-shadow {
146
+ syntax: "*";
147
+ inherits: false;
148
+ initial-value: 0 0 #0000;
149
+ }
150
+ @property --tw-inset-shadow-color {
151
+ syntax: "*";
152
+ inherits: false;
153
+ }
154
+ @property --tw-inset-shadow-alpha {
155
+ syntax: "<percentage>";
156
+ inherits: false;
157
+ initial-value: 100%;
158
+ }
159
+ @property --tw-ring-color {
160
+ syntax: "*";
161
+ inherits: false;
162
+ }
163
+ @property --tw-ring-shadow {
164
+ syntax: "*";
165
+ inherits: false;
166
+ initial-value: 0 0 #0000;
167
+ }
168
+ @property --tw-inset-ring-color {
169
+ syntax: "*";
170
+ inherits: false;
171
+ }
172
+ @property --tw-inset-ring-shadow {
173
+ syntax: "*";
174
+ inherits: false;
175
+ initial-value: 0 0 #0000;
176
+ }
177
+ @property --tw-ring-inset {
178
+ syntax: "*";
179
+ inherits: false;
180
+ }
181
+ @property --tw-ring-offset-width {
182
+ syntax: "<length>";
183
+ inherits: false;
184
+ initial-value: 0px;
185
+ }
186
+ @property --tw-ring-offset-color {
187
+ syntax: "*";
188
+ inherits: false;
189
+ initial-value: #fff;
190
+ }
191
+ @property --tw-ring-offset-shadow {
192
+ syntax: "*";
193
+ inherits: false;
194
+ initial-value: 0 0 #0000;
195
+ }
196
+ @layer properties {
197
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
198
+ *, ::before, ::after, ::backdrop {
199
+ --tw-border-style: solid;
200
+ --tw-shadow: 0 0 #0000;
201
+ --tw-shadow-color: initial;
202
+ --tw-shadow-alpha: 100%;
203
+ --tw-inset-shadow: 0 0 #0000;
204
+ --tw-inset-shadow-color: initial;
205
+ --tw-inset-shadow-alpha: 100%;
206
+ --tw-ring-color: initial;
207
+ --tw-ring-shadow: 0 0 #0000;
208
+ --tw-inset-ring-color: initial;
209
+ --tw-inset-ring-shadow: 0 0 #0000;
210
+ --tw-ring-inset: initial;
211
+ --tw-ring-offset-width: 0px;
212
+ --tw-ring-offset-color: #fff;
213
+ --tw-ring-offset-shadow: 0 0 #0000;
214
+ }
215
+ }
216
+ }
@@ -0,0 +1,54 @@
1
+ import type { JsxHtmlProps, JsxHtmlPropsWithChildren } from '@ecopages/jsx';
2
+ import { RuiListboxOption, type RuiListboxOptionData } from '../listbox';
3
+ import type { RuiSelectProps } from './select.script';
4
+ export type RuiSelectControlProps = JsxHtmlPropsWithChildren<{
5
+ slot?: string;
6
+ }>;
7
+ /** Trigger row wrapper for the value button and toggle icon. */
8
+ export declare function RuiSelectControl({ children, slot, class: className, ...props }: RuiSelectControlProps): import("@ecopages/jsx").JsxRenderable;
9
+ export type RuiSelectTriggerProps = JsxHtmlPropsWithChildren<{
10
+ disabled?: boolean;
11
+ 'aria-label'?: string;
12
+ }>;
13
+ /** Value button with `role="combobox"`. Place `RuiSelectValue` inside. */
14
+ export declare function RuiSelectTrigger({ children, class: className, disabled, ...props }: RuiSelectTriggerProps): import("@ecopages/jsx").JsxRenderable;
15
+ export type RuiSelectToggleProps = JsxHtmlPropsWithChildren<{
16
+ 'aria-label'?: string;
17
+ disabled?: boolean;
18
+ }>;
19
+ /** Toggle button for opening the listbox popup. */
20
+ export declare function RuiSelectToggle({ children, class: className, 'aria-label': ariaLabel, disabled, ...props }: RuiSelectToggleProps): import("@ecopages/jsx").JsxRenderable;
21
+ export type RuiSelectValueProps = JsxHtmlPropsWithChildren<{
22
+ slot?: string;
23
+ }>;
24
+ /**
25
+ * Selected value display inside `RuiSelectTrigger`.
26
+ *
27
+ * @remarks When empty, shows the select `placeholder`. For multi-select chip UI,
28
+ * provide `RuiTagGroup` as children instead of relying on the default text.
29
+ */
30
+ export declare function RuiSelectValue({ children, slot, class: className, ...props }: RuiSelectValueProps): import("@ecopages/jsx").JsxRenderable;
31
+ export type RuiSelectListboxProps = JsxHtmlPropsWithChildren<{
32
+ slot?: string;
33
+ }>;
34
+ /** Popup shell slotted into `listbox`. Place an embedded `RuiListbox` inside. */
35
+ export declare function RuiSelectListbox({ children, slot, class: className, ...props }: RuiSelectListboxProps): import("@ecopages/jsx").JsxRenderable;
36
+ export type RuiSelectSearchProps = JsxHtmlProps<{
37
+ slot?: string;
38
+ placeholder?: string;
39
+ 'aria-label'?: string;
40
+ disabled?: boolean;
41
+ }>;
42
+ /** Search input for filtering inside `RuiAutocomplete` within a select listbox. */
43
+ export declare function RuiSelectSearch({ placeholder, slot, class: className, disabled, ...props }: RuiSelectSearchProps): import("@ecopages/jsx").JsxRenderable;
44
+ export type RuiSelectOptionData = RuiListboxOptionData;
45
+ /** @deprecated Use `RuiListboxOption` */
46
+ export declare const RuiSelectOption: typeof RuiListboxOption;
47
+ /**
48
+ * Select view. Pair with `RuiLabel` (sibling or via `RuiField`) for the visible name —
49
+ * do not nest a select-specific label.
50
+ */
51
+ export declare const RuiSelect: import("@/lib/radiant-view").RadiantViewComponent<JsxHtmlPropsWithChildren<RuiSelectProps & {
52
+ slot?: string;
53
+ options?: RuiSelectOptionData[];
54
+ }>>;
@@ -0,0 +1,106 @@
1
+ import { RadiantElement } from '@ecopages/radiant';
2
+ import type { EventEmitter } from '@ecopages/radiant/tools/event-emitter';
3
+ export type RuiSelectSelectionMode = 'single' | 'multiple';
4
+ export type RuiSelectProps = {
5
+ value?: string;
6
+ /** Accessible name when there is no visible `RuiLabel` associated with the trigger. */
7
+ label?: string;
8
+ placeholder?: string;
9
+ disabled?: boolean;
10
+ selectionMode?: RuiSelectSelectionMode;
11
+ /**
12
+ * When `selectionMode` is `multiple`, whether selecting an option closes the popup.
13
+ * Defaults to false for multiple and true for single.
14
+ */
15
+ shouldCloseOnSelect?: boolean;
16
+ };
17
+ export type RuiSelectChangeDetail = {
18
+ value: string;
19
+ };
20
+ /**
21
+ * `<rui-select>` — a select-only combobox with a button trigger and listbox popup.
22
+ *
23
+ * Implements the APG Combobox pattern (select-only variant). DOM focus stays on the
24
+ * trigger button; visual focus moves into the popup via `aria-activedescendant`.
25
+ *
26
+ * Pair with `RuiLabel` (sibling, or via `RuiField`) for the visible name.
27
+ * Compose with `data-select-trigger`, `data-select-toggle`, `data-select-value`, `data-select-listbox`
28
+ * (popup shell), and `RuiListbox` with `embedded` for options.
29
+ *
30
+ * Wrap the listbox in `RuiAutocomplete` to add search filtering.
31
+ * Use `RuiTagGroup` inside `RuiSelectValue` for multi-select chip display.
32
+ *
33
+ * @see https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/
34
+ * @element rui-select
35
+ * @slot trigger - Control row (`RuiSelectControl` with value button and toggle).
36
+ * @slot listbox - Popup shell (`RuiSelectListbox`) containing an embedded `RuiListbox`.
37
+ * @fires rui-change
38
+ */
39
+ export declare class RuiSelect extends RadiantElement {
40
+ value: string;
41
+ label: string;
42
+ placeholder: string;
43
+ disabled: boolean;
44
+ selectionMode: RuiSelectSelectionMode;
45
+ shouldCloseOnSelect: boolean | undefined;
46
+ changeEvent: EventEmitter<RuiSelectChangeDetail>;
47
+ private open;
48
+ private readonly uid;
49
+ private readonly listboxBehavior;
50
+ rootTarget: HTMLElement;
51
+ private get listboxId();
52
+ private get triggerId();
53
+ private isMultiple;
54
+ private closesOnSelect;
55
+ private getSelectedValues;
56
+ private setSelectedValues;
57
+ private getSearchInput;
58
+ private hasSearchInput;
59
+ /** Element that receives `aria-activedescendant` while the popup is open. */
60
+ private getActiveDescendantHost;
61
+ private resetSearchFilter;
62
+ private syncSearchInput;
63
+ private focusPopupInput;
64
+ private getTagGroup;
65
+ private hasTagGroup;
66
+ private syncTagGroup;
67
+ private syncTagGroupPlaceholder;
68
+ private removeSelectedValue;
69
+ private getTrigger;
70
+ private getToggle;
71
+ private getValueElement;
72
+ private getListboxPopup;
73
+ private getListbox;
74
+ private getListboxHost;
75
+ private getOptions;
76
+ private getOptionLabel;
77
+ private getOptionValue;
78
+ private ensureOptionIds;
79
+ private getAccessibleName;
80
+ private syncLabel;
81
+ private syncTrigger;
82
+ private syncToggle;
83
+ private syncListboxHost;
84
+ private syncValueDisplay;
85
+ private syncOptionSelection;
86
+ private setOpen;
87
+ private selectOption;
88
+ private handleListboxKeydown;
89
+ private handleTriggerKeydown;
90
+ private initialize;
91
+ connectedCallback(): void;
92
+ disconnectedCallback(): void;
93
+ onPropsUpdated(): void;
94
+ onTriggerClick(event: Event): void;
95
+ onTriggerKeydown(event: KeyboardEvent): void;
96
+ onSearchKeydown(event: KeyboardEvent): void;
97
+ onSearchInput(): void;
98
+ onTagRemove(event: Event): void;
99
+ onTagClick(event: Event): void;
100
+ onOptionPointerOver(event: Event): void;
101
+ onOptionMouseDown(event: Event): void;
102
+ onOptionClick(event: Event): void;
103
+ onFocusOut(event: FocusEvent): void;
104
+ onDocumentPointerDown(event: PointerEvent): void;
105
+ render(): import("@ecopages/jsx").JsxRenderable;
106
+ }
@@ -0,0 +1,8 @@
1
+ /** Returns enabled, visible options in their current DOM order. */
2
+ export declare function getVisibleCollectionOptions(options: HTMLElement[]): HTMLElement[];
3
+ /** Wraps an active option index in the collection bounds. */
4
+ export declare function wrapCollectionIndex(index: number, direction: 1 | -1, length: number): number;
5
+ /** Clears active styling and the active descendant relationship for a collection. */
6
+ export declare function clearCollectionActive(options: HTMLElement[], activeHost: HTMLElement | null): void;
7
+ /** Applies active styling and the active descendant relationship to one option. */
8
+ export declare function setCollectionActive(options: HTMLElement[], visibleOptions: HTMLElement[], index: number, activeHost: HTMLElement | null, idPrefix: string): HTMLElement | null;
@@ -0,0 +1,132 @@
1
+ /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
+ @layer properties;
3
+ @layer components {
4
+ .rui-icon {
5
+ width: var(--size-icon-sm);
6
+ height: var(--size-icon-sm);
7
+ flex-shrink: 0;
8
+ }
9
+ .rui-icon--md {
10
+ width: var(--size-icon-md);
11
+ height: var(--size-icon-md);
12
+ }
13
+ .rui-control-toggle {
14
+ display: inline-flex;
15
+ height: var(--spacing-8, var(--space-8));
16
+ width: var(--spacing-8, var(--space-8));
17
+ flex-shrink: 0;
18
+ align-items: center;
19
+ justify-content: center;
20
+ border-radius: var(--radius-control, var(--radius-control));
21
+ border-style: var(--tw-border-style);
22
+ border-width: 0px;
23
+ background-color: transparent;
24
+ color: var(--color-on-surface, var(--on-surface));
25
+ cursor: pointer;
26
+ }
27
+ .rui-control-toggle:hover:not(:disabled) {
28
+ background-color: var(--color-surface-container-low, var(--surface-container-low));
29
+ }
30
+ .rui-control-toggle:focus-visible {
31
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
32
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
33
+ --tw-ring-color: var(--color-focus-ring, var(--focus-ring));
34
+ --tw-outline-style: none;
35
+ outline-style: none;
36
+ }
37
+ .rui-control-toggle:disabled {
38
+ cursor: not-allowed;
39
+ opacity: var(--opacity-muted, var(--opacity-muted));
40
+ }
41
+ }
42
+ @property --tw-border-style {
43
+ syntax: "*";
44
+ inherits: false;
45
+ initial-value: solid;
46
+ }
47
+ @property --tw-shadow {
48
+ syntax: "*";
49
+ inherits: false;
50
+ initial-value: 0 0 #0000;
51
+ }
52
+ @property --tw-shadow-color {
53
+ syntax: "*";
54
+ inherits: false;
55
+ }
56
+ @property --tw-shadow-alpha {
57
+ syntax: "<percentage>";
58
+ inherits: false;
59
+ initial-value: 100%;
60
+ }
61
+ @property --tw-inset-shadow {
62
+ syntax: "*";
63
+ inherits: false;
64
+ initial-value: 0 0 #0000;
65
+ }
66
+ @property --tw-inset-shadow-color {
67
+ syntax: "*";
68
+ inherits: false;
69
+ }
70
+ @property --tw-inset-shadow-alpha {
71
+ syntax: "<percentage>";
72
+ inherits: false;
73
+ initial-value: 100%;
74
+ }
75
+ @property --tw-ring-color {
76
+ syntax: "*";
77
+ inherits: false;
78
+ }
79
+ @property --tw-ring-shadow {
80
+ syntax: "*";
81
+ inherits: false;
82
+ initial-value: 0 0 #0000;
83
+ }
84
+ @property --tw-inset-ring-color {
85
+ syntax: "*";
86
+ inherits: false;
87
+ }
88
+ @property --tw-inset-ring-shadow {
89
+ syntax: "*";
90
+ inherits: false;
91
+ initial-value: 0 0 #0000;
92
+ }
93
+ @property --tw-ring-inset {
94
+ syntax: "*";
95
+ inherits: false;
96
+ }
97
+ @property --tw-ring-offset-width {
98
+ syntax: "<length>";
99
+ inherits: false;
100
+ initial-value: 0px;
101
+ }
102
+ @property --tw-ring-offset-color {
103
+ syntax: "*";
104
+ inherits: false;
105
+ initial-value: #fff;
106
+ }
107
+ @property --tw-ring-offset-shadow {
108
+ syntax: "*";
109
+ inherits: false;
110
+ initial-value: 0 0 #0000;
111
+ }
112
+ @layer properties {
113
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
114
+ *, ::before, ::after, ::backdrop {
115
+ --tw-border-style: solid;
116
+ --tw-shadow: 0 0 #0000;
117
+ --tw-shadow-color: initial;
118
+ --tw-shadow-alpha: 100%;
119
+ --tw-inset-shadow: 0 0 #0000;
120
+ --tw-inset-shadow-color: initial;
121
+ --tw-inset-shadow-alpha: 100%;
122
+ --tw-ring-color: initial;
123
+ --tw-ring-shadow: 0 0 #0000;
124
+ --tw-inset-ring-color: initial;
125
+ --tw-inset-ring-shadow: 0 0 #0000;
126
+ --tw-ring-inset: initial;
127
+ --tw-ring-offset-width: 0px;
128
+ --tw-ring-offset-color: #fff;
129
+ --tw-ring-offset-shadow: 0 0 #0000;
130
+ }
131
+ }
132
+ }
@@ -0,0 +1,9 @@
1
+ export type FieldLabelSyncOptions = {
2
+ controlId: string;
3
+ label: string;
4
+ labelId: string;
5
+ };
6
+ /** Finds the visible label associated with a composed field control. */
7
+ export declare function findAssociatedLabel(owner: HTMLElement): HTMLLabelElement | null;
8
+ /** Applies the shared label-to-control ARIA contract for an unmanaged control. */
9
+ export declare function syncFieldLabel(owner: HTMLElement, control: HTMLElement | null, options: FieldLabelSyncOptions): void;
@@ -12,6 +12,10 @@ export type FloatingViewport = {
12
12
  height: number;
13
13
  padding: number;
14
14
  };
15
+ export type FloatingPositionResult = {
16
+ coords: FloatingCoords;
17
+ placement: RuiPlacement;
18
+ };
15
19
  /**
16
20
  * Computes fixed-position coords for a floating surface.
17
21
  *
@@ -21,17 +25,24 @@ export type FloatingViewport = {
21
25
  * never slides onto its anchor.
22
26
  */
23
27
  export declare function computeFloatingCoords(anchor: DOMRect, size: FloatingSize, placement: RuiPlacement, gap: number, viewport?: FloatingViewport): FloatingCoords;
28
+ /**
29
+ * Computes fixed-position coords and the resolved placement (after flip).
30
+ */
31
+ export declare function computeFloatingPosition(anchor: DOMRect, size: FloatingSize, placement: RuiPlacement, gap: number, viewport?: FloatingViewport): FloatingPositionResult;
24
32
  /** Applies fixed coords to a floating element. */
25
- export declare function applyFloatingPosition(anchor: HTMLElement, floating: HTMLElement, placement: RuiPlacement, gap: number): void;
33
+ export declare function applyFloatingPosition(anchor: HTMLElement, floating: HTMLElement, placement: RuiPlacement, gap: number, options?: {
34
+ matchAnchorWidth?: boolean;
35
+ }): RuiPlacement;
26
36
  export type AttachFloatingOptions = {
27
37
  anchor: HTMLElement;
28
38
  floating: HTMLElement;
29
39
  getPlacement: () => RuiPlacement;
30
40
  gap: number;
41
+ matchAnchorWidth?: boolean;
31
42
  };
32
43
  /**
33
44
  * Positions on attach and keeps the floating element updated on scroll/resize.
34
45
  *
35
46
  * @returns Cleanup that removes listeners and observers.
36
47
  */
37
- export declare function attachFloating({ anchor, floating, getPlacement, gap }: AttachFloatingOptions): () => void;
48
+ export declare function attachFloating({ anchor, floating, getPlacement, gap, matchAnchorWidth, }: AttachFloatingOptions): () => void;
@@ -0,0 +1,47 @@
1
+ export type ListboxActivation = 'first' | 'last' | 'none';
2
+ export type ListboxPopoverBehaviorConfig = {
3
+ getAnchor: () => HTMLElement | null;
4
+ getFloating: () => HTMLElement | null;
5
+ getOpen: () => boolean;
6
+ getOptions: () => HTMLElement[];
7
+ getActiveDescendantHost: () => HTMLElement | null;
8
+ getOptionIdPrefix: () => string;
9
+ };
10
+ export type ListboxKeydownConfig = {
11
+ isOpen: boolean;
12
+ canUseSpace: boolean;
13
+ closesOnTab: boolean;
14
+ enterWhenClosed: 'open' | 'ignore';
15
+ enterWithoutActive: 'close' | 'ignore';
16
+ onOpen: (activation?: ListboxActivation) => void;
17
+ onClose: (reason: 'arrow' | 'escape' | 'enter' | 'tab') => void;
18
+ onSelectActive: () => void;
19
+ onEscapeWhenClosed?: () => void;
20
+ };
21
+ /**
22
+ * Shared state and interaction plumbing for listbox-backed popovers.
23
+ *
24
+ * @remarks Select and combobox intentionally keep their selection and filtering
25
+ * policies local. This behavior owns only the state machine both controls must
26
+ * agree on: active-descendant navigation, popover positioning, and dismissal.
27
+ */
28
+ export declare class ListboxPopoverBehavior {
29
+ private readonly config;
30
+ private readonly popoverController;
31
+ private activeIndex;
32
+ private visualFocus;
33
+ constructor(config: ListboxPopoverBehaviorConfig);
34
+ get activeOptionIndex(): number;
35
+ get hasVisualFocus(): boolean;
36
+ ensureOptionIds(): void;
37
+ getVisibleOptions(): HTMLElement[];
38
+ clearActiveOption(): void;
39
+ setActiveOption(index: number): void;
40
+ moveActive(direction: 1 | -1, onOpen: (activation: ListboxActivation) => void): void;
41
+ /** Handles the APG keys shared by select-only and autocomplete listboxes. */
42
+ handleKeydown(event: KeyboardEvent, options: ListboxKeydownConfig): void;
43
+ syncPopoverPosition(): void;
44
+ shouldDismissFocus(relatedTarget: EventTarget | null): boolean;
45
+ shouldDismissPointer(target: Node | null): boolean;
46
+ destroy(): void;
47
+ }
@@ -0,0 +1,4 @@
1
+ /** Parses the comma-separated value protocol used by multi-select controls. */
2
+ export declare function parseMultiValue(value: string): string[];
3
+ /** Serializes multi-select values into the public custom-element value protocol. */
4
+ export declare function serializeMultiValue(values: string[]): string;
@@ -0,0 +1,35 @@
1
+ import type { RuiPlacement } from './placement';
2
+ /** Whether `node` is inside the anchor or floating surface. */
3
+ export declare function popoverContains(anchor: HTMLElement | null, floating: HTMLElement | null, node: Node | null): boolean;
4
+ /** Whether focus left the popover interaction tree. */
5
+ export declare function shouldDismissPopoverFocus(anchor: HTMLElement | null, floating: HTMLElement | null, relatedTarget: EventTarget | null): boolean;
6
+ /** Whether a pointer event target is outside the popover interaction tree. */
7
+ export declare function shouldDismissPopoverPointer(anchor: HTMLElement | null, floating: HTMLElement | null, target: Node | null): boolean;
8
+ export type PopoverControllerConfig = {
9
+ getAnchor: () => HTMLElement | null;
10
+ getFloating: () => HTMLElement | null;
11
+ getOpen: () => boolean;
12
+ getPlacement: () => RuiPlacement;
13
+ gap?: number;
14
+ portal?: boolean;
15
+ matchAnchorWidth?: boolean;
16
+ portalContainer?: ParentNode;
17
+ };
18
+ /**
19
+ * Headless popover lifecycle: portal mount, floating position, and teardown.
20
+ */
21
+ export declare class PopoverController {
22
+ private config;
23
+ private cleanupFloating;
24
+ private portalHandle;
25
+ private floatingElement;
26
+ constructor(config: PopoverControllerConfig);
27
+ updateConfig(patch: Partial<PopoverControllerConfig>): void;
28
+ sync(): void;
29
+ contains(node: Node | null): boolean;
30
+ getFloatingElement(): HTMLElement | null;
31
+ teardown(): void;
32
+ destroy(): void;
33
+ private resolveFloating;
34
+ private teardownFloating;
35
+ }