@seanyeh77/ui 0.44.0 → 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 +5 -2
- package/dist/components/Alert/Alert.js +17 -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 +2 -1
- package/dist/components/DangerZone/DangerZone.js +1 -1
- package/dist/components/DangerZone/DangerZone.js.map +1 -1
- package/dist/components/DataTable/DataTable.d.ts +8 -1
- package/dist/components/DataTable/DataTable.js +213 -167
- 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 +7 -5
- 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 +45 -14
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +17 -5
- package/dist/components/Drawer/Drawer.js +86 -24
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/ErrorPage/ErrorPage.d.ts +3 -0
- package/dist/components/ErrorPage/ErrorPage.js.map +1 -1
- package/dist/components/EventTimeline/EventTimeline.d.ts +22 -4
- package/dist/components/EventTimeline/EventTimeline.js +63 -20
- package/dist/components/EventTimeline/EventTimeline.js.map +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts +9 -1
- package/dist/components/FileUpload/FileUpload.js +3 -1
- 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.map +1 -1
- package/dist/components/KpiCard/KpiCard.d.ts +5 -1
- package/dist/components/KpiCard/KpiCard.js +35 -21
- package/dist/components/KpiCard/KpiCard.js.map +1 -1
- package/dist/components/LayerGraph/LayerGraph.d.ts +68 -23
- package/dist/components/LayerGraph/LayerGraph.js +159 -88
- 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 +1 -1
- 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 +3 -0
- package/dist/components/NotificationBell/NotificationBell.js +2 -2
- 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 +32 -3
- package/dist/components/SettingsLayout/SettingsLayout.js +60 -13
- 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 +4 -0
- package/dist/components/Tabs/Tabs.js +1 -1
- 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 -10
- package/dist/components/TextArea/TextArea.js +22 -10
- 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 +55 -2
- package/dist/components/Toast/Toast.js +190 -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 +7 -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 +5 -1
- package/dist/css/Card.css +8 -8
- package/dist/css/Checkbox.css +19 -0
- package/dist/css/CodeView.css +2 -1
- package/dist/css/DangerZone.css +4 -3
- package/dist/css/DataTable.css +129 -34
- package/dist/css/DateRangePicker.css +23 -2
- package/dist/css/Drawer.css +30 -0
- package/dist/css/ErrorPage.css +3 -1
- package/dist/css/EventTimeline.css +33 -5
- 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 +12 -1
- package/dist/css/LayerGraph.css +40 -15
- package/dist/css/Link.css +23 -0
- package/dist/css/LoginCard.css +16 -11
- package/dist/css/Markdown.css +2 -1
- package/dist/css/Menu.css +0 -2
- package/dist/css/Meter.css +16 -0
- package/dist/css/PageHeader.css +50 -0
- package/dist/css/ProgressBar.css +12 -0
- package/dist/css/ProjectSwitcher.css +23 -26
- package/dist/css/RelativeTime.css +2 -0
- package/dist/css/SegmentedControl.css +38 -10
- package/dist/css/SettingsLayout.css +28 -8
- package/dist/css/SideNav.css +4 -1
- package/dist/css/Skeleton.css +22 -1
- package/dist/css/Switch.css +27 -0
- package/dist/css/Tabs.css +2 -1
- package/dist/css/Tag.css +19 -12
- package/dist/css/Toast.css +100 -4
- package/dist/css/TopBar.css +21 -2
- package/dist/css/TreeList.css +6 -3
- package/dist/css/Workbench.css +1 -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 +12 -4
- 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 +10 -4
- 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/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 +944 -231
- 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 -4
- 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 +8 -7
- 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 -3
- package/docs/DataColors.md +2 -2
- package/docs/DataTable.md +26 -148
- package/docs/DatePicker.md +1 -1
- package/docs/DateRangePicker.md +3 -0
- package/docs/DetailList.md +9 -9
- package/docs/Dialog.md +8 -5
- package/docs/Drawer.md +7 -5
- package/docs/EmptyState.md +0 -1
- package/docs/ErrorPage.md +1 -2
- package/docs/EventTimeline.md +23 -13
- package/docs/FileUpload.md +1 -2
- package/docs/FormGrid.md +2 -1
- package/docs/Format.md +4 -2
- package/docs/Graph.md +1 -1
- package/docs/Grid.md +5 -1
- package/docs/KpiCard.md +6 -5
- package/docs/LayerGraph.md +18 -53
- package/docs/LineChart.md +5 -3
- package/docs/Link.md +22 -0
- package/docs/LoginCard.md +7 -4
- package/docs/Markdown.md +2 -15
- package/docs/Menu.md +2 -0
- package/docs/Meter.md +1 -0
- package/docs/MultiSelect.md +2 -2
- package/docs/NotificationBell.md +1 -1
- 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 -2
- package/docs/SettingsLayout.md +19 -5
- package/docs/SideNav.md +1 -1
- package/docs/Skeleton.md +2 -1
- package/docs/Switch.md +3 -1
- package/docs/Tabs.md +2 -1
- package/docs/Tag.md +9 -7
- package/docs/Term.md +3 -4
- package/docs/TextArea.md +2 -2
- package/docs/TextField.md +5 -4
- package/docs/ThemePicker.md +3 -1
- package/docs/Toast.md +17 -6
- 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 -19
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Graph.js","names":[],"sources":["../../../src/components/Graph/Graph.tsx"],"sourcesContent":["import { Term } from '../Term/Term';\nimport { tr } from '../../i18n';\nimport { cx } from '../../internal/util';\n\n/** <defs> with the arrowheads #ui-arrow and #ui-arrow-accent; put it first inside your diagram's <svg>. */\nexport function GraphDefs() {\n const marker = (id: string, accent: boolean) => (\n <marker id={id} viewBox=\"0 0 10 10\" refX={9} refY={5} markerWidth={7} markerHeight={7} orient=\"auto-start-reverse\">\n <path d=\"M0 0L10 5L0 10z\" className={cx('ui-graph-arrow', accent && 'is-accent')} />\n </marker>\n );\n return (\n <defs>\n {marker('ui-arrow', false)}\n {marker('ui-arrow-accent', true)}\n </defs>\n );\n}\n\nexport interface GraphLegendItem {\n /** edge: a confirmed line; inferred: a dashed line; declared: long-short dashes (declared by the project); external: a\n * dashed box; node: a plain box; weight: thin and thick lines. */\n type: 'edge' | 'inferred' | 'declared' | 'external' | 'node' | 'weight';\n /** Your own words for it: 「呼叫」「推測的呼叫」「外部函式」. */\n label: string;\n /** Adds a Term with this explanation. */\n text?: string;\n}\n\nconst LEGEND_DEFAULT: GraphLegendItem[] = [\n { type: 'edge', label: '確定的關係' },\n { type: 'inferred', label: '推測的關係' },\n { type: 'external', label: '外部項目' },\n];\n\nexport interface GraphLegendProps {\n /** Default: 確定的關係, 推測的關係, 外部項目. Pass your domain's words. */\n items?: GraphLegendItem[];\n className?: string;\n}\n\nfunction Swatch({ type }: { type: GraphLegendItem['type'] }) {\n if (type === 'weight')\n return (\n <span className=\"ui-graph-legend-sw\">\n {[1.5, 6].map((w) => (\n <svg key={w} width={22} height={8} aria-hidden=\"true\">\n <line x1={0} y1={4} x2={22} y2={4} className=\"ui-graph-edge\" style={{ strokeWidth: w }} />\n </svg>\n ))}\n </span>\n );\n if (type === 'external' || type === 'node')\n return (\n <svg width={22} height={14} aria-hidden=\"true\">\n <rect x={1} y={1} width={20} height={12} rx={4} className={cx('ui-graph-node', type === 'external' && 'is-external')} />\n </svg>\n );\n return (\n <svg width={28} height={8} aria-hidden=\"true\">\n <line x1={0} y1={4} x2={28} y2={4} className={cx('ui-graph-edge', type === 'inferred' && 'is-inferred', type === 'declared' && 'is-declared')} />\n </svg>\n );\n}\n\n/** The legend row under a diagram: what each line and box style means. */\nexport function GraphLegend({ items
|
|
1
|
+
{"version":3,"file":"Graph.js","names":[],"sources":["../../../src/components/Graph/Graph.tsx"],"sourcesContent":["import { Term } from '../Term/Term';\nimport { tr } from '../../i18n';\nimport { cx } from '../../internal/util';\n\n/** <defs> with the arrowheads #ui-arrow and #ui-arrow-accent; put it first inside your diagram's <svg>. */\nexport function GraphDefs() {\n const marker = (id: string, accent: boolean) => (\n <marker id={id} viewBox=\"0 0 10 10\" refX={9} refY={5} markerWidth={7} markerHeight={7} orient=\"auto-start-reverse\">\n <path d=\"M0 0L10 5L0 10z\" className={cx('ui-graph-arrow', accent && 'is-accent')} />\n </marker>\n );\n return (\n <defs>\n {marker('ui-arrow', false)}\n {marker('ui-arrow-accent', true)}\n </defs>\n );\n}\n\nexport interface GraphLegendItem {\n /** edge: a confirmed line; inferred: a dashed line; declared: long-short dashes (declared by the project); external: a\n * dashed box; node: a plain box; weight: thin and thick lines. */\n type: 'edge' | 'inferred' | 'declared' | 'external' | 'node' | 'weight';\n /** Your own words for it: 「呼叫」「推測的呼叫」「外部函式」. */\n label: string;\n /** Adds a Term with this explanation. */\n text?: string;\n}\n\nconst LEGEND_DEFAULT: GraphLegendItem[] = [\n { type: 'edge', label: '確定的關係' },\n { type: 'inferred', label: '推測的關係' },\n { type: 'external', label: '外部項目' },\n];\n\nexport interface GraphLegendProps {\n /** Default: 確定的關係, 推測的關係, 外部項目. Pass your domain's words. */\n items?: GraphLegendItem[];\n /** Extra class on the root element. */\n className?: string;\n}\n\nfunction Swatch({ type }: { type: GraphLegendItem['type'] }) {\n if (type === 'weight')\n return (\n <span className=\"ui-graph-legend-sw\">\n {[1.5, 6].map((w) => (\n <svg key={w} width={22} height={8} aria-hidden=\"true\">\n <line x1={0} y1={4} x2={22} y2={4} className=\"ui-graph-edge\" style={{ strokeWidth: w }} />\n </svg>\n ))}\n </span>\n );\n if (type === 'external' || type === 'node')\n return (\n <svg width={22} height={14} aria-hidden=\"true\">\n <rect x={1} y={1} width={20} height={12} rx={4} className={cx('ui-graph-node', type === 'external' && 'is-external')} />\n </svg>\n );\n return (\n <svg width={28} height={8} aria-hidden=\"true\">\n <line x1={0} y1={4} x2={28} y2={4} className={cx('ui-graph-edge', type === 'inferred' && 'is-inferred', type === 'declared' && 'is-declared')} />\n </svg>\n );\n}\n\n/** The legend row under a diagram: what each line and box style means. */\nexport function GraphLegend({ items, className }: GraphLegendProps) {\n // Only the built-in labels are translated; your own are shown as written.\n const shown = items ?? LEGEND_DEFAULT.map((it) => ({ ...it, label: tr(it.label) }));\n return (\n <div className={cx('ui-graph-legend', className)}>\n {shown.map((it, i) => (\n <span key={i} className=\"ui-graph-legend-item\">\n <Swatch type={it.type} />\n {it.text ? (\n <Term title={it.label} text={it.text}>\n {it.label}\n </Term>\n ) : (\n it.label\n )}\n </span>\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAKA,SAAgB,YAAY;CAC1B,MAAM,UAAU,IAAY,WAC1B,oBAAC,UAAD;EAAY;EAAI,SAAQ;EAAY,MAAM;EAAG,MAAM;EAAG,aAAa;EAAG,cAAc;EAAG,QAAO;EAC5F,UAAA,oBAAC,QAAD;GAAM,GAAE;GAAkB,WAAW,GAAG,kBAAkB,UAAU,WAAW;EAAI,CAAA;CAC7E,CAAA;CAEV,OACE,qBAAC,QAAD,EAAA,UAAA,CACG,OAAO,YAAY,KAAK,GACxB,OAAO,mBAAmB,IAAI,CAC3B,EAAA,CAAA;AAEV;AAYA,MAAM,iBAAoC;CACxC;EAAE,MAAM;EAAQ,OAAO;CAAQ;CAC/B;EAAE,MAAM;EAAY,OAAO;CAAQ;CACnC;EAAE,MAAM;EAAY,OAAO;CAAO;AACpC;AASA,SAAS,OAAO,EAAE,QAA2C;CAC3D,IAAI,SAAS,UACX,OACE,oBAAC,QAAD;EAAM,WAAU;EACb,UAAA,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,MACb,oBAAC,OAAD;GAAa,OAAO;GAAI,QAAQ;GAAG,eAAY;GAC7C,UAAA,oBAAC,QAAD;IAAM,IAAI;IAAG,IAAI;IAAG,IAAI;IAAI,IAAI;IAAG,WAAU;IAAgB,OAAO,EAAE,aAAa,EAAE;GAAI,CAAA;EACtF,GAFK,CAEL,CACN;CACG,CAAA;CAEV,IAAI,SAAS,cAAc,SAAS,QAClC,OACE,oBAAC,OAAD;EAAK,OAAO;EAAI,QAAQ;EAAI,eAAY;EACtC,UAAA,oBAAC,QAAD;GAAM,GAAG;GAAG,GAAG;GAAG,OAAO;GAAI,QAAQ;GAAI,IAAI;GAAG,WAAW,GAAG,iBAAiB,SAAS,cAAc,aAAa;EAAI,CAAA;CACpH,CAAA;CAET,OACE,oBAAC,OAAD;EAAK,OAAO;EAAI,QAAQ;EAAG,eAAY;EACrC,UAAA,oBAAC,QAAD;GAAM,IAAI;GAAG,IAAI;GAAG,IAAI;GAAI,IAAI;GAAG,WAAW,GAAG,iBAAiB,SAAS,cAAc,eAAe,SAAS,cAAc,aAAa;EAAI,CAAA;CAC7I,CAAA;AAET;;AAGA,SAAgB,YAAY,EAAE,OAAO,aAA+B;CAElE,MAAM,QAAQ,SAAS,eAAe,KAAK,QAAQ;EAAE,GAAG;EAAI,OAAO,GAAG,GAAG,KAAK;CAAE,EAAE;CAClF,OACE,oBAAC,OAAD;EAAK,WAAW,GAAG,mBAAmB,SAAS;EAC5C,UAAA,MAAM,KAAK,IAAI,MACd,qBAAC,QAAD;GAAc,WAAU;GAAxB,UAAA,CACE,oBAAC,QAAD,EAAQ,MAAM,GAAG,KAAO,CAAA,GACvB,GAAG,OACF,oBAAC,MAAD;IAAM,OAAO,GAAG;IAAO,MAAM,GAAG;IAC7B,UAAA,GAAG;GACA,CAAA,IAEN,GAAG,KAED;EATK,GAAA,CASL,CACP;CACE,CAAA;AAET"}
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
/** Widths of unequal columns as parts of the row: [2, 1] is a main column twice as wide as its aside. */
|
|
3
|
+
export type GridRatio = readonly [number, number] | readonly [number, number, number];
|
|
2
4
|
export interface GridProps {
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
columns?: 1 | 2 | 3 | 4 | 6;
|
|
5
|
+
/** Equal columns from 1280 px (960–1279 px: 4 becomes 2, 6 becomes 3; 600–959 px: 2; under 600 px: 1), or a ratio
|
|
6
|
+
* such as [2, 1] for a main column and an aside (one column under 960 px). Default 3. */
|
|
7
|
+
columns?: 1 | 2 | 3 | 4 | 6 | GridRatio;
|
|
8
|
+
/** The cards, one per cell. */
|
|
6
9
|
children: React.ReactNode;
|
|
10
|
+
/** Extra class on the root element. */
|
|
7
11
|
className?: string;
|
|
8
12
|
}
|
|
9
|
-
/**
|
|
13
|
+
/** Columns for Cards and KpiCards, 24 px apart: equal, or a ratio such as [2, 1] for main and aside. Use it instead of
|
|
14
|
+
* writing your own CSS grid. */
|
|
10
15
|
export declare function Grid({ columns, children, className }: GridProps): React.JSX.Element;
|
|
11
16
|
export interface PageProps {
|
|
17
|
+
/** The blocks of the page, top to bottom: Grid, Card, Section. */
|
|
12
18
|
children: React.ReactNode;
|
|
19
|
+
/** Extra class on the root element. */
|
|
13
20
|
className?: string;
|
|
14
21
|
}
|
|
15
22
|
/** The content of a page: sections and Grids stacked 32 px apart. */
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cx } from "../../internal/util.js";
|
|
3
|
+
import { devWarn } from "../../internal/dev.js";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
// src/components/Grid/Grid.tsx
|
|
5
|
-
/**
|
|
6
|
+
/** Columns for Cards and KpiCards, 24 px apart: equal, or a ratio such as [2, 1] for main and aside. Use it instead of
|
|
7
|
+
* writing your own CSS grid. */
|
|
6
8
|
function Grid({ columns = 3, children, className }) {
|
|
9
|
+
if (Array.isArray(columns)) {
|
|
10
|
+
const ratio = columns;
|
|
11
|
+
devWarn(ratio.some((n) => !(n > 0)), "Grid", `columns=[${ratio.join(", ")}] has a part that is not a positive number. Give each column's share, e.g. [2, 1].`);
|
|
12
|
+
const template = ratio.map((n) => `minmax(0, ${n > 0 ? n : 1}fr)`).join(" ");
|
|
13
|
+
return /* @__PURE__ */ jsx("div", {
|
|
14
|
+
className: cx("ui-grid", "is-ratio", className),
|
|
15
|
+
style: { "--grid-ratio": template },
|
|
16
|
+
children
|
|
17
|
+
});
|
|
18
|
+
}
|
|
7
19
|
return /* @__PURE__ */ jsx("div", {
|
|
8
|
-
className: cx("ui-grid", "is-" + columns, className),
|
|
20
|
+
className: cx("ui-grid", "is-" + String(columns), className),
|
|
9
21
|
children
|
|
10
22
|
});
|
|
11
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.js","names":[],"sources":["../../../src/components/Grid/Grid.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { cx } from '../../internal/util';\n\nexport interface GridProps {\n /**
|
|
1
|
+
{"version":3,"file":"Grid.js","names":[],"sources":["../../../src/components/Grid/Grid.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { cx } from '../../internal/util';\nimport { devWarn } from '../../internal/dev';\n\n/** Widths of unequal columns as parts of the row: [2, 1] is a main column twice as wide as its aside. */\nexport type GridRatio = readonly [number, number] | readonly [number, number, number];\n\nexport interface GridProps {\n /** Equal columns from 1280 px (960–1279 px: 4 becomes 2, 6 becomes 3; 600–959 px: 2; under 600 px: 1), or a ratio\n * such as [2, 1] for a main column and an aside (one column under 960 px). Default 3. */\n columns?: 1 | 2 | 3 | 4 | 6 | GridRatio;\n /** The cards, one per cell. */\n children: React.ReactNode;\n /** Extra class on the root element. */\n className?: string;\n}\n\n/** Columns for Cards and KpiCards, 24 px apart: equal, or a ratio such as [2, 1] for main and aside. Use it instead of\n * writing your own CSS grid. */\nexport function Grid({ columns = 3, children, className }: GridProps) {\n if (Array.isArray(columns)) {\n const ratio = columns as GridRatio;\n devWarn(\n ratio.some((n) => !(n > 0)),\n 'Grid',\n `columns=[${ratio.join(', ')}] has a part that is not a positive number. Give each column's share, e.g. [2, 1].`,\n );\n const template = ratio.map((n) => `minmax(0, ${n > 0 ? n : 1}fr)`).join(' ');\n return (\n <div className={cx('ui-grid', 'is-ratio', className)} style={{ '--grid-ratio': template } as React.CSSProperties}>\n {children}\n </div>\n );\n }\n return <div className={cx('ui-grid', 'is-' + String(columns), className)}>{children}</div>;\n}\n\nexport interface PageProps {\n /** The blocks of the page, top to bottom: Grid, Card, Section. */\n children: React.ReactNode;\n /** Extra class on the root element. */\n className?: string;\n}\n\n/** The content of a page: sections and Grids stacked 32 px apart. */\nexport function Page({ children, className }: PageProps) {\n return <div className={cx('ui-page', className)}>{children}</div>;\n}\n"],"mappings":";;;;;;;AAmBA,SAAgB,KAAK,EAAE,UAAU,GAAG,UAAU,aAAwB;CACpE,IAAI,MAAM,QAAQ,OAAO,GAAG;EAC1B,MAAM,QAAQ;EACd,QACE,MAAM,MAAM,MAAM,EAAE,IAAI,EAAE,GAC1B,QACA,YAAY,MAAM,KAAK,IAAI,EAAE,mFAC/B;EACA,MAAM,WAAW,MAAM,KAAK,MAAM,aAAa,IAAI,IAAI,IAAI,EAAE,IAAI,CAAC,CAAC,KAAK,GAAG;EAC3E,OACE,oBAAC,OAAD;GAAK,WAAW,GAAG,WAAW,YAAY,SAAS;GAAG,OAAO,EAAE,gBAAgB,SAAS;GACrF;EACE,CAAA;CAET;CACA,OAAO,oBAAC,OAAD;EAAK,WAAW,GAAG,WAAW,QAAQ,OAAO,OAAO,GAAG,SAAS;EAAI;CAAc,CAAA;AAC3F;;AAUA,SAAgB,KAAK,EAAE,UAAU,aAAwB;CACvD,OAAO,oBAAC,OAAD;EAAK,WAAW,GAAG,WAAW,SAAS;EAAI;CAAc,CAAA;AAClE"}
|
|
@@ -26,7 +26,8 @@ export interface IconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLBut
|
|
|
26
26
|
/** A first-use hint: a dot on the button and a bubble below it until the user acts on it or closes it. Pass
|
|
27
27
|
* undefined once it was handled (useTour's tour.hint() does this). */
|
|
28
28
|
hint?: IconButtonHint;
|
|
29
|
+
/** The underlying <button>. */
|
|
29
30
|
ref?: React.Ref<HTMLButtonElement>;
|
|
30
31
|
}
|
|
31
32
|
/** A square icon-only button with a tooltip. */
|
|
32
|
-
export declare function IconButton({ label, icon, className, tooltip, filled, hint, variant, ...native }: IconButtonProps): React.JSX.Element;
|
|
33
|
+
export declare function IconButton({ label, icon, className, tooltip, filled, hint, variant, ref, ...native }: IconButtonProps): React.JSX.Element;
|
|
@@ -4,17 +4,26 @@ import { Icon, IconOf } from "../../icons/Icon.js";
|
|
|
4
4
|
import { cx } from "../../internal/util.js";
|
|
5
5
|
import { tr } from "../../i18n.js";
|
|
6
6
|
import { includeIcons } from "../../icons/store.js";
|
|
7
|
+
import { useDisabledFocusRescue } from "../../internal/focus.js";
|
|
7
8
|
import x_default from "../../icons/ph/x.js";
|
|
8
9
|
import * as React from "react";
|
|
9
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
// src/components/IconButton/IconButton.tsx
|
|
11
12
|
includeIcons(x_default);
|
|
12
13
|
/** A square icon-only button with a tooltip. */
|
|
13
|
-
function IconButton({ label, icon, className, tooltip = true, filled, hint, variant, ...native }) {
|
|
14
|
+
function IconButton({ label, icon, className, tooltip = true, filled, hint, variant, ref, ...native }) {
|
|
14
15
|
const id = React.useId();
|
|
16
|
+
const own = React.useRef(null);
|
|
17
|
+
useDisabledFocusRescue(own, native.disabled);
|
|
18
|
+
const setRef = React.useCallback((el) => {
|
|
19
|
+
own.current = el;
|
|
20
|
+
if (typeof ref === "function") ref(el);
|
|
21
|
+
else if (ref) ref.current = el;
|
|
22
|
+
}, [ref]);
|
|
15
23
|
const btn = /* @__PURE__ */ jsxs("button", {
|
|
16
24
|
type: "button",
|
|
17
25
|
...native,
|
|
26
|
+
ref: setRef,
|
|
18
27
|
className: cx("ui-iconbtn", variant === "quiet" && "is-quiet", hint && "has-hint", className),
|
|
19
28
|
"aria-label": label,
|
|
20
29
|
"aria-describedby": hint ? id : native["aria-describedby"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","names":["phX"],"sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Tooltip } from '../Tooltip/Tooltip';\nimport { Icon, IconOf, type IconSource } from '../../icons/Icon';\nimport { cx } from '../../internal/util';\nimport { tr } from '../../i18n';\nimport { includeIcons } from '../../icons/store';\nimport phX from '../../icons/ph/x';\n\nincludeIcons(phX);\n\n/** A first-use hint on an icon button: an accent dot on the button and a dark bubble below it. */\nexport interface IconButtonHint {\n /** One short sentence: 「導覽:五個步驟介紹各頁。」. */\n text: string;\n /** The verb on the bubble's button. Default 「開始」. */\n action?: string;\n /** The bubble's button: do the thing the hint is about (start the tour). */\n onAction: () => void;\n /** The bubble's ×: hide the hint for good. */\n onDismiss: () => void;\n}\n\nexport interface IconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {\n /** What the button does, a verb: 「刪除」「複製連結」. Becomes aria-label and the tooltip. */\n label: string;\n /** A built-in name such as 'trash', or custom path data. */\n icon: IconSource;\n /** false: no tooltip (when the label is already visible next to it). Default true. */\n tooltip?: boolean;\n /** The Fill version of a built-in icon, for a pressed or selected button. */\n filled?: boolean;\n /** 'outline' (default): 40 px with a border. 'quiet': 32 px, no border, a background only on hover; for top bars and\n * tab bars where several sit in a row. On touch screens both keep a 48 px touch area. */\n variant?: 'outline' | 'quiet';\n /** A first-use hint: a dot on the button and a bubble below it until the user acts on it or closes it. Pass\n * undefined once it was handled (useTour's tour.hint() does this). */\n hint?: IconButtonHint;\n ref?: React.Ref<HTMLButtonElement>;\n}\n\n/** A square icon-only button with a tooltip. */\nexport function IconButton({ label, icon, className, tooltip = true, filled, hint, variant, ...native }: IconButtonProps) {\n const id = React.useId();\n const btn = (\n <button\n type=\"button\"\n {...native}\n className={cx('ui-iconbtn', variant === 'quiet' && 'is-quiet', hint && 'has-hint', className)}\n aria-label={label}\n aria-describedby={hint ? id : native['aria-describedby']}\n >\n <IconOf icon={icon} filled={filled} />\n {hint && <span className=\"ui-iconbtn-dot\" aria-hidden=\"true\" />}\n </button>\n );\n const button = tooltip ? (\n <Tooltip label={label} describe={false}>\n {btn}\n </Tooltip>\n ) : (\n btn\n );\n if (!hint) return button;\n return (\n <span className=\"ui-iconbtn-hintbox\">\n {button}\n <HintBubble id={id} hint={hint} />\n </span>\n );\n}\n\n/** The bubble sits left of the button, in its row (H3), narrowing (the text wraps) to the room there. With less than\n * 180 px on the left it goes below the button, right-aligned with it but kept 16 px inside the screen, its arrow\n * still on the button. */\nfunction HintBubble({ id, hint }: { id: string; hint: IconButtonHint }) {\n const ref = React.useRef<HTMLSpanElement>(null);\n const [place, setPlace] = React.useState<{ room: number; left?: number; arrow?: number } | null>(null);\n React.useLayoutEffect(() => {\n const el = ref.current;\n if (!el) return;\n const check = () => {\n const box = el.parentElement?.getBoundingClientRect();\n if (!box) return;\n const room = Math.floor(box.left - 12 - 8);\n if (room >= 180) return setPlace({ room });\n const w = Math.min(320, window.innerWidth - 32);\n const want = box.left + box.width - w;\n const at = Math.max(16, Math.min(want, window.innerWidth - 16 - w));\n setPlace({ room, left: Math.round(at - box.left), arrow: Math.round(box.left + box.width / 2 - at - 6) });\n };\n check();\n window.addEventListener('resize', check);\n return () => window.removeEventListener('resize', check);\n }, []);\n const below = place != null && place.room < 180;\n return (\n <span\n ref={ref}\n className={cx('ui-hint', below && 'is-below')}\n id={id}\n role=\"status\"\n style={\n place == null\n ? undefined\n : below\n ? ({ left: place.left, right: 'auto', '--hint-arrow': place.arrow + 'px' } as React.CSSProperties)\n : { maxWidth: Math.min(320, place.room) }\n }\n >\n <span className=\"ui-hint-text\">{hint.text}</span>\n <button type=\"button\" className=\"ui-hint-go\" onClick={hint.onAction}>\n {hint.action ?? tr('開始')}\n </button>\n <button type=\"button\" className=\"ui-hint-x\" aria-label={tr('關閉提示')} onClick={hint.onDismiss}>\n <Icon name=\"x\" size={16} />\n </button>\n </span>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"IconButton.js","names":["phX"],"sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Tooltip } from '../Tooltip/Tooltip';\nimport { Icon, IconOf, type IconSource } from '../../icons/Icon';\nimport { cx } from '../../internal/util';\nimport { tr } from '../../i18n';\nimport { includeIcons } from '../../icons/store';\nimport { useDisabledFocusRescue } from '../../internal/focus';\nimport phX from '../../icons/ph/x';\n\nincludeIcons(phX);\n\n/** A first-use hint on an icon button: an accent dot on the button and a dark bubble below it. */\nexport interface IconButtonHint {\n /** One short sentence: 「導覽:五個步驟介紹各頁。」. */\n text: string;\n /** The verb on the bubble's button. Default 「開始」. */\n action?: string;\n /** The bubble's button: do the thing the hint is about (start the tour). */\n onAction: () => void;\n /** The bubble's ×: hide the hint for good. */\n onDismiss: () => void;\n}\n\nexport interface IconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {\n /** What the button does, a verb: 「刪除」「複製連結」. Becomes aria-label and the tooltip. */\n label: string;\n /** A built-in name such as 'trash', or custom path data. */\n icon: IconSource;\n /** false: no tooltip (when the label is already visible next to it). Default true. */\n tooltip?: boolean;\n /** The Fill version of a built-in icon, for a pressed or selected button. */\n filled?: boolean;\n /** 'outline' (default): 40 px with a border. 'quiet': 32 px, no border, a background only on hover; for top bars and\n * tab bars where several sit in a row. On touch screens both keep a 48 px touch area. */\n variant?: 'outline' | 'quiet';\n /** A first-use hint: a dot on the button and a bubble below it until the user acts on it or closes it. Pass\n * undefined once it was handled (useTour's tour.hint() does this). */\n hint?: IconButtonHint;\n /** The underlying <button>. */\n ref?: React.Ref<HTMLButtonElement>;\n}\n\n/** A square icon-only button with a tooltip. */\nexport function IconButton({ label, icon, className, tooltip = true, filled, hint, variant, ref, ...native }: IconButtonProps) {\n const id = React.useId();\n const own = React.useRef<HTMLButtonElement | null>(null);\n // Disabled while it has focus: focus goes to the control before it, not to the page.\n useDisabledFocusRescue(own, native.disabled);\n const setRef = React.useCallback(\n (el: HTMLButtonElement | null) => {\n own.current = el;\n if (typeof ref === 'function') ref(el);\n else if (ref) (ref as React.RefObject<HTMLButtonElement | null>).current = el;\n },\n [ref],\n );\n const btn = (\n <button\n type=\"button\"\n {...native}\n ref={setRef}\n className={cx('ui-iconbtn', variant === 'quiet' && 'is-quiet', hint && 'has-hint', className)}\n aria-label={label}\n aria-describedby={hint ? id : native['aria-describedby']}\n >\n <IconOf icon={icon} filled={filled} />\n {hint && <span className=\"ui-iconbtn-dot\" aria-hidden=\"true\" />}\n </button>\n );\n const button = tooltip ? (\n <Tooltip label={label} describe={false}>\n {btn}\n </Tooltip>\n ) : (\n btn\n );\n if (!hint) return button;\n return (\n <span className=\"ui-iconbtn-hintbox\">\n {button}\n <HintBubble id={id} hint={hint} />\n </span>\n );\n}\n\n/** The bubble sits left of the button, in its row (H3), narrowing (the text wraps) to the room there. With less than\n * 180 px on the left it goes below the button, right-aligned with it but kept 16 px inside the screen, its arrow\n * still on the button. */\nfunction HintBubble({ id, hint }: { id: string; hint: IconButtonHint }) {\n const ref = React.useRef<HTMLSpanElement>(null);\n const [place, setPlace] = React.useState<{ room: number; left?: number; arrow?: number } | null>(null);\n React.useLayoutEffect(() => {\n const el = ref.current;\n if (!el) return;\n const check = () => {\n const box = el.parentElement?.getBoundingClientRect();\n if (!box) return;\n const room = Math.floor(box.left - 12 - 8);\n if (room >= 180) return setPlace({ room });\n const w = Math.min(320, window.innerWidth - 32);\n const want = box.left + box.width - w;\n const at = Math.max(16, Math.min(want, window.innerWidth - 16 - w));\n setPlace({ room, left: Math.round(at - box.left), arrow: Math.round(box.left + box.width / 2 - at - 6) });\n };\n check();\n window.addEventListener('resize', check);\n return () => window.removeEventListener('resize', check);\n }, []);\n const below = place != null && place.room < 180;\n return (\n <span\n ref={ref}\n className={cx('ui-hint', below && 'is-below')}\n id={id}\n role=\"status\"\n style={\n place == null\n ? undefined\n : below\n ? ({ left: place.left, right: 'auto', '--hint-arrow': place.arrow + 'px' } as React.CSSProperties)\n : { maxWidth: Math.min(320, place.room) }\n }\n >\n <span className=\"ui-hint-text\">{hint.text}</span>\n <button type=\"button\" className=\"ui-hint-go\" onClick={hint.onAction}>\n {hint.action ?? tr('開始')}\n </button>\n <button type=\"button\" className=\"ui-hint-x\" aria-label={tr('關閉提示')} onClick={hint.onDismiss}>\n <Icon name=\"x\" size={16} />\n </button>\n </span>\n );\n}\n"],"mappings":";;;;;;;;;;;AASA,aAAaA,SAAG;;AAkChB,SAAgB,WAAW,EAAE,OAAO,MAAM,WAAW,UAAU,MAAM,QAAQ,MAAM,SAAS,KAAK,GAAG,UAA2B;CAC7H,MAAM,KAAK,MAAM,MAAM;CACvB,MAAM,MAAM,MAAM,OAAiC,IAAI;CAEvD,uBAAuB,KAAK,OAAO,QAAQ;CAC3C,MAAM,SAAS,MAAM,aAClB,OAAiC;EAChC,IAAI,UAAU;EACd,IAAI,OAAO,QAAQ,YAAY,IAAI,EAAE;OAChC,IAAI,KAAK,IAAmD,UAAU;CAC7E,GACA,CAAC,GAAG,CACN;CACA,MAAM,MACJ,qBAAC,UAAD;EACE,MAAK;EACL,GAAI;EACJ,KAAK;EACL,WAAW,GAAG,cAAc,YAAY,WAAW,YAAY,QAAQ,YAAY,SAAS;EAC5F,cAAY;EACZ,oBAAkB,OAAO,KAAK,OAAO;EANvC,UAAA,CAQE,oBAAC,QAAD;GAAc;GAAc;EAAS,CAAA,GACpC,QAAQ,oBAAC,QAAD;GAAM,WAAU;GAAiB,eAAY;EAAQ,CAAA,CACxD;;CAEV,MAAM,SAAS,UACb,oBAAC,SAAD;EAAgB;EAAO,UAAU;EAC9B,UAAA;CACM,CAAA,IAET;CAEF,IAAI,CAAC,MAAM,OAAO;CAClB,OACE,qBAAC,QAAD;EAAM,WAAU;EAAhB,UAAA,CACG,QACD,oBAAC,YAAD;GAAgB;GAAU;EAAO,CAAA,CAC7B;;AAEV;;;;AAKA,SAAS,WAAW,EAAE,IAAI,QAA8C;CACtE,MAAM,MAAM,MAAM,OAAwB,IAAI;CAC9C,MAAM,CAAC,OAAO,YAAY,MAAM,SAAiE,IAAI;CACrG,MAAM,sBAAsB;EAC1B,MAAM,KAAK,IAAI;EACf,IAAI,CAAC,IAAI;EACT,MAAM,cAAc;GAClB,MAAM,MAAM,GAAG,eAAe,sBAAsB;GACpD,IAAI,CAAC,KAAK;GACV,MAAM,OAAO,KAAK,MAAM,IAAI,OAAO,KAAK,CAAC;GACzC,IAAI,QAAQ,KAAK,OAAO,SAAS,EAAE,KAAK,CAAC;GACzC,MAAM,IAAI,KAAK,IAAI,KAAK,OAAO,aAAa,EAAE;GAC9C,MAAM,OAAO,IAAI,OAAO,IAAI,QAAQ;GACpC,MAAM,KAAK,KAAK,IAAI,IAAI,KAAK,IAAI,MAAM,OAAO,aAAa,KAAK,CAAC,CAAC;GAClE,SAAS;IAAE;IAAM,MAAM,KAAK,MAAM,KAAK,IAAI,IAAI;IAAG,OAAO,KAAK,MAAM,IAAI,OAAO,IAAI,QAAQ,IAAI,KAAK,CAAC;GAAE,CAAC;EAC1G;EACA,MAAM;EACN,OAAO,iBAAiB,UAAU,KAAK;EACvC,aAAa,OAAO,oBAAoB,UAAU,KAAK;CACzD,GAAG,CAAC,CAAC;CACL,MAAM,QAAQ,SAAS,QAAQ,MAAM,OAAO;CAC5C,OACE,qBAAC,QAAD;EACO;EACL,WAAW,GAAG,WAAW,SAAS,UAAU;EACxC;EACJ,MAAK;EACL,OACE,SAAS,OACL,KAAA,IACA,QACG;GAAE,MAAM,MAAM;GAAM,OAAO;GAAQ,gBAAgB,MAAM,QAAQ;EAAK,IACvE,EAAE,UAAU,KAAK,IAAI,KAAK,MAAM,IAAI,EAAE;EAVhD,UAAA;GAaE,oBAAC,QAAD;IAAM,WAAU;IAAgB,UAAA,KAAK;GAAW,CAAA;GAChD,oBAAC,UAAD;IAAQ,MAAK;IAAS,WAAU;IAAa,SAAS,KAAK;IACxD,UAAA,KAAK,UAAU,GAAG,IAAI;GACjB,CAAA;GACR,oBAAC,UAAD;IAAQ,MAAK;IAAS,WAAU;IAAY,cAAY,GAAG,MAAM;IAAG,SAAS,KAAK;IAChF,UAAA,oBAAC,MAAD;KAAM,MAAK;KAAI,MAAM;IAAK,CAAA;GACpB,CAAA;EACJ;;AAEV"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
interface InlineCodeBase {
|
|
3
|
+
/** The code, path or ID. */
|
|
3
4
|
children?: React.ReactNode;
|
|
5
|
+
/** Extra class on the root element. */
|
|
4
6
|
className?: string;
|
|
5
7
|
}
|
|
6
8
|
type Target = {
|
|
@@ -15,6 +17,7 @@ export type InlineCodeProps = InlineCodeBase & ({
|
|
|
15
17
|
look?: 'chip';
|
|
16
18
|
/** Makes it a link. */
|
|
17
19
|
href?: string;
|
|
20
|
+
/** Makes it a button-like link that runs this. */
|
|
18
21
|
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
19
22
|
} | ({
|
|
20
23
|
/** 'name': a function, class or variable that opens its definition. Accent monospace without a chip, underlined
|
|
@@ -35,10 +38,13 @@ export interface CodeTextProps {
|
|
|
35
38
|
text: string;
|
|
36
39
|
/** Spans that look like file.c:86 become links; return undefined when the reference has no target. */
|
|
37
40
|
refHref?: RefHref;
|
|
41
|
+
/** Called when a reference is pressed, for apps that open it themselves. */
|
|
38
42
|
onRef?: OnRef;
|
|
39
43
|
/** Which spans are references. Default: a file name with a line number. */
|
|
40
44
|
isRef?: (span: string) => boolean;
|
|
45
|
+
/** The element to render. Default span. */
|
|
41
46
|
as?: 'span' | 'p' | 'div' | 'li';
|
|
47
|
+
/** Extra class on the root element. */
|
|
42
48
|
className?: string;
|
|
43
49
|
}
|
|
44
50
|
/** Text with `backtick` spans: renders them as InlineCode, never as raw backticks. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineCode.js","names":[],"sources":["../../../src/components/InlineCode/InlineCode.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cx } from '../../internal/util';\nimport { codeSpans, hasCodeSpan } from '../../internal/codeSpans';\n\ninterface InlineCodeBase {\n children?: React.ReactNode;\n className?: string;\n}\ntype Target =\n | { /** Makes it a link. */ href: string; onClick?: (e: React.MouseEvent<HTMLElement>) => void }\n | { href?: undefined; onClick: (e: React.MouseEvent<HTMLElement>) => void };\n\nexport type InlineCodeProps = InlineCodeBase &\n (\n | {\n /** 'chip' (default): monospace on a light gray chip; with href or onClick an underlined accent link. */\n look?: 'chip';\n /** Makes it a link. */\n href?: string;\n onClick?: (e: React.MouseEvent<HTMLElement>) => void;\n }\n | ({\n /** 'name': a function, class or variable that opens its definition. Accent monospace without a chip, underlined\n * on hover and keyboard focus. 'location': a file and line (src/app.c:86), gray and one step smaller, accent\n * and underlined on hover and focus. Both need href or onClick: text that points nowhere keeps the chip. */\n look: 'name' | 'location';\n } & Target)\n );\n\n/** Code inside a sentence: monospace on a light gray chip. A span that points somewhere is a link; `look` turns a\n * link into a name or a location. */\nexport function InlineCode({ children, href, onClick, className, look = 'chip' }: InlineCodeProps) {\n // Like Term: a link inside a sentence (text beside it) keeps its line height; on its own it gets the 48 px touch area.\n const [inline, setInline] = React.useState(false);\n const link = React.useCallback((el: HTMLElement | null) => {\n const par = el?.parentNode;\n setInline(!!par && Array.from(par.childNodes).some((n) => n.nodeType === 3 && !!n.textContent?.trim()));\n }, []);\n const isLink = !!(href || onClick);\n const cls = cx(\n 'ui-code',\n isLink && 'is-link',\n isLink && inline && 'is-inline',\n isLink && look !== 'chip' && `is-${look}`,\n typeof children === 'string' && children.length <= 24 && 'is-short',\n className,\n );\n if (href)\n return (\n <a ref={link} className={cls} href={href} onClick={onClick}>\n {children}\n </a>\n );\n if (onClick)\n return (\n <button ref={link} type=\"button\" className={cls} onClick={onClick}>\n {children}\n </button>\n );\n return <code className={cls}>{children}</code>;\n}\n\n/** Returns the link of a reference such as src/app.c:86, or undefined when it has no target. */\nexport type RefHref = (ref: string) => string | undefined | null;\n/** Called on a plain click on a reference; the default navigation is prevented. */\nexport type OnRef = (ref: string, e: React.MouseEvent<HTMLElement>) => void;\n\n/** A file and line, such as src/app.c:86 or main.py:12-20. */\nconst CODE_REF = /^[\\w./-]+\\.[A-Za-z0-9]+:\\d+(-\\d+)?$/;\nexport const isCodeRef = (span: string): boolean => CODE_REF.test(span);\n\nexport interface CodeTextProps {\n /** Text with `backtick` spans, as written in Markdown. */\n text: string;\n /** Spans that look like file.c:86 become links; return undefined when the reference has no target. */\n refHref?: RefHref;\n onRef?: OnRef;\n /** Which spans are references. Default: a file name with a line number. */\n isRef?: (span: string) => boolean;\n as?: 'span' | 'p' | 'div' | 'li';\n className?: string;\n}\n\n/** Text with `backtick` spans: renders them as InlineCode, never as raw backticks. */\nexport function CodeText({ text, refHref, onRef, isRef = isCodeRef, as: Tag = 'span', className }: CodeTextProps) {\n return (\n <Tag className={className}>\n {codeSpans(text).map(({ code, text: v }, i) => {\n if (!code) return v;\n const href = refHref && isRef(v) ? refHref(v) || undefined : undefined;\n const link = isRef(v) && (refHref ? !!href : !!onRef);\n if (!link) return <InlineCode key={i}>{v}</InlineCode>;\n // A reference that points somewhere is a location: gray, one step smaller.\n const click = onRef\n ? (e: React.MouseEvent<HTMLElement>) => {\n // A plain click goes to onRef; Ctrl, ⌘, Shift or the middle button still opens href in a new tab.\n if (href && (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1)) return;\n e.preventDefault();\n onRef(v, e);\n }\n : undefined;\n if (href)\n return (\n <InlineCode key={i} look=\"location\" href={href} onClick={click}>\n {v}\n </InlineCode>\n );\n if (click)\n return (\n <InlineCode key={i} look=\"location\" onClick={click}>\n {v}\n </InlineCode>\n );\n return <InlineCode key={i}>{v}</InlineCode>;\n })}\n </Tag>\n );\n}\n\n/** A sentence prop that takes a string: `backtick` spans become InlineCode, the backticks are not shown. Text without a\n * pair of backticks comes back as it is, and anything that is not a string (an element) is left alone. */\nexport function codeText(text: React.ReactNode): React.ReactNode {\n if (typeof text !== 'string' || !hasCodeSpan(text)) return text;\n return codeSpans(text).map((s, i) => (s.code ? <InlineCode key={i}>{s.text}</InlineCode> : s.text));\n}\n"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"InlineCode.js","names":[],"sources":["../../../src/components/InlineCode/InlineCode.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cx } from '../../internal/util';\nimport { codeSpans, hasCodeSpan } from '../../internal/codeSpans';\n\ninterface InlineCodeBase {\n /** The code, path or ID. */\n children?: React.ReactNode;\n /** Extra class on the root element. */\n className?: string;\n}\ntype Target =\n | { /** Makes it a link. */ href: string; onClick?: (e: React.MouseEvent<HTMLElement>) => void }\n | { href?: undefined; onClick: (e: React.MouseEvent<HTMLElement>) => void };\n\nexport type InlineCodeProps = InlineCodeBase &\n (\n | {\n /** 'chip' (default): monospace on a light gray chip; with href or onClick an underlined accent link. */\n look?: 'chip';\n /** Makes it a link. */\n href?: string;\n /** Makes it a button-like link that runs this. */\n onClick?: (e: React.MouseEvent<HTMLElement>) => void;\n }\n | ({\n /** 'name': a function, class or variable that opens its definition. Accent monospace without a chip, underlined\n * on hover and keyboard focus. 'location': a file and line (src/app.c:86), gray and one step smaller, accent\n * and underlined on hover and focus. Both need href or onClick: text that points nowhere keeps the chip. */\n look: 'name' | 'location';\n } & Target)\n );\n\n/** Code inside a sentence: monospace on a light gray chip. A span that points somewhere is a link; `look` turns a\n * link into a name or a location. */\nexport function InlineCode({ children, href, onClick, className, look = 'chip' }: InlineCodeProps) {\n // Like Term: a link inside a sentence (text beside it) keeps its line height; on its own it gets the 48 px touch area.\n const [inline, setInline] = React.useState(false);\n const link = React.useCallback((el: HTMLElement | null) => {\n const par = el?.parentNode;\n setInline(!!par && Array.from(par.childNodes).some((n) => n.nodeType === 3 && !!n.textContent?.trim()));\n }, []);\n const isLink = !!(href || onClick);\n const cls = cx(\n 'ui-code',\n isLink && 'is-link',\n isLink && inline && 'is-inline',\n isLink && look !== 'chip' && `is-${look}`,\n typeof children === 'string' && children.length <= 24 && 'is-short',\n className,\n );\n if (href)\n return (\n <a ref={link} className={cls} href={href} onClick={onClick}>\n {children}\n </a>\n );\n if (onClick)\n return (\n <button ref={link} type=\"button\" className={cls} onClick={onClick}>\n {children}\n </button>\n );\n return <code className={cls}>{children}</code>;\n}\n\n/** Returns the link of a reference such as src/app.c:86, or undefined when it has no target. */\nexport type RefHref = (ref: string) => string | undefined | null;\n/** Called on a plain click on a reference; the default navigation is prevented. */\nexport type OnRef = (ref: string, e: React.MouseEvent<HTMLElement>) => void;\n\n/** A file and line, such as src/app.c:86 or main.py:12-20. */\nconst CODE_REF = /^[\\w./-]+\\.[A-Za-z0-9]+:\\d+(-\\d+)?$/;\nexport const isCodeRef = (span: string): boolean => CODE_REF.test(span);\n\nexport interface CodeTextProps {\n /** Text with `backtick` spans, as written in Markdown. */\n text: string;\n /** Spans that look like file.c:86 become links; return undefined when the reference has no target. */\n refHref?: RefHref;\n /** Called when a reference is pressed, for apps that open it themselves. */\n onRef?: OnRef;\n /** Which spans are references. Default: a file name with a line number. */\n isRef?: (span: string) => boolean;\n /** The element to render. Default span. */\n as?: 'span' | 'p' | 'div' | 'li';\n /** Extra class on the root element. */\n className?: string;\n}\n\n/** Text with `backtick` spans: renders them as InlineCode, never as raw backticks. */\nexport function CodeText({ text, refHref, onRef, isRef = isCodeRef, as: Tag = 'span', className }: CodeTextProps) {\n return (\n <Tag className={className}>\n {codeSpans(text).map(({ code, text: v }, i) => {\n if (!code) return v;\n const href = refHref && isRef(v) ? refHref(v) || undefined : undefined;\n const link = isRef(v) && (refHref ? !!href : !!onRef);\n if (!link) return <InlineCode key={i}>{v}</InlineCode>;\n // A reference that points somewhere is a location: gray, one step smaller.\n const click = onRef\n ? (e: React.MouseEvent<HTMLElement>) => {\n // A plain click goes to onRef; Ctrl, ⌘, Shift or the middle button still opens href in a new tab.\n if (href && (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1)) return;\n e.preventDefault();\n onRef(v, e);\n }\n : undefined;\n if (href)\n return (\n <InlineCode key={i} look=\"location\" href={href} onClick={click}>\n {v}\n </InlineCode>\n );\n if (click)\n return (\n <InlineCode key={i} look=\"location\" onClick={click}>\n {v}\n </InlineCode>\n );\n return <InlineCode key={i}>{v}</InlineCode>;\n })}\n </Tag>\n );\n}\n\n/** A sentence prop that takes a string: `backtick` spans become InlineCode, the backticks are not shown. Text without a\n * pair of backticks comes back as it is, and anything that is not a string (an element) is left alone. */\nexport function codeText(text: React.ReactNode): React.ReactNode {\n if (typeof text !== 'string' || !hasCodeSpan(text)) return text;\n return codeSpans(text).map((s, i) => (s.code ? <InlineCode key={i}>{s.text}</InlineCode> : s.text));\n}\n"],"mappings":";;;;;;;;AAkCA,SAAgB,WAAW,EAAE,UAAU,MAAM,SAAS,WAAW,OAAO,UAA2B;CAEjG,MAAM,CAAC,QAAQ,aAAa,MAAM,SAAS,KAAK;CAChD,MAAM,OAAO,MAAM,aAAa,OAA2B;EACzD,MAAM,MAAM,IAAI;EAChB,UAAU,CAAC,CAAC,OAAO,MAAM,KAAK,IAAI,UAAU,CAAC,CAAC,MAAM,MAAM,EAAE,aAAa,KAAK,CAAC,CAAC,EAAE,aAAa,KAAK,CAAC,CAAC;CACxG,GAAG,CAAC,CAAC;CACL,MAAM,SAAS,CAAC,EAAE,QAAQ;CAC1B,MAAM,MAAM,GACV,WACA,UAAU,WACV,UAAU,UAAU,aACpB,UAAU,SAAS,UAAU,MAAM,QACnC,OAAO,aAAa,YAAY,SAAS,UAAU,MAAM,YACzD,SACF;CACA,IAAI,MACF,OACE,oBAAC,KAAD;EAAG,KAAK;EAAM,WAAW;EAAW;EAAe;EAChD;CACA,CAAA;CAEP,IAAI,SACF,OACE,oBAAC,UAAD;EAAQ,KAAK;EAAM,MAAK;EAAS,WAAW;EAAc;EACvD;CACK,CAAA;CAEZ,OAAO,oBAAC,QAAD;EAAM,WAAW;EAAM;CAAe,CAAA;AAC/C;;AAQA,MAAM,WAAW;AACjB,MAAa,aAAa,SAA0B,SAAS,KAAK,IAAI;;AAkBtE,SAAgB,SAAS,EAAE,MAAM,SAAS,OAAO,QAAQ,WAAW,IAAI,MAAM,QAAQ,aAA4B;CAChH,OACE,oBAAC,KAAD;EAAgB;EACb,UAAA,UAAU,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,MAAM,KAAK,MAAM;GAC7C,IAAI,CAAC,MAAM,OAAO;GAClB,MAAM,OAAO,WAAW,MAAM,CAAC,IAAI,QAAQ,CAAC,KAAK,KAAA,IAAY,KAAA;GAE7D,IAAI,EADS,MAAM,CAAC,MAAM,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,SACpC,OAAO,oBAAC,YAAD,EAAA,UAAqB,EAAc,GAAlB,CAAkB;GAErD,MAAM,QAAQ,SACT,MAAqC;IAEpC,IAAI,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,IAAI;IACtE,EAAE,eAAe;IACjB,MAAM,GAAG,CAAC;GACZ,IACA,KAAA;GACJ,IAAI,MACF,OACE,oBAAC,YAAD;IAAoB,MAAK;IAAiB;IAAM,SAAS;IACtD,UAAA;GACS,GAFK,CAEL;GAEhB,IAAI,OACF,OACE,oBAAC,YAAD;IAAoB,MAAK;IAAW,SAAS;IAC1C,UAAA;GACS,GAFK,CAEL;GAEhB,OAAO,oBAAC,YAAD,EAAA,UAAqB,EAAc,GAAlB,CAAkB;EAC5C,CAAC;CACE,CAAA;AAET;;;AAIA,SAAgB,SAAS,MAAwC;CAC/D,IAAI,OAAO,SAAS,YAAY,CAAC,YAAY,IAAI,GAAG,OAAO;CAC3D,OAAO,UAAU,IAAI,CAAC,CAAC,KAAK,GAAG,MAAO,EAAE,OAAO,oBAAC,YAAD,EAAA,UAAqB,EAAE,KAAiB,GAAvB,CAAuB,IAAI,EAAE,IAAK;AACpG"}
|
|
@@ -2,6 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
export interface KpiCardProps {
|
|
3
3
|
/** What is measured: 「本月營收」. */
|
|
4
4
|
label: string;
|
|
5
|
+
/** The figure, as a number (counts up from 0 when it appears). */
|
|
5
6
|
value: number;
|
|
6
7
|
/** 'money' shows NT$ 1,280; 'percent' 1 decimal without the % sign: pass unit="%" (same as DataTable). Default 'number'. */
|
|
7
8
|
format?: 'number' | 'money' | 'percent';
|
|
@@ -11,6 +12,8 @@ export interface KpiCardProps {
|
|
|
11
12
|
compact?: boolean;
|
|
12
13
|
/** Written after the number: 元, 人, ms, %. */
|
|
13
14
|
unit?: string;
|
|
15
|
+
/** Digits after the decimal point, for the figure and its change (delta). Default 0 for the figure; the change then
|
|
16
|
+
* keeps 1 (%) or 2 (pt). */
|
|
14
17
|
decimals?: number;
|
|
15
18
|
/** Change versus the comparison period. */
|
|
16
19
|
delta?: number;
|
|
@@ -22,6 +25,8 @@ export interface KpiCardProps {
|
|
|
22
25
|
spark?: number[];
|
|
23
26
|
/** Default 「較上週」. */
|
|
24
27
|
compareLabel?: string;
|
|
28
|
+
/** Its own class names. */
|
|
29
|
+
className?: string;
|
|
25
30
|
/** `compact`: a 22 px number for a top bar, no sparkline; with verdict and target below. Default 'default' (31 px). */
|
|
26
31
|
size?: 'default' | 'compact';
|
|
27
32
|
/** How the figure is judged, in words: 「預測準確」(success), 「偏差變大」(warning), 「需要校正」(danger). Shown only
|
|
@@ -32,7 +37,6 @@ export interface KpiCardProps {
|
|
|
32
37
|
};
|
|
33
38
|
/** One gray line under the number, e.g. 「目標 ≤ 0.5 °C(示意)」; `backticks` are code. */
|
|
34
39
|
target?: string;
|
|
35
|
-
className?: string;
|
|
36
40
|
}
|
|
37
41
|
/** One figure with its change and a sparkline. It is a card: put several in a grid, not inside another Card. */
|
|
38
42
|
export declare function KpiCard(props: KpiCardProps): React.JSX.Element;
|
|
@@ -8,9 +8,10 @@ import { codeText } from "../InlineCode/InlineCode.js";
|
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
// src/components/KpiCard/KpiCard.tsx
|
|
11
|
-
/** Chinese in a figure (the 萬 and 億 of an abbreviated number) in the text font
|
|
11
|
+
/** Chinese in a figure (the 萬 and 億 of an abbreviated number) in the text font and drawn like the unit (smaller,
|
|
12
|
+
* muted); Geist Mono stays on the digits. */
|
|
12
13
|
function sansCjk(text) {
|
|
13
|
-
return text.split(
|
|
14
|
+
return text.split(/\s*([\u2e80-\u9fff\uff00-\uffef]+)/).map((t, i) => i % 2 ? /* @__PURE__ */ jsx("span", {
|
|
14
15
|
className: "ui-kpi-cjk",
|
|
15
16
|
children: t
|
|
16
17
|
}, i) : t);
|
|
@@ -19,7 +20,7 @@ function sansCjk(text) {
|
|
|
19
20
|
function KpiCard(props) {
|
|
20
21
|
const { label, value, unit, decimals = 0, delta, deltaUnit, good, spark, compareLabel, size = "default", verdict, target, className } = props;
|
|
21
22
|
const compact = size === "compact";
|
|
22
|
-
devWarn(compact && !!spark, "KpiCard", "size=\"compact\"
|
|
23
|
+
devWarn(compact && !!spark, "KpiCard", "size=\"compact\" draws no sparkline, so spark is ignored. Drop spark, or use the default size.");
|
|
23
24
|
devWarn(props.format === "percent" && !unit, "KpiCard", "format='percent' shows the number only; pass unit=\"%\" for the smaller % after it.");
|
|
24
25
|
const t = useCountUp(value, 900);
|
|
25
26
|
const valRef = React.useRef(null);
|
|
@@ -35,7 +36,7 @@ function KpiCard(props) {
|
|
|
35
36
|
const hasDelta = typeof delta === "number";
|
|
36
37
|
const up = hasDelta && delta > 0;
|
|
37
38
|
const isGood = good ?? up;
|
|
38
|
-
const dTxt = hasDelta ? deltaUnit === "pt" ? tr("{n} 個百分點", { n: format.number(Math.abs(delta), 2) }) : format.percent(Math.abs(delta)) : "";
|
|
39
|
+
const dTxt = hasDelta ? deltaUnit === "pt" ? tr("{n} 個百分點", { n: format.number(Math.abs(delta), props.decimals ?? 2) }) : format.percent(Math.abs(delta), props.decimals ?? 1) : "";
|
|
39
40
|
let sparkD = null;
|
|
40
41
|
if (!compact && spark && spark.length > 1) {
|
|
41
42
|
const mx = Math.max(...spark);
|
|
@@ -53,22 +54,28 @@ function KpiCard(props) {
|
|
|
53
54
|
/* @__PURE__ */ jsxs("div", {
|
|
54
55
|
ref: valRef,
|
|
55
56
|
className: "ui-kpi-value",
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ jsx("span", {
|
|
59
|
+
className: "ui-visually-hidden",
|
|
60
|
+
children: kpiText(value, props, decimals) + (showUnit ? " " + unit : "")
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ jsxs("span", {
|
|
63
|
+
className: "ui-kpi-num",
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
66
|
+
className: "ui-kpi-sizer",
|
|
67
|
+
children: sansCjk(kpiText(value, props, decimals))
|
|
68
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
69
|
+
className: "ui-kpi-live",
|
|
70
|
+
children: sansCjk(kpiText(value * t, props, decimals))
|
|
71
|
+
})]
|
|
72
|
+
}),
|
|
73
|
+
showUnit ? /* @__PURE__ */ jsx("span", {
|
|
74
|
+
className: "ui-kpi-unit",
|
|
75
|
+
"aria-hidden": "true",
|
|
76
|
+
children: unit
|
|
77
|
+
}) : null
|
|
78
|
+
]
|
|
72
79
|
}),
|
|
73
80
|
sparkD ? /* @__PURE__ */ jsx("svg", {
|
|
74
81
|
className: "ui-kpi-spark",
|
|
@@ -90,7 +97,14 @@ function KpiCard(props) {
|
|
|
90
97
|
className: "ui-kpi-delta",
|
|
91
98
|
children: [/* @__PURE__ */ jsxs("span", {
|
|
92
99
|
className: cx("ui-kpi-change", isGood ? "is-good" : "is-bad"),
|
|
93
|
-
children: [
|
|
100
|
+
children: [
|
|
101
|
+
up ? "▲ " : "▼ ",
|
|
102
|
+
digits(dTxt),
|
|
103
|
+
/* @__PURE__ */ jsx("span", {
|
|
104
|
+
className: "ui-visually-hidden",
|
|
105
|
+
children: isGood ? tr(",改善") : tr(",變差")
|
|
106
|
+
})
|
|
107
|
+
]
|
|
94
108
|
}), /* @__PURE__ */ jsx("span", {
|
|
95
109
|
className: "ui-kpi-note",
|
|
96
110
|
children: compareLabel || tr("較上週")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KpiCard.js","names":[],"sources":["../../../src/components/KpiCard/KpiCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { format } from '../../format';\nimport { devWarn } from '../../internal/dev';\nimport { I18N, tr } from '../../i18n';\nimport { kpiText, smoothPath, useCountUp, useFitText, type Point } from '../../internal/chart';\nimport { cx, digits } from '../../internal/util';\nimport { codeText } from '../InlineCode/InlineCode';\n\nexport interface KpiCardProps {\n /** What is measured: 「本月營收」. */\n label: string;\n value: number;\n /** 'money' shows NT$ 1,280; 'percent' 1 decimal without the % sign: pass unit=\"%\" (same as DataTable). Default 'number'. */\n format?: 'number' | 'money' | 'percent';\n /** For money. Default: the locale's currency (TWD). */\n currency?: string;\n /** Abbreviate from 1 萬 (default true). The only place numbers are abbreviated. */\n compact?: boolean;\n /** Written after the number: 元, 人, ms, %. */\n unit?: string;\n decimals?: number;\n /** Change versus the comparison period. */\n delta?: number;\n /** '%' (default) or 'pt' for percentage points. */\n deltaUnit?: '%' | 'pt';\n /** Whether the change is good. Default: delta > 0. Set false where up is bad (error rate, cost). */\n good?: boolean;\n /** Recent values for the sparkline. */\n spark?: number[];\n /** Default 「較上週」. */\n compareLabel?: string;\n /** `compact`: a 22 px number for a top bar, no sparkline; with verdict and target below. Default 'default' (31 px). */\n size?: 'default' | 'compact';\n /** How the figure is judged, in words: 「預測準確」(success), 「偏差變大」(warning), 「需要校正」(danger). Shown only\n * when it is not success, in place of the target line and in its color; screen readers always hear it. `backticks` are code. */\n verdict?: { tone: 'success' | 'warning' | 'danger'; text: string };\n /** One gray line under the number, e.g. 「目標 ≤ 0.5 °C(示意)」; `backticks` are code. */\n target?: string;\n
|
|
1
|
+
{"version":3,"file":"KpiCard.js","names":[],"sources":["../../../src/components/KpiCard/KpiCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { format } from '../../format';\nimport { devWarn } from '../../internal/dev';\nimport { I18N, tr } from '../../i18n';\nimport { kpiText, smoothPath, useCountUp, useFitText, type Point } from '../../internal/chart';\nimport { cx, digits } from '../../internal/util';\nimport { codeText } from '../InlineCode/InlineCode';\n\nexport interface KpiCardProps {\n /** What is measured: 「本月營收」. */\n label: string;\n /** The figure, as a number (counts up from 0 when it appears). */\n value: number;\n /** 'money' shows NT$ 1,280; 'percent' 1 decimal without the % sign: pass unit=\"%\" (same as DataTable). Default 'number'. */\n format?: 'number' | 'money' | 'percent';\n /** For money. Default: the locale's currency (TWD). */\n currency?: string;\n /** Abbreviate from 1 萬 (default true). The only place numbers are abbreviated. */\n compact?: boolean;\n /** Written after the number: 元, 人, ms, %. */\n unit?: string;\n /** Digits after the decimal point, for the figure and its change (delta). Default 0 for the figure; the change then\n * keeps 1 (%) or 2 (pt). */\n decimals?: number;\n /** Change versus the comparison period. */\n delta?: number;\n /** '%' (default) or 'pt' for percentage points. */\n deltaUnit?: '%' | 'pt';\n /** Whether the change is good. Default: delta > 0. Set false where up is bad (error rate, cost). */\n good?: boolean;\n /** Recent values for the sparkline. */\n spark?: number[];\n /** Default 「較上週」. */\n compareLabel?: string;\n /** Its own class names. */\n className?: string;\n /** `compact`: a 22 px number for a top bar, no sparkline; with verdict and target below. Default 'default' (31 px). */\n size?: 'default' | 'compact';\n /** How the figure is judged, in words: 「預測準確」(success), 「偏差變大」(warning), 「需要校正」(danger). Shown only\n * when it is not success, in place of the target line and in its color; screen readers always hear it. `backticks` are code. */\n verdict?: { tone: 'success' | 'warning' | 'danger'; text: string };\n /** One gray line under the number, e.g. 「目標 ≤ 0.5 °C(示意)」; `backticks` are code. */\n target?: string;\n}\n\n/** Chinese in a figure (the 萬 and 億 of an abbreviated number) in the text font and drawn like the unit (smaller,\n * muted); Geist Mono stays on the digits. */\nfunction sansCjk(text: string): React.ReactNode[] {\n // The space before 萬 is the unit's margin (CSS), not a space as wide as a Geist Mono digit.\n return text.split(/\\s*([\\u2e80-\\u9fff\\uff00-\\uffef]+)/).map((t, i) =>\n i % 2 ? (\n <span key={i} className=\"ui-kpi-cjk\">\n {t}\n </span>\n ) : (\n t\n ),\n );\n}\n\n/** One figure with its change and a sparkline. It is a card: put several in a grid, not inside another Card. */\nexport function KpiCard(props: KpiCardProps) {\n const { label, value, unit, decimals = 0, delta, deltaUnit, good, spark, compareLabel, size = 'default', verdict, target, className } = props;\n const compact = size === 'compact';\n devWarn(compact && !!spark, 'KpiCard', 'size=\"compact\" draws no sparkline, so spark is ignored. Drop spark, or use the default size.');\n devWarn(props.format === 'percent' && !unit, 'KpiCard', 'format=\\'percent\\' shows the number only; pass unit=\"%\" for the smaller % after it.');\n const t = useCountUp(value, 900);\n const valRef = React.useRef<HTMLDivElement>(null);\n useFitText(valRef, [value, props.format, unit, decimals, props.compact, props.currency, I18N.locale]);\n const hasDelta = typeof delta === 'number';\n const up = hasDelta && delta > 0;\n const isGood = good ?? up;\n // The change follows decimals when it is given (decimals={1}: 「0.4 個百分點」, not 「0.40」).\n const dTxt = hasDelta\n ? deltaUnit === 'pt'\n ? tr('{n} 個百分點', { n: format.number(Math.abs(delta), props.decimals ?? 2) })\n : format.percent(Math.abs(delta), props.decimals ?? 1)\n : '';\n let sparkD: string | null = null;\n if (!compact && spark && spark.length > 1) {\n const mx = Math.max(...spark);\n const mn = Math.min(...spark);\n sparkD = smoothPath(spark.map((v, i): Point => [(i * 160) / (spark.length - 1), 32 - ((v - mn) / (mx - mn || 1)) * 28]));\n }\n const showUnit = unit && props.format !== 'money';\n return (\n <section className={cx('ui-kpi', compact && 'is-compact', className)}>\n <div className=\"ui-kpi-label\">{label}</div>\n <div ref={valRef} className=\"ui-kpi-value\">\n {/* The final figure for screen readers, as text (an aria-label on a div without a role is not read); the\n counting figure is hidden from them. */}\n <span className=\"ui-visually-hidden\">{kpiText(value, props, decimals) + (showUnit ? ' ' + unit : '')}</span>\n <span className=\"ui-kpi-num\" aria-hidden=\"true\">\n <span className=\"ui-kpi-sizer\">{sansCjk(kpiText(value, props, decimals))}</span>\n <span className=\"ui-kpi-live\">{sansCjk(kpiText(value * t, props, decimals))}</span>\n </span>\n {showUnit ? (\n <span className=\"ui-kpi-unit\" aria-hidden=\"true\">\n {unit}\n </span>\n ) : null}\n </div>\n {sparkD ? (\n <svg className=\"ui-kpi-spark\" width=\"100%\" height={36} viewBox=\"0 0 160 36\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n <path d={sparkD} fill=\"none\" stroke=\"var(--chart-1)\" strokeWidth={2} strokeLinecap=\"round\" vectorEffect=\"non-scaling-stroke\" />\n </svg>\n ) : null}\n {hasDelta ? (\n <div className=\"ui-kpi-delta\">\n <span className={cx('ui-kpi-change', isGood ? 'is-good' : 'is-bad')}>\n {up ? '▲ ' : '▼ '}\n {digits(dTxt)}\n {/* Good or bad is not only a colour (WCAG 1.4.1): said in words to screen readers. */}\n <span className=\"ui-visually-hidden\">{isGood ? tr(',改善') : tr(',變差')}</span>\n </span>\n <span className=\"ui-kpi-note\">{compareLabel || tr('較上週')}</span>\n </div>\n ) : null}\n {verdict || target ? (\n verdict && verdict.tone !== 'success' ? (\n <div className={'ui-kpi-target ui-kpi-verdict is-' + verdict.tone}>\n {codeText(target ? tr('{v}({t})', { v: verdict.text, t: target }) : verdict.text)}\n </div>\n ) : (\n <div className=\"ui-kpi-target\">\n {verdict ? <span className=\"ui-visually-hidden\">{codeText(verdict.text + tr(','))}</span> : null}\n {codeText(target)}\n </div>\n )\n ) : null}\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA+CA,SAAS,QAAQ,MAAiC;CAEhD,OAAO,KAAK,MAAM,oCAAoC,CAAC,CAAC,KAAK,GAAG,MAC9D,IAAI,IACF,oBAAC,QAAD;EAAc,WAAU;EACrB,UAAA;CACG,GAFK,CAEL,IAEN,CAEJ;AACF;;AAGA,SAAgB,QAAQ,OAAqB;CAC3C,MAAM,EAAE,OAAO,OAAO,MAAM,WAAW,GAAG,OAAO,WAAW,MAAM,OAAO,cAAc,OAAO,WAAW,SAAS,QAAQ,cAAc;CACxI,MAAM,UAAU,SAAS;CACzB,QAAQ,WAAW,CAAC,CAAC,OAAO,WAAW,gGAA8F;CACrI,QAAQ,MAAM,WAAW,aAAa,CAAC,MAAM,WAAW,qFAAqF;CAC7I,MAAM,IAAI,WAAW,OAAO,GAAG;CAC/B,MAAM,SAAS,MAAM,OAAuB,IAAI;CAChD,WAAW,QAAQ;EAAC;EAAO,MAAM;EAAQ;EAAM;EAAU,MAAM;EAAS,MAAM;EAAU,KAAK;CAAM,CAAC;CACpG,MAAM,WAAW,OAAO,UAAU;CAClC,MAAM,KAAK,YAAY,QAAQ;CAC/B,MAAM,SAAS,QAAQ;CAEvB,MAAM,OAAO,WACT,cAAc,OACZ,GAAG,YAAY,EAAE,GAAG,OAAO,OAAO,KAAK,IAAI,KAAK,GAAG,MAAM,YAAY,CAAC,EAAE,CAAC,IACzE,OAAO,QAAQ,KAAK,IAAI,KAAK,GAAG,MAAM,YAAY,CAAC,IACrD;CACJ,IAAI,SAAwB;CAC5B,IAAI,CAAC,WAAW,SAAS,MAAM,SAAS,GAAG;EACzC,MAAM,KAAK,KAAK,IAAI,GAAG,KAAK;EAC5B,MAAM,KAAK,KAAK,IAAI,GAAG,KAAK;EAC5B,SAAS,WAAW,MAAM,KAAK,GAAG,MAAa,CAAE,IAAI,OAAQ,MAAM,SAAS,IAAI,MAAO,IAAI,OAAO,KAAK,MAAM,KAAM,EAAE,CAAC,CAAC;CACzH;CACA,MAAM,WAAW,QAAQ,MAAM,WAAW;CAC1C,OACE,qBAAC,WAAD;EAAS,WAAW,GAAG,UAAU,WAAW,cAAc,SAAS;EAAnE,UAAA;GACE,oBAAC,OAAD;IAAK,WAAU;IAAgB,UAAA;GAAW,CAAA;GAC1C,qBAAC,OAAD;IAAK,KAAK;IAAQ,WAAU;IAA5B,UAAA;KAGE,oBAAC,QAAD;MAAM,WAAU;MAAsB,UAAA,QAAQ,OAAO,OAAO,QAAQ,KAAK,WAAW,MAAM,OAAO;KAAU,CAAA;KAC3G,qBAAC,QAAD;MAAM,WAAU;MAAa,eAAY;MAAzC,UAAA,CACE,oBAAC,QAAD;OAAM,WAAU;OAAgB,UAAA,QAAQ,QAAQ,OAAO,OAAO,QAAQ,CAAC;MAAQ,CAAA,GAC/E,oBAAC,QAAD;OAAM,WAAU;OAAe,UAAA,QAAQ,QAAQ,QAAQ,GAAG,OAAO,QAAQ,CAAC;MAAQ,CAAA,CAC9E;;KACL,WACC,oBAAC,QAAD;MAAM,WAAU;MAAc,eAAY;MACvC,UAAA;KACG,CAAA,IACJ;IACD;;GACJ,SACC,oBAAC,OAAD;IAAK,WAAU;IAAe,OAAM;IAAO,QAAQ;IAAI,SAAQ;IAAa,qBAAoB;IAAO,eAAY;IACjH,UAAA,oBAAC,QAAD;KAAM,GAAG;KAAQ,MAAK;KAAO,QAAO;KAAiB,aAAa;KAAG,eAAc;KAAQ,cAAa;IAAsB,CAAA;GAC3H,CAAA,IACH;GACH,WACC,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,qBAAC,QAAD;KAAM,WAAW,GAAG,iBAAiB,SAAS,YAAY,QAAQ;KAAlE,UAAA;MACG,KAAK,OAAO;MACZ,OAAO,IAAI;MAEZ,oBAAC,QAAD;OAAM,WAAU;OAAsB,UAAA,SAAS,GAAG,KAAK,IAAI,GAAG,KAAK;MAAQ,CAAA;KACvE;IACN,CAAA,GAAA,oBAAC,QAAD;KAAM,WAAU;KAAe,UAAA,gBAAgB,GAAG,KAAK;IAAQ,CAAA,CAC5D;GACH,CAAA,IAAA;GACH,WAAW,SACV,WAAW,QAAQ,SAAS,YAC1B,oBAAC,OAAD;IAAK,WAAW,qCAAqC,QAAQ;IAC1D,UAAA,SAAS,SAAS,GAAG,YAAY;KAAE,GAAG,QAAQ;KAAM,GAAG;IAAO,CAAC,IAAI,QAAQ,IAAI;GAC7E,CAAA,IAEL,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACG,UAAU,oBAAC,QAAD;KAAM,WAAU;KAAsB,UAAA,SAAS,QAAQ,OAAO,GAAG,GAAG,CAAC;IAAQ,CAAA,IAAI,MAC3F,SAAS,MAAM,CACb;GAEL,CAAA,IAAA;EACG;;AAEb"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { GraphLegendItem } from "../Graph/Graph.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
export interface LayerGraphNode {
|
|
4
|
+
/** Unique id: edges, value and onChange use it. */
|
|
4
5
|
id: string;
|
|
6
|
+
/** Shown on the box. Default: the id. */
|
|
5
7
|
name?: string;
|
|
6
8
|
/** The name is code (a path, a file, a module): Geist Mono. Default: the text font, for names in words (「被追蹤的程式」). */
|
|
7
9
|
code?: boolean;
|
|
@@ -9,13 +11,11 @@ export interface LayerGraphNode {
|
|
|
9
11
|
layer?: number;
|
|
10
12
|
/** How big it is (functions, files, endpoints): drawn as the size bar. */
|
|
11
13
|
size?: number;
|
|
12
|
-
/** @deprecated use size. */
|
|
13
|
-
fns?: number;
|
|
14
14
|
/** Used by most others: not drawn as a layer; shown as a small box under the diagram with how often it is used.
|
|
15
15
|
* Selectable like the other boxes (same selected and onSelect): the boxes that use it show 「使用 N 次」. */
|
|
16
16
|
shared?: boolean;
|
|
17
17
|
/** Outside the repository (a traced program, a library): drawn above every layer with a dashed outline and
|
|
18
|
-
*
|
|
18
|
+
* 「外部」 (externalLabel) under the name. Not in any layer and no size bar; its lines, selection and list entry
|
|
19
19
|
* work like any box's. */
|
|
20
20
|
external?: boolean;
|
|
21
21
|
/** A short tag beside the name (「可修改」「受保護」): on the same line, never cut; the name is cut first. In the list
|
|
@@ -25,7 +25,9 @@ export interface LayerGraphNode {
|
|
|
25
25
|
tagTone?: 'neutral' | 'warning';
|
|
26
26
|
}
|
|
27
27
|
export interface LayerGraphEdge {
|
|
28
|
+
/** The id of the box the line starts at. */
|
|
28
29
|
from: string;
|
|
30
|
+
/** The id of the box the arrow points at. */
|
|
29
31
|
to: string;
|
|
30
32
|
/** How often: sets the line width. */
|
|
31
33
|
count?: number;
|
|
@@ -39,11 +41,49 @@ export interface LayerGraphEdge {
|
|
|
39
41
|
/** Names the edge for selectedEdge and onSelectEdge. Default `${from}->${to}`. */
|
|
40
42
|
id?: string;
|
|
41
43
|
}
|
|
44
|
+
/** Every text LayerGraph writes, for your domain's words or another language. Pass only the ones to change. */
|
|
45
|
+
export interface LayerGraphLabels {
|
|
46
|
+
/** Text under a box's size bar: a string with {n}, or a function of the size for words that change with the number
|
|
47
|
+
* (`(n) => n === 1 ? '1 function' : `${n} functions``). Default 「{n} 個項目」. */
|
|
48
|
+
size: string | ((n: number) => string);
|
|
49
|
+
/** A selected edge's count: a string with {n}, or a function of the count. Default 「{n} 次」 (English 「1 call」). */
|
|
50
|
+
count: string | ((n: number) => string);
|
|
51
|
+
/** Under the name of an external box, and after it in the list. Default 「repo 外」. */
|
|
52
|
+
external: string;
|
|
53
|
+
/** Heading of the shared items under the diagram. Default 「共用項目」. */
|
|
54
|
+
shared: string;
|
|
55
|
+
/** A shared item's line; {a} is how many items use it, {b} the total count. Default 「{a} 個項目使用,共 {b} 次」. */
|
|
56
|
+
sharedMeta: string;
|
|
57
|
+
/** On a box that uses the selected shared item; {n} is how often. Default 「使用 {n} 次」. */
|
|
58
|
+
use: string;
|
|
59
|
+
/** Label of inferred edges without their own, and their legend entry. Default 「推測」 (legend 「推測的關係」). */
|
|
60
|
+
inferred: string;
|
|
61
|
+
/** Explains inferred edges in the legend (a Term). */
|
|
62
|
+
inferredText: string;
|
|
63
|
+
/** The word for declared edges, after a label in the list. Default 「宣告」. */
|
|
64
|
+
declared: string;
|
|
65
|
+
/** The legend entry for declared edges. Default 「專案宣告的關係」. */
|
|
66
|
+
declaredLegend: string;
|
|
67
|
+
/** Explains declared edges in the legend (a Term), e.g. which file declares them. */
|
|
68
|
+
declaredText: string;
|
|
69
|
+
/** Heading of the boxes in the list view. Default 「項目」. */
|
|
70
|
+
listNodes: string;
|
|
71
|
+
/** Heading of the lines in the list view. Default 「關係」. */
|
|
72
|
+
listEdges: string;
|
|
73
|
+
}
|
|
42
74
|
export interface LayerGraphProps {
|
|
75
|
+
/** The boxes. */
|
|
43
76
|
nodes: LayerGraphNode[];
|
|
77
|
+
/** The lines between boxes (by id). */
|
|
44
78
|
edges: LayerGraphEdge[];
|
|
79
|
+
/** The selected box's id (controlled); null for none. */
|
|
80
|
+
value?: string | null;
|
|
81
|
+
/** A box picked (its id) or picked again (null). Selecting a box dims everything unrelated and turns its lines
|
|
82
|
+
* accent; it clears the selected edge. */
|
|
83
|
+
onChange?: (id: string | null) => void;
|
|
84
|
+
/** @deprecated use value. */
|
|
45
85
|
selected?: string | null;
|
|
46
|
-
/**
|
|
86
|
+
/** @deprecated use onChange. */
|
|
47
87
|
onSelect?: (id: string | null) => void;
|
|
48
88
|
/** The selected edge's id (controlled, like selected). */
|
|
49
89
|
selectedEdge?: string | null;
|
|
@@ -58,34 +98,35 @@ export interface LayerGraphProps {
|
|
|
58
98
|
* 'switch'): a Switch with the text 「線上文字」, on while labels show. 'icon': the tag icon button with a fixed name
|
|
59
99
|
* and aria-pressed, for a tight toolbar. false: none. */
|
|
60
100
|
labelToggle?: boolean | 'switch' | 'icon';
|
|
61
|
-
/** px. Default 200. */
|
|
101
|
+
/** Box width in px. Default 200. */
|
|
62
102
|
nodeWidth?: number;
|
|
63
|
-
/**
|
|
64
|
-
|
|
103
|
+
/** Your words for every text LayerGraph writes: { size: '{n} 個函式', count: '呼叫 {n} 次', … }. */
|
|
104
|
+
labels?: Partial<LayerGraphLabels>;
|
|
105
|
+
/** @deprecated use labels.size. */
|
|
65
106
|
sizeLabel?: string | ((n: number) => string);
|
|
66
|
-
/**
|
|
67
|
-
* Default 「{n} 次」 (English 「1 call」, 「2 calls」). */
|
|
107
|
+
/** @deprecated use labels.count. */
|
|
68
108
|
countLabel?: string | ((n: number) => string);
|
|
69
|
-
/**
|
|
109
|
+
/** @deprecated use labels.external. */
|
|
70
110
|
externalLabel?: string;
|
|
71
|
-
/**
|
|
111
|
+
/** @deprecated use labels.shared. */
|
|
72
112
|
sharedLabel?: string;
|
|
73
|
-
/**
|
|
113
|
+
/** @deprecated use labels.sharedMeta. */
|
|
74
114
|
sharedMeta?: string;
|
|
75
|
-
/**
|
|
115
|
+
/** @deprecated use labels.use. */
|
|
76
116
|
useLabel?: string;
|
|
77
|
-
/**
|
|
117
|
+
/** @deprecated use labels.inferred. */
|
|
78
118
|
inferredLabel?: string;
|
|
79
|
-
/**
|
|
119
|
+
/** @deprecated use labels.inferredText. */
|
|
80
120
|
inferredText?: string;
|
|
81
|
-
/**
|
|
121
|
+
/** @deprecated use labels.declared. */
|
|
82
122
|
declaredLabel?: string;
|
|
83
|
-
/**
|
|
123
|
+
/** @deprecated use labels.declaredLegend. */
|
|
84
124
|
declaredLegend?: string;
|
|
85
|
-
/**
|
|
125
|
+
/** @deprecated use labels.declaredText. */
|
|
86
126
|
declaredText?: string;
|
|
87
127
|
/** false hides the legend. By default it lists only the kinds of line the diagram has. */
|
|
88
128
|
legend?: boolean;
|
|
129
|
+
/** Your own legend entries instead of the kinds of line the diagram has. */
|
|
89
130
|
legendItems?: GraphLegendItem[];
|
|
90
131
|
/** Default 「架構圖」. */
|
|
91
132
|
label?: string;
|
|
@@ -96,22 +137,26 @@ export interface LayerGraphProps {
|
|
|
96
137
|
* between them grow), so lines and their labels have more room. Up past the drawn height: the diagram scrolls up and
|
|
97
138
|
* down inside a shorter frame. ↑↓ 16 px, Enter or a double-click goes back. Default false. */
|
|
98
139
|
resizable?: boolean;
|
|
99
|
-
/** Remembers the
|
|
140
|
+
/** Remembers the reader's choices in localStorage under this name: the dragged height (ui-lg-height:<name>) and the
|
|
141
|
+
* line-label switch (ui-lg-labels:<name>); it also names the diagram's sideways scroll, kept while the page lives.
|
|
142
|
+
* Without it nothing is stored. */
|
|
143
|
+
storageKey?: string;
|
|
144
|
+
/** @deprecated use storageKey. */
|
|
100
145
|
heightKey?: string;
|
|
101
146
|
/** Controls of the page on the same row as 「圖/清單」, at its left, such as the page's own 「依元件/依檔案」 Tabs,
|
|
102
147
|
* so two switches do not sit on two rows. */
|
|
103
148
|
toolbar?: React.ReactNode;
|
|
104
|
-
/**
|
|
149
|
+
/** @deprecated use labels.listNodes and labels.listEdges. */
|
|
105
150
|
listLabels?: {
|
|
106
151
|
nodes?: string;
|
|
107
152
|
edges?: string;
|
|
108
153
|
};
|
|
109
|
-
/**
|
|
110
|
-
* tab). Default: the box ids. */
|
|
154
|
+
/** @deprecated use storageKey. */
|
|
111
155
|
scrollKey?: string;
|
|
156
|
+
/** Extra class on the root element. */
|
|
112
157
|
className?: string;
|
|
113
158
|
}
|
|
114
159
|
/** Architecture as layers of boxes with arrows. Line width shows how often; inferred relations are dashed and labelled;
|
|
115
160
|
* shared items are listed under the diagram instead of drawn. Wider than its box: the boxes narrow (down to 120 px),
|
|
116
161
|
* then the whole diagram scales down (to 0.75 at least); past that it scrolls sideways at full width (PM, WA). */
|
|
117
|
-
export declare function LayerGraph(
|
|
162
|
+
export declare function LayerGraph(props: LayerGraphProps): React.JSX.Element;
|