@seanyeh77/ui 0.44.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1 -1
- package/dist/bundle.js +20 -20
- package/dist/components/AccentPicker/AccentPicker.d.ts +1 -0
- package/dist/components/AccentPicker/AccentPicker.js +92 -72
- package/dist/components/AccentPicker/AccentPicker.js.map +1 -1
- package/dist/components/ActionBar/ActionBar.d.ts +2 -0
- package/dist/components/ActionBar/ActionBar.js.map +1 -1
- package/dist/components/AiMark/AiMark.d.ts +1 -0
- package/dist/components/AiMark/AiMark.js.map +1 -1
- package/dist/components/Alert/Alert.d.ts +5 -2
- package/dist/components/Alert/Alert.js +17 -14
- package/dist/components/Alert/Alert.js.map +1 -1
- package/dist/components/AppShell/AppShell.d.ts +10 -4
- package/dist/components/AppShell/AppShell.js +30 -19
- package/dist/components/AppShell/AppShell.js.map +1 -1
- package/dist/components/Badge/Badge.d.ts +24 -7
- package/dist/components/Badge/Badge.js +78 -21
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/BarChart/BarChart.d.ts +14 -1
- package/dist/components/BarChart/BarChart.js +88 -59
- package/dist/components/BarChart/BarChart.js.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/Button/Button.d.ts +4 -1
- package/dist/components/Button/Button.js +17 -3
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Calendar/Calendar.d.ts +11 -2
- package/dist/components/Calendar/Calendar.js +16 -5
- package/dist/components/Calendar/Calendar.js.map +1 -1
- package/dist/components/Card/Card.d.ts +1 -0
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +24 -8
- package/dist/components/Checkbox/Checkbox.js +22 -9
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/CodeView/CodeView.d.ts +3 -0
- package/dist/components/CodeView/CodeView.js +6 -6
- package/dist/components/CodeView/CodeView.js.map +1 -1
- package/dist/components/CommandPalette/CommandPalette.d.ts +16 -4
- package/dist/components/CommandPalette/CommandPalette.js +38 -11
- package/dist/components/CommandPalette/CommandPalette.js.map +1 -1
- package/dist/components/ConsoleLayout/ConsoleLayout.d.ts +2 -3
- package/dist/components/ConsoleLayout/ConsoleLayout.js +4 -1
- package/dist/components/ConsoleLayout/ConsoleLayout.js.map +1 -1
- package/dist/components/DangerZone/DangerZone.d.ts +2 -1
- package/dist/components/DangerZone/DangerZone.js +1 -1
- package/dist/components/DangerZone/DangerZone.js.map +1 -1
- package/dist/components/DataTable/DataTable.d.ts +8 -1
- package/dist/components/DataTable/DataTable.js +213 -167
- package/dist/components/DataTable/DataTable.js.map +1 -1
- package/dist/components/DataTable/SortButton.js +48 -5
- package/dist/components/DataTable/SortButton.js.map +1 -1
- package/dist/components/DataTable/filters.js +2 -1
- package/dist/components/DataTable/filters.js.map +1 -1
- package/dist/components/DataTable/parts.js +1 -1
- package/dist/components/DataTable/parts.js.map +1 -1
- package/dist/components/DataTable/types.d.ts +10 -3
- package/dist/components/DatePicker/DatePicker.d.ts +7 -5
- package/dist/components/DatePicker/DatePicker.js +16 -6
- package/dist/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +12 -7
- package/dist/components/DateRangePicker/DateRangePicker.js +81 -45
- package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/DetailList/DetailList.d.ts +2 -0
- package/dist/components/DetailList/DetailList.js.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +56 -20
- package/dist/components/Dialog/Dialog.js +45 -14
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +17 -5
- package/dist/components/Drawer/Drawer.js +86 -24
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/ErrorPage/ErrorPage.d.ts +3 -0
- package/dist/components/ErrorPage/ErrorPage.js.map +1 -1
- package/dist/components/EventTimeline/EventTimeline.d.ts +22 -4
- package/dist/components/EventTimeline/EventTimeline.js +63 -20
- package/dist/components/EventTimeline/EventTimeline.js.map +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts +9 -1
- package/dist/components/FileUpload/FileUpload.js +3 -1
- package/dist/components/FileUpload/FileUpload.js.map +1 -1
- package/dist/components/FormGrid/FormGrid.d.ts +3 -1
- package/dist/components/FormGrid/FormGrid.js +5 -2
- package/dist/components/FormGrid/FormGrid.js.map +1 -1
- package/dist/components/Graph/Graph.d.ts +1 -0
- package/dist/components/Graph/Graph.js +8 -4
- package/dist/components/Graph/Graph.js.map +1 -1
- package/dist/components/Grid/Grid.d.ts +11 -4
- package/dist/components/Grid/Grid.js +14 -2
- package/dist/components/Grid/Grid.js.map +1 -1
- package/dist/components/IconButton/IconButton.d.ts +2 -1
- package/dist/components/IconButton/IconButton.js +10 -1
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/InlineCode/InlineCode.d.ts +6 -0
- package/dist/components/InlineCode/InlineCode.js.map +1 -1
- package/dist/components/KpiCard/KpiCard.d.ts +5 -1
- package/dist/components/KpiCard/KpiCard.js +35 -21
- package/dist/components/KpiCard/KpiCard.js.map +1 -1
- package/dist/components/LayerGraph/LayerGraph.d.ts +68 -23
- package/dist/components/LayerGraph/LayerGraph.js +159 -88
- package/dist/components/LayerGraph/LayerGraph.js.map +1 -1
- package/dist/components/LineChart/LineChart.d.ts +10 -3
- package/dist/components/LineChart/LineChart.js +55 -23
- package/dist/components/LineChart/LineChart.js.map +1 -1
- package/dist/components/Link/Link.d.ts +17 -0
- package/dist/components/Link/Link.js +47 -0
- package/dist/components/Link/Link.js.map +1 -0
- package/dist/components/LoadingBar/LoadingBar.d.ts +1 -0
- package/dist/components/LoadingBar/LoadingBar.js.map +1 -1
- package/dist/components/LoginCard/LoginCard.d.ts +9 -3
- package/dist/components/LoginCard/LoginCard.js +99 -78
- package/dist/components/LoginCard/LoginCard.js.map +1 -1
- package/dist/components/Markdown/Markdown.d.ts +1 -0
- package/dist/components/Markdown/Markdown.js +1 -1
- package/dist/components/Markdown/Markdown.js.map +1 -1
- package/dist/components/Menu/Menu.d.ts +4 -2
- package/dist/components/Menu/Menu.js +43 -33
- package/dist/components/Menu/Menu.js.map +1 -1
- package/dist/components/Meter/Meter.d.ts +4 -0
- package/dist/components/Meter/Meter.js.map +1 -1
- package/dist/components/MobileTabBar/MobileTabBar.d.ts +3 -0
- package/dist/components/MobileTabBar/MobileTabBar.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +7 -6
- package/dist/components/MultiSelect/MultiSelect.js +27 -9
- package/dist/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/components/NotificationBell/NotificationBell.d.ts +3 -0
- package/dist/components/NotificationBell/NotificationBell.js +2 -2
- package/dist/components/NotificationBell/NotificationBell.js.map +1 -1
- package/dist/components/PageHeader/PageHeader.d.ts +34 -0
- package/dist/components/PageHeader/PageHeader.js +68 -0
- package/dist/components/PageHeader/PageHeader.js.map +1 -0
- package/dist/components/Popover/Popover.d.ts +11 -4
- package/dist/components/Popover/Popover.js +17 -7
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +2 -0
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/ProgressRing/ProgressRing.d.ts +1 -0
- package/dist/components/ProgressRing/ProgressRing.js.map +1 -1
- package/dist/components/ProjectSwitcher/ProjectSwitcher.d.ts +5 -1
- package/dist/components/ProjectSwitcher/ProjectSwitcher.js +16 -3
- package/dist/components/ProjectSwitcher/ProjectSwitcher.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +22 -5
- package/dist/components/RadioGroup/RadioGroup.js +48 -47
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/RelativeTime/RelativeTime.d.ts +10 -0
- package/dist/components/RelativeTime/RelativeTime.js +44 -0
- package/dist/components/RelativeTime/RelativeTime.js.map +1 -0
- package/dist/components/SearchField/SearchField.d.ts +2 -0
- package/dist/components/SearchField/SearchField.js.map +1 -1
- package/dist/components/Section/Section.d.ts +4 -0
- package/dist/components/Section/Section.js +8 -22
- package/dist/components/Section/Section.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +22 -9
- package/dist/components/SegmentedControl/SegmentedControl.js +20 -19
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/components/Select/Select.d.ts +7 -11
- package/dist/components/Select/Select.js +7 -3
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/SettingsLayout/SettingsLayout.d.ts +32 -3
- package/dist/components/SettingsLayout/SettingsLayout.js +60 -13
- package/dist/components/SettingsLayout/SettingsLayout.js.map +1 -1
- package/dist/components/SideNav/SideNav.d.ts +2 -0
- package/dist/components/SideNav/SideNav.js +3 -3
- package/dist/components/SideNav/SideNav.js.map +1 -1
- package/dist/components/SplitPane/SplitPane.d.ts +1 -0
- package/dist/components/SplitPane/SplitPane.js.map +1 -1
- package/dist/components/StatusBand/StatusBand.d.ts +1 -0
- package/dist/components/StatusBand/StatusBand.js.map +1 -1
- package/dist/components/Suggestion/Suggestion.d.ts +6 -0
- package/dist/components/Suggestion/Suggestion.js.map +1 -1
- package/dist/components/Switch/Switch.d.ts +13 -3
- package/dist/components/Switch/Switch.js +16 -7
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +4 -0
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tag/Tag.d.ts +15 -7
- package/dist/components/Tag/Tag.js +22 -10
- package/dist/components/Tag/Tag.js.map +1 -1
- package/dist/components/Term/Term.d.ts +8 -3
- package/dist/components/Term/Term.js +1 -1
- package/dist/components/Term/Term.js.map +1 -1
- package/dist/components/TextArea/TextArea.d.ts +6 -10
- package/dist/components/TextArea/TextArea.js +22 -10
- package/dist/components/TextArea/TextArea.js.map +1 -1
- package/dist/components/TextField/TextField.d.ts +8 -11
- package/dist/components/TextField/TextField.js +9 -7
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/ThemePicker/ThemePicker.d.ts +1 -0
- package/dist/components/ThemePicker/ThemePicker.js +35 -34
- package/dist/components/ThemePicker/ThemePicker.js.map +1 -1
- package/dist/components/TimeControl/TimeControl.d.ts +1 -0
- package/dist/components/TimeControl/TimeControl.js.map +1 -1
- package/dist/components/Toast/Toast.d.ts +55 -2
- package/dist/components/Toast/Toast.js +190 -8
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/TopBar/TopBar.d.ts +6 -2
- package/dist/components/TopBar/TopBar.js +7 -1
- package/dist/components/TopBar/TopBar.js.map +1 -1
- package/dist/components/Tour/Tour.d.ts +14 -3
- package/dist/components/Tour/Tour.js +26 -14
- package/dist/components/Tour/Tour.js.map +1 -1
- package/dist/components/TreeList/TreeList.d.ts +28 -4
- package/dist/components/TreeList/TreeList.js +32 -20
- package/dist/components/TreeList/TreeList.js.map +1 -1
- package/dist/components/Workbench/Workbench.d.ts +1 -0
- package/dist/components/Workbench/Workbench.js +24 -12
- package/dist/components/Workbench/Workbench.js.map +1 -1
- package/dist/components/ZoneMap/ZoneMap.d.ts +12 -2
- package/dist/components/ZoneMap/ZoneMap.js +13 -5
- package/dist/components/ZoneMap/ZoneMap.js.map +1 -1
- package/dist/components/useFormErrors/useFormErrors.d.ts +20 -0
- package/dist/components/useFormErrors/useFormErrors.js +55 -0
- package/dist/components/useFormErrors/useFormErrors.js.map +1 -0
- package/dist/css/AccentPicker.css +1 -0
- package/dist/css/Alert.css +7 -19
- package/dist/css/AppShell.css +1 -0
- package/dist/css/Badge.css +19 -45
- package/dist/css/BarChart.css +21 -3
- package/dist/css/Button.css +5 -1
- package/dist/css/Card.css +8 -8
- package/dist/css/Checkbox.css +19 -0
- package/dist/css/CodeView.css +2 -1
- package/dist/css/DangerZone.css +4 -3
- package/dist/css/DataTable.css +129 -34
- package/dist/css/DateRangePicker.css +23 -2
- package/dist/css/Drawer.css +30 -0
- package/dist/css/ErrorPage.css +3 -1
- package/dist/css/EventTimeline.css +33 -5
- package/dist/css/FormGrid.css +12 -3
- package/dist/css/Graph.css +9 -1
- package/dist/css/Grid.css +8 -0
- package/dist/css/KpiCard.css +12 -1
- package/dist/css/LayerGraph.css +40 -15
- package/dist/css/Link.css +23 -0
- package/dist/css/LoginCard.css +16 -11
- package/dist/css/Markdown.css +2 -1
- package/dist/css/Menu.css +0 -2
- package/dist/css/Meter.css +16 -0
- package/dist/css/PageHeader.css +50 -0
- package/dist/css/ProgressBar.css +12 -0
- package/dist/css/ProjectSwitcher.css +23 -26
- package/dist/css/RelativeTime.css +2 -0
- package/dist/css/SegmentedControl.css +38 -10
- package/dist/css/SettingsLayout.css +28 -8
- package/dist/css/SideNav.css +4 -1
- package/dist/css/Skeleton.css +22 -1
- package/dist/css/Switch.css +27 -0
- package/dist/css/Tabs.css +2 -1
- package/dist/css/Tag.css +19 -12
- package/dist/css/Toast.css +100 -4
- package/dist/css/TopBar.css +21 -2
- package/dist/css/TreeList.css +6 -3
- package/dist/css/Workbench.css +1 -1
- package/dist/css/ZoneMap.css +0 -1
- package/dist/css/base.css +45 -0
- package/dist/css/end.css +119 -5
- package/dist/deprecated.d.ts +3 -0
- package/dist/deprecated.js +13 -0
- package/dist/deprecated.js.map +1 -0
- package/dist/fonts.css +2 -7543
- package/dist/format.d.ts +3 -1
- package/dist/format.js +12 -4
- package/dist/format.js.map +1 -1
- package/dist/generated/themeDefaults.d.ts +8 -0
- package/dist/generated/themeDefaults.js +35 -0
- package/dist/generated/themeDefaults.js.map +1 -0
- package/dist/i18n.d.ts +7 -2
- package/dist/i18n.js +65 -10
- package/dist/i18n.js.map +1 -1
- package/dist/icons/Icon.d.ts +3 -1
- package/dist/icons/Icon.js.map +1 -1
- package/dist/index.d.ts +23 -14
- package/dist/index.js +14 -8
- package/dist/internal/Field.d.ts +19 -0
- package/dist/internal/Field.js +10 -4
- package/dist/internal/Field.js.map +1 -1
- package/dist/internal/FloatingPanel.js +2 -1
- package/dist/internal/FloatingPanel.js.map +1 -1
- package/dist/internal/chart.d.ts +4 -0
- package/dist/internal/chart.js +89 -19
- package/dist/internal/chart.js.map +1 -1
- package/dist/internal/dev.js +9 -4
- package/dist/internal/dev.js.map +1 -1
- package/dist/internal/focus.js +27 -3
- package/dist/internal/focus.js.map +1 -1
- package/dist/internal/focusMain.js +6 -2
- package/dist/internal/focusMain.js.map +1 -1
- package/dist/internal/open.d.ts +14 -0
- package/dist/internal/open.js +28 -0
- package/dist/internal/open.js.map +1 -0
- package/dist/internal/roving.js +37 -0
- package/dist/internal/roving.js.map +1 -0
- package/dist/internal/shell.js +12 -0
- package/dist/internal/shell.js.map +1 -0
- package/dist/internal/stored.js +89 -0
- package/dist/internal/stored.js.map +1 -0
- package/dist/internal/tableTools.js +46 -4
- package/dist/internal/tableTools.js.map +1 -1
- package/dist/internal/util.js +8 -17
- package/dist/internal/util.js.map +1 -1
- package/dist/locale.d.ts +17 -0
- package/dist/locale.js +29 -0
- package/dist/locale.js.map +1 -0
- package/dist/styles.css +944 -231
- package/dist/theme.d.ts +23 -5
- package/dist/theme.js +85 -25
- package/dist/theme.js.map +1 -1
- package/dist/tokens.css +3 -0
- package/docs/AccentPicker.md +3 -1
- package/docs/Alert.md +4 -4
- package/docs/AppShell.md +11 -10
- package/docs/Badge.md +26 -16
- package/docs/BarChart.md +7 -4
- package/docs/Button.md +4 -5
- package/docs/Calendar.md +2 -2
- package/docs/Card.md +8 -7
- package/docs/Checkbox.md +4 -1
- package/docs/CodeView.md +30 -43
- package/docs/CommandPalette.md +3 -2
- package/docs/ConsoleLayout.md +5 -5
- package/docs/DangerZone.md +3 -3
- package/docs/DataColors.md +2 -2
- package/docs/DataTable.md +26 -148
- package/docs/DatePicker.md +1 -1
- package/docs/DateRangePicker.md +3 -0
- package/docs/DetailList.md +9 -9
- package/docs/Dialog.md +8 -5
- package/docs/Drawer.md +7 -5
- package/docs/EmptyState.md +0 -1
- package/docs/ErrorPage.md +1 -2
- package/docs/EventTimeline.md +23 -13
- package/docs/FileUpload.md +1 -2
- package/docs/FormGrid.md +2 -1
- package/docs/Format.md +4 -2
- package/docs/Graph.md +1 -1
- package/docs/Grid.md +5 -1
- package/docs/KpiCard.md +6 -5
- package/docs/LayerGraph.md +18 -53
- package/docs/LineChart.md +5 -3
- package/docs/Link.md +22 -0
- package/docs/LoginCard.md +7 -4
- package/docs/Markdown.md +2 -15
- package/docs/Menu.md +2 -0
- package/docs/Meter.md +1 -0
- package/docs/MultiSelect.md +2 -2
- package/docs/NotificationBell.md +1 -1
- package/docs/PageHeader.md +34 -0
- package/docs/Popover.md +3 -1
- package/docs/ProgressBar.md +3 -1
- package/docs/ProjectSwitcher.md +14 -14
- package/docs/RadioGroup.md +2 -0
- package/docs/RelativeTime.md +23 -0
- package/docs/Section.md +1 -1
- package/docs/SegmentedControl.md +9 -6
- package/docs/Select.md +2 -2
- package/docs/SettingsLayout.md +19 -5
- package/docs/SideNav.md +1 -1
- package/docs/Skeleton.md +2 -1
- package/docs/Switch.md +3 -1
- package/docs/Tabs.md +2 -1
- package/docs/Tag.md +9 -7
- package/docs/Term.md +3 -4
- package/docs/TextArea.md +2 -2
- package/docs/TextField.md +5 -4
- package/docs/ThemePicker.md +3 -1
- package/docs/Toast.md +17 -6
- package/docs/TopBar.md +8 -5
- package/docs/Tour.md +3 -2
- package/docs/TreeList.md +10 -37
- package/docs/Workbench.md +1 -48
- package/docs/ZoneMap.md +5 -5
- package/docs/agents.md +82 -0
- package/docs/code.md +2 -2
- package/docs/components.json +314 -0
- package/docs/data.md +9 -19
- package/docs/forms.md +6 -5
- package/docs/guidelines.md +39 -31
- package/docs/icons.md +9 -0
- package/docs/layout.md +16 -20
- package/docs/motion.md +31 -56
- package/docs/theme.md +15 -18
- package/docs/useFormErrors.md +35 -0
- package/package.json +8 -7
- package/dist/bundle.js.map +0 -1
- package/dist/fonts/LICENSE-OFL.txt +0 -93
- package/dist/fonts/geist-mono-cyrillic-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-ext-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-ext-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-ext-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-ext-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-ext-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-latin-ext-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-symbols2-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-symbols2-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-symbols2-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-symbols2-700-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-vietnamese-400-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-vietnamese-500-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-vietnamese-600-normal.woff2 +0 -0
- package/dist/fonts/geist-mono-vietnamese-700-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-400-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-500-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-600-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-700-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-500-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-600-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-400-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-500-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-600-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-700-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-400-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-500-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-600-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-700-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-400-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-500-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-600-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-700-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-400-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-500-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-600-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-700-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-400-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-500-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-600-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-0-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-0-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-0-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-0-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-1-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-1-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-1-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-1-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-10-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-10-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-10-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-10-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-101-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-101-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-101-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-101-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-102-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-102-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-102-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-102-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-103-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-103-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-103-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-103-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-104-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-104-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-104-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-104-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-105-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-105-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-105-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-105-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-106-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-106-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-106-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-106-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-107-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-107-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-107-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-107-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-108-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-108-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-108-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-108-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-109-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-109-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-109-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-109-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-11-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-11-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-11-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-11-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-110-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-110-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-110-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-110-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-111-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-111-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-111-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-111-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-112-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-112-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-112-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-112-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-113-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-113-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-113-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-113-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-114-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-114-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-114-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-114-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-115-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-115-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-115-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-115-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-116-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-116-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-116-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-116-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-117-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-117-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-117-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-117-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-118-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-118-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-118-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-118-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-119-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-119-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-119-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-119-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-12-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-12-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-12-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-12-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-120-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-120-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-120-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-120-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-121-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-121-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-121-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-121-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-122-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-122-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-122-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-122-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-123-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-123-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-123-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-123-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-2-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-2-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-2-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-2-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-23-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-23-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-23-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-23-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-24-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-24-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-24-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-24-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-25-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-25-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-25-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-25-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-26-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-26-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-26-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-26-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-27-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-27-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-27-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-27-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-28-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-28-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-28-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-28-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-29-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-29-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-29-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-29-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-30-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-30-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-30-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-30-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-31-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-31-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-31-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-31-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-32-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-32-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-32-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-32-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-33-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-33-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-33-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-33-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-34-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-34-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-34-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-34-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-35-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-35-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-35-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-35-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-36-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-36-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-36-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-36-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-37-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-37-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-37-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-37-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-38-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-38-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-38-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-38-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-39-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-39-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-39-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-39-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-4-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-4-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-4-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-4-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-40-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-40-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-40-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-40-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-41-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-41-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-41-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-41-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-42-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-42-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-42-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-42-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-43-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-43-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-43-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-43-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-44-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-44-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-44-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-44-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-45-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-45-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-45-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-45-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-46-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-46-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-46-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-46-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-47-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-47-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-47-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-47-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-48-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-48-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-48-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-48-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-49-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-49-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-49-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-49-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-50-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-50-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-50-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-50-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-51-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-51-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-51-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-51-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-52-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-52-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-52-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-52-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-53-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-53-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-53-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-53-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-54-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-54-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-54-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-54-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-55-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-55-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-55-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-55-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-56-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-56-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-56-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-56-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-57-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-57-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-57-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-57-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-58-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-58-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-58-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-58-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-59-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-59-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-59-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-59-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-60-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-60-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-60-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-60-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-61-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-61-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-61-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-61-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-62-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-62-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-62-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-62-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-63-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-63-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-63-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-63-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-64-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-64-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-64-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-64-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-65-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-65-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-65-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-65-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-66-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-66-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-66-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-66-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-67-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-67-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-67-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-67-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-68-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-68-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-68-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-68-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-69-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-69-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-69-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-69-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-70-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-70-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-70-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-70-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-71-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-71-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-71-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-71-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-72-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-72-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-72-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-72-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-73-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-73-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-73-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-73-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-74-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-74-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-74-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-74-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-75-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-75-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-75-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-75-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-76-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-76-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-76-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-76-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-77-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-77-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-77-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-77-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-78-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-78-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-78-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-78-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-79-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-79-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-79-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-79-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-80-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-80-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-80-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-80-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-81-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-81-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-81-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-81-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-82-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-82-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-82-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-82-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-83-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-83-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-83-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-83-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-84-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-84-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-84-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-84-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-85-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-85-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-85-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-85-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-86-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-86-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-86-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-86-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-87-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-87-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-87-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-87-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-88-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-88-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-88-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-88-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-89-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-89-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-89-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-89-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-90-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-90-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-90-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-90-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-91-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-91-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-91-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-91-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-92-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-92-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-92-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-92-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-93-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-93-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-93-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-93-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-94-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-94-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-94-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-94-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-95-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-95-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-95-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-95-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-96-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-96-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-96-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-96-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-cyrillic-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-cyrillic-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-cyrillic-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-cyrillic-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-ext-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-ext-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-ext-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-latin-ext-700-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-vietnamese-400-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-vietnamese-500-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-vietnamese-600-normal.woff2 +0 -0
- package/dist/fonts/noto-sans-tc-vietnamese-700-normal.woff2 +0 -0
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { tr } from "../../i18n.js";
|
|
3
3
|
import { Icon } from "../../icons/Icon.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { cx } from "../../internal/util.js";
|
|
5
|
+
import { useStored } from "../../internal/stored.js";
|
|
6
|
+
import { useRovingRadio } from "../../internal/roving.js";
|
|
7
|
+
import { FieldErrorIcon, FieldMessage } from "../../internal/Field.js";
|
|
8
|
+
import { ACCENT_KEY, ACCENT_SWATCHES, defaultAccent, parseAccent, setAccent } from "../../theme.js";
|
|
6
9
|
import { includeIcons } from "../../icons/store.js";
|
|
10
|
+
import { DEFAULT_ACCENT } from "../../generated/themeDefaults.js";
|
|
7
11
|
import check_default from "../../icons/ph/check.js";
|
|
8
12
|
import * as React from "react";
|
|
9
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -11,87 +15,103 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
11
15
|
includeIcons(check_default);
|
|
12
16
|
const SWATCHES = ACCENT_SWATCHES;
|
|
13
17
|
const HEX = /^#[0-9a-fA-F]{6}$/;
|
|
18
|
+
const noSubscribe = () => () => {};
|
|
19
|
+
const serverAccent = () => DEFAULT_ACCENT;
|
|
14
20
|
/** 8 swatches plus a hex field for any color. */
|
|
15
21
|
function AccentPicker({ value, onChange, label, className }) {
|
|
16
|
-
const [
|
|
22
|
+
const [stored] = useStored(ACCENT_KEY, parseAccent, null);
|
|
23
|
+
const fallback = React.useSyncExternalStore(noSubscribe, defaultAccent, serverAccent);
|
|
24
|
+
const [own, setOwn] = React.useState(null);
|
|
17
25
|
const [hexIn, setHexIn] = React.useState("");
|
|
18
|
-
const cur = (value || own).toLowerCase();
|
|
26
|
+
const cur = (value || own || stored || fallback).toLowerCase();
|
|
19
27
|
const pick = (c) => {
|
|
20
28
|
setOwn(c);
|
|
21
29
|
if (onChange) onChange(c);
|
|
22
30
|
else setAccent(c);
|
|
23
31
|
};
|
|
24
|
-
const
|
|
25
|
-
const
|
|
32
|
+
const [checked, setChecked] = React.useState(false);
|
|
33
|
+
const bad = checked && !!hexIn && !HEX.test(hexIn);
|
|
34
|
+
const ids = React.useId();
|
|
35
|
+
const roving = useRovingRadio(SWATCHES.length, (i) => {
|
|
36
|
+
setHexIn("");
|
|
37
|
+
setChecked(false);
|
|
38
|
+
pick(SWATCHES[i][1]);
|
|
39
|
+
});
|
|
26
40
|
const tabStop = Math.max(0, SWATCHES.findIndex(([, hex]) => hex === cur));
|
|
27
41
|
return /* @__PURE__ */ jsxs("div", {
|
|
28
|
-
className: cx("ui-accentpick", className),
|
|
29
|
-
children: [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
children: on ? /* @__PURE__ */ jsx(Icon, {
|
|
65
|
-
name: "check",
|
|
66
|
-
size: 14
|
|
67
|
-
}) : null
|
|
68
|
-
}, hex);
|
|
69
|
-
})
|
|
70
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
71
|
-
className: "ui-accentpick-hex",
|
|
72
|
-
children: [
|
|
73
|
-
/* @__PURE__ */ jsx("span", {
|
|
74
|
-
className: "ui-accentpick-preview",
|
|
75
|
-
style: { background: !bad && hexIn ? hexIn : cur }
|
|
76
|
-
}),
|
|
77
|
-
/* @__PURE__ */ jsx("input", {
|
|
78
|
-
className: cx("ui-input", bad && "is-invalid"),
|
|
79
|
-
"aria-label": tr("自訂強調色(色碼)"),
|
|
80
|
-
"aria-invalid": bad || void 0,
|
|
81
|
-
value: hexIn,
|
|
82
|
-
placeholder: cur,
|
|
83
|
-
onChange: (e) => {
|
|
84
|
-
const x = e.target.value.trim();
|
|
85
|
-
setHexIn(x);
|
|
86
|
-
if (HEX.test(x)) pick(x.toLowerCase());
|
|
87
|
-
}
|
|
88
|
-
}),
|
|
89
|
-
/* @__PURE__ */ jsx("span", {
|
|
90
|
-
className: cx("ui-field-hint", bad && "is-error"),
|
|
91
|
-
children: bad ? tr("色碼格式不正確,例如 #2457d6") : tr("輸入 # 加 6 碼")
|
|
42
|
+
className: cx("ui-field", "ui-accentpick", className),
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsx("div", {
|
|
45
|
+
id: ids + "-label",
|
|
46
|
+
className: "ui-field-label",
|
|
47
|
+
children: label || tr("強調色")
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ jsx("div", {
|
|
50
|
+
role: "radiogroup",
|
|
51
|
+
"aria-labelledby": ids + "-label",
|
|
52
|
+
className: "ui-accentpick-swatches",
|
|
53
|
+
children: SWATCHES.map(([name, hex], i) => {
|
|
54
|
+
const on = cur === hex;
|
|
55
|
+
return /* @__PURE__ */ jsx("button", {
|
|
56
|
+
ref: roving.ref(i),
|
|
57
|
+
type: "button",
|
|
58
|
+
role: "radio",
|
|
59
|
+
"aria-checked": on,
|
|
60
|
+
tabIndex: i === tabStop ? 0 : -1,
|
|
61
|
+
"aria-label": tr(name),
|
|
62
|
+
title: tr(name),
|
|
63
|
+
className: cx("ui-swatch", on && "is-on"),
|
|
64
|
+
style: {
|
|
65
|
+
background: hex,
|
|
66
|
+
color: hex
|
|
67
|
+
},
|
|
68
|
+
onClick: () => {
|
|
69
|
+
setHexIn("");
|
|
70
|
+
pick(hex);
|
|
71
|
+
},
|
|
72
|
+
onKeyDown: roving.onKeyDown(i),
|
|
73
|
+
children: on ? /* @__PURE__ */ jsx(Icon, {
|
|
74
|
+
name: "check",
|
|
75
|
+
size: 14
|
|
76
|
+
}) : null
|
|
77
|
+
}, hex);
|
|
92
78
|
})
|
|
93
|
-
|
|
94
|
-
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ jsxs("div", {
|
|
81
|
+
className: cx("ui-accentpick-hex", bad && "has-error"),
|
|
82
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
83
|
+
className: "ui-accentpick-preview",
|
|
84
|
+
style: { background: HEX.test(hexIn) ? hexIn : cur }
|
|
85
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
86
|
+
className: "ui-field-box",
|
|
87
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
88
|
+
className: cx("ui-input", bad && "is-invalid"),
|
|
89
|
+
"aria-label": tr("自訂強調色(色碼)"),
|
|
90
|
+
"aria-invalid": bad || void 0,
|
|
91
|
+
"aria-describedby": ids + "-msg",
|
|
92
|
+
value: hexIn,
|
|
93
|
+
placeholder: cur,
|
|
94
|
+
onChange: (e) => {
|
|
95
|
+
const x = e.target.value.trim();
|
|
96
|
+
setHexIn(x);
|
|
97
|
+
if (HEX.test(x)) {
|
|
98
|
+
setChecked(false);
|
|
99
|
+
pick(x.toLowerCase());
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
onBlur: () => setChecked(true),
|
|
103
|
+
onKeyDown: (e) => {
|
|
104
|
+
if (e.key === "Enter") setChecked(true);
|
|
105
|
+
}
|
|
106
|
+
}), bad ? /* @__PURE__ */ jsx(FieldErrorIcon, {}) : null]
|
|
107
|
+
})]
|
|
108
|
+
}),
|
|
109
|
+
/* @__PURE__ */ jsx(FieldMessage, {
|
|
110
|
+
id: ids + "-msg",
|
|
111
|
+
error: bad ? tr("色碼格式不正確,請輸入 # 加 6 碼,例如 #2457d6") : void 0,
|
|
112
|
+
hint: tr("輸入 # 加 6 碼")
|
|
113
|
+
})
|
|
114
|
+
]
|
|
95
115
|
});
|
|
96
116
|
}
|
|
97
117
|
export { AccentPicker };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccentPicker.js","names":["phCheck"],"sources":["../../../src/components/AccentPicker/AccentPicker.tsx"],"sourcesContent":["import * as React from 'react';\nimport { tr } from '../../i18n';\nimport { Icon } from '../../icons/Icon';\nimport {
|
|
1
|
+
{"version":3,"file":"AccentPicker.js","names":["phCheck"],"sources":["../../../src/components/AccentPicker/AccentPicker.tsx"],"sourcesContent":["import * as React from 'react';\nimport { tr } from '../../i18n';\nimport { Icon } from '../../icons/Icon';\nimport { cx } from '../../internal/util';\nimport { useStored } from '../../internal/stored';\nimport { useRovingRadio } from '../../internal/roving';\nimport { FieldErrorIcon, FieldMessage } from '../../internal/Field';\nimport { ACCENT_KEY, ACCENT_SWATCHES, DEFAULT_ACCENT, defaultAccent, parseAccent, setAccent } from '../../theme';\nimport { includeIcons } from '../../icons/store';\nimport phCheck from '../../icons/ph/check';\n\nincludeIcons(phCheck);\n\nconst SWATCHES = ACCENT_SWATCHES;\nconst HEX = /^#[0-9a-fA-F]{6}$/;\nconst noSubscribe = () => () => {};\nconst serverAccent = () => DEFAULT_ACCENT;\n\nexport interface AccentPickerProps {\n /** Controlled #rrggbb. Without it, the picker reads and sets the stored accent itself. */\n value?: string;\n /** Without it, picking applies the color with setAccent. */\n onChange?: (hex: string) => void;\n /** Default 「強調色」. */\n label?: string;\n /** Extra class on the root element. */\n className?: string;\n}\n\n/** 8 swatches plus a hex field for any color. */\nexport function AccentPicker({ value, onChange, label, className }: AccentPickerProps) {\n // The default accent on the server and the first browser render, then the stored pick (or the preset's accent).\n const [stored] = useStored<string | null>(ACCENT_KEY, parseAccent, null);\n const fallback = React.useSyncExternalStore(noSubscribe, defaultAccent, serverAccent);\n const [own, setOwn] = React.useState<string | null>(null);\n const [hexIn, setHexIn] = React.useState('');\n const cur = (value || own || stored || fallback).toLowerCase();\n const pick = (c: string) => {\n setOwn(c);\n if (onChange) onChange(c);\n else setAccent(c);\n };\n // Checked when the field is left or Enter is pressed, not on every key: 「#2」 is not wrong yet while typing.\n const [checked, setChecked] = React.useState(false);\n const bad = checked && !!hexIn && !HEX.test(hexIn);\n const ids = React.useId();\n const roving = useRovingRadio(SWATCHES.length, (i) => {\n setHexIn('');\n setChecked(false);\n pick(SWATCHES[i][1]);\n });\n // One Tab stop in the swatches (the chosen one, or the first for a custom color); arrow keys move and choose.\n const tabStop = Math.max(\n 0,\n SWATCHES.findIndex(([, hex]) => hex === cur),\n );\n return (\n <div className={cx('ui-field', 'ui-accentpick', className)}>\n {/* A visible label, as every field has. */}\n <div id={ids + '-label'} className=\"ui-field-label\">\n {label || tr('強調色')}\n </div>\n <div role=\"radiogroup\" aria-labelledby={ids + '-label'} className=\"ui-accentpick-swatches\">\n {SWATCHES.map(([name, hex], i) => {\n const on = cur === hex;\n return (\n <button\n key={hex}\n ref={roving.ref(i)}\n type=\"button\"\n role=\"radio\"\n aria-checked={on}\n tabIndex={i === tabStop ? 0 : -1}\n aria-label={tr(name)}\n title={tr(name)}\n className={cx('ui-swatch', on && 'is-on')}\n style={{ background: hex, color: hex }}\n onClick={() => {\n setHexIn('');\n pick(hex);\n }}\n onKeyDown={roving.onKeyDown(i)}\n >\n {on ? <Icon name=\"check\" size={14} /> : null}\n </button>\n );\n })}\n </div>\n <div className={cx('ui-accentpick-hex', bad && 'has-error')}>\n <span className=\"ui-accentpick-preview\" style={{ background: HEX.test(hexIn) ? hexIn : cur }} />\n <div className=\"ui-field-box\">\n <input\n className={cx('ui-input', bad && 'is-invalid')}\n aria-label={tr('自訂強調色(色碼)')}\n aria-invalid={bad || undefined}\n aria-describedby={ids + '-msg'}\n value={hexIn}\n placeholder={cur}\n onChange={(e) => {\n const x = e.target.value.trim();\n setHexIn(x);\n // A right code applies at once and clears an error; a wrong one waits for blur or Enter.\n if (HEX.test(x)) {\n setChecked(false);\n pick(x.toLowerCase());\n }\n }}\n onBlur={() => setChecked(true)}\n onKeyDown={(e) => {\n if (e.key === 'Enter') setChecked(true);\n }}\n />\n {bad ? <FieldErrorIcon /> : null}\n </div>\n </div>\n <FieldMessage id={ids + '-msg'} error={bad ? tr('色碼格式不正確,請輸入 # 加 6 碼,例如 #2457d6') : undefined} hint={tr('輸入 # 加 6 碼')} />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAWA,aAAaA,aAAO;AAEpB,MAAM,WAAW;AACjB,MAAM,MAAM;AACZ,MAAM,0BAA0B,CAAC;AACjC,MAAM,qBAAqB;;AAc3B,SAAgB,aAAa,EAAE,OAAO,UAAU,OAAO,aAAgC;CAErF,MAAM,CAAC,UAAU,UAAyB,YAAY,aAAa,IAAI;CACvE,MAAM,WAAW,MAAM,qBAAqB,aAAa,eAAe,YAAY;CACpF,MAAM,CAAC,KAAK,UAAU,MAAM,SAAwB,IAAI;CACxD,MAAM,CAAC,OAAO,YAAY,MAAM,SAAS,EAAE;CAC3C,MAAM,OAAO,SAAS,OAAO,UAAU,SAAA,CAAU,YAAY;CAC7D,MAAM,QAAQ,MAAc;EAC1B,OAAO,CAAC;EACR,IAAI,UAAU,SAAS,CAAC;OACnB,UAAU,CAAC;CAClB;CAEA,MAAM,CAAC,SAAS,cAAc,MAAM,SAAS,KAAK;CAClD,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,CAAC,IAAI,KAAK,KAAK;CACjD,MAAM,MAAM,MAAM,MAAM;CACxB,MAAM,SAAS,eAAe,SAAS,SAAS,MAAM;EACpD,SAAS,EAAE;EACX,WAAW,KAAK;EAChB,KAAK,SAAS,EAAE,CAAC,EAAE;CACrB,CAAC;CAED,MAAM,UAAU,KAAK,IACnB,GACA,SAAS,WAAW,GAAG,SAAS,QAAQ,GAAG,CAC7C;CACA,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,YAAY,iBAAiB,SAAS;EAAzD,UAAA;GAEE,oBAA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Y,MAAM;OAChB,IAAI,EAAE,QAAQ,SAAS,WAAW,IAAI;MACxC;KACD,CAAA,GACA,MAAM,oBAAC,gBAAD,CAAiB,CAAA,IAAI,IACzB;IACF,CAAA,CAAA;;GACL,oBAAC,cAAD;IAAc,IAAI,MAAM;IAAQ,OAAO,MAAM,GAAG,gCAAgC,IAAI,KAAA;IAAW,MAAM,GAAG,YAAY;GAAI,CAAA;EACrH;;AAET"}
|
|
@@ -19,7 +19,9 @@ export type ActionBarAction = (ActionBase & {
|
|
|
19
19
|
primary?: false;
|
|
20
20
|
});
|
|
21
21
|
export interface ActionBarProps {
|
|
22
|
+
/** The actions, in order: all buttons in a row; under 600 px only the primary one, the others in a 「更多」 menu. */
|
|
22
23
|
actions: ActionBarAction[];
|
|
24
|
+
/** Extra class on the root element. */
|
|
23
25
|
className?: string;
|
|
24
26
|
}
|
|
25
27
|
/** A card's actions in a row. Under 600 px the primary one fills the width and the rest go into 「更多」. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBar.js","names":[],"sources":["../../../src/components/ActionBar/ActionBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { tr } from '../../i18n';\nimport type { IconSource } from '../../icons/Icon';\nimport { useFocusRescue } from '../../internal/focus';\nimport { cx } from '../../internal/util';\nimport { Button, type DangerConfirm } from '../Button/Button';\nimport { Menu, type MenuItem } from '../Menu/Menu';\n\ninterface ActionBase {\n /** A verb. */\n label: string;\n onClick?: () => void;\n icon?: IconSource;\n disabled?: boolean;\n}\n\nexport type ActionBarAction =\n | (ActionBase & {\n /** The one primary action. Default: the first action. */\n primary?: boolean;\n danger?: false;\n })\n | (ActionBase & {\n /** Red in the 「更多」 menu, confirmed first. */\n danger: true;\n confirm: DangerConfirm;\n primary?: false;\n });\n\nexport interface ActionBarProps {\n actions: ActionBarAction[];\n className?: string;\n}\n\n/** A card's actions in a row. Under 600 px the primary one fills the width and the rest go into 「更多」. */\nexport function ActionBar({ actions, className }: ActionBarProps) {\n // A button that is removed, replaced or disabled after a press hands focus to its neighbour.\n const box = React.useRef<HTMLDivElement>(null);\n useFocusRescue(box);\n const main = actions.find((a) => a.primary) ?? actions.find((a) => !a.danger);\n const others = actions.filter((a) => a !== main);\n const button = (a: ActionBarAction, i: number, wide: boolean) =>\n a.danger ? (\n <Button key={i} variant=\"danger\" confirm={a.confirm} icon={a.icon} onClick={a.onClick} disabled={a.disabled}>\n {a.label}\n </Button>\n ) : (\n <Button\n key={i}\n variant={a === main ? 'primary' : 'secondary'}\n icon={a.icon}\n onClick={a.onClick}\n disabled={a.disabled}\n className={wide ? 'ui-actbar-main' : undefined}\n >\n {a.label}\n </Button>\n );\n const menuItems = others.map((a): MenuItem =>\n a.danger\n ? { label: a.label, icon: a.icon, onSelect: a.onClick, disabled: a.disabled, danger: true, confirm: a.confirm }\n : { label: a.label, icon: a.icon, onSelect: a.onClick, disabled: a.disabled },\n );\n return (\n <div ref={box} className={cx('ui-actbar', className)}>\n <div className=\"ui-actbar-wide\">{(main ? [main, ...others] : others).map((a, i) => button(a, i, false))}</div>\n <div className=\"ui-actbar-narrow\">\n {main ? button(main, 0, true) : null}\n {others.length ? <Menu label={tr('更多操作')} triggerClassName=\"ui-actbar-more\" items={menuItems} /> : null}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ActionBar.js","names":[],"sources":["../../../src/components/ActionBar/ActionBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { tr } from '../../i18n';\nimport type { IconSource } from '../../icons/Icon';\nimport { useFocusRescue } from '../../internal/focus';\nimport { cx } from '../../internal/util';\nimport { Button, type DangerConfirm } from '../Button/Button';\nimport { Menu, type MenuItem } from '../Menu/Menu';\n\ninterface ActionBase {\n /** A verb. */\n label: string;\n onClick?: () => void;\n icon?: IconSource;\n disabled?: boolean;\n}\n\nexport type ActionBarAction =\n | (ActionBase & {\n /** The one primary action. Default: the first action. */\n primary?: boolean;\n danger?: false;\n })\n | (ActionBase & {\n /** Red in the 「更多」 menu, confirmed first. */\n danger: true;\n confirm: DangerConfirm;\n primary?: false;\n });\n\nexport interface ActionBarProps {\n /** The actions, in order: all buttons in a row; under 600 px only the primary one, the others in a 「更多」 menu. */\n actions: ActionBarAction[];\n /** Extra class on the root element. */\n className?: string;\n}\n\n/** A card's actions in a row. Under 600 px the primary one fills the width and the rest go into 「更多」. */\nexport function ActionBar({ actions, className }: ActionBarProps) {\n // A button that is removed, replaced or disabled after a press hands focus to its neighbour.\n const box = React.useRef<HTMLDivElement>(null);\n useFocusRescue(box);\n const main = actions.find((a) => a.primary) ?? actions.find((a) => !a.danger);\n const others = actions.filter((a) => a !== main);\n const button = (a: ActionBarAction, i: number, wide: boolean) =>\n a.danger ? (\n <Button key={i} variant=\"danger\" confirm={a.confirm} icon={a.icon} onClick={a.onClick} disabled={a.disabled}>\n {a.label}\n </Button>\n ) : (\n <Button\n key={i}\n variant={a === main ? 'primary' : 'secondary'}\n icon={a.icon}\n onClick={a.onClick}\n disabled={a.disabled}\n className={wide ? 'ui-actbar-main' : undefined}\n >\n {a.label}\n </Button>\n );\n const menuItems = others.map((a): MenuItem =>\n a.danger\n ? { label: a.label, icon: a.icon, onSelect: a.onClick, disabled: a.disabled, danger: true, confirm: a.confirm }\n : { label: a.label, icon: a.icon, onSelect: a.onClick, disabled: a.disabled },\n );\n return (\n <div ref={box} className={cx('ui-actbar', className)}>\n <div className=\"ui-actbar-wide\">{(main ? [main, ...others] : others).map((a, i) => button(a, i, false))}</div>\n <div className=\"ui-actbar-narrow\">\n {main ? button(main, 0, true) : null}\n {others.length ? <Menu label={tr('更多操作')} triggerClassName=\"ui-actbar-more\" items={menuItems} /> : null}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAqCA,SAAgB,UAAU,EAAE,SAAS,aAA6B;CAEhE,MAAM,MAAM,MAAM,OAAuB,IAAI;CAC7C,eAAe,GAAG;CAClB,MAAM,OAAO,QAAQ,MAAM,MAAM,EAAE,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en readers say, when it should differ from text. Default: text in parentheses, 「(AI 撰寫)」. */
|
|
5
5
|
label?: string;
|
|
6
|
+
/** Extra class on the root element. */
|
|
6
7
|
className?: string;
|
|
7
8
|
}
|
|
8
9
|
/** A small gray 「AI 撰寫」 at the end of a sentence, paragraph, list item or cell written by AI. Not a link and not a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiMark.js","names":[],"sources":["../../../src/components/AiMark/AiMark.tsx"],"sourcesContent":["import { cx } from '../../internal/util';\nimport { tr } from '../../i18n';\n\nexport interface AiMarkProps {\n /** The words shown. Default 「AI 撰寫」; another source mark in the same style, e.g. 「推測」. */\n text?: string;\n /** What screen readers say, when it should differ from text. Default: text in parentheses, 「(AI 撰寫)」. */\n label?: string;\n className?: string;\n}\n\n/** A small gray 「AI 撰寫」 at the end of a sentence, paragraph, list item or cell written by AI. Not a link and not a\n * Tab stop; screen readers hear it in parentheses after the sentence. */\nexport function AiMark({ text, label, className }: AiMarkProps) {\n const words = text ?? tr('AI 撰寫');\n return (\n <>\n <span className={cx('ui-aimark', className)} aria-hidden=\"true\">\n {words}\n </span>\n <span className=\"ui-visually-hidden\">{label ?? tr('({v})', { v: words })}</span>\n </>\n );\n}\n"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"AiMark.js","names":[],"sources":["../../../src/components/AiMark/AiMark.tsx"],"sourcesContent":["import { cx } from '../../internal/util';\nimport { tr } from '../../i18n';\n\nexport interface AiMarkProps {\n /** The words shown. Default 「AI 撰寫」; another source mark in the same style, e.g. 「推測」. */\n text?: string;\n /** What screen readers say, when it should differ from text. Default: text in parentheses, 「(AI 撰寫)」. */\n label?: string;\n /** Extra class on the root element. */\n className?: string;\n}\n\n/** A small gray 「AI 撰寫」 at the end of a sentence, paragraph, list item or cell written by AI. Not a link and not a\n * Tab stop; screen readers hear it in parentheses after the sentence. */\nexport function AiMark({ text, label, className }: AiMarkProps) {\n const words = text ?? tr('AI 撰寫');\n return (\n <>\n <span className={cx('ui-aimark', className)} aria-hidden=\"true\">\n {words}\n </span>\n <span className=\"ui-visually-hidden\">{label ?? tr('({v})', { v: words })}</span>\n </>\n );\n}\n"],"mappings":";;;;;;;AAcA,SAAgB,OAAO,EAAE,MAAM,OAAO,aAA0B;CAC9D,MAAM,QAAQ,QAAQ,GAAG,OAAO;CAChC,OACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD;EAAM,WAAW,GAAG,aAAa,SAAS;EAAG,eAAY;EACtD,UAAA;CACG,CAAA,GACN,oBAAC,QAAD;EAAM,WAAU;EAAsB,UAAA,SAAS,GAAG,SAAS,EAAE,GAAG,MAAM,CAAC;CAAQ,CAAA,CAC/E,EAAA,CAAA;AAEN"}
|
|
@@ -3,15 +3,18 @@ export type AlertTone = 'info' | 'success' | 'warning' | 'danger';
|
|
|
3
3
|
export interface AlertProps {
|
|
4
4
|
/** Default 'info'. danger is announced at once (role alert). */
|
|
5
5
|
tone?: AlertTone;
|
|
6
|
+
/** One short line, bold. */
|
|
6
7
|
title?: string;
|
|
7
8
|
/** The cause and the fix, at most 2 short sentences; in a string, `backticks` are code. */
|
|
8
9
|
children?: React.ReactNode;
|
|
9
|
-
/** A verb, such as
|
|
10
|
+
/** A verb, such as 重試: an outline button under the text. */
|
|
10
11
|
actionLabel?: string;
|
|
12
|
+
/** Runs when the action button is pressed. */
|
|
11
13
|
onAction?: () => void;
|
|
12
14
|
/** Adds × for info and success; warning and danger stay until the problem is solved. */
|
|
13
15
|
onDismiss?: () => void;
|
|
16
|
+
/** Extra class on the root element. */
|
|
14
17
|
className?: string;
|
|
15
18
|
}
|
|
16
|
-
/** A message inside the page with a
|
|
19
|
+
/** A message inside the page: a card with the tone's icon, a title, a sentence and an optional action under it. */
|
|
17
20
|
export declare function Alert({ tone, title, children, actionLabel, onAction, onDismiss, className }: AlertProps): React.JSX.Element;
|
|
@@ -14,7 +14,7 @@ const ALERT_ICONS = {
|
|
|
14
14
|
warning: "M12 4l9 16H3zM12 10v4M12 17v.5",
|
|
15
15
|
danger: "M12 3a9 9 0 1 0 0 18a9 9 0 1 0 0-18zM12 8v5M12 16.5v.5"
|
|
16
16
|
};
|
|
17
|
-
/** A message inside the page with a
|
|
17
|
+
/** A message inside the page: a card with the tone's icon, a title, a sentence and an optional action under it. */
|
|
18
18
|
function Alert({ tone = "info", title, children, actionLabel, onAction, onDismiss, className }) {
|
|
19
19
|
const t = ALERT_ICONS[tone] ? tone : "info";
|
|
20
20
|
const canClose = (t === "info" || t === "success") && onDismiss;
|
|
@@ -28,20 +28,23 @@ function Alert({ tone = "info", title, children, actionLabel, onAction, onDismis
|
|
|
28
28
|
}),
|
|
29
29
|
/* @__PURE__ */ jsxs("div", {
|
|
30
30
|
className: "ui-alert-content",
|
|
31
|
-
children: [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
children
|
|
37
|
-
|
|
31
|
+
children: [
|
|
32
|
+
title ? /* @__PURE__ */ jsx("div", {
|
|
33
|
+
className: "ui-alert-title",
|
|
34
|
+
children: title
|
|
35
|
+
}) : null,
|
|
36
|
+
children ? /* @__PURE__ */ jsx("div", {
|
|
37
|
+
className: "ui-alert-body",
|
|
38
|
+
children: codeText(children)
|
|
39
|
+
}) : null,
|
|
40
|
+
actionLabel ? /* @__PURE__ */ jsx("button", {
|
|
41
|
+
type: "button",
|
|
42
|
+
className: "ui-btn ui-btn-secondary ui-alert-action",
|
|
43
|
+
onClick: onAction,
|
|
44
|
+
children: actionLabel
|
|
45
|
+
}) : null
|
|
46
|
+
]
|
|
38
47
|
}),
|
|
39
|
-
actionLabel ? /* @__PURE__ */ jsx("button", {
|
|
40
|
-
type: "button",
|
|
41
|
-
className: "ui-btn ui-btn-secondary ui-alert-action",
|
|
42
|
-
onClick: onAction,
|
|
43
|
-
children: actionLabel
|
|
44
|
-
}) : null,
|
|
45
48
|
canClose ? /* @__PURE__ */ jsx("button", {
|
|
46
49
|
type: "button",
|
|
47
50
|
className: "ui-alert-close",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","names":["phX"],"sources":["../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { tr } from '../../i18n';\nimport { Icon, type CustomIcon } from '../../icons/Icon';\nimport { cx } from '../../internal/util';\nimport { includeIcons } from '../../icons/store';\nimport phX from '../../icons/ph/x';\nimport { codeText } from '../InlineCode/InlineCode';\n\nincludeIcons(phX);\n\nexport type AlertTone = 'info' | 'success' | 'warning' | 'danger';\n\nconst ALERT_ICONS: Record<AlertTone, CustomIcon> = {\n info: 'M12 3a9 9 0 1 0 0 18a9 9 0 1 0 0-18zM12 11v5M12 7.5v.5',\n success: 'M5 12.5l4.5 4.5L19 7',\n warning: 'M12 4l9 16H3zM12 10v4M12 17v.5',\n danger: 'M12 3a9 9 0 1 0 0 18a9 9 0 1 0 0-18zM12 8v5M12 16.5v.5',\n};\n\nexport interface AlertProps {\n /** Default 'info'. danger is announced at once (role alert). */\n tone?: AlertTone;\n title?: string;\n /** The cause and the fix, at most 2 short sentences; in a string, `backticks` are code. */\n children?: React.ReactNode;\n /** A verb, such as
|
|
1
|
+
{"version":3,"file":"Alert.js","names":["phX"],"sources":["../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { tr } from '../../i18n';\nimport { Icon, type CustomIcon } from '../../icons/Icon';\nimport { cx } from '../../internal/util';\nimport { includeIcons } from '../../icons/store';\nimport phX from '../../icons/ph/x';\nimport { codeText } from '../InlineCode/InlineCode';\n\nincludeIcons(phX);\n\nexport type AlertTone = 'info' | 'success' | 'warning' | 'danger';\n\nconst ALERT_ICONS: Record<AlertTone, CustomIcon> = {\n info: 'M12 3a9 9 0 1 0 0 18a9 9 0 1 0 0-18zM12 11v5M12 7.5v.5',\n success: 'M5 12.5l4.5 4.5L19 7',\n warning: 'M12 4l9 16H3zM12 10v4M12 17v.5',\n danger: 'M12 3a9 9 0 1 0 0 18a9 9 0 1 0 0-18zM12 8v5M12 16.5v.5',\n};\n\nexport interface AlertProps {\n /** Default 'info'. danger is announced at once (role alert). */\n tone?: AlertTone;\n /** One short line, bold. */\n title?: string;\n /** The cause and the fix, at most 2 short sentences; in a string, `backticks` are code. */\n children?: React.ReactNode;\n /** A verb, such as 重試: an outline button under the text. */\n actionLabel?: string;\n /** Runs when the action button is pressed. */\n onAction?: () => void;\n /** Adds × for info and success; warning and danger stay until the problem is solved. */\n onDismiss?: () => void;\n /** Extra class on the root element. */\n className?: string;\n}\n\n/** A message inside the page: a card with the tone's icon, a title, a sentence and an optional action under it. */\nexport function Alert({ tone = 'info', title, children, actionLabel, onAction, onDismiss, className }: AlertProps) {\n const t = ALERT_ICONS[tone] ? tone : 'info';\n const canClose = (t === 'info' || t === 'success') && onDismiss;\n return (\n <div className={cx('ui-alert', 'ui-alert-' + t, className)} role={t === 'danger' ? 'alert' : 'status'}>\n <Icon d={ALERT_ICONS[t]} className=\"ui-alert-icon\" />\n <div className=\"ui-alert-content\">\n {title ? <div className=\"ui-alert-title\">{title}</div> : null}\n {children ? <div className=\"ui-alert-body\">{codeText(children)}</div> : null}\n {/* Under the text, not at the right end: with or without ✕ every action starts at the same place. */}\n {actionLabel ? (\n <button type=\"button\" className=\"ui-btn ui-btn-secondary ui-alert-action\" onClick={onAction}>\n {actionLabel}\n </button>\n ) : null}\n </div>\n {canClose ? (\n <button type=\"button\" className=\"ui-alert-close\" aria-label={tr('關閉提示')} onClick={onDismiss}>\n <Icon name=\"x\" size={16} />\n </button>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAQA,aAAaA,SAAG;AAIhB,MAAM,cAA6C;CACjD,MAAM;CACN,SAAS;CACT,SAAS;CACT,QAAQ;AACV;;AAoBA,SAAgB,MAAM,EAAE,OAAO,QAAQ,OAAO,UAAU,aAAa,UAAU,WAAW,aAAyB;CACjH,MAAM,IAAI,YAAY,QAAQ,OAAO;CACrC,MAAM,YAAY,MAAM,UAAU,MAAM,cAAc;CACtD,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,YAAY,cAAc,GAAG,SAAS;EAAG,MAAM,MAAM,WAAW,UAAU;EAA7F,UAAA;GACE,oBAAC,MAAD;IAAM,GAAG,YAAY;IAAI,WAAU;GAAiB,CAAA;GACpD,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA;KACG,QAAQ,oBAAC,OAAD;MAAK,WAAU;MAAkB,UAAA;KAAW,CAAA,IAAI;KACxD,WAAW,oBAAC,OAAD;MAAK,WAAU;MAAiB,UAAA,SAAS,QAAQ;KAAO,CAAA,IAAI;KAEvE,cACC,oBAAC,UAAD;MAAQ,MAAK;MAAS,WAAU;MAA0C,SAAS;MAChF,UAAA;KACK,CAAA,IACN;IACD;;GACJ,WACC,oBAAC,UAAD;IAAQ,MAAK;IAAS,WAAU;IAAiB,cAAY,GAAG,MAAM;IAAG,SAAS;IAChF,UAAA,oBAAC,MAAD;KAAM,MAAK;KAAI,MAAM;IAAK,CAAA;GACpB,CAAA,IACN;EACD;;AAET"}
|
|
@@ -7,13 +7,18 @@ export interface AppShellProps {
|
|
|
7
7
|
nav: NavSection[];
|
|
8
8
|
/** Id of the current page. */
|
|
9
9
|
value: string;
|
|
10
|
+
/** Called with the id of the nav item the person picks. */
|
|
10
11
|
onNavigate: (id: string) => void;
|
|
11
12
|
/** The product at the top of the sidebar: { mark, name, href } (see SideNav's NavBrand). Collapsed it shows the mark
|
|
12
13
|
* alone, a link named by `name`; open or pinned, the name fades in beside it. Plain text gets its first character as
|
|
13
14
|
* the mark. */
|
|
14
15
|
brand?: React.ReactNode | NavBrand;
|
|
15
|
-
/** The page title, shown once in the top bar.
|
|
16
|
+
/** The page title, shown once in the top bar. Leave it out when the page has its own title (PageHeader with
|
|
17
|
+
* `title` on a detail page); never both. */
|
|
16
18
|
title?: string;
|
|
19
|
+
/** Right after the title in the top bar, e.g. a Tag 「示範資料」 with the info icon. */
|
|
20
|
+
tags?: React.ReactNode;
|
|
21
|
+
/** @deprecated A breadcrumb goes at the top of the content: put `<Breadcrumb items={…} />` first in the page. */
|
|
17
22
|
breadcrumb?: BreadcrumbItem[];
|
|
18
23
|
/** Opens search (CommandPalette). */
|
|
19
24
|
onSearch?: () => void;
|
|
@@ -27,10 +32,11 @@ export interface AppShellProps {
|
|
|
27
32
|
* pins or unpins it; their choice is kept in the browser. Default false: a 72 px strip of icons that opens to
|
|
28
33
|
* 240 px over the content while the pointer or the keyboard focus is on it. */
|
|
29
34
|
defaultPinned?: boolean;
|
|
35
|
+
/** Extra class on the root element. */
|
|
30
36
|
className?: string;
|
|
31
37
|
}
|
|
32
|
-
/** The dashboard frame: sidebar (240 px, 72 px collapsed)
|
|
33
|
-
* 600 to
|
|
38
|
+
/** The dashboard frame: sidebar (240 px, 72 px collapsed) from 1024 px, a drawer from the top bar's menu button from
|
|
39
|
+
* 600 to 1023 px, and bottom tabs on phones.
|
|
34
40
|
* The top bar hides while scrolling down and returns when scrolling up. */
|
|
35
|
-
export declare function AppShell({ nav, value, onNavigate, brand, title, breadcrumb, onSearch, actions, children, tabLabels, defaultPinned, className }: AppShellProps): React.JSX.Element;
|
|
41
|
+
export declare function AppShell({ nav, value, onNavigate, brand, title, tags, breadcrumb, onSearch, actions, children, tabLabels, defaultPinned, className }: AppShellProps): React.JSX.Element;
|
|
36
42
|
export { focusMain };
|
|
@@ -3,11 +3,14 @@ import { SideNav } from "../SideNav/SideNav.js";
|
|
|
3
3
|
import { TopBar } from "../TopBar/TopBar.js";
|
|
4
4
|
import { MobileTabBar } from "../MobileTabBar/MobileTabBar.js";
|
|
5
5
|
import { Drawer } from "../Drawer/Drawer.js";
|
|
6
|
+
import { AutoToaster } from "../Toast/Toast.js";
|
|
6
7
|
import { tr } from "../../i18n.js";
|
|
7
|
-
import { cx,
|
|
8
|
+
import { cx, useMedia, useNarrow } from "../../internal/util.js";
|
|
9
|
+
import { asText, useStored } from "../../internal/stored.js";
|
|
8
10
|
import { devWarn } from "../../internal/dev.js";
|
|
9
11
|
import { ensureAnnouncer } from "../../announce.js";
|
|
10
|
-
import { focusMain } from "../../internal/focusMain.js";
|
|
12
|
+
import { focusMain, installFocusMain } from "../../internal/focusMain.js";
|
|
13
|
+
import { ShellTitle } from "../../internal/shell.js";
|
|
11
14
|
import { includeIcons } from "../../icons/store.js";
|
|
12
15
|
import dots_three_default from "../../icons/ph/dots-three.js";
|
|
13
16
|
import * as React from "react";
|
|
@@ -21,18 +24,18 @@ const OPEN_DELAY = 100;
|
|
|
21
24
|
/** Pointer away this long before it hides again (a slip off the edge does not). */
|
|
22
25
|
const CLOSE_DELAY = 300;
|
|
23
26
|
const MORE = "\0more";
|
|
24
|
-
/** The dashboard frame: sidebar (240 px, 72 px collapsed)
|
|
25
|
-
* 600 to
|
|
27
|
+
/** The dashboard frame: sidebar (240 px, 72 px collapsed) from 1024 px, a drawer from the top bar's menu button from
|
|
28
|
+
* 600 to 1023 px, and bottom tabs on phones.
|
|
26
29
|
* The top bar hides while scrolling down and returns when scrolling up. */
|
|
27
|
-
function AppShell({ nav, value, onNavigate, brand, title, breadcrumb, onSearch, actions, children, tabLabels, defaultPinned = false, className }) {
|
|
30
|
+
function AppShell({ nav, value, onNavigate, brand, title, tags, breadcrumb, onSearch, actions, children, tabLabels, defaultPinned = false, className }) {
|
|
31
|
+
devWarn(breadcrumb, "AppShell", "`breadcrumb` is deprecated: in the top bar it repeats the page title. Put <Breadcrumb items={…} /> first in the page content instead.");
|
|
28
32
|
const phone = useNarrow();
|
|
29
|
-
const tablet = useMedia("(min-width: 600px) and (max-width:
|
|
30
|
-
const [
|
|
31
|
-
const [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
});
|
|
33
|
+
const tablet = useMedia("(min-width: 600px) and (max-width: 1023px)");
|
|
34
|
+
const [storedCollapsed, setStoredCollapsed] = useStored(COLLAPSE_KEY, asText, null);
|
|
35
|
+
const [storedPin, setStoredPin] = useStored(PIN_KEY, asText, null);
|
|
36
|
+
const userCollapsed = storedCollapsed === "1";
|
|
37
|
+
const pinned = storedPin != null ? storedPin === "1" : storedCollapsed != null || defaultPinned;
|
|
38
|
+
React.useEffect(installFocusMain, []);
|
|
36
39
|
const [open, setOpen] = React.useState(false);
|
|
37
40
|
const openTimer = React.useRef(void 0);
|
|
38
41
|
const closeTimer = React.useRef(void 0);
|
|
@@ -48,8 +51,7 @@ function AppShell({ nav, value, onNavigate, brand, title, breadcrumb, onSearch,
|
|
|
48
51
|
}, []);
|
|
49
52
|
const collapsed = pinned ? userCollapsed : !open;
|
|
50
53
|
const togglePin = () => {
|
|
51
|
-
|
|
52
|
-
setPinned(!pinned);
|
|
54
|
+
setStoredPin(pinned ? "0" : "1");
|
|
53
55
|
setOpen(false);
|
|
54
56
|
};
|
|
55
57
|
const top = nav.flatMap((s) => s.items);
|
|
@@ -94,6 +96,10 @@ function AppShell({ nav, value, onNavigate, brand, title, breadcrumb, onSearch,
|
|
|
94
96
|
React.useEffect(() => {
|
|
95
97
|
ensureAnnouncer();
|
|
96
98
|
}, []);
|
|
99
|
+
const shellTitle = React.useMemo(() => ({
|
|
100
|
+
inShell: true,
|
|
101
|
+
title: !!title
|
|
102
|
+
}), [title]);
|
|
97
103
|
return /* @__PURE__ */ jsxs("div", {
|
|
98
104
|
className: cx("ui-shell", phone && "is-phone", className),
|
|
99
105
|
children: [
|
|
@@ -115,8 +121,7 @@ function AppShell({ nav, value, onNavigate, brand, title, breadcrumb, onSearch,
|
|
|
115
121
|
pinned: true,
|
|
116
122
|
onPin: togglePin,
|
|
117
123
|
onToggle: () => {
|
|
118
|
-
|
|
119
|
-
setUserCollapsed(!userCollapsed);
|
|
124
|
+
setStoredCollapsed(userCollapsed ? "0" : "1");
|
|
120
125
|
}
|
|
121
126
|
}) : /* @__PURE__ */ jsx("div", {
|
|
122
127
|
className: cx("ui-shell-rail", open && "is-open"),
|
|
@@ -155,6 +160,7 @@ function AppShell({ nav, value, onNavigate, brand, title, breadcrumb, onSearch,
|
|
|
155
160
|
/* @__PURE__ */ jsx(TopBar, {
|
|
156
161
|
className: cx("ui-shell-top", hidden && "is-hidden"),
|
|
157
162
|
title,
|
|
163
|
+
tags,
|
|
158
164
|
breadcrumb,
|
|
159
165
|
onSearch: onSearch ?? false,
|
|
160
166
|
onMenu: tablet ? () => setMoreOpen(true) : void 0,
|
|
@@ -162,9 +168,13 @@ function AppShell({ nav, value, onNavigate, brand, title, breadcrumb, onSearch,
|
|
|
162
168
|
}),
|
|
163
169
|
/* @__PURE__ */ jsx("main", {
|
|
164
170
|
ref: main,
|
|
171
|
+
id: "main",
|
|
165
172
|
className: "ui-shell-main",
|
|
166
173
|
tabIndex: -1,
|
|
167
|
-
children
|
|
174
|
+
children: /* @__PURE__ */ jsx(ShellTitle.Provider, {
|
|
175
|
+
value: shellTitle,
|
|
176
|
+
children
|
|
177
|
+
})
|
|
168
178
|
}),
|
|
169
179
|
phone && tabs.length ? /* @__PURE__ */ jsx(MobileTabBar, {
|
|
170
180
|
items: tabs,
|
|
@@ -174,7 +184,7 @@ function AppShell({ nav, value, onNavigate, brand, title, breadcrumb, onSearch,
|
|
|
174
184
|
}) : null,
|
|
175
185
|
phone || tablet ? /* @__PURE__ */ jsx(Drawer, {
|
|
176
186
|
open: moreOpen,
|
|
177
|
-
|
|
187
|
+
onOpenChange: setMoreOpen,
|
|
178
188
|
title: tr("全部頁面"),
|
|
179
189
|
side: tablet ? "left" : "right",
|
|
180
190
|
width: tablet ? 300 : void 0,
|
|
@@ -187,7 +197,8 @@ function AppShell({ nav, value, onNavigate, brand, title, breadcrumb, onSearch,
|
|
|
187
197
|
onNavigate(id);
|
|
188
198
|
}
|
|
189
199
|
})
|
|
190
|
-
}) : null
|
|
200
|
+
}) : null,
|
|
201
|
+
/* @__PURE__ */ jsx(AutoToaster, {})
|
|
191
202
|
]
|
|
192
203
|
})
|
|
193
204
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.js","names":["phDotsThree"],"sources":["../../../src/components/AppShell/AppShell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { SideNav, type NavBrand, type NavItem, type NavSection } from '../SideNav/SideNav';\nimport { TopBar } from '../TopBar/TopBar';\nimport { MobileTabBar, type MobileTab } from '../MobileTabBar/MobileTabBar';\nimport { Drawer } from '../Drawer/Drawer';\nimport { tr } from '../../i18n';\nimport type { BreadcrumbItem } from '../Breadcrumb/Breadcrumb';\nimport { cx, store, useMedia, useNarrow } from '../../internal/util';\nimport { devWarn } from '../../internal/dev';\nimport { ensureAnnouncer } from '../../announce';\nimport { focusMain } from '../../internal/focusMain';\nimport { includeIcons } from '../../icons/store';\nimport phDotsThree from '../../icons/ph/dots-three';\n\nincludeIcons(phDotsThree);\n\nexport interface AppShellProps {\n /** Sidebar groups. On phones, top-level items with an icon become bottom tabs; pages they cannot reach go under 「更多」. */\n nav: NavSection[];\n /** Id of the current page. */\n value: string;\n onNavigate: (id: string) => void;\n /** The product at the top of the sidebar: { mark, name, href } (see SideNav's NavBrand). Collapsed it shows the mark\n * alone, a link named by `name`; open or pinned, the name fades in beside it. Plain text gets its first character as\n * the mark. */\n brand?: React.ReactNode | NavBrand;\n /** The page title, shown once in the top bar. Do not repeat it as a heading in the page. */\n title?: string;\n breadcrumb?: BreadcrumbItem[];\n /** Opens search (CommandPalette). */\n onSearch?: () => void;\n /** Right side of the top bar: NotificationBell, ProjectSwitcher, the account menu. */\n actions?: React.ReactNode;\n /** The page: Cards and sections, 32 px apart. */\n children: React.ReactNode;\n /** Labels under the phone tab bar's icons (MobileTabBar labels). Default true. */\n tabLabels?: boolean;\n /** Desktop: whether the sidebar starts pinned (240 px, or 72 px collapsed, beside the content) until the reader\n * pins or unpins it; their choice is kept in the browser. Default false: a 72 px strip of icons that opens to\n * 240 px over the content while the pointer or the keyboard focus is on it. */\n defaultPinned?: boolean;\n className?: string;\n}\n\nconst COLLAPSE_KEY = 'ui-nav-collapsed';\nconst PIN_KEY = 'ui-nav-pinned';\n/** Pointer on the strip this long before it opens (passing over it on the way to the browser's edge does not). */\nconst OPEN_DELAY = 100;\n/** Pointer away this long before it hides again (a slip off the edge does not). */\nconst CLOSE_DELAY = 300;\n\nexport { focusMain };\nconst MORE = '\\u0000more';\n\n/** The dashboard frame: sidebar (240 px, 72 px collapsed) above 1024 px, a drawer from the top bar's menu button from\n * 600 to 1024 px, and bottom tabs on phones.\n * The top bar hides while scrolling down and returns when scrolling up. */\nexport function AppShell({\n nav,\n value,\n onNavigate,\n brand,\n title,\n breadcrumb,\n onSearch,\n actions,\n children,\n tabLabels,\n defaultPinned = false,\n className,\n}: AppShellProps) {\n const phone = useNarrow();\n // 600 to 1024 px (tablets, narrow windows): no sidebar; the top bar's menu button opens the whole nav in a drawer.\n const tablet = useMedia('(min-width: 600px) and (max-width: 1024px)');\n const [userCollapsed, setUserCollapsed] = React.useState(() => store(COLLAPSE_KEY) === '1');\n // Pinned: the sidebar sits beside the content as before (240 px, or 72 px collapsed). Not pinned: a 72 px strip of\n // icons that opens over the content. Someone who already chose collapsed or expanded keeps a pinned sidebar.\n const [pinned, setPinned] = React.useState(() => {\n const v = store(PIN_KEY);\n if (v != null) return v === '1';\n return store(COLLAPSE_KEY) != null || defaultPinned;\n });\n const [open, setOpen] = React.useState(false);\n const openTimer = React.useRef<ReturnType<typeof setTimeout>>(undefined);\n const closeTimer = React.useRef<ReturnType<typeof setTimeout>>(undefined);\n const later = (show: boolean) => {\n clearTimeout(openTimer.current);\n clearTimeout(closeTimer.current);\n if (show) openTimer.current = setTimeout(() => setOpen(true), OPEN_DELAY);\n else closeTimer.current = setTimeout(() => setOpen(false), CLOSE_DELAY);\n };\n React.useEffect(\n () => () => {\n clearTimeout(openTimer.current);\n clearTimeout(closeTimer.current);\n },\n [],\n );\n const collapsed = pinned ? userCollapsed : !open;\n const togglePin = () => {\n store(PIN_KEY, pinned ? '0' : '1');\n setPinned(!pinned);\n setOpen(false);\n };\n const top = nav.flatMap((s) => s.items);\n const parentOf = (id: string) => top.find((it) => it.children?.some((c) => c.id === id));\n // Phones: top-level items with an icon become tabs (a group opens its first page).\n // When some page is not reachable that way, the last tab becomes 「更多」 and opens the whole nav.\n const withIcon = top.filter((it): it is NavItem & { icon: NonNullable<NavItem['icon']> } => !!it.icon);\n const unreachable = top.some((it) => !it.icon || (it.children?.length ?? 0) > 1) || withIcon.length > 5;\n const tabs: MobileTab[] = withIcon.slice(0, unreachable ? 4 : 5).map((it) => ({ id: it.id, label: it.label, icon: it.icon }));\n if (unreachable) tabs.push({ id: MORE, label: tr('更多'), icon: 'dots-three' });\n const [moreOpen, setMoreOpen] = React.useState(false);\n // Widened past the drawer's layouts (to a desktop with the sidebar): closed, so it does not pop up again when the\n // window narrows later.\n if (moreOpen && !phone && !tablet) setMoreOpen(false);\n devWarn(phone && withIcon.length < 2, 'AppShell', 'phones show the top-level nav items as bottom tabs; give at least 2 of them an icon.');\n const current = parentOf(value)?.id ?? value;\n const tabValue = tabs.some((t) => t.id === current) ? current : MORE;\n const onTab = (id: string) => {\n if (id === MORE) return setMoreOpen(true);\n if (id === current) return;\n const item = top.find((it) => it.id === id);\n onNavigate(item?.children?.[0]?.id ?? id);\n };\n\n // Hide the top bar while scrolling down, show it again on the way up.\n const main = React.useRef<HTMLElement>(null);\n const [hidden, setHidden] = React.useState(false);\n React.useEffect(() => {\n const el = main.current;\n if (!el) return;\n let last = el.scrollTop;\n const onScroll = () => {\n const y = el.scrollTop;\n if (Math.abs(y - last) < 8) return;\n setHidden(y > last && y > 64);\n last = y;\n };\n el.addEventListener('scroll', onScroll, { passive: true });\n return () => el.removeEventListener('scroll', onScroll);\n }, []);\n\n React.useEffect(() => {\n ensureAnnouncer();\n }, []);\n return (\n <div className={cx('ui-shell', phone && 'is-phone', className)}>\n {/* First stop for the keyboard: skips the navigation. */}\n <a\n className=\"ui-skip\"\n href=\"#main\"\n onClick={(e) => {\n e.preventDefault();\n focusMain();\n }}\n >\n {tr('跳到主要內容')}\n </a>\n {phone || tablet ? null : pinned ? (\n <SideNav\n sections={nav}\n value={value}\n onChange={onNavigate}\n brand={brand}\n collapsed={collapsed}\n pinned\n onPin={togglePin}\n onToggle={() => {\n store(COLLAPSE_KEY, userCollapsed ? '0' : '1');\n setUserCollapsed(!userCollapsed);\n }}\n />\n ) : (\n // Not pinned: the strip keeps its 72 px in the layout; the sidebar inside opens over the content and closes\n // again when the pointer and the focus have left it, after a page is chosen, or on Esc.\n <div\n className={cx('ui-shell-rail', open && 'is-open')}\n onPointerEnter={(e) => e.pointerType === 'mouse' && later(true)}\n onPointerLeave={(e) => e.pointerType === 'mouse' && later(false)}\n onFocus={(e) => {\n if (!(e.target as Element).matches(':focus-visible')) return;\n clearTimeout(closeTimer.current);\n setOpen(true);\n }}\n onBlur={(e) => {\n if (!e.currentTarget.contains(e.relatedTarget as Node | null)) setOpen(false);\n }}\n onKeyDown={(e) => {\n if (e.key === 'Escape' && open) {\n e.stopPropagation();\n setOpen(false);\n }\n }}\n >\n <SideNav\n sections={nav}\n value={value}\n onChange={(id) => {\n clearTimeout(openTimer.current);\n setOpen(false);\n onNavigate(id);\n }}\n brand={brand}\n collapsed={collapsed}\n onPin={togglePin}\n />\n </div>\n )}\n <div className=\"ui-shell-body\">\n <TopBar\n className={cx('ui-shell-top', hidden && 'is-hidden')}\n title={title}\n breadcrumb={breadcrumb}\n onSearch={onSearch ?? false}\n onMenu={tablet ? () => setMoreOpen(true) : undefined}\n >\n {actions}\n </TopBar>\n <main ref={main} className=\"ui-shell-main\" tabIndex={-1}>\n {children}\n </main>\n {phone && tabs.length ? <MobileTabBar items={tabs} value={tabValue} onChange={onTab} labels={tabLabels} /> : null}\n {phone || tablet ? (\n <Drawer open={moreOpen} onClose={() => setMoreOpen(false)} title={tr('全部頁面')} side={tablet ? 'left' : 'right'} width={tablet ? 300 : undefined}>\n <SideNav\n className=\"ui-shell-allnav\"\n sections={nav}\n value={value}\n onChange={(id) => {\n setMoreOpen(false);\n onNavigate(id);\n }}\n />\n </Drawer>\n ) : null}\n </div>\n </div>\n );\n}\n"],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,oBAAC,QAAD;MACE,WAAW,GAAG,gBAAgB,UAAU,WAAW;MAC5C;MACK;MACZ,UAAU,YAAY;MACtB,QAAQ,eAAe,YAAY,IAAI,IAAI,KAAA;MAE1C,UAAA;KACK,CAAA;KACR,oBAAC,QAAD;MAAM,KAAK;MAAM,WAAU;MAAgB,UAAU;MAClD;KACG,CAAA;KACL,SAAS,KAAK,SAAS,oBAAC,cAAD;MAAc,OAAO;MAAM,OAAO;MAAU,UAAU;MAAO,QAAQ;KAAY,CAAA,IAAI;KAC5G,SAAS,SACR,oBAAC,QAAD;MAAQ,MAAM;MAAU,eAAe,YAAY,KAAK;MAAG,OAAO,GAAG,MAAM;MAAG,MAAM,SAAS,SAAS;MAAS,OAAO,SAAS,MAAM,KAAA;MACnI,UAAA,oBAAC,SAAD;OACE,WAAU;OACV,UAAU;OACH;OACP,WAAW,OAAO;QAChB,YAAY,KAAK;QACjB,WAAW,EAAE;OACf;MACD,CAAA;KACK,CAAA,IACN;IACD;;EACF;;AAET"}
|
|
1
|
+
{"version":3,"file":"AppShell.js","names":["phDotsThree"],"sources":["../../../src/components/AppShell/AppShell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { SideNav, type NavBrand, type NavItem, type NavSection } from '../SideNav/SideNav';\nimport { TopBar } from '../TopBar/TopBar';\nimport { MobileTabBar, type MobileTab } from '../MobileTabBar/MobileTabBar';\nimport { Drawer } from '../Drawer/Drawer';\nimport { AutoToaster } from '../Toast/Toast';\nimport { tr } from '../../i18n';\nimport type { BreadcrumbItem } from '../Breadcrumb/Breadcrumb';\nimport { cx, useMedia, useNarrow } from '../../internal/util';\nimport { asText, useStored } from '../../internal/stored';\nimport { devWarn } from '../../internal/dev';\nimport { ensureAnnouncer } from '../../announce';\nimport { focusMain, installFocusMain } from '../../internal/focusMain';\nimport { ShellTitle } from '../../internal/shell';\nimport { includeIcons } from '../../icons/store';\nimport phDotsThree from '../../icons/ph/dots-three';\n\nincludeIcons(phDotsThree);\n\nexport interface AppShellProps {\n /** Sidebar groups. On phones, top-level items with an icon become bottom tabs; pages they cannot reach go under 「更多」. */\n nav: NavSection[];\n /** Id of the current page. */\n value: string;\n /** Called with the id of the nav item the person picks. */\n onNavigate: (id: string) => void;\n /** The product at the top of the sidebar: { mark, name, href } (see SideNav's NavBrand). Collapsed it shows the mark\n * alone, a link named by `name`; open or pinned, the name fades in beside it. Plain text gets its first character as\n * the mark. */\n brand?: React.ReactNode | NavBrand;\n /** The page title, shown once in the top bar. Leave it out when the page has its own title (PageHeader with\n * `title` on a detail page); never both. */\n title?: string;\n /** Right after the title in the top bar, e.g. a Tag 「示範資料」 with the info icon. */\n tags?: React.ReactNode;\n /** @deprecated A breadcrumb goes at the top of the content: put `<Breadcrumb items={…} />` first in the page. */\n breadcrumb?: BreadcrumbItem[];\n /** Opens search (CommandPalette). */\n onSearch?: () => void;\n /** Right side of the top bar: NotificationBell, ProjectSwitcher, the account menu. */\n actions?: React.ReactNode;\n /** The page: Cards and sections, 32 px apart. */\n children: React.ReactNode;\n /** Labels under the phone tab bar's icons (MobileTabBar labels). Default true. */\n tabLabels?: boolean;\n /** Desktop: whether the sidebar starts pinned (240 px, or 72 px collapsed, beside the content) until the reader\n * pins or unpins it; their choice is kept in the browser. Default false: a 72 px strip of icons that opens to\n * 240 px over the content while the pointer or the keyboard focus is on it. */\n defaultPinned?: boolean;\n /** Extra class on the root element. */\n className?: string;\n}\n\nconst COLLAPSE_KEY = 'ui-nav-collapsed';\nconst PIN_KEY = 'ui-nav-pinned';\n/** Pointer on the strip this long before it opens (passing over it on the way to the browser's edge does not). */\nconst OPEN_DELAY = 100;\n/** Pointer away this long before it hides again (a slip off the edge does not). */\nconst CLOSE_DELAY = 300;\n\nexport { focusMain };\nconst MORE = '\\u0000more';\n\n/** The dashboard frame: sidebar (240 px, 72 px collapsed) from 1024 px, a drawer from the top bar's menu button from\n * 600 to 1023 px, and bottom tabs on phones.\n * The top bar hides while scrolling down and returns when scrolling up. */\nexport function AppShell({\n nav,\n value,\n onNavigate,\n brand,\n title,\n tags,\n breadcrumb,\n onSearch,\n actions,\n children,\n tabLabels,\n defaultPinned = false,\n className,\n}: AppShellProps) {\n devWarn(\n breadcrumb,\n 'AppShell',\n '`breadcrumb` is deprecated: in the top bar it repeats the page title. Put <Breadcrumb items={…} /> first in the page content instead.',\n );\n const phone = useNarrow();\n // 600 to 1023 px (tablets, narrow windows): no sidebar; the top bar's menu button opens the whole nav in a drawer.\n // 1024 px is the navigation's own edge, separate from the page-layout breakpoint bp-desktop (960 px).\n const tablet = useMedia('(min-width: 600px) and (max-width: 1023px)');\n // Stored choices: the same on the server and the first render in the browser (none stored), then the stored ones.\n const [storedCollapsed, setStoredCollapsed] = useStored<string | null>(COLLAPSE_KEY, asText, null);\n const [storedPin, setStoredPin] = useStored<string | null>(PIN_KEY, asText, null);\n const userCollapsed = storedCollapsed === '1';\n // Pinned: the sidebar sits beside the content as before (240 px, or 72 px collapsed). Not pinned: a 72 px strip of\n // icons that opens over the content. Someone who already chose collapsed or expanded keeps a pinned sidebar.\n const pinned = storedPin != null ? storedPin === '1' : storedCollapsed != null || defaultPinned;\n React.useEffect(installFocusMain, []);\n const [open, setOpen] = React.useState(false);\n const openTimer = React.useRef<ReturnType<typeof setTimeout>>(undefined);\n const closeTimer = React.useRef<ReturnType<typeof setTimeout>>(undefined);\n const later = (show: boolean) => {\n clearTimeout(openTimer.current);\n clearTimeout(closeTimer.current);\n if (show) openTimer.current = setTimeout(() => setOpen(true), OPEN_DELAY);\n else closeTimer.current = setTimeout(() => setOpen(false), CLOSE_DELAY);\n };\n React.useEffect(\n () => () => {\n clearTimeout(openTimer.current);\n clearTimeout(closeTimer.current);\n },\n [],\n );\n const collapsed = pinned ? userCollapsed : !open;\n const togglePin = () => {\n setStoredPin(pinned ? '0' : '1');\n setOpen(false);\n };\n const top = nav.flatMap((s) => s.items);\n const parentOf = (id: string) => top.find((it) => it.children?.some((c) => c.id === id));\n // Phones: top-level items with an icon become tabs (a group opens its first page).\n // When some page is not reachable that way, the last tab becomes 「更多」 and opens the whole nav.\n const withIcon = top.filter((it): it is NavItem & { icon: NonNullable<NavItem['icon']> } => !!it.icon);\n const unreachable = top.some((it) => !it.icon || (it.children?.length ?? 0) > 1) || withIcon.length > 5;\n const tabs: MobileTab[] = withIcon.slice(0, unreachable ? 4 : 5).map((it) => ({ id: it.id, label: it.label, icon: it.icon }));\n if (unreachable) tabs.push({ id: MORE, label: tr('更多'), icon: 'dots-three' });\n const [moreOpen, setMoreOpen] = React.useState(false);\n // Widened past the drawer's layouts (to a desktop with the sidebar): closed, so it does not pop up again when the\n // window narrows later.\n if (moreOpen && !phone && !tablet) setMoreOpen(false);\n devWarn(phone && withIcon.length < 2, 'AppShell', 'phones show the top-level nav items as bottom tabs; give at least 2 of them an icon.');\n const current = parentOf(value)?.id ?? value;\n const tabValue = tabs.some((t) => t.id === current) ? current : MORE;\n const onTab = (id: string) => {\n if (id === MORE) return setMoreOpen(true);\n if (id === current) return;\n const item = top.find((it) => it.id === id);\n onNavigate(item?.children?.[0]?.id ?? id);\n };\n\n // Hide the top bar while scrolling down, show it again on the way up.\n const main = React.useRef<HTMLElement>(null);\n const [hidden, setHidden] = React.useState(false);\n React.useEffect(() => {\n const el = main.current;\n if (!el) return;\n let last = el.scrollTop;\n const onScroll = () => {\n const y = el.scrollTop;\n if (Math.abs(y - last) < 8) return;\n setHidden(y > last && y > 64);\n last = y;\n };\n el.addEventListener('scroll', onScroll, { passive: true });\n return () => el.removeEventListener('scroll', onScroll);\n }, []);\n\n React.useEffect(() => {\n ensureAnnouncer();\n }, []);\n const shellTitle = React.useMemo(() => ({ inShell: true, title: !!title }), [title]);\n return (\n <div className={cx('ui-shell', phone && 'is-phone', className)}>\n {/* First stop for the keyboard: skips the navigation. */}\n <a\n className=\"ui-skip\"\n href=\"#main\"\n onClick={(e) => {\n e.preventDefault();\n focusMain();\n }}\n >\n {tr('跳到主要內容')}\n </a>\n {phone || tablet ? null : pinned ? (\n <SideNav\n sections={nav}\n value={value}\n onChange={onNavigate}\n brand={brand}\n collapsed={collapsed}\n pinned\n onPin={togglePin}\n onToggle={() => {\n setStoredCollapsed(userCollapsed ? '0' : '1');\n }}\n />\n ) : (\n // Not pinned: the strip keeps its 72 px in the layout; the sidebar inside opens over the content and closes\n // again when the pointer and the focus have left it, after a page is chosen, or on Esc.\n <div\n className={cx('ui-shell-rail', open && 'is-open')}\n onPointerEnter={(e) => e.pointerType === 'mouse' && later(true)}\n onPointerLeave={(e) => e.pointerType === 'mouse' && later(false)}\n onFocus={(e) => {\n if (!(e.target as Element).matches(':focus-visible')) return;\n clearTimeout(closeTimer.current);\n setOpen(true);\n }}\n onBlur={(e) => {\n if (!e.currentTarget.contains(e.relatedTarget as Node | null)) setOpen(false);\n }}\n onKeyDown={(e) => {\n if (e.key === 'Escape' && open) {\n e.stopPropagation();\n setOpen(false);\n }\n }}\n >\n <SideNav\n sections={nav}\n value={value}\n onChange={(id) => {\n clearTimeout(openTimer.current);\n setOpen(false);\n onNavigate(id);\n }}\n brand={brand}\n collapsed={collapsed}\n onPin={togglePin}\n />\n </div>\n )}\n <div className=\"ui-shell-body\">\n <TopBar\n className={cx('ui-shell-top', hidden && 'is-hidden')}\n title={title}\n tags={tags}\n breadcrumb={breadcrumb}\n onSearch={onSearch ?? false}\n onMenu={tablet ? () => setMoreOpen(true) : undefined}\n >\n {actions}\n </TopBar>\n <main ref={main} id=\"main\" className=\"ui-shell-main\" tabIndex={-1}>\n <ShellTitle.Provider value={shellTitle}>{children}</ShellTitle.Provider>\n </main>\n {phone && tabs.length ? <MobileTabBar items={tabs} value={tabValue} onChange={onTab} labels={tabLabels} /> : null}\n {phone || tablet ? (\n <Drawer open={moreOpen} onOpenChange={setMoreOpen} title={tr('全部頁面')} side={tablet ? 'left' : 'right'} width={tablet ? 300 : undefined}>\n <SideNav\n className=\"ui-shell-allnav\"\n sections={nav}\n value={value}\n onChange={(id) => {\n setMoreOpen(false);\n onNavigate(id);\n }}\n />\n </Drawer>\n ) : null}\n {/* toast() works on every AppShell page without setup; a page's own <Toaster /> takes over. */}\n <AutoToaster />\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,aAAaA,kBAAW;AAoCxB,MAAM,eAAe;AACrB,MAAM,UAAU;;AAEhB,MAAM,aAAa;;AAEnB,MAAM,cAAc;AAGpB,MAAM,OAAO;;;;AAKb,SAAgB,SAAS,EACvB,KACA,OACA,YACA,OACA,OACA,MACA,YACA,UACA,SACA,UACA,WACA,gBAAgB,OAChB,aACgB;CAChB,QACE,YACA,YACA,uIACF;CACA,MAAM,QAAQ,UAAU;CAGxB,MAAM,SAAS,SAAS,4CAA4C;CAEpE,MAAM,CAAC,iBAAiB,sBAAsB,UAAyB,cAAc,QAAQ,IAAI;CACjG,MAAM,CAAC,WAAW,gBAAgB,UAAyB,SAAS,QAAQ,IAAI;CAChF,MAAM,gBAAgB,oBAAoB;CAG1C,MAAM,SAAS,aAAa,OAAO,cAAc,MAAM,mBAAmB,QAAQ;CAClF,MAAM,UAAU,kBAAkB,CAAC,CAAC;CACpC,MAAM,CAAC,MAAM,WAAW,MAAM,SAAS,KAAK;CAC5C,MAAM,YAAY,MAAM,OAAsC,KAAA,CAAS;CACvE,MAAM,aAAa,MAAM,OAAsC,KAAA,CAAS;CACxE,MAAM,SAAS,SAAkB;EAC/B,aAAa,UAAU,OAAO;EAC9B,aAAa,WAAW,OAAO;EAC/B,IAAI,MAAM,UAAU,UAAU,iBAAiB,QAAQ,IAAI,GAAG,UAAU;OACnE,WAAW,UAAU,iBAAiB,QAAQ,KAAK,GAAG,WAAW;CACxE;CACA,MAAM,sBACQ;EACV,aAAa,UAAU,OAAO;EAC9B,aAAa,WAAW,OAAO;CACjC,GACA,CAAC,CACH;CACA,MAAM,YAAY,SAAS,gBAAgB,CAAC;CAC5C,MAAM,kBAAkB;EACtB,aAAa,SAAS,MAAM,GAAG;EAC/B,QAAQ,KAAK;CACf;CACA,MAAM,MAAM,IAAI,S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