@teamix-evo/ui 0.1.1 → 0.2.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 (229) hide show
  1. package/README.md +1 -1
  2. package/package.json +8 -4
  3. package/src/components/accordion/accordion.meta.md +10 -5
  4. package/src/components/accordion/accordion.stories.tsx +11 -6
  5. package/src/components/affix/affix.meta.md +19 -10
  6. package/src/components/affix/affix.stories.tsx +4 -2
  7. package/src/components/alert/alert.meta.md +19 -14
  8. package/src/components/alert/alert.stories.tsx +1 -1
  9. package/src/components/alert/alert.tsx +5 -5
  10. package/src/components/alert-dialog/alert-dialog.meta.md +23 -10
  11. package/src/components/alert-dialog/alert-dialog.stories.tsx +1 -1
  12. package/src/components/alert-dialog/alert-dialog.tsx +1 -1
  13. package/src/components/anchor/anchor.meta.md +20 -11
  14. package/src/components/anchor/anchor.stories.tsx +1 -1
  15. package/src/components/app/app.meta.md +19 -10
  16. package/src/components/app/app.stories.tsx +4 -2
  17. package/src/components/aspect-ratio/aspect-ratio.meta.md +10 -5
  18. package/src/components/aspect-ratio/aspect-ratio.stories.tsx +1 -1
  19. package/src/components/auto-complete/auto-complete.meta.md +25 -16
  20. package/src/components/auto-complete/auto-complete.stories.tsx +4 -2
  21. package/src/components/avatar/avatar.meta.md +23 -11
  22. package/src/components/avatar/avatar.stories.tsx +1 -1
  23. package/src/components/badge/badge.meta.md +26 -21
  24. package/src/components/badge/badge.tsx +7 -13
  25. package/src/components/breadcrumb/breadcrumb.meta.md +21 -10
  26. package/src/components/breadcrumb/breadcrumb.stories.tsx +8 -0
  27. package/src/components/button/button.meta.md +22 -17
  28. package/src/components/button/button.stories.tsx +1 -1
  29. package/src/components/button/demo/as-child.tsx +24 -0
  30. package/src/components/button/demo/basic.tsx +8 -0
  31. package/src/components/button/demo/block.tsx +16 -0
  32. package/src/components/button/demo/loading.tsx +19 -0
  33. package/src/components/button/demo/shapes.tsx +18 -0
  34. package/src/components/button/demo/sizes.tsx +19 -0
  35. package/src/components/button/demo/variants.tsx +19 -0
  36. package/src/components/button/demo/with-icon.tsx +20 -0
  37. package/src/components/button-group/button-group.meta.md +18 -9
  38. package/src/components/button-group/button-group.stories.tsx +5 -2
  39. package/src/components/calendar/calendar.meta.md +14 -9
  40. package/src/components/calendar/calendar.stories.tsx +1 -1
  41. package/src/components/calendar/calendar.tsx +1 -1
  42. package/src/components/card/card.meta.md +36 -11
  43. package/src/components/card/card.stories.tsx +8 -0
  44. package/src/components/carousel/carousel.meta.md +16 -11
  45. package/src/components/carousel/carousel.stories.tsx +10 -5
  46. package/src/components/cascader/cascader.meta.md +28 -19
  47. package/src/components/cascader/cascader.stories.tsx +9 -8
  48. package/src/components/cascader/cascader.tsx +2 -2
  49. package/src/components/checkbox/checkbox.meta.md +26 -8
  50. package/src/components/checkbox/checkbox.stories.tsx +1 -1
  51. package/src/components/collapsible/collapsible.meta.md +11 -4
  52. package/src/components/collapsible/collapsible.stories.tsx +8 -0
  53. package/src/components/color-picker/color-picker.meta.md +27 -18
  54. package/src/components/color-picker/color-picker.stories.tsx +1 -1
  55. package/src/components/color-picker/color-picker.tsx +1 -0
  56. package/src/components/combobox/combobox.meta.md +29 -20
  57. package/src/components/combobox/combobox.stories.tsx +1 -1
  58. package/src/components/combobox/combobox.tsx +3 -3
  59. package/src/components/command/command.meta.md +32 -12
  60. package/src/components/command/command.stories.tsx +1 -1
  61. package/src/components/command/command.tsx +1 -1
  62. package/src/components/context-menu/context-menu.meta.md +34 -11
  63. package/src/components/context-menu/context-menu.stories.tsx +8 -0
  64. package/src/components/context-menu/context-menu.tsx +2 -2
  65. package/src/components/data-table/data-table.meta.md +24 -19
  66. package/src/components/data-table/data-table.stories.tsx +12 -5
  67. package/src/components/date-picker/date-picker.meta.md +40 -20
  68. package/src/components/date-picker/date-picker.stories.tsx +1 -1
  69. package/src/components/descriptions/descriptions.meta.md +23 -14
  70. package/src/components/descriptions/descriptions.stories.tsx +1 -1
  71. package/src/components/dialog/dialog.meta.md +25 -12
  72. package/src/components/dialog/dialog.stories.tsx +1 -1
  73. package/src/components/dialog/dialog.tsx +1 -1
  74. package/src/components/drawer/drawer.meta.md +19 -8
  75. package/src/components/drawer/drawer.stories.tsx +1 -1
  76. package/src/components/drawer/drawer.tsx +1 -0
  77. package/src/components/dropdown-menu/dropdown-menu.meta.md +42 -14
  78. package/src/components/dropdown-menu/dropdown-menu.stories.tsx +8 -0
  79. package/src/components/dropdown-menu/dropdown-menu.tsx +2 -2
  80. package/src/components/empty/empty.meta.md +20 -11
  81. package/src/components/empty/empty.stories.tsx +1 -1
  82. package/src/components/field/field.meta.md +27 -10
  83. package/src/components/field/field.stories.tsx +6 -3
  84. package/src/components/flex/flex.meta.md +23 -14
  85. package/src/components/flex/flex.stories.tsx +46 -14
  86. package/src/components/float-button/float-button.meta.md +35 -11
  87. package/src/components/float-button/float-button.stories.tsx +4 -2
  88. package/src/components/float-button/float-button.tsx +1 -1
  89. package/src/components/form/form.meta.md +57 -14
  90. package/src/components/form/form.stories.tsx +1 -1
  91. package/src/components/grid/grid.meta.md +31 -6
  92. package/src/components/grid/grid.stories.tsx +4 -2
  93. package/src/components/hover-card/hover-card.meta.md +21 -9
  94. package/src/components/hover-card/hover-card.stories.tsx +6 -2
  95. package/src/components/image/image.meta.md +24 -15
  96. package/src/components/image/image.stories.tsx +1 -1
  97. package/src/components/image/image.tsx +4 -4
  98. package/src/components/input/demo/addon.tsx +15 -0
  99. package/src/components/input/demo/basic.tsx +12 -0
  100. package/src/components/input/demo/clearable.tsx +21 -0
  101. package/src/components/input/demo/show-count.tsx +18 -0
  102. package/src/components/input/demo/sizes.tsx +15 -0
  103. package/src/components/input/demo/with-prefix-suffix.tsx +19 -0
  104. package/src/components/input/input.meta.md +21 -16
  105. package/src/components/input/input.stories.tsx +1 -1
  106. package/src/components/input/input.tsx +51 -47
  107. package/src/components/input-group/input-group.meta.md +26 -8
  108. package/src/components/input-group/input-group.stories.tsx +1 -1
  109. package/src/components/input-group/input-group.tsx +4 -3
  110. package/src/components/input-number/input-number.meta.md +26 -17
  111. package/src/components/input-number/input-number.stories.tsx +14 -3
  112. package/src/components/input-number/input-number.tsx +20 -6
  113. package/src/components/input-otp/input-otp.meta.md +22 -9
  114. package/src/components/input-otp/input-otp.stories.tsx +1 -1
  115. package/src/components/item/item.meta.md +32 -9
  116. package/src/components/item/item.stories.tsx +5 -2
  117. package/src/components/kbd/kbd.meta.md +29 -8
  118. package/src/components/kbd/kbd.stories.tsx +1 -1
  119. package/src/components/kbd/kbd.tsx +2 -1
  120. package/src/components/label/label.meta.md +14 -9
  121. package/src/components/masonry/masonry.meta.md +18 -9
  122. package/src/components/masonry/masonry.stories.tsx +4 -2
  123. package/src/components/masonry/masonry.tsx +1 -0
  124. package/src/components/mentions/mentions.meta.md +28 -19
  125. package/src/components/mentions/mentions.stories.tsx +1 -1
  126. package/src/components/mentions/mentions.tsx +2 -1
  127. package/src/components/menubar/menubar.meta.md +36 -14
  128. package/src/components/menubar/menubar.stories.tsx +8 -0
  129. package/src/components/menubar/menubar.tsx +2 -2
  130. package/src/components/native-select/native-select.meta.md +17 -8
  131. package/src/components/native-select/native-select.stories.tsx +6 -3
  132. package/src/components/navigation-menu/navigation-menu.meta.md +25 -11
  133. package/src/components/navigation-menu/navigation-menu.stories.tsx +11 -11
  134. package/src/components/navigation-menu/navigation-menu.tsx +3 -2
  135. package/src/components/notification/notification.meta.md +14 -5
  136. package/src/components/notification/notification.stories.tsx +5 -3
  137. package/src/components/notification/notification.tsx +3 -3
  138. package/src/components/pagination/pagination.meta.md +59 -28
  139. package/src/components/pagination/pagination.stories.tsx +9 -3
  140. package/src/components/popconfirm/popconfirm.meta.md +30 -21
  141. package/src/components/popconfirm/popconfirm.stories.tsx +1 -2
  142. package/src/components/popconfirm/popconfirm.tsx +1 -1
  143. package/src/components/popover/popover.meta.md +13 -8
  144. package/src/components/popover/popover.stories.tsx +1 -1
  145. package/src/components/progress/progress.meta.md +28 -13
  146. package/src/components/progress/progress.stories.tsx +1 -1
  147. package/src/components/progress/progress.tsx +6 -6
  148. package/src/components/radio-group/radio-group.meta.md +17 -12
  149. package/src/components/radio-group/radio-group.stories.tsx +1 -1
  150. package/src/components/rate/rate.meta.md +25 -16
  151. package/src/components/rate/rate.stories.tsx +11 -3
  152. package/src/components/rate/rate.tsx +2 -2
  153. package/src/components/resizable/resizable.meta.md +19 -8
  154. package/src/components/resizable/resizable.stories.tsx +1 -1
  155. package/src/components/result/result.meta.md +21 -12
  156. package/src/components/result/result.stories.tsx +2 -6
  157. package/src/components/result/result.tsx +3 -3
  158. package/src/components/scroll-area/scroll-area.meta.md +10 -5
  159. package/src/components/scroll-area/scroll-area.stories.tsx +8 -0
  160. package/src/components/scroll-area/scroll-area.tsx +3 -3
  161. package/src/components/segmented/segmented.meta.md +19 -14
  162. package/src/components/segmented/segmented.stories.tsx +35 -6
  163. package/src/components/select/select.meta.md +22 -9
  164. package/src/components/select/select.stories.tsx +1 -1
  165. package/src/components/select/select.tsx +2 -2
  166. package/src/components/separator/separator.meta.md +16 -11
  167. package/src/components/separator/separator.stories.tsx +1 -1
  168. package/src/components/sheet/sheet.meta.md +22 -11
  169. package/src/components/sheet/sheet.stories.tsx +1 -1
  170. package/src/components/sidebar/sidebar.meta.md +47 -18
  171. package/src/components/sidebar/sidebar.stories.tsx +10 -5
  172. package/src/components/skeleton/skeleton.meta.md +33 -10
  173. package/src/components/skeleton/skeleton.stories.tsx +1 -1
  174. package/src/components/slider/slider.meta.md +12 -7
  175. package/src/components/slider/slider.stories.tsx +1 -1
  176. package/src/components/sonner/sonner.meta.md +8 -3
  177. package/src/components/sonner/sonner.stories.tsx +13 -8
  178. package/src/components/space/space.meta.md +22 -13
  179. package/src/components/space/space.stories.tsx +20 -6
  180. package/src/components/spinner/spinner.meta.md +23 -10
  181. package/src/components/spinner/spinner.stories.tsx +1 -1
  182. package/src/components/statistic/statistic.meta.md +37 -16
  183. package/src/components/statistic/statistic.stories.tsx +2 -6
  184. package/src/components/statistic/statistic.tsx +1 -1
  185. package/src/components/steps/steps.meta.md +21 -12
  186. package/src/components/steps/steps.stories.tsx +7 -2
  187. package/src/components/switch/switch.meta.md +16 -11
  188. package/src/components/switch/switch.stories.tsx +1 -1
  189. package/src/components/switch/switch.tsx +58 -36
  190. package/src/components/table/table.meta.md +24 -9
  191. package/src/components/table/table.stories.tsx +9 -4
  192. package/src/components/tabs/tabs.meta.md +14 -9
  193. package/src/components/tabs/tabs.stories.tsx +8 -0
  194. package/src/components/tag/tag.meta.md +39 -10
  195. package/src/components/tag/tag.stories.tsx +7 -2
  196. package/src/components/tag/tag.tsx +3 -3
  197. package/src/components/textarea/textarea.meta.md +17 -12
  198. package/src/components/textarea/textarea.stories.tsx +1 -1
  199. package/src/components/textarea/textarea.tsx +1 -1
  200. package/src/components/time-picker/time-picker.meta.md +38 -15
  201. package/src/components/time-picker/time-picker.stories.tsx +44 -6
  202. package/src/components/time-picker/time-picker.tsx +74 -10
  203. package/src/components/timeline/timeline.meta.md +20 -11
  204. package/src/components/timeline/timeline.stories.tsx +14 -4
  205. package/src/components/timeline/timeline.tsx +3 -2
  206. package/src/components/toggle/toggle.meta.md +14 -9
  207. package/src/components/toggle/toggle.stories.tsx +1 -1
  208. package/src/components/toggle-group/toggle-group.meta.md +16 -11
  209. package/src/components/toggle-group/toggle-group.stories.tsx +1 -1
  210. package/src/components/tooltip/tooltip.meta.md +18 -13
  211. package/src/components/tooltip/tooltip.stories.tsx +1 -1
  212. package/src/components/tour/tour.meta.md +25 -16
  213. package/src/components/tour/tour.stories.tsx +1 -1
  214. package/src/components/tour/tour.tsx +1 -1
  215. package/src/components/transfer/transfer.meta.md +29 -20
  216. package/src/components/transfer/transfer.stories.tsx +2 -6
  217. package/src/components/tree/tree.meta.md +36 -23
  218. package/src/components/tree/tree.stories.tsx +30 -11
  219. package/src/components/tree-select/tree-select.meta.md +37 -22
  220. package/src/components/tree-select/tree-select.stories.tsx +1 -1
  221. package/src/components/tree-select/tree-select.tsx +1 -1
  222. package/src/components/typography/typography.meta.md +41 -16
  223. package/src/components/typography/typography.stories.tsx +4 -8
  224. package/src/components/typography/typography.tsx +5 -3
  225. package/src/components/upload/upload.meta.md +31 -22
  226. package/src/components/upload/upload.stories.tsx +8 -14
  227. package/src/components/watermark/watermark.meta.md +26 -17
  228. package/src/components/watermark/watermark.stories.tsx +4 -2
  229. package/src/components/watermark/watermark.tsx +1 -0
@@ -59,9 +59,10 @@ const InputGroupAddon = React.forwardRef<HTMLDivElement, InputGroupAddonProps>(
59
59
  variant === 'text' &&
60
60
  'border-input bg-muted px-3 text-sm text-muted-foreground',
61
61
  variant === 'icon' && 'px-2 text-muted-foreground',
62
- variant === 'button' && '[&>*]:rounded-none [&>*]:border-0 [&>*]:shadow-none',
63
- position === 'before' && variant !== 'icon' && 'border-r',
64
- position === 'after' && variant !== 'icon' && 'border-l',
62
+ variant === 'button' &&
63
+ '[&>*]:rounded-none [&>*]:border-0 [&>*]:shadow-none',
64
+ position === 'before' && variant !== 'icon' && 'border-r border-input',
65
+ position === 'after' && variant !== 'icon' && 'border-l border-input',
65
66
  className,
66
67
  )}
67
68
  {...props}
@@ -4,10 +4,11 @@ name: InputNumber
4
4
  type: component
5
5
  category: form
6
6
  since: 0.1.0
7
- package: "@teamix-evo/ui"
7
+ package: '@teamix-evo/ui'
8
+ displayName: 数字输入框
8
9
  ---
9
10
 
10
- # InputNumber
11
+ # InputNumber 数字输入框
11
12
 
12
13
  数字输入 — antd 独有补足。**等价 antd `InputNumber`**。区别于原生 `<input type="number">`:步进按钮显隐可配、范围裁剪与精度由组件保证、千分位展示、键盘 ↑↓ 步进、支持空状态(`value=null`)。
13
14
 
@@ -24,29 +25,36 @@ package: "@teamix-evo/ui"
24
25
  - 多档枚举 → `Segmented` / `RadioGroup`
25
26
  - 普通文本输入 → `Input`
26
27
 
28
+ ## Props
29
+
27
30
  <!-- auto:props:begin -->
28
- | 名称 | 类型 | 默认值 | 必填 | 说明 |
29
- | --- | --- | --- | --- | --- |
30
- | `value` | `number \| null` | | | 受控值 — `null` 等价空输入。 |
31
- | `defaultValue` | `number \| null` | – | – | uncontrolled 初值。 |
32
- | `onChange` | `(value: number \| null) => void` | – | – | 值变化回调 — 输入清空时传 `null`,正常输入 / 步进传 `number`。 |
33
- | `min` | `number` | – | – | 最小值(antd `min` 并集)。 |
34
- | `max` | `number` | – | – | 最大值(antd `max` 并集)。 |
35
- | `step` | `number` | `1` | – | 步长(antd `step` 并集) — 增 / 减按钮以及键盘 ↑↓ 都按此步长。 |
36
- | `precision` | `number` | | – | 数值精度(antd `precision` 并集) — 保留小数位数(超出会四舍五入)。 |
37
- | `groupSeparator` | `boolean` | `false` | – | 千分位分隔展示(仅展示用,实际 value 仍是 number)。 |
38
- | `controls` | `boolean` | `true` | – | 是否显示右侧上下步进按钮(antd `controls` 并集) — `false` 时隐藏。 |
39
- | `size` | `'sm' \| 'default' \| 'lg'` | `"default"` | | 尺寸。 |
31
+
32
+ | 名称 | 类型 | 默认值 | 必填 | 说明 |
33
+ | ---------------- | --------------------------------- | ----------- | ---- | ----------------------------------------------------------------- |
34
+ | `value` | `number \| null` | – | – | 受控值 `null` 等价空输入。 |
35
+ | `defaultValue` | `number \| null` | – | – | uncontrolled 初值。 |
36
+ | `onChange` | `(value: number \| null) => void` | – | – | 值变化回调 — 输入清空时传 `null`,正常输入 / 步进传 `number`。 |
37
+ | `min` | `number` | – | – | 最小值(antd `min` 并集)。 |
38
+ | `max` | `number` | | – | 最大值(antd `max` 并集)|
39
+ | `step` | `number` | `1` | – | 步长(antd `step` 并集) — / 减按钮以及键盘 ↑↓ 都按此步长。 |
40
+ | `precision` | `number` | | – | 数值精度(antd `precision` 并集) — 保留小数位数(超出会四舍五入)。 |
41
+ | `groupSeparator` | `boolean` | `false` | – | 千分位分隔展示(仅展示用,实际 value 仍是 number)|
42
+ | `controls` | `boolean` | `true` | | 是否显示右侧上下步进按钮(antd `controls` 并集) `false` 时隐藏。 |
43
+ | `size` | `'sm' \| 'default' \| 'lg'` | `"default"` | – | 尺寸。 |
44
+
40
45
  <!-- auto:props:end -->
41
46
 
47
+ ## 依赖
48
+
42
49
  <!-- auto:deps:begin -->
50
+
43
51
  ### 同库依赖
44
52
 
45
53
  > `teamix-evo ui add input-number` 时,以下 entry 会被自动连带安装(无需手动 add)。
46
54
 
47
- | Entry | 类型 | 描述 |
48
- | --- | --- | --- |
49
- | `cn` | util | Tailwind className 合并工具(clsx + tailwind-merge) |
55
+ | Entry | 类型 | 描述 |
56
+ | ----- | ---- | -------------------------------------------------- |
57
+ | `cn` | util | Tailwind className 合并工具(clsx + tailwind-merge) |
50
58
 
51
59
  ### npm 依赖
52
60
 
@@ -55,6 +63,7 @@ package: "@teamix-evo/ui"
55
63
  ```bash
56
64
  pnpm add lucide-react@^0.460.0
57
65
  ```
66
+
58
67
  <!-- auto:deps:end -->
59
68
 
60
69
  ## AI 生成纪律
@@ -10,7 +10,7 @@ const meta: Meta<typeof InputNumber> = {
10
10
  docs: {
11
11
  description: {
12
12
  component:
13
- '数字输入框 — 区别于原生 type=number:步进按钮显隐可配、范围裁剪与精度由组件保证、千分位展示、键盘 ↑↓ 步进、支持空状态。等价 antd `InputNumber`。视觉走 OpenTrek tokens,所有样式来自 `@teamix-evo/design`,无 mock。',
13
+ '数字输入框 — 区别于原生 type=number:步进按钮显隐可配、范围裁剪与精度由组件保证、千分位展示、键盘 ↑↓ 步进、支持空状态。等价 antd `InputNumber`。',
14
14
  },
15
15
  },
16
16
  },
@@ -20,7 +20,12 @@ const meta: Meta<typeof InputNumber> = {
20
20
  groupSeparator: { control: 'boolean' },
21
21
  disabled: { control: 'boolean' },
22
22
  },
23
- args: { size: 'default', controls: true, groupSeparator: false, disabled: false },
23
+ args: {
24
+ size: 'default',
25
+ controls: true,
26
+ groupSeparator: false,
27
+ disabled: false,
28
+ },
24
29
  };
25
30
 
26
31
  export default meta;
@@ -28,7 +33,13 @@ type Story = StoryObj<typeof InputNumber>;
28
33
 
29
34
  export const Playground: Story = {
30
35
  render: (args) => (
31
- <InputNumber {...args} defaultValue={10} min={0} max={100} className="w-40" />
36
+ <InputNumber
37
+ {...args}
38
+ defaultValue={10}
39
+ min={0}
40
+ max={100}
41
+ className="w-40"
42
+ />
32
43
  ),
33
44
  };
34
45
 
@@ -6,7 +6,14 @@ import { cn } from '@/utils/cn';
6
6
  export interface InputNumberProps
7
7
  extends Omit<
8
8
  React.InputHTMLAttributes<HTMLInputElement>,
9
- 'onChange' | 'value' | 'defaultValue' | 'min' | 'max' | 'step' | 'type' | 'size'
9
+ | 'onChange'
10
+ | 'value'
11
+ | 'defaultValue'
12
+ | 'min'
13
+ | 'max'
14
+ | 'step'
15
+ | 'type'
16
+ | 'size'
10
17
  > {
11
18
  /** 受控值 — `null` 等价空输入。 */
12
19
  value?: number | null;
@@ -100,7 +107,8 @@ const InputNumber = React.forwardRef<HTMLInputElement, InputNumberProps>(
100
107
  const current = isControlled ? value! : internal;
101
108
  const [editing, setEditing] = React.useState<string | null>(null);
102
109
 
103
- const display = editing !== null ? editing : format(current, precision, groupSeparator);
110
+ const display =
111
+ editing !== null ? editing : format(current, precision, groupSeparator);
104
112
 
105
113
  const clamp = (n: number): number => {
106
114
  let v = n;
@@ -178,11 +186,14 @@ const InputNumber = React.forwardRef<HTMLInputElement, InputNumberProps>(
178
186
  {...props}
179
187
  />
180
188
  {controls ? (
181
- <div className="flex flex-col border-l">
189
+ <div className="flex flex-col border-l border-input">
182
190
  <button
183
191
  type="button"
184
192
  tabIndex={-1}
185
- disabled={disabled || (typeof max === 'number' && (current ?? -Infinity) >= max)}
193
+ disabled={
194
+ disabled ||
195
+ (typeof max === 'number' && (current ?? -Infinity) >= max)
196
+ }
186
197
  onClick={() => step1(1)}
187
198
  aria-label="增加"
188
199
  className="flex h-1/2 items-center justify-center px-1.5 text-muted-foreground hover:bg-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-30"
@@ -192,10 +203,13 @@ const InputNumber = React.forwardRef<HTMLInputElement, InputNumberProps>(
192
203
  <button
193
204
  type="button"
194
205
  tabIndex={-1}
195
- disabled={disabled || (typeof min === 'number' && (current ?? Infinity) <= min)}
206
+ disabled={
207
+ disabled ||
208
+ (typeof min === 'number' && (current ?? Infinity) <= min)
209
+ }
196
210
  onClick={() => step1(-1)}
197
211
  aria-label="减少"
198
- className="flex h-1/2 items-center justify-center border-t px-1.5 text-muted-foreground hover:bg-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-30"
212
+ className="flex h-1/2 items-center justify-center border-t border-input px-1.5 text-muted-foreground hover:bg-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-30"
199
213
  >
200
214
  <ChevronDown className="size-3" />
201
215
  </button>
@@ -4,10 +4,11 @@ name: InputOTP
4
4
  type: component
5
5
  category: form
6
6
  since: 0.1.0
7
- package: "@teamix-evo/ui"
7
+ package: '@teamix-evo/ui'
8
+ displayName: 验证码输入
8
9
  ---
9
10
 
10
- # InputOTP
11
+ # InputOTP 验证码输入
11
12
 
12
13
  OTP 验证码输入 — 基于 [`input-otp`](https://github.com/guilhermerodz/input-otp)。**shadcn-only**(antd 无对标组件)。
13
14
  4~8 位短验证码常见场景:登录、二步验证、支付确认。
@@ -29,10 +30,20 @@ OTP 验证码输入 — 基于 [`input-otp`](https://github.com/guilhermerodz/in
29
30
  > 以下表格由 `pnpm --filter @teamix-evo/ui gen:meta` 自动生成。`InputOTP` 透传 `input-otp` 的所有 props。
30
31
 
31
32
  <!-- auto:props:begin -->
32
- | 名称 | 类型 | 默认值 | 必填 | 说明 |
33
- | --- | --- | --- | --- | --- |
34
- | `className` | `string` | – | – | 输入框 className,作用在隐藏的真实 input 上;通常无需关心。 |
35
- | `containerClassName` | `string` | | | 容器 className,作用在 slot 列表外层 wrapper 上, 用于覆盖默认的 `flex items-center gap-2`。 |
33
+
34
+ #### InputOTP
35
+
36
+ | 名称 | 类型 | 默认值 | 必填 | 说明 |
37
+ | -------------------- | -------- | ------ | ---- | -------------------------------------------------------------------------------------------- |
38
+ | `className` | `string` | – | – | 输入框 className,作用在隐藏的真实 input 上;通常无需关心。 |
39
+ | `containerClassName` | `string` | – | – | 容器 className,作用在 slot 列表外层 wrapper 上, 用于覆盖默认的 `flex items-center gap-2`。 |
40
+
41
+ #### InputOTPSlot
42
+
43
+ | 名称 | 类型 | 默认值 | 必填 | 说明 |
44
+ | ------- | -------- | ------ | ---- | ------------------------------------------ |
45
+ | `index` | `number` | – | ✔ | Slot 索引(必传)。OTP 的 slots 数组下标。 |
46
+
36
47
  <!-- auto:props:end -->
37
48
 
38
49
  ## 依赖
@@ -40,13 +51,14 @@ OTP 验证码输入 — 基于 [`input-otp`](https://github.com/guilhermerodz/in
40
51
  > 以下表格由 `pnpm --filter @teamix-evo/ui gen:meta` 自动生成,数据源是 [`manifest.json`](../../../manifest.json)。**手工编辑 marker 之间的内容会在下次生成时被覆盖**。
41
52
 
42
53
  <!-- auto:deps:begin -->
54
+
43
55
  ### 同库依赖
44
56
 
45
57
  > `teamix-evo ui add input-otp` 时,以下 entry 会被自动连带安装(无需手动 add)。
46
58
 
47
- | Entry | 类型 | 描述 |
48
- | --- | --- | --- |
49
- | `cn` | util | Tailwind className 合并工具(clsx + tailwind-merge) |
59
+ | Entry | 类型 | 描述 |
60
+ | ----- | ---- | -------------------------------------------------- |
61
+ | `cn` | util | Tailwind className 合并工具(clsx + tailwind-merge) |
50
62
 
51
63
  ### npm 依赖
52
64
 
@@ -55,6 +67,7 @@ OTP 验证码输入 — 基于 [`input-otp`](https://github.com/guilhermerodz/in
55
67
  ```bash
56
68
  pnpm add input-otp@^1.2.0 lucide-react@^0.460.0
57
69
  ```
70
+
58
71
  <!-- auto:deps:end -->
59
72
 
60
73
  > 子组件:`InputOTP`(Root)/ `InputOTPGroup`(slot 容器)/ `InputOTPSlot`(单 slot,需 `index`)/ `InputOTPSeparator`(分隔符,如 4-4 数字之间的点)。
@@ -16,7 +16,7 @@ const meta: Meta<typeof InputOTP> = {
16
16
  docs: {
17
17
  description: {
18
18
  component:
19
- '一次性密码输入 — 短信 / 邮箱验证码场景的格式化输入,每位字符独立可视 slot。基于 [`input-otp`](https://input-otp.rodz.dev/) 实现,自动处理粘贴、键盘前后切换、IME 与 SMS autofill;通过 `pattern` 限制输入字符集(数字 / 字母数字)。shadcn 专有能力,填补 antd 未提供的验证码输入场景。视觉走 OpenTrek semantic tokens,所有样式来自 `@teamix-evo/design`,无 mock。',
19
+ '一次性密码输入 — 短信 / 邮箱验证码场景的格式化输入,每位字符独立可视 slot。基于 [`input-otp`](https://input-otp.rodz.dev/) 实现,自动处理粘贴、键盘前后切换、IME 与 SMS autofill;通过 `pattern` 限制输入字符集(数字 / 字母数字)。shadcn 专有能力,填补 antd 未提供的验证码输入场景。',
20
20
  },
21
21
  },
22
22
  },
@@ -4,10 +4,11 @@ name: Item
4
4
  type: component
5
5
  category: layout
6
6
  since: 0.1.0
7
- package: "@teamix-evo/ui"
7
+ package: '@teamix-evo/ui'
8
+ displayName: 列表项
8
9
  ---
9
10
 
10
- # Item
11
+ # Item 列表项
11
12
 
12
13
  通用列表项 / 卡片项容器 — shadcn 2025-10 新增。**取代我们之前自实现的 `List.Item` + `List.Item.Meta`**(antd 老 List 在 v6 已 deprecated)。用 5 个语义槽组合:`ItemMedia` 媒体 / `ItemContent` 主体 / `ItemTitle` 标题 / `ItemDescription` 描述 / `ItemActions` 操作。排列用 `ItemGroup`(纵向 + 分隔)或自行 div / ul 自由布局。
13
14
 
@@ -24,21 +25,42 @@ package: "@teamix-evo/ui"
24
25
  - 完整业务卡片(带 Header / Cover / Footer)→ `Card`
25
26
  - 树形嵌套 → `Tree`
26
27
 
28
+ ## Props
29
+
27
30
  <!-- auto:props:begin -->
28
- | 名称 | 类型 | 默认值 | 必填 | 说明 |
29
- | --- | --- | --- | --- | --- |
30
- | `variant` | `'default' \| 'outline' \| 'muted'` | `"default"` | – | 视觉变体 — `default` 透明无边框(嵌入 List / Group 用);`outline` 卡片化(独立卡片);`muted` 灰底卡片。 |
31
- | `interactive` | `boolean` | `false` | | 是否带 hover 高亮 + cursor-pointer(行可点击场景)。 |
31
+
32
+ #### Item
33
+
34
+ | 名称 | 类型 | 默认值 | 必填 | 说明 |
35
+ | ------------- | ----------------------------------- | ----------- | ---- | --------------------------------------------------------------------------------------------------- |
36
+ | `variant` | `'default' \| 'outline' \| 'muted'` | `"default"` | – | 视觉变体 — `default` 透明无边框(嵌入 List / Group 用);`outline` 卡片化(独立卡片);`muted` 灰底卡片。 |
37
+ | `interactive` | `boolean` | `false` | – | 是否带 hover 高亮 + cursor-pointer(行可点击场景)。 |
38
+
39
+ #### ItemMedia
40
+
41
+ | 名称 | 类型 | 默认值 | 必填 | 说明 |
42
+ | ------ | ------------------- | ----------- | ---- | ------------------------------------------- |
43
+ | `size` | `'default' \| 'lg'` | `"default"` | – | 媒体尺寸 — `lg` 适用于大封面 / 大头像场景。 |
44
+
45
+ #### ItemGroup
46
+
47
+ | 名称 | 类型 | 默认值 | 必填 | 说明 |
48
+ | --------- | --------- | ------ | ---- | ------------------------------ |
49
+ | `divided` | `boolean` | `true` | – | 是否在各 Item 之间显示分割线。 |
50
+
32
51
  <!-- auto:props:end -->
33
52
 
53
+ ## 依赖
54
+
34
55
  <!-- auto:deps:begin -->
56
+
35
57
  ### 同库依赖
36
58
 
37
59
  > `teamix-evo ui add item` 时,以下 entry 会被自动连带安装(无需手动 add)。
38
60
 
39
- | Entry | 类型 | 描述 |
40
- | --- | --- | --- |
41
- | `cn` | util | Tailwind className 合并工具(clsx + tailwind-merge) |
61
+ | Entry | 类型 | 描述 |
62
+ | ----- | ---- | -------------------------------------------------- |
63
+ | `cn` | util | Tailwind className 合并工具(clsx + tailwind-merge) |
42
64
 
43
65
  ### npm 依赖
44
66
 
@@ -47,6 +69,7 @@ package: "@teamix-evo/ui"
47
69
  ```bash
48
70
  pnpm add class-variance-authority@^0.7.0
49
71
  ```
72
+
50
73
  <!-- auto:deps:end -->
51
74
 
52
75
  ## AI 生成纪律
@@ -20,12 +20,15 @@ const meta: Meta<typeof Item> = {
20
20
  docs: {
21
21
  description: {
22
22
  component:
23
- '通用列表项 / 卡片项 — 5 个语义槽组合(ItemMedia / ItemContent / ItemTitle / ItemDescription / ItemActions),配 ItemGroup 纵向排列。shadcn 2025-10 新增,取代之前自实现的 List.Item(antd 老 List 在 v6 已 deprecated)。视觉走 OpenTrek tokens,所有样式来自 `@teamix-evo/design`,无 mock。',
23
+ '通用列表项 / 卡片项 — 5 个语义槽组合(ItemMedia / ItemContent / ItemTitle / ItemDescription / ItemActions),配 ItemGroup 纵向排列。shadcn 2025-10 新增,取代之前自实现的 List.Itemantd 老 List 在 v6 已 deprecated)。',
24
24
  },
25
25
  },
26
26
  },
27
27
  argTypes: {
28
- variant: { control: 'inline-radio', options: ['default', 'outline', 'muted'] },
28
+ variant: {
29
+ control: 'inline-radio',
30
+ options: ['default', 'outline', 'muted'],
31
+ },
29
32
  interactive: { control: 'boolean' },
30
33
  },
31
34
  args: { variant: 'default', interactive: false },
@@ -1,13 +1,14 @@
1
1
  ---
2
2
  id: kbd
3
3
  name: Kbd
4
+ displayName: 键位展示
4
5
  type: component
5
6
  category: foundation
6
7
  since: 0.1.0
7
- package: "@teamix-evo/ui"
8
+ package: '@teamix-evo/ui'
8
9
  ---
9
10
 
10
- # Kbd
11
+ # Kbd 键位展示
11
12
 
12
13
  键位展示 — shadcn 2025-10 新增。语义化的 `<kbd>` 元素 + `KbdGroup` 组合容器,用于在 UI 中标注**快捷键**(`⌘K` / `Ctrl + Enter` / `Esc`)。常见于 Command Palette、Tooltip、文档 / 帮助提示。
13
14
 
@@ -22,20 +23,39 @@ package: "@teamix-evo/ui"
22
23
  - 引用代码片段 → 用 `<code>` / Typography Code(`<Kbd>` 语义是物理键位)
23
24
  - 普通行内强调 → 用 `<strong>` / Typography Text strong
24
25
 
26
+ ## Props
27
+
28
+ > 以下表格由 `pnpm --filter @teamix-evo/ui gen:meta` 自动生成。
29
+
25
30
  <!-- auto:props:begin -->
26
- | 名称 | 类型 | 默认值 | 必填 | 说明 |
27
- | --- | --- | --- | --- | --- |
28
- | `size` | `'sm' \| 'default' \| 'lg'` | `"default"` | – | 尺寸 — 与文字行高匹配,大尺寸用于 Command Palette 等突出展示。 |
31
+
32
+ #### Kbd
33
+
34
+ | 名称 | 类型 | 默认值 | 必填 | 说明 |
35
+ | ------ | --------------------------- | ----------- | ---- | ------------------------------------------------------------- |
36
+ | `size` | `'sm' \| 'default' \| 'lg'` | `"default"` | – | 尺寸 — 与文字行高匹配,大尺寸用于 Command Palette 等突出展示。 |
37
+
38
+ #### KbdGroup
39
+
40
+ | 名称 | 类型 | 默认值 | 必填 | 说明 |
41
+ | ----------- | -------- | ------ | ---- | ----------------------------------------------------- |
42
+ | `separator` | `string` | `""` | – | 组合键之间的分隔符(如 `"+"` / `"→"`),留空时仅用 gap。 |
43
+
29
44
  <!-- auto:props:end -->
30
45
 
46
+ ## 依赖
47
+
48
+ > 以下表格由 `pnpm --filter @teamix-evo/ui gen:meta` 自动生成,数据源是 [`manifest.json`](../../../manifest.json)。**手工编辑 marker 之间的内容会在下次生成时被覆盖**。
49
+
31
50
  <!-- auto:deps:begin -->
51
+
32
52
  ### 同库依赖
33
53
 
34
54
  > `teamix-evo ui add kbd` 时,以下 entry 会被自动连带安装(无需手动 add)。
35
55
 
36
- | Entry | 类型 | 描述 |
37
- | --- | --- | --- |
38
- | `cn` | util | Tailwind className 合并工具(clsx + tailwind-merge) |
56
+ | Entry | 类型 | 描述 |
57
+ | ----- | ---- | -------------------------------------------------- |
58
+ | `cn` | util | Tailwind className 合并工具(clsx + tailwind-merge) |
39
59
 
40
60
  ### npm 依赖
41
61
 
@@ -44,6 +64,7 @@ package: "@teamix-evo/ui"
44
64
  ```bash
45
65
  pnpm add class-variance-authority@^0.7.0
46
66
  ```
67
+
47
68
  <!-- auto:deps:end -->
48
69
 
49
70
  ## AI 生成纪律
@@ -9,7 +9,7 @@ const meta: Meta<typeof Kbd> = {
9
9
  docs: {
10
10
  description: {
11
11
  component:
12
- '键位展示 — 语义化 `<kbd>` 元素,标注快捷键(⌘K / Ctrl + Enter)。单键 + KbdGroup 组合容器,常用于 Command Palette、Tooltip、文档帮助。shadcn 2025-10 新增,antd 体系无对应原子。视觉走 OpenTrek tokens,所有样式来自 `@teamix-evo/design`,无 mock。',
12
+ '键位展示 — 语义化 `<kbd>` 元素,标注快捷键(⌘K / Ctrl + Enter)。单键 + KbdGroup 组合容器,常用于 Command Palette、Tooltip、文档帮助。antd 体系无对应原子。',
13
13
  },
14
14
  },
15
15
  },
@@ -4,11 +4,12 @@ import { cva, type VariantProps } from 'class-variance-authority';
4
4
  import { cn } from '@/utils/cn';
5
5
 
6
6
  const kbdVariants = cva(
7
+ // eslint-disable-next-line teamix-evo/no-arbitrary-tw-value -- physical-key inset shadow; one-off effect not used elsewhere.
7
8
  'pointer-events-none inline-flex select-none items-center gap-1 rounded border bg-muted font-mono tabular-nums text-muted-foreground shadow-[0_1px_0_0_rgba(0,0,0,0.08)]',
8
9
  {
9
10
  variants: {
10
11
  size: {
11
- sm: 'h-4 px-1 text-[10px]',
12
+ sm: 'h-4 px-1 text-xxs',
12
13
  default: 'h-5 px-1.5 text-xs',
13
14
  lg: 'h-6 px-2 text-sm',
14
15
  },
@@ -1,13 +1,14 @@
1
1
  ---
2
2
  id: label
3
3
  name: Label
4
+ displayName: 标签
4
5
  type: component
5
6
  category: foundation
6
7
  since: 0.1.0
7
- package: "@teamix-evo/ui"
8
+ package: '@teamix-evo/ui'
8
9
  ---
9
10
 
10
- # Label
11
+ # Label 标签
11
12
 
12
13
  表单字段标签 — 基于 [`@radix-ui/react-label`](https://www.radix-ui.com/primitives/docs/components/label) 包装。
13
14
  shadcn 原版只继承 Radix 的 `peer-disabled:` 联动;本版本补一条 antd Form.Item 风格的 `required`(红色 `*` 标记)+ 显式 `disabled` prop,适合 label 与目标控件**不直接相邻**的场景。
@@ -27,10 +28,12 @@ shadcn 原版只继承 Radix 的 `peer-disabled:` 联动;本版本补一条 antd
27
28
  > 以下表格由 `pnpm --filter @teamix-evo/ui gen:meta` 自动生成,数据源是 [`label.tsx`](./label.tsx) 的 `LabelProps` interface JSDoc。**手工编辑 marker 之间的内容会在下次生成时被覆盖**。
28
29
 
29
30
  <!-- auto:props:begin -->
30
- | 名称 | 类型 | 默认值 | 必填 | 说明 |
31
- | --- | --- | --- | --- | --- |
32
- | `disabled` | `boolean` | `false` | | 视觉禁用态。除原生 `peer-disabled:` 联动外,显式置 `true` 也会触发禁用样式; 适合 label 与目标控件不直接相邻、无法走 `peer` 约束的场景。 |
33
- | `required` | `boolean` | `false` | – | 必填标记。`true` 时在 children 后追加红色 `*`(语义来自 design destructive token), 配合 `aria-required` 在 input 上一起使用以保证可访问性。 |
31
+
32
+ | 名称 | 类型 | 默认值 | 必填 | 说明 |
33
+ | ---------- | --------- | ------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------ |
34
+ | `disabled` | `boolean` | `false` | – | 视觉禁用态。除原生 `peer-disabled:` 联动外,显式置 `true` 也会触发禁用样式; 适合 label 与目标控件不直接相邻、无法走 `peer` 约束的场景。 |
35
+ | `required` | `boolean` | `false` | – | 必填标记。`true` 时在 children 后追加红色 `*`(语义来自 design destructive token), 配合 `aria-required` 在 input 上一起使用以保证可访问性。 |
36
+
34
37
  <!-- auto:props:end -->
35
38
 
36
39
  ## 依赖
@@ -38,13 +41,14 @@ shadcn 原版只继承 Radix 的 `peer-disabled:` 联动;本版本补一条 antd
38
41
  > 以下表格由 `pnpm --filter @teamix-evo/ui gen:meta` 自动生成,数据源是 [`manifest.json`](../../../manifest.json)。**手工编辑 marker 之间的内容会在下次生成时被覆盖**。
39
42
 
40
43
  <!-- auto:deps:begin -->
44
+
41
45
  ### 同库依赖
42
46
 
43
47
  > `teamix-evo ui add label` 时,以下 entry 会被自动连带安装(无需手动 add)。
44
48
 
45
- | Entry | 类型 | 描述 |
46
- | --- | --- | --- |
47
- | `cn` | util | Tailwind className 合并工具(clsx + tailwind-merge) |
49
+ | Entry | 类型 | 描述 |
50
+ | ----- | ---- | -------------------------------------------------- |
51
+ | `cn` | util | Tailwind className 合并工具(clsx + tailwind-merge) |
48
52
 
49
53
  ### npm 依赖
50
54
 
@@ -53,6 +57,7 @@ shadcn 原版只继承 Radix 的 `peer-disabled:` 联动;本版本补一条 antd
53
57
  ```bash
54
58
  pnpm add @radix-ui/react-label@^2.1.0 class-variance-authority@^0.7.0
55
59
  ```
60
+
56
61
  <!-- auto:deps:end -->
57
62
 
58
63
  > 除上述 props 外,Label 透传所有 `<label>` 原生属性(`htmlFor` / `id` / `aria-*` / `onClick` / ...)。
@@ -1,13 +1,14 @@
1
1
  ---
2
2
  id: masonry
3
3
  name: Masonry
4
+ displayName: 瀑布流
4
5
  type: component
5
6
  category: layout
6
7
  since: 0.1.0
7
- package: "@teamix-evo/ui"
8
+ package: '@teamix-evo/ui'
8
9
  ---
9
10
 
10
- # Masonry
11
+ # Masonry 瀑布流
11
12
 
12
13
  瀑布流 — antd 独有补足。**等价 antd `Masonry`**(v6.0 新)。基于 CSS `column-count` + `break-inside: avoid` 的纯 CSS 实现 — **0 JS、SSR 友好、自动按 children 高度填充列**。
13
14
 
@@ -23,25 +24,33 @@ package: "@teamix-evo/ui"
23
24
  - 严格视觉对齐(按"哪列最矮就填哪列")→ 用 JS-driven masonry(react-masonry-css)
24
25
  - 等宽等高数据流 → `List grid={{column:N}}` / `Item` + Tailwind grid
25
26
 
27
+ ## Props
28
+
26
29
  <!-- auto:props:begin -->
27
- | 名称 | 类型 | 默认值 | 必填 | 说明 |
28
- | --- | --- | --- | --- | --- |
29
- | `columns` | `number` | `3` | | 列数(antd `columns` 并集) — 固定值或响应式断点配置 `{ default, sm, md, lg, xl }`。 **响应式注意**:本组件用 CSS `column-count`,断点匹配靠 Tailwind `@container` 不便, 简化为 fixed 列数。响应式建议直接在外层包 className(如 `md:columns-3 columns-2`)+ `columns={undefined}`。 |
30
- | `gap` | `number` | `16` | – | 列间距(像素) |
30
+
31
+ | 名称 | 类型 | 默认值 | 必填 | 说明 |
32
+ | --------- | -------- | ------ | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
33
+ | `columns` | `number` | `3` | – | 列数(antd `columns` 并集) — 固定值或响应式断点配置 `{ default, sm, md, lg, xl }`。 **响应式注意**:本组件用 CSS `column-count`,断点匹配靠 Tailwind `@container` 不便, 简化为 fixed 列数。响应式建议直接在外层包 className(如 `md:columns-3 columns-2`)+ `columns={undefined}`。 |
34
+ | `gap` | `number` | `16` | – | 列间距(像素)。 |
35
+
31
36
  <!-- auto:props:end -->
32
37
 
38
+ ## 依赖
39
+
33
40
  <!-- auto:deps:begin -->
41
+
34
42
  ### 同库依赖
35
43
 
36
44
  > `teamix-evo ui add masonry` 时,以下 entry 会被自动连带安装(无需手动 add)。
37
45
 
38
- | Entry | 类型 | 描述 |
39
- | --- | --- | --- |
40
- | `cn` | util | Tailwind className 合并工具(clsx + tailwind-merge) |
46
+ | Entry | 类型 | 描述 |
47
+ | ----- | ---- | -------------------------------------------------- |
48
+ | `cn` | util | Tailwind className 合并工具(clsx + tailwind-merge) |
41
49
 
42
50
  ### npm 依赖
43
51
 
44
52
  _无 — 本组件不依赖任何 npm 包。_
53
+
45
54
  <!-- auto:deps:end -->
46
55
 
47
56
  ## AI 生成纪律
@@ -9,7 +9,7 @@ const meta: Meta<typeof Masonry> = {
9
9
  docs: {
10
10
  description: {
11
11
  component:
12
- '瀑布流 — CSS column-count + break-inside: avoid 的 0 JS 实现(图片墙 / 资讯卡片流 / Dashboard 卡片墙)。等价 antd `Masonry`(v6.0 新)。响应式建议外层 className 控制(`md:columns-3`)。视觉走 OpenTrek tokens,所有样式来自 `@teamix-evo/design`,无 mock。',
12
+ '瀑布流 — CSS column-count + break-inside: avoid 的 0 JS 实现(图片墙 / 资讯卡片流 / Dashboard 卡片墙)。等价 antd `Masonry`(v6.0 新)。响应式建议外层 className 控制。',
13
13
  },
14
14
  },
15
15
  },
@@ -55,7 +55,9 @@ export const ColorfulPhotos: Story = {
55
55
  className="rounded-md bg-muted text-center text-xs text-muted-foreground"
56
56
  style={{
57
57
  height: c.h,
58
- background: `linear-gradient(135deg, hsl(${(c.id * 30) % 360}, 60%, 70%), hsl(${(c.id * 30 + 60) % 360}, 60%, 50%))`,
58
+ background: `linear-gradient(135deg, hsl(${
59
+ (c.id * 30) % 360
60
+ }, 60%, 70%), hsl(${(c.id * 30 + 60) % 360}, 60%, 50%))`,
59
61
  }}
60
62
  >
61
63
  <span className="block py-2 text-white/90">photo {c.id + 1}</span>
@@ -44,6 +44,7 @@ const Masonry = React.forwardRef<HTMLDivElement, MasonryProps>(
44
44
  {items.map((child, i) => (
45
45
  <div
46
46
  key={i}
47
+ // eslint-disable-next-line teamix-evo/no-arbitrary-tw-value -- runtime CSS var driven by `gap` prop; consumes per-instance var, not tokenizable.
47
48
  className="mb-[var(--masonry-gap)] break-inside-avoid"
48
49
  style={{ ['--masonry-gap' as string]: `${gap}px` }}
49
50
  >