@bug-on/m3-expressive 1.0.0 → 1.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 (57) hide show
  1. package/CHANGELOG.md +41 -2
  2. package/README.md +20 -18
  3. package/dist/assets/material-symbols-self-hosted.css +27 -26
  4. package/dist/buttons.d.mts +2 -2
  5. package/dist/buttons.d.ts +2 -2
  6. package/dist/buttons.js +30 -1
  7. package/dist/buttons.js.map +1 -1
  8. package/dist/buttons.mjs +30 -1
  9. package/dist/buttons.mjs.map +1 -1
  10. package/dist/core-Bc5Wj_pc.d.ts +497 -0
  11. package/dist/core-D4048_K5.d.mts +497 -0
  12. package/dist/core.d.mts +6 -422
  13. package/dist/core.d.ts +6 -422
  14. package/dist/core.js +137 -68
  15. package/dist/core.js.map +1 -1
  16. package/dist/core.mjs +138 -69
  17. package/dist/core.mjs.map +1 -1
  18. package/dist/feedback.d.mts +54 -54
  19. package/dist/feedback.d.ts +54 -54
  20. package/dist/feedback.js.map +1 -1
  21. package/dist/feedback.mjs.map +1 -1
  22. package/dist/index.css +9 -1
  23. package/dist/index.d.mts +66 -4
  24. package/dist/index.d.ts +66 -4
  25. package/dist/index.js +214 -94
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.mjs +214 -95
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/layout.d.mts +40 -40
  30. package/dist/layout.d.ts +40 -40
  31. package/dist/layout.js +34 -5
  32. package/dist/layout.js.map +1 -1
  33. package/dist/layout.mjs +34 -5
  34. package/dist/layout.mjs.map +1 -1
  35. package/dist/material-symbols-self-hosted.css +27 -26
  36. package/dist/{md3-DFhj-NZj.d.mts → md3-Dty-Qcad.d.mts} +7 -1
  37. package/dist/{md3-DFhj-NZj.d.ts → md3-Dty-Qcad.d.ts} +7 -1
  38. package/dist/navigation.js.map +1 -1
  39. package/dist/navigation.mjs.map +1 -1
  40. package/dist/overlays.d.mts +2 -2
  41. package/dist/overlays.d.ts +2 -2
  42. package/dist/overlays.js +2 -2
  43. package/dist/overlays.js.map +1 -1
  44. package/dist/overlays.mjs +2 -2
  45. package/dist/overlays.mjs.map +1 -1
  46. package/dist/pickers.d.mts +241 -243
  47. package/dist/pickers.d.ts +241 -243
  48. package/dist/pickers.js +1 -1
  49. package/dist/pickers.js.map +1 -1
  50. package/dist/pickers.mjs +1 -1
  51. package/dist/pickers.mjs.map +1 -1
  52. package/dist/{side-sheet-modal-BY6VCC8p.d.mts → side-sheet-modal-64FGhDxL.d.mts} +20 -21
  53. package/dist/{side-sheet-modal-CglP6KYA.d.ts → side-sheet-modal-Bd5Qqvp9.d.ts} +20 -21
  54. package/dist/{split-button-trailing-uncheckable-C5CLCIKP.d.ts → split-button-trailing-uncheckable-BkPbiBo3.d.ts} +169 -152
  55. package/dist/{split-button-trailing-uncheckable-MXj_kyNt.d.mts → split-button-trailing-uncheckable-D_PLPb-u.d.mts} +169 -152
  56. package/dist/typography.css +5 -0
  57. package/package.json +5 -5
@@ -1,5 +1,5 @@
1
1
  import { HTMLMotionProps } from 'motion/react';
2
- import { M as MD3ColorStyle, b as MD3Size, a as MD3Shape } from './md3-DFhj-NZj.js';
2
+ import { M as MD3ColorStyle, b as MD3Size, a as MD3Shape } from './md3-Dty-Qcad.js';
3
3
  import * as React$1 from 'react';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
 
@@ -170,77 +170,105 @@ declare const BUTTON_COLOR_TOKENS: {
170
170
  readonly selected: "bg-transparent text-m3-primary";
171
171
  readonly unselected: "bg-transparent text-m3-primary";
172
172
  };
173
+ /**
174
+ * High-chroma tertiary tone. Use for hero CTAs and expressive moments where
175
+ * a distinct accent beyond primary is needed (e.g., hero chip, highlight fab).
176
+ */
177
+ readonly tertiary: {
178
+ readonly default: "bg-m3-tertiary text-m3-on-tertiary";
179
+ readonly selected: "bg-m3-tertiary text-m3-on-tertiary";
180
+ readonly unselected: "bg-m3-tertiary-container text-m3-on-tertiary-container";
181
+ };
182
+ /**
183
+ * Brand-stable primary fixed. Hue stays consistent across light and dark modes.
184
+ * Ideal for badges, pill chips, and elements that must carry the brand color
185
+ * regardless of the active theme.
186
+ */
187
+ readonly "primary-fixed": {
188
+ readonly default: "bg-m3-primary-fixed text-m3-on-primary-fixed";
189
+ readonly selected: "bg-m3-primary-fixed text-m3-on-primary-fixed";
190
+ readonly unselected: "bg-m3-primary-fixed text-m3-on-primary-fixed-variant";
191
+ };
192
+ /**
193
+ * Brand-stable tertiary fixed. Use for special-state indicators, achievement
194
+ * badges, or accent pills that need a fixed tertiary hue across themes.
195
+ */
196
+ readonly "tertiary-fixed": {
197
+ readonly default: "bg-m3-tertiary-fixed text-m3-on-tertiary-fixed";
198
+ readonly selected: "bg-m3-tertiary-fixed text-m3-on-tertiary-fixed";
199
+ readonly unselected: "bg-m3-tertiary-fixed text-m3-on-tertiary-fixed-variant";
200
+ };
173
201
  };
174
202
 
175
203
  type ButtonGroupVariant = "standard" | "connected" | "navbar";
176
204
  type ButtonGroupOrientation = "horizontal" | "vertical";
177
205
  /**
178
- * Thuộc tính truyền vào cho thành phần nhóm nút (Button Group).
206
+ * Props for ButtonGroup component.
179
207
  */
180
208
  interface ButtonGroupProps extends React$1.FieldsetHTMLAttributes<HTMLFieldSetElement> {
181
209
  /**
182
- * Cấu trúc hiển thị của nhóm nút:
183
- * - `standard`: Các nút cách xa và có khoảng cách độc lập với nhau (gap).
184
- * - `connected`: Các nút nối liền khung viền với nhau để tạo thành dạng Segmented Button.
185
- * - `navbar`: Nút hiển thị dưới dạng thanh điều hướng với active pill chuyển động (Sliding Indicator).
210
+ * Display variant of the button group:
211
+ * - `standard`: Independent buttons with gap spacing.
212
+ * - `connected`: Connected buttons sharing borders (Segmented Button).
213
+ * - `navbar`: Navigation bar variant with animated active sliding indicator pill.
186
214
  * @default "standard"
187
215
  */
188
216
  variant?: ButtonGroupVariant;
189
217
  /**
190
- * Hướng sắp xếp của các nút trong nhóm.
218
+ * Layout orientation of buttons in group.
191
219
  * @default "horizontal"
192
220
  */
193
221
  orientation?: ButtonGroupOrientation;
194
222
  /**
195
- * Đặt thành `true` nếu bạn muốn nhóm hiển thị dạng `standard` giãn đều lấp đầy toàn bộ khu vực chứa (container).
223
+ * When `true`, expands `standard` group to stretch full width of container.
196
224
  * @default false
197
225
  */
198
226
  fullWidth?: boolean;
199
227
  /**
200
- * Áp dụng thống nhất chung một kích thước (`size`) cho tất cả các con trong nhóm (ghi đè kích thước lẻ từng nút).
228
+ * Applies unified `size` to all child buttons in group (overrides individual button sizes).
201
229
  */
202
230
  size?: MD3Size;
203
231
  /**
204
- * Bật/tắt hiệu ứng thu phóng độ rộng / khoảng đệm (Morphing Width) khi nhấn vào các nút (áp dụng cho nhóm `standard`).
232
+ * Toggles width expansion/padding animation (Morphing Width) when buttons are pressed (`standard` group).
205
233
  * @default true
206
234
  */
207
235
  morphingWidth?: boolean;
208
236
  /**
209
- * Tỷ lệ mở rộng chiều rộng của nút khi được nhấn (áp dụng cho nhóm `standard` ngang).
210
- * Theo MD3 Spec, mặc định 0.15 (15%).
237
+ * Expansion ratio for button width on press (`standard` horizontal group).
238
+ * Per MD3 Spec, default is 0.15 (15%).
211
239
  * @default 0.15
212
240
  */
213
241
  expandedRatio?: number;
214
242
  /**
215
- * Tự động hiển thị biểu tượng (icon) Check khi một nút trạng thái nằm trong nhóm được chỉ định là `selected={true}`.
243
+ * Automatically displays Check icon when a child button has `selected={true}`.
216
244
  * @default false
217
245
  */
218
246
  showCheck?: boolean;
219
247
  /**
220
- * Điều khiển hành vi hiển thị Icon (áp dụng chính cho `navbar`).
221
- * - `selected`: Chỉ hiển thị icon trên mục được chọn.
222
- * - `all`: Hiển thị trên tất cả.
223
- * - `none`: Ẩn toàn bộ icon.
248
+ * Controls icon display behavior (primarily for `navbar`).
249
+ * - `selected`: Display icon only on selected item.
250
+ * - `all`: Display on all items.
251
+ * - `none`: Hide all icons.
224
252
  */
225
253
  iconBehavior?: "selected" | "all" | "none";
226
254
  /**
227
- * Điều khiển hành vi hiển thị Label (áp dụng chính cho `navbar`).
228
- * - `selected`: Chỉ hiển thị label trên mục được chọn.
229
- * - `all`: Hiển thị trên tất cả.
230
- * - `none`: Ẩn toàn bộ label.
255
+ * Controls label display behavior (primarily for `navbar`).
256
+ * - `selected`: Display label only on selected item.
257
+ * - `all`: Display on all items.
258
+ * - `none`: Hide all labels.
231
259
  */
232
260
  labelBehavior?: "selected" | "all" | "none";
233
261
  /**
234
- * Tùy chọn: Bật chế độ Active Morphing (dựa trên Selection).
235
- * Khi `true`, các nút sẽ tự động co dãn (tăng/giảm width) dựa trên việc nút nào đang được chọn,
236
- * tạo hiệu ứng thay đổi kích thước mượt mà theo trạng thái.
237
- * Khi `false` hoặc `undefined`, Group sẽ hoạt động dựa trên `isPressed` (nhấn chuột) như mặc định.
262
+ * Enable Active Morphing mode (selection-based).
263
+ * When `true`, buttons automatically expand/contract based on selection state,
264
+ * creating smooth size transitions.
265
+ * When `false` or `undefined`, Group responds to `isPressed` by default.
238
266
  */
239
267
  activeMorphing?: boolean;
240
268
  /**
241
- * Class CSS tùy chỉnh áp dụng cho từng button con trong nhóm.
242
- * Hữu ích để thay đổi padding, min-width hoặc các thuộc tính khác một cách linh hoạt.
243
- * Đối với variant `navbar`, class này sẽ được ưu tiên hơn so với các padding mặc định.
269
+ * Custom CSS class applied to individual child buttons in group.
270
+ * Useful for customizing padding, min-width, or other layout properties.
271
+ * For `navbar` variant, overrides default padding styles.
244
272
  */
245
273
  itemClassName?: string;
246
274
  }
@@ -287,236 +315,225 @@ declare const ExtendedFAB: React$1.NamedExoticComponent<Omit<ExtendedFABProps, "
287
315
 
288
316
  type MotionButtonProps$1 = Omit<HTMLMotionProps<"button">, "children" | "color">;
289
317
  /**
290
- * Tham số Props dùng cho component thao tác nổi `FAB`.
318
+ * Props for `FAB` Floating Action Button component.
291
319
  *
292
320
  * @remarks
293
- * - Đảm bảo rằng đối với loại FAB chỉ show ra mỗi con Icon mà không có nhãn hiển thị (icon-only), bắt buộc phải có thuộc tính `aria-label` nhằm phục vụ (accessibility).
294
- * - hình thể mở rộng (khi `extended={true}`), phần nội dung truyền vào `children` chính chuỗi Text được thể hiện cùng nút, nó sẽ khiến nút button có label mặc định nên bạn thể chém bớt tham số `aria-label`.
295
- * - Thuộc tính cờ `lowered` (chìm) giúp giáng cấp hiệu ứng tạo bóng Shadow của thẻ, rải mảng cái shadow theo phong thái MD3 "lowered" FAB;
296
- * sử dụng khi nút FAB này vốn bị bọc bên trong bề mặt chìm đè lên component gì khác mà vốn tụi nó đã nhún ở mực sâu (Ví dụ Bottom App Bar) để thiết lập Hierarchy hài hoà.
321
+ * - Ensure icon-only FABs specify `aria-label` for accessibility.
322
+ * - In extended mode (`extended={true}`), text passed to `children` acts as the label, so `aria-label` may be omitted if children is string.
323
+ * - `lowered` prop reduces the container shadow to MD3 "lowered" FAB specification;
324
+ * useful when placed on surface containers like Bottom App Bars for visual balance.
297
325
  *
298
326
  * @see https://m3.material.io/components/floating-action-button/overview
299
327
  */
300
328
  interface FABProps extends MotionButtonProps$1 {
301
329
  /**
302
- * Icon đại diện render — thông thường truyền thẻ component Icon.
303
- * Sẽ được tráo đổi thành Spinner tự động quay khi giá trị `loading={true}`.
330
+ * Icon element to render — typically an Icon component.
331
+ * Swapped for loading spinner when `loading={true}`.
304
332
  */
305
333
  icon: React$1.ReactNode;
306
334
  /**
307
- * Kích thước hiển thị FAB. Tuân chuẩn.
308
- * - `sm`: Small (40dp) — Được khuyên dùng cho các không gian kín/trong lòng Content.
309
- * - `md`: Regular (56dp) — Action thứ yếu hoặc tiêu điểm màn hình. (Phần đông người dùng xài).
310
- * - `lg`: Large (96dp) — Trọng tâm thao tác quan trọng lớn nhát.
311
- * - `xl`: Extra-large (136dp) — Gây tiếng vang, dạng Spotlight cực bùng nổ của app.
335
+ * FAB size variant according to MD3 specification.
336
+ * - `sm`: Small (40dp) — Recommended for tight layouts / inside content.
337
+ * - `md`: Regular (56dp) — Standard primary action.
338
+ * - `lg`: Large (96dp) — High-emphasis action.
339
+ * - `xl`: Extra-large (136dp) — Spotlight action element.
312
340
  * @default "md"
313
341
  */
314
342
  size?: "sm" | "md" | "lg" | "xl";
315
343
  /**
316
- * Container vai trò hệ thống tông màu MD3 dùng phết nền.
344
+ * MD3 color role container style.
317
345
  * @default "primary"
318
346
  */
319
347
  colorStyle?: "primary" | "secondary" | "tertiary" | "surface";
320
348
  /**
321
- * Kích hoạt khi giá trị được đổi là `true`, sẽ diễn tả Animation bung chữ kèm theo độ dãn hình dài cho cái FAB.
322
- * Chiều rộng tự cơi nới để thích ứng chuỗi `children`.
349
+ * When `true`, expands FAB to display label text alongside icon.
350
+ * Width automatically expands to fit `children`.
323
351
  * @default false
324
352
  */
325
353
  extended?: boolean;
326
354
  /**
327
- * Nơi đón lấy chữ được render cùng khi `extended={true}` bật lên.
328
- * Khuyến nghị là Text string thuần.
355
+ * Label content rendered when `extended={true}`.
356
+ * Plain string recommended.
329
357
  */
330
358
  children?: React$1.ReactNode;
331
359
  /**
332
- * Nhấn `true`, thì rút lại shadow đi một cấp xuống độ nổi nông cạn.
333
- * Mảng bám ở Bottom bar hay Top bar Surface để ránh rườm rà.
360
+ * When `true`, reduces container shadow to lowered elevation.
334
361
  * @default false
335
362
  */
336
363
  lowered?: boolean;
337
364
  /**
338
- * Nhấp chuột sang `true`, đổi Icon thành cối xay Spinner chờ kết quả. Đồng loạt chặn click tương tác.
365
+ * When `true`, displays loading spinner and disables click interactions.
339
366
  * @default false
340
367
  */
341
368
  loading?: boolean;
342
369
  /**
343
- * 2 chuẩn hình của Loading chờ.
370
+ * Loading spinner variant.
344
371
  * @default "loading-indicator"
345
372
  */
346
373
  loadingVariant?: "loading-indicator" | "circular";
347
374
  /**
348
- * Hiện thẻ FAB lên layout không (Kiểm soát bằng motion scale Entrance/Exit).
375
+ * Controls FAB visibility in layout using scale motion animation.
349
376
  * @default true
350
377
  */
351
378
  visible?: boolean;
352
379
  }
353
380
  /**
354
- * Interface cho component bọc thẻ `FABPosition` Gắn lớp absolute position nhét cục FAB vào một góc cố định của góc nào đó tại trình duyệt/bề mặt render.
381
+ * Props for `FABPosition` layout wrapper component.
382
+ * Position absolute wrapper to anchor FAB to a screen corner.
355
383
  *
356
384
  * @see {@link FABPosition}
357
385
  */
358
386
  interface FABPositionProps {
359
387
  /**
360
- * Góc để niêm chặt nút FAB.
388
+ * Screen corner position for FAB.
361
389
  * @default "bottom-right"
362
390
  */
363
391
  position?: "bottom-right" | "bottom-left" | "top-right" | "top-left";
364
- /** Kẹp một nùi element. Mong chờ thả Node `<FAB>` vào đây.*/
392
+ /** Child elements typically a `<FAB>` component */
365
393
  children: React$1.ReactNode;
366
- /** CSS Class hỗ trợ chỉnh override */
394
+ /** Additional CSS class */
367
395
  className?: string;
368
396
  }
369
397
  /**
370
- * Element bao bọc thẻ định vị Absolute cho component `<FAB>`.
398
+ * Absolute position wrapper component for `<FAB>`.
371
399
  *
372
- * Component dùng để cắm phao Neo cái FAB vào sát ở góc của screen kèm theo một cái offset space theo responsive an toàn mà lại trơn chu nhạy nhẽo.
373
- * Nhưng quy tắc gốc đó là phần tử bao bọc cha mẹ của nó PHẢI có thẻ tag css `position: relative` (hoặc ở cấp tổ tiêm của trang nào đó phải đẻ gốc rễ ra posisition).
400
+ * Anchors FAB to a screen corner with responsive offset padding.
401
+ * Requires parent element to have `position: relative`.
374
402
  *
375
- * @example
376
- * ```tsx
377
- * <div className="relative min-h-screen">
378
- * // Cái nút sẽ xà xuống dưới cùng bên lề Trái
379
- * <FABPosition position="bottom-left">
380
- * <FAB icon={<Icon name="edit" />} aria-label="Compose New Mail" />
381
- * </FABPosition>
382
- * </div>
383
- * ```
384
- *
385
- * @see {@link FAB}
386
403
  * @see https://m3.material.io/components/floating-action-button/guidelines
387
404
  */
388
405
  declare function FABPosition({ position, children, className, }: FABPositionProps): react_jsx_runtime.JSX.Element;
389
406
  /**
390
- * Action nổi chính theo phong cách MD3 Expressive Floating Action Button (FAB).
407
+ * Primary Floating Action Button (FAB) component adhering to MD3 Expressive.
391
408
  *
392
- * Phơi nhiễm các action tạo nhịp điệu kích hoạt cho người sử dụng với đủ bộ trang hoàn trọn kích thước Size (SM->XL),
393
- * mang nhiều màu sắc Color role khác biệt, cung cấp một sức nén cho Label để kéo toẹt cái ống dài ra (gọi là Dạng Mở Rộng - Extended) tạo nên hành động sinh động,
394
- * Trạng thái load/nhấp hiện xuất cùng animation thu scale thoát cảnh bắt mắt đầy nghệ thuật.
409
+ * Supports sizes from SM to XL, multiple color roles, extended label expansion,
410
+ * loading states, and entrance/exit scale motion animations.
395
411
  *
396
412
  * @remarks
397
- * - Chỉ định bắt buộc `aria-label` cho những mẫu icon bị đơn côi trơ trọi (icon-only FABs).
398
- * - Trường hợp xài mode Mở Rộng qua việc truyền hàm `extended={true}`, nút FAB này tự ngộ nhận thân thế, lấy `children` dùng làm Aria label luôn hễ như `children` đó đang chứa text string.
399
- * Khi ấy bạn tha hồ cắt bỏ thuộc tính `aria-label` ra.
400
- * - Lúc cho biến mất (`visible={false}`), bộ nút tung chiêu lùi về sau làm quả rút bóng thoát Scale-out qua effect spring uyển chuyển.
401
- * - Sài kèm `FABPosition` bao đùm nó lại nếu bạn muốn xích nó cố định ngấm chân sâu góc màn hình hiển thị.
413
+ * - Requires `aria-label` for icon-only FABs.
414
+ * - When `extended={true}`, string `children` is automatically used as the accessible label.
415
+ * - Animates scale out when `visible={false}` using fluid spring animation.
416
+ * - Combine with `FABPosition` to anchor to screen corners.
402
417
  *
403
418
  * @example
404
419
  * ```tsx
405
- * // FAB bản, nhỏ xinh, chỉ hiện icon.
406
- * <FAB icon={<Icon name="search" />} aria-label="Nhấn tìm kiếm" size="sm" />
420
+ * // Basic small icon-only FAB
421
+ * <FAB icon={<Icon name="search" />} aria-label="Search" size="sm" />
407
422
  *
408
- * // Dịch sang dòng Extended dòng caption chữ dài thòn
423
+ * // Extended FAB with label
409
424
  * const [isOpen, setOpen] = React.useState(false);
410
425
  * <FAB
411
426
  * icon={<Icon name="edit" />}
412
427
  * extended={isOpen}
413
428
  * onClick={() => setOpen(!isOpen)}
414
429
  * >
415
- * Viết tâm thư
430
+ * Compose
416
431
  * </FAB>
417
432
  *
418
- * // FAB to lớn nhất dùng trạng thái chờ load Submit lên Server
433
+ * // Large FAB with loading state
419
434
  * <FAB
420
435
  * icon={<Icon name="upload" />}
436
+
421
437
  * size="lg"
422
438
  * loading={isUploading}
423
439
  * colorStyle="secondary"
424
- * aria-label="Upload Files lên mây xanh"
440
+ * aria-label="Upload files"
425
441
  * />
426
442
  *
427
- * // Cố định dưới chân tay phải
443
+ * // Fixed at bottom right
428
444
  * <FABPosition position="bottom-right">
429
- * <FAB icon={<Icon name="add" />} aria-label="Dấu Cộng sinh nảy" />
445
+ * <FAB icon={<Icon name="add" />} aria-label="Add item" />
430
446
  * </FABPosition>
431
447
  * ```
448
+
432
449
  *
433
450
  * @see https://m3.material.io/components/floating-action-button/overview
434
451
  */
435
452
  declare const FAB: React$1.NamedExoticComponent<Omit<FABProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
436
453
 
437
454
  /**
438
- * Định dạng dữ liệu cho từng hành động (item) trong biểu mẫu menu của FAB.
455
+ * Data interface for each action item in FAB menu.
439
456
  *
440
- * Nếu bỏ qua thuộc tính `label`, item sẽ render dạng ô vuông chỉ có icon.
457
+ * If `label` is omitted, renders as an icon-only item.
441
458
  */
442
459
  interface FABMenuItemData {
443
- /** Một ID duy nhất để dùng cho key react và quản lý focus. */
460
+ /** Unique ID used for React keys and focus tracking. */
444
461
  id: string;
445
- /** Label hiển thị cạnh icon (tuỳ chọn). Không thêm thuộc tính này nếu muốn hiển thị chỉ có icon (icon-only). */
462
+ /** Label displayed adjacent to icon (optional). Omit for icon-only item. */
446
463
  label?: string;
447
- /** Node của Icon thường một component SVG Icon duy nhất. */
464
+ /** Icon nodetypically an SVG icon component. */
448
465
  icon: React$1.ReactNode;
449
- /** Gọi hàm ngay lập tức khi item được kích hoạt (click hoặc nhấn Enter/Phím cách). */
466
+ /** Callback invoked when item is activated (click, Enter, or Space). */
450
467
  onClick: () => void;
451
468
  /**
452
- * Khi `true`, hiệu hoá item về mặt hình thức lẫn tương tác rẽ nhánh.
453
- * Vẫn dùng `aria-disabled` thay HTML `disabled` nhằm giữ lấy được focus phục vụ cho accessibility.
469
+ * When `true`, visually and interactively disables the item.
470
+ * Uses `aria-disabled` instead of HTML `disabled` to preserve focusability for accessibility.
454
471
  * @default false
455
472
  */
456
473
  disabled?: boolean;
457
- /** Thêm CSS classes bổ sung dùng cho wrapper chính của item. */
474
+ /** Additional CSS class names for item wrapper. */
458
475
  className?: string;
459
476
  }
460
477
  /**
461
- * Các props điều khiển Component chính `FABMenu`.
478
+ * Props controlling the main `FABMenu` component.
462
479
  *
463
480
  * @remarks
464
- * FABMenu quản lý vòng đời trạng thái mở/đóng menu (open/close), quản lý focus, điều khiển phím,
465
- * điều hướng hiệu ứng chuyển động. Trạng thái `expanded` được truyền từ ngoài (controlled state),
466
- * do đó bạn có thể quản lý qua react state, hoặc dùng router hay business logic khác.
481
+ * FABMenu manages menu open/close lifecycle, focus trapping, keyboard control,
482
+ * and staggered motion transitions. `expanded` state is controlled externally.
467
483
  */
468
484
  interface FABMenuProps {
469
- /** FAB Menu đang mở (mở rộng)/hiển thị hay không. */
485
+ /** Whether the FAB Menu is open (expanded). */
470
486
  expanded: boolean;
471
- /** Hàm handler kích hoạt khi Toggle FAB được người dùng tương tác, hoặc khi dismiss backdrop. */
487
+ /** Callback invoked when Toggle FAB is interacted with or backdrop dismissed. */
472
488
  onToggle: (expanded: boolean) => void;
473
- /** Danh sách các action items (Spec MD3 đề nghị 2-6 item là hoàn hảo). */
489
+ /** List of action items (MD3 spec recommends 26 items). */
474
490
  items: FABMenuItemData[];
475
491
  /**
476
- * Vai trò màu (color role container) MD3 cho cái nút FAB lẫn các menu items.
492
+ * MD3 container color role for trigger FAB and menu items.
477
493
  * @default "primary"
478
494
  */
479
495
  colorVariant?: "primary" | "secondary" | "tertiary";
480
496
  /**
481
- * Kích cỡ khởi tạo cho cái ToggleFAB (FAB biến hình thành cục đóng dấu X khi nó expanded).
497
+ * Initial size variant for ToggleFAB (morphs into close icon when expanded).
482
498
  * @default "baseline"
483
499
  */
484
500
  fabSize?: "baseline" | "medium" | "large";
485
501
  /**
486
- * Căn lề của danh sách menu items tương quan với cái Toggle FAB.
487
- * - `"end"`: Các items dồn hết theo lề phía tay phải (trailing edge, default cực hữu hiệu đối với RTL design).
488
- * - `"start"`: Các items dồn hết dọc theo lề trái.
489
- * - `"center"`: Các item sẽ được căn ra giữa chiều dọc, căn giữa tâm khối với cái FAB.
502
+ * Menu items alignment relative to Toggle FAB.
503
+ * - `"end"`: Items align to right edge (trailing edge, recommended for RTL).
504
+ * - `"start"`: Items align along left edge.
505
+ * - `"center"`: Items align vertically centered above FAB.
490
506
  * @default "end"
491
507
  */
492
508
  alignment?: "start" | "end" | "center";
493
- /** Thuộc tính cho CSS component root để đè. */
509
+ /** Custom CSS className for root component. */
494
510
  className?: string;
495
511
  /**
496
- * Nếu `true`, khi menu đang hiện ra, click chuột ra phía sau (màn xám mờ backdrop) để đóng menu.
512
+ * When `true`, clicking backdrop overlay closes menu.
497
513
  * @default true
498
514
  */
499
515
  closeOnBackdropClick?: boolean;
500
516
  /**
501
- * Nếu `true`, focus sẽ tự động chạy xuống item CUỐI (sát bên trên cái nút FAB) khi menu vừa loé mờ ra.
502
- * Nếu `false`, focus sẽ bay lên item ĐẦU TIÊN của danh sách (cao nhất trên màn hình).
517
+ * When `true`, focus automatically moves to the LAST item (closest above FAB) when expanded.
518
+ * If `false`, focus moves to the FIRST item in list.
519
+
503
520
  * @default true
504
521
  */
505
522
  focusLast?: boolean;
506
- /** Bắt buộc truyền `aria-label` cho ToggleFAB để đáp ứng Accessibility. */
523
+ /** Required `aria-label` for ToggleFAB for accessibility. */
507
524
  "aria-label"?: string;
508
525
  }
509
526
  /**
510
- * Props thuộc component `ToggleFAB` đứng độc lập.
527
+ * Props for standalone `ToggleFAB` component.
511
528
  */
512
529
  interface ToggleFABProps {
513
- /** Nút đang trong trạng thái được kích hoạt check (expanded). */
530
+ /** Whether the button is in expanded/active state. */
514
531
  expanded: boolean;
515
- /** Gọi khi xảy ra sự kiện Toggle nút. */
532
+ /** Callback fired when button toggle state changes. */
516
533
  onToggle: (expanded: boolean) => void;
517
534
  /**
518
- * Function sinh Icon - nhận về tiến độ `progress` trong khoảng `0` -> `1` (Từ Chưa Expanded -> Đã Expanded)
519
- * Dùng cho các hiệu ứng morphing Icon khi animtion render (VD: Từ Cộng thành Đóng).
535
+ * Icon generator function receiving `progress` between `0` -> `1` (collapsed -> expanded).
536
+ * Useful for icon morphing effects during animation (e.g., plus to close icon).
520
537
  *
521
538
  * @example
522
539
  * ```tsx
@@ -524,47 +541,47 @@ interface ToggleFABProps {
524
541
  * ```
525
542
  */
526
543
  icon: (progress: number) => React$1.ReactNode;
527
- /** Vai trò màu container chuẩn MD3. @default "primary" */
544
+ /** MD3 container color role. @default "primary" */
528
545
  colorVariant?: "primary" | "secondary" | "tertiary";
529
- /** Kích thước của cục FAB ban đầu (Sau khi nhấn sẽ thu tròn). @default "baseline" */
546
+ /** Initial FAB size variant. @default "baseline" */
530
547
  fabSize?: "baseline" | "medium" | "large";
531
- /** CSS Class linh tinh bổ sung thêm. */
548
+ /** Additional CSS class name. */
532
549
  className?: string;
533
- /** Thuộc tính đọc thẻ accessibility. Bắt buộc có. */
550
+ /** Accessible label requirement. Required. */
534
551
  "aria-label"?: string;
535
- /** Kiểm soát giá trị của ID để link với menu qua aria-controls. */
552
+ /** ID link for aria-controls attribute to reference menu. */
536
553
  "aria-controls"?: string;
537
- /** Trỏ id component. */
554
+ /** Component ID. */
538
555
  id?: string;
539
556
  }
540
557
  /**
541
- * Props thuộc component một món item đơn lẻ `FABMenuItem`.
558
+ * Props for an individual `FABMenuItem`.
542
559
  */
543
560
  interface FABMenuItemProps {
544
- /** Node của icon hiện. */
561
+ /** Icon node to display. */
545
562
  icon: React$1.ReactNode;
546
- /** Tên nhãn tả kế bên icon cho item này. Hoặc ẩn nó đi nếu không mong đợi. */
563
+ /** Descriptive label text adjacent to icon. */
547
564
  label?: string;
548
- /** Hàm bắn ra khi item được kích. */
565
+ /** Callback fired when item is clicked. */
549
566
  onClick: () => void;
550
- /** hiệu hóa hành vi tương tác item mà vẫn cho phép bàn phím tab bấm dính lấy focus. @default false */
567
+ /** Disables interaction while keeping element focusable in tab order. @default false */
551
568
  disabled?: boolean;
552
- /** Container tông màu. @default "primary" */
569
+ /** Container color role. @default "primary" */
553
570
  colorVariant?: "primary" | "secondary" | "tertiary";
554
571
  /** Custom CSS className. */
555
572
  className?: string;
556
- /** Số index liệt trong mảng dùng tính render delay (Dành cho animation cấu trúc `custom`). */
573
+ /** Item index used for staggered animation delay. */
557
574
  index?: number;
558
- /** Tổng danh sách items mảng. */
575
+ /** Total items count in menu array. */
559
576
  totalItems?: number;
560
- /** Giá trị logic `tabIndex` dùng điều khiển thao tác phím Tab thủ công. */
577
+ /** Logic `tabIndex` value for manual keyboard navigation. */
561
578
  tabIndex?: number;
562
579
  }
563
580
  /**
564
- * Nút Toggle FAB (Biến hình) thể được dùng độc lập đứng một mình (standalone) hoặc kết nối để kích hoạt mở cả nùi Menu ở dưới con `FABMenu`.
581
+ * Toggle FAB button (Morphing FAB) usable as standalone or trigger for `FABMenu`.
565
582
  *
566
- * Sức ép hiệu ứng kích thước khung nền sẽ chuyển từ vuôn/vát cạnh sang hình tròn hẵn (square → circle), chuyển biến cả màu sắc
567
- * khi mà cờ `expanded` chuyển tiếp từ false sang → true.
583
+ * Container shape transitions from squircle to circle (square → circle) and shifts colors
584
+ * when `expanded` state changes from false → true.
568
585
  *
569
586
  * @example
570
587
  * ```tsx
@@ -580,45 +597,45 @@ interface FABMenuItemProps {
580
597
  */
581
598
  declare const ToggleFAB: React$1.NamedExoticComponent<ToggleFABProps & React$1.RefAttributes<HTMLButtonElement>>;
582
599
  /**
583
- * Một item thực hiện một loại hành động duy nhất trong `FABMenu`.
600
+ * Single action item within a `FABMenu`.
584
601
  *
585
- * Render hình dạng viên thuốc bao quanh icon cùng với label diễn giải.
586
- * Khi `label` bỏ trống, sẽ render thành một cục thẻ gạch ốp màu vuông vức chứa chữ mỗi cái icon.
587
- * Component chứa gợn sóng MD3 Ripple cùng 48dp chuẩn vùng target đụng diện chuẩn WCAG 2.5.5 cho cảm ứng.
602
+ * Renders a pill shape enclosing icon and optional label text.
603
+ * When `label` is omitted, renders as a square item containing only icon.
604
+ * Includes MD3 Ripple and 48dp touch target area per WCAG 2.5.5 touch target guidelines.
588
605
  *
589
606
  * @remarks
590
- * Những thành phần khi bị tắt (vô hiệu tương tác) thì chỉ được dùng role `aria-disabled="true"` lớp div bề mặt thay vì lấy
591
- * thuộc tính gốc `disabled` của HTML. Nhờ đó, item tuy xám mờ không bấm được phím chuột vẫn sẽ có khả năng focus qua vòng đời tab phím bàn phím
592
- * (quy chuẩn chặt chẽ của Material Design 3).
607
+ * Disabled items use `aria-disabled="true"` rather than native HTML `disabled`
608
+ * so they remain focusable in the tab sequence per MD3 specification.
593
609
  */
594
610
  declare function FABMenuItem({ icon, label, onClick, disabled, colorVariant, className, tabIndex, }: FABMenuItemProps): react_jsx_runtime.JSX.Element;
595
611
  /**
596
612
  * MD3 Expressive FAB Menu.
597
613
  *
598
- * Bộ mở rộng Floating Action Button. Khi tương tác bật vào toggle-button (FAB con lai), sẽ trút ra mớ tác vụ menu ở xếp dọc (hoặc lan ra) từ trên đè ngược xuống trên nó.
614
+ * Floating Action Button expansion menu. Toggling trigger button reveals vertically stacked action items.
599
615
  *
600
- * Accessibility thực thi chuẩn MD3 toàn phần:
601
- * - thẻ `role="menu"` trang bị cho thẻ hộp div làm luống container
602
- * - trang bị thẻ `role="menuitem"` trên mảng items thành phần con
603
- * - Lifecycle Focus cho trải nghiệm hoàn mỹ: Mở phím bật -> Focus thẳng lên item cao/thấp đầu/cuối cùng menu; Đóng tắt menu -> Focus trả về ngược lại ToggleFAB
604
- * - Tính năng Bàn Phím: Lách Escape nhấn tắt nhắm, Nhấn phím hướng lên-xuống(ArrowUp/Down) để di chuyển, Móc Tab(hoặc Shift+Tab) nhảy lăng quăng qua các item.
616
+ * Full MD3 Accessibility implementation:
617
+ * - `role="menu"` assigned to container
618
+ * - `role="menuitem"` assigned to child action items
619
+ * - Focus lifecycle management: Open -> Focus first/last menu item; Close -> Restore focus to ToggleFAB
620
+ * - Keyboard navigation: Escape key closes menu, ArrowUp/Down navigates items, Tab moves focus.
605
621
  *
606
622
  * @example
607
623
  * ```tsx
608
624
  * const [open, setOpen] = React.useState(false);
609
625
  *
610
626
  * const items = [
611
- * { id: 'share', icon: <Icon name="share" />, label: 'Chia sẻ', onClick: () => console.log('Share') },
612
- * { id: 'edit', icon: <Icon name="edit" />, label: 'Chỉnh sửa', onClick: () => console.log('Edit') },
613
- * { id: 'delete', icon: <Icon name="delete" />, label: 'Xóa bớt', disabled: true, onClick: () => {} }
627
+ * { id: 'share', icon: <Icon name="share" />, label: 'Share', onClick: () => console.log('Share') },
628
+ * { id: 'edit', icon: <Icon name="edit" />, label: 'Edit', onClick: () => console.log('Edit') },
629
+ * { id: 'delete', icon: <Icon name="delete" />, label: 'Delete', disabled: true, onClick: () => {} }
614
630
  * ];
615
631
  *
616
632
  * <FABMenu
617
633
  * expanded={open}
618
634
  * onToggle={setOpen}
619
- * aria-label="Các công cụ thao tác nhanh"
635
+ * aria-label="Quick actions"
620
636
  * alignment="center"
621
637
  * colorVariant="tertiary"
638
+
622
639
  * items={items}
623
640
  * />
624
641
  * ```