@seanyeh77/ui 0.43.1 → 0.45.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/LICENSE +21 -0
- package/README.md +1 -1
- package/dist/bundle.js +20 -20
- package/dist/components/AccentPicker/AccentPicker.d.ts +1 -0
- package/dist/components/AccentPicker/AccentPicker.js +92 -72
- package/dist/components/AccentPicker/AccentPicker.js.map +1 -1
- package/dist/components/ActionBar/ActionBar.d.ts +2 -0
- package/dist/components/ActionBar/ActionBar.js.map +1 -1
- package/dist/components/AiMark/AiMark.d.ts +1 -0
- package/dist/components/AiMark/AiMark.js.map +1 -1
- package/dist/components/Alert/Alert.d.ts +6 -3
- package/dist/components/Alert/Alert.js +18 -14
- package/dist/components/Alert/Alert.js.map +1 -1
- package/dist/components/AppShell/AppShell.d.ts +10 -4
- package/dist/components/AppShell/AppShell.js +30 -19
- package/dist/components/AppShell/AppShell.js.map +1 -1
- package/dist/components/Badge/Badge.d.ts +24 -7
- package/dist/components/Badge/Badge.js +78 -21
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/BarChart/BarChart.d.ts +14 -1
- package/dist/components/BarChart/BarChart.js +88 -59
- package/dist/components/BarChart/BarChart.js.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/Button/Button.d.ts +4 -1
- package/dist/components/Button/Button.js +17 -3
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Calendar/Calendar.d.ts +11 -2
- package/dist/components/Calendar/Calendar.js +16 -5
- package/dist/components/Calendar/Calendar.js.map +1 -1
- package/dist/components/Card/Card.d.ts +1 -0
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +24 -8
- package/dist/components/Checkbox/Checkbox.js +22 -9
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/CodeView/CodeView.d.ts +3 -0
- package/dist/components/CodeView/CodeView.js +6 -6
- package/dist/components/CodeView/CodeView.js.map +1 -1
- package/dist/components/CommandPalette/CommandPalette.d.ts +16 -4
- package/dist/components/CommandPalette/CommandPalette.js +38 -11
- package/dist/components/CommandPalette/CommandPalette.js.map +1 -1
- package/dist/components/ConsoleLayout/ConsoleLayout.d.ts +2 -3
- package/dist/components/ConsoleLayout/ConsoleLayout.js +4 -1
- package/dist/components/ConsoleLayout/ConsoleLayout.js.map +1 -1
- package/dist/components/DangerZone/DangerZone.d.ts +3 -2
- package/dist/components/DangerZone/DangerZone.js +3 -2
- package/dist/components/DangerZone/DangerZone.js.map +1 -1
- package/dist/components/DataTable/DataTable.d.ts +16 -4
- package/dist/components/DataTable/DataTable.js +346 -208
- package/dist/components/DataTable/DataTable.js.map +1 -1
- package/dist/components/DataTable/SortButton.js +48 -5
- package/dist/components/DataTable/SortButton.js.map +1 -1
- package/dist/components/DataTable/filters.js +2 -1
- package/dist/components/DataTable/filters.js.map +1 -1
- package/dist/components/DataTable/parts.js +1 -1
- package/dist/components/DataTable/parts.js.map +1 -1
- package/dist/components/DataTable/types.d.ts +10 -3
- package/dist/components/DatePicker/DatePicker.d.ts +9 -7
- package/dist/components/DatePicker/DatePicker.js +16 -6
- package/dist/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +12 -7
- package/dist/components/DateRangePicker/DateRangePicker.js +81 -45
- package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/DetailList/DetailList.d.ts +2 -0
- package/dist/components/DetailList/DetailList.js.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +56 -20
- package/dist/components/Dialog/Dialog.js +46 -14
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +18 -5
- package/dist/components/Drawer/Drawer.js +87 -24
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/EmptyState/EmptyState.d.ts +2 -2
- package/dist/components/EmptyState/EmptyState.js +3 -2
- package/dist/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/components/ErrorPage/ErrorPage.d.ts +4 -0
- package/dist/components/ErrorPage/ErrorPage.js +2 -1
- package/dist/components/ErrorPage/ErrorPage.js.map +1 -1
- package/dist/components/EventTimeline/EventTimeline.d.ts +23 -5
- package/dist/components/EventTimeline/EventTimeline.js +64 -20
- package/dist/components/EventTimeline/EventTimeline.js.map +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts +10 -2
- package/dist/components/FileUpload/FileUpload.js +5 -2
- package/dist/components/FileUpload/FileUpload.js.map +1 -1
- package/dist/components/FormGrid/FormGrid.d.ts +3 -1
- package/dist/components/FormGrid/FormGrid.js +5 -2
- package/dist/components/FormGrid/FormGrid.js.map +1 -1
- package/dist/components/Graph/Graph.d.ts +1 -0
- package/dist/components/Graph/Graph.js +8 -4
- package/dist/components/Graph/Graph.js.map +1 -1
- package/dist/components/Grid/Grid.d.ts +11 -4
- package/dist/components/Grid/Grid.js +14 -2
- package/dist/components/Grid/Grid.js.map +1 -1
- package/dist/components/IconButton/IconButton.d.ts +2 -1
- package/dist/components/IconButton/IconButton.js +10 -1
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/InlineCode/InlineCode.d.ts +6 -0
- package/dist/components/InlineCode/InlineCode.js +10 -6
- package/dist/components/InlineCode/InlineCode.js.map +1 -1
- package/dist/components/KpiCard/KpiCard.d.ts +7 -3
- package/dist/components/KpiCard/KpiCard.js +40 -25
- package/dist/components/KpiCard/KpiCard.js.map +1 -1
- package/dist/components/LayerGraph/LayerGraph.d.ts +68 -23
- package/dist/components/LayerGraph/LayerGraph.js +178 -97
- package/dist/components/LayerGraph/LayerGraph.js.map +1 -1
- package/dist/components/LineChart/LineChart.d.ts +10 -3
- package/dist/components/LineChart/LineChart.js +55 -23
- package/dist/components/LineChart/LineChart.js.map +1 -1
- package/dist/components/Link/Link.d.ts +17 -0
- package/dist/components/Link/Link.js +47 -0
- package/dist/components/Link/Link.js.map +1 -0
- package/dist/components/LoadingBar/LoadingBar.d.ts +1 -0
- package/dist/components/LoadingBar/LoadingBar.js.map +1 -1
- package/dist/components/LoginCard/LoginCard.d.ts +9 -3
- package/dist/components/LoginCard/LoginCard.js +99 -78
- package/dist/components/LoginCard/LoginCard.js.map +1 -1
- package/dist/components/Markdown/Markdown.d.ts +1 -0
- package/dist/components/Markdown/Markdown.js +20 -2
- package/dist/components/Markdown/Markdown.js.map +1 -1
- package/dist/components/Menu/Menu.d.ts +4 -2
- package/dist/components/Menu/Menu.js +43 -33
- package/dist/components/Menu/Menu.js.map +1 -1
- package/dist/components/Meter/Meter.d.ts +4 -0
- package/dist/components/Meter/Meter.js.map +1 -1
- package/dist/components/MobileTabBar/MobileTabBar.d.ts +3 -0
- package/dist/components/MobileTabBar/MobileTabBar.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +7 -6
- package/dist/components/MultiSelect/MultiSelect.js +27 -9
- package/dist/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/components/NotificationBell/NotificationBell.d.ts +4 -0
- package/dist/components/NotificationBell/NotificationBell.js +4 -3
- package/dist/components/NotificationBell/NotificationBell.js.map +1 -1
- package/dist/components/PageHeader/PageHeader.d.ts +34 -0
- package/dist/components/PageHeader/PageHeader.js +68 -0
- package/dist/components/PageHeader/PageHeader.js.map +1 -0
- package/dist/components/Popover/Popover.d.ts +11 -4
- package/dist/components/Popover/Popover.js +17 -7
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +2 -0
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/ProgressRing/ProgressRing.d.ts +1 -0
- package/dist/components/ProgressRing/ProgressRing.js.map +1 -1
- package/dist/components/ProjectSwitcher/ProjectSwitcher.d.ts +5 -1
- package/dist/components/ProjectSwitcher/ProjectSwitcher.js +16 -3
- package/dist/components/ProjectSwitcher/ProjectSwitcher.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +22 -5
- package/dist/components/RadioGroup/RadioGroup.js +48 -47
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/RelativeTime/RelativeTime.d.ts +10 -0
- package/dist/components/RelativeTime/RelativeTime.js +44 -0
- package/dist/components/RelativeTime/RelativeTime.js.map +1 -0
- package/dist/components/SearchField/SearchField.d.ts +2 -0
- package/dist/components/SearchField/SearchField.js.map +1 -1
- package/dist/components/Section/Section.d.ts +4 -0
- package/dist/components/Section/Section.js +8 -22
- package/dist/components/Section/Section.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +22 -9
- package/dist/components/SegmentedControl/SegmentedControl.js +20 -19
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/components/Select/Select.d.ts +7 -11
- package/dist/components/Select/Select.js +7 -3
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/SettingsLayout/SettingsLayout.d.ts +33 -4
- package/dist/components/SettingsLayout/SettingsLayout.js +62 -14
- package/dist/components/SettingsLayout/SettingsLayout.js.map +1 -1
- package/dist/components/SideNav/SideNav.d.ts +2 -0
- package/dist/components/SideNav/SideNav.js +3 -3
- package/dist/components/SideNav/SideNav.js.map +1 -1
- package/dist/components/SplitPane/SplitPane.d.ts +1 -0
- package/dist/components/SplitPane/SplitPane.js.map +1 -1
- package/dist/components/StatusBand/StatusBand.d.ts +1 -0
- package/dist/components/StatusBand/StatusBand.js.map +1 -1
- package/dist/components/Suggestion/Suggestion.d.ts +6 -0
- package/dist/components/Suggestion/Suggestion.js.map +1 -1
- package/dist/components/Switch/Switch.d.ts +13 -3
- package/dist/components/Switch/Switch.js +16 -7
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +8 -1
- package/dist/components/Tabs/Tabs.js +6 -3
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tag/Tag.d.ts +15 -7
- package/dist/components/Tag/Tag.js +22 -10
- package/dist/components/Tag/Tag.js.map +1 -1
- package/dist/components/Term/Term.d.ts +8 -3
- package/dist/components/Term/Term.js +1 -1
- package/dist/components/Term/Term.js.map +1 -1
- package/dist/components/TextArea/TextArea.d.ts +6 -9
- package/dist/components/TextArea/TextArea.js +25 -12
- package/dist/components/TextArea/TextArea.js.map +1 -1
- package/dist/components/TextField/TextField.d.ts +8 -11
- package/dist/components/TextField/TextField.js +9 -7
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/ThemePicker/ThemePicker.d.ts +1 -0
- package/dist/components/ThemePicker/ThemePicker.js +35 -34
- package/dist/components/ThemePicker/ThemePicker.js.map +1 -1
- package/dist/components/TimeControl/TimeControl.d.ts +1 -0
- package/dist/components/TimeControl/TimeControl.js.map +1 -1
- package/dist/components/Toast/Toast.d.ts +56 -3
- package/dist/components/Toast/Toast.js +191 -8
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/TopBar/TopBar.d.ts +6 -2
- package/dist/components/TopBar/TopBar.js +7 -1
- package/dist/components/TopBar/TopBar.js.map +1 -1
- package/dist/components/Tour/Tour.d.ts +14 -3
- package/dist/components/Tour/Tour.js +26 -14
- package/dist/components/Tour/Tour.js.map +1 -1
- package/dist/components/TreeList/TreeList.d.ts +28 -4
- package/dist/components/TreeList/TreeList.js +32 -20
- package/dist/components/TreeList/TreeList.js.map +1 -1
- package/dist/components/Workbench/Workbench.d.ts +1 -0
- package/dist/components/Workbench/Workbench.js +24 -12
- package/dist/components/Workbench/Workbench.js.map +1 -1
- package/dist/components/ZoneMap/ZoneMap.d.ts +12 -2
- package/dist/components/ZoneMap/ZoneMap.js +13 -5
- package/dist/components/ZoneMap/ZoneMap.js.map +1 -1
- package/dist/components/useFormErrors/useFormErrors.d.ts +20 -0
- package/dist/components/useFormErrors/useFormErrors.js +55 -0
- package/dist/components/useFormErrors/useFormErrors.js.map +1 -0
- package/dist/css/AccentPicker.css +1 -0
- package/dist/css/Alert.css +8 -19
- package/dist/css/AppShell.css +1 -0
- package/dist/css/Badge.css +19 -45
- package/dist/css/BarChart.css +21 -3
- package/dist/css/Button.css +6 -1
- package/dist/css/Card.css +8 -8
- package/dist/css/Checkbox.css +20 -0
- package/dist/css/CodeView.css +3 -2
- package/dist/css/DangerZone.css +5 -3
- package/dist/css/DataTable.css +303 -69
- package/dist/css/DatePicker.css +1 -0
- package/dist/css/DateRangePicker.css +24 -2
- package/dist/css/Drawer.css +31 -0
- package/dist/css/EmptyState.css +1 -0
- package/dist/css/ErrorPage.css +4 -1
- package/dist/css/EventTimeline.css +34 -5
- package/dist/css/FileUpload.css +1 -0
- package/dist/css/FormGrid.css +12 -3
- package/dist/css/Graph.css +9 -1
- package/dist/css/Grid.css +8 -0
- package/dist/css/KpiCard.css +13 -1
- package/dist/css/LayerGraph.css +40 -15
- package/dist/css/Link.css +23 -0
- package/dist/css/LoginCard.css +17 -11
- package/dist/css/Markdown.css +31 -2
- package/dist/css/Menu.css +0 -2
- package/dist/css/Meter.css +16 -0
- package/dist/css/MultiSelect.css +1 -0
- package/dist/css/NotificationBell.css +1 -0
- package/dist/css/PageHeader.css +50 -0
- package/dist/css/ProgressBar.css +12 -0
- package/dist/css/ProjectSwitcher.css +25 -23
- package/dist/css/RelativeTime.css +2 -0
- package/dist/css/SegmentedControl.css +38 -10
- package/dist/css/Select.css +1 -0
- package/dist/css/SettingsLayout.css +29 -8
- package/dist/css/SideNav.css +4 -1
- package/dist/css/Skeleton.css +22 -1
- package/dist/css/Suggestion.css +1 -1
- package/dist/css/Switch.css +27 -0
- package/dist/css/Tabs.css +8 -7
- package/dist/css/Tag.css +19 -12
- package/dist/css/Term.css +1 -1
- package/dist/css/TextArea.css +1 -0
- package/dist/css/TextField.css +1 -0
- package/dist/css/Toast.css +101 -4
- package/dist/css/TopBar.css +21 -2
- package/dist/css/Tour.css +1 -1
- package/dist/css/TreeList.css +7 -3
- package/dist/css/Workbench.css +13 -1
- package/dist/css/ZoneMap.css +0 -1
- package/dist/css/base.css +45 -0
- package/dist/css/end.css +119 -5
- package/dist/deprecated.d.ts +3 -0
- package/dist/deprecated.js +13 -0
- package/dist/deprecated.js.map +1 -0
- package/dist/fonts.css +2 -7543
- package/dist/format.d.ts +3 -1
- package/dist/format.js +15 -5
- package/dist/format.js.map +1 -1
- package/dist/generated/themeDefaults.d.ts +8 -0
- package/dist/generated/themeDefaults.js +35 -0
- package/dist/generated/themeDefaults.js.map +1 -0
- package/dist/i18n.d.ts +7 -2
- package/dist/i18n.js +65 -10
- package/dist/i18n.js.map +1 -1
- package/dist/icons/Icon.d.ts +3 -1
- package/dist/icons/Icon.js.map +1 -1
- package/dist/index.d.ts +23 -14
- package/dist/index.js +14 -8
- package/dist/internal/Field.d.ts +19 -0
- package/dist/internal/Field.js +13 -6
- package/dist/internal/Field.js.map +1 -1
- package/dist/internal/FloatingPanel.js +2 -1
- package/dist/internal/FloatingPanel.js.map +1 -1
- package/dist/internal/chart.d.ts +4 -0
- package/dist/internal/chart.js +89 -19
- package/dist/internal/chart.js.map +1 -1
- package/dist/internal/codeSpans.js +20 -0
- package/dist/internal/codeSpans.js.map +1 -0
- package/dist/internal/dev.js +9 -4
- package/dist/internal/dev.js.map +1 -1
- package/dist/internal/focus.js +27 -3
- package/dist/internal/focus.js.map +1 -1
- package/dist/internal/focusMain.js +6 -2
- package/dist/internal/focusMain.js.map +1 -1
- package/dist/internal/open.d.ts +14 -0
- package/dist/internal/open.js +28 -0
- package/dist/internal/open.js.map +1 -0
- package/dist/internal/roving.js +37 -0
- package/dist/internal/roving.js.map +1 -0
- package/dist/internal/shell.js +12 -0
- package/dist/internal/shell.js.map +1 -0
- package/dist/internal/stored.js +89 -0
- package/dist/internal/stored.js.map +1 -0
- package/dist/internal/tableTools.js +46 -4
- package/dist/internal/tableTools.js.map +1 -1
- package/dist/internal/util.js +8 -17
- package/dist/internal/util.js.map +1 -1
- package/dist/locale.d.ts +17 -0
- package/dist/locale.js +29 -0
- package/dist/locale.js.map +1 -0
- package/dist/styles.css +1296 -400
- package/dist/theme.d.ts +23 -5
- package/dist/theme.js +85 -25
- package/dist/theme.js.map +1 -1
- package/dist/tokens.css +3 -0
- package/docs/AccentPicker.md +3 -1
- package/docs/Alert.md +4 -3
- package/docs/AppShell.md +11 -10
- package/docs/Badge.md +26 -16
- package/docs/BarChart.md +7 -4
- package/docs/Button.md +4 -5
- package/docs/Calendar.md +2 -2
- package/docs/Card.md +9 -8
- package/docs/Checkbox.md +4 -1
- package/docs/CodeView.md +30 -43
- package/docs/CommandPalette.md +3 -2
- package/docs/ConsoleLayout.md +5 -5
- package/docs/DangerZone.md +3 -2
- package/docs/DataColors.md +2 -2
- package/docs/DataTable.md +29 -141
- package/docs/DatePicker.md +1 -0
- package/docs/DateRangePicker.md +3 -0
- package/docs/DetailList.md +9 -9
- package/docs/Dialog.md +8 -4
- package/docs/Drawer.md +7 -4
- package/docs/ErrorPage.md +1 -1
- package/docs/EventTimeline.md +23 -12
- package/docs/FileUpload.md +1 -1
- package/docs/FormGrid.md +2 -1
- package/docs/Format.md +5 -3
- package/docs/Graph.md +1 -1
- package/docs/Grid.md +5 -1
- package/docs/KpiCard.md +6 -4
- package/docs/LayerGraph.md +18 -53
- package/docs/LineChart.md +5 -3
- package/docs/Link.md +22 -0
- package/docs/LoginCard.md +7 -3
- package/docs/Markdown.md +3 -13
- package/docs/Menu.md +2 -0
- package/docs/Meter.md +1 -0
- package/docs/MultiSelect.md +2 -1
- package/docs/NotificationBell.md +1 -0
- package/docs/PageHeader.md +34 -0
- package/docs/Popover.md +3 -1
- package/docs/ProgressBar.md +3 -1
- package/docs/ProjectSwitcher.md +14 -14
- package/docs/RadioGroup.md +2 -0
- package/docs/RelativeTime.md +23 -0
- package/docs/Section.md +1 -1
- package/docs/SegmentedControl.md +9 -6
- package/docs/Select.md +2 -1
- package/docs/SettingsLayout.md +19 -4
- package/docs/SideNav.md +1 -1
- package/docs/Skeleton.md +2 -1
- package/docs/Switch.md +3 -1
- package/docs/Tabs.md +4 -3
- package/docs/Tag.md +9 -7
- package/docs/Term.md +3 -3
- package/docs/TextArea.md +2 -1
- package/docs/TextField.md +5 -3
- package/docs/ThemePicker.md +3 -1
- package/docs/Toast.md +17 -5
- package/docs/TopBar.md +8 -5
- package/docs/Tour.md +3 -2
- package/docs/TreeList.md +10 -37
- package/docs/Workbench.md +1 -48
- package/docs/ZoneMap.md +5 -5
- package/docs/agents.md +82 -0
- package/docs/code.md +2 -2
- package/docs/components.json +314 -0
- package/docs/data.md +9 -18
- package/docs/forms.md +6 -5
- package/docs/guidelines.md +39 -31
- package/docs/icons.md +9 -0
- package/docs/layout.md +16 -20
- package/docs/motion.md +31 -56
- package/docs/theme.md +15 -18
- package/docs/useFormErrors.md +35 -0
- package/package.json +8 -7
- package/dist/bundle.js.map +0 -1
- package/dist/fonts/LICENSE-OFL.txt +0 -93
- package/dist/fonts/geist-mono-cyrillic-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-ext-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-ext-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-ext-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-ext-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-ext-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-ext-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-symbols2-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-symbols2-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-symbols2-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-symbols2-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-vietnamese-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-vietnamese-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-vietnamese-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-vietnamese-700-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-400-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-500-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-600-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-700-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-500-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-600-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-400-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-500-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-600-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-700-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-400-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-500-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-600-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-700-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-400-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-500-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-600-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-700-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-400-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-500-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-600-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-700-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-400-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-500-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-600-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-0-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-0-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-0-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-0-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-1-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-1-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-1-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-1-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-10-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-10-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-10-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-10-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-101-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-101-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-101-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-101-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-102-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-102-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-102-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-102-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-103-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-103-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-103-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-103-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-104-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-104-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-104-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-104-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-105-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-105-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-105-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-105-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-106-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-106-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-106-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-106-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-107-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-107-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-107-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-107-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-108-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-108-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-108-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-108-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-109-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-109-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-109-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-109-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-11-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-11-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-11-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-11-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-110-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-110-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-110-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-110-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-111-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-111-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-111-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-111-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-112-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-112-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-112-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-112-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-113-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-113-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-113-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-113-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-114-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-114-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-114-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-114-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-115-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-115-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-115-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-115-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-116-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-116-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-116-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-116-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-117-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-117-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-117-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-117-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-118-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-118-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-118-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-118-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-119-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-119-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-119-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-119-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-12-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-12-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-12-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-12-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-120-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-120-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-120-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-120-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-121-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-121-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-121-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-121-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-122-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-122-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-122-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-122-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-123-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-123-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-123-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-123-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-2-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-2-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-2-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-2-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-23-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-23-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-23-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-23-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-24-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-24-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-24-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-24-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-25-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-25-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-25-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-25-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-26-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-26-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-26-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-26-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-27-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-27-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-27-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-27-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-28-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-28-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-28-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-28-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-29-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-29-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-29-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-29-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-30-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-30-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-30-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-30-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-31-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-31-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-31-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-31-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-32-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-32-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-32-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-32-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-33-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-33-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-33-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-33-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-34-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-34-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-34-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-34-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-35-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-35-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-35-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-35-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-36-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-36-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-36-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-36-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-37-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-37-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-37-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-37-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-38-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-38-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-38-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-38-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-39-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-39-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-39-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-39-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-4-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-4-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-4-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-4-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-40-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-40-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-40-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-40-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-41-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-41-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-41-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-41-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-42-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-42-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-42-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-42-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-43-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-43-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-43-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-43-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-44-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-44-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-44-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-44-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-45-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-45-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-45-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-45-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-46-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-46-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-46-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-46-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-47-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-47-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-47-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-47-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-48-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-48-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-48-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-48-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-49-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-49-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-49-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-49-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-50-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-50-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-50-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-50-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-51-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-51-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-51-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-51-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-52-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-52-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-52-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-52-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-53-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-53-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-53-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-53-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-54-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-54-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-54-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-54-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-55-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-55-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-55-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-55-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-56-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-56-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-56-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-56-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-57-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-57-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-57-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-57-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-58-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-58-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-58-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-58-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-59-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-59-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-59-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-59-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-60-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-60-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-60-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-60-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-61-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-61-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-61-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-61-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-62-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-62-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-62-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-62-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-63-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-63-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-63-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-63-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-64-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-64-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-64-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-64-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-65-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-65-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-65-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-65-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-66-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-66-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-66-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-66-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-67-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-67-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-67-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-67-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-68-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-68-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-68-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-68-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-69-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-69-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-69-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-69-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-70-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-70-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-70-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-70-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-71-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-71-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-71-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-71-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-72-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-72-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-72-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-72-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-73-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-73-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-73-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-73-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-74-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-74-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-74-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-74-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-75-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-75-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-75-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-75-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-76-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-76-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-76-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-76-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-77-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-77-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-77-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-77-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-78-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-78-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-78-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-78-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-79-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-79-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-79-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-79-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-80-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-80-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-80-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-80-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-81-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-81-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-81-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-81-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-82-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-82-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-82-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-82-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-83-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-83-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-83-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-83-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-84-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-84-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-84-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-84-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-85-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-85-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-85-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-85-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-86-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-86-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-86-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-86-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-87-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-87-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-87-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-87-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-88-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-88-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-88-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-88-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-89-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-89-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-89-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-89-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-90-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-90-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-90-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-90-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-91-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-91-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-91-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-91-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-92-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-92-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-92-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-92-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-93-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-93-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-93-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-93-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-94-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-94-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-94-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-94-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-95-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-95-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-95-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-95-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-96-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-96-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-96-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-96-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-cyrillic-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-cyrillic-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-cyrillic-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-cyrillic-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-ext-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-ext-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-ext-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-ext-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-vietnamese-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-vietnamese-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-vietnamese-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-vietnamese-700-normal.woff2 +0 -0
|
@@ -5,9 +5,11 @@ import { Tabs } from "../Tabs/Tabs.js";
|
|
|
5
5
|
import { format } from "../../format.js";
|
|
6
6
|
import { tr, unitFor } from "../../i18n.js";
|
|
7
7
|
import { Icon } from "../../icons/Icon.js";
|
|
8
|
-
import { TOUCH_ONLY, copyText, cx, idPart, monoNums, reduced, seenOnly, useMedia, useNarrow } from "../../internal/util.js";
|
|
8
|
+
import { TOUCH_ONLY, copyText, cx, idPart, monoNums, reduced, resizeObserver, seenOnly, useMedia, useNarrow } from "../../internal/util.js";
|
|
9
9
|
import { Tooltip } from "../Tooltip/Tooltip.js";
|
|
10
|
-
import {
|
|
10
|
+
import { RelativeTime } from "../RelativeTime/RelativeTime.js";
|
|
11
|
+
import { DEV, devWarn } from "../../internal/dev.js";
|
|
12
|
+
import { useStored } from "../../internal/stored.js";
|
|
11
13
|
import { CheckMark } from "../../internal/Field.js";
|
|
12
14
|
import { announce } from "../../announce.js";
|
|
13
15
|
import { ScrollHint, useScrollHint } from "../../internal/scrollHint.js";
|
|
@@ -24,6 +26,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
24
26
|
import { createPortal } from "react-dom";
|
|
25
27
|
// src/components/DataTable/DataTable.tsx
|
|
26
28
|
includeIcons(caret_right_default, check_default, x_default);
|
|
29
|
+
const SEL = 40;
|
|
27
30
|
const MOVE = {
|
|
28
31
|
dur: 320,
|
|
29
32
|
stagger: 25,
|
|
@@ -35,11 +38,22 @@ const ARROWS = {
|
|
|
35
38
|
none: "M8 9l4-4 4 4M8 15l4 4 4-4"
|
|
36
39
|
};
|
|
37
40
|
const get = (row, key) => row[key];
|
|
41
|
+
const NO_TOGGLED = {};
|
|
42
|
+
const parseObject = (raw) => {
|
|
43
|
+
const v = JSON.parse(raw);
|
|
44
|
+
if (!v || typeof v !== "object") throw new Error("not an object");
|
|
45
|
+
return v;
|
|
46
|
+
};
|
|
47
|
+
const parseToggled = (raw) => parseObject(raw);
|
|
48
|
+
const parseWidths = (raw) => parseObject(raw);
|
|
38
49
|
const isNum = (c) => c.numeric || c.format === "money" || c.format === "percent" || c.format === "duration";
|
|
39
50
|
const isShort = (c) => isNum(c) || !!c.unit || isDateCol(c) || c.mobile === "status";
|
|
40
51
|
const TEXT_HUG_MAX = 280;
|
|
41
52
|
const HUG_START = 96;
|
|
42
|
-
const
|
|
53
|
+
const TEXT_HUG_MIN = 128;
|
|
54
|
+
const MAIN_WANT_MAX = 320;
|
|
55
|
+
const LONG_WANT_MAX = 512;
|
|
56
|
+
const TOOL_GAP = 8;
|
|
43
57
|
const isoOf = (d, dateOnly) => dateOnly ? `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}` : d.toISOString();
|
|
44
58
|
/** The width of what an element holds (its text and children, not absolutely placed parts such as the column border).
|
|
45
59
|
* Null where text cannot be measured (jsdom has no Range#getBoundingClientRect): the column keeps its default width. */
|
|
@@ -126,6 +140,14 @@ function RowCheck({ v, label, onClick }) {
|
|
|
126
140
|
children: /* @__PURE__ */ jsx(CheckMark, { v })
|
|
127
141
|
});
|
|
128
142
|
}
|
|
143
|
+
const UNMEASURED = {
|
|
144
|
+
fit: {},
|
|
145
|
+
clipped: null,
|
|
146
|
+
want: {},
|
|
147
|
+
roomy: false,
|
|
148
|
+
actsW: null,
|
|
149
|
+
onerow: false
|
|
150
|
+
};
|
|
129
151
|
/** The table for records: sort, search, filters, page numbers, selection with a bulk bar, row actions; cards on phones. */
|
|
130
152
|
function DataTable(p) {
|
|
131
153
|
const { columns: cols, rows, pageSize = 10, urlSync = true, urlKey, search = {}, selectable = false, stickyFirst: sticky = false } = p;
|
|
@@ -164,24 +186,9 @@ function DataTable(p) {
|
|
|
164
186
|
const [q, setQ] = React.useState(() => fromUrl().q);
|
|
165
187
|
const [values, setValues] = React.useState(() => fromUrl().values);
|
|
166
188
|
const [view, setView] = React.useState(p.views?.[0]?.id ?? null);
|
|
167
|
-
const
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
try {
|
|
171
|
-
const v = JSON.parse(localStorage.getItem(colsKey) || "null");
|
|
172
|
-
return v && typeof v === "object" ? v : {};
|
|
173
|
-
} catch {
|
|
174
|
-
return {};
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
const setToggled = (t) => {
|
|
178
|
-
setToggledState(t);
|
|
179
|
-
if (!colsKey) return;
|
|
180
|
-
try {
|
|
181
|
-
if (Object.keys(t).length) localStorage.setItem(colsKey, JSON.stringify(t));
|
|
182
|
-
else localStorage.removeItem(colsKey);
|
|
183
|
-
} catch {}
|
|
184
|
-
};
|
|
189
|
+
const storageKey = p.storageKey ?? p.widthKey;
|
|
190
|
+
const colsKey = storageKey ? "ui-dt-cols:" + storageKey : null;
|
|
191
|
+
const [toggled, setToggled] = useStored(colsKey ?? void 0, parseToggled, NO_TOGGLED, (t) => Object.keys(t).length ? JSON.stringify(t) : null);
|
|
185
192
|
const [opened, setOpened] = React.useState({});
|
|
186
193
|
const narrow = useNarrow();
|
|
187
194
|
const touch = useMedia(TOUCH_ONLY);
|
|
@@ -189,24 +196,10 @@ function DataTable(p) {
|
|
|
189
196
|
const rootRef = React.useRef(null);
|
|
190
197
|
const [sel, setSel] = React.useState({});
|
|
191
198
|
const [sumVal, setSumVal] = React.useState("all");
|
|
192
|
-
const [
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
const v = JSON.parse(localStorage.getItem("ui-dt-width:" + p.widthKey) || "null");
|
|
197
|
-
return v && typeof v === "object" ? v : null;
|
|
198
|
-
} catch {
|
|
199
|
-
return null;
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
const setWidths = (w) => {
|
|
203
|
-
setWidthsState(w);
|
|
204
|
-
if (!p.widthKey) return;
|
|
205
|
-
try {
|
|
206
|
-
if (w) localStorage.setItem("ui-dt-width:" + p.widthKey, JSON.stringify(w));
|
|
207
|
-
else localStorage.removeItem("ui-dt-width:" + p.widthKey);
|
|
208
|
-
} catch {}
|
|
209
|
-
};
|
|
199
|
+
const [measured, setMeasured] = React.useState(UNMEASURED);
|
|
200
|
+
const { fit, clipped, want, roomy, actsW, onerow: onerowState } = measured;
|
|
201
|
+
const wantRef = React.useRef(want);
|
|
202
|
+
const [widths, setWidths] = useStored(storageKey ? "ui-dt-width:" + storageKey : void 0, parseWidths, null);
|
|
210
203
|
const [zoomed, setZoomed] = React.useState(false);
|
|
211
204
|
const [zoomWidths, setZoomWidths] = React.useState(null);
|
|
212
205
|
const zoomRef = React.useRef(null);
|
|
@@ -216,6 +209,10 @@ function DataTable(p) {
|
|
|
216
209
|
const prev = noSearch ? rootRef.current?.previousElementSibling : null;
|
|
217
210
|
setHeadSlot(prev instanceof HTMLElement && prev.classList.contains("ui-card-head") && prev.parentElement?.classList.contains("ui-card") ? prev : null);
|
|
218
211
|
}, [noSearch]);
|
|
212
|
+
React.useEffect(() => {
|
|
213
|
+
const prev = rootRef.current?.previousElementSibling;
|
|
214
|
+
devWarn(prev?.classList.contains("ui-card-head") && !prev.querySelector(".ui-card-title") && prev.querySelector(".ui-card-actions"), "DataTable", "the Card around this table has actions but no title, so its one button takes a row of its own above the table. Pass the page's primary action to DataTable's action instead: it goes at the right end of the toolbar.");
|
|
215
|
+
}, []);
|
|
219
216
|
const [resetKey, setResetKey] = React.useState(p.resetKey);
|
|
220
217
|
const resetting = resetKey !== p.resetKey;
|
|
221
218
|
if (resetting) {
|
|
@@ -226,9 +223,14 @@ function DataTable(p) {
|
|
|
226
223
|
setSel({});
|
|
227
224
|
setSumVal("all");
|
|
228
225
|
setSort(initialSort);
|
|
229
|
-
if (!colsKey)
|
|
226
|
+
if (!colsKey) setToggled({});
|
|
230
227
|
setOpened({});
|
|
231
|
-
|
|
228
|
+
setMeasured((m) => ({
|
|
229
|
+
...m,
|
|
230
|
+
fit: {},
|
|
231
|
+
want: {},
|
|
232
|
+
clipped: null
|
|
233
|
+
}));
|
|
232
234
|
}
|
|
233
235
|
const valuesKey = JSON.stringify(values);
|
|
234
236
|
const sortKey = JSON.stringify(sort);
|
|
@@ -238,25 +240,29 @@ function DataTable(p) {
|
|
|
238
240
|
React.useEffect(() => {
|
|
239
241
|
if (urlSync && filters.length) writeUrl(urlKey, filters, values, q);
|
|
240
242
|
}, [valuesKey, q]);
|
|
241
|
-
devWarn(
|
|
242
|
-
devWarn(
|
|
243
|
+
devWarn(p.widthKey !== void 0, "DataTable", "`widthKey` is deprecated: rename it to `storageKey`, as in every other component that remembers a choice. The stored widths and columns carry over.");
|
|
244
|
+
devWarn(() => cols.some((c) => c.format === "percent" && !c.unit), "DataTable", "format: 'percent' sets 1 decimal and shows no % sign; add unit: '%' to that column.");
|
|
245
|
+
devWarn(() => rows.length > 1 && rows.every((r) => get(r, "id") == null) && selectable, "DataTable", "rows have no id, so a selection follows the position, not the row. Add an id to each row.");
|
|
246
|
+
devWarn(() => cols.some((c) => c.format === "datetime"), "DataTable", "format: 'datetime' is the old spelling, kept for now. Write format: 'dateTime', as format.dateTime().");
|
|
243
247
|
devWarn(!!cols[0]?.hidden, "DataTable", "the first column is always shown, so its hidden: true does nothing. Move the column, or drop hidden.");
|
|
244
|
-
devWarn((p.columnMenu === false || cols.length <= 2) && cols.some((c, i) => i > 0 && c.hidden), "DataTable", "a column has hidden: true but there is no 「欄位」 menu (columnMenu is false, or the table has 2 columns or fewer), so nobody can turn it on. Turn the menu on, or leave the column out.");
|
|
248
|
+
devWarn(() => (p.columnMenu === false || cols.length <= 2) && cols.some((c, i) => i > 0 && c.hidden), "DataTable", "a column has hidden: true but there is no 「欄位」 menu (columnMenu is false, or the table has 2 columns or fewer), so nobody can turn it on. Turn the menu on, or leave the column out.");
|
|
245
249
|
const sumKey = p.summary?.key;
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
250
|
+
if (DEV) {
|
|
251
|
+
const twiceFilter = sumKey ? filters.find((f) => f.key === sumKey) : void 0;
|
|
252
|
+
devWarn(twiceFilter, "DataTable", `the filter 「${twiceFilter?.label}」 filters ${String(sumKey)}, which the summary tabs already filter, so the same condition is in two places. Drop it from filters (or drop summary).`);
|
|
253
|
+
const twiceView = sumKey && rows.length ? p.views?.find((v) => {
|
|
254
|
+
if (!v.filter) return false;
|
|
255
|
+
const kept = rows.filter((r) => v.filter?.(r));
|
|
256
|
+
if (!kept.length || kept.length === rows.length) return false;
|
|
257
|
+
const val = String(get(kept[0], sumKey));
|
|
258
|
+
return kept.every((r) => String(get(r, sumKey)) === val) && rows.filter((r) => String(get(r, sumKey)) === val).length === kept.length;
|
|
259
|
+
}) : void 0;
|
|
260
|
+
devWarn(twiceView, "DataTable", `the view 「${twiceView?.label}」 keeps exactly the rows of one ${String(sumKey)} value, which a summary tab already picks, so the same condition is in two places. Drop the view (or drop summary).`);
|
|
261
|
+
for (const c of cols) {
|
|
262
|
+
if (!c.unit && !c.numeric) continue;
|
|
263
|
+
const bad = rows.map((r) => get(r, c.key)).find((v) => typeof v === "string" && /\d/.test(v) && (c.unit ? v.includes(c.unit) : !/^\s*-?[\d,]*\.?\d+\s*$/.test(v)));
|
|
264
|
+
devWarn(bad !== void 0, "DataTable", `column 「${c.label}」 got the string 「${String(bad)}」. Pass a number${c.unit ? "" : " and the unit in unit"} (e.g. { numeric: true, unit: '${c.unit || "items"}' } with 1234), so it is formatted, right-aligned and sorted as a number.`);
|
|
265
|
+
}
|
|
260
266
|
}
|
|
261
267
|
const hidden = {};
|
|
262
268
|
cols.forEach((c, i) => hidden[c.key] = i > 0 && (toggled[c.key] ?? !!c.hidden));
|
|
@@ -265,44 +271,68 @@ function DataTable(p) {
|
|
|
265
271
|
const bodyRef = React.useRef(null);
|
|
266
272
|
const rowEls = React.useRef({});
|
|
267
273
|
const snap = React.useRef(null);
|
|
268
|
-
let all = rows.map((r, i) => ({
|
|
269
|
-
r,
|
|
270
|
-
i
|
|
271
|
-
}));
|
|
272
|
-
const viewObj = p.views?.find((v) => v.id === view);
|
|
273
|
-
if (viewObj?.filter) all = all.filter((x) => viewObj.filter?.(x.r));
|
|
274
|
-
const sumAll = all;
|
|
275
274
|
const summary = p.summary;
|
|
276
|
-
if (summary && sumVal !== "all") all = all.filter((x) => String(get(x.r, summary.key)) === sumVal);
|
|
277
|
-
const baseCount = all.length;
|
|
278
275
|
const searching = search !== false && !!q;
|
|
279
|
-
const
|
|
280
|
-
|
|
276
|
+
const searchKeys = search ? search.keys : void 0;
|
|
277
|
+
const searchKeysKey = searchKeys ? searchKeys.join("") : null;
|
|
278
|
+
const passes = (r, skip) => (!searching || searchHit(r, cols, filters, q, searchKeys)) && filters.every((f) => f.key === skip || matches(f, r, values[f.key]));
|
|
279
|
+
const { all, sumAll, list } = React.useMemo(() => {
|
|
280
|
+
let all = rows.map((r, i) => ({
|
|
281
|
+
r,
|
|
282
|
+
i
|
|
283
|
+
}));
|
|
284
|
+
const viewObj = p.views?.find((v) => v.id === view);
|
|
285
|
+
if (viewObj?.filter) all = all.filter((x) => viewObj.filter?.(x.r));
|
|
286
|
+
const sumAll = all;
|
|
287
|
+
if (sumKey && sumVal !== "all") all = all.filter((x) => String(get(x.r, sumKey)) === sumVal);
|
|
288
|
+
const keys = searchKeysKey === null ? void 0 : searchKeysKey.split("");
|
|
289
|
+
const hit = (r) => (!searching || searchHit(r, cols, filters, q, keys)) && filters.every((f) => matches(f, r, values[f.key]));
|
|
290
|
+
let list = all.filter((x) => hit(x.r));
|
|
291
|
+
if (sort.length) {
|
|
292
|
+
const by = sort.map((l) => {
|
|
293
|
+
const col = cols.find((c) => c.key === l.key);
|
|
294
|
+
const val = (r) => {
|
|
295
|
+
if (col?.sortValue) return col.sortValue(r);
|
|
296
|
+
const v = get(r, l.key);
|
|
297
|
+
if (v instanceof Date || col && isDateCol(col)) return asDate(v)?.getTime() ?? -Infinity;
|
|
298
|
+
return v;
|
|
299
|
+
};
|
|
300
|
+
return {
|
|
301
|
+
val,
|
|
302
|
+
d: l.dir === "asc" ? 1 : -1
|
|
303
|
+
};
|
|
304
|
+
});
|
|
305
|
+
list = [...list].sort((a, b) => {
|
|
306
|
+
for (const { val, d } of by) {
|
|
307
|
+
const x = val(a.r);
|
|
308
|
+
const y = val(b.r);
|
|
309
|
+
const c = typeof x === "number" && typeof y === "number" ? x - y : String(x).localeCompare(String(y), "zh-Hant");
|
|
310
|
+
if (c) return c * d;
|
|
311
|
+
}
|
|
312
|
+
return a.i - b.i;
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
return {
|
|
316
|
+
all,
|
|
317
|
+
sumAll,
|
|
318
|
+
list
|
|
319
|
+
};
|
|
320
|
+
}, [
|
|
321
|
+
rows,
|
|
322
|
+
cols,
|
|
323
|
+
filters,
|
|
324
|
+
values,
|
|
325
|
+
q,
|
|
326
|
+
searching,
|
|
327
|
+
searchKeysKey,
|
|
328
|
+
sort,
|
|
329
|
+
view,
|
|
330
|
+
p.views,
|
|
331
|
+
sumKey,
|
|
332
|
+
sumVal
|
|
333
|
+
]);
|
|
334
|
+
const baseCount = all.length;
|
|
281
335
|
const activeN = filters.filter((f) => isActive(values[f.key])).length;
|
|
282
|
-
if (sort.length) {
|
|
283
|
-
const by = sort.map((l) => {
|
|
284
|
-
const col = cols.find((c) => c.key === l.key);
|
|
285
|
-
const val = (r) => {
|
|
286
|
-
if (col?.sortValue) return col.sortValue(r);
|
|
287
|
-
const v = get(r, l.key);
|
|
288
|
-
if (v instanceof Date || col && isDateCol(col)) return asDate(v)?.getTime() ?? -Infinity;
|
|
289
|
-
return v;
|
|
290
|
-
};
|
|
291
|
-
return {
|
|
292
|
-
val,
|
|
293
|
-
d: l.dir === "asc" ? 1 : -1
|
|
294
|
-
};
|
|
295
|
-
});
|
|
296
|
-
list = [...list].sort((a, b) => {
|
|
297
|
-
for (const { val, d } of by) {
|
|
298
|
-
const x = val(a.r);
|
|
299
|
-
const y = val(b.r);
|
|
300
|
-
const c = typeof x === "number" && typeof y === "number" ? x - y : String(x).localeCompare(String(y), "zh-Hant");
|
|
301
|
-
if (c) return c * d;
|
|
302
|
-
}
|
|
303
|
-
return a.i - b.i;
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
336
|
const shownKey = `${q}|${valuesKey}|${sumVal}|${view}`;
|
|
307
337
|
const firstKey = React.useRef(shownKey);
|
|
308
338
|
const shownN = list.length;
|
|
@@ -315,7 +345,11 @@ function DataTable(p) {
|
|
|
315
345
|
const pages = Math.max(1, Math.ceil(list.length / pageSize));
|
|
316
346
|
const pageNow = Math.min(page, pages - 1);
|
|
317
347
|
const start = pageNow * pageSize;
|
|
318
|
-
const vis = list.slice(start, start + pageSize)
|
|
348
|
+
const vis = React.useMemo(() => list.slice(start, start + pageSize), [
|
|
349
|
+
list,
|
|
350
|
+
start,
|
|
351
|
+
pageSize
|
|
352
|
+
]);
|
|
319
353
|
const idOf = (x) => {
|
|
320
354
|
const id = get(x.r, "id");
|
|
321
355
|
return id != null ? String(id) : String(x.i);
|
|
@@ -397,6 +431,9 @@ function DataTable(p) {
|
|
|
397
431
|
const ghost = o.node.cloneNode(true);
|
|
398
432
|
ghost.removeAttribute("data-rid");
|
|
399
433
|
ghost.setAttribute("aria-hidden", "true");
|
|
434
|
+
ghost.inert = true;
|
|
435
|
+
for (const el of ghost.querySelectorAll("a[href], button, input, select, textarea, [tabindex]")) el.tabIndex = -1;
|
|
436
|
+
for (const el of [ghost, ...ghost.querySelectorAll("[id]")]) el.removeAttribute("id");
|
|
400
437
|
ghost.classList.add("ui-dt-ghost");
|
|
401
438
|
ghost.style.top = o.top + "px";
|
|
402
439
|
ghost.style.backgroundColor = o.bg;
|
|
@@ -483,32 +520,32 @@ function DataTable(p) {
|
|
|
483
520
|
setPage(0);
|
|
484
521
|
};
|
|
485
522
|
const hasAct = !!p.rowActions;
|
|
486
|
-
const
|
|
523
|
+
const onerow = onerowState && !narrow;
|
|
487
524
|
const hasTitle = shownCols.some((c) => c.mobile === "title");
|
|
488
525
|
const mobileClass = (c, ci) => {
|
|
489
526
|
const m = c.mobile || (!hasTitle && ci === 0 ? "title" : null);
|
|
490
527
|
return m ? "is-m-" + m : null;
|
|
491
528
|
};
|
|
492
529
|
const longCols = shownCols.filter((c) => c.long || c.fullText);
|
|
493
|
-
const expander = longCols.length > 0 && !narrow;
|
|
530
|
+
const expander = longCols.length > 0 && !narrow && (clipped !== false || longCols.some((c) => c.fullText) || visIds.some((id) => opened[id]));
|
|
494
531
|
const EXP = 40;
|
|
495
532
|
const mainKey = (shownCols.find((c) => !isShort(c) && !c.long && c.grow !== 0) ?? shownCols[0])?.key;
|
|
496
533
|
const grows = (c) => c.grow != null ? c.grow > 0 : c.long || c.key === mainKey;
|
|
497
534
|
const minOf = (c) => {
|
|
498
|
-
if (grows(c)) return Math.max(c.width || (isNum(c) ? 96 : 120), fit[c.key] || 0);
|
|
499
|
-
const
|
|
500
|
-
|
|
535
|
+
if (grows(c)) return Math.max(c.width || (isNum(c) ? 96 : 120), fit[c.key] || 0, roomy ? want[c.key] || 0 : 0);
|
|
536
|
+
const text = c.width == null && !isShort(c);
|
|
537
|
+
const cap = text ? TEXT_HUG_MAX : Infinity;
|
|
538
|
+
return Math.max(c.width || 0, 48, text ? TEXT_HUG_MIN : 0, Math.min(fit[c.key] ?? c.width ?? HUG_START, cap));
|
|
501
539
|
};
|
|
502
540
|
const layout = (w) => {
|
|
503
541
|
const colW = (c) => w ? `${w[c.key] ?? minOf(c)}px` : grows(c) ? `minmax(${minOf(c)}px, ${c.grow || 1}fr)` : `${minOf(c)}px`;
|
|
504
542
|
return {
|
|
505
543
|
gridTemplateColumns: [
|
|
506
544
|
expander ? "40px" : null,
|
|
507
|
-
selectable ? "
|
|
508
|
-
...shownCols.map(colW)
|
|
509
|
-
hasAct ? actW + "px" : null
|
|
545
|
+
selectable ? "40px" : null,
|
|
546
|
+
...shownCols.map(colW)
|
|
510
547
|
].filter(Boolean).join(" "),
|
|
511
|
-
minWidth: (expander ? EXP : 0) + (selectable ?
|
|
548
|
+
minWidth: (expander ? EXP : 0) + (selectable ? SEL : 0) + shownCols.reduce((a, c) => a + (w ? w[c.key] ?? minOf(c) : minOf(c)), 0)
|
|
512
549
|
};
|
|
513
550
|
};
|
|
514
551
|
const pageGrid = layout(widths);
|
|
@@ -529,6 +566,7 @@ function DataTable(p) {
|
|
|
529
566
|
React.useLayoutEffect(() => {
|
|
530
567
|
const root = rootRef.current;
|
|
531
568
|
if (!root || narrow) return;
|
|
569
|
+
wantRef.current = {};
|
|
532
570
|
const measure = () => {
|
|
533
571
|
const need = {};
|
|
534
572
|
for (const el of root.querySelectorAll(":scope > .ui-dt-scroller .ui-dt-body .ui-dt-cell[data-col]:not(.is-long):not(.is-hug)")) {
|
|
@@ -536,22 +574,82 @@ function DataTable(p) {
|
|
|
536
574
|
const key = el.dataset.col;
|
|
537
575
|
if (over > 1 && key) need[key] = Math.max(need[key] ?? 0, Math.ceil(el.getBoundingClientRect().width + over));
|
|
538
576
|
}
|
|
577
|
+
const pad = (el) => {
|
|
578
|
+
const st = getComputedStyle(el);
|
|
579
|
+
return (parseFloat(st.paddingLeft) || 0) + (parseFloat(st.paddingRight) || 0) + (parseFloat(st.borderRightWidth) || 0);
|
|
580
|
+
};
|
|
539
581
|
const hugs = root.querySelectorAll(":scope > .ui-dt-scroller .ui-dt-cell.is-hug[data-col]");
|
|
540
|
-
|
|
582
|
+
const growCells = root.querySelectorAll(":scope > .ui-dt-scroller .ui-dt-cell.is-grow[data-col]");
|
|
583
|
+
const asks = {};
|
|
584
|
+
if (hugs.length || growCells.length) {
|
|
541
585
|
root.classList.add("is-measuring");
|
|
542
586
|
for (const el of hugs) {
|
|
543
587
|
const key = el.dataset.col;
|
|
544
588
|
const w = contentWidth(el.querySelector(":scope > .ui-dt-stack > .ui-dt-main") ?? el);
|
|
545
|
-
if (key && w !== null) need[key] = Math.max(need[key] ?? 0, Math.ceil(w +
|
|
589
|
+
if (key && w !== null) need[key] = Math.max(need[key] ?? 0, Math.ceil(w + pad(el)));
|
|
590
|
+
}
|
|
591
|
+
for (const el of growCells) {
|
|
592
|
+
const key = el.dataset.col;
|
|
593
|
+
const long = el.querySelector(".ui-dt-long-text");
|
|
594
|
+
const w = long ? long.getBoundingClientRect().width : contentWidth(el.querySelector(":scope > .ui-dt-stack > .ui-dt-main") ?? el);
|
|
595
|
+
if (!key || w === null || !w) continue;
|
|
596
|
+
const max = el.classList.contains("is-long") ? LONG_WANT_MAX : MAIN_WANT_MAX;
|
|
597
|
+
asks[key] = Math.max(asks[key] ?? 0, Math.min(max, Math.ceil(w + pad(el))));
|
|
546
598
|
}
|
|
547
599
|
root.classList.remove("is-measuring");
|
|
548
600
|
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
601
|
+
const next = {};
|
|
602
|
+
const head = root.querySelector(":scope > .ui-dt-scroller .ui-dt-head");
|
|
603
|
+
const scroll = root.querySelector(":scope > .ui-dt-scroller .ui-dt-scroll");
|
|
604
|
+
if (head && scroll && scroll.clientWidth > 0) {
|
|
605
|
+
const before = wantRef.current;
|
|
606
|
+
const more = Object.entries(asks).filter(([k, w]) => w > (before[k] ?? 0));
|
|
607
|
+
const merged = more.length ? {
|
|
608
|
+
...before,
|
|
609
|
+
...Object.fromEntries(more)
|
|
610
|
+
} : before;
|
|
611
|
+
wantRef.current = merged;
|
|
612
|
+
if (more.length) next.want = merged;
|
|
613
|
+
let used = 0;
|
|
614
|
+
for (const el of head.children) {
|
|
615
|
+
if (el.classList.contains("ui-dt-exp")) continue;
|
|
616
|
+
const key = el.dataset.col;
|
|
617
|
+
used += key && el.classList.contains("is-grow") ? Math.max(asks[key] ?? 0, merged[key] ?? 0, 48) : el.getBoundingClientRect().width;
|
|
618
|
+
}
|
|
619
|
+
next.roomy = used <= scroll.clientWidth;
|
|
620
|
+
}
|
|
621
|
+
let aw = 0;
|
|
622
|
+
for (const el of root.querySelectorAll(":scope > .ui-dt-scroller .ui-dt-body .ui-dt-acts")) if (el.childElementCount) aw = Math.max(aw, Math.ceil(el.getBoundingClientRect().width));
|
|
623
|
+
if (root.querySelector(":scope > .ui-dt-scroller .ui-dt-body .ui-dt-acts")) next.actsW = aw;
|
|
624
|
+
const tools = root.querySelector(":scope > .ui-dt-tools.has-summary");
|
|
625
|
+
if (tools && tools.clientWidth > 0) {
|
|
626
|
+
const tabs = tools.querySelector(".ui-dt-summary");
|
|
627
|
+
const actions = tools.querySelector(":scope > .ui-dt-actions");
|
|
628
|
+
let need2 = (tabs?.scrollWidth ?? 0) + (tools.querySelector(":scope > .ui-dt-search") ? 256 : TOOL_GAP);
|
|
629
|
+
const parts = actions ? [...actions.children].filter((e) => getComputedStyle(e).position !== "absolute") : [];
|
|
630
|
+
for (const e of parts) {
|
|
631
|
+
const text = e.querySelector(".ui-dt-sortbtn-text");
|
|
632
|
+
need2 += e.getBoundingClientRect().width + (text ? Math.max(0, text.scrollWidth - text.clientWidth) : 0);
|
|
633
|
+
}
|
|
634
|
+
need2 += Math.max(0, parts.length - 1) * TOOL_GAP;
|
|
635
|
+
next.onerow = need2 <= tools.clientWidth;
|
|
636
|
+
}
|
|
637
|
+
const scroller = root.querySelector(":scope > .ui-dt-scroller .ui-dt-scroll");
|
|
638
|
+
if (scroller && scroller.clientWidth > 0) next.clipped = [...root.querySelectorAll(":scope > .ui-dt-scroller .ui-dt-body .ui-dt-long")].some((el) => el.scrollWidth > el.clientWidth + 1);
|
|
639
|
+
setMeasured((m) => {
|
|
640
|
+
const grow = Object.entries(need).filter(([k, w]) => w > (m.fit[k] ?? 0));
|
|
641
|
+
if (grow.length) next.fit = {
|
|
642
|
+
...m.fit,
|
|
553
643
|
...Object.fromEntries(grow)
|
|
554
|
-
}
|
|
644
|
+
};
|
|
645
|
+
const aw2 = next.actsW;
|
|
646
|
+
const actsSame = aw2 == null || m.actsW !== null && Math.abs(m.actsW - aw2) <= 1;
|
|
647
|
+
if (!next.fit && !next.want && (next.roomy === void 0 || next.roomy === m.roomy) && actsSame && (next.onerow === void 0 || next.onerow === m.onerow) && (next.clipped === void 0 || next.clipped === m.clipped)) return m;
|
|
648
|
+
return {
|
|
649
|
+
...m,
|
|
650
|
+
...next,
|
|
651
|
+
actsW: actsSame ? m.actsW : next.actsW ?? m.actsW
|
|
652
|
+
};
|
|
555
653
|
});
|
|
556
654
|
};
|
|
557
655
|
let frame = 0;
|
|
@@ -567,18 +665,39 @@ function DataTable(p) {
|
|
|
567
665
|
const mo = new MutationObserver(later);
|
|
568
666
|
for (const el of root.querySelectorAll(":scope > .ui-dt-scroller .ui-dt-table, :scope > .ui-dt-scroller .ui-dt-body")) mo.observe(el, { childList: true });
|
|
569
667
|
document.fonts?.ready.then(later).catch(() => {});
|
|
668
|
+
let lastW = -1;
|
|
669
|
+
const ro = resizeObserver((entries) => {
|
|
670
|
+
const w = Math.round(entries[0]?.contentRect.width ?? 0);
|
|
671
|
+
if (w !== lastW && lastW >= 0) later();
|
|
672
|
+
lastW = w;
|
|
673
|
+
});
|
|
674
|
+
ro?.observe(root);
|
|
675
|
+
const probe = root.querySelector(":scope > .ui-dt-probe");
|
|
676
|
+
let probeSize = "";
|
|
677
|
+
const po = probe ? resizeObserver(() => {
|
|
678
|
+
const r = probe.getBoundingClientRect();
|
|
679
|
+
const size = `${Math.round(r.width)}x${Math.round(r.height)}`;
|
|
680
|
+
if (probeSize && size !== probeSize) later();
|
|
681
|
+
probeSize = size;
|
|
682
|
+
}) : null;
|
|
683
|
+
if (probe) po?.observe(probe);
|
|
570
684
|
return () => {
|
|
571
685
|
mo.disconnect();
|
|
686
|
+
ro?.disconnect();
|
|
687
|
+
po?.disconnect();
|
|
572
688
|
cancelAnimationFrame(frame);
|
|
573
689
|
measureRef.current = () => {};
|
|
574
690
|
};
|
|
575
691
|
}, [narrow, resetKey]);
|
|
692
|
+
React.useLayoutEffect(() => {
|
|
693
|
+
measureRef.current();
|
|
694
|
+
}, [actsW]);
|
|
576
695
|
const contentKey = `${visIds.join("")}|${shownCols.map((c) => c.key).join(",")}|${list.length}|${q}|${!!p.totals}`;
|
|
577
696
|
React.useLayoutEffect(() => {
|
|
578
697
|
measureRef.current();
|
|
579
698
|
}, [contentKey, rows]);
|
|
580
|
-
const stickyStyle = (ci) => ci === 0 && sticky ? { left: (expander ? EXP : 0) + (selectable ?
|
|
581
|
-
const cellClass = (c, ci, ...more) => cx("ui-dt-cell", isNum(c) && "is-num",
|
|
699
|
+
const stickyStyle = (ci) => ci === 0 && sticky ? { left: (expander ? EXP : 0) + (selectable ? SEL : 0) } : void 0;
|
|
700
|
+
const cellClass = (c, ci, ...more) => cx("ui-dt-cell", isNum(c) && "is-num", c.mono && "is-mono", grows(c) ? "is-grow" : "is-hug", ci === 0 && sticky && "is-sticky is-sticky-end", ci === shownCols.length - 1 && "is-lastcol", ...more);
|
|
582
701
|
const lead = (what) => sticky ? {
|
|
583
702
|
className: "is-sticky",
|
|
584
703
|
style: { left: what === "sel" && expander ? EXP : 0 }
|
|
@@ -588,44 +707,10 @@ function DataTable(p) {
|
|
|
588
707
|
};
|
|
589
708
|
const headOf = (inZoom) => {
|
|
590
709
|
const gridStyle = inZoom ? zoomGrid : pageGrid;
|
|
591
|
-
const minW = gridStyle.minWidth;
|
|
592
710
|
const w = inZoom ? zoomWidths : widths;
|
|
593
711
|
const setW = inZoom ? setZoomWidths : setWidths;
|
|
594
712
|
const root = () => inZoom ? zoomRef.current : rootRef.current;
|
|
595
|
-
return
|
|
596
|
-
className: "ui-dt-row ui-dt-head ui-dt-bulk",
|
|
597
|
-
role: "row",
|
|
598
|
-
style: { minWidth: minW },
|
|
599
|
-
children: [
|
|
600
|
-
/* @__PURE__ */ jsx("div", {
|
|
601
|
-
className: "ui-dt-cell",
|
|
602
|
-
role: "columnheader",
|
|
603
|
-
children: /* @__PURE__ */ jsx(RowCheck, {
|
|
604
|
-
v: allOn ? true : "mixed",
|
|
605
|
-
label: tr("全選"),
|
|
606
|
-
onClick: () => toggle(visIds, !allOn)
|
|
607
|
-
})
|
|
608
|
-
}),
|
|
609
|
-
/* @__PURE__ */ jsx("span", {
|
|
610
|
-
className: "ui-dt-bulk-count",
|
|
611
|
-
children: tr("已選 {n} 筆", { n: selIds.length })
|
|
612
|
-
}),
|
|
613
|
-
/* @__PURE__ */ jsx("span", {
|
|
614
|
-
className: "ui-dt-bulk-actions",
|
|
615
|
-
children: p.bulkActions(selIds, clear)
|
|
616
|
-
}),
|
|
617
|
-
/* @__PURE__ */ jsx("button", {
|
|
618
|
-
type: "button",
|
|
619
|
-
className: "ui-dt-bulk-close",
|
|
620
|
-
"aria-label": tr("取消選取"),
|
|
621
|
-
onClick: clear,
|
|
622
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
623
|
-
name: "x",
|
|
624
|
-
size: 14
|
|
625
|
-
})
|
|
626
|
-
})
|
|
627
|
-
]
|
|
628
|
-
}) : /* @__PURE__ */ jsxs("div", {
|
|
713
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
629
714
|
className: "ui-dt-row ui-dt-head",
|
|
630
715
|
role: "row",
|
|
631
716
|
style: gridStyle,
|
|
@@ -634,7 +719,10 @@ function DataTable(p) {
|
|
|
634
719
|
className: cx("ui-dt-cell ui-dt-exp", lead("exp").className),
|
|
635
720
|
style: lead("exp").style,
|
|
636
721
|
role: "columnheader",
|
|
637
|
-
|
|
722
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
723
|
+
className: "ui-visually-hidden",
|
|
724
|
+
children: tr("展開")
|
|
725
|
+
})
|
|
638
726
|
}) : null,
|
|
639
727
|
selectable ? /* @__PURE__ */ jsx("div", {
|
|
640
728
|
className: cx("ui-dt-cell ui-dt-sel", lead("sel").className),
|
|
@@ -696,12 +784,7 @@ function DataTable(p) {
|
|
|
696
784
|
onReset: () => setW(null)
|
|
697
785
|
})]
|
|
698
786
|
}, c.key);
|
|
699
|
-
})
|
|
700
|
-
hasAct ? /* @__PURE__ */ jsx("div", {
|
|
701
|
-
className: "ui-dt-cell",
|
|
702
|
-
role: "columnheader",
|
|
703
|
-
"aria-label": tr("操作")
|
|
704
|
-
}) : null
|
|
787
|
+
})
|
|
705
788
|
]
|
|
706
789
|
});
|
|
707
790
|
};
|
|
@@ -719,7 +802,11 @@ function DataTable(p) {
|
|
|
719
802
|
else if (isDateCol(c) && asDate(raw)) {
|
|
720
803
|
const d = asDate(raw);
|
|
721
804
|
const abs = absDate(r, c);
|
|
722
|
-
const t = /* @__PURE__ */ jsx(
|
|
805
|
+
const t = c.format === "relative" ? /* @__PURE__ */ jsx(RelativeTime, {
|
|
806
|
+
className: "ui-dt-time",
|
|
807
|
+
value: d,
|
|
808
|
+
children: (text) => markMatch(text, mark)
|
|
809
|
+
}) : /* @__PURE__ */ jsx("time", {
|
|
723
810
|
className: "ui-dt-time",
|
|
724
811
|
dateTime: isoOf(d, c.format === "date"),
|
|
725
812
|
children: markMatch(cellText(c, raw), mark)
|
|
@@ -744,6 +831,10 @@ function DataTable(p) {
|
|
|
744
831
|
})
|
|
745
832
|
]
|
|
746
833
|
});
|
|
834
|
+
else if (raw === null || raw === void 0 || raw === "") v = /* @__PURE__ */ jsx("span", {
|
|
835
|
+
className: "ui-dt-none",
|
|
836
|
+
children: cellText(c, raw)
|
|
837
|
+
});
|
|
747
838
|
else v = markMatch(cellText(c, raw), mark);
|
|
748
839
|
return v;
|
|
749
840
|
};
|
|
@@ -840,7 +931,7 @@ function DataTable(p) {
|
|
|
840
931
|
clearTimeout(copiedTimer.current);
|
|
841
932
|
copiedTimer.current = setTimeout(() => setCopied(false), 2e3);
|
|
842
933
|
}, () => p.onCopyError?.());
|
|
843
|
-
const slash = search !== false && p.searchShortcut !== false;
|
|
934
|
+
const slash = search !== false && p.toolbar !== false && p.searchShortcut !== false;
|
|
844
935
|
const [slashOwner, setSlashOwner] = React.useState(false);
|
|
845
936
|
React.useEffect(() => {
|
|
846
937
|
const el = rootRef.current;
|
|
@@ -892,9 +983,35 @@ function DataTable(p) {
|
|
|
892
983
|
},
|
|
893
984
|
filterButton: () => (inZoom ? zoomRef : rootRef).current?.querySelector(".ui-dt-filterbtn") ?? null
|
|
894
985
|
});
|
|
986
|
+
const summaryView = summary ? /* @__PURE__ */ jsx(Tabs, {
|
|
987
|
+
className: "ui-dt-summary",
|
|
988
|
+
label: summary.label || tr("依狀態篩選"),
|
|
989
|
+
unit: summary.unit || "筆",
|
|
990
|
+
value: sumVal,
|
|
991
|
+
onChange: (v) => {
|
|
992
|
+
capture("sort");
|
|
993
|
+
setSumVal(v);
|
|
994
|
+
setPage(0);
|
|
995
|
+
},
|
|
996
|
+
items: [{
|
|
997
|
+
id: "all",
|
|
998
|
+
label: tr("全部"),
|
|
999
|
+
count: sumAll.length
|
|
1000
|
+
}, ...summary.items.map((it) => ({
|
|
1001
|
+
id: String(it.value),
|
|
1002
|
+
label: it.label,
|
|
1003
|
+
count: sumAll.filter((x) => String(get(x.r, summary.key)) === String(it.value)).length
|
|
1004
|
+
}))],
|
|
1005
|
+
hideUnit: true
|
|
1006
|
+
}) : null;
|
|
1007
|
+
const showCount = list.length !== baseCount;
|
|
895
1008
|
const toolsView = (inZoom, inHead = false) => /* @__PURE__ */ jsxs("div", {
|
|
896
|
-
className: cx("ui-dt-tools", inHead && "is-inhead"),
|
|
1009
|
+
className: cx("ui-dt-tools", inHead && "is-inhead", summaryView && !inZoom && !inHead && "has-summary", onerow && !inZoom && !inHead && "is-onerow"),
|
|
897
1010
|
children: [
|
|
1011
|
+
summaryView && !inZoom && !inHead ? /* @__PURE__ */ jsx("div", {
|
|
1012
|
+
className: "ui-dt-sumwrap",
|
|
1013
|
+
children: summaryView
|
|
1014
|
+
}) : null,
|
|
898
1015
|
search === false && p.caption && !inZoom && !inHead ? /* @__PURE__ */ jsx("div", {
|
|
899
1016
|
className: "ui-dt-caption",
|
|
900
1017
|
children: p.caption
|
|
@@ -934,7 +1051,7 @@ function DataTable(p) {
|
|
|
934
1051
|
setPage(0);
|
|
935
1052
|
}
|
|
936
1053
|
}) : null,
|
|
937
|
-
/* @__PURE__ */ jsxs("span", {
|
|
1054
|
+
showCount ? /* @__PURE__ */ jsxs("span", {
|
|
938
1055
|
className: "ui-dt-result",
|
|
939
1056
|
children: [/* @__PURE__ */ jsx("span", {
|
|
940
1057
|
"aria-hidden": "true",
|
|
@@ -946,7 +1063,7 @@ function DataTable(p) {
|
|
|
946
1063
|
className: "ui-visually-hidden",
|
|
947
1064
|
children: format.fractionLabel(list.length, baseCount, tr("筆"))
|
|
948
1065
|
})]
|
|
949
|
-
}),
|
|
1066
|
+
}) : null,
|
|
950
1067
|
sortCols.length ? /* @__PURE__ */ jsx(SortButton, {
|
|
951
1068
|
cols: sortCols,
|
|
952
1069
|
levels: sort,
|
|
@@ -972,6 +1089,10 @@ function DataTable(p) {
|
|
|
972
1089
|
onCopy: p.copy !== false ? doCopy : void 0,
|
|
973
1090
|
onZoom: p.zoom !== false && !inZoom ? () => setZoomed(true) : void 0
|
|
974
1091
|
}),
|
|
1092
|
+
p.action && !inZoom ? /* @__PURE__ */ jsx("div", {
|
|
1093
|
+
className: "ui-dt-primary",
|
|
1094
|
+
children: p.action
|
|
1095
|
+
}) : null,
|
|
975
1096
|
copied && !narrow ? /* @__PURE__ */ jsxs("span", {
|
|
976
1097
|
className: "ui-dt-copied",
|
|
977
1098
|
"aria-hidden": "true",
|
|
@@ -984,6 +1105,31 @@ function DataTable(p) {
|
|
|
984
1105
|
})
|
|
985
1106
|
]
|
|
986
1107
|
});
|
|
1108
|
+
const bulkView = selectable && selIds.length && p.bulkActions ? /* @__PURE__ */ jsxs("div", {
|
|
1109
|
+
className: "ui-dt-bulk",
|
|
1110
|
+
role: "toolbar",
|
|
1111
|
+
"aria-label": tr("已選 {n} 筆", { n: selIds.length }),
|
|
1112
|
+
children: [
|
|
1113
|
+
/* @__PURE__ */ jsx("span", {
|
|
1114
|
+
className: "ui-dt-bulk-count",
|
|
1115
|
+
children: monoNums(tr("已選 {n} 筆", { n: "" }), [format.number(selIds.length)])
|
|
1116
|
+
}),
|
|
1117
|
+
/* @__PURE__ */ jsx("span", {
|
|
1118
|
+
className: "ui-dt-bulk-actions",
|
|
1119
|
+
children: p.bulkActions(selIds, clear)
|
|
1120
|
+
}),
|
|
1121
|
+
/* @__PURE__ */ jsx("button", {
|
|
1122
|
+
type: "button",
|
|
1123
|
+
className: "ui-dt-bulk-close",
|
|
1124
|
+
"aria-label": tr("取消選取"),
|
|
1125
|
+
onClick: clear,
|
|
1126
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
1127
|
+
name: "x",
|
|
1128
|
+
size: 16
|
|
1129
|
+
})
|
|
1130
|
+
})
|
|
1131
|
+
]
|
|
1132
|
+
}) : null;
|
|
987
1133
|
const tableView = (inZoom) => {
|
|
988
1134
|
const grid = inZoom ? zoomGrid : pageGrid;
|
|
989
1135
|
const pfx = inZoom ? uid + "z" : uid;
|
|
@@ -1016,7 +1162,7 @@ function DataTable(p) {
|
|
|
1016
1162
|
},
|
|
1017
1163
|
role: "row",
|
|
1018
1164
|
"aria-labelledby": shownCols.length ? `${pfx}-n-${start + i}` : void 0,
|
|
1019
|
-
className: cx("ui-dt-row", i % 2 && "is-even", on && "is-selected", selectable && "has-sel", expander && !p.rowHref && "has-exp", p.rowHref && "has-href"),
|
|
1165
|
+
className: cx("ui-dt-row", i % 2 && "is-even", hasAct && "has-acts", on && "is-selected", selectable && "has-sel", expander && !p.rowHref && "has-exp", p.rowHref && "has-href"),
|
|
1020
1166
|
style: grid,
|
|
1021
1167
|
onClick: expander || p.rowHref ? (e) => {
|
|
1022
1168
|
if (!rowClick(e)) return;
|
|
@@ -1066,7 +1212,7 @@ function DataTable(p) {
|
|
|
1066
1212
|
shownCols.map((c, ci) => /* @__PURE__ */ jsx("div", {
|
|
1067
1213
|
role: "cell",
|
|
1068
1214
|
id: ci === 0 ? `${pfx}-n-${start + i}` : void 0,
|
|
1069
|
-
"aria-description": [c.fullText?.(x.r), absDate(x.r, c)].filter(Boolean).join(",") || void 0,
|
|
1215
|
+
"aria-description": [c.fullText?.(x.r), absDate(x.r, c)].filter(Boolean).join(tr(",")) || void 0,
|
|
1070
1216
|
"data-label": c.label,
|
|
1071
1217
|
"data-col": c.key,
|
|
1072
1218
|
className: cellClass(c, ci, c.long && "is-long", mobileClass(c, ci)),
|
|
@@ -1087,7 +1233,7 @@ function DataTable(p) {
|
|
|
1087
1233
|
children: /* @__PURE__ */ jsx("div", {
|
|
1088
1234
|
role: "cell",
|
|
1089
1235
|
className: "ui-dt-detail-cell",
|
|
1090
|
-
style: { paddingLeft: EXP + (selectable ?
|
|
1236
|
+
style: { paddingLeft: EXP + (selectable ? SEL : 0) + 12 },
|
|
1091
1237
|
children: longCols.map((c) => /* @__PURE__ */ jsxs("div", {
|
|
1092
1238
|
className: "ui-dt-detail-item",
|
|
1093
1239
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -1100,12 +1246,17 @@ function DataTable(p) {
|
|
|
1100
1246
|
}, c.key))
|
|
1101
1247
|
})
|
|
1102
1248
|
}) : null] }, id);
|
|
1103
|
-
}) : /* @__PURE__ */
|
|
1104
|
-
className: "ui-dt-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1249
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
1250
|
+
className: "ui-dt-emptyrow",
|
|
1251
|
+
role: "row",
|
|
1252
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1253
|
+
className: "ui-dt-empty",
|
|
1254
|
+
role: "cell",
|
|
1255
|
+
children: [p.emptyText || tr("沒有符合的資料"), q || activeN ? /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, {
|
|
1256
|
+
onClick: clearFilters,
|
|
1257
|
+
children: tr("清除篩選")
|
|
1258
|
+
}) }) : null]
|
|
1259
|
+
})
|
|
1109
1260
|
})
|
|
1110
1261
|
}),
|
|
1111
1262
|
p.totals && list.length ? /* @__PURE__ */ jsxs("div", {
|
|
@@ -1114,12 +1265,12 @@ function DataTable(p) {
|
|
|
1114
1265
|
style: grid,
|
|
1115
1266
|
children: [
|
|
1116
1267
|
expander ? /* @__PURE__ */ jsx("div", {
|
|
1117
|
-
className: cx("ui-dt-cell", lead("exp").className),
|
|
1268
|
+
className: cx("ui-dt-cell ui-dt-exp", lead("exp").className),
|
|
1118
1269
|
style: lead("exp").style,
|
|
1119
1270
|
role: "cell"
|
|
1120
1271
|
}) : null,
|
|
1121
1272
|
selectable ? /* @__PURE__ */ jsx("div", {
|
|
1122
|
-
className: cx("ui-dt-cell", lead("sel").className),
|
|
1273
|
+
className: cx("ui-dt-cell ui-dt-sel", lead("sel").className),
|
|
1123
1274
|
style: lead("sel").style,
|
|
1124
1275
|
role: "cell"
|
|
1125
1276
|
}) : null,
|
|
@@ -1130,11 +1281,7 @@ function DataTable(p) {
|
|
|
1130
1281
|
"data-col": c.key,
|
|
1131
1282
|
"data-label": ci > 0 && p.totals?.[c.key] ? c.label : void 0,
|
|
1132
1283
|
children: total(c, ci)
|
|
1133
|
-
}, c.key))
|
|
1134
|
-
hasAct ? /* @__PURE__ */ jsx("div", {
|
|
1135
|
-
className: "ui-dt-cell",
|
|
1136
|
-
role: "cell"
|
|
1137
|
-
}) : null
|
|
1284
|
+
}, c.key))
|
|
1138
1285
|
]
|
|
1139
1286
|
}) : null
|
|
1140
1287
|
]
|
|
@@ -1187,7 +1334,8 @@ function DataTable(p) {
|
|
|
1187
1334
|
}) : null });
|
|
1188
1335
|
return /* @__PURE__ */ jsxs("div", {
|
|
1189
1336
|
ref: rootRef,
|
|
1190
|
-
className: cx("ui-dt", search === false && "is-nosearch", selIds.length && "has-sel", p.className),
|
|
1337
|
+
className: cx("ui-dt", search === false && "is-nosearch", selIds.length && "has-sel", hasAct && "has-acts", p.className),
|
|
1338
|
+
style: hasAct ? { "--dt-acts-w": (p.actionsWidth ?? actsW ?? 72) + "px" } : void 0,
|
|
1191
1339
|
children: [
|
|
1192
1340
|
p.caption && search !== false ? /* @__PURE__ */ jsx("div", {
|
|
1193
1341
|
className: "ui-dt-caption",
|
|
@@ -1209,42 +1357,31 @@ function DataTable(p) {
|
|
|
1209
1357
|
setView(v.id);
|
|
1210
1358
|
setPage(0);
|
|
1211
1359
|
},
|
|
1212
|
-
children: [
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
/* @__PURE__ */
|
|
1218
|
-
className: "ui-
|
|
1219
|
-
children: unitFor("筆", vn)
|
|
1220
|
-
})
|
|
1221
|
-
|
|
1222
|
-
|
|
1360
|
+
children: [
|
|
1361
|
+
v.label,
|
|
1362
|
+
" ",
|
|
1363
|
+
/* @__PURE__ */ jsxs("span", {
|
|
1364
|
+
className: "ui-dt-view-n",
|
|
1365
|
+
children: [format.number(vn), /* @__PURE__ */ jsxs("span", {
|
|
1366
|
+
className: "ui-visually-hidden",
|
|
1367
|
+
children: [" ", unitFor("筆", vn)]
|
|
1368
|
+
})]
|
|
1369
|
+
})
|
|
1370
|
+
]
|
|
1223
1371
|
}, v.id);
|
|
1224
1372
|
})
|
|
1225
1373
|
}) : null,
|
|
1226
|
-
|
|
1227
|
-
className: "ui-dt-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
setSumVal(v);
|
|
1234
|
-
setPage(0);
|
|
1235
|
-
},
|
|
1236
|
-
items: [{
|
|
1237
|
-
id: "all",
|
|
1238
|
-
label: tr("全部"),
|
|
1239
|
-
count: sumAll.length
|
|
1240
|
-
}, ...summary.items.map((it) => ({
|
|
1241
|
-
id: String(it.value),
|
|
1242
|
-
label: it.label,
|
|
1243
|
-
count: sumAll.filter((x) => String(get(x.r, summary.key)) === String(it.value)).length
|
|
1244
|
-
}))]
|
|
1374
|
+
/* @__PURE__ */ jsx("span", {
|
|
1375
|
+
className: "ui-dt-probe",
|
|
1376
|
+
"aria-hidden": "true"
|
|
1377
|
+
}),
|
|
1378
|
+
summaryView && (headSlot || p.toolbar === false) ? /* @__PURE__ */ jsx("div", {
|
|
1379
|
+
className: "ui-dt-top",
|
|
1380
|
+
children: summaryView
|
|
1245
1381
|
}) : null,
|
|
1246
|
-
headSlot ? createPortal(toolsView(false, true), headSlot) : toolsView(false),
|
|
1382
|
+
p.toolbar === false ? null : headSlot ? createPortal(toolsView(false, true), headSlot) : toolsView(false),
|
|
1247
1383
|
chipsView(false),
|
|
1384
|
+
bulkView,
|
|
1248
1385
|
tableView(false),
|
|
1249
1386
|
/* @__PURE__ */ jsx(ScrollHint, {
|
|
1250
1387
|
show: overflows,
|
|
@@ -1259,8 +1396,9 @@ function DataTable(p) {
|
|
|
1259
1396
|
ref: zoomRef,
|
|
1260
1397
|
className: "ui-dt ui-dt-zoomed",
|
|
1261
1398
|
children: [
|
|
1262
|
-
toolsView(true),
|
|
1399
|
+
p.toolbar === false ? null : toolsView(true),
|
|
1263
1400
|
chipsView(true),
|
|
1401
|
+
bulkView,
|
|
1264
1402
|
tableView(true),
|
|
1265
1403
|
footView
|
|
1266
1404
|
]
|