@linyao.tw/ui 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -1
- package/dist/components/date-time/calendar.js +8 -6
- package/dist/components/date-time/calendar.js.map +1 -1
- package/dist/components/date-time/date-field.js +10 -8
- package/dist/components/date-time/date-field.js.map +1 -1
- package/dist/components/date-time/date-picker.js +8 -6
- package/dist/components/date-time/date-picker.js.map +1 -1
- package/dist/components/date-time/date-range-picker.js +8 -6
- package/dist/components/date-time/date-range-picker.js.map +1 -1
- package/dist/components/date-time/index.js +1 -1
- package/dist/components/date-time/shared.d.ts +0 -1
- package/dist/components/date-time/shared.js +7 -9
- package/dist/components/date-time/shared.js.map +1 -1
- package/dist/components/date-time/time-field.js +8 -6
- package/dist/components/date-time/time-field.js.map +1 -1
- package/dist/components/feedback/alert.js +35 -34
- package/dist/components/feedback/alert.js.map +1 -1
- package/dist/components/feedback/banner.js +15 -14
- package/dist/components/feedback/banner.js.map +1 -1
- package/dist/components/feedback/empty-state.d.ts +2 -1
- package/dist/components/feedback/empty-state.js +31 -31
- package/dist/components/feedback/empty-state.js.map +1 -1
- package/dist/components/feedback/feedback.types.d.ts +0 -1
- package/dist/components/feedback/feedback.types.js +3 -5
- package/dist/components/feedback/feedback.types.js.map +1 -1
- package/dist/components/feedback/index.d.ts +8 -8
- package/dist/components/feedback/meter.js +21 -21
- package/dist/components/feedback/meter.js.map +1 -1
- package/dist/components/feedback/progress.js +21 -21
- package/dist/components/feedback/progress.js.map +1 -1
- package/dist/components/feedback/skeleton.js +11 -11
- package/dist/components/feedback/skeleton.js.map +1 -1
- package/dist/components/feedback/spinner.js +25 -25
- package/dist/components/feedback/spinner.js.map +1 -1
- package/dist/components/feedback/toast.js +23 -21
- package/dist/components/feedback/toast.js.map +1 -1
- package/dist/components/forms/{CodeField.d.ts → code-field.d.ts} +1 -1
- package/dist/components/forms/code-field.js +66 -0
- package/dist/components/forms/code-field.js.map +1 -0
- package/dist/components/forms/{FileUpload.d.ts → file-upload.d.ts} +1 -1
- package/dist/components/forms/{FileUpload.js → file-upload.js} +128 -111
- package/dist/components/forms/file-upload.js.map +1 -0
- package/dist/components/forms/index.d.ts +6 -6
- package/dist/components/forms/{Input.js → input.js} +4 -3
- package/dist/components/forms/input.js.map +1 -0
- package/dist/components/forms/internal.d.ts +0 -2
- package/dist/components/forms/internal.js +22 -25
- package/dist/components/forms/internal.js.map +1 -1
- package/dist/components/forms/number-field.js +74 -0
- package/dist/components/forms/number-field.js.map +1 -0
- package/dist/components/forms/otp-field.js +58 -0
- package/dist/components/forms/otp-field.js.map +1 -0
- package/dist/components/forms/{TextField.d.ts → text-field.d.ts} +5 -0
- package/dist/components/forms/text-field.js +201 -0
- package/dist/components/forms/text-field.js.map +1 -0
- package/dist/components/foundations/{Avatar.js → avatar.js} +13 -10
- package/dist/components/foundations/avatar.js.map +1 -0
- package/dist/components/foundations/{Badge.d.ts → badge.d.ts} +1 -1
- package/dist/components/foundations/{Badge.js → badge.js} +4 -3
- package/dist/components/foundations/badge.js.map +1 -0
- package/dist/components/foundations/{Button.js → button.js} +4 -3
- package/dist/components/foundations/button.js.map +1 -0
- package/dist/components/foundations/{Card.d.ts → card.d.ts} +9 -2
- package/dist/components/foundations/{Card.js → card.js} +6 -5
- package/dist/components/foundations/card.js.map +1 -0
- package/dist/components/foundations/{IconButton.d.ts → icon-button.d.ts} +2 -8
- package/dist/components/foundations/{IconButton.js → icon-button.js} +5 -4
- package/dist/components/foundations/icon-button.js.map +1 -0
- package/dist/components/foundations/index.d.ts +9 -9
- package/dist/components/foundations/{Link.d.ts → link.d.ts} +1 -1
- package/dist/components/foundations/link.js +47 -0
- package/dist/components/foundations/link.js.map +1 -0
- package/dist/components/foundations/{ListCell.d.ts → list-cell.d.ts} +1 -8
- package/dist/components/foundations/{ListCell.js → list-cell.js} +4 -3
- package/dist/components/foundations/list-cell.js.map +1 -0
- package/dist/components/foundations/{SectionHeading.d.ts → section-heading.d.ts} +5 -2
- package/dist/components/foundations/{SectionHeading.js → section-heading.js} +4 -3
- package/dist/components/foundations/section-heading.js.map +1 -0
- package/dist/components/foundations/{Separator.js → separator.js} +4 -3
- package/dist/components/foundations/separator.js.map +1 -0
- package/dist/components/navigation-data/breadcrumb-pagination.js +89 -81
- package/dist/components/navigation-data/breadcrumb-pagination.js.map +1 -1
- package/dist/components/navigation-data/command-palette.d.ts +26 -0
- package/dist/components/navigation-data/command-palette.js +101 -72
- package/dist/components/navigation-data/command-palette.js.map +1 -1
- package/dist/components/navigation-data/header-tab-bar.js +50 -46
- package/dist/components/navigation-data/header-tab-bar.js.map +1 -1
- package/dist/components/navigation-data/index.d.ts +7 -7
- package/dist/components/navigation-data/menubar-toolbar.js +2 -1
- package/dist/components/navigation-data/menubar-toolbar.js.map +1 -1
- package/dist/components/navigation-data/navigation-menu.js +2 -1
- package/dist/components/navigation-data/navigation-menu.js.map +1 -1
- package/dist/components/navigation-data/scroll-area.js +2 -1
- package/dist/components/navigation-data/scroll-area.js.map +1 -1
- package/dist/components/navigation-data/table-collection.d.ts +12 -3
- package/dist/components/navigation-data/table-collection.js +12 -9
- package/dist/components/navigation-data/table-collection.js.map +1 -1
- package/dist/components/overlays/dialog.d.ts +23 -3
- package/dist/components/overlays/dialog.js +138 -130
- package/dist/components/overlays/dialog.js.map +1 -1
- package/dist/components/overlays/disclosure.js +2 -1
- package/dist/components/overlays/disclosure.js.map +1 -1
- package/dist/components/overlays/drawer.d.ts +9 -2
- package/dist/components/overlays/drawer.js +158 -151
- package/dist/components/overlays/drawer.js.map +1 -1
- package/dist/components/overlays/floating.js +116 -113
- package/dist/components/overlays/floating.js.map +1 -1
- package/dist/components/overlays/index.d.ts +4 -4
- package/dist/components/selection/combobox.js +94 -93
- package/dist/components/selection/combobox.js.map +1 -1
- package/dist/components/selection/controls.d.ts +4 -1
- package/dist/components/selection/controls.js +141 -118
- package/dist/components/selection/controls.js.map +1 -1
- package/dist/components/selection/menu.js +121 -121
- package/dist/components/selection/menu.js.map +1 -1
- package/dist/components/selection/select.js +108 -107
- package/dist/components/selection/select.js.map +1 -1
- package/dist/fonts.css +13 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +39 -33
- package/dist/internal/accessible-name.d.ts +12 -0
- package/dist/internal/class-names.d.ts +12 -0
- package/dist/{components/selection/classnames.js → internal/class-names.js} +4 -3
- package/dist/internal/class-names.js.map +1 -0
- package/dist/internal/index.d.ts +3 -0
- package/dist/{components/foundations/shared.d.ts → internal/render.d.ts} +2 -1
- package/dist/intl/index.d.ts +3 -0
- package/dist/intl/linyao-provider.d.ts +38 -0
- package/dist/intl/linyao-provider.js +27 -0
- package/dist/intl/linyao-provider.js.map +1 -0
- package/dist/intl/messages.d.ts +48 -0
- package/dist/intl/messages.js +81 -0
- package/dist/intl/messages.js.map +1 -0
- package/dist/intl/provider.d.ts +18 -0
- package/dist/intl/provider.js +31 -0
- package/dist/intl/provider.js.map +1 -0
- package/dist/styles.css +1 -1
- package/package.json +6 -4
- package/dist/components/feedback/feedback.module.js +0 -42
- package/dist/components/feedback/feedback.module.js.map +0 -1
- package/dist/components/forms/CodeField.js +0 -63
- package/dist/components/forms/CodeField.js.map +0 -1
- package/dist/components/forms/FileUpload.js.map +0 -1
- package/dist/components/forms/Input.js.map +0 -1
- package/dist/components/forms/NumberField.js +0 -71
- package/dist/components/forms/NumberField.js.map +0 -1
- package/dist/components/forms/OTPField.js +0 -54
- package/dist/components/forms/OTPField.js.map +0 -1
- package/dist/components/forms/TextField.js +0 -199
- package/dist/components/forms/TextField.js.map +0 -1
- package/dist/components/foundations/Avatar.js.map +0 -1
- package/dist/components/foundations/Badge.js.map +0 -1
- package/dist/components/foundations/Button.js.map +0 -1
- package/dist/components/foundations/Card.js.map +0 -1
- package/dist/components/foundations/IconButton.js.map +0 -1
- package/dist/components/foundations/Link.js +0 -40
- package/dist/components/foundations/Link.js.map +0 -1
- package/dist/components/foundations/ListCell.js.map +0 -1
- package/dist/components/foundations/SectionHeading.js.map +0 -1
- package/dist/components/foundations/Separator.js.map +0 -1
- package/dist/components/foundations/shared.js +0 -8
- package/dist/components/foundations/shared.js.map +0 -1
- package/dist/components/navigation-data/utils.d.ts +0 -2
- package/dist/components/navigation-data/utils.js +0 -11
- package/dist/components/navigation-data/utils.js.map +0 -1
- package/dist/components/overlays/class-names.d.ts +0 -6
- package/dist/components/overlays/class-names.js +0 -11
- package/dist/components/overlays/class-names.js.map +0 -1
- package/dist/components/selection/classnames.d.ts +0 -4
- package/dist/components/selection/classnames.js.map +0 -1
- package/dist/components/selection/selection.module.js +0 -51
- package/dist/components/selection/selection.module.js.map +0 -1
- /package/dist/components/forms/{Input.d.ts → input.d.ts} +0 -0
- /package/dist/components/forms/{NumberField.d.ts → number-field.d.ts} +0 -0
- /package/dist/components/forms/{OTPField.d.ts → otp-field.d.ts} +0 -0
- /package/dist/components/foundations/{Avatar.d.ts → avatar.d.ts} +0 -0
- /package/dist/components/foundations/{Button.d.ts → button.d.ts} +0 -0
- /package/dist/components/foundations/{Separator.d.ts → separator.d.ts} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { withStateClassName as e } from "../../internal/class-names.js";
|
|
2
3
|
import { forwardRef as t } from "react";
|
|
3
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
5
|
import { CheckIcon as r } from "@phosphor-icons/react/dist/csr/Check";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menubar-toolbar.js","names":[],"sources":["../../../src/components/navigation-data/menubar-toolbar.tsx"],"sourcesContent":["import { Menu as BaseMenu } from \"@base-ui/react/menu\";\nimport { Menubar as BaseMenubar } from \"@base-ui/react/menubar\";\nimport { Toolbar as BaseToolbar } from \"@base-ui/react/toolbar\";\nimport { CheckIcon } from \"@phosphor-icons/react/dist/csr/Check\";\nimport { CircleIcon } from \"@phosphor-icons/react/dist/csr/Circle\";\nimport { forwardRef, type ComponentRef, type ForwardedRef, type ReactElement, type RefAttributes } from \"react\";\n\nimport { withBaseClass } from \"./utils.js\";\n\nexport const Menubar = forwardRef<ComponentRef<typeof BaseMenubar>, BaseMenubar.Props>(function Menubar(props, ref) {\n\tconst { className, ...menubarProps } = props;\n\treturn <BaseMenubar ref={ref} className={withBaseClass<BaseMenubar.State>(\"lyds-menubar\", className)} {...menubarProps} />;\n});\n\nexport function MenubarMenu<Payload = unknown>(props: BaseMenu.Root.Props<Payload>) {\n\treturn <BaseMenu.Root {...props} />;\n}\n\nfunction MenubarTriggerInner<Payload = unknown>(props: BaseMenu.Trigger.Props<Payload>, ref: ForwardedRef<HTMLButtonElement>) {\n\tconst { className, ...triggerProps } = props;\n\treturn <BaseMenu.Trigger ref={ref} className={withBaseClass<BaseMenu.Trigger.State>(\"lyds-menubar__trigger\", className)} {...triggerProps} />;\n}\n\nexport const MenubarTrigger = forwardRef(MenubarTriggerInner) as <Payload = unknown>(props: BaseMenu.Trigger.Props<Payload> & RefAttributes<HTMLButtonElement>) => ReactElement;\n\nexport const MenubarPortal = BaseMenu.Portal;\n\nexport const MenubarPositioner = forwardRef<ComponentRef<typeof BaseMenu.Positioner>, BaseMenu.Positioner.Props>(function MenubarPositioner(props, ref) {\n\tconst { className, sideOffset = 6, ...positionerProps } = props;\n\treturn <BaseMenu.Positioner ref={ref} className={withBaseClass<BaseMenu.Positioner.State>(\"lyds-menubar__positioner\", className)} sideOffset={sideOffset} {...positionerProps} />;\n});\n\nexport const MenubarPopup = forwardRef<ComponentRef<typeof BaseMenu.Popup>, BaseMenu.Popup.Props>(function MenubarPopup(props, ref) {\n\tconst { className, ...popupProps } = props;\n\treturn <BaseMenu.Popup ref={ref} className={withBaseClass<BaseMenu.Popup.State>(\"lyds-menubar__popup\", className)} {...popupProps} />;\n});\n\nexport const MenubarItem = forwardRef<ComponentRef<typeof BaseMenu.Item>, BaseMenu.Item.Props>(function MenubarItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseMenu.Item ref={ref} className={withBaseClass<BaseMenu.Item.State>(\"lyds-menubar__item\", className)} {...itemProps} />;\n});\n\nexport const MenubarLinkItem = forwardRef<ComponentRef<typeof BaseMenu.LinkItem>, BaseMenu.LinkItem.Props>(function MenubarLinkItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseMenu.LinkItem ref={ref} className={withBaseClass<BaseMenu.LinkItem.State>(\"lyds-menubar__item\", className)} {...itemProps} />;\n});\n\nexport const MenubarCheckboxItem = forwardRef<ComponentRef<typeof BaseMenu.CheckboxItem>, BaseMenu.CheckboxItem.Props>(function MenubarCheckboxItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseMenu.CheckboxItem ref={ref} className={withBaseClass<BaseMenu.CheckboxItem.State>(\"lyds-menubar__item\", className)} {...itemProps} />;\n});\n\nexport const MenubarCheckboxItemIndicator = forwardRef<ComponentRef<typeof BaseMenu.CheckboxItemIndicator>, BaseMenu.CheckboxItemIndicator.Props>(function MenubarCheckboxItemIndicator(props, ref) {\n\tconst { className, children, ...indicatorProps } = props;\n\treturn (\n\t\t<BaseMenu.CheckboxItemIndicator ref={ref} className={withBaseClass<BaseMenu.CheckboxItemIndicator.State>(\"lyds-menubar__indicator\", className)} {...indicatorProps}>\n\t\t\t{children ?? <CheckIcon aria-hidden=\"true\" weight=\"bold\" />}\n\t\t</BaseMenu.CheckboxItemIndicator>\n\t);\n});\n\nexport const MenubarRadioGroup = BaseMenu.RadioGroup;\n\nexport const MenubarRadioItem = forwardRef<ComponentRef<typeof BaseMenu.RadioItem>, BaseMenu.RadioItem.Props>(function MenubarRadioItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseMenu.RadioItem ref={ref} className={withBaseClass<BaseMenu.RadioItem.State>(\"lyds-menubar__item\", className)} {...itemProps} />;\n});\n\nexport const MenubarRadioItemIndicator = forwardRef<ComponentRef<typeof BaseMenu.RadioItemIndicator>, BaseMenu.RadioItemIndicator.Props>(function MenubarRadioItemIndicator(props, ref) {\n\tconst { className, children, ...indicatorProps } = props;\n\treturn (\n\t\t<BaseMenu.RadioItemIndicator ref={ref} className={withBaseClass<BaseMenu.RadioItemIndicator.State>(\"lyds-menubar__indicator\", className)} {...indicatorProps}>\n\t\t\t{children ?? <CircleIcon aria-hidden=\"true\" weight=\"fill\" />}\n\t\t</BaseMenu.RadioItemIndicator>\n\t);\n});\n\nexport const MenubarGroup = BaseMenu.Group;\n\nexport const MenubarGroupLabel = forwardRef<ComponentRef<typeof BaseMenu.GroupLabel>, BaseMenu.GroupLabel.Props>(function MenubarGroupLabel(props, ref) {\n\tconst { className, ...labelProps } = props;\n\treturn <BaseMenu.GroupLabel ref={ref} className={withBaseClass<BaseMenu.GroupLabel.State>(\"lyds-menubar__group-label\", className)} {...labelProps} />;\n});\n\nexport const MenubarSeparator = forwardRef<ComponentRef<typeof BaseMenu.Separator>, BaseMenu.Separator.Props>(function MenubarSeparator(props, ref) {\n\tconst { className, ...separatorProps } = props;\n\treturn <BaseMenu.Separator ref={ref} className={withBaseClass<BaseMenu.Separator.State>(\"lyds-menubar__separator\", className)} {...separatorProps} />;\n});\n\nexport const MenubarSubmenu = BaseMenu.SubmenuRoot;\n\nexport const MenubarSubmenuTrigger = forwardRef<ComponentRef<typeof BaseMenu.SubmenuTrigger>, BaseMenu.SubmenuTrigger.Props>(function MenubarSubmenuTrigger(props, ref) {\n\tconst { className, ...triggerProps } = props;\n\treturn <BaseMenu.SubmenuTrigger ref={ref} className={withBaseClass<BaseMenu.SubmenuTrigger.State>(\"lyds-menubar__item\", className)} {...triggerProps} />;\n});\n\nexport const Toolbar = forwardRef<ComponentRef<typeof BaseToolbar.Root>, BaseToolbar.Root.Props>(function Toolbar(props, ref) {\n\tconst { className, ...toolbarProps } = props;\n\treturn <BaseToolbar.Root ref={ref} className={withBaseClass<BaseToolbar.Root.State>(\"lyds-toolbar\", className)} {...toolbarProps} />;\n});\n\nexport const ToolbarGroup = forwardRef<ComponentRef<typeof BaseToolbar.Group>, BaseToolbar.Group.Props>(function ToolbarGroup(props, ref) {\n\tconst { className, ...groupProps } = props;\n\treturn <BaseToolbar.Group ref={ref} className={withBaseClass<BaseToolbar.Group.State>(\"lyds-toolbar__group\", className)} {...groupProps} />;\n});\n\nexport const ToolbarButton = forwardRef<ComponentRef<typeof BaseToolbar.Button>, BaseToolbar.Button.Props>(function ToolbarButton(props, ref) {\n\tconst { className, ...buttonProps } = props;\n\treturn <BaseToolbar.Button ref={ref} className={withBaseClass<BaseToolbar.Button.State>(\"lyds-toolbar__button\", className)} {...buttonProps} />;\n});\n\nexport const ToolbarLink = forwardRef<ComponentRef<typeof BaseToolbar.Link>, BaseToolbar.Link.Props>(function ToolbarLink(props, ref) {\n\tconst { className, ...linkProps } = props;\n\treturn <BaseToolbar.Link ref={ref} className={withBaseClass<BaseToolbar.Link.State>(\"lyds-toolbar__button\", className)} {...linkProps} />;\n});\n\nexport const ToolbarInput = forwardRef<ComponentRef<typeof BaseToolbar.Input>, BaseToolbar.Input.Props>(function ToolbarInput(props, ref) {\n\tconst { className, ...inputProps } = props;\n\treturn <BaseToolbar.Input ref={ref} className={withBaseClass<BaseToolbar.Input.State>(\"lyds-toolbar__input\", className)} {...inputProps} />;\n});\n\nexport const ToolbarSeparator = forwardRef<ComponentRef<typeof BaseToolbar.Separator>, BaseToolbar.Separator.Props>(function ToolbarSeparator(props, ref) {\n\tconst { className, ...separatorProps } = props;\n\treturn <BaseToolbar.Separator ref={ref} className={withBaseClass<BaseToolbar.Separator.State>(\"lyds-toolbar__separator\", className)} {...separatorProps} />;\n});\n"],"mappings":";;;;;;;;;AASA,IAAa,IAAU,EAAgE,SAAiB,GAAO,GAAK;CACnH,IAAM,EAAE,cAAW,GAAG,MAAiB;CACvC,OAAO,kBAAC,GAAD;EAAkB;EAAK,WAAW,EAAiC,gBAAgB,CAAS;EAAG,GAAI;CAAe,CAAA;AAC1H,CAAC;AAED,SAAgB,EAA+B,GAAqC;CACnF,OAA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3,"file":"menubar-toolbar.js","names":[],"sources":["../../../src/components/navigation-data/menubar-toolbar.tsx"],"sourcesContent":["import { Menu as BaseMenu } from \"@base-ui/react/menu\";\nimport { Menubar as BaseMenubar } from \"@base-ui/react/menubar\";\nimport { Toolbar as BaseToolbar } from \"@base-ui/react/toolbar\";\nimport { CheckIcon } from \"@phosphor-icons/react/dist/csr/Check\";\nimport { CircleIcon } from \"@phosphor-icons/react/dist/csr/Circle\";\nimport { forwardRef, type ComponentRef, type ForwardedRef, type ReactElement, type RefAttributes } from \"react\";\n\nimport { withStateClassName } from \"@/internal\";\nexport const Menubar = forwardRef<ComponentRef<typeof BaseMenubar>, BaseMenubar.Props>(function Menubar(props, ref) {\n\tconst { className, ...menubarProps } = props;\n\treturn <BaseMenubar ref={ref} className={withStateClassName<BaseMenubar.State>(\"lyds-menubar\", className)} {...menubarProps} />;\n});\n\nexport function MenubarMenu<Payload = unknown>(props: BaseMenu.Root.Props<Payload>) {\n\treturn <BaseMenu.Root {...props} />;\n}\n\nfunction MenubarTriggerInner<Payload = unknown>(props: BaseMenu.Trigger.Props<Payload>, ref: ForwardedRef<HTMLButtonElement>) {\n\tconst { className, ...triggerProps } = props;\n\treturn <BaseMenu.Trigger ref={ref} className={withStateClassName<BaseMenu.Trigger.State>(\"lyds-menubar__trigger\", className)} {...triggerProps} />;\n}\n\nexport const MenubarTrigger = forwardRef(MenubarTriggerInner) as <Payload = unknown>(props: BaseMenu.Trigger.Props<Payload> & RefAttributes<HTMLButtonElement>) => ReactElement;\n\nexport const MenubarPortal = BaseMenu.Portal;\n\nexport const MenubarPositioner = forwardRef<ComponentRef<typeof BaseMenu.Positioner>, BaseMenu.Positioner.Props>(function MenubarPositioner(props, ref) {\n\tconst { className, sideOffset = 6, ...positionerProps } = props;\n\treturn <BaseMenu.Positioner ref={ref} className={withStateClassName<BaseMenu.Positioner.State>(\"lyds-menubar__positioner\", className)} sideOffset={sideOffset} {...positionerProps} />;\n});\n\nexport const MenubarPopup = forwardRef<ComponentRef<typeof BaseMenu.Popup>, BaseMenu.Popup.Props>(function MenubarPopup(props, ref) {\n\tconst { className, ...popupProps } = props;\n\treturn <BaseMenu.Popup ref={ref} className={withStateClassName<BaseMenu.Popup.State>(\"lyds-menubar__popup\", className)} {...popupProps} />;\n});\n\nexport const MenubarItem = forwardRef<ComponentRef<typeof BaseMenu.Item>, BaseMenu.Item.Props>(function MenubarItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseMenu.Item ref={ref} className={withStateClassName<BaseMenu.Item.State>(\"lyds-menubar__item\", className)} {...itemProps} />;\n});\n\nexport const MenubarLinkItem = forwardRef<ComponentRef<typeof BaseMenu.LinkItem>, BaseMenu.LinkItem.Props>(function MenubarLinkItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseMenu.LinkItem ref={ref} className={withStateClassName<BaseMenu.LinkItem.State>(\"lyds-menubar__item\", className)} {...itemProps} />;\n});\n\nexport const MenubarCheckboxItem = forwardRef<ComponentRef<typeof BaseMenu.CheckboxItem>, BaseMenu.CheckboxItem.Props>(function MenubarCheckboxItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseMenu.CheckboxItem ref={ref} className={withStateClassName<BaseMenu.CheckboxItem.State>(\"lyds-menubar__item\", className)} {...itemProps} />;\n});\n\nexport const MenubarCheckboxItemIndicator = forwardRef<ComponentRef<typeof BaseMenu.CheckboxItemIndicator>, BaseMenu.CheckboxItemIndicator.Props>(function MenubarCheckboxItemIndicator(props, ref) {\n\tconst { className, children, ...indicatorProps } = props;\n\treturn (\n\t\t<BaseMenu.CheckboxItemIndicator ref={ref} className={withStateClassName<BaseMenu.CheckboxItemIndicator.State>(\"lyds-menubar__indicator\", className)} {...indicatorProps}>\n\t\t\t{children ?? <CheckIcon aria-hidden=\"true\" weight=\"bold\" />}\n\t\t</BaseMenu.CheckboxItemIndicator>\n\t);\n});\n\nexport const MenubarRadioGroup = BaseMenu.RadioGroup;\n\nexport const MenubarRadioItem = forwardRef<ComponentRef<typeof BaseMenu.RadioItem>, BaseMenu.RadioItem.Props>(function MenubarRadioItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseMenu.RadioItem ref={ref} className={withStateClassName<BaseMenu.RadioItem.State>(\"lyds-menubar__item\", className)} {...itemProps} />;\n});\n\nexport const MenubarRadioItemIndicator = forwardRef<ComponentRef<typeof BaseMenu.RadioItemIndicator>, BaseMenu.RadioItemIndicator.Props>(function MenubarRadioItemIndicator(props, ref) {\n\tconst { className, children, ...indicatorProps } = props;\n\treturn (\n\t\t<BaseMenu.RadioItemIndicator ref={ref} className={withStateClassName<BaseMenu.RadioItemIndicator.State>(\"lyds-menubar__indicator\", className)} {...indicatorProps}>\n\t\t\t{children ?? <CircleIcon aria-hidden=\"true\" weight=\"fill\" />}\n\t\t</BaseMenu.RadioItemIndicator>\n\t);\n});\n\nexport const MenubarGroup = BaseMenu.Group;\n\nexport const MenubarGroupLabel = forwardRef<ComponentRef<typeof BaseMenu.GroupLabel>, BaseMenu.GroupLabel.Props>(function MenubarGroupLabel(props, ref) {\n\tconst { className, ...labelProps } = props;\n\treturn <BaseMenu.GroupLabel ref={ref} className={withStateClassName<BaseMenu.GroupLabel.State>(\"lyds-menubar__group-label\", className)} {...labelProps} />;\n});\n\nexport const MenubarSeparator = forwardRef<ComponentRef<typeof BaseMenu.Separator>, BaseMenu.Separator.Props>(function MenubarSeparator(props, ref) {\n\tconst { className, ...separatorProps } = props;\n\treturn <BaseMenu.Separator ref={ref} className={withStateClassName<BaseMenu.Separator.State>(\"lyds-menubar__separator\", className)} {...separatorProps} />;\n});\n\nexport const MenubarSubmenu = BaseMenu.SubmenuRoot;\n\nexport const MenubarSubmenuTrigger = forwardRef<ComponentRef<typeof BaseMenu.SubmenuTrigger>, BaseMenu.SubmenuTrigger.Props>(function MenubarSubmenuTrigger(props, ref) {\n\tconst { className, ...triggerProps } = props;\n\treturn <BaseMenu.SubmenuTrigger ref={ref} className={withStateClassName<BaseMenu.SubmenuTrigger.State>(\"lyds-menubar__item\", className)} {...triggerProps} />;\n});\n\nexport const Toolbar = forwardRef<ComponentRef<typeof BaseToolbar.Root>, BaseToolbar.Root.Props>(function Toolbar(props, ref) {\n\tconst { className, ...toolbarProps } = props;\n\treturn <BaseToolbar.Root ref={ref} className={withStateClassName<BaseToolbar.Root.State>(\"lyds-toolbar\", className)} {...toolbarProps} />;\n});\n\nexport const ToolbarGroup = forwardRef<ComponentRef<typeof BaseToolbar.Group>, BaseToolbar.Group.Props>(function ToolbarGroup(props, ref) {\n\tconst { className, ...groupProps } = props;\n\treturn <BaseToolbar.Group ref={ref} className={withStateClassName<BaseToolbar.Group.State>(\"lyds-toolbar__group\", className)} {...groupProps} />;\n});\n\nexport const ToolbarButton = forwardRef<ComponentRef<typeof BaseToolbar.Button>, BaseToolbar.Button.Props>(function ToolbarButton(props, ref) {\n\tconst { className, ...buttonProps } = props;\n\treturn <BaseToolbar.Button ref={ref} className={withStateClassName<BaseToolbar.Button.State>(\"lyds-toolbar__button\", className)} {...buttonProps} />;\n});\n\nexport const ToolbarLink = forwardRef<ComponentRef<typeof BaseToolbar.Link>, BaseToolbar.Link.Props>(function ToolbarLink(props, ref) {\n\tconst { className, ...linkProps } = props;\n\treturn <BaseToolbar.Link ref={ref} className={withStateClassName<BaseToolbar.Link.State>(\"lyds-toolbar__button\", className)} {...linkProps} />;\n});\n\nexport const ToolbarInput = forwardRef<ComponentRef<typeof BaseToolbar.Input>, BaseToolbar.Input.Props>(function ToolbarInput(props, ref) {\n\tconst { className, ...inputProps } = props;\n\treturn <BaseToolbar.Input ref={ref} className={withStateClassName<BaseToolbar.Input.State>(\"lyds-toolbar__input\", className)} {...inputProps} />;\n});\n\nexport const ToolbarSeparator = forwardRef<ComponentRef<typeof BaseToolbar.Separator>, BaseToolbar.Separator.Props>(function ToolbarSeparator(props, ref) {\n\tconst { className, ...separatorProps } = props;\n\treturn <BaseToolbar.Separator ref={ref} className={withStateClassName<BaseToolbar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Y,OAAb;EAAwB;EAAK,WAAW,EAA4C,uBAAuB,CAAS;EAAG,GAAI;CAAa,CAAA;AAChJ,CAAC,GAEY,IAAmB,EAAoF,SAA0B,GAAO,GAAK;CACzJ,IAAM,EAAE,cAAW,GAAG,MAAmB;CACzC,OAAO,kBAAC,EAAY,WAAb;EAA4B;EAAK,WAAW,EAAgD,2BAA2B,CAAS;EAAG,GAAI;CAAiB,CAAA;AAChK,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { withStateClassName as e } from "../../internal/class-names.js";
|
|
2
3
|
import { forwardRef as t } from "react";
|
|
3
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
5
|
import { NavigationMenu as r } from "@base-ui/react/navigation-menu";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-menu.js","names":[],"sources":["../../../src/components/navigation-data/navigation-menu.tsx"],"sourcesContent":["import { NavigationMenu as BaseNavigationMenu } from \"@base-ui/react/navigation-menu\";\nimport { CaretDownIcon } from \"@phosphor-icons/react/dist/csr/CaretDown\";\nimport { forwardRef, type ComponentRef, type ForwardedRef, type ReactElement, type RefAttributes } from \"react\";\n\nimport {
|
|
1
|
+
{"version":3,"file":"navigation-menu.js","names":[],"sources":["../../../src/components/navigation-data/navigation-menu.tsx"],"sourcesContent":["import { NavigationMenu as BaseNavigationMenu } from \"@base-ui/react/navigation-menu\";\nimport { CaretDownIcon } from \"@phosphor-icons/react/dist/csr/CaretDown\";\nimport { forwardRef, type ComponentRef, type ForwardedRef, type ReactElement, type RefAttributes } from \"react\";\n\nimport { withStateClassName } from \"@/internal\";\nfunction NavigationMenuInner<Value = string>(props: BaseNavigationMenu.Root.Props<Value>, ref: ForwardedRef<HTMLElement>) {\n\tconst { className, ...rootProps } = props;\n\treturn <BaseNavigationMenu.Root ref={ref} className={withStateClassName<BaseNavigationMenu.Root.State>(\"lyds-navigation-menu\", className)} {...rootProps} />;\n}\n\nexport const NavigationMenu = forwardRef(NavigationMenuInner) as <Value = string>(props: BaseNavigationMenu.Root.Props<Value> & RefAttributes<HTMLElement>) => ReactElement;\n\nexport const NavigationMenuList = forwardRef<ComponentRef<typeof BaseNavigationMenu.List>, BaseNavigationMenu.List.Props>(function NavigationMenuList(props, ref) {\n\tconst { className, ...listProps } = props;\n\treturn <BaseNavigationMenu.List ref={ref} className={withStateClassName<BaseNavigationMenu.List.State>(\"lyds-navigation-menu__list\", className)} {...listProps} />;\n});\n\nexport const NavigationMenuItem = BaseNavigationMenu.Item;\n\nexport const NavigationMenuTrigger = forwardRef<ComponentRef<typeof BaseNavigationMenu.Trigger>, BaseNavigationMenu.Trigger.Props>(function NavigationMenuTrigger(props, ref) {\n\tconst { className, ...triggerProps } = props;\n\treturn <BaseNavigationMenu.Trigger ref={ref} className={withStateClassName<BaseNavigationMenu.Trigger.State>(\"lyds-navigation-menu__trigger\", className)} {...triggerProps} />;\n});\n\nexport const NavigationMenuIcon = forwardRef<ComponentRef<typeof BaseNavigationMenu.Icon>, BaseNavigationMenu.Icon.Props>(function NavigationMenuIcon(props, ref) {\n\tconst { className, children, ...iconProps } = props;\n\treturn (\n\t\t<BaseNavigationMenu.Icon ref={ref} className={withStateClassName<BaseNavigationMenu.Icon.State>(\"lyds-navigation-menu__icon\", className)} {...iconProps}>\n\t\t\t{children ?? <CaretDownIcon aria-hidden=\"true\" weight=\"bold\" />}\n\t\t</BaseNavigationMenu.Icon>\n\t);\n});\n\nexport const NavigationMenuLink = forwardRef<ComponentRef<typeof BaseNavigationMenu.Link>, BaseNavigationMenu.Link.Props>(function NavigationMenuLink(props, ref) {\n\tconst { className, ...linkProps } = props;\n\treturn <BaseNavigationMenu.Link ref={ref} className={withStateClassName<BaseNavigationMenu.Link.State>(\"lyds-navigation-menu__link\", className)} {...linkProps} />;\n});\n\nexport const NavigationMenuContent = forwardRef<ComponentRef<typeof BaseNavigationMenu.Content>, BaseNavigationMenu.Content.Props>(function NavigationMenuContent(props, ref) {\n\tconst { className, ...contentProps } = props;\n\treturn <BaseNavigationMenu.Content ref={ref} className={withStateClassName<BaseNavigationMenu.Content.State>(\"lyds-navigation-menu__content\", className)} {...contentProps} />;\n});\n\nexport const NavigationMenuPortal = BaseNavigationMenu.Portal;\n\nexport const NavigationMenuPositioner = forwardRef<ComponentRef<typeof BaseNavigationMenu.Positioner>, BaseNavigationMenu.Positioner.Props>(function NavigationMenuPositioner(props, ref) {\n\tconst { className, sideOffset = 8, ...positionerProps } = props;\n\treturn (\n\t\t<BaseNavigationMenu.Positioner\n\t\t\tref={ref}\n\t\t\tclassName={withStateClassName<BaseNavigationMenu.Positioner.State>(\"lyds-navigation-menu__positioner\", className)}\n\t\t\tsideOffset={sideOffset}\n\t\t\t{...positionerProps}\n\t\t/>\n\t);\n});\n\nexport const NavigationMenuPopup = forwardRef<ComponentRef<typeof BaseNavigationMenu.Popup>, BaseNavigationMenu.Popup.Props>(function NavigationMenuPopup(props, ref) {\n\tconst { className, ...popupProps } = props;\n\treturn <BaseNavigationMenu.Popup ref={ref} className={withStateClassName<BaseNavigationMenu.Popup.State>(\"lyds-navigation-menu__popup\", className)} {...popupProps} />;\n});\n\nexport const NavigationMenuViewport = forwardRef<ComponentRef<typeof BaseNavigationMenu.Viewport>, BaseNavigationMenu.Viewport.Props>(function NavigationMenuViewport(props, ref) {\n\tconst { className, ...viewportProps } = props;\n\treturn <BaseNavigationMenu.Viewport ref={ref} className={withStateClassName<BaseNavigationMenu.Viewport.State>(\"lyds-navigation-menu__viewport\", className)} {...viewportProps} />;\n});\n\nexport const NavigationMenuArrow = forwardRef<ComponentRef<typeof BaseNavigationMenu.Arrow>, BaseNavigationMenu.Arrow.Props>(function NavigationMenuArrow(props, ref) {\n\tconst { className, ...arrowProps } = props;\n\treturn <BaseNavigationMenu.Arrow ref={ref} className={withStateClassName<BaseNavigationMenu.Arrow.State>(\"lyds-navigation-menu__arrow\", className)} {...arrowProps} />;\n});\n"],"mappings":";;;;;;;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,CAAC,GAEY,IAAuB,EAAmB,QAE1C,IAA2B,EAAoG,SAAkC,GAAO,GAAK;CACzL,IAAM,EAAE,cAAW,gBAAa,GAAG,GAAG,MAAoB;CAC1D,OACC,kBAAC,EAAmB,YAApB;EACM;EACL,WAAW,EAAwD,oCAAoC,CAAS;EACpG;EACZ,GAAI;CACJ,CAAA;AAEH,CAAC,GAEY,IAAsB,EAA0F,SAA6B,GAAO,GAAK;CACrK,IAAM,EAAE,cAAW,GAAG,MAAe;CACrC,OAAO,kBAAC,EAAmB,OAApB;EAA+B;EAAK,WAAW,EAAmD,+BAA+B,CAAS;EAAG,GAAI;CAAa,CAAA;AACtK,CAAC,GAEY,IAAyB,EAAgG,SAAgC,GAAO,GAAK;CACjL,IAAM,EAAE,cAAW,GAAG,MAAkB;CACxC,OAAO,kBAAC,EAAmB,UAApB;EAAkC;EAAK,WAAW,EAAsD,kCAAkC,CAAS;EAAG,GAAI;CAAgB,CAAA;AAClL,CAAC,GAEY,IAAsB,EAA0F,SAA6B,GAAO,GAAK;CACrK,IAAM,EAAE,cAAW,GAAG,MAAe;CACrC,OAAO,kBAAC,EAAmB,OAApB;EAA+B;EAAK,WAAW,EAAmD,+BAA+B,CAAS;EAAG,GAAI;CAAa,CAAA;AACtK,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { withStateClassName as e } from "../../internal/class-names.js";
|
|
2
3
|
import { forwardRef as t } from "react";
|
|
3
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
5
|
import { ScrollArea as r } from "@base-ui/react/scroll-area";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-area.js","names":[],"sources":["../../../src/components/navigation-data/scroll-area.tsx"],"sourcesContent":["import { ScrollArea as BaseScrollArea } from \"@base-ui/react/scroll-area\";\nimport { forwardRef, type ComponentRef } from \"react\";\n\nimport {
|
|
1
|
+
{"version":3,"file":"scroll-area.js","names":[],"sources":["../../../src/components/navigation-data/scroll-area.tsx"],"sourcesContent":["import { ScrollArea as BaseScrollArea } from \"@base-ui/react/scroll-area\";\nimport { forwardRef, type ComponentRef } from \"react\";\n\nimport { withStateClassName } from \"@/internal\";\nexport const ScrollArea = forwardRef<ComponentRef<typeof BaseScrollArea.Root>, BaseScrollArea.Root.Props>(function ScrollArea(props, ref) {\n\tconst { className, ...rootProps } = props;\n\treturn <BaseScrollArea.Root ref={ref} className={withStateClassName<BaseScrollArea.Root.State>(\"lyds-scroll-area\", className)} {...rootProps} />;\n});\n\nexport const ScrollAreaViewport = forwardRef<ComponentRef<typeof BaseScrollArea.Viewport>, BaseScrollArea.Viewport.Props>(function ScrollAreaViewport(props, ref) {\n\tconst { className, ...viewportProps } = props;\n\treturn <BaseScrollArea.Viewport ref={ref} className={withStateClassName<BaseScrollArea.Viewport.State>(\"lyds-scroll-area__viewport\", className)} {...viewportProps} />;\n});\n\nexport const ScrollAreaContent = forwardRef<ComponentRef<typeof BaseScrollArea.Content>, BaseScrollArea.Content.Props>(function ScrollAreaContent(props, ref) {\n\tconst { className, ...contentProps } = props;\n\treturn <BaseScrollArea.Content ref={ref} className={withStateClassName<BaseScrollArea.Content.State>(\"lyds-scroll-area__content\", className)} {...contentProps} />;\n});\n\nexport const ScrollAreaScrollbar = forwardRef<ComponentRef<typeof BaseScrollArea.Scrollbar>, BaseScrollArea.Scrollbar.Props>(function ScrollAreaScrollbar(props, ref) {\n\tconst { className, ...scrollbarProps } = props;\n\treturn <BaseScrollArea.Scrollbar ref={ref} className={withStateClassName<BaseScrollArea.Scrollbar.State>(\"lyds-scroll-area__scrollbar\", className)} {...scrollbarProps} />;\n});\n\nexport const ScrollAreaThumb = forwardRef<ComponentRef<typeof BaseScrollArea.Thumb>, BaseScrollArea.Thumb.Props>(function ScrollAreaThumb(props, ref) {\n\tconst { className, ...thumbProps } = props;\n\treturn <BaseScrollArea.Thumb ref={ref} className={withStateClassName<BaseScrollArea.Thumb.State>(\"lyds-scroll-area__thumb\", className)} {...thumbProps} />;\n});\n\nexport const ScrollAreaCorner = forwardRef<ComponentRef<typeof BaseScrollArea.Corner>, BaseScrollArea.Corner.Props>(function ScrollAreaCorner(props, ref) {\n\tconst { className, ...cornerProps } = props;\n\treturn <BaseScrollArea.Corner ref={ref} className={withStateClassName<BaseScrollArea.Corner.State>(\"lyds-scroll-area__corner\", className)} {...cornerProps} />;\n});\n"],"mappings":";;;;;;AAIA,IAAa,IAAa,EAAgF,SAAoB,GAAO,GAAK;CACzI,IAAM,EAAE,cAAW,GAAG,MAAc;CACpC,OAAO,kBAAC,EAAe,MAAhB;EAA0B;EAAK,WAAW,EAA8C,oBAAoB,CAAS;EAAG,GAAI;CAAY,CAAA;AAChJ,CAAC,GAEY,IAAqB,EAAwF,SAA4B,GAAO,GAAK;CACjK,IAAM,EAAE,cAAW,GAAG,MAAkB;CACxC,OAAO,kBAAC,EAAe,UAAhB;EAA8B;EAAK,WAAW,EAAkD,8BAA8B,CAAS;EAAG,GAAI;CAAgB,CAAA;AACtK,CAAC,GAEY,IAAoB,EAAsF,SAA2B,GAAO,GAAK;CAC7J,IAAM,EAAE,cAAW,GAAG,MAAiB;CACvC,OAAO,kBAAC,EAAe,SAAhB;EAA6B;EAAK,WAAW,EAAiD,6BAA6B,CAAS;EAAG,GAAI;CAAe,CAAA;AAClK,CAAC,GAEY,IAAsB,EAA0F,SAA6B,GAAO,GAAK;CACrK,IAAM,EAAE,cAAW,GAAG,MAAmB;CACzC,OAAO,kBAAC,EAAe,WAAhB;EAA+B;EAAK,WAAW,EAAmD,+BAA+B,CAAS;EAAG,GAAI;CAAiB,CAAA;AAC1K,CAAC,GAEY,IAAkB,EAAkF,SAAyB,GAAO,GAAK;CACrJ,IAAM,EAAE,cAAW,GAAG,MAAe;CACrC,OAAO,kBAAC,EAAe,OAAhB;EAA2B;EAAK,WAAW,EAA+C,2BAA2B,CAAS;EAAG,GAAI;CAAa,CAAA;AAC1J,CAAC,GAEY,IAAmB,EAAoF,SAA0B,GAAO,GAAK;CACzJ,IAAM,EAAE,cAAW,GAAG,MAAgB;CACtC,OAAO,kBAAC,EAAe,QAAhB;EAA4B;EAAK,WAAW,EAAgD,4BAA4B,CAAS;EAAG,GAAI;CAAc,CAAA;AAC9J,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, LiHTMLAttributes, OlHTMLAttributes, TableHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes } from 'react';
|
|
2
|
+
import { HeadingLevel } from '../foundations/section-heading.js';
|
|
2
3
|
export declare const TableFrame: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
3
4
|
export declare const Table: import('react').ForwardRefExoticComponent<TableHTMLAttributes<HTMLTableElement> & import('react').RefAttributes<HTMLTableElement>>;
|
|
4
5
|
export declare const TableCaption: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLTableCaptionElement> & import('react').RefAttributes<HTMLTableCaptionElement>>;
|
|
@@ -18,7 +19,11 @@ export declare const TableCell: import('react').ForwardRefExoticComponent<TableC
|
|
|
18
19
|
/** 純呈現用結構。資料擷取、排序、篩選與分頁由使用端負責。 */
|
|
19
20
|
export declare const DataTable: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & import('react').RefAttributes<HTMLElement>>;
|
|
20
21
|
export declare const DataTableHeader: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
21
|
-
export
|
|
22
|
+
export interface DataTableTitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
23
|
+
/** Heading level for the surrounding document outline. */
|
|
24
|
+
level?: HeadingLevel;
|
|
25
|
+
}
|
|
26
|
+
export declare const DataTableTitle: import('react').ForwardRefExoticComponent<DataTableTitleProps & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
22
27
|
export declare const DataTableDescription: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
23
28
|
export declare const DataTableControls: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
24
29
|
export interface DataTableRegionProps extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -37,7 +42,11 @@ export declare const OrderedCollection: import('react').ForwardRefExoticComponen
|
|
|
37
42
|
export type CollectionItemProps = LiHTMLAttributes<HTMLLIElement>;
|
|
38
43
|
export declare const CollectionItem: import('react').ForwardRefExoticComponent<CollectionItemProps & import('react').RefAttributes<HTMLLIElement>>;
|
|
39
44
|
export declare const CollectionContent: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
40
|
-
export
|
|
45
|
+
export interface CollectionHeadingProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
46
|
+
/** Heading level for the surrounding document outline. */
|
|
47
|
+
level?: HeadingLevel;
|
|
48
|
+
}
|
|
49
|
+
export declare const CollectionHeading: import('react').ForwardRefExoticComponent<CollectionHeadingProps & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
41
50
|
export declare const CollectionDescription: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
42
51
|
export declare const CollectionMeta: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
43
52
|
export declare const CollectionActions: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -53,7 +62,7 @@ export declare const List: import('react').ForwardRefExoticComponent<CollectionP
|
|
|
53
62
|
export declare const OrderedList: import('react').ForwardRefExoticComponent<OrderedCollectionProps & import('react').RefAttributes<HTMLOListElement>>;
|
|
54
63
|
export declare const ListItem: import('react').ForwardRefExoticComponent<CollectionItemProps & import('react').RefAttributes<HTMLLIElement>>;
|
|
55
64
|
export declare const ListContent: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
56
|
-
export declare const ListHeading: import('react').ForwardRefExoticComponent<
|
|
65
|
+
export declare const ListHeading: import('react').ForwardRefExoticComponent<CollectionHeadingProps & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
57
66
|
export declare const ListDescription: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
58
67
|
export declare const ListMeta: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
59
68
|
export declare const ListActions: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { cx as e } from "../../internal/class-names.js";
|
|
2
3
|
import { forwardRef as t } from "react";
|
|
3
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
5
|
//#region src/components/navigation-data/table-collection.tsx
|
|
@@ -72,11 +73,12 @@ var r = t(function({ className: t, ...r }, i) {
|
|
|
72
73
|
className: e("lyds-data-table__header", t),
|
|
73
74
|
...r
|
|
74
75
|
});
|
|
75
|
-
}), m = t(function({ children: t, className: r,
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
}), m = t(function({ children: t, className: r, level: i = 2, ...a }, o) {
|
|
77
|
+
let s = `h${i}`;
|
|
78
|
+
return /* @__PURE__ */ n(s, {
|
|
79
|
+
ref: o,
|
|
78
80
|
className: e("lyds-data-table__title", r),
|
|
79
|
-
...
|
|
81
|
+
...a,
|
|
80
82
|
children: t
|
|
81
83
|
});
|
|
82
84
|
}), h = t(function({ className: t, ...r }, i) {
|
|
@@ -131,11 +133,12 @@ var r = t(function({ className: t, ...r }, i) {
|
|
|
131
133
|
className: e("lyds-collection__content", t),
|
|
132
134
|
...r
|
|
133
135
|
});
|
|
134
|
-
}), C = t(function({ children: t, className: r,
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
}), C = t(function({ children: t, className: r, level: i = 3, ...a }, o) {
|
|
137
|
+
let s = `h${i}`;
|
|
138
|
+
return /* @__PURE__ */ n(s, {
|
|
139
|
+
ref: o,
|
|
137
140
|
className: e("lyds-collection__heading", r),
|
|
138
|
-
...
|
|
141
|
+
...a,
|
|
139
142
|
children: t
|
|
140
143
|
});
|
|
141
144
|
}), w = t(function({ className: t, ...r }, i) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-collection.js","names":[],"sources":["../../../src/components/navigation-data/table-collection.tsx"],"sourcesContent":["import {\n\tforwardRef,\n\ttype AnchorHTMLAttributes,\n\ttype ButtonHTMLAttributes,\n\ttype HTMLAttributes,\n\ttype LiHTMLAttributes,\n\ttype OlHTMLAttributes,\n\ttype TableHTMLAttributes,\n\ttype TdHTMLAttributes,\n\ttype ThHTMLAttributes\n} from \"react\";\n\nimport { cx } from \"./utils.js\";\n\nexport const TableFrame = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function TableFrame({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-table-frame\", className)} {...props} />;\n});\n\nexport const Table = forwardRef<HTMLTableElement, TableHTMLAttributes<HTMLTableElement>>(function Table({ className, ...props }, ref) {\n\treturn <table ref={ref} className={cx(\"lyds-table\", className)} {...props} />;\n});\n\nexport const TableCaption = forwardRef<HTMLTableCaptionElement, HTMLAttributes<HTMLTableCaptionElement>>(function TableCaption({ className, ...props }, ref) {\n\treturn <caption ref={ref} className={cx(\"lyds-table__caption\", className)} {...props} />;\n});\n\nexport const TableHeader = forwardRef<HTMLTableSectionElement, HTMLAttributes<HTMLTableSectionElement>>(function TableHeader({ className, ...props }, ref) {\n\treturn <thead ref={ref} className={cx(\"lyds-table__header\", className)} {...props} />;\n});\n\nexport const TableBody = forwardRef<HTMLTableSectionElement, HTMLAttributes<HTMLTableSectionElement>>(function TableBody({ className, ...props }, ref) {\n\treturn <tbody ref={ref} className={cx(\"lyds-table__body\", className)} {...props} />;\n});\n\nexport const TableFooter = forwardRef<HTMLTableSectionElement, HTMLAttributes<HTMLTableSectionElement>>(function TableFooter({ className, ...props }, ref) {\n\treturn <tfoot ref={ref} className={cx(\"lyds-table__footer\", className)} {...props} />;\n});\n\nexport const TableRow = forwardRef<HTMLTableRowElement, HTMLAttributes<HTMLTableRowElement>>(function TableRow({ className, ...props }, ref) {\n\treturn <tr ref={ref} className={cx(\"lyds-table__row\", className)} {...props} />;\n});\n\nexport interface TableHeadProps extends ThHTMLAttributes<HTMLTableCellElement> {\n\ttextAlign?: \"start\" | \"center\" | \"end\";\n}\n\nexport const TableHead = forwardRef<HTMLTableCellElement, TableHeadProps>(function TableHead({ className, scope = \"col\", textAlign = \"start\", ...props }, ref) {\n\treturn <th ref={ref} className={cx(\"lyds-table__head\", className)} data-align={textAlign} scope={scope} {...props} />;\n});\n\nexport interface TableCellProps extends TdHTMLAttributes<HTMLTableCellElement> {\n\ttextAlign?: \"start\" | \"center\" | \"end\";\n\tnumeric?: boolean;\n}\n\nexport const TableCell = forwardRef<HTMLTableCellElement, TableCellProps>(function TableCell({ className, textAlign = \"start\", numeric = false, ...props }, ref) {\n\treturn <td ref={ref} className={cx(\"lyds-table__cell\", className)} data-align={textAlign} data-numeric={numeric ? \"\" : undefined} {...props} />;\n});\n\n/** 純呈現用結構。資料擷取、排序、篩選與分頁由使用端負責。 */\nexport const DataTable = forwardRef<HTMLElement, HTMLAttributes<HTMLElement>>(function DataTable({ className, ...props }, ref) {\n\treturn <section ref={ref} className={cx(\"lyds-data-table\", className)} {...props} />;\n});\n\nexport const DataTableHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function DataTableHeader({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-data-table__header\", className)} {...props} />;\n});\n\nexport const DataTableTitle = forwardRef<HTMLHeadingElement, HTMLAttributes<HTMLHeadingElement>>(function DataTableTitle({ children, className, ...props }, ref) {\n\treturn (\n\t\t<h2 ref={ref} className={cx(\"lyds-data-table__title\", className)} {...props}>\n\t\t\t{children}\n\t\t</h2>\n\t);\n});\n\nexport const DataTableDescription = forwardRef<HTMLParagraphElement, HTMLAttributes<HTMLParagraphElement>>(function DataTableDescription({ className, ...props }, ref) {\n\treturn <p ref={ref} className={cx(\"lyds-data-table__description\", className)} {...props} />;\n});\n\nexport const DataTableControls = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function DataTableControls({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-data-table__controls\", className)} {...props} />;\n});\n\nexport interface DataTableRegionProps extends HTMLAttributes<HTMLDivElement> {\n\tlabel?: string;\n}\n\nexport const DataTableRegion = forwardRef<HTMLDivElement, DataTableRegionProps>(function DataTableRegion({ className, label, ...props }, ref) {\n\treturn <div ref={ref} aria-label={label} className={cx(\"lyds-data-table__region\", className)} role={label ? \"region\" : undefined} {...props} />;\n});\n\nexport const DataTableStatus = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function DataTableStatus({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-data-table__status\", className)} {...props} />;\n});\n\nexport interface CollectionProps extends HTMLAttributes<HTMLUListElement> {\n\tdensity?: \"comfortable\" | \"compact\";\n}\n\nexport const Collection = forwardRef<HTMLUListElement, CollectionProps>(function Collection({ className, density = \"comfortable\", ...props }, ref) {\n\treturn <ul ref={ref} className={cx(\"lyds-collection\", className)} data-density={density} {...props} />;\n});\n\nexport interface OrderedCollectionProps extends OlHTMLAttributes<HTMLOListElement> {\n\tdensity?: \"comfortable\" | \"compact\";\n}\n\nexport const OrderedCollection = forwardRef<HTMLOListElement, OrderedCollectionProps>(function OrderedCollection({ className, density = \"comfortable\", ...props }, ref) {\n\treturn <ol ref={ref} className={cx(\"lyds-collection\", className)} data-density={density} {...props} />;\n});\n\nexport type CollectionItemProps = LiHTMLAttributes<HTMLLIElement>;\n\nexport const CollectionItem = forwardRef<HTMLLIElement, CollectionItemProps>(function CollectionItem({ className, ...props }, ref) {\n\treturn <li ref={ref} className={cx(\"lyds-collection__item\", className)} {...props} />;\n});\n\nexport const CollectionContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function CollectionContent({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-collection__content\", className)} {...props} />;\n});\n\nexport const CollectionHeading = forwardRef<HTMLHeadingElement, HTMLAttributes<HTMLHeadingElement>>(function CollectionHeading({ children, className, ...props }, ref) {\n\treturn (\n\t\t<h3 ref={ref} className={cx(\"lyds-collection__heading\", className)} {...props}>\n\t\t\t{children}\n\t\t</h3>\n\t);\n});\n\nexport const CollectionDescription = forwardRef<HTMLParagraphElement, HTMLAttributes<HTMLParagraphElement>>(function CollectionDescription({ className, ...props }, ref) {\n\treturn <p ref={ref} className={cx(\"lyds-collection__description\", className)} {...props} />;\n});\n\nexport const CollectionMeta = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function CollectionMeta({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-collection__meta\", className)} {...props} />;\n});\n\nexport const CollectionActions = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function CollectionActions({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-collection__actions\", className)} {...props} />;\n});\n\nexport interface CollectionLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n\tselected?: boolean;\n}\n\nexport const CollectionLink = forwardRef<HTMLAnchorElement, CollectionLinkProps>(function CollectionLink({ children, className, selected = false, ...props }, ref) {\n\treturn (\n\t\t<a ref={ref} aria-current={selected ? \"page\" : undefined} className={cx(\"lyds-collection__interactive\", className)} data-selected={selected ? \"\" : undefined} {...props}>\n\t\t\t{children}\n\t\t</a>\n\t);\n});\n\nexport interface CollectionButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n\tselected?: boolean;\n}\n\nexport const CollectionButton = forwardRef<HTMLButtonElement, CollectionButtonProps>(function CollectionButton({ className, selected = false, type = \"button\", ...props }, ref) {\n\treturn <button ref={ref} aria-pressed={selected} className={cx(\"lyds-collection__interactive\", className)} data-selected={selected ? \"\" : undefined} type={type} {...props} />;\n});\n\nexport const List = Collection;\nexport const OrderedList = OrderedCollection;\nexport const ListItem = CollectionItem;\nexport const ListContent = CollectionContent;\nexport const ListHeading = CollectionHeading;\nexport const ListDescription = CollectionDescription;\nexport const ListMeta = CollectionMeta;\nexport const ListActions = CollectionActions;\nexport const ListLink = CollectionLink;\nexport const ListButton = CollectionButton;\n"],"mappings":";;;;AAcA,IAAa,IAAa,EAA2D,SAAoB,EAAE,cAAW,GAAG,KAAS,GAAK;CACtI,OAAO,kBAAC,OAAD;EAAU;EAAK,WAAW,EAAG,oBAAoB,CAAS;EAAG,GAAI;CAAQ,CAAA;AACjF,CAAC,GAEY,IAAQ,EAAoE,SAAe,EAAE,cAAW,GAAG,KAAS,GAAK;CACrI,OAAO,kBAAC,SAAD;EAAY;EAAK,WAAW,EAAG,cAAc,CAAS;EAAG,GAAI;CAAQ,CAAA;AAC7E,CAAC,GAEY,IAAe,EAA6E,SAAsB,EAAE,cAAW,GAAG,KAAS,GAAK;CAC5J,OAAO,kBAAC,WAAD;EAAc;EAAK,WAAW,EAAG,uBAAuB,CAAS;EAAG,GAAI;CAAQ,CAAA;AACxF,CAAC,GAEY,IAAc,EAA6E,SAAqB,EAAE,cAAW,GAAG,KAAS,GAAK;CAC1J,OAAO,kBAAC,SAAD;EAAY;EAAK,WAAW,EAAG,sBAAsB,CAAS;EAAG,GAAI;CAAQ,CAAA;AACrF,CAAC,GAEY,IAAY,EAA6E,SAAmB,EAAE,cAAW,GAAG,KAAS,GAAK;CACtJ,OAAO,kBAAC,SAAD;EAAY;EAAK,W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EAAU,WAAW,EAAG,gCAAgC,CAAS;EAAG,iBAAe,IAAW,KAAK,KAAA;EAAiB;EAAM,GAAI;CAAQ,CAAA;AAC9K,CAAC,GAEY,IAAO,GACP,IAAc,GACd,IAAW,GACX,IAAc,GACd,IAAc,GACd,IAAkB,GAClB,IAAW,GACX,IAAc,GACd,IAAW,GACX,IAAa"}
|
|
1
|
+
{"version":3,"file":"table-collection.js","names":[],"sources":["../../../src/components/navigation-data/table-collection.tsx"],"sourcesContent":["import {\n\tforwardRef,\n\ttype AnchorHTMLAttributes,\n\ttype ButtonHTMLAttributes,\n\ttype HTMLAttributes,\n\ttype LiHTMLAttributes,\n\ttype OlHTMLAttributes,\n\ttype TableHTMLAttributes,\n\ttype TdHTMLAttributes,\n\ttype ThHTMLAttributes\n} from \"react\";\n\nimport type { HeadingLevel } from \"@/components/foundations/section-heading\";\nimport { cx } from \"@/internal\";\nexport const TableFrame = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function TableFrame({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-table-frame\", className)} {...props} />;\n});\n\nexport const Table = forwardRef<HTMLTableElement, TableHTMLAttributes<HTMLTableElement>>(function Table({ className, ...props }, ref) {\n\treturn <table ref={ref} className={cx(\"lyds-table\", className)} {...props} />;\n});\n\nexport const TableCaption = forwardRef<HTMLTableCaptionElement, HTMLAttributes<HTMLTableCaptionElement>>(function TableCaption({ className, ...props }, ref) {\n\treturn <caption ref={ref} className={cx(\"lyds-table__caption\", className)} {...props} />;\n});\n\nexport const TableHeader = forwardRef<HTMLTableSectionElement, HTMLAttributes<HTMLTableSectionElement>>(function TableHeader({ className, ...props }, ref) {\n\treturn <thead ref={ref} className={cx(\"lyds-table__header\", className)} {...props} />;\n});\n\nexport const TableBody = forwardRef<HTMLTableSectionElement, HTMLAttributes<HTMLTableSectionElement>>(function TableBody({ className, ...props }, ref) {\n\treturn <tbody ref={ref} className={cx(\"lyds-table__body\", className)} {...props} />;\n});\n\nexport const TableFooter = forwardRef<HTMLTableSectionElement, HTMLAttributes<HTMLTableSectionElement>>(function TableFooter({ className, ...props }, ref) {\n\treturn <tfoot ref={ref} className={cx(\"lyds-table__footer\", className)} {...props} />;\n});\n\nexport const TableRow = forwardRef<HTMLTableRowElement, HTMLAttributes<HTMLTableRowElement>>(function TableRow({ className, ...props }, ref) {\n\treturn <tr ref={ref} className={cx(\"lyds-table__row\", className)} {...props} />;\n});\n\nexport interface TableHeadProps extends ThHTMLAttributes<HTMLTableCellElement> {\n\ttextAlign?: \"start\" | \"center\" | \"end\";\n}\n\nexport const TableHead = forwardRef<HTMLTableCellElement, TableHeadProps>(function TableHead({ className, scope = \"col\", textAlign = \"start\", ...props }, ref) {\n\treturn <th ref={ref} className={cx(\"lyds-table__head\", className)} data-align={textAlign} scope={scope} {...props} />;\n});\n\nexport interface TableCellProps extends TdHTMLAttributes<HTMLTableCellElement> {\n\ttextAlign?: \"start\" | \"center\" | \"end\";\n\tnumeric?: boolean;\n}\n\nexport const TableCell = forwardRef<HTMLTableCellElement, TableCellProps>(function TableCell({ className, textAlign = \"start\", numeric = false, ...props }, ref) {\n\treturn <td ref={ref} className={cx(\"lyds-table__cell\", className)} data-align={textAlign} data-numeric={numeric ? \"\" : undefined} {...props} />;\n});\n\n/** 純呈現用結構。資料擷取、排序、篩選與分頁由使用端負責。 */\nexport const DataTable = forwardRef<HTMLElement, HTMLAttributes<HTMLElement>>(function DataTable({ className, ...props }, ref) {\n\treturn <section ref={ref} className={cx(\"lyds-data-table\", className)} {...props} />;\n});\n\nexport const DataTableHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function DataTableHeader({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-data-table__header\", className)} {...props} />;\n});\n\nexport interface DataTableTitleProps extends HTMLAttributes<HTMLHeadingElement> {\n\t/** Heading level for the surrounding document outline. */\n\tlevel?: HeadingLevel;\n}\n\nexport const DataTableTitle = forwardRef<HTMLHeadingElement, DataTableTitleProps>(function DataTableTitle({ children, className, level = 2, ...props }, ref) {\n\tconst Heading = `h${level}` as const;\n\treturn (\n\t\t<Heading ref={ref} className={cx(\"lyds-data-table__title\", className)} {...props}>\n\t\t\t{children}\n\t\t</Heading>\n\t);\n});\n\nexport const DataTableDescription = forwardRef<HTMLParagraphElement, HTMLAttributes<HTMLParagraphElement>>(function DataTableDescription({ className, ...props }, ref) {\n\treturn <p ref={ref} className={cx(\"lyds-data-table__description\", className)} {...props} />;\n});\n\nexport const DataTableControls = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function DataTableControls({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-data-table__controls\", className)} {...props} />;\n});\n\nexport interface DataTableRegionProps extends HTMLAttributes<HTMLDivElement> {\n\tlabel?: string;\n}\n\nexport const DataTableRegion = forwardRef<HTMLDivElement, DataTableRegionProps>(function DataTableRegion({ className, label, ...props }, ref) {\n\treturn <div ref={ref} aria-label={label} className={cx(\"lyds-data-table__region\", className)} role={label ? \"region\" : undefined} {...props} />;\n});\n\nexport const DataTableStatus = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function DataTableStatus({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-data-table__status\", className)} {...props} />;\n});\n\nexport interface CollectionProps extends HTMLAttributes<HTMLUListElement> {\n\tdensity?: \"comfortable\" | \"compact\";\n}\n\nexport const Collection = forwardRef<HTMLUListElement, CollectionProps>(function Collection({ className, density = \"comfortable\", ...props }, ref) {\n\treturn <ul ref={ref} className={cx(\"lyds-collection\", className)} data-density={density} {...props} />;\n});\n\nexport interface OrderedCollectionProps extends OlHTMLAttributes<HTMLOListElement> {\n\tdensity?: \"comfortable\" | \"compact\";\n}\n\nexport const OrderedCollection = forwardRef<HTMLOListElement, OrderedCollectionProps>(function OrderedCollection({ className, density = \"comfortable\", ...props }, ref) {\n\treturn <ol ref={ref} className={cx(\"lyds-collection\", className)} data-density={density} {...props} />;\n});\n\nexport type CollectionItemProps = LiHTMLAttributes<HTMLLIElement>;\n\nexport const CollectionItem = forwardRef<HTMLLIElement, CollectionItemProps>(function CollectionItem({ className, ...props }, ref) {\n\treturn <li ref={ref} className={cx(\"lyds-collection__item\", className)} {...props} />;\n});\n\nexport const CollectionContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function CollectionContent({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-collection__content\", className)} {...props} />;\n});\n\nexport interface CollectionHeadingProps extends HTMLAttributes<HTMLHeadingElement> {\n\t/** Heading level for the surrounding document outline. */\n\tlevel?: HeadingLevel;\n}\n\nexport const CollectionHeading = forwardRef<HTMLHeadingElement, CollectionHeadingProps>(function CollectionHeading({ children, className, level = 3, ...props }, ref) {\n\tconst Heading = `h${level}` as const;\n\treturn (\n\t\t<Heading ref={ref} className={cx(\"lyds-collection__heading\", className)} {...props}>\n\t\t\t{children}\n\t\t</Heading>\n\t);\n});\n\nexport const CollectionDescription = forwardRef<HTMLParagraphElement, HTMLAttributes<HTMLParagraphElement>>(function CollectionDescription({ className, ...props }, ref) {\n\treturn <p ref={ref} className={cx(\"lyds-collection__description\", className)} {...props} />;\n});\n\nexport const CollectionMeta = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function CollectionMeta({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-collection__meta\", className)} {...props} />;\n});\n\nexport const CollectionActions = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function CollectionActions({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-collection__actions\", className)} {...props} />;\n});\n\nexport interface CollectionLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n\tselected?: boolean;\n}\n\nexport const CollectionLink = forwardRef<HTMLAnchorElement, CollectionLinkProps>(function CollectionLink({ children, className, selected = false, ...props }, ref) {\n\treturn (\n\t\t<a ref={ref} aria-current={selected ? \"page\" : undefined} className={cx(\"lyds-collection__interactive\", className)} data-selected={selected ? \"\" : undefined} {...props}>\n\t\t\t{children}\n\t\t</a>\n\t);\n});\n\nexport interface CollectionButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n\tselected?: boolean;\n}\n\nexport const CollectionButton = forwardRef<HTMLButtonElement, CollectionButtonProps>(function CollectionButton({ className, selected = false, type = \"button\", ...props }, ref) {\n\treturn <button ref={ref} aria-pressed={selected} className={cx(\"lyds-collection__interactive\", className)} data-selected={selected ? \"\" : undefined} type={type} {...props} />;\n});\n\nexport const List = Collection;\nexport const OrderedList = OrderedCollection;\nexport const ListItem = CollectionItem;\nexport const ListContent = CollectionContent;\nexport const ListHeading = CollectionHeading;\nexport const ListDescription = CollectionDescription;\nexport const ListMeta = CollectionMeta;\nexport const ListActions = CollectionActions;\nexport const ListLink = CollectionLink;\nexport const ListButton = CollectionButton;\n"],"mappings":";;;;;AAcA,IAAa,IAAa,EAA2D,SAAoB,EAAE,cAAW,GAAG,KAAS,GAAK;CACtI,OAAO,kBAAC,OAAD;EAAU;EAAK,WAAW,EAAG,oBAAoB,CAAS;EAAG,GAAI;CAAQ,CAAA;AACjF,CAAC,GAEY,IAAQ,EAAoE,SAAe,EAAE,cAAW,GAAG,KAAS,GAAK;CACrI,OAAO,kBAAC,SAAD;EAAY;EAAK,WAAW,EAAG,cAAc,CAAS;EAAG,GAAI;CAAQ,CAAA;AAC7E,CAAC,GAEY,IAAe,EAA6E,SAAsB,EAAE,cAAW,GAAG,KAAS,GAAK;CAC5J,OAAO,kBAAC,WAAD;EAAc;EAAK,WAAW,EAAG,uBAAuB,CAAS;EAAG,GAAI;CAAQ,CAAA;AACxF,CAAC,GAEY,IAAc,EAA6E,SAAqB,EAAE,cAAW,GAAG,KAAS,GAAK;CAC1J,OAAO,kBAAC,SAAD;EAAY;EAAK,WAAW,EAAG,sBAAsB,CAAS;EAAG,GAAI;CAAQ,CAAA;AACrF,CAAC,GAEY,IAAY,EAA6E,SAAmB,EAA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AA;AAEL,CAAC,GAMY,IAAmB,EAAqD,SAA0B,EAAE,cAAW,cAAW,IAAO,UAAO,UAAU,GAAG,KAAS,GAAK;CAC/K,OAAO,kBAAC,UAAD;EAAa;EAAK,gBAAc;EAAU,WAAW,EAAG,gCAAgC,CAAS;EAAG,iBAAe,IAAW,KAAK,KAAA;EAAiB;EAAM,GAAI;CAAQ,CAAA;AAC9K,CAAC,GAEY,IAAO,GACP,IAAc,GACd,IAAW,GACX,IAAc,GACd,IAAc,GACd,IAAkB,GAClB,IAAW,GACX,IAAc,GACd,IAAW,GACX,IAAa"}
|
|
@@ -13,7 +13,11 @@ export interface DialogPopupProps extends BaseDialogPopupProps {
|
|
|
13
13
|
closeLabel?: string;
|
|
14
14
|
/** 傳給內建關閉控制項的屬性。 */
|
|
15
15
|
closeProps?: Omit<DialogCloseProps, "children">;
|
|
16
|
-
/**
|
|
16
|
+
/** Renders the built-in corner close control. */
|
|
17
|
+
closeButton?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Pass `closeButton={false}` instead. Kept so existing call sites keep working.
|
|
20
|
+
*/
|
|
17
21
|
hasCustomClose?: boolean;
|
|
18
22
|
}
|
|
19
23
|
export declare const DialogPopup: import('react').ForwardRefExoticComponent<Omit<DialogPopupProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
@@ -28,7 +32,15 @@ export type DialogHeaderProps = HTMLAttributes<HTMLDivElement>;
|
|
|
28
32
|
export declare const DialogHeader: import('react').ForwardRefExoticComponent<DialogHeaderProps & RefAttributes<HTMLDivElement>>;
|
|
29
33
|
export type DialogBodyProps = HTMLAttributes<HTMLDivElement>;
|
|
30
34
|
export declare const DialogBody: import('react').ForwardRefExoticComponent<DialogBodyProps & RefAttributes<HTMLDivElement>>;
|
|
31
|
-
|
|
35
|
+
/**
|
|
36
|
+
* `stretch`, the default, gives every child an equal column so a Cancel/Confirm pair reads as
|
|
37
|
+
* one balanced decision. `end` sizes the actions to their own labels and puts them at the end
|
|
38
|
+
* of the row; `between` separates supporting copy from the actions.
|
|
39
|
+
*/
|
|
40
|
+
export type OverlayFooterAlign = "end" | "between" | "stretch";
|
|
41
|
+
export interface DialogFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
42
|
+
align?: OverlayFooterAlign;
|
|
43
|
+
}
|
|
32
44
|
export declare const DialogFooter: import('react').ForwardRefExoticComponent<DialogFooterProps & RefAttributes<HTMLDivElement>>;
|
|
33
45
|
export declare const Dialog: {
|
|
34
46
|
readonly Root: typeof DialogRoot;
|
|
@@ -70,13 +82,21 @@ export interface AlertDialogPopupProps extends BaseDialogPopupProps {
|
|
|
70
82
|
closeLabel?: string;
|
|
71
83
|
/** 傳給內建取消/關閉控制項的屬性。 */
|
|
72
84
|
closeProps?: Omit<DialogCloseProps, "children">;
|
|
73
|
-
/**
|
|
85
|
+
/**
|
|
86
|
+
* Renders the built-in corner close control. An alert dialog asks for a deliberate choice, so
|
|
87
|
+
* this defaults to `false` and the popup should carry its own confirm and cancel actions.
|
|
88
|
+
*/
|
|
89
|
+
closeButton?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* @deprecated Pass `closeButton` instead. Kept so existing call sites keep working.
|
|
92
|
+
*/
|
|
74
93
|
hasCustomClose?: boolean;
|
|
75
94
|
}
|
|
76
95
|
export declare const AlertDialogPopup: import('react').ForwardRefExoticComponent<Omit<AlertDialogPopupProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
77
96
|
export declare const AlertDialogClose: import('react').ForwardRefExoticComponent<Omit<DialogCloseProps, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
78
97
|
export interface AlertDialogActionsProps extends HTMLAttributes<HTMLDivElement> {
|
|
79
98
|
children?: ReactNode;
|
|
99
|
+
align?: OverlayFooterAlign;
|
|
80
100
|
}
|
|
81
101
|
export declare const AlertDialogActions: import('react').ForwardRefExoticComponent<AlertDialogActionsProps & RefAttributes<HTMLDivElement>>;
|
|
82
102
|
export declare const AlertDialog: {
|