@seanyeh77/ui 0.43.1 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1 -1
- package/dist/bundle.js +20 -20
- package/dist/components/AccentPicker/AccentPicker.d.ts +1 -0
- package/dist/components/AccentPicker/AccentPicker.js +92 -72
- package/dist/components/AccentPicker/AccentPicker.js.map +1 -1
- package/dist/components/ActionBar/ActionBar.d.ts +2 -0
- package/dist/components/ActionBar/ActionBar.js.map +1 -1
- package/dist/components/AiMark/AiMark.d.ts +1 -0
- package/dist/components/AiMark/AiMark.js.map +1 -1
- package/dist/components/Alert/Alert.d.ts +6 -3
- package/dist/components/Alert/Alert.js +18 -14
- package/dist/components/Alert/Alert.js.map +1 -1
- package/dist/components/AppShell/AppShell.d.ts +10 -4
- package/dist/components/AppShell/AppShell.js +30 -19
- package/dist/components/AppShell/AppShell.js.map +1 -1
- package/dist/components/Badge/Badge.d.ts +24 -7
- package/dist/components/Badge/Badge.js +78 -21
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/BarChart/BarChart.d.ts +14 -1
- package/dist/components/BarChart/BarChart.js +88 -59
- package/dist/components/BarChart/BarChart.js.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/Button/Button.d.ts +4 -1
- package/dist/components/Button/Button.js +17 -3
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Calendar/Calendar.d.ts +11 -2
- package/dist/components/Calendar/Calendar.js +16 -5
- package/dist/components/Calendar/Calendar.js.map +1 -1
- package/dist/components/Card/Card.d.ts +1 -0
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +24 -8
- package/dist/components/Checkbox/Checkbox.js +22 -9
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/CodeView/CodeView.d.ts +3 -0
- package/dist/components/CodeView/CodeView.js +6 -6
- package/dist/components/CodeView/CodeView.js.map +1 -1
- package/dist/components/CommandPalette/CommandPalette.d.ts +16 -4
- package/dist/components/CommandPalette/CommandPalette.js +38 -11
- package/dist/components/CommandPalette/CommandPalette.js.map +1 -1
- package/dist/components/ConsoleLayout/ConsoleLayout.d.ts +2 -3
- package/dist/components/ConsoleLayout/ConsoleLayout.js +4 -1
- package/dist/components/ConsoleLayout/ConsoleLayout.js.map +1 -1
- package/dist/components/DangerZone/DangerZone.d.ts +3 -2
- package/dist/components/DangerZone/DangerZone.js +3 -2
- package/dist/components/DangerZone/DangerZone.js.map +1 -1
- package/dist/components/DataTable/DataTable.d.ts +16 -4
- package/dist/components/DataTable/DataTable.js +346 -208
- package/dist/components/DataTable/DataTable.js.map +1 -1
- package/dist/components/DataTable/SortButton.js +48 -5
- package/dist/components/DataTable/SortButton.js.map +1 -1
- package/dist/components/DataTable/filters.js +2 -1
- package/dist/components/DataTable/filters.js.map +1 -1
- package/dist/components/DataTable/parts.js +1 -1
- package/dist/components/DataTable/parts.js.map +1 -1
- package/dist/components/DataTable/types.d.ts +10 -3
- package/dist/components/DatePicker/DatePicker.d.ts +9 -7
- package/dist/components/DatePicker/DatePicker.js +16 -6
- package/dist/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +12 -7
- package/dist/components/DateRangePicker/DateRangePicker.js +81 -45
- package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/DetailList/DetailList.d.ts +2 -0
- package/dist/components/DetailList/DetailList.js.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +56 -20
- package/dist/components/Dialog/Dialog.js +46 -14
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +18 -5
- package/dist/components/Drawer/Drawer.js +87 -24
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/EmptyState/EmptyState.d.ts +2 -2
- package/dist/components/EmptyState/EmptyState.js +3 -2
- package/dist/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/components/ErrorPage/ErrorPage.d.ts +4 -0
- package/dist/components/ErrorPage/ErrorPage.js +2 -1
- package/dist/components/ErrorPage/ErrorPage.js.map +1 -1
- package/dist/components/EventTimeline/EventTimeline.d.ts +23 -5
- package/dist/components/EventTimeline/EventTimeline.js +64 -20
- package/dist/components/EventTimeline/EventTimeline.js.map +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts +10 -2
- package/dist/components/FileUpload/FileUpload.js +5 -2
- package/dist/components/FileUpload/FileUpload.js.map +1 -1
- package/dist/components/FormGrid/FormGrid.d.ts +3 -1
- package/dist/components/FormGrid/FormGrid.js +5 -2
- package/dist/components/FormGrid/FormGrid.js.map +1 -1
- package/dist/components/Graph/Graph.d.ts +1 -0
- package/dist/components/Graph/Graph.js +8 -4
- package/dist/components/Graph/Graph.js.map +1 -1
- package/dist/components/Grid/Grid.d.ts +11 -4
- package/dist/components/Grid/Grid.js +14 -2
- package/dist/components/Grid/Grid.js.map +1 -1
- package/dist/components/IconButton/IconButton.d.ts +2 -1
- package/dist/components/IconButton/IconButton.js +10 -1
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/InlineCode/InlineCode.d.ts +6 -0
- package/dist/components/InlineCode/InlineCode.js +10 -6
- package/dist/components/InlineCode/InlineCode.js.map +1 -1
- package/dist/components/KpiCard/KpiCard.d.ts +7 -3
- package/dist/components/KpiCard/KpiCard.js +40 -25
- package/dist/components/KpiCard/KpiCard.js.map +1 -1
- package/dist/components/LayerGraph/LayerGraph.d.ts +68 -23
- package/dist/components/LayerGraph/LayerGraph.js +178 -97
- package/dist/components/LayerGraph/LayerGraph.js.map +1 -1
- package/dist/components/LineChart/LineChart.d.ts +10 -3
- package/dist/components/LineChart/LineChart.js +55 -23
- package/dist/components/LineChart/LineChart.js.map +1 -1
- package/dist/components/Link/Link.d.ts +17 -0
- package/dist/components/Link/Link.js +47 -0
- package/dist/components/Link/Link.js.map +1 -0
- package/dist/components/LoadingBar/LoadingBar.d.ts +1 -0
- package/dist/components/LoadingBar/LoadingBar.js.map +1 -1
- package/dist/components/LoginCard/LoginCard.d.ts +9 -3
- package/dist/components/LoginCard/LoginCard.js +99 -78
- package/dist/components/LoginCard/LoginCard.js.map +1 -1
- package/dist/components/Markdown/Markdown.d.ts +1 -0
- package/dist/components/Markdown/Markdown.js +20 -2
- package/dist/components/Markdown/Markdown.js.map +1 -1
- package/dist/components/Menu/Menu.d.ts +4 -2
- package/dist/components/Menu/Menu.js +43 -33
- package/dist/components/Menu/Menu.js.map +1 -1
- package/dist/components/Meter/Meter.d.ts +4 -0
- package/dist/components/Meter/Meter.js.map +1 -1
- package/dist/components/MobileTabBar/MobileTabBar.d.ts +3 -0
- package/dist/components/MobileTabBar/MobileTabBar.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +7 -6
- package/dist/components/MultiSelect/MultiSelect.js +27 -9
- package/dist/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/components/NotificationBell/NotificationBell.d.ts +4 -0
- package/dist/components/NotificationBell/NotificationBell.js +4 -3
- package/dist/components/NotificationBell/NotificationBell.js.map +1 -1
- package/dist/components/PageHeader/PageHeader.d.ts +34 -0
- package/dist/components/PageHeader/PageHeader.js +68 -0
- package/dist/components/PageHeader/PageHeader.js.map +1 -0
- package/dist/components/Popover/Popover.d.ts +11 -4
- package/dist/components/Popover/Popover.js +17 -7
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +2 -0
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/ProgressRing/ProgressRing.d.ts +1 -0
- package/dist/components/ProgressRing/ProgressRing.js.map +1 -1
- package/dist/components/ProjectSwitcher/ProjectSwitcher.d.ts +5 -1
- package/dist/components/ProjectSwitcher/ProjectSwitcher.js +16 -3
- package/dist/components/ProjectSwitcher/ProjectSwitcher.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +22 -5
- package/dist/components/RadioGroup/RadioGroup.js +48 -47
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/RelativeTime/RelativeTime.d.ts +10 -0
- package/dist/components/RelativeTime/RelativeTime.js +44 -0
- package/dist/components/RelativeTime/RelativeTime.js.map +1 -0
- package/dist/components/SearchField/SearchField.d.ts +2 -0
- package/dist/components/SearchField/SearchField.js.map +1 -1
- package/dist/components/Section/Section.d.ts +4 -0
- package/dist/components/Section/Section.js +8 -22
- package/dist/components/Section/Section.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +22 -9
- package/dist/components/SegmentedControl/SegmentedControl.js +20 -19
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/components/Select/Select.d.ts +7 -11
- package/dist/components/Select/Select.js +7 -3
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/SettingsLayout/SettingsLayout.d.ts +33 -4
- package/dist/components/SettingsLayout/SettingsLayout.js +62 -14
- package/dist/components/SettingsLayout/SettingsLayout.js.map +1 -1
- package/dist/components/SideNav/SideNav.d.ts +2 -0
- package/dist/components/SideNav/SideNav.js +3 -3
- package/dist/components/SideNav/SideNav.js.map +1 -1
- package/dist/components/SplitPane/SplitPane.d.ts +1 -0
- package/dist/components/SplitPane/SplitPane.js.map +1 -1
- package/dist/components/StatusBand/StatusBand.d.ts +1 -0
- package/dist/components/StatusBand/StatusBand.js.map +1 -1
- package/dist/components/Suggestion/Suggestion.d.ts +6 -0
- package/dist/components/Suggestion/Suggestion.js.map +1 -1
- package/dist/components/Switch/Switch.d.ts +13 -3
- package/dist/components/Switch/Switch.js +16 -7
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +8 -1
- package/dist/components/Tabs/Tabs.js +6 -3
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tag/Tag.d.ts +15 -7
- package/dist/components/Tag/Tag.js +22 -10
- package/dist/components/Tag/Tag.js.map +1 -1
- package/dist/components/Term/Term.d.ts +8 -3
- package/dist/components/Term/Term.js +1 -1
- package/dist/components/Term/Term.js.map +1 -1
- package/dist/components/TextArea/TextArea.d.ts +6 -9
- package/dist/components/TextArea/TextArea.js +25 -12
- package/dist/components/TextArea/TextArea.js.map +1 -1
- package/dist/components/TextField/TextField.d.ts +8 -11
- package/dist/components/TextField/TextField.js +9 -7
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/ThemePicker/ThemePicker.d.ts +1 -0
- package/dist/components/ThemePicker/ThemePicker.js +35 -34
- package/dist/components/ThemePicker/ThemePicker.js.map +1 -1
- package/dist/components/TimeControl/TimeControl.d.ts +1 -0
- package/dist/components/TimeControl/TimeControl.js.map +1 -1
- package/dist/components/Toast/Toast.d.ts +56 -3
- package/dist/components/Toast/Toast.js +191 -8
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/TopBar/TopBar.d.ts +6 -2
- package/dist/components/TopBar/TopBar.js +7 -1
- package/dist/components/TopBar/TopBar.js.map +1 -1
- package/dist/components/Tour/Tour.d.ts +14 -3
- package/dist/components/Tour/Tour.js +26 -14
- package/dist/components/Tour/Tour.js.map +1 -1
- package/dist/components/TreeList/TreeList.d.ts +28 -4
- package/dist/components/TreeList/TreeList.js +32 -20
- package/dist/components/TreeList/TreeList.js.map +1 -1
- package/dist/components/Workbench/Workbench.d.ts +1 -0
- package/dist/components/Workbench/Workbench.js +24 -12
- package/dist/components/Workbench/Workbench.js.map +1 -1
- package/dist/components/ZoneMap/ZoneMap.d.ts +12 -2
- package/dist/components/ZoneMap/ZoneMap.js +13 -5
- package/dist/components/ZoneMap/ZoneMap.js.map +1 -1
- package/dist/components/useFormErrors/useFormErrors.d.ts +20 -0
- package/dist/components/useFormErrors/useFormErrors.js +55 -0
- package/dist/components/useFormErrors/useFormErrors.js.map +1 -0
- package/dist/css/AccentPicker.css +1 -0
- package/dist/css/Alert.css +8 -19
- package/dist/css/AppShell.css +1 -0
- package/dist/css/Badge.css +19 -45
- package/dist/css/BarChart.css +21 -3
- package/dist/css/Button.css +6 -1
- package/dist/css/Card.css +8 -8
- package/dist/css/Checkbox.css +20 -0
- package/dist/css/CodeView.css +3 -2
- package/dist/css/DangerZone.css +5 -3
- package/dist/css/DataTable.css +303 -69
- package/dist/css/DatePicker.css +1 -0
- package/dist/css/DateRangePicker.css +24 -2
- package/dist/css/Drawer.css +31 -0
- package/dist/css/EmptyState.css +1 -0
- package/dist/css/ErrorPage.css +4 -1
- package/dist/css/EventTimeline.css +34 -5
- package/dist/css/FileUpload.css +1 -0
- package/dist/css/FormGrid.css +12 -3
- package/dist/css/Graph.css +9 -1
- package/dist/css/Grid.css +8 -0
- package/dist/css/KpiCard.css +13 -1
- package/dist/css/LayerGraph.css +40 -15
- package/dist/css/Link.css +23 -0
- package/dist/css/LoginCard.css +17 -11
- package/dist/css/Markdown.css +31 -2
- package/dist/css/Menu.css +0 -2
- package/dist/css/Meter.css +16 -0
- package/dist/css/MultiSelect.css +1 -0
- package/dist/css/NotificationBell.css +1 -0
- package/dist/css/PageHeader.css +50 -0
- package/dist/css/ProgressBar.css +12 -0
- package/dist/css/ProjectSwitcher.css +25 -23
- package/dist/css/RelativeTime.css +2 -0
- package/dist/css/SegmentedControl.css +38 -10
- package/dist/css/Select.css +1 -0
- package/dist/css/SettingsLayout.css +29 -8
- package/dist/css/SideNav.css +4 -1
- package/dist/css/Skeleton.css +22 -1
- package/dist/css/Suggestion.css +1 -1
- package/dist/css/Switch.css +27 -0
- package/dist/css/Tabs.css +8 -7
- package/dist/css/Tag.css +19 -12
- package/dist/css/Term.css +1 -1
- package/dist/css/TextArea.css +1 -0
- package/dist/css/TextField.css +1 -0
- package/dist/css/Toast.css +101 -4
- package/dist/css/TopBar.css +21 -2
- package/dist/css/Tour.css +1 -1
- package/dist/css/TreeList.css +7 -3
- package/dist/css/Workbench.css +13 -1
- package/dist/css/ZoneMap.css +0 -1
- package/dist/css/base.css +45 -0
- package/dist/css/end.css +119 -5
- package/dist/deprecated.d.ts +3 -0
- package/dist/deprecated.js +13 -0
- package/dist/deprecated.js.map +1 -0
- package/dist/fonts.css +2 -7543
- package/dist/format.d.ts +3 -1
- package/dist/format.js +15 -5
- package/dist/format.js.map +1 -1
- package/dist/generated/themeDefaults.d.ts +8 -0
- package/dist/generated/themeDefaults.js +35 -0
- package/dist/generated/themeDefaults.js.map +1 -0
- package/dist/i18n.d.ts +7 -2
- package/dist/i18n.js +65 -10
- package/dist/i18n.js.map +1 -1
- package/dist/icons/Icon.d.ts +3 -1
- package/dist/icons/Icon.js.map +1 -1
- package/dist/index.d.ts +23 -14
- package/dist/index.js +14 -8
- package/dist/internal/Field.d.ts +19 -0
- package/dist/internal/Field.js +13 -6
- package/dist/internal/Field.js.map +1 -1
- package/dist/internal/FloatingPanel.js +2 -1
- package/dist/internal/FloatingPanel.js.map +1 -1
- package/dist/internal/chart.d.ts +4 -0
- package/dist/internal/chart.js +89 -19
- package/dist/internal/chart.js.map +1 -1
- package/dist/internal/codeSpans.js +20 -0
- package/dist/internal/codeSpans.js.map +1 -0
- package/dist/internal/dev.js +9 -4
- package/dist/internal/dev.js.map +1 -1
- package/dist/internal/focus.js +27 -3
- package/dist/internal/focus.js.map +1 -1
- package/dist/internal/focusMain.js +6 -2
- package/dist/internal/focusMain.js.map +1 -1
- package/dist/internal/open.d.ts +14 -0
- package/dist/internal/open.js +28 -0
- package/dist/internal/open.js.map +1 -0
- package/dist/internal/roving.js +37 -0
- package/dist/internal/roving.js.map +1 -0
- package/dist/internal/shell.js +12 -0
- package/dist/internal/shell.js.map +1 -0
- package/dist/internal/stored.js +89 -0
- package/dist/internal/stored.js.map +1 -0
- package/dist/internal/tableTools.js +46 -4
- package/dist/internal/tableTools.js.map +1 -1
- package/dist/internal/util.js +8 -17
- package/dist/internal/util.js.map +1 -1
- package/dist/locale.d.ts +17 -0
- package/dist/locale.js +29 -0
- package/dist/locale.js.map +1 -0
- package/dist/styles.css +1296 -400
- package/dist/theme.d.ts +23 -5
- package/dist/theme.js +85 -25
- package/dist/theme.js.map +1 -1
- package/dist/tokens.css +3 -0
- package/docs/AccentPicker.md +3 -1
- package/docs/Alert.md +4 -3
- package/docs/AppShell.md +11 -10
- package/docs/Badge.md +26 -16
- package/docs/BarChart.md +7 -4
- package/docs/Button.md +4 -5
- package/docs/Calendar.md +2 -2
- package/docs/Card.md +9 -8
- package/docs/Checkbox.md +4 -1
- package/docs/CodeView.md +30 -43
- package/docs/CommandPalette.md +3 -2
- package/docs/ConsoleLayout.md +5 -5
- package/docs/DangerZone.md +3 -2
- package/docs/DataColors.md +2 -2
- package/docs/DataTable.md +29 -141
- package/docs/DatePicker.md +1 -0
- package/docs/DateRangePicker.md +3 -0
- package/docs/DetailList.md +9 -9
- package/docs/Dialog.md +8 -4
- package/docs/Drawer.md +7 -4
- package/docs/ErrorPage.md +1 -1
- package/docs/EventTimeline.md +23 -12
- package/docs/FileUpload.md +1 -1
- package/docs/FormGrid.md +2 -1
- package/docs/Format.md +5 -3
- package/docs/Graph.md +1 -1
- package/docs/Grid.md +5 -1
- package/docs/KpiCard.md +6 -4
- package/docs/LayerGraph.md +18 -53
- package/docs/LineChart.md +5 -3
- package/docs/Link.md +22 -0
- package/docs/LoginCard.md +7 -3
- package/docs/Markdown.md +3 -13
- package/docs/Menu.md +2 -0
- package/docs/Meter.md +1 -0
- package/docs/MultiSelect.md +2 -1
- package/docs/NotificationBell.md +1 -0
- package/docs/PageHeader.md +34 -0
- package/docs/Popover.md +3 -1
- package/docs/ProgressBar.md +3 -1
- package/docs/ProjectSwitcher.md +14 -14
- package/docs/RadioGroup.md +2 -0
- package/docs/RelativeTime.md +23 -0
- package/docs/Section.md +1 -1
- package/docs/SegmentedControl.md +9 -6
- package/docs/Select.md +2 -1
- package/docs/SettingsLayout.md +19 -4
- package/docs/SideNav.md +1 -1
- package/docs/Skeleton.md +2 -1
- package/docs/Switch.md +3 -1
- package/docs/Tabs.md +4 -3
- package/docs/Tag.md +9 -7
- package/docs/Term.md +3 -3
- package/docs/TextArea.md +2 -1
- package/docs/TextField.md +5 -3
- package/docs/ThemePicker.md +3 -1
- package/docs/Toast.md +17 -5
- package/docs/TopBar.md +8 -5
- package/docs/Tour.md +3 -2
- package/docs/TreeList.md +10 -37
- package/docs/Workbench.md +1 -48
- package/docs/ZoneMap.md +5 -5
- package/docs/agents.md +82 -0
- package/docs/code.md +2 -2
- package/docs/components.json +314 -0
- package/docs/data.md +9 -18
- package/docs/forms.md +6 -5
- package/docs/guidelines.md +39 -31
- package/docs/icons.md +9 -0
- package/docs/layout.md +16 -20
- package/docs/motion.md +31 -56
- package/docs/theme.md +15 -18
- package/docs/useFormErrors.md +35 -0
- package/package.json +8 -7
- package/dist/bundle.js.map +0 -1
- package/dist/fonts/LICENSE-OFL.txt +0 -93
- package/dist/fonts/geist-mono-cyrillic-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-ext-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-ext-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-ext-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-ext-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-ext-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-ext-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-symbols2-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-symbols2-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-symbols2-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-symbols2-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-vietnamese-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-vietnamese-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-vietnamese-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-vietnamese-700-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-400-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-500-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-600-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-700-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-500-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-600-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-400-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-500-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-600-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-700-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-400-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-500-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-600-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-700-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-400-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-500-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-600-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-700-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-400-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-500-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-600-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-700-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-400-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-500-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-600-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-0-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-0-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-0-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-0-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-1-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-1-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-1-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-1-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-10-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-10-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-10-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-10-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-101-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-101-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-101-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-101-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-102-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-102-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-102-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-102-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-103-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-103-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-103-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-103-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-104-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-104-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-104-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-104-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-105-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-105-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-105-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-105-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-106-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-106-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-106-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-106-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-107-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-107-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-107-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-107-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-108-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-108-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-108-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-108-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-109-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-109-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-109-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-109-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-11-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-11-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-11-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-11-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-110-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-110-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-110-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-110-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-111-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-111-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-111-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-111-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-112-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-112-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-112-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-112-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-113-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-113-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-113-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-113-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-114-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-114-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-114-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-114-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-115-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-115-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-115-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-115-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-116-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-116-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-116-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-116-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-117-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-117-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-117-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-117-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-118-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-118-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-118-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-118-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-119-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-119-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-119-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-119-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-12-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-12-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-12-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-12-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-120-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-120-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-120-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-120-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-121-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-121-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-121-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-121-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-122-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-122-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-122-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-122-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-123-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-123-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-123-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-123-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-2-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-2-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-2-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-2-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-23-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-23-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-23-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-23-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-24-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-24-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-24-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-24-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-25-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-25-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-25-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-25-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-26-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-26-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-26-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-26-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-27-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-27-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-27-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-27-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-28-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-28-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-28-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-28-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-29-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-29-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-29-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-29-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-30-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-30-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-30-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-30-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-31-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-31-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-31-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-31-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-32-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-32-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-32-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-32-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-33-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-33-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-33-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-33-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-34-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-34-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-34-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-34-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-35-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-35-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-35-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-35-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-36-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-36-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-36-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-36-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-37-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-37-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-37-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-37-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-38-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-38-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-38-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-38-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-39-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-39-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-39-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-39-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-4-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-4-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-4-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-4-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-40-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-40-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-40-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-40-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-41-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-41-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-41-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-41-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-42-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-42-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-42-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-42-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-43-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-43-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-43-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-43-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-44-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-44-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-44-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-44-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-45-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-45-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-45-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-45-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-46-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-46-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-46-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-46-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-47-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-47-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-47-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-47-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-48-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-48-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-48-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-48-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-49-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-49-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-49-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-49-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-50-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-50-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-50-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-50-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-51-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-51-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-51-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-51-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-52-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-52-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-52-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-52-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-53-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-53-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-53-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-53-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-54-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-54-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-54-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-54-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-55-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-55-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-55-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-55-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-56-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-56-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-56-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-56-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-57-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-57-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-57-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-57-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-58-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-58-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-58-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-58-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-59-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-59-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-59-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-59-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-60-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-60-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-60-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-60-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-61-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-61-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-61-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-61-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-62-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-62-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-62-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-62-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-63-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-63-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-63-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-63-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-64-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-64-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-64-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-64-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-65-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-65-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-65-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-65-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-66-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-66-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-66-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-66-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-67-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-67-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-67-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-67-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-68-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-68-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-68-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-68-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-69-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-69-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-69-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-69-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-70-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-70-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-70-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-70-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-71-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-71-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-71-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-71-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-72-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-72-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-72-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-72-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-73-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-73-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-73-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-73-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-74-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-74-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-74-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-74-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-75-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-75-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-75-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-75-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-76-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-76-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-76-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-76-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-77-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-77-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-77-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-77-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-78-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-78-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-78-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-78-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-79-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-79-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-79-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-79-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-80-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-80-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-80-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-80-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-81-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-81-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-81-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-81-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-82-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-82-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-82-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-82-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-83-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-83-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-83-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-83-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-84-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-84-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-84-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-84-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-85-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-85-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-85-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-85-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-86-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-86-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-86-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-86-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-87-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-87-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-87-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-87-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-88-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-88-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-88-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-88-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-89-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-89-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-89-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-89-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-90-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-90-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-90-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-90-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-91-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-91-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-91-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-91-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-92-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-92-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-92-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-92-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-93-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-93-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-93-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-93-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-94-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-94-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-94-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-94-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-95-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-95-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-95-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-95-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-96-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-96-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-96-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-96-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-cyrillic-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-cyrillic-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-cyrillic-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-cyrillic-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-ext-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-ext-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-ext-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-ext-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-vietnamese-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-vietnamese-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-vietnamese-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-vietnamese-700-normal.woff2 +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Decimals, format } from "./format.js";
|
|
2
|
-
import { CountUnit, addMessages, setLocale, tr } from "./i18n.js";
|
|
3
|
-
import { IconName } from "./icons/names.js";
|
|
4
2
|
import { AppShell, AppShellProps } from "./components/AppShell/AppShell.js";
|
|
5
|
-
import {
|
|
3
|
+
import { IconName } from "./icons/names.js";
|
|
4
|
+
import { Grid, GridProps, GridRatio, Page, PageProps } from "./components/Grid/Grid.js";
|
|
6
5
|
import { AccentPicker, AccentPickerProps } from "./components/AccentPicker/AccentPicker.js";
|
|
7
|
-
import { focusMain } from "./internal/focusMain.js";
|
|
8
6
|
import { ActionBar, ActionBarAction, ActionBarProps } from "./components/ActionBar/ActionBar.js";
|
|
7
|
+
import { focusMain } from "./internal/focusMain.js";
|
|
9
8
|
import { Alert, AlertProps, AlertTone } from "./components/Alert/Alert.js";
|
|
10
|
-
import { Badge, BadgeProps, BadgeStatus } from "./components/Badge/Badge.js";
|
|
9
|
+
import { Badge, BadgePreset, BadgeProps, BadgeStatus, BadgeTone } from "./components/Badge/Badge.js";
|
|
11
10
|
import { BarChart, BarChartProps, BarDatum } from "./components/BarChart/BarChart.js";
|
|
12
11
|
import { Breadcrumb, BreadcrumbItem, BreadcrumbProps } from "./components/Breadcrumb/Breadcrumb.js";
|
|
13
12
|
import { Button, ButtonProps, DangerConfirm } from "./components/Button/Button.js";
|
|
@@ -15,23 +14,25 @@ import { Calendar, CalendarProps, DayState } from "./components/Calendar/Calenda
|
|
|
15
14
|
import { Card, CardProps } from "./components/Card/Card.js";
|
|
16
15
|
import { Checkbox, CheckboxProps } from "./components/Checkbox/Checkbox.js";
|
|
17
16
|
import { CodeLink, CodeView, CodeViewHandle, CodeViewProps } from "./components/CodeView/CodeView.js";
|
|
18
|
-
import { CommandPalette, CommandPaletteProps, PaletteItem } from "./components/CommandPalette/CommandPalette.js";
|
|
17
|
+
import { CommandPalette, CommandPaletteProps, PaletteItem, PaletteKind } from "./components/CommandPalette/CommandPalette.js";
|
|
19
18
|
import { DangerZone, DangerZoneProps } from "./components/DangerZone/DangerZone.js";
|
|
20
19
|
import { DataTable, DataTableProps } from "./components/DataTable/DataTable.js";
|
|
21
20
|
import { DatePicker, DatePickerProps } from "./components/DatePicker/DatePicker.js";
|
|
22
21
|
import { DateRange, DateRangePicker, DateRangePickerProps } from "./components/DateRangePicker/DateRangePicker.js";
|
|
23
22
|
import { DetailList, DetailListItem, DetailListProps } from "./components/DetailList/DetailList.js";
|
|
24
23
|
import { Dialog, DialogProps } from "./components/Dialog/Dialog.js";
|
|
25
|
-
import { DataTableColumn, DataTableFilter, DataTableView, FilterOption, FilterValue, RangeValue, Row, RowKey, Total } from "./components/DataTable/types.js";
|
|
26
24
|
import { SplitPane, SplitPaneProps } from "./components/SplitPane/SplitPane.js";
|
|
27
25
|
import { Drawer, DrawerProps } from "./components/Drawer/Drawer.js";
|
|
28
26
|
import { EmptyState, EmptyStateProps } from "./components/EmptyState/EmptyState.js";
|
|
27
|
+
import { DataTableColumn, DataTableFilter, DataTableView, FilterOption, FilterValue, RangeValue, Row, RowKey, Total } from "./components/DataTable/types.js";
|
|
29
28
|
import { ErrorPage, ErrorPageProps } from "./components/ErrorPage/ErrorPage.js";
|
|
30
29
|
import { FileUpload, FileUploadProps, UploadFile } from "./components/FileUpload/FileUpload.js";
|
|
31
30
|
import { FormGrid, FormGridProps } from "./components/FormGrid/FormGrid.js";
|
|
32
31
|
import { GraphDefs, GraphLegend, GraphLegendItem, GraphLegendProps } from "./components/Graph/Graph.js";
|
|
33
32
|
import { IconButton, IconButtonHint, IconButtonProps } from "./components/IconButton/IconButton.js";
|
|
34
33
|
import { CodeText, CodeTextProps, InlineCode, InlineCodeProps, OnRef, RefHref, isCodeRef } from "./components/InlineCode/InlineCode.js";
|
|
34
|
+
import { Link, LinkProps } from "./components/Link/Link.js";
|
|
35
|
+
import { PageHeader, PageHeaderAction, PageHeaderProps } from "./components/PageHeader/PageHeader.js";
|
|
35
36
|
import { Markdown, MarkdownProps, safeHref } from "./components/Markdown/Markdown.js";
|
|
36
37
|
import { Section, SectionGroup, SectionGroupProps, SectionGroupToggle, SectionGroupToggleProps, SectionProps } from "./components/Section/Section.js";
|
|
37
38
|
import { KpiCard, KpiCardProps } from "./components/KpiCard/KpiCard.js";
|
|
@@ -40,8 +41,9 @@ import { LineBand, LineChart, LineChartProps, LineSeries, LineThreshold } from "
|
|
|
40
41
|
import { StatusBand, StatusBandProps, StatusLegend, StatusSegment } from "./components/StatusBand/StatusBand.js";
|
|
41
42
|
import { Meter, MeterProps } from "./components/Meter/Meter.js";
|
|
42
43
|
import { Zone, ZoneMap, ZoneMapProps } from "./components/ZoneMap/ZoneMap.js";
|
|
43
|
-
import { EventKind, EventTimeline, EventTimelineProps, TimelineEvent } from "./components/EventTimeline/EventTimeline.js";
|
|
44
|
-
import { ConsoleExtra, ConsoleLayout, ConsoleLayoutProps
|
|
44
|
+
import { EventKind, EventTimeline, EventTimelineProps, TimelineEvent, TimelineKind } from "./components/EventTimeline/EventTimeline.js";
|
|
45
|
+
import { ConsoleExtra, ConsoleLayout, ConsoleLayoutProps } from "./components/ConsoleLayout/ConsoleLayout.js";
|
|
46
|
+
import { consoleZoom } from "./deprecated.js";
|
|
45
47
|
import { TimeControl, TimeControlProps } from "./components/TimeControl/TimeControl.js";
|
|
46
48
|
import { LoadingBar, LoadingBarProps } from "./components/LoadingBar/LoadingBar.js";
|
|
47
49
|
import { LoginCard, LoginCardProps } from "./components/LoginCard/LoginCard.js";
|
|
@@ -51,36 +53,43 @@ import { MultiSelect, MultiSelectOption, MultiSelectProps } from "./components/M
|
|
|
51
53
|
import { NotificationBell, NotificationBellProps, NotificationItem } from "./components/NotificationBell/NotificationBell.js";
|
|
52
54
|
import { Popover, PopoverProps } from "./components/Popover/Popover.js";
|
|
53
55
|
import { ProgressBar, ProgressBarProps } from "./components/ProgressBar/ProgressBar.js";
|
|
56
|
+
import { RelativeTime, RelativeTimeProps } from "./components/RelativeTime/RelativeTime.js";
|
|
54
57
|
import { ProgressRing, ProgressRingProps } from "./components/ProgressRing/ProgressRing.js";
|
|
55
58
|
import { ProjectOption, ProjectStatus, ProjectSwitcher, ProjectSwitcherProps } from "./components/ProjectSwitcher/ProjectSwitcher.js";
|
|
56
59
|
import { RadioGroup, RadioGroupProps, RadioOption } from "./components/RadioGroup/RadioGroup.js";
|
|
57
60
|
import { SearchField, SearchFieldProps } from "./components/SearchField/SearchField.js";
|
|
58
61
|
import { Select, SelectOption, SelectProps } from "./components/Select/Select.js";
|
|
59
|
-
import { SettingsCategory, SettingsLayout, SettingsLayoutProps, SettingsSection, SettingsSectionProps } from "./components/SettingsLayout/SettingsLayout.js";
|
|
62
|
+
import { SettingsCategory, SettingsLayout, SettingsLayoutProps, SettingsRow, SettingsRowProps, SettingsSection, SettingsSectionProps } from "./components/SettingsLayout/SettingsLayout.js";
|
|
60
63
|
import { NavBrand, NavItem, NavSection, SideNav, SideNavProps } from "./components/SideNav/SideNav.js";
|
|
61
64
|
import { Skeleton, SkeletonProps } from "./components/Skeleton/Skeleton.js";
|
|
62
65
|
import { Suggestion, SuggestionProps } from "./components/Suggestion/Suggestion.js";
|
|
63
66
|
import { Switch, SwitchProps } from "./components/Switch/Switch.js";
|
|
64
67
|
import { TabItem, Tabs, TabsProps } from "./components/Tabs/Tabs.js";
|
|
65
|
-
import { SegmentedControl, SegmentedControlProps, SegmentedItem } from "./components/SegmentedControl/SegmentedControl.js";
|
|
68
|
+
import { SegmentedControl, SegmentedControlProps, SegmentedItem, SegmentedOption } from "./components/SegmentedControl/SegmentedControl.js";
|
|
66
69
|
import { Tag, TagProps } from "./components/Tag/Tag.js";
|
|
67
70
|
import { Term, TermProps } from "./components/Term/Term.js";
|
|
68
71
|
import { TermDef, TermsMark } from "./internal/terms.js";
|
|
69
72
|
import { TextArea, TextAreaProps } from "./components/TextArea/TextArea.js";
|
|
70
73
|
import { TextField, TextFieldProps } from "./components/TextField/TextField.js";
|
|
74
|
+
import { FieldProps } from "./internal/Field.js";
|
|
75
|
+
import { OpenChangeReason, OpenStateProps } from "./internal/open.js";
|
|
71
76
|
import { ThemePicker, ThemePickerProps } from "./components/ThemePicker/ThemePicker.js";
|
|
72
|
-
import {
|
|
77
|
+
import { FormErrors, UseFormErrors, useFormErrors } from "./components/useFormErrors/useFormErrors.js";
|
|
78
|
+
import { TOAST_DURATION, Toast, ToastAction, ToastOptions, ToastProps, ToastTone, Toaster, ToasterProps, toast, useToast } from "./components/Toast/Toast.js";
|
|
79
|
+
import { ThemePreset } from "./generated/themeDefaults.js";
|
|
73
80
|
import { Tooltip, TooltipProps } from "./components/Tooltip/Tooltip.js";
|
|
74
81
|
import { TopBar, TopBarProps } from "./components/TopBar/TopBar.js";
|
|
75
82
|
import { Tour, TourProps, TourStep, useTour } from "./components/Tour/Tour.js";
|
|
76
83
|
import { AiMark, AiMarkProps } from "./components/AiMark/AiMark.js";
|
|
77
84
|
import { TreeList, TreeListProps, TreeMark, TreeNode } from "./components/TreeList/TreeList.js";
|
|
78
85
|
import { CodeLanguage, Token, TokenClass, Tokenizer } from "./components/CodeView/tokens.js";
|
|
86
|
+
import { CountUnit, addMessages, setLocale, subscribeLocale, tr } from "./i18n.js";
|
|
87
|
+
import { LocaleProvider, LocaleProviderProps, useLocale } from "./locale.js";
|
|
79
88
|
import { CustomIcon, Icon, IconProps, IconSource } from "./icons/Icon.js";
|
|
80
89
|
import { icons } from "./icons/map.js";
|
|
81
90
|
import { preloadIcons } from "./icons/store.js";
|
|
82
91
|
import { MOTION } from "./motion.js";
|
|
83
|
-
import { ThemeSetting, divergeToken, heatToken, initTheme, setAccent, setTheme, textOn } from "./theme.js";
|
|
92
|
+
import { ThemeSetting, divergeToken, heatToken, initTheme, pickedAccent, resetAccent, setAccent, setTheme, storedAccent, storedTheme, textOn, themePreset } from "./theme.js";
|
|
84
93
|
import { announce } from "./announce.js";
|
|
85
94
|
import { Workbench, WorkbenchApi, WorkbenchHandle, WorkbenchLayout, WorkbenchProps, WorkbenchRegion, WorkbenchView, useWorkbench } from "./components/Workbench/Workbench.js";
|
|
86
|
-
export { AccentPicker, type AccentPickerProps, ActionBar, type ActionBarAction, type ActionBarProps, AiMark, type AiMarkProps, Alert, type AlertProps, type AlertTone, AppShell, type AppShellProps, Badge, type BadgeProps, type BadgeStatus, BarChart, type BarChartProps, type BarDatum, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Calendar, type CalendarProps, Card, type CardProps, Checkbox, type CheckboxProps, type CodeLanguage, type CodeLink, CodeText, type CodeTextProps, CodeView, type CodeViewHandle, type CodeViewProps, CommandPalette, type CommandPaletteProps, type ConsoleExtra, ConsoleLayout, type ConsoleLayoutProps, type CountUnit, type CustomIcon, type DangerConfirm, DangerZone, type DangerZoneProps, DataTable, type DataTableColumn, type DataTableFilter, type DataTableProps, type DataTableView, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, type DayState, type Decimals, DetailList, type DetailListItem, type DetailListProps, Dialog, type DialogProps, Drawer, type DrawerProps, EmptyState, type EmptyStateProps, ErrorPage, type ErrorPageProps, type EventKind, EventTimeline, type EventTimelineProps, FileUpload, type FileUploadProps, type FilterOption, type FilterValue, FormGrid, type FormGridProps, GraphDefs, GraphLegend, type GraphLegendItem, type GraphLegendProps, Grid, type GridProps, Icon, IconButton, type IconButtonHint, type IconButtonProps, type IconName, type IconProps, type IconSource, InlineCode, type InlineCodeProps, KpiCard, type KpiCardProps, LayerGraph, type LayerGraphEdge, type LayerGraphNode, type LayerGraphProps, type LineBand, LineChart, type LineChartProps, type LineSeries, type LineThreshold, LoadingBar, type LoadingBarProps, LoginCard, type LoginCardProps, MOTION, Markdown, type MarkdownProps, Menu, type MenuItem, type MenuProps, Meter, type MeterProps, type MobileTab, MobileTabBar, type MobileTabBarProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, type NavBrand, type NavItem, type NavSection, NotificationBell, type NotificationBellProps, type NotificationItem, type OnRef, Page, type PageProps, type PaletteItem, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, ProgressRing, type ProgressRingProps, type ProjectOption, type ProjectStatus, ProjectSwitcher, type ProjectSwitcherProps, RadioGroup, type RadioGroupProps, type RadioOption, type RangeValue, type RefHref, type Row, type RowKey, SearchField, type SearchFieldProps, Section, SectionGroup, type SectionGroupProps, SectionGroupToggle, type SectionGroupToggleProps, type SectionProps, SegmentedControl, type SegmentedControlProps, type SegmentedItem, Select, type SelectOption, type SelectProps, type SettingsCategory, SettingsLayout, type SettingsLayoutProps, SettingsSection, type SettingsSectionProps, SideNav, type SideNavProps, Skeleton, type SkeletonProps, SplitPane, type SplitPaneProps, StatusBand, type StatusBandProps, StatusLegend, type StatusSegment, Suggestion, type SuggestionProps, Switch, type SwitchProps, type TabItem, Tabs, type TabsProps, Tag, type TagProps, Term, type TermDef, type TermProps, type TermsMark, TextArea, type TextAreaProps, TextField, type TextFieldProps, ThemePicker, type ThemePickerProps, type ThemeSetting, TimeControl, type TimeControlProps, type TimelineEvent, Toast, type ToastProps, type Token, type TokenClass, type Tokenizer, Tooltip, type TooltipProps, TopBar, type TopBarProps, type Total, Tour, type TourProps, type TourStep, TreeList, type TreeListProps, type TreeMark, type TreeNode, type UploadFile, Workbench, type WorkbenchApi, type WorkbenchHandle, type WorkbenchLayout, type WorkbenchProps, type WorkbenchRegion, type WorkbenchView, type Zone, ZoneMap, type ZoneMapProps, addMessages, announce, consoleZoom, divergeToken, focusMain, format, heatToken, icons, initTheme, isCodeRef, preloadIcons, safeHref, setAccent, setLocale, setTheme, tr as t, textOn, useTour, useWorkbench };
|
|
95
|
+
export { AccentPicker, type AccentPickerProps, ActionBar, type ActionBarAction, type ActionBarProps, AiMark, type AiMarkProps, Alert, type AlertProps, type AlertTone, AppShell, type AppShellProps, Badge, type BadgePreset, type BadgeProps, type BadgeStatus, type BadgeTone, BarChart, type BarChartProps, type BarDatum, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Calendar, type CalendarProps, Card, type CardProps, Checkbox, type CheckboxProps, type CodeLanguage, type CodeLink, CodeText, type CodeTextProps, CodeView, type CodeViewHandle, type CodeViewProps, CommandPalette, type CommandPaletteProps, type ConsoleExtra, ConsoleLayout, type ConsoleLayoutProps, type CountUnit, type CustomIcon, type DangerConfirm, DangerZone, type DangerZoneProps, DataTable, type DataTableColumn, type DataTableFilter, type DataTableProps, type DataTableView, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, type DayState, type Decimals, DetailList, type DetailListItem, type DetailListProps, Dialog, type DialogProps, Drawer, type DrawerProps, EmptyState, type EmptyStateProps, ErrorPage, type ErrorPageProps, type EventKind, EventTimeline, type EventTimelineProps, type FieldProps, FileUpload, type FileUploadProps, type FilterOption, type FilterValue, type FormErrors, FormGrid, type FormGridProps, GraphDefs, GraphLegend, type GraphLegendItem, type GraphLegendProps, Grid, type GridProps, type GridRatio, Icon, IconButton, type IconButtonHint, type IconButtonProps, type IconName, type IconProps, type IconSource, InlineCode, type InlineCodeProps, KpiCard, type KpiCardProps, LayerGraph, type LayerGraphEdge, type LayerGraphNode, type LayerGraphProps, type LineBand, LineChart, type LineChartProps, type LineSeries, type LineThreshold, Link, type LinkProps, LoadingBar, type LoadingBarProps, LocaleProvider, type LocaleProviderProps, LoginCard, type LoginCardProps, MOTION, Markdown, type MarkdownProps, Menu, type MenuItem, type MenuProps, Meter, type MeterProps, type MobileTab, MobileTabBar, type MobileTabBarProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, type NavBrand, type NavItem, type NavSection, NotificationBell, type NotificationBellProps, type NotificationItem, type OnRef, type OpenChangeReason, type OpenStateProps, Page, PageHeader, type PageHeaderAction, type PageHeaderProps, type PageProps, type PaletteItem, type PaletteKind, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, ProgressRing, type ProgressRingProps, type ProjectOption, type ProjectStatus, ProjectSwitcher, type ProjectSwitcherProps, RadioGroup, type RadioGroupProps, type RadioOption, type RangeValue, type RefHref, RelativeTime, type RelativeTimeProps, type Row, type RowKey, SearchField, type SearchFieldProps, Section, SectionGroup, type SectionGroupProps, SectionGroupToggle, type SectionGroupToggleProps, type SectionProps, SegmentedControl, type SegmentedControlProps, type SegmentedItem, type SegmentedOption, Select, type SelectOption, type SelectProps, type SettingsCategory, SettingsLayout, type SettingsLayoutProps, SettingsRow, type SettingsRowProps, SettingsSection, type SettingsSectionProps, SideNav, type SideNavProps, Skeleton, type SkeletonProps, SplitPane, type SplitPaneProps, StatusBand, type StatusBandProps, StatusLegend, type StatusSegment, Suggestion, type SuggestionProps, Switch, type SwitchProps, TOAST_DURATION, type TabItem, Tabs, type TabsProps, Tag, type TagProps, Term, type TermDef, type TermProps, type TermsMark, TextArea, type TextAreaProps, TextField, type TextFieldProps, ThemePicker, type ThemePickerProps, type ThemePreset, type ThemeSetting, TimeControl, type TimeControlProps, type TimelineEvent, type TimelineKind, Toast, type ToastAction, type ToastOptions, type ToastProps, type ToastTone, Toaster, type ToasterProps, type Token, type TokenClass, type Tokenizer, Tooltip, type TooltipProps, TopBar, type TopBarProps, type Total, Tour, type TourProps, type TourStep, TreeList, type TreeListProps, type TreeMark, type TreeNode, type UploadFile, type UseFormErrors, Workbench, type WorkbenchApi, type WorkbenchHandle, type WorkbenchLayout, type WorkbenchProps, type WorkbenchRegion, type WorkbenchView, type Zone, ZoneMap, type ZoneMapProps, addMessages, announce, consoleZoom, divergeToken, focusMain, format, heatToken, icons, initTheme, isCodeRef, pickedAccent, preloadIcons, resetAccent, safeHref, setAccent, setLocale, setTheme, storedAccent, storedTheme, subscribeLocale, tr as t, textOn, themePreset, toast, useFormErrors, useLocale, useToast, useTour, useWorkbench };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { addMessages, setLocale, tr } from "./i18n.js";
|
|
3
2
|
import { AppShell } from "./components/AppShell/AppShell.js";
|
|
4
3
|
import { Grid, Page } from "./components/Grid/Grid.js";
|
|
5
4
|
import { AccentPicker } from "./components/AccentPicker/AccentPicker.js";
|
|
@@ -8,12 +7,12 @@ import { Alert } from "./components/Alert/Alert.js";
|
|
|
8
7
|
import { Badge } from "./components/Badge/Badge.js";
|
|
9
8
|
import { BarChart } from "./components/BarChart/BarChart.js";
|
|
10
9
|
import { Breadcrumb } from "./components/Breadcrumb/Breadcrumb.js";
|
|
10
|
+
import { focusMain } from "./internal/focusMain.js";
|
|
11
11
|
import { Button } from "./components/Button/Button.js";
|
|
12
12
|
import { Calendar } from "./components/Calendar/Calendar.js";
|
|
13
13
|
import { Card } from "./components/Card/Card.js";
|
|
14
14
|
import { Checkbox } from "./components/Checkbox/Checkbox.js";
|
|
15
15
|
import { CodeView } from "./components/CodeView/CodeView.js";
|
|
16
|
-
import { focusMain } from "./internal/focusMain.js";
|
|
17
16
|
import { CommandPalette } from "./components/CommandPalette/CommandPalette.js";
|
|
18
17
|
import { DangerZone } from "./components/DangerZone/DangerZone.js";
|
|
19
18
|
import { DataTable } from "./components/DataTable/DataTable.js";
|
|
@@ -22,15 +21,17 @@ import { DateRangePicker } from "./components/DateRangePicker/DateRangePicker.js
|
|
|
22
21
|
import { DetailList } from "./components/DetailList/DetailList.js";
|
|
23
22
|
import { Dialog } from "./components/Dialog/Dialog.js";
|
|
24
23
|
import { SplitPane } from "./components/SplitPane/SplitPane.js";
|
|
25
|
-
import { format } from "./format.js";
|
|
26
24
|
import { Drawer } from "./components/Drawer/Drawer.js";
|
|
27
25
|
import { EmptyState } from "./components/EmptyState/EmptyState.js";
|
|
28
26
|
import { ErrorPage } from "./components/ErrorPage/ErrorPage.js";
|
|
27
|
+
import { format } from "./format.js";
|
|
29
28
|
import { FileUpload } from "./components/FileUpload/FileUpload.js";
|
|
30
29
|
import { FormGrid } from "./components/FormGrid/FormGrid.js";
|
|
31
30
|
import { GraphDefs, GraphLegend } from "./components/Graph/Graph.js";
|
|
32
31
|
import { IconButton } from "./components/IconButton/IconButton.js";
|
|
33
32
|
import { CodeText, InlineCode, isCodeRef } from "./components/InlineCode/InlineCode.js";
|
|
33
|
+
import { Link } from "./components/Link/Link.js";
|
|
34
|
+
import { PageHeader } from "./components/PageHeader/PageHeader.js";
|
|
34
35
|
import { Markdown, safeHref } from "./components/Markdown/Markdown.js";
|
|
35
36
|
import { Section, SectionGroup, SectionGroupToggle } from "./components/Section/Section.js";
|
|
36
37
|
import { KpiCard } from "./components/KpiCard/KpiCard.js";
|
|
@@ -40,7 +41,8 @@ import { StatusBand, StatusLegend } from "./components/StatusBand/StatusBand.js"
|
|
|
40
41
|
import { Meter } from "./components/Meter/Meter.js";
|
|
41
42
|
import { ZoneMap } from "./components/ZoneMap/ZoneMap.js";
|
|
42
43
|
import { EventTimeline } from "./components/EventTimeline/EventTimeline.js";
|
|
43
|
-
import { ConsoleLayout
|
|
44
|
+
import { ConsoleLayout } from "./components/ConsoleLayout/ConsoleLayout.js";
|
|
45
|
+
import { consoleZoom } from "./deprecated.js";
|
|
44
46
|
import { TimeControl } from "./components/TimeControl/TimeControl.js";
|
|
45
47
|
import { LoadingBar } from "./components/LoadingBar/LoadingBar.js";
|
|
46
48
|
import { LoginCard } from "./components/LoginCard/LoginCard.js";
|
|
@@ -50,12 +52,13 @@ import { MultiSelect } from "./components/MultiSelect/MultiSelect.js";
|
|
|
50
52
|
import { NotificationBell } from "./components/NotificationBell/NotificationBell.js";
|
|
51
53
|
import { Popover } from "./components/Popover/Popover.js";
|
|
52
54
|
import { ProgressBar } from "./components/ProgressBar/ProgressBar.js";
|
|
55
|
+
import { RelativeTime } from "./components/RelativeTime/RelativeTime.js";
|
|
53
56
|
import { ProgressRing } from "./components/ProgressRing/ProgressRing.js";
|
|
54
57
|
import { ProjectSwitcher } from "./components/ProjectSwitcher/ProjectSwitcher.js";
|
|
55
58
|
import { RadioGroup } from "./components/RadioGroup/RadioGroup.js";
|
|
56
59
|
import { SearchField } from "./components/SearchField/SearchField.js";
|
|
57
60
|
import { Select } from "./components/Select/Select.js";
|
|
58
|
-
import { SettingsLayout, SettingsSection } from "./components/SettingsLayout/SettingsLayout.js";
|
|
61
|
+
import { SettingsLayout, SettingsRow, SettingsSection } from "./components/SettingsLayout/SettingsLayout.js";
|
|
59
62
|
import { SideNav } from "./components/SideNav/SideNav.js";
|
|
60
63
|
import { Skeleton } from "./components/Skeleton/Skeleton.js";
|
|
61
64
|
import { Suggestion } from "./components/Suggestion/Suggestion.js";
|
|
@@ -67,17 +70,20 @@ import { Term } from "./components/Term/Term.js";
|
|
|
67
70
|
import { TextArea } from "./components/TextArea/TextArea.js";
|
|
68
71
|
import { TextField } from "./components/TextField/TextField.js";
|
|
69
72
|
import { ThemePicker } from "./components/ThemePicker/ThemePicker.js";
|
|
70
|
-
import {
|
|
73
|
+
import { useFormErrors } from "./components/useFormErrors/useFormErrors.js";
|
|
74
|
+
import { TOAST_DURATION, Toast, Toaster, toast, useToast } from "./components/Toast/Toast.js";
|
|
71
75
|
import { Tooltip } from "./components/Tooltip/Tooltip.js";
|
|
72
76
|
import { TopBar } from "./components/TopBar/TopBar.js";
|
|
73
77
|
import { Tour, useTour } from "./components/Tour/Tour.js";
|
|
74
78
|
import { AiMark } from "./components/AiMark/AiMark.js";
|
|
75
79
|
import { TreeList } from "./components/TreeList/TreeList.js";
|
|
80
|
+
import { addMessages, setLocale, subscribeLocale, tr } from "./i18n.js";
|
|
81
|
+
import { LocaleProvider, useLocale } from "./locale.js";
|
|
76
82
|
import { Icon } from "./icons/Icon.js";
|
|
77
83
|
import { icons } from "./icons/map.js";
|
|
78
84
|
import { preloadIcons } from "./icons/store.js";
|
|
79
85
|
import { MOTION } from "./motion.js";
|
|
80
|
-
import { divergeToken, heatToken, initTheme, setAccent, setTheme, textOn } from "./theme.js";
|
|
86
|
+
import { divergeToken, heatToken, initTheme, pickedAccent, resetAccent, setAccent, setTheme, storedAccent, storedTheme, textOn, themePreset } from "./theme.js";
|
|
81
87
|
import { announce } from "./announce.js";
|
|
82
88
|
import { Workbench, useWorkbench } from "./components/Workbench/Workbench.js";
|
|
83
|
-
export { AccentPicker, ActionBar, AiMark, Alert, AppShell, Badge, BarChart, Breadcrumb, Button, Calendar, Card, Checkbox, CodeText, CodeView, CommandPalette, ConsoleLayout, DangerZone, DataTable, DatePicker, DateRangePicker, DetailList, Dialog, Drawer, EmptyState, ErrorPage, EventTimeline, FileUpload, FormGrid, GraphDefs, GraphLegend, Grid, Icon, IconButton, InlineCode, KpiCard, LayerGraph, LineChart, LoadingBar, LoginCard, MOTION, Markdown, Menu, Meter, MobileTabBar, MultiSelect, NotificationBell, Page, Popover, ProgressBar, ProgressRing, ProjectSwitcher, RadioGroup, SearchField, Section, SectionGroup, SectionGroupToggle, SegmentedControl, Select, SettingsLayout, SettingsSection, SideNav, Skeleton, SplitPane, StatusBand, StatusLegend, Suggestion, Switch, Tabs, Tag, Term, TextArea, TextField, ThemePicker, TimeControl, Toast, Tooltip, TopBar, Tour, TreeList, Workbench, ZoneMap, addMessages, announce, consoleZoom, divergeToken, focusMain, format, heatToken, icons, initTheme, isCodeRef, preloadIcons, safeHref, setAccent, setLocale, setTheme, tr as t, textOn, useTour, useWorkbench };
|
|
89
|
+
export { AccentPicker, ActionBar, AiMark, Alert, AppShell, Badge, BarChart, Breadcrumb, Button, Calendar, Card, Checkbox, CodeText, CodeView, CommandPalette, ConsoleLayout, DangerZone, DataTable, DatePicker, DateRangePicker, DetailList, Dialog, Drawer, EmptyState, ErrorPage, EventTimeline, FileUpload, FormGrid, GraphDefs, GraphLegend, Grid, Icon, IconButton, InlineCode, KpiCard, LayerGraph, LineChart, Link, LoadingBar, LocaleProvider, LoginCard, MOTION, Markdown, Menu, Meter, MobileTabBar, MultiSelect, NotificationBell, Page, PageHeader, Popover, ProgressBar, ProgressRing, ProjectSwitcher, RadioGroup, RelativeTime, SearchField, Section, SectionGroup, SectionGroupToggle, SegmentedControl, Select, SettingsLayout, SettingsRow, SettingsSection, SideNav, Skeleton, SplitPane, StatusBand, StatusLegend, Suggestion, Switch, TOAST_DURATION, Tabs, Tag, Term, TextArea, TextField, ThemePicker, TimeControl, Toast, Toaster, Tooltip, TopBar, Tour, TreeList, Workbench, ZoneMap, addMessages, announce, consoleZoom, divergeToken, focusMain, format, heatToken, icons, initTheme, isCodeRef, pickedAccent, preloadIcons, resetAccent, safeHref, setAccent, setLocale, setTheme, storedAccent, storedTheme, subscribeLocale, tr as t, textOn, themePreset, toast, useFormErrors, useLocale, useToast, useTour, useWorkbench };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
/** The props every form field shares (TextField, TextArea, Select, MultiSelect, DatePicker, DateRangePicker). */
|
|
3
|
+
export interface FieldProps {
|
|
4
|
+
/** Above the field, always visible, and the field's accessible name. Never only a placeholder. */
|
|
5
|
+
label: string;
|
|
6
|
+
/** Hides the label from sight (a search box in a toolbar); screen readers still read it. */
|
|
7
|
+
hideLabel?: boolean;
|
|
8
|
+
/** One short line under the field; `backticks` are code. */
|
|
9
|
+
hint?: string;
|
|
10
|
+
/** The cause and the fix: 「日期格式不正確,請寫成 2026/11/14」. Red border, a warning icon and this line in place of
|
|
11
|
+
* the hint. Set it when the field is left or the form is sent (useFormErrors does both). `backticks` are code. */
|
|
12
|
+
error?: string;
|
|
13
|
+
/** Red asterisk after the label; screen readers hear 「必填」. */
|
|
14
|
+
required?: boolean;
|
|
15
|
+
/** Grayed out and skipped by Tab. */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** Form field name: the value is sent with a native form. */
|
|
18
|
+
name?: string;
|
|
19
|
+
}
|
package/dist/internal/Field.js
CHANGED
|
@@ -3,16 +3,19 @@ import { CHECK, Icon } from "../icons/Icon.js";
|
|
|
3
3
|
import { cx } from "./util.js";
|
|
4
4
|
import { includeIcons } from "../icons/store.js";
|
|
5
5
|
import warning_circle_default from "../icons/ph/warning-circle.js";
|
|
6
|
+
import { codeText } from "../components/InlineCode/InlineCode.js";
|
|
6
7
|
import * as React from "react";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
// src/internal/Field.tsx
|
|
9
10
|
includeIcons(warning_circle_default);
|
|
11
|
+
/** Joins aria-describedby ids, dropping empty ones. */
|
|
12
|
+
const describedBy = (...ids) => ids.filter(Boolean).join(" ") || void 0;
|
|
10
13
|
/** A field's label above it, with the red asterisk when required. A <label> when it names one input, otherwise a <span>. */
|
|
11
|
-
function FieldLabel({ htmlFor, id, required, children }) {
|
|
14
|
+
function FieldLabel({ htmlFor, id, required, hidden, children }) {
|
|
12
15
|
return /* @__PURE__ */ jsxs(htmlFor ? "label" : "span", {
|
|
13
16
|
htmlFor,
|
|
14
17
|
id,
|
|
15
|
-
className: "ui-field-label",
|
|
18
|
+
className: cx("ui-field-label", hidden && "ui-visually-hidden"),
|
|
16
19
|
children: [children, required ? /* @__PURE__ */ jsx("span", {
|
|
17
20
|
className: "ui-req",
|
|
18
21
|
"aria-hidden": "true",
|
|
@@ -54,21 +57,25 @@ function FieldErrorIcon({ inline }) {
|
|
|
54
57
|
className: cx("ui-field-icon", inline && "is-inline")
|
|
55
58
|
});
|
|
56
59
|
}
|
|
60
|
+
/** Inside it, field errors are not alerts: the form moves focus to the first invalid field on submit, which reads its
|
|
61
|
+
* error through aria-describedby (several alerts at once would interrupt each other). */
|
|
62
|
+
const QuietErrors = React.createContext(false);
|
|
57
63
|
/** The line under a field: the error (cause and fix) when there is one, otherwise the hint. The error is inserted only
|
|
58
64
|
* while there is one, keyed by its text: a new error is a new alert node, announced once; the hint never announces. */
|
|
59
65
|
function FieldMessage({ id, error, hint, className }) {
|
|
66
|
+
const quiet = React.useContext(QuietErrors);
|
|
60
67
|
if (error) return /* @__PURE__ */ jsx("div", {
|
|
61
68
|
id,
|
|
62
69
|
className: cx("ui-field-error", className),
|
|
63
|
-
role: "alert",
|
|
64
|
-
children: error
|
|
70
|
+
role: quiet ? void 0 : "alert",
|
|
71
|
+
children: codeText(error)
|
|
65
72
|
}, error);
|
|
66
73
|
return hint ? /* @__PURE__ */ jsx("div", {
|
|
67
74
|
id,
|
|
68
75
|
className: cx("ui-field-hint", className),
|
|
69
|
-
children: hint
|
|
76
|
+
children: codeText(hint)
|
|
70
77
|
}) : null;
|
|
71
78
|
}
|
|
72
|
-
export { CheckMark, FieldErrorIcon, FieldLabel, FieldMessage };
|
|
79
|
+
export { CheckMark, FieldErrorIcon, FieldLabel, FieldMessage, QuietErrors, describedBy };
|
|
73
80
|
|
|
74
81
|
//# sourceMappingURL=Field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.js","names":["phWarningCircle"],"sources":["../../src/internal/Field.tsx"],"sourcesContent":["import * as React from 'react';\nimport { CHECK, Icon } from '../icons/Icon';\nimport { cx } from './util';\nimport { includeIcons } from '../icons/store';\nimport phWarningCircle from '../icons/ph/warning-circle';\n\nincludeIcons(phWarningCircle);\n\n/** A field's label above it, with the red asterisk when required. A <label> when it names one input, otherwise a <span>. */\nexport function FieldLabel({
|
|
1
|
+
{"version":3,"file":"Field.js","names":["phWarningCircle"],"sources":["../../src/internal/Field.tsx"],"sourcesContent":["import * as React from 'react';\nimport { CHECK, Icon } from '../icons/Icon';\nimport { cx } from './util';\nimport { includeIcons } from '../icons/store';\nimport phWarningCircle from '../icons/ph/warning-circle';\nimport { codeText } from '../components/InlineCode/InlineCode';\n\nincludeIcons(phWarningCircle);\n\n/** The props every form field shares (TextField, TextArea, Select, MultiSelect, DatePicker, DateRangePicker). */\nexport interface FieldProps {\n /** Above the field, always visible, and the field's accessible name. Never only a placeholder. */\n label: string;\n /** Hides the label from sight (a search box in a toolbar); screen readers still read it. */\n hideLabel?: boolean;\n /** One short line under the field; `backticks` are code. */\n hint?: string;\n /** The cause and the fix: 「日期格式不正確,請寫成 2026/11/14」. Red border, a warning icon and this line in place of\n * the hint. Set it when the field is left or the form is sent (useFormErrors does both). `backticks` are code. */\n error?: string;\n /** Red asterisk after the label; screen readers hear 「必填」. */\n required?: boolean;\n /** Grayed out and skipped by Tab. */\n disabled?: boolean;\n /** Form field name: the value is sent with a native form. */\n name?: string;\n}\n\n/** Joins aria-describedby ids, dropping empty ones. */\nexport const describedBy = (...ids: (string | undefined | null | false)[]): string | undefined => ids.filter(Boolean).join(' ') || undefined;\n\n/** A field's label above it, with the red asterisk when required. A <label> when it names one input, otherwise a <span>. */\nexport function FieldLabel({\n htmlFor,\n id,\n required,\n hidden,\n children,\n}: {\n htmlFor?: string;\n id?: string;\n required?: boolean;\n /** Visually hidden, still read (FieldProps.hideLabel). */\n hidden?: boolean;\n children: React.ReactNode;\n}) {\n const Tag = htmlFor ? 'label' : 'span';\n return (\n <Tag htmlFor={htmlFor} id={id} className={cx('ui-field-label', hidden && 'ui-visually-hidden')}>\n {children}\n {required ? (\n <span className=\"ui-req\" aria-hidden=\"true\">\n {' *'}\n </span>\n ) : null}\n </Tag>\n );\n}\n\n/** The mark inside a check box: a drawn check, a dash for 'mixed', or nothing. The check draws itself only when it\n * turns on after mount, never when a list or menu opens with it already on. */\nexport function CheckMark({ v }: { v: boolean | 'mixed' }) {\n const [prev, setPrev] = React.useState(v);\n const [draw, setDraw] = React.useState(false);\n if (prev !== v) {\n setPrev(v);\n setDraw(v === true);\n }\n if (v === 'mixed') return <span className=\"ui-check-dash\" />;\n if (!v) return null;\n return (\n <svg\n className={cx(draw && 'ui-draw')}\n width={14}\n height={14}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={3.5}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d={CHECK} />\n </svg>\n );\n}\n\n/** The error mark inside a field with an error: a red warning circle at the field's right end (TextField and every other\n * field type, so an error always shows the red border and this icon). `inline` sits in a flex row before the field's\n * own trailing button (show password, calendar, caret) instead of over the input. */\nexport function FieldErrorIcon({ inline }: { inline?: boolean }) {\n return <Icon name=\"warning-circle\" className={cx('ui-field-icon', inline && 'is-inline')} />;\n}\n\n/** Inside it, field errors are not alerts: the form moves focus to the first invalid field on submit, which reads its\n * error through aria-describedby (several alerts at once would interrupt each other). */\nexport const QuietErrors = React.createContext(false);\n\n/** The line under a field: the error (cause and fix) when there is one, otherwise the hint. The error is inserted only\n * while there is one, keyed by its text: a new error is a new alert node, announced once; the hint never announces. */\nexport function FieldMessage({ id, error, hint, className }: { id: string; error?: string; hint?: React.ReactNode; className?: string }) {\n const quiet = React.useContext(QuietErrors);\n if (error)\n return (\n <div key={error} id={id} className={cx('ui-field-error', className)} role={quiet ? undefined : 'alert'}>\n {codeText(error)}\n </div>\n );\n return hint ? (\n <div id={id} className={cx('ui-field-hint', className)}>\n {codeText(hint)}\n </div>\n ) : null;\n}\n"],"mappings":";;;;;;;;;AAOA,aAAaA,sBAAe;;AAsB5B,MAAa,eAAe,GAAG,QAAmE,IAAI,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,KAAK,KAAA;;AAGnI,SAAgB,WAAW,EACzB,SACA,IACA,UACA,QACA,YAQC;CAED,OACE,qBAFU,UAAU,UAAU,QAE9B;EAAc;EAAa;EAAI,WAAW,GAAG,kBAAkB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
import { baseReason } from "./open.js";
|
|
2
3
|
import "react";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { Popover } from "@base-ui/react/popover";
|
|
@@ -8,7 +9,7 @@ function FloatingPanel({ open, onOpenChange, trigger, side = "bottom", align = "
|
|
|
8
9
|
const within = boundary?.current ?? void 0;
|
|
9
10
|
return /* @__PURE__ */ jsxs(Popover.Root, {
|
|
10
11
|
open,
|
|
11
|
-
onOpenChange,
|
|
12
|
+
onOpenChange: (next, details) => onOpenChange(next, baseReason(details?.reason)),
|
|
12
13
|
children: [/* @__PURE__ */ jsx(Popover.Trigger, {
|
|
13
14
|
render: trigger,
|
|
14
15
|
openOnHover,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingPanel.js","names":[],"sources":["../../src/internal/FloatingPanel.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Popover } from '@base-ui/react/popover';\n\nexport interface FloatingPanelProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n /** The element that opens the panel; it must accept a ref (a native element or a component that passes ref on). */\n trigger: React.ReactElement;\n side?: 'top' | 'bottom';\n align?: 'start' | 'center' | 'end';\n sideOffset?: number;\n /** Class of the panel (it carries the look: .ui-datepop, .ui-noti …). */\n className?: string;\n /** Accessible name of the panel. */\n 'aria-label'?: string;\n /** Position against this element instead of the trigger (e.g. the whole field around a calendar button). */\n anchor?: React.RefObject<Element | null>;\n /** Open on hover as well as on press. */\n openOnHover?: boolean;\n /** Keeps the panel inside this element (shifting it sideways, then flipping), not just inside the window: a menu of\n * a table stays over the table instead of covering the panel beside it. */\n boundary?: React.RefObject<Element | null>;\n /** Hover delay before opening, in ms (with openOnHover). Default 0. */\n delay?: number;\n /** Id of the panel, for aria-describedby on the trigger. */\n id?: string;\n /** Move focus into the panel when it opens. Default true. */\n focusOnOpen?: boolean;\n children: React.ReactNode;\n}\n\n/** A positioned panel next to its trigger: flips when there is no room, closes on Esc and outside press, returns focus. */\nexport function FloatingPanel({\n open,\n onOpenChange,\n trigger,\n side = 'bottom',\n align = 'start',\n sideOffset = 6,\n className,\n openOnHover,\n anchor,\n boundary,\n delay = 0,\n id,\n focusOnOpen = true,\n children,\n ...aria\n}: FloatingPanelProps) {\n const within = boundary?.current ?? undefined;\n return (\n <Popover.Root open={open} onOpenChange={onOpenChange}>\n <Popover.Trigger render={trigger} openOnHover={openOnHover} delay={delay} closeDelay={150} />\n <Popover.Portal>\n <Popover.Positioner\n className=\"ui-float\"\n side={side}\n align={align}\n sideOffset={sideOffset}\n anchor={anchor}\n collisionBoundary={within}\n collisionPadding={within ? 0 : undefined}\n // Inside a boundary: slid sideways until it fits, rather than swapping its alignment.\n collisionAvoidance={within ? { side: 'flip', align: 'shift' } : undefined}\n >\n <Popover.Popup id={id} className={className} aria-label={aria['aria-label']} initialFocus={focusOnOpen ? undefined : false}>\n {children}\n </Popover.Popup>\n </Popover.Positioner>\n </Popover.Portal>\n </Popover.Root>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FloatingPanel.js","names":[],"sources":["../../src/internal/FloatingPanel.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Popover } from '@base-ui/react/popover';\nimport { baseReason, type OpenChangeReason } from './open';\n\nexport interface FloatingPanelProps {\n open: boolean;\n onOpenChange: (open: boolean, reason?: OpenChangeReason) => void;\n /** The element that opens the panel; it must accept a ref (a native element or a component that passes ref on). */\n trigger: React.ReactElement;\n side?: 'top' | 'bottom';\n align?: 'start' | 'center' | 'end';\n sideOffset?: number;\n /** Class of the panel (it carries the look: .ui-datepop, .ui-noti …). */\n className?: string;\n /** Accessible name of the panel. */\n 'aria-label'?: string;\n /** Position against this element instead of the trigger (e.g. the whole field around a calendar button). */\n anchor?: React.RefObject<Element | null>;\n /** Open on hover as well as on press. */\n openOnHover?: boolean;\n /** Keeps the panel inside this element (shifting it sideways, then flipping), not just inside the window: a menu of\n * a table stays over the table instead of covering the panel beside it. */\n boundary?: React.RefObject<Element | null>;\n /** Hover delay before opening, in ms (with openOnHover). Default 0. */\n delay?: number;\n /** Id of the panel, for aria-describedby on the trigger. */\n id?: string;\n /** Move focus into the panel when it opens. Default true. */\n focusOnOpen?: boolean;\n children: React.ReactNode;\n}\n\n/** A positioned panel next to its trigger: flips when there is no room, closes on Esc and outside press, returns focus. */\nexport function FloatingPanel({\n open,\n onOpenChange,\n trigger,\n side = 'bottom',\n align = 'start',\n sideOffset = 6,\n className,\n openOnHover,\n anchor,\n boundary,\n delay = 0,\n id,\n focusOnOpen = true,\n children,\n ...aria\n}: FloatingPanelProps) {\n const within = boundary?.current ?? undefined;\n return (\n <Popover.Root open={open} onOpenChange={(next, details) => onOpenChange(next, baseReason(details?.reason))}>\n <Popover.Trigger render={trigger} openOnHover={openOnHover} delay={delay} closeDelay={150} />\n <Popover.Portal>\n <Popover.Positioner\n className=\"ui-float\"\n side={side}\n align={align}\n sideOffset={sideOffset}\n anchor={anchor}\n collisionBoundary={within}\n collisionPadding={within ? 0 : undefined}\n // Inside a boundary: slid sideways until it fits, rather than swapping its alignment.\n collisionAvoidance={within ? { side: 'flip', align: 'shift' } : undefined}\n >\n <Popover.Popup id={id} className={className} aria-label={aria['aria-label']} initialFocus={focusOnOpen ? undefined : false}>\n {children}\n </Popover.Popup>\n </Popover.Positioner>\n </Popover.Portal>\n </Popover.Root>\n );\n}\n"],"mappings":";;;;;;;AAiCA,SAAgB,cAAc,EAC5B,MACA,cACA,SACA,OAAO,UACP,QAAQ,SACR,aAAa,GACb,WACA,aACA,QACA,UACA,QAAQ,GACR,IACA,cAAc,MACd,UACA,GAAG,QACkB;CACrB,MAAM,SAAS,UAAU,WAAW,KAAA;CACpC,OACE,qBAAC,QAAQ,MAAT;EAAoB;EAAM,eAAe,MAAM,YAAY,aAAa,MAAM,WAAW,SAAS,MAAM,CAAC;EAAzG,UAAA,CACE,oBAAC,QAAQ,SAAT;GAAiB,QAAQ;GAAsB;GAAoB;GAAO,YAAY;EAAM,CAAA,GAC5F,oBAAC,QAAQ,QAAT,EAAA,UACE,oBAAC,QAAQ,YAAT;GACE,WAAU;GACJ;GACC;GACK;GACJ;GACR,mBAAmB;GACnB,kBAAkB,SAAS,IAAI,KAAA;GAE/B,oBAAoB,SAAS;IAAE,MAAM;IAAQ,OAAO;GAAQ,IAAI,KAAA;GAEhE,UAAA,oBAAC,QAAQ,OAAT;IAAmB;IAAe;IAAW,cAAY,KAAK;IAAe,cAAc,cAAc,KAAA,IAAY;IAClH;GACY,CAAA;EACG,CAAA,EACN,CAAA,CACJ;;AAElB"}
|
package/dist/internal/chart.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { format } from "../format.js";
|
|
3
|
-
import { reduced } from "./util.js";
|
|
3
|
+
import { reduced, useMedia } from "./util.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
// src/internal/chart.tsx
|
|
7
7
|
/** 0 → 1 with an ease-out over ms, restarted when target changes; 1 at once with reduced motion. */
|
|
8
8
|
function useCountUp(target, ms) {
|
|
9
|
-
const
|
|
9
|
+
const still = useMedia("(prefers-reduced-motion: reduce)");
|
|
10
|
+
const [t, setT] = React.useState(0);
|
|
10
11
|
React.useEffect(() => {
|
|
11
12
|
if (reduced()) return;
|
|
12
13
|
let t0 = null;
|
|
@@ -20,10 +21,8 @@ function useCountUp(target, ms) {
|
|
|
20
21
|
raf = requestAnimationFrame(step);
|
|
21
22
|
return () => cancelAnimationFrame(raf);
|
|
22
23
|
}, [target, ms]);
|
|
23
|
-
return t;
|
|
24
|
+
return still ? 1 : t;
|
|
24
25
|
}
|
|
25
|
-
/** Decimals the axis labels need so that ticks a step apart read differently (0.5, 1, 1.5). */
|
|
26
|
-
const tickDecimals = (top) => Math.min(3, (String(+(top / 4).toPrecision(6)).split(".")[1] ?? "").length);
|
|
27
26
|
/** A smooth SVG path (Catmull-Rom as cubic Béziers) through the points. */
|
|
28
27
|
function smoothPath(p) {
|
|
29
28
|
const f = (q) => q[0].toFixed(1) + "," + q[1].toFixed(1);
|
|
@@ -46,14 +45,6 @@ const CHART = [
|
|
|
46
45
|
];
|
|
47
46
|
/** The color of series i. */
|
|
48
47
|
const seriesColor = (i) => CHART[i % CHART.length];
|
|
49
|
-
/** Grid lines at these fractions of the axis maximum. */
|
|
50
|
-
const TICKS = [
|
|
51
|
-
0,
|
|
52
|
-
.25,
|
|
53
|
-
.5,
|
|
54
|
-
.75,
|
|
55
|
-
1
|
|
56
|
-
];
|
|
57
48
|
/** KPI cards are the only place that abbreviates large numbers (format rules). */
|
|
58
49
|
function kpiText(v, p, dec) {
|
|
59
50
|
const big = p.compact !== false && Math.abs(p.value) >= 1e4;
|
|
@@ -112,11 +103,63 @@ function ChartTip({ title, rows, style }) {
|
|
|
112
103
|
}, i))]
|
|
113
104
|
});
|
|
114
105
|
}
|
|
115
|
-
/**
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
106
|
+
/** The y axis: tick values from lo to top, a step of 1, 2 or 5 times a power of ten (never 2.5: no 12.5 or 37.5),
|
|
107
|
+
* 3 to 5 steps, the top the first tick at or above the largest value (128 萬 gets a 150 萬 axis, not 200 萬). Whole
|
|
108
|
+
* steps unless the values need decimals (dec > 0) or the range is under 3. A given top that the steps do not divide
|
|
109
|
+
* gets 4 equal steps. */
|
|
110
|
+
function axisTicks(lo, hi, o = {}) {
|
|
111
|
+
const range = (o.top ?? hi) - lo;
|
|
112
|
+
if (!(range > 0)) return [lo, lo + 1];
|
|
113
|
+
const whole = !o.dec && range >= 3;
|
|
114
|
+
const raw = range / 5;
|
|
115
|
+
let step = 0;
|
|
116
|
+
for (let e = 10 ** Math.floor(Math.log10(raw)); !step; e *= 10) for (const m of [
|
|
117
|
+
1,
|
|
118
|
+
2,
|
|
119
|
+
5
|
|
120
|
+
]) {
|
|
121
|
+
const s = m * e;
|
|
122
|
+
if (s >= raw && (!whole || Number.isInteger(s)) && Math.ceil(range / s - 1e-9) <= 5) {
|
|
123
|
+
step = s;
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
let n = Math.max(1, Math.ceil(range / step - 1e-9));
|
|
128
|
+
if (o.top != null && Math.abs(n * step - range) > step * 1e-6) {
|
|
129
|
+
n = 4;
|
|
130
|
+
step = range / 4;
|
|
131
|
+
}
|
|
132
|
+
return Array.from({ length: n + 1 }, (_, i) => +(lo + i * step).toPrecision(12));
|
|
133
|
+
}
|
|
134
|
+
/** A tick or tooltip value as text, in the chart's format. */
|
|
135
|
+
function chartNumber(v, fmt, dec) {
|
|
136
|
+
return fmt === "compact" && Math.abs(v) >= 1e4 ? format.compact(v) : format.number(v, dec);
|
|
137
|
+
}
|
|
138
|
+
/** Decimals the ticks need so that neighbours read differently (0.5, 1, 1.5). */
|
|
139
|
+
const ticksDecimals = (ticks) => Math.min(3, Math.max(0, ...ticks.map((t) => (String(+t.toPrecision(6)).split(".")[1] ?? "").length)));
|
|
140
|
+
/** The width (px) the y axis labels need: measured from the drawn labels (a font that loads late, text spacing a reader
|
|
141
|
+
* adds), else estimated from their length where nothing is measured (jsdom). Measured again when the labels change
|
|
142
|
+
* or the text's size does. */
|
|
143
|
+
function useAxisWidth(ref, labels, scaleKey = "") {
|
|
144
|
+
const guess = Math.ceil(Math.max(0, ...labels.map((t) => [...t].reduce((w, c) => w + (c.charCodeAt(0) > 11904 ? 12 : 7.5), 0))));
|
|
145
|
+
const [w, setW] = React.useState(guess);
|
|
146
|
+
const key = labels.join("|") + "|" + scaleKey;
|
|
147
|
+
React.useLayoutEffect(() => {
|
|
148
|
+
const root = ref.current;
|
|
149
|
+
if (!root) return;
|
|
150
|
+
const read = () => {
|
|
151
|
+
let m = 0;
|
|
152
|
+
for (const el of root.querySelectorAll(".ui-chart-tick")) m = Math.max(m, el.getBoundingClientRect().width);
|
|
153
|
+
setW(m > 0 ? Math.ceil(m) : guess);
|
|
154
|
+
};
|
|
155
|
+
read();
|
|
156
|
+
if (!root.querySelector(".ui-chart-tick") || typeof ResizeObserver !== "function") return;
|
|
157
|
+
const ro = new ResizeObserver(read);
|
|
158
|
+
ro.observe(root);
|
|
159
|
+
document.fonts?.ready.then(read).catch(() => {});
|
|
160
|
+
return () => ro.disconnect();
|
|
161
|
+
}, [key]);
|
|
162
|
+
return w;
|
|
120
163
|
}
|
|
121
164
|
/** ← → (and Home, End) on a chart: the item to show next, or null for any other key. */
|
|
122
165
|
function chartKey(e, at, n) {
|
|
@@ -126,6 +169,33 @@ function chartKey(e, at, n) {
|
|
|
126
169
|
if (to != null) e.preventDefault();
|
|
127
170
|
return to;
|
|
128
171
|
}
|
|
129
|
-
|
|
172
|
+
/** The chart's values as a table for screen readers (visually hidden): one row per item or point, the first cell its
|
|
173
|
+
* name. Charts with arrow keys are role="application", which some screen readers read only key by key; this table
|
|
174
|
+
* reads like any other. */
|
|
175
|
+
function ChartTable({ caption, head, rows }) {
|
|
176
|
+
if (!rows.length) return null;
|
|
177
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
178
|
+
className: "ui-visually-hidden",
|
|
179
|
+
role: "table",
|
|
180
|
+
"aria-label": caption,
|
|
181
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
182
|
+
role: "row",
|
|
183
|
+
children: head.map((h, i) => /* @__PURE__ */ jsx("span", {
|
|
184
|
+
role: "columnheader",
|
|
185
|
+
children: h
|
|
186
|
+
}, i))
|
|
187
|
+
}), rows.map((r, i) => /* @__PURE__ */ jsxs("div", {
|
|
188
|
+
role: "row",
|
|
189
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
190
|
+
role: "rowheader",
|
|
191
|
+
children: r[0]
|
|
192
|
+
}), r.slice(1).map((c, j) => /* @__PURE__ */ jsx("span", {
|
|
193
|
+
role: "cell",
|
|
194
|
+
children: c
|
|
195
|
+
}, j))]
|
|
196
|
+
}, i))]
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
export { ChartTable, ChartTip, axisTicks, chartKey, chartNumber, kpiText, seriesColor, smoothPath, ticksDecimals, useAxisWidth, useCountUp, useFitText };
|
|
130
200
|
|
|
131
201
|
//# sourceMappingURL=chart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart.js","names":[],"sources":["../../src/internal/chart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { format } from '../format';\nimport { reduced } from './util';\nimport type { KpiCardProps } from '../components/KpiCard/KpiCard';\n\n/** 0 → 1 with an ease-out over ms, restarted when target changes; 1 at once with reduced motion. */\nexport function useCountUp(target: unknown, ms: number): number {\n const [t, setT] = React.useState(reduced() ? 1 : 0);\n React.useEffect(() => {\n if (reduced()) return;\n let t0: number | null = null;\n let raf = 0;\n const step = (now: number) => {\n t0 ??= now;\n const x = Math.min(1, (now - t0) / ms);\n setT(1 - (1 - x) ** 3);\n if (x < 1) raf = requestAnimationFrame(step);\n };\n raf = requestAnimationFrame(step);\n return () => cancelAnimationFrame(raf);\n }, [target, ms]);\n return t;\n}\n\n/** Decimals the axis labels need so that ticks a step apart read differently (0.5, 1, 1.5). */\nexport const tickDecimals = (top: number): number => Math.min(3, (String(+(top / 4).toPrecision(6)).split('.')[1] ?? '').length);\n\nexport type Point = [number, number];\n\n/** A smooth SVG path (Catmull-Rom as cubic Béziers) through the points. */\nexport function smoothPath(p: Point[]): string {\n const f = (q: Point) => q[0].toFixed(1) + ',' + q[1].toFixed(1);\n if (p.length < 2) return p.length ? 'M' + f(p[0]) : '';\n let d = 'M' + f(p[0]);\n for (let i = 0; i < p.length - 1; i++) {\n const p0 = p[i - 1] || p[i];\n const p1 = p[i];\n const p2 = p[i + 1];\n const p3 = p[i + 2] || p2;\n d += ` C${f([p1[0] + (p2[0] - p0[0]) / 6, p1[1] + (p2[1] - p0[1]) / 6])} ${f([p2[0] - (p3[0] - p1[0]) / 6, p2[1] - (p3[1] - p1[1]) / 6])} ${f(p2)}`;\n }\n return d;\n}\n\nconst CHART = ['var(--chart-1)', 'var(--chart-2)', 'var(--chart-3)', 'var(--chart-4)'];\n/** The color of series i. */\nexport const seriesColor = (i: number): string => CHART[i % CHART.length];\n/** Grid lines at these fractions of the axis maximum. */\nexport const TICKS = [0, 0.25, 0.5, 0.75, 1];\n\n/** KPI cards are the only place that abbreviates large numbers (format rules). */\nexport function kpiText(v: number, p: KpiCardProps, dec?: number): string {\n const big = p.compact !== false && Math.abs(p.value) >= 1e4;\n if (p.format === 'money') return format.money(v, { compact: big, currency: p.currency, like: p.value });\n if (p.format === 'percent') return format.number(v, dec || 1);\n return big ? format.compact(v, p.value) : format.number(v, dec);\n}\n\n/** Shrinks the KPI number (31 px down to 20 px) when the final value is wider than the card. */\nexport function useFitText(ref: React.RefObject<HTMLElement | null>, deps: React.DependencyList): void {\n React.useLayoutEffect(() => {\n const el = ref.current;\n if (!el) return;\n const fit = () => {\n el.style.fontSize = '';\n const base = parseFloat(getComputedStyle(el).fontSize) || 31;\n const sizer = el.querySelector<HTMLElement>('.ui-kpi-sizer');\n const unit = el.querySelector<HTMLElement>('.ui-kpi-unit');\n const need = (sizer ? sizer.scrollWidth : 0) + (unit ? unit.offsetWidth + 4 : 0);\n const have = el.clientWidth;\n const next = need > have && have > 0 ? Math.max(20, Math.floor((base * have) / need)) : null;\n el.style.fontSize = next ? next + 'px' : '';\n };\n fit();\n const ro = typeof ResizeObserver === 'function' ? new ResizeObserver(fit) : null;\n ro?.observe((el.parentNode as Element | null) || el);\n return () => ro?.disconnect();\n // eslint-disable-next-line react-hooks/exhaustive-deps -- the caller lists what changes the text\n }, deps);\n}\n\ninterface ChartTipRow {\n name: React.ReactNode;\n value: React.ReactNode;\n color?: string;\n}\n\nexport function ChartTip({ title, rows, style }: { title?: React.ReactNode; rows: ChartTipRow[]; style?: React.CSSProperties }) {\n return (\n <div className=\"ui-chart-tip\" style={style}>\n {title ? <div className=\"ui-chart-tip-title\">{title}</div> : null}\n {rows.map((r, i) => (\n <div key={i} className=\"ui-chart-tip-row\">\n {r.color ? <span className=\"ui-chart-swatch\" style={{ background: r.color }} /> : null}\n <span className=\"ui-chart-tip-name\">{r.name}</span>\n <span className=\"ui-chart-tip-val\">{r.value}</span>\n </div>\n ))}\n </div>\n );\n}\n\n/** Rounds an axis maximum up to 2, 4, 5, 8 or 10 times a power of ten. */\nexport function niceMax(v: number): number {\n const e = 10 ** Math.floor(Math.log10(v || 1));\n const n = Math.ceil(v / e);\n return (n <= 2 ? 2 : n <= 4 ? 4 : n <= 5 ? 5 : n <= 8 ? 8 : 10) * e;\n}\n\n/** ← → (and Home, End) on a chart: the item to show next, or null for any other key. */\nexport function chartKey(e: React.KeyboardEvent, at: number, n: number): number | null {\n if (e.altKey || e.metaKey || e.ctrlKey || !n) return null;\n const i = Math.max(0, at);\n const to =\n e.key === 'ArrowRight' ? Math.min(n - 1, i + 1) : e.key === 'ArrowLeft' ? Math.max(0, i - 1) : e.key === 'Home' ? 0 : e.key === 'End' ? n - 1 : null;\n if (to != null) e.preventDefault();\n return to;\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,WAAW,QAAiB,IAAoB;CAC9D,MAAM,CAAC,GAAG,QAAQ,MAAM,SAAS,QAAQ,IAAI,IAAI,CAAC;CAClD,MAAM,gBAAgB;EACpB,IAAI,QAAQ,GAAG;EACf,IAAI,KAAoB;EACxB,IAAI,MAAM;EACV,MAAM,QAAQ,QAAgB;GAC5B,OAAO;GACP,MAAM,IAAI,KAAK,IAAI,IAAI,MAAM,MAAM,EAAE;GACrC,KAAK,KAAK,IAAI,MAAM,CAAC;GACrB,IAAI,IAAI,GAAG,MAAM,sBAAsB,IAAI;EAC7C;EACA,MAAM,sBAAsB,IAAI;EAChC,aAAa,qBAAqB,GAAG;CACvC,GAAG,CAAC,QAAQ,EAAE,CAAC;CACf,OAAO;AACT;;AAGA,MAAa,gBAAgB,QAAwB,KAAK,IAAI,IAAI,OAAO,EAAE,MAAM,EAAA,CAAG,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,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N,CACE;;AAET;;AAGA,SAAgB,QAAQ,GAAmB;CACzC,MAAM,IAAI,MAAM,KAAK,MAAM,KAAK,MAAM,KAAK,CAAC,CAAC;CAC7C,MAAM,IAAI,KAAK,KAAK,IAAI,CAAC;CACzB,QAAQ,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,MAAM;AACpE;;AAGA,SAAgB,SAAS,GAAwB,IAAY,GAA0B;CACrF,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,CAAC,GAAG,OAAO;CACrD,MAAM,IAAI,KAAK,IAAI,GAAG,EAAE;CACxB,MAAM,KACJ,EAAE,QAAQ,eAAe,KAAK,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,QAAQ,cAAc,KAAK,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,QAAQ,SAAS,IAAI,EAAE,QAAQ,QAAQ,IAAI,IAAI;CAClJ,IAAI,MAAM,MAAM,EAAE,eAAe;CACjC,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"chart.js","names":[],"sources":["../../src/internal/chart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { format } from '../format';\nimport { reduced, useMedia } from './util';\nimport type { KpiCardProps } from '../components/KpiCard/KpiCard';\n\n/** 0 → 1 with an ease-out over ms, restarted when target changes; 1 at once with reduced motion. */\nexport function useCountUp(target: unknown, ms: number): number {\n // Reduced motion from useMedia: false on the server and while hydrating, so the markup matches; then the final value.\n const still = useMedia('(prefers-reduced-motion: reduce)');\n const [t, setT] = React.useState(0);\n React.useEffect(() => {\n if (reduced()) return;\n let t0: number | null = null;\n let raf = 0;\n const step = (now: number) => {\n t0 ??= now;\n const x = Math.min(1, (now - t0) / ms);\n setT(1 - (1 - x) ** 3);\n if (x < 1) raf = requestAnimationFrame(step);\n };\n raf = requestAnimationFrame(step);\n return () => cancelAnimationFrame(raf);\n }, [target, ms]);\n return still ? 1 : t;\n}\n\n/** Decimals the axis labels need so that ticks a step apart read differently (0.5, 1, 1.5). */\nexport const tickDecimals = (top: number): number => Math.min(3, (String(+(top / 4).toPrecision(6)).split('.')[1] ?? '').length);\n\nexport type Point = [number, number];\n\n/** A smooth SVG path (Catmull-Rom as cubic Béziers) through the points. */\nexport function smoothPath(p: Point[]): string {\n const f = (q: Point) => q[0].toFixed(1) + ',' + q[1].toFixed(1);\n if (p.length < 2) return p.length ? 'M' + f(p[0]) : '';\n let d = 'M' + f(p[0]);\n for (let i = 0; i < p.length - 1; i++) {\n const p0 = p[i - 1] || p[i];\n const p1 = p[i];\n const p2 = p[i + 1];\n const p3 = p[i + 2] || p2;\n d += ` C${f([p1[0] + (p2[0] - p0[0]) / 6, p1[1] + (p2[1] - p0[1]) / 6])} ${f([p2[0] - (p3[0] - p1[0]) / 6, p2[1] - (p3[1] - p1[1]) / 6])} ${f(p2)}`;\n }\n return d;\n}\n\nconst CHART = ['var(--chart-1)', 'var(--chart-2)', 'var(--chart-3)', 'var(--chart-4)'];\n/** The color of series i. */\nexport const seriesColor = (i: number): string => CHART[i % CHART.length];\n/** Grid lines at these fractions of the axis maximum. */\nexport const TICKS = [0, 0.25, 0.5, 0.75, 1];\n\n/** KPI cards are the only place that abbreviates large numbers (format rules). */\nexport function kpiText(v: number, p: KpiCardProps, dec?: number): string {\n const big = p.compact !== false && Math.abs(p.value) >= 1e4;\n if (p.format === 'money') return format.money(v, { compact: big, currency: p.currency, like: p.value });\n if (p.format === 'percent') return format.number(v, dec || 1);\n return big ? format.compact(v, p.value) : format.number(v, dec);\n}\n\n/** Shrinks the KPI number (31 px down to 20 px) when the final value is wider than the card. */\nexport function useFitText(ref: React.RefObject<HTMLElement | null>, deps: React.DependencyList): void {\n React.useLayoutEffect(() => {\n const el = ref.current;\n if (!el) return;\n const fit = () => {\n el.style.fontSize = '';\n const base = parseFloat(getComputedStyle(el).fontSize) || 31;\n const sizer = el.querySelector<HTMLElement>('.ui-kpi-sizer');\n const unit = el.querySelector<HTMLElement>('.ui-kpi-unit');\n const need = (sizer ? sizer.scrollWidth : 0) + (unit ? unit.offsetWidth + 4 : 0);\n const have = el.clientWidth;\n const next = need > have && have > 0 ? Math.max(20, Math.floor((base * have) / need)) : null;\n el.style.fontSize = next ? next + 'px' : '';\n };\n fit();\n const ro = typeof ResizeObserver === 'function' ? new ResizeObserver(fit) : null;\n ro?.observe((el.parentNode as Element | null) || el);\n return () => ro?.disconnect();\n // eslint-disable-next-line react-hooks/exhaustive-deps -- the caller lists what changes the text\n }, deps);\n}\n\ninterface ChartTipRow {\n name: React.ReactNode;\n value: React.ReactNode;\n color?: string;\n}\n\nexport function ChartTip({ title, rows, style }: { title?: React.ReactNode; rows: ChartTipRow[]; style?: React.CSSProperties }) {\n return (\n <div className=\"ui-chart-tip\" style={style}>\n {title ? <div className=\"ui-chart-tip-title\">{title}</div> : null}\n {rows.map((r, i) => (\n <div key={i} className=\"ui-chart-tip-row\">\n {r.color ? <span className=\"ui-chart-swatch\" style={{ background: r.color }} /> : null}\n <span className=\"ui-chart-tip-name\">{r.name}</span>\n <span className=\"ui-chart-tip-val\">{r.value}</span>\n </div>\n ))}\n </div>\n );\n}\n\n/** The y axis: tick values from lo to top, a step of 1, 2 or 5 times a power of ten (never 2.5: no 12.5 or 37.5),\n * 3 to 5 steps, the top the first tick at or above the largest value (128 萬 gets a 150 萬 axis, not 200 萬). Whole\n * steps unless the values need decimals (dec > 0) or the range is under 3. A given top that the steps do not divide\n * gets 4 equal steps. */\nexport function axisTicks(lo: number, hi: number, o: { top?: number; dec?: number } = {}): number[] {\n const range = (o.top ?? hi) - lo;\n if (!(range > 0)) return [lo, lo + 1];\n const whole = !o.dec && range >= 3;\n const raw = range / 5;\n let step = 0;\n for (let e = 10 ** Math.floor(Math.log10(raw)); !step; e *= 10)\n for (const m of [1, 2, 5]) {\n const s = m * e;\n if (s >= raw && (!whole || Number.isInteger(s)) && Math.ceil(range / s - 1e-9) <= 5) {\n step = s;\n break;\n }\n }\n let n = Math.max(1, Math.ceil(range / step - 1e-9));\n if (o.top != null && Math.abs(n * step - range) > step * 1e-6) {\n n = 4;\n step = range / 4;\n }\n // Rounded so 0.1 + 0.2 does not show as 0.30000000000000004.\n return Array.from({ length: n + 1 }, (_, i) => +(lo + i * step).toPrecision(12));\n}\n\n/** How a chart writes a value: 'number' (1,280,000) or 'compact' (128 萬, 1.5 億; 1.3M in English). */\nexport type ChartFormat = 'number' | 'compact';\n/** A tick or tooltip value as text, in the chart's format. */\nexport function chartNumber(v: number, fmt: ChartFormat | undefined, dec?: number): string {\n return fmt === 'compact' && Math.abs(v) >= 1e4 ? format.compact(v) : format.number(v, dec);\n}\n/** Decimals the ticks need so that neighbours read differently (0.5, 1, 1.5). */\nexport const ticksDecimals = (ticks: number[]): number => Math.min(3, Math.max(0, ...ticks.map((t) => (String(+t.toPrecision(6)).split('.')[1] ?? '').length)));\n\n/** The width (px) the y axis labels need: measured from the drawn labels (a font that loads late, text spacing a reader\n * adds), else estimated from their length where nothing is measured (jsdom). Measured again when the labels change\n * or the text's size does. */\nexport function useAxisWidth(ref: React.RefObject<HTMLElement | null>, labels: string[], scaleKey: number | string = ''): number {\n // Geist Mono 12 px: about 7.5 px a character; CJK (萬、億) about 12 px.\n const guess = Math.ceil(Math.max(0, ...labels.map((t) => [...t].reduce((w, c) => w + (c.charCodeAt(0) > 0x2e80 ? 12 : 7.5), 0))));\n const [w, setW] = React.useState(guess);\n // scaleKey: an SVG drawn at another width than its box is scaled, and so are its labels: measured again once it\n // has its real width.\n const key = labels.join('|') + '|' + scaleKey;\n React.useLayoutEffect(() => {\n const root = ref.current;\n if (!root) return;\n const read = () => {\n let m = 0;\n for (const el of root.querySelectorAll<Element>('.ui-chart-tick')) m = Math.max(m, el.getBoundingClientRect().width);\n // Always the last reading, never kept from an earlier one: the width depends only on the labels as drawn, not\n // on whether the fonts were ready at the first reading (the plot's width does not change the labels').\n setW(m > 0 ? Math.ceil(m) : guess);\n };\n read();\n const probe = root.querySelector('.ui-chart-tick');\n if (!probe || typeof ResizeObserver !== 'function') return;\n // SVG text has no box to observe: the root's size stands in (text spacing and zoom change it too), and fonts.\n const ro = new ResizeObserver(read);\n ro.observe(root);\n document.fonts?.ready.then(read).catch(() => {});\n return () => ro.disconnect();\n // eslint-disable-next-line react-hooks/exhaustive-deps -- measured again when the labels change\n }, [key]);\n return w;\n}\n\n/** Rounds an axis maximum up to 2, 4, 5, 8 or 10 times a power of ten. */\nexport function niceMax(v: number): number {\n const e = 10 ** Math.floor(Math.log10(v || 1));\n const n = Math.ceil(v / e);\n return (n <= 2 ? 2 : n <= 4 ? 4 : n <= 5 ? 5 : n <= 8 ? 8 : 10) * e;\n}\n\n/** ← → (and Home, End) on a chart: the item to show next, or null for any other key. */\nexport function chartKey(e: React.KeyboardEvent, at: number, n: number): number | null {\n if (e.altKey || e.metaKey || e.ctrlKey || !n) return null;\n const i = Math.max(0, at);\n const to =\n e.key === 'ArrowRight' ? Math.min(n - 1, i + 1) : e.key === 'ArrowLeft' ? Math.max(0, i - 1) : e.key === 'Home' ? 0 : e.key === 'End' ? n - 1 : null;\n if (to != null) e.preventDefault();\n return to;\n}\n\n/** The chart's values as a table for screen readers (visually hidden): one row per item or point, the first cell its\n * name. Charts with arrow keys are role=\"application\", which some screen readers read only key by key; this table\n * reads like any other. */\nexport function ChartTable({ caption, head, rows }: { caption: string; head: string[]; rows: React.ReactNode[][] }) {\n if (!rows.length) return null;\n // ARIA table roles on divs: no native <table> (the system replaces it), and the hiding box keeps its 1 px width.\n return (\n <div className=\"ui-visually-hidden\" role=\"table\" aria-label={caption}>\n <div role=\"row\">\n {head.map((h, i) => (\n <span key={i} role=\"columnheader\">\n {h}\n </span>\n ))}\n </div>\n {rows.map((r, i) => (\n <div key={i} role=\"row\">\n <span role=\"rowheader\">{r[0]}</span>\n {r.slice(1).map((c, j) => (\n <span key={j} role=\"cell\">\n {c}\n </span>\n ))}\n </div>\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,W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AE7B,GAAG,CAAC,GAAG,CAAC;CACR,OAAO;AACT;;AAUA,SAAgB,SAAS,GAAwB,IAAY,GAA0B;CACrF,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,CAAC,GAAG,OAAO;CACrD,MAAM,IAAI,KAAK,IAAI,GAAG,EAAE;CACxB,MAAM,KACJ,EAAE,QAAQ,eAAe,KAAK,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,QAAQ,cAAc,KAAK,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,QAAQ,SAAS,IAAI,EAAE,QAAQ,QAAQ,IAAI,IAAI;CAClJ,IAAI,MAAM,MAAM,EAAE,eAAe;CACjC,OAAO;AACT;;;;AAKA,SAAgB,WAAW,EAAE,SAAS,MAAM,QAAwE;CAClH,IAAI,CAAC,KAAK,QAAQ,OAAO;CAEzB,OACE,qBAAC,OAAD;EAAK,WAAU;EAAqB,MAAK;EAAQ,cAAY;EAA7D,UAAA,CACE,oBAAC,OAAD;GAAK,MAAK;GACP,UAAA,KAAK,KAAK,GAAG,MACZ,oBAAC,QAAD;IAAc,MAAK;IAChB,UAAA;GACG,GAFK,CAEL,CACP;EACE,CAAA,GACJ,KAAK,KAAK,GAAG,MACZ,qBAAC,OAAD;GAAa,MAAK;GAAlB,UAAA,CACE,oBAAC,QAAD;IAAM,MAAK;IAAa,UAAA,EAAE;GAAS,CAAA,GAClC,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,MAClB,oBAAC,QAAD;IAAc,MAAK;IAChB,UAAA;GACG,GAFK,CAEL,CACP,CACE;EAPK,GAAA,CAOL,CACN,CACE;;AAET"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// src/internal/codeSpans.ts
|
|
3
|
+
const PAIR = /(`[^`]+`)/;
|
|
4
|
+
/** Cuts a text written as in Markdown into plain and code pieces. Only a pair of backticks around at least one character
|
|
5
|
+
* is code; a lone backtick stays in the text. Shared by CodeText, the sentence props that take a string and LayerGraph
|
|
6
|
+
* labels, so every component reads backticks the same way. */
|
|
7
|
+
function codeSpans(text) {
|
|
8
|
+
return String(text ?? "").split(PAIR).map((t, i) => i % 2 ? {
|
|
9
|
+
code: true,
|
|
10
|
+
text: t.slice(1, -1)
|
|
11
|
+
} : {
|
|
12
|
+
code: false,
|
|
13
|
+
text: t
|
|
14
|
+
}).filter((s) => s.text !== "");
|
|
15
|
+
}
|
|
16
|
+
/** True when the text has at least one `code` span. */
|
|
17
|
+
const hasCodeSpan = (text) => !!text && PAIR.test(text);
|
|
18
|
+
export { codeSpans, hasCodeSpan };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=codeSpans.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codeSpans.js","names":[],"sources":["../../src/internal/codeSpans.ts"],"sourcesContent":["/** One piece of a text with `backtick` spans: plain text, or the code between a pair of backticks (without them). */\nexport interface CodeSpan {\n code: boolean;\n text: string;\n}\n\nconst PAIR = /(`[^`]+`)/;\n\n/** Cuts a text written as in Markdown into plain and code pieces. Only a pair of backticks around at least one character\n * is code; a lone backtick stays in the text. Shared by CodeText, the sentence props that take a string and LayerGraph\n * labels, so every component reads backticks the same way. */\nexport function codeSpans(text: string | null | undefined): CodeSpan[] {\n // split with a capture group: the pieces at odd indexes are the matched pairs.\n return String(text ?? '')\n .split(PAIR)\n .map((t, i) => (i % 2 ? { code: true, text: t.slice(1, -1) } : { code: false, text: t }))\n .filter((s) => s.text !== '');\n}\n\n/** True when the text has at least one `code` span. */\nexport const hasCodeSpan = (text: string | null | undefined): boolean => !!text && PAIR.test(text);\n"],"mappings":";;AAMA,MAAM,OAAO;;;;AAKb,SAAgB,UAAU,MAA6C;CAErE,OAAO,OAAO,QAAQ,EAAE,CAAC,CACtB,MAAM,IAAI,CAAC,CACX,KAAK,GAAG,MAAO,IAAI,IAAI;EAAE,MAAM;EAAM,MAAM,EAAE,MAAM,GAAG,EAAE;CAAE,IAAI;EAAE,MAAM;EAAO,MAAM;CAAE,CAAE,CAAC,CACxF,QAAQ,MAAM,EAAE,SAAS,EAAE;AAChC;;AAGA,MAAa,eAAe,SAA6C,CAAC,CAAC,QAAQ,KAAK,KAAK,IAAI"}
|