@linyao.tw/ui 1.1.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 (110) hide show
  1. package/dist/components/date-time/calendar.js +1 -0
  2. package/dist/components/date-time/calendar.js.map +1 -1
  3. package/dist/components/date-time/date-field.js +1 -0
  4. package/dist/components/date-time/date-field.js.map +1 -1
  5. package/dist/components/date-time/date-picker.js +1 -0
  6. package/dist/components/date-time/date-picker.js.map +1 -1
  7. package/dist/components/date-time/date-range-picker.js +1 -0
  8. package/dist/components/date-time/date-range-picker.js.map +1 -1
  9. package/dist/components/date-time/index.js +1 -0
  10. package/dist/components/date-time/shared.js +1 -0
  11. package/dist/components/date-time/shared.js.map +1 -1
  12. package/dist/components/date-time/time-field.js +1 -0
  13. package/dist/components/date-time/time-field.js.map +1 -1
  14. package/dist/components/feedback/alert.js +1 -0
  15. package/dist/components/feedback/alert.js.map +1 -1
  16. package/dist/components/feedback/banner.js +1 -0
  17. package/dist/components/feedback/banner.js.map +1 -1
  18. package/dist/components/feedback/empty-state.js +1 -0
  19. package/dist/components/feedback/empty-state.js.map +1 -1
  20. package/dist/components/feedback/feedback.types.js +1 -0
  21. package/dist/components/feedback/feedback.types.js.map +1 -1
  22. package/dist/components/feedback/meter.js +1 -0
  23. package/dist/components/feedback/meter.js.map +1 -1
  24. package/dist/components/feedback/progress.js +1 -0
  25. package/dist/components/feedback/progress.js.map +1 -1
  26. package/dist/components/feedback/skeleton.js +1 -0
  27. package/dist/components/feedback/skeleton.js.map +1 -1
  28. package/dist/components/feedback/spinner.js +1 -0
  29. package/dist/components/feedback/spinner.js.map +1 -1
  30. package/dist/components/feedback/toast.js +1 -0
  31. package/dist/components/feedback/toast.js.map +1 -1
  32. package/dist/components/forms/code-field.js +1 -0
  33. package/dist/components/forms/code-field.js.map +1 -1
  34. package/dist/components/forms/file-upload.js +1 -0
  35. package/dist/components/forms/file-upload.js.map +1 -1
  36. package/dist/components/forms/input.js +1 -0
  37. package/dist/components/forms/input.js.map +1 -1
  38. package/dist/components/forms/internal.js +12 -10
  39. package/dist/components/forms/internal.js.map +1 -1
  40. package/dist/components/forms/number-field.js +1 -0
  41. package/dist/components/forms/number-field.js.map +1 -1
  42. package/dist/components/forms/otp-field.js +1 -0
  43. package/dist/components/forms/otp-field.js.map +1 -1
  44. package/dist/components/forms/text-field.js +1 -0
  45. package/dist/components/forms/text-field.js.map +1 -1
  46. package/dist/components/foundations/avatar.js +10 -7
  47. package/dist/components/foundations/avatar.js.map +1 -1
  48. package/dist/components/foundations/badge.js +1 -0
  49. package/dist/components/foundations/badge.js.map +1 -1
  50. package/dist/components/foundations/button.js +1 -0
  51. package/dist/components/foundations/button.js.map +1 -1
  52. package/dist/components/foundations/card.js +1 -0
  53. package/dist/components/foundations/card.js.map +1 -1
  54. package/dist/components/foundations/icon-button.js +1 -0
  55. package/dist/components/foundations/icon-button.js.map +1 -1
  56. package/dist/components/foundations/link.js +1 -0
  57. package/dist/components/foundations/link.js.map +1 -1
  58. package/dist/components/foundations/list-cell.js +1 -0
  59. package/dist/components/foundations/list-cell.js.map +1 -1
  60. package/dist/components/foundations/section-heading.js +1 -0
  61. package/dist/components/foundations/section-heading.js.map +1 -1
  62. package/dist/components/foundations/separator.js +1 -0
  63. package/dist/components/foundations/separator.js.map +1 -1
  64. package/dist/components/navigation-data/breadcrumb-pagination.js +1 -0
  65. package/dist/components/navigation-data/breadcrumb-pagination.js.map +1 -1
  66. package/dist/components/navigation-data/command-palette.js +1 -0
  67. package/dist/components/navigation-data/command-palette.js.map +1 -1
  68. package/dist/components/navigation-data/header-tab-bar.js +1 -0
  69. package/dist/components/navigation-data/header-tab-bar.js.map +1 -1
  70. package/dist/components/navigation-data/menubar-toolbar.js +1 -0
  71. package/dist/components/navigation-data/menubar-toolbar.js.map +1 -1
  72. package/dist/components/navigation-data/navigation-menu.js +1 -0
  73. package/dist/components/navigation-data/navigation-menu.js.map +1 -1
  74. package/dist/components/navigation-data/scroll-area.js +1 -0
  75. package/dist/components/navigation-data/scroll-area.js.map +1 -1
  76. package/dist/components/navigation-data/table-collection.js +1 -0
  77. package/dist/components/navigation-data/table-collection.js.map +1 -1
  78. package/dist/components/overlays/dialog.d.ts +10 -1
  79. package/dist/components/overlays/dialog.js +11 -8
  80. package/dist/components/overlays/dialog.js.map +1 -1
  81. package/dist/components/overlays/disclosure.js +1 -0
  82. package/dist/components/overlays/disclosure.js.map +1 -1
  83. package/dist/components/overlays/drawer.d.ts +4 -1
  84. package/dist/components/overlays/drawer.js +11 -8
  85. package/dist/components/overlays/drawer.js.map +1 -1
  86. package/dist/components/overlays/floating.js +1 -0
  87. package/dist/components/overlays/floating.js.map +1 -1
  88. package/dist/components/overlays/index.d.ts +1 -1
  89. package/dist/components/selection/combobox.js +1 -0
  90. package/dist/components/selection/combobox.js.map +1 -1
  91. package/dist/components/selection/controls.js +1 -0
  92. package/dist/components/selection/controls.js.map +1 -1
  93. package/dist/components/selection/menu.js +1 -0
  94. package/dist/components/selection/menu.js.map +1 -1
  95. package/dist/components/selection/select.js +1 -0
  96. package/dist/components/selection/select.js.map +1 -1
  97. package/dist/index.d.ts +1 -1
  98. package/dist/index.js +34 -32
  99. package/dist/internal/class-names.js +1 -0
  100. package/dist/internal/class-names.js.map +1 -1
  101. package/dist/intl/index.d.ts +1 -0
  102. package/dist/intl/linyao-provider.d.ts +38 -0
  103. package/dist/intl/linyao-provider.js +27 -0
  104. package/dist/intl/linyao-provider.js.map +1 -0
  105. package/dist/intl/messages.js +1 -0
  106. package/dist/intl/messages.js.map +1 -1
  107. package/dist/intl/provider.js +17 -8
  108. package/dist/intl/provider.js.map +1 -1
  109. package/dist/styles.css +1 -1
  110. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"menu.js","names":[],"sources":["../../../src/components/selection/menu.tsx"],"sourcesContent":["import { ContextMenu as BaseContextMenu, type ContextMenuTriggerProps } from \"@base-ui/react/context-menu\";\nimport {\n\tMenu as BaseMenu,\n\ttype MenuCheckboxItemIndicatorProps,\n\ttype MenuCheckboxItemProps,\n\ttype MenuGroupLabelProps,\n\ttype MenuItemProps,\n\ttype MenuLinkItemProps,\n\ttype MenuPopupProps,\n\ttype MenuPositionerProps,\n\ttype MenuRadioItemIndicatorProps,\n\ttype MenuRadioItemProps,\n\ttype MenuSubmenuTriggerProps,\n\ttype MenuTriggerProps\n} from \"@base-ui/react/menu\";\nimport { Separator as BaseSeparator, type SeparatorProps } from \"@base-ui/react/separator\";\nimport { CheckIcon } from \"@phosphor-icons/react/dist/csr/Check\";\nimport { forwardRef } from \"react\";\n\nimport { withStateClassName } from \"@/internal\";\n\nexport const MenuTrigger = forwardRef<HTMLButtonElement, MenuTriggerProps>(function MenuTrigger({ className, ...props }, ref) {\n\treturn <BaseMenu.Trigger {...props} className={withStateClassName(\"lyds-menu__trigger\", className)} ref={ref} />;\n});\n\nexport const MenuPositioner = forwardRef<HTMLDivElement, MenuPositionerProps>(function MenuPositioner({ className, ...props }, ref) {\n\treturn <BaseMenu.Positioner {...props} className={withStateClassName(\"lyds-listbox__positioner\", className)} ref={ref} />;\n});\n\nexport const MenuPopup = forwardRef<HTMLDivElement, MenuPopupProps>(function MenuPopup({ className, ...props }, ref) {\n\treturn <BaseMenu.Popup {...props} className={withStateClassName(\"lyds-menu__popup\", className)} ref={ref} />;\n});\n\nexport const MenuItem = forwardRef<HTMLElement, MenuItemProps>(function MenuItem({ className, ...props }, ref) {\n\treturn <BaseMenu.Item {...props} className={withStateClassName(\"lyds-menu__item\", className)} ref={ref} />;\n});\n\nexport const MenuLinkItem = forwardRef<HTMLAnchorElement, MenuLinkItemProps>(function MenuLinkItem({ className, ...props }, ref) {\n\treturn <BaseMenu.LinkItem {...props} className={withStateClassName(\"lyds-menu__item\", className)} ref={ref} />;\n});\n\nexport const MenuCheckboxItem = forwardRef<HTMLElement, MenuCheckboxItemProps>(function MenuCheckboxItem({ className, ...props }, ref) {\n\treturn <BaseMenu.CheckboxItem {...props} className={withStateClassName(\"lyds-menu__item\", className)} ref={ref} />;\n});\n\nexport const MenuCheckboxItemIndicator = forwardRef<HTMLSpanElement, MenuCheckboxItemIndicatorProps>(function MenuCheckboxItemIndicator({ children, className, ...props }, ref) {\n\treturn (\n\t\t<BaseMenu.CheckboxItemIndicator {...props} className={withStateClassName(\"lyds-menu__item-indicator\", className)} ref={ref}>\n\t\t\t{children ?? <CheckIcon aria-hidden=\"true\" weight=\"bold\" />}\n\t\t</BaseMenu.CheckboxItemIndicator>\n\t);\n});\n\nexport const MenuRadioItem = forwardRef<HTMLElement, MenuRadioItemProps>(function MenuRadioItem({ className, ...props }, ref) {\n\treturn <BaseMenu.RadioItem {...props} className={withStateClassName(\"lyds-menu__item\", className)} ref={ref} />;\n});\n\nexport const MenuRadioItemIndicator = forwardRef<HTMLSpanElement, MenuRadioItemIndicatorProps>(function MenuRadioItemIndicator({ children, className, ...props }, ref) {\n\treturn (\n\t\t<BaseMenu.RadioItemIndicator {...props} className={withStateClassName(\"lyds-menu__item-indicator\", className)} ref={ref}>\n\t\t\t{children ?? <CheckIcon aria-hidden=\"true\" data-lyds-glyph=\"check\" weight=\"bold\" />}\n\t\t</BaseMenu.RadioItemIndicator>\n\t);\n});\n\nexport const MenuGroupLabel = forwardRef<HTMLDivElement, MenuGroupLabelProps>(function MenuGroupLabel({ className, ...props }, ref) {\n\treturn <BaseMenu.GroupLabel {...props} className={withStateClassName(\"lyds-listbox__group-label\", className)} ref={ref} />;\n});\n\nexport const MenuSeparator = forwardRef<HTMLDivElement, SeparatorProps>(function MenuSeparator({ className, ...props }, ref) {\n\treturn <BaseSeparator {...props} className={withStateClassName(\"lyds-listbox__separator\", className)} ref={ref} />;\n});\n\nexport const MenuSubmenuTrigger = forwardRef<HTMLElement, MenuSubmenuTriggerProps>(function MenuSubmenuTrigger({ className, ...props }, ref) {\n\treturn <BaseMenu.SubmenuTrigger {...props} className={withStateClassName(\"lyds-menu__item\", className)} ref={ref} />;\n});\n\nconst menuParts = {\n\tArrow: BaseMenu.Arrow,\n\tBackdrop: BaseMenu.Backdrop,\n\tCheckboxItem: MenuCheckboxItem,\n\tCheckboxItemIndicator: MenuCheckboxItemIndicator,\n\tGroup: BaseMenu.Group,\n\tGroupLabel: MenuGroupLabel,\n\tHandle: BaseMenu.Handle,\n\tItem: MenuItem,\n\tLinkItem: MenuLinkItem,\n\tPopup: MenuPopup,\n\tPortal: BaseMenu.Portal,\n\tPositioner: MenuPositioner,\n\tRadioGroup: BaseMenu.RadioGroup,\n\tRadioItem: MenuRadioItem,\n\tRadioItemIndicator: MenuRadioItemIndicator,\n\tRoot: BaseMenu.Root,\n\tSeparator: MenuSeparator,\n\tSubmenuRoot: BaseMenu.SubmenuRoot,\n\tSubmenuTrigger: MenuSubmenuTrigger,\n\tTrigger: MenuTrigger,\n\tViewport: BaseMenu.Viewport,\n\tcreateHandle: BaseMenu.createHandle\n} as const;\n\n/** 由按鈕觸發的應用程式選單。 */\nexport const DropdownMenu = menuParts;\n\n/** DropdownMenu 的別名,名稱與 Base UI 詞彙一致。 */\nexport const Menu = menuParts;\n\nexport const ContextMenuTrigger = forwardRef<HTMLDivElement, ContextMenuTriggerProps>(function ContextMenuTrigger({ className, onKeyDown, ...props }, ref) {\n\tconst handleKeyDown: NonNullable<ContextMenuTriggerProps[\"onKeyDown\"]> = event => {\n\t\tonKeyDown?.(event);\n\t\tif (event.defaultPrevented || event.key !== \"F10\" || !event.shiftKey) return;\n\n\t\tevent.preventDefault();\n\t\tconst target = event.currentTarget;\n\t\tconst bounds = target.getBoundingClientRect();\n\t\ttarget.dispatchEvent(\n\t\t\tnew globalThis.MouseEvent(\"contextmenu\", {\n\t\t\t\tbubbles: true,\n\t\t\t\tbutton: 2,\n\t\t\t\tcancelable: true,\n\t\t\t\tclientX: bounds.left + bounds.width / 2,\n\t\t\t\tclientY: bounds.top + bounds.height / 2\n\t\t\t})\n\t\t);\n\t};\n\n\treturn <BaseContextMenu.Trigger {...props} className={withStateClassName(\"lyds-context-menu__trigger\", className)} ref={ref} onKeyDown={handleKeyDown} />;\n});\n\nexport const ContextMenu = {\n\tArrow: BaseContextMenu.Arrow,\n\tBackdrop: BaseContextMenu.Backdrop,\n\tCheckboxItem: MenuCheckboxItem,\n\tCheckboxItemIndicator: MenuCheckboxItemIndicator,\n\tGroup: BaseContextMenu.Group,\n\tGroupLabel: MenuGroupLabel,\n\tItem: MenuItem,\n\tLinkItem: MenuLinkItem,\n\tPopup: MenuPopup,\n\tPortal: BaseContextMenu.Portal,\n\tPositioner: MenuPositioner,\n\tRadioGroup: BaseContextMenu.RadioGroup,\n\tRadioItem: MenuRadioItem,\n\tRadioItemIndicator: MenuRadioItemIndicator,\n\tRoot: BaseContextMenu.Root,\n\tSeparator: MenuSeparator,\n\tSubmenuRoot: BaseContextMenu.SubmenuRoot,\n\tSubmenuTrigger: MenuSubmenuTrigger,\n\tTrigger: ContextMenuTrigger\n} as const;\n"],"mappings":";;;;;;;;AAqBA,IAAa,IAAc,EAAgD,SAAqB,EAAE,cAAW,GAAG,KAAS,GAAK;CAC7H,OAAO,kBAAC,EAAS,SAAV;EAAkB,GAAI;EAAO,WAAW,EAAmB,sBAAsB,CAAS;EAAQ;CAAM,CAAA;AAChH,CAAC,GAEY,IAAiB,EAAgD,SAAwB,EAAE,cAAW,GAAG,KAAS,GAAK;CACnI,OAAO,kBAAC,EAAS,YAAV;EAAqB,GAAI;EAAO,WAAW,EAAmB,4BAA4B,CAAS;EAAQ;CAAM,CAAA;AACzH,CAAC,GAEY,IAAY,EAA2C,SAAmB,EAAE,cAAW,GAAG,KAAS,GAAK;CACpH,OAAO,kBAAC,EAAS,OAAV;EAAgB,GAAI;EAAO,WAAW,EAAmB,oBAAoB,CAAS;EAAQ;CAAM,CAAA;AAC5G,CAAC,GAEY,IAAW,EAAuC,SAAkB,EAAE,cAAW,GAAG,KAAS,GAAK;CAC9G,OAAO,kBAAC,EAAS,MAAV;EAAe,GAAI;EAAO,WAAW,EAAmB,mBAAmB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AC1B,OAAO,EAAgB;CACvB,UAAU,EAAgB;CAC1B,cAAc;CACd,uBAAuB;CACvB,OAAO,EAAgB;CACvB,YAAY;CACZ,MAAM;CACN,UAAU;CACV,OAAO;CACP,QAAQ,EAAgB;CACxB,YAAY;CACZ,YAAY,EAAgB;CAC5B,WAAW;CACX,oBAAoB;CACpB,MAAM,EAAgB;CACtB,WAAW;CACX,aAAa,EAAgB;CAC7B,gBAAgB;CAChB,SAAS;AACV"}
1
+ {"version":3,"file":"menu.js","names":[],"sources":["../../../src/components/selection/menu.tsx"],"sourcesContent":["import { ContextMenu as BaseContextMenu, type ContextMenuTriggerProps } from \"@base-ui/react/context-menu\";\nimport {\n\tMenu as BaseMenu,\n\ttype MenuCheckboxItemIndicatorProps,\n\ttype MenuCheckboxItemProps,\n\ttype MenuGroupLabelProps,\n\ttype MenuItemProps,\n\ttype MenuLinkItemProps,\n\ttype MenuPopupProps,\n\ttype MenuPositionerProps,\n\ttype MenuRadioItemIndicatorProps,\n\ttype MenuRadioItemProps,\n\ttype MenuSubmenuTriggerProps,\n\ttype MenuTriggerProps\n} from \"@base-ui/react/menu\";\nimport { Separator as BaseSeparator, type SeparatorProps } from \"@base-ui/react/separator\";\nimport { CheckIcon } from \"@phosphor-icons/react/dist/csr/Check\";\nimport { forwardRef } from \"react\";\n\nimport { withStateClassName } from \"@/internal\";\n\nexport const MenuTrigger = forwardRef<HTMLButtonElement, MenuTriggerProps>(function MenuTrigger({ className, ...props }, ref) {\n\treturn <BaseMenu.Trigger {...props} className={withStateClassName(\"lyds-menu__trigger\", className)} ref={ref} />;\n});\n\nexport const MenuPositioner = forwardRef<HTMLDivElement, MenuPositionerProps>(function MenuPositioner({ className, ...props }, ref) {\n\treturn <BaseMenu.Positioner {...props} className={withStateClassName(\"lyds-listbox__positioner\", className)} ref={ref} />;\n});\n\nexport const MenuPopup = forwardRef<HTMLDivElement, MenuPopupProps>(function MenuPopup({ className, ...props }, ref) {\n\treturn <BaseMenu.Popup {...props} className={withStateClassName(\"lyds-menu__popup\", className)} ref={ref} />;\n});\n\nexport const MenuItem = forwardRef<HTMLElement, MenuItemProps>(function MenuItem({ className, ...props }, ref) {\n\treturn <BaseMenu.Item {...props} className={withStateClassName(\"lyds-menu__item\", className)} ref={ref} />;\n});\n\nexport const MenuLinkItem = forwardRef<HTMLAnchorElement, MenuLinkItemProps>(function MenuLinkItem({ className, ...props }, ref) {\n\treturn <BaseMenu.LinkItem {...props} className={withStateClassName(\"lyds-menu__item\", className)} ref={ref} />;\n});\n\nexport const MenuCheckboxItem = forwardRef<HTMLElement, MenuCheckboxItemProps>(function MenuCheckboxItem({ className, ...props }, ref) {\n\treturn <BaseMenu.CheckboxItem {...props} className={withStateClassName(\"lyds-menu__item\", className)} ref={ref} />;\n});\n\nexport const MenuCheckboxItemIndicator = forwardRef<HTMLSpanElement, MenuCheckboxItemIndicatorProps>(function MenuCheckboxItemIndicator({ children, className, ...props }, ref) {\n\treturn (\n\t\t<BaseMenu.CheckboxItemIndicator {...props} className={withStateClassName(\"lyds-menu__item-indicator\", className)} ref={ref}>\n\t\t\t{children ?? <CheckIcon aria-hidden=\"true\" weight=\"bold\" />}\n\t\t</BaseMenu.CheckboxItemIndicator>\n\t);\n});\n\nexport const MenuRadioItem = forwardRef<HTMLElement, MenuRadioItemProps>(function MenuRadioItem({ className, ...props }, ref) {\n\treturn <BaseMenu.RadioItem {...props} className={withStateClassName(\"lyds-menu__item\", className)} ref={ref} />;\n});\n\nexport const MenuRadioItemIndicator = forwardRef<HTMLSpanElement, MenuRadioItemIndicatorProps>(function MenuRadioItemIndicator({ children, className, ...props }, ref) {\n\treturn (\n\t\t<BaseMenu.RadioItemIndicator {...props} className={withStateClassName(\"lyds-menu__item-indicator\", className)} ref={ref}>\n\t\t\t{children ?? <CheckIcon aria-hidden=\"true\" data-lyds-glyph=\"check\" weight=\"bold\" />}\n\t\t</BaseMenu.RadioItemIndicator>\n\t);\n});\n\nexport const MenuGroupLabel = forwardRef<HTMLDivElement, MenuGroupLabelProps>(function MenuGroupLabel({ className, ...props }, ref) {\n\treturn <BaseMenu.GroupLabel {...props} className={withStateClassName(\"lyds-listbox__group-label\", className)} ref={ref} />;\n});\n\nexport const MenuSeparator = forwardRef<HTMLDivElement, SeparatorProps>(function MenuSeparator({ className, ...props }, ref) {\n\treturn <BaseSeparator {...props} className={withStateClassName(\"lyds-listbox__separator\", className)} ref={ref} />;\n});\n\nexport const MenuSubmenuTrigger = forwardRef<HTMLElement, MenuSubmenuTriggerProps>(function MenuSubmenuTrigger({ className, ...props }, ref) {\n\treturn <BaseMenu.SubmenuTrigger {...props} className={withStateClassName(\"lyds-menu__item\", className)} ref={ref} />;\n});\n\nconst menuParts = {\n\tArrow: BaseMenu.Arrow,\n\tBackdrop: BaseMenu.Backdrop,\n\tCheckboxItem: MenuCheckboxItem,\n\tCheckboxItemIndicator: MenuCheckboxItemIndicator,\n\tGroup: BaseMenu.Group,\n\tGroupLabel: MenuGroupLabel,\n\tHandle: BaseMenu.Handle,\n\tItem: MenuItem,\n\tLinkItem: MenuLinkItem,\n\tPopup: MenuPopup,\n\tPortal: BaseMenu.Portal,\n\tPositioner: MenuPositioner,\n\tRadioGroup: BaseMenu.RadioGroup,\n\tRadioItem: MenuRadioItem,\n\tRadioItemIndicator: MenuRadioItemIndicator,\n\tRoot: BaseMenu.Root,\n\tSeparator: MenuSeparator,\n\tSubmenuRoot: BaseMenu.SubmenuRoot,\n\tSubmenuTrigger: MenuSubmenuTrigger,\n\tTrigger: MenuTrigger,\n\tViewport: BaseMenu.Viewport,\n\tcreateHandle: BaseMenu.createHandle\n} as const;\n\n/** 由按鈕觸發的應用程式選單。 */\nexport const DropdownMenu = menuParts;\n\n/** DropdownMenu 的別名,名稱與 Base UI 詞彙一致。 */\nexport const Menu = menuParts;\n\nexport const ContextMenuTrigger = forwardRef<HTMLDivElement, ContextMenuTriggerProps>(function ContextMenuTrigger({ className, onKeyDown, ...props }, ref) {\n\tconst handleKeyDown: NonNullable<ContextMenuTriggerProps[\"onKeyDown\"]> = event => {\n\t\tonKeyDown?.(event);\n\t\tif (event.defaultPrevented || event.key !== \"F10\" || !event.shiftKey) return;\n\n\t\tevent.preventDefault();\n\t\tconst target = event.currentTarget;\n\t\tconst bounds = target.getBoundingClientRect();\n\t\ttarget.dispatchEvent(\n\t\t\tnew globalThis.MouseEvent(\"contextmenu\", {\n\t\t\t\tbubbles: true,\n\t\t\t\tbutton: 2,\n\t\t\t\tcancelable: true,\n\t\t\t\tclientX: bounds.left + bounds.width / 2,\n\t\t\t\tclientY: bounds.top + bounds.height / 2\n\t\t\t})\n\t\t);\n\t};\n\n\treturn <BaseContextMenu.Trigger {...props} className={withStateClassName(\"lyds-context-menu__trigger\", className)} ref={ref} onKeyDown={handleKeyDown} />;\n});\n\nexport const ContextMenu = {\n\tArrow: BaseContextMenu.Arrow,\n\tBackdrop: BaseContextMenu.Backdrop,\n\tCheckboxItem: MenuCheckboxItem,\n\tCheckboxItemIndicator: MenuCheckboxItemIndicator,\n\tGroup: BaseContextMenu.Group,\n\tGroupLabel: MenuGroupLabel,\n\tItem: MenuItem,\n\tLinkItem: MenuLinkItem,\n\tPopup: MenuPopup,\n\tPortal: BaseContextMenu.Portal,\n\tPositioner: MenuPositioner,\n\tRadioGroup: BaseContextMenu.RadioGroup,\n\tRadioItem: MenuRadioItem,\n\tRadioItemIndicator: MenuRadioItemIndicator,\n\tRoot: BaseContextMenu.Root,\n\tSeparator: MenuSeparator,\n\tSubmenuRoot: BaseContextMenu.SubmenuRoot,\n\tSubmenuTrigger: MenuSubmenuTrigger,\n\tTrigger: ContextMenuTrigger\n} as const;\n"],"mappings":";;;;;;;;;AAqBA,IAAa,IAAc,EAAgD,SAAqB,EAAE,cAAW,GAAG,KAAS,GAAK;CAC7H,OAAO,kBAAC,EAAS,SAAV;EAAkB,GAAI;EAAO,WAAW,EAAmB,sBAAsB,CAAS;EAAQ;CAAM,CAAA;AAChH,CAAC,GAEY,IAAiB,EAAgD,SAAwB,E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,EAAM,oBAAoB,EAAM,QAAQ,SAAS,CAAC,EAAM,UAAU;EAEtE,EAAM,eAAe;EACrB,IAAM,IAAS,EAAM,eACf,IAAS,EAAO,sBAAsB;EAC5C,EAAO,cACN,IAAI,WAAW,WAAW,eAAe;GACxC,SAAS;GACT,QAAQ;GACR,YAAY;GACZ,SAAS,EAAO,OAAO,EAAO,QAAQ;GACtC,SAAS,EAAO,MAAM,EAAO,SAAS;EACvC,CAAC,CACF;CACD;CAEA,OAAO,kBAAC,EAAgB,SAAjB;EAAyB,GAAI;EAAO,WAAW,EAAmB,8BAA8B,CAAS;EAAQ;EAAK,WAAW;CAAgB,CAAA;AACzJ,CAAC,GAEY,IAAc;CAC1B,OAAO,EAAgB;CACvB,UAAU,EAAgB;CAC1B,cAAc;CACd,uBAAuB;CACvB,OAAO,EAAgB;CACvB,YAAY;CACZ,MAAM;CACN,UAAU;CACV,OAAO;CACP,QAAQ,EAAgB;CACxB,YAAY;CACZ,YAAY,EAAgB;CAC5B,WAAW;CACX,oBAAoB;CACpB,MAAM,EAAgB;CACtB,WAAW;CACX,aAAa,EAAgB;CAC7B,gBAAgB;CAChB,SAAS;AACV"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { combineStateClassNames as e, withStateClassName as t } from "../../internal/class-names.js";
2
3
  import { useMessages as n } from "../../intl/provider.js";
3
4
  import { forwardRef as r, useMemo as i } from "react";
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","names":[],"sources":["../../../src/components/selection/select.tsx"],"sourcesContent":["import {\n\tSelect as BaseSelect,\n\ttype SelectGroupLabelProps,\n\ttype SelectItemIndicatorProps,\n\ttype SelectItemProps,\n\ttype SelectItemTextProps,\n\ttype SelectListProps,\n\ttype SelectPopupProps,\n\ttype SelectPositionerProps,\n\ttype SelectRootProps,\n\ttype SelectSeparatorProps,\n\ttype SelectTriggerProps,\n\ttype SelectValueProps\n} from \"@base-ui/react/select\";\nimport { CaretDownIcon } from \"@phosphor-icons/react/dist/csr/CaretDown\";\nimport { CheckIcon } from \"@phosphor-icons/react/dist/csr/Check\";\nimport { forwardRef, useMemo, type Key, type ReactNode } from \"react\";\n\nimport { combineStateClassNames, withStateClassName } from \"@/internal\";\nimport { useMessages } from \"@/intl\";\n\nexport const SelectTrigger = forwardRef<HTMLButtonElement, SelectTriggerProps>(function SelectTrigger({ className, ...props }, ref) {\n\treturn <BaseSelect.Trigger {...props} className={withStateClassName(\"lyds-select__trigger\", className)} ref={ref} />;\n});\n\nexport const SelectValue = forwardRef<HTMLSpanElement, SelectValueProps>(function SelectValue({ className, ...props }, ref) {\n\treturn <BaseSelect.Value {...props} className={withStateClassName(\"lyds-select__value\", className)} ref={ref} />;\n});\n\nexport const SelectPositioner = forwardRef<HTMLDivElement, SelectPositionerProps>(function SelectPositioner({ className, ...props }, ref) {\n\treturn <BaseSelect.Positioner {...props} className={withStateClassName(\"lyds-listbox__positioner\", className)} ref={ref} />;\n});\n\nexport const SelectPopup = forwardRef<HTMLDivElement, SelectPopupProps>(function SelectPopup({ className, ...props }, ref) {\n\treturn <BaseSelect.Popup {...props} className={withStateClassName(\"lyds-listbox__popup\", className)} ref={ref} />;\n});\n\nexport const SelectList = forwardRef<HTMLDivElement, SelectListProps>(function SelectList({ className, ...props }, ref) {\n\treturn <BaseSelect.List {...props} className={withStateClassName(\"lyds-listbox__list\", className)} ref={ref} />;\n});\n\nexport const SelectItem = forwardRef<HTMLElement, SelectItemProps>(function SelectItem({ className, ...props }, ref) {\n\treturn <BaseSelect.Item {...props} className={withStateClassName(\"lyds-listbox__option\", className)} ref={ref} />;\n});\n\nexport const SelectItemIndicator = forwardRef<HTMLSpanElement, SelectItemIndicatorProps>(function SelectItemIndicator({ className, ...props }, ref) {\n\treturn <BaseSelect.ItemIndicator {...props} className={withStateClassName(\"lyds-listbox__option-indicator\", className)} ref={ref} />;\n});\n\nexport const SelectItemText = forwardRef<HTMLDivElement, SelectItemTextProps>(function SelectItemText({ className, ...props }, ref) {\n\treturn <BaseSelect.ItemText {...props} className={withStateClassName(\"lyds-listbox__option-text\", className)} ref={ref} />;\n});\n\nexport const SelectGroupLabel = forwardRef<HTMLDivElement, SelectGroupLabelProps>(function SelectGroupLabel({ className, ...props }, ref) {\n\treturn <BaseSelect.GroupLabel {...props} className={withStateClassName(\"lyds-listbox__group-label\", className)} ref={ref} />;\n});\n\nexport const SelectSeparator = forwardRef<HTMLDivElement, SelectSeparatorProps>(function SelectSeparator({ className, ...props }, ref) {\n\treturn <BaseSelect.Separator {...props} className={withStateClassName(\"lyds-listbox__separator\", className)} ref={ref} />;\n});\n\nexport interface SelectOption<Value> {\n\tdescription?: ReactNode;\n\tdisabled?: boolean;\n\tkey?: Key;\n\tlabel: ReactNode;\n\ttextValue?: string;\n\tvalue: Value;\n}\n\nexport interface SelectProps<Value> extends Omit<SelectRootProps<Value, false>, \"children\" | \"items\" | \"multiple\"> {\n\t\"aria-describedby\"?: string;\n\t\"aria-label\"?: string;\n\t\"aria-labelledby\"?: string;\n\tclassName?: string;\n\tinvalid?: boolean;\n\toptions: readonly SelectOption<Value>[];\n\tplaceholder?: ReactNode;\n\tpopupProps?: SelectPopupProps;\n\tpositionerProps?: SelectPositionerProps;\n\ttriggerProps?: Omit<SelectTriggerProps, \"children\">;\n}\n\nfunction SelectComponent<Value>({\n\t\"aria-describedby\": ariaDescribedby,\n\t\"aria-label\": ariaLabel,\n\t\"aria-labelledby\": ariaLabelledby,\n\tclassName,\n\tinvalid = false,\n\toptions,\n\tplaceholder,\n\tpopupProps,\n\tpositionerProps,\n\ttriggerProps,\n\t...rootProps\n}: SelectProps<Value>) {\n\tconst messages = useMessages();\n\t// A fresh array on every render resets Base UI's item collection, so keep the identity stable.\n\tconst items = useMemo(() => options.map(option => ({ label: option.label, value: option.value })), [options]);\n\n\treturn (\n\t\t<BaseSelect.Root {...rootProps} items={items}>\n\t\t\t<SelectTrigger\n\t\t\t\t{...triggerProps}\n\t\t\t\taria-describedby={ariaDescribedby ?? triggerProps?.[\"aria-describedby\"]}\n\t\t\t\taria-invalid={invalid || triggerProps?.[\"aria-invalid\"] || undefined}\n\t\t\t\taria-label={ariaLabel ?? triggerProps?.[\"aria-label\"]}\n\t\t\t\taria-labelledby={ariaLabelledby ?? triggerProps?.[\"aria-labelledby\"]}\n\t\t\t\tclassName={combineStateClassNames(className, triggerProps?.className)}\n\t\t\t>\n\t\t\t\t<SelectValue placeholder={placeholder ?? messages.selectPlaceholder} />\n\t\t\t\t<BaseSelect.Icon aria-hidden=\"true\" className={\"lyds-select__icon\"}>\n\t\t\t\t\t<CaretDownIcon aria-hidden=\"true\" weight=\"bold\" />\n\t\t\t\t</BaseSelect.Icon>\n\t\t\t</SelectTrigger>\n\t\t\t<BaseSelect.Portal>\n\t\t\t\t<SelectPositioner alignItemWithTrigger={false} {...positionerProps}>\n\t\t\t\t\t<SelectPopup {...popupProps}>\n\t\t\t\t\t\t<SelectList>\n\t\t\t\t\t\t\t{options.map((option, index) => (\n\t\t\t\t\t\t\t\t<SelectItem disabled={option.disabled} key={option.key ?? option.textValue ?? index} label={option.textValue} value={option.value}>\n\t\t\t\t\t\t\t\t\t<SelectItemIndicator>\n\t\t\t\t\t\t\t\t\t\t<CheckIcon aria-hidden=\"true\" weight=\"bold\" />\n\t\t\t\t\t\t\t\t\t</SelectItemIndicator>\n\t\t\t\t\t\t\t\t\t<SelectItemText>\n\t\t\t\t\t\t\t\t\t\t<span>{option.label}</span>\n\t\t\t\t\t\t\t\t\t\t{option.description ? <span className={\"lyds-listbox__option-description\"}>{option.description}</span> : null}\n\t\t\t\t\t\t\t\t\t</SelectItemText>\n\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</SelectList>\n\t\t\t\t\t</SelectPopup>\n\t\t\t\t</SelectPositioner>\n\t\t\t</BaseSelect.Portal>\n\t\t</BaseSelect.Root>\n\t);\n}\n\nexport const Select = Object.assign(SelectComponent, {\n\tArrow: BaseSelect.Arrow,\n\tBackdrop: BaseSelect.Backdrop,\n\tGroup: BaseSelect.Group,\n\tGroupLabel: SelectGroupLabel,\n\tIcon: BaseSelect.Icon,\n\tItem: SelectItem,\n\tItemIndicator: SelectItemIndicator,\n\tItemText: SelectItemText,\n\tLabel: BaseSelect.Label,\n\tList: SelectList,\n\tPopup: SelectPopup,\n\tPortal: BaseSelect.Portal,\n\tPositioner: SelectPositioner,\n\tRoot: BaseSelect.Root,\n\tScrollDownArrow: BaseSelect.ScrollDownArrow,\n\tScrollUpArrow: BaseSelect.ScrollUpArrow,\n\tSeparator: SelectSeparator,\n\tTrigger: SelectTrigger,\n\tValue: SelectValue\n});\n"],"mappings":";;;;;;;;AAqBA,IAAa,IAAgB,EAAkD,SAAuB,EAAE,cAAW,GAAG,KAAS,GAAK;CACnI,OAAO,kBAAC,EAAW,SAAZ;EAAoB,GAAI;EAAO,WAAW,EAAmB,wBAAwB,CAAS;EAAQ;CAAM,CAAA;AACpH,CAAC,GAEY,IAAc,EAA8C,SAAqB,EAAE,cAAW,GAAG,KAAS,GAAK;CAC3H,OAAO,kBAAC,EAAW,OAAZ;EAAkB,GAAI;EAAO,WAAW,EAAmB,sBAAsB,CAAS;EAAQ;CAAM,CAAA;AAChH,CAAC,GAEY,IAAmB,EAAkD,SAA0B,EAAE,cAAW,GAAG,KAAS,GAAK;CACzI,OAAO,kBAAC,EAAW,YAAZ;EAAuB,GAAI;EAAO,WAAW,EAAmB,4BAA4B,CAAS;EAAQ;CAAM,CAAA;AAC3H,CAAC,GAEY,IAAc,EAA6C,SAAqB,EAAE,cAAW,GAAG,KAAS,GAAK;CAC1H,OAAO,kBAAC,EAAW,OAAZ;EAAkB,GAAI;EAAO,WAAW,EAAmB,uBAAuB,CAAS;EAAQ;CAAM,CAAA;AACjH,CAAC,GAEY,IAAa,EAA4C,SAAoB,EAAE,cAAW,GAAG,KAAS,GAAK;CACvH,OAAO,kBAAC,EAAW,MAAZ;EAAiB,GAAI;EAAO,WAAW,EAAmB,sBAAsB,CAAS;EAAQ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CACZ,MAAM,EAAW;CACjB,iBAAiB,EAAW;CAC5B,eAAe,EAAW;CAC1B,WAAW;CACX,SAAS;CACT,OAAO;AACR,CAAC"}
1
+ {"version":3,"file":"select.js","names":[],"sources":["../../../src/components/selection/select.tsx"],"sourcesContent":["import {\n\tSelect as BaseSelect,\n\ttype SelectGroupLabelProps,\n\ttype SelectItemIndicatorProps,\n\ttype SelectItemProps,\n\ttype SelectItemTextProps,\n\ttype SelectListProps,\n\ttype SelectPopupProps,\n\ttype SelectPositionerProps,\n\ttype SelectRootProps,\n\ttype SelectSeparatorProps,\n\ttype SelectTriggerProps,\n\ttype SelectValueProps\n} from \"@base-ui/react/select\";\nimport { CaretDownIcon } from \"@phosphor-icons/react/dist/csr/CaretDown\";\nimport { CheckIcon } from \"@phosphor-icons/react/dist/csr/Check\";\nimport { forwardRef, useMemo, type Key, type ReactNode } from \"react\";\n\nimport { combineStateClassNames, withStateClassName } from \"@/internal\";\nimport { useMessages } from \"@/intl\";\n\nexport const SelectTrigger = forwardRef<HTMLButtonElement, SelectTriggerProps>(function SelectTrigger({ className, ...props }, ref) {\n\treturn <BaseSelect.Trigger {...props} className={withStateClassName(\"lyds-select__trigger\", className)} ref={ref} />;\n});\n\nexport const SelectValue = forwardRef<HTMLSpanElement, SelectValueProps>(function SelectValue({ className, ...props }, ref) {\n\treturn <BaseSelect.Value {...props} className={withStateClassName(\"lyds-select__value\", className)} ref={ref} />;\n});\n\nexport const SelectPositioner = forwardRef<HTMLDivElement, SelectPositionerProps>(function SelectPositioner({ className, ...props }, ref) {\n\treturn <BaseSelect.Positioner {...props} className={withStateClassName(\"lyds-listbox__positioner\", className)} ref={ref} />;\n});\n\nexport const SelectPopup = forwardRef<HTMLDivElement, SelectPopupProps>(function SelectPopup({ className, ...props }, ref) {\n\treturn <BaseSelect.Popup {...props} className={withStateClassName(\"lyds-listbox__popup\", className)} ref={ref} />;\n});\n\nexport const SelectList = forwardRef<HTMLDivElement, SelectListProps>(function SelectList({ className, ...props }, ref) {\n\treturn <BaseSelect.List {...props} className={withStateClassName(\"lyds-listbox__list\", className)} ref={ref} />;\n});\n\nexport const SelectItem = forwardRef<HTMLElement, SelectItemProps>(function SelectItem({ className, ...props }, ref) {\n\treturn <BaseSelect.Item {...props} className={withStateClassName(\"lyds-listbox__option\", className)} ref={ref} />;\n});\n\nexport const SelectItemIndicator = forwardRef<HTMLSpanElement, SelectItemIndicatorProps>(function SelectItemIndicator({ className, ...props }, ref) {\n\treturn <BaseSelect.ItemIndicator {...props} className={withStateClassName(\"lyds-listbox__option-indicator\", className)} ref={ref} />;\n});\n\nexport const SelectItemText = forwardRef<HTMLDivElement, SelectItemTextProps>(function SelectItemText({ className, ...props }, ref) {\n\treturn <BaseSelect.ItemText {...props} className={withStateClassName(\"lyds-listbox__option-text\", className)} ref={ref} />;\n});\n\nexport const SelectGroupLabel = forwardRef<HTMLDivElement, SelectGroupLabelProps>(function SelectGroupLabel({ className, ...props }, ref) {\n\treturn <BaseSelect.GroupLabel {...props} className={withStateClassName(\"lyds-listbox__group-label\", className)} ref={ref} />;\n});\n\nexport const SelectSeparator = forwardRef<HTMLDivElement, SelectSeparatorProps>(function SelectSeparator({ className, ...props }, ref) {\n\treturn <BaseSelect.Separator {...props} className={withStateClassName(\"lyds-listbox__separator\", className)} ref={ref} />;\n});\n\nexport interface SelectOption<Value> {\n\tdescription?: ReactNode;\n\tdisabled?: boolean;\n\tkey?: Key;\n\tlabel: ReactNode;\n\ttextValue?: string;\n\tvalue: Value;\n}\n\nexport interface SelectProps<Value> extends Omit<SelectRootProps<Value, false>, \"children\" | \"items\" | \"multiple\"> {\n\t\"aria-describedby\"?: string;\n\t\"aria-label\"?: string;\n\t\"aria-labelledby\"?: string;\n\tclassName?: string;\n\tinvalid?: boolean;\n\toptions: readonly SelectOption<Value>[];\n\tplaceholder?: ReactNode;\n\tpopupProps?: SelectPopupProps;\n\tpositionerProps?: SelectPositionerProps;\n\ttriggerProps?: Omit<SelectTriggerProps, \"children\">;\n}\n\nfunction SelectComponent<Value>({\n\t\"aria-describedby\": ariaDescribedby,\n\t\"aria-label\": ariaLabel,\n\t\"aria-labelledby\": ariaLabelledby,\n\tclassName,\n\tinvalid = false,\n\toptions,\n\tplaceholder,\n\tpopupProps,\n\tpositionerProps,\n\ttriggerProps,\n\t...rootProps\n}: SelectProps<Value>) {\n\tconst messages = useMessages();\n\t// A fresh array on every render resets Base UI's item collection, so keep the identity stable.\n\tconst items = useMemo(() => options.map(option => ({ label: option.label, value: option.value })), [options]);\n\n\treturn (\n\t\t<BaseSelect.Root {...rootProps} items={items}>\n\t\t\t<SelectTrigger\n\t\t\t\t{...triggerProps}\n\t\t\t\taria-describedby={ariaDescribedby ?? triggerProps?.[\"aria-describedby\"]}\n\t\t\t\taria-invalid={invalid || triggerProps?.[\"aria-invalid\"] || undefined}\n\t\t\t\taria-label={ariaLabel ?? triggerProps?.[\"aria-label\"]}\n\t\t\t\taria-labelledby={ariaLabelledby ?? triggerProps?.[\"aria-labelledby\"]}\n\t\t\t\tclassName={combineStateClassNames(className, triggerProps?.className)}\n\t\t\t>\n\t\t\t\t<SelectValue placeholder={placeholder ?? messages.selectPlaceholder} />\n\t\t\t\t<BaseSelect.Icon aria-hidden=\"true\" className={\"lyds-select__icon\"}>\n\t\t\t\t\t<CaretDownIcon aria-hidden=\"true\" weight=\"bold\" />\n\t\t\t\t</BaseSelect.Icon>\n\t\t\t</SelectTrigger>\n\t\t\t<BaseSelect.Portal>\n\t\t\t\t<SelectPositioner alignItemWithTrigger={false} {...positionerProps}>\n\t\t\t\t\t<SelectPopup {...popupProps}>\n\t\t\t\t\t\t<SelectList>\n\t\t\t\t\t\t\t{options.map((option, index) => (\n\t\t\t\t\t\t\t\t<SelectItem disabled={option.disabled} key={option.key ?? option.textValue ?? index} label={option.textValue} value={option.value}>\n\t\t\t\t\t\t\t\t\t<SelectItemIndicator>\n\t\t\t\t\t\t\t\t\t\t<CheckIcon aria-hidden=\"true\" weight=\"bold\" />\n\t\t\t\t\t\t\t\t\t</SelectItemIndicator>\n\t\t\t\t\t\t\t\t\t<SelectItemText>\n\t\t\t\t\t\t\t\t\t\t<span>{option.label}</span>\n\t\t\t\t\t\t\t\t\t\t{option.description ? <span className={\"lyds-listbox__option-description\"}>{option.description}</span> : null}\n\t\t\t\t\t\t\t\t\t</SelectItemText>\n\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</SelectList>\n\t\t\t\t\t</SelectPopup>\n\t\t\t\t</SelectPositioner>\n\t\t\t</BaseSelect.Portal>\n\t\t</BaseSelect.Root>\n\t);\n}\n\nexport const Select = Object.assign(SelectComponent, {\n\tArrow: BaseSelect.Arrow,\n\tBackdrop: BaseSelect.Backdrop,\n\tGroup: BaseSelect.Group,\n\tGroupLabel: SelectGroupLabel,\n\tIcon: BaseSelect.Icon,\n\tItem: SelectItem,\n\tItemIndicator: SelectItemIndicator,\n\tItemText: SelectItemText,\n\tLabel: BaseSelect.Label,\n\tList: SelectList,\n\tPopup: SelectPopup,\n\tPortal: BaseSelect.Portal,\n\tPositioner: SelectPositioner,\n\tRoot: BaseSelect.Root,\n\tScrollDownArrow: BaseSelect.ScrollDownArrow,\n\tScrollUpArrow: BaseSelect.ScrollUpArrow,\n\tSeparator: SelectSeparator,\n\tTrigger: SelectTrigger,\n\tValue: SelectValue\n});\n"],"mappings":";;;;;;;;;AAqBA,IAAa,IAAgB,EAAkD,SAAuB,EAAE,cAAW,GAAG,KAAS,GAAK;CACnI,OAAO,kBAAC,EAAW,SAAZ;EAAoB,GAAI;EAAO,WAAW,EAAmB,wBAAwB,CAAS;EAAQ;CAAM,CAAA;AACpH,CAAC,GAEY,IAAc,EAA8C,SAAqB,EAAE,cAAW,GAAG,KAAS,GAAK;CAC3H,OAAO,kBAAC,EAAW,OAAZ;EAAkB,GAAI;EAAO,WAAW,EAAmB,sBAAsB,CAAS;EAAQ;CAAM,CAAA;AAChH,CAAC,GAEY,IAAmB,EAAkD,S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O,EAAO,MAAY,CAAA,GACzB,EAAO,cAAc,kBAAC,QAAD;MAAM,WAAW;MAAqC,UAAA,EAAO;KAAkB,CAAA,IAAI,IAC1F,EAAA,CAAA,CACL;IARgC,GAAA,EAAO,OAAO,EAAO,aAAa,CAQlE,CACZ,EACU,CAAA;GACA,CAAA;EACI,CAAA,EACA,CAAA,CACH;;AAEnB;AAEA,IAAa,IAAS,OAAO,OAAO,GAAiB;CACpD,OAAO,EAAW;CAClB,UAAU,EAAW;CACrB,OAAO,EAAW;CAClB,YAAY;CACZ,MAAM,EAAW;CACjB,MAAM;CACN,eAAe;CACf,UAAU;CACV,OAAO,EAAW;CAClB,MAAM;CACN,OAAO;CACP,QAAQ,EAAW;CACnB,YAAY;CACZ,MAAM,EAAW;CACjB,iBAAiB,EAAW;CAC5B,eAAe,EAAW;CAC1B,WAAW;CACX,SAAS;CACT,OAAO;AACR,CAAC"}
package/dist/index.d.ts CHANGED
@@ -5,4 +5,4 @@ export * from './components/foundations/index.js';
5
5
  export * from './components/navigation-data/index.js';
6
6
  export * from './components/overlays/index.js';
7
7
  export * from './components/selection/index.js';
8
- export { MessagesProvider, enUSMessages, useMessages, zhTWMessages, type ComponentMessages, type MessagesProviderProps } from './intl/index.js';
8
+ export { LinyaoProvider, MessagesProvider, enUSMessages, getMessagesForLocale, useMessages, zhTWMessages, type ComponentMessages, type LinyaoProviderProps, type MessagesProviderProps } from './intl/index.js';
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  /* empty css */
2
3
  /* empty css */
3
4
  /* empty css */
@@ -22,35 +23,36 @@ import { Skeleton as j } from "./components/feedback/skeleton.js";
22
23
  import { Loader as M, Spinner as N } from "./components/feedback/spinner.js";
23
24
  import { enUSMessages as P, zhTWMessages as F } from "./intl/messages.js";
24
25
  import { MessagesProvider as I, useMessages as L } from "./intl/provider.js";
25
- import { ToastProvider as R, ToastRoot as z, ToastViewport as B, createToastManager as V, useToastManager as H } from "./components/feedback/toast.js";
26
- import { CodeField as U } from "./components/forms/code-field.js";
27
- import { DropZone as W, FileUpload as G } from "./components/forms/file-upload.js";
28
- import { Input as K } from "./components/forms/input.js";
29
- import { NumberField as q } from "./components/forms/number-field.js";
30
- import { OTPField as J } from "./components/forms/otp-field.js";
31
- import { PasswordField as Y, PhoneField as X, SearchField as Z, TextField as Q, TextView as $, Textarea as ee } from "./components/forms/text-field.js";
32
- import { Avatar as te } from "./components/foundations/avatar.js";
33
- import { Badge as ne } from "./components/foundations/badge.js";
34
- import { Button as re } from "./components/foundations/button.js";
35
- import { Card as ie, CardBody as ae, CardDescription as oe, CardFooter as se, CardHeader as ce, CardTitle as le, CloudBox as ue } from "./components/foundations/card.js";
36
- import { IconButton as de } from "./components/foundations/icon-button.js";
37
- import { Link as fe } from "./components/foundations/link.js";
38
- import { ListCell as pe, ListCellAction as me, ListCellContent as he, ListCellDescription as ge, ListCellLeading as _e, ListCellMetadata as ve, ListCellTitle as ye, ListCellTrailing as be } from "./components/foundations/list-cell.js";
39
- import { SectionHeading as xe } from "./components/foundations/section-heading.js";
40
- import { Separator as Se } from "./components/foundations/separator.js";
41
- import { Breadcrumb as Ce, BreadcrumbEllipsis as we, BreadcrumbItem as Te, BreadcrumbLink as Ee, BreadcrumbList as De, BreadcrumbPage as Oe, BreadcrumbSeparator as ke, Pagination as Ae, PaginationButton as je, PaginationEllipsis as Me, PaginationItem as Ne, PaginationLink as Pe, PaginationList as Fe, PaginationNext as Ie, PaginationPrevious as Le } from "./components/navigation-data/breadcrumb-pagination.js";
42
- import { CommandPaletteBackdrop as Re, CommandPaletteClose as ze, CommandPaletteDescription as Be, CommandPaletteEmpty as Ve, CommandPaletteGroup as He, CommandPaletteGroupLabel as Ue, CommandPaletteInput as We, CommandPaletteItem as Ge, CommandPaletteItemIndicator as Ke, CommandPaletteLabel as qe, CommandPaletteList as Je, CommandPaletteNamespace as Ye, CommandPalettePopup as Xe, CommandPalettePortal as Ze, CommandPaletteSeparator as Qe, CommandPaletteShortcut as $e, CommandPaletteStatus as et, CommandPaletteTitle as tt, CommandPaletteTrigger as nt, CommandPaletteViewport as rt } from "./components/navigation-data/command-palette.js";
43
- import { Header as it, HeaderActions as at, HeaderBrand as ot, HeaderNav as st, HeaderRail as ct, HeaderStatus as lt, TabBar as ut, TabBarIcon as dt, TabBarItem as ft, TabBarLabel as pt, TabBarLink as mt, TabBarList as ht } from "./components/navigation-data/header-tab-bar.js";
44
- import { Menubar as gt, MenubarCheckboxItem as _t, MenubarCheckboxItemIndicator as vt, MenubarGroup as yt, MenubarGroupLabel as bt, MenubarItem as xt, MenubarLinkItem as St, MenubarMenu as Ct, MenubarPopup as wt, MenubarPortal as Tt, MenubarPositioner as Et, MenubarRadioGroup as Dt, MenubarRadioItem as Ot, MenubarRadioItemIndicator as kt, MenubarSeparator as At, MenubarSubmenu as jt, MenubarSubmenuTrigger as Mt, MenubarTrigger as Nt, Toolbar as Pt, ToolbarButton as Ft, ToolbarGroup as It, ToolbarInput as Lt, ToolbarLink as Rt, ToolbarSeparator as zt } from "./components/navigation-data/menubar-toolbar.js";
45
- import { NavigationMenu as Bt, NavigationMenuArrow as Vt, NavigationMenuContent as Ht, NavigationMenuIcon as Ut, NavigationMenuItem as Wt, NavigationMenuLink as Gt, NavigationMenuList as Kt, NavigationMenuPopup as qt, NavigationMenuPortal as Jt, NavigationMenuPositioner as Yt, NavigationMenuTrigger as Xt, NavigationMenuViewport as Zt } from "./components/navigation-data/navigation-menu.js";
46
- import { ScrollArea as Qt, ScrollAreaContent as $t, ScrollAreaCorner as en, ScrollAreaScrollbar as tn, ScrollAreaThumb as nn, ScrollAreaViewport as rn } from "./components/navigation-data/scroll-area.js";
47
- import { Collection as an, CollectionActions as on, CollectionButton as sn, CollectionContent as cn, CollectionDescription as ln, CollectionHeading as un, CollectionItem as dn, CollectionLink as fn, CollectionMeta as pn, DataTable as mn, DataTableControls as hn, DataTableDescription as gn, DataTableHeader as _n, DataTableRegion as vn, DataTableStatus as yn, DataTableTitle as bn, List as xn, ListActions as Sn, ListButton as Cn, ListContent as wn, ListDescription as Tn, ListHeading as En, ListItem as Dn, ListLink as On, ListMeta as kn, OrderedCollection as An, OrderedList as jn, Table as Mn, TableBody as Nn, TableCaption as Pn, TableCell as Fn, TableFooter as In, TableFrame as Ln, TableHead as Rn, TableHeader as zn, TableRow as Bn } from "./components/navigation-data/table-collection.js";
48
- import { AlertDialog as Vn, AlertDialogActions as Hn, AlertDialogClose as Un, AlertDialogPopup as Wn, AlertDialogRoot as Gn, AlertDialogTrigger as Kn, Dialog as qn, DialogBackdrop as Jn, DialogBody as Yn, DialogClose as Xn, DialogDescription as Zn, DialogFooter as Qn, DialogHeader as $n, DialogPopup as er, DialogPortal as tr, DialogRoot as nr, DialogTitle as rr, DialogTrigger as ir, DialogViewport as ar, Modal as or } from "./components/overlays/dialog.js";
49
- import { Accordion as sr, AccordionHeader as cr, AccordionItem as lr, AccordionPanel as ur, AccordionRoot as dr, AccordionTrigger as fr, Collapsible as pr, CollapsiblePanel as mr, CollapsibleRoot as hr, CollapsibleTrigger as gr, Tabs as _r, TabsIndicator as vr, TabsList as yr, TabsPanel as br, TabsRoot as xr, TabsTab as Sr } from "./components/overlays/disclosure.js";
50
- import { BottomSheet as Cr, BottomSheetBody as wr, BottomSheetFooter as Tr, BottomSheetHandle as Er, BottomSheetHeader as Dr, BottomSheetPopup as Or, BottomSheetRoot as kr, Drawer as Ar, DrawerBackdrop as jr, DrawerBody as Mr, DrawerClose as Nr, DrawerContent as Pr, DrawerDescription as Fr, DrawerFooter as Ir, DrawerHeader as Lr, DrawerPopup as Rr, DrawerPortal as zr, DrawerRoot as Br, DrawerSwipeArea as Vr, DrawerTitle as Hr, DrawerTrigger as Ur, DrawerViewport as Wr } from "./components/overlays/drawer.js";
51
- import { Popover as Gr, PopoverArrow as Kr, PopoverBackdrop as qr, PopoverClose as Jr, PopoverDescription as Yr, PopoverPopup as Xr, PopoverPortal as Zr, PopoverPositioner as Qr, PopoverRoot as $r, PopoverTitle as ei, PopoverTrigger as ti, PopoverViewport as ni, PreviewCard as ri, PreviewCardArrow as ii, PreviewCardBackdrop as ai, PreviewCardPopup as oi, PreviewCardPortal as si, PreviewCardPositioner as ci, PreviewCardRoot as li, PreviewCardTrigger as ui, PreviewCardViewport as di, Tooltip as fi, TooltipArrow as pi, TooltipPopup as mi, TooltipPortal as hi, TooltipPositioner as gi, TooltipProvider as _i, TooltipRoot as vi, TooltipTrigger as yi, TooltipViewport as bi } from "./components/overlays/floating.js";
52
- import { Autocomplete as xi, AutocompleteInputGroup as Si, AutocompleteItem as Ci, Combobox as wi, ComboboxClear as Ti, ComboboxEmpty as Ei, ComboboxInput as Di, ComboboxInputGroup as Oi, ComboboxItem as ki, ComboboxItemIndicator as Ai, ComboboxList as ji, ComboboxPopup as Mi, ComboboxPositioner as Ni, ComboboxTrigger as Pi } from "./components/selection/combobox.js";
53
- import { Checkbox as Fi, CheckboxGroup as Ii, CheckboxItem as Li, Radio as Ri, RadioGroup as zi, RadioItem as Bi, SegmentedControl as Vi, SegmentedControlItem as Hi, Slider as Ui, Switch as Wi, Toggle as Gi, ToggleGroup as Ki } from "./components/selection/controls.js";
54
- import { ContextMenu as qi, ContextMenuTrigger as Ji, DropdownMenu as Yi, Menu as Xi, MenuCheckboxItem as Zi, MenuCheckboxItemIndicator as Qi, MenuGroupLabel as $i, MenuItem as ea, MenuLinkItem as ta, MenuPopup as na, MenuPositioner as ra, MenuRadioItem as ia, MenuRadioItemIndicator as aa, MenuSeparator as oa, MenuSubmenuTrigger as sa, MenuTrigger as ca } from "./components/selection/menu.js";
55
- import { Select as la, SelectGroupLabel as ua, SelectItem as da, SelectItemIndicator as fa, SelectItemText as pa, SelectList as ma, SelectPopup as ha, SelectPositioner as ga, SelectSeparator as _a, SelectTrigger as va, SelectValue as ya } from "./components/selection/select.js";
56
- export { sr as Accordion, cr as AccordionHeader, lr as AccordionItem, ur as AccordionPanel, dr as AccordionRoot, fr as AccordionTrigger, x as Alert, S as AlertActions, C as AlertContent, w as AlertDescription, Vn as AlertDialog, Hn as AlertDialogActions, Un as AlertDialogClose, Wn as AlertDialogPopup, Gn as AlertDialogRoot, Kn as AlertDialogTrigger, T as AlertTitle, E as AlertView, xi as Autocomplete, Si as AutocompleteInputGroup, Ci as AutocompleteItem, te as Avatar, ne as Badge, D as Banner, Cr as BottomSheet, wr as BottomSheetBody, Tr as BottomSheetFooter, Er as BottomSheetHandle, Dr as BottomSheetHeader, Or as BottomSheetPopup, kr as BottomSheetRoot, Ce as Breadcrumb, we as BreadcrumbEllipsis, Te as BreadcrumbItem, Ee as BreadcrumbLink, De as BreadcrumbList, Oe as BreadcrumbPage, ke as BreadcrumbSeparator, re as Button, e as Calendar, s as CalendarDate, c as CalendarDateTime, ie as Card, ae as CardBody, oe as CardDescription, se as CardFooter, ce as CardHeader, le as CardTitle, Fi as Checkbox, Ii as CheckboxGroup, Li as CheckboxItem, ue as CloudBox, U as CodeField, pr as Collapsible, mr as CollapsiblePanel, hr as CollapsibleRoot, gr as CollapsibleTrigger, an as Collection, on as CollectionActions, sn as CollectionButton, cn as CollectionContent, ln as CollectionDescription, un as CollectionHeading, dn as CollectionItem, fn as CollectionLink, pn as CollectionMeta, wi as Combobox, Ti as ComboboxClear, Ei as ComboboxEmpty, Di as ComboboxInput, Oi as ComboboxInputGroup, ki as ComboboxItem, Ai as ComboboxItemIndicator, ji as ComboboxList, Mi as ComboboxPopup, Ni as ComboboxPositioner, Pi as ComboboxTrigger, Ye as CommandPalette, Re as CommandPaletteBackdrop, ze as CommandPaletteClose, Be as CommandPaletteDescription, Ve as CommandPaletteEmpty, He as CommandPaletteGroup, Ue as CommandPaletteGroupLabel, We as CommandPaletteInput, Ge as CommandPaletteItem, Ke as CommandPaletteItemIndicator, qe as CommandPaletteLabel, Je as CommandPaletteList, Xe as CommandPalettePopup, Ze as CommandPalettePortal, Qe as CommandPaletteSeparator, $e as CommandPaletteShortcut, et as CommandPaletteStatus, tt as CommandPaletteTitle, nt as CommandPaletteTrigger, rt as CommandPaletteViewport, qi as ContextMenu, Ji as ContextMenuTrigger, mn as DataTable, hn as DataTableControls, gn as DataTableDescription, _n as DataTableHeader, vn as DataTableRegion, yn as DataTableStatus, bn as DataTableTitle, t as DateField, n as DatePicker, i as DateRangePicker, r as DateTimePicker, qn as Dialog, Jn as DialogBackdrop, Yn as DialogBody, Xn as DialogClose, Zn as DialogDescription, Qn as DialogFooter, $n as DialogHeader, er as DialogPopup, tr as DialogPortal, nr as DialogRoot, rr as DialogTitle, ir as DialogTrigger, ar as DialogViewport, Ar as Drawer, jr as DrawerBackdrop, Mr as DrawerBody, Nr as DrawerClose, Pr as DrawerContent, Fr as DrawerDescription, Ir as DrawerFooter, Lr as DrawerHeader, Rr as DrawerPopup, zr as DrawerPortal, Br as DrawerRoot, Vr as DrawerSwipeArea, Hr as DrawerTitle, Ur as DrawerTrigger, Wr as DrawerViewport, W as DropZone, Yi as DropdownMenu, O as EmptyState, b as FEEDBACK_STATUSES, G as FileUpload, it as Header, at as HeaderActions, ot as HeaderBrand, st as HeaderNav, ct as HeaderRail, lt as HeaderStatus, de as IconButton, K as Input, fe as Link, xn as List, Sn as ListActions, Cn as ListButton, pe as ListCell, me as ListCellAction, he as ListCellContent, ge as ListCellDescription, _e as ListCellLeading, ve as ListCellMetadata, ye as ListCellTitle, be as ListCellTrailing, wn as ListContent, Tn as ListDescription, En as ListHeading, Dn as ListItem, On as ListLink, kn as ListMeta, M as Loader, Xi as Menu, Zi as MenuCheckboxItem, Qi as MenuCheckboxItemIndicator, $i as MenuGroupLabel, ea as MenuItem, ta as MenuLinkItem, na as MenuPopup, ra as MenuPositioner, ia as MenuRadioItem, aa as MenuRadioItemIndicator, oa as MenuSeparator, sa as MenuSubmenuTrigger, ca as MenuTrigger, gt as Menubar, _t as MenubarCheckboxItem, vt as MenubarCheckboxItemIndicator, yt as MenubarGroup, bt as MenubarGroupLabel, xt as MenubarItem, St as MenubarLinkItem, Ct as MenubarMenu, wt as MenubarPopup, Tt as MenubarPortal, Et as MenubarPositioner, Dt as MenubarRadioGroup, Ot as MenubarRadioItem, kt as MenubarRadioItemIndicator, At as MenubarSeparator, jt as MenubarSubmenu, Mt as MenubarSubmenuTrigger, Nt as MenubarTrigger, I as MessagesProvider, k as Meter, or as Modal, Bt as NavigationMenu, Vt as NavigationMenuArrow, Ht as NavigationMenuContent, Ut as NavigationMenuIcon, Wt as NavigationMenuItem, Gt as NavigationMenuLink, Kt as NavigationMenuList, qt as NavigationMenuPopup, Jt as NavigationMenuPortal, Yt as NavigationMenuPositioner, Xt as NavigationMenuTrigger, Zt as NavigationMenuViewport, q as NumberField, J as OTPField, An as OrderedCollection, jn as OrderedList, Ae as Pagination, je as PaginationButton, Me as PaginationEllipsis, Ne as PaginationItem, Pe as PaginationLink, Fe as PaginationList, Ie as PaginationNext, Le as PaginationPrevious, Y as PasswordField, X as PhoneField, Gr as Popover, Kr as PopoverArrow, qr as PopoverBackdrop, Jr as PopoverClose, Yr as PopoverDescription, Xr as PopoverPopup, Zr as PopoverPortal, Qr as PopoverPositioner, $r as PopoverRoot, ei as PopoverTitle, ti as PopoverTrigger, ni as PopoverViewport, ri as PreviewCard, ii as PreviewCardArrow, ai as PreviewCardBackdrop, oi as PreviewCardPopup, si as PreviewCardPortal, ci as PreviewCardPositioner, li as PreviewCardRoot, ui as PreviewCardTrigger, di as PreviewCardViewport, A as Progress, Ri as Radio, zi as RadioGroup, Bi as RadioItem, Qt as ScrollArea, $t as ScrollAreaContent, en as ScrollAreaCorner, tn as ScrollAreaScrollbar, nn as ScrollAreaThumb, rn as ScrollAreaViewport, Z as SearchField, xe as SectionHeading, Vi as SegmentedControl, Hi as SegmentedControlItem, la as Select, ua as SelectGroupLabel, da as SelectItem, fa as SelectItemIndicator, pa as SelectItemText, ma as SelectList, ha as SelectPopup, ga as SelectPositioner, _a as SelectSeparator, va as SelectTrigger, ya as SelectValue, Se as Separator, j as Skeleton, Ui as Slider, N as Spinner, Wi as Switch, ut as TabBar, dt as TabBarIcon, ft as TabBarItem, pt as TabBarLabel, mt as TabBarLink, ht as TabBarList, Mn as Table, Nn as TableBody, Pn as TableCaption, Fn as TableCell, In as TableFooter, Ln as TableFrame, Rn as TableHead, zn as TableHeader, Bn as TableRow, _r as Tabs, vr as TabsIndicator, yr as TabsList, br as TabsPanel, xr as TabsRoot, Sr as TabsTab, Q as TextField, $ as TextView, ee as Textarea, l as Time, a as TimeField, o as TimePicker, R as ToastProvider, z as ToastRoot, B as ToastViewport, Gi as Toggle, Ki as ToggleGroup, Pt as Toolbar, Ft as ToolbarButton, It as ToolbarGroup, Lt as ToolbarInput, Rt as ToolbarLink, zt as ToolbarSeparator, fi as Tooltip, pi as TooltipArrow, mi as TooltipPopup, hi as TooltipPortal, gi as TooltipPositioner, _i as TooltipProvider, vi as TooltipRoot, yi as TooltipTrigger, bi as TooltipViewport, u as ZonedDateTime, V as createToastManager, P as enUSMessages, d as getLocalTimeZone, f as now, p as parseAbsolute, m as parseAbsoluteToLocal, h as parseDate, g as parseDateTime, _ as parseTime, v as parseZonedDateTime, y as today, L as useMessages, H as useToastManager, F as zhTWMessages };
26
+ import { LinyaoProvider as R, getMessagesForLocale as z } from "./intl/linyao-provider.js";
27
+ import { ToastProvider as B, ToastRoot as V, ToastViewport as H, createToastManager as U, useToastManager as W } from "./components/feedback/toast.js";
28
+ import { CodeField as G } from "./components/forms/code-field.js";
29
+ import { DropZone as K, FileUpload as q } from "./components/forms/file-upload.js";
30
+ import { Input as J } from "./components/forms/input.js";
31
+ import { NumberField as Y } from "./components/forms/number-field.js";
32
+ import { OTPField as X } from "./components/forms/otp-field.js";
33
+ import { PasswordField as Z, PhoneField as Q, SearchField as $, TextField as ee, TextView as te, Textarea as ne } from "./components/forms/text-field.js";
34
+ import { Avatar as re } from "./components/foundations/avatar.js";
35
+ import { Badge as ie } from "./components/foundations/badge.js";
36
+ import { Button as ae } from "./components/foundations/button.js";
37
+ import { Card as oe, CardBody as se, CardDescription as ce, CardFooter as le, CardHeader as ue, CardTitle as de, CloudBox as fe } from "./components/foundations/card.js";
38
+ import { IconButton as pe } from "./components/foundations/icon-button.js";
39
+ import { Link as me } from "./components/foundations/link.js";
40
+ import { ListCell as he, ListCellAction as ge, ListCellContent as _e, ListCellDescription as ve, ListCellLeading as ye, ListCellMetadata as be, ListCellTitle as xe, ListCellTrailing as Se } from "./components/foundations/list-cell.js";
41
+ import { SectionHeading as Ce } from "./components/foundations/section-heading.js";
42
+ import { Separator as we } from "./components/foundations/separator.js";
43
+ import { Breadcrumb as Te, BreadcrumbEllipsis as Ee, BreadcrumbItem as De, BreadcrumbLink as Oe, BreadcrumbList as ke, BreadcrumbPage as Ae, BreadcrumbSeparator as je, Pagination as Me, PaginationButton as Ne, PaginationEllipsis as Pe, PaginationItem as Fe, PaginationLink as Ie, PaginationList as Le, PaginationNext as Re, PaginationPrevious as ze } from "./components/navigation-data/breadcrumb-pagination.js";
44
+ import { CommandPaletteBackdrop as Be, CommandPaletteClose as Ve, CommandPaletteDescription as He, CommandPaletteEmpty as Ue, CommandPaletteGroup as We, CommandPaletteGroupLabel as Ge, CommandPaletteInput as Ke, CommandPaletteItem as qe, CommandPaletteItemIndicator as Je, CommandPaletteLabel as Ye, CommandPaletteList as Xe, CommandPaletteNamespace as Ze, CommandPalettePopup as Qe, CommandPalettePortal as $e, CommandPaletteSeparator as et, CommandPaletteShortcut as tt, CommandPaletteStatus as nt, CommandPaletteTitle as rt, CommandPaletteTrigger as it, CommandPaletteViewport as at } from "./components/navigation-data/command-palette.js";
45
+ import { Header as ot, HeaderActions as st, HeaderBrand as ct, HeaderNav as lt, HeaderRail as ut, HeaderStatus as dt, TabBar as ft, TabBarIcon as pt, TabBarItem as mt, TabBarLabel as ht, TabBarLink as gt, TabBarList as _t } from "./components/navigation-data/header-tab-bar.js";
46
+ import { Menubar as vt, MenubarCheckboxItem as yt, MenubarCheckboxItemIndicator as bt, MenubarGroup as xt, MenubarGroupLabel as St, MenubarItem as Ct, MenubarLinkItem as wt, MenubarMenu as Tt, MenubarPopup as Et, MenubarPortal as Dt, MenubarPositioner as Ot, MenubarRadioGroup as kt, MenubarRadioItem as At, MenubarRadioItemIndicator as jt, MenubarSeparator as Mt, MenubarSubmenu as Nt, MenubarSubmenuTrigger as Pt, MenubarTrigger as Ft, Toolbar as It, ToolbarButton as Lt, ToolbarGroup as Rt, ToolbarInput as zt, ToolbarLink as Bt, ToolbarSeparator as Vt } from "./components/navigation-data/menubar-toolbar.js";
47
+ import { NavigationMenu as Ht, NavigationMenuArrow as Ut, NavigationMenuContent as Wt, NavigationMenuIcon as Gt, NavigationMenuItem as Kt, NavigationMenuLink as qt, NavigationMenuList as Jt, NavigationMenuPopup as Yt, NavigationMenuPortal as Xt, NavigationMenuPositioner as Zt, NavigationMenuTrigger as Qt, NavigationMenuViewport as $t } from "./components/navigation-data/navigation-menu.js";
48
+ import { ScrollArea as en, ScrollAreaContent as tn, ScrollAreaCorner as nn, ScrollAreaScrollbar as rn, ScrollAreaThumb as an, ScrollAreaViewport as on } from "./components/navigation-data/scroll-area.js";
49
+ import { Collection as sn, CollectionActions as cn, CollectionButton as ln, CollectionContent as un, CollectionDescription as dn, CollectionHeading as fn, CollectionItem as pn, CollectionLink as mn, CollectionMeta as hn, DataTable as gn, DataTableControls as _n, DataTableDescription as vn, DataTableHeader as yn, DataTableRegion as bn, DataTableStatus as xn, DataTableTitle as Sn, List as Cn, ListActions as wn, ListButton as Tn, ListContent as En, ListDescription as Dn, ListHeading as On, ListItem as kn, ListLink as An, ListMeta as jn, OrderedCollection as Mn, OrderedList as Nn, Table as Pn, TableBody as Fn, TableCaption as In, TableCell as Ln, TableFooter as Rn, TableFrame as zn, TableHead as Bn, TableHeader as Vn, TableRow as Hn } from "./components/navigation-data/table-collection.js";
50
+ import { AlertDialog as Un, AlertDialogActions as Wn, AlertDialogClose as Gn, AlertDialogPopup as Kn, AlertDialogRoot as qn, AlertDialogTrigger as Jn, Dialog as Yn, DialogBackdrop as Xn, DialogBody as Zn, DialogClose as Qn, DialogDescription as $n, DialogFooter as er, DialogHeader as tr, DialogPopup as nr, DialogPortal as rr, DialogRoot as ir, DialogTitle as ar, DialogTrigger as or, DialogViewport as sr, Modal as cr } from "./components/overlays/dialog.js";
51
+ import { Accordion as lr, AccordionHeader as ur, AccordionItem as dr, AccordionPanel as fr, AccordionRoot as pr, AccordionTrigger as mr, Collapsible as hr, CollapsiblePanel as gr, CollapsibleRoot as _r, CollapsibleTrigger as vr, Tabs as yr, TabsIndicator as br, TabsList as xr, TabsPanel as Sr, TabsRoot as Cr, TabsTab as wr } from "./components/overlays/disclosure.js";
52
+ import { BottomSheet as Tr, BottomSheetBody as Er, BottomSheetFooter as Dr, BottomSheetHandle as Or, BottomSheetHeader as kr, BottomSheetPopup as Ar, BottomSheetRoot as jr, Drawer as Mr, DrawerBackdrop as Nr, DrawerBody as Pr, DrawerClose as Fr, DrawerContent as Ir, DrawerDescription as Lr, DrawerFooter as Rr, DrawerHeader as zr, DrawerPopup as Br, DrawerPortal as Vr, DrawerRoot as Hr, DrawerSwipeArea as Ur, DrawerTitle as Wr, DrawerTrigger as Gr, DrawerViewport as Kr } from "./components/overlays/drawer.js";
53
+ import { Popover as qr, PopoverArrow as Jr, PopoverBackdrop as Yr, PopoverClose as Xr, PopoverDescription as Zr, PopoverPopup as Qr, PopoverPortal as $r, PopoverPositioner as ei, PopoverRoot as ti, PopoverTitle as ni, PopoverTrigger as ri, PopoverViewport as ii, PreviewCard as ai, PreviewCardArrow as oi, PreviewCardBackdrop as si, PreviewCardPopup as ci, PreviewCardPortal as li, PreviewCardPositioner as ui, PreviewCardRoot as di, PreviewCardTrigger as fi, PreviewCardViewport as pi, Tooltip as mi, TooltipArrow as hi, TooltipPopup as gi, TooltipPortal as _i, TooltipPositioner as vi, TooltipProvider as yi, TooltipRoot as bi, TooltipTrigger as xi, TooltipViewport as Si } from "./components/overlays/floating.js";
54
+ import { Autocomplete as Ci, AutocompleteInputGroup as wi, AutocompleteItem as Ti, Combobox as Ei, ComboboxClear as Di, ComboboxEmpty as Oi, ComboboxInput as ki, ComboboxInputGroup as Ai, ComboboxItem as ji, ComboboxItemIndicator as Mi, ComboboxList as Ni, ComboboxPopup as Pi, ComboboxPositioner as Fi, ComboboxTrigger as Ii } from "./components/selection/combobox.js";
55
+ import { Checkbox as Li, CheckboxGroup as Ri, CheckboxItem as zi, Radio as Bi, RadioGroup as Vi, RadioItem as Hi, SegmentedControl as Ui, SegmentedControlItem as Wi, Slider as Gi, Switch as Ki, Toggle as qi, ToggleGroup as Ji } from "./components/selection/controls.js";
56
+ import { ContextMenu as Yi, ContextMenuTrigger as Xi, DropdownMenu as Zi, Menu as Qi, MenuCheckboxItem as $i, MenuCheckboxItemIndicator as ea, MenuGroupLabel as ta, MenuItem as na, MenuLinkItem as ra, MenuPopup as ia, MenuPositioner as aa, MenuRadioItem as oa, MenuRadioItemIndicator as sa, MenuSeparator as ca, MenuSubmenuTrigger as la, MenuTrigger as ua } from "./components/selection/menu.js";
57
+ import { Select as da, SelectGroupLabel as fa, SelectItem as pa, SelectItemIndicator as ma, SelectItemText as ha, SelectList as ga, SelectPopup as _a, SelectPositioner as va, SelectSeparator as ya, SelectTrigger as ba, SelectValue as xa } from "./components/selection/select.js";
58
+ export { lr as Accordion, ur as AccordionHeader, dr as AccordionItem, fr as AccordionPanel, pr as AccordionRoot, mr as AccordionTrigger, x as Alert, S as AlertActions, C as AlertContent, w as AlertDescription, Un as AlertDialog, Wn as AlertDialogActions, Gn as AlertDialogClose, Kn as AlertDialogPopup, qn as AlertDialogRoot, Jn as AlertDialogTrigger, T as AlertTitle, E as AlertView, Ci as Autocomplete, wi as AutocompleteInputGroup, Ti as AutocompleteItem, re as Avatar, ie as Badge, D as Banner, Tr as BottomSheet, Er as BottomSheetBody, Dr as BottomSheetFooter, Or as BottomSheetHandle, kr as BottomSheetHeader, Ar as BottomSheetPopup, jr as BottomSheetRoot, Te as Breadcrumb, Ee as BreadcrumbEllipsis, De as BreadcrumbItem, Oe as BreadcrumbLink, ke as BreadcrumbList, Ae as BreadcrumbPage, je as BreadcrumbSeparator, ae as Button, e as Calendar, s as CalendarDate, c as CalendarDateTime, oe as Card, se as CardBody, ce as CardDescription, le as CardFooter, ue as CardHeader, de as CardTitle, Li as Checkbox, Ri as CheckboxGroup, zi as CheckboxItem, fe as CloudBox, G as CodeField, hr as Collapsible, gr as CollapsiblePanel, _r as CollapsibleRoot, vr as CollapsibleTrigger, sn as Collection, cn as CollectionActions, ln as CollectionButton, un as CollectionContent, dn as CollectionDescription, fn as CollectionHeading, pn as CollectionItem, mn as CollectionLink, hn as CollectionMeta, Ei as Combobox, Di as ComboboxClear, Oi as ComboboxEmpty, ki as ComboboxInput, Ai as ComboboxInputGroup, ji as ComboboxItem, Mi as ComboboxItemIndicator, Ni as ComboboxList, Pi as ComboboxPopup, Fi as ComboboxPositioner, Ii as ComboboxTrigger, Ze as CommandPalette, Be as CommandPaletteBackdrop, Ve as CommandPaletteClose, He as CommandPaletteDescription, Ue as CommandPaletteEmpty, We as CommandPaletteGroup, Ge as CommandPaletteGroupLabel, Ke as CommandPaletteInput, qe as CommandPaletteItem, Je as CommandPaletteItemIndicator, Ye as CommandPaletteLabel, Xe as CommandPaletteList, Qe as CommandPalettePopup, $e as CommandPalettePortal, et as CommandPaletteSeparator, tt as CommandPaletteShortcut, nt as CommandPaletteStatus, rt as CommandPaletteTitle, it as CommandPaletteTrigger, at as CommandPaletteViewport, Yi as ContextMenu, Xi as ContextMenuTrigger, gn as DataTable, _n as DataTableControls, vn as DataTableDescription, yn as DataTableHeader, bn as DataTableRegion, xn as DataTableStatus, Sn as DataTableTitle, t as DateField, n as DatePicker, i as DateRangePicker, r as DateTimePicker, Yn as Dialog, Xn as DialogBackdrop, Zn as DialogBody, Qn as DialogClose, $n as DialogDescription, er as DialogFooter, tr as DialogHeader, nr as DialogPopup, rr as DialogPortal, ir as DialogRoot, ar as DialogTitle, or as DialogTrigger, sr as DialogViewport, Mr as Drawer, Nr as DrawerBackdrop, Pr as DrawerBody, Fr as DrawerClose, Ir as DrawerContent, Lr as DrawerDescription, Rr as DrawerFooter, zr as DrawerHeader, Br as DrawerPopup, Vr as DrawerPortal, Hr as DrawerRoot, Ur as DrawerSwipeArea, Wr as DrawerTitle, Gr as DrawerTrigger, Kr as DrawerViewport, K as DropZone, Zi as DropdownMenu, O as EmptyState, b as FEEDBACK_STATUSES, q as FileUpload, ot as Header, st as HeaderActions, ct as HeaderBrand, lt as HeaderNav, ut as HeaderRail, dt as HeaderStatus, pe as IconButton, J as Input, me as Link, R as LinyaoProvider, Cn as List, wn as ListActions, Tn as ListButton, he as ListCell, ge as ListCellAction, _e as ListCellContent, ve as ListCellDescription, ye as ListCellLeading, be as ListCellMetadata, xe as ListCellTitle, Se as ListCellTrailing, En as ListContent, Dn as ListDescription, On as ListHeading, kn as ListItem, An as ListLink, jn as ListMeta, M as Loader, Qi as Menu, $i as MenuCheckboxItem, ea as MenuCheckboxItemIndicator, ta as MenuGroupLabel, na as MenuItem, ra as MenuLinkItem, ia as MenuPopup, aa as MenuPositioner, oa as MenuRadioItem, sa as MenuRadioItemIndicator, ca as MenuSeparator, la as MenuSubmenuTrigger, ua as MenuTrigger, vt as Menubar, yt as MenubarCheckboxItem, bt as MenubarCheckboxItemIndicator, xt as MenubarGroup, St as MenubarGroupLabel, Ct as MenubarItem, wt as MenubarLinkItem, Tt as MenubarMenu, Et as MenubarPopup, Dt as MenubarPortal, Ot as MenubarPositioner, kt as MenubarRadioGroup, At as MenubarRadioItem, jt as MenubarRadioItemIndicator, Mt as MenubarSeparator, Nt as MenubarSubmenu, Pt as MenubarSubmenuTrigger, Ft as MenubarTrigger, I as MessagesProvider, k as Meter, cr as Modal, Ht as NavigationMenu, Ut as NavigationMenuArrow, Wt as NavigationMenuContent, Gt as NavigationMenuIcon, Kt as NavigationMenuItem, qt as NavigationMenuLink, Jt as NavigationMenuList, Yt as NavigationMenuPopup, Xt as NavigationMenuPortal, Zt as NavigationMenuPositioner, Qt as NavigationMenuTrigger, $t as NavigationMenuViewport, Y as NumberField, X as OTPField, Mn as OrderedCollection, Nn as OrderedList, Me as Pagination, Ne as PaginationButton, Pe as PaginationEllipsis, Fe as PaginationItem, Ie as PaginationLink, Le as PaginationList, Re as PaginationNext, ze as PaginationPrevious, Z as PasswordField, Q as PhoneField, qr as Popover, Jr as PopoverArrow, Yr as PopoverBackdrop, Xr as PopoverClose, Zr as PopoverDescription, Qr as PopoverPopup, $r as PopoverPortal, ei as PopoverPositioner, ti as PopoverRoot, ni as PopoverTitle, ri as PopoverTrigger, ii as PopoverViewport, ai as PreviewCard, oi as PreviewCardArrow, si as PreviewCardBackdrop, ci as PreviewCardPopup, li as PreviewCardPortal, ui as PreviewCardPositioner, di as PreviewCardRoot, fi as PreviewCardTrigger, pi as PreviewCardViewport, A as Progress, Bi as Radio, Vi as RadioGroup, Hi as RadioItem, en as ScrollArea, tn as ScrollAreaContent, nn as ScrollAreaCorner, rn as ScrollAreaScrollbar, an as ScrollAreaThumb, on as ScrollAreaViewport, $ as SearchField, Ce as SectionHeading, Ui as SegmentedControl, Wi as SegmentedControlItem, da as Select, fa as SelectGroupLabel, pa as SelectItem, ma as SelectItemIndicator, ha as SelectItemText, ga as SelectList, _a as SelectPopup, va as SelectPositioner, ya as SelectSeparator, ba as SelectTrigger, xa as SelectValue, we as Separator, j as Skeleton, Gi as Slider, N as Spinner, Ki as Switch, ft as TabBar, pt as TabBarIcon, mt as TabBarItem, ht as TabBarLabel, gt as TabBarLink, _t as TabBarList, Pn as Table, Fn as TableBody, In as TableCaption, Ln as TableCell, Rn as TableFooter, zn as TableFrame, Bn as TableHead, Vn as TableHeader, Hn as TableRow, yr as Tabs, br as TabsIndicator, xr as TabsList, Sr as TabsPanel, Cr as TabsRoot, wr as TabsTab, ee as TextField, te as TextView, ne as Textarea, l as Time, a as TimeField, o as TimePicker, B as ToastProvider, V as ToastRoot, H as ToastViewport, qi as Toggle, Ji as ToggleGroup, It as Toolbar, Lt as ToolbarButton, Rt as ToolbarGroup, zt as ToolbarInput, Bt as ToolbarLink, Vt as ToolbarSeparator, mi as Tooltip, hi as TooltipArrow, gi as TooltipPopup, _i as TooltipPortal, vi as TooltipPositioner, yi as TooltipProvider, bi as TooltipRoot, xi as TooltipTrigger, Si as TooltipViewport, u as ZonedDateTime, U as createToastManager, P as enUSMessages, d as getLocalTimeZone, z as getMessagesForLocale, f as now, p as parseAbsolute, m as parseAbsoluteToLocal, h as parseDate, g as parseDateTime, _ as parseTime, v as parseZonedDateTime, y as today, L as useMessages, W as useToastManager, F as zhTWMessages };
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  //#region src/internal/class-names.ts
2
3
  function e(...e) {
3
4
  return e.filter(Boolean).join(" ");
@@ -1 +1 @@
1
- {"version":3,"file":"class-names.js","names":[],"sources":["../../src/internal/class-names.ts"],"sourcesContent":["/**\n * A Base UI `className` value: either a static string, or a function that receives the\n * component's state. Every Linyao Design System wrapper preserves the function form so\n * consumers can keep styling from state after the design system class has been applied.\n */\nexport type StateClassName<State> = string | ((state: State) => string | undefined) | undefined;\n\n/** Joins the truthy class names with a single space. */\nexport function cx(...values: Array<string | false | null | undefined>): string {\n\treturn values.filter(Boolean).join(\" \");\n}\n\n/** Prefixes a Linyao Design System class onto a consumer `className`, keeping the state-function form. */\nexport function withStateClassName<State>(baseClassName: string, className?: StateClassName<State>): string | ((state: State) => string) {\n\tif (typeof className === \"function\") {\n\t\treturn state => cx(baseClassName, className(state));\n\t}\n\n\treturn cx(baseClassName, className);\n}\n\n/** Merges two consumer `className` values, either of which may be a state function. */\nexport function combineStateClassNames<State>(first?: StateClassName<State>, second?: StateClassName<State>): StateClassName<State> {\n\tif (typeof first === \"function\" || typeof second === \"function\") {\n\t\treturn state => cx(typeof first === \"function\" ? first(state) : first, typeof second === \"function\" ? second(state) : second);\n\t}\n\n\treturn cx(first, second);\n}\n"],"mappings":";AAQA,SAAgB,EAAG,GAAG,GAA0D;CAC/E,OAAO,EAAO,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;AACvC;AAGA,SAAgB,EAA0B,GAAuB,GAAwE;CAKxI,OAJI,OAAO,KAAc,cACjB,MAAS,EAAG,GAAe,EAAU,CAAK,CAAC,IAG5C,EAAG,GAAe,CAAS;AACnC;AAGA,SAAgB,EAA8B,GAA+B,GAAuD;CAKnI,OAJI,OAAO,KAAU,cAAc,OAAO,KAAW,cAC7C,MAAS,EAAG,OAAO,KAAU,aAAa,EAAM,CAAK,IAAI,GAAO,OAAO,KAAW,aAAa,EAAO,CAAK,IAAI,CAAM,IAGtH,EAAG,GAAO,CAAM;AACxB"}
1
+ {"version":3,"file":"class-names.js","names":[],"sources":["../../src/internal/class-names.ts"],"sourcesContent":["/**\n * A Base UI `className` value: either a static string, or a function that receives the\n * component's state. Every Linyao Design System wrapper preserves the function form so\n * consumers can keep styling from state after the design system class has been applied.\n */\nexport type StateClassName<State> = string | ((state: State) => string | undefined) | undefined;\n\n/** Joins the truthy class names with a single space. */\nexport function cx(...values: Array<string | false | null | undefined>): string {\n\treturn values.filter(Boolean).join(\" \");\n}\n\n/** Prefixes a Linyao Design System class onto a consumer `className`, keeping the state-function form. */\nexport function withStateClassName<State>(baseClassName: string, className?: StateClassName<State>): string | ((state: State) => string) {\n\tif (typeof className === \"function\") {\n\t\treturn state => cx(baseClassName, className(state));\n\t}\n\n\treturn cx(baseClassName, className);\n}\n\n/** Merges two consumer `className` values, either of which may be a state function. */\nexport function combineStateClassNames<State>(first?: StateClassName<State>, second?: StateClassName<State>): StateClassName<State> {\n\tif (typeof first === \"function\" || typeof second === \"function\") {\n\t\treturn state => cx(typeof first === \"function\" ? first(state) : first, typeof second === \"function\" ? second(state) : second);\n\t}\n\n\treturn cx(first, second);\n}\n"],"mappings":";;AAQA,SAAgB,EAAG,GAAG,GAA0D;CAC/E,OAAO,EAAO,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;AACvC;AAGA,SAAgB,EAA0B,GAAuB,GAAwE;CAKxI,OAJI,OAAO,KAAc,cACjB,MAAS,EAAG,GAAe,EAAU,CAAK,CAAC,IAG5C,EAAG,GAAe,CAAS;AACnC;AAGA,SAAgB,EAA8B,GAA+B,GAAuD;CAKnI,OAJI,OAAO,KAAU,cAAc,OAAO,KAAW,cAC7C,MAAS,EAAG,OAAO,KAAU,aAAa,EAAM,CAAK,IAAI,GAAO,OAAO,KAAW,aAAa,EAAO,CAAK,IAAI,CAAM,IAGtH,EAAG,GAAO,CAAM;AACxB"}
@@ -1,2 +1,3 @@
1
+ export { LinyaoProvider, getMessagesForLocale, type LinyaoProviderProps } from './linyao-provider.js';
1
2
  export { enUSMessages, zhTWMessages, type ComponentMessages } from './messages.js';
2
3
  export { MessagesProvider, useMessages, type MessagesProviderProps } from './provider.js';
@@ -0,0 +1,38 @@
1
+ import { ReactNode } from 'react';
2
+ import { ComponentMessages } from './messages.js';
3
+ /**
4
+ * Picks the bundle that ships with the package for a BCP 47 tag. Only Traditional Chinese and
5
+ * English are built in; every other tag falls back to English, which is the bundle a reader of
6
+ * an unknown locale is most likely to understand. Pass `messages` to supply your own.
7
+ */
8
+ export declare function getMessagesForLocale(locale: string): ComponentMessages;
9
+ export interface LinyaoProviderProps {
10
+ children: ReactNode;
11
+ /**
12
+ * BCP 47 locale. It selects the built-in message bundle *and* drives the date and time
13
+ * components' segment order, weekday names, numbering and default hour cycle, so the two
14
+ * cannot drift apart. Omit it to keep the Traditional Chinese default.
15
+ */
16
+ locale?: string;
17
+ /**
18
+ * Strings to use in place of the bundle the locale selected. Partial objects are merged over
19
+ * it, so this can translate a locale the package does not ship or correct a single string.
20
+ */
21
+ messages?: Partial<ComponentMessages>;
22
+ }
23
+ /**
24
+ * Wires both halves of the system's localisation from one place: the component strings that
25
+ * Base UI components fall back to, and the locale React Aria uses for dates and times. Set it
26
+ * once at the root of the application.
27
+ *
28
+ * ```tsx
29
+ * <LinyaoProvider locale="en-US">
30
+ * <App />
31
+ * </LinyaoProvider>
32
+ * ```
33
+ *
34
+ * Writing direction is not part of this: `dir` belongs on the document alongside
35
+ * `data-lyds-theme`, because both have to be correct in the server-rendered markup before the
36
+ * first paint. Set `<html lang="ar" dir="rtl">` and the components' logical properties follow.
37
+ */
38
+ export declare function LinyaoProvider({ children, locale, messages }: LinyaoProviderProps): import("react").JSX.Element;
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { enUSMessages as e, zhTWMessages as t } from "./messages.js";
3
+ import { MessagesProvider as n } from "./provider.js";
4
+ import { I18nProvider as r } from "react-aria-components/I18nProvider";
5
+ import { jsx as i } from "react/jsx-runtime";
6
+ //#region src/intl/linyao-provider.tsx
7
+ function a(n) {
8
+ return /^zh\b/iu.test(n) ? t : e;
9
+ }
10
+ var o = {};
11
+ function s({ children: e, locale: t, messages: s = o }) {
12
+ let c = t === void 0 ? s : {
13
+ ...a(t),
14
+ ...s
15
+ }, l = /* @__PURE__ */ i(n, {
16
+ messages: c,
17
+ children: e
18
+ });
19
+ return t === void 0 ? l : /* @__PURE__ */ i(r, {
20
+ locale: t,
21
+ children: l
22
+ });
23
+ }
24
+ //#endregion
25
+ export { s as LinyaoProvider, a as getMessagesForLocale };
26
+
27
+ //# sourceMappingURL=linyao-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linyao-provider.js","names":[],"sources":["../../src/intl/linyao-provider.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { I18nProvider } from \"react-aria-components/I18nProvider\";\n\nimport { enUSMessages, zhTWMessages, type ComponentMessages } from \"./messages\";\nimport { MessagesProvider } from \"./provider\";\n\n/**\n * Picks the bundle that ships with the package for a BCP 47 tag. Only Traditional Chinese and\n * English are built in; every other tag falls back to English, which is the bundle a reader of\n * an unknown locale is most likely to understand. Pass `messages` to supply your own.\n */\nexport function getMessagesForLocale(locale: string): ComponentMessages {\n\treturn /^zh\\b/iu.test(locale) ? zhTWMessages : enUSMessages;\n}\n\nexport interface LinyaoProviderProps {\n\tchildren: ReactNode;\n\t/**\n\t * BCP 47 locale. It selects the built-in message bundle *and* drives the date and time\n\t * components' segment order, weekday names, numbering and default hour cycle, so the two\n\t * cannot drift apart. Omit it to keep the Traditional Chinese default.\n\t */\n\tlocale?: string;\n\t/**\n\t * Strings to use in place of the bundle the locale selected. Partial objects are merged over\n\t * it, so this can translate a locale the package does not ship or correct a single string.\n\t */\n\tmessages?: Partial<ComponentMessages>;\n}\n\nconst NO_OVERRIDES: Partial<ComponentMessages> = {};\n\n/**\n * Wires both halves of the system's localisation from one place: the component strings that\n * Base UI components fall back to, and the locale React Aria uses for dates and times. Set it\n * once at the root of the application.\n *\n * ```tsx\n * <LinyaoProvider locale=\"en-US\">\n * \t<App />\n * </LinyaoProvider>\n * ```\n *\n * Writing direction is not part of this: `dir` belongs on the document alongside\n * `data-lyds-theme`, because both have to be correct in the server-rendered markup before the\n * first paint. Set `<html lang=\"ar\" dir=\"rtl\">` and the components' logical properties follow.\n */\nexport function LinyaoProvider({ children, locale, messages = NO_OVERRIDES }: LinyaoProviderProps) {\n\tconst resolved = locale === undefined ? messages : { ...getMessagesForLocale(locale), ...messages };\n\tconst localised = <MessagesProvider messages={resolved}>{children}</MessagesProvider>;\n\n\treturn locale === undefined ? localised : <I18nProvider locale={locale}>{localised}</I18nProvider>;\n}\n"],"mappings":";;;;;;AAWA,SAAgB,EAAqB,GAAmC;CACvE,OAAO,UAAU,KAAK,CAAM,IAAI,IAAe;AAChD;AAiBA,IAAM,IAA2C,CAAC;AAiBlD,SAAgB,EAAe,EAAE,aAAU,WAAQ,cAAW,KAAqC;CAClG,IAAM,IAAW,MAAW,KAAA,IAAY,IAAW;EAAE,GAAG,EAAqB,CAAM;EAAG,GAAG;CAAS,GAC5F,IAAY,kBAAC,GAAD;EAAkB,UAAU;EAAW;CAA2B,CAAA;CAEpF,OAAO,MAAW,KAAA,IAAY,IAAY,kBAAC,GAAD;EAAsB;EAAS,UAAA;CAAwB,CAAA;AAClG"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  //#region src/intl/messages.ts
2
3
  var e = {
3
4
  alertDialogClose: "取消並關閉警示",
@@ -1 +1 @@
1
- {"version":3,"file":"messages.js","names":[],"sources":["../../src/intl/messages.ts"],"sourcesContent":["/**\n * Every user-visible string the components fall back to when the consumer does not pass one.\n * Each of these also remains overridable per instance through the matching prop; the bundle is\n * the default, not a lock.\n */\nexport interface ComponentMessages {\n\talertDialogClose: string;\n\tautocompleteClear: string;\n\tautocompleteEmpty: string;\n\tautocompleteTrigger: string;\n\tbottomSheetClose: string;\n\tbreadcrumbLabel: string;\n\tbreadcrumbMore: string;\n\tcomboboxClear: string;\n\tcomboboxEmpty: string;\n\tcomboboxTrigger: string;\n\tcommandPaletteClose: string;\n\tcommandPalettePlaceholder: string;\n\tdialogClose: string;\n\tdrawerClose: string;\n\tdropZoneBrowse: string;\n\tdropZonePrimary: string;\n\tdropZoneSecondary: string;\n\tfileSelectionLabel: string;\n\tfileUploadInvalidFile: string;\n\tfileUploadTrigger: string;\n\theaderNavLabel: string;\n\t/** Appended to a link's accessible name when it opens in a new window. */\n\tlinkOpensInNewWindow: string;\n\tnumberFieldDecrement: string;\n\tnumberFieldIncrement: string;\n\tpaginationLabel: string;\n\tpaginationMore: string;\n\tpaginationNext: string;\n\tpaginationPrevious: string;\n\tpasswordFieldHide: string;\n\tpasswordFieldShow: string;\n\tpopoverClose: string;\n\tselectPlaceholder: string;\n\ttabBarLabel: string;\n\ttoastClose: string;\n\t/** Announced for the second and later code slots, which have no visible label of their own. */\n\tcodeSlotLabel: (position: number, length: number) => string;\n\t/** Announced by the file selection status region after a picker or drop changes the selection. */\n\tfileSelectionSummary: (count: number) => string;\n}\n\nexport const zhTWMessages: ComponentMessages = {\n\talertDialogClose: \"取消並關閉警示\",\n\tautocompleteClear: \"清除搜尋內容\",\n\tautocompleteEmpty: \"找不到建議項目\",\n\tautocompleteTrigger: \"顯示建議項目\",\n\tbottomSheetClose: \"關閉底部面板\",\n\tbreadcrumbLabel: \"麵包屑導覽\",\n\tbreadcrumbMore: \"更多頁面\",\n\tcomboboxClear: \"清除選取\",\n\tcomboboxEmpty: \"找不到符合的選項\",\n\tcomboboxTrigger: \"顯示選項\",\n\tcommandPaletteClose: \"關閉\",\n\tcommandPalettePlaceholder: \"輸入指令…\",\n\tdialogClose: \"關閉對話框\",\n\tdrawerClose: \"關閉側欄\",\n\tdropZoneBrowse: \"選擇檔案\",\n\tdropZonePrimary: \"將檔案拖曳至此\",\n\tdropZoneSecondary: \"或從裝置選擇檔案\",\n\tfileSelectionLabel: \"已選擇的檔案\",\n\tfileUploadInvalidFile: \"不支援的檔案類型\",\n\tfileUploadTrigger: \"選擇檔案\",\n\theaderNavLabel: \"主要導覽\",\n\tlinkOpensInNewWindow: \"(在新視窗開啟)\",\n\tnumberFieldDecrement: \"減少數值\",\n\tnumberFieldIncrement: \"增加數值\",\n\tpaginationLabel: \"分頁導覽\",\n\tpaginationMore: \"更多頁面\",\n\tpaginationNext: \"下一頁\",\n\tpaginationPrevious: \"上一頁\",\n\tpasswordFieldHide: \"隱藏密碼\",\n\tpasswordFieldShow: \"顯示密碼\",\n\tpopoverClose: \"關閉彈出視窗\",\n\tselectPlaceholder: \"請選擇\",\n\ttabBarLabel: \"應用程式區段\",\n\ttoastClose: \"關閉通知\",\n\tcodeSlotLabel: (position, length) => `第 ${position} 個字元,共 ${length} 個`,\n\tfileSelectionSummary: count => `已選擇 ${count} 個檔案`\n};\n\nexport const enUSMessages: ComponentMessages = {\n\talertDialogClose: \"Cancel and close alert\",\n\tautocompleteClear: \"Clear search\",\n\tautocompleteEmpty: \"No suggestions found\",\n\tautocompleteTrigger: \"Show suggestions\",\n\tbottomSheetClose: \"Close sheet\",\n\tbreadcrumbLabel: \"Breadcrumb\",\n\tbreadcrumbMore: \"More pages\",\n\tcomboboxClear: \"Clear selection\",\n\tcomboboxEmpty: \"No matching options\",\n\tcomboboxTrigger: \"Show options\",\n\tcommandPaletteClose: \"Close\",\n\tcommandPalettePlaceholder: \"Type a command…\",\n\tdialogClose: \"Close dialog\",\n\tdrawerClose: \"Close drawer\",\n\tdropZoneBrowse: \"Choose files\",\n\tdropZonePrimary: \"Drop files here\",\n\tdropZoneSecondary: \"or choose them from your device\",\n\tfileSelectionLabel: \"Selected files\",\n\tfileUploadInvalidFile: \"Unsupported file type\",\n\tfileUploadTrigger: \"Choose files\",\n\theaderNavLabel: \"Main\",\n\tlinkOpensInNewWindow: \"(opens in a new window)\",\n\tnumberFieldDecrement: \"Decrease value\",\n\tnumberFieldIncrement: \"Increase value\",\n\tpaginationLabel: \"Pagination\",\n\tpaginationMore: \"More pages\",\n\tpaginationNext: \"Next page\",\n\tpaginationPrevious: \"Previous page\",\n\tpasswordFieldHide: \"Hide password\",\n\tpasswordFieldShow: \"Show password\",\n\tpopoverClose: \"Close popover\",\n\tselectPlaceholder: \"Select an option\",\n\ttabBarLabel: \"Sections\",\n\ttoastClose: \"Close notification\",\n\tcodeSlotLabel: (position, length) => `Character ${position} of ${length}`,\n\tfileSelectionSummary: count => (count === 1 ? \"1 file selected\" : `${count} files selected`)\n};\n"],"mappings":";AA+CA,IAAa,IAAkC;CAC9C,kBAAkB;CAClB,mBAAmB;CACnB,mBAAmB;CACnB,qBAAqB;CACrB,kBAAkB;CAClB,iBAAiB;CACjB,gBAAgB;CAChB,eAAe;CACf,eAAe;CACf,iBAAiB;CACjB,qBAAqB;CACrB,2BAA2B;CAC3B,aAAa;CACb,aAAa;CACb,gBAAgB;CAChB,iBAAiB;CACjB,mBAAmB;CACnB,oBAAoB;CACpB,uBAAuB;CACvB,mBAAmB;CACnB,gBAAgB;CAChB,sBAAsB;CACtB,sBAAsB;CACtB,sBAAsB;CACtB,iBAAiB;CACjB,gBAAgB;CAChB,gBAAgB;CAChB,oBAAoB;CACpB,mBAAmB;CACnB,mBAAmB;CACnB,cAAc;CACd,mBAAmB;CACnB,aAAa;CACb,YAAY;CACZ,gBAAgB,GAAU,MAAW,KAAK,EAAS,SAAS,EAAO;CACnE,uBAAsB,MAAS,OAAO,EAAM;AAC7C,GAEa,IAAkC;CAC9C,kBAAkB;CAClB,mBAAmB;CACnB,mBAAmB;CACnB,qBAAqB;CACrB,kBAAkB;CAClB,iBAAiB;CACjB,gBAAgB;CAChB,eAAe;CACf,eAAe;CACf,iBAAiB;CACjB,qBAAqB;CACrB,2BAA2B;CAC3B,aAAa;CACb,aAAa;CACb,gBAAgB;CAChB,iBAAiB;CACjB,mBAAmB;CACnB,oBAAoB;CACpB,uBAAuB;CACvB,mBAAmB;CACnB,gBAAgB;CAChB,sBAAsB;CACtB,sBAAsB;CACtB,sBAAsB;CACtB,iBAAiB;CACjB,gBAAgB;CAChB,gBAAgB;CAChB,oBAAoB;CACpB,mBAAmB;CACnB,mBAAmB;CACnB,cAAc;CACd,mBAAmB;CACnB,aAAa;CACb,YAAY;CACZ,gBAAgB,GAAU,MAAW,aAAa,EAAS,MAAM;CACjE,uBAAsB,MAAU,MAAU,IAAI,oBAAoB,GAAG,EAAM;AAC5E"}
1
+ {"version":3,"file":"messages.js","names":[],"sources":["../../src/intl/messages.ts"],"sourcesContent":["/**\n * Every user-visible string the components fall back to when the consumer does not pass one.\n * Each of these also remains overridable per instance through the matching prop; the bundle is\n * the default, not a lock.\n */\nexport interface ComponentMessages {\n\talertDialogClose: string;\n\tautocompleteClear: string;\n\tautocompleteEmpty: string;\n\tautocompleteTrigger: string;\n\tbottomSheetClose: string;\n\tbreadcrumbLabel: string;\n\tbreadcrumbMore: string;\n\tcomboboxClear: string;\n\tcomboboxEmpty: string;\n\tcomboboxTrigger: string;\n\tcommandPaletteClose: string;\n\tcommandPalettePlaceholder: string;\n\tdialogClose: string;\n\tdrawerClose: string;\n\tdropZoneBrowse: string;\n\tdropZonePrimary: string;\n\tdropZoneSecondary: string;\n\tfileSelectionLabel: string;\n\tfileUploadInvalidFile: string;\n\tfileUploadTrigger: string;\n\theaderNavLabel: string;\n\t/** Appended to a link's accessible name when it opens in a new window. */\n\tlinkOpensInNewWindow: string;\n\tnumberFieldDecrement: string;\n\tnumberFieldIncrement: string;\n\tpaginationLabel: string;\n\tpaginationMore: string;\n\tpaginationNext: string;\n\tpaginationPrevious: string;\n\tpasswordFieldHide: string;\n\tpasswordFieldShow: string;\n\tpopoverClose: string;\n\tselectPlaceholder: string;\n\ttabBarLabel: string;\n\ttoastClose: string;\n\t/** Announced for the second and later code slots, which have no visible label of their own. */\n\tcodeSlotLabel: (position: number, length: number) => string;\n\t/** Announced by the file selection status region after a picker or drop changes the selection. */\n\tfileSelectionSummary: (count: number) => string;\n}\n\nexport const zhTWMessages: ComponentMessages = {\n\talertDialogClose: \"取消並關閉警示\",\n\tautocompleteClear: \"清除搜尋內容\",\n\tautocompleteEmpty: \"找不到建議項目\",\n\tautocompleteTrigger: \"顯示建議項目\",\n\tbottomSheetClose: \"關閉底部面板\",\n\tbreadcrumbLabel: \"麵包屑導覽\",\n\tbreadcrumbMore: \"更多頁面\",\n\tcomboboxClear: \"清除選取\",\n\tcomboboxEmpty: \"找不到符合的選項\",\n\tcomboboxTrigger: \"顯示選項\",\n\tcommandPaletteClose: \"關閉\",\n\tcommandPalettePlaceholder: \"輸入指令…\",\n\tdialogClose: \"關閉對話框\",\n\tdrawerClose: \"關閉側欄\",\n\tdropZoneBrowse: \"選擇檔案\",\n\tdropZonePrimary: \"將檔案拖曳至此\",\n\tdropZoneSecondary: \"或從裝置選擇檔案\",\n\tfileSelectionLabel: \"已選擇的檔案\",\n\tfileUploadInvalidFile: \"不支援的檔案類型\",\n\tfileUploadTrigger: \"選擇檔案\",\n\theaderNavLabel: \"主要導覽\",\n\tlinkOpensInNewWindow: \"(在新視窗開啟)\",\n\tnumberFieldDecrement: \"減少數值\",\n\tnumberFieldIncrement: \"增加數值\",\n\tpaginationLabel: \"分頁導覽\",\n\tpaginationMore: \"更多頁面\",\n\tpaginationNext: \"下一頁\",\n\tpaginationPrevious: \"上一頁\",\n\tpasswordFieldHide: \"隱藏密碼\",\n\tpasswordFieldShow: \"顯示密碼\",\n\tpopoverClose: \"關閉彈出視窗\",\n\tselectPlaceholder: \"請選擇\",\n\ttabBarLabel: \"應用程式區段\",\n\ttoastClose: \"關閉通知\",\n\tcodeSlotLabel: (position, length) => `第 ${position} 個字元,共 ${length} 個`,\n\tfileSelectionSummary: count => `已選擇 ${count} 個檔案`\n};\n\nexport const enUSMessages: ComponentMessages = {\n\talertDialogClose: \"Cancel and close alert\",\n\tautocompleteClear: \"Clear search\",\n\tautocompleteEmpty: \"No suggestions found\",\n\tautocompleteTrigger: \"Show suggestions\",\n\tbottomSheetClose: \"Close sheet\",\n\tbreadcrumbLabel: \"Breadcrumb\",\n\tbreadcrumbMore: \"More pages\",\n\tcomboboxClear: \"Clear selection\",\n\tcomboboxEmpty: \"No matching options\",\n\tcomboboxTrigger: \"Show options\",\n\tcommandPaletteClose: \"Close\",\n\tcommandPalettePlaceholder: \"Type a command…\",\n\tdialogClose: \"Close dialog\",\n\tdrawerClose: \"Close drawer\",\n\tdropZoneBrowse: \"Choose files\",\n\tdropZonePrimary: \"Drop files here\",\n\tdropZoneSecondary: \"or choose them from your device\",\n\tfileSelectionLabel: \"Selected files\",\n\tfileUploadInvalidFile: \"Unsupported file type\",\n\tfileUploadTrigger: \"Choose files\",\n\theaderNavLabel: \"Main\",\n\tlinkOpensInNewWindow: \"(opens in a new window)\",\n\tnumberFieldDecrement: \"Decrease value\",\n\tnumberFieldIncrement: \"Increase value\",\n\tpaginationLabel: \"Pagination\",\n\tpaginationMore: \"More pages\",\n\tpaginationNext: \"Next page\",\n\tpaginationPrevious: \"Previous page\",\n\tpasswordFieldHide: \"Hide password\",\n\tpasswordFieldShow: \"Show password\",\n\tpopoverClose: \"Close popover\",\n\tselectPlaceholder: \"Select an option\",\n\ttabBarLabel: \"Sections\",\n\ttoastClose: \"Close notification\",\n\tcodeSlotLabel: (position, length) => `Character ${position} of ${length}`,\n\tfileSelectionSummary: count => (count === 1 ? \"1 file selected\" : `${count} files selected`)\n};\n"],"mappings":";;AA+CA,IAAa,IAAkC;CAC9C,kBAAkB;CAClB,mBAAmB;CACnB,mBAAmB;CACnB,qBAAqB;CACrB,kBAAkB;CAClB,iBAAiB;CACjB,gBAAgB;CAChB,eAAe;CACf,eAAe;CACf,iBAAiB;CACjB,qBAAqB;CACrB,2BAA2B;CAC3B,aAAa;CACb,aAAa;CACb,gBAAgB;CAChB,iBAAiB;CACjB,mBAAmB;CACnB,oBAAoB;CACpB,uBAAuB;CACvB,mBAAmB;CACnB,gBAAgB;CAChB,sBAAsB;CACtB,sBAAsB;CACtB,sBAAsB;CACtB,iBAAiB;CACjB,gBAAgB;CAChB,gBAAgB;CAChB,oBAAoB;CACpB,mBAAmB;CACnB,mBAAmB;CACnB,cAAc;CACd,mBAAmB;CACnB,aAAa;CACb,YAAY;CACZ,gBAAgB,GAAU,MAAW,KAAK,EAAS,SAAS,EAAO;CACnE,uBAAsB,MAAS,OAAO,EAAM;AAC7C,GAEa,IAAkC;CAC9C,kBAAkB;CAClB,mBAAmB;CACnB,mBAAmB;CACnB,qBAAqB;CACrB,kBAAkB;CAClB,iBAAiB;CACjB,gBAAgB;CAChB,eAAe;CACf,eAAe;CACf,iBAAiB;CACjB,qBAAqB;CACrB,2BAA2B;CAC3B,aAAa;CACb,aAAa;CACb,gBAAgB;CAChB,iBAAiB;CACjB,mBAAmB;CACnB,oBAAoB;CACpB,uBAAuB;CACvB,mBAAmB;CACnB,gBAAgB;CAChB,sBAAsB;CACtB,sBAAsB;CACtB,sBAAsB;CACtB,iBAAiB;CACjB,gBAAgB;CAChB,gBAAgB;CAChB,oBAAoB;CACpB,mBAAmB;CACnB,mBAAmB;CACnB,cAAc;CACd,mBAAmB;CACnB,aAAa;CACb,YAAY;CACZ,gBAAgB,GAAU,MAAW,aAAa,EAAS,MAAM;CACjE,uBAAsB,MAAU,MAAU,IAAI,oBAAoB,GAAG,EAAM;AAC5E"}
@@ -1,22 +1,31 @@
1
+ "use client";
1
2
  import { zhTWMessages as e } from "./messages.js";
2
- import { createContext as t, useContext as n, useMemo as r } from "react";
3
+ import { createContext as t, useContext as n, useState as r } from "react";
3
4
  import { jsx as i } from "react/jsx-runtime";
4
5
  //#region src/intl/provider.tsx
5
6
  var a = t(e);
6
- function o({ children: e, messages: t }) {
7
- let o = n(a), s = r(() => ({
8
- ...o,
7
+ function o(e, t) {
8
+ for (let n of Object.keys(t)) if (e[n] !== t[n]) return !1;
9
+ return !0;
10
+ }
11
+ function s(e, t) {
12
+ let n = {
13
+ ...e,
9
14
  ...t
10
- }), [o, t]);
15
+ }, [i, a] = r(n);
16
+ return o(i, n) ? i : (a(n), n);
17
+ }
18
+ function c({ children: e, messages: t }) {
19
+ let r = s(n(a), t);
11
20
  return /* @__PURE__ */ i(a, {
12
- value: s,
21
+ value: r,
13
22
  children: e
14
23
  });
15
24
  }
16
- function s() {
25
+ function l() {
17
26
  return n(a);
18
27
  }
19
28
  //#endregion
20
- export { o as MessagesProvider, s as useMessages };
29
+ export { c as MessagesProvider, l as useMessages };
21
30
 
22
31
  //# sourceMappingURL=provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider.js","names":[],"sources":["../../src/intl/provider.tsx"],"sourcesContent":["import { createContext, useContext, useMemo, type ReactNode } from \"react\";\n\nimport { zhTWMessages, type ComponentMessages } from \"./messages\";\n\nconst MessagesContext = createContext<ComponentMessages>(zhTWMessages);\n\nexport interface MessagesProviderProps {\n\tchildren: ReactNode;\n\t/**\n\t * Strings to use in place of the inherited bundle. Partial objects are merged over the bundle\n\t * already in scope, so a provider can translate the whole system or correct a single string.\n\t */\n\tmessages: Partial<ComponentMessages>;\n}\n\n/**\n * Supplies the default strings the components fall back to. Without a provider the components use\n * the Traditional Chinese bundle, which is what they shipped with; wrap the tree in a provider to\n * swap in `enUSMessages` or a bundle of your own.\n */\nexport function MessagesProvider({ children, messages }: MessagesProviderProps) {\n\tconst inherited = useContext(MessagesContext);\n\tconst value = useMemo(() => ({ ...inherited, ...messages }), [inherited, messages]);\n\n\treturn <MessagesContext value={value}>{children}</MessagesContext>;\n}\n\n/** Reads the strings in scope. Component props still take precedence over whatever this returns. */\nexport function useMessages(): ComponentMessages {\n\treturn useContext(MessagesContext);\n}\n"],"mappings":";;;;AAIA,IAAM,IAAkB,EAAiC,CAAY;AAgBrE,SAAgB,EAAiB,EAAE,aAAU,eAAmC;CAC/E,IAAM,IAAY,EAAW,CAAe,GACtC,IAAQ,SAAe;EAAE,GAAG;EAAW,GAAG;CAAS,IAAI,CAAC,GAAW,CAAQ,CAAC;CAElF,OAAO,kBAAC,GAAD;EAAwB;EAAQ;CAA0B,CAAA;AAClE;AAGA,SAAgB,IAAiC;CAChD,OAAO,EAAW,CAAe;AAClC"}
1
+ {"version":3,"file":"provider.js","names":[],"sources":["../../src/intl/provider.tsx"],"sourcesContent":["import { createContext, useContext, useState, type ReactNode } from \"react\";\n\nimport { zhTWMessages, type ComponentMessages } from \"./messages\";\n\nconst MessagesContext = createContext<ComponentMessages>(zhTWMessages);\n\nfunction sameStrings(left: ComponentMessages, right: ComponentMessages): boolean {\n\tfor (const key of Object.keys(right) as Array<keyof ComponentMessages>) {\n\t\tif (left[key] !== right[key]) return false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Call sites pass `messages` as an object literal, which is a new reference on every render, so\n * memoising on its identity would publish a new context value every time the provider renders and\n * re-render every component that reads a string. Comparing the merged result keeps the value\n * stable until a string actually changes; storing it in state rather than a ref is what lets the\n * comparison happen during render, which is React's documented way to adjust state from props.\n */\nfunction useStableMessages(inherited: ComponentMessages, overrides: Partial<ComponentMessages>): ComponentMessages {\n\tconst next = { ...inherited, ...overrides };\n\tconst [published, setPublished] = useState(next);\n\n\tif (!sameStrings(published, next)) {\n\t\tsetPublished(next);\n\t\treturn next;\n\t}\n\n\treturn published;\n}\n\nexport interface MessagesProviderProps {\n\tchildren: ReactNode;\n\t/**\n\t * Strings to use in place of the inherited bundle. Partial objects are merged over the bundle\n\t * already in scope, so a provider can translate the whole system or correct a single string.\n\t */\n\tmessages: Partial<ComponentMessages>;\n}\n\n/**\n * Supplies the default strings the components fall back to. Without a provider the components use\n * the Traditional Chinese bundle, which is what they shipped with; wrap the tree in a provider to\n * swap in `enUSMessages` or a bundle of your own.\n */\nexport function MessagesProvider({ children, messages }: MessagesProviderProps) {\n\tconst value = useStableMessages(useContext(MessagesContext), messages);\n\n\treturn <MessagesContext value={value}>{children}</MessagesContext>;\n}\n\n/** Reads the strings in scope. Component props still take precedence over whatever this returns. */\nexport function useMessages(): ComponentMessages {\n\treturn useContext(MessagesContext);\n}\n"],"mappings":";;;;;AAIA,IAAM,IAAkB,EAAiC,CAAY;AAErE,SAAS,EAAY,GAAyB,GAAmC;CAChF,KAAK,IAAM,KAAO,OAAO,KAAK,CAAK,GAClC,IAAI,EAAK,OAAS,EAAM,IAAM,OAAO;CAGtC,OAAO;AACR;AASA,SAAS,EAAkB,GAA8B,GAA0D;CAClH,IAAM,IAAO;EAAE,GAAG;EAAW,GAAG;CAAU,GACpC,CAAC,GAAW,KAAgB,EAAS,CAAI;CAO/C,OALK,EAAY,GAAW,CAAI,IAKzB,KAJN,EAAa,CAAI,GACV;AAIT;AAgBA,SAAgB,EAAiB,EAAE,aAAU,eAAmC;CAC/E,IAAM,IAAQ,EAAkB,EAAW,CAAe,GAAG,CAAQ;CAErE,OAAO,kBAAC,GAAD;EAAwB;EAAQ;CAA0B,CAAA;AAClE;AAGA,SAAgB,IAAiC;CAChD,OAAO,EAAW,CAAe;AAClC"}