reke-ui 0.3.0 → 0.4.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 (262) hide show
  1. package/README.md +6 -0
  2. package/custom-elements.json +1888 -445
  3. package/dist/_virtual/_rolldown/runtime.js +11 -0
  4. package/dist/components/reke-chip/reke-chip.d.ts +7 -0
  5. package/dist/components/reke-chip/reke-chip.d.ts.map +1 -1
  6. package/dist/components/reke-chip/reke-chip.js +8 -2
  7. package/dist/components/reke-chip/reke-chip.styles.d.ts.map +1 -1
  8. package/dist/components/reke-chip/reke-chip.styles.js +32 -0
  9. package/dist/components/reke-combobox/reke-combobox.d.ts +21 -1
  10. package/dist/components/reke-combobox/reke-combobox.d.ts.map +1 -1
  11. package/dist/components/reke-combobox/reke-combobox.js +76 -16
  12. package/dist/components/reke-combobox/reke-combobox.styles.d.ts.map +1 -1
  13. package/dist/components/reke-combobox/reke-combobox.styles.js +128 -0
  14. package/dist/components/reke-input/reke-input.d.ts +14 -0
  15. package/dist/components/reke-input/reke-input.d.ts.map +1 -1
  16. package/dist/components/reke-input/reke-input.js +41 -22
  17. package/dist/components/reke-input/reke-input.styles.d.ts.map +1 -1
  18. package/dist/components/reke-input/reke-input.styles.js +44 -16
  19. package/dist/components/reke-menu/reke-menu.d.ts +51 -0
  20. package/dist/components/reke-menu/reke-menu.d.ts.map +1 -0
  21. package/dist/components/reke-menu/reke-menu.js +106 -0
  22. package/dist/components/reke-menu/reke-menu.styles.d.ts +2 -0
  23. package/dist/components/reke-menu/reke-menu.styles.d.ts.map +1 -0
  24. package/dist/components/reke-menu/reke-menu.styles.js +25 -0
  25. package/dist/components/reke-menu-item/reke-menu-item.d.ts +32 -0
  26. package/dist/components/reke-menu-item/reke-menu-item.d.ts.map +1 -0
  27. package/dist/components/reke-menu-item/reke-menu-item.js +49 -0
  28. package/dist/components/reke-menu-item/reke-menu-item.styles.d.ts +2 -0
  29. package/dist/components/reke-menu-item/reke-menu-item.styles.d.ts.map +1 -0
  30. package/dist/components/reke-menu-item/reke-menu-item.styles.js +53 -0
  31. package/dist/components/reke-pie-chart/reke-pie-chart.d.ts +59 -0
  32. package/dist/components/reke-pie-chart/reke-pie-chart.d.ts.map +1 -0
  33. package/dist/components/reke-pie-chart/reke-pie-chart.js +117 -0
  34. package/dist/components/reke-pie-chart/reke-pie-chart.styles.d.ts +2 -0
  35. package/dist/components/reke-pie-chart/reke-pie-chart.styles.d.ts.map +1 -0
  36. package/dist/components/reke-pie-chart/reke-pie-chart.styles.js +28 -0
  37. package/dist/components/reke-table/reke-table.d.ts +202 -3
  38. package/dist/components/reke-table/reke-table.d.ts.map +1 -1
  39. package/dist/components/reke-table/reke-table.js +244 -64
  40. package/dist/components/reke-table/reke-table.styles.d.ts.map +1 -1
  41. package/dist/components/reke-table/reke-table.styles.js +29 -0
  42. package/dist/index.d.ts +5 -0
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +10 -7
  45. package/dist/node_modules/echarts/lib/animation/basicTransition.js +70 -0
  46. package/dist/node_modules/echarts/lib/chart/custom/customSeriesRegister.js +7 -0
  47. package/dist/node_modules/echarts/lib/chart/helper/createRenderPlanner.js +11 -0
  48. package/dist/node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js +11 -0
  49. package/dist/node_modules/echarts/lib/chart/helper/sectorHelper.js +19 -0
  50. package/dist/node_modules/echarts/lib/chart/pie/PieSeries.js +112 -0
  51. package/dist/node_modules/echarts/lib/chart/pie/PieView.js +119 -0
  52. package/dist/node_modules/echarts/lib/chart/pie/install.js +12 -0
  53. package/dist/node_modules/echarts/lib/chart/pie/labelLayout.js +190 -0
  54. package/dist/node_modules/echarts/lib/chart/pie/pieLayout.js +72 -0
  55. package/dist/node_modules/echarts/lib/component/axis/AxisBuilder.js +554 -0
  56. package/dist/node_modules/echarts/lib/component/axis/AxisView.js +36 -0
  57. package/dist/node_modules/echarts/lib/component/axis/axisAction.js +4 -0
  58. package/dist/node_modules/echarts/lib/component/axis/axisBreakHelper.js +5 -0
  59. package/dist/node_modules/echarts/lib/component/axisPointer/AxisPointerModel.js +57 -0
  60. package/dist/node_modules/echarts/lib/component/axisPointer/AxisPointerView.js +28 -0
  61. package/dist/node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js +174 -0
  62. package/dist/node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js +65 -0
  63. package/dist/node_modules/echarts/lib/component/axisPointer/axisTrigger.js +189 -0
  64. package/dist/node_modules/echarts/lib/component/axisPointer/findPointFromSeries.js +27 -0
  65. package/dist/node_modules/echarts/lib/component/axisPointer/globalListener.js +56 -0
  66. package/dist/node_modules/echarts/lib/component/axisPointer/install.js +25 -0
  67. package/dist/node_modules/echarts/lib/component/axisPointer/modelHelper.js +117 -0
  68. package/dist/node_modules/echarts/lib/component/axisPointer/viewHelper.js +103 -0
  69. package/dist/node_modules/echarts/lib/component/helper/listComponent.js +20 -0
  70. package/dist/node_modules/echarts/lib/component/legend/LegendModel.js +184 -0
  71. package/dist/node_modules/echarts/lib/component/legend/LegendView.js +227 -0
  72. package/dist/node_modules/echarts/lib/component/legend/ScrollableLegendModel.js +45 -0
  73. package/dist/node_modules/echarts/lib/component/legend/ScrollableLegendView.js +145 -0
  74. package/dist/node_modules/echarts/lib/component/legend/install.js +9 -0
  75. package/dist/node_modules/echarts/lib/component/legend/installLegendPlain.js +12 -0
  76. package/dist/node_modules/echarts/lib/component/legend/installLegendScroll.js +11 -0
  77. package/dist/node_modules/echarts/lib/component/legend/legendAction.js +38 -0
  78. package/dist/node_modules/echarts/lib/component/legend/legendFilter.js +12 -0
  79. package/dist/node_modules/echarts/lib/component/legend/scrollableLegendAction.js +15 -0
  80. package/dist/node_modules/echarts/lib/component/tooltip/TooltipHTMLContent.js +170 -0
  81. package/dist/node_modules/echarts/lib/component/tooltip/TooltipModel.js +55 -0
  82. package/dist/node_modules/echarts/lib/component/tooltip/TooltipRichContent.js +102 -0
  83. package/dist/node_modules/echarts/lib/component/tooltip/TooltipView.js +367 -0
  84. package/dist/node_modules/echarts/lib/component/tooltip/helper.js +37 -0
  85. package/dist/node_modules/echarts/lib/component/tooltip/install.js +19 -0
  86. package/dist/node_modules/echarts/lib/component/tooltip/seriesFormatTooltip.js +56 -0
  87. package/dist/node_modules/echarts/lib/component/tooltip/tooltipMarkup.js +173 -0
  88. package/dist/node_modules/echarts/lib/coord/axisBand.js +31 -0
  89. package/dist/node_modules/echarts/lib/coord/axisHelper.js +21 -0
  90. package/dist/node_modules/echarts/lib/coord/axisStatistics.js +38 -0
  91. package/dist/node_modules/echarts/lib/coord/axisTickLabelBuilder.js +14 -0
  92. package/dist/node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js +31 -0
  93. package/dist/node_modules/echarts/lib/core/CoordinateSystem.js +50 -0
  94. package/dist/node_modules/echarts/lib/core/ExtensionAPI.js +32 -0
  95. package/dist/node_modules/echarts/lib/core/Scheduler.js +203 -0
  96. package/dist/node_modules/echarts/lib/core/echarts.js +986 -0
  97. package/dist/node_modules/echarts/lib/core/impl.js +11 -0
  98. package/dist/node_modules/echarts/lib/core/lifecycle.js +5 -0
  99. package/dist/node_modules/echarts/lib/core/locale.js +27 -0
  100. package/dist/node_modules/echarts/lib/core/task.js +81 -0
  101. package/dist/node_modules/echarts/lib/data/DataDiffer.js +68 -0
  102. package/dist/node_modules/echarts/lib/data/DataStore.js +359 -0
  103. package/dist/node_modules/echarts/lib/data/SeriesData.js +328 -0
  104. package/dist/node_modules/echarts/lib/data/SeriesDimensionDefine.js +10 -0
  105. package/dist/node_modules/echarts/lib/data/Source.js +132 -0
  106. package/dist/node_modules/echarts/lib/data/helper/SeriesDataSchema.js +80 -0
  107. package/dist/node_modules/echarts/lib/data/helper/createDimensions.js +105 -0
  108. package/dist/node_modules/echarts/lib/data/helper/dataProvider.js +155 -0
  109. package/dist/node_modules/echarts/lib/data/helper/dataValueHelper.js +87 -0
  110. package/dist/node_modules/echarts/lib/data/helper/dimensionHelper.js +50 -0
  111. package/dist/node_modules/echarts/lib/data/helper/sourceHelper.js +98 -0
  112. package/dist/node_modules/echarts/lib/data/helper/sourceManager.js +115 -0
  113. package/dist/node_modules/echarts/lib/data/helper/transform.js +145 -0
  114. package/dist/node_modules/echarts/lib/extension.js +62 -0
  115. package/dist/node_modules/echarts/lib/i18n/langEN.js +148 -0
  116. package/dist/node_modules/echarts/lib/i18n/langZH.js +148 -0
  117. package/dist/node_modules/echarts/lib/label/labelGuideHelper.js +106 -0
  118. package/dist/node_modules/echarts/lib/label/labelLayoutHelper.js +152 -0
  119. package/dist/node_modules/echarts/lib/label/labelStyle.js +190 -0
  120. package/dist/node_modules/echarts/lib/legacy/dataSelectAction.js +53 -0
  121. package/dist/node_modules/echarts/lib/loading/default.js +85 -0
  122. package/dist/node_modules/echarts/lib/model/Component.js +64 -0
  123. package/dist/node_modules/echarts/lib/model/Global.js +320 -0
  124. package/dist/node_modules/echarts/lib/model/Model.js +50 -0
  125. package/dist/node_modules/echarts/lib/model/OptionManager.js +78 -0
  126. package/dist/node_modules/echarts/lib/model/Series.js +216 -0
  127. package/dist/node_modules/echarts/lib/model/globalDefault.js +94 -0
  128. package/dist/node_modules/echarts/lib/model/internalComponentCreator.js +14 -0
  129. package/dist/node_modules/echarts/lib/model/mixin/areaStyle.js +16 -0
  130. package/dist/node_modules/echarts/lib/model/mixin/dataFormat.js +63 -0
  131. package/dist/node_modules/echarts/lib/model/mixin/itemStyle.js +24 -0
  132. package/dist/node_modules/echarts/lib/model/mixin/lineStyle.js +23 -0
  133. package/dist/node_modules/echarts/lib/model/mixin/makeStyleMapper.js +17 -0
  134. package/dist/node_modules/echarts/lib/model/mixin/palette.js +32 -0
  135. package/dist/node_modules/echarts/lib/model/mixin/textStyle.js +36 -0
  136. package/dist/node_modules/echarts/lib/preprocessor/backwardCompat.js +89 -0
  137. package/dist/node_modules/echarts/lib/preprocessor/helper/compatStyle.js +118 -0
  138. package/dist/node_modules/echarts/lib/processor/dataFilter.js +18 -0
  139. package/dist/node_modules/echarts/lib/processor/dataStack.js +52 -0
  140. package/dist/node_modules/echarts/lib/processor/negativeDataFilter.js +16 -0
  141. package/dist/node_modules/echarts/lib/renderer/installCanvasRenderer.js +7 -0
  142. package/dist/node_modules/echarts/lib/scale/break.js +9 -0
  143. package/dist/node_modules/echarts/lib/scale/helper.js +9 -0
  144. package/dist/node_modules/echarts/lib/scale/scaleMapper.js +26 -0
  145. package/dist/node_modules/echarts/lib/theme/dark.js +159 -0
  146. package/dist/node_modules/echarts/lib/util/ECEventProcessor.js +52 -0
  147. package/dist/node_modules/echarts/lib/util/clazz.js +99 -0
  148. package/dist/node_modules/echarts/lib/util/component.js +75 -0
  149. package/dist/node_modules/echarts/lib/util/cycleCache.js +14 -0
  150. package/dist/node_modules/echarts/lib/util/decal.js +162 -0
  151. package/dist/node_modules/echarts/lib/util/event.js +7 -0
  152. package/dist/node_modules/echarts/lib/util/format.js +87 -0
  153. package/dist/node_modules/echarts/lib/util/graphic.js +361 -0
  154. package/dist/node_modules/echarts/lib/util/innerStore.js +13 -0
  155. package/dist/node_modules/echarts/lib/util/layout.js +174 -0
  156. package/dist/node_modules/echarts/lib/util/log.js +54 -0
  157. package/dist/node_modules/echarts/lib/util/model.js +296 -0
  158. package/dist/node_modules/echarts/lib/util/number.js +132 -0
  159. package/dist/node_modules/echarts/lib/util/states.js +323 -0
  160. package/dist/node_modules/echarts/lib/util/symbol.js +146 -0
  161. package/dist/node_modules/echarts/lib/util/throttle.js +37 -0
  162. package/dist/node_modules/echarts/lib/util/time.js +43 -0
  163. package/dist/node_modules/echarts/lib/util/types.js +13 -0
  164. package/dist/node_modules/echarts/lib/view/Chart.js +81 -0
  165. package/dist/node_modules/echarts/lib/view/Component.js +16 -0
  166. package/dist/node_modules/echarts/lib/visual/LegendVisualProvider.js +18 -0
  167. package/dist/node_modules/echarts/lib/visual/decal.js +25 -0
  168. package/dist/node_modules/echarts/lib/visual/helper.js +23 -0
  169. package/dist/node_modules/echarts/lib/visual/style.js +79 -0
  170. package/dist/node_modules/echarts/lib/visual/symbol.js +47 -0
  171. package/dist/node_modules/echarts/lib/visual/tokens.js +108 -0
  172. package/dist/node_modules/echarts/node_modules/tslib/tslib.es6.js +18 -0
  173. package/dist/node_modules/zrender/lib/Element.js +442 -0
  174. package/dist/node_modules/zrender/lib/Handler.js +167 -0
  175. package/dist/node_modules/zrender/lib/Storage.js +68 -0
  176. package/dist/node_modules/zrender/lib/animation/Animation.js +65 -0
  177. package/dist/node_modules/zrender/lib/animation/Animator.js +348 -0
  178. package/dist/node_modules/zrender/lib/animation/Clip.js +31 -0
  179. package/dist/node_modules/zrender/lib/animation/cubicEasing.js +17 -0
  180. package/dist/node_modules/zrender/lib/animation/easing.js +104 -0
  181. package/dist/node_modules/zrender/lib/animation/requestAnimationFrame.js +7 -0
  182. package/dist/node_modules/zrender/lib/canvas/Layer.js +135 -0
  183. package/dist/node_modules/zrender/lib/canvas/Painter.js +352 -0
  184. package/dist/node_modules/zrender/lib/canvas/dashStyle.js +17 -0
  185. package/dist/node_modules/zrender/lib/canvas/graphic.js +199 -0
  186. package/dist/node_modules/zrender/lib/canvas/helper.js +33 -0
  187. package/dist/node_modules/zrender/lib/config.js +7 -0
  188. package/dist/node_modules/zrender/lib/contain/arc.js +20 -0
  189. package/dist/node_modules/zrender/lib/contain/cubic.js +9 -0
  190. package/dist/node_modules/zrender/lib/contain/line.js +12 -0
  191. package/dist/node_modules/zrender/lib/contain/path.js +133 -0
  192. package/dist/node_modules/zrender/lib/contain/quadratic.js +9 -0
  193. package/dist/node_modules/zrender/lib/contain/text.js +106 -0
  194. package/dist/node_modules/zrender/lib/contain/util.js +7 -0
  195. package/dist/node_modules/zrender/lib/contain/windingLine.js +10 -0
  196. package/dist/node_modules/zrender/lib/core/BoundingRect.js +111 -0
  197. package/dist/node_modules/zrender/lib/core/Eventful.js +82 -0
  198. package/dist/node_modules/zrender/lib/core/GestureMgr.js +56 -0
  199. package/dist/node_modules/zrender/lib/core/LRU.js +49 -0
  200. package/dist/node_modules/zrender/lib/core/OrientedBoundingRect.js +41 -0
  201. package/dist/node_modules/zrender/lib/core/PathProxy.js +288 -0
  202. package/dist/node_modules/zrender/lib/core/Point.js +72 -0
  203. package/dist/node_modules/zrender/lib/core/Transformable.js +96 -0
  204. package/dist/node_modules/zrender/lib/core/WeakMap.js +25 -0
  205. package/dist/node_modules/zrender/lib/core/bbox.js +40 -0
  206. package/dist/node_modules/zrender/lib/core/curve.js +142 -0
  207. package/dist/node_modules/zrender/lib/core/dom.js +74 -0
  208. package/dist/node_modules/zrender/lib/core/env.js +22 -0
  209. package/dist/node_modules/zrender/lib/core/event.js +58 -0
  210. package/dist/node_modules/zrender/lib/core/fourPointsTransform.js +109 -0
  211. package/dist/node_modules/zrender/lib/core/matrix.js +39 -0
  212. package/dist/node_modules/zrender/lib/core/platform.js +42 -0
  213. package/dist/node_modules/zrender/lib/core/timsort.js +246 -0
  214. package/dist/node_modules/zrender/lib/core/util.js +314 -0
  215. package/dist/node_modules/zrender/lib/core/vector.js +52 -0
  216. package/dist/node_modules/zrender/lib/dom/HandlerProxy.js +190 -0
  217. package/dist/node_modules/zrender/lib/graphic/CompoundPath.js +25 -0
  218. package/dist/node_modules/zrender/lib/graphic/Displayable.js +133 -0
  219. package/dist/node_modules/zrender/lib/graphic/Gradient.js +14 -0
  220. package/dist/node_modules/zrender/lib/graphic/Group.js +86 -0
  221. package/dist/node_modules/zrender/lib/graphic/Image.js +49 -0
  222. package/dist/node_modules/zrender/lib/graphic/IncrementalDisplayable.js +65 -0
  223. package/dist/node_modules/zrender/lib/graphic/LinearGradient.js +13 -0
  224. package/dist/node_modules/zrender/lib/graphic/Path.js +200 -0
  225. package/dist/node_modules/zrender/lib/graphic/RadialGradient.js +13 -0
  226. package/dist/node_modules/zrender/lib/graphic/TSpan.js +39 -0
  227. package/dist/node_modules/zrender/lib/graphic/Text.js +216 -0
  228. package/dist/node_modules/zrender/lib/graphic/helper/image.js +39 -0
  229. package/dist/node_modules/zrender/lib/graphic/helper/parseText.js +226 -0
  230. package/dist/node_modules/zrender/lib/graphic/helper/poly.js +21 -0
  231. package/dist/node_modules/zrender/lib/graphic/helper/roundRect.js +9 -0
  232. package/dist/node_modules/zrender/lib/graphic/helper/roundSector.js +85 -0
  233. package/dist/node_modules/zrender/lib/graphic/helper/smoothBezier.js +26 -0
  234. package/dist/node_modules/zrender/lib/graphic/helper/subPixelOptimize.js +25 -0
  235. package/dist/node_modules/zrender/lib/graphic/shape/Arc.js +28 -0
  236. package/dist/node_modules/zrender/lib/graphic/shape/BezierCurve.js +40 -0
  237. package/dist/node_modules/zrender/lib/graphic/shape/Circle.js +22 -0
  238. package/dist/node_modules/zrender/lib/graphic/shape/Ellipse.js +23 -0
  239. package/dist/node_modules/zrender/lib/graphic/shape/Line.js +37 -0
  240. package/dist/node_modules/zrender/lib/graphic/shape/Polygon.js +23 -0
  241. package/dist/node_modules/zrender/lib/graphic/shape/Polyline.js +28 -0
  242. package/dist/node_modules/zrender/lib/graphic/shape/Rect.js +31 -0
  243. package/dist/node_modules/zrender/lib/graphic/shape/Ring.js +23 -0
  244. package/dist/node_modules/zrender/lib/graphic/shape/Sector.js +25 -0
  245. package/dist/node_modules/zrender/lib/mixin/Draggable.js +28 -0
  246. package/dist/node_modules/zrender/lib/svg/helper.js +19 -0
  247. package/dist/node_modules/zrender/lib/tool/color.js +1039 -0
  248. package/dist/node_modules/zrender/lib/tool/path.js +153 -0
  249. package/dist/node_modules/zrender/lib/tool/transformPath.js +41 -0
  250. package/dist/node_modules/zrender/lib/zrender.js +124 -0
  251. package/dist/node_modules/zrender/node_modules/tslib/tslib.es6.js +18 -0
  252. package/dist/react-bridge/table.d.ts.map +1 -1
  253. package/dist/react-bridge/table.js +36 -21
  254. package/dist/react.d.ts +8 -0
  255. package/dist/react.d.ts.map +1 -1
  256. package/dist/react.js +58 -46
  257. package/dist/shared/base-element.d.ts +1 -0
  258. package/dist/shared/base-element.d.ts.map +1 -1
  259. package/dist/shared/base-element.js +6 -0
  260. package/dist/shared/tailwind.js +1 -1
  261. package/dist/tokens/reke-tokens.css +15 -0
  262. package/package.json +15 -1
@@ -0,0 +1,11 @@
1
+ //#region \0rolldown/runtime.js
2
+ var e = Object.defineProperty, t = (t, n) => {
3
+ let r = {};
4
+ for (var i in t) e(r, i, {
5
+ get: t[i],
6
+ enumerable: !0
7
+ });
8
+ return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
9
+ };
10
+ //#endregion
11
+ export { t as __exportAll };
@@ -5,11 +5,15 @@ export type ChipColor = 'primary' | 'secondary' | 'danger' | 'warning';
5
5
  * @summary A toggleable chip/pill component for filters, tags, and selections.
6
6
  *
7
7
  * @slot - Default slot for chip label text.
8
+ * @slot prefix - Content rendered before the label (e.g. `<img>`, `<svg>`).
8
9
  *
9
10
  * @fires reke-click - Fired when the chip body is clicked.
10
11
  * @fires reke-dismiss - Fired when the dismiss button is clicked.
11
12
  *
13
+ * @property dismissLabel - Accessible label for the dismiss button (default `'Dismiss'`).
14
+ *
12
15
  * @csspart chip - The outer chip container.
16
+ * @csspart chip-prefix - The prefix container element.
13
17
  * @csspart dismiss - The dismiss button element.
14
18
  *
15
19
  * @cssprop [--reke-color-primary=#22C55E] - Active color for primary variant.
@@ -19,6 +23,7 @@ export type ChipColor = 'primary' | 'secondary' | 'danger' | 'warning';
19
23
  * @cssprop [--reke-color-border-subtle=#1F1F1F] - Inactive border color.
20
24
  * @cssprop [--reke-color-text-muted=#525252] - Inactive text color.
21
25
  * @cssprop [--reke-radius=4px] - Chip border radius.
26
+ * @cssprop [--reke-chip-prefix-size=16px] - Prefix container size.
22
27
  */
23
28
  export declare class RekeChip extends RekeElement {
24
29
  static styles: import("lit").CSSResult[];
@@ -28,6 +33,8 @@ export declare class RekeChip extends RekeElement {
28
33
  active: boolean;
29
34
  /** Shows a dismiss (×) button. */
30
35
  dismissible: boolean;
36
+ /** Accessible label for the dismiss button. Defaults to 'Dismiss'. */
37
+ dismissLabel: string;
31
38
  disabled: boolean;
32
39
  private _handleClick;
33
40
  private _handleDismiss;
@@ -1 +1 @@
1
- {"version":3,"file":"reke-chip.d.ts","sourceRoot":"","sources":["../../../src/components/reke-chip/reke-chip.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEvE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBACa,QAAS,SAAQ,WAAW;IACvC,OAAgB,MAAM,4BAAU;IAEhC,wCAAwC;IAExC,KAAK,EAAE,SAAS,CAAa;IAE7B,wDAAwD;IAExD,MAAM,UAAS;IAEf,kCAAkC;IAElC,WAAW,UAAS;IAGpB,QAAQ,UAAS;IAEjB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,cAAc;IAMb,MAAM;CAmChB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
1
+ {"version":3,"file":"reke-chip.d.ts","sourceRoot":"","sources":["../../../src/components/reke-chip/reke-chip.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEvE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBACa,QAAS,SAAQ,WAAW;IACvC,OAAgB,MAAM,4BAAU;IAEhC,wCAAwC;IAExC,KAAK,EAAE,SAAS,CAAa;IAE7B,wDAAwD;IAExD,MAAM,UAAS;IAEf,kCAAkC;IAElC,WAAW,UAAS;IAEpB,sEAAsE;IAEtE,YAAY,SAAa;IAGzB,QAAQ,UAAS;IAEjB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,cAAc;IAMb,MAAM;CAsChB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
@@ -7,7 +7,7 @@ import { classMap as s } from "lit/directives/class-map.js";
7
7
  //#region src/components/reke-chip/reke-chip.ts
8
8
  var c = class extends e {
9
9
  constructor(...e) {
10
- super(...e), this.color = "primary", this.active = !1, this.dismissible = !1, this.disabled = !1;
10
+ super(...e), this.color = "primary", this.active = !1, this.dismissible = !1, this.dismissLabel = "Dismiss", this.disabled = !1;
11
11
  }
12
12
  static {
13
13
  this.styles = n;
@@ -32,13 +32,16 @@ var c = class extends e {
32
32
  aria-pressed=${this.active}
33
33
  @click=${this._handleClick}
34
34
  >
35
+ <span part="chip-prefix" class="chip__prefix">
36
+ <slot name="prefix"></slot>
37
+ </span>
35
38
  <slot></slot>
36
39
  ${this.dismissible ? r`
37
40
  <span
38
41
  part="dismiss"
39
42
  class="chip__dismiss"
40
43
  role="button"
41
- aria-label="Dismiss"
44
+ aria-label=${this.dismissLabel}
42
45
  @click=${this._handleDismiss}
43
46
  >
44
47
  <svg viewBox="0 0 24 24" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
@@ -55,6 +58,9 @@ t([o({ reflect: !0 })], c.prototype, "color", void 0), t([o({
55
58
  type: Boolean,
56
59
  reflect: !0
57
60
  })], c.prototype, "dismissible", void 0), t([o({
61
+ type: String,
62
+ attribute: "dismiss-label"
63
+ })], c.prototype, "dismissLabel", void 0), t([o({
58
64
  type: Boolean,
59
65
  reflect: !0
60
66
  })], c.prototype, "disabled", void 0), c = t([a("reke-chip")], c);
@@ -1 +1 @@
1
- {"version":3,"file":"reke-chip.styles.d.ts","sourceRoot":"","sources":["../../../src/components/reke-chip/reke-chip.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,2BA6HlB,CAAC"}
1
+ {"version":3,"file":"reke-chip.styles.d.ts","sourceRoot":"","sources":["../../../src/components/reke-chip/reke-chip.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,2BA6JlB,CAAC"}
@@ -123,6 +123,38 @@ var n = [e, t`
123
123
  stroke-linecap: round;
124
124
  fill: none;
125
125
  }
126
+
127
+ /* === Prefix slot === */
128
+
129
+ .chip__prefix {
130
+ display: inline-flex;
131
+ align-items: center;
132
+ justify-content: center;
133
+ width: var(--reke-chip-prefix-size, 16px);
134
+ height: var(--reke-chip-prefix-size, 16px);
135
+ flex-shrink: 0;
136
+ border-radius: var(--reke-radius, 4px);
137
+ overflow: hidden;
138
+ }
139
+
140
+ /* Hide the prefix wrapper when no light-DOM content is slotted — keeps the gap correct. */
141
+ .chip__prefix:has(> slot:empty) {
142
+ width: 0;
143
+ height: 0;
144
+ margin: 0;
145
+ padding: 0;
146
+ border: none;
147
+ overflow: hidden;
148
+ }
149
+ .chip:has(.chip__prefix:has(> slot:empty)) {
150
+ gap: 0;
151
+ }
152
+
153
+ .chip__prefix ::slotted(img) {
154
+ object-fit: contain;
155
+ width: 100%;
156
+ height: 100%;
157
+ }
126
158
  `];
127
159
  //#endregion
128
160
  export { n as styles };
@@ -1,4 +1,5 @@
1
1
  import { RekeElement } from '../../shared/base-element.js';
2
+ import '../reke-chip/reke-chip.js';
2
3
  export type ComboboxSize = 'sm' | 'md' | 'lg';
3
4
  export interface ComboboxOption {
4
5
  value: string;
@@ -12,13 +13,16 @@ export interface ComboboxOption {
12
13
  * keyboard. Unlike `reke-select`, it exposes a text query and is meant for long
13
14
  * option lists.
14
15
  *
15
- * @fires reke-change - Fired when an option is selected. Detail: `{ value: string }`.
16
+ * @fires reke-change - Fired when the selection changes. Detail: `{ value: string }`
17
+ * in single mode, `{ values: string[] }` when `multiple` is set.
16
18
  * @fires reke-search - Fired when the query changes (for remote filtering). Detail: `{ query: string }`.
17
19
  *
18
20
  * @csspart input - The text input element.
19
21
  * @csspart dropdown - The dropdown list container.
20
22
  * @csspart option - Each option row.
21
23
  * @csspart empty - The "no results" row.
24
+ * @csspart chip - Each chip inside the control (tags mode).
25
+ * @csspart chip-prefix - The prefix image/icon inside a chip.
22
26
  *
23
27
  * @cssprop [--reke-color-primary=#22C55E] - Focus ring and active/selected option color.
24
28
  * @cssprop [--reke-color-surface=#1A1A1A] - Input and dropdown background.
@@ -28,12 +32,20 @@ export interface ComboboxOption {
28
32
  * @cssprop [--reke-color-text=#E5E5E5] - Text color.
29
33
  * @cssprop [--reke-color-text-muted=#525252] - Placeholder / empty color.
30
34
  * @cssprop [--reke-color-text-label=#8A8A8A] - Label color.
35
+ * @cssprop [--reke-animation-flash=250ms] - Option flash animation duration.
36
+ * @cssprop [--reke-animation-scale-in=200ms] - Chip scale-in animation duration.
31
37
  */
32
38
  export declare class RekeCombobox extends RekeElement {
33
39
  static styles: import("lit").CSSResult[];
34
40
  value: string;
35
41
  placeholder: string;
36
42
  options: ComboboxOption[];
43
+ /** Enables multi-selection. In this mode use `values` instead of `value`. */
44
+ multiple: boolean;
45
+ /** Render selected values as dismissible chips inside the control. Ignored unless `multiple`. */
46
+ tags: boolean;
47
+ /** Selected values when `multiple` is set. */
48
+ values: string[];
37
49
  disabled: boolean;
38
50
  error: boolean;
39
51
  label: string;
@@ -42,6 +54,8 @@ export declare class RekeCombobox extends RekeElement {
42
54
  private _open;
43
55
  private _query;
44
56
  private _activeIndex;
57
+ private _flashValue;
58
+ private _scaleInValues;
45
59
  /** Inline `position: fixed` coords so the dropdown escapes any ancestor
46
60
  * `overflow: hidden` (cards, table cells, etc.). */
47
61
  private _dropdownStyle;
@@ -54,10 +68,16 @@ export declare class RekeCombobox extends RekeElement {
54
68
  private removePositionListeners;
55
69
  private handleOutsideClick;
56
70
  private get selectedLabel();
71
+ /** Comma-joined labels of the current multi-selection (empty if none). */
72
+ private get selectedSummary();
73
+ private isSelected;
57
74
  private get filteredOptions();
58
75
  private open;
59
76
  private close;
60
77
  private selectOption;
78
+ /** Tags mode: clicking anywhere in the control focuses the input. */
79
+ private handleControlClick;
80
+ private handleChipDismiss;
61
81
  private handleInput;
62
82
  private handleKeyDown;
63
83
  render(): import("lit-html").TemplateResult<1>;
@@ -1 +1 @@
1
- {"version":3,"file":"reke-combobox.d.ts","sourceRoot":"","sources":["../../../src/components/reke-combobox/reke-combobox.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBACa,YAAa,SAAQ,WAAW;IAC3C,OAAgB,MAAM,4BAAU;IAGhC,KAAK,SAAM;IAGX,WAAW,SAAe;IAG1B,OAAO,EAAE,cAAc,EAAE,CAAM;IAG/B,QAAQ,UAAS;IAGjB,KAAK,UAAS;IAGd,KAAK,SAAM;IAGX,SAAS,SAAoB;IAG7B,IAAI,EAAE,YAAY,CAAQ;IAG1B,OAAO,CAAC,KAAK,CAAS;IAGtB,OAAO,CAAC,MAAM,CAAM;IAGpB,OAAO,CAAC,YAAY,CAAK;IAEzB;wDACoD;IAEpD,OAAO,CAAC,cAAc,CAAM;IAE5B,OAAO,CAAC,wBAAwB,CAAsC;IACtE,OAAO,CAAC,gBAAgB,CAA+B;IAE9C,iBAAiB;IAKjB,oBAAoB;IAM7B,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,uBAAuB;IAK/B,OAAO,CAAC,kBAAkB;IAM1B,OAAO,KAAK,aAAa,GAExB;IAED,OAAO,KAAK,eAAe,GAM1B;IAED,OAAO,CAAC,IAAI;IASZ,OAAO,CAAC,KAAK;IAMb,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,aAAa;IA4BZ,MAAM;CAmFhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
1
+ {"version":3,"file":"reke-combobox.d.ts","sourceRoot":"","sources":["../../../src/components/reke-combobox/reke-combobox.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,2BAA2B,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBACa,YAAa,SAAQ,WAAW;IAC3C,OAAgB,MAAM,4BAAU;IAGhC,KAAK,SAAM;IAGX,WAAW,SAAe;IAG1B,OAAO,EAAE,cAAc,EAAE,CAAM;IAE/B,6EAA6E;IAE7E,QAAQ,UAAS;IAEjB,iGAAiG;IAEjG,IAAI,UAAS;IAEb,8CAA8C;IAE9C,MAAM,EAAE,MAAM,EAAE,CAAM;IAGtB,QAAQ,UAAS;IAGjB,KAAK,UAAS;IAGd,KAAK,SAAM;IAGX,SAAS,SAAoB;IAG7B,IAAI,EAAE,YAAY,CAAQ;IAG1B,OAAO,CAAC,KAAK,CAAS;IAGtB,OAAO,CAAC,MAAM,CAAM;IAGpB,OAAO,CAAC,YAAY,CAAK;IAGzB,OAAO,CAAC,WAAW,CAAM;IAGzB,OAAO,CAAC,cAAc,CAAgB;IAEtC;wDACoD;IAEpD,OAAO,CAAC,cAAc,CAAM;IAE5B,OAAO,CAAC,wBAAwB,CAAsC;IACtE,OAAO,CAAC,gBAAgB,CAA+B;IAE9C,iBAAiB;IAKjB,oBAAoB;IAM7B,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,uBAAuB;IAK/B,OAAO,CAAC,kBAAkB;IAM1B,OAAO,KAAK,aAAa,GAExB;IAED,0EAA0E;IAC1E,OAAO,KAAK,eAAe,GAK1B;IAED,OAAO,CAAC,UAAU;IAIlB,OAAO,KAAK,eAAe,GAU1B;IAED,OAAO,CAAC,IAAI;IASZ,OAAO,CAAC,KAAK;IAMb,OAAO,CAAC,YAAY;IA6BpB,qEAAqE;IACrE,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,aAAa;IAkCZ,MAAM;CA6IhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
@@ -1,5 +1,6 @@
1
1
  import { RekeElement as e } from "../../shared/base-element.js";
2
2
  import { __decorate as t } from "../../_virtual/_@oxc-project_runtime@0.137.0/helpers/esm/decorate.js";
3
+ import "../reke-chip/reke-chip.js";
3
4
  import { styles as n } from "./reke-combobox.styles.js";
4
5
  import { html as r, nothing as i } from "lit";
5
6
  import { customElement as a, property as o, state as s } from "lit/decorators.js";
@@ -7,7 +8,7 @@ import { classMap as c } from "lit/directives/class-map.js";
7
8
  //#region src/components/reke-combobox/reke-combobox.ts
8
9
  var l = class extends e {
9
10
  constructor(...e) {
10
- super(...e), this.value = "", this.placeholder = "Buscar...", this.options = [], this.disabled = !1, this.error = !1, this.label = "", this.emptyText = "Sin resultados", this.size = "md", this._open = !1, this._query = "", this._activeIndex = 0, this._dropdownStyle = "", this._boundHandleOutsideClick = this.handleOutsideClick.bind(this), this._boundReposition = () => this.updatePosition();
11
+ super(...e), this.value = "", this.placeholder = "Buscar...", this.options = [], this.multiple = !1, this.tags = !1, this.values = [], this.disabled = !1, this.error = !1, this.label = "", this.emptyText = "Sin resultados", this.size = "md", this._open = !1, this._query = "", this._activeIndex = 0, this._flashValue = "", this._scaleInValues = [], this._dropdownStyle = "", this._boundHandleOutsideClick = this.handleOutsideClick.bind(this), this._boundReposition = () => this.updatePosition();
11
12
  }
12
13
  static {
13
14
  this.styles = n;
@@ -36,9 +37,15 @@ var l = class extends e {
36
37
  get selectedLabel() {
37
38
  return this.options.find((e) => e.value === this.value)?.label ?? "";
38
39
  }
40
+ get selectedSummary() {
41
+ return this.options.filter((e) => this.values.includes(e.value)).map((e) => e.label).join(", ");
42
+ }
43
+ isSelected(e) {
44
+ return this.multiple ? this.values.includes(e.value) : e.value === this.value;
45
+ }
39
46
  get filteredOptions() {
40
- let e = this._query.trim().toLowerCase();
41
- return e === "" ? this.options : this.options.filter((t) => t.label.toLowerCase().includes(e) || t.value.toLowerCase().includes(e));
47
+ let e = this._query.trim().toLowerCase(), t = this.options;
48
+ return this.tags && this.multiple && (t = t.filter((e) => !this.values.includes(e.value))), e === "" ? t : t.filter((t) => t.label.toLowerCase().includes(e) || t.value.toLowerCase().includes(e));
42
49
  }
43
50
  open() {
44
51
  this.disabled || this._open || (this._open = !0, this._query = "", this._activeIndex = 0, this.addPositionListeners(), this.updateComplete.then(() => this.updatePosition()));
@@ -47,7 +54,24 @@ var l = class extends e {
47
54
  this._open = !1, this._query = "", this.removePositionListeners();
48
55
  }
49
56
  selectOption(e) {
50
- this.value = e.value, this.close(), this.emit("reke-change", { value: this.value });
57
+ if (this.multiple) {
58
+ let t = !this.values.includes(e.value);
59
+ this.values = t ? [...this.values, e.value] : this.values.filter((t) => t !== e.value), this._query = "", this._flashValue = e.value, t && this.tags && (this._scaleInValues = [...this._scaleInValues, e.value], setTimeout(() => {
60
+ this._scaleInValues = this._scaleInValues.filter((t) => t !== e.value);
61
+ }, 200)), setTimeout(() => {
62
+ this._flashValue === e.value && (this._flashValue = "");
63
+ }, 250), this.emit("reke-change", { values: this.values });
64
+ return;
65
+ }
66
+ this.value = e.value, this._flashValue = e.value, setTimeout(() => {
67
+ this._flashValue === e.value && (this._flashValue = "");
68
+ }, 250), this.close(), this.emit("reke-change", { value: this.value });
69
+ }
70
+ handleControlClick() {
71
+ (this.shadowRoot?.querySelector("input"))?.focus();
72
+ }
73
+ handleChipDismiss(e) {
74
+ this.disabled || (this.values = this.values.filter((t) => t !== e), this.emit("reke-change", { values: this.values }), (this.shadowRoot?.querySelector("input"))?.focus());
51
75
  }
52
76
  handleInput(e) {
53
77
  this._query = e.target.value, this._open = !0, this._activeIndex = 0, this.emit("reke-search", { query: this._query });
@@ -68,27 +92,54 @@ var l = class extends e {
68
92
  n && this.selectOption(n);
69
93
  break;
70
94
  }
95
+ case "Backspace":
96
+ this.tags && this.multiple && this._query === "" && this.values.length > 0 && (this.values = this.values.slice(0, -1), this.emit("reke-change", { values: this.values }));
97
+ break;
71
98
  case "Escape":
72
99
  this._open && (e.preventDefault(), this.close());
73
100
  break;
74
101
  }
75
102
  }
76
103
  render() {
77
- let e = this.filteredOptions, t = this._open ? this._query : this.selectedLabel, n = {
104
+ let e = this.filteredOptions, t = this.multiple ? this.selectedSummary : this.selectedLabel, n = this.multiple || this._open ? this._query : this.selectedLabel, a = this.tags && this.multiple, o = this.multiple && !a && this._query === "" && t !== "", s = this.multiple ? o ? "" : this.placeholder : t || this.placeholder, l = {
78
105
  input: !0,
79
106
  [`input--${this.size}`]: !0,
80
- "input--error": this.error
81
- };
107
+ "input--error": this.error,
108
+ "input--tags": a
109
+ }, u = {
110
+ control: !0,
111
+ "control--tags": a,
112
+ "control--error": a && this.error
113
+ }, d = this.values.map((e) => this.options.find((t) => t.value === e)).filter((e) => !!e);
82
114
  return r`
83
115
  ${this.label ? r`<label class="label">${this.label}</label>` : i}
84
- <div class="control">
116
+ <div
117
+ class=${c(u)}
118
+ @click=${a ? this.handleControlClick : i}
119
+ >
120
+ ${a ? d.map((e) => r`
121
+ <reke-chip
122
+ part="chip"
123
+ dismissible
124
+ active
125
+ color="primary"
126
+ tabindex="-1"
127
+ ?disabled=${this.disabled}
128
+ class="${this._scaleInValues.includes(e.value) ? "chip--scale-in" : ""}"
129
+ dismiss-label="Remove ${e.label}"
130
+ @reke-dismiss=${() => this.handleChipDismiss(e.value)}
131
+ >
132
+ ${e.image ? r`<img slot="prefix" src=${e.image} alt="" loading="lazy" />` : i}
133
+ ${e.label}
134
+ </reke-chip>
135
+ `) : i}
85
136
  <input
86
137
  part="input"
87
- class=${c(n)}
138
+ class=${c(l)}
88
139
  type="text"
89
140
  role="combobox"
90
- .value=${t}
91
- placeholder=${this.selectedLabel || this.placeholder}
141
+ .value=${n}
142
+ placeholder=${s}
92
143
  ?disabled=${this.disabled}
93
144
  autocomplete="off"
94
145
  aria-expanded=${this._open}
@@ -102,6 +153,7 @@ var l = class extends e {
102
153
  @keydown=${this.handleKeyDown}
103
154
  />
104
155
  <span class="chevron" aria-hidden="true">&#9660;</span>
156
+ ${o ? r`<span class="selected-summary selected-summary--${this.size}">${t}</span>` : i}
105
157
  </div>
106
158
  ${this._open ? r`
107
159
  <ul
@@ -109,6 +161,7 @@ var l = class extends e {
109
161
  id="reke-combobox-list"
110
162
  class="dropdown"
111
163
  role="listbox"
164
+ aria-multiselectable=${this.multiple ? "true" : i}
112
165
  style=${this._dropdownStyle}
113
166
  >
114
167
  ${e.length === 0 ? r`<li part="empty" class="empty">${this.emptyText}</li>` : e.map((e, t) => r`
@@ -117,17 +170,18 @@ var l = class extends e {
117
170
  id="reke-combobox-opt-${t}"
118
171
  class=${c({
119
172
  option: !0,
120
- "option--selected": e.value === this.value,
121
- "option--active": t === this._activeIndex
173
+ "option--selected": this.isSelected(e),
174
+ "option--active": t === this._activeIndex,
175
+ "option--flash": this._flashValue === e.value
122
176
  })}
123
177
  role="option"
124
- aria-selected=${e.value === this.value}
178
+ aria-selected=${this.isSelected(e)}
125
179
  @click=${() => this.selectOption(e)}
126
180
  @mousemove=${() => {
127
181
  this._activeIndex = t;
128
182
  }}
129
183
  >
130
- ${e.image ? r`<img class="option-img" src=${e.image} alt="" loading="lazy" />` : i}${e.label}
184
+ ${e.image ? r`<img class="option-img" src=${e.image} alt="" loading="lazy" />` : i}<span class="option-label">${e.label}</span>${this.multiple && this.isSelected(e) ? r`<span class="check" aria-hidden="true">&#10003;</span>` : i}
131
185
  </li>
132
186
  `)}
133
187
  </ul>
@@ -138,9 +192,15 @@ var l = class extends e {
138
192
  t([o()], l.prototype, "value", void 0), t([o()], l.prototype, "placeholder", void 0), t([o({ attribute: !1 })], l.prototype, "options", void 0), t([o({
139
193
  type: Boolean,
140
194
  reflect: !0
195
+ })], l.prototype, "multiple", void 0), t([o({
196
+ type: Boolean,
197
+ reflect: !0
198
+ })], l.prototype, "tags", void 0), t([o({ attribute: !1 })], l.prototype, "values", void 0), t([o({
199
+ type: Boolean,
200
+ reflect: !0
141
201
  })], l.prototype, "disabled", void 0), t([o({
142
202
  type: Boolean,
143
203
  reflect: !0
144
- })], l.prototype, "error", void 0), t([o()], l.prototype, "label", void 0), t([o()], l.prototype, "emptyText", void 0), t([o({ reflect: !0 })], l.prototype, "size", void 0), t([s()], l.prototype, "_open", void 0), t([s()], l.prototype, "_query", void 0), t([s()], l.prototype, "_activeIndex", void 0), t([s()], l.prototype, "_dropdownStyle", void 0), l = t([a("reke-combobox")], l);
204
+ })], l.prototype, "error", void 0), t([o()], l.prototype, "label", void 0), t([o()], l.prototype, "emptyText", void 0), t([o({ reflect: !0 })], l.prototype, "size", void 0), t([s()], l.prototype, "_open", void 0), t([s()], l.prototype, "_query", void 0), t([s()], l.prototype, "_activeIndex", void 0), t([s()], l.prototype, "_flashValue", void 0), t([s()], l.prototype, "_scaleInValues", void 0), t([s()], l.prototype, "_dropdownStyle", void 0), l = t([a("reke-combobox")], l);
145
205
  //#endregion
146
206
  export { l as RekeCombobox };
@@ -1 +1 @@
1
- {"version":3,"file":"reke-combobox.styles.d.ts","sourceRoot":"","sources":["../../../src/components/reke-combobox/reke-combobox.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,2BA+JlB,CAAC"}
1
+ {"version":3,"file":"reke-combobox.styles.d.ts","sourceRoot":"","sources":["../../../src/components/reke-combobox/reke-combobox.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,2BA+RlB,CAAC"}
@@ -54,6 +54,34 @@ var n = [e, t`
54
54
  flex-shrink: 0;
55
55
  }
56
56
 
57
+ /* Selected summary overlay (multiple, non-tags). Left values match the
58
+ input's left padding per size (.input--sm/md/lg). */
59
+ .selected-summary {
60
+ position: absolute;
61
+ right: 28px; /* chevron room */
62
+ overflow: hidden;
63
+ text-overflow: ellipsis;
64
+ white-space: nowrap;
65
+ pointer-events: none;
66
+ color: var(--reke-color-text, #E5E5E5);
67
+ font-family: var(--reke-font-mono, 'JetBrains Mono', ui-monospace, monospace);
68
+ }
69
+
70
+ .selected-summary--sm {
71
+ left: var(--reke-space-sm, 12px);
72
+ font-size: var(--reke-font-size-xs, 12px);
73
+ }
74
+
75
+ .selected-summary--md {
76
+ left: var(--reke-space-md, 16px);
77
+ font-size: var(--reke-font-size-sm, 13px);
78
+ }
79
+
80
+ .selected-summary--lg {
81
+ left: var(--reke-space-lg, 20px);
82
+ font-size: var(--reke-font-size-md, 14px);
83
+ }
84
+
57
85
  /* === Sizes === */
58
86
 
59
87
  .input--sm {
@@ -141,6 +169,19 @@ var n = [e, t`
141
169
  flex-shrink: 0;
142
170
  }
143
171
 
172
+ .option-label {
173
+ flex: 1;
174
+ overflow: hidden;
175
+ text-overflow: ellipsis;
176
+ white-space: nowrap;
177
+ }
178
+
179
+ .check {
180
+ flex-shrink: 0;
181
+ color: var(--reke-color-primary, #22C55E);
182
+ font-size: var(--reke-font-size-sm, 13px);
183
+ }
184
+
144
185
  /* Active follows keyboard/mouse; hover kept for pointer-only devices. */
145
186
  .option--active,
146
187
  .option:hover {
@@ -151,12 +192,99 @@ var n = [e, t`
151
192
  color: var(--reke-color-primary, #22C55E);
152
193
  }
153
194
 
195
+ .option--flash {
196
+ animation: option-flash var(--reke-animation-flash, 250ms) ease-out;
197
+ }
198
+
154
199
  .empty {
155
200
  padding: var(--reke-space-xs, 8px) var(--reke-space-md, 16px);
156
201
  font-family: var(--reke-font-mono, 'JetBrains Mono', ui-monospace, monospace);
157
202
  font-size: var(--reke-font-size-sm, 13px);
158
203
  color: var(--reke-color-text-muted, #525252);
159
204
  }
205
+
206
+ /* === Chip layout in tags mode === */
207
+
208
+ .control--tags {
209
+ flex-wrap: wrap;
210
+ gap: var(--reke-space-2xs, 6px);
211
+ padding: var(--reke-space-xs, 8px) 28px var(--reke-space-xs, 8px) var(--reke-space-xs, 8px);
212
+ background: var(--reke-color-input-bg, var(--reke-color-surface, #1A1A1A));
213
+ border: 1px solid var(--reke-color-border, #252525);
214
+ border-radius: var(--reke-radius, 4px);
215
+ cursor: text;
216
+ transition: border-color 0.15s ease;
217
+ }
218
+
219
+ .control--tags:focus-within {
220
+ border-color: var(--reke-color-primary, #22C55E);
221
+ outline: 2px solid var(--reke-color-primary, #22C55E);
222
+ outline-offset: -1px;
223
+ }
224
+
225
+ .control--tags.control--error {
226
+ border-color: var(--reke-color-danger, #EF4444);
227
+ }
228
+
229
+ .control--tags.control--error:focus-within {
230
+ border-color: var(--reke-color-danger, #EF4444);
231
+ outline-color: var(--reke-color-danger, #EF4444);
232
+ }
233
+
234
+ reke-chip {
235
+ flex-shrink: 0;
236
+ }
237
+
238
+ reke-chip.chip--scale-in {
239
+ animation: chip-scale-in var(--reke-animation-scale-in, 200ms) ease-out;
240
+ }
241
+
242
+ .input--tags {
243
+ flex: 1;
244
+ min-width: 80px;
245
+ width: auto;
246
+ border: none;
247
+ background: transparent;
248
+ box-shadow: none;
249
+ padding-left: 0;
250
+ padding-right: 0;
251
+ }
252
+
253
+ .input--tags:focus-visible {
254
+ outline: none;
255
+ }
256
+
257
+ /* === Animations === */
258
+
259
+ @keyframes option-flash {
260
+ 0% {
261
+ background-color: transparent;
262
+ }
263
+ 50% {
264
+ background-color: color-mix(in srgb, var(--reke-color-primary, #22C55E) 20%, transparent);
265
+ }
266
+ 100% {
267
+ background-color: transparent;
268
+ }
269
+ }
270
+
271
+ @keyframes chip-scale-in {
272
+ from {
273
+ opacity: 0;
274
+ transform: scale(0.85);
275
+ }
276
+ to {
277
+ opacity: 1;
278
+ transform: scale(1);
279
+ }
280
+ }
281
+
282
+ @media (prefers-reduced-motion: reduce) {
283
+ .option--flash,
284
+ reke-chip.chip--scale-in {
285
+ animation: none;
286
+ }
287
+ }
160
288
  `];
161
289
  //#endregion
162
290
  export { n as styles };
@@ -4,9 +4,13 @@ export type InputSize = 'xs' | 'sm' | 'md' | 'lg';
4
4
  * @tag reke-input
5
5
  * @summary A text input component with sizes, error, and disabled states.
6
6
  *
7
+ * @slot prefix - Content rendered inside the field, before the input (unit, icon, symbol).
8
+ * @slot suffix - Content rendered inside the field, after the input (unit, icon, symbol).
9
+ *
7
10
  * @fires reke-input - Fired on each keystroke with the current value.
8
11
  * @fires reke-change - Fired when the input loses focus and value has changed.
9
12
  *
13
+ * @csspart field - The bordered box wrapping the input and adornments.
10
14
  * @csspart input - The inner input element.
11
15
  *
12
16
  * @cssprop [--reke-color-primary=#22C55E] - Focus ring color.
@@ -25,6 +29,16 @@ export declare class RekeInput extends RekeElement {
25
29
  disabled: boolean;
26
30
  error: boolean;
27
31
  label: string;
32
+ name: string;
33
+ inputmode?: 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url' | 'none';
34
+ min?: string;
35
+ max?: string;
36
+ step?: string;
37
+ maxlength?: number;
38
+ autocomplete?: string;
39
+ required: boolean;
40
+ /** Focus the inner input (delegatesFocus also makes host .focus() work). */
41
+ focus(options?: FocusOptions): void;
28
42
  private handleInput;
29
43
  private handleChange;
30
44
  render(): import("lit-html").TemplateResult<1>;
@@ -1 +1 @@
1
- {"version":3,"file":"reke-input.d.ts","sourceRoot":"","sources":["../../../src/components/reke-input/reke-input.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAElD;;;;;;;;;;;;;;;GAeG;AACH,qBACa,SAAU,SAAQ,WAAW;IACxC,OAAgB,MAAM,4BAAU;IAGhC,KAAK,SAAM;IAGX,WAAW,SAAM;IAGjB,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAU;IAG3E,IAAI,EAAE,SAAS,CAAQ;IAGvB,QAAQ,UAAS;IAGjB,KAAK,UAAS;IAGd,KAAK,SAAM;IAEX,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,YAAY;IAIX,MAAM;CAwBhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
1
+ {"version":3,"file":"reke-input.d.ts","sourceRoot":"","sources":["../../../src/components/reke-input/reke-input.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAElD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBACa,SAAU,SAAQ,WAAW;IACxC,OAAgB,MAAM,4BAAU;IAGhC,KAAK,SAAM;IAGX,WAAW,SAAM;IAGjB,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAU;IAG3E,IAAI,EAAE,SAAS,CAAQ;IAGvB,QAAQ,UAAS;IAGjB,KAAK,UAAS;IAGd,KAAK,SAAM;IAKX,IAAI,SAAM;IAGV,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;IAGzF,GAAG,CAAC,EAAE,MAAM,CAAC;IAGb,GAAG,CAAC,EAAE,MAAM,CAAC;IAGb,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,QAAQ,UAAS;IAEjB,4EAA4E;IACnE,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY;IAIrC,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,YAAY;IAIX,MAAM;CAoChB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}